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.
Files changed (47) hide show
  1. package/dist/codec.d.cts +1 -1
  2. package/dist/codec.d.ts +1 -1
  3. package/dist/{construct-C9cYkjnd.d.cts → construct-GVdTKrE7.d.cts} +3 -3
  4. package/dist/{construct-C9cYkjnd.d.ts → construct-GVdTKrE7.d.ts} +3 -3
  5. package/dist/construct.d.cts +1 -1
  6. package/dist/construct.d.ts +1 -1
  7. package/dist/{content-PPcQWl8e.d.ts → content-DAc4O272.d.ts} +1934 -87
  8. package/dist/{content-JIKLIrji.d.cts → content-SgKmas45.d.cts} +1934 -87
  9. package/dist/content-json-schema-defs.cjs +158 -15
  10. package/dist/content-json-schema-defs.js +158 -15
  11. package/dist/content.cjs +106 -27
  12. package/dist/content.d.cts +2 -2
  13. package/dist/content.d.ts +2 -2
  14. package/dist/content.js +98 -28
  15. package/dist/decompose.d.cts +2 -2
  16. package/dist/decompose.d.ts +2 -2
  17. package/dist/definitions.cjs +1 -10
  18. package/dist/definitions.d.cts +1 -1
  19. package/dist/definitions.d.ts +1 -1
  20. package/dist/definitions.js +2 -11
  21. package/dist/factor-styles.cjs +1 -0
  22. package/dist/factor-styles.d.cts +1 -1
  23. package/dist/factor-styles.d.ts +1 -1
  24. package/dist/factor-styles.js +1 -0
  25. package/dist/flatten.cjs +1 -0
  26. package/dist/flatten.d.cts +1 -1
  27. package/dist/flatten.d.ts +1 -1
  28. package/dist/flatten.js +1 -0
  29. package/dist/index.cjs +9 -0
  30. package/dist/index.d.cts +4 -4
  31. package/dist/index.d.ts +4 -4
  32. package/dist/index.js +2 -2
  33. package/dist/{package-node-B4CHgiVQ.d.ts → package-node-BnFUnaa0.d.ts} +359 -49
  34. package/dist/{package-node-duDMdOvH.d.cts → package-node-DnUyGT61.d.cts} +359 -49
  35. package/dist/package-node.d.cts +1 -1
  36. package/dist/package-node.d.ts +1 -1
  37. package/dist/package.cjs +1 -0
  38. package/dist/package.d.cts +33 -1
  39. package/dist/package.d.ts +33 -1
  40. package/dist/package.js +2 -1
  41. package/dist/schema-io.cjs +2 -2
  42. package/dist/schema-io.d.cts +1 -1
  43. package/dist/schema-io.d.ts +1 -1
  44. package/dist/schema-io.js +2 -2
  45. package/package.json +1 -1
  46. package/schemas/content-document.schema.json +1296 -13
  47. 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-B4CHgiVQ.js";
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({
@@ -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.6.1/schemas/${SCHEMA_FILE_NAMES[kind]}`;
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.6.1")) throw new SchemaVersionMismatchError(value.$schema, parts.version, "7.6.1");
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,
@@ -1,4 +1,4 @@
1
- import { b as ContentDocument } from "./content-JIKLIrji.cjs";
1
+ import { C as ContentDocument } from "./content-SgKmas45.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 { b as ContentDocument } from "./content-PPcQWl8e.js";
1
+ import { C as ContentDocument } from "./content-DAc4O272.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.6.1/schemas/${SCHEMA_FILE_NAMES[kind]}`;
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.6.1")) throw new SchemaVersionMismatchError(value.$schema, parts.version, "7.6.1");
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.6.1",
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": {