document-schema.js 1.6.0 → 1.6.1

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
@@ -40,7 +40,7 @@ node_modules/document-schema.js/schemas/content-document.schema.json
40
40
  node_modules/document-schema.js/schemas/layout-document.schema.json
41
41
  ```
42
42
 
43
- Each file's `$id` is a commit-SHA-pinned `https://raw.githubusercontent.com/ExaDev/document-schema.js/<sha>/schemas/<file>` URL -- immutable, and cross-referenced between the three files via real `$ref`s (e.g. `document-package.schema.json`'s `content`/`layout` properties `$ref` the other two files directly), so a JSON Schema validator that resolves `$ref`s over HTTP (or against local copies of all three files) can validate a whole `DocumentPackage` value. `content-document.schema.json` additionally carries a `$defs` block for the recursive paragraph/table/embedded-object block model, which Zod's own converter can't express directly (see that script's own top-of-file comment for why).
43
+ Each file's `$id` is a `https://cdn.jsdelivr.net/npm/document-schema.js@<version>/schemas/<file>` URL, pinned to the exact npm version that generated it -- immutable (jsdelivr serves each version's own published tarball contents forever, with an immutable cache header) and genuinely live the moment that version is published, unlike a commit-SHA-pinned raw GitHub URL would be: a gitignored, generated file can never actually be committed at the commit whose SHA it would need to embed, since committing it changes the tree and thus the hash. The three files are cross-referenced via real `$ref`s (e.g. `document-package.schema.json`'s `content`/`layout` properties `$ref` the other two files directly, at that same version), so a JSON Schema validator that resolves `$ref`s over HTTP (or against local copies of all three files) can validate a whole `DocumentPackage` value. `content-document.schema.json` additionally carries a `$defs` block for the recursive paragraph/table/embedded-object block model, which Zod's own converter can't express directly (see that script's own top-of-file comment for why).
44
44
 
45
45
  ## Used by
46
46
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "document-schema.js",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
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://raw.githubusercontent.com/ExaDev/document-schema.js/0089fb3ebeaa24b412e4ef580e9240084deb276b/schemas/content-document.schema.json",
3
+ "$id": "https://cdn.jsdelivr.net/npm/document-schema.js@1.6.1/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://raw.githubusercontent.com/ExaDev/document-schema.js/0089fb3ebeaa24b412e4ef580e9240084deb276b/schemas/content-document.schema.json"
933
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@1.6.1/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://raw.githubusercontent.com/ExaDev/document-schema.js/0089fb3ebeaa24b412e4ef580e9240084deb276b/schemas/content-document.schema.json"
2024
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@1.6.1/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://raw.githubusercontent.com/ExaDev/document-schema.js/0089fb3ebeaa24b412e4ef580e9240084deb276b/schemas/document-package.schema.json",
3
+ "$id": "https://cdn.jsdelivr.net/npm/document-schema.js@1.6.1/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://raw.githubusercontent.com/ExaDev/document-schema.js/0089fb3ebeaa24b412e4ef580e9240084deb276b/schemas/content-document.schema.json"
11
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@1.6.1/schemas/content-document.schema.json"
12
12
  },
13
13
  "layout": {
14
- "$ref": "https://raw.githubusercontent.com/ExaDev/document-schema.js/0089fb3ebeaa24b412e4ef580e9240084deb276b/schemas/layout-document.schema.json"
14
+ "$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@1.6.1/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://raw.githubusercontent.com/ExaDev/document-schema.js/0089fb3ebeaa24b412e4ef580e9240084deb276b/schemas/layout-document.schema.json",
3
+ "$id": "https://cdn.jsdelivr.net/npm/document-schema.js@1.6.1/schemas/layout-document.schema.json",
4
4
  "type": "object",
5
5
  "properties": {
6
6
  "formatVersion": {