import { MathItem } from '../../core/MathItem.js'; import { OutputJax } from '../../core/OutputJax.js'; import { OptionList } from '../../util/Options.js'; import { MJContextMenu } from './MJContextMenu.js'; import { MmlVisitor } from './MmlVisitor.js'; import { MenuMathDocument } from './MenuHandler.js'; export interface MenuSettings { showSRE: boolean; showTex: boolean; texHints: boolean; semantics: boolean; zoom: string; zscale: string; renderer: string; alt: boolean; cmd: boolean; ctrl: boolean; shift: boolean; scale: string; overflow: string; breakInline: boolean; autocollapse: boolean; collapsible: boolean; enrich: boolean; assistiveMml: boolean; backgroundColor: string; backgroundOpacity: string; braille: boolean; brailleCode: string; brailleSpeech: boolean; brailleCombine: boolean; foregroundColor: string; foregroundOpacity: string; highlight: string; infoPrefix: boolean; infoRole: boolean; infoType: boolean; inTabOrder: boolean; locale: string; magnification: string; magnify: string; speech: boolean; speechRules: string; subtitles: boolean; treeColoring: boolean; viewBraille: boolean; voicing: boolean; help: boolean; roleDescription: string; tabSelects: string; } export type HTMLMATHITEM = MathItem; export type JaxList = { [name: string]: OutputJax; }; export declare class Menu { static MENU_STORAGE: string; static OPTIONS: OptionList; static SvgCss: string; protected static loading: number; protected static loadingPromises: Map>; protected static _loadingPromise: Promise; protected static _loadingOK: () => void; protected static _loadingFailed: (err: Error) => void; options: OptionList; settings: MenuSettings; defaultSettings: MenuSettings; menu: MJContextMenu; current: HTMLElement; MmlVisitor: MmlVisitor; protected document: MenuMathDocument; protected jax: JaxList; protected rerenderStart: number; requiredExtensions: string[]; get isLoading(): boolean; get loadingPromise(): Promise; protected about(): void; protected sortPackages(a: string, b: string): number; protected help(): void; protected mathMLCode(): void; protected originalText(): void; protected annotationBox(): void; svgImage(): Promise; protected speechText(): void; protected brailleText(): void; protected errorMessage(): void; protected zoomBox(): void; constructor(document: MenuMathDocument, options?: OptionList); protected initSettings(): void; protected initMenu(): void; protected checkLoadableItems(): void; protected enableAccessibilityItems(name: string, enable: boolean): void; protected mergeUserSettings(): void; protected saveUserSettings(): void; protected setA11y(options: { [key: string]: any; }): void; protected getA11y(option: string): any; protected applySettings(): void; protected setOverflow(overflow: string): void; protected setInlineBreaks(breaks: boolean): void; protected setScale(scale: string): void; protected setRenderer(jax: string, rerender?: boolean): Promise; protected applyRendererOptions(output: OutputJax): OutputJax; protected setOutputJax(jax: string, rerender?: boolean): Promise; protected loadRequiredExtensions(): Promise; addRequiredExtensions(extensions: string[]): void; protected setTabOrder(tab: boolean): void; protected setAssistiveMml(mml: boolean): void; protected setAccessibilityMenus(): void; protected setSpeech(speech: boolean): void; protected setBraille(braille: boolean): void; protected setBrailleCode(code: string): void; protected setBrailleSpeech(speech: boolean): void; protected setBrailleCombine(_speech: boolean): void; protected setLocale(locale: string): void; protected setRoleDescription(): void; protected setEnrichment(enrich: boolean): void; protected setCollapsible(collapse: boolean): void; protected setHighlight(value: string): void; protected setColor(type: string, name: string, opacity?: string): void; protected scaleAllMath(): void; protected resetDefaults(): void; checkComponent(name: string): void; protected loadComponent(name: string, callback: () => void): void; loadA11y(component: string): void; protected transferMathList(document: MenuMathDocument): void; protected toMML(math: HTMLMATHITEM): string; protected toSVG(math: HTMLMATHITEM): Promise; protected typesetSVG(math: HTMLMATHITEM, cache: string, breaks: boolean): Promise; protected formatSvg(svg: string): string; protected zoom(event: MouseEvent, type: string): void; protected isZoomEvent(event: MouseEvent, zoom: string): boolean; protected rerender(start?: number): void; protected noRerender(exec: () => void): void; protected copyMathML(): void; protected copyOriginal(): void; protected copySvgImage(): void; protected copySpeechText(): void; protected copyBrailleText(): void; protected copyErrorMessage(): void; addMenu(math: HTMLMATHITEM): void; addEvents(math: HTMLMATHITEM): void; clear(): void; variable(name: keyof MenuSettings, action?: (value: T) => void): object; a11yVar(name: keyof MenuSettings, action?: (value: T) => void): object; submenu(id: string, content: string, entries?: any[], disabled?: boolean): object; command(id: string, content: string, action: () => void, other?: object): object; checkbox(id: string, content: string, variable: string, other?: object): object; radioGroup(variable: string, radios: string[][]): object[]; radio(id: string, content: string, variable: string, other?: object): object; label(id: string, content: string): object; rule(): object; }