document-schema.js 1.7.0 → 1.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/README.md CHANGED
@@ -80,6 +80,16 @@ try {
80
80
 
81
81
  None of these four packages depend on each other for this vocabulary — each depends on `document-schema.js` directly, which is the whole point: one schema, not four independently-maintained, drift-prone copies.
82
82
 
83
+ ## npm aliases
84
+
85
+ This package also publishes under the following alternate npm names — the identical build, same version, republished by CI alongside the primary `document-schema.js` package:
86
+
87
+ - [document-content-model](https://www.npmjs.com/package/document-content-model)
88
+ - [doc-model.js](https://www.npmjs.com/package/doc-model.js)
89
+ - [doc-schema.js](https://www.npmjs.com/package/doc-schema.js)
90
+ - [document-schema](https://www.npmjs.com/package/document-schema)
91
+ - [document-model.js](https://www.npmjs.com/package/document-model.js)
92
+
83
93
  ## License
84
94
 
85
95
  MIT
package/dist/index.cjs CHANGED
@@ -544,7 +544,7 @@ const SCHEMA_FILE_NAMES = {
544
544
  LayoutDocument: "layout-document.schema.json"
545
545
  };
546
546
  function schemaUriFor(kind) {
547
- return `https://cdn.jsdelivr.net/npm/document-schema.js@1.7.0/schemas/${SCHEMA_FILE_NAMES[kind]}`;
547
+ return `https://cdn.jsdelivr.net/npm/document-schema.js@1.8.0/schemas/${SCHEMA_FILE_NAMES[kind]}`;
548
548
  }
549
549
  const SCHEMA_URI_PATTERN = /^https:\/\/cdn\.jsdelivr\.net\/npm\/document-schema\.js@[^/]+\/schemas\/(document-package|content-document|layout-document)\.schema\.json$/;
550
550
  function kindForFileStem(stem) {
package/dist/index.d.cts CHANGED
@@ -46,12 +46,12 @@ type Alignment = z.infer<typeof AlignmentSchema>;
46
46
  declare const LayoutFontSchema: z.ZodObject<{
47
47
  family: z.ZodString;
48
48
  weight: z.ZodEnum<{
49
- normal: "normal";
50
49
  bold: "bold";
50
+ normal: "normal";
51
51
  }>;
52
52
  style: z.ZodEnum<{
53
- normal: "normal";
54
53
  italic: "italic";
54
+ normal: "normal";
55
55
  }>;
56
56
  }, z.core.$strip>;
57
57
  type LayoutFont = z.infer<typeof LayoutFontSchema>;
@@ -1264,12 +1264,12 @@ declare const LayoutTextSchema: z.ZodObject<{
1264
1264
  font: z.ZodObject<{
1265
1265
  family: z.ZodString;
1266
1266
  weight: z.ZodEnum<{
1267
- normal: "normal";
1268
1267
  bold: "bold";
1268
+ normal: "normal";
1269
1269
  }>;
1270
1270
  style: z.ZodEnum<{
1271
- normal: "normal";
1272
1271
  italic: "italic";
1272
+ normal: "normal";
1273
1273
  }>;
1274
1274
  }, z.core.$strip>;
1275
1275
  sizePt: z.ZodNumber;
@@ -1445,12 +1445,12 @@ declare const LayoutItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1445
1445
  font: z.ZodObject<{
1446
1446
  family: z.ZodString;
1447
1447
  weight: z.ZodEnum<{
1448
- normal: "normal";
1449
1448
  bold: "bold";
1449
+ normal: "normal";
1450
1450
  }>;
1451
1451
  style: z.ZodEnum<{
1452
- normal: "normal";
1453
1452
  italic: "italic";
1453
+ normal: "normal";
1454
1454
  }>;
1455
1455
  }, z.core.$strip>;
1456
1456
  sizePt: z.ZodNumber;
@@ -1584,12 +1584,12 @@ declare const LayoutPageSchema: z.ZodObject<{
1584
1584
  font: z.ZodObject<{
1585
1585
  family: z.ZodString;
1586
1586
  weight: z.ZodEnum<{
1587
- normal: "normal";
1588
1587
  bold: "bold";
1588
+ normal: "normal";
1589
1589
  }>;
1590
1590
  style: z.ZodEnum<{
1591
- normal: "normal";
1592
1591
  italic: "italic";
1592
+ normal: "normal";
1593
1593
  }>;
1594
1594
  }, z.core.$strip>;
1595
1595
  sizePt: z.ZodNumber;
@@ -1747,12 +1747,12 @@ declare const LayoutDocumentSchema: z.ZodObject<{
1747
1747
  font: z.ZodObject<{
1748
1748
  family: z.ZodString;
1749
1749
  weight: z.ZodEnum<{
1750
- normal: "normal";
1751
1750
  bold: "bold";
1751
+ normal: "normal";
1752
1752
  }>;
1753
1753
  style: z.ZodEnum<{
1754
- normal: "normal";
1755
1754
  italic: "italic";
1755
+ normal: "normal";
1756
1756
  }>;
1757
1757
  }, z.core.$strip>;
1758
1758
  sizePt: z.ZodNumber;
@@ -2271,12 +2271,12 @@ declare const DocumentPackageSchema: z.ZodObject<{
2271
2271
  font: z.ZodObject<{
2272
2272
  family: z.ZodString;
2273
2273
  weight: z.ZodEnum<{
2274
- normal: "normal";
2275
2274
  bold: "bold";
2275
+ normal: "normal";
2276
2276
  }>;
2277
2277
  style: z.ZodEnum<{
2278
- normal: "normal";
2279
2278
  italic: "italic";
2279
+ normal: "normal";
2280
2280
  }>;
2281
2281
  }, z.core.$strip>;
2282
2282
  sizePt: z.ZodNumber;
package/dist/index.d.ts CHANGED
@@ -46,12 +46,12 @@ type Alignment = z.infer<typeof AlignmentSchema>;
46
46
  declare const LayoutFontSchema: z.ZodObject<{
47
47
  family: z.ZodString;
48
48
  weight: z.ZodEnum<{
49
- normal: "normal";
50
49
  bold: "bold";
50
+ normal: "normal";
51
51
  }>;
52
52
  style: z.ZodEnum<{
53
- normal: "normal";
54
53
  italic: "italic";
54
+ normal: "normal";
55
55
  }>;
56
56
  }, z.core.$strip>;
57
57
  type LayoutFont = z.infer<typeof LayoutFontSchema>;
@@ -1264,12 +1264,12 @@ declare const LayoutTextSchema: z.ZodObject<{
1264
1264
  font: z.ZodObject<{
1265
1265
  family: z.ZodString;
1266
1266
  weight: z.ZodEnum<{
1267
- normal: "normal";
1268
1267
  bold: "bold";
1268
+ normal: "normal";
1269
1269
  }>;
1270
1270
  style: z.ZodEnum<{
1271
- normal: "normal";
1272
1271
  italic: "italic";
1272
+ normal: "normal";
1273
1273
  }>;
1274
1274
  }, z.core.$strip>;
1275
1275
  sizePt: z.ZodNumber;
@@ -1445,12 +1445,12 @@ declare const LayoutItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1445
1445
  font: z.ZodObject<{
1446
1446
  family: z.ZodString;
1447
1447
  weight: z.ZodEnum<{
1448
- normal: "normal";
1449
1448
  bold: "bold";
1449
+ normal: "normal";
1450
1450
  }>;
1451
1451
  style: z.ZodEnum<{
1452
- normal: "normal";
1453
1452
  italic: "italic";
1453
+ normal: "normal";
1454
1454
  }>;
1455
1455
  }, z.core.$strip>;
1456
1456
  sizePt: z.ZodNumber;
@@ -1584,12 +1584,12 @@ declare const LayoutPageSchema: z.ZodObject<{
1584
1584
  font: z.ZodObject<{
1585
1585
  family: z.ZodString;
1586
1586
  weight: z.ZodEnum<{
1587
- normal: "normal";
1588
1587
  bold: "bold";
1588
+ normal: "normal";
1589
1589
  }>;
1590
1590
  style: z.ZodEnum<{
1591
- normal: "normal";
1592
1591
  italic: "italic";
1592
+ normal: "normal";
1593
1593
  }>;
1594
1594
  }, z.core.$strip>;
1595
1595
  sizePt: z.ZodNumber;
@@ -1747,12 +1747,12 @@ declare const LayoutDocumentSchema: z.ZodObject<{
1747
1747
  font: z.ZodObject<{
1748
1748
  family: z.ZodString;
1749
1749
  weight: z.ZodEnum<{
1750
- normal: "normal";
1751
1750
  bold: "bold";
1751
+ normal: "normal";
1752
1752
  }>;
1753
1753
  style: z.ZodEnum<{
1754
- normal: "normal";
1755
1754
  italic: "italic";
1755
+ normal: "normal";
1756
1756
  }>;
1757
1757
  }, z.core.$strip>;
1758
1758
  sizePt: z.ZodNumber;
@@ -2271,12 +2271,12 @@ declare const DocumentPackageSchema: z.ZodObject<{
2271
2271
  font: z.ZodObject<{
2272
2272
  family: z.ZodString;
2273
2273
  weight: z.ZodEnum<{
2274
- normal: "normal";
2275
2274
  bold: "bold";
2275
+ normal: "normal";
2276
2276
  }>;
2277
2277
  style: z.ZodEnum<{
2278
- normal: "normal";
2279
2278
  italic: "italic";
2279
+ normal: "normal";
2280
2280
  }>;
2281
2281
  }, z.core.$strip>;
2282
2282
  sizePt: z.ZodNumber;
package/dist/index.js CHANGED
@@ -543,7 +543,7 @@ const SCHEMA_FILE_NAMES = {
543
543
  LayoutDocument: "layout-document.schema.json"
544
544
  };
545
545
  function schemaUriFor(kind) {
546
- return `https://cdn.jsdelivr.net/npm/document-schema.js@1.7.0/schemas/${SCHEMA_FILE_NAMES[kind]}`;
546
+ return `https://cdn.jsdelivr.net/npm/document-schema.js@1.8.0/schemas/${SCHEMA_FILE_NAMES[kind]}`;
547
547
  }
548
548
  const SCHEMA_URI_PATTERN = /^https:\/\/cdn\.jsdelivr\.net\/npm\/document-schema\.js@[^/]+\/schemas\/(document-package|content-document|layout-document)\.schema\.json$/;
549
549
  function kindForFileStem(stem) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "document-schema.js",
3
- "version": "1.7.0",
3
+ "version": "1.8.0",
4
4
  "description": "The canonical, format-agnostic content and layout schemas shared by ooxml.js, odf.js, and documents.js -- pure Zod schemas, no behaviour.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://cdn.jsdelivr.net/npm/document-schema.js@1.7.0/schemas/content-document.schema.json",
3
+ "$id": "https://cdn.jsdelivr.net/npm/document-schema.js@1.8.0/schemas/content-document.schema.json",
4
4
  "oneOf": [
5
5
  {
6
6
  "type": "object",
@@ -930,7 +930,7 @@
930
930
  ]
931
931
  },
932
932
  "document": {
933
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@1.7.0/schemas/content-document.schema.json"
933
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@1.8.0/schemas/content-document.schema.json"
934
934
  },
935
935
  "frame": {
936
936
  "$ref": "#/$defs/Box"
@@ -2021,7 +2021,7 @@
2021
2021
  ]
2022
2022
  },
2023
2023
  "document": {
2024
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@1.7.0/schemas/content-document.schema.json"
2024
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@1.8.0/schemas/content-document.schema.json"
2025
2025
  },
2026
2026
  "frame": {
2027
2027
  "$ref": "#/$defs/Box"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://cdn.jsdelivr.net/npm/document-schema.js@1.7.0/schemas/document-package.schema.json",
3
+ "$id": "https://cdn.jsdelivr.net/npm/document-schema.js@1.8.0/schemas/document-package.schema.json",
4
4
  "type": "object",
5
5
  "properties": {
6
6
  "formatVersion": {
@@ -8,10 +8,10 @@
8
8
  "const": 1
9
9
  },
10
10
  "content": {
11
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@1.7.0/schemas/content-document.schema.json"
11
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@1.8.0/schemas/content-document.schema.json"
12
12
  },
13
13
  "layout": {
14
- "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@1.7.0/schemas/layout-document.schema.json"
14
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@1.8.0/schemas/layout-document.schema.json"
15
15
  }
16
16
  },
17
17
  "required": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://cdn.jsdelivr.net/npm/document-schema.js@1.7.0/schemas/layout-document.schema.json",
3
+ "$id": "https://cdn.jsdelivr.net/npm/document-schema.js@1.8.0/schemas/layout-document.schema.json",
4
4
  "type": "object",
5
5
  "properties": {
6
6
  "formatVersion": {