js.documents 2.2.0 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +30 -5
  2. package/dist/diagnostics-C5-bG09J.d.cts +18 -0
  3. package/dist/diagnostics-C5-bG09J.d.ts +18 -0
  4. package/dist/index.cjs +10 -0
  5. package/dist/index.d.cts +5 -1
  6. package/dist/index.d.ts +5 -1
  7. package/dist/index.js +5 -1
  8. package/dist/latex/diagnostics.cjs +21 -0
  9. package/dist/latex/diagnostics.d.cts +2 -0
  10. package/dist/latex/diagnostics.d.ts +2 -0
  11. package/dist/latex/diagnostics.js +19 -0
  12. package/dist/latex/lint.cjs +82 -0
  13. package/dist/latex/lint.d.cts +6 -0
  14. package/dist/latex/lint.d.ts +6 -0
  15. package/dist/latex/lint.js +81 -0
  16. package/dist/latex/lower.cjs +550 -0
  17. package/dist/latex/lower.d.cts +24 -0
  18. package/dist/latex/lower.d.ts +24 -0
  19. package/dist/latex/lower.js +548 -0
  20. package/dist/latex/rational.cjs +29 -0
  21. package/dist/latex/rational.d.cts +11 -0
  22. package/dist/latex/rational.d.ts +11 -0
  23. package/dist/latex/rational.js +27 -0
  24. package/dist/latex/symbols.cjs +128 -0
  25. package/dist/latex/symbols.d.cts +16 -0
  26. package/dist/latex/symbols.d.ts +16 -0
  27. package/dist/latex/symbols.js +124 -0
  28. package/dist/latex/temml.cjs +121 -0
  29. package/dist/latex/temml.d.cts +25 -0
  30. package/dist/latex/temml.d.ts +25 -0
  31. package/dist/latex/temml.js +93 -0
  32. package/dist/markdown/math.cjs +110 -0
  33. package/dist/markdown/math.d.cts +9 -0
  34. package/dist/markdown/math.d.ts +9 -0
  35. package/dist/markdown/math.js +109 -0
  36. package/dist/markdown/read.cjs +3 -2
  37. package/dist/markdown/read.d.cts +2 -1
  38. package/dist/markdown/read.d.ts +2 -1
  39. package/dist/markdown/read.js +3 -2
  40. package/dist/markdown/write.cjs +23 -4
  41. package/dist/markdown/write.js +23 -4
  42. package/dist/model/formula.cjs +1 -1
  43. package/dist/model/formula.js +1 -1
  44. package/package.json +3 -2
package/README.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  [![GitHub](https://img.shields.io/badge/GitHub-181717?logo=github&logoColor=white)](https://github.com/ExaDev/documents.js) [![npm](https://img.shields.io/badge/npm-CB3837?logo=npm&logoColor=white)](https://www.npmjs.com/package/documents.js) [![Release](https://img.shields.io/github/v/release/ExaDev/documents.js)](https://github.com/ExaDev/documents.js/releases/latest) [![CI](https://img.shields.io/github/actions/workflow/status/ExaDev/documents.js/ci.yml?branch=main)](https://github.com/ExaDev/documents.js/actions)
4
4
 
5
- > Converts between any two compatible document formats through a shared content/layout pivot. docx, pptx, odt, odp, ods, odg, xlsx, csv (TSV is the same format with a tab delimiter), svg, and markdown all read into and build from the same `ContentDocument`/`LayoutDocument` model, with PDF as the one format every variant can reach. A composition engine (`convertDocument`) routes 111 (source, target) pairs across the ten content formats and PDF, including twenty PDF-pivot round trips (the eight layout-engine formats, plus xlsx and csv composing through ods), twenty-four cross-format bridge functions (same-variant direct copies, cross-variant semantic transforms, and PDF-composed), plus special-case conversions for `.odm` master documents, `.odb` database front-ends (HSQLDB and Firebird, four storage tiers), standalone `.odf` formula documents, and a bounded SQL/rpt-formula engine for `.odb` reports. Also includes: read-and-write live-view editors for all six editable formats, docx comment/footnote/header-footer exposure via `readDocxExtras`, real font resolution (source-embedded faces ahead of caller-supplied, vendored substitutes, and the standard 14), a hand-written MathML typesetting engine with embedded-font PDF rendering and a matching MathML ⇄ OMML translator, and a fully hand-written PDF codec. Built on [ooxml.js](https://github.com/ExaDev/ooxml.js), [odf.js](https://github.com/ExaDev/odf.js), [pdf-codec](https://github.com/ExaDev/pdf-codec), [markdown-codec](https://github.com/ExaDev/markdown-codec), and [document-schema.js](https://github.com/ExaDev/document-schema.js).
5
+ > Converts between any two compatible document formats through a shared content/layout pivot. docx, pptx, odt, odp, ods, odg, xlsx, csv (TSV is the same format with a tab delimiter), svg, and markdown all read into and build from the same `ContentDocument`/`LayoutDocument` model, with PDF as the one format every variant can reach. A composition engine (`convertDocument`) routes 111 (source, target) pairs across the ten content formats and PDF, including twenty PDF-pivot round trips (the eight layout-engine formats, plus xlsx and csv composing through ods), twenty-four cross-format bridge functions (same-variant direct copies, cross-variant semantic transforms, and PDF-composed), plus special-case conversions for `.odm` master documents, `.odb` database front-ends (HSQLDB and Firebird, four storage tiers), standalone `.odf` formula documents, and a bounded SQL/rpt-formula engine for `.odb` reports. Also includes: read-and-write live-view editors for all six editable formats, docx comment/footnote/header-footer exposure via `readDocxExtras`, real font resolution (source-embedded faces ahead of caller-supplied, vendored substitutes, and the standard 14), a hand-written MathML typesetting engine with embedded-font PDF rendering and a matching MathML ⇄ OMML translator, LaTeX lowering into the schema's two-layer semantic math core (pinned temml parser, symbol tables from prose, a coherence lint), and a fully hand-written PDF codec. Built on [ooxml.js](https://github.com/ExaDev/ooxml.js), [odf.js](https://github.com/ExaDev/odf.js), [pdf-codec](https://github.com/ExaDev/pdf-codec), [markdown-codec](https://github.com/ExaDev/markdown-codec), and [document-schema.js](https://github.com/ExaDev/document-schema.js).
6
6
 
7
- `documents.js` extends `ooxml.js` in two directions `ooxml.js` deliberately does not cover: full PDF support (parsing and generating, via `pdf-codec`), and a read-**and-write** manipulation API for docx/pptx content — `ooxml.js`'s own typed readers are one-way. The PDF codec is hand-written against ISO 32000-1, with no external PDF library as a dependency — see [Fidelity](#fidelity) and pdf-codec's own README for the honest trade-off (not as robust against adversarial PDFs as a 15+-year-hardened library; fully auditable and dependency-free instead). `src/mathml/` (the MathML typesetting engine) stays in this package and is hand-written too, for the same supply-chain reason.
7
+ `documents.js` extends `ooxml.js` in two directions `ooxml.js` deliberately does not cover: full PDF support (parsing and generating, via `pdf-codec`), and a read-**and-write** manipulation API for docx/pptx content — `ooxml.js`'s own typed readers are one-way. The PDF codec is hand-written against ISO 32000-1, with no external PDF library as a dependency — see [Fidelity](#fidelity) and pdf-codec's own README for the honest trade-off (not as robust against adversarial PDFs as a 15+-year-hardened library; fully auditable and dependency-free instead). `src/mathml/` (the MathML typesetting engine) stays in this package and is hand-written too, for the same supply-chain reason. The one deliberate exception on the math side is the LaTeX parser: `src/latex/` lowers LaTeX into the schema's semantic core over a pinned exact-version [temml](https://temml.org) dependency — see [LaTeX lowering into the semantic core](#latex-lowering-into-the-semantic-core) for why a LaTeX grammar is the one component not worth hand-writing and what the pin guarantees.
8
8
 
9
9
  ```mermaid
10
10
  graph TD
@@ -463,6 +463,30 @@ const editor = openDocx(existingDocxBytes);
463
463
  const { diagnostics: ommlDiagnostics } = editor.body.appendParagraph().appendOfficeMath(mathml);
464
464
  ```
465
465
 
466
+ ### LaTeX lowering into the semantic core
467
+
468
+ A formula in the 3.2.0 schema carries two co-equal layers: `presentation` (a verbatim LaTeX string, rendering-authoritative) and `content` (a `MathExpression` semantic tree, computation-authoritative). Neither is stored derived from the other. This package owns the string-to-tree half — the lowering — and runs it wherever LaTeX enters the model:
469
+
470
+ - **Parsing** happens at the format edge through [temml](https://temml.org) (MIT, zero dependencies), pinned to the **exact version recorded in `package.json`** — `"temml": "0.13.4"`, no caret. The pin is load-bearing: the lowering consumes temml's internal parse-node API, which carries no stability guarantee across releases, and the two-layer contract says a stored presentation string has one defined parse. Bumping the pin is a deliberate act that must re-run `src/latex/lower.test.ts`, whose table cases pin the parse-node shapes the lowering consumes. temml is the one math component this ecosystem deliberately does not hand-write (a LaTeX grammar is a large surface with none of the supply-chain payoff the hand-written MathML engine has); it is pure JavaScript, its parser never touches the DOM, and the workerd suite proves the whole lowering path in a Cloudflare Workers isolate.
471
+ - **Lowering** is mechanical exactly where notation is unambiguous: `\frac` → `math:divide`, radicals → `math:sqrt` / an exact `1/n` exponent, a scripted Sigma or Product with limits → a `sum`/`prod` binder owning the rest of its term, numeric literals → exact rationals (`3.14` → `157/50`, BigInt-exact at any length), subscripts → distinct symbol identities through the symbol table (`x_1` is never `x` times `1`), superscripts → `math:pow` unless the table already curates the scripted form as one symbol. Named functions (`\sin`, `\ln`, ...) consume their argument the way binders consume their summand.
472
+ - **Everything context-starved degrades to visible data**: juxtaposition (`mc^2`, `f(x)`, `2(x+1)` — multiplication and function application are both defensible readings, and LaTeX cannot say which), overloaded operators (`\pm`, `\approx`), integrals (the grammar's binders are exactly sum and prod), `\text` prose, compound subscripts (`a_{i+1}`), binomials, `align`/`cases` environments — each becomes an `unparsed` node carrying the verbatim source span plus a named diagnostic from `LATEX_DIAGNOSTIC_CODES`. Never a parse failure, never a silent guess; a degraded juxtaposition is exactly what the round-trip-safe semantic editing the schema defines is for.
473
+ - **Symbol tables** come from the document's own prose: sentence-level "where R is…" / "let x be…" definitions seed curated entries (conservatively — precision over recall, no quantity kind is ever guessed), and glyphs nobody defined are minted so every `sym` reference resolves. The markdown read pass builds the table automatically.
474
+ - **The markdown read path runs the whole pipeline**: markdown-codec hands `$$` display blocks and `\( \)` inline spans through as raw LaTeX text, and `readMarkdownContent` lowers them into embedded formula blocks (position, content, presentation MathML from the same parse — so `markdownToPdf` typesets real math through the STIX engine, `markdownToDocx` writes real OMML, and `markdownToOdt` writes real embedded formula sub-documents). The write side reconstructs the same markdown math syntax from the verbatim presentation layer. The pass's diagnostics surface through `readMarkdownContent`'s third parameter.
475
+ - **The coherence lint** (`lintMathCoherence`) re-parses and re-lowers every stored presentation string against the document's own symbol table and compares with the stored content layer — divergence means somebody edited one layer deliberately, so it reports a **warning carrying provenance** and re-derives nothing.
476
+
477
+ ```ts
478
+ import { latexToFormula, lintMathCoherence, lowerLatex } from 'documents.js';
479
+
480
+ const { expression, diagnostics, mintedSymbols } = lowerLatex('\\sum_{i=1}^{n} \\frac{1}{i^2}');
481
+ // expression: { kind: 'sum', binder: 'i', lower: {kind:'num',numerator:'1',denominator:'1'}, ... }
482
+ // diagnostics: [] — fully mechanical; '2x' would degrade to unparsed + 'latex/juxtaposition-unparsed'
483
+
484
+ const { formula } = latexToFormula('x^2', { symbolEntries: table.symbols, source: 'my:pipeline' });
485
+ // formula: { mathml, presentation: { latex: 'x^2' }, content, provenance } — ready to embed
486
+
487
+ const warnings = lintMathCoherence(pkg); // [{ code: 'math/coherence-divergence', severity: 'warning', provenance, detail }]
488
+ ```
489
+
466
490
  ## Fonts
467
491
 
468
492
  Every X → PDF conversion resolves each typeface through a real `FontRegistry`, in this order:
@@ -509,7 +533,8 @@ The package is layered from generic primitives outward to the two conversion dir
509
533
  - **`src/omml/`** — the MathML ⇄ OMML structural translator, both directions. `write.ts` covers the identical construct set `src/mathml/layout.ts` typesets; `read.ts` covers strictly more (reads what Word authored, not just what this package writes). Lives outside `src/mathml/` because its I/O type is `ooxml.js`'s `XmlElement` and `src/mathml/` imports no package.
510
534
  - **`src/ooxml/`** — thin adapters over `ooxml.js`'s own `readDocx`/`readPptx`, wrapping results into `ContentDocument`. `docx/formula.ts` is the one local reading pass (splicing OOXML math equations). `docx/extras.ts`'s `readDocxExtras` returns comments/footnotes/headers/footers/numbering.
511
535
  - **`src/odf/`** — ODF-side counterparts: `readOdtContent`/`readOdpContent`/`readOdsContent`/`readOdgContent` are thin adapters over `odf.js`. `formula/read.ts`/`formula/detect.ts` handle embedded formula detection (genuinely new work with no `odf.js`-side equivalent).
512
- - **`src/markdown/`** — third adapter family, via `markdown-codec`. `readMarkdownContent` passes `readMarkdown`'s result straight through (it already produces a full `ContentDocument`). `buildMarkdownText` wraps `writeMarkdown`. `text.ts` is the byte↔text boundary. `MarkdownEditor` holds a mutable in-memory `ContentDocument`.
536
+ - **`src/latex/`** — the LaTeX presentation `MathExpression` lowering: `temml.ts` is the pinned-parser boundary (exact-version temml, its internal parse API guarded behind structural type guards), `lower.ts` the mechanical rules and their degradations, `symbols.ts` the glyph/command map and the prose definition scanner, `rational.ts` the exact-rational helpers, `lint.ts` the coherence lint. See [LaTeX lowering into the semantic core](#latex-lowering-into-the-semantic-core).
537
+ - **`src/markdown/`** — third adapter family, via `markdown-codec`. `readMarkdownContent` passes `readMarkdown`'s result through the math-lowering pass (`math.ts` — markdown-codec's preserved `$$` display blocks and `\( \)` inline spans become two-layer formula blocks, with the document's symbol table seeded from its own prose). `buildMarkdownText` wraps `writeMarkdown`, reconstructing markdown math syntax from formula blocks carrying a presentation layer. `text.ts` is the byte↔text boundary. `MarkdownEditor` holds a mutable in-memory `ContentDocument`.
513
538
  - **`src/csv/`** — fourth adapter family, sharing the spreadsheet variant with xlsx/ods. `records.ts` is the RFC 4180 record parser/writer (one shared `quoteCsvField`, also used by the `.odb` CSV exporter); `text.ts` is the byte↔text boundary, rejecting malformed UTF-8; `read.ts` turns records into a spreadsheet `ContentDocument` (first record as verbatim string header, data cells through the same cell-typing heuristic `pdfToOds` uses); `write.ts` turns one sheet of a spreadsheet `ContentDocument` back into records via each cell's `displayText`. TSV is the same format with `{ delimiter: '\t' }` on either side.
514
539
  - **`src/svg/`** — fifth adapter family, sharing the drawing variant with odg. `text.ts` is the byte↔text boundary, rejecting malformed UTF-8; `read.ts` maps the six SVG shape primitives (rect/circle/ellipse/line/polyline/polygon/path) onto a one-page drawing `ContentDocument`, with transform lists composed as 2×3 affines and CSS lengths and the viewBox map resolved into page points; `write.ts` writes the six primitives back out, one shape element each; `path.ts` is the full SVG path-data grammar (M/L/H/V/C/S/Z plus Q/T/A and the relative forms — S/Q/T convert exactly, A is the one bounded approximation at ≤90° per cubic); `transform.ts` parses and composes the transform attribute and classifies the result by frame representability; `units.ts` resolves CSS length units and the viewBox; `paint.ts` resolves fill/stroke presentation attributes and dash styles; `diagnostics.ts` is the shared scope-limit vocabulary.
515
540
  - **`src/layout/`** — the pure conversion algorithms: `engine.ts` (wordprocessing → layout: flow, line-breaking, pagination), `slides.ts` (presentation → layout: direct placement), `sheets.ts` (spreadsheet → layout: grid, print settings, the first algorithm accepting `AbortSignal`), `drawing.ts` (drawing → layout: vector primitives + shape reuse), `reconstruct.ts` (layout → content: baseline clustering for wordprocessing/presentation, near-1:1 mapping for drawing, gridline-lattice-or-text-clustering for spreadsheet).
@@ -620,11 +645,11 @@ To run a single test file: `pnpm vitest run src/path/to/file.test.ts`.
620
645
  - **`convertSpreadsheetToLayout` returns `{ document, formulas }`** — formula CID-font glyph runs can't travel through `LayoutDocument.pages[].items`.
621
646
  - **`formulaSizePtForFrame` is one shared two-pass fit** — lay out once at reference size, rescale to fit both frame width and height, floored at 8pt. docx OMML (no geometry) uses height alone.
622
647
  - **Embedded-formula detection in odt/odp is genuinely new work** — `collectFormulaFrames`/`collectSlideFormulaFrames` mirror `odf.js`'s own walks. ods needs no detection pass (`odf.js` 2.2.0 classifies formula sub-documents directly).
623
- - **A formula that cannot typeset degrades to its plain-text stand-in, never to nothing.** `buildDocxPackage` writes real OMML; `buildOdtPackage` writes real embedded formula sub-documents. The markdown writer is the only stand-in-only path. `odmToPdf` carries formulas through as ordinary blocks.
648
+ - **A formula that cannot typeset degrades to its plain-text stand-in, never to nothing.** `buildDocxPackage` writes real OMML; `buildOdtPackage` writes real embedded formula sub-documents. The markdown writer reconstructs real `$$`/`\( \)` math for formulas carrying a presentation layer and falls back to the plain-text stand-in (StarMath, the verbatim presentation LaTeX, else `[formula]`) only for formulas with no LaTeX at all. `odmToPdf` carries formulas through as ordinary blocks.
624
649
  - **OMML read/write are deliberately asymmetric** — the reader covers more (`m:d`, `m:nary`, `m:acc`, `m:bar`, `m:func`, `m:sPre`) because it must read what Word wrote. `docx → odt → docx` round trips keep the mathematics but may change the OMML construct.
625
650
  - **The OMML translator covers exactly what `src/mathml/layout.ts` typesets.** A stretchy fence diverges: PDF stretches it, docx writes it at base size. `munderover` becomes nested `m:limUpp`/`m:limLow` (no operand scope in MathML).
626
651
  - **`sourcePath` traces a `LayoutItem` to its `ContentDocument` origin, but only within one read+layout pass** — not an edit-tracking mechanism. Since the frames fusion it survives as traceability only: the authoritative node↔position association is each content node's own `frames`, stamped at the moment of layout (or of reconstruction) rather than re-matched by string afterwards.
627
- - **`readMarkdownContent` passes `readMarkdown`'s result straight through** — `markdown-codec` already produces a full `ContentDocument`.
652
+ - **`readMarkdownContent` runs markdown-codec's result through the math-lowering pass** — `markdown-codec` already produces a full `ContentDocument`, but it deliberately carries `$$` display blocks and `\( \)` inline spans through as raw LaTeX text (styled paragraphs and marker runs); the pass lowers that LaTeX into two-layer formula blocks so markdown math typesets, edits, and computes like math from any other format (see [LaTeX lowering into the semantic core](#latex-lowering-into-the-semantic-core)).
628
653
  - **Every markdown construct-mapping gap is a documented `MarkdownDiagnosticCodes` entry** (`md/invented-page-geometry`, `md/nested-emphasis-flattened`, `md/link-title-dropped`, `md/code-block-info-string-dropped`, `md/blockquote-nested-depth`, `md/list-item-block-unlisted`, `md/list-item-multi-block-flattened`, `md/image-unresolved`, `md/raw-html-preserved-as-text`/`md/raw-html-dropped`, `md/front-matter-key-unmapped`, `md/heading-level-clamped`, `md/adjacent-links-merged`, `md/code-span-as-monospace-run`, `md/paragraph-indent-dropped`, `md/list-numid-fallback`, `md/table-cell-formatting-dropped`, `md/table-cell-multi-paragraph-joined`) — never a silent approximation.
629
654
  - **`buildMarkdownText` throws for non-`'wordprocessing'` `ContentDocument`.**
630
655
  - **`decodeMarkdownText` throws on malformed UTF-8** rather than producing U+FFFD.
@@ -0,0 +1,18 @@
1
+ //#region src/latex/diagnostics.d.ts
2
+ declare const LATEX_DIAGNOSTIC_CODES: readonly ["latex/parse-error", "latex/construct-unparsed", "latex/juxtaposition-unparsed", "latex/text-unparsed", "latex/subscript-unparsed", "latex/binder-bound-implicit", "latex/binder-bound-unreadable", "latex/operator-unmapped", "latex/script-base-unparsed", "latex/array-environment-unparsed", "latex/genfrac-unparsed", "latex/operator-placement-unparsed", "symbols/prose-definition-found"];
3
+ type LatexDiagnosticCode = (typeof LATEX_DIAGNOSTIC_CODES)[number];
4
+ interface LatexDiagnostic {
5
+ readonly code: LatexDiagnosticCode;
6
+ readonly detail?: string;
7
+ }
8
+ type LatexDiagnosticSink = (diagnostic: LatexDiagnostic) => void;
9
+ declare const MATH_LINT_CODES: readonly ["math/coherence-divergence", "math/coherence-unparseable-presentation"];
10
+ type MathLintCode = (typeof MATH_LINT_CODES)[number];
11
+ interface MathLintDiagnostic {
12
+ readonly code: MathLintCode;
13
+ readonly severity: 'warning';
14
+ readonly provenance?: string;
15
+ readonly detail?: string;
16
+ }
17
+ //#endregion
18
+ export { MATH_LINT_CODES as a, LatexDiagnosticSink as i, LatexDiagnostic as n, MathLintCode as o, LatexDiagnosticCode as r, MathLintDiagnostic as s, LATEX_DIAGNOSTIC_CODES as t };
@@ -0,0 +1,18 @@
1
+ //#region src/latex/diagnostics.d.ts
2
+ declare const LATEX_DIAGNOSTIC_CODES: readonly ["latex/parse-error", "latex/construct-unparsed", "latex/juxtaposition-unparsed", "latex/text-unparsed", "latex/subscript-unparsed", "latex/binder-bound-implicit", "latex/binder-bound-unreadable", "latex/operator-unmapped", "latex/script-base-unparsed", "latex/array-environment-unparsed", "latex/genfrac-unparsed", "latex/operator-placement-unparsed", "symbols/prose-definition-found"];
3
+ type LatexDiagnosticCode = (typeof LATEX_DIAGNOSTIC_CODES)[number];
4
+ interface LatexDiagnostic {
5
+ readonly code: LatexDiagnosticCode;
6
+ readonly detail?: string;
7
+ }
8
+ type LatexDiagnosticSink = (diagnostic: LatexDiagnostic) => void;
9
+ declare const MATH_LINT_CODES: readonly ["math/coherence-divergence", "math/coherence-unparseable-presentation"];
10
+ type MathLintCode = (typeof MATH_LINT_CODES)[number];
11
+ interface MathLintDiagnostic {
12
+ readonly code: MathLintCode;
13
+ readonly severity: 'warning';
14
+ readonly provenance?: string;
15
+ readonly detail?: string;
16
+ }
17
+ //#endregion
18
+ export { MATH_LINT_CODES as a, LatexDiagnosticSink as i, LatexDiagnostic as n, MathLintCode as o, LatexDiagnosticCode as r, MathLintDiagnostic as s, LATEX_DIAGNOSTIC_CODES as t };
package/dist/index.cjs CHANGED
@@ -37,6 +37,8 @@ const require_edit_ods_content = require("./edit/ods/content.cjs");
37
37
  const require_edit_odg_page = require("./edit/odg/page.cjs");
38
38
  const require_edit_odg_editor = require("./edit/odg/editor.cjs");
39
39
  const require_edit_odg_content = require("./edit/odg/content.cjs");
40
+ const require_latex_lower = require("./latex/lower.cjs");
41
+ const require_markdown_math = require("./markdown/math.cjs");
40
42
  const require_markdown_read = require("./markdown/read.cjs");
41
43
  const require_markdown_write = require("./markdown/write.cjs");
42
44
  const require_edit_markdown_run = require("./edit/markdown/run.cjs");
@@ -53,6 +55,8 @@ const require_fonts_ooxml = require("./fonts/ooxml.cjs");
53
55
  const require_fonts_registry = require("./fonts/registry.cjs");
54
56
  const require_mathml_layout = require("./mathml/layout.cjs");
55
57
  const require_omml_read = require("./omml/read.cjs");
58
+ const require_latex_diagnostics = require("./latex/diagnostics.cjs");
59
+ const require_latex_lint = require("./latex/lint.cjs");
56
60
  const require_ooxml_docx_read = require("./ooxml/docx/read.cjs");
57
61
  const require_ooxml_docx_extras = require("./ooxml/docx/extras.cjs");
58
62
  const require_ooxml_pptx_read = require("./ooxml/pptx/read.cjs");
@@ -380,6 +384,7 @@ exports.HsqldbScriptParseError = require_hsqldb_script.HsqldbScriptParseError;
380
384
  exports.HsqldbSqlEvaluationError = require_odb_sql_errors.HsqldbSqlEvaluationError;
381
385
  exports.HsqldbSqlParseError = require_odb_sql_errors.HsqldbSqlParseError;
382
386
  exports.HsqldbSqlUnsupportedError = require_odb_sql_errors.HsqldbSqlUnsupportedError;
387
+ exports.LATEX_DIAGNOSTIC_CODES = require_latex_diagnostics.LATEX_DIAGNOSTIC_CODES;
383
388
  Object.defineProperty(exports, "LAYOUT_FORMAT_VERSION", {
384
389
  enumerable: true,
385
390
  get: function() {
@@ -392,6 +397,7 @@ Object.defineProperty(exports, "LayoutDocumentSchema", {
392
397
  return document_schema_js.LayoutDocumentSchema;
393
398
  }
394
399
  });
400
+ exports.MATH_LINT_CODES = require_latex_diagnostics.MATH_LINT_CODES;
395
401
  exports.MarkdownBytesSchema = require_model_bytes.MarkdownBytesSchema;
396
402
  exports.MarkdownEditor = require_edit_markdown_editor.MarkdownEditor;
397
403
  exports.MarkdownList = require_edit_markdown_list.MarkdownList;
@@ -833,6 +839,7 @@ Object.defineProperty(exports, "isXmlNode", {
833
839
  return ooxml_js.isXmlNode;
834
840
  }
835
841
  });
842
+ exports.latexToFormula = require_latex_lower.latexToFormula;
836
843
  exports.layoutDocumentFromPackage = require_convert_from_package.layoutDocumentFromPackage;
837
844
  Object.defineProperty(exports, "layoutDocumentWithSchema", {
838
845
  enumerable: true,
@@ -841,6 +848,7 @@ Object.defineProperty(exports, "layoutDocumentWithSchema", {
841
848
  }
842
849
  });
843
850
  exports.layoutFormula = require_mathml_layout.layoutFormula;
851
+ exports.lintMathCoherence = require_latex_lint.lintMathCoherence;
844
852
  Object.defineProperty(exports, "loadMathFont", {
845
853
  enumerable: true,
846
854
  get: function() {
@@ -849,6 +857,8 @@ Object.defineProperty(exports, "loadMathFont", {
849
857
  });
850
858
  exports.localName = require_mathml_nodes.localName;
851
859
  exports.looksLikeSfnt = require_fonts_obfuscation.looksLikeSfnt;
860
+ exports.lowerLatex = require_latex_lower.lowerLatex;
861
+ exports.lowerMarkdownMath = require_markdown_math.lowerMarkdownMath;
852
862
  exports.mapMathVariant = require_mathml_variant.mapMathVariant;
853
863
  exports.markdownDocxCodec = require_convert_codec.markdownDocxCodec;
854
864
  exports.markdownOdtCodec = require_convert_codec.markdownOdtCodec;
package/dist/index.d.cts CHANGED
@@ -77,6 +77,10 @@ import { MathDiagnostic, MathDiagnosticKind, MathLayoutResult } from "./mathml/l
77
77
  import { LayoutFormulaOptions, layoutFormula } from "./mathml/layout.cjs";
78
78
  import { OperatorProperties, operatorProperties } from "./mathml/operators.cjs";
79
79
  import { OmmlReadResult, collectOfficeMathElements, readOfficeMath } from "./omml/read.cjs";
80
+ import { a as MATH_LINT_CODES, i as LatexDiagnosticSink, n as LatexDiagnostic, o as MathLintCode, r as LatexDiagnosticCode, s as MathLintDiagnostic, t as LATEX_DIAGNOSTIC_CODES } from "./diagnostics-C5-bG09J.cjs";
81
+ import { LatexFormulaOptions, LatexFormulaResult, LatexLoweringResult, LowerLatexOptions, latexToFormula, lowerLatex } from "./latex/lower.cjs";
82
+ import { lintMathCoherence } from "./latex/lint.cjs";
83
+ import { MarkdownMathLoweringOptions, lowerMarkdownMath } from "./markdown/math.cjs";
80
84
  import { ReadDocxContentOptions, readDocxContent } from "./ooxml/docx/read.cjs";
81
85
  import { DocxExtras, readDocxExtras } from "./ooxml/docx/extras.cjs";
82
86
  import { readPptxContent } from "./ooxml/pptx/read.cjs";
@@ -124,4 +128,4 @@ import { Alignment, Box, COLOR_BLACK, CONTENT_FORMAT_VERSION, CellPosition, Cell
124
128
  import { Attribute, AttributeSchema, BinaryPart, BinaryPartSchema, Comment, CommentSchema, CompactAttrPairs, CompactPackage, CompactPackageSchema, CompactPart, CompactPartSchema, CompactXmlNode, CompactXmlNodeSchema, DefinedName, DefinedNameSchema, Footnote, FootnoteSchema, NumberingDefinition, NumberingDefinitionSchema, NumberingDefinitions, NumberingLevel, NumberingLevelSchema, Package, PackageSchema, Part, PartSchema, Relationship, XmlCdata, XmlCdataSchema, XmlComment, XmlCommentSchema, XmlDeclaration, XmlDeclarationSchema, XmlElement, XmlElementSchema, XmlNode, XmlNodeSchema, XmlPart, XmlPartSchema, XmlPi, XmlPiSchema, XmlText, XmlTextSchema, attr, base64ToBytes, buildXlsxPackage, buildXml, bytesToBase64, childrenWithTag, compactCodec, compactPackageCodec, decodeCompactPackage, decodeEntities, decodePackage, elementsWithTag, encodeCompactPackage, encodePackage, fromCompact, isCompactXmlNode, isXmlNode, packageCodec, parsePackage, parseXml, readXlsxContent, resolveRelationships, rootElement, serializePackage, textContent as textContent$1, toCompact, unzipPackage, walk, xmlCodec, zipPackage } from "ooxml.js";
125
129
  import { FontFaceParseError, FontRegistry, FontRegistryOptions, FontSubstitution, LoadedMathFont, MathFont, MathFontDescriptorMetrics, NOOP_DIAGNOSTIC_SINK, PdfDiagnostic, PdfDiagnosticSeverity, PdfDiagnosticSink, PdfEncryptedError, PdfParseError, ProvidedFont, ReadPdfOptions, ResolvedFace, WinAnsiSubstitution, WritePdfOptions, createFontMeasurer, createFontRegistry, createStandardFontMeasurer, loadMathFont, pdfCodec, readFontFace as describeFontFace, readPdf, writePdf } from "pdf-codec";
126
130
  import { OdbComponentInfo, OdbConnectionInfo, OdbForm, OdbFormControl, OdbFormDefinition, OdbInventory, OdbQueryInfo, OdbReport, OdbReportBand, OdbReportElement, OdbReportFunction, OdbReportGroup, readOdbForm, readOdbInventory, readOdbReport, resolveOdbComponent } from "odf.js";
127
- export { type Alignment, type Attribute, AttributeSchema, type BinaryPart, BinaryPartSchema, type Box, type BuildCsvTextOptions, type BuildDocxPackageOptions, type BuildOdgPackageOptions, type BuildOdpPackageOptions, type BuildOdsPackageOptions, type BuildOdtPackageOptions, type BuildPptxPackageOptions, type BuildSvgTextOptions, COLOR_BLACK, CONTENT_FORMAT_VERSION, type CellPosition, type CellRange, type CellTypeDeclineReason, type CellTypeInference, type CellTypeInferenceResult, type CellTypeInferenceSink, type CellTypeRule, type ClockPort, type Comment, CommentSchema, type CompactAttrPairs, type CompactPackage, CompactPackageSchema, type CompactPart, CompactPartSchema, type CompactXmlNode, CompactXmlNodeSchema, type CompositionHop, type ContentBlock, ContentBlockSchema, type ContentCellValue, ContentCellValueSchema, type ContentDocument, type ContentDocumentJson, ContentDocumentSchema, type ContentDrawPage, ContentDrawPageSchema, type ContentImageBlock, ContentImageBlockSchema, type ContentListMembership, type ContentPageBreak, ContentPageBreakSchema, type ContentParagraph, ContentParagraphSchema, type ContentPathPoint, ContentPathPointSchema, type ContentPathSegment, ContentPathSegmentSchema, type ContentRun, ContentRunSchema, type ContentSection, ContentSectionSchema, type ContentShape, ContentShapeSchema, type ContentSheet, type ContentSheetCell, ContentSheetCellSchema, type ContentSheetColumn, ContentSheetColumnSchema, type ContentSheetImage, type ContentSheetPrintRange, ContentSheetPrintRangeSchema, type ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, type ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, type ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, type ContentSlide, ContentSlideSchema, type ContentStroke, ContentStrokeSchema, type ContentSubpath, ContentSubpathSchema, type ContentTable, type ContentTableCell, ContentTableCellSchema, type ContentTableRow, ContentTableRowSchema, ContentTableSchema, type ContentVector, ContentVectorSchema, type ConversionOptions, type ConversionPlan, type ConversionRequest, type ConversionResult, type CreateDocxOptions, type CreateEmptyDocxPackageOptions, type CreateEmptyOdgPackageOptions, type CreateEmptyOdpPackageOptions, type CreateEmptyOdsPackageOptions, type CreateEmptyOdtPackageOptions, type CreateEmptyPptxPackageOptions, type CreateMarkdownEditorOptions, type CreateOdgOptions, type CreateOdpOptions, type CreateOdsOptions, type CreateOdtOptions, type CreatePdfOptions, type CreatePptxOptions, CsvBytesSchema, CsvInvalidUtf8Error, CsvParseError, type CsvReadOptions, CsvSheetNotFoundError, CsvSheetNotSpecifiedError, CsvUnsupportedDocumentKindError, type CsvWriteOptions, DEFAULT_LAYOUT_FONT, DOCUMENT_FORMATS, type DefinedName, DefinedNameSchema, type Diagnostic, type DocumentBridgeOptions, type DocumentConverter, type DocumentFontRegistryOptions, type DocumentFormat, DocumentFormatSchema, type DocumentJsonResult, type DocumentPackage, type DocumentPackageJson, DocumentPackageSchema, type DocumentPayload, type DocumentSchemaKind, type DocumentToPdfOptions, type DocxBody, DocxBytesSchema, DocxEditor, type DocxExtras, DocxParagraph, DocxRun, DocxTable, DocxTableCell, DocxTableRow, type DocxVerticalMerge, type DrawingLayoutOptions, type DrawingLayoutResult, type DrawingParagraphInit, type DrawingRunInit, type EngineLayoutOptions, SUPPORTED_BACKUP_FORMAT_VERSION as FIREBIRD_SUPPORTED_BACKUP_FORMAT_VERSION, FirebirdBackupFormatError, FirebirdBackupParseError, type FirebirdBackupSummary, FirebirdCompositeRecordUnsupportedError, FirebirdDataParseError, FirebirdSchemaParseError, FirebirdUnsupportedFieldTypeError, FontDeobfuscationError, type FontFace, FontFaceParseError, type FontRegistry, type FontRegistryOptions, type FontSourcePackage, type FontSubstitution, type Footnote, FootnoteSchema, type GridLattice, type HsqldbBinaryScript, HsqldbBinaryScriptParseError, type HsqldbColumn, type HsqldbDecodeOptions, HsqldbRowFormatError, HsqldbScriptParseError, HsqldbSqlEvaluationError, HsqldbSqlParseError, HsqldbSqlUnsupportedError, type HsqldbTable, LAYOUT_FORMAT_VERSION, type LayoutColor, type LayoutDocument, type LayoutDocumentJson, LayoutDocumentSchema, type LayoutEllipse, type LayoutFont, type LayoutFormulaOptions, type LayoutImage, type LayoutImageAsset, type LayoutItem, type LayoutLine, type LayoutLink, type LayoutMetadata, type LayoutPage, type LayoutPath, type LayoutPathSegment, type LayoutRect, type LayoutSubpath, type LayoutText, type LoadedMathFont, type Margins, type MarkdownBody, MarkdownBytesSchema, MarkdownEditor, MarkdownList, type MarkdownListInit, MarkdownParagraph, type ParagraphInit as MarkdownParagraphInit, type MarkdownRenderDiagnostic, type MarkdownRenderDiagnosticCode, MarkdownRenderDiagnosticCodes, type MarkdownRenderDiagnosticSeverity, type MarkdownRenderDiagnosticSink, MarkdownRun, type RunInit as MarkdownRunInit, MarkdownTable, MarkdownTableCell, type TableInit as MarkdownTableInit, MarkdownTableRow, type MathAssembledGlyphs, type MathBox, type MathColor, type MathDiagnostic, type MathDiagnosticKind, type MathFont, type MathFontDescriptorMetrics, type MathFontMetrics, type MathGlyphMetrics, type MathGlyphPlacement, type MathGlyphRun, type MathLayoutItem, type MathLayoutResult, type MathMlAttribute, type MathMlElement, type MathMlNode, type MathMlText, type MathRule, type MathStretchAxis, type MathStretchGlyph, type MathStretchResult, type MathStroke, type MathVariant, type MetadataOverrides, NOOP_DIAGNOSTIC_SINK, type NumberingDefinition, NumberingDefinitionSchema, type NumberingDefinitions, type NumberingLevel, NumberingLevelSchema, type OdbComponentInfo, type OdbConnectionInfo, type OdbConversionOptions, type OdbForm, type OdbFormControl, type OdbFormDefinition, type OdbInventory, OdbNoEmbeddedDataSourceError, type OdbQueryInfo, type OdbReport, type OdbReportBand, type OdbReportContentOptions, OdbReportDataSourceError, type OdbReportElement, type OdbReportFunction, type OdbReportGroup, OdbReportNotSpecifiedError, type OdbReportToDocxOptions, type OdbReportToOdtOptions, OdbTableNotFoundError, OdbTableNotSpecifiedError, type OdbToCsvOptions, type OdbUnsupportedFormat, OdbUnsupportedFormatError, OdfEmbeddedFontError, OdgBoxVector, type BoxVectorInit as OdgBoxVectorInit, OdgBytesSchema, OdgEditor, OdgLineVector, type LineVectorInit as OdgLineVectorInit, OdgPage, type PageImageInit as OdgPageImageInit, OdgPathVector, type PathVectorInit as OdgPathVectorInit, type TextBoxInit as OdgTextBoxInit, type OdgVector, type OdgVectorKind, type OdmToPdfOptions, OdmUnresolvedSectionError, OdpBytesSchema, OdpEditor, OdpShape, OdpSlide, type SlideImageInit as OdpSlideImageInit, type SlideTableInit as OdpSlideTableInit, type TextBoxInit$1 as OdpTextBoxInit, OdsBytesSchema, OdsCell, OdsEditor, OdsSheet, type OdtBody, OdtBytesSchema, OdtEditor, OdtList, OdtListItem, OdtParagraph, type ParagraphInit$1 as OdtParagraphInit, OdtRun, type RunInit$1 as OdtRunInit, OdtTable, OdtTableCell, type TableInit$1 as OdtTableInit, OdtTableRow, type OmmlDiagnostic, type OmmlDiagnosticKind, type OmmlReadResult, type OmmlWriteResult, OoxmlEmbeddedFontError, type OperatorProperties, PAGE_SIZE_A4, PAGE_SIZE_LETTER, type Package, PackageSchema, type PageInit, type PageSize, type Part, PartSchema, PdfBytesSchema, type PdfDiagnostic, type PdfDiagnosticSeverity, type PdfDiagnosticSink, PdfEditor, type PdfEllipseInit, PdfEllipseItem, PdfEncryptedError, type PdfImageInit, PdfImageItem, type PdfItem, type PdfLineInit, PdfLineItem, type PdfLinkInit, PdfLinkItem, PdfPage, PdfParseError, type PdfPathInit, PdfPathItem, type PdfRectInit, PdfRectItem, type PdfTextInit, PdfTextItem, type PdfToDocumentOptions, type PositionedFormula, PptxBytesSchema, PptxEditor, PptxShape, PptxSlide, PptxTable, PptxTableCell, type PptxTableInit, PptxTableRow, type PresentationLayoutResult, type ProvidedFont, type ReadCsvContentOptions, type ReadDocumentMetadataOptions, type ReadDocxContentOptions, type ReadFirebirdBackupResult, type ReadPdfOptions, type ReadSvgContentOptions, type ReconstructOptions, type Relationship, type RenderMarkdownOptions, type ResolvedFace, type RptAggregateFunction, type RptBandDefinition, type RptBandInstance, type RptBandKind, type RptFormula, RptFormulaEvaluationError, RptFormulaParseError, RptFormulaUnsupportedError, type RptGroupDefinition, type RptNamedFunctionDefinition, type RptReference, type RptReportDefinition, type RptReportRun, RptReportStructureError, type RptScope, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, SVG_DIAGNOSTIC_CODES, type SetDocumentMetadataOptions, type SheetsLayoutOptions, type SlideImageInit$1 as SlideImageInit, type SlideTableInit$1 as SlideTableInit, type SlidesLayoutOptions, type SpreadsheetLayoutResult, type SqlAggregateArgument, type SqlAggregateFunction, type SqlColumnRef, type SqlComparisonOperator, type SqlLiteral, type SqlNameRef, type SqlOperand, type SqlOrderByTerm, type SqlPredicate, type SqlPunctuation, type SqlResultSet, type SqlSelectItem, type SqlSelectStatement, type SqlSortDirection, type SqlToken, SvgBytesSchema, type SvgDiagnostic, type SvgDiagnosticCode, type SvgDiagnosticSink, SvgInvalidUtf8Error, SvgMissingRootElementError, SvgMultiPageNotSpecifiedError, SvgPageNotFoundError, type SvgReadOptions, SvgUnsupportedDocumentKindError, type SvgWriteOptions, type TextBoxInit$2 as TextBoxInit, type UnifiedConversionOptions, UnrecognizedDocumentSchemaError, UnsupportedFontSourceFormatError, UnsupportedPackageFormatError, type WinAnsiSubstitution, type WordprocessingLayoutResult, type WritePdfOptions, XlsxBytesSchema, type XmlCdata, XmlCdataSchema, type XmlComment, XmlCommentSchema, type XmlDeclaration, XmlDeclarationSchema, type XmlElement, XmlElementSchema, type XmlNode, XmlNodeSchema, type XmlPart, XmlPartSchema, type XmlPi, XmlPiSchema, type XmlText, XmlTextSchema, applyMathVariant, attr, base64ToBytes, buildCsvText, buildDocumentBytes, buildDocxPackage, buildDrawingBlock, buildFormulaBlock, buildMarkdownText, buildOdgPackage, buildOdpPackage, buildOdsPackage, buildOdtPackage, buildOfficeMath, buildOfficeMathParagraph, buildPptxPackage, buildSvgText, buildXlsxPackage, buildXml, bytesToBase64, cellReference, childrenWithTag, collectOfficeMathElements, columnIndexToLetters, columnLettersToIndex, compactCodec, compactPackageCodec, contentDocumentWithSchema, convertDocument, convertDrawingToLayout, convertPresentationToLayout, convertSpreadsheetToLayout, convertWordprocessingToLayout, createDocumentFontRegistry, createDocx, createFontMeasurer, createFontRegistry, createLocalDocumentConverter, createMarkdownEditor, createOdg, createOdp, createOds, createOdt, createPdf, createPptx, createStandardFontMeasurer, csvMarkdownCodec, csvPdfCodec, csvToMarkdown, csvToOds, csvToPdf, csvToXlsx, decodeCompactPackage, decodeCsvText, decodeDocumentPackage, decodeEntities, decodeHsqldbCachedTables, decodeMarkdownText, decodeOdbPackage, decodePackage, decodeSvgText, deobfuscateEmbeddedFont, deriveFontKey, describeFontFace, detectGridLattice, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, docxPdfCodec, docxToMarkdown, docxToOdt, docxToPdf, docxToPptx, drawingOfBlock, elementChildren, elementLocalName, elementsWithTag, encodeCompactPackage, encodeCsvText, encodeDocumentPackage, encodeMarkdownText, encodePackage, encodeSvgText, evaluateRptBandOutsideData, evaluateSelect, extractOdfEmbeddedFonts, extractOoxmlEmbeddedFonts, extractSourceFonts, extractSourceFontsForFormat, firstChildByLocalName, fixedClock, flipY, formulaDocument, formulaOfBlock, formulaPlaceholderText, fromCompact, displayTextFor as hsqldbCellDisplayText, inferCellValue, inflateHsqldbCompressedScript, isCompactXmlNode, isContentBlock, isMathMlElement, isMathVariant, isXmlNode, layoutDocumentFromPackage, layoutDocumentWithSchema, layoutFormula, loadMathFont, localName, looksLikeSfnt, mapMathVariant, markdownDocxCodec, markdownOdtCodec, markdownPdfCodec, markdownToCsv, markdownToDocx, markdownToOdt, markdownToPdf, markdownToXlsx, textContent as mathMlTextContent, odbReportCommandSql, odbReportGroupChain, odbReportToDocx, odbReportToOdt, odbReportToPdf, odbTablesToSpreadsheetDocument, odbToCsv, odbToXlsx, odfToPdf, odgPdfCodec, odgSvgCodec, odgToPdf, odgToSvg, odmToPdf, odpPdfCodec, odpPptxCodec, odpToOdt, odpToPdf, odpToPptx, odsCsvCodec, odsPdfCodec, odsToCsv, odsToPdf, odsToXlsx, odsXlsxCodec, odtDocxCodec, odtPdfCodec, odtToDocx, odtToMarkdown, odtToOdp, odtToPdf, openDocx, openMarkdown, openOdg, openOdp, openOds, openOdt, openPdf, openPptx, operatorProperties, packageCodec, parseCellReference, parseHsqldbBinaryScript, parseHsqldbScript, parsePackage, parseRangeReference, parseRptFormula, parseSelect, parseXml, pdfCodec, pdfToCsv, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToSvg, pdfToXlsx, pptxPdfCodec, pptxToDocx, pptxToOdp, pptxToPdf, rangeReference, readCsvContent, readDocumentMetadata, readDocxContent, readDocxExtras, readFirebirdBackup, readMarkdownContent, readOdbForm, readOdbForms, readOdbInventory, readOdbReport, readOdbReportContent, readOdbReports, readOdbTables, readOdfEmbeddedFormula, readOdfFormulaContent, readOdgContent, readOdpContent, readOdsContent, readOdtContent, readOfficeMath, readPdf, readPptxContent, readSvgContent, readXlsxContent, reconstructDrawing, reconstructPresentation, reconstructSpreadsheet, reconstructWordprocessing, renderContentDocumentToMarkdown, renderOdbReportContent, resolveCompositionPlan, resolveMetadataTimestamps, resolveOdbComponent, resolveOdbReportRows, resolveRelationships, rgbHexToColor, rootElement, rptBandDefinition, rptDefinitionFromReport, runRptReport, schemaUriFor, serializePackage, setDocumentMetadata, svgPdfCodec, svgToOdg, svgToPdf, systemClock, textContent$1 as textContent, throwIfAborted, toCompact, tokenizeSql, unzipPackage, walk, writePdf, xlsxCsvCodec, xlsxMarkdownCodec, xlsxPdfCodec, xlsxToCsv, xlsxToMarkdown, xlsxToOds, xlsxToPdf, xmlCodec, zipPackage };
131
+ export { type Alignment, type Attribute, AttributeSchema, type BinaryPart, BinaryPartSchema, type Box, type BuildCsvTextOptions, type BuildDocxPackageOptions, type BuildOdgPackageOptions, type BuildOdpPackageOptions, type BuildOdsPackageOptions, type BuildOdtPackageOptions, type BuildPptxPackageOptions, type BuildSvgTextOptions, COLOR_BLACK, CONTENT_FORMAT_VERSION, type CellPosition, type CellRange, type CellTypeDeclineReason, type CellTypeInference, type CellTypeInferenceResult, type CellTypeInferenceSink, type CellTypeRule, type ClockPort, type Comment, CommentSchema, type CompactAttrPairs, type CompactPackage, CompactPackageSchema, type CompactPart, CompactPartSchema, type CompactXmlNode, CompactXmlNodeSchema, type CompositionHop, type ContentBlock, ContentBlockSchema, type ContentCellValue, ContentCellValueSchema, type ContentDocument, type ContentDocumentJson, ContentDocumentSchema, type ContentDrawPage, ContentDrawPageSchema, type ContentImageBlock, ContentImageBlockSchema, type ContentListMembership, type ContentPageBreak, ContentPageBreakSchema, type ContentParagraph, ContentParagraphSchema, type ContentPathPoint, ContentPathPointSchema, type ContentPathSegment, ContentPathSegmentSchema, type ContentRun, ContentRunSchema, type ContentSection, ContentSectionSchema, type ContentShape, ContentShapeSchema, type ContentSheet, type ContentSheetCell, ContentSheetCellSchema, type ContentSheetColumn, ContentSheetColumnSchema, type ContentSheetImage, type ContentSheetPrintRange, ContentSheetPrintRangeSchema, type ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, type ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, type ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, type ContentSlide, ContentSlideSchema, type ContentStroke, ContentStrokeSchema, type ContentSubpath, ContentSubpathSchema, type ContentTable, type ContentTableCell, ContentTableCellSchema, type ContentTableRow, ContentTableRowSchema, ContentTableSchema, type ContentVector, ContentVectorSchema, type ConversionOptions, type ConversionPlan, type ConversionRequest, type ConversionResult, type CreateDocxOptions, type CreateEmptyDocxPackageOptions, type CreateEmptyOdgPackageOptions, type CreateEmptyOdpPackageOptions, type CreateEmptyOdsPackageOptions, type CreateEmptyOdtPackageOptions, type CreateEmptyPptxPackageOptions, type CreateMarkdownEditorOptions, type CreateOdgOptions, type CreateOdpOptions, type CreateOdsOptions, type CreateOdtOptions, type CreatePdfOptions, type CreatePptxOptions, CsvBytesSchema, CsvInvalidUtf8Error, CsvParseError, type CsvReadOptions, CsvSheetNotFoundError, CsvSheetNotSpecifiedError, CsvUnsupportedDocumentKindError, type CsvWriteOptions, DEFAULT_LAYOUT_FONT, DOCUMENT_FORMATS, type DefinedName, DefinedNameSchema, type Diagnostic, type DocumentBridgeOptions, type DocumentConverter, type DocumentFontRegistryOptions, type DocumentFormat, DocumentFormatSchema, type DocumentJsonResult, type DocumentPackage, type DocumentPackageJson, DocumentPackageSchema, type DocumentPayload, type DocumentSchemaKind, type DocumentToPdfOptions, type DocxBody, DocxBytesSchema, DocxEditor, type DocxExtras, DocxParagraph, DocxRun, DocxTable, DocxTableCell, DocxTableRow, type DocxVerticalMerge, type DrawingLayoutOptions, type DrawingLayoutResult, type DrawingParagraphInit, type DrawingRunInit, type EngineLayoutOptions, SUPPORTED_BACKUP_FORMAT_VERSION as FIREBIRD_SUPPORTED_BACKUP_FORMAT_VERSION, FirebirdBackupFormatError, FirebirdBackupParseError, type FirebirdBackupSummary, FirebirdCompositeRecordUnsupportedError, FirebirdDataParseError, FirebirdSchemaParseError, FirebirdUnsupportedFieldTypeError, FontDeobfuscationError, type FontFace, FontFaceParseError, type FontRegistry, type FontRegistryOptions, type FontSourcePackage, type FontSubstitution, type Footnote, FootnoteSchema, type GridLattice, type HsqldbBinaryScript, HsqldbBinaryScriptParseError, type HsqldbColumn, type HsqldbDecodeOptions, HsqldbRowFormatError, HsqldbScriptParseError, HsqldbSqlEvaluationError, HsqldbSqlParseError, HsqldbSqlUnsupportedError, type HsqldbTable, LATEX_DIAGNOSTIC_CODES, LAYOUT_FORMAT_VERSION, type LatexDiagnostic, type LatexDiagnosticCode, type LatexDiagnosticSink, type LatexFormulaOptions, type LatexFormulaResult, type LatexLoweringResult, type LayoutColor, type LayoutDocument, type LayoutDocumentJson, LayoutDocumentSchema, type LayoutEllipse, type LayoutFont, type LayoutFormulaOptions, type LayoutImage, type LayoutImageAsset, type LayoutItem, type LayoutLine, type LayoutLink, type LayoutMetadata, type LayoutPage, type LayoutPath, type LayoutPathSegment, type LayoutRect, type LayoutSubpath, type LayoutText, type LoadedMathFont, type LowerLatexOptions, MATH_LINT_CODES, type Margins, type MarkdownBody, MarkdownBytesSchema, MarkdownEditor, MarkdownList, type MarkdownListInit, type MarkdownMathLoweringOptions, MarkdownParagraph, type ParagraphInit as MarkdownParagraphInit, type MarkdownRenderDiagnostic, type MarkdownRenderDiagnosticCode, MarkdownRenderDiagnosticCodes, type MarkdownRenderDiagnosticSeverity, type MarkdownRenderDiagnosticSink, MarkdownRun, type RunInit as MarkdownRunInit, MarkdownTable, MarkdownTableCell, type TableInit as MarkdownTableInit, MarkdownTableRow, type MathAssembledGlyphs, type MathBox, type MathColor, type MathDiagnostic, type MathDiagnosticKind, type MathFont, type MathFontDescriptorMetrics, type MathFontMetrics, type MathGlyphMetrics, type MathGlyphPlacement, type MathGlyphRun, type MathLayoutItem, type MathLayoutResult, type MathLintCode, type MathLintDiagnostic, type MathMlAttribute, type MathMlElement, type MathMlNode, type MathMlText, type MathRule, type MathStretchAxis, type MathStretchGlyph, type MathStretchResult, type MathStroke, type MathVariant, type MetadataOverrides, NOOP_DIAGNOSTIC_SINK, type NumberingDefinition, NumberingDefinitionSchema, type NumberingDefinitions, type NumberingLevel, NumberingLevelSchema, type OdbComponentInfo, type OdbConnectionInfo, type OdbConversionOptions, type OdbForm, type OdbFormControl, type OdbFormDefinition, type OdbInventory, OdbNoEmbeddedDataSourceError, type OdbQueryInfo, type OdbReport, type OdbReportBand, type OdbReportContentOptions, OdbReportDataSourceError, type OdbReportElement, type OdbReportFunction, type OdbReportGroup, OdbReportNotSpecifiedError, type OdbReportToDocxOptions, type OdbReportToOdtOptions, OdbTableNotFoundError, OdbTableNotSpecifiedError, type OdbToCsvOptions, type OdbUnsupportedFormat, OdbUnsupportedFormatError, OdfEmbeddedFontError, OdgBoxVector, type BoxVectorInit as OdgBoxVectorInit, OdgBytesSchema, OdgEditor, OdgLineVector, type LineVectorInit as OdgLineVectorInit, OdgPage, type PageImageInit as OdgPageImageInit, OdgPathVector, type PathVectorInit as OdgPathVectorInit, type TextBoxInit as OdgTextBoxInit, type OdgVector, type OdgVectorKind, type OdmToPdfOptions, OdmUnresolvedSectionError, OdpBytesSchema, OdpEditor, OdpShape, OdpSlide, type SlideImageInit as OdpSlideImageInit, type SlideTableInit as OdpSlideTableInit, type TextBoxInit$1 as OdpTextBoxInit, OdsBytesSchema, OdsCell, OdsEditor, OdsSheet, type OdtBody, OdtBytesSchema, OdtEditor, OdtList, OdtListItem, OdtParagraph, type ParagraphInit$1 as OdtParagraphInit, OdtRun, type RunInit$1 as OdtRunInit, OdtTable, OdtTableCell, type TableInit$1 as OdtTableInit, OdtTableRow, type OmmlDiagnostic, type OmmlDiagnosticKind, type OmmlReadResult, type OmmlWriteResult, OoxmlEmbeddedFontError, type OperatorProperties, PAGE_SIZE_A4, PAGE_SIZE_LETTER, type Package, PackageSchema, type PageInit, type PageSize, type Part, PartSchema, PdfBytesSchema, type PdfDiagnostic, type PdfDiagnosticSeverity, type PdfDiagnosticSink, PdfEditor, type PdfEllipseInit, PdfEllipseItem, PdfEncryptedError, type PdfImageInit, PdfImageItem, type PdfItem, type PdfLineInit, PdfLineItem, type PdfLinkInit, PdfLinkItem, PdfPage, PdfParseError, type PdfPathInit, PdfPathItem, type PdfRectInit, PdfRectItem, type PdfTextInit, PdfTextItem, type PdfToDocumentOptions, type PositionedFormula, PptxBytesSchema, PptxEditor, PptxShape, PptxSlide, PptxTable, PptxTableCell, type PptxTableInit, PptxTableRow, type PresentationLayoutResult, type ProvidedFont, type ReadCsvContentOptions, type ReadDocumentMetadataOptions, type ReadDocxContentOptions, type ReadFirebirdBackupResult, type ReadPdfOptions, type ReadSvgContentOptions, type ReconstructOptions, type Relationship, type RenderMarkdownOptions, type ResolvedFace, type RptAggregateFunction, type RptBandDefinition, type RptBandInstance, type RptBandKind, type RptFormula, RptFormulaEvaluationError, RptFormulaParseError, RptFormulaUnsupportedError, type RptGroupDefinition, type RptNamedFunctionDefinition, type RptReference, type RptReportDefinition, type RptReportRun, RptReportStructureError, type RptScope, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, SVG_DIAGNOSTIC_CODES, type SetDocumentMetadataOptions, type SheetsLayoutOptions, type SlideImageInit$1 as SlideImageInit, type SlideTableInit$1 as SlideTableInit, type SlidesLayoutOptions, type SpreadsheetLayoutResult, type SqlAggregateArgument, type SqlAggregateFunction, type SqlColumnRef, type SqlComparisonOperator, type SqlLiteral, type SqlNameRef, type SqlOperand, type SqlOrderByTerm, type SqlPredicate, type SqlPunctuation, type SqlResultSet, type SqlSelectItem, type SqlSelectStatement, type SqlSortDirection, type SqlToken, SvgBytesSchema, type SvgDiagnostic, type SvgDiagnosticCode, type SvgDiagnosticSink, SvgInvalidUtf8Error, SvgMissingRootElementError, SvgMultiPageNotSpecifiedError, SvgPageNotFoundError, type SvgReadOptions, SvgUnsupportedDocumentKindError, type SvgWriteOptions, type TextBoxInit$2 as TextBoxInit, type UnifiedConversionOptions, UnrecognizedDocumentSchemaError, UnsupportedFontSourceFormatError, UnsupportedPackageFormatError, type WinAnsiSubstitution, type WordprocessingLayoutResult, type WritePdfOptions, XlsxBytesSchema, type XmlCdata, XmlCdataSchema, type XmlComment, XmlCommentSchema, type XmlDeclaration, XmlDeclarationSchema, type XmlElement, XmlElementSchema, type XmlNode, XmlNodeSchema, type XmlPart, XmlPartSchema, type XmlPi, XmlPiSchema, type XmlText, XmlTextSchema, applyMathVariant, attr, base64ToBytes, buildCsvText, buildDocumentBytes, buildDocxPackage, buildDrawingBlock, buildFormulaBlock, buildMarkdownText, buildOdgPackage, buildOdpPackage, buildOdsPackage, buildOdtPackage, buildOfficeMath, buildOfficeMathParagraph, buildPptxPackage, buildSvgText, buildXlsxPackage, buildXml, bytesToBase64, cellReference, childrenWithTag, collectOfficeMathElements, columnIndexToLetters, columnLettersToIndex, compactCodec, compactPackageCodec, contentDocumentWithSchema, convertDocument, convertDrawingToLayout, convertPresentationToLayout, convertSpreadsheetToLayout, convertWordprocessingToLayout, createDocumentFontRegistry, createDocx, createFontMeasurer, createFontRegistry, createLocalDocumentConverter, createMarkdownEditor, createOdg, createOdp, createOds, createOdt, createPdf, createPptx, createStandardFontMeasurer, csvMarkdownCodec, csvPdfCodec, csvToMarkdown, csvToOds, csvToPdf, csvToXlsx, decodeCompactPackage, decodeCsvText, decodeDocumentPackage, decodeEntities, decodeHsqldbCachedTables, decodeMarkdownText, decodeOdbPackage, decodePackage, decodeSvgText, deobfuscateEmbeddedFont, deriveFontKey, describeFontFace, detectGridLattice, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, docxPdfCodec, docxToMarkdown, docxToOdt, docxToPdf, docxToPptx, drawingOfBlock, elementChildren, elementLocalName, elementsWithTag, encodeCompactPackage, encodeCsvText, encodeDocumentPackage, encodeMarkdownText, encodePackage, encodeSvgText, evaluateRptBandOutsideData, evaluateSelect, extractOdfEmbeddedFonts, extractOoxmlEmbeddedFonts, extractSourceFonts, extractSourceFontsForFormat, firstChildByLocalName, fixedClock, flipY, formulaDocument, formulaOfBlock, formulaPlaceholderText, fromCompact, displayTextFor as hsqldbCellDisplayText, inferCellValue, inflateHsqldbCompressedScript, isCompactXmlNode, isContentBlock, isMathMlElement, isMathVariant, isXmlNode, latexToFormula, layoutDocumentFromPackage, layoutDocumentWithSchema, layoutFormula, lintMathCoherence, loadMathFont, localName, looksLikeSfnt, lowerLatex, lowerMarkdownMath, mapMathVariant, markdownDocxCodec, markdownOdtCodec, markdownPdfCodec, markdownToCsv, markdownToDocx, markdownToOdt, markdownToPdf, markdownToXlsx, textContent as mathMlTextContent, odbReportCommandSql, odbReportGroupChain, odbReportToDocx, odbReportToOdt, odbReportToPdf, odbTablesToSpreadsheetDocument, odbToCsv, odbToXlsx, odfToPdf, odgPdfCodec, odgSvgCodec, odgToPdf, odgToSvg, odmToPdf, odpPdfCodec, odpPptxCodec, odpToOdt, odpToPdf, odpToPptx, odsCsvCodec, odsPdfCodec, odsToCsv, odsToPdf, odsToXlsx, odsXlsxCodec, odtDocxCodec, odtPdfCodec, odtToDocx, odtToMarkdown, odtToOdp, odtToPdf, openDocx, openMarkdown, openOdg, openOdp, openOds, openOdt, openPdf, openPptx, operatorProperties, packageCodec, parseCellReference, parseHsqldbBinaryScript, parseHsqldbScript, parsePackage, parseRangeReference, parseRptFormula, parseSelect, parseXml, pdfCodec, pdfToCsv, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToSvg, pdfToXlsx, pptxPdfCodec, pptxToDocx, pptxToOdp, pptxToPdf, rangeReference, readCsvContent, readDocumentMetadata, readDocxContent, readDocxExtras, readFirebirdBackup, readMarkdownContent, readOdbForm, readOdbForms, readOdbInventory, readOdbReport, readOdbReportContent, readOdbReports, readOdbTables, readOdfEmbeddedFormula, readOdfFormulaContent, readOdgContent, readOdpContent, readOdsContent, readOdtContent, readOfficeMath, readPdf, readPptxContent, readSvgContent, readXlsxContent, reconstructDrawing, reconstructPresentation, reconstructSpreadsheet, reconstructWordprocessing, renderContentDocumentToMarkdown, renderOdbReportContent, resolveCompositionPlan, resolveMetadataTimestamps, resolveOdbComponent, resolveOdbReportRows, resolveRelationships, rgbHexToColor, rootElement, rptBandDefinition, rptDefinitionFromReport, runRptReport, schemaUriFor, serializePackage, setDocumentMetadata, svgPdfCodec, svgToOdg, svgToPdf, systemClock, textContent$1 as textContent, throwIfAborted, toCompact, tokenizeSql, unzipPackage, walk, writePdf, xlsxCsvCodec, xlsxMarkdownCodec, xlsxPdfCodec, xlsxToCsv, xlsxToMarkdown, xlsxToOds, xlsxToPdf, xmlCodec, zipPackage };
package/dist/index.d.ts CHANGED
@@ -77,6 +77,10 @@ import { MathDiagnostic, MathDiagnosticKind, MathLayoutResult } from "./mathml/l
77
77
  import { LayoutFormulaOptions, layoutFormula } from "./mathml/layout.js";
78
78
  import { OperatorProperties, operatorProperties } from "./mathml/operators.js";
79
79
  import { OmmlReadResult, collectOfficeMathElements, readOfficeMath } from "./omml/read.js";
80
+ import { a as MATH_LINT_CODES, i as LatexDiagnosticSink, n as LatexDiagnostic, o as MathLintCode, r as LatexDiagnosticCode, s as MathLintDiagnostic, t as LATEX_DIAGNOSTIC_CODES } from "./diagnostics-C5-bG09J.js";
81
+ import { LatexFormulaOptions, LatexFormulaResult, LatexLoweringResult, LowerLatexOptions, latexToFormula, lowerLatex } from "./latex/lower.js";
82
+ import { lintMathCoherence } from "./latex/lint.js";
83
+ import { MarkdownMathLoweringOptions, lowerMarkdownMath } from "./markdown/math.js";
80
84
  import { ReadDocxContentOptions, readDocxContent } from "./ooxml/docx/read.js";
81
85
  import { DocxExtras, readDocxExtras } from "./ooxml/docx/extras.js";
82
86
  import { readPptxContent } from "./ooxml/pptx/read.js";
@@ -124,4 +128,4 @@ import { Attribute, AttributeSchema, BinaryPart, BinaryPartSchema, Comment, Comm
124
128
  import { Alignment, Box, COLOR_BLACK, CONTENT_FORMAT_VERSION, CellPosition, CellRange, Color as LayoutColor, ContentBlock, ContentBlockSchema, ContentCellValue, ContentCellValueSchema, ContentDocument, ContentDocumentJson, ContentDocumentSchema, ContentDrawPage, ContentDrawPageSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentPageBreak, ContentPageBreakSchema, ContentParagraph, ContentParagraphSchema, ContentPathPoint, ContentPathPointSchema, ContentPathSegment, ContentPathSegmentSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStroke, ContentStrokeSchema, ContentSubpath, ContentSubpathSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, ContentVector, ContentVectorSchema, DEFAULT_LAYOUT_FONT, DocumentJsonResult, DocumentPackage, DocumentPackageJson, DocumentPackageSchema, DocumentSchemaKind, FontFace, LAYOUT_FORMAT_VERSION, LayoutDocument, LayoutDocumentJson, LayoutDocumentSchema, LayoutEllipse, LayoutFont, LayoutImage, LayoutImageAsset, LayoutItem, LayoutLine, LayoutLink, LayoutMetadata, LayoutPage, LayoutPath, LayoutPathSegment, LayoutRect, LayoutSubpath, LayoutText, Margins, MathAssembledGlyphs, MathBox, MathColor, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathRule, MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSize, PositionedFormula, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, UnrecognizedDocumentSchemaError, cellReference, columnIndexToLetters, columnLettersToIndex, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, isContentBlock, layoutDocumentWithSchema, parseCellReference, parseRangeReference, rangeReference, rgbHexToColor, schemaUriFor } from "document-schema.js";
125
129
  import { OdbComponentInfo, OdbConnectionInfo, OdbForm, OdbFormControl, OdbFormDefinition, OdbInventory, OdbQueryInfo, OdbReport, OdbReportBand, OdbReportElement, OdbReportFunction, OdbReportGroup, readOdbForm, readOdbInventory, readOdbReport, resolveOdbComponent } from "odf.js";
126
130
  import { FontFaceParseError, FontRegistry, FontRegistryOptions, FontSubstitution, LoadedMathFont, MathFont, MathFontDescriptorMetrics, NOOP_DIAGNOSTIC_SINK, PdfDiagnostic, PdfDiagnosticSeverity, PdfDiagnosticSink, PdfEncryptedError, PdfParseError, ProvidedFont, ReadPdfOptions, ResolvedFace, WinAnsiSubstitution, WritePdfOptions, createFontMeasurer, createFontRegistry, createStandardFontMeasurer, loadMathFont, pdfCodec, readFontFace as describeFontFace, readPdf, writePdf } from "pdf-codec";
127
- export { type Alignment, type Attribute, AttributeSchema, type BinaryPart, BinaryPartSchema, type Box, type BuildCsvTextOptions, type BuildDocxPackageOptions, type BuildOdgPackageOptions, type BuildOdpPackageOptions, type BuildOdsPackageOptions, type BuildOdtPackageOptions, type BuildPptxPackageOptions, type BuildSvgTextOptions, COLOR_BLACK, CONTENT_FORMAT_VERSION, type CellPosition, type CellRange, type CellTypeDeclineReason, type CellTypeInference, type CellTypeInferenceResult, type CellTypeInferenceSink, type CellTypeRule, type ClockPort, type Comment, CommentSchema, type CompactAttrPairs, type CompactPackage, CompactPackageSchema, type CompactPart, CompactPartSchema, type CompactXmlNode, CompactXmlNodeSchema, type CompositionHop, type ContentBlock, ContentBlockSchema, type ContentCellValue, ContentCellValueSchema, type ContentDocument, type ContentDocumentJson, ContentDocumentSchema, type ContentDrawPage, ContentDrawPageSchema, type ContentImageBlock, ContentImageBlockSchema, type ContentListMembership, type ContentPageBreak, ContentPageBreakSchema, type ContentParagraph, ContentParagraphSchema, type ContentPathPoint, ContentPathPointSchema, type ContentPathSegment, ContentPathSegmentSchema, type ContentRun, ContentRunSchema, type ContentSection, ContentSectionSchema, type ContentShape, ContentShapeSchema, type ContentSheet, type ContentSheetCell, ContentSheetCellSchema, type ContentSheetColumn, ContentSheetColumnSchema, type ContentSheetImage, type ContentSheetPrintRange, ContentSheetPrintRangeSchema, type ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, type ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, type ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, type ContentSlide, ContentSlideSchema, type ContentStroke, ContentStrokeSchema, type ContentSubpath, ContentSubpathSchema, type ContentTable, type ContentTableCell, ContentTableCellSchema, type ContentTableRow, ContentTableRowSchema, ContentTableSchema, type ContentVector, ContentVectorSchema, type ConversionOptions, type ConversionPlan, type ConversionRequest, type ConversionResult, type CreateDocxOptions, type CreateEmptyDocxPackageOptions, type CreateEmptyOdgPackageOptions, type CreateEmptyOdpPackageOptions, type CreateEmptyOdsPackageOptions, type CreateEmptyOdtPackageOptions, type CreateEmptyPptxPackageOptions, type CreateMarkdownEditorOptions, type CreateOdgOptions, type CreateOdpOptions, type CreateOdsOptions, type CreateOdtOptions, type CreatePdfOptions, type CreatePptxOptions, CsvBytesSchema, CsvInvalidUtf8Error, CsvParseError, type CsvReadOptions, CsvSheetNotFoundError, CsvSheetNotSpecifiedError, CsvUnsupportedDocumentKindError, type CsvWriteOptions, DEFAULT_LAYOUT_FONT, DOCUMENT_FORMATS, type DefinedName, DefinedNameSchema, type Diagnostic, type DocumentBridgeOptions, type DocumentConverter, type DocumentFontRegistryOptions, type DocumentFormat, DocumentFormatSchema, type DocumentJsonResult, type DocumentPackage, type DocumentPackageJson, DocumentPackageSchema, type DocumentPayload, type DocumentSchemaKind, type DocumentToPdfOptions, type DocxBody, DocxBytesSchema, DocxEditor, type DocxExtras, DocxParagraph, DocxRun, DocxTable, DocxTableCell, DocxTableRow, type DocxVerticalMerge, type DrawingLayoutOptions, type DrawingLayoutResult, type DrawingParagraphInit, type DrawingRunInit, type EngineLayoutOptions, SUPPORTED_BACKUP_FORMAT_VERSION as FIREBIRD_SUPPORTED_BACKUP_FORMAT_VERSION, FirebirdBackupFormatError, FirebirdBackupParseError, type FirebirdBackupSummary, FirebirdCompositeRecordUnsupportedError, FirebirdDataParseError, FirebirdSchemaParseError, FirebirdUnsupportedFieldTypeError, FontDeobfuscationError, type FontFace, FontFaceParseError, type FontRegistry, type FontRegistryOptions, type FontSourcePackage, type FontSubstitution, type Footnote, FootnoteSchema, type GridLattice, type HsqldbBinaryScript, HsqldbBinaryScriptParseError, type HsqldbColumn, type HsqldbDecodeOptions, HsqldbRowFormatError, HsqldbScriptParseError, HsqldbSqlEvaluationError, HsqldbSqlParseError, HsqldbSqlUnsupportedError, type HsqldbTable, LAYOUT_FORMAT_VERSION, type LayoutColor, type LayoutDocument, type LayoutDocumentJson, LayoutDocumentSchema, type LayoutEllipse, type LayoutFont, type LayoutFormulaOptions, type LayoutImage, type LayoutImageAsset, type LayoutItem, type LayoutLine, type LayoutLink, type LayoutMetadata, type LayoutPage, type LayoutPath, type LayoutPathSegment, type LayoutRect, type LayoutSubpath, type LayoutText, type LoadedMathFont, type Margins, type MarkdownBody, MarkdownBytesSchema, MarkdownEditor, MarkdownList, type MarkdownListInit, MarkdownParagraph, type ParagraphInit as MarkdownParagraphInit, type MarkdownRenderDiagnostic, type MarkdownRenderDiagnosticCode, MarkdownRenderDiagnosticCodes, type MarkdownRenderDiagnosticSeverity, type MarkdownRenderDiagnosticSink, MarkdownRun, type RunInit as MarkdownRunInit, MarkdownTable, MarkdownTableCell, type TableInit as MarkdownTableInit, MarkdownTableRow, type MathAssembledGlyphs, type MathBox, type MathColor, type MathDiagnostic, type MathDiagnosticKind, type MathFont, type MathFontDescriptorMetrics, type MathFontMetrics, type MathGlyphMetrics, type MathGlyphPlacement, type MathGlyphRun, type MathLayoutItem, type MathLayoutResult, type MathMlAttribute, type MathMlElement, type MathMlNode, type MathMlText, type MathRule, type MathStretchAxis, type MathStretchGlyph, type MathStretchResult, type MathStroke, type MathVariant, type MetadataOverrides, NOOP_DIAGNOSTIC_SINK, type NumberingDefinition, NumberingDefinitionSchema, type NumberingDefinitions, type NumberingLevel, NumberingLevelSchema, type OdbComponentInfo, type OdbConnectionInfo, type OdbConversionOptions, type OdbForm, type OdbFormControl, type OdbFormDefinition, type OdbInventory, OdbNoEmbeddedDataSourceError, type OdbQueryInfo, type OdbReport, type OdbReportBand, type OdbReportContentOptions, OdbReportDataSourceError, type OdbReportElement, type OdbReportFunction, type OdbReportGroup, OdbReportNotSpecifiedError, type OdbReportToDocxOptions, type OdbReportToOdtOptions, OdbTableNotFoundError, OdbTableNotSpecifiedError, type OdbToCsvOptions, type OdbUnsupportedFormat, OdbUnsupportedFormatError, OdfEmbeddedFontError, OdgBoxVector, type BoxVectorInit as OdgBoxVectorInit, OdgBytesSchema, OdgEditor, OdgLineVector, type LineVectorInit as OdgLineVectorInit, OdgPage, type PageImageInit as OdgPageImageInit, OdgPathVector, type PathVectorInit as OdgPathVectorInit, type TextBoxInit as OdgTextBoxInit, type OdgVector, type OdgVectorKind, type OdmToPdfOptions, OdmUnresolvedSectionError, OdpBytesSchema, OdpEditor, OdpShape, OdpSlide, type SlideImageInit as OdpSlideImageInit, type SlideTableInit as OdpSlideTableInit, type TextBoxInit$1 as OdpTextBoxInit, OdsBytesSchema, OdsCell, OdsEditor, OdsSheet, type OdtBody, OdtBytesSchema, OdtEditor, OdtList, OdtListItem, OdtParagraph, type ParagraphInit$1 as OdtParagraphInit, OdtRun, type RunInit$1 as OdtRunInit, OdtTable, OdtTableCell, type TableInit$1 as OdtTableInit, OdtTableRow, type OmmlDiagnostic, type OmmlDiagnosticKind, type OmmlReadResult, type OmmlWriteResult, OoxmlEmbeddedFontError, type OperatorProperties, PAGE_SIZE_A4, PAGE_SIZE_LETTER, type Package, PackageSchema, type PageInit, type PageSize, type Part, PartSchema, PdfBytesSchema, type PdfDiagnostic, type PdfDiagnosticSeverity, type PdfDiagnosticSink, PdfEditor, type PdfEllipseInit, PdfEllipseItem, PdfEncryptedError, type PdfImageInit, PdfImageItem, type PdfItem, type PdfLineInit, PdfLineItem, type PdfLinkInit, PdfLinkItem, PdfPage, PdfParseError, type PdfPathInit, PdfPathItem, type PdfRectInit, PdfRectItem, type PdfTextInit, PdfTextItem, type PdfToDocumentOptions, type PositionedFormula, PptxBytesSchema, PptxEditor, PptxShape, PptxSlide, PptxTable, PptxTableCell, type PptxTableInit, PptxTableRow, type PresentationLayoutResult, type ProvidedFont, type ReadCsvContentOptions, type ReadDocumentMetadataOptions, type ReadDocxContentOptions, type ReadFirebirdBackupResult, type ReadPdfOptions, type ReadSvgContentOptions, type ReconstructOptions, type Relationship, type RenderMarkdownOptions, type ResolvedFace, type RptAggregateFunction, type RptBandDefinition, type RptBandInstance, type RptBandKind, type RptFormula, RptFormulaEvaluationError, RptFormulaParseError, RptFormulaUnsupportedError, type RptGroupDefinition, type RptNamedFunctionDefinition, type RptReference, type RptReportDefinition, type RptReportRun, RptReportStructureError, type RptScope, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, SVG_DIAGNOSTIC_CODES, type SetDocumentMetadataOptions, type SheetsLayoutOptions, type SlideImageInit$1 as SlideImageInit, type SlideTableInit$1 as SlideTableInit, type SlidesLayoutOptions, type SpreadsheetLayoutResult, type SqlAggregateArgument, type SqlAggregateFunction, type SqlColumnRef, type SqlComparisonOperator, type SqlLiteral, type SqlNameRef, type SqlOperand, type SqlOrderByTerm, type SqlPredicate, type SqlPunctuation, type SqlResultSet, type SqlSelectItem, type SqlSelectStatement, type SqlSortDirection, type SqlToken, SvgBytesSchema, type SvgDiagnostic, type SvgDiagnosticCode, type SvgDiagnosticSink, SvgInvalidUtf8Error, SvgMissingRootElementError, SvgMultiPageNotSpecifiedError, SvgPageNotFoundError, type SvgReadOptions, SvgUnsupportedDocumentKindError, type SvgWriteOptions, type TextBoxInit$2 as TextBoxInit, type UnifiedConversionOptions, UnrecognizedDocumentSchemaError, UnsupportedFontSourceFormatError, UnsupportedPackageFormatError, type WinAnsiSubstitution, type WordprocessingLayoutResult, type WritePdfOptions, XlsxBytesSchema, type XmlCdata, XmlCdataSchema, type XmlComment, XmlCommentSchema, type XmlDeclaration, XmlDeclarationSchema, type XmlElement, XmlElementSchema, type XmlNode, XmlNodeSchema, type XmlPart, XmlPartSchema, type XmlPi, XmlPiSchema, type XmlText, XmlTextSchema, applyMathVariant, attr, base64ToBytes, buildCsvText, buildDocumentBytes, buildDocxPackage, buildDrawingBlock, buildFormulaBlock, buildMarkdownText, buildOdgPackage, buildOdpPackage, buildOdsPackage, buildOdtPackage, buildOfficeMath, buildOfficeMathParagraph, buildPptxPackage, buildSvgText, buildXlsxPackage, buildXml, bytesToBase64, cellReference, childrenWithTag, collectOfficeMathElements, columnIndexToLetters, columnLettersToIndex, compactCodec, compactPackageCodec, contentDocumentWithSchema, convertDocument, convertDrawingToLayout, convertPresentationToLayout, convertSpreadsheetToLayout, convertWordprocessingToLayout, createDocumentFontRegistry, createDocx, createFontMeasurer, createFontRegistry, createLocalDocumentConverter, createMarkdownEditor, createOdg, createOdp, createOds, createOdt, createPdf, createPptx, createStandardFontMeasurer, csvMarkdownCodec, csvPdfCodec, csvToMarkdown, csvToOds, csvToPdf, csvToXlsx, decodeCompactPackage, decodeCsvText, decodeDocumentPackage, decodeEntities, decodeHsqldbCachedTables, decodeMarkdownText, decodeOdbPackage, decodePackage, decodeSvgText, deobfuscateEmbeddedFont, deriveFontKey, describeFontFace, detectGridLattice, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, docxPdfCodec, docxToMarkdown, docxToOdt, docxToPdf, docxToPptx, drawingOfBlock, elementChildren, elementLocalName, elementsWithTag, encodeCompactPackage, encodeCsvText, encodeDocumentPackage, encodeMarkdownText, encodePackage, encodeSvgText, evaluateRptBandOutsideData, evaluateSelect, extractOdfEmbeddedFonts, extractOoxmlEmbeddedFonts, extractSourceFonts, extractSourceFontsForFormat, firstChildByLocalName, fixedClock, flipY, formulaDocument, formulaOfBlock, formulaPlaceholderText, fromCompact, displayTextFor as hsqldbCellDisplayText, inferCellValue, inflateHsqldbCompressedScript, isCompactXmlNode, isContentBlock, isMathMlElement, isMathVariant, isXmlNode, layoutDocumentFromPackage, layoutDocumentWithSchema, layoutFormula, loadMathFont, localName, looksLikeSfnt, mapMathVariant, markdownDocxCodec, markdownOdtCodec, markdownPdfCodec, markdownToCsv, markdownToDocx, markdownToOdt, markdownToPdf, markdownToXlsx, textContent as mathMlTextContent, odbReportCommandSql, odbReportGroupChain, odbReportToDocx, odbReportToOdt, odbReportToPdf, odbTablesToSpreadsheetDocument, odbToCsv, odbToXlsx, odfToPdf, odgPdfCodec, odgSvgCodec, odgToPdf, odgToSvg, odmToPdf, odpPdfCodec, odpPptxCodec, odpToOdt, odpToPdf, odpToPptx, odsCsvCodec, odsPdfCodec, odsToCsv, odsToPdf, odsToXlsx, odsXlsxCodec, odtDocxCodec, odtPdfCodec, odtToDocx, odtToMarkdown, odtToOdp, odtToPdf, openDocx, openMarkdown, openOdg, openOdp, openOds, openOdt, openPdf, openPptx, operatorProperties, packageCodec, parseCellReference, parseHsqldbBinaryScript, parseHsqldbScript, parsePackage, parseRangeReference, parseRptFormula, parseSelect, parseXml, pdfCodec, pdfToCsv, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToSvg, pdfToXlsx, pptxPdfCodec, pptxToDocx, pptxToOdp, pptxToPdf, rangeReference, readCsvContent, readDocumentMetadata, readDocxContent, readDocxExtras, readFirebirdBackup, readMarkdownContent, readOdbForm, readOdbForms, readOdbInventory, readOdbReport, readOdbReportContent, readOdbReports, readOdbTables, readOdfEmbeddedFormula, readOdfFormulaContent, readOdgContent, readOdpContent, readOdsContent, readOdtContent, readOfficeMath, readPdf, readPptxContent, readSvgContent, readXlsxContent, reconstructDrawing, reconstructPresentation, reconstructSpreadsheet, reconstructWordprocessing, renderContentDocumentToMarkdown, renderOdbReportContent, resolveCompositionPlan, resolveMetadataTimestamps, resolveOdbComponent, resolveOdbReportRows, resolveRelationships, rgbHexToColor, rootElement, rptBandDefinition, rptDefinitionFromReport, runRptReport, schemaUriFor, serializePackage, setDocumentMetadata, svgPdfCodec, svgToOdg, svgToPdf, systemClock, textContent$1 as textContent, throwIfAborted, toCompact, tokenizeSql, unzipPackage, walk, writePdf, xlsxCsvCodec, xlsxMarkdownCodec, xlsxPdfCodec, xlsxToCsv, xlsxToMarkdown, xlsxToOds, xlsxToPdf, xmlCodec, zipPackage };
131
+ export { type Alignment, type Attribute, AttributeSchema, type BinaryPart, BinaryPartSchema, type Box, type BuildCsvTextOptions, type BuildDocxPackageOptions, type BuildOdgPackageOptions, type BuildOdpPackageOptions, type BuildOdsPackageOptions, type BuildOdtPackageOptions, type BuildPptxPackageOptions, type BuildSvgTextOptions, COLOR_BLACK, CONTENT_FORMAT_VERSION, type CellPosition, type CellRange, type CellTypeDeclineReason, type CellTypeInference, type CellTypeInferenceResult, type CellTypeInferenceSink, type CellTypeRule, type ClockPort, type Comment, CommentSchema, type CompactAttrPairs, type CompactPackage, CompactPackageSchema, type CompactPart, CompactPartSchema, type CompactXmlNode, CompactXmlNodeSchema, type CompositionHop, type ContentBlock, ContentBlockSchema, type ContentCellValue, ContentCellValueSchema, type ContentDocument, type ContentDocumentJson, ContentDocumentSchema, type ContentDrawPage, ContentDrawPageSchema, type ContentImageBlock, ContentImageBlockSchema, type ContentListMembership, type ContentPageBreak, ContentPageBreakSchema, type ContentParagraph, ContentParagraphSchema, type ContentPathPoint, ContentPathPointSchema, type ContentPathSegment, ContentPathSegmentSchema, type ContentRun, ContentRunSchema, type ContentSection, ContentSectionSchema, type ContentShape, ContentShapeSchema, type ContentSheet, type ContentSheetCell, ContentSheetCellSchema, type ContentSheetColumn, ContentSheetColumnSchema, type ContentSheetImage, type ContentSheetPrintRange, ContentSheetPrintRangeSchema, type ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, type ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, type ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, type ContentSlide, ContentSlideSchema, type ContentStroke, ContentStrokeSchema, type ContentSubpath, ContentSubpathSchema, type ContentTable, type ContentTableCell, ContentTableCellSchema, type ContentTableRow, ContentTableRowSchema, ContentTableSchema, type ContentVector, ContentVectorSchema, type ConversionOptions, type ConversionPlan, type ConversionRequest, type ConversionResult, type CreateDocxOptions, type CreateEmptyDocxPackageOptions, type CreateEmptyOdgPackageOptions, type CreateEmptyOdpPackageOptions, type CreateEmptyOdsPackageOptions, type CreateEmptyOdtPackageOptions, type CreateEmptyPptxPackageOptions, type CreateMarkdownEditorOptions, type CreateOdgOptions, type CreateOdpOptions, type CreateOdsOptions, type CreateOdtOptions, type CreatePdfOptions, type CreatePptxOptions, CsvBytesSchema, CsvInvalidUtf8Error, CsvParseError, type CsvReadOptions, CsvSheetNotFoundError, CsvSheetNotSpecifiedError, CsvUnsupportedDocumentKindError, type CsvWriteOptions, DEFAULT_LAYOUT_FONT, DOCUMENT_FORMATS, type DefinedName, DefinedNameSchema, type Diagnostic, type DocumentBridgeOptions, type DocumentConverter, type DocumentFontRegistryOptions, type DocumentFormat, DocumentFormatSchema, type DocumentJsonResult, type DocumentPackage, type DocumentPackageJson, DocumentPackageSchema, type DocumentPayload, type DocumentSchemaKind, type DocumentToPdfOptions, type DocxBody, DocxBytesSchema, DocxEditor, type DocxExtras, DocxParagraph, DocxRun, DocxTable, DocxTableCell, DocxTableRow, type DocxVerticalMerge, type DrawingLayoutOptions, type DrawingLayoutResult, type DrawingParagraphInit, type DrawingRunInit, type EngineLayoutOptions, SUPPORTED_BACKUP_FORMAT_VERSION as FIREBIRD_SUPPORTED_BACKUP_FORMAT_VERSION, FirebirdBackupFormatError, FirebirdBackupParseError, type FirebirdBackupSummary, FirebirdCompositeRecordUnsupportedError, FirebirdDataParseError, FirebirdSchemaParseError, FirebirdUnsupportedFieldTypeError, FontDeobfuscationError, type FontFace, FontFaceParseError, type FontRegistry, type FontRegistryOptions, type FontSourcePackage, type FontSubstitution, type Footnote, FootnoteSchema, type GridLattice, type HsqldbBinaryScript, HsqldbBinaryScriptParseError, type HsqldbColumn, type HsqldbDecodeOptions, HsqldbRowFormatError, HsqldbScriptParseError, HsqldbSqlEvaluationError, HsqldbSqlParseError, HsqldbSqlUnsupportedError, type HsqldbTable, LATEX_DIAGNOSTIC_CODES, LAYOUT_FORMAT_VERSION, type LatexDiagnostic, type LatexDiagnosticCode, type LatexDiagnosticSink, type LatexFormulaOptions, type LatexFormulaResult, type LatexLoweringResult, type LayoutColor, type LayoutDocument, type LayoutDocumentJson, LayoutDocumentSchema, type LayoutEllipse, type LayoutFont, type LayoutFormulaOptions, type LayoutImage, type LayoutImageAsset, type LayoutItem, type LayoutLine, type LayoutLink, type LayoutMetadata, type LayoutPage, type LayoutPath, type LayoutPathSegment, type LayoutRect, type LayoutSubpath, type LayoutText, type LoadedMathFont, type LowerLatexOptions, MATH_LINT_CODES, type Margins, type MarkdownBody, MarkdownBytesSchema, MarkdownEditor, MarkdownList, type MarkdownListInit, type MarkdownMathLoweringOptions, MarkdownParagraph, type ParagraphInit as MarkdownParagraphInit, type MarkdownRenderDiagnostic, type MarkdownRenderDiagnosticCode, MarkdownRenderDiagnosticCodes, type MarkdownRenderDiagnosticSeverity, type MarkdownRenderDiagnosticSink, MarkdownRun, type RunInit as MarkdownRunInit, MarkdownTable, MarkdownTableCell, type TableInit as MarkdownTableInit, MarkdownTableRow, type MathAssembledGlyphs, type MathBox, type MathColor, type MathDiagnostic, type MathDiagnosticKind, type MathFont, type MathFontDescriptorMetrics, type MathFontMetrics, type MathGlyphMetrics, type MathGlyphPlacement, type MathGlyphRun, type MathLayoutItem, type MathLayoutResult, type MathLintCode, type MathLintDiagnostic, type MathMlAttribute, type MathMlElement, type MathMlNode, type MathMlText, type MathRule, type MathStretchAxis, type MathStretchGlyph, type MathStretchResult, type MathStroke, type MathVariant, type MetadataOverrides, NOOP_DIAGNOSTIC_SINK, type NumberingDefinition, NumberingDefinitionSchema, type NumberingDefinitions, type NumberingLevel, NumberingLevelSchema, type OdbComponentInfo, type OdbConnectionInfo, type OdbConversionOptions, type OdbForm, type OdbFormControl, type OdbFormDefinition, type OdbInventory, OdbNoEmbeddedDataSourceError, type OdbQueryInfo, type OdbReport, type OdbReportBand, type OdbReportContentOptions, OdbReportDataSourceError, type OdbReportElement, type OdbReportFunction, type OdbReportGroup, OdbReportNotSpecifiedError, type OdbReportToDocxOptions, type OdbReportToOdtOptions, OdbTableNotFoundError, OdbTableNotSpecifiedError, type OdbToCsvOptions, type OdbUnsupportedFormat, OdbUnsupportedFormatError, OdfEmbeddedFontError, OdgBoxVector, type BoxVectorInit as OdgBoxVectorInit, OdgBytesSchema, OdgEditor, OdgLineVector, type LineVectorInit as OdgLineVectorInit, OdgPage, type PageImageInit as OdgPageImageInit, OdgPathVector, type PathVectorInit as OdgPathVectorInit, type TextBoxInit as OdgTextBoxInit, type OdgVector, type OdgVectorKind, type OdmToPdfOptions, OdmUnresolvedSectionError, OdpBytesSchema, OdpEditor, OdpShape, OdpSlide, type SlideImageInit as OdpSlideImageInit, type SlideTableInit as OdpSlideTableInit, type TextBoxInit$1 as OdpTextBoxInit, OdsBytesSchema, OdsCell, OdsEditor, OdsSheet, type OdtBody, OdtBytesSchema, OdtEditor, OdtList, OdtListItem, OdtParagraph, type ParagraphInit$1 as OdtParagraphInit, OdtRun, type RunInit$1 as OdtRunInit, OdtTable, OdtTableCell, type TableInit$1 as OdtTableInit, OdtTableRow, type OmmlDiagnostic, type OmmlDiagnosticKind, type OmmlReadResult, type OmmlWriteResult, OoxmlEmbeddedFontError, type OperatorProperties, PAGE_SIZE_A4, PAGE_SIZE_LETTER, type Package, PackageSchema, type PageInit, type PageSize, type Part, PartSchema, PdfBytesSchema, type PdfDiagnostic, type PdfDiagnosticSeverity, type PdfDiagnosticSink, PdfEditor, type PdfEllipseInit, PdfEllipseItem, PdfEncryptedError, type PdfImageInit, PdfImageItem, type PdfItem, type PdfLineInit, PdfLineItem, type PdfLinkInit, PdfLinkItem, PdfPage, PdfParseError, type PdfPathInit, PdfPathItem, type PdfRectInit, PdfRectItem, type PdfTextInit, PdfTextItem, type PdfToDocumentOptions, type PositionedFormula, PptxBytesSchema, PptxEditor, PptxShape, PptxSlide, PptxTable, PptxTableCell, type PptxTableInit, PptxTableRow, type PresentationLayoutResult, type ProvidedFont, type ReadCsvContentOptions, type ReadDocumentMetadataOptions, type ReadDocxContentOptions, type ReadFirebirdBackupResult, type ReadPdfOptions, type ReadSvgContentOptions, type ReconstructOptions, type Relationship, type RenderMarkdownOptions, type ResolvedFace, type RptAggregateFunction, type RptBandDefinition, type RptBandInstance, type RptBandKind, type RptFormula, RptFormulaEvaluationError, RptFormulaParseError, RptFormulaUnsupportedError, type RptGroupDefinition, type RptNamedFunctionDefinition, type RptReference, type RptReportDefinition, type RptReportRun, RptReportStructureError, type RptScope, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, SVG_DIAGNOSTIC_CODES, type SetDocumentMetadataOptions, type SheetsLayoutOptions, type SlideImageInit$1 as SlideImageInit, type SlideTableInit$1 as SlideTableInit, type SlidesLayoutOptions, type SpreadsheetLayoutResult, type SqlAggregateArgument, type SqlAggregateFunction, type SqlColumnRef, type SqlComparisonOperator, type SqlLiteral, type SqlNameRef, type SqlOperand, type SqlOrderByTerm, type SqlPredicate, type SqlPunctuation, type SqlResultSet, type SqlSelectItem, type SqlSelectStatement, type SqlSortDirection, type SqlToken, SvgBytesSchema, type SvgDiagnostic, type SvgDiagnosticCode, type SvgDiagnosticSink, SvgInvalidUtf8Error, SvgMissingRootElementError, SvgMultiPageNotSpecifiedError, SvgPageNotFoundError, type SvgReadOptions, SvgUnsupportedDocumentKindError, type SvgWriteOptions, type TextBoxInit$2 as TextBoxInit, type UnifiedConversionOptions, UnrecognizedDocumentSchemaError, UnsupportedFontSourceFormatError, UnsupportedPackageFormatError, type WinAnsiSubstitution, type WordprocessingLayoutResult, type WritePdfOptions, XlsxBytesSchema, type XmlCdata, XmlCdataSchema, type XmlComment, XmlCommentSchema, type XmlDeclaration, XmlDeclarationSchema, type XmlElement, XmlElementSchema, type XmlNode, XmlNodeSchema, type XmlPart, XmlPartSchema, type XmlPi, XmlPiSchema, type XmlText, XmlTextSchema, applyMathVariant, attr, base64ToBytes, buildCsvText, buildDocumentBytes, buildDocxPackage, buildDrawingBlock, buildFormulaBlock, buildMarkdownText, buildOdgPackage, buildOdpPackage, buildOdsPackage, buildOdtPackage, buildOfficeMath, buildOfficeMathParagraph, buildPptxPackage, buildSvgText, buildXlsxPackage, buildXml, bytesToBase64, cellReference, childrenWithTag, collectOfficeMathElements, columnIndexToLetters, columnLettersToIndex, compactCodec, compactPackageCodec, contentDocumentWithSchema, convertDocument, convertDrawingToLayout, convertPresentationToLayout, convertSpreadsheetToLayout, convertWordprocessingToLayout, createDocumentFontRegistry, createDocx, createFontMeasurer, createFontRegistry, createLocalDocumentConverter, createMarkdownEditor, createOdg, createOdp, createOds, createOdt, createPdf, createPptx, createStandardFontMeasurer, csvMarkdownCodec, csvPdfCodec, csvToMarkdown, csvToOds, csvToPdf, csvToXlsx, decodeCompactPackage, decodeCsvText, decodeDocumentPackage, decodeEntities, decodeHsqldbCachedTables, decodeMarkdownText, decodeOdbPackage, decodePackage, decodeSvgText, deobfuscateEmbeddedFont, deriveFontKey, describeFontFace, detectGridLattice, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, docxPdfCodec, docxToMarkdown, docxToOdt, docxToPdf, docxToPptx, drawingOfBlock, elementChildren, elementLocalName, elementsWithTag, encodeCompactPackage, encodeCsvText, encodeDocumentPackage, encodeMarkdownText, encodePackage, encodeSvgText, evaluateRptBandOutsideData, evaluateSelect, extractOdfEmbeddedFonts, extractOoxmlEmbeddedFonts, extractSourceFonts, extractSourceFontsForFormat, firstChildByLocalName, fixedClock, flipY, formulaDocument, formulaOfBlock, formulaPlaceholderText, fromCompact, displayTextFor as hsqldbCellDisplayText, inferCellValue, inflateHsqldbCompressedScript, isCompactXmlNode, isContentBlock, isMathMlElement, isMathVariant, isXmlNode, latexToFormula, layoutDocumentFromPackage, layoutDocumentWithSchema, layoutFormula, lintMathCoherence, loadMathFont, localName, looksLikeSfnt, lowerLatex, lowerMarkdownMath, mapMathVariant, markdownDocxCodec, markdownOdtCodec, markdownPdfCodec, markdownToCsv, markdownToDocx, markdownToOdt, markdownToPdf, markdownToXlsx, textContent as mathMlTextContent, odbReportCommandSql, odbReportGroupChain, odbReportToDocx, odbReportToOdt, odbReportToPdf, odbTablesToSpreadsheetDocument, odbToCsv, odbToXlsx, odfToPdf, odgPdfCodec, odgSvgCodec, odgToPdf, odgToSvg, odmToPdf, odpPdfCodec, odpPptxCodec, odpToOdt, odpToPdf, odpToPptx, odsCsvCodec, odsPdfCodec, odsToCsv, odsToPdf, odsToXlsx, odsXlsxCodec, odtDocxCodec, odtPdfCodec, odtToDocx, odtToMarkdown, odtToOdp, odtToPdf, openDocx, openMarkdown, openOdg, openOdp, openOds, openOdt, openPdf, openPptx, operatorProperties, packageCodec, parseCellReference, parseHsqldbBinaryScript, parseHsqldbScript, parsePackage, parseRangeReference, parseRptFormula, parseSelect, parseXml, pdfCodec, pdfToCsv, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToSvg, pdfToXlsx, pptxPdfCodec, pptxToDocx, pptxToOdp, pptxToPdf, rangeReference, readCsvContent, readDocumentMetadata, readDocxContent, readDocxExtras, readFirebirdBackup, readMarkdownContent, readOdbForm, readOdbForms, readOdbInventory, readOdbReport, readOdbReportContent, readOdbReports, readOdbTables, readOdfEmbeddedFormula, readOdfFormulaContent, readOdgContent, readOdpContent, readOdsContent, readOdtContent, readOfficeMath, readPdf, readPptxContent, readSvgContent, readXlsxContent, reconstructDrawing, reconstructPresentation, reconstructSpreadsheet, reconstructWordprocessing, renderContentDocumentToMarkdown, renderOdbReportContent, resolveCompositionPlan, resolveMetadataTimestamps, resolveOdbComponent, resolveOdbReportRows, resolveRelationships, rgbHexToColor, rootElement, rptBandDefinition, rptDefinitionFromReport, runRptReport, schemaUriFor, serializePackage, setDocumentMetadata, svgPdfCodec, svgToOdg, svgToPdf, systemClock, textContent$1 as textContent, throwIfAborted, toCompact, tokenizeSql, unzipPackage, walk, writePdf, xlsxCsvCodec, xlsxMarkdownCodec, xlsxPdfCodec, xlsxToCsv, xlsxToMarkdown, xlsxToOds, xlsxToPdf, xmlCodec, zipPackage };
package/dist/index.js CHANGED
@@ -36,6 +36,8 @@ import { buildOdsPackage } from "./edit/ods/content.js";
36
36
  import { OdgPage } from "./edit/odg/page.js";
37
37
  import { OdgEditor, createOdg, openOdg } from "./edit/odg/editor.js";
38
38
  import { buildOdgPackage } from "./edit/odg/content.js";
39
+ import { latexToFormula, lowerLatex } from "./latex/lower.js";
40
+ import { lowerMarkdownMath } from "./markdown/math.js";
39
41
  import { readMarkdownContent } from "./markdown/read.js";
40
42
  import { buildMarkdownText } from "./markdown/write.js";
41
43
  import { MarkdownRun } from "./edit/markdown/run.js";
@@ -52,6 +54,8 @@ import { OoxmlEmbeddedFontError, extractOoxmlEmbeddedFonts } from "./fonts/ooxml
52
54
  import { createDocumentFontRegistry, extractSourceFonts } from "./fonts/registry.js";
53
55
  import { layoutFormula } from "./mathml/layout.js";
54
56
  import { collectOfficeMathElements, readOfficeMath } from "./omml/read.js";
57
+ import { LATEX_DIAGNOSTIC_CODES, MATH_LINT_CODES } from "./latex/diagnostics.js";
58
+ import { lintMathCoherence } from "./latex/lint.js";
55
59
  import { readDocxContent } from "./ooxml/docx/read.js";
56
60
  import { readDocxExtras } from "./ooxml/docx/extras.js";
57
61
  import { readPptxContent } from "./ooxml/pptx/read.js";
@@ -116,4 +120,4 @@ import { AttributeSchema, BinaryPartSchema, CommentSchema, CompactPackageSchema,
116
120
  import { COLOR_BLACK, CONTENT_FORMAT_VERSION, ContentBlockSchema, ContentCellValueSchema, ContentDocumentSchema, ContentDrawPageSchema, ContentImageBlockSchema, ContentPageBreakSchema, ContentParagraphSchema, ContentPathPointSchema, ContentPathSegmentSchema, ContentRunSchema, ContentSectionSchema, ContentShapeSchema, ContentSheetCellSchema, ContentSheetColumnSchema, ContentSheetPrintRangeSchema, ContentSheetPrintSettingsSchema, ContentSheetRepeatRangeSchema, ContentSheetRowSchema, ContentSheetSchema, ContentSlideSchema, ContentStrokeSchema, ContentSubpathSchema, ContentTableCellSchema, ContentTableRowSchema, ContentTableSchema, ContentVectorSchema, DEFAULT_LAYOUT_FONT, DocumentPackageSchema, LAYOUT_FORMAT_VERSION, LayoutDocumentSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, UnrecognizedDocumentSchemaError, cellReference, columnIndexToLetters, columnLettersToIndex, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, isContentBlock, layoutDocumentWithSchema, parseCellReference, parseRangeReference, rangeReference, rgbHexToColor, schemaUriFor } from "document-schema.js";
117
121
  import { readOdbForm, readOdbInventory, readOdbReport, resolveOdbComponent } from "odf.js";
118
122
  import { FontFaceParseError, NOOP_DIAGNOSTIC_SINK, PdfEncryptedError, PdfParseError, createFontMeasurer, createFontRegistry, createStandardFontMeasurer, loadMathFont, pdfCodec, readFontFace as describeFontFace, readPdf, writePdf } from "pdf-codec";
119
- export { AttributeSchema, BinaryPartSchema, COLOR_BLACK, CONTENT_FORMAT_VERSION, CommentSchema, CompactPackageSchema, CompactPartSchema, CompactXmlNodeSchema, ContentBlockSchema, ContentCellValueSchema, ContentDocumentSchema, ContentDrawPageSchema, ContentImageBlockSchema, ContentPageBreakSchema, ContentParagraphSchema, ContentPathPointSchema, ContentPathSegmentSchema, ContentRunSchema, ContentSectionSchema, ContentShapeSchema, ContentSheetCellSchema, ContentSheetColumnSchema, ContentSheetPrintRangeSchema, ContentSheetPrintSettingsSchema, ContentSheetRepeatRangeSchema, ContentSheetRowSchema, ContentSheetSchema, ContentSlideSchema, ContentStrokeSchema, ContentSubpathSchema, ContentTableCellSchema, ContentTableRowSchema, ContentTableSchema, ContentVectorSchema, CsvBytesSchema, CsvInvalidUtf8Error, CsvParseError, CsvSheetNotFoundError, CsvSheetNotSpecifiedError, CsvUnsupportedDocumentKindError, DEFAULT_LAYOUT_FONT, DOCUMENT_FORMATS, DefinedNameSchema, DocumentFormatSchema, DocumentPackageSchema, DocxBytesSchema, DocxEditor, DocxParagraph, DocxRun, DocxTable, DocxTableCell, DocxTableRow, SUPPORTED_BACKUP_FORMAT_VERSION as FIREBIRD_SUPPORTED_BACKUP_FORMAT_VERSION, FirebirdBackupFormatError, FirebirdBackupParseError, FirebirdCompositeRecordUnsupportedError, FirebirdDataParseError, FirebirdSchemaParseError, FirebirdUnsupportedFieldTypeError, FontDeobfuscationError, FontFaceParseError, FootnoteSchema, HsqldbBinaryScriptParseError, HsqldbRowFormatError, HsqldbScriptParseError, HsqldbSqlEvaluationError, HsqldbSqlParseError, HsqldbSqlUnsupportedError, LAYOUT_FORMAT_VERSION, LayoutDocumentSchema, MarkdownBytesSchema, MarkdownEditor, MarkdownList, MarkdownParagraph, MarkdownRenderDiagnosticCodes, MarkdownRun, MarkdownTable, MarkdownTableCell, MarkdownTableRow, NOOP_DIAGNOSTIC_SINK, NumberingDefinitionSchema, NumberingLevelSchema, OdbNoEmbeddedDataSourceError, OdbReportDataSourceError, OdbReportNotSpecifiedError, OdbTableNotFoundError, OdbTableNotSpecifiedError, OdbUnsupportedFormatError, OdfEmbeddedFontError, OdgBoxVector, OdgBytesSchema, OdgEditor, OdgLineVector, OdgPage, OdgPathVector, OdmUnresolvedSectionError, OdpBytesSchema, OdpEditor, OdpShape, OdpSlide, OdsBytesSchema, OdsCell, OdsEditor, OdsSheet, OdtBytesSchema, OdtEditor, OdtList, OdtListItem, OdtParagraph, OdtRun, OdtTable, OdtTableCell, OdtTableRow, OoxmlEmbeddedFontError, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PackageSchema, PartSchema, PdfBytesSchema, PdfEditor, PdfEllipseItem, PdfEncryptedError, PdfImageItem, PdfLineItem, PdfLinkItem, PdfPage, PdfParseError, PdfPathItem, PdfRectItem, PdfTextItem, PptxBytesSchema, PptxEditor, PptxShape, PptxSlide, PptxTable, PptxTableCell, PptxTableRow, RptFormulaEvaluationError, RptFormulaParseError, RptFormulaUnsupportedError, RptReportStructureError, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, SVG_DIAGNOSTIC_CODES, SvgBytesSchema, SvgInvalidUtf8Error, SvgMissingRootElementError, SvgMultiPageNotSpecifiedError, SvgPageNotFoundError, SvgUnsupportedDocumentKindError, UnrecognizedDocumentSchemaError, UnsupportedFontSourceFormatError, UnsupportedPackageFormatError, XlsxBytesSchema, XmlCdataSchema, XmlCommentSchema, XmlDeclarationSchema, XmlElementSchema, XmlNodeSchema, XmlPartSchema, XmlPiSchema, XmlTextSchema, applyMathVariant, attr, base64ToBytes, buildCsvText, buildDocumentBytes, buildDocxPackage, buildDrawingBlock, buildFormulaBlock, buildMarkdownText, buildOdgPackage, buildOdpPackage, buildOdsPackage, buildOdtPackage, buildOfficeMath, buildOfficeMathParagraph, buildPptxPackage, buildSvgText, buildXlsxPackage, buildXml, bytesToBase64, cellReference, childrenWithTag, collectOfficeMathElements, columnIndexToLetters, columnLettersToIndex, compactCodec, compactPackageCodec, contentDocumentWithSchema, convertDocument, convertDrawingToLayout, convertPresentationToLayout, convertSpreadsheetToLayout, convertWordprocessingToLayout, createDocumentFontRegistry, createDocx, createFontMeasurer, createFontRegistry, createLocalDocumentConverter, createMarkdownEditor, createOdg, createOdp, createOds, createOdt, createPdf, createPptx, createStandardFontMeasurer, csvMarkdownCodec, csvPdfCodec, csvToMarkdown, csvToOds, csvToPdf, csvToXlsx, decodeCompactPackage, decodeCsvText, decodeDocumentPackage, decodeEntities, decodeHsqldbCachedTables, decodeMarkdownText, decodeOdbPackage, decodePackage, decodeSvgText, deobfuscateEmbeddedFont, deriveFontKey, describeFontFace, detectGridLattice, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, docxPdfCodec, docxToMarkdown, docxToOdt, docxToPdf, docxToPptx, drawingOfBlock, elementChildren, elementLocalName, elementsWithTag, encodeCompactPackage, encodeCsvText, encodeDocumentPackage, encodeMarkdownText, encodePackage, encodeSvgText, evaluateRptBandOutsideData, evaluateSelect, extractOdfEmbeddedFonts, extractOoxmlEmbeddedFonts, extractSourceFonts, extractSourceFontsForFormat, firstChildByLocalName, fixedClock, flipY, formulaDocument, formulaOfBlock, formulaPlaceholderText, fromCompact, displayTextFor as hsqldbCellDisplayText, inferCellValue, inflateHsqldbCompressedScript, isCompactXmlNode, isContentBlock, isMathMlElement, isMathVariant, isXmlNode, layoutDocumentFromPackage, layoutDocumentWithSchema, layoutFormula, loadMathFont, localName, looksLikeSfnt, mapMathVariant, markdownDocxCodec, markdownOdtCodec, markdownPdfCodec, markdownToCsv, markdownToDocx, markdownToOdt, markdownToPdf, markdownToXlsx, textContent as mathMlTextContent, odbReportCommandSql, odbReportGroupChain, odbReportToDocx, odbReportToOdt, odbReportToPdf, odbTablesToSpreadsheetDocument, odbToCsv, odbToXlsx, odfToPdf, odgPdfCodec, odgSvgCodec, odgToPdf, odgToSvg, odmToPdf, odpPdfCodec, odpPptxCodec, odpToOdt, odpToPdf, odpToPptx, odsCsvCodec, odsPdfCodec, odsToCsv, odsToPdf, odsToXlsx, odsXlsxCodec, odtDocxCodec, odtPdfCodec, odtToDocx, odtToMarkdown, odtToOdp, odtToPdf, openDocx, openMarkdown, openOdg, openOdp, openOds, openOdt, openPdf, openPptx, operatorProperties, packageCodec, parseCellReference, parseHsqldbBinaryScript, parseHsqldbScript, parsePackage, parseRangeReference, parseRptFormula, parseSelect, parseXml, pdfCodec, pdfToCsv, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToSvg, pdfToXlsx, pptxPdfCodec, pptxToDocx, pptxToOdp, pptxToPdf, rangeReference, readCsvContent, readDocumentMetadata, readDocxContent, readDocxExtras, readFirebirdBackup, readMarkdownContent, readOdbForm, readOdbForms, readOdbInventory, readOdbReport, readOdbReportContent, readOdbReports, readOdbTables, readOdfEmbeddedFormula, readOdfFormulaContent, readOdgContent, readOdpContent, readOdsContent, readOdtContent, readOfficeMath, readPdf, readPptxContent, readSvgContent, readXlsxContent, reconstructDrawing, reconstructPresentation, reconstructSpreadsheet, reconstructWordprocessing, renderContentDocumentToMarkdown, renderOdbReportContent, resolveCompositionPlan, resolveMetadataTimestamps, resolveOdbComponent, resolveOdbReportRows, resolveRelationships, rgbHexToColor, rootElement, rptBandDefinition, rptDefinitionFromReport, runRptReport, schemaUriFor, serializePackage, setDocumentMetadata, svgPdfCodec, svgToOdg, svgToPdf, systemClock, textContent$1 as textContent, throwIfAborted, toCompact, tokenizeSql, unzipPackage, walk, writePdf, xlsxCsvCodec, xlsxMarkdownCodec, xlsxPdfCodec, xlsxToCsv, xlsxToMarkdown, xlsxToOds, xlsxToPdf, xmlCodec, zipPackage };
123
+ export { AttributeSchema, BinaryPartSchema, COLOR_BLACK, CONTENT_FORMAT_VERSION, CommentSchema, CompactPackageSchema, CompactPartSchema, CompactXmlNodeSchema, ContentBlockSchema, ContentCellValueSchema, ContentDocumentSchema, ContentDrawPageSchema, ContentImageBlockSchema, ContentPageBreakSchema, ContentParagraphSchema, ContentPathPointSchema, ContentPathSegmentSchema, ContentRunSchema, ContentSectionSchema, ContentShapeSchema, ContentSheetCellSchema, ContentSheetColumnSchema, ContentSheetPrintRangeSchema, ContentSheetPrintSettingsSchema, ContentSheetRepeatRangeSchema, ContentSheetRowSchema, ContentSheetSchema, ContentSlideSchema, ContentStrokeSchema, ContentSubpathSchema, ContentTableCellSchema, ContentTableRowSchema, ContentTableSchema, ContentVectorSchema, CsvBytesSchema, CsvInvalidUtf8Error, CsvParseError, CsvSheetNotFoundError, CsvSheetNotSpecifiedError, CsvUnsupportedDocumentKindError, DEFAULT_LAYOUT_FONT, DOCUMENT_FORMATS, DefinedNameSchema, DocumentFormatSchema, DocumentPackageSchema, DocxBytesSchema, DocxEditor, DocxParagraph, DocxRun, DocxTable, DocxTableCell, DocxTableRow, SUPPORTED_BACKUP_FORMAT_VERSION as FIREBIRD_SUPPORTED_BACKUP_FORMAT_VERSION, FirebirdBackupFormatError, FirebirdBackupParseError, FirebirdCompositeRecordUnsupportedError, FirebirdDataParseError, FirebirdSchemaParseError, FirebirdUnsupportedFieldTypeError, FontDeobfuscationError, FontFaceParseError, FootnoteSchema, HsqldbBinaryScriptParseError, HsqldbRowFormatError, HsqldbScriptParseError, HsqldbSqlEvaluationError, HsqldbSqlParseError, HsqldbSqlUnsupportedError, LATEX_DIAGNOSTIC_CODES, LAYOUT_FORMAT_VERSION, LayoutDocumentSchema, MATH_LINT_CODES, MarkdownBytesSchema, MarkdownEditor, MarkdownList, MarkdownParagraph, MarkdownRenderDiagnosticCodes, MarkdownRun, MarkdownTable, MarkdownTableCell, MarkdownTableRow, NOOP_DIAGNOSTIC_SINK, NumberingDefinitionSchema, NumberingLevelSchema, OdbNoEmbeddedDataSourceError, OdbReportDataSourceError, OdbReportNotSpecifiedError, OdbTableNotFoundError, OdbTableNotSpecifiedError, OdbUnsupportedFormatError, OdfEmbeddedFontError, OdgBoxVector, OdgBytesSchema, OdgEditor, OdgLineVector, OdgPage, OdgPathVector, OdmUnresolvedSectionError, OdpBytesSchema, OdpEditor, OdpShape, OdpSlide, OdsBytesSchema, OdsCell, OdsEditor, OdsSheet, OdtBytesSchema, OdtEditor, OdtList, OdtListItem, OdtParagraph, OdtRun, OdtTable, OdtTableCell, OdtTableRow, OoxmlEmbeddedFontError, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PackageSchema, PartSchema, PdfBytesSchema, PdfEditor, PdfEllipseItem, PdfEncryptedError, PdfImageItem, PdfLineItem, PdfLinkItem, PdfPage, PdfParseError, PdfPathItem, PdfRectItem, PdfTextItem, PptxBytesSchema, PptxEditor, PptxShape, PptxSlide, PptxTable, PptxTableCell, PptxTableRow, RptFormulaEvaluationError, RptFormulaParseError, RptFormulaUnsupportedError, RptReportStructureError, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, SVG_DIAGNOSTIC_CODES, SvgBytesSchema, SvgInvalidUtf8Error, SvgMissingRootElementError, SvgMultiPageNotSpecifiedError, SvgPageNotFoundError, SvgUnsupportedDocumentKindError, UnrecognizedDocumentSchemaError, UnsupportedFontSourceFormatError, UnsupportedPackageFormatError, XlsxBytesSchema, XmlCdataSchema, XmlCommentSchema, XmlDeclarationSchema, XmlElementSchema, XmlNodeSchema, XmlPartSchema, XmlPiSchema, XmlTextSchema, applyMathVariant, attr, base64ToBytes, buildCsvText, buildDocumentBytes, buildDocxPackage, buildDrawingBlock, buildFormulaBlock, buildMarkdownText, buildOdgPackage, buildOdpPackage, buildOdsPackage, buildOdtPackage, buildOfficeMath, buildOfficeMathParagraph, buildPptxPackage, buildSvgText, buildXlsxPackage, buildXml, bytesToBase64, cellReference, childrenWithTag, collectOfficeMathElements, columnIndexToLetters, columnLettersToIndex, compactCodec, compactPackageCodec, contentDocumentWithSchema, convertDocument, convertDrawingToLayout, convertPresentationToLayout, convertSpreadsheetToLayout, convertWordprocessingToLayout, createDocumentFontRegistry, createDocx, createFontMeasurer, createFontRegistry, createLocalDocumentConverter, createMarkdownEditor, createOdg, createOdp, createOds, createOdt, createPdf, createPptx, createStandardFontMeasurer, csvMarkdownCodec, csvPdfCodec, csvToMarkdown, csvToOds, csvToPdf, csvToXlsx, decodeCompactPackage, decodeCsvText, decodeDocumentPackage, decodeEntities, decodeHsqldbCachedTables, decodeMarkdownText, decodeOdbPackage, decodePackage, decodeSvgText, deobfuscateEmbeddedFont, deriveFontKey, describeFontFace, detectGridLattice, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, docxPdfCodec, docxToMarkdown, docxToOdt, docxToPdf, docxToPptx, drawingOfBlock, elementChildren, elementLocalName, elementsWithTag, encodeCompactPackage, encodeCsvText, encodeDocumentPackage, encodeMarkdownText, encodePackage, encodeSvgText, evaluateRptBandOutsideData, evaluateSelect, extractOdfEmbeddedFonts, extractOoxmlEmbeddedFonts, extractSourceFonts, extractSourceFontsForFormat, firstChildByLocalName, fixedClock, flipY, formulaDocument, formulaOfBlock, formulaPlaceholderText, fromCompact, displayTextFor as hsqldbCellDisplayText, inferCellValue, inflateHsqldbCompressedScript, isCompactXmlNode, isContentBlock, isMathMlElement, isMathVariant, isXmlNode, latexToFormula, layoutDocumentFromPackage, layoutDocumentWithSchema, layoutFormula, lintMathCoherence, loadMathFont, localName, looksLikeSfnt, lowerLatex, lowerMarkdownMath, mapMathVariant, markdownDocxCodec, markdownOdtCodec, markdownPdfCodec, markdownToCsv, markdownToDocx, markdownToOdt, markdownToPdf, markdownToXlsx, textContent as mathMlTextContent, odbReportCommandSql, odbReportGroupChain, odbReportToDocx, odbReportToOdt, odbReportToPdf, odbTablesToSpreadsheetDocument, odbToCsv, odbToXlsx, odfToPdf, odgPdfCodec, odgSvgCodec, odgToPdf, odgToSvg, odmToPdf, odpPdfCodec, odpPptxCodec, odpToOdt, odpToPdf, odpToPptx, odsCsvCodec, odsPdfCodec, odsToCsv, odsToPdf, odsToXlsx, odsXlsxCodec, odtDocxCodec, odtPdfCodec, odtToDocx, odtToMarkdown, odtToOdp, odtToPdf, openDocx, openMarkdown, openOdg, openOdp, openOds, openOdt, openPdf, openPptx, operatorProperties, packageCodec, parseCellReference, parseHsqldbBinaryScript, parseHsqldbScript, parsePackage, parseRangeReference, parseRptFormula, parseSelect, parseXml, pdfCodec, pdfToCsv, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToSvg, pdfToXlsx, pptxPdfCodec, pptxToDocx, pptxToOdp, pptxToPdf, rangeReference, readCsvContent, readDocumentMetadata, readDocxContent, readDocxExtras, readFirebirdBackup, readMarkdownContent, readOdbForm, readOdbForms, readOdbInventory, readOdbReport, readOdbReportContent, readOdbReports, readOdbTables, readOdfEmbeddedFormula, readOdfFormulaContent, readOdgContent, readOdpContent, readOdsContent, readOdtContent, readOfficeMath, readPdf, readPptxContent, readSvgContent, readXlsxContent, reconstructDrawing, reconstructPresentation, reconstructSpreadsheet, reconstructWordprocessing, renderContentDocumentToMarkdown, renderOdbReportContent, resolveCompositionPlan, resolveMetadataTimestamps, resolveOdbComponent, resolveOdbReportRows, resolveRelationships, rgbHexToColor, rootElement, rptBandDefinition, rptDefinitionFromReport, runRptReport, schemaUriFor, serializePackage, setDocumentMetadata, svgPdfCodec, svgToOdg, svgToPdf, systemClock, textContent$1 as textContent, throwIfAborted, toCompact, tokenizeSql, unzipPackage, walk, writePdf, xlsxCsvCodec, xlsxMarkdownCodec, xlsxPdfCodec, xlsxToCsv, xlsxToMarkdown, xlsxToOds, xlsxToPdf, xmlCodec, zipPackage };
@@ -0,0 +1,21 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region src/latex/diagnostics.ts
3
+ const LATEX_DIAGNOSTIC_CODES = [
4
+ "latex/parse-error",
5
+ "latex/construct-unparsed",
6
+ "latex/juxtaposition-unparsed",
7
+ "latex/text-unparsed",
8
+ "latex/subscript-unparsed",
9
+ "latex/binder-bound-implicit",
10
+ "latex/binder-bound-unreadable",
11
+ "latex/operator-unmapped",
12
+ "latex/script-base-unparsed",
13
+ "latex/array-environment-unparsed",
14
+ "latex/genfrac-unparsed",
15
+ "latex/operator-placement-unparsed",
16
+ "symbols/prose-definition-found"
17
+ ];
18
+ const MATH_LINT_CODES = ["math/coherence-divergence", "math/coherence-unparseable-presentation"];
19
+ //#endregion
20
+ exports.LATEX_DIAGNOSTIC_CODES = LATEX_DIAGNOSTIC_CODES;
21
+ exports.MATH_LINT_CODES = MATH_LINT_CODES;
@@ -0,0 +1,2 @@
1
+ import { a as MATH_LINT_CODES, i as LatexDiagnosticSink, n as LatexDiagnostic, o as MathLintCode, r as LatexDiagnosticCode, s as MathLintDiagnostic, t as LATEX_DIAGNOSTIC_CODES } from "../diagnostics-C5-bG09J.cjs";
2
+ export { LATEX_DIAGNOSTIC_CODES, LatexDiagnostic, LatexDiagnosticCode, LatexDiagnosticSink, MATH_LINT_CODES, MathLintCode, MathLintDiagnostic };
@@ -0,0 +1,2 @@
1
+ import { a as MATH_LINT_CODES, i as LatexDiagnosticSink, n as LatexDiagnostic, o as MathLintCode, r as LatexDiagnosticCode, s as MathLintDiagnostic, t as LATEX_DIAGNOSTIC_CODES } from "../diagnostics-C5-bG09J.js";
2
+ export { LATEX_DIAGNOSTIC_CODES, LatexDiagnostic, LatexDiagnosticCode, LatexDiagnosticSink, MATH_LINT_CODES, MathLintCode, MathLintDiagnostic };
@@ -0,0 +1,19 @@
1
+ //#region src/latex/diagnostics.ts
2
+ const LATEX_DIAGNOSTIC_CODES = [
3
+ "latex/parse-error",
4
+ "latex/construct-unparsed",
5
+ "latex/juxtaposition-unparsed",
6
+ "latex/text-unparsed",
7
+ "latex/subscript-unparsed",
8
+ "latex/binder-bound-implicit",
9
+ "latex/binder-bound-unreadable",
10
+ "latex/operator-unmapped",
11
+ "latex/script-base-unparsed",
12
+ "latex/array-environment-unparsed",
13
+ "latex/genfrac-unparsed",
14
+ "latex/operator-placement-unparsed",
15
+ "symbols/prose-definition-found"
16
+ ];
17
+ const MATH_LINT_CODES = ["math/coherence-divergence", "math/coherence-unparseable-presentation"];
18
+ //#endregion
19
+ export { LATEX_DIAGNOSTIC_CODES, MATH_LINT_CODES };
@@ -0,0 +1,82 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_latex_rational = require("./rational.cjs");
3
+ const require_latex_lower = require("./lower.cjs");
4
+ //#region src/latex/lint.ts
5
+ function isRecord(value) {
6
+ return typeof value === "object" && value !== null && !Array.isArray(value);
7
+ }
8
+ function canonical(value) {
9
+ if (Array.isArray(value)) return value.map(canonical);
10
+ if (!isRecord(value)) return value;
11
+ if (value.kind === "num" && typeof value.numerator === "string" && typeof value.denominator === "string") return {
12
+ kind: "num",
13
+ ...require_latex_rational.reduceRational(BigInt(value.numerator), BigInt(value.denominator))
14
+ };
15
+ const entries = Object.entries(value).map(([key, element]) => [key, canonical(element)]);
16
+ entries.sort(([left], [right]) => left < right ? -1 : left > right ? 1 : 0);
17
+ return Object.fromEntries(entries);
18
+ }
19
+ function expressionsAgree(left, right) {
20
+ return JSON.stringify(canonical(left)) === JSON.stringify(canonical(right));
21
+ }
22
+ function isUnparsedRoot(expression) {
23
+ return expression.kind === "unparsed";
24
+ }
25
+ function lintFormula(formula, locate, symbolEntries, warnings) {
26
+ const presentation = formula.presentation;
27
+ const content = formula.content;
28
+ if (presentation === void 0 || content === void 0) return;
29
+ const provenance = formula.provenance === void 0 ? void 0 : [formula.provenance.source, ...formula.provenance.editTrail].join(" -> ");
30
+ const relowered = require_latex_lower.lowerLatex(presentation.latex, { symbolEntries });
31
+ const detail = `${locate}: ${presentation.latex}`;
32
+ if (relowered.diagnostics.some((diagnostic) => diagnostic.code === "latex/parse-error")) {
33
+ if (!isUnparsedRoot(content)) warnings.push({
34
+ code: "math/coherence-unparseable-presentation",
35
+ severity: "warning",
36
+ ...provenance === void 0 ? {} : { provenance },
37
+ detail
38
+ });
39
+ return;
40
+ }
41
+ if (!expressionsAgree(relowered.expression, content)) warnings.push({
42
+ code: "math/coherence-divergence",
43
+ severity: "warning",
44
+ ...provenance === void 0 ? {} : { provenance },
45
+ detail
46
+ });
47
+ }
48
+ function collectBlockFormulas(blocks, locate, formulas) {
49
+ for (const [index, block] of blocks.entries()) {
50
+ if (block.kind === "embeddedObject" && block.objectKind === "formula" && block.document.kind === "formula") {
51
+ formulas.push({
52
+ formula: block.document.formula,
53
+ locate: `${locate}/blocks[${String(index)}]`
54
+ });
55
+ continue;
56
+ }
57
+ if (block.kind === "table") for (const [rowIndex, row] of block.rows.entries()) for (const [cellIndex, cell] of row.cells.entries()) collectBlockFormulas(cell.blocks, `${locate}/rows[${String(rowIndex)}].cells[${String(cellIndex)}]`, formulas);
58
+ }
59
+ }
60
+ function lintMathCoherence(pkg) {
61
+ const warnings = [];
62
+ const symbolEntries = pkg.content.symbolTable?.symbols;
63
+ const found = [];
64
+ const content = pkg.content;
65
+ if (content.kind === "formula") found.push({
66
+ formula: content.formula,
67
+ locate: "formula"
68
+ });
69
+ else if (content.kind === "wordprocessing") for (const [index, section] of content.sections.entries()) collectBlockFormulas(section.blocks, `sections[${String(index)}]`, found);
70
+ else if (content.kind === "presentation") for (const [slideIndex, slide] of content.slides.entries()) for (const [shapeIndex, shape] of slide.shapes.entries()) collectBlockFormulas(shape.blocks, `slides[${String(slideIndex)}].shapes[${String(shapeIndex)}]`, found);
71
+ else if (content.kind === "drawing") for (const [pageIndex, page] of content.pages.entries()) for (const [shapeIndex, shape] of page.shapes.entries()) collectBlockFormulas(shape.blocks, `pages[${String(pageIndex)}].shapes[${String(shapeIndex)}]`, found);
72
+ else if (content.kind === "spreadsheet") {
73
+ for (const [sheetIndex, sheet] of content.sheets.entries()) for (const [objectIndex, object] of (sheet.embeddedObjects ?? []).entries()) if (object.objectKind === "formula" && object.document.kind === "formula") found.push({
74
+ formula: object.document.formula,
75
+ locate: `sheets[${String(sheetIndex)}].embeddedObjects[${String(objectIndex)}]`
76
+ });
77
+ }
78
+ for (const { formula, locate } of found) lintFormula(formula, locate, symbolEntries, warnings);
79
+ return warnings;
80
+ }
81
+ //#endregion
82
+ exports.lintMathCoherence = lintMathCoherence;
@@ -0,0 +1,6 @@
1
+ import { s as MathLintDiagnostic } from "../diagnostics-C5-bG09J.cjs";
2
+ import { DocumentPackage } from "document-schema.js";
3
+ //#region src/latex/lint.d.ts
4
+ declare function lintMathCoherence(pkg: DocumentPackage): readonly MathLintDiagnostic[];
5
+ //#endregion
6
+ export { lintMathCoherence };
@@ -0,0 +1,6 @@
1
+ import { s as MathLintDiagnostic } from "../diagnostics-C5-bG09J.js";
2
+ import { DocumentPackage } from "document-schema.js";
3
+ //#region src/latex/lint.d.ts
4
+ declare function lintMathCoherence(pkg: DocumentPackage): readonly MathLintDiagnostic[];
5
+ //#endregion
6
+ export { lintMathCoherence };