js.documents 5.0.2 → 6.0.0
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.
- package/README.md +26 -26
- package/dist/convert/composition-to-pdf.cjs +2 -2
- package/dist/convert/composition-to-pdf.js +3 -3
- package/dist/convert/composition.cjs +2 -2
- package/dist/convert/composition.d.cts +2 -2
- package/dist/convert/composition.d.ts +2 -2
- package/dist/convert/composition.js +3 -3
- package/dist/convert/convert.cjs +4 -4
- package/dist/convert/convert.d.cts +4 -4
- package/dist/convert/convert.d.ts +4 -4
- package/dist/convert/convert.js +5 -5
- package/dist/convert/from-package.cjs +4 -4
- package/dist/convert/from-package.d.cts +3 -3
- package/dist/convert/from-package.d.ts +3 -3
- package/dist/convert/from-package.js +5 -5
- package/dist/convert/from-pdf.d.cts +2 -2
- package/dist/convert/from-pdf.d.ts +2 -2
- package/dist/convert/pdf-package-tables.d.cts +2 -2
- package/dist/convert/pdf-package-tables.d.ts +2 -2
- package/dist/convert/port.d.cts +2 -2
- package/dist/convert/port.d.ts +2 -2
- package/dist/index.cjs +6 -6
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/latex/lint.cjs +1 -1
- package/dist/latex/lint.d.cts +2 -2
- package/dist/latex/lint.d.ts +2 -2
- package/dist/latex/lint.js +2 -2
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://github.com/ExaDev/documents.js/tree/main/packages/documents.js) [](https://www.npmjs.com/package/documents.js) [](https://www.npmjs.com/package/documents.js) [](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 shared `ContentDocument` model (reported to callers as the tree-form `
|
|
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 shared `ContentDocument` model (reported to callers as the tree-form `DocumentTree`), with PDF — reached through pdf-codec's own `LayoutDocument` view — 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](../ooxml.js/README.md), [odf.js](../odf.js/README.md), [pdf-codec](../pdf-codec/README.md), [markdown-codec](../markdown-codec/README.md), and [document-schema.js](../document-schema.js/README.md).
|
|
6
6
|
|
|
7
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
|
|
|
@@ -60,7 +60,7 @@ Requires Node.js `>=20` and pnpm `11.6.0` (pinned via `packageManager` in `packa
|
|
|
60
60
|
pnpm install
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
Install as a dependency in another project. The package boundary transform (`
|
|
63
|
+
Install as a dependency in another project. The package boundary transform (`assembleTree`/`decompose`/`flattenTree`/`factorStyles`) lives in `document-schema.js`, so a caller using it needs that package installed too, matching the major `documents.js` itself depends on (`^4`) — a different major hands back a `DocumentTree` from one package's barrel and a transform from an incompatible copy, with no resolution error to catch the mismatch:
|
|
64
64
|
|
|
65
65
|
```sh
|
|
66
66
|
pnpm add documents.js document-schema.js
|
|
@@ -161,7 +161,7 @@ const { document, diagnostics } = await converter.convert(
|
|
|
161
161
|
|
|
162
162
|
`DocumentFormat` includes `docx`/`pptx`/`xlsx`/`odt`/`odp`/`ods`/`odg`/`svg`/`odf`/`csv`/`markdown`/`pdf` — twelve members. The port's `conversions` list is derived from `resolveCompositionPlan` plus the `odf`→`pdf` special case — 111 pairs total. `DocumentFormat` is inferred from `DocumentFormatSchema` (a real Zod schema); `DOCUMENT_FORMATS` is exported as a plain array derived from the same schema:
|
|
163
163
|
|
|
164
|
-
The port also exposes `contractVersion: number`, bumped only when `DocumentConverter`'s own contract shape changes — a new field on `ConversionResult` a caller might need to branch on, or a new `ConversionOptions` field an implementation is now expected to honour — never when the `conversions` table simply grows with more supported source/target pairs (that's discoverable at runtime via `conversions` itself). It is currently `7`: the bump from `6` reflects `ConversionResult.package` changing type to the tree-form `
|
|
164
|
+
The port also exposes `contractVersion: number`, bumped only when `DocumentConverter`'s own contract shape changes — a new field on `ConversionResult` a caller might need to branch on, or a new `ConversionOptions` field an implementation is now expected to honour — never when the `conversions` table simply grows with more supported source/target pairs (that's discoverable at runtime via `conversions` itself). It is currently `7`: the bump from `6` reflects `ConversionResult.package` changing type to the tree-form `DocumentTree` described below, which a caller reading that field must now flatten rather than read directly.
|
|
165
165
|
|
|
166
166
|
```ts
|
|
167
167
|
import { DOCUMENT_FORMATS, DocumentFormatSchema } from 'documents.js';
|
|
@@ -170,52 +170,52 @@ console.log(DOCUMENT_FORMATS); // ['docx', 'pptx', 'xlsx', 'odt', 'odp', 'ods',
|
|
|
170
170
|
DocumentFormatSchema.parse(userSuppliedFormat); // throws a ZodError for anything outside that list
|
|
171
171
|
```
|
|
172
172
|
|
|
173
|
-
### Intermediate `
|
|
173
|
+
### Intermediate `DocumentTree`, JSON, and bytes
|
|
174
174
|
|
|
175
|
-
Every conversion function accepts an `onDocument` callback receiving the intermediate `
|
|
175
|
+
Every conversion function accepts an `onDocument` callback receiving the intermediate `DocumentTree` — since document-schema.js 4, the single hierarchical tree: `children` carry the decomposed group tree (one group per container — a section, slide, sheet, or draw page — with heading and list paragraphs anchoring nested groups inside their container's flow), and the content nodes embedded in that tree carry `frames`, the rendered page positions the layout pass stamped onto them, in PDF user-space. `pages` (each rendered page's size, indexed to match every `frames[].pageIndex`) and the minted `styles` table ride the root. The port surfaces the same value as `package` on `ConversionResult`. For PDF-bypassing bridges, `pkg.pages` is always `undefined` and no node carries frames — no layout pass ran.
|
|
176
176
|
|
|
177
177
|
```ts
|
|
178
|
-
import {
|
|
178
|
+
import { flattenTree } from 'document-schema.js';
|
|
179
179
|
import { docxToPdf } from 'documents.js';
|
|
180
180
|
|
|
181
181
|
const pdfBytes = docxToPdf(docxBytes, {
|
|
182
182
|
onDocument: (pkg) => {
|
|
183
183
|
console.log(pkg.kind); // 'wordprocessing' -- the document kind rides the tree's root
|
|
184
184
|
console.log(pkg.pages?.length); // populated for every X-to-PDF/PDF-to-X conversion
|
|
185
|
-
const content =
|
|
185
|
+
const content = flattenTree(pkg); // the flat ContentDocument, fully materialised
|
|
186
186
|
const block = content.kind === 'wordprocessing' ? content.sections[0]?.blocks[0] : undefined;
|
|
187
187
|
console.log(block?.kind === 'paragraph' ? block.runs[0]?.frames : 'no paragraph'); // that run's rendered placements
|
|
188
188
|
},
|
|
189
189
|
});
|
|
190
190
|
```
|
|
191
191
|
|
|
192
|
-
The tree and the flat `ContentDocument` are one format in two encodings, related by three laws (stated on [document-schema.js#20](https://github.com/ExaDev/document-schema.js/issues/20), proven over this package's real corpus by the bijection suite in `src/convert/bijection.test.ts`): (i) `
|
|
192
|
+
The tree and the flat `ContentDocument` are one format in two encodings, related by three laws (stated on [document-schema.js#20](https://github.com/ExaDev/document-schema.js/issues/20), proven over this package's real corpus by the bijection suite in `src/convert/bijection.test.ts`): (i) `flattenTree(assembleTree(c))` reproduces `c` exactly, up to one declared normalisation (a present-but-empty sheet `embeddedObjects` array normalises to the field absent); (ii) effective-property equality holds universally — a factored and an unfactored serialisation of one document resolve to the same properties; (iii) minting is idempotent — factoring a second time produces the identical styles table.
|
|
193
193
|
|
|
194
|
-
Three flat-form signals drive the grouping, and all three are reproduced exactly on the way back: `headingLevel`, `list.level`, and — since document-schema.js 4.2.0 — the `constructStart`/`constructEnd` block pair that delimits a fidelity construct (a docx SDT, an ODF field, a tracked-change span, a bookmark, a hyperlink region, a division). `decompose` promotes each marker pair to a construct group carrying the `ConstructDescriptor` and holding the delimited region as its children, decomposed on its own; `
|
|
194
|
+
Three flat-form signals drive the grouping, and all three are reproduced exactly on the way back: `headingLevel`, `list.level`, and — since document-schema.js 4.2.0 — the `constructStart`/`constructEnd` block pair that delimits a fidelity construct (a docx SDT, an ODF field, a tracked-change span, a bookmark, a hyperlink region, a division). `decompose` promotes each marker pair to a construct group carrying the `ConstructDescriptor` and holding the delimited region as its children, decomposed on its own; `flattenTree` writes the pair back around that region. A construct is a semantic wrapper rather than a container, so it neither disturbs the enclosing heading/list nesting it sits inside nor resets the style chain resolving onto it — content inside a construct still inherits the ambient heading's or section's factored properties, exactly as if the construct were not there. Markers must pair up within one container's block flow: an unmatched `constructEnd`, or a `constructStart` a container never closes, throws document-schema.js's `ConstructMarkerImbalanceError` (carrying its `ConstructMarkerImbalance` payload, so the offending block index is available without parsing the message) rather than being repaired into a plausible tree. The format codecs do not emit markers yet — construct extraction per format is tracked separately on [document-schema.js#22](https://github.com/ExaDev/document-schema.js/issues/22) — but the decompose/flatten boundary itself handles them today, so a caller hand-building marker content needs no change at that boundary specifically. Reaching further than the boundary is a mixed picture, not a blanket guarantee: `buildMarkdownText` passes markers through to markdown-codec's own bracket-resolving writer, which renders each construct it has a markdown spelling for (a footnote definition, a blockquote division, a titled image's link wrapper) and renders the rest transparently with a diagnostic — markdown-codec's own read side emits those pairs, so this package's editor and conversion round trips depend on it; building docx/odt bytes back from marker-carrying flat content silently drops the markers, since neither builder reads or writes them yet; and the layout engines (`convertWordprocessingToLayout`, `convertShape`) silently skip a marker block during pagination — harmless there, since a marker carries no content of its own to render.
|
|
195
195
|
|
|
196
|
-
`
|
|
196
|
+
`assembleTree` is the one constructor behind every construction site — decompose, then `factorStyles`, the minting pass that hoists property tuples occurring two or more times onto a group-wrapper ref plus a `styles` table entry (deterministic order; `frames`/`sourcePath`/`styleId` are per-node facts and never factor). The transform belongs to `document-schema.js`, which owns both encodings and publishes `assembleTree`, `decompose`, `flattenTree`, `factorStyles`, `ConstructMarkerImbalanceError`, and the `TreeChildren` type for any caller composing its own boundary — import them from there, not from this package. documents.js consumes that transform at its own boundary and re-exports none of it; the readers, builders, layout engines, and editors here keep producing and consuming the flat form, so the tree exists only where a `DocumentTree` is constructed or consumed:
|
|
197
197
|
|
|
198
198
|
```ts
|
|
199
|
-
import {
|
|
199
|
+
import { assembleTree, decompose, factorStyles, flattenTree } from 'document-schema.js';
|
|
200
200
|
|
|
201
|
-
const tree =
|
|
202
|
-
const flat =
|
|
201
|
+
const tree = assembleTree(content, pages); // decompose + mint: the tree a conversion reports
|
|
202
|
+
const flat = flattenTree(tree); // the exact flat ContentDocument back, refs materialised
|
|
203
203
|
const again = factorStyles(tree); // re-mint: identical table and tree (law iii)
|
|
204
204
|
```
|
|
205
205
|
|
|
206
|
-
`
|
|
206
|
+
`documentTreeWithSchema`/`documentFromJson` turn a `DocumentTree` into self-describing JSON and back (re-exported from `document-schema.js`); the version-pinned `$schema` URI the dumper stamps is the package's version — the hand-kept `formatVersion` integer is gone:
|
|
207
207
|
|
|
208
208
|
```ts
|
|
209
|
-
import { documentFromJson,
|
|
209
|
+
import { documentFromJson, documentTreeWithSchema } from 'documents.js';
|
|
210
210
|
|
|
211
|
-
const tagged =
|
|
211
|
+
const tagged = documentTreeWithSchema(pkg);
|
|
212
212
|
writeFileSync('converted.doc.json', JSON.stringify(tagged, null, 2));
|
|
213
213
|
|
|
214
214
|
const { kind, value } = documentFromJson(JSON.parse(readFileSync('converted.doc.json', 'utf8')));
|
|
215
|
-
// kind: '
|
|
215
|
+
// kind: 'DocumentTree' (here) | 'ContentDocument'
|
|
216
216
|
```
|
|
217
217
|
|
|
218
|
-
`buildDocumentBytes` rebuilds any `DocumentFormat`'s bytes from a tree-form `
|
|
218
|
+
`buildDocumentBytes` rebuilds any `DocumentFormat`'s bytes from a tree-form `DocumentTree` — it flattens once at the boundary and hands the flat form to the builders, whose signatures never changed. `'pdf'` rebuilds the pdf-codec view from the package's own frames+pages (`layoutDocumentFromPackage`, a mechanical inverse walking the flattened content and emitting `LayoutItem`s from each node's recorded placements; throwing if the package carries no `pages`), `'odf'` has no builder and throws, everything else rebuilds from the flattened `ContentDocument`. `layoutDocumentFromPackage` is exported too, for a caller wanting the rebuilt `LayoutDocument` without writing bytes. Two honest limits on the pdf rebuild, both structural properties of what a package records: a run's frames carry positions, not the wrap decisions that distributed its text across them, so a wrapped run re-renders once, whole, at its first recorded placement; and no font registry or positioned formula survives a bare package (a formula block's frame records where it sat while its glyphs render as nothing):
|
|
219
219
|
|
|
220
220
|
```ts
|
|
221
221
|
import { buildDocumentBytes, docxToPdf } from 'documents.js';
|
|
@@ -264,7 +264,7 @@ It carries the ten `pdfTo*` conversions, `PdfToDocumentOptions`, and `readDocume
|
|
|
264
264
|
|
|
265
265
|
### Reading and building xlsx content directly
|
|
266
266
|
|
|
267
|
-
Every other content format has its own standalone `readXContent`-shaped entry point (`readDocxContent`, `readPptxContent`, `readOdtContent`, `readOdpContent`, `readOdsContent`, `readOdgContent`) — xlsx is no longer the exception. `readXlsxContent`/`buildXlsxPackage` are this package's names for `ooxml.js`'s own spreadsheet `ContentDocument` read/build pair — the same one the `ods⇄xlsx` bridge and every xlsx metadata-rebuild path already use internally — re-exported here directly rather than wrapped, since `readXlsxContent` already produces the right shape on its own. (Since `ooxml.js` 4.0.0 the upstream flat builder is named `buildXlsxPackageFromContent` — the bare `buildXlsxPackage` name moved to that package's tree-form `
|
|
267
|
+
Every other content format has its own standalone `readXContent`-shaped entry point (`readDocxContent`, `readPptxContent`, `readOdtContent`, `readOdpContent`, `readOdsContent`, `readOdgContent`) — xlsx is no longer the exception. `readXlsxContent`/`buildXlsxPackage` are this package's names for `ooxml.js`'s own spreadsheet `ContentDocument` read/build pair — the same one the `ods⇄xlsx` bridge and every xlsx metadata-rebuild path already use internally — re-exported here directly rather than wrapped, since `readXlsxContent` already produces the right shape on its own. (Since `ooxml.js` 4.0.0 the upstream flat builder is named `buildXlsxPackageFromContent` — the bare `buildXlsxPackage` name moved to that package's tree-form `DocumentTree` builder — so this package re-exports the flat builder under its own long-standing `buildXlsxPackage` name and the `ContentDocument`-in/`Package`-out contract is unchanged.) csv's `readCsvContent`/`buildCsvText` are the same kind of directly-exported stage pair, one level further in: they operate on RFC 4180 text rather than a decoded package (see `src/csv/` under Architecture). svg's `readSvgContent`/`buildSvgText` are the drawing-variant counterpart of csv's pair, operating on SVG text rather than a decoded package (see `src/svg/` under Architecture).
|
|
268
268
|
|
|
269
269
|
```ts
|
|
270
270
|
import { buildXlsxPackage, decodeDocumentPackage, encodeDocumentPackage, readXlsxContent } from 'documents.js';
|
|
@@ -560,7 +560,7 @@ const { family, bold, italic } = describeFontFace(fontBytes, 'BrandSans-Regular.
|
|
|
560
560
|
|
|
561
561
|
The package is layered from generic primitives outward to the two conversion directions:
|
|
562
562
|
|
|
563
|
-
- **`src/model/`** — thin additions on top of `document-schema.js`, which owns the content model (`ContentDocument`, and since 4.0.0 the tree-form `
|
|
563
|
+
- **`src/model/`** — thin additions on top of `document-schema.js`, which owns the content model (`ContentDocument`, and since 4.0.0 the tree-form `DocumentTree` vocabulary) imported, not defined here; the `LayoutDocument` item family is pdf-codec's own since the schema-4 demotion. Local: `bytes.ts` (magic-byte schemas), `units.ts` (EMU/twip/point conversions), `geometry.ts`/`color.ts`/`style.ts` (thin re-exports plus PDF-specific `flipY`), `paint-order.ts` (merges drawing page `shapes`/`vectors` by `paintOrder`), `formula.ts` (helpers around `ContentFormula`), `embedded-drawing.ts` (packages recovered vectors as a `ContentEmbeddedObjectBlock`).
|
|
564
564
|
- **`pdf-codec`** (external) — the hand-written PDF codec, plus generic byte/image primitives (now in `byte-codec`). See that package's own README.
|
|
565
565
|
- **`src/ports/`** — injectable ports: `throwIfAborted` (signal check at long-loop boundaries) and `ClockPort`/`systemClock`/`fixedClock` (injectable "now" for deterministic output — exported but not yet consumed by any conversion path).
|
|
566
566
|
- **`src/xml/`** and **`src/opc/`** — parent-aware XML query/mutation and OPC package mechanics over `ooxml.js`'s `Package`/`XmlNode`. `src/xml/odf-text.ts` holds `encodeOdfText`/`decodeOdfText` — see the ODF text gotcha below.
|
|
@@ -572,14 +572,14 @@ The package is layered from generic primitives outward to the two conversion dir
|
|
|
572
572
|
- **`src/ooxml/`** — thin adapters over `ooxml.js`'s own flat `readDocxContent`/`readPptxContent` readers, 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/header-footer parts, section header/footer references, and numbering.
|
|
573
573
|
- **`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).
|
|
574
574
|
- **`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).
|
|
575
|
-
- **`src/markdown/`** — third adapter family, via `markdown-codec`. `readMarkdownContent` passes `readMarkdownContent`'s (markdown-codec's flat reader, so named since that package's 4.0.0; the bare `readMarkdown` name is now its tree-form `
|
|
575
|
+
- **`src/markdown/`** — third adapter family, via `markdown-codec`. `readMarkdownContent` passes `readMarkdownContent`'s (markdown-codec's flat reader, so named since that package's 4.0.0; the bare `readMarkdown` name is now its tree-form `DocumentTree` reader) 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 `writeMarkdownContent`, 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`.
|
|
576
576
|
- **`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.
|
|
577
577
|
- **`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.
|
|
578
578
|
- **`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; plus the PDF construct surfacing — link reconciliation to `ContentRun.hyperlink` or link constructs, hidden-layer content dropped, anchor/comment and AcroForm contentControl constructs, and tagged-structure semantics where the file states them: heading levels from owning `H1`..`H6` elements over the font-size census, lattice-free table recovery from `/Table`/`/TR`/`/TH`/`/TD` ownership, and `division` constructs around `/Part`/`/Sect`/`/Div` extents).
|
|
579
579
|
- **`src/hsqldb/`** — `.odb` decoders, four tiers: `script.ts` (TEXT-script DDL/DML parser), `rowformat.ts`/`cache.ts` (CACHED binary row-store), `binary-script.ts` (BINARY/COMPRESSED whole-script). All import only `document-schema.js` — no odf.js knowledge.
|
|
580
580
|
- **`src/firebird/`** — Tier 3: gbak logical-backup reader. `reader.ts` (attribute framing + RLE decompression + XDR decoding), `schema.ts`/`data.ts` (table/row walking). No ratified spec — built against Firebird's own engine source.
|
|
581
581
|
- **`src/odb/`** — decoder-selection and pivot-mapping: `read.ts` routes to the right tier, `spreadsheet.ts`/`csv.ts` map to output formats. `odb/sql/` is the bounded SQL engine, `odb/formula/` is the rpt formula engine, `odb/report/` is the renderer, `odb/values.ts` is shared comparison/aggregation semantics.
|
|
582
|
-
- **`src/convert/`** — the composition layer: `convert.ts` (the named conversion functions and their option types), `composition.ts` (the pathfinder, the primitive registry, the bridge/fromPdf executors, and `convertDocumentFromPdf` — the read half of the engine), `composition-to-pdf.ts` (`executeToPdf`, the layout-engine registry, and the full `convertDocument` binding — the write half, split out so a read-only consumer never statically imports a renderer), `from-pdf.ts` (the `pdfTo*` family and the `documents.js/read` entry), `codec.ts` (`z.codec()` pairs), `port.ts`/`local.ts` (the `DocumentConverter` port), `variant-bridges.ts` (cross-variant semantic transforms), and `from-package.ts` (`buildDocumentBytes`, which flattens once at the boundary). The tree ⇄ flat transform those construction sites call — `
|
|
582
|
+
- **`src/convert/`** — the composition layer: `convert.ts` (the named conversion functions and their option types), `composition.ts` (the pathfinder, the primitive registry, the bridge/fromPdf executors, and `convertDocumentFromPdf` — the read half of the engine), `composition-to-pdf.ts` (`executeToPdf`, the layout-engine registry, and the full `convertDocument` binding — the write half, split out so a read-only consumer never statically imports a renderer), `from-pdf.ts` (the `pdfTo*` family and the `documents.js/read` entry), `codec.ts` (`z.codec()` pairs), `port.ts`/`local.ts` (the `DocumentConverter` port), `variant-bridges.ts` (cross-variant semantic transforms), and `from-package.ts` (`buildDocumentBytes`, which flattens once at the boundary). The tree ⇄ flat transform those construction sites call — `assembleTree`, `decompose`, `flattenTree`, `factorStyles` — is not implemented here: it lives in `document-schema.js`, which owns both encodings. `bijection.test.ts` is this package's own gate on it, re-running the three laws over the real corpus every reader, editor, and conversion here produces.
|
|
583
583
|
- **`src/codecs/`** — `DOCUMENT_FORMAT_CODECS`: every format's read/build capability as data, so `readDocumentMetadata`/`setDocumentMetadata`/`buildDocumentBytes` dispatch through one registry.
|
|
584
584
|
- **`src/metadata/`** — cross-format metadata read/write via `DOCUMENT_FORMAT_CODECS`.
|
|
585
585
|
- **`src/package-codec.ts`** — `decodeDocumentPackage`/`encodeDocumentPackage`/`decodeOdbPackage`.
|
|
@@ -613,11 +613,11 @@ To run a single test file: `pnpm vitest run src/path/to/file.test.ts`.
|
|
|
613
613
|
|
|
614
614
|
## Gotchas and quirks
|
|
615
615
|
|
|
616
|
-
- **`ooxml.js`'s typed readers are the basis for conversion** — `readDocxContent`/`readPptxContent` are thin wrappers, not independent walks. They are deliberately not re-exported (exposing both would invite using the wrong one). The upstream flat docx reader's `comments`/`footnotes`/`headerFooterParts`/`sectionHeaderFooters`/`numbering` are exposed via `readDocxExtras`; pptx has no extras reader yet. xlsx is the one exception: `ooxml.js`'s `readXlsxContent` (and flat builder, re-exported here as `buildXlsxPackage`) already read/write a spreadsheet `ContentDocument` directly (unlike the docx/pptx readers, which `readDocxContent`/`readPptxContent` wrap), so they're re-exported as-is rather than given a documents.js-local wrapper of their own. Since `ooxml.js` 4.0.0 the bare `readDocx`/`readPptx`/`readXlsx`/`buildXlsxPackage` names belong to that package's tree-form `
|
|
616
|
+
- **`ooxml.js`'s typed readers are the basis for conversion** — `readDocxContent`/`readPptxContent` are thin wrappers, not independent walks. They are deliberately not re-exported (exposing both would invite using the wrong one). The upstream flat docx reader's `comments`/`footnotes`/`headerFooterParts`/`sectionHeaderFooters`/`numbering` are exposed via `readDocxExtras`; pptx has no extras reader yet. xlsx is the one exception: `ooxml.js`'s `readXlsxContent` (and flat builder, re-exported here as `buildXlsxPackage`) already read/write a spreadsheet `ContentDocument` directly (unlike the docx/pptx readers, which `readDocxContent`/`readPptxContent` wrap), so they're re-exported as-is rather than given a documents.js-local wrapper of their own. Since `ooxml.js` 4.0.0 the bare `readDocx`/`readPptx`/`readXlsx`/`buildXlsxPackage` names belong to that package's tree-form `DocumentTree` readers/builder, and the lossy cell-values-only workbook view is `readXlsxWorkbook` — none of those tree-form names is re-exported, for the same "don't expose both the wrapper and the thing it wraps" reason.
|
|
617
617
|
- **ODF text content is not a plain string.** ODF represents runs of spaces as `<text:s>`, tabs as `<text:tab/>`, line breaks as `<text:line-break/>` — all elements, not text nodes. Every ODF text getter MUST call `decodeOdfText`, never `textContent()` — which silently drops them (no error, just shorter text).
|
|
618
618
|
- **docx⇄PDF and pptx⇄PDF are explicitly not round-trip-lossless** — see [Fidelity](#fidelity). The cross-format bridge pairs are a genuinely different case.
|
|
619
|
-
- **A `
|
|
620
|
-
- **A construct group is the one tree node that does not embed the block it came from.** Everywhere else `decompose` wraps rather than copies, so the tree and the flat form share node objects. `
|
|
619
|
+
- **A `DocumentTree` from `onDocument`/`ConversionResult.package` is a snapshot, not a live view** — mutating the tree's content nodes after the layout pass leaves their `frames` stale; nothing detects or rejects that, and the schema keeps the tree's populated `frames` and `pages` in sync with nothing.
|
|
620
|
+
- **A construct group is the one tree node that does not embed the block it came from.** Everywhere else `decompose` wraps rather than copies, so the tree and the flat form share node objects. `TreeBlockLeaf` excludes both marker kinds by construction, so a construct group can only hold the `constructStart`'s `ConstructDescriptor` — that descriptor object *is* shared, by identity — while the marker wrapper around it has no tree spelling and is rebuilt fresh by `flattenTree`. Two further boundary facts follow from promotion being a property of one container's own block flow: which group type a marker pair promotes to depends on where it sits (a `SectionConstructGroupNode`, whose children are a full section flow, at a section/heading scope; a `ShapeConstructGroupNode`, whose children are a list/shape flow where a heading paragraph is ordinary content, inside a list item or a shape) — and markers inside a table cell's blocks or inside an embedded document ride through on their leaf, neither promoted nor balance-checked, exactly as a heading level in the same position is not a grouping signal.
|
|
621
621
|
- **`frames` are stamped in place onto the caller's own content tree** — `convertXToLayout` mutates its `ContentDocument` argument (each node's placements are appended to its own `frames` array, one frame per rendered placement: per wrapped fragment on a run, the cell box on a cell, the emitted item's box on an image/vector/shape) and returns `pages` alongside the internal `LayoutDocument`. A run wrapped across three lines carries three frames; a repeat-row spreadsheet cell carries one per page it re-renders on. Reconstructors attach frames from the exact items each reconstructed node was clustered from, so every PDF-to-X conversion's content carries genuine positions too. The tree an `onDocument` callback receives embeds those same framed node objects (decompose wraps, it never copies — only a styles-minted paragraph or run is a copy), so the positions are identical in both encodings by construction.
|
|
622
622
|
- **ODF text getters must call `decodeOdfText`.** See the dedicated gotcha above.
|
|
623
623
|
- **`readPdf` recovers rect/ellipse/line as their own `LayoutRect`/`LayoutEllipse`/`LayoutLine` kinds** via pdf-codec's shape-pattern detection — an axis-aligned closed four-corner subpath is a rect, four kappa-ratio cubics at cardinal points is an ellipse, an open single straight stroke is a line. A false positive changes kind, never geometry. Off-axis rotations, freeform curves, and multi-subpath figures narrow to `LayoutPath`.
|
|
@@ -753,7 +753,7 @@ Conventional Commits, enforced workspace-wide by commitlint through a root `comm
|
|
|
753
753
|
## References
|
|
754
754
|
|
|
755
755
|
- [ooxml.js](../ooxml.js/README.md) — docx/pptx/xlsx ⇄ JSON handling and typed reading, including `readXlsxContent` and the flat spreadsheet builder it pairs with, `buildXlsxPackageFromContent` (consumed by the `odsToXlsx`/`xlsxToOds` bridge and internal codecs, and re-exported directly from this package's own surface under the long-standing `buildXlsxPackage` name — see [Reading and building xlsx content directly](#reading-and-building-xlsx-content-directly)).
|
|
756
|
-
- [document-schema.js](../document-schema.js/README.md) — owns `ContentDocument`, the tree-form `
|
|
756
|
+
- [document-schema.js](../document-schema.js/README.md) — owns `ContentDocument`, the tree-form `DocumentTree` and its styles-table facility, and the port contracts; shared by all sibling packages.
|
|
757
757
|
- [markdown-codec](../markdown-codec/README.md) — CommonMark+GFM ⇄ `ContentDocument` handling. The third format (after docx/odt) sharing the wordprocessing pivot.
|
|
758
758
|
- [pdf-codec](../pdf-codec/README.md) — the hand-written PDF codec (`readPdf`/`writePdf`/`pdfCodec`), the embedded STIX Two Math font, and text-measurement/font-resolution primitives.
|
|
759
759
|
- [byte-codec](../byte-codec/README.md) — generic byte/image utilities (ByteWriter, CRC-32, deflate/inflate, PNG/JPEG), extracted from pdf-codec.
|
|
@@ -107,7 +107,7 @@ function executeToPdf(format, bytes, options) {
|
|
|
107
107
|
onSubstitution: options?.onSubstitution,
|
|
108
108
|
fonts
|
|
109
109
|
});
|
|
110
|
-
options?.onDocument?.((0, document_schema_js.
|
|
110
|
+
options?.onDocument?.((0, document_schema_js.assembleTree)(content, pages));
|
|
111
111
|
return out;
|
|
112
112
|
}
|
|
113
113
|
const out = (0, pdf_codec.writePdf)(layout, {
|
|
@@ -116,7 +116,7 @@ function executeToPdf(format, bytes, options) {
|
|
|
116
116
|
formulas,
|
|
117
117
|
fonts
|
|
118
118
|
});
|
|
119
|
-
options?.onDocument?.((0, document_schema_js.
|
|
119
|
+
options?.onDocument?.((0, document_schema_js.assembleTree)(content, pages));
|
|
120
120
|
return out;
|
|
121
121
|
}
|
|
122
122
|
function convertDocument(source, target, bytes, options) {
|
|
@@ -7,7 +7,7 @@ import { convertSpreadsheetToLayout } from "../layout/sheets.js";
|
|
|
7
7
|
import { convertDrawingToLayout } from "../layout/drawing.js";
|
|
8
8
|
import { UnsupportedConversionError } from "./capability.js";
|
|
9
9
|
import { FORMAT_NODES, LAYOUT_CAPABLE, executeBridge, executeFromPdf, isTextFormatNode, resolveCompositionPlan, runCompositionPlan } from "./composition.js";
|
|
10
|
-
import {
|
|
10
|
+
import { assembleTree } from "document-schema.js";
|
|
11
11
|
import { createFontMeasurer, createFontRegistry, loadMathFont, writePdf } from "pdf-codec";
|
|
12
12
|
//#region src/convert/composition-to-pdf.ts
|
|
13
13
|
const mathMetricsAt = (sizePt) => loadMathFont().metricsAt(sizePt);
|
|
@@ -106,7 +106,7 @@ function executeToPdf(format, bytes, options) {
|
|
|
106
106
|
onSubstitution: options?.onSubstitution,
|
|
107
107
|
fonts
|
|
108
108
|
});
|
|
109
|
-
options?.onDocument?.(
|
|
109
|
+
options?.onDocument?.(assembleTree(content, pages));
|
|
110
110
|
return out;
|
|
111
111
|
}
|
|
112
112
|
const out = writePdf(layout, {
|
|
@@ -115,7 +115,7 @@ function executeToPdf(format, bytes, options) {
|
|
|
115
115
|
formulas,
|
|
116
116
|
fonts
|
|
117
117
|
});
|
|
118
|
-
options?.onDocument?.(
|
|
118
|
+
options?.onDocument?.(assembleTree(content, pages));
|
|
119
119
|
return out;
|
|
120
120
|
}
|
|
121
121
|
function convertDocument(source, target, bytes, options) {
|
|
@@ -213,7 +213,7 @@ function executeBridge(source, target, bytes, options) {
|
|
|
213
213
|
const pkg = targetNode.build(buildContent, options);
|
|
214
214
|
out = targetNode.encode(pkg);
|
|
215
215
|
}
|
|
216
|
-
options?.onDocument?.((0, document_schema_js.
|
|
216
|
+
options?.onDocument?.((0, document_schema_js.assembleTree)(buildContent));
|
|
217
217
|
return out;
|
|
218
218
|
}
|
|
219
219
|
function executeFromPdf(target, bytes, options) {
|
|
@@ -238,7 +238,7 @@ function executeFromPdf(target, bytes, options) {
|
|
|
238
238
|
const pkg = node.build(content);
|
|
239
239
|
out = node.encode(pkg);
|
|
240
240
|
}
|
|
241
|
-
const reported = (0, document_schema_js.
|
|
241
|
+
const reported = (0, document_schema_js.assembleTree)(content, pages);
|
|
242
242
|
require_convert_pdf_package_tables.stampPdfPackageTables(reported, layout);
|
|
243
243
|
options?.onDocument?.(reported);
|
|
244
244
|
return out;
|
|
@@ -4,7 +4,7 @@ import { t as ContentVariant } from "../capability-an5gSNsu.cjs";
|
|
|
4
4
|
import { i as SvgDiagnosticSink } from "../diagnostics-DVAXKgcf.cjs";
|
|
5
5
|
import { i as CellTypeInferenceSink } from "../cell-typing-CEWlywIc.cjs";
|
|
6
6
|
import { t as OmmlDiagnostic } from "../shared-DLZ3IQUl.cjs";
|
|
7
|
-
import { ContentDocument,
|
|
7
|
+
import { ContentDocument, DocumentTree, FontSubstitution, ProvidedFont } from "document-schema.js";
|
|
8
8
|
import { PdfDiagnosticSink, WinAnsiSubstitution } from "pdf-codec";
|
|
9
9
|
import { MarkdownImageResolver } from "markdown-codec";
|
|
10
10
|
import { Package } from "ooxml.js";
|
|
@@ -12,7 +12,7 @@ import { Package } from "ooxml.js";
|
|
|
12
12
|
type SourcePackage = Package;
|
|
13
13
|
interface UnifiedConversionOptions {
|
|
14
14
|
readonly signal?: AbortSignal;
|
|
15
|
-
readonly onDocument?: (pkg:
|
|
15
|
+
readonly onDocument?: (pkg: DocumentTree) => void;
|
|
16
16
|
readonly fonts?: readonly ProvidedFont[];
|
|
17
17
|
readonly onFontSubstitution?: (substitution: FontSubstitution) => void;
|
|
18
18
|
readonly onSubstitution?: (substitution: WinAnsiSubstitution, context: {
|
|
@@ -5,14 +5,14 @@ import { i as SvgDiagnosticSink } from "../diagnostics-DVAXKgcf.js";
|
|
|
5
5
|
import { i as CellTypeInferenceSink } from "../cell-typing-CEWlywIc.js";
|
|
6
6
|
import { t as OmmlDiagnostic } from "../shared-DUOzjwcL.js";
|
|
7
7
|
import { Package } from "ooxml.js";
|
|
8
|
-
import { ContentDocument,
|
|
8
|
+
import { ContentDocument, DocumentTree, FontSubstitution, ProvidedFont } from "document-schema.js";
|
|
9
9
|
import { PdfDiagnosticSink, WinAnsiSubstitution } from "pdf-codec";
|
|
10
10
|
import { MarkdownImageResolver } from "markdown-codec";
|
|
11
11
|
//#region src/convert/composition.d.ts
|
|
12
12
|
type SourcePackage = Package;
|
|
13
13
|
interface UnifiedConversionOptions {
|
|
14
14
|
readonly signal?: AbortSignal;
|
|
15
|
-
readonly onDocument?: (pkg:
|
|
15
|
+
readonly onDocument?: (pkg: DocumentTree) => void;
|
|
16
16
|
readonly fonts?: readonly ProvidedFont[];
|
|
17
17
|
readonly onFontSubstitution?: (substitution: FontSubstitution) => void;
|
|
18
18
|
readonly onSubstitution?: (substitution: WinAnsiSubstitution, context: {
|
|
@@ -25,7 +25,7 @@ import { stampPdfPackageTables } from "./pdf-package-tables.js";
|
|
|
25
25
|
import { drawingToPresentation, presentationToDrawing, presentationToWordprocessing, wordprocessingToPresentation } from "./variant-bridges.js";
|
|
26
26
|
import { UnsupportedConversionError } from "./capability.js";
|
|
27
27
|
import { buildXlsxPackageFromContent, decodePackage, encodePackage, readXlsxContent } from "ooxml.js";
|
|
28
|
-
import {
|
|
28
|
+
import { assembleTree } from "document-schema.js";
|
|
29
29
|
import { decodePackage as decodePackage$1, encodePackage as encodePackage$1 } from "odf.js";
|
|
30
30
|
import "markdown-codec";
|
|
31
31
|
import { readPdf } from "pdf-codec/read";
|
|
@@ -212,7 +212,7 @@ function executeBridge(source, target, bytes, options) {
|
|
|
212
212
|
const pkg = targetNode.build(buildContent, options);
|
|
213
213
|
out = targetNode.encode(pkg);
|
|
214
214
|
}
|
|
215
|
-
options?.onDocument?.(
|
|
215
|
+
options?.onDocument?.(assembleTree(buildContent));
|
|
216
216
|
return out;
|
|
217
217
|
}
|
|
218
218
|
function executeFromPdf(target, bytes, options) {
|
|
@@ -237,7 +237,7 @@ function executeFromPdf(target, bytes, options) {
|
|
|
237
237
|
const pkg = node.build(content);
|
|
238
238
|
out = node.encode(pkg);
|
|
239
239
|
}
|
|
240
|
-
const reported =
|
|
240
|
+
const reported = assembleTree(content, pages);
|
|
241
241
|
stampPdfPackageTables(reported, layout);
|
|
242
242
|
options?.onDocument?.(reported);
|
|
243
243
|
return out;
|
package/dist/convert/convert.cjs
CHANGED
|
@@ -89,7 +89,7 @@ function odfToPdf(bytes, options) {
|
|
|
89
89
|
box
|
|
90
90
|
}]
|
|
91
91
|
});
|
|
92
|
-
options?.onDocument?.((0, document_schema_js.
|
|
92
|
+
options?.onDocument?.((0, document_schema_js.assembleTree)(content, [{
|
|
93
93
|
widthPt: document_schema_js.PAGE_SIZE_A4.widthPt,
|
|
94
94
|
heightPt: document_schema_js.PAGE_SIZE_A4.heightPt
|
|
95
95
|
}]));
|
|
@@ -273,7 +273,7 @@ function odbToXlsx(bytes, options) {
|
|
|
273
273
|
require_ports_abort.throwIfAborted(options?.signal);
|
|
274
274
|
const content = require_odb_spreadsheet.odbTablesToSpreadsheetDocument(tables);
|
|
275
275
|
const out = (0, ooxml_js.encodePackage)((0, ooxml_js.buildXlsxPackageFromContent)(content));
|
|
276
|
-
options?.onDocument?.((0, document_schema_js.
|
|
276
|
+
options?.onDocument?.((0, document_schema_js.assembleTree)(content));
|
|
277
277
|
return out;
|
|
278
278
|
}
|
|
279
279
|
function odbToCsv(bytes, options) {
|
|
@@ -282,7 +282,7 @@ function odbToCsv(bytes, options) {
|
|
|
282
282
|
const tables = require_odb_read.readOdbTables(pkg, { timeZone: options?.timeZone });
|
|
283
283
|
require_ports_abort.throwIfAborted(options?.signal);
|
|
284
284
|
const csv = require_odb_csv.buildOdbTableCsv(tables, options?.table);
|
|
285
|
-
if (options?.onDocument !== void 0) options.onDocument((0, document_schema_js.
|
|
285
|
+
if (options?.onDocument !== void 0) options.onDocument((0, document_schema_js.assembleTree)(require_odb_spreadsheet.odbTablesToSpreadsheetDocument(tables)));
|
|
286
286
|
return csv;
|
|
287
287
|
}
|
|
288
288
|
function odbReportToDocx(content, options) {
|
|
@@ -310,7 +310,7 @@ function odbReportToPdf(content, options) {
|
|
|
310
310
|
formulas,
|
|
311
311
|
fonts
|
|
312
312
|
});
|
|
313
|
-
options?.onDocument?.((0, document_schema_js.
|
|
313
|
+
options?.onDocument?.((0, document_schema_js.assembleTree)(content, pages));
|
|
314
314
|
return out;
|
|
315
315
|
}
|
|
316
316
|
//#endregion
|
|
@@ -4,7 +4,7 @@ import { i as CellTypeInferenceSink } from "../cell-typing-CEWlywIc.cjs";
|
|
|
4
4
|
import { t as OmmlDiagnostic } from "../shared-DLZ3IQUl.cjs";
|
|
5
5
|
import { n as HsqldbDecodeOptions } from "../rowformat-Cl2exlEh.cjs";
|
|
6
6
|
import { t as DocumentFontRegistryOptions } from "../registry-BcBT-bnX.cjs";
|
|
7
|
-
import { ContentDocument, ContentSection,
|
|
7
|
+
import { ContentDocument, ContentSection, DocumentTree } from "document-schema.js";
|
|
8
8
|
import { PdfDiagnosticSink, WinAnsiSubstitution } from "pdf-codec";
|
|
9
9
|
import { MarkdownImageResolver } from "markdown-codec";
|
|
10
10
|
import { OdmSection, Package } from "odf.js";
|
|
@@ -14,7 +14,7 @@ interface DocumentToPdfOptions extends DocumentFontRegistryOptions {
|
|
|
14
14
|
readonly onSubstitution?: (substitution: WinAnsiSubstitution, context: {
|
|
15
15
|
readonly pageIndex: number;
|
|
16
16
|
}) => void;
|
|
17
|
-
readonly onDocument?: (pkg:
|
|
17
|
+
readonly onDocument?: (pkg: DocumentTree) => void;
|
|
18
18
|
readonly onMathDiagnostic?: (diagnostic: OmmlDiagnostic, context: {
|
|
19
19
|
readonly sourcePath?: string;
|
|
20
20
|
}) => void;
|
|
@@ -48,7 +48,7 @@ declare function svgToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPd
|
|
|
48
48
|
declare function odfToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
49
49
|
interface DocumentBridgeOptions {
|
|
50
50
|
readonly signal?: AbortSignal;
|
|
51
|
-
readonly onDocument?: (pkg:
|
|
51
|
+
readonly onDocument?: (pkg: DocumentTree) => void;
|
|
52
52
|
readonly onMathDiagnostic?: (diagnostic: OmmlDiagnostic, context: {
|
|
53
53
|
readonly sourcePath?: string;
|
|
54
54
|
}) => void;
|
|
@@ -62,7 +62,7 @@ interface ComposedDocumentOptions extends DocumentFontRegistryOptions {
|
|
|
62
62
|
readonly clock?: ClockPort;
|
|
63
63
|
readonly images?: MarkdownImageResolver;
|
|
64
64
|
readonly sink?: PdfDiagnosticSink;
|
|
65
|
-
readonly onDocument?: (pkg:
|
|
65
|
+
readonly onDocument?: (pkg: DocumentTree) => void;
|
|
66
66
|
}
|
|
67
67
|
declare function odtToDocx(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
68
68
|
declare function docxToOdt(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
@@ -4,7 +4,7 @@ import { i as CellTypeInferenceSink } from "../cell-typing-CEWlywIc.js";
|
|
|
4
4
|
import { t as OmmlDiagnostic } from "../shared-DUOzjwcL.js";
|
|
5
5
|
import { n as HsqldbDecodeOptions } from "../rowformat-Cl2exlEh.js";
|
|
6
6
|
import { t as DocumentFontRegistryOptions } from "../registry-D1Pu5XxB.js";
|
|
7
|
-
import { ContentDocument, ContentSection,
|
|
7
|
+
import { ContentDocument, ContentSection, DocumentTree } from "document-schema.js";
|
|
8
8
|
import { PdfDiagnosticSink, WinAnsiSubstitution } from "pdf-codec";
|
|
9
9
|
import { OdmSection, Package } from "odf.js";
|
|
10
10
|
import { MarkdownImageResolver } from "markdown-codec";
|
|
@@ -14,7 +14,7 @@ interface DocumentToPdfOptions extends DocumentFontRegistryOptions {
|
|
|
14
14
|
readonly onSubstitution?: (substitution: WinAnsiSubstitution, context: {
|
|
15
15
|
readonly pageIndex: number;
|
|
16
16
|
}) => void;
|
|
17
|
-
readonly onDocument?: (pkg:
|
|
17
|
+
readonly onDocument?: (pkg: DocumentTree) => void;
|
|
18
18
|
readonly onMathDiagnostic?: (diagnostic: OmmlDiagnostic, context: {
|
|
19
19
|
readonly sourcePath?: string;
|
|
20
20
|
}) => void;
|
|
@@ -48,7 +48,7 @@ declare function svgToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPd
|
|
|
48
48
|
declare function odfToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
49
49
|
interface DocumentBridgeOptions {
|
|
50
50
|
readonly signal?: AbortSignal;
|
|
51
|
-
readonly onDocument?: (pkg:
|
|
51
|
+
readonly onDocument?: (pkg: DocumentTree) => void;
|
|
52
52
|
readonly onMathDiagnostic?: (diagnostic: OmmlDiagnostic, context: {
|
|
53
53
|
readonly sourcePath?: string;
|
|
54
54
|
}) => void;
|
|
@@ -62,7 +62,7 @@ interface ComposedDocumentOptions extends DocumentFontRegistryOptions {
|
|
|
62
62
|
readonly clock?: ClockPort;
|
|
63
63
|
readonly images?: MarkdownImageResolver;
|
|
64
64
|
readonly sink?: PdfDiagnosticSink;
|
|
65
|
-
readonly onDocument?: (pkg:
|
|
65
|
+
readonly onDocument?: (pkg: DocumentTree) => void;
|
|
66
66
|
}
|
|
67
67
|
declare function odtToDocx(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
68
68
|
declare function docxToOdt(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
package/dist/convert/convert.js
CHANGED
|
@@ -13,7 +13,7 @@ import { readOdbTables } from "../odb/read.js";
|
|
|
13
13
|
import { odbTablesToSpreadsheetDocument } from "../odb/spreadsheet.js";
|
|
14
14
|
import { convertDocument } from "./composition-to-pdf.js";
|
|
15
15
|
import { buildXlsxPackageFromContent, encodePackage } from "ooxml.js";
|
|
16
|
-
import { COLOR_BLACK, PAGE_SIZE_A4,
|
|
16
|
+
import { COLOR_BLACK, PAGE_SIZE_A4, assembleTree } from "document-schema.js";
|
|
17
17
|
import { LAYOUT_FORMAT_VERSION, createFontMeasurer, createFontRegistry, loadMathFont, writePdf } from "pdf-codec";
|
|
18
18
|
import { decodePackage as decodePackage$1, encodePackage as encodePackage$1, readOdfMetadata, readOdfParagraph, readOdfTable, readOdm } from "odf.js";
|
|
19
19
|
//#region src/convert/convert.ts
|
|
@@ -88,7 +88,7 @@ function odfToPdf(bytes, options) {
|
|
|
88
88
|
box
|
|
89
89
|
}]
|
|
90
90
|
});
|
|
91
|
-
options?.onDocument?.(
|
|
91
|
+
options?.onDocument?.(assembleTree(content, [{
|
|
92
92
|
widthPt: PAGE_SIZE_A4.widthPt,
|
|
93
93
|
heightPt: PAGE_SIZE_A4.heightPt
|
|
94
94
|
}]));
|
|
@@ -272,7 +272,7 @@ function odbToXlsx(bytes, options) {
|
|
|
272
272
|
throwIfAborted(options?.signal);
|
|
273
273
|
const content = odbTablesToSpreadsheetDocument(tables);
|
|
274
274
|
const out = encodePackage(buildXlsxPackageFromContent(content));
|
|
275
|
-
options?.onDocument?.(
|
|
275
|
+
options?.onDocument?.(assembleTree(content));
|
|
276
276
|
return out;
|
|
277
277
|
}
|
|
278
278
|
function odbToCsv(bytes, options) {
|
|
@@ -281,7 +281,7 @@ function odbToCsv(bytes, options) {
|
|
|
281
281
|
const tables = readOdbTables(pkg, { timeZone: options?.timeZone });
|
|
282
282
|
throwIfAborted(options?.signal);
|
|
283
283
|
const csv = buildOdbTableCsv(tables, options?.table);
|
|
284
|
-
if (options?.onDocument !== void 0) options.onDocument(
|
|
284
|
+
if (options?.onDocument !== void 0) options.onDocument(assembleTree(odbTablesToSpreadsheetDocument(tables)));
|
|
285
285
|
return csv;
|
|
286
286
|
}
|
|
287
287
|
function odbReportToDocx(content, options) {
|
|
@@ -309,7 +309,7 @@ function odbReportToPdf(content, options) {
|
|
|
309
309
|
formulas,
|
|
310
310
|
fonts
|
|
311
311
|
});
|
|
312
|
-
options?.onDocument?.(
|
|
312
|
+
options?.onDocument?.(assembleTree(content, pages));
|
|
313
313
|
return out;
|
|
314
314
|
}
|
|
315
315
|
//#endregion
|
|
@@ -10,13 +10,13 @@ let pdf_codec = require("pdf-codec");
|
|
|
10
10
|
//#region src/convert/from-package.ts
|
|
11
11
|
function buildDocumentBytes(pkg, target) {
|
|
12
12
|
if (target === "pdf") {
|
|
13
|
-
if (pkg.pages === void 0) throw new Error("this
|
|
13
|
+
if (pkg.pages === void 0) throw new Error("this DocumentTree has no pages -- only a package dumped from a <format>-to-pdf or pdf-to-<format> conversion carries them; a bridge conversion's own dump (e.g. odt-to-docx) never does, so 'pdf' is not a reachable target from it");
|
|
14
14
|
return (0, pdf_codec.writePdf)(layoutDocumentFromPackage(pkg));
|
|
15
15
|
}
|
|
16
|
-
if (target === "odf") throw new Error("'odf' (a standalone formula document) cannot be built from a
|
|
16
|
+
if (target === "odf") throw new Error("'odf' (a standalone formula document) cannot be built from a DocumentTree -- there is no ContentDocument-to-odf builder");
|
|
17
17
|
const content = require_codecs_registry.DOCUMENT_FORMAT_CODECS[target].content;
|
|
18
18
|
if (!content?.write) throw new Error(`DocumentFormat '${target}' has no content.write codec in DOCUMENT_FORMAT_CODECS, and is not 'pdf'/'odf' -- this is an internal invariant violation, not a caller error`);
|
|
19
|
-
return require_model_bytes.requireArrayBufferBytes(content.write((0, document_schema_js.
|
|
19
|
+
return require_model_bytes.requireArrayBufferBytes(content.write((0, document_schema_js.flattenTree)(pkg)));
|
|
20
20
|
}
|
|
21
21
|
function pageOfFrame(state, frame) {
|
|
22
22
|
return state.pages[frame.pageIndex];
|
|
@@ -174,7 +174,7 @@ function layoutDocumentFromPackage(pkg) {
|
|
|
174
174
|
pages,
|
|
175
175
|
images: {}
|
|
176
176
|
};
|
|
177
|
-
const content = (0, document_schema_js.
|
|
177
|
+
const content = (0, document_schema_js.flattenTree)(pkg);
|
|
178
178
|
if (content.kind === "wordprocessing") for (const section of content.sections) emitBlocks(state, section.blocks);
|
|
179
179
|
else if (content.kind === "presentation") for (const slide of content.slides) for (const shape of slide.shapes) emitBlocks(state, shape.blocks);
|
|
180
180
|
else if (content.kind === "spreadsheet") for (const sheet of content.sheets) emitSheet(state, sheet);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DocumentFormat } from "./port.cjs";
|
|
2
|
-
import {
|
|
2
|
+
import { DocumentTree } from "document-schema.js";
|
|
3
3
|
import { LayoutDocument } from "pdf-codec";
|
|
4
4
|
//#region src/convert/from-package.d.ts
|
|
5
|
-
declare function buildDocumentBytes(pkg:
|
|
6
|
-
declare function layoutDocumentFromPackage(pkg:
|
|
5
|
+
declare function buildDocumentBytes(pkg: DocumentTree, target: DocumentFormat): Uint8Array<ArrayBuffer>;
|
|
6
|
+
declare function layoutDocumentFromPackage(pkg: DocumentTree): LayoutDocument;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { buildDocumentBytes, layoutDocumentFromPackage };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DocumentFormat } from "./port.js";
|
|
2
|
-
import {
|
|
2
|
+
import { DocumentTree } from "document-schema.js";
|
|
3
3
|
import { LayoutDocument } from "pdf-codec";
|
|
4
4
|
//#region src/convert/from-package.d.ts
|
|
5
|
-
declare function buildDocumentBytes(pkg:
|
|
6
|
-
declare function layoutDocumentFromPackage(pkg:
|
|
5
|
+
declare function buildDocumentBytes(pkg: DocumentTree, target: DocumentFormat): Uint8Array<ArrayBuffer>;
|
|
6
|
+
declare function layoutDocumentFromPackage(pkg: DocumentTree): LayoutDocument;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { buildDocumentBytes, layoutDocumentFromPackage };
|
|
@@ -4,18 +4,18 @@ import { pushCellBorderLines, registerImage, runFont } from "../layout/shared.js
|
|
|
4
4
|
import "../layout/sheets.js";
|
|
5
5
|
import { convertVector } from "../layout/drawing.js";
|
|
6
6
|
import { DOCUMENT_FORMAT_CODECS } from "../codecs/registry.js";
|
|
7
|
-
import { COLOR_BLACK, DEFAULT_LAYOUT_FONT,
|
|
7
|
+
import { COLOR_BLACK, DEFAULT_LAYOUT_FONT, flattenTree } from "document-schema.js";
|
|
8
8
|
import { LAYOUT_FORMAT_VERSION, writePdf } from "pdf-codec";
|
|
9
9
|
//#region src/convert/from-package.ts
|
|
10
10
|
function buildDocumentBytes(pkg, target) {
|
|
11
11
|
if (target === "pdf") {
|
|
12
|
-
if (pkg.pages === void 0) throw new Error("this
|
|
12
|
+
if (pkg.pages === void 0) throw new Error("this DocumentTree has no pages -- only a package dumped from a <format>-to-pdf or pdf-to-<format> conversion carries them; a bridge conversion's own dump (e.g. odt-to-docx) never does, so 'pdf' is not a reachable target from it");
|
|
13
13
|
return writePdf(layoutDocumentFromPackage(pkg));
|
|
14
14
|
}
|
|
15
|
-
if (target === "odf") throw new Error("'odf' (a standalone formula document) cannot be built from a
|
|
15
|
+
if (target === "odf") throw new Error("'odf' (a standalone formula document) cannot be built from a DocumentTree -- there is no ContentDocument-to-odf builder");
|
|
16
16
|
const content = DOCUMENT_FORMAT_CODECS[target].content;
|
|
17
17
|
if (!content?.write) throw new Error(`DocumentFormat '${target}' has no content.write codec in DOCUMENT_FORMAT_CODECS, and is not 'pdf'/'odf' -- this is an internal invariant violation, not a caller error`);
|
|
18
|
-
return requireArrayBufferBytes(content.write(
|
|
18
|
+
return requireArrayBufferBytes(content.write(flattenTree(pkg)));
|
|
19
19
|
}
|
|
20
20
|
function pageOfFrame(state, frame) {
|
|
21
21
|
return state.pages[frame.pageIndex];
|
|
@@ -173,7 +173,7 @@ function layoutDocumentFromPackage(pkg) {
|
|
|
173
173
|
pages,
|
|
174
174
|
images: {}
|
|
175
175
|
};
|
|
176
|
-
const content =
|
|
176
|
+
const content = flattenTree(pkg);
|
|
177
177
|
if (content.kind === "wordprocessing") for (const section of content.sections) emitBlocks(state, section.blocks);
|
|
178
178
|
else if (content.kind === "presentation") for (const slide of content.slides) for (const shape of slide.shapes) emitBlocks(state, shape.blocks);
|
|
179
179
|
else if (content.kind === "spreadsheet") for (const sheet of content.sheets) emitSheet(state, sheet);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DocumentFormat } from "./port.cjs";
|
|
2
2
|
import { CsvWriteOptions, SvgWriteOptions } from "./convert.cjs";
|
|
3
|
-
import {
|
|
3
|
+
import { DocumentTree, LayoutMetadata } from "document-schema.js";
|
|
4
4
|
import { PdfDiagnosticSink } from "pdf-codec";
|
|
5
5
|
//#region src/convert/from-pdf.d.ts
|
|
6
6
|
interface ReadDocumentMetadataOptions {
|
|
@@ -10,7 +10,7 @@ declare function readDocumentMetadata(format: DocumentFormat, bytes: Uint8Array<
|
|
|
10
10
|
interface PdfToDocumentOptions {
|
|
11
11
|
readonly signal?: AbortSignal;
|
|
12
12
|
readonly sink?: PdfDiagnosticSink;
|
|
13
|
-
readonly onDocument?: (pkg:
|
|
13
|
+
readonly onDocument?: (pkg: DocumentTree) => void;
|
|
14
14
|
}
|
|
15
15
|
declare function pdfToDocx(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
16
16
|
declare function pdfToPptx(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DocumentFormat } from "./port.js";
|
|
2
2
|
import { CsvWriteOptions, SvgWriteOptions } from "./convert.js";
|
|
3
|
-
import {
|
|
3
|
+
import { DocumentTree, LayoutMetadata } from "document-schema.js";
|
|
4
4
|
import { PdfDiagnosticSink } from "pdf-codec";
|
|
5
5
|
//#region src/convert/from-pdf.d.ts
|
|
6
6
|
interface ReadDocumentMetadataOptions {
|
|
@@ -10,7 +10,7 @@ declare function readDocumentMetadata(format: DocumentFormat, bytes: Uint8Array<
|
|
|
10
10
|
interface PdfToDocumentOptions {
|
|
11
11
|
readonly signal?: AbortSignal;
|
|
12
12
|
readonly sink?: PdfDiagnosticSink;
|
|
13
|
-
readonly onDocument?: (pkg:
|
|
13
|
+
readonly onDocument?: (pkg: DocumentTree) => void;
|
|
14
14
|
}
|
|
15
15
|
declare function pdfToDocx(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
16
16
|
declare function pdfToPptx(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DocumentTree } from "document-schema.js";
|
|
2
2
|
import { LayoutDocument } from "pdf-codec";
|
|
3
3
|
//#region src/convert/pdf-package-tables.d.ts
|
|
4
|
-
declare function stampPdfPackageTables(pkg:
|
|
4
|
+
declare function stampPdfPackageTables(pkg: DocumentTree, layout: LayoutDocument): void;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { stampPdfPackageTables };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DocumentTree } from "document-schema.js";
|
|
2
2
|
import { LayoutDocument } from "pdf-codec";
|
|
3
3
|
//#region src/convert/pdf-package-tables.d.ts
|
|
4
|
-
declare function stampPdfPackageTables(pkg:
|
|
4
|
+
declare function stampPdfPackageTables(pkg: DocumentTree, layout: LayoutDocument): void;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { stampPdfPackageTables };
|
package/dist/convert/port.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as ClockPort } from "../clock-C7SUuYN0.cjs";
|
|
2
|
-
import {
|
|
2
|
+
import { DocumentTree, FontSubstitution, ProvidedFont } from "document-schema.js";
|
|
3
3
|
import { MarkdownImageResolver } from "markdown-codec";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region src/convert/port.d.ts
|
|
@@ -36,7 +36,7 @@ interface ConversionRequest {
|
|
|
36
36
|
interface ConversionResult {
|
|
37
37
|
readonly document: DocumentPayload;
|
|
38
38
|
readonly diagnostics: readonly Diagnostic[];
|
|
39
|
-
readonly package?:
|
|
39
|
+
readonly package?: DocumentTree;
|
|
40
40
|
}
|
|
41
41
|
interface ConversionOptions {
|
|
42
42
|
readonly signal: AbortSignal;
|
package/dist/convert/port.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as ClockPort } from "../clock-C7SUuYN0.js";
|
|
2
|
-
import {
|
|
2
|
+
import { DocumentTree, FontSubstitution, ProvidedFont } from "document-schema.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { MarkdownImageResolver } from "markdown-codec";
|
|
5
5
|
//#region src/convert/port.d.ts
|
|
@@ -36,7 +36,7 @@ interface ConversionRequest {
|
|
|
36
36
|
interface ConversionResult {
|
|
37
37
|
readonly document: DocumentPayload;
|
|
38
38
|
readonly diagnostics: readonly Diagnostic[];
|
|
39
|
-
readonly package?:
|
|
39
|
+
readonly package?: DocumentTree;
|
|
40
40
|
}
|
|
41
41
|
interface ConversionOptions {
|
|
42
42
|
readonly signal: AbortSignal;
|
package/dist/index.cjs
CHANGED
|
@@ -340,10 +340,10 @@ Object.defineProperty(exports, "DefinedNameSchema", {
|
|
|
340
340
|
}
|
|
341
341
|
});
|
|
342
342
|
exports.DocumentFormatSchema = require_convert_port.DocumentFormatSchema;
|
|
343
|
-
Object.defineProperty(exports, "
|
|
343
|
+
Object.defineProperty(exports, "DocumentTreeSchema", {
|
|
344
344
|
enumerable: true,
|
|
345
345
|
get: function() {
|
|
346
|
-
return document_schema_js.
|
|
346
|
+
return document_schema_js.DocumentTreeSchema;
|
|
347
347
|
}
|
|
348
348
|
});
|
|
349
349
|
exports.DocxBytesSchema = require_model_bytes.DocxBytesSchema;
|
|
@@ -764,16 +764,16 @@ Object.defineProperty(exports, "documentFromJson", {
|
|
|
764
764
|
return document_schema_js.documentFromJson;
|
|
765
765
|
}
|
|
766
766
|
});
|
|
767
|
-
Object.defineProperty(exports, "
|
|
767
|
+
Object.defineProperty(exports, "documentSchemaKindOf", {
|
|
768
768
|
enumerable: true,
|
|
769
769
|
get: function() {
|
|
770
|
-
return document_schema_js.
|
|
770
|
+
return document_schema_js.documentSchemaKindOf;
|
|
771
771
|
}
|
|
772
772
|
});
|
|
773
|
-
Object.defineProperty(exports, "
|
|
773
|
+
Object.defineProperty(exports, "documentTreeWithSchema", {
|
|
774
774
|
enumerable: true,
|
|
775
775
|
get: function() {
|
|
776
|
-
return document_schema_js.
|
|
776
|
+
return document_schema_js.documentTreeWithSchema;
|
|
777
777
|
}
|
|
778
778
|
});
|
|
779
779
|
exports.docxPdfCodec = require_convert_codec.docxPdfCodec;
|
package/dist/index.d.cts
CHANGED
|
@@ -125,8 +125,8 @@ import { OdbReportDataSourceError, odbReportCommandSql, resolveOdbReportRows } f
|
|
|
125
125
|
import { UnsupportedPackageFormatError, decodeDocumentPackage, decodeOdbPackage, encodeDocumentPackage } from "./package-codec.cjs";
|
|
126
126
|
import { MetadataOverrides, SetDocumentMetadataOptions, setDocumentMetadata } from "./metadata/write.cjs";
|
|
127
127
|
import { throwIfAborted } from "./ports/abort.cjs";
|
|
128
|
-
import { Alignment, Box, COLOR_BLACK, 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,
|
|
128
|
+
import { Alignment, Box, COLOR_BLACK, 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, DocumentSchemaKind, DocumentTree, DocumentTreeJson, DocumentTreeSchema, FontFace, LayoutFont, LayoutMetadata, 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, documentSchemaKindOf, documentTreeWithSchema, isContentBlock, parseCellReference, parseRangeReference, rangeReference, rgbHexToColor, schemaUriFor } from "document-schema.js";
|
|
129
129
|
import { FontFaceParseError, FontRegistry, FontRegistryOptions, FontSubstitution, LAYOUT_FORMAT_VERSION, LayoutDocument, LayoutDocumentSchema, LayoutEllipse, LayoutImage, LayoutImageAsset, LayoutItem, LayoutLine, LayoutLink, LayoutPage, LayoutPath, LayoutPathSegment, LayoutRect, LayoutSubpath, LayoutText, 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";
|
|
130
130
|
import { Attribute, AttributeSchema, BinaryPart, BinaryPartSchema, Comment, CommentSchema, CompactAttrPairs, CompactPackage, CompactPackageSchema, CompactPart, CompactPartSchema, CompactXmlNode, CompactXmlNodeSchema, DefinedName, DefinedNameSchema, Footnote, FootnoteSchema, HeaderFooterPart, HeaderFooterPartSchema, NumberingDefinition, NumberingDefinitionSchema, NumberingDefinitions, NumberingLevel, NumberingLevelSchema, Package, PackageSchema, Part, PartSchema, Relationship, SectionHeaderFooterReferences, SectionHeaderFooterReferencesSchema, XmlCdata, XmlCdataSchema, XmlComment, XmlCommentSchema, XmlDeclaration, XmlDeclarationSchema, XmlElement, XmlElementSchema, XmlNode, XmlNodeSchema, XmlPart, XmlPartSchema, XmlPi, XmlPiSchema, XmlText, XmlTextSchema, attr, base64ToBytes, buildXlsxPackageFromContent as 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";
|
|
131
131
|
import { OdbComponentInfo, OdbConnectionInfo, OdbForm, OdbFormControl, OdbFormDefinition, OdbInventory, OdbQueryInfo, OdbReport, OdbReportBand, OdbReportElement, OdbReportFunction, OdbReportGroup, readOdbForm, readOdbInventory, readOdbReport, resolveOdbComponent } from "odf.js";
|
|
132
|
-
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, 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 HeaderFooterPart, HeaderFooterPartSchema, 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, 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, PdfInternalLinkItem, 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 SectionHeaderFooterReferences, SectionHeaderFooterReferencesSchema, 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, embeddedPresentationSerialiser, 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, 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 };
|
|
132
|
+
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, 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 DocumentPayload, type DocumentSchemaKind, type DocumentToPdfOptions, type DocumentTree, type DocumentTreeJson, DocumentTreeSchema, 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 HeaderFooterPart, HeaderFooterPartSchema, 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, 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, PdfInternalLinkItem, 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 SectionHeaderFooterReferences, SectionHeaderFooterReferencesSchema, 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, documentSchemaKindOf, documentTreeWithSchema, docxPdfCodec, docxToMarkdown, docxToOdt, docxToPdf, docxToPptx, drawingOfBlock, elementChildren, elementLocalName, elementsWithTag, embeddedPresentationSerialiser, 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, 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
|
@@ -126,7 +126,7 @@ import { UnsupportedPackageFormatError, decodeDocumentPackage, decodeOdbPackage,
|
|
|
126
126
|
import { MetadataOverrides, SetDocumentMetadataOptions, setDocumentMetadata } from "./metadata/write.js";
|
|
127
127
|
import { throwIfAborted } from "./ports/abort.js";
|
|
128
128
|
import { Attribute, AttributeSchema, BinaryPart, BinaryPartSchema, Comment, CommentSchema, CompactAttrPairs, CompactPackage, CompactPackageSchema, CompactPart, CompactPartSchema, CompactXmlNode, CompactXmlNodeSchema, DefinedName, DefinedNameSchema, Footnote, FootnoteSchema, HeaderFooterPart, HeaderFooterPartSchema, NumberingDefinition, NumberingDefinitionSchema, NumberingDefinitions, NumberingLevel, NumberingLevelSchema, Package, PackageSchema, Part, PartSchema, Relationship, SectionHeaderFooterReferences, SectionHeaderFooterReferencesSchema, XmlCdata, XmlCdataSchema, XmlComment, XmlCommentSchema, XmlDeclaration, XmlDeclarationSchema, XmlElement, XmlElementSchema, XmlNode, XmlNodeSchema, XmlPart, XmlPartSchema, XmlPi, XmlPiSchema, XmlText, XmlTextSchema, attr, base64ToBytes, buildXlsxPackageFromContent as 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";
|
|
129
|
-
import { Alignment, Box, COLOR_BLACK, 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,
|
|
129
|
+
import { Alignment, Box, COLOR_BLACK, 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, DocumentSchemaKind, DocumentTree, DocumentTreeJson, DocumentTreeSchema, FontFace, LayoutFont, LayoutMetadata, 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, documentSchemaKindOf, documentTreeWithSchema, isContentBlock, parseCellReference, parseRangeReference, rangeReference, rgbHexToColor, schemaUriFor } from "document-schema.js";
|
|
130
130
|
import { FontFaceParseError, FontRegistry, FontRegistryOptions, FontSubstitution, LAYOUT_FORMAT_VERSION, LayoutDocument, LayoutDocumentSchema, LayoutEllipse, LayoutImage, LayoutImageAsset, LayoutItem, LayoutLine, LayoutLink, LayoutPage, LayoutPath, LayoutPathSegment, LayoutRect, LayoutSubpath, LayoutText, 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";
|
|
131
131
|
import { OdbComponentInfo, OdbConnectionInfo, OdbForm, OdbFormControl, OdbFormDefinition, OdbInventory, OdbQueryInfo, OdbReport, OdbReportBand, OdbReportElement, OdbReportFunction, OdbReportGroup, readOdbForm, readOdbInventory, readOdbReport, resolveOdbComponent } from "odf.js";
|
|
132
|
-
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, 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 HeaderFooterPart, HeaderFooterPartSchema, 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, 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, PdfInternalLinkItem, 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 SectionHeaderFooterReferences, SectionHeaderFooterReferencesSchema, 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, embeddedPresentationSerialiser, 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, 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 };
|
|
132
|
+
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, 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 DocumentPayload, type DocumentSchemaKind, type DocumentToPdfOptions, type DocumentTree, type DocumentTreeJson, DocumentTreeSchema, 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 HeaderFooterPart, HeaderFooterPartSchema, 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, 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, PdfInternalLinkItem, 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 SectionHeaderFooterReferences, SectionHeaderFooterReferencesSchema, 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, documentSchemaKindOf, documentTreeWithSchema, docxPdfCodec, docxToMarkdown, docxToOdt, docxToPdf, docxToPptx, drawingOfBlock, elementChildren, elementLocalName, elementsWithTag, embeddedPresentationSerialiser, 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, 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
|
@@ -118,7 +118,7 @@ import { buildDocumentBytes, layoutDocumentFromPackage } from "./convert/from-pa
|
|
|
118
118
|
import { UnsupportedFontSourceFormatError, extractSourceFontsForFormat } from "./convert/document-fonts.js";
|
|
119
119
|
import { setDocumentMetadata } from "./metadata/write.js";
|
|
120
120
|
import { AttributeSchema, BinaryPartSchema, CommentSchema, CompactPackageSchema, CompactPartSchema, CompactXmlNodeSchema, DefinedNameSchema, FootnoteSchema, HeaderFooterPartSchema, NumberingDefinitionSchema, NumberingLevelSchema, PackageSchema, PartSchema, SectionHeaderFooterReferencesSchema, XmlCdataSchema, XmlCommentSchema, XmlDeclarationSchema, XmlElementSchema, XmlNodeSchema, XmlPartSchema, XmlPiSchema, XmlTextSchema, attr, base64ToBytes, buildXlsxPackageFromContent as 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";
|
|
121
|
-
import { COLOR_BLACK, 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,
|
|
121
|
+
import { COLOR_BLACK, 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, DocumentTreeSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, UnrecognizedDocumentSchemaError, cellReference, columnIndexToLetters, columnLettersToIndex, contentDocumentWithSchema, documentFromJson, documentSchemaKindOf, documentTreeWithSchema, isContentBlock, parseCellReference, parseRangeReference, rangeReference, rgbHexToColor, schemaUriFor } from "document-schema.js";
|
|
122
122
|
import { FontFaceParseError, LAYOUT_FORMAT_VERSION, LayoutDocumentSchema, NOOP_DIAGNOSTIC_SINK, PdfEncryptedError, PdfParseError, createFontMeasurer, createFontRegistry, createStandardFontMeasurer, loadMathFont, pdfCodec, readFontFace as describeFontFace, readPdf, writePdf } from "pdf-codec";
|
|
123
123
|
import { readOdbForm, readOdbInventory, readOdbReport, resolveOdbComponent } from "odf.js";
|
|
124
|
-
export { AttributeSchema, BinaryPartSchema, COLOR_BLACK, 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,
|
|
124
|
+
export { AttributeSchema, BinaryPartSchema, COLOR_BLACK, 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, DocumentTreeSchema, 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, HeaderFooterPartSchema, 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, PdfInternalLinkItem, 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, SectionHeaderFooterReferencesSchema, 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, documentSchemaKindOf, documentTreeWithSchema, docxPdfCodec, docxToMarkdown, docxToOdt, docxToPdf, docxToPptx, drawingOfBlock, elementChildren, elementLocalName, elementsWithTag, embeddedPresentationSerialiser, 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, 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/latex/lint.cjs
CHANGED
|
@@ -60,7 +60,7 @@ function collectBlockFormulas(blocks, locate, formulas) {
|
|
|
60
60
|
}
|
|
61
61
|
function lintMathCoherence(pkg) {
|
|
62
62
|
const warnings = [];
|
|
63
|
-
const content = (0, document_schema_js.
|
|
63
|
+
const content = (0, document_schema_js.flattenTree)(pkg);
|
|
64
64
|
const symbolEntries = content.symbolTable?.symbols;
|
|
65
65
|
const found = [];
|
|
66
66
|
if (content.kind === "formula") found.push({
|
package/dist/latex/lint.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { s as MathLintDiagnostic } from "../diagnostics-C5-bG09J.cjs";
|
|
2
|
-
import {
|
|
2
|
+
import { DocumentTree } from "document-schema.js";
|
|
3
3
|
//#region src/latex/lint.d.ts
|
|
4
|
-
declare function lintMathCoherence(pkg:
|
|
4
|
+
declare function lintMathCoherence(pkg: DocumentTree): readonly MathLintDiagnostic[];
|
|
5
5
|
//#endregion
|
|
6
6
|
export { lintMathCoherence };
|
package/dist/latex/lint.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { s as MathLintDiagnostic } from "../diagnostics-C5-bG09J.js";
|
|
2
|
-
import {
|
|
2
|
+
import { DocumentTree } from "document-schema.js";
|
|
3
3
|
//#region src/latex/lint.d.ts
|
|
4
|
-
declare function lintMathCoherence(pkg:
|
|
4
|
+
declare function lintMathCoherence(pkg: DocumentTree): readonly MathLintDiagnostic[];
|
|
5
5
|
//#endregion
|
|
6
6
|
export { lintMathCoherence };
|
package/dist/latex/lint.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { reduceRational } from "./rational.js";
|
|
2
2
|
import { lowerLatex } from "./lower.js";
|
|
3
|
-
import {
|
|
3
|
+
import { flattenTree } from "document-schema.js";
|
|
4
4
|
//#region src/latex/lint.ts
|
|
5
5
|
function isRecord(value) {
|
|
6
6
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -59,7 +59,7 @@ function collectBlockFormulas(blocks, locate, formulas) {
|
|
|
59
59
|
}
|
|
60
60
|
function lintMathCoherence(pkg) {
|
|
61
61
|
const warnings = [];
|
|
62
|
-
const content =
|
|
62
|
+
const content = flattenTree(pkg);
|
|
63
63
|
const symbolEntries = content.symbolTable?.symbols;
|
|
64
64
|
const found = [];
|
|
65
65
|
if (content.kind === "formula") found.push({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "js.documents",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "Bidirectional docx/pptx <-> PDF conversion and a read+write editable OOXML document model, built on ooxml.js and Zod 4 codecs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -78,12 +78,12 @@
|
|
|
78
78
|
"license": "MIT",
|
|
79
79
|
"dependencies": {
|
|
80
80
|
"byte-codec": "^1.1.13",
|
|
81
|
-
"document-schema.js": "^
|
|
81
|
+
"document-schema.js": "^5.0.0",
|
|
82
82
|
"fflate": "^0.8.3",
|
|
83
|
-
"markdown-codec": "^
|
|
84
|
-
"odf.js": "^
|
|
85
|
-
"ooxml.js": "^
|
|
86
|
-
"pdf-codec": "^3.4.
|
|
83
|
+
"markdown-codec": "^6.0.0",
|
|
84
|
+
"odf.js": "^6.0.0",
|
|
85
|
+
"ooxml.js": "^6.0.0",
|
|
86
|
+
"pdf-codec": "^3.4.4",
|
|
87
87
|
"temml": "0.13.4",
|
|
88
88
|
"zod": "^4.4.3"
|
|
89
89
|
},
|