document-schema 3.3.0 → 4.0.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/README.md +82 -31
- package/dist/codec.d.cts +2 -7
- package/dist/codec.d.ts +2 -7
- package/dist/content-BN0PWqpt.d.cts +2393 -0
- package/dist/content-CiZf6Fqn.d.ts +2393 -0
- package/dist/content-json-schema-defs.cjs +1005 -0
- package/dist/content-json-schema-defs.js +1005 -0
- package/dist/content.cjs +1 -7
- package/dist/content.d.cts +2 -2354
- package/dist/content.d.ts +2 -2354
- package/dist/content.js +1 -7
- package/dist/definitions.cjs +109 -0
- package/dist/definitions.d.cts +115 -0
- package/dist/definitions.d.ts +115 -0
- package/dist/definitions.js +99 -0
- package/dist/index.cjs +42 -18
- package/dist/index.d.cts +7 -6
- package/dist/index.d.ts +7 -6
- package/dist/index.js +6 -5
- package/dist/package-node-DDPSNOvy.d.cts +441 -0
- package/dist/package-node-QVFHQcm8.d.ts +441 -0
- package/dist/package-node.cjs +120 -0
- package/dist/package-node.d.cts +2 -0
- package/dist/package-node.d.ts +2 -0
- package/dist/package-node.js +93 -0
- package/dist/package.cjs +37 -7
- package/dist/package.d.cts +452 -755
- package/dist/package.d.ts +452 -755
- package/dist/package.js +39 -8
- package/dist/schema-io.cjs +55 -25
- package/dist/schema-io.d.cts +13 -11
- package/dist/schema-io.d.ts +13 -11
- package/dist/schema-io.js +54 -25
- package/package.json +2 -2
- package/schemas/content-document.schema.json +1476 -68
- package/schemas/document-package.schema.json +3056 -30
- package/dist/layout.cjs +0 -150
- package/dist/layout.d.cts +0 -684
- package/dist/layout.d.ts +0 -684
- package/dist/layout.js +0 -136
- package/schemas/layout-document.schema.json +0 -760
package/dist/package.cjs
CHANGED
|
@@ -1,14 +1,44 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_geometry = require("./geometry.cjs");
|
|
3
|
+
const require_metadata = require("./metadata.cjs");
|
|
3
4
|
const require_content = require("./content.cjs");
|
|
5
|
+
const require_definitions = require("./definitions.cjs");
|
|
6
|
+
const require_package_node = require("./package-node.cjs");
|
|
4
7
|
let zod = require("zod");
|
|
5
8
|
//#region src/package.ts
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
const packageEnvelopeFields = {
|
|
10
|
+
metadata: require_metadata.LayoutMetadataSchema,
|
|
11
|
+
...require_content.contentDocumentSharedFields,
|
|
12
|
+
pages: zod.z.array(require_geometry.PageSizeSchema).optional(),
|
|
13
|
+
styles: require_definitions.StylesTableSchema.optional(),
|
|
14
|
+
definitions: require_definitions.DefinitionsTableSchema.optional()
|
|
15
|
+
};
|
|
16
|
+
const DocumentPackageSchema = zod.z.discriminatedUnion("kind", [
|
|
17
|
+
zod.z.object({
|
|
18
|
+
kind: zod.z.literal("wordprocessing"),
|
|
19
|
+
...packageEnvelopeFields,
|
|
20
|
+
children: zod.z.array(require_package_node.SectionGroupSchema)
|
|
21
|
+
}),
|
|
22
|
+
zod.z.object({
|
|
23
|
+
kind: zod.z.literal("presentation"),
|
|
24
|
+
...packageEnvelopeFields,
|
|
25
|
+
children: zod.z.array(require_package_node.SlideGroupSchema)
|
|
26
|
+
}),
|
|
27
|
+
zod.z.object({
|
|
28
|
+
kind: zod.z.literal("spreadsheet"),
|
|
29
|
+
...packageEnvelopeFields,
|
|
30
|
+
children: zod.z.array(require_package_node.SheetGroupSchema)
|
|
31
|
+
}),
|
|
32
|
+
zod.z.object({
|
|
33
|
+
kind: zod.z.literal("drawing"),
|
|
34
|
+
...packageEnvelopeFields,
|
|
35
|
+
children: zod.z.array(require_package_node.DrawPageGroupSchema)
|
|
36
|
+
}),
|
|
37
|
+
zod.z.object({
|
|
38
|
+
kind: zod.z.literal("formula"),
|
|
39
|
+
...packageEnvelopeFields,
|
|
40
|
+
children: zod.z.array(require_content.ContentFormulaSchema).length(1)
|
|
41
|
+
})
|
|
42
|
+
]);
|
|
12
43
|
//#endregion
|
|
13
|
-
exports.DOCUMENT_PACKAGE_FORMAT_VERSION = DOCUMENT_PACKAGE_FORMAT_VERSION;
|
|
14
44
|
exports.DocumentPackageSchema = DocumentPackageSchema;
|