document-schema 7.9.1 → 7.10.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 (39) hide show
  1. package/dist/codec.d.cts +1 -1
  2. package/dist/codec.d.ts +1 -1
  3. package/dist/{content-VhC4WCbj.d.cts → content-BVsLx31F.d.cts} +7 -0
  4. package/dist/{content-B6SPQuuq.d.ts → content-DtZVw7l9.d.ts} +7 -0
  5. package/dist/content-json-schema-defs.cjs +17 -0
  6. package/dist/content-json-schema-defs.js +17 -0
  7. package/dist/content.cjs +1 -0
  8. package/dist/content.d.cts +1 -1
  9. package/dist/content.d.ts +1 -1
  10. package/dist/content.js +1 -0
  11. package/dist/decompose.d.cts +2 -2
  12. package/dist/decompose.d.ts +2 -2
  13. package/dist/definitions.d.cts +1 -1
  14. package/dist/definitions.d.ts +1 -1
  15. package/dist/factor-styles.cjs +2 -1
  16. package/dist/factor-styles.d.cts +1 -1
  17. package/dist/factor-styles.d.ts +1 -1
  18. package/dist/factor-styles.js +2 -1
  19. package/dist/flatten.d.cts +1 -1
  20. package/dist/flatten.d.ts +1 -1
  21. package/dist/index.cjs +1 -0
  22. package/dist/index.d.cts +4 -4
  23. package/dist/index.d.ts +4 -4
  24. package/dist/index.js +2 -2
  25. package/dist/{package-node-ChC2_Itm.d.cts → package-node-COQGk_QJ.d.cts} +2 -1
  26. package/dist/{package-node-mRax-XfS.d.ts → package-node-CYxBxyWR.d.ts} +2 -1
  27. package/dist/package-node.d.cts +1 -1
  28. package/dist/package-node.d.ts +1 -1
  29. package/dist/package.cjs +8 -0
  30. package/dist/package.d.cts +39 -2
  31. package/dist/package.d.ts +39 -2
  32. package/dist/package.js +8 -1
  33. package/dist/schema-io.cjs +2 -2
  34. package/dist/schema-io.d.cts +1 -1
  35. package/dist/schema-io.d.ts +1 -1
  36. package/dist/schema-io.js +2 -2
  37. package/package.json +1 -1
  38. package/schemas/content-document.schema.json +46 -13
  39. package/schemas/document-tree.schema.json +60 -3
@@ -1,4 +1,4 @@
1
- import { D as ContentEmbeddedObject, Gt as ContentSheetImage, Sn as ContentVector, W as ContentFormula, _ as ContentConstructEnd, a as ContentBlock, y as ContentConstructStart } from "./content-B6SPQuuq.js";
1
+ import { D as ContentEmbeddedObject, Gt as ContentSheetImage, Sn as ContentVector, W as ContentFormula, _ as ContentConstructEnd, a as ContentBlock, y as ContentConstructStart } from "./content-DtZVw7l9.js";
2
2
  import { a as ConstructDescriptor } from "./construct-C9cYkjnd.js";
3
3
  import { z } from "zod";
4
4
  //#region src/package-node.d.ts
@@ -1363,6 +1363,7 @@ declare const ShapeDescriptorSchema: z.ZodObject<{
1363
1363
  fontScale: z.ZodOptional<z.ZodNumber>;
1364
1364
  lineSpacingReduction: z.ZodOptional<z.ZodNumber>;
1365
1365
  paintOrder: z.ZodOptional<z.ZodNumber>;
1366
+ readingOrder: z.ZodOptional<z.ZodNumber>;
1366
1367
  }, z.core.$strict>;
1367
1368
  type ShapeDescriptor = z.infer<typeof ShapeDescriptorSchema>;
1368
1369
  declare const HeadingParagraphSchema: z.ZodObject<{
@@ -1,2 +1,2 @@
1
- import { $ as isSheetGroupNode, A as SheetDescriptor, B as TreeGroup, C as ShapeConstructGroupNode, D as ShapeGroupNode, E as ShapeDescriptorSchema, F as SlideDescriptorSchema, G as TreeNodeSchema, H as TreeLeaf, I as SlideGroupNode, J as isListGroupNode, K as isDrawPageGroupNode, L as SlideGroupSchema, M as SheetGroupNode, N as SheetGroupSchema, O as ShapeGroupSchema, P as SlideDescriptor, Q as isShapeGroupNode, R as TreeBlockLeaf, S as ShapeChild, T as ShapeDescriptor, U as TreeLeafSchema, V as TreeGroupSchema, W as TreeNode, X as isSectionGroupNode, Y as isSectionConstructGroupNode, Z as isShapeConstructGroupNode, _ as SectionConstructGroupSchema, a as DrawPageGroupSchema, b as SectionGroupNode, c as HeadingParagraph, d as ListGroupNode, et as isSlideGroupNode, f as ListGroupSchema, g as SectionConstructGroupNode, h as SectionChild, i as DrawPageGroupNode, it as isTreeNode, j as SheetDescriptorSchema, k as SheetChild, l as HeadingParagraphSchema, m as ListParagraphSchema, n as DrawPageDescriptor, nt as isTreeGroup, o as HeadingGroupNode, p as ListParagraph, q as isHeadingGroupNode, r as DrawPageDescriptorSchema, rt as isTreeLeaf, s as HeadingGroupSchema, t as DrawPageChild, tt as isTreeBlockLeaf, u as ListChild, v as SectionDescriptor, w as ShapeConstructGroupSchema, x as SectionGroupSchema, y as SectionDescriptorSchema, z as TreeBlockLeafSchema } from "./package-node-ChC2_Itm.cjs";
1
+ import { $ as isSheetGroupNode, A as SheetDescriptor, B as TreeGroup, C as ShapeConstructGroupNode, D as ShapeGroupNode, E as ShapeDescriptorSchema, F as SlideDescriptorSchema, G as TreeNodeSchema, H as TreeLeaf, I as SlideGroupNode, J as isListGroupNode, K as isDrawPageGroupNode, L as SlideGroupSchema, M as SheetGroupNode, N as SheetGroupSchema, O as ShapeGroupSchema, P as SlideDescriptor, Q as isShapeGroupNode, R as TreeBlockLeaf, S as ShapeChild, T as ShapeDescriptor, U as TreeLeafSchema, V as TreeGroupSchema, W as TreeNode, X as isSectionGroupNode, Y as isSectionConstructGroupNode, Z as isShapeConstructGroupNode, _ as SectionConstructGroupSchema, a as DrawPageGroupSchema, b as SectionGroupNode, c as HeadingParagraph, d as ListGroupNode, et as isSlideGroupNode, f as ListGroupSchema, g as SectionConstructGroupNode, h as SectionChild, i as DrawPageGroupNode, it as isTreeNode, j as SheetDescriptorSchema, k as SheetChild, l as HeadingParagraphSchema, m as ListParagraphSchema, n as DrawPageDescriptor, nt as isTreeGroup, o as HeadingGroupNode, p as ListParagraph, q as isHeadingGroupNode, r as DrawPageDescriptorSchema, rt as isTreeLeaf, s as HeadingGroupSchema, t as DrawPageChild, tt as isTreeBlockLeaf, u as ListChild, v as SectionDescriptor, w as ShapeConstructGroupSchema, x as SectionGroupSchema, y as SectionDescriptorSchema, z as TreeBlockLeafSchema } from "./package-node-COQGk_QJ.cjs";
2
2
  export { DrawPageChild, DrawPageDescriptor, DrawPageDescriptorSchema, DrawPageGroupNode, DrawPageGroupSchema, HeadingGroupNode, HeadingGroupSchema, HeadingParagraph, HeadingParagraphSchema, ListChild, ListGroupNode, ListGroupSchema, ListParagraph, ListParagraphSchema, SectionChild, SectionConstructGroupNode, SectionConstructGroupSchema, SectionDescriptor, SectionDescriptorSchema, SectionGroupNode, SectionGroupSchema, ShapeChild, ShapeConstructGroupNode, ShapeConstructGroupSchema, ShapeDescriptor, ShapeDescriptorSchema, ShapeGroupNode, ShapeGroupSchema, SheetChild, SheetDescriptor, SheetDescriptorSchema, SheetGroupNode, SheetGroupSchema, SlideDescriptor, SlideDescriptorSchema, SlideGroupNode, SlideGroupSchema, TreeBlockLeaf, TreeBlockLeafSchema, TreeGroup, TreeGroupSchema, TreeLeaf, TreeLeafSchema, TreeNode, TreeNodeSchema, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, isTreeBlockLeaf, isTreeGroup, isTreeLeaf, isTreeNode };
@@ -1,2 +1,2 @@
1
- import { $ as isSheetGroupNode, A as SheetDescriptor, B as TreeGroup, C as ShapeConstructGroupNode, D as ShapeGroupNode, E as ShapeDescriptorSchema, F as SlideDescriptorSchema, G as TreeNodeSchema, H as TreeLeaf, I as SlideGroupNode, J as isListGroupNode, K as isDrawPageGroupNode, L as SlideGroupSchema, M as SheetGroupNode, N as SheetGroupSchema, O as ShapeGroupSchema, P as SlideDescriptor, Q as isShapeGroupNode, R as TreeBlockLeaf, S as ShapeChild, T as ShapeDescriptor, U as TreeLeafSchema, V as TreeGroupSchema, W as TreeNode, X as isSectionGroupNode, Y as isSectionConstructGroupNode, Z as isShapeConstructGroupNode, _ as SectionConstructGroupSchema, a as DrawPageGroupSchema, b as SectionGroupNode, c as HeadingParagraph, d as ListGroupNode, et as isSlideGroupNode, f as ListGroupSchema, g as SectionConstructGroupNode, h as SectionChild, i as DrawPageGroupNode, it as isTreeNode, j as SheetDescriptorSchema, k as SheetChild, l as HeadingParagraphSchema, m as ListParagraphSchema, n as DrawPageDescriptor, nt as isTreeGroup, o as HeadingGroupNode, p as ListParagraph, q as isHeadingGroupNode, r as DrawPageDescriptorSchema, rt as isTreeLeaf, s as HeadingGroupSchema, t as DrawPageChild, tt as isTreeBlockLeaf, u as ListChild, v as SectionDescriptor, w as ShapeConstructGroupSchema, x as SectionGroupSchema, y as SectionDescriptorSchema, z as TreeBlockLeafSchema } from "./package-node-mRax-XfS.js";
1
+ import { $ as isSheetGroupNode, A as SheetDescriptor, B as TreeGroup, C as ShapeConstructGroupNode, D as ShapeGroupNode, E as ShapeDescriptorSchema, F as SlideDescriptorSchema, G as TreeNodeSchema, H as TreeLeaf, I as SlideGroupNode, J as isListGroupNode, K as isDrawPageGroupNode, L as SlideGroupSchema, M as SheetGroupNode, N as SheetGroupSchema, O as ShapeGroupSchema, P as SlideDescriptor, Q as isShapeGroupNode, R as TreeBlockLeaf, S as ShapeChild, T as ShapeDescriptor, U as TreeLeafSchema, V as TreeGroupSchema, W as TreeNode, X as isSectionGroupNode, Y as isSectionConstructGroupNode, Z as isShapeConstructGroupNode, _ as SectionConstructGroupSchema, a as DrawPageGroupSchema, b as SectionGroupNode, c as HeadingParagraph, d as ListGroupNode, et as isSlideGroupNode, f as ListGroupSchema, g as SectionConstructGroupNode, h as SectionChild, i as DrawPageGroupNode, it as isTreeNode, j as SheetDescriptorSchema, k as SheetChild, l as HeadingParagraphSchema, m as ListParagraphSchema, n as DrawPageDescriptor, nt as isTreeGroup, o as HeadingGroupNode, p as ListParagraph, q as isHeadingGroupNode, r as DrawPageDescriptorSchema, rt as isTreeLeaf, s as HeadingGroupSchema, t as DrawPageChild, tt as isTreeBlockLeaf, u as ListChild, v as SectionDescriptor, w as ShapeConstructGroupSchema, x as SectionGroupSchema, y as SectionDescriptorSchema, z as TreeBlockLeafSchema } from "./package-node-CYxBxyWR.js";
2
2
  export { DrawPageChild, DrawPageDescriptor, DrawPageDescriptorSchema, DrawPageGroupNode, DrawPageGroupSchema, HeadingGroupNode, HeadingGroupSchema, HeadingParagraph, HeadingParagraphSchema, ListChild, ListGroupNode, ListGroupSchema, ListParagraph, ListParagraphSchema, SectionChild, SectionConstructGroupNode, SectionConstructGroupSchema, SectionDescriptor, SectionDescriptorSchema, SectionGroupNode, SectionGroupSchema, ShapeChild, ShapeConstructGroupNode, ShapeConstructGroupSchema, ShapeDescriptor, ShapeDescriptorSchema, ShapeGroupNode, ShapeGroupSchema, SheetChild, SheetDescriptor, SheetDescriptorSchema, SheetGroupNode, SheetGroupSchema, SlideDescriptor, SlideDescriptorSchema, SlideGroupNode, SlideGroupSchema, TreeBlockLeaf, TreeBlockLeafSchema, TreeGroup, TreeGroupSchema, TreeLeaf, TreeLeafSchema, TreeNode, TreeNodeSchema, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, isTreeBlockLeaf, isTreeGroup, isTreeLeaf, isTreeNode };
package/dist/package.cjs CHANGED
@@ -7,10 +7,17 @@ const require_definitions = require("./definitions.cjs");
7
7
  const require_package_node = require("./package-node.cjs");
8
8
  let zod = require("zod");
9
9
  //#region src/package.ts
10
+ const TreeEmbeddedFontSchema = zod.z.object({
11
+ family: zod.z.string(),
12
+ bold: zod.z.boolean(),
13
+ italic: zod.z.boolean(),
14
+ base64: zod.z.string()
15
+ });
10
16
  const packageEnvelopeFields = {
11
17
  metadata: require_metadata.LayoutMetadataSchema,
12
18
  ...require_content.contentDocumentSharedFields,
13
19
  pages: zod.z.array(require_geometry.PageSizeSchema).optional(),
20
+ fonts: zod.z.array(TreeEmbeddedFontSchema).optional(),
14
21
  styles: require_definitions.StylesTableSchema.optional(),
15
22
  definitions: require_definitions.DefinitionsTableSchema.optional(),
16
23
  layers: require_definitions.DefinitionsTableSchema.optional(),
@@ -48,3 +55,4 @@ const DocumentTreeSchema = zod.z.discriminatedUnion("kind", [
48
55
  ]);
49
56
  //#endregion
50
57
  exports.DocumentTreeSchema = DocumentTreeSchema;
58
+ exports.TreeEmbeddedFontSchema = TreeEmbeddedFontSchema;
@@ -1,14 +1,27 @@
1
1
  import { d as MathMlNode } from "./mathml-Czqc1mdZ.cjs";
2
2
  import { p as MathExpression } from "./math-BScHxedi.cjs";
3
- import { I as SlideGroupNode, M as SheetGroupNode, b as SectionGroupNode, i as DrawPageGroupNode } from "./package-node-ChC2_Itm.cjs";
3
+ import { I as SlideGroupNode, M as SheetGroupNode, b as SectionGroupNode, i as DrawPageGroupNode } from "./package-node-COQGk_QJ.cjs";
4
4
  import { z } from "zod";
5
5
  //#region src/package.d.ts
6
+ declare const TreeEmbeddedFontSchema: z.ZodObject<{
7
+ family: z.ZodString;
8
+ bold: z.ZodBoolean;
9
+ italic: z.ZodBoolean;
10
+ base64: z.ZodString;
11
+ }, z.core.$strip>;
12
+ type TreeEmbeddedFont = z.infer<typeof TreeEmbeddedFontSchema>;
6
13
  declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7
14
  children: z.ZodArray<z.ZodCustom<SectionGroupNode, SectionGroupNode>>;
8
15
  pages: z.ZodOptional<z.ZodArray<z.ZodObject<{
9
16
  widthPt: z.ZodNumber;
10
17
  heightPt: z.ZodNumber;
11
18
  }, z.core.$strip>>>;
19
+ fonts: z.ZodOptional<z.ZodArray<z.ZodObject<{
20
+ family: z.ZodString;
21
+ bold: z.ZodBoolean;
22
+ italic: z.ZodBoolean;
23
+ base64: z.ZodString;
24
+ }, z.core.$strip>>>;
12
25
  styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
13
26
  paragraph: z.ZodOptional<z.ZodObject<{
14
27
  alignment: z.ZodOptional<z.ZodEnum<{
@@ -158,6 +171,12 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
158
171
  widthPt: z.ZodNumber;
159
172
  heightPt: z.ZodNumber;
160
173
  }, z.core.$strip>>>;
174
+ fonts: z.ZodOptional<z.ZodArray<z.ZodObject<{
175
+ family: z.ZodString;
176
+ bold: z.ZodBoolean;
177
+ italic: z.ZodBoolean;
178
+ base64: z.ZodString;
179
+ }, z.core.$strip>>>;
161
180
  styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
162
181
  paragraph: z.ZodOptional<z.ZodObject<{
163
182
  alignment: z.ZodOptional<z.ZodEnum<{
@@ -312,6 +331,12 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
312
331
  widthPt: z.ZodNumber;
313
332
  heightPt: z.ZodNumber;
314
333
  }, z.core.$strip>>>;
334
+ fonts: z.ZodOptional<z.ZodArray<z.ZodObject<{
335
+ family: z.ZodString;
336
+ bold: z.ZodBoolean;
337
+ italic: z.ZodBoolean;
338
+ base64: z.ZodString;
339
+ }, z.core.$strip>>>;
315
340
  styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
316
341
  paragraph: z.ZodOptional<z.ZodObject<{
317
342
  alignment: z.ZodOptional<z.ZodEnum<{
@@ -461,6 +486,12 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
461
486
  widthPt: z.ZodNumber;
462
487
  heightPt: z.ZodNumber;
463
488
  }, z.core.$strip>>>;
489
+ fonts: z.ZodOptional<z.ZodArray<z.ZodObject<{
490
+ family: z.ZodString;
491
+ bold: z.ZodBoolean;
492
+ italic: z.ZodBoolean;
493
+ base64: z.ZodString;
494
+ }, z.core.$strip>>>;
464
495
  styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
465
496
  paragraph: z.ZodOptional<z.ZodObject<{
466
497
  alignment: z.ZodOptional<z.ZodEnum<{
@@ -669,6 +700,12 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
669
700
  widthPt: z.ZodNumber;
670
701
  heightPt: z.ZodNumber;
671
702
  }, z.core.$strip>>>;
703
+ fonts: z.ZodOptional<z.ZodArray<z.ZodObject<{
704
+ family: z.ZodString;
705
+ bold: z.ZodBoolean;
706
+ italic: z.ZodBoolean;
707
+ base64: z.ZodString;
708
+ }, z.core.$strip>>>;
672
709
  styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
673
710
  paragraph: z.ZodOptional<z.ZodObject<{
674
711
  alignment: z.ZodOptional<z.ZodEnum<{
@@ -815,4 +852,4 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
815
852
  }, z.core.$strip>], "kind">;
816
853
  type DocumentTree = z.infer<typeof DocumentTreeSchema>;
817
854
  //#endregion
818
- export { DocumentTree, DocumentTreeSchema };
855
+ export { DocumentTree, DocumentTreeSchema, TreeEmbeddedFont, TreeEmbeddedFontSchema };
package/dist/package.d.ts CHANGED
@@ -1,14 +1,27 @@
1
1
  import { d as MathMlNode } from "./mathml-Czqc1mdZ.js";
2
2
  import { p as MathExpression } from "./math-BScHxedi.js";
3
- import { I as SlideGroupNode, M as SheetGroupNode, b as SectionGroupNode, i as DrawPageGroupNode } from "./package-node-mRax-XfS.js";
3
+ import { I as SlideGroupNode, M as SheetGroupNode, b as SectionGroupNode, i as DrawPageGroupNode } from "./package-node-CYxBxyWR.js";
4
4
  import { z } from "zod";
5
5
  //#region src/package.d.ts
6
+ declare const TreeEmbeddedFontSchema: z.ZodObject<{
7
+ family: z.ZodString;
8
+ bold: z.ZodBoolean;
9
+ italic: z.ZodBoolean;
10
+ base64: z.ZodString;
11
+ }, z.core.$strip>;
12
+ type TreeEmbeddedFont = z.infer<typeof TreeEmbeddedFontSchema>;
6
13
  declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7
14
  children: z.ZodArray<z.ZodCustom<SectionGroupNode, SectionGroupNode>>;
8
15
  pages: z.ZodOptional<z.ZodArray<z.ZodObject<{
9
16
  widthPt: z.ZodNumber;
10
17
  heightPt: z.ZodNumber;
11
18
  }, z.core.$strip>>>;
19
+ fonts: z.ZodOptional<z.ZodArray<z.ZodObject<{
20
+ family: z.ZodString;
21
+ bold: z.ZodBoolean;
22
+ italic: z.ZodBoolean;
23
+ base64: z.ZodString;
24
+ }, z.core.$strip>>>;
12
25
  styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
13
26
  paragraph: z.ZodOptional<z.ZodObject<{
14
27
  alignment: z.ZodOptional<z.ZodEnum<{
@@ -158,6 +171,12 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
158
171
  widthPt: z.ZodNumber;
159
172
  heightPt: z.ZodNumber;
160
173
  }, z.core.$strip>>>;
174
+ fonts: z.ZodOptional<z.ZodArray<z.ZodObject<{
175
+ family: z.ZodString;
176
+ bold: z.ZodBoolean;
177
+ italic: z.ZodBoolean;
178
+ base64: z.ZodString;
179
+ }, z.core.$strip>>>;
161
180
  styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
162
181
  paragraph: z.ZodOptional<z.ZodObject<{
163
182
  alignment: z.ZodOptional<z.ZodEnum<{
@@ -312,6 +331,12 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
312
331
  widthPt: z.ZodNumber;
313
332
  heightPt: z.ZodNumber;
314
333
  }, z.core.$strip>>>;
334
+ fonts: z.ZodOptional<z.ZodArray<z.ZodObject<{
335
+ family: z.ZodString;
336
+ bold: z.ZodBoolean;
337
+ italic: z.ZodBoolean;
338
+ base64: z.ZodString;
339
+ }, z.core.$strip>>>;
315
340
  styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
316
341
  paragraph: z.ZodOptional<z.ZodObject<{
317
342
  alignment: z.ZodOptional<z.ZodEnum<{
@@ -461,6 +486,12 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
461
486
  widthPt: z.ZodNumber;
462
487
  heightPt: z.ZodNumber;
463
488
  }, z.core.$strip>>>;
489
+ fonts: z.ZodOptional<z.ZodArray<z.ZodObject<{
490
+ family: z.ZodString;
491
+ bold: z.ZodBoolean;
492
+ italic: z.ZodBoolean;
493
+ base64: z.ZodString;
494
+ }, z.core.$strip>>>;
464
495
  styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
465
496
  paragraph: z.ZodOptional<z.ZodObject<{
466
497
  alignment: z.ZodOptional<z.ZodEnum<{
@@ -669,6 +700,12 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
669
700
  widthPt: z.ZodNumber;
670
701
  heightPt: z.ZodNumber;
671
702
  }, z.core.$strip>>>;
703
+ fonts: z.ZodOptional<z.ZodArray<z.ZodObject<{
704
+ family: z.ZodString;
705
+ bold: z.ZodBoolean;
706
+ italic: z.ZodBoolean;
707
+ base64: z.ZodString;
708
+ }, z.core.$strip>>>;
672
709
  styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
673
710
  paragraph: z.ZodOptional<z.ZodObject<{
674
711
  alignment: z.ZodOptional<z.ZodEnum<{
@@ -815,4 +852,4 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
815
852
  }, z.core.$strip>], "kind">;
816
853
  type DocumentTree = z.infer<typeof DocumentTreeSchema>;
817
854
  //#endregion
818
- export { DocumentTree, DocumentTreeSchema };
855
+ export { DocumentTree, DocumentTreeSchema, TreeEmbeddedFont, TreeEmbeddedFontSchema };
package/dist/package.js CHANGED
@@ -6,10 +6,17 @@ import { DefinitionsTableSchema, StylesTableSchema } from "./definitions.js";
6
6
  import { DrawPageGroupSchema, SectionGroupSchema, SheetGroupSchema, SlideGroupSchema } from "./package-node.js";
7
7
  import { z } from "zod";
8
8
  //#region src/package.ts
9
+ const TreeEmbeddedFontSchema = z.object({
10
+ family: z.string(),
11
+ bold: z.boolean(),
12
+ italic: z.boolean(),
13
+ base64: z.string()
14
+ });
9
15
  const packageEnvelopeFields = {
10
16
  metadata: LayoutMetadataSchema,
11
17
  ...contentDocumentSharedFields,
12
18
  pages: z.array(PageSizeSchema).optional(),
19
+ fonts: z.array(TreeEmbeddedFontSchema).optional(),
13
20
  styles: StylesTableSchema.optional(),
14
21
  definitions: DefinitionsTableSchema.optional(),
15
22
  layers: DefinitionsTableSchema.optional(),
@@ -46,4 +53,4 @@ const DocumentTreeSchema = z.discriminatedUnion("kind", [
46
53
  })
47
54
  ]);
48
55
  //#endregion
49
- export { DocumentTreeSchema };
56
+ export { DocumentTreeSchema, TreeEmbeddedFontSchema };
@@ -7,7 +7,7 @@ const SCHEMA_FILE_NAMES = {
7
7
  ContentDocument: "content-document.schema.json"
8
8
  };
9
9
  function schemaUriFor(kind) {
10
- return `https://cdn.jsdelivr.net/npm/document-schema.js@7.9.1/schemas/${SCHEMA_FILE_NAMES[kind]}`;
10
+ return `https://cdn.jsdelivr.net/npm/document-schema.js@7.10.0/schemas/${SCHEMA_FILE_NAMES[kind]}`;
11
11
  }
12
12
  const SCHEMA_URI_PATTERN = /^https:\/\/cdn\.jsdelivr\.net\/npm\/document-schema\.js@([^/]+)\/schemas\/(document-tree|document-package|content-document|layout-document)\.schema\.json$/;
13
13
  function parseSchemaUri(uri) {
@@ -102,7 +102,7 @@ function documentFromJson(value) {
102
102
  if (parts.stem === "document-package") throw new DocumentPackageRenamedError(value.$schema);
103
103
  const kind = kindForFileStem(parts.stem);
104
104
  if (kind === void 0) throw new UnrecognizedDocumentSchemaError(value.$schema);
105
- if (majorVersionOf(parts.version) !== majorVersionOf("7.9.1")) throw new SchemaVersionMismatchError(value.$schema, parts.version, "7.9.1");
105
+ if (majorVersionOf(parts.version) !== majorVersionOf("7.10.0")) throw new SchemaVersionMismatchError(value.$schema, parts.version, "7.10.0");
106
106
  switch (kind) {
107
107
  case "DocumentTree": return {
108
108
  kind,
@@ -1,4 +1,4 @@
1
- import { C as ContentDocument } from "./content-VhC4WCbj.cjs";
1
+ import { C as ContentDocument } from "./content-BVsLx31F.cjs";
2
2
  import { DocumentTree } from "./package.cjs";
3
3
  //#region src/schema-io.d.ts
4
4
  type DocumentSchemaKind = "DocumentTree" | "ContentDocument";
@@ -1,4 +1,4 @@
1
- import { C as ContentDocument } from "./content-B6SPQuuq.js";
1
+ import { C as ContentDocument } from "./content-DtZVw7l9.js";
2
2
  import { DocumentTree } from "./package.js";
3
3
  //#region src/schema-io.d.ts
4
4
  type DocumentSchemaKind = "DocumentTree" | "ContentDocument";
package/dist/schema-io.js CHANGED
@@ -6,7 +6,7 @@ const SCHEMA_FILE_NAMES = {
6
6
  ContentDocument: "content-document.schema.json"
7
7
  };
8
8
  function schemaUriFor(kind) {
9
- return `https://cdn.jsdelivr.net/npm/document-schema.js@7.9.1/schemas/${SCHEMA_FILE_NAMES[kind]}`;
9
+ return `https://cdn.jsdelivr.net/npm/document-schema.js@7.10.0/schemas/${SCHEMA_FILE_NAMES[kind]}`;
10
10
  }
11
11
  const SCHEMA_URI_PATTERN = /^https:\/\/cdn\.jsdelivr\.net\/npm\/document-schema\.js@([^/]+)\/schemas\/(document-tree|document-package|content-document|layout-document)\.schema\.json$/;
12
12
  function parseSchemaUri(uri) {
@@ -101,7 +101,7 @@ function documentFromJson(value) {
101
101
  if (parts.stem === "document-package") throw new DocumentPackageRenamedError(value.$schema);
102
102
  const kind = kindForFileStem(parts.stem);
103
103
  if (kind === void 0) throw new UnrecognizedDocumentSchemaError(value.$schema);
104
- if (majorVersionOf(parts.version) !== majorVersionOf("7.9.1")) throw new SchemaVersionMismatchError(value.$schema, parts.version, "7.9.1");
104
+ if (majorVersionOf(parts.version) !== majorVersionOf("7.10.0")) throw new SchemaVersionMismatchError(value.$schema, parts.version, "7.10.0");
105
105
  switch (kind) {
106
106
  case "DocumentTree": return {
107
107
  kind,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "document-schema",
3
- "version": "7.9.1",
3
+ "version": "7.10.0",
4
4
  "description": "The canonical, format-agnostic content and document-tree schemas shared by ooxml.js, odf.js, documents.js, pdf-codec, and markdown-codec, plus the structural transform between them -- no format-specific or I/O behaviour.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://cdn.jsdelivr.net/npm/document-schema.js@7.9.1/schemas/content-document.schema.json",
3
+ "$id": "https://cdn.jsdelivr.net/npm/document-schema.js@7.10.0/schemas/content-document.schema.json",
4
4
  "oneOf": [
5
5
  {
6
6
  "type": "object",
@@ -133,7 +133,7 @@
133
133
  "blocks": {
134
134
  "type": "array",
135
135
  "items": {
136
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.9.1/schemas/undefined#/$defs/schema2"
136
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.10.0/schemas/undefined#/$defs/schema2"
137
137
  }
138
138
  },
139
139
  "breakType": {
@@ -151,19 +151,19 @@
151
151
  "default": {
152
152
  "type": "array",
153
153
  "items": {
154
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.9.1/schemas/undefined#/$defs/schema2"
154
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.10.0/schemas/undefined#/$defs/schema2"
155
155
  }
156
156
  },
157
157
  "even": {
158
158
  "type": "array",
159
159
  "items": {
160
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.9.1/schemas/undefined#/$defs/schema2"
160
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.10.0/schemas/undefined#/$defs/schema2"
161
161
  }
162
162
  },
163
163
  "first": {
164
164
  "type": "array",
165
165
  "items": {
166
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.9.1/schemas/undefined#/$defs/schema2"
166
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.10.0/schemas/undefined#/$defs/schema2"
167
167
  }
168
168
  }
169
169
  },
@@ -175,19 +175,19 @@
175
175
  "default": {
176
176
  "type": "array",
177
177
  "items": {
178
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.9.1/schemas/undefined#/$defs/schema2"
178
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.10.0/schemas/undefined#/$defs/schema2"
179
179
  }
180
180
  },
181
181
  "even": {
182
182
  "type": "array",
183
183
  "items": {
184
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.9.1/schemas/undefined#/$defs/schema2"
184
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.10.0/schemas/undefined#/$defs/schema2"
185
185
  }
186
186
  },
187
187
  "first": {
188
188
  "type": "array",
189
189
  "items": {
190
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.9.1/schemas/undefined#/$defs/schema2"
190
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.10.0/schemas/undefined#/$defs/schema2"
191
191
  }
192
192
  }
193
193
  },
@@ -472,6 +472,9 @@
472
472
  "paintOrder": {
473
473
  "type": "number"
474
474
  },
475
+ "readingOrder": {
476
+ "type": "number"
477
+ },
475
478
  "sourcePath": {
476
479
  "type": "string"
477
480
  },
@@ -611,7 +614,7 @@
611
614
  "blocks": {
612
615
  "type": "array",
613
616
  "items": {
614
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.9.1/schemas/undefined#/$defs/schema2"
617
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.10.0/schemas/undefined#/$defs/schema2"
615
618
  }
616
619
  }
617
620
  },
@@ -2632,7 +2635,7 @@
2632
2635
  ]
2633
2636
  },
2634
2637
  "document": {
2635
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.9.1/schemas/content-document.schema.json"
2638
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.10.0/schemas/content-document.schema.json"
2636
2639
  },
2637
2640
  "frame": {
2638
2641
  "type": "object",
@@ -4852,6 +4855,9 @@
4852
4855
  "paintOrder": {
4853
4856
  "type": "number"
4854
4857
  },
4858
+ "readingOrder": {
4859
+ "type": "number"
4860
+ },
4855
4861
  "sourcePath": {
4856
4862
  "type": "string"
4857
4863
  },
@@ -4991,7 +4997,7 @@
4991
4997
  "blocks": {
4992
4998
  "type": "array",
4993
4999
  "items": {
4994
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.9.1/schemas/undefined#/$defs/schema2"
5000
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.10.0/schemas/undefined#/$defs/schema2"
4995
5001
  }
4996
5002
  }
4997
5003
  },
@@ -7997,7 +8003,7 @@
7997
8003
  ]
7998
8004
  },
7999
8005
  "document": {
8000
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.9.1/schemas/content-document.schema.json"
8006
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.10.0/schemas/content-document.schema.json"
8001
8007
  },
8002
8008
  "frame": {
8003
8009
  "$ref": "#/$defs/Box"
@@ -8386,6 +8392,9 @@
8386
8392
  "paintOrder": {
8387
8393
  "type": "number"
8388
8394
  },
8395
+ "readingOrder": {
8396
+ "type": "number"
8397
+ },
8389
8398
  "sourcePath": {
8390
8399
  "type": "string"
8391
8400
  },
@@ -10317,7 +10326,7 @@
10317
10326
  ]
10318
10327
  },
10319
10328
  "document": {
10320
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.9.1/schemas/content-document.schema.json"
10329
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.10.0/schemas/content-document.schema.json"
10321
10330
  },
10322
10331
  "frame": {
10323
10332
  "$ref": "#/$defs/Box"
@@ -11359,6 +11368,30 @@
11359
11368
  ],
11360
11369
  "additionalProperties": false
11361
11370
  },
11371
+ "TreeEmbeddedFont": {
11372
+ "type": "object",
11373
+ "properties": {
11374
+ "family": {
11375
+ "type": "string"
11376
+ },
11377
+ "bold": {
11378
+ "type": "boolean"
11379
+ },
11380
+ "italic": {
11381
+ "type": "boolean"
11382
+ },
11383
+ "base64": {
11384
+ "type": "string"
11385
+ }
11386
+ },
11387
+ "required": [
11388
+ "family",
11389
+ "bold",
11390
+ "italic",
11391
+ "base64"
11392
+ ],
11393
+ "additionalProperties": false
11394
+ },
11362
11395
  "SymbolTable": {
11363
11396
  "type": "object",
11364
11397
  "properties": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://cdn.jsdelivr.net/npm/document-schema.js@7.9.1/schemas/document-tree.schema.json",
3
+ "$id": "https://cdn.jsdelivr.net/npm/document-schema.js@7.10.0/schemas/document-tree.schema.json",
4
4
  "oneOf": [
5
5
  {
6
6
  "type": "object",
@@ -100,6 +100,12 @@
100
100
  "additionalProperties": false
101
101
  }
102
102
  },
103
+ "fonts": {
104
+ "type": "array",
105
+ "items": {
106
+ "$ref": "#/$defs/TreeEmbeddedFont"
107
+ }
108
+ },
103
109
  "styles": {
104
110
  "type": "object",
105
111
  "propertyNames": {
@@ -296,6 +302,12 @@
296
302
  "additionalProperties": false
297
303
  }
298
304
  },
305
+ "fonts": {
306
+ "type": "array",
307
+ "items": {
308
+ "$ref": "#/$defs/TreeEmbeddedFont"
309
+ }
310
+ },
299
311
  "styles": {
300
312
  "type": "object",
301
313
  "propertyNames": {
@@ -492,6 +504,12 @@
492
504
  "additionalProperties": false
493
505
  }
494
506
  },
507
+ "fonts": {
508
+ "type": "array",
509
+ "items": {
510
+ "$ref": "#/$defs/TreeEmbeddedFont"
511
+ }
512
+ },
495
513
  "styles": {
496
514
  "type": "object",
497
515
  "propertyNames": {
@@ -712,6 +730,12 @@
712
730
  "additionalProperties": false
713
731
  }
714
732
  },
733
+ "fonts": {
734
+ "type": "array",
735
+ "items": {
736
+ "$ref": "#/$defs/TreeEmbeddedFont"
737
+ }
738
+ },
715
739
  "styles": {
716
740
  "type": "object",
717
741
  "propertyNames": {
@@ -908,6 +932,12 @@
908
932
  "additionalProperties": false
909
933
  }
910
934
  },
935
+ "fonts": {
936
+ "type": "array",
937
+ "items": {
938
+ "$ref": "#/$defs/TreeEmbeddedFont"
939
+ }
940
+ },
911
941
  "styles": {
912
942
  "type": "object",
913
943
  "propertyNames": {
@@ -1963,7 +1993,7 @@
1963
1993
  ]
1964
1994
  },
1965
1995
  "document": {
1966
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.9.1/schemas/content-document.schema.json"
1996
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.10.0/schemas/content-document.schema.json"
1967
1997
  },
1968
1998
  "frame": {
1969
1999
  "$ref": "#/$defs/Box"
@@ -2352,6 +2382,9 @@
2352
2382
  "paintOrder": {
2353
2383
  "type": "number"
2354
2384
  },
2385
+ "readingOrder": {
2386
+ "type": "number"
2387
+ },
2355
2388
  "sourcePath": {
2356
2389
  "type": "string"
2357
2390
  },
@@ -4283,7 +4316,7 @@
4283
4316
  ]
4284
4317
  },
4285
4318
  "document": {
4286
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.9.1/schemas/content-document.schema.json"
4319
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@7.10.0/schemas/content-document.schema.json"
4287
4320
  },
4288
4321
  "frame": {
4289
4322
  "$ref": "#/$defs/Box"
@@ -5325,6 +5358,30 @@
5325
5358
  ],
5326
5359
  "additionalProperties": false
5327
5360
  },
5361
+ "TreeEmbeddedFont": {
5362
+ "type": "object",
5363
+ "properties": {
5364
+ "family": {
5365
+ "type": "string"
5366
+ },
5367
+ "bold": {
5368
+ "type": "boolean"
5369
+ },
5370
+ "italic": {
5371
+ "type": "boolean"
5372
+ },
5373
+ "base64": {
5374
+ "type": "string"
5375
+ }
5376
+ },
5377
+ "required": [
5378
+ "family",
5379
+ "bold",
5380
+ "italic",
5381
+ "base64"
5382
+ ],
5383
+ "additionalProperties": false
5384
+ },
5328
5385
  "SymbolTable": {
5329
5386
  "type": "object",
5330
5387
  "properties": {