document-content-model 7.14.0 → 7.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +3 -3
  2. package/dist/codec.d.cts +1 -1
  3. package/dist/codec.d.ts +1 -1
  4. package/dist/{content-Cc9oMKMd.d.ts → content-Cj_IC0ge.d.ts} +124 -124
  5. package/dist/{content-Db6wh_6v.d.cts → content-DZDor2Ct.d.cts} +124 -124
  6. package/dist/content.d.cts +1 -1
  7. package/dist/content.d.ts +1 -1
  8. package/dist/decompose.d.cts +2 -2
  9. package/dist/decompose.d.ts +2 -2
  10. package/dist/definitions.d.cts +4 -4
  11. package/dist/definitions.d.ts +4 -4
  12. package/dist/factor-styles.d.cts +1 -1
  13. package/dist/factor-styles.d.ts +1 -1
  14. package/dist/flatten.d.cts +1 -1
  15. package/dist/flatten.d.ts +1 -1
  16. package/dist/index.d.cts +3 -3
  17. package/dist/index.d.ts +3 -3
  18. package/dist/{package-node-D42YxKm6.d.cts → package-node-DBtKtaqn.d.cts} +39 -39
  19. package/dist/{package-node-D-1yiCmi.d.ts → package-node-SBZNVEGu.d.ts} +39 -39
  20. package/dist/package-node.d.cts +1 -1
  21. package/dist/package-node.d.ts +1 -1
  22. package/dist/package.d.cts +7 -7
  23. package/dist/package.d.ts +7 -7
  24. package/dist/schema-io.cjs +2 -2
  25. package/dist/schema-io.d.cts +1 -1
  26. package/dist/schema-io.d.ts +1 -1
  27. package/dist/schema-io.js +2 -2
  28. package/dist/{style-BGMcYrD2.d.cts → style-D06NwxAJ.d.cts} +1 -1
  29. package/dist/{style-BGMcYrD2.d.ts → style-D06NwxAJ.d.ts} +1 -1
  30. package/dist/style.d.cts +1 -1
  31. package/dist/style.d.ts +1 -1
  32. package/dist/table-grid.cjs +1 -1
  33. package/dist/table-grid.d.cts +3 -3
  34. package/dist/table-grid.d.ts +3 -3
  35. package/dist/table-grid.js +1 -1
  36. package/dist/text-layout.d.cts +1 -1
  37. package/dist/text-layout.d.ts +1 -1
  38. package/package.json +2 -2
  39. package/schemas/content-document.schema.json +16 -16
  40. package/schemas/document-tree.schema.json +3 -3
package/README.md CHANGED
@@ -61,7 +61,7 @@ Two format-agnostic helpers live here because they operate on the content model
61
61
  ```ts
62
62
  import { ContentDocumentSchema, DocumentTreeSchema } from "document-schema.js";
63
63
 
64
- // The codec-exchange form: what every format's reader produces and every writer consumes -- always flat,
64
+ // The codec-exchange form: what every format's reader produces and every writer consumes — always flat,
65
65
  // always fully materialised (no styles table, no refs), never versioned (that lives on the serialised artefact).
66
66
  const content = ContentDocumentSchema.parse(
67
67
  someWordprocessingOrPresentationValue,
@@ -133,7 +133,7 @@ import {
133
133
  } from "document-schema.js";
134
134
 
135
135
  // The one call a construction site makes: decompose the flat content into the tree, splice the envelope
136
- // onto the root, and mint a styles table over the result. `pages` is optional -- pass it once a layout
136
+ // onto the root, and mint a styles table over the result. `pages` is optional — pass it once a layout
137
137
  // pass has produced each rendered page's own size.
138
138
  const pkg = assembleTree(content, pages);
139
139
 
@@ -397,7 +397,7 @@ import { ColorSchema } from "document-schema.js/color";
397
397
  ```ts
398
398
  import type { ContentCodec } from "document-schema.js";
399
399
 
400
- declare const docxCodec: ContentCodec; // read(bytes) -> ContentDocument; write(content) -> bytes -- write is optional
400
+ declare const docxCodec: ContentCodec; // read(bytes) -> ContentDocument; write(content) -> bytes — write is optional
401
401
  ```
402
402
 
403
403
  `ContentCodec.write` is optional (`odf` has a reader but no builder — recovering MathML from glyphs is OCR-adjacent), and the interface is generic over its own `TOptions`. There is no `LayoutCodec` any more: it modelled the one format that produces layout cheaply on read — PDF — and the whole `LayoutDocument` family it described moved to pdf-codec in 4.0.0 (see [pdf-codec#65](https://github.com/ExaDev/pdf-codec/issues/65)).
package/dist/codec.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as ContentDocument } from "./content-Db6wh_6v.cjs";
1
+ import { C as ContentDocument } from "./content-DZDor2Ct.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 { C as ContentDocument } from "./content-Cc9oMKMd.js";
1
+ import { C as ContentDocument } from "./content-Cj_IC0ge.js";
2
2
  //#region src/codec.d.ts
3
3
  interface ContentCodec<TOptions = unknown> {
4
4
  read(bytes: Uint8Array, options?: TOptions): ContentDocument;