document-content-model 4.3.3 → 7.6.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 (96) hide show
  1. package/README.md +274 -95
  2. package/dist/border-weight.cjs +26 -0
  3. package/dist/border-weight.d.cts +12 -0
  4. package/dist/border-weight.d.ts +12 -0
  5. package/dist/border-weight.js +23 -0
  6. package/dist/codec.d.cts +1 -1
  7. package/dist/codec.d.ts +1 -1
  8. package/dist/{construct-CdQuI9f5.d.cts → construct-GVdTKrE7.d.cts} +245 -5
  9. package/dist/{construct-CdQuI9f5.d.ts → construct-GVdTKrE7.d.ts} +245 -5
  10. package/dist/construct.cjs +13 -6
  11. package/dist/construct.d.cts +1 -1
  12. package/dist/construct.d.ts +1 -1
  13. package/dist/construct.js +13 -6
  14. package/dist/content-BCOxY0Eb.d.ts +10273 -0
  15. package/dist/content-BzkhrS6P.d.cts +10273 -0
  16. package/dist/content-json-schema-defs.cjs +1056 -189
  17. package/dist/content-json-schema-defs.js +1056 -189
  18. package/dist/content.cjs +514 -36
  19. package/dist/content.d.cts +2 -2
  20. package/dist/content.d.ts +2 -2
  21. package/dist/content.js +488 -37
  22. package/dist/decompose.cjs +7 -17
  23. package/dist/decompose.d.cts +5 -5
  24. package/dist/decompose.d.ts +5 -5
  25. package/dist/decompose.js +7 -17
  26. package/dist/definitions.cjs +5 -1
  27. package/dist/definitions.d.cts +37 -1
  28. package/dist/definitions.d.ts +37 -1
  29. package/dist/definitions.js +5 -1
  30. package/dist/factor-styles.cjs +14 -8
  31. package/dist/factor-styles.d.cts +6 -6
  32. package/dist/factor-styles.d.ts +6 -6
  33. package/dist/factor-styles.js +15 -9
  34. package/dist/flatten.cjs +5 -5
  35. package/dist/flatten.d.cts +4 -4
  36. package/dist/flatten.d.ts +4 -4
  37. package/dist/flatten.js +5 -5
  38. package/dist/font-port.d.cts +2 -2
  39. package/dist/font-port.d.ts +2 -2
  40. package/dist/index.cjs +54 -14
  41. package/dist/index.d.cts +14 -12
  42. package/dist/index.d.ts +14 -12
  43. package/dist/index.js +12 -10
  44. package/dist/{math-BlG8Tjk-.d.cts → math-BScHxedi.d.cts} +97 -14
  45. package/dist/{math-BlG8Tjk-.d.ts → math-BScHxedi.d.ts} +97 -14
  46. package/dist/math-layout.d.cts +6 -6
  47. package/dist/math-layout.d.ts +6 -6
  48. package/dist/math.cjs +32 -6
  49. package/dist/math.d.cts +2 -2
  50. package/dist/math.d.ts +2 -2
  51. package/dist/math.js +29 -7
  52. package/dist/{mathml-B1oTCtzc.d.cts → mathml-Czqc1mdZ.d.cts} +3 -3
  53. package/dist/{mathml-B1oTCtzc.d.ts → mathml-Czqc1mdZ.d.ts} +3 -3
  54. package/dist/mathml.cjs +9 -2
  55. package/dist/mathml.d.cts +1 -1
  56. package/dist/mathml.d.ts +1 -1
  57. package/dist/mathml.js +9 -2
  58. package/dist/metadata.cjs +12 -1
  59. package/dist/metadata.d.cts +13 -0
  60. package/dist/metadata.d.ts +13 -0
  61. package/dist/metadata.js +12 -1
  62. package/dist/package-node-C4mh1hLY.d.ts +1989 -0
  63. package/dist/package-node-RQMDBzwd.d.cts +1989 -0
  64. package/dist/package-node.cjs +21 -21
  65. package/dist/package-node.d.cts +2 -2
  66. package/dist/package-node.d.ts +2 -2
  67. package/dist/package-node.js +14 -14
  68. package/dist/package.cjs +5 -3
  69. package/dist/package.d.cts +253 -8
  70. package/dist/package.d.ts +253 -8
  71. package/dist/package.js +5 -3
  72. package/dist/schema-io.cjs +21 -11
  73. package/dist/schema-io.d.cts +13 -9
  74. package/dist/schema-io.d.ts +13 -9
  75. package/dist/schema-io.js +21 -12
  76. package/dist/source-Bas5ol6f.d.cts +43 -0
  77. package/dist/source-Bas5ol6f.d.ts +43 -0
  78. package/dist/source.cjs +27 -0
  79. package/dist/source.d.cts +2 -0
  80. package/dist/source.d.ts +2 -0
  81. package/dist/source.js +25 -0
  82. package/dist/style-D06NwxAJ.d.cts +29 -0
  83. package/dist/style-D06NwxAJ.d.ts +29 -0
  84. package/dist/style.cjs +2 -0
  85. package/dist/style.d.cts +2 -24
  86. package/dist/style.d.ts +2 -24
  87. package/dist/style.js +2 -1
  88. package/dist/text-layout.d.cts +1 -1
  89. package/dist/text-layout.d.ts +1 -1
  90. package/package.json +28 -29
  91. package/schemas/content-document.schema.json +6623 -1694
  92. package/schemas/{document-package.schema.json → document-tree.schema.json} +1826 -143
  93. package/dist/content-B7b_P3FC.d.cts +0 -2481
  94. package/dist/content-Dn7uoJFG.d.ts +0 -2481
  95. package/dist/package-node-CC-FE2zS.d.cts +0 -459
  96. package/dist/package-node-DxdparRh.d.ts +0 -459
package/dist/schema-io.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import { ContentDocumentSchema } from "./content.js";
2
- import { DocumentPackageSchema } from "./package.js";
2
+ import { DocumentTreeSchema } from "./package.js";
3
3
  //#region src/schema-io.ts
4
4
  const SCHEMA_FILE_NAMES = {
5
- DocumentPackage: "document-package.schema.json",
5
+ DocumentTree: "document-tree.schema.json",
6
6
  ContentDocument: "content-document.schema.json"
7
7
  };
8
8
  function schemaUriFor(kind) {
9
- return `https://cdn.jsdelivr.net/npm/document-schema.js@4.3.3/schemas/${SCHEMA_FILE_NAMES[kind]}`;
9
+ return `https://cdn.jsdelivr.net/npm/document-schema.js@7.6.0/schemas/${SCHEMA_FILE_NAMES[kind]}`;
10
10
  }
11
- const SCHEMA_URI_PATTERN = /^https:\/\/cdn\.jsdelivr\.net\/npm\/document-schema\.js@([^/]+)\/schemas\/(document-package|content-document|layout-document)\.schema\.json$/;
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) {
13
13
  const match = SCHEMA_URI_PATTERN.exec(uri);
14
14
  if (match === null) return void 0;
@@ -22,7 +22,7 @@ function parseSchemaUri(uri) {
22
22
  }
23
23
  function kindForFileStem(stem) {
24
24
  switch (stem) {
25
- case "document-package": return "DocumentPackage";
25
+ case "document-tree": return "DocumentTree";
26
26
  case "content-document": return "ContentDocument";
27
27
  default: return;
28
28
  }
@@ -42,9 +42,9 @@ function documentSchemaKindOf(value) {
42
42
  if (parts === void 0) return void 0;
43
43
  return kindForFileStem(parts.stem);
44
44
  }
45
- function documentPackageWithSchema(value) {
45
+ function documentTreeWithSchema(value) {
46
46
  return {
47
- $schema: schemaUriFor("DocumentPackage"),
47
+ $schema: schemaUriFor("DocumentTree"),
48
48
  ...value
49
49
  };
50
50
  }
@@ -70,6 +70,14 @@ var LayoutSchemaDemotedError = class extends Error {
70
70
  this.schema = schema;
71
71
  }
72
72
  };
73
+ var DocumentPackageRenamedError = class extends Error {
74
+ schema;
75
+ constructor(schema) {
76
+ super(`documentFromJson: this value is a document-package dump (${schema}), and DocumentPackage was renamed to DocumentTree in document-schema.js 5.0.0 (ExaDev/documents.js#661). Read it with a document-schema.js 4.x release, or re-dump it with a 5.x release.`);
77
+ this.name = "DocumentPackageRenamedError";
78
+ this.schema = schema;
79
+ }
80
+ };
73
81
  var SchemaVersionMismatchError = class extends Error {
74
82
  schema;
75
83
  dumpVersion;
@@ -78,7 +86,7 @@ var SchemaVersionMismatchError = class extends Error {
78
86
  const dumpMajor = majorVersionOf(dumpVersion);
79
87
  const installedMajor = majorVersionOf(installedVersion);
80
88
  const isOlder = dumpMajor !== void 0 && installedMajor !== void 0 && dumpMajor < installedMajor;
81
- super(`documentFromJson: this dump's $schema pins document-schema.js@${dumpVersion}, but the installed release is @${installedVersion}, and a dump only parses under the major that wrote it.` + (isOlder ? ` Dumps from before 4.0.0 carry the retired formatVersion field and (for packages) the flat { formatVersion, content, pages } shape, replaced in 4.0.0 by the tree-form DocumentPackage (ExaDev/document-schema.js#20). Re-dump the value with a 4.x release, or parse it with the release that produced it.` : ` Upgrade document-schema.js to read it.`));
89
+ super(`documentFromJson: this dump's $schema pins document-schema.js@${dumpVersion}, but the installed release is @${installedVersion}, and a dump only parses under the major that wrote it.` + (isOlder ? ` Dumps from before 4.0.0 carry the retired formatVersion field and (for packages) the flat { formatVersion, content, pages } shape, replaced in 4.0.0 by the tree-form DocumentTree (ExaDev/document-schema.js#20, named DocumentPackage before ExaDev/documents.js#661's 5.0.0 rename). Re-dump the value with a release matching its own major, or parse it with the release that produced it.` : ` Upgrade document-schema.js to read it.`));
82
90
  this.name = "SchemaVersionMismatchError";
83
91
  this.schema = schema;
84
92
  this.dumpVersion = dumpVersion;
@@ -90,13 +98,14 @@ function documentFromJson(value) {
90
98
  const parts = parseSchemaUri(value.$schema);
91
99
  if (parts === void 0) throw new UnrecognizedDocumentSchemaError(value.$schema);
92
100
  if (parts.stem === "layout-document") throw new LayoutSchemaDemotedError(value.$schema);
101
+ if (parts.stem === "document-package") throw new DocumentPackageRenamedError(value.$schema);
93
102
  const kind = kindForFileStem(parts.stem);
94
103
  if (kind === void 0) throw new UnrecognizedDocumentSchemaError(value.$schema);
95
- if (majorVersionOf(parts.version) !== majorVersionOf("4.3.3")) throw new SchemaVersionMismatchError(value.$schema, parts.version, "4.3.3");
104
+ if (majorVersionOf(parts.version) !== majorVersionOf("7.6.0")) throw new SchemaVersionMismatchError(value.$schema, parts.version, "7.6.0");
96
105
  switch (kind) {
97
- case "DocumentPackage": return {
106
+ case "DocumentTree": return {
98
107
  kind,
99
- value: DocumentPackageSchema.parse(value)
108
+ value: DocumentTreeSchema.parse(value)
100
109
  };
101
110
  case "ContentDocument": return {
102
111
  kind,
@@ -105,4 +114,4 @@ function documentFromJson(value) {
105
114
  }
106
115
  }
107
116
  //#endregion
108
- export { LayoutSchemaDemotedError, SCHEMA_FILE_NAMES, SchemaVersionMismatchError, UnrecognizedDocumentSchemaError, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, schemaUriFor };
117
+ export { DocumentPackageRenamedError, LayoutSchemaDemotedError, SCHEMA_FILE_NAMES, SchemaVersionMismatchError, UnrecognizedDocumentSchemaError, contentDocumentWithSchema, documentFromJson, documentSchemaKindOf, documentTreeWithSchema, schemaUriFor };
@@ -0,0 +1,43 @@
1
+ import { z } from "zod";
2
+ //#region src/source.d.ts
3
+ declare const SourceFormatSchema: z.ZodEnum<{
4
+ docx: "docx";
5
+ pptx: "pptx";
6
+ xlsx: "xlsx";
7
+ odt: "odt";
8
+ ods: "ods";
9
+ odp: "odp";
10
+ odg: "odg";
11
+ odm: "odm";
12
+ odb: "odb";
13
+ odf: "odf";
14
+ markdown: "markdown";
15
+ pdf: "pdf";
16
+ epub: "epub";
17
+ rtf: "rtf";
18
+ wpd: "wpd";
19
+ }>;
20
+ type SourceFormat = z.infer<typeof SourceFormatSchema>;
21
+ declare const SourceResidueSchema: z.ZodObject<{
22
+ format: z.ZodEnum<{
23
+ docx: "docx";
24
+ pptx: "pptx";
25
+ xlsx: "xlsx";
26
+ odt: "odt";
27
+ ods: "ods";
28
+ odp: "odp";
29
+ odg: "odg";
30
+ odm: "odm";
31
+ odb: "odb";
32
+ odf: "odf";
33
+ markdown: "markdown";
34
+ pdf: "pdf";
35
+ epub: "epub";
36
+ rtf: "rtf";
37
+ wpd: "wpd";
38
+ }>;
39
+ xml: z.ZodString;
40
+ }, z.core.$strict>;
41
+ type SourceResidue = z.infer<typeof SourceResidueSchema>;
42
+ //#endregion
43
+ export { SourceResidueSchema as i, SourceFormatSchema as n, SourceResidue as r, SourceFormat as t };
@@ -0,0 +1,43 @@
1
+ import { z } from "zod";
2
+ //#region src/source.d.ts
3
+ declare const SourceFormatSchema: z.ZodEnum<{
4
+ docx: "docx";
5
+ pptx: "pptx";
6
+ xlsx: "xlsx";
7
+ odt: "odt";
8
+ ods: "ods";
9
+ odp: "odp";
10
+ odg: "odg";
11
+ odm: "odm";
12
+ odb: "odb";
13
+ odf: "odf";
14
+ markdown: "markdown";
15
+ pdf: "pdf";
16
+ epub: "epub";
17
+ rtf: "rtf";
18
+ wpd: "wpd";
19
+ }>;
20
+ type SourceFormat = z.infer<typeof SourceFormatSchema>;
21
+ declare const SourceResidueSchema: z.ZodObject<{
22
+ format: z.ZodEnum<{
23
+ docx: "docx";
24
+ pptx: "pptx";
25
+ xlsx: "xlsx";
26
+ odt: "odt";
27
+ ods: "ods";
28
+ odp: "odp";
29
+ odg: "odg";
30
+ odm: "odm";
31
+ odb: "odb";
32
+ odf: "odf";
33
+ markdown: "markdown";
34
+ pdf: "pdf";
35
+ epub: "epub";
36
+ rtf: "rtf";
37
+ wpd: "wpd";
38
+ }>;
39
+ xml: z.ZodString;
40
+ }, z.core.$strict>;
41
+ type SourceResidue = z.infer<typeof SourceResidueSchema>;
42
+ //#endregion
43
+ export { SourceResidueSchema as i, SourceFormatSchema as n, SourceResidue as r, SourceFormat as t };
@@ -0,0 +1,27 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ let zod = require("zod");
3
+ //#region src/source.ts
4
+ const SourceFormatSchema = zod.z.enum([
5
+ "docx",
6
+ "pptx",
7
+ "xlsx",
8
+ "odt",
9
+ "ods",
10
+ "odp",
11
+ "odg",
12
+ "odm",
13
+ "odb",
14
+ "odf",
15
+ "markdown",
16
+ "pdf",
17
+ "epub",
18
+ "rtf",
19
+ "wpd"
20
+ ]);
21
+ const SourceResidueSchema = zod.z.strictObject({
22
+ format: SourceFormatSchema,
23
+ xml: zod.z.string()
24
+ });
25
+ //#endregion
26
+ exports.SourceFormatSchema = SourceFormatSchema;
27
+ exports.SourceResidueSchema = SourceResidueSchema;
@@ -0,0 +1,2 @@
1
+ import { i as SourceResidueSchema, n as SourceFormatSchema, r as SourceResidue, t as SourceFormat } from "./source-Bas5ol6f.cjs";
2
+ export { SourceFormat, SourceFormatSchema, SourceResidue, SourceResidueSchema };
@@ -0,0 +1,2 @@
1
+ import { i as SourceResidueSchema, n as SourceFormatSchema, r as SourceResidue, t as SourceFormat } from "./source-Bas5ol6f.js";
2
+ export { SourceFormat, SourceFormatSchema, SourceResidue, SourceResidueSchema };
package/dist/source.js ADDED
@@ -0,0 +1,25 @@
1
+ import { z } from "zod";
2
+ //#region src/source.ts
3
+ const SourceFormatSchema = z.enum([
4
+ "docx",
5
+ "pptx",
6
+ "xlsx",
7
+ "odt",
8
+ "ods",
9
+ "odp",
10
+ "odg",
11
+ "odm",
12
+ "odb",
13
+ "odf",
14
+ "markdown",
15
+ "pdf",
16
+ "epub",
17
+ "rtf",
18
+ "wpd"
19
+ ]);
20
+ const SourceResidueSchema = z.strictObject({
21
+ format: SourceFormatSchema,
22
+ xml: z.string()
23
+ });
24
+ //#endregion
25
+ export { SourceFormatSchema, SourceResidueSchema };
@@ -0,0 +1,29 @@
1
+ import { z } from "zod";
2
+ //#region src/style.d.ts
3
+ declare const AlignmentSchema: z.ZodEnum<{
4
+ left: "left";
5
+ center: "center";
6
+ right: "right";
7
+ justify: "justify";
8
+ }>;
9
+ type Alignment = z.infer<typeof AlignmentSchema>;
10
+ declare const TextDirectionSchema: z.ZodEnum<{
11
+ ltr: "ltr";
12
+ rtl: "rtl";
13
+ }>;
14
+ type TextDirection = z.infer<typeof TextDirectionSchema>;
15
+ declare const LayoutFontSchema: z.ZodObject<{
16
+ family: z.ZodString;
17
+ weight: z.ZodEnum<{
18
+ bold: "bold";
19
+ normal: "normal";
20
+ }>;
21
+ style: z.ZodEnum<{
22
+ italic: "italic";
23
+ normal: "normal";
24
+ }>;
25
+ }, z.core.$strip>;
26
+ type LayoutFont = z.infer<typeof LayoutFontSchema>;
27
+ declare const DEFAULT_LAYOUT_FONT: LayoutFont;
28
+ //#endregion
29
+ export { LayoutFontSchema as a, LayoutFont as i, AlignmentSchema as n, TextDirection as o, DEFAULT_LAYOUT_FONT as r, TextDirectionSchema as s, Alignment as t };
@@ -0,0 +1,29 @@
1
+ import { z } from "zod";
2
+ //#region src/style.d.ts
3
+ declare const AlignmentSchema: z.ZodEnum<{
4
+ left: "left";
5
+ center: "center";
6
+ right: "right";
7
+ justify: "justify";
8
+ }>;
9
+ type Alignment = z.infer<typeof AlignmentSchema>;
10
+ declare const TextDirectionSchema: z.ZodEnum<{
11
+ ltr: "ltr";
12
+ rtl: "rtl";
13
+ }>;
14
+ type TextDirection = z.infer<typeof TextDirectionSchema>;
15
+ declare const LayoutFontSchema: z.ZodObject<{
16
+ family: z.ZodString;
17
+ weight: z.ZodEnum<{
18
+ bold: "bold";
19
+ normal: "normal";
20
+ }>;
21
+ style: z.ZodEnum<{
22
+ italic: "italic";
23
+ normal: "normal";
24
+ }>;
25
+ }, z.core.$strip>;
26
+ type LayoutFont = z.infer<typeof LayoutFontSchema>;
27
+ declare const DEFAULT_LAYOUT_FONT: LayoutFont;
28
+ //#endregion
29
+ export { LayoutFontSchema as a, LayoutFont as i, AlignmentSchema as n, TextDirection as o, DEFAULT_LAYOUT_FONT as r, TextDirectionSchema as s, Alignment as t };
package/dist/style.cjs CHANGED
@@ -7,6 +7,7 @@ const AlignmentSchema = zod.z.enum([
7
7
  "right",
8
8
  "justify"
9
9
  ]);
10
+ const TextDirectionSchema = zod.z.enum(["ltr", "rtl"]);
10
11
  const LayoutFontSchema = zod.z.object({
11
12
  family: zod.z.string(),
12
13
  weight: zod.z.enum(["normal", "bold"]),
@@ -21,3 +22,4 @@ const DEFAULT_LAYOUT_FONT = {
21
22
  exports.AlignmentSchema = AlignmentSchema;
22
23
  exports.DEFAULT_LAYOUT_FONT = DEFAULT_LAYOUT_FONT;
23
24
  exports.LayoutFontSchema = LayoutFontSchema;
25
+ exports.TextDirectionSchema = TextDirectionSchema;
package/dist/style.d.cts CHANGED
@@ -1,24 +1,2 @@
1
- import { z } from "zod";
2
- //#region src/style.d.ts
3
- declare const AlignmentSchema: z.ZodEnum<{
4
- left: "left";
5
- center: "center";
6
- right: "right";
7
- justify: "justify";
8
- }>;
9
- type Alignment = z.infer<typeof AlignmentSchema>;
10
- declare const LayoutFontSchema: z.ZodObject<{
11
- family: z.ZodString;
12
- weight: z.ZodEnum<{
13
- bold: "bold";
14
- normal: "normal";
15
- }>;
16
- style: z.ZodEnum<{
17
- italic: "italic";
18
- normal: "normal";
19
- }>;
20
- }, z.core.$strip>;
21
- type LayoutFont = z.infer<typeof LayoutFontSchema>;
22
- declare const DEFAULT_LAYOUT_FONT: LayoutFont;
23
- //#endregion
24
- export { Alignment, AlignmentSchema, DEFAULT_LAYOUT_FONT, LayoutFont, LayoutFontSchema };
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-D06NwxAJ.cjs";
2
+ export { Alignment, AlignmentSchema, DEFAULT_LAYOUT_FONT, LayoutFont, LayoutFontSchema, TextDirection, TextDirectionSchema };
package/dist/style.d.ts CHANGED
@@ -1,24 +1,2 @@
1
- import { z } from "zod";
2
- //#region src/style.d.ts
3
- declare const AlignmentSchema: z.ZodEnum<{
4
- left: "left";
5
- center: "center";
6
- right: "right";
7
- justify: "justify";
8
- }>;
9
- type Alignment = z.infer<typeof AlignmentSchema>;
10
- declare const LayoutFontSchema: z.ZodObject<{
11
- family: z.ZodString;
12
- weight: z.ZodEnum<{
13
- bold: "bold";
14
- normal: "normal";
15
- }>;
16
- style: z.ZodEnum<{
17
- italic: "italic";
18
- normal: "normal";
19
- }>;
20
- }, z.core.$strip>;
21
- type LayoutFont = z.infer<typeof LayoutFontSchema>;
22
- declare const DEFAULT_LAYOUT_FONT: LayoutFont;
23
- //#endregion
24
- export { Alignment, AlignmentSchema, DEFAULT_LAYOUT_FONT, LayoutFont, LayoutFontSchema };
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-D06NwxAJ.js";
2
+ export { Alignment, AlignmentSchema, DEFAULT_LAYOUT_FONT, LayoutFont, LayoutFontSchema, TextDirection, TextDirectionSchema };
package/dist/style.js CHANGED
@@ -6,6 +6,7 @@ const AlignmentSchema = z.enum([
6
6
  "right",
7
7
  "justify"
8
8
  ]);
9
+ const TextDirectionSchema = z.enum(["ltr", "rtl"]);
9
10
  const LayoutFontSchema = z.object({
10
11
  family: z.string(),
11
12
  weight: z.enum(["normal", "bold"]),
@@ -17,4 +18,4 @@ const DEFAULT_LAYOUT_FONT = {
17
18
  style: "normal"
18
19
  };
19
20
  //#endregion
20
- export { AlignmentSchema, DEFAULT_LAYOUT_FONT, LayoutFontSchema };
21
+ export { AlignmentSchema, DEFAULT_LAYOUT_FONT, LayoutFontSchema, TextDirectionSchema };
@@ -1,5 +1,5 @@
1
1
  import { n as Color } from "./color-AELCDH_b.cjs";
2
- import { LayoutFont } from "./style.cjs";
2
+ import { i as LayoutFont } from "./style-D06NwxAJ.cjs";
3
3
  //#region src/text-layout.d.ts
4
4
  interface UnderlineMetrics {
5
5
  readonly offsetPt: number;
@@ -1,5 +1,5 @@
1
1
  import { n as Color } from "./color-AELCDH_b.js";
2
- import { LayoutFont } from "./style.js";
2
+ import { i as LayoutFont } from "./style-D06NwxAJ.js";
3
3
  //#region src/text-layout.d.ts
4
4
  interface UnderlineMetrics {
5
5
  readonly offsetPt: number;
package/package.json CHANGED
@@ -1,15 +1,16 @@
1
1
  {
2
2
  "name": "document-content-model",
3
- "version": "4.3.3",
4
- "description": "The canonical, format-agnostic content and document-package 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.",
3
+ "version": "7.6.0",
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": {
7
7
  "type": "git",
8
- "url": "git+https://github.com/ExaDev/document-schema.js.git"
8
+ "url": "git+https://github.com/ExaDev/documents.js.git",
9
+ "directory": "packages/document-schema.js"
9
10
  },
10
- "homepage": "https://github.com/ExaDev/document-schema.js#readme",
11
+ "homepage": "https://github.com/ExaDev/documents.js/tree/main/packages/document-schema.js",
11
12
  "bugs": {
12
- "url": "https://github.com/ExaDev/document-schema.js/issues"
13
+ "url": "https://github.com/ExaDev/documents.js/issues"
13
14
  },
14
15
  "exports": {
15
16
  ".": {
@@ -60,39 +61,35 @@
60
61
  ],
61
62
  "license": "MIT",
62
63
  "dependencies": {
63
- "zod": "^4.4.3"
64
+ "zod": "4.4.3"
64
65
  },
65
66
  "devDependencies": {
66
- "@arethetypeswrong/cli": "^0.18.5",
67
- "@cloudflare/vitest-pool-workers": "^0.21.2",
68
- "@commitlint/cli": "^21.2.1",
69
- "@commitlint/config-conventional": "^21.2.0",
70
- "@eslint/js": "^10.0.1",
71
- "@exadev/eslint-config": "^2.1.0",
72
- "@semantic-release/changelog": "^7.0.0",
73
- "@semantic-release/git": "^11.0.1",
74
- "@types/node": "^26.1.1",
75
- "@vitest/coverage-v8": "^4.1.10",
76
- "eslint": "^10.8.0",
77
- "globals": "^17.8.0",
78
- "husky": "^9.1.7",
79
- "lint-staged": "^17.2.0",
80
- "publint": "^0.3.21",
81
- "semantic-release": "^25.0.8",
82
- "tsdown": "^0.22.13",
83
- "turbo": "^2.10.8",
84
- "typescript": "^6.0.3",
85
- "typescript-eslint": "^8.65.0",
86
- "vitest": "^4.1.10"
67
+ "@arethetypeswrong/cli": "0.18.5",
68
+ "@cloudflare/vitest-pool-workers": "0.21.2",
69
+ "@stryker-mutator/core": "10.0.0",
70
+ "@stryker-mutator/typescript-checker": "10.0.0",
71
+ "@stryker-mutator/vitest-runner": "10.0.0",
72
+ "@types/node": "26.2.0",
73
+ "@vitest/coverage-v8": "4.1.11",
74
+ "eslint": "10.8.1",
75
+ "husky": "9.1.7",
76
+ "jiti": "2.7.0",
77
+ "publint": "0.3.22",
78
+ "semantic-release": "25.0.9",
79
+ "tsdown": "0.22.14",
80
+ "turbo": "2.10.8",
81
+ "typescript": "6.0.3",
82
+ "vitest": "4.1.11"
87
83
  },
88
84
  "scripts": {
89
85
  "build": "turbo run _build",
90
86
  "_build": "tsdown && node scripts/generate-json-schemas.mjs",
91
87
  "lint": "turbo run _lint",
92
88
  "_lint": "eslint . --fix --cache --max-warnings 0",
93
- "typecheck": "turbo run _typecheck _typecheck:node",
89
+ "typecheck": "turbo run _typecheck _typecheck:node _typecheck:attw",
94
90
  "_typecheck": "tsc -p tsconfig.json",
95
91
  "_typecheck:node": "tsc -p tsconfig.node.json",
92
+ "_typecheck:attw": "attw --pack",
96
93
  "test": "turbo run _test",
97
94
  "_test": "vitest run --project unit",
98
95
  "test:workers": "turbo run _test:workers",
@@ -100,8 +97,10 @@
100
97
  "test:watch": "vitest --project unit",
101
98
  "test:coverage": "turbo run _test:coverage",
102
99
  "_test:coverage": "vitest run --project unit --coverage",
100
+ "test:mutation": "turbo run _test:mutation",
101
+ "_test:mutation": "stryker run stryker.config.mjs",
103
102
  "test:smoke": "turbo run _test:smoke",
104
- "_test:smoke": "pnpm run build && vitest run --project smoke",
103
+ "_test:smoke": "vitest run --project smoke",
105
104
  "release": "semantic-release"
106
105
  }
107
106
  }