document-content-model 7.9.0 → 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.
- package/dist/codec.d.cts +1 -1
- package/dist/codec.d.ts +1 -1
- package/dist/{construct-C4XiF8OW.d.cts → construct-C9cYkjnd.d.cts} +6 -6
- package/dist/{construct-C4XiF8OW.d.ts → construct-C9cYkjnd.d.ts} +6 -6
- package/dist/construct.d.cts +1 -1
- package/dist/construct.d.ts +1 -1
- package/dist/{content-C1hJ6olW.d.ts → content-Uiq081CA.d.ts} +53 -40
- package/dist/{content-DN5CqH6Y.d.cts → content-VC9cnoCv.d.cts} +53 -40
- package/dist/content-json-schema-defs.cjs +17 -0
- package/dist/content-json-schema-defs.js +17 -0
- package/dist/content.cjs +1 -0
- package/dist/content.d.cts +1 -1
- package/dist/content.d.ts +1 -1
- package/dist/content.js +1 -0
- package/dist/decompose.d.cts +2 -2
- package/dist/decompose.d.ts +2 -2
- package/dist/definitions.d.cts +4 -4
- package/dist/definitions.d.ts +4 -4
- package/dist/factor-styles.cjs +2 -1
- package/dist/factor-styles.d.cts +1 -1
- package/dist/factor-styles.d.ts +1 -1
- package/dist/factor-styles.js +2 -1
- package/dist/flatten.d.cts +1 -1
- package/dist/flatten.d.ts +1 -1
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +2 -2
- package/dist/{package-node-DktLHAKG.d.cts → package-node-B0czXNHl.d.cts} +14 -13
- package/dist/{package-node-B9aFWtrZ.d.ts → package-node-CnUkCuRc.d.ts} +14 -13
- package/dist/package-node.d.cts +1 -1
- package/dist/package-node.d.ts +1 -1
- package/dist/package.cjs +8 -0
- package/dist/package.d.cts +44 -7
- package/dist/package.d.ts +44 -7
- package/dist/package.js +8 -1
- package/dist/schema-io.cjs +2 -2
- package/dist/schema-io.d.cts +1 -1
- package/dist/schema-io.d.ts +1 -1
- package/dist/schema-io.js +2 -2
- package/dist/{style-D06NwxAJ.d.cts → style-BGMcYrD2.d.cts} +1 -1
- package/dist/{style-D06NwxAJ.d.ts → style-BGMcYrD2.d.ts} +1 -1
- package/dist/style.d.cts +1 -1
- package/dist/style.d.ts +1 -1
- package/dist/text-layout.d.cts +1 -1
- package/dist/text-layout.d.ts +1 -1
- package/package.json +1 -1
- package/schemas/content-document.schema.json +46 -13
- package/schemas/document-tree.schema.json +60 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as ContentEmbeddedObject, Gt as ContentSheetImage, Sn as ContentVector, W as ContentFormula, _ as ContentConstructEnd, a as ContentBlock, y as ContentConstructStart } from "./content-
|
|
2
|
-
import { a as ConstructDescriptor } from "./construct-
|
|
1
|
+
import { D as ContentEmbeddedObject, Gt as ContentSheetImage, Sn as ContentVector, W as ContentFormula, _ as ContentConstructEnd, a as ContentBlock, y as ContentConstructStart } from "./content-Uiq081CA.js";
|
|
2
|
+
import { a as ConstructDescriptor } from "./construct-C9cYkjnd.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/package-node.d.ts
|
|
5
5
|
declare const SectionDescriptorSchema: z.ZodObject<{
|
|
@@ -136,7 +136,6 @@ declare const SlideDescriptorSchema: z.ZodObject<{
|
|
|
136
136
|
}, z.core.$strict>;
|
|
137
137
|
type SlideDescriptor = z.infer<typeof SlideDescriptorSchema>;
|
|
138
138
|
declare const SheetDescriptorSchema: z.ZodObject<{
|
|
139
|
-
name: z.ZodString;
|
|
140
139
|
source: z.ZodOptional<z.ZodObject<{
|
|
141
140
|
format: z.ZodEnum<{
|
|
142
141
|
docx: "docx";
|
|
@@ -157,6 +156,7 @@ declare const SheetDescriptorSchema: z.ZodObject<{
|
|
|
157
156
|
}>;
|
|
158
157
|
xml: z.ZodString;
|
|
159
158
|
}, z.core.$strict>>;
|
|
159
|
+
name: z.ZodString;
|
|
160
160
|
origin: z.ZodOptional<z.ZodEnum<{
|
|
161
161
|
chart: "chart";
|
|
162
162
|
diagram: "diagram";
|
|
@@ -547,8 +547,8 @@ declare const SheetDescriptorSchema: z.ZodObject<{
|
|
|
547
547
|
}, z.core.$strip>>;
|
|
548
548
|
alignment: z.ZodOptional<z.ZodEnum<{
|
|
549
549
|
left: "left";
|
|
550
|
-
center: "center";
|
|
551
550
|
right: "right";
|
|
551
|
+
center: "center";
|
|
552
552
|
justify: "justify";
|
|
553
553
|
}>>;
|
|
554
554
|
verticalAlignment: z.ZodOptional<z.ZodEnum<{
|
|
@@ -612,10 +612,10 @@ declare const SheetDescriptorSchema: z.ZodObject<{
|
|
|
612
612
|
endColumn: z.ZodNumber;
|
|
613
613
|
}, z.core.$strip>>;
|
|
614
614
|
type: z.ZodEnum<{
|
|
615
|
-
decimal: "decimal";
|
|
616
|
-
list: "list";
|
|
617
615
|
date: "date";
|
|
618
616
|
custom: "custom";
|
|
617
|
+
decimal: "decimal";
|
|
618
|
+
list: "list";
|
|
619
619
|
time: "time";
|
|
620
620
|
whole: "whole";
|
|
621
621
|
textLength: "textLength";
|
|
@@ -1293,7 +1293,6 @@ declare const DrawPageDescriptorSchema: z.ZodObject<{
|
|
|
1293
1293
|
}, z.core.$strict>;
|
|
1294
1294
|
type DrawPageDescriptor = z.infer<typeof DrawPageDescriptorSchema>;
|
|
1295
1295
|
declare const ShapeDescriptorSchema: z.ZodObject<{
|
|
1296
|
-
name: z.ZodOptional<z.ZodString>;
|
|
1297
1296
|
source: z.ZodOptional<z.ZodObject<{
|
|
1298
1297
|
format: z.ZodEnum<{
|
|
1299
1298
|
docx: "docx";
|
|
@@ -1314,6 +1313,7 @@ declare const ShapeDescriptorSchema: z.ZodObject<{
|
|
|
1314
1313
|
}>;
|
|
1315
1314
|
xml: z.ZodString;
|
|
1316
1315
|
}, z.core.$strict>>;
|
|
1316
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1317
1317
|
sourcePath: z.ZodOptional<z.ZodString>;
|
|
1318
1318
|
frames: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1319
1319
|
pageIndex: z.ZodNumber;
|
|
@@ -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<{
|
|
@@ -1476,12 +1477,12 @@ declare const HeadingParagraphSchema: z.ZodObject<{
|
|
|
1476
1477
|
descriptor: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1477
1478
|
kind: z.ZodLiteral<"contentControl">;
|
|
1478
1479
|
controlType: z.ZodEnum<{
|
|
1479
|
-
date: "date";
|
|
1480
1480
|
richText: "richText";
|
|
1481
1481
|
plainText: "plainText";
|
|
1482
1482
|
checkbox: "checkbox";
|
|
1483
1483
|
dropDown: "dropDown";
|
|
1484
1484
|
comboBox: "comboBox";
|
|
1485
|
+
date: "date";
|
|
1485
1486
|
picture: "picture";
|
|
1486
1487
|
repeatingSection: "repeatingSection";
|
|
1487
1488
|
button: "button";
|
|
@@ -1545,10 +1546,10 @@ declare const HeadingParagraphSchema: z.ZodObject<{
|
|
|
1545
1546
|
}, z.core.$strict>, z.ZodObject<{
|
|
1546
1547
|
kind: z.ZodLiteral<"anchor">;
|
|
1547
1548
|
anchorType: z.ZodEnum<{
|
|
1548
|
-
comment: "comment";
|
|
1549
1549
|
bookmark: "bookmark";
|
|
1550
1550
|
footnote: "footnote";
|
|
1551
1551
|
endnote: "endnote";
|
|
1552
|
+
comment: "comment";
|
|
1552
1553
|
}>;
|
|
1553
1554
|
name: z.ZodString;
|
|
1554
1555
|
definition: z.ZodOptional<z.ZodString>;
|
|
@@ -1671,8 +1672,8 @@ declare const HeadingParagraphSchema: z.ZodObject<{
|
|
|
1671
1672
|
preformatted: z.ZodOptional<z.ZodBoolean>;
|
|
1672
1673
|
alignment: z.ZodOptional<z.ZodEnum<{
|
|
1673
1674
|
left: "left";
|
|
1674
|
-
center: "center";
|
|
1675
1675
|
right: "right";
|
|
1676
|
+
center: "center";
|
|
1676
1677
|
justify: "justify";
|
|
1677
1678
|
}>>;
|
|
1678
1679
|
list: z.ZodOptional<z.ZodObject<{
|
|
@@ -1901,12 +1902,12 @@ declare const ListParagraphSchema: z.ZodObject<{
|
|
|
1901
1902
|
descriptor: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1902
1903
|
kind: z.ZodLiteral<"contentControl">;
|
|
1903
1904
|
controlType: z.ZodEnum<{
|
|
1904
|
-
date: "date";
|
|
1905
1905
|
richText: "richText";
|
|
1906
1906
|
plainText: "plainText";
|
|
1907
1907
|
checkbox: "checkbox";
|
|
1908
1908
|
dropDown: "dropDown";
|
|
1909
1909
|
comboBox: "comboBox";
|
|
1910
|
+
date: "date";
|
|
1910
1911
|
picture: "picture";
|
|
1911
1912
|
repeatingSection: "repeatingSection";
|
|
1912
1913
|
button: "button";
|
|
@@ -1970,10 +1971,10 @@ declare const ListParagraphSchema: z.ZodObject<{
|
|
|
1970
1971
|
}, z.core.$strict>, z.ZodObject<{
|
|
1971
1972
|
kind: z.ZodLiteral<"anchor">;
|
|
1972
1973
|
anchorType: z.ZodEnum<{
|
|
1973
|
-
comment: "comment";
|
|
1974
1974
|
bookmark: "bookmark";
|
|
1975
1975
|
footnote: "footnote";
|
|
1976
1976
|
endnote: "endnote";
|
|
1977
|
+
comment: "comment";
|
|
1977
1978
|
}>;
|
|
1978
1979
|
name: z.ZodString;
|
|
1979
1980
|
definition: z.ZodOptional<z.ZodString>;
|
|
@@ -2097,8 +2098,8 @@ declare const ListParagraphSchema: z.ZodObject<{
|
|
|
2097
2098
|
headingLevel: z.ZodOptional<z.ZodNumber>;
|
|
2098
2099
|
alignment: z.ZodOptional<z.ZodEnum<{
|
|
2099
2100
|
left: "left";
|
|
2100
|
-
center: "center";
|
|
2101
2101
|
right: "right";
|
|
2102
|
+
center: "center";
|
|
2102
2103
|
justify: "justify";
|
|
2103
2104
|
}>>;
|
|
2104
2105
|
spacingBeforePt: z.ZodOptional<z.ZodNumber>;
|
package/dist/package-node.d.cts
CHANGED
|
@@ -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-
|
|
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-B0czXNHl.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 };
|
package/dist/package-node.d.ts
CHANGED
|
@@ -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-
|
|
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-CnUkCuRc.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;
|
package/dist/package.d.cts
CHANGED
|
@@ -1,20 +1,33 @@
|
|
|
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-
|
|
3
|
+
import { I as SlideGroupNode, M as SheetGroupNode, b as SectionGroupNode, i as DrawPageGroupNode } from "./package-node-B0czXNHl.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<{
|
|
15
28
|
left: "left";
|
|
16
|
-
center: "center";
|
|
17
29
|
right: "right";
|
|
30
|
+
center: "center";
|
|
18
31
|
justify: "justify";
|
|
19
32
|
}>>;
|
|
20
33
|
list: z.ZodOptional<z.ZodObject<{
|
|
@@ -158,12 +171,18 @@ 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<{
|
|
164
183
|
left: "left";
|
|
165
|
-
center: "center";
|
|
166
184
|
right: "right";
|
|
185
|
+
center: "center";
|
|
167
186
|
justify: "justify";
|
|
168
187
|
}>>;
|
|
169
188
|
list: z.ZodOptional<z.ZodObject<{
|
|
@@ -312,12 +331,18 @@ 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<{
|
|
318
343
|
left: "left";
|
|
319
|
-
center: "center";
|
|
320
344
|
right: "right";
|
|
345
|
+
center: "center";
|
|
321
346
|
justify: "justify";
|
|
322
347
|
}>>;
|
|
323
348
|
list: z.ZodOptional<z.ZodObject<{
|
|
@@ -461,12 +486,18 @@ 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<{
|
|
467
498
|
left: "left";
|
|
468
|
-
center: "center";
|
|
469
499
|
right: "right";
|
|
500
|
+
center: "center";
|
|
470
501
|
justify: "justify";
|
|
471
502
|
}>>;
|
|
472
503
|
list: z.ZodOptional<z.ZodObject<{
|
|
@@ -669,12 +700,18 @@ 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<{
|
|
675
712
|
left: "left";
|
|
676
|
-
center: "center";
|
|
677
713
|
right: "right";
|
|
714
|
+
center: "center";
|
|
678
715
|
justify: "justify";
|
|
679
716
|
}>>;
|
|
680
717
|
list: z.ZodOptional<z.ZodObject<{
|
|
@@ -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,20 +1,33 @@
|
|
|
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-
|
|
3
|
+
import { I as SlideGroupNode, M as SheetGroupNode, b as SectionGroupNode, i as DrawPageGroupNode } from "./package-node-CnUkCuRc.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<{
|
|
15
28
|
left: "left";
|
|
16
|
-
center: "center";
|
|
17
29
|
right: "right";
|
|
30
|
+
center: "center";
|
|
18
31
|
justify: "justify";
|
|
19
32
|
}>>;
|
|
20
33
|
list: z.ZodOptional<z.ZodObject<{
|
|
@@ -158,12 +171,18 @@ 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<{
|
|
164
183
|
left: "left";
|
|
165
|
-
center: "center";
|
|
166
184
|
right: "right";
|
|
185
|
+
center: "center";
|
|
167
186
|
justify: "justify";
|
|
168
187
|
}>>;
|
|
169
188
|
list: z.ZodOptional<z.ZodObject<{
|
|
@@ -312,12 +331,18 @@ 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<{
|
|
318
343
|
left: "left";
|
|
319
|
-
center: "center";
|
|
320
344
|
right: "right";
|
|
345
|
+
center: "center";
|
|
321
346
|
justify: "justify";
|
|
322
347
|
}>>;
|
|
323
348
|
list: z.ZodOptional<z.ZodObject<{
|
|
@@ -461,12 +486,18 @@ 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<{
|
|
467
498
|
left: "left";
|
|
468
|
-
center: "center";
|
|
469
499
|
right: "right";
|
|
500
|
+
center: "center";
|
|
470
501
|
justify: "justify";
|
|
471
502
|
}>>;
|
|
472
503
|
list: z.ZodOptional<z.ZodObject<{
|
|
@@ -669,12 +700,18 @@ 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<{
|
|
675
712
|
left: "left";
|
|
676
|
-
center: "center";
|
|
677
713
|
right: "right";
|
|
714
|
+
center: "center";
|
|
678
715
|
justify: "justify";
|
|
679
716
|
}>>;
|
|
680
717
|
list: z.ZodOptional<z.ZodObject<{
|
|
@@ -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 };
|
package/dist/schema-io.cjs
CHANGED
|
@@ -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.
|
|
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.
|
|
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,
|
package/dist/schema-io.d.cts
CHANGED
package/dist/schema-io.d.ts
CHANGED
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
|
+
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.
|
|
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/dist/style.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as LayoutFontSchema, i as LayoutFont, n as AlignmentSchema, o as TextDirection, r as DEFAULT_LAYOUT_FONT, s as TextDirectionSchema, t as Alignment } from "./style-
|
|
1
|
+
import { a as LayoutFontSchema, i as LayoutFont, n as AlignmentSchema, o as TextDirection, r as DEFAULT_LAYOUT_FONT, s as TextDirectionSchema, t as Alignment } from "./style-BGMcYrD2.cjs";
|
|
2
2
|
export { Alignment, AlignmentSchema, DEFAULT_LAYOUT_FONT, LayoutFont, LayoutFontSchema, TextDirection, TextDirectionSchema };
|
package/dist/style.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as LayoutFontSchema, i as LayoutFont, n as AlignmentSchema, o as TextDirection, r as DEFAULT_LAYOUT_FONT, s as TextDirectionSchema, t as Alignment } from "./style-
|
|
1
|
+
import { a as LayoutFontSchema, i as LayoutFont, n as AlignmentSchema, o as TextDirection, r as DEFAULT_LAYOUT_FONT, s as TextDirectionSchema, t as Alignment } from "./style-BGMcYrD2.js";
|
|
2
2
|
export { Alignment, AlignmentSchema, DEFAULT_LAYOUT_FONT, LayoutFont, LayoutFontSchema, TextDirection, TextDirectionSchema };
|
package/dist/text-layout.d.cts
CHANGED
package/dist/text-layout.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "document-content-model",
|
|
3
|
-
"version": "7.
|
|
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": {
|