/// import { Editor, BlockData, CaretPos, BlockElement, ContainerElement, BLOCK_TYPE, BlockCommand, TextCommand, CommandParams, SelectionDetail, Position, DocBlock, CommandStatus } from "../interface"; import "./TextBlock"; import "./list/ListBlock"; import "./EmbedBlock"; import "./table/index"; import "./code/CodeLineBlock"; import "./code/CodeBlock"; import RichTextOperations from "../text/RichTextOperations"; export declare function getParentBlock(elem: Node | null): BlockElement | null; export declare function getTopBlock(elem: Node | null): BlockElement | null; export declare function getParentContainer(elem: Node): ContainerElement; export declare function inSameContainer(block1: BlockElement, block2: BlockElement): boolean; export declare function getRootContainer(elem: Node | null): ContainerElement | null; export declare function getBlockByIndex(container: ContainerElement, index: number): BlockElement; export declare function getBlockIndex(block: BlockElement): number; export declare function getPreviousBlock(block: BlockElement): BlockElement | null; export declare function getNextBlock(block: BlockElement): BlockElement | null; export declare function getFocusedBlock(editor: Editor): BlockElement; export declare function createBlock(editor: Editor, id: string, type: BLOCK_TYPE, data: BlockData): BlockElement; export declare function getAllBlocks(container: ContainerElement): BlockElement[]; export declare function getBlockCount(container: ContainerElement): number; export declare function getLastBlock(container: ContainerElement): BlockElement; export declare function insertBlock(container: ContainerElement, index: number, block: BlockElement): BlockElement; export declare function getFirstVisibleBlock(editor: Editor): BlockElement | null; export declare function remoteInsertBlock(container: ContainerElement, index: number, block: BlockElement): BlockElement; export declare function updateBlockData(container: ContainerElement, index: number, data: BlockData): void; export declare function remoteUpdateBlockData(container: ContainerElement, index: number, data: BlockData): void; export declare function deleteBlock(container: ContainerElement, blockElementOrIndex: BlockElement | number): void; export declare function remoteDeleteBlock(editor: Editor, container: ContainerElement, index: number): void; export declare function updateBlockText(container: ContainerElement, index: number, data: RichTextOperations): void; export declare function remoteUpdateBlockText(container: ContainerElement, index: number, data: RichTextOperations): void; export declare function getCurrentBlockIndex(node: Node | Editor): number; export declare function handleContainerKeydown(event: KeyboardEvent): void; export declare function processQuickInput(editor: Editor, event: KeyboardEvent | null, inputData: string): boolean; export declare function reloadBlock(block: BlockElement): BlockElement; export declare function createContainer(editor: Editor, parentElement: HTMLElement, isRoot: boolean, id: string | null): ContainerElement; export declare function updateContainer(editor: Editor): void; export declare function getContainerId(container: ContainerElement): string; export declare function destroyContainer(container: ContainerElement): void; export declare function loadBlocks(editor: Editor, container: ContainerElement, blocks: Array): void; export declare function saveData(container: ContainerElement): Array; export declare function getCaretPos(editor: Editor): CaretPos; export declare function getCaretPosDeep(editor: Editor): CaretPos; export declare function setCaretPos(editor: Editor, pos: CaretPos): void; export declare function tryRestoreCaretPos(editor: Editor, pos: CaretPos): boolean; export declare function isEqualCaretPos(pos1: CaretPos, pos2: CaretPos): boolean; export declare function executeBlockCommand(editor: Editor, command: BlockCommand, block?: BlockElement, params?: CommandParams): any[]; export declare function executeTextCommand(editor: Editor, command: TextCommand, params?: CommandParams): any[]; export declare function isMainContainer(container: ContainerElement): boolean; export declare function autoScroll(editor: Editor): void; interface FixSelectionOptions { autoScroll: boolean; mouseDown: boolean; lastEvent: KeyboardEvent | MouseEvent | null; lastPosition: Position; } declare function fixSelectionImpl(editor: Editor, options: FixSelectionOptions): boolean; declare const fixSelection: import("lodash").DebouncedFunc; export { fixSelection, }; export declare function getAllBlocksInComplexBlock(complexBlock: BlockElement): BlockElement[]; export declare function getPreviousBlockInDeep(block: BlockElement): BlockElement | null; export declare function getNextBlockInDeep(block: BlockElement): BlockElement | null; export declare function getPreviousVisibleBlockInDeep(block: BlockElement): BlockElement | null; export declare function getNextVisibleBlockInDeep(block: BlockElement): BlockElement | null; export declare function getAllTypedBlocks(editor: Editor, type: BLOCK_TYPE): BlockElement[]; export declare function isBlockExclusive(block: BlockElement): boolean; export declare function setBlockExclusive(block: BlockElement, exclusive: boolean, userId: string, displayName: string): void; export declare function getDetailCommandStatus(editor: Editor, detail: SelectionDetail): CommandStatus; export declare function updateCommandStatus(editor: Editor, detail: SelectionDetail): void; export declare function updateBlockToolsFixedButton(editor: Editor, block: BlockElement): void; export declare function getEditorAllBlocks(editor: Editor, options: { deep: boolean; }): BlockElement[]; export declare function isFullSelected(container: ContainerElement, detail: SelectionDetail): boolean; export declare function tryAutoAppendNewTextBlock(editor: Editor, event: MouseEvent): boolean;