document-schema 4.3.3 → 7.6.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.
- package/README.md +274 -95
- package/dist/border-weight.cjs +26 -0
- package/dist/border-weight.d.cts +12 -0
- package/dist/border-weight.d.ts +12 -0
- package/dist/border-weight.js +23 -0
- package/dist/codec.d.cts +1 -1
- package/dist/codec.d.ts +1 -1
- package/dist/{construct-CdQuI9f5.d.cts → construct-C9cYkjnd.d.cts} +242 -2
- package/dist/{construct-CdQuI9f5.d.ts → construct-C9cYkjnd.d.ts} +242 -2
- package/dist/construct.cjs +13 -6
- package/dist/construct.d.cts +1 -1
- package/dist/construct.d.ts +1 -1
- package/dist/construct.js +13 -6
- package/dist/content-CIIFuBbn.d.cts +10273 -0
- package/dist/content-json-schema-defs.cjs +1056 -189
- package/dist/content-json-schema-defs.js +1056 -189
- package/dist/content-wL5-wetq.d.ts +10273 -0
- package/dist/content.cjs +514 -36
- package/dist/content.d.cts +2 -2
- package/dist/content.d.ts +2 -2
- package/dist/content.js +488 -37
- package/dist/decompose.cjs +7 -17
- package/dist/decompose.d.cts +5 -5
- package/dist/decompose.d.ts +5 -5
- package/dist/decompose.js +7 -17
- package/dist/definitions.cjs +5 -1
- package/dist/definitions.d.cts +37 -1
- package/dist/definitions.d.ts +37 -1
- package/dist/definitions.js +5 -1
- package/dist/factor-styles.cjs +14 -8
- package/dist/factor-styles.d.cts +6 -6
- package/dist/factor-styles.d.ts +6 -6
- package/dist/factor-styles.js +15 -9
- package/dist/flatten.cjs +5 -5
- package/dist/flatten.d.cts +4 -4
- package/dist/flatten.d.ts +4 -4
- package/dist/flatten.js +5 -5
- package/dist/font-port.d.cts +2 -2
- package/dist/font-port.d.ts +2 -2
- package/dist/index.cjs +54 -14
- package/dist/index.d.cts +14 -12
- package/dist/index.d.ts +14 -12
- package/dist/index.js +12 -10
- package/dist/{math-B7gZJeND.d.cts → math-BScHxedi.d.cts} +100 -17
- package/dist/{math-B7gZJeND.d.ts → math-BScHxedi.d.ts} +100 -17
- package/dist/math-layout.d.cts +6 -6
- package/dist/math-layout.d.ts +6 -6
- package/dist/math.cjs +32 -6
- package/dist/math.d.cts +2 -2
- package/dist/math.d.ts +2 -2
- package/dist/math.js +29 -7
- package/dist/{mathml-B1oTCtzc.d.cts → mathml-Czqc1mdZ.d.cts} +3 -3
- package/dist/{mathml-B1oTCtzc.d.ts → mathml-Czqc1mdZ.d.ts} +3 -3
- package/dist/mathml.cjs +9 -2
- package/dist/mathml.d.cts +1 -1
- package/dist/mathml.d.ts +1 -1
- package/dist/mathml.js +9 -2
- package/dist/metadata.cjs +12 -1
- package/dist/metadata.d.cts +13 -0
- package/dist/metadata.d.ts +13 -0
- package/dist/metadata.js +12 -1
- package/dist/package-node-C9iYNIXi.d.cts +1989 -0
- package/dist/package-node-C_rpWAh2.d.ts +1989 -0
- package/dist/package-node.cjs +21 -21
- package/dist/package-node.d.cts +2 -2
- package/dist/package-node.d.ts +2 -2
- package/dist/package-node.js +14 -14
- package/dist/package.cjs +5 -3
- package/dist/package.d.cts +258 -13
- package/dist/package.d.ts +258 -13
- package/dist/package.js +5 -3
- package/dist/schema-io.cjs +21 -11
- package/dist/schema-io.d.cts +13 -9
- package/dist/schema-io.d.ts +13 -9
- package/dist/schema-io.js +21 -12
- package/dist/source-Bas5ol6f.d.cts +43 -0
- package/dist/source-Bas5ol6f.d.ts +43 -0
- package/dist/source.cjs +27 -0
- package/dist/source.d.cts +2 -0
- package/dist/source.d.ts +2 -0
- package/dist/source.js +25 -0
- package/dist/style-D06NwxAJ.d.cts +29 -0
- package/dist/style-D06NwxAJ.d.ts +29 -0
- package/dist/style.cjs +2 -0
- package/dist/style.d.cts +2 -24
- package/dist/style.d.ts +2 -24
- package/dist/style.js +2 -1
- package/dist/text-layout.d.cts +1 -1
- package/dist/text-layout.d.ts +1 -1
- package/package.json +28 -29
- package/schemas/content-document.schema.json +6623 -1694
- package/schemas/{document-package.schema.json → document-tree.schema.json} +1826 -143
- package/dist/content-BmqzegMG.d.cts +0 -2481
- package/dist/content-CIwPb_yh.d.ts +0 -2481
- package/dist/package-node-C7RiYhyk.d.ts +0 -459
- package/dist/package-node-a9CyRaD3.d.cts +0 -459
package/dist/package-node.cjs
CHANGED
|
@@ -29,19 +29,19 @@ function isLeafChild(schema, value) {
|
|
|
29
29
|
if (isRecord(value) && "style" in value) return false;
|
|
30
30
|
return schema.safeParse(value).success;
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function isTreeBlockLeaf(value) {
|
|
33
33
|
if (require_content.isContentConstructStart(value) || require_content.isContentConstructEnd(value)) return false;
|
|
34
34
|
return require_content.isContentBlock(value);
|
|
35
35
|
}
|
|
36
|
-
const
|
|
36
|
+
const TreeBlockLeafSchema = zod.z.custom(isTreeBlockLeaf);
|
|
37
37
|
function isSectionChild(value) {
|
|
38
|
-
return isHeadingGroupNode(value) || isListGroupNode(value) || isSectionConstructGroupNode(value) || isLeafChild(
|
|
38
|
+
return isHeadingGroupNode(value) || isListGroupNode(value) || isSectionConstructGroupNode(value) || isLeafChild(TreeBlockLeafSchema, value);
|
|
39
39
|
}
|
|
40
40
|
function isShapeChild(value) {
|
|
41
|
-
return isListGroupNode(value) || isShapeConstructGroupNode(value) || isLeafChild(
|
|
41
|
+
return isListGroupNode(value) || isShapeConstructGroupNode(value) || isLeafChild(TreeBlockLeafSchema, value);
|
|
42
42
|
}
|
|
43
43
|
function isListChild(value) {
|
|
44
|
-
return isListGroupNode(value) || isShapeConstructGroupNode(value) || isLeafChild(
|
|
44
|
+
return isListGroupNode(value) || isShapeConstructGroupNode(value) || isLeafChild(TreeBlockLeafSchema, value);
|
|
45
45
|
}
|
|
46
46
|
function isSheetChild(value) {
|
|
47
47
|
return isLeafChild(require_content.ContentSheetImageSchema, value) || isLeafChild(require_content.ContentEmbeddedObjectSchema, value);
|
|
@@ -77,20 +77,20 @@ function isShapeConstructGroupNode(value) {
|
|
|
77
77
|
return isRecord(value) && require_construct.ConstructDescriptorSchema.safeParse(value.node).success && isGroupWrapper(value, isShapeChild);
|
|
78
78
|
}
|
|
79
79
|
const packageLeafUnion = zod.z.union([
|
|
80
|
-
|
|
80
|
+
TreeBlockLeafSchema,
|
|
81
81
|
require_content.ContentSheetImageSchema,
|
|
82
82
|
require_content.ContentEmbeddedObjectSchema,
|
|
83
83
|
require_content.ContentVectorSchema,
|
|
84
84
|
require_content.ContentFormulaSchema
|
|
85
85
|
]);
|
|
86
|
-
function
|
|
86
|
+
function isTreeLeaf(value) {
|
|
87
87
|
return packageLeafUnion.safeParse(value).success;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function isTreeGroup(value) {
|
|
90
90
|
return isSectionGroupNode(value) || isSlideGroupNode(value) || isSheetGroupNode(value) || isDrawPageGroupNode(value) || isShapeGroupNode(value) || isHeadingGroupNode(value) || isListGroupNode(value) || isSectionConstructGroupNode(value) || isShapeConstructGroupNode(value);
|
|
91
91
|
}
|
|
92
|
-
function
|
|
93
|
-
return
|
|
92
|
+
function isTreeNode(value) {
|
|
93
|
+
return isTreeGroup(value) || isTreeLeaf(value);
|
|
94
94
|
}
|
|
95
95
|
const SectionGroupSchema = zod.z.custom(isSectionGroupNode);
|
|
96
96
|
const SlideGroupSchema = zod.z.custom(isSlideGroupNode);
|
|
@@ -101,9 +101,9 @@ const HeadingGroupSchema = zod.z.custom(isHeadingGroupNode);
|
|
|
101
101
|
const ListGroupSchema = zod.z.custom(isListGroupNode);
|
|
102
102
|
const SectionConstructGroupSchema = zod.z.custom(isSectionConstructGroupNode);
|
|
103
103
|
const ShapeConstructGroupSchema = zod.z.custom(isShapeConstructGroupNode);
|
|
104
|
-
const
|
|
105
|
-
const
|
|
106
|
-
const
|
|
104
|
+
const TreeGroupSchema = zod.z.custom(isTreeGroup);
|
|
105
|
+
const TreeLeafSchema = zod.z.custom(isTreeLeaf);
|
|
106
|
+
const TreeNodeSchema = zod.z.custom(isTreeNode);
|
|
107
107
|
//#endregion
|
|
108
108
|
exports.DrawPageDescriptorSchema = DrawPageDescriptorSchema;
|
|
109
109
|
exports.DrawPageGroupSchema = DrawPageGroupSchema;
|
|
@@ -111,10 +111,6 @@ exports.HeadingGroupSchema = HeadingGroupSchema;
|
|
|
111
111
|
exports.HeadingParagraphSchema = HeadingParagraphSchema;
|
|
112
112
|
exports.ListGroupSchema = ListGroupSchema;
|
|
113
113
|
exports.ListParagraphSchema = ListParagraphSchema;
|
|
114
|
-
exports.PackageBlockLeafSchema = PackageBlockLeafSchema;
|
|
115
|
-
exports.PackageGroupSchema = PackageGroupSchema;
|
|
116
|
-
exports.PackageLeafSchema = PackageLeafSchema;
|
|
117
|
-
exports.PackageNodeSchema = PackageNodeSchema;
|
|
118
114
|
exports.SectionConstructGroupSchema = SectionConstructGroupSchema;
|
|
119
115
|
exports.SectionDescriptorSchema = SectionDescriptorSchema;
|
|
120
116
|
exports.SectionGroupSchema = SectionGroupSchema;
|
|
@@ -125,16 +121,20 @@ exports.SheetDescriptorSchema = SheetDescriptorSchema;
|
|
|
125
121
|
exports.SheetGroupSchema = SheetGroupSchema;
|
|
126
122
|
exports.SlideDescriptorSchema = SlideDescriptorSchema;
|
|
127
123
|
exports.SlideGroupSchema = SlideGroupSchema;
|
|
124
|
+
exports.TreeBlockLeafSchema = TreeBlockLeafSchema;
|
|
125
|
+
exports.TreeGroupSchema = TreeGroupSchema;
|
|
126
|
+
exports.TreeLeafSchema = TreeLeafSchema;
|
|
127
|
+
exports.TreeNodeSchema = TreeNodeSchema;
|
|
128
128
|
exports.isDrawPageGroupNode = isDrawPageGroupNode;
|
|
129
129
|
exports.isHeadingGroupNode = isHeadingGroupNode;
|
|
130
130
|
exports.isListGroupNode = isListGroupNode;
|
|
131
|
-
exports.isPackageBlockLeaf = isPackageBlockLeaf;
|
|
132
|
-
exports.isPackageGroup = isPackageGroup;
|
|
133
|
-
exports.isPackageLeaf = isPackageLeaf;
|
|
134
|
-
exports.isPackageNode = isPackageNode;
|
|
135
131
|
exports.isSectionConstructGroupNode = isSectionConstructGroupNode;
|
|
136
132
|
exports.isSectionGroupNode = isSectionGroupNode;
|
|
137
133
|
exports.isShapeConstructGroupNode = isShapeConstructGroupNode;
|
|
138
134
|
exports.isShapeGroupNode = isShapeGroupNode;
|
|
139
135
|
exports.isSheetGroupNode = isSheetGroupNode;
|
|
140
136
|
exports.isSlideGroupNode = isSlideGroupNode;
|
|
137
|
+
exports.isTreeBlockLeaf = isTreeBlockLeaf;
|
|
138
|
+
exports.isTreeGroup = isTreeGroup;
|
|
139
|
+
exports.isTreeLeaf = isTreeLeaf;
|
|
140
|
+
exports.isTreeNode = isTreeNode;
|
package/dist/package-node.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
export { DrawPageChild, DrawPageDescriptor, DrawPageDescriptorSchema, DrawPageGroupNode, DrawPageGroupSchema, HeadingGroupNode, HeadingGroupSchema, HeadingParagraph, HeadingParagraphSchema, ListChild, ListGroupNode, ListGroupSchema, ListParagraph, ListParagraphSchema,
|
|
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-C9iYNIXi.cjs";
|
|
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
|
|
2
|
-
export { DrawPageChild, DrawPageDescriptor, DrawPageDescriptorSchema, DrawPageGroupNode, DrawPageGroupSchema, HeadingGroupNode, HeadingGroupSchema, HeadingParagraph, HeadingParagraphSchema, ListChild, ListGroupNode, ListGroupSchema, ListParagraph, ListParagraphSchema,
|
|
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-C_rpWAh2.js";
|
|
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.js
CHANGED
|
@@ -28,19 +28,19 @@ function isLeafChild(schema, value) {
|
|
|
28
28
|
if (isRecord(value) && "style" in value) return false;
|
|
29
29
|
return schema.safeParse(value).success;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function isTreeBlockLeaf(value) {
|
|
32
32
|
if (isContentConstructStart(value) || isContentConstructEnd(value)) return false;
|
|
33
33
|
return isContentBlock(value);
|
|
34
34
|
}
|
|
35
|
-
const
|
|
35
|
+
const TreeBlockLeafSchema = z.custom(isTreeBlockLeaf);
|
|
36
36
|
function isSectionChild(value) {
|
|
37
|
-
return isHeadingGroupNode(value) || isListGroupNode(value) || isSectionConstructGroupNode(value) || isLeafChild(
|
|
37
|
+
return isHeadingGroupNode(value) || isListGroupNode(value) || isSectionConstructGroupNode(value) || isLeafChild(TreeBlockLeafSchema, value);
|
|
38
38
|
}
|
|
39
39
|
function isShapeChild(value) {
|
|
40
|
-
return isListGroupNode(value) || isShapeConstructGroupNode(value) || isLeafChild(
|
|
40
|
+
return isListGroupNode(value) || isShapeConstructGroupNode(value) || isLeafChild(TreeBlockLeafSchema, value);
|
|
41
41
|
}
|
|
42
42
|
function isListChild(value) {
|
|
43
|
-
return isListGroupNode(value) || isShapeConstructGroupNode(value) || isLeafChild(
|
|
43
|
+
return isListGroupNode(value) || isShapeConstructGroupNode(value) || isLeafChild(TreeBlockLeafSchema, value);
|
|
44
44
|
}
|
|
45
45
|
function isSheetChild(value) {
|
|
46
46
|
return isLeafChild(ContentSheetImageSchema, value) || isLeafChild(ContentEmbeddedObjectSchema, value);
|
|
@@ -76,20 +76,20 @@ function isShapeConstructGroupNode(value) {
|
|
|
76
76
|
return isRecord(value) && ConstructDescriptorSchema.safeParse(value.node).success && isGroupWrapper(value, isShapeChild);
|
|
77
77
|
}
|
|
78
78
|
const packageLeafUnion = z.union([
|
|
79
|
-
|
|
79
|
+
TreeBlockLeafSchema,
|
|
80
80
|
ContentSheetImageSchema,
|
|
81
81
|
ContentEmbeddedObjectSchema,
|
|
82
82
|
ContentVectorSchema,
|
|
83
83
|
ContentFormulaSchema
|
|
84
84
|
]);
|
|
85
|
-
function
|
|
85
|
+
function isTreeLeaf(value) {
|
|
86
86
|
return packageLeafUnion.safeParse(value).success;
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function isTreeGroup(value) {
|
|
89
89
|
return isSectionGroupNode(value) || isSlideGroupNode(value) || isSheetGroupNode(value) || isDrawPageGroupNode(value) || isShapeGroupNode(value) || isHeadingGroupNode(value) || isListGroupNode(value) || isSectionConstructGroupNode(value) || isShapeConstructGroupNode(value);
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
return
|
|
91
|
+
function isTreeNode(value) {
|
|
92
|
+
return isTreeGroup(value) || isTreeLeaf(value);
|
|
93
93
|
}
|
|
94
94
|
const SectionGroupSchema = z.custom(isSectionGroupNode);
|
|
95
95
|
const SlideGroupSchema = z.custom(isSlideGroupNode);
|
|
@@ -100,8 +100,8 @@ const HeadingGroupSchema = z.custom(isHeadingGroupNode);
|
|
|
100
100
|
const ListGroupSchema = z.custom(isListGroupNode);
|
|
101
101
|
const SectionConstructGroupSchema = z.custom(isSectionConstructGroupNode);
|
|
102
102
|
const ShapeConstructGroupSchema = z.custom(isShapeConstructGroupNode);
|
|
103
|
-
const
|
|
104
|
-
const
|
|
105
|
-
const
|
|
103
|
+
const TreeGroupSchema = z.custom(isTreeGroup);
|
|
104
|
+
const TreeLeafSchema = z.custom(isTreeLeaf);
|
|
105
|
+
const TreeNodeSchema = z.custom(isTreeNode);
|
|
106
106
|
//#endregion
|
|
107
|
-
export { DrawPageDescriptorSchema, DrawPageGroupSchema, HeadingGroupSchema, HeadingParagraphSchema, ListGroupSchema, ListParagraphSchema,
|
|
107
|
+
export { DrawPageDescriptorSchema, DrawPageGroupSchema, HeadingGroupSchema, HeadingParagraphSchema, ListGroupSchema, ListParagraphSchema, SectionConstructGroupSchema, SectionDescriptorSchema, SectionGroupSchema, ShapeConstructGroupSchema, ShapeDescriptorSchema, ShapeGroupSchema, SheetDescriptorSchema, SheetGroupSchema, SlideDescriptorSchema, SlideGroupSchema, TreeBlockLeafSchema, TreeGroupSchema, TreeLeafSchema, TreeNodeSchema, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, isTreeBlockLeaf, isTreeGroup, isTreeLeaf, isTreeNode };
|
package/dist/package.cjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_source = require("./source.cjs");
|
|
2
3
|
const require_geometry = require("./geometry.cjs");
|
|
3
4
|
const require_metadata = require("./metadata.cjs");
|
|
4
5
|
const require_content = require("./content.cjs");
|
|
@@ -14,9 +15,10 @@ const packageEnvelopeFields = {
|
|
|
14
15
|
definitions: require_definitions.DefinitionsTableSchema.optional(),
|
|
15
16
|
layers: require_definitions.DefinitionsTableSchema.optional(),
|
|
16
17
|
attachments: require_definitions.DefinitionsTableSchema.optional(),
|
|
17
|
-
destinations: require_definitions.DefinitionsTableSchema.optional()
|
|
18
|
+
destinations: require_definitions.DefinitionsTableSchema.optional(),
|
|
19
|
+
source: zod.z.record(zod.z.string(), require_source.SourceResidueSchema).optional()
|
|
18
20
|
};
|
|
19
|
-
const
|
|
21
|
+
const DocumentTreeSchema = zod.z.discriminatedUnion("kind", [
|
|
20
22
|
zod.z.object({
|
|
21
23
|
kind: zod.z.literal("wordprocessing"),
|
|
22
24
|
...packageEnvelopeFields,
|
|
@@ -44,4 +46,4 @@ const DocumentPackageSchema = zod.z.discriminatedUnion("kind", [
|
|
|
44
46
|
})
|
|
45
47
|
]);
|
|
46
48
|
//#endregion
|
|
47
|
-
exports.
|
|
49
|
+
exports.DocumentTreeSchema = DocumentTreeSchema;
|