document-content-model 7.6.1 → 7.8.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-C9cYkjnd.d.cts → construct-GVdTKrE7.d.cts} +3 -3
- package/dist/{construct-C9cYkjnd.d.ts → construct-GVdTKrE7.d.ts} +3 -3
- package/dist/construct.d.cts +1 -1
- package/dist/construct.d.ts +1 -1
- package/dist/{content-PPcQWl8e.d.ts → content-DAc4O272.d.ts} +1934 -87
- package/dist/{content-JIKLIrji.d.cts → content-SgKmas45.d.cts} +1934 -87
- package/dist/content-json-schema-defs.cjs +158 -15
- package/dist/content-json-schema-defs.js +158 -15
- package/dist/content.cjs +106 -27
- package/dist/content.d.cts +2 -2
- package/dist/content.d.ts +2 -2
- package/dist/content.js +98 -28
- package/dist/decompose.d.cts +2 -2
- package/dist/decompose.d.ts +2 -2
- package/dist/definitions.cjs +1 -10
- package/dist/definitions.d.cts +1 -1
- package/dist/definitions.d.ts +1 -1
- package/dist/definitions.js +2 -11
- package/dist/factor-styles.cjs +1 -0
- package/dist/factor-styles.d.cts +1 -1
- package/dist/factor-styles.d.ts +1 -1
- package/dist/factor-styles.js +1 -0
- package/dist/flatten.cjs +1 -0
- package/dist/flatten.d.cts +1 -1
- package/dist/flatten.d.ts +1 -1
- package/dist/flatten.js +1 -0
- package/dist/index.cjs +9 -0
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/{package-node-B4CHgiVQ.d.ts → package-node-BnFUnaa0.d.ts} +359 -49
- package/dist/{package-node-duDMdOvH.d.cts → package-node-DnUyGT61.d.cts} +359 -49
- package/dist/package-node.d.cts +1 -1
- package/dist/package-node.d.ts +1 -1
- package/dist/package.cjs +1 -0
- package/dist/package.d.cts +33 -1
- package/dist/package.d.ts +33 -1
- package/dist/package.js +2 -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/package.json +1 -1
- package/schemas/content-document.schema.json +1296 -13
- package/schemas/document-tree.schema.json +292 -3
package/dist/package.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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-BnFUnaa0.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region src/package.d.ts
|
|
6
6
|
declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -302,6 +302,11 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
302
302
|
}, z.core.$strip>;
|
|
303
303
|
kind: z.ZodLiteral<"presentation">;
|
|
304
304
|
}, z.core.$strip>, z.ZodObject<{
|
|
305
|
+
names: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
306
|
+
name: z.ZodString;
|
|
307
|
+
refersTo: z.ZodString;
|
|
308
|
+
scopeSheetIndex: z.ZodOptional<z.ZodNumber>;
|
|
309
|
+
}, z.core.$strip>>>;
|
|
305
310
|
children: z.ZodArray<z.ZodCustom<SheetGroupNode, SheetGroupNode>>;
|
|
306
311
|
pages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
307
312
|
widthPt: z.ZodNumber;
|
|
@@ -601,6 +606,33 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
601
606
|
kind: z.ZodLiteral<"drawing">;
|
|
602
607
|
}, z.core.$strip>, z.ZodObject<{
|
|
603
608
|
children: z.ZodArray<z.ZodObject<{
|
|
609
|
+
origin: z.ZodOptional<z.ZodEnum<{
|
|
610
|
+
body: "body";
|
|
611
|
+
chart: "chart";
|
|
612
|
+
diagram: "diagram";
|
|
613
|
+
table: "table";
|
|
614
|
+
image: "image";
|
|
615
|
+
notes: "notes";
|
|
616
|
+
}>>;
|
|
617
|
+
interpretation: z.ZodOptional<z.ZodObject<{
|
|
618
|
+
transcript: z.ZodOptional<z.ZodObject<{
|
|
619
|
+
text: z.ZodString;
|
|
620
|
+
confidence: z.ZodEnum<{
|
|
621
|
+
high: "high";
|
|
622
|
+
medium: "medium";
|
|
623
|
+
low: "low";
|
|
624
|
+
}>;
|
|
625
|
+
mechanism: z.ZodEnum<{
|
|
626
|
+
deterministic: "deterministic";
|
|
627
|
+
model: "model";
|
|
628
|
+
}>;
|
|
629
|
+
}, z.core.$strip>>;
|
|
630
|
+
description: z.ZodOptional<z.ZodString>;
|
|
631
|
+
by: z.ZodOptional<z.ZodObject<{
|
|
632
|
+
model: z.ZodString;
|
|
633
|
+
at: z.ZodString;
|
|
634
|
+
}, z.core.$strip>>;
|
|
635
|
+
}, z.core.$strip>>;
|
|
604
636
|
mathml: z.ZodArray<z.ZodType<MathMlNode, MathMlNode, z.core.$ZodTypeInternals<MathMlNode, MathMlNode>>>;
|
|
605
637
|
starMath: z.ZodOptional<z.ZodString>;
|
|
606
638
|
presentation: z.ZodOptional<z.ZodObject<{
|
package/dist/package.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SourceResidueSchema } from "./source.js";
|
|
2
2
|
import { PageSizeSchema } from "./geometry.js";
|
|
3
3
|
import { LayoutMetadataSchema } from "./metadata.js";
|
|
4
|
-
import { ContentFormulaSchema, contentDocumentSharedFields } from "./content.js";
|
|
4
|
+
import { ContentDefinedNameSchema, ContentFormulaSchema, contentDocumentSharedFields } from "./content.js";
|
|
5
5
|
import { DefinitionsTableSchema, StylesTableSchema } from "./definitions.js";
|
|
6
6
|
import { DrawPageGroupSchema, SectionGroupSchema, SheetGroupSchema, SlideGroupSchema } from "./package-node.js";
|
|
7
7
|
import { z } from "zod";
|
|
@@ -31,6 +31,7 @@ const DocumentTreeSchema = z.discriminatedUnion("kind", [
|
|
|
31
31
|
z.object({
|
|
32
32
|
kind: z.literal("spreadsheet"),
|
|
33
33
|
...packageEnvelopeFields,
|
|
34
|
+
names: z.array(ContentDefinedNameSchema).optional(),
|
|
34
35
|
children: z.array(SheetGroupSchema)
|
|
35
36
|
}),
|
|
36
37
|
z.object({
|
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.8.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.8.0")) throw new SchemaVersionMismatchError(value.$schema, parts.version, "7.8.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.8.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.8.0")) throw new SchemaVersionMismatchError(value.$schema, parts.version, "7.8.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-content-model",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.8.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": {
|