import { i as LatexDiagnosticSink, n as LatexDiagnostic } from "../diagnostics-DdO0xPGy.js"; import { n as TemmlNode } from "../temml-1-I9N9DD.js"; import { t as SymbolResolver } from "../symbols-CKm2r4D0.js"; import { ContentFormula, MathExpression, MathSymbolEntry } from "document-schema.js"; //#region src/latex/lower.d.ts declare const RELATION_ATOM_OPERATORS: Readonly>; declare const SUBTRACT_OPERATOR = "math:subtract"; declare const UNARY_MINUS_OPERATOR = "math:negate"; declare const RELATION_OPERATORS: ReadonlySet; interface LoweringContext { readonly input: string; readonly resolver: SymbolResolver; readonly binders: readonly string[]; readonly diagnostics: LatexDiagnostic[]; readonly sink?: LatexDiagnosticSink; } declare function diagnose(context: LoweringContext, code: LatexDiagnostic["code"], detail?: string): void; declare function unparsed(latex: string): MathExpression; declare function app(operator: string, args: readonly MathExpression[]): MathExpression; declare function lowerTerm(nodes: readonly TemmlNode[], context: LoweringContext): MathExpression; interface LowerLatexOptions { readonly symbolEntries?: readonly MathSymbolEntry[]; readonly sink?: LatexDiagnosticSink; } interface LatexLoweringResult { readonly expression: MathExpression; readonly diagnostics: readonly LatexDiagnostic[]; readonly mintedSymbols: readonly MathSymbolEntry[]; } declare function lowerLatex(latex: string, options?: LowerLatexOptions): LatexLoweringResult; interface LatexFormulaOptions extends LowerLatexOptions { readonly source?: string; } interface LatexFormulaResult { readonly formula: ContentFormula; readonly diagnostics: readonly LatexDiagnostic[]; readonly mintedSymbols: readonly MathSymbolEntry[]; } declare function latexToFormula(latex: string, options?: LatexFormulaOptions): LatexFormulaResult; //#endregion export { LatexFormulaOptions, LatexFormulaResult, LatexLoweringResult, LowerLatexOptions, LoweringContext, RELATION_ATOM_OPERATORS, RELATION_OPERATORS, SUBTRACT_OPERATOR, UNARY_MINUS_OPERATOR, app, diagnose, latexToFormula, lowerLatex, lowerTerm, unparsed };