document-schema 4.1.0 → 4.2.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.
Files changed (42) hide show
  1. package/README.md +35 -6
  2. package/dist/codec.d.cts +1 -1
  3. package/dist/codec.d.ts +1 -1
  4. package/dist/{construct-CdQuI9f5.d.cts → construct-D5pdDPqM.d.cts} +6 -6
  5. package/dist/{construct-CdQuI9f5.d.ts → construct-D5pdDPqM.d.ts} +6 -6
  6. package/dist/construct.d.cts +1 -1
  7. package/dist/construct.d.ts +1 -1
  8. package/dist/{content-CiZf6Fqn.d.ts → content-D3C14yyb.d.ts} +97 -9
  9. package/dist/content-json-schema-defs.cjs +36 -6
  10. package/dist/content-json-schema-defs.js +36 -6
  11. package/dist/{content-BN0PWqpt.d.cts → content-oSmH1_zP.d.cts} +97 -9
  12. package/dist/content.cjs +32 -0
  13. package/dist/content.d.cts +2 -2
  14. package/dist/content.d.ts +2 -2
  15. package/dist/content.js +28 -1
  16. package/dist/definitions.d.cts +1 -1
  17. package/dist/definitions.d.ts +1 -1
  18. package/dist/index.cjs +7 -0
  19. package/dist/index.d.cts +5 -5
  20. package/dist/index.d.ts +5 -5
  21. package/dist/index.js +3 -3
  22. package/dist/{math-B7gZJeND.d.cts → math-BlG8Tjk-.d.cts} +3 -3
  23. package/dist/{math-B7gZJeND.d.ts → math-BlG8Tjk-.d.ts} +3 -3
  24. package/dist/math.d.cts +1 -1
  25. package/dist/math.d.ts +1 -1
  26. package/dist/{package-node-DLUobcDQ.d.ts → package-node-B9qLyhk5.d.ts} +56 -53
  27. package/dist/{package-node-BiUEzIzl.d.cts → package-node-DUKZHgAg.d.cts} +56 -53
  28. package/dist/package-node.cjs +11 -4
  29. package/dist/package-node.d.cts +2 -2
  30. package/dist/package-node.d.ts +2 -2
  31. package/dist/package-node.js +11 -6
  32. package/dist/package.d.cts +7 -7
  33. package/dist/package.d.ts +7 -7
  34. package/dist/schema-io.cjs +2 -2
  35. package/dist/schema-io.d.cts +1 -1
  36. package/dist/schema-io.d.ts +1 -1
  37. package/dist/schema-io.js +2 -2
  38. package/dist/style.d.cts +2 -2
  39. package/dist/style.d.ts +2 -2
  40. package/package.json +1 -1
  41. package/schemas/content-document.schema.json +64 -9
  42. package/schemas/document-package.schema.json +64 -9
package/README.md CHANGED
@@ -48,11 +48,11 @@ graph TD
48
48
  style schema fill:#f9a825,stroke:#333,stroke-width:3px
49
49
  ```
50
50
 
51
- `ContentDocument` (the semantic pivot) is a discriminated union of five kinds: `wordprocessing` (docx/odt sections of paragraphs/runs/tables/images), `presentation` (pptx/odp slides of shapes), `spreadsheet` (xlsx/ods sheets of cells, columns, rows, print settings), `drawing` (odg pages of shapes plus vector primitives — rect/ellipse/line/path), and `formula` (an equation carrying its own MathML node tree plus StarMath source when the producing format had one, extended with the two-layer math model: an optional verbatim-LaTeX `presentation` authoritative for rendering, an optional semantic `content: MathExpression` tree authoritative for computation, and provenance — neither layer stored derived from the other, so editing one never silently mutates the other). `ContentEmbeddedObjectSchema` lets any of the five embed another whole `ContentDocument`. Every paragraph/run/image/table/shape/vector/spreadsheet-cell leaf also carries its own canonical `headingLevel`-or-position fields directly: a `ContentParagraph`'s optional `headingLevel` (1 = the outermost heading, independent of the round-trip-only `styleId`), and every such leaf's optional `frames: LayoutFrame[]` — that node's own rendered page position(s) (`pageIndex` plus PDF user-space `xPt`/`yPt`/`widthPt`/`heightPt`), fused directly onto the content tree once a layout pass has run. `DocumentPackage` is the single hierarchical artefact — structure, layout, and content fused in one tree (see [The package tree](#the-package-tree)): the root carries `kind`, `metadata`, the optional document-level `symbolTable` and rendered `pages`, the optional package-level `styles`/`definitions`/`layers`/`attachments`/`destinations` tables (see [Definitions tables and styles](#definitions-tables-and-styles)), and `children` — one group per top-level container with the content tree grouped inside it, where a group's node may also be one of the six fidelity construct descriptors (see [Fidelity constructs](#fidelity-constructs)); the schema does not keep populated `frames` fields and `pages` in sync or detect staleness, and does not check that a tree's `style` refs name table entries (both are producer responsibilities, exactly as the frames/pages pairing always was). Every one of the five kinds also accepts an optional document-level `symbolTable` — the math curation layer mapping each written symbol glyph (within a scope) to its id, quantity kind, preferred unit, and definition source, alongside the unit registry (SI dimension-exponent vectors, exact rational conversions, per-unit-system normalisation contexts) that the `qty` nodes of lowered formulas resolve against.
51
+ `ContentDocument` (the semantic pivot) is a discriminated union of five kinds: `wordprocessing` (docx/odt sections of paragraphs/runs/tables/images), `presentation` (pptx/odp slides of shapes), `spreadsheet` (xlsx/ods sheets of cells, columns, rows, print settings), `drawing` (odg pages of shapes plus vector primitives — rect/ellipse/line/path), and `formula` (an equation carrying its own MathML node tree plus StarMath source when the producing format had one, extended with the two-layer math model: an optional verbatim-LaTeX `presentation` authoritative for rendering, an optional semantic `content: MathExpression` tree authoritative for computation, and provenance — neither layer stored derived from the other, so editing one never silently mutates the other). `ContentEmbeddedObjectSchema` lets any of the five embed another whole `ContentDocument`. Every paragraph/run/image/table/shape/vector/spreadsheet-cell leaf also carries its own canonical `headingLevel`-or-position fields directly: a `ContentParagraph`'s optional `headingLevel` (1 = the outermost heading, independent of the round-trip-only `styleId`), and every such leaf's optional `frames: LayoutFrame[]` — that node's own rendered page position(s) (`pageIndex` plus PDF user-space `xPt`/`yPt`/`widthPt`/`heightPt`), fused directly onto the content tree once a layout pass has run. `DocumentPackage` is the single hierarchical artefact — structure, layout, and content fused in one tree (see [The package tree](#the-package-tree)): the root carries `kind`, `metadata`, the optional document-level `symbolTable` and rendered `pages`, the optional package-level `styles`/`definitions`/`layers`/`attachments`/`destinations` tables (see [Definitions tables and styles](#definitions-tables-and-styles)), and `children` — one group per top-level container with the content tree grouped inside it, where a group's node may also be one of the six fidelity construct descriptors, which the flat form carries instead as a matched `constructStart`/`constructEnd` block pair (see [Fidelity constructs](#fidelity-constructs)); the schema does not keep populated `frames` fields and `pages` in sync or detect staleness, and does not check that a tree's `style` refs name table entries (both are producer responsibilities, exactly as the frames/pages pairing always was). Every one of the five kinds also accepts an optional document-level `symbolTable` — the math curation layer mapping each written symbol glyph (within a scope) to its id, quantity kind, preferred unit, and definition source, alongside the unit registry (SI dimension-exponent vectors, exact rational conversions, per-unit-system normalisation contexts) that the `qty` nodes of lowered formulas resolve against.
52
52
 
53
53
  The `LayoutDocument` family (pages of positioned `LayoutItem`s — `text`/`image`/`rect`/`line`/`ellipse`/`path`/`link` in PDF user-space coordinates) no longer lives here: 4.0.0 demoted it to a pdf-codec-private model ([pdf-codec#65](https://github.com/ExaDev/pdf-codec/issues/65)), where the only codec that ever read or wrote it owns it outright. `documentFromJson` recognises old layout-document `$schema` URIs and throws a tombstone pointing at pdf-codec rather than failing as if the value were unrelated. Dependents stay on document-schema.js 3.x via semver until their own majors, so the demotion is not a cascade-breaker.
54
54
 
55
- The package contains only [Zod](https://zod.dev) schemas, their inferred types, trivial schema-attached helpers (hex-colour conversion, recursive structural type guards, the style-resolution helpers of `src/definitions.ts`), and one small structural interface (`ContentCodec`, see [Codecs](#codecs)). No XML, ZIP, PDF, or binary handling; the sole dependency is `zod`.
55
+ The package contains only [Zod](https://zod.dev) schemas, their inferred types, trivial schema-attached helpers (hex-colour conversion, recursive structural type guards, the style-resolution helpers of `src/definitions.ts`, the construct-marker balance check of `src/content.ts`), and one small structural interface (`ContentCodec`, see [Codecs](#codecs)). No XML, ZIP, PDF, or binary handling; the sole dependency is `zod`.
56
56
 
57
57
  Two format-agnostic helpers live here because they operate on the content model itself: cell-addressing utilities in `src/a1.ts` (0-based row/column indices, row-first order matching `ContentSheetCell`'s `{row, column}`) and the `FontFace` interface in `src/font-port.ts` (`{family, bold, italic}`).
58
58
 
@@ -91,7 +91,7 @@ const laidOut = DocumentPackageSchema.parse({ ...pkg, pages: [{ widthPt: 612, he
91
91
  `DocumentPackage` ([#20](https://github.com/ExaDev/document-schema.js/issues/20)) is the promoted single hierarchical artefact — one tree where 3.x carried `{ formatVersion, content, pages }` with the content flat. The tree's vocabulary is defined in `src/package-node.ts` and was proven first as [document-outline.js](https://github.com/ExaDev/document-outline.js)'s phase-1 `decompose`/`flatten` implementation ([document-outline.js#2](https://github.com/ExaDev/document-outline.js/issues/2)); this package's schemas are that shape's schema-home port, matching it node for node:
92
92
 
93
93
  - **Groups** are `{ node, children }` where `node` embeds either an anchor paragraph (heading groups and list-item groups carry the full `ContentParagraph` — runs, formatting, frames — never a projected text label) or a container descriptor: `{ kind: 'section', pageSize, margins }`, `{ kind: 'slide', size, notes }`, `{ kind: 'sheet', name, cells, columns, rows, printSettings }`, `{ kind: 'drawPage', size }`, each tagged with a `kind` the flat container type does not carry, or a shape group's untagged frame descriptor, or — since 4.1.0 — a **construct descriptor** (see [Fidelity constructs](#fidelity-constructs)).
94
- - **Bare leaves** carry their own `kind` and never `children`. Discrimination is structural on `node`+`children`, not on the presence of a `kind`.
94
+ - **Bare leaves** carry their own `kind` and never `children`. Discrimination is structural on `node`+`children`, not on the presence of a `kind`. Every `ContentBlock` kind is a legal leaf except the two construct boundary markers, which are the flat form's encoding of something the tree carries as a group (see [Constructs in the flat form](#constructs-in-the-flat-form)).
95
95
  - **Section groups are mandatory** — one per `ContentSection` — because a section carries pre-layout page geometry (`pageSize`/`margins`) that a rendered `pages` array cannot hold.
96
96
  - **Grouping never crosses container boundaries**: a shape is its own group with its inner blocks grouped inside it (never a slide's paragraphs flattened across its shapes — that is a TOC projection, not a decomposition); a sheet's grid rides on the sheet node with images and embedded documents as children; embedded documents stay intact as one leaf.
97
97
  - **Style refs ride on group wrappers only** — a group may carry `style: string` naming a `styles` table entry; `ContentDocument` nodes carry no ref field, so the flat codec-exchange form is always fully materialised.
@@ -108,7 +108,7 @@ The codecs do not change: they keep producing flat `ContentDocument`s (their nat
108
108
 
109
109
  Every format carries constructs the flat content model drops — docx SDTs and field codes, ODF fields and tracked changes, PDF form widgets and link annotations, markdown footnotes and link titles. [#22](https://github.com/ExaDev/document-schema.js/issues/22) replaces those per-repo caveats with one **harmonised semantic vocabulary**: no format-specific node kinds, ever. Four codec inventories ([ooxml.js#65](https://github.com/ExaDev/ooxml.js/issues/65), [odf.js#59](https://github.com/ExaDev/odf.js/issues/59), [markdown-codec#63](https://github.com/ExaDev/markdown-codec/issues/63), [pdf-codec#66](https://github.com/ExaDev/pdf-codec/issues/66)) audited what each format actually carries, and 4.1.0 lands their answer additively ([#24](https://github.com/ExaDev/document-schema.js/issues/24)) — new descriptor kinds and package tables, no change to any existing node shape, so a 4.0.0 tree parses unchanged.
110
110
 
111
- A construct is a group like any other: `{ node: <descriptor>, children }`, where the children are the extent the construct spans. The tree was designed construct-capable from day one for exactly this, which is why the kinds could land in a minor rather than a second structural break.
111
+ In the tree, a construct is a group like any other: `{ node: <descriptor>, children }`, where the children are the extent the construct spans. The tree was designed construct-capable from day one for exactly this, which is why the kinds could land in a minor rather than a second structural break. In the flat form — the shape every codec actually reads and writes — the same construct is a matched pair of boundary markers bracketing its extent (see [Constructs in the flat form](#constructs-in-the-flat-form) below).
112
112
 
113
113
  ```ts
114
114
  // A tracked insertion inside a docx content control, and a footnote marker whose body lives in the definitions table.
@@ -150,10 +150,39 @@ The six kinds (`src/construct.ts`):
150
150
  Four things bound the vocabulary, and each is a decision rather than an omission:
151
151
 
152
152
  - **Extents are block-scoped.** A construct group wraps the block flow of a section, heading group, shape, or list item. It cannot wrap a sub-sequence of one paragraph's runs, because a run-level extent is not expressible without changing `ContentParagraph`, and 4.1.0 changes no content shape. Run-level constructs keep their existing homes: **an external hyperlink stays on `ContentRun.hyperlink`** — `link` groups are for block-scoped and annotated extents a flat run field cannot express, never a replacement for it — and the inline field, bookmark, and tracked-change cases wait on a run-level mechanism rather than being forced into a wrapper that would split their paragraph.
153
- - **Two group variants, one per block flow.** `SectionConstructGroup` sits in a section's or heading group's flow and admits heading children; `ShapeConstructGroup` sits in a shape's or list item's and does not — exactly the `SectionChild`/`ShapeChild` split that already existed. A construct nests in and around every other group, so a `provenance` wrapper inside a `contentControl` inside a `division` is a legal (and real) docx shape. Constructs are **not** legal as direct children of a slide, sheet, drawing page, or the package root: those hold containers and leaves, not block flow.
153
+ - **Two group variants, one per block flow.** `SectionConstructGroup` sits in a section's or heading group's flow and admits heading children; `ShapeConstructGroup` sits in a shape's or list item's and does not — exactly the `SectionChild`/`ShapeChild` split that already existed. A construct nests in and around every other group, so a `provenance` wrapper inside a `contentControl` inside a `division` is a legal (and real) docx shape. Constructs are **not** legal as direct children of a slide, sheet, drawing page, or the package root: those hold containers and leaves, not block flow. The flat form's marker pair follows the same rule by construction: it is a `ContentBlock`, so it can only appear where block flow already runs.
154
154
  - **`division` is first-class, not degraded.** [#24](https://github.com/ExaDev/document-schema.js/issues/24) posed ODF `text:section` as a choice between a new generic kind and degrading to `contentControl` with the specifics in residue. It is first-class, on the odf inventory's own recommendation: `ContentSection` cannot host it (that is page geometry, one `pageSize`/`margins` pair, and it does not nest, while a division nests arbitrarily and usually changes no page geometry at all), and burying a structural container in the form-control vocabulary would make `contentControl` mean two unrelated things. It clears #22's no-format-specific-kinds bar on a real analogue — tagged PDF's `/Sect` and `/Div` are the same construct — not on ODF's say-so. It is spelled `division` rather than `section` because `{ kind: 'section' }` is already the page-geometry container descriptor.
155
155
  - **Residue is not here.** #22's channel 2 — a per-node and package-level `source: { format, xml }` facility for what has no cross-format meaning — spans the whole content model and remains open on #22. Descriptors are closed objects with no escape hatch, deliberately: a descriptor-only residue field would mint exactly the parallel shape the general facility exists to avoid.
156
156
 
157
+ ### Constructs in the flat form
158
+
159
+ The tree has a wrapper node to hang an extent off; the flat `ContentDocument` does not — a section's, shape's, or table cell's content is one block list and nothing else. So the flat encoding of a construct is a **matched pair of boundary markers** bracketing the blocks it spans, added to `ContentBlock` as two new kinds (`src/content.ts`):
160
+
161
+ ```ts
162
+ import type { ContentBlock } from 'document-schema.js';
163
+
164
+ // The flat form of the same construct region the tree example above carries as nested groups: a tracked
165
+ // insertion and a footnote marker, both inside one content control.
166
+ const blocks: ContentBlock[] = [
167
+ { kind: 'constructStart', descriptor: { kind: 'contentControl', controlType: 'richText', tag: 'ClientBlock', lock: 'container' } },
168
+ { kind: 'constructStart', descriptor: { kind: 'provenance', change: 'insertion', author: 'A. Reviewer', dateIso: '2026-08-18T09:00:00Z' } },
169
+ { kind: 'paragraph', runs: [{ text: 'Inserted sentence.' }] },
170
+ { kind: 'constructEnd' },
171
+ { kind: 'constructStart', descriptor: { kind: 'anchor', anchorType: 'footnote', name: '1', definition: 'n1' } },
172
+ { kind: 'constructEnd' },
173
+ { kind: 'constructEnd' },
174
+ ];
175
+ ```
176
+
177
+ This is what makes the descriptor vocabulary reachable at all from the shape a codec produces: every codec reads and writes `ContentDocument`, so a construct facility wired only onto the tree is a facility no codec can emit into. `decompose` promotes each matched pair into the construct group the tree already has, and `flatten` emits the pair back.
178
+
179
+ - **Pairing is ordinary bracket matching.** A `constructEnd` closes the nearest preceding still-open `constructStart` in the **same block list**, and the blocks between them are the extent. That is the entire mechanism — there is deliberately **no id, name, or other pairing key** on either marker. An id would have to be minted by whichever producer emitted the pair and then reproduced byte-for-byte by `flatten` to satisfy law 1 above, and a construct group carries a descriptor and its children and nothing else, so the id would be a value with no home on the tree side and no deterministic way back. A bare bracket has nothing to reproduce and nothing to get wrong, and bracket matching already generalises to arbitrary nesting depth and to different construct kinds nested inside each other.
180
+ - **Matching never straddles a block list.** A pair opened in a section's blocks closes in that same array; a pair opened inside a table cell closes inside that cell. That cell is also where a construct inside a table is expressible in *either* encoding, because decomposition treats a table as one leaf and never descends into it — so a cell's block list stays flat in a tree too, markers and all.
181
+ - **An unbalanced list is invalid input, not a shape to repair.** A close with nothing open, or a start still open when the list ends, is malformed: `decompose` throws rather than inventing a boundary. `findConstructMarkerImbalance(blocks)` is the one shared definition of that check — it returns `{ kind: 'unmatchedEnd' | 'unclosedStart', index }` for the first fault or `undefined` when the list balances, and it exists here because a codec emitting pairs, another reading them, and `decompose` promoting them must all agree on exactly one answer, and no schema can express balance (it is a property of a list's sequence, not of any block in it). It is deliberately non-recursive: each block list is its own bracket scope, so a caller walking nested lists calls it once per list. Balance is checked here, not by the schema — `ContentDocumentSchema.parse` still accepts a section whose blocks carry an unmatched marker (pinned by a dedicated test), since a Zod-only refinement expressing balance would validate against a rule the published `content-document.schema.json` fragment cannot express and so would silently diverge from it.
182
+ - **Balance is necessary but not sufficient — an extent must not cross a heading-group or list-group scope boundary.** Headings and list items have no delimiter of their own in the flat form; a heading paragraph's scope runs until the next paragraph whose `headingLevel` is shallower than or equal to its own, and a list item's scope runs until nesting shallows back out — exactly the nesting `decompose` infers when it builds `HeadingGroupNode`/`ListGroupNode`. A pair whose extent contains a paragraph that closes a scope open before the pair started gives `decompose` no single correct tree: nesting the construct group inside the closing scope strands that paragraph with no legal parent, and closing the scope at the `constructStart` and hoisting the construct group out silently moves everything after that paragraph out of a scope it belonged to. `findConstructMarkerImbalance` cannot see this — balance is a property of the marker pair alone, not of what sits between the two markers — so this package does not check it either; `decompose` is the sole enforcement point, since only it walks the heading/list nesting needed to detect a crossing, and it must reject a crossing extent exactly as it already rejects an unbalanced one, rather than silently picking between the two divergent trees. A producer (`ooxml.js`, `odf.js`, `markdown-codec`, `pdf-codec`) must never open a marker pair inside a heading or list scope that some other block inside the extent goes on to close.
183
+ - **A marker carries nothing but its kind and (on the open half) its descriptor.** No `frames` or `sourcePath` — a boundary renders nothing, occupies no space, and has no position — and no `style` ref, since refs are tree-only and a construct group's own ref never resolves onto the construct anyway; it only extends the chain passed to its children, which already carry their own resolved properties.
184
+ - **The tree refuses markers at leaf positions.** `PackageBlockLeaf` (`src/package-node.ts`) is `ContentBlock` minus the two marker kinds, and every block-flow child position uses it. A construct is a *group* in the tree; admitting the marker pair there as well would put one fact in two encodings inside one tree, and `decompose(flatten(x)) === x` could never hold for it. Table cells are not an exception to this — a cell's blocks are flat in both encodings, so nothing there crosses the boundary.
185
+
157
186
  Two harmonisations the inventories asked for are also deliberately absent. There is **no `fieldType` enum**: `instruction` is required and verbatim, so nothing is lost without one, and #24 asks for exactly one new vocabulary — `link`'s internal targets — rather than one per kind, with the four inventories' own corpus gate still standing before a field-type member set could be frozen honestly. And a **sheet-scoped named range** (xlsx defined names and tables, ODF `table:named-expressions`) is a definitions-table entry, not an `anchor`: a sheet group's children are its images and embedded documents, never a block flow, so there is no extent for an anchor to wrap — which is the odf inventory's own verdict for the identical construct.
158
187
 
159
188
  ## Definitions tables and styles
@@ -212,7 +241,7 @@ node_modules/document-schema.js/schemas/document-package.schema.json
212
241
  node_modules/document-schema.js/schemas/content-document.schema.json
213
242
  ```
214
243
 
215
- Each file's `$id` is a jsdelivr URL pinned to the exact npm version — immutable and live on publish, and (see [Versioning by `$schema`](#versioning-by-schema)) the version of anything stamped with it. Both files carry the same hand-authored `$defs` block (the same object emitted twice in one generator run, so the copies cannot drift), covering the recursive paragraph/table/embedded-object, MathML, and package-tree node models that Zod's converter cannot express directly; `content-json-schema-defs.ts` holds those fragments, and a regression test compares each fragment that has a real Zod counterpart against a live `z.toJSONSchema()` of that schema so a field changed without updating its fragment fails a test. The one deliberate cross-file `$ref` is the embedded-object cycle back to a whole `ContentDocument`. Fragments downstream of a `z.custom()` node (`ContentBlock`, `ContentTable`/`Cell`/`Row`, `ContentEmbeddedObject(Block)`, the nine package-tree group wrappers, `MathMlNode`/`Element`/`Attribute`, `ContentFormula`, `MathExpression` and its recursive variants) still need hand re-verification — the construct descriptors themselves do not, since each is a plain `z.strictObject` reaching no opaque node and is held to the live comparison against `src/content.ts`/`src/package-node.ts`/`src/mathml.ts`/`src/math.ts` — see below.
244
+ Each file's `$id` is a jsdelivr URL pinned to the exact npm version — immutable and live on publish, and (see [Versioning by `$schema`](#versioning-by-schema)) the version of anything stamped with it. Both files carry the same hand-authored `$defs` block (the same object emitted twice in one generator run, so the copies cannot drift), covering the recursive paragraph/table/embedded-object, MathML, and package-tree node models that Zod's converter cannot express directly; `content-json-schema-defs.ts` holds those fragments, and a regression test compares each fragment that has a real Zod counterpart against a live `z.toJSONSchema()` of that schema so a field changed without updating its fragment fails a test. The one deliberate cross-file `$ref` is the embedded-object cycle back to a whole `ContentDocument`. Fragments downstream of a `z.custom()` node (`ContentBlock` and the tree's marker-free `PackageBlockLeaf`, `ContentTable`/`Cell`/`Row`, `ContentEmbeddedObject(Block)`, the nine package-tree group wrappers, `MathMlNode`/`Element`/`Attribute`, `ContentFormula`, `MathExpression` and its recursive variants) still need hand re-verification — the construct descriptors and the two boundary markers do not, since each is a plain `z.object`/`z.strictObject` reaching no opaque node and is held to the live comparison against `src/content.ts`/`src/package-node.ts`/`src/mathml.ts`/`src/math.ts` — see below.
216
245
 
217
246
  ### `z.custom()` vs `z.lazy()` for recursive schemas
218
247
 
package/dist/codec.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { l as ContentDocument } from "./content-BN0PWqpt.cjs";
1
+ import { m as ContentDocument } from "./content-oSmH1_zP.cjs";
2
2
  //#region src/codec.d.ts
3
3
  interface ContentCodec<TOptions = unknown> {
4
4
  read(bytes: Uint8Array, options?: TOptions): ContentDocument;
package/dist/codec.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { l as ContentDocument } from "./content-CiZf6Fqn.js";
1
+ import { m as ContentDocument } from "./content-D3C14yyb.js";
2
2
  //#region src/codec.d.ts
3
3
  interface ContentCodec<TOptions = unknown> {
4
4
  read(bytes: Uint8Array, options?: TOptions): ContentDocument;
@@ -1,12 +1,12 @@
1
1
  import { z } from "zod";
2
2
  //#region src/construct.d.ts
3
3
  declare const ContentControlTypeSchema: z.ZodEnum<{
4
+ date: "date";
4
5
  richText: "richText";
5
6
  plainText: "plainText";
6
7
  checkbox: "checkbox";
7
8
  dropDown: "dropDown";
8
9
  comboBox: "comboBox";
9
- date: "date";
10
10
  picture: "picture";
11
11
  repeatingSection: "repeatingSection";
12
12
  button: "button";
@@ -23,12 +23,12 @@ type ContentControlLock = z.infer<typeof ContentControlLockSchema>;
23
23
  declare const ContentControlDescriptorSchema: z.ZodObject<{
24
24
  kind: z.ZodLiteral<"contentControl">;
25
25
  controlType: z.ZodEnum<{
26
+ date: "date";
26
27
  richText: "richText";
27
28
  plainText: "plainText";
28
29
  checkbox: "checkbox";
29
30
  dropDown: "dropDown";
30
31
  comboBox: "comboBox";
31
- date: "date";
32
32
  picture: "picture";
33
33
  repeatingSection: "repeatingSection";
34
34
  button: "button";
@@ -54,19 +54,19 @@ declare const FieldDescriptorSchema: z.ZodObject<{
54
54
  }, z.core.$strict>;
55
55
  type FieldDescriptor = z.infer<typeof FieldDescriptorSchema>;
56
56
  declare const AnchorTypeSchema: z.ZodEnum<{
57
+ comment: "comment";
57
58
  bookmark: "bookmark";
58
59
  footnote: "footnote";
59
60
  endnote: "endnote";
60
- comment: "comment";
61
61
  }>;
62
62
  type AnchorType = z.infer<typeof AnchorTypeSchema>;
63
63
  declare const AnchorDescriptorSchema: z.ZodObject<{
64
64
  kind: z.ZodLiteral<"anchor">;
65
65
  anchorType: z.ZodEnum<{
66
+ comment: "comment";
66
67
  bookmark: "bookmark";
67
68
  footnote: "footnote";
68
69
  endnote: "endnote";
69
- comment: "comment";
70
70
  }>;
71
71
  name: z.ZodString;
72
72
  definition: z.ZodOptional<z.ZodString>;
@@ -132,12 +132,12 @@ type DivisionDescriptor = z.infer<typeof DivisionDescriptorSchema>;
132
132
  declare const ConstructDescriptorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
133
133
  kind: z.ZodLiteral<"contentControl">;
134
134
  controlType: z.ZodEnum<{
135
+ date: "date";
135
136
  richText: "richText";
136
137
  plainText: "plainText";
137
138
  checkbox: "checkbox";
138
139
  dropDown: "dropDown";
139
140
  comboBox: "comboBox";
140
- date: "date";
141
141
  picture: "picture";
142
142
  repeatingSection: "repeatingSection";
143
143
  button: "button";
@@ -161,10 +161,10 @@ declare const ConstructDescriptorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
161
161
  }, z.core.$strict>, z.ZodObject<{
162
162
  kind: z.ZodLiteral<"anchor">;
163
163
  anchorType: z.ZodEnum<{
164
+ comment: "comment";
164
165
  bookmark: "bookmark";
165
166
  footnote: "footnote";
166
167
  endnote: "endnote";
167
- comment: "comment";
168
168
  }>;
169
169
  name: z.ZodString;
170
170
  definition: z.ZodOptional<z.ZodString>;
@@ -1,12 +1,12 @@
1
1
  import { z } from "zod";
2
2
  //#region src/construct.d.ts
3
3
  declare const ContentControlTypeSchema: z.ZodEnum<{
4
+ date: "date";
4
5
  richText: "richText";
5
6
  plainText: "plainText";
6
7
  checkbox: "checkbox";
7
8
  dropDown: "dropDown";
8
9
  comboBox: "comboBox";
9
- date: "date";
10
10
  picture: "picture";
11
11
  repeatingSection: "repeatingSection";
12
12
  button: "button";
@@ -23,12 +23,12 @@ type ContentControlLock = z.infer<typeof ContentControlLockSchema>;
23
23
  declare const ContentControlDescriptorSchema: z.ZodObject<{
24
24
  kind: z.ZodLiteral<"contentControl">;
25
25
  controlType: z.ZodEnum<{
26
+ date: "date";
26
27
  richText: "richText";
27
28
  plainText: "plainText";
28
29
  checkbox: "checkbox";
29
30
  dropDown: "dropDown";
30
31
  comboBox: "comboBox";
31
- date: "date";
32
32
  picture: "picture";
33
33
  repeatingSection: "repeatingSection";
34
34
  button: "button";
@@ -54,19 +54,19 @@ declare const FieldDescriptorSchema: z.ZodObject<{
54
54
  }, z.core.$strict>;
55
55
  type FieldDescriptor = z.infer<typeof FieldDescriptorSchema>;
56
56
  declare const AnchorTypeSchema: z.ZodEnum<{
57
+ comment: "comment";
57
58
  bookmark: "bookmark";
58
59
  footnote: "footnote";
59
60
  endnote: "endnote";
60
- comment: "comment";
61
61
  }>;
62
62
  type AnchorType = z.infer<typeof AnchorTypeSchema>;
63
63
  declare const AnchorDescriptorSchema: z.ZodObject<{
64
64
  kind: z.ZodLiteral<"anchor">;
65
65
  anchorType: z.ZodEnum<{
66
+ comment: "comment";
66
67
  bookmark: "bookmark";
67
68
  footnote: "footnote";
68
69
  endnote: "endnote";
69
- comment: "comment";
70
70
  }>;
71
71
  name: z.ZodString;
72
72
  definition: z.ZodOptional<z.ZodString>;
@@ -132,12 +132,12 @@ type DivisionDescriptor = z.infer<typeof DivisionDescriptorSchema>;
132
132
  declare const ConstructDescriptorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
133
133
  kind: z.ZodLiteral<"contentControl">;
134
134
  controlType: z.ZodEnum<{
135
+ date: "date";
135
136
  richText: "richText";
136
137
  plainText: "plainText";
137
138
  checkbox: "checkbox";
138
139
  dropDown: "dropDown";
139
140
  comboBox: "comboBox";
140
- date: "date";
141
141
  picture: "picture";
142
142
  repeatingSection: "repeatingSection";
143
143
  button: "button";
@@ -161,10 +161,10 @@ declare const ConstructDescriptorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
161
161
  }, z.core.$strict>, z.ZodObject<{
162
162
  kind: z.ZodLiteral<"anchor">;
163
163
  anchorType: z.ZodEnum<{
164
+ comment: "comment";
164
165
  bookmark: "bookmark";
165
166
  footnote: "footnote";
166
167
  endnote: "endnote";
167
- comment: "comment";
168
168
  }>;
169
169
  name: z.ZodString;
170
170
  definition: z.ZodOptional<z.ZodString>;
@@ -1,2 +1,2 @@
1
- import { C as ProvenanceChange, E as ProvenanceDescriptorSchema, S as LinkTargetSchema, T as ProvenanceDescriptor, _ as FieldDescriptor, a as ConstructDescriptor, b as LinkDescriptorSchema, c as ContentControlDescriptorSchema, d as ContentControlType, f as ContentControlTypeSchema, g as DivisionSourceSchema, h as DivisionSource, i as AnchorTypeSchema, l as ContentControlLock, m as DivisionDescriptorSchema, n as AnchorDescriptorSchema, o as ConstructDescriptorSchema, p as DivisionDescriptor, r as AnchorType, s as ContentControlDescriptor, t as AnchorDescriptor, u as ContentControlLockSchema, v as FieldDescriptorSchema, w as ProvenanceChangeSchema, x as LinkTarget, y as LinkDescriptor } from "./construct-CdQuI9f5.cjs";
1
+ import { C as ProvenanceChange, E as ProvenanceDescriptorSchema, S as LinkTargetSchema, T as ProvenanceDescriptor, _ as FieldDescriptor, a as ConstructDescriptor, b as LinkDescriptorSchema, c as ContentControlDescriptorSchema, d as ContentControlType, f as ContentControlTypeSchema, g as DivisionSourceSchema, h as DivisionSource, i as AnchorTypeSchema, l as ContentControlLock, m as DivisionDescriptorSchema, n as AnchorDescriptorSchema, o as ConstructDescriptorSchema, p as DivisionDescriptor, r as AnchorType, s as ContentControlDescriptor, t as AnchorDescriptor, u as ContentControlLockSchema, v as FieldDescriptorSchema, w as ProvenanceChangeSchema, x as LinkTarget, y as LinkDescriptor } from "./construct-D5pdDPqM.cjs";
2
2
  export { AnchorDescriptor, AnchorDescriptorSchema, AnchorType, AnchorTypeSchema, ConstructDescriptor, ConstructDescriptorSchema, ContentControlDescriptor, ContentControlDescriptorSchema, ContentControlLock, ContentControlLockSchema, ContentControlType, ContentControlTypeSchema, DivisionDescriptor, DivisionDescriptorSchema, DivisionSource, DivisionSourceSchema, FieldDescriptor, FieldDescriptorSchema, LinkDescriptor, LinkDescriptorSchema, LinkTarget, LinkTargetSchema, ProvenanceChange, ProvenanceChangeSchema, ProvenanceDescriptor, ProvenanceDescriptorSchema };
@@ -1,2 +1,2 @@
1
- import { C as ProvenanceChange, E as ProvenanceDescriptorSchema, S as LinkTargetSchema, T as ProvenanceDescriptor, _ as FieldDescriptor, a as ConstructDescriptor, b as LinkDescriptorSchema, c as ContentControlDescriptorSchema, d as ContentControlType, f as ContentControlTypeSchema, g as DivisionSourceSchema, h as DivisionSource, i as AnchorTypeSchema, l as ContentControlLock, m as DivisionDescriptorSchema, n as AnchorDescriptorSchema, o as ConstructDescriptorSchema, p as DivisionDescriptor, r as AnchorType, s as ContentControlDescriptor, t as AnchorDescriptor, u as ContentControlLockSchema, v as FieldDescriptorSchema, w as ProvenanceChangeSchema, x as LinkTarget, y as LinkDescriptor } from "./construct-CdQuI9f5.js";
1
+ import { C as ProvenanceChange, E as ProvenanceDescriptorSchema, S as LinkTargetSchema, T as ProvenanceDescriptor, _ as FieldDescriptor, a as ConstructDescriptor, b as LinkDescriptorSchema, c as ContentControlDescriptorSchema, d as ContentControlType, f as ContentControlTypeSchema, g as DivisionSourceSchema, h as DivisionSource, i as AnchorTypeSchema, l as ContentControlLock, m as DivisionDescriptorSchema, n as AnchorDescriptorSchema, o as ConstructDescriptorSchema, p as DivisionDescriptor, r as AnchorType, s as ContentControlDescriptor, t as AnchorDescriptor, u as ContentControlLockSchema, v as FieldDescriptorSchema, w as ProvenanceChangeSchema, x as LinkTarget, y as LinkDescriptor } from "./construct-D5pdDPqM.js";
2
2
  export { AnchorDescriptor, AnchorDescriptorSchema, AnchorType, AnchorTypeSchema, ConstructDescriptor, ConstructDescriptorSchema, ContentControlDescriptor, ContentControlDescriptorSchema, ContentControlLock, ContentControlLockSchema, ContentControlType, ContentControlTypeSchema, DivisionDescriptor, DivisionDescriptorSchema, DivisionSource, DivisionSourceSchema, FieldDescriptor, FieldDescriptorSchema, LinkDescriptor, LinkDescriptorSchema, LinkTarget, LinkTargetSchema, ProvenanceChange, ProvenanceChangeSchema, ProvenanceDescriptor, ProvenanceDescriptorSchema };
@@ -1,5 +1,5 @@
1
1
  import { d as MathMlNode } from "./mathml-B1oTCtzc.js";
2
- import { s as MathExpression } from "./math-B7gZJeND.js";
2
+ import { s as MathExpression } from "./math-BlG8Tjk-.js";
3
3
  import { n as Color } from "./color-AELCDH_b.js";
4
4
  import { r as LayoutFrame, t as Box } from "./geometry-CvcjSwnA.js";
5
5
  import { z } from "zod";
@@ -121,6 +121,84 @@ declare const ContentPageBreakSchema: z.ZodObject<{
121
121
  }, z.core.$strip>>>;
122
122
  }, z.core.$strip>;
123
123
  type ContentPageBreak = z.infer<typeof ContentPageBreakSchema>;
124
+ declare const ContentConstructStartSchema: z.ZodObject<{
125
+ kind: z.ZodLiteral<"constructStart">;
126
+ descriptor: z.ZodDiscriminatedUnion<[z.ZodObject<{
127
+ kind: z.ZodLiteral<"contentControl">;
128
+ controlType: z.ZodEnum<{
129
+ date: "date";
130
+ richText: "richText";
131
+ plainText: "plainText";
132
+ checkbox: "checkbox";
133
+ dropDown: "dropDown";
134
+ comboBox: "comboBox";
135
+ picture: "picture";
136
+ repeatingSection: "repeatingSection";
137
+ button: "button";
138
+ index: "index";
139
+ group: "group";
140
+ }>;
141
+ tag: z.ZodOptional<z.ZodString>;
142
+ alias: z.ZodOptional<z.ZodString>;
143
+ lock: z.ZodOptional<z.ZodEnum<{
144
+ content: "content";
145
+ container: "container";
146
+ both: "both";
147
+ }>>;
148
+ value: z.ZodOptional<z.ZodString>;
149
+ checked: z.ZodOptional<z.ZodBoolean>;
150
+ options: z.ZodOptional<z.ZodArray<z.ZodString>>;
151
+ }, z.core.$strict>, z.ZodObject<{
152
+ kind: z.ZodLiteral<"field">;
153
+ instruction: z.ZodString;
154
+ cachedResult: z.ZodOptional<z.ZodString>;
155
+ }, z.core.$strict>, z.ZodObject<{
156
+ kind: z.ZodLiteral<"anchor">;
157
+ anchorType: z.ZodEnum<{
158
+ comment: "comment";
159
+ bookmark: "bookmark";
160
+ footnote: "footnote";
161
+ endnote: "endnote";
162
+ }>;
163
+ name: z.ZodString;
164
+ definition: z.ZodOptional<z.ZodString>;
165
+ }, z.core.$strict>, z.ZodObject<{
166
+ kind: z.ZodLiteral<"link">;
167
+ target: z.ZodDiscriminatedUnion<[z.ZodObject<{
168
+ kind: z.ZodLiteral<"external">;
169
+ uri: z.ZodString;
170
+ }, z.core.$strict>, z.ZodObject<{
171
+ kind: z.ZodLiteral<"internal">;
172
+ anchor: z.ZodString;
173
+ }, z.core.$strict>], "kind">;
174
+ title: z.ZodOptional<z.ZodString>;
175
+ }, z.core.$strict>, z.ZodObject<{
176
+ kind: z.ZodLiteral<"provenance">;
177
+ change: z.ZodEnum<{
178
+ insertion: "insertion";
179
+ deletion: "deletion";
180
+ moveFrom: "moveFrom";
181
+ moveTo: "moveTo";
182
+ formatChange: "formatChange";
183
+ }>;
184
+ author: z.ZodOptional<z.ZodString>;
185
+ dateIso: z.ZodOptional<z.ZodString>;
186
+ }, z.core.$strict>, z.ZodObject<{
187
+ kind: z.ZodLiteral<"division">;
188
+ name: z.ZodOptional<z.ZodString>;
189
+ columnCount: z.ZodOptional<z.ZodNumber>;
190
+ protected: z.ZodOptional<z.ZodBoolean>;
191
+ source: z.ZodOptional<z.ZodObject<{
192
+ href: z.ZodString;
193
+ sectionName: z.ZodOptional<z.ZodString>;
194
+ }, z.core.$strict>>;
195
+ }, z.core.$strict>], "kind">;
196
+ }, z.core.$strip>;
197
+ type ContentConstructStart = z.infer<typeof ContentConstructStartSchema>;
198
+ declare const ContentConstructEndSchema: z.ZodObject<{
199
+ kind: z.ZodLiteral<"constructEnd">;
200
+ }, z.core.$strip>;
201
+ type ContentConstructEnd = z.infer<typeof ContentConstructEndSchema>;
124
202
  interface ContentTableCell {
125
203
  blocks: ContentBlock[];
126
204
  colSpan?: number;
@@ -156,11 +234,21 @@ interface ContentEmbeddedObjectBlock extends ContentEmbeddedObject {
156
234
  sourcePath?: string;
157
235
  frames?: LayoutFrame[];
158
236
  }
159
- type ContentBlock = ContentParagraph | ContentTable | ContentImageBlock | ContentPageBreak | ContentEmbeddedObjectBlock;
237
+ type ContentBlock = ContentParagraph | ContentTable | ContentImageBlock | ContentPageBreak | ContentEmbeddedObjectBlock | ContentConstructStart | ContentConstructEnd;
238
+ declare function isContentConstructStart(value: unknown): value is ContentConstructStart;
239
+ declare function isContentConstructEnd(value: unknown): value is ContentConstructEnd;
160
240
  declare function isContentBlock(value: unknown): value is ContentBlock;
161
241
  declare const ContentBlockSchema: z.ZodCustom<ContentBlock, ContentBlock>;
162
242
  declare const ContentEmbeddedObjectSchema: z.ZodCustom<ContentEmbeddedObject, ContentEmbeddedObject>;
163
243
  declare const ContentEmbeddedObjectBlockSchema: z.ZodCustom<ContentEmbeddedObjectBlock, ContentEmbeddedObjectBlock>;
244
+ type ConstructMarkerImbalance = {
245
+ kind: 'unmatchedEnd';
246
+ index: number;
247
+ } | {
248
+ kind: 'unclosedStart';
249
+ index: number;
250
+ };
251
+ declare function findConstructMarkerImbalance(blocks: readonly ContentBlock[]): ConstructMarkerImbalance | undefined;
164
252
  declare const ContentStrokeStyleSchema: z.ZodEnum<{
165
253
  solid: "solid";
166
254
  dashed: "dashed";
@@ -1580,9 +1668,9 @@ declare const contentDocumentSharedFields: {
1580
1668
  symbol: z.ZodString;
1581
1669
  name: z.ZodOptional<z.ZodString>;
1582
1670
  dimension: z.ZodRecord<z.ZodEnum<{
1583
- time: "time";
1584
1671
  length: "length";
1585
1672
  mass: "mass";
1673
+ time: "time";
1586
1674
  electricCurrent: "electricCurrent";
1587
1675
  thermodynamicTemperature: "thermodynamicTemperature";
1588
1676
  amountOfSubstance: "amountOfSubstance";
@@ -1638,9 +1726,9 @@ declare const ContentDocumentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1638
1726
  symbol: z.ZodString;
1639
1727
  name: z.ZodOptional<z.ZodString>;
1640
1728
  dimension: z.ZodRecord<z.ZodEnum<{
1641
- time: "time";
1642
1729
  length: "length";
1643
1730
  mass: "mass";
1731
+ time: "time";
1644
1732
  electricCurrent: "electricCurrent";
1645
1733
  thermodynamicTemperature: "thermodynamicTemperature";
1646
1734
  amountOfSubstance: "amountOfSubstance";
@@ -1726,9 +1814,9 @@ declare const ContentDocumentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1726
1814
  symbol: z.ZodString;
1727
1815
  name: z.ZodOptional<z.ZodString>;
1728
1816
  dimension: z.ZodRecord<z.ZodEnum<{
1729
- time: "time";
1730
1817
  length: "length";
1731
1818
  mass: "mass";
1819
+ time: "time";
1732
1820
  electricCurrent: "electricCurrent";
1733
1821
  thermodynamicTemperature: "thermodynamicTemperature";
1734
1822
  amountOfSubstance: "amountOfSubstance";
@@ -2015,9 +2103,9 @@ declare const ContentDocumentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2015
2103
  symbol: z.ZodString;
2016
2104
  name: z.ZodOptional<z.ZodString>;
2017
2105
  dimension: z.ZodRecord<z.ZodEnum<{
2018
- time: "time";
2019
2106
  length: "length";
2020
2107
  mass: "mass";
2108
+ time: "time";
2021
2109
  electricCurrent: "electricCurrent";
2022
2110
  thermodynamicTemperature: "thermodynamicTemperature";
2023
2111
  amountOfSubstance: "amountOfSubstance";
@@ -2279,9 +2367,9 @@ declare const ContentDocumentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2279
2367
  symbol: z.ZodString;
2280
2368
  name: z.ZodOptional<z.ZodString>;
2281
2369
  dimension: z.ZodRecord<z.ZodEnum<{
2282
- time: "time";
2283
2370
  length: "length";
2284
2371
  mass: "mass";
2372
+ time: "time";
2285
2373
  electricCurrent: "electricCurrent";
2286
2374
  thermodynamicTemperature: "thermodynamicTemperature";
2287
2375
  amountOfSubstance: "amountOfSubstance";
@@ -2347,9 +2435,9 @@ declare const ContentDocumentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2347
2435
  symbol: z.ZodString;
2348
2436
  name: z.ZodOptional<z.ZodString>;
2349
2437
  dimension: z.ZodRecord<z.ZodEnum<{
2350
- time: "time";
2351
2438
  length: "length";
2352
2439
  mass: "mass";
2440
+ time: "time";
2353
2441
  electricCurrent: "electricCurrent";
2354
2442
  thermodynamicTemperature: "thermodynamicTemperature";
2355
2443
  amountOfSubstance: "amountOfSubstance";
@@ -2390,4 +2478,4 @@ declare const ContentDocumentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2390
2478
  }, z.core.$strip>], "kind">;
2391
2479
  type ContentDocument = z.infer<typeof ContentDocumentSchema>;
2392
2480
  //#endregion
2393
- export { ContentSheetRow as $, ContentPathSegment as A, ContentSheetCellComment as B, ContentListMembershipSchema as C, isContentBlock as Ct, ContentParagraphSchema as D, ContentParagraph as E, ContentSectionSchema as F, ContentSheetImage as G, ContentSheetCellSchema as H, ContentShape as I, ContentSheetPrintRangeSchema as J, ContentSheetImageSchema as K, ContentShapeSchema as L, ContentRun as M, ContentRunSchema as N, ContentPathPoint as O, ContentSection as P, ContentSheetRepeatRangeSchema as Q, ContentSheet as R, ContentListMembership as S, contentDocumentSharedFields as St, ContentPageBreakSchema as T, ContentSheetColumn as U, ContentSheetCellCommentSchema as V, ContentSheetColumnSchema as W, ContentSheetPrintSettingsSchema as X, ContentSheetPrintSettings as Y, ContentSheetRepeatRange as Z, ContentEmbeddedObjectSchema as _, ContentVectorSchema as _t, ContentCellBorders as a, ContentStrokeSchema as at, ContentImageBlock as b, FusedNode as bt, ContentCellValueSchema as c, ContentSubpath as ct, ContentDrawPage as d, ContentTableCell as dt, ContentSheetRowSchema as et, ContentDrawPageSchema as f, ContentTableCellSchema as ft, ContentEmbeddedObjectKind as g, ContentVector as gt, ContentEmbeddedObjectBlockSchema as h, ContentTableSchema as ht, ContentBorderSchema as i, ContentStroke as it, ContentPathSegmentSchema as j, ContentPathPointSchema as k, ContentDocument as l, ContentSubpathSchema as lt, ContentEmbeddedObjectBlock as m, ContentTableRowSchema as mt, ContentBlockSchema as n, ContentSlide as nt, ContentCellBordersSchema as o, ContentStrokeStyle as ot, ContentEmbeddedObject as p, ContentTableRow as pt, ContentSheetPrintRange as q, ContentBorder as r, ContentSlideSchema as rt, ContentCellValue as s, ContentStrokeStyleSchema as st, ContentBlock as t, ContentSheetSchema as tt, ContentDocumentSchema as u, ContentTable as ut, ContentFormula as v, DecimalString as vt, ContentPageBreak as w, ContentImageBlockSchema as x, clampHeadingLevel as xt, ContentFormulaSchema as y, DecimalStringSchema as yt, ContentSheetCell as z };
2481
+ export { ContentSheetPrintRangeSchema as $, ContentPageBreakSchema as A, isContentConstructEnd as At, ContentSectionSchema as B, ContentFormula as C, DecimalString as Ct, ContentListMembership as D, contentDocumentSharedFields as Dt, ContentImageBlockSchema as E, clampHeadingLevel as Et, ContentPathSegment as F, ContentSheetCellComment as G, ContentShapeSchema as H, ContentPathSegmentSchema as I, ContentSheetColumn as J, ContentSheetCellCommentSchema as K, ContentRun as L, ContentParagraphSchema as M, ContentPathPoint as N, ContentListMembershipSchema as O, findConstructMarkerImbalance as Ot, ContentPathPointSchema as P, ContentSheetPrintRange as Q, ContentRunSchema as R, ContentEmbeddedObjectSchema as S, ContentVectorSchema as St, ContentImageBlock as T, FusedNode as Tt, ContentSheet as U, ContentShape as V, ContentSheetCell as W, ContentSheetImage as X, ContentSheetColumnSchema as Y, ContentSheetImageSchema as Z, ContentDrawPageSchema as _, ContentTableCellSchema as _t, ContentBorderSchema as a, ContentSheetRowSchema as at, ContentEmbeddedObjectBlockSchema as b, ContentTableSchema as bt, ContentCellValue as c, ContentSlideSchema as ct, ContentConstructEndSchema as d, ContentStrokeStyle as dt, ContentSheetPrintSettings as et, ContentConstructStart as f, ContentStrokeStyleSchema as ft, ContentDrawPage as g, ContentTableCell as gt, ContentDocumentSchema as h, ContentTable as ht, ContentBorder as i, ContentSheetRow as it, ContentParagraph as j, isContentConstructStart as jt, ContentPageBreak as k, isContentBlock as kt, ContentCellValueSchema as l, ContentStroke as lt, ContentDocument as m, ContentSubpathSchema as mt, ContentBlock as n, ContentSheetRepeatRange as nt, ContentCellBorders as o, ContentSheetSchema as ot, ContentConstructStartSchema as p, ContentSubpath as pt, ContentSheetCellSchema as q, ContentBlockSchema as r, ContentSheetRepeatRangeSchema as rt, ContentCellBordersSchema as s, ContentSlide as st, ConstructMarkerImbalance as t, ContentSheetPrintSettingsSchema as tt, ContentConstructEnd as u, ContentStrokeSchema as ut, ContentEmbeddedObject as v, ContentTableRow as vt, ContentFormulaSchema as w, DecimalStringSchema as wt, ContentEmbeddedObjectKind as x, ContentVector as xt, ContentEmbeddedObjectBlock as y, ContentTableRowSchema as yt, ContentSection as z };
@@ -390,7 +390,37 @@ const CONTENT_DEFS = {
390
390
  ],
391
391
  additionalProperties: false
392
392
  },
393
+ ContentConstructStart: {
394
+ type: "object",
395
+ properties: {
396
+ kind: {
397
+ type: "string",
398
+ const: "constructStart"
399
+ },
400
+ descriptor: { $ref: "#/$defs/ConstructDescriptor" }
401
+ },
402
+ required: ["kind", "descriptor"],
403
+ additionalProperties: false
404
+ },
405
+ ContentConstructEnd: {
406
+ type: "object",
407
+ properties: { kind: {
408
+ type: "string",
409
+ const: "constructEnd"
410
+ } },
411
+ required: ["kind"],
412
+ additionalProperties: false
413
+ },
393
414
  ContentBlock: { oneOf: [
415
+ { $ref: "#/$defs/ContentParagraph" },
416
+ { $ref: "#/$defs/ContentTable" },
417
+ { $ref: "#/$defs/ContentImageBlock" },
418
+ { $ref: "#/$defs/ContentPageBreak" },
419
+ { $ref: "#/$defs/ContentEmbeddedObjectBlock" },
420
+ { $ref: "#/$defs/ContentConstructStart" },
421
+ { $ref: "#/$defs/ContentConstructEnd" }
422
+ ] },
423
+ PackageBlockLeaf: { oneOf: [
394
424
  { $ref: "#/$defs/ContentParagraph" },
395
425
  { $ref: "#/$defs/ContentTable" },
396
426
  { $ref: "#/$defs/ContentImageBlock" },
@@ -1268,7 +1298,7 @@ const CONTENT_DEFS = {
1268
1298
  { $ref: "#/$defs/HeadingGroup" },
1269
1299
  { $ref: "#/$defs/ListGroup" },
1270
1300
  { $ref: "#/$defs/SectionConstructGroup" },
1271
- { $ref: "#/$defs/ContentBlock" }
1301
+ { $ref: "#/$defs/PackageBlockLeaf" }
1272
1302
  ] }
1273
1303
  }
1274
1304
  },
@@ -1286,7 +1316,7 @@ const CONTENT_DEFS = {
1286
1316
  { $ref: "#/$defs/HeadingGroup" },
1287
1317
  { $ref: "#/$defs/ListGroup" },
1288
1318
  { $ref: "#/$defs/SectionConstructGroup" },
1289
- { $ref: "#/$defs/ContentBlock" }
1319
+ { $ref: "#/$defs/PackageBlockLeaf" }
1290
1320
  ] }
1291
1321
  }
1292
1322
  },
@@ -1303,7 +1333,7 @@ const CONTENT_DEFS = {
1303
1333
  items: { oneOf: [
1304
1334
  { $ref: "#/$defs/ListGroup" },
1305
1335
  { $ref: "#/$defs/ShapeConstructGroup" },
1306
- { $ref: "#/$defs/ContentBlock" }
1336
+ { $ref: "#/$defs/PackageBlockLeaf" }
1307
1337
  ] }
1308
1338
  }
1309
1339
  },
@@ -1333,7 +1363,7 @@ const CONTENT_DEFS = {
1333
1363
  items: { oneOf: [
1334
1364
  { $ref: "#/$defs/ListGroup" },
1335
1365
  { $ref: "#/$defs/ShapeConstructGroup" },
1336
- { $ref: "#/$defs/ContentBlock" }
1366
+ { $ref: "#/$defs/PackageBlockLeaf" }
1337
1367
  ] }
1338
1368
  }
1339
1369
  },
@@ -1377,7 +1407,7 @@ const CONTENT_DEFS = {
1377
1407
  { $ref: "#/$defs/HeadingGroup" },
1378
1408
  { $ref: "#/$defs/ListGroup" },
1379
1409
  { $ref: "#/$defs/SectionConstructGroup" },
1380
- { $ref: "#/$defs/ContentBlock" }
1410
+ { $ref: "#/$defs/PackageBlockLeaf" }
1381
1411
  ] }
1382
1412
  }
1383
1413
  },
@@ -1394,7 +1424,7 @@ const CONTENT_DEFS = {
1394
1424
  items: { oneOf: [
1395
1425
  { $ref: "#/$defs/ListGroup" },
1396
1426
  { $ref: "#/$defs/ShapeConstructGroup" },
1397
- { $ref: "#/$defs/ContentBlock" }
1427
+ { $ref: "#/$defs/PackageBlockLeaf" }
1398
1428
  ] }
1399
1429
  }
1400
1430
  },