doc-schema.js 3.2.0 → 3.3.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/content-json-schema-defs.cjs +1 -1
- package/dist/content-json-schema-defs.js +1 -1
- package/dist/content.cjs +1 -1
- package/dist/content.d.cts +2 -2
- package/dist/content.d.ts +2 -2
- package/dist/content.js +1 -1
- package/dist/schema-io.cjs +1 -1
- package/dist/schema-io.js +1 -1
- package/package.json +1 -1
- package/schemas/content-document.schema.json +3 -4
- package/schemas/document-package.schema.json +2 -2
- package/schemas/layout-document.schema.json +1 -1
package/dist/content.cjs
CHANGED
|
@@ -21,7 +21,7 @@ const ContentRunSchema = zod.z.object({
|
|
|
21
21
|
frames: zod.z.array(require_geometry.LayoutFrameSchema).optional()
|
|
22
22
|
});
|
|
23
23
|
const ContentListMembershipSchema = zod.z.object({
|
|
24
|
-
numId: zod.z.string(),
|
|
24
|
+
numId: zod.z.string().optional(),
|
|
25
25
|
level: zod.z.number().int().nonnegative()
|
|
26
26
|
});
|
|
27
27
|
const ContentParagraphSchema = zod.z.object({
|
package/dist/content.d.cts
CHANGED
|
@@ -32,7 +32,7 @@ declare const ContentRunSchema: z.ZodObject<{
|
|
|
32
32
|
}, z.core.$strip>;
|
|
33
33
|
type ContentRun = z.infer<typeof ContentRunSchema>;
|
|
34
34
|
declare const ContentListMembershipSchema: z.ZodObject<{
|
|
35
|
-
numId: z.ZodString
|
|
35
|
+
numId: z.ZodOptional<z.ZodString>;
|
|
36
36
|
level: z.ZodNumber;
|
|
37
37
|
}, z.core.$strip>;
|
|
38
38
|
type ContentListMembership = z.infer<typeof ContentListMembershipSchema>;
|
|
@@ -70,7 +70,7 @@ declare const ContentParagraphSchema: z.ZodObject<{
|
|
|
70
70
|
justify: "justify";
|
|
71
71
|
}>>;
|
|
72
72
|
list: z.ZodOptional<z.ZodObject<{
|
|
73
|
-
numId: z.ZodString
|
|
73
|
+
numId: z.ZodOptional<z.ZodString>;
|
|
74
74
|
level: z.ZodNumber;
|
|
75
75
|
}, z.core.$strip>>;
|
|
76
76
|
spacingBeforePt: z.ZodOptional<z.ZodNumber>;
|
package/dist/content.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ declare const ContentRunSchema: z.ZodObject<{
|
|
|
32
32
|
}, z.core.$strip>;
|
|
33
33
|
type ContentRun = z.infer<typeof ContentRunSchema>;
|
|
34
34
|
declare const ContentListMembershipSchema: z.ZodObject<{
|
|
35
|
-
numId: z.ZodString
|
|
35
|
+
numId: z.ZodOptional<z.ZodString>;
|
|
36
36
|
level: z.ZodNumber;
|
|
37
37
|
}, z.core.$strip>;
|
|
38
38
|
type ContentListMembership = z.infer<typeof ContentListMembershipSchema>;
|
|
@@ -70,7 +70,7 @@ declare const ContentParagraphSchema: z.ZodObject<{
|
|
|
70
70
|
justify: "justify";
|
|
71
71
|
}>>;
|
|
72
72
|
list: z.ZodOptional<z.ZodObject<{
|
|
73
|
-
numId: z.ZodString
|
|
73
|
+
numId: z.ZodOptional<z.ZodString>;
|
|
74
74
|
level: z.ZodNumber;
|
|
75
75
|
}, z.core.$strip>>;
|
|
76
76
|
spacingBeforePt: z.ZodOptional<z.ZodNumber>;
|
package/dist/content.js
CHANGED
|
@@ -20,7 +20,7 @@ const ContentRunSchema = z.object({
|
|
|
20
20
|
frames: z.array(LayoutFrameSchema).optional()
|
|
21
21
|
});
|
|
22
22
|
const ContentListMembershipSchema = z.object({
|
|
23
|
-
numId: z.string(),
|
|
23
|
+
numId: z.string().optional(),
|
|
24
24
|
level: z.number().int().nonnegative()
|
|
25
25
|
});
|
|
26
26
|
const ContentParagraphSchema = z.object({
|
package/dist/schema-io.cjs
CHANGED
|
@@ -9,7 +9,7 @@ const SCHEMA_FILE_NAMES = {
|
|
|
9
9
|
LayoutDocument: "layout-document.schema.json"
|
|
10
10
|
};
|
|
11
11
|
function schemaUriFor(kind) {
|
|
12
|
-
return `https://cdn.jsdelivr.net/npm/document-schema.js@3.
|
|
12
|
+
return `https://cdn.jsdelivr.net/npm/document-schema.js@3.3.0/schemas/${SCHEMA_FILE_NAMES[kind]}`;
|
|
13
13
|
}
|
|
14
14
|
const SCHEMA_URI_PATTERN = /^https:\/\/cdn\.jsdelivr\.net\/npm\/document-schema\.js@[^/]+\/schemas\/(document-package|content-document|layout-document)\.schema\.json$/;
|
|
15
15
|
function kindForFileStem(stem) {
|
package/dist/schema-io.js
CHANGED
|
@@ -8,7 +8,7 @@ const SCHEMA_FILE_NAMES = {
|
|
|
8
8
|
LayoutDocument: "layout-document.schema.json"
|
|
9
9
|
};
|
|
10
10
|
function schemaUriFor(kind) {
|
|
11
|
-
return `https://cdn.jsdelivr.net/npm/document-schema.js@3.
|
|
11
|
+
return `https://cdn.jsdelivr.net/npm/document-schema.js@3.3.0/schemas/${SCHEMA_FILE_NAMES[kind]}`;
|
|
12
12
|
}
|
|
13
13
|
const SCHEMA_URI_PATTERN = /^https:\/\/cdn\.jsdelivr\.net\/npm\/document-schema\.js@[^/]+\/schemas\/(document-package|content-document|layout-document)\.schema\.json$/;
|
|
14
14
|
function kindForFileStem(stem) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "doc-schema.js",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.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@3.
|
|
3
|
+
"$id": "https://cdn.jsdelivr.net/npm/document-schema.js@3.3.0/schemas/content-document.schema.json",
|
|
4
4
|
"oneOf": [
|
|
5
5
|
{
|
|
6
6
|
"type": "object",
|
|
@@ -1393,7 +1393,7 @@
|
|
|
1393
1393
|
]
|
|
1394
1394
|
},
|
|
1395
1395
|
"document": {
|
|
1396
|
-
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@3.
|
|
1396
|
+
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@3.3.0/schemas/content-document.schema.json"
|
|
1397
1397
|
},
|
|
1398
1398
|
"frame": {
|
|
1399
1399
|
"$ref": "#/$defs/Box"
|
|
@@ -2630,7 +2630,6 @@
|
|
|
2630
2630
|
}
|
|
2631
2631
|
},
|
|
2632
2632
|
"required": [
|
|
2633
|
-
"numId",
|
|
2634
2633
|
"level"
|
|
2635
2634
|
],
|
|
2636
2635
|
"additionalProperties": false
|
|
@@ -2923,7 +2922,7 @@
|
|
|
2923
2922
|
]
|
|
2924
2923
|
},
|
|
2925
2924
|
"document": {
|
|
2926
|
-
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@3.
|
|
2925
|
+
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@3.3.0/schemas/content-document.schema.json"
|
|
2927
2926
|
},
|
|
2928
2927
|
"frame": {
|
|
2929
2928
|
"$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@3.
|
|
3
|
+
"$id": "https://cdn.jsdelivr.net/npm/document-schema.js@3.3.0/schemas/document-package.schema.json",
|
|
4
4
|
"type": "object",
|
|
5
5
|
"properties": {
|
|
6
6
|
"formatVersion": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"const": 2
|
|
9
9
|
},
|
|
10
10
|
"content": {
|
|
11
|
-
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@3.
|
|
11
|
+
"$ref": "https://cdn.jsdelivr.net/npm/document-schema.js@3.3.0/schemas/content-document.schema.json"
|
|
12
12
|
},
|
|
13
13
|
"pages": {
|
|
14
14
|
"type": "array",
|
|
@@ -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@3.
|
|
3
|
+
"$id": "https://cdn.jsdelivr.net/npm/document-schema.js@3.3.0/schemas/layout-document.schema.json",
|
|
4
4
|
"type": "object",
|
|
5
5
|
"properties": {
|
|
6
6
|
"formatVersion": {
|