declare class VNode { contents: Node[]; constructor(dom?: string | Node | Node[] | VNode); add(el: Node | Node[] | VNode): void; get first(): Element | HTMLSpanElement | CharacterData; get last(): Element | HTMLSpanElement | CharacterData; get firstElement(): HTMLElement; get lastElement(): HTMLElement; detach(): void; remove(): void; empty(): void; children(selector?: string): VNode; find(selector: string): VNode; addClass(...tokens: string[]): void; removeClass(...tokens: string[]): void; toggleClass(token: string, state: boolean): void; hasClass(token: string): boolean; html(contents: string): this; html(): string; text(contents: string): this; text(): string; insDirOf(dir: Direction, vNode: Element | CharacterData | VNode): void; insAtDirEnd(dir: Direction, vNode: Element | VNode): void; } declare class Fragment { elements: VNode; ends: Ends; disowned?: boolean; each: (fn: string | ((obj: TNode) => boolean | TNode), ...args: unknown[]) => this; constructor(withDir?: TNode, oppDir?: TNode, dir?: Direction); withDirAdopt(dir: Direction, parent: TNode, withDir?: TNode, oppDir?: TNode): this; adopt(parent: TNode, leftward?: TNode, rightward?: TNode): this; disown(): this; remove(): this; fold(fold: T, fn: (fold: T, child: TNode) => T): T; } declare class Selection extends Fragment { constructor(withDir?: TNode, oppDir?: TNode, dir?: Direction); adopt(parent: TNode, leftward?: TNode, rightward?: TNode): this; clear(): this; join(methodName: keyof Pick, separator?: string): string; } interface Ends { left?: TNode; right?: TNode; } interface MathspeakOptions { createdLeftOf?: Cursor; ignoreShorthand?: boolean; } declare class TNode { static id: number; static byId: Map; static uniqueNodeId: () => number; elements: VNode; id: number; parent?: TNode; ends: Ends; left?: TNode; right?: TNode; controller?: Controller; ctrlSeq: string; siblingDeleted?: (opts: Options, dir?: Direction) => void; siblingCreated?: (opts: Options, dir?: Direction) => void; sub?: TNode; sup?: TNode; isSymbol?: boolean; isSupSubLeft?: boolean; ariaLabel?: string; mathspeakName?: string; mathspeakTemplate?: string[]; upInto?: TNode; downInto?: TNode; upOutOf?: ((dir: Direction) => void) | ((cursor: Cursor) => void) | TNode | boolean; downOutOf?: ((dir: Direction) => void) | ((cursor: Cursor) => void) | TNode | boolean; reflow?: () => void; bubble: (fn: string | ((obj: TNode) => boolean | TNode), ...args: unknown[]) => this; postOrder: (fn: string | ((obj: TNode) => boolean | TNode), ...args: unknown[]) => this; constructor(); dispose(): void; toString(): string; addToElements(el: VNode | HTMLElement): void; domify(vNode?: VNode): VNode; createDir(dir: Direction | undefined, cursor: Cursor): this; createLeftOf(el: Cursor): void; selectChildren(leftEnd?: TNode, rightEnd?: TNode): Selection; isEmpty(): boolean; isStyleBlock(): boolean; children(): Fragment; eachChild(method: 'postOrder' | ((node: TNode) => boolean), order?: string): this; foldChildren(fold: T, fn: (fold: T, child: TNode) => T): T; withDirAdopt(dir: Direction, parent: TNode, withDir?: TNode, oppDir?: TNode): this; adopt(parent: TNode, leftward?: TNode, rightward?: TNode): this; disown(): this; remove(): this; keystroke(key: string, e: KeyboardEvent, ctrlr: Controller): void; html(): string; text(): string; latex(): string; focus(): void; blur(_cursor?: Cursor): void; seek(_left: number, _cursor: Cursor): void; writeLatex(_cursor: Cursor, _latex: string): void; finalizeInsert(_options: Options, _cursor: Cursor): void; write(_cursor: Cursor, _ch: string): void; replaces(_fragment?: string | Fragment): void; prepareCommandInsertion(_cursor: Cursor, _cmd: TNode): boolean; setOptions(_options: { text?: () => string; htmlTemplate?: string; latex?: () => string; }): this; chToCmd(_ch: string, _options: Options): TNode; mathspeak(_options?: MathspeakOptions): string; getController(): Controller | undefined; moveOutOf(_dir: Direction, _cursor?: Cursor, _updown?: 'up' | 'down'): void; moveTowards(_dir: Direction, _cursor: Cursor, _updown?: 'up' | 'down'): void; deleteOutOf(_dir: Direction, _cursor?: Cursor): void; deleteTowards(_dir: Direction, _cursor: Cursor): void; unselectInto(_dir: Direction, _cursor: Cursor): void; selectOutOf(_dir: Direction, _cursor?: Cursor): void; selectTowards(_dir: Direction, _cursor: Cursor): void; } declare class Point { parent?: TNode; left?: TNode; right?: TNode; ancestors?: Record; constructor(parent?: TNode, leftward?: TNode, rightward?: TNode); static copy(pt: Point): Point; } declare class Cursor extends Point { controller: ControllerBase; options: Options; element: HTMLElement; upDownCache: Record; intervalId?: ReturnType; selection?: Selection; anticursor?: Point; selectionChanged?: () => void; blink: () => void; constructor(initParent: TNode, options: Options, controller: ControllerBase); show(): this; hide(): this; withDirInsertAt(dir: Direction, parent: TNode, withDir?: TNode, oppDir?: TNode): void; insDirOf(dir: Direction | undefined, el: TNode): this; insLeftOf(el: TNode): this; insRightOf(el: TNode): this; insAtDirEnd(dir: Direction | undefined, el: TNode): this; insAtLeftEnd(el: TNode): this; insAtRightEnd(el: TNode): this; jumpUpDown(from: TNode, to: TNode): void; offset(): DOMRect; unwrapGramp(): void; startSelection(): void; endSelection(): void; select(): boolean; clearSelection(): this; deleteSelection(): void; replaceSelection(): Selection | undefined; depth(): number; isTooDeep(offset?: number): boolean | undefined; } declare class MathQuillToolbar { private controller; private textarea; private element?; private tooltips; private contextMenuElement?; constructor(controller: Controller, textarea: HTMLTextAreaElement); get enabled(): boolean; set enabled(enable: boolean); unbind(): void; isBeingFocused(e: FocusEvent): boolean; disableButtons(): void; enableButtons(): void; private insert; private removeUnlessFocused; private remove; private removeOnWindowRefocus; private getNextFocusableElement; private setPosition; private contextMenu; } type AriaQueueItem = TNode | Fragment | string; declare class Aria { controller: ControllerBase; span: HTMLSpanElement; msg: string; items: AriaQueueItem[]; constructor(controller: ControllerBase); attach(): void; queue(item: AriaQueueItem, shouldDescribe?: boolean): this; queueDirOf(dir: Direction | undefined): this; queueDirEndOf(dir: Direction | undefined): this; alert(t?: AriaQueueItem): this; clear(emptyContent?: boolean): this; } declare class ControllerBase { id: number; root: TNode; container: HTMLElement; options: Options; cursor: Cursor; apiClass?: AbstractMathQuill; KIND_OF_MQ: string; editable: boolean; blurred?: boolean; textareaSpan?: HTMLSpanElement; textarea?: HTMLTextAreaElement; toolbar?: MathQuillToolbar; mathspeakSpan?: HTMLElement; mathspeakId?: string | undefined; aria: Aria; ariaLabel: string; ariaPostLabel: string; _ariaAlertTimeout?: ReturnType; constructor(root: TNode, container: HTMLElement, options: Options); handle(name: keyof Handlers, dir?: Direction): void; notify(e?: string): this; selectionChanged(): void; containerHasFocus(): boolean | null; setAriaLabel(ariaLabel: string): this; getAriaLabel(): string; setAriaPostLabel(ariaPostLabel: string, timeout?: number): this; getAriaPostLabel(): string; exportMathSpeak(): string; updateMathspeak(_emptyContent?: boolean): void; } declare const Controller_base: { new (...args: any[]): { exportText(): string; id: number; root: TNode; container: HTMLElement; options: Options; cursor: Cursor; apiClass?: AbstractMathQuill; KIND_OF_MQ: string; editable: boolean; blurred?: boolean; textareaSpan?: HTMLSpanElement; textarea?: HTMLTextAreaElement; toolbar?: MathQuillToolbar; mathspeakSpan?: HTMLElement; mathspeakId?: string | undefined; aria: Aria; ariaLabel: string; ariaPostLabel: string; _ariaAlertTimeout?: ReturnType; handle(name: keyof Handlers, dir?: Direction): void; notify(e?: string): /*elided*/ any; selectionChanged(): void; containerHasFocus(): boolean | null; setAriaLabel(ariaLabel: string): /*elided*/ any; getAriaLabel(): string; setAriaPostLabel(ariaPostLabel: string, timeout?: number): /*elided*/ any; getAriaPostLabel(): string; exportMathSpeak(): string; updateMathspeak(_emptyContent?: boolean): void; }; } & { new (...args: any[]): { textareaSelectionTimeout?: ReturnType; selectFn?: (text: string) => void; createTextarea(): void; selectionChanged(): void; setTextareaSelection(): void; staticMathTextareaEvents(): void; editablesTextareaEvents(): void; unbindEditablesEvents(): void; keystroke(key: string, evt: KeyboardEvent): void; typedText(ch: string): void; cut(): void; copy(): void; paste(text: string): void; setupStaticField(): void; updateMathspeak(emptyContent?: boolean): void; id: number; root: TNode; container: HTMLElement; options: Options; cursor: Cursor; apiClass?: AbstractMathQuill; KIND_OF_MQ: string; editable: boolean; blurred?: boolean; textareaSpan?: HTMLSpanElement; textarea?: HTMLTextAreaElement; toolbar?: MathQuillToolbar; mathspeakSpan?: HTMLElement; mathspeakId?: string | undefined; aria: Aria; ariaLabel: string; ariaPostLabel: string; _ariaAlertTimeout?: ReturnType; handle(name: keyof Handlers, dir?: Direction): void; notify(e?: string): /*elided*/ any; containerHasFocus(): boolean | null; setAriaLabel(ariaLabel: string): /*elided*/ any; getAriaLabel(): string; setAriaPostLabel(ariaPostLabel: string, timeout?: number): /*elided*/ any; getAriaPostLabel(): string; exportMathSpeak(): string; exportLatex(): string; writeLatex(latex: string): /*elided*/ any; renderLatexMath(latex: string): void; renderLatexText(latex: string): void; scrollHoriz(): void; focusHandler?: () => void; blurHandler?: (e: FocusEvent) => void; windowFocusHandler?: () => void; windowBlurHandler?: () => void; windowBlurred: boolean; blurredWithCursor: boolean; addEditableFocusBlurEvents(): void; unbindEditableFocusBlurEvents(): void; addStaticFocusBlurEvents(): void; }; } & { new (...args: any[]): { exportLatex(): string; writeLatex(latex: string): /*elided*/ any; renderLatexMath(latex: string): void; renderLatexText(latex: string): void; id: number; root: TNode; container: HTMLElement; options: Options; cursor: Cursor; apiClass?: AbstractMathQuill; KIND_OF_MQ: string; editable: boolean; blurred?: boolean; textareaSpan?: HTMLSpanElement; textarea?: HTMLTextAreaElement; toolbar?: MathQuillToolbar; mathspeakSpan?: HTMLElement; mathspeakId?: string | undefined; aria: Aria; ariaLabel: string; ariaPostLabel: string; _ariaAlertTimeout?: ReturnType; handle(name: keyof Handlers, dir?: Direction): void; notify(e?: string): /*elided*/ any; selectionChanged(): void; containerHasFocus(): boolean | null; setAriaLabel(ariaLabel: string): /*elided*/ any; getAriaLabel(): string; setAriaPostLabel(ariaPostLabel: string, timeout?: number): /*elided*/ any; getAriaPostLabel(): string; exportMathSpeak(): string; updateMathspeak(_emptyContent?: boolean): void; }; } & { new (...args: any[]): { focusHandler?: () => void; blurHandler?: (e: FocusEvent) => void; windowFocusHandler?: () => void; windowBlurHandler?: () => void; windowBlurred: boolean; blurredWithCursor: boolean; addEditableFocusBlurEvents(): void; unbindEditableFocusBlurEvents(): void; addStaticFocusBlurEvents(): void; id: number; root: TNode; container: HTMLElement; options: Options; cursor: Cursor; apiClass?: AbstractMathQuill; KIND_OF_MQ: string; editable: boolean; blurred?: boolean; textareaSpan?: HTMLSpanElement; textarea?: HTMLTextAreaElement; toolbar?: MathQuillToolbar; mathspeakSpan?: HTMLElement; mathspeakId?: string | undefined; aria: Aria; ariaLabel: string; ariaPostLabel: string; _ariaAlertTimeout?: ReturnType; handle(name: keyof Handlers, dir?: Direction): void; notify(e?: string): /*elided*/ any; selectionChanged(): void; containerHasFocus(): boolean | null; setAriaLabel(ariaLabel: string): /*elided*/ any; getAriaLabel(): string; setAriaPostLabel(ariaPostLabel: string, timeout?: number): /*elided*/ any; getAriaPostLabel(): string; exportMathSpeak(): string; updateMathspeak(_emptyContent?: boolean): void; }; } & { new (...args: any[]): { mouseDownHandler?: (e: MouseEvent) => void; delegateMouseEvents(): void; seek(target: Element | null | undefined, pageX: number): /*elided*/ any; id: number; root: TNode; container: HTMLElement; options: Options; cursor: Cursor; apiClass?: AbstractMathQuill; KIND_OF_MQ: string; editable: boolean; blurred?: boolean; textareaSpan?: HTMLSpanElement; textarea?: HTMLTextAreaElement; toolbar?: MathQuillToolbar; mathspeakSpan?: HTMLElement; mathspeakId?: string | undefined; aria: Aria; ariaLabel: string; ariaPostLabel: string; _ariaAlertTimeout?: ReturnType; handle(name: keyof Handlers, dir?: Direction): void; notify(e?: string): /*elided*/ any; selectionChanged(): void; containerHasFocus(): boolean | null; setAriaLabel(ariaLabel: string): /*elided*/ any; getAriaLabel(): string; setAriaPostLabel(ariaPostLabel: string, timeout?: number): /*elided*/ any; getAriaPostLabel(): string; exportMathSpeak(): string; updateMathspeak(_emptyContent?: boolean): void; scrollHoriz(): void; }; } & { new (...args: any[]): { scrollHoriz(): void; id: number; root: TNode; container: HTMLElement; options: Options; cursor: Cursor; apiClass?: AbstractMathQuill; KIND_OF_MQ: string; editable: boolean; blurred?: boolean; textareaSpan?: HTMLSpanElement; textarea?: HTMLTextAreaElement; toolbar?: MathQuillToolbar; mathspeakSpan?: HTMLElement; mathspeakId?: string | undefined; aria: Aria; ariaLabel: string; ariaPostLabel: string; _ariaAlertTimeout?: ReturnType; handle(name: keyof Handlers, dir?: Direction): void; notify(e?: string): /*elided*/ any; selectionChanged(): void; containerHasFocus(): boolean | null; setAriaLabel(ariaLabel: string): /*elided*/ any; getAriaLabel(): string; setAriaPostLabel(ariaPostLabel: string, timeout?: number): /*elided*/ any; getAriaPostLabel(): string; exportMathSpeak(): string; updateMathspeak(_emptyContent?: boolean): void; }; } & typeof ControllerBase; declare class Controller extends Controller_base { constructor(root: TNode, container: HTMLElement, options: Options); escapeDir(dir: Direction | undefined, _key: string, e: KeyboardEvent): this | undefined; moveDir(dir: Direction | undefined): this; moveLeft(): this; moveRight(): this; moveUpDown(dir: 'up' | 'down'): this; moveUp(): this; moveDown(): this; deleteDir(dir: Direction | undefined): this; ctrlDeleteDir(dir: Direction | undefined): this; backspace(): this; deleteForward(): this; private incrementalSelectionOpen; private startIncrementalSelection; private selectDirIncremental; private finishIncrementalSelection; withIncrementalSelection(cb: (selectDir: (dir: Direction) => void) => void): void; selectDir(dir: Direction): void; selectLeft(): void; selectRight(): void; selectAll(): void; selectToBlockEndInDir(dir: Direction): void; selectToRootEndInDir(dir: Direction): void; } declare class AbstractMathQuill { __controller: Controller; __options: Options; id: number; revert?: () => HTMLElement; static RootBlock?: Constructor; constructor(ctrlr: Controller); __mathquillify(...classNames: string[]): this; get options(): Options; config(opts: InputOptions): this; el(): HTMLElement; text(): string; latex(latex: string): this; latex(): string; html(): string; reflow(): this; focus(): this; blur(): this; setAriaLabel(ariaLabel: string): this; getAriaLabel(): string; mathspeak(): string; } declare class EditableField extends AbstractMathQuill { __mathquillify(...classNames: string[]): this; write(latex: string): this; empty(): this; cmd(cmd: string): this; select(): this; clearSelection(): this; moveToDirEnd(dir: Direction): this; moveToLeftEnd(): this; moveToRightEnd(): this; keystroke(keys: string): this; typedText(text: string): this; dropEmbedded(pageX: number, pageY: number, options: { text?: () => string; htmlString?: string; latex?: () => string; }): void; clickAt(clientX: number, clientY: number, target?: Element | null): this; ignoreNextMousedown(fn: (e?: MouseEvent) => boolean): this; setAriaPostLabel(ariaPostLabel: string, timeout?: number): this; getAriaPostLabel(): string; } type Handler = (mq?: AbstractMathQuill) => void; type DirectionHandler = (dir: Direction, mq?: AbstractMathQuill) => void; interface Handlers { enter?: Handler; edit?: Handler; moveOutOf?: DirectionHandler; deleteOutOf?: DirectionHandler; selectOutOf?: DirectionHandler; upOutOf?: Handler; downOutOf?: Handler; } interface ToolbarButton { id: string; latex: string; tooltip: string; icon: string; } interface InputOptions { mouseEvents?: boolean; autoCommands?: string; autoOperatorNames?: string; charsThatBreakOutOfSupSub?: string; statelessClipboard?: boolean; enableSpaceNavigation?: boolean; leftRightIntoCmdGoes?: 'up' | 'down'; restrictMismatchedBrackets?: boolean; sumStartsWithNEquals?: boolean; supSubsRequireOperand?: boolean; rootsAreExponents?: boolean; logsChangeBase?: boolean; maxDepth?: number; autoSubscriptNumerals?: boolean; typingSlashWritesDivisionSymbol?: boolean; typingAsteriskWritesTimesSymbol?: boolean; substituteTextarea?: (tabbable?: boolean) => HTMLElement; handlers?: Handlers; overridePaste?: () => void; overrideCut?: () => void; overrideCopy?: () => void; overrideTypedText?: (text: string) => void; overrideKeystroke?: (key: string, event: KeyboardEvent) => void; ignoreNextMousedown?: (e?: MouseEvent) => boolean; tabbable?: boolean; useToolbar?: boolean; toolbarButtons?: ToolbarButton[]; } interface NamesWLength { [key: string]: number; _maxLength: number; } declare class Options { #private; static config(currentOptions: Options, newOptions: InputOptions): void; get mouseEvents(): boolean; set mouseEvents(mouseEvents: boolean); get autoCommands(): NamesWLength; set autoCommands(cmds: string | NamesWLength); addAutoCommands(cmds: string | string[]): void; removeAutoCommands(cmds: string | string[]): void; get autoOperatorNames(): NamesWLength; set autoOperatorNames(cmds: string | NamesWLength); addAutoOperatorNames(cmds: string | string[]): void; removeAutoOperatorNames(cmds: string | string[]): void; get charsThatBreakOutOfSupSub(): string; set charsThatBreakOutOfSupSub(charsThatBreakOutOfSupSub: string); get statelessClipboard(): boolean; set statelessClipboard(statelessClipboard: boolean); get enableSpaceNavigation(): boolean; set enableSpaceNavigation(enableSpaceNavigation: boolean); get leftRightIntoCmdGoes(): "up" | "down" | undefined; set leftRightIntoCmdGoes(updown: 'up' | 'down' | undefined); get restrictMismatchedBrackets(): boolean; set restrictMismatchedBrackets(restrictMismatchedBrackets: boolean); get sumStartsWithNEquals(): boolean; set sumStartsWithNEquals(sumStartsWithNEquals: boolean); get supSubsRequireOperand(): boolean; set supSubsRequireOperand(supSubsRequireOperand: boolean); get rootsAreExponents(): boolean; set rootsAreExponents(rootsAreExponents: boolean); get logsChangeBase(): boolean; set logsChangeBase(logsChangeBase: boolean); get maxDepth(): number | undefined; set maxDepth(maxDepth: number | undefined); get autoSubscriptNumerals(): boolean; set autoSubscriptNumerals(autoSubscriptNumerals: boolean); get typingSlashWritesDivisionSymbol(): boolean; set typingSlashWritesDivisionSymbol(typingSlashWritesDivisionSymbol: boolean); get typingAsteriskWritesTimesSymbol(): boolean; set typingAsteriskWritesTimesSymbol(typingAsteriskWritesTimesSymbol: boolean); handlers?: Handlers; substituteTextarea(tabbable?: boolean): HTMLTextAreaElement; overridePaste?: (test: string) => void; overrideCut?: () => void; overrideCopy?: () => void; overrideTypedText?: (text: string) => void; overrideKeystroke?: (key: string, event: KeyboardEvent) => void; ignoreNextMousedown: (e?: MouseEvent) => boolean; get tabbable(): boolean | undefined; set tabbable(tabbable: boolean | undefined); get useToolbar(): boolean; set useToolbar(useToolbar: boolean); get toolbarButtons(): ToolbarButton[]; set toolbarButtons(buttons: ToolbarButton[]); addToolbarButtons(buttons: ToolbarButton | ToolbarButton[], position?: string | number): void; removeToolbarButtons(buttonIds: string | string[]): void; } declare class MathElement extends TNode { finalizeInsert(options: Options, cursor: Cursor): void; prepareInsertionAt(cursor: Cursor): boolean; removeNodesDeeperThan(cutoff: number): void; } declare const MathBlock_base: { new (...args: any[]): { focus(): void; blur(): void; elements: VNode; id: number; parent?: TNode; ends: Ends; left?: TNode; right?: TNode; controller?: Controller; ctrlSeq: string; siblingDeleted?: (opts: Options, dir?: Direction) => void; siblingCreated?: (opts: Options, dir?: Direction) => void; sub?: TNode; sup?: TNode; isSymbol?: boolean; isSupSubLeft?: boolean; ariaLabel?: string; mathspeakName?: string; mathspeakTemplate?: string[]; upInto?: TNode; downInto?: TNode; upOutOf?: ((dir: Direction) => void) | ((cursor: Cursor) => void) | TNode | boolean; downOutOf?: ((dir: Direction) => void) | ((cursor: Cursor) => void) | TNode | boolean; reflow?: () => void; bubble: (fn: string | ((obj: TNode) => boolean | TNode), ...args: unknown[]) => /*elided*/ any; postOrder: (fn: string | ((obj: TNode) => boolean | TNode), ...args: unknown[]) => /*elided*/ any; dispose(): void; toString(): string; addToElements(el: VNode | HTMLElement): void; domify(vNode?: VNode): VNode; createDir(dir: Direction | undefined, cursor: Cursor): /*elided*/ any; createLeftOf(el: Cursor): void; selectChildren(leftEnd?: TNode, rightEnd?: TNode): Selection; isEmpty(): boolean; isStyleBlock(): boolean; children(): Fragment; eachChild(method: "postOrder" | ((node: TNode) => boolean), order?: string): /*elided*/ any; foldChildren(fold: T, fn: (fold: T, child: TNode) => T): T; withDirAdopt(dir: Direction, parent: TNode, withDir?: TNode, oppDir?: TNode): /*elided*/ any; adopt(parent: TNode, leftward?: TNode, rightward?: TNode): /*elided*/ any; disown(): /*elided*/ any; remove(): /*elided*/ any; keystroke(key: string, e: KeyboardEvent, ctrlr: Controller): void; html(): string; text(): string; latex(): string; seek(_left: number, _cursor: Cursor): void; writeLatex(_cursor: Cursor, _latex: string): void; finalizeInsert(_options: Options, _cursor: Cursor): void; write(_cursor: Cursor, _ch: string): void; replaces(_fragment?: string | Fragment): void; prepareCommandInsertion(_cursor: Cursor, _cmd: TNode): boolean; setOptions(_options: { text?: () => string; htmlTemplate?: string; latex?: () => string; }): /*elided*/ any; chToCmd(_ch: string, _options: Options): TNode; mathspeak(_options?: MathspeakOptions): string; getController(): Controller | undefined; moveOutOf(_dir: Direction, _cursor?: Cursor, _updown?: "up" | "down"): void; moveTowards(_dir: Direction, _cursor: Cursor, _updown?: "up" | "down"): void; deleteOutOf(_dir: Direction, _cursor?: Cursor): void; deleteTowards(_dir: Direction, _cursor: Cursor): void; unselectInto(_dir: Direction, _cursor: Cursor): void; selectOutOf(_dir: Direction, _cursor?: Cursor): void; selectTowards(_dir: Direction, _cursor: Cursor): void; }; } & { new (...args: any[]): { writeHandler?: (cursor: Cursor, ch: string) => boolean; writeLatexHandler?: (cursor: Cursor, block: MathBlock) => MathBlock | boolean; chToCmd(ch: string, options?: Options): TNode; write(cursor: Cursor, ch: string): void; elements: VNode; id: number; parent?: TNode; ends: Ends; left?: TNode; right?: TNode; controller?: Controller; ctrlSeq: string; siblingDeleted?: (opts: Options, dir?: Direction) => void; siblingCreated?: (opts: Options, dir?: Direction) => void; sub?: TNode; sup?: TNode; isSymbol?: boolean; isSupSubLeft?: boolean; ariaLabel?: string; mathspeakName?: string; mathspeakTemplate?: string[]; upInto?: TNode; downInto?: TNode; upOutOf?: ((dir: Direction) => void) | ((cursor: Cursor) => void) | TNode | boolean; downOutOf?: ((dir: Direction) => void) | ((cursor: Cursor) => void) | TNode | boolean; reflow?: () => void; bubble: (fn: string | ((obj: TNode) => boolean | TNode), ...args: unknown[]) => /*elided*/ any; postOrder: (fn: string | ((obj: TNode) => boolean | TNode), ...args: unknown[]) => /*elided*/ any; dispose(): void; toString(): string; addToElements(el: VNode | HTMLElement): void; domify(vNode?: VNode): VNode; createDir(dir: Direction | undefined, cursor: Cursor): /*elided*/ any; createLeftOf(el: Cursor): void; selectChildren(leftEnd?: TNode, rightEnd?: TNode): Selection; isEmpty(): boolean; isStyleBlock(): boolean; children(): Fragment; eachChild(method: "postOrder" | ((node: TNode) => boolean), order?: string): /*elided*/ any; foldChildren(fold: T, fn: (fold: T, child: TNode) => T): T; withDirAdopt(dir: Direction, parent: TNode, withDir?: TNode, oppDir?: TNode): /*elided*/ any; adopt(parent: TNode, leftward?: TNode, rightward?: TNode): /*elided*/ any; disown(): /*elided*/ any; remove(): /*elided*/ any; keystroke(key: string, e: KeyboardEvent, ctrlr: Controller): void; html(): string; text(): string; latex(): string; focus(): void; blur(_cursor?: Cursor): void; seek(_left: number, _cursor: Cursor): void; writeLatex(_cursor: Cursor, _latex: string): void; finalizeInsert(_options: Options, _cursor: Cursor): void; replaces(_fragment?: string | Fragment): void; prepareCommandInsertion(_cursor: Cursor, _cmd: TNode): boolean; setOptions(_options: { text?: () => string; htmlTemplate?: string; latex?: () => string; }): /*elided*/ any; mathspeak(_options?: MathspeakOptions): string; getController(): Controller | undefined; moveOutOf(_dir: Direction, _cursor?: Cursor, _updown?: "up" | "down"): void; moveTowards(_dir: Direction, _cursor: Cursor, _updown?: "up" | "down"): void; deleteOutOf(_dir: Direction, _cursor?: Cursor): void; deleteTowards(_dir: Direction, _cursor: Cursor): void; unselectInto(_dir: Direction, _cursor: Cursor): void; selectOutOf(_dir: Direction, _cursor?: Cursor): void; selectTowards(_dir: Direction, _cursor: Cursor): void; }; } & typeof MathElement; declare class MathBlock extends MathBlock_base { ariaLabel: string; join(methodName: keyof Pick): string; html(): string; latex(): string; text(): string; mathspeak(): string; keystroke(key: string, e: KeyboardEvent, ctrlr: Controller): void; moveOutOf(dir: Direction, cursor: Cursor, updown?: 'up' | 'down'): void; selectOutOf(dir: Direction, cursor: Cursor): void; deleteOutOf(_dir: Direction, cursor: Cursor): void; seek(pageX: number, cursor: Cursor): void; writeLatex(cursor: Cursor, latex: string): void; focus(): this; blur(): this; } declare class RootMathBlock extends MathBlock { constructor(); } type Direction = 'left' | 'right'; type Constructor = new (...args: any[]) => T; interface EmbedOptions { text?: () => string; htmlString?: string; latex?: () => string; } declare const saneKeyboardEvents: (textarea: HTMLTextAreaElement, controller: Controller) => { select: (text: string) => void; }; interface NamedObject { name: string; } declare class Store { [key: number]: T; push(value: T): void; get length(): number; get(indexName: string): T | undefined; } type InnerMathFieldStore = Store; declare class StaticMath extends AbstractMathQuill { static RootBlock: typeof MathBlock; innerFields: InnerMathFieldStore; constructor(ctrlr: Controller); __mathquillify(): this; latex(latex: string): this; latex(): string; } declare class MathField extends EditableField { static RootBlock: typeof RootMathBlock; __mathquillify(): this; } declare class InnerMathField extends MathField { name: string; makeStatic(): void; makeEditable(): void; } declare class RootTextBlock extends RootMathBlock { keystroke(key: string, e: KeyboardEvent, ctrlr: Controller): void; write(cursor: Cursor, ch: string): void; } declare class TextField extends EditableField { static RootBlock: typeof RootTextBlock; __mathquillify(): this; latex(latex: string): this; latex(): string; } declare global { interface Window { MathQuill?: MathQuill; } } interface MQApi { (el?: HTMLElement): AbstractMathQuill | undefined; saneKeyboardEvents: typeof saneKeyboardEvents; config(opts: InputOptions): MQApi; registerEmbed(name: string, options: (data: string) => EmbedOptions): void; StaticMath: { (el?: null): undefined; (el: HTMLElement, opts?: InputOptions): StaticMath; }; MathField: { (el?: null): undefined; (el: HTMLElement, opts?: InputOptions): MathField; }; InnerMathField: { (el?: null): undefined; (el: HTMLElement, opts?: InputOptions): InnerMathField; }; TextField: { (el?: null): undefined; (el: HTMLElement, opts?: InputOptions): TextField; }; } interface MathQuill { origMathQuill: MathQuill | undefined; VERSION: string; getInterface(): MQApi; noConflict(): MathQuill; } declare const mathQuill: MathQuill; export { mathQuill as default };