export declare function getEditModeLatex(k: KeyboardMemory, latexConfiguration: LatexConfiguration): string; export declare function firstAfterOrNull(array: T[], element: T): T | null; export declare function getViewModeLatex(x: TreeNode | Placeholder | KeyboardMemory, latexConfiguration: LatexConfiguration): string; export declare function firstBeforeOrNull(array: T[], element: T): T | null; export declare function last(array: T[]): T; export declare function lastOrNull(array: T[]): T | null; export declare function remove(array: T[], element: T): void; export declare function concatLatex(...latexArray: string[]): string; export declare function endsWithLatexCommand(latex: string): boolean; export declare function isLetter(c: string): boolean; export declare function deleteLeft(k: KeyboardMemory): void; export declare function deleteSelection(k: KeyboardMemory): void; export declare function encapsulate(nodes: TreeNode[], encapsulatingPlaceholder: Placeholder): void; export declare function deleteRight(k: KeyboardMemory): void; export declare function deleteOuterBranchingNodeButNotItsContents(nonEmptyPlaceholder: Placeholder): void; export declare function encapsulateAllPartsOfNumberWithDigitsLeftOfIndex(exclusiveRightIndex: number, siblingNodes: TreeNode[], toPlaceholder: Placeholder): void; export declare function getFirstNonEmptyOnLeftOf(placeholderArray: Placeholder[], element: Placeholder): Placeholder | null; export declare function insert(k: KeyboardMemory, toInsert: TreeNode | TreeNode[]): void; export declare function insertWithEncapsulateSelectionAndPrevious(k: KeyboardMemory, newNode: BranchingNode): void; export declare function insertWithEncapsulateCurrent(k: KeyboardMemory, newNode: BranchingNode, config?: { deleteOuterRoundBracketsIfAny?: boolean; }): void; export declare function moveLeft(k: KeyboardMemory): void; export declare function moveDown(k: KeyboardMemory): void; export declare function moveRight(k: KeyboardMemory): void; export declare function insertWithEncapsulateSelection(k: KeyboardMemory, newNode: BranchingNode): void; export declare function moveUp(k: KeyboardMemory): void; export declare function enterSelectionMode(k: KeyboardMemory): void; export declare function inSelectionMode(k: KeyboardMemory): boolean; export declare function popSelection(k: KeyboardMemory): TreeNode[]; export declare function setSelectionDiff(k: KeyboardMemory, diffWithCurrent: number): void; export declare function leaveSelectionMode(k: KeyboardMemory): void; export declare function selectLeft(k: KeyboardMemory): void; export declare function selectRight(k: KeyboardMemory): void; export declare class KeyboardMemory { readonly syntaxTreeRoot: Placeholder; current: Placeholder | TreeNode; selectionDiff: number | null; inclusiveSelectionRightBorder: TreeNode | null; inclusiveSelectionLeftBorder: TreeNode | Placeholder | null; } export declare class LatexConfiguration { activePlaceholderShape: string; activePlaceholderColor?: string; passivePlaceholderShape: string; passivePlaceholderColor?: string; selectionHightlightStart: string; selectionHightlightEnd: string; get activePlaceholderLatex(): string; get passivePlaceholderLatex(): string; } export declare class LatexParserConfiguration { additionalDigits: string[] | null; decimalSeparatorMatchers: string[]; preferredDecimalSeparator?: (() => string) | string | null; preferRoundBracketsNode: boolean; } type BracePairContent = { content: string; rest: string; }; export declare function getBracketPairContent(opening: string, closing: string, sWithOpening: string): BracePairContent; export {}; export declare abstract class BranchingNode extends TreeNode { placeholders: Placeholder[]; constructor(leftToRight: Placeholder[]); getMoveDownSuggestion(_fromPlaceholder: Placeholder): Placeholder | null; getMoveUpSuggestion(_fromPlaceholder: Placeholder): Placeholder | null; } export declare function parseLatex(latex: string | null, latexParserConfiguration?: LatexParserConfiguration): KeyboardMemory; export declare abstract class LeafNode extends TreeNode { } export declare abstract class TreeNode { parentPlaceholder: Placeholder; abstract getLatexPart(k: KeyboardMemory, latexConfiguration: LatexConfiguration): string; getLatex(k: KeyboardMemory, latexConfiguration: LatexConfiguration): string; } export declare class AscendingBranchingNode extends StandardBranchingNode { getMoveDownSuggestion(fromPlaceholder: Placeholder): Placeholder | null; getMoveUpSuggestion(fromPlaceholder: Placeholder): Placeholder | null; } export declare class DescendingBranchingNode extends StandardBranchingNode { getMoveDownSuggestion(fromPlaceholder: Placeholder): Placeholder | null; getMoveUpSuggestion(fromPlaceholder: Placeholder): Placeholder | null; } export declare class MatrixNode extends BranchingNode { private readonly matrixType; private readonly grid; private readonly width; constructor(matrixType: string, width: number, height: number); getLatexPart(k: KeyboardMemory, latexConfiguration: LatexConfiguration): string; getMoveDownSuggestion(fromPlaceholder: Placeholder): Placeholder | null; getMoveUpSuggestion(fromPlaceholder: Placeholder): Placeholder | null; private getPositionOf; } export declare class RoundBracketsNode extends StandardBranchingNode { constructor(leftBracketLatex?: string, rightBracketLatex?: string); } export declare class StandardBranchingNode extends BranchingNode { private readonly before; private readonly then; private readonly rest; constructor(before: string, then: string, ...rest: string[]); getLatexPart(k: KeyboardMemory, latexConfiguration: LatexConfiguration): string; } export declare abstract class PartOfNumberWithDigits extends LeafNode { } export declare class DecimalSeparatorNode extends PartOfNumberWithDigits { private readonly latex; constructor(latex?: string | (() => string)); getLatexPart(_k: KeyboardMemory, _latexConfiguration: LatexConfiguration): string; } export declare class Placeholder { parentNode: BranchingNode | null; nodes: TreeNode[]; getLatex(k: KeyboardMemory, latexConfiguration: LatexConfiguration): string; } export declare class DigitNode extends PartOfNumberWithDigits { private readonly latex; constructor(digit: string); getLatexPart(_k: KeyboardMemory, _latexConfiguration: LatexConfiguration): string; } export declare class StandardLeafNode extends LeafNode { private readonly latex; constructor(latex: string | (() => string)); getLatexPart(_k: KeyboardMemory, _latexConfiguration: LatexConfiguration): string; }