import { IBlockActivated , NavOpts , NavPosition , BlockIDStr , StringSetMap , DoIndentResult , DoUnIndentResult , ICreatedBlock , IActiveBlock , BlockNameStr , IBlockMerge , BlocksIndex , IDropTarget , INewBlockOpts , DoPutOpts , IBlockContent , ICreateNewNamedBlockOpts } from "./BlocksStore" ; import { IBlock } from "./IBlock" ; import { Block } from "./Block" ; import { BlockTargetStr } from "../NoteLinkLoader" ; import { ReverseIndex } from "./ReverseIndex" ; import { MarkdownStr } from "polar-shared/src/util/Strings" ; /**
 * deleteBlocks
 * createNewBlock
 * createNewNamedBlock
 * collapse
 * expand
 * doIndent
 * doUnIndent
 * mergeBlocks
 */ export interface IBlocksStore { root : BlockIDStr | undefined ; active : IActiveBlock | undefined ; dropSource : BlockIDStr | undefined ; dropTarget : IDropTarget | undefined ; reverse : ReverseIndex ; index : BlocksIndex ; hasSnapshot : boolean ; doDelete ( blockIDs ) : void ; doPut ( blocks , opts ? ) : void ; doCreateNewNamedBlock ( name , opts ? ) : BlockIDStr ; selected ( ) : StringSetMap ; selectedIDs ( ) : ReadonlyArray < BlockIDStr > ; clearSelected ( reason ) : void ; hasSelected ( ) : boolean ; lookup ( blocks ) : ReadonlyArray < IBlock > ; lookupReverse ( id ) : ReadonlyArray < BlockIDStr > ; pathToBlock ( id ) : ReadonlyArray < Block > ; setActive ( active ) : void ; setRoot ( root ) : void ; getBlockByName ( name ) : Block | undefined ; getBlockByTarget ( target ) : Block | undefined ; getBlockActivated ( id ) : IBlockActivated | undefined ; getBlock ( id ) : Block | undefined ; getBlockContentData ( id ) : string | undefined ; setActiveWithPosition ( active , activePos ) : void ; expand ( id ) : void ; collapse ( id ) : void ; toggleExpand ( id ) : void ; setSelectionRange ( fromBlock , toBlock ) : void ; isExpanded ( id ) : boolean ; isSelected ( id ) : boolean ; indentBlock ( id ) : ReadonlyArray < DoIndentResult > ; unIndentBlock ( id ) : ReadonlyArray < DoUnIndentResult > ; requiredAutoUnIndent ( id ) : boolean ; deleteBlocks ( blockIDs ) : void ; updateBlocks ( blocks ) : void ; createNewBlock ( id , opts ? ) : ICreatedBlock | undefined ; createNewNamedBlock ( name , opts ) : BlockIDStr ; createLinkToBlock < C extends IBlockContent = IBlockContent > ( sourceID , targetName , undoContent , content ) : void ; filterByName ( filter ) : ReadonlyArray < BlockNameStr > ; clearDrop ( ) : void ; setDropSource ( dropSource ) : void ; setDropTarget ( dropTarget ) : void ; mergeBlocks ( target , source ) : void ; canMerge ( id ) : IBlockMerge | undefined ; navPrev ( pos , opts ) : void ; navNext ( pos , opts ) : void ; getNamedNodes ( ) : ReadonlyArray < string > ; setBlockContent < C extends IBlockContent = IBlockContent > ( id , content ) : void ; }