document-schema 7.15.2 → 7.16.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/bijection-constructs-3By08A5K.cjs +14695 -0
- package/dist/bijection-constructs-DlP29TpB.js +14624 -0
- package/dist/bijection-constructs.cjs +4 -0
- package/dist/bijection-constructs.d.cts +6 -0
- package/dist/bijection-constructs.d.ts +6 -0
- package/dist/bijection-constructs.js +2 -0
- package/dist/bijection-corpus.cjs +12 -0
- package/dist/bijection-corpus.d.cts +46 -0
- package/dist/bijection-corpus.d.ts +46 -0
- package/dist/bijection-corpus.js +2 -0
- package/dist/codec.d.cts +3 -3
- package/dist/codec.d.ts +3 -3
- package/dist/{construct-C9cYkjnd.d.cts → construct-GVdTKrE7.d.cts} +3 -3
- package/dist/{construct-C9cYkjnd.d.ts → construct-GVdTKrE7.d.ts} +3 -3
- package/dist/construct.d.cts +1 -1
- package/dist/construct.d.ts +1 -1
- package/dist/{content-Dg9cb8mF.d.cts → content-DQui8vwD.d.cts} +7925 -6159
- package/dist/{content-BMrK9SrW.d.ts → content-DaST7v0K.d.ts} +7925 -6159
- package/dist/content-drawing-DAC7_N1K.d.cts +1606 -0
- package/dist/content-drawing-DNxYhY-G.d.ts +1606 -0
- package/dist/content-drawing.cjs +186 -0
- package/dist/content-drawing.d.cts +2 -0
- package/dist/content-drawing.d.ts +2 -0
- package/dist/content-drawing.js +171 -0
- package/dist/content-json-schema-defs.cjs +29 -3035
- package/dist/content-json-schema-defs.d.cts +2 -6
- package/dist/content-json-schema-defs.d.ts +2 -6
- package/dist/content-json-schema-defs.js +30 -3033
- package/dist/content-sheet.cjs +408 -0
- package/dist/content-sheet.d.cts +2 -0
- package/dist/content-sheet.d.ts +2 -0
- package/dist/content-sheet.js +385 -0
- package/dist/content-vocabulary.cjs +190 -0
- package/dist/content-vocabulary.d.cts +2 -0
- package/dist/content-vocabulary.d.ts +2 -0
- package/dist/content-vocabulary.js +168 -0
- package/dist/content.cjs +29 -777
- package/dist/content.d.cts +2 -2
- package/dist/content.d.ts +2 -2
- package/dist/content.js +10 -701
- package/dist/decompose.cjs +5 -0
- package/dist/decompose.d.cts +5 -3
- package/dist/decompose.d.ts +5 -3
- package/dist/decompose.js +5 -1
- package/dist/definitions.cjs +2 -1
- package/dist/definitions.d.cts +4 -4
- package/dist/definitions.d.ts +4 -4
- package/dist/definitions.js +2 -1
- package/dist/factor-styles.cjs +2 -0
- package/dist/factor-styles.d.cts +1 -1
- package/dist/factor-styles.d.ts +1 -1
- package/dist/factor-styles.js +4 -2
- package/dist/flatten.cjs +5 -0
- package/dist/flatten.d.cts +3 -2
- package/dist/flatten.d.ts +3 -2
- package/dist/flatten.js +5 -1
- package/dist/index.cjs +71 -67
- package/dist/index.d.cts +13 -11
- package/dist/index.d.ts +13 -11
- package/dist/index.js +12 -12
- package/dist/json-schema-defs-blocks.cjs +1036 -0
- package/dist/json-schema-defs-blocks.d.cts +5 -0
- package/dist/json-schema-defs-blocks.d.ts +5 -0
- package/dist/json-schema-defs-blocks.js +1035 -0
- package/dist/json-schema-defs-math.cjs +291 -0
- package/dist/json-schema-defs-math.d.cts +5 -0
- package/dist/json-schema-defs-math.d.ts +5 -0
- package/dist/json-schema-defs-math.js +290 -0
- package/dist/json-schema-defs-shared.cjs +42 -0
- package/dist/json-schema-defs-shared.d.cts +9 -0
- package/dist/json-schema-defs-shared.d.ts +9 -0
- package/dist/json-schema-defs-shared.js +38 -0
- package/dist/json-schema-defs-sheet.cjs +944 -0
- package/dist/json-schema-defs-sheet.d.cts +5 -0
- package/dist/json-schema-defs-sheet.d.ts +5 -0
- package/dist/json-schema-defs-sheet.js +943 -0
- package/dist/json-schema-defs-tree.cjs +237 -0
- package/dist/json-schema-defs-tree.d.cts +5 -0
- package/dist/json-schema-defs-tree.d.ts +5 -0
- package/dist/json-schema-defs-tree.js +237 -0
- package/dist/json-schema-defs-vector.cjs +513 -0
- package/dist/json-schema-defs-vector.d.cts +5 -0
- package/dist/json-schema-defs-vector.d.ts +5 -0
- package/dist/json-schema-defs-vector.js +512 -0
- package/dist/magic-string.es-CB2hOw9v.js +1012 -0
- package/dist/magic-string.es-MEBc20Ce.cjs +1012 -0
- package/dist/{math-BScHxedi.d.cts → math-DdIQCljT.d.cts} +9 -9
- package/dist/{math-BScHxedi.d.ts → math-DdIQCljT.d.ts} +9 -9
- package/dist/math-layout.d.cts +2 -2
- package/dist/math-layout.d.ts +2 -2
- package/dist/math.cjs +7 -5
- package/dist/math.d.cts +1 -1
- package/dist/math.d.ts +1 -1
- package/dist/math.js +7 -5
- package/dist/mathml.cjs +3 -1
- package/dist/mathml.js +3 -1
- package/dist/{package-node-gA3Kpgl2.d.ts → package-node-BMbep0jw.d.ts} +44 -43
- package/dist/{package-node-wxNXHAov.d.cts → package-node-DXhNJt15.d.cts} +44 -43
- package/dist/package-node.cjs +12 -9
- package/dist/package-node.d.cts +1 -1
- package/dist/package-node.d.ts +1 -1
- package/dist/package-node.js +4 -1
- package/dist/package.d.cts +12 -12
- package/dist/package.d.ts +12 -12
- package/dist/schema-io.cjs +7 -2
- package/dist/schema-io.d.cts +3 -2
- package/dist/schema-io.d.ts +3 -2
- package/dist/schema-io.js +7 -3
- package/dist/{style-BGMcYrD2.d.cts → style-D06NwxAJ.d.cts} +1 -1
- package/dist/{style-BGMcYrD2.d.ts → style-D06NwxAJ.d.ts} +1 -1
- package/dist/style.d.cts +1 -1
- package/dist/style.d.ts +1 -1
- package/dist/table-grid.cjs +5 -0
- package/dist/table-grid.d.cts +4 -3
- package/dist/table-grid.d.ts +4 -3
- package/dist/table-grid.js +5 -1
- package/dist/text-layout.d.cts +7 -7
- package/dist/text-layout.d.ts +7 -7
- package/package.json +1 -1
- package/schemas/content-document.schema.json +16 -16
- package/schemas/document-tree.schema.json +3 -3
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { f as ContentEmbeddedObject, h as ContentFormula, i as ContentConstructEnd, n as ContentBlock, o as ContentConstructStart, vt as ContentSheetImage } from "./content-DQui8vwD.cjs";
|
|
2
|
+
import { k as ContentVector } from "./content-drawing-DAC7_N1K.cjs";
|
|
3
|
+
import { a as ConstructDescriptor } from "./construct-GVdTKrE7.cjs";
|
|
3
4
|
import { z } from "zod";
|
|
4
5
|
//#region src/package-node.d.ts
|
|
5
6
|
declare const SectionDescriptorSchema: z.ZodObject<{
|
|
@@ -60,17 +61,17 @@ declare const SectionDescriptorSchema: z.ZodObject<{
|
|
|
60
61
|
bottomPt: z.ZodNumber;
|
|
61
62
|
leftPt: z.ZodNumber;
|
|
62
63
|
}, z.core.$strip>;
|
|
64
|
+
headers: z.ZodOptional<z.ZodObject<{
|
|
65
|
+
default: z.ZodOptional<z.ZodLazy<z.ZodArray<z.ZodType<ContentBlock, ContentBlock, z.core.$ZodTypeInternals<ContentBlock, ContentBlock>>>>>;
|
|
66
|
+
even: z.ZodOptional<z.ZodLazy<z.ZodArray<z.ZodType<ContentBlock, ContentBlock, z.core.$ZodTypeInternals<ContentBlock, ContentBlock>>>>>;
|
|
67
|
+
first: z.ZodOptional<z.ZodLazy<z.ZodArray<z.ZodType<ContentBlock, ContentBlock, z.core.$ZodTypeInternals<ContentBlock, ContentBlock>>>>>;
|
|
68
|
+
}, z.core.$strip>>;
|
|
63
69
|
breakType: z.ZodOptional<z.ZodEnum<{
|
|
64
70
|
nextPage: "nextPage";
|
|
65
71
|
continuous: "continuous";
|
|
66
72
|
evenPage: "evenPage";
|
|
67
73
|
oddPage: "oddPage";
|
|
68
74
|
}>>;
|
|
69
|
-
headers: z.ZodOptional<z.ZodObject<{
|
|
70
|
-
default: z.ZodOptional<z.ZodLazy<z.ZodArray<z.ZodType<ContentBlock, ContentBlock, z.core.$ZodTypeInternals<ContentBlock, ContentBlock>>>>>;
|
|
71
|
-
even: z.ZodOptional<z.ZodLazy<z.ZodArray<z.ZodType<ContentBlock, ContentBlock, z.core.$ZodTypeInternals<ContentBlock, ContentBlock>>>>>;
|
|
72
|
-
first: z.ZodOptional<z.ZodLazy<z.ZodArray<z.ZodType<ContentBlock, ContentBlock, z.core.$ZodTypeInternals<ContentBlock, ContentBlock>>>>>;
|
|
73
|
-
}, z.core.$strip>>;
|
|
74
75
|
footers: z.ZodOptional<z.ZodObject<{
|
|
75
76
|
default: z.ZodOptional<z.ZodLazy<z.ZodArray<z.ZodType<ContentBlock, ContentBlock, z.core.$ZodTypeInternals<ContentBlock, ContentBlock>>>>>;
|
|
76
77
|
even: z.ZodOptional<z.ZodLazy<z.ZodArray<z.ZodType<ContentBlock, ContentBlock, z.core.$ZodTypeInternals<ContentBlock, ContentBlock>>>>>;
|
|
@@ -189,6 +190,16 @@ declare const SheetDescriptorSchema: z.ZodObject<{
|
|
|
189
190
|
at: z.ZodString;
|
|
190
191
|
}, z.core.$strip>>;
|
|
191
192
|
}, z.core.$strip>>;
|
|
193
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
194
|
+
index: z.ZodNumber;
|
|
195
|
+
heightPt: z.ZodOptional<z.ZodNumber>;
|
|
196
|
+
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
197
|
+
}, z.core.$strip>>;
|
|
198
|
+
columns: z.ZodArray<z.ZodObject<{
|
|
199
|
+
index: z.ZodNumber;
|
|
200
|
+
widthPt: z.ZodOptional<z.ZodNumber>;
|
|
201
|
+
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
202
|
+
}, z.core.$strip>>;
|
|
192
203
|
printSettings: z.ZodObject<{
|
|
193
204
|
pageSize: z.ZodObject<{
|
|
194
205
|
widthPt: z.ZodNumber;
|
|
@@ -552,8 +563,8 @@ declare const SheetDescriptorSchema: z.ZodObject<{
|
|
|
552
563
|
}, z.core.$strip>>;
|
|
553
564
|
alignment: z.ZodOptional<z.ZodEnum<{
|
|
554
565
|
left: "left";
|
|
555
|
-
right: "right";
|
|
556
566
|
center: "center";
|
|
567
|
+
right: "right";
|
|
557
568
|
justify: "justify";
|
|
558
569
|
}>>;
|
|
559
570
|
verticalAlignment: z.ZodOptional<z.ZodEnum<{
|
|
@@ -599,16 +610,6 @@ declare const SheetDescriptorSchema: z.ZodObject<{
|
|
|
599
610
|
heightPt: z.ZodNumber;
|
|
600
611
|
}, z.core.$strip>>>;
|
|
601
612
|
}, z.core.$strip>>;
|
|
602
|
-
columns: z.ZodArray<z.ZodObject<{
|
|
603
|
-
index: z.ZodNumber;
|
|
604
|
-
widthPt: z.ZodOptional<z.ZodNumber>;
|
|
605
|
-
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
606
|
-
}, z.core.$strip>>;
|
|
607
|
-
rows: z.ZodArray<z.ZodObject<{
|
|
608
|
-
index: z.ZodNumber;
|
|
609
|
-
heightPt: z.ZodOptional<z.ZodNumber>;
|
|
610
|
-
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
611
|
-
}, z.core.$strip>>;
|
|
612
613
|
dataValidations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
613
614
|
ranges: z.ZodArray<z.ZodObject<{
|
|
614
615
|
startRow: z.ZodNumber;
|
|
@@ -617,10 +618,10 @@ declare const SheetDescriptorSchema: z.ZodObject<{
|
|
|
617
618
|
endColumn: z.ZodNumber;
|
|
618
619
|
}, z.core.$strip>>;
|
|
619
620
|
type: z.ZodEnum<{
|
|
620
|
-
date: "date";
|
|
621
|
-
custom: "custom";
|
|
622
621
|
decimal: "decimal";
|
|
623
622
|
list: "list";
|
|
623
|
+
date: "date";
|
|
624
|
+
custom: "custom";
|
|
624
625
|
time: "time";
|
|
625
626
|
whole: "whole";
|
|
626
627
|
textLength: "textLength";
|
|
@@ -1093,8 +1094,8 @@ declare const SheetDescriptorSchema: z.ZodObject<{
|
|
|
1093
1094
|
value: z.ZodObject<{
|
|
1094
1095
|
type: z.ZodEnum<{
|
|
1095
1096
|
formula: "formula";
|
|
1096
|
-
percent: "percent";
|
|
1097
1097
|
num: "num";
|
|
1098
|
+
percent: "percent";
|
|
1098
1099
|
max: "max";
|
|
1099
1100
|
min: "min";
|
|
1100
1101
|
percentile: "percentile";
|
|
@@ -1140,8 +1141,8 @@ declare const SheetDescriptorSchema: z.ZodObject<{
|
|
|
1140
1141
|
min: z.ZodObject<{
|
|
1141
1142
|
type: z.ZodEnum<{
|
|
1142
1143
|
formula: "formula";
|
|
1143
|
-
percent: "percent";
|
|
1144
1144
|
num: "num";
|
|
1145
|
+
percent: "percent";
|
|
1145
1146
|
max: "max";
|
|
1146
1147
|
min: "min";
|
|
1147
1148
|
percentile: "percentile";
|
|
@@ -1151,8 +1152,8 @@ declare const SheetDescriptorSchema: z.ZodObject<{
|
|
|
1151
1152
|
max: z.ZodObject<{
|
|
1152
1153
|
type: z.ZodEnum<{
|
|
1153
1154
|
formula: "formula";
|
|
1154
|
-
percent: "percent";
|
|
1155
1155
|
num: "num";
|
|
1156
|
+
percent: "percent";
|
|
1156
1157
|
max: "max";
|
|
1157
1158
|
min: "min";
|
|
1158
1159
|
percentile: "percentile";
|
|
@@ -1199,8 +1200,8 @@ declare const SheetDescriptorSchema: z.ZodObject<{
|
|
|
1199
1200
|
thresholds: z.ZodArray<z.ZodObject<{
|
|
1200
1201
|
type: z.ZodEnum<{
|
|
1201
1202
|
formula: "formula";
|
|
1202
|
-
percent: "percent";
|
|
1203
1203
|
num: "num";
|
|
1204
|
+
percent: "percent";
|
|
1204
1205
|
max: "max";
|
|
1205
1206
|
min: "min";
|
|
1206
1207
|
percentile: "percentile";
|
|
@@ -1319,6 +1320,21 @@ declare const ShapeDescriptorSchema: z.ZodObject<{
|
|
|
1319
1320
|
xml: z.ZodString;
|
|
1320
1321
|
}, z.core.$strict>>;
|
|
1321
1322
|
name: z.ZodOptional<z.ZodString>;
|
|
1323
|
+
frame: z.ZodObject<{
|
|
1324
|
+
xPt: z.ZodNumber;
|
|
1325
|
+
yPt: z.ZodNumber;
|
|
1326
|
+
widthPt: z.ZodNumber;
|
|
1327
|
+
heightPt: z.ZodNumber;
|
|
1328
|
+
}, z.core.$strip>;
|
|
1329
|
+
rotationDeg: z.ZodOptional<z.ZodNumber>;
|
|
1330
|
+
insetLeftPt: z.ZodNumber;
|
|
1331
|
+
insetTopPt: z.ZodNumber;
|
|
1332
|
+
insetRightPt: z.ZodNumber;
|
|
1333
|
+
insetBottomPt: z.ZodNumber;
|
|
1334
|
+
fontScale: z.ZodOptional<z.ZodNumber>;
|
|
1335
|
+
lineSpacingReduction: z.ZodOptional<z.ZodNumber>;
|
|
1336
|
+
paintOrder: z.ZodOptional<z.ZodNumber>;
|
|
1337
|
+
readingOrder: z.ZodOptional<z.ZodNumber>;
|
|
1322
1338
|
sourcePath: z.ZodOptional<z.ZodString>;
|
|
1323
1339
|
frames: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1324
1340
|
pageIndex: z.ZodNumber;
|
|
@@ -1354,21 +1370,6 @@ declare const ShapeDescriptorSchema: z.ZodObject<{
|
|
|
1354
1370
|
at: z.ZodString;
|
|
1355
1371
|
}, z.core.$strip>>;
|
|
1356
1372
|
}, z.core.$strip>>;
|
|
1357
|
-
frame: z.ZodObject<{
|
|
1358
|
-
xPt: z.ZodNumber;
|
|
1359
|
-
yPt: z.ZodNumber;
|
|
1360
|
-
widthPt: z.ZodNumber;
|
|
1361
|
-
heightPt: z.ZodNumber;
|
|
1362
|
-
}, z.core.$strip>;
|
|
1363
|
-
rotationDeg: z.ZodOptional<z.ZodNumber>;
|
|
1364
|
-
insetLeftPt: z.ZodNumber;
|
|
1365
|
-
insetTopPt: z.ZodNumber;
|
|
1366
|
-
insetRightPt: z.ZodNumber;
|
|
1367
|
-
insetBottomPt: z.ZodNumber;
|
|
1368
|
-
fontScale: z.ZodOptional<z.ZodNumber>;
|
|
1369
|
-
lineSpacingReduction: z.ZodOptional<z.ZodNumber>;
|
|
1370
|
-
paintOrder: z.ZodOptional<z.ZodNumber>;
|
|
1371
|
-
readingOrder: z.ZodOptional<z.ZodNumber>;
|
|
1372
1373
|
}, z.core.$strict>;
|
|
1373
1374
|
type ShapeDescriptor = z.infer<typeof ShapeDescriptorSchema>;
|
|
1374
1375
|
declare const HeadingParagraphSchema: z.ZodObject<{
|
|
@@ -1482,12 +1483,12 @@ declare const HeadingParagraphSchema: z.ZodObject<{
|
|
|
1482
1483
|
descriptor: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1483
1484
|
kind: z.ZodLiteral<"contentControl">;
|
|
1484
1485
|
controlType: z.ZodEnum<{
|
|
1486
|
+
date: "date";
|
|
1485
1487
|
richText: "richText";
|
|
1486
1488
|
plainText: "plainText";
|
|
1487
1489
|
checkbox: "checkbox";
|
|
1488
1490
|
dropDown: "dropDown";
|
|
1489
1491
|
comboBox: "comboBox";
|
|
1490
|
-
date: "date";
|
|
1491
1492
|
picture: "picture";
|
|
1492
1493
|
repeatingSection: "repeatingSection";
|
|
1493
1494
|
button: "button";
|
|
@@ -1677,8 +1678,8 @@ declare const HeadingParagraphSchema: z.ZodObject<{
|
|
|
1677
1678
|
preformatted: z.ZodOptional<z.ZodBoolean>;
|
|
1678
1679
|
alignment: z.ZodOptional<z.ZodEnum<{
|
|
1679
1680
|
left: "left";
|
|
1680
|
-
right: "right";
|
|
1681
1681
|
center: "center";
|
|
1682
|
+
right: "right";
|
|
1682
1683
|
justify: "justify";
|
|
1683
1684
|
}>>;
|
|
1684
1685
|
list: z.ZodOptional<z.ZodObject<{
|
|
@@ -1907,12 +1908,12 @@ declare const ListParagraphSchema: z.ZodObject<{
|
|
|
1907
1908
|
descriptor: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1908
1909
|
kind: z.ZodLiteral<"contentControl">;
|
|
1909
1910
|
controlType: z.ZodEnum<{
|
|
1911
|
+
date: "date";
|
|
1910
1912
|
richText: "richText";
|
|
1911
1913
|
plainText: "plainText";
|
|
1912
1914
|
checkbox: "checkbox";
|
|
1913
1915
|
dropDown: "dropDown";
|
|
1914
1916
|
comboBox: "comboBox";
|
|
1915
|
-
date: "date";
|
|
1916
1917
|
picture: "picture";
|
|
1917
1918
|
repeatingSection: "repeatingSection";
|
|
1918
1919
|
button: "button";
|
|
@@ -2103,8 +2104,8 @@ declare const ListParagraphSchema: z.ZodObject<{
|
|
|
2103
2104
|
headingLevel: z.ZodOptional<z.ZodNumber>;
|
|
2104
2105
|
alignment: z.ZodOptional<z.ZodEnum<{
|
|
2105
2106
|
left: "left";
|
|
2106
|
-
right: "right";
|
|
2107
2107
|
center: "center";
|
|
2108
|
+
right: "right";
|
|
2108
2109
|
justify: "justify";
|
|
2109
2110
|
}>>;
|
|
2110
2111
|
spacingBeforePt: z.ZodOptional<z.ZodNumber>;
|
package/dist/package-node.cjs
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_construct = require("./construct.cjs");
|
|
3
|
+
const require_content_vocabulary = require("./content-vocabulary.cjs");
|
|
4
|
+
const require_content_sheet = require("./content-sheet.cjs");
|
|
5
|
+
const require_content_drawing = require("./content-drawing.cjs");
|
|
3
6
|
const require_content = require("./content.cjs");
|
|
4
7
|
let zod = require("zod");
|
|
5
8
|
//#region src/package-node.ts
|
|
6
9
|
const SectionDescriptorSchema = require_content.ContentSectionSchema.omit({ blocks: true }).extend({ kind: zod.z.literal("section") }).strict();
|
|
7
|
-
const SlideDescriptorSchema =
|
|
8
|
-
const SheetDescriptorSchema =
|
|
10
|
+
const SlideDescriptorSchema = require_content_drawing.ContentSlideSchema.omit({ shapes: true }).extend({ kind: zod.z.literal("slide") }).strict();
|
|
11
|
+
const SheetDescriptorSchema = require_content_sheet.ContentSheetSchema.omit({
|
|
9
12
|
images: true,
|
|
10
13
|
embeddedObjects: true
|
|
11
14
|
}).extend({ kind: zod.z.literal("sheet") }).strict();
|
|
12
|
-
const DrawPageDescriptorSchema =
|
|
15
|
+
const DrawPageDescriptorSchema = require_content_drawing.ContentDrawPageSchema.omit({
|
|
13
16
|
shapes: true,
|
|
14
17
|
vectors: true
|
|
15
18
|
}).extend({ kind: zod.z.literal("drawPage") }).strict();
|
|
16
|
-
const ShapeDescriptorSchema =
|
|
19
|
+
const ShapeDescriptorSchema = require_content_drawing.ContentShapeSchema.omit({ blocks: true }).strict();
|
|
17
20
|
const HeadingParagraphSchema = require_content.ContentParagraphSchema.extend({ headingLevel: zod.z.number().int().positive() });
|
|
18
21
|
const ListParagraphSchema = require_content.ContentParagraphSchema.extend({ list: require_content.ContentListMembershipSchema });
|
|
19
22
|
function isRecord(value) {
|
|
@@ -43,10 +46,10 @@ function isListChild(value) {
|
|
|
43
46
|
return isListGroupNode(value) || isShapeConstructGroupNode(value) || isLeafChild(TreeBlockLeafSchema, value);
|
|
44
47
|
}
|
|
45
48
|
function isSheetChild(value) {
|
|
46
|
-
return isLeafChild(
|
|
49
|
+
return isLeafChild(require_content_sheet.ContentSheetImageSchema, value) || isLeafChild(require_content_vocabulary.ContentEmbeddedObjectSchema, value);
|
|
47
50
|
}
|
|
48
51
|
function isDrawPageChild(value) {
|
|
49
|
-
return isShapeGroupNode(value) || isLeafChild(
|
|
52
|
+
return isShapeGroupNode(value) || isLeafChild(require_content_drawing.ContentVectorSchema, value);
|
|
50
53
|
}
|
|
51
54
|
function isSectionGroupNode(value) {
|
|
52
55
|
return isRecord(value) && SectionDescriptorSchema.safeParse(value.node).success && isGroupWrapper(value, isSectionChild);
|
|
@@ -77,9 +80,9 @@ function isShapeConstructGroupNode(value) {
|
|
|
77
80
|
}
|
|
78
81
|
const packageLeafUnion = zod.z.union([
|
|
79
82
|
TreeBlockLeafSchema,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
+
require_content_sheet.ContentSheetImageSchema,
|
|
84
|
+
require_content_vocabulary.ContentEmbeddedObjectSchema,
|
|
85
|
+
require_content_drawing.ContentVectorSchema,
|
|
83
86
|
require_content.ContentFormulaSchema
|
|
84
87
|
]);
|
|
85
88
|
function isTreeLeaf(value) {
|
package/dist/package-node.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as isSheetGroupNode, A as SheetDescriptor, B as TreeGroup, C as ShapeConstructGroupNode, D as ShapeGroupNode, E as ShapeDescriptorSchema, F as SlideDescriptorSchema, G as TreeNodeSchema, H as TreeLeaf, I as SlideGroupNode, J as isListGroupNode, K as isDrawPageGroupNode, L as SlideGroupSchema, M as SheetGroupNode, N as SheetGroupSchema, O as ShapeGroupSchema, P as SlideDescriptor, Q as isShapeGroupNode, R as TreeBlockLeaf, S as ShapeChild, T as ShapeDescriptor, U as TreeLeafSchema, V as TreeGroupSchema, W as TreeNode, X as isSectionGroupNode, Y as isSectionConstructGroupNode, Z as isShapeConstructGroupNode, _ as SectionConstructGroupSchema, a as DrawPageGroupSchema, b as SectionGroupNode, c as HeadingParagraph, d as ListGroupNode, et as isSlideGroupNode, f as ListGroupSchema, g as SectionConstructGroupNode, h as SectionChild, i as DrawPageGroupNode, it as isTreeNode, j as SheetDescriptorSchema, k as SheetChild, l as HeadingParagraphSchema, m as ListParagraphSchema, n as DrawPageDescriptor, nt as isTreeGroup, o as HeadingGroupNode, p as ListParagraph, q as isHeadingGroupNode, r as DrawPageDescriptorSchema, rt as isTreeLeaf, s as HeadingGroupSchema, t as DrawPageChild, tt as isTreeBlockLeaf, u as ListChild, v as SectionDescriptor, w as ShapeConstructGroupSchema, x as SectionGroupSchema, y as SectionDescriptorSchema, z as TreeBlockLeafSchema } from "./package-node-
|
|
1
|
+
import { $ as isSheetGroupNode, A as SheetDescriptor, B as TreeGroup, C as ShapeConstructGroupNode, D as ShapeGroupNode, E as ShapeDescriptorSchema, F as SlideDescriptorSchema, G as TreeNodeSchema, H as TreeLeaf, I as SlideGroupNode, J as isListGroupNode, K as isDrawPageGroupNode, L as SlideGroupSchema, M as SheetGroupNode, N as SheetGroupSchema, O as ShapeGroupSchema, P as SlideDescriptor, Q as isShapeGroupNode, R as TreeBlockLeaf, S as ShapeChild, T as ShapeDescriptor, U as TreeLeafSchema, V as TreeGroupSchema, W as TreeNode, X as isSectionGroupNode, Y as isSectionConstructGroupNode, Z as isShapeConstructGroupNode, _ as SectionConstructGroupSchema, a as DrawPageGroupSchema, b as SectionGroupNode, c as HeadingParagraph, d as ListGroupNode, et as isSlideGroupNode, f as ListGroupSchema, g as SectionConstructGroupNode, h as SectionChild, i as DrawPageGroupNode, it as isTreeNode, j as SheetDescriptorSchema, k as SheetChild, l as HeadingParagraphSchema, m as ListParagraphSchema, n as DrawPageDescriptor, nt as isTreeGroup, o as HeadingGroupNode, p as ListParagraph, q as isHeadingGroupNode, r as DrawPageDescriptorSchema, rt as isTreeLeaf, s as HeadingGroupSchema, t as DrawPageChild, tt as isTreeBlockLeaf, u as ListChild, v as SectionDescriptor, w as ShapeConstructGroupSchema, x as SectionGroupSchema, y as SectionDescriptorSchema, z as TreeBlockLeafSchema } from "./package-node-DXhNJt15.cjs";
|
|
2
2
|
export { DrawPageChild, DrawPageDescriptor, DrawPageDescriptorSchema, DrawPageGroupNode, DrawPageGroupSchema, HeadingGroupNode, HeadingGroupSchema, HeadingParagraph, HeadingParagraphSchema, ListChild, ListGroupNode, ListGroupSchema, ListParagraph, ListParagraphSchema, SectionChild, SectionConstructGroupNode, SectionConstructGroupSchema, SectionDescriptor, SectionDescriptorSchema, SectionGroupNode, SectionGroupSchema, ShapeChild, ShapeConstructGroupNode, ShapeConstructGroupSchema, ShapeDescriptor, ShapeDescriptorSchema, ShapeGroupNode, ShapeGroupSchema, SheetChild, SheetDescriptor, SheetDescriptorSchema, SheetGroupNode, SheetGroupSchema, SlideDescriptor, SlideDescriptorSchema, SlideGroupNode, SlideGroupSchema, TreeBlockLeaf, TreeBlockLeafSchema, TreeGroup, TreeGroupSchema, TreeLeaf, TreeLeafSchema, TreeNode, TreeNodeSchema, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, isTreeBlockLeaf, isTreeGroup, isTreeLeaf, isTreeNode };
|
package/dist/package-node.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as isSheetGroupNode, A as SheetDescriptor, B as TreeGroup, C as ShapeConstructGroupNode, D as ShapeGroupNode, E as ShapeDescriptorSchema, F as SlideDescriptorSchema, G as TreeNodeSchema, H as TreeLeaf, I as SlideGroupNode, J as isListGroupNode, K as isDrawPageGroupNode, L as SlideGroupSchema, M as SheetGroupNode, N as SheetGroupSchema, O as ShapeGroupSchema, P as SlideDescriptor, Q as isShapeGroupNode, R as TreeBlockLeaf, S as ShapeChild, T as ShapeDescriptor, U as TreeLeafSchema, V as TreeGroupSchema, W as TreeNode, X as isSectionGroupNode, Y as isSectionConstructGroupNode, Z as isShapeConstructGroupNode, _ as SectionConstructGroupSchema, a as DrawPageGroupSchema, b as SectionGroupNode, c as HeadingParagraph, d as ListGroupNode, et as isSlideGroupNode, f as ListGroupSchema, g as SectionConstructGroupNode, h as SectionChild, i as DrawPageGroupNode, it as isTreeNode, j as SheetDescriptorSchema, k as SheetChild, l as HeadingParagraphSchema, m as ListParagraphSchema, n as DrawPageDescriptor, nt as isTreeGroup, o as HeadingGroupNode, p as ListParagraph, q as isHeadingGroupNode, r as DrawPageDescriptorSchema, rt as isTreeLeaf, s as HeadingGroupSchema, t as DrawPageChild, tt as isTreeBlockLeaf, u as ListChild, v as SectionDescriptor, w as ShapeConstructGroupSchema, x as SectionGroupSchema, y as SectionDescriptorSchema, z as TreeBlockLeafSchema } from "./package-node-
|
|
1
|
+
import { $ as isSheetGroupNode, A as SheetDescriptor, B as TreeGroup, C as ShapeConstructGroupNode, D as ShapeGroupNode, E as ShapeDescriptorSchema, F as SlideDescriptorSchema, G as TreeNodeSchema, H as TreeLeaf, I as SlideGroupNode, J as isListGroupNode, K as isDrawPageGroupNode, L as SlideGroupSchema, M as SheetGroupNode, N as SheetGroupSchema, O as ShapeGroupSchema, P as SlideDescriptor, Q as isShapeGroupNode, R as TreeBlockLeaf, S as ShapeChild, T as ShapeDescriptor, U as TreeLeafSchema, V as TreeGroupSchema, W as TreeNode, X as isSectionGroupNode, Y as isSectionConstructGroupNode, Z as isShapeConstructGroupNode, _ as SectionConstructGroupSchema, a as DrawPageGroupSchema, b as SectionGroupNode, c as HeadingParagraph, d as ListGroupNode, et as isSlideGroupNode, f as ListGroupSchema, g as SectionConstructGroupNode, h as SectionChild, i as DrawPageGroupNode, it as isTreeNode, j as SheetDescriptorSchema, k as SheetChild, l as HeadingParagraphSchema, m as ListParagraphSchema, n as DrawPageDescriptor, nt as isTreeGroup, o as HeadingGroupNode, p as ListParagraph, q as isHeadingGroupNode, r as DrawPageDescriptorSchema, rt as isTreeLeaf, s as HeadingGroupSchema, t as DrawPageChild, tt as isTreeBlockLeaf, u as ListChild, v as SectionDescriptor, w as ShapeConstructGroupSchema, x as SectionGroupSchema, y as SectionDescriptorSchema, z as TreeBlockLeafSchema } from "./package-node-BMbep0jw.js";
|
|
2
2
|
export { DrawPageChild, DrawPageDescriptor, DrawPageDescriptorSchema, DrawPageGroupNode, DrawPageGroupSchema, HeadingGroupNode, HeadingGroupSchema, HeadingParagraph, HeadingParagraphSchema, ListChild, ListGroupNode, ListGroupSchema, ListParagraph, ListParagraphSchema, SectionChild, SectionConstructGroupNode, SectionConstructGroupSchema, SectionDescriptor, SectionDescriptorSchema, SectionGroupNode, SectionGroupSchema, ShapeChild, ShapeConstructGroupNode, ShapeConstructGroupSchema, ShapeDescriptor, ShapeDescriptorSchema, ShapeGroupNode, ShapeGroupSchema, SheetChild, SheetDescriptor, SheetDescriptorSchema, SheetGroupNode, SheetGroupSchema, SlideDescriptor, SlideDescriptorSchema, SlideGroupNode, SlideGroupSchema, TreeBlockLeaf, TreeBlockLeafSchema, TreeGroup, TreeGroupSchema, TreeLeaf, TreeLeafSchema, TreeNode, TreeNodeSchema, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, isTreeBlockLeaf, isTreeGroup, isTreeLeaf, isTreeNode };
|
package/dist/package-node.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { ConstructDescriptorSchema } from "./construct.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ContentEmbeddedObjectSchema } from "./content-vocabulary.js";
|
|
3
|
+
import { ContentSheetImageSchema, ContentSheetSchema } from "./content-sheet.js";
|
|
4
|
+
import { ContentDrawPageSchema, ContentShapeSchema, ContentSlideSchema, ContentVectorSchema } from "./content-drawing.js";
|
|
5
|
+
import { ContentFormulaSchema, ContentListMembershipSchema, ContentParagraphSchema, ContentSectionSchema, isContentBlock, isContentConstructEnd, isContentConstructStart } from "./content.js";
|
|
3
6
|
import { z } from "zod";
|
|
4
7
|
//#region src/package-node.ts
|
|
5
8
|
const SectionDescriptorSchema = ContentSectionSchema.omit({ blocks: true }).extend({ kind: z.literal("section") }).strict();
|
package/dist/package.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as MathMlNode } from "./mathml-Czqc1mdZ.cjs";
|
|
2
|
-
import { p as MathExpression } from "./math-
|
|
3
|
-
import { I as SlideGroupNode, M as SheetGroupNode, b as SectionGroupNode, i as DrawPageGroupNode } from "./package-node-
|
|
2
|
+
import { p as MathExpression } from "./math-DdIQCljT.cjs";
|
|
3
|
+
import { I as SlideGroupNode, M as SheetGroupNode, b as SectionGroupNode, i as DrawPageGroupNode } from "./package-node-DXhNJt15.cjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region src/package.d.ts
|
|
6
6
|
declare const TreeEmbeddedFontSchema: z.ZodObject<{
|
|
@@ -26,8 +26,8 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
26
26
|
paragraph: z.ZodOptional<z.ZodObject<{
|
|
27
27
|
alignment: z.ZodOptional<z.ZodEnum<{
|
|
28
28
|
left: "left";
|
|
29
|
-
right: "right";
|
|
30
29
|
center: "center";
|
|
30
|
+
right: "right";
|
|
31
31
|
justify: "justify";
|
|
32
32
|
}>>;
|
|
33
33
|
list: z.ZodOptional<z.ZodObject<{
|
|
@@ -112,9 +112,9 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
112
112
|
symbol: z.ZodString;
|
|
113
113
|
name: z.ZodOptional<z.ZodString>;
|
|
114
114
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
115
|
+
time: "time";
|
|
115
116
|
length: "length";
|
|
116
117
|
mass: "mass";
|
|
117
|
-
time: "time";
|
|
118
118
|
electricCurrent: "electricCurrent";
|
|
119
119
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
120
120
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -181,8 +181,8 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
181
181
|
paragraph: z.ZodOptional<z.ZodObject<{
|
|
182
182
|
alignment: z.ZodOptional<z.ZodEnum<{
|
|
183
183
|
left: "left";
|
|
184
|
-
right: "right";
|
|
185
184
|
center: "center";
|
|
185
|
+
right: "right";
|
|
186
186
|
justify: "justify";
|
|
187
187
|
}>>;
|
|
188
188
|
list: z.ZodOptional<z.ZodObject<{
|
|
@@ -267,9 +267,9 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
267
267
|
symbol: z.ZodString;
|
|
268
268
|
name: z.ZodOptional<z.ZodString>;
|
|
269
269
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
270
|
+
time: "time";
|
|
270
271
|
length: "length";
|
|
271
272
|
mass: "mass";
|
|
272
|
-
time: "time";
|
|
273
273
|
electricCurrent: "electricCurrent";
|
|
274
274
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
275
275
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -341,8 +341,8 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
341
341
|
paragraph: z.ZodOptional<z.ZodObject<{
|
|
342
342
|
alignment: z.ZodOptional<z.ZodEnum<{
|
|
343
343
|
left: "left";
|
|
344
|
-
right: "right";
|
|
345
344
|
center: "center";
|
|
345
|
+
right: "right";
|
|
346
346
|
justify: "justify";
|
|
347
347
|
}>>;
|
|
348
348
|
list: z.ZodOptional<z.ZodObject<{
|
|
@@ -427,9 +427,9 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
427
427
|
symbol: z.ZodString;
|
|
428
428
|
name: z.ZodOptional<z.ZodString>;
|
|
429
429
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
430
|
+
time: "time";
|
|
430
431
|
length: "length";
|
|
431
432
|
mass: "mass";
|
|
432
|
-
time: "time";
|
|
433
433
|
electricCurrent: "electricCurrent";
|
|
434
434
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
435
435
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -496,8 +496,8 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
496
496
|
paragraph: z.ZodOptional<z.ZodObject<{
|
|
497
497
|
alignment: z.ZodOptional<z.ZodEnum<{
|
|
498
498
|
left: "left";
|
|
499
|
-
right: "right";
|
|
500
499
|
center: "center";
|
|
500
|
+
right: "right";
|
|
501
501
|
justify: "justify";
|
|
502
502
|
}>>;
|
|
503
503
|
list: z.ZodOptional<z.ZodObject<{
|
|
@@ -582,9 +582,9 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
582
582
|
symbol: z.ZodString;
|
|
583
583
|
name: z.ZodOptional<z.ZodString>;
|
|
584
584
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
585
|
+
time: "time";
|
|
585
586
|
length: "length";
|
|
586
587
|
mass: "mass";
|
|
587
|
-
time: "time";
|
|
588
588
|
electricCurrent: "electricCurrent";
|
|
589
589
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
590
590
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -710,8 +710,8 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
710
710
|
paragraph: z.ZodOptional<z.ZodObject<{
|
|
711
711
|
alignment: z.ZodOptional<z.ZodEnum<{
|
|
712
712
|
left: "left";
|
|
713
|
-
right: "right";
|
|
714
713
|
center: "center";
|
|
714
|
+
right: "right";
|
|
715
715
|
justify: "justify";
|
|
716
716
|
}>>;
|
|
717
717
|
list: z.ZodOptional<z.ZodObject<{
|
|
@@ -796,9 +796,9 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
796
796
|
symbol: z.ZodString;
|
|
797
797
|
name: z.ZodOptional<z.ZodString>;
|
|
798
798
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
799
|
+
time: "time";
|
|
799
800
|
length: "length";
|
|
800
801
|
mass: "mass";
|
|
801
|
-
time: "time";
|
|
802
802
|
electricCurrent: "electricCurrent";
|
|
803
803
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
804
804
|
amountOfSubstance: "amountOfSubstance";
|
package/dist/package.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as MathMlNode } from "./mathml-Czqc1mdZ.js";
|
|
2
|
-
import { p as MathExpression } from "./math-
|
|
3
|
-
import { I as SlideGroupNode, M as SheetGroupNode, b as SectionGroupNode, i as DrawPageGroupNode } from "./package-node-
|
|
2
|
+
import { p as MathExpression } from "./math-DdIQCljT.js";
|
|
3
|
+
import { I as SlideGroupNode, M as SheetGroupNode, b as SectionGroupNode, i as DrawPageGroupNode } from "./package-node-BMbep0jw.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region src/package.d.ts
|
|
6
6
|
declare const TreeEmbeddedFontSchema: z.ZodObject<{
|
|
@@ -26,8 +26,8 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
26
26
|
paragraph: z.ZodOptional<z.ZodObject<{
|
|
27
27
|
alignment: z.ZodOptional<z.ZodEnum<{
|
|
28
28
|
left: "left";
|
|
29
|
-
right: "right";
|
|
30
29
|
center: "center";
|
|
30
|
+
right: "right";
|
|
31
31
|
justify: "justify";
|
|
32
32
|
}>>;
|
|
33
33
|
list: z.ZodOptional<z.ZodObject<{
|
|
@@ -112,9 +112,9 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
112
112
|
symbol: z.ZodString;
|
|
113
113
|
name: z.ZodOptional<z.ZodString>;
|
|
114
114
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
115
|
+
time: "time";
|
|
115
116
|
length: "length";
|
|
116
117
|
mass: "mass";
|
|
117
|
-
time: "time";
|
|
118
118
|
electricCurrent: "electricCurrent";
|
|
119
119
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
120
120
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -181,8 +181,8 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
181
181
|
paragraph: z.ZodOptional<z.ZodObject<{
|
|
182
182
|
alignment: z.ZodOptional<z.ZodEnum<{
|
|
183
183
|
left: "left";
|
|
184
|
-
right: "right";
|
|
185
184
|
center: "center";
|
|
185
|
+
right: "right";
|
|
186
186
|
justify: "justify";
|
|
187
187
|
}>>;
|
|
188
188
|
list: z.ZodOptional<z.ZodObject<{
|
|
@@ -267,9 +267,9 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
267
267
|
symbol: z.ZodString;
|
|
268
268
|
name: z.ZodOptional<z.ZodString>;
|
|
269
269
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
270
|
+
time: "time";
|
|
270
271
|
length: "length";
|
|
271
272
|
mass: "mass";
|
|
272
|
-
time: "time";
|
|
273
273
|
electricCurrent: "electricCurrent";
|
|
274
274
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
275
275
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -341,8 +341,8 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
341
341
|
paragraph: z.ZodOptional<z.ZodObject<{
|
|
342
342
|
alignment: z.ZodOptional<z.ZodEnum<{
|
|
343
343
|
left: "left";
|
|
344
|
-
right: "right";
|
|
345
344
|
center: "center";
|
|
345
|
+
right: "right";
|
|
346
346
|
justify: "justify";
|
|
347
347
|
}>>;
|
|
348
348
|
list: z.ZodOptional<z.ZodObject<{
|
|
@@ -427,9 +427,9 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
427
427
|
symbol: z.ZodString;
|
|
428
428
|
name: z.ZodOptional<z.ZodString>;
|
|
429
429
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
430
|
+
time: "time";
|
|
430
431
|
length: "length";
|
|
431
432
|
mass: "mass";
|
|
432
|
-
time: "time";
|
|
433
433
|
electricCurrent: "electricCurrent";
|
|
434
434
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
435
435
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -496,8 +496,8 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
496
496
|
paragraph: z.ZodOptional<z.ZodObject<{
|
|
497
497
|
alignment: z.ZodOptional<z.ZodEnum<{
|
|
498
498
|
left: "left";
|
|
499
|
-
right: "right";
|
|
500
499
|
center: "center";
|
|
500
|
+
right: "right";
|
|
501
501
|
justify: "justify";
|
|
502
502
|
}>>;
|
|
503
503
|
list: z.ZodOptional<z.ZodObject<{
|
|
@@ -582,9 +582,9 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
582
582
|
symbol: z.ZodString;
|
|
583
583
|
name: z.ZodOptional<z.ZodString>;
|
|
584
584
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
585
|
+
time: "time";
|
|
585
586
|
length: "length";
|
|
586
587
|
mass: "mass";
|
|
587
|
-
time: "time";
|
|
588
588
|
electricCurrent: "electricCurrent";
|
|
589
589
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
590
590
|
amountOfSubstance: "amountOfSubstance";
|
|
@@ -710,8 +710,8 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
710
710
|
paragraph: z.ZodOptional<z.ZodObject<{
|
|
711
711
|
alignment: z.ZodOptional<z.ZodEnum<{
|
|
712
712
|
left: "left";
|
|
713
|
-
right: "right";
|
|
714
713
|
center: "center";
|
|
714
|
+
right: "right";
|
|
715
715
|
justify: "justify";
|
|
716
716
|
}>>;
|
|
717
717
|
list: z.ZodOptional<z.ZodObject<{
|
|
@@ -796,9 +796,9 @@ declare const DocumentTreeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
796
796
|
symbol: z.ZodString;
|
|
797
797
|
name: z.ZodOptional<z.ZodString>;
|
|
798
798
|
dimension: z.ZodRecord<z.ZodEnum<{
|
|
799
|
+
time: "time";
|
|
799
800
|
length: "length";
|
|
800
801
|
mass: "mass";
|
|
801
|
-
time: "time";
|
|
802
802
|
electricCurrent: "electricCurrent";
|
|
803
803
|
thermodynamicTemperature: "thermodynamicTemperature";
|
|
804
804
|
amountOfSubstance: "amountOfSubstance";
|
package/dist/schema-io.cjs
CHANGED
|
@@ -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.
|
|
10
|
+
return `https://cdn.jsdelivr.net/npm/document-schema.js@7.16.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) {
|
|
@@ -94,6 +94,9 @@ var SchemaVersionMismatchError = class extends Error {
|
|
|
94
94
|
this.installedVersion = installedVersion;
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
|
+
function assertNeverDocumentSchemaKind(value) {
|
|
98
|
+
throw new Error(`documentFromJson: unhandled DocumentSchemaKind ${JSON.stringify(value)}`);
|
|
99
|
+
}
|
|
97
100
|
function documentFromJson(value) {
|
|
98
101
|
if (!isRecord(value) || typeof value.$schema !== "string") throw new UnrecognizedDocumentSchemaError(isRecord(value) ? value.$schema : void 0);
|
|
99
102
|
const parts = parseSchemaUri(value.$schema);
|
|
@@ -102,7 +105,7 @@ function documentFromJson(value) {
|
|
|
102
105
|
if (parts.stem === "document-package") throw new DocumentPackageRenamedError(value.$schema);
|
|
103
106
|
const kind = kindForFileStem(parts.stem);
|
|
104
107
|
if (kind === void 0) throw new UnrecognizedDocumentSchemaError(value.$schema);
|
|
105
|
-
if (majorVersionOf(parts.version) !== majorVersionOf("7.
|
|
108
|
+
if (majorVersionOf(parts.version) !== majorVersionOf("7.16.0")) throw new SchemaVersionMismatchError(value.$schema, parts.version, "7.16.0");
|
|
106
109
|
switch (kind) {
|
|
107
110
|
case "DocumentTree": return {
|
|
108
111
|
kind,
|
|
@@ -113,6 +116,7 @@ function documentFromJson(value) {
|
|
|
113
116
|
value: require_content.ContentDocumentSchema.parse(value)
|
|
114
117
|
};
|
|
115
118
|
}
|
|
119
|
+
return assertNeverDocumentSchemaKind(kind);
|
|
116
120
|
}
|
|
117
121
|
//#endregion
|
|
118
122
|
exports.DocumentPackageRenamedError = DocumentPackageRenamedError;
|
|
@@ -120,6 +124,7 @@ exports.LayoutSchemaDemotedError = LayoutSchemaDemotedError;
|
|
|
120
124
|
exports.SCHEMA_FILE_NAMES = SCHEMA_FILE_NAMES;
|
|
121
125
|
exports.SchemaVersionMismatchError = SchemaVersionMismatchError;
|
|
122
126
|
exports.UnrecognizedDocumentSchemaError = UnrecognizedDocumentSchemaError;
|
|
127
|
+
exports.assertNeverDocumentSchemaKind = assertNeverDocumentSchemaKind;
|
|
123
128
|
exports.contentDocumentWithSchema = contentDocumentWithSchema;
|
|
124
129
|
exports.documentFromJson = documentFromJson;
|
|
125
130
|
exports.documentSchemaKindOf = documentSchemaKindOf;
|
package/dist/schema-io.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { u as ContentDocument } from "./content-DQui8vwD.cjs";
|
|
2
2
|
import { DocumentTree } from "./package.cjs";
|
|
3
3
|
//#region src/schema-io.d.ts
|
|
4
4
|
type DocumentSchemaKind = "DocumentTree" | "ContentDocument";
|
|
@@ -38,6 +38,7 @@ type DocumentJsonResult = {
|
|
|
38
38
|
kind: "ContentDocument";
|
|
39
39
|
value: ContentDocument;
|
|
40
40
|
};
|
|
41
|
+
declare function assertNeverDocumentSchemaKind(value: never): never;
|
|
41
42
|
declare function documentFromJson(value: unknown): DocumentJsonResult;
|
|
42
43
|
//#endregion
|
|
43
|
-
export { ContentDocumentJson, DocumentJsonResult, DocumentPackageRenamedError, DocumentSchemaKind, DocumentTreeJson, LayoutSchemaDemotedError, SCHEMA_FILE_NAMES, SchemaVersionMismatchError, UnrecognizedDocumentSchemaError, contentDocumentWithSchema, documentFromJson, documentSchemaKindOf, documentTreeWithSchema, schemaUriFor };
|
|
44
|
+
export { ContentDocumentJson, DocumentJsonResult, DocumentPackageRenamedError, DocumentSchemaKind, DocumentTreeJson, LayoutSchemaDemotedError, SCHEMA_FILE_NAMES, SchemaVersionMismatchError, UnrecognizedDocumentSchemaError, assertNeverDocumentSchemaKind, contentDocumentWithSchema, documentFromJson, documentSchemaKindOf, documentTreeWithSchema, schemaUriFor };
|
package/dist/schema-io.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { u as ContentDocument } from "./content-DaST7v0K.js";
|
|
2
2
|
import { DocumentTree } from "./package.js";
|
|
3
3
|
//#region src/schema-io.d.ts
|
|
4
4
|
type DocumentSchemaKind = "DocumentTree" | "ContentDocument";
|
|
@@ -38,6 +38,7 @@ type DocumentJsonResult = {
|
|
|
38
38
|
kind: "ContentDocument";
|
|
39
39
|
value: ContentDocument;
|
|
40
40
|
};
|
|
41
|
+
declare function assertNeverDocumentSchemaKind(value: never): never;
|
|
41
42
|
declare function documentFromJson(value: unknown): DocumentJsonResult;
|
|
42
43
|
//#endregion
|
|
43
|
-
export { ContentDocumentJson, DocumentJsonResult, DocumentPackageRenamedError, DocumentSchemaKind, DocumentTreeJson, LayoutSchemaDemotedError, SCHEMA_FILE_NAMES, SchemaVersionMismatchError, UnrecognizedDocumentSchemaError, contentDocumentWithSchema, documentFromJson, documentSchemaKindOf, documentTreeWithSchema, schemaUriFor };
|
|
44
|
+
export { ContentDocumentJson, DocumentJsonResult, DocumentPackageRenamedError, DocumentSchemaKind, DocumentTreeJson, LayoutSchemaDemotedError, SCHEMA_FILE_NAMES, SchemaVersionMismatchError, UnrecognizedDocumentSchemaError, assertNeverDocumentSchemaKind, contentDocumentWithSchema, documentFromJson, documentSchemaKindOf, documentTreeWithSchema, schemaUriFor };
|
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.
|
|
9
|
+
return `https://cdn.jsdelivr.net/npm/document-schema.js@7.16.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) {
|
|
@@ -93,6 +93,9 @@ var SchemaVersionMismatchError = class extends Error {
|
|
|
93
93
|
this.installedVersion = installedVersion;
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
|
+
function assertNeverDocumentSchemaKind(value) {
|
|
97
|
+
throw new Error(`documentFromJson: unhandled DocumentSchemaKind ${JSON.stringify(value)}`);
|
|
98
|
+
}
|
|
96
99
|
function documentFromJson(value) {
|
|
97
100
|
if (!isRecord(value) || typeof value.$schema !== "string") throw new UnrecognizedDocumentSchemaError(isRecord(value) ? value.$schema : void 0);
|
|
98
101
|
const parts = parseSchemaUri(value.$schema);
|
|
@@ -101,7 +104,7 @@ function documentFromJson(value) {
|
|
|
101
104
|
if (parts.stem === "document-package") throw new DocumentPackageRenamedError(value.$schema);
|
|
102
105
|
const kind = kindForFileStem(parts.stem);
|
|
103
106
|
if (kind === void 0) throw new UnrecognizedDocumentSchemaError(value.$schema);
|
|
104
|
-
if (majorVersionOf(parts.version) !== majorVersionOf("7.
|
|
107
|
+
if (majorVersionOf(parts.version) !== majorVersionOf("7.16.0")) throw new SchemaVersionMismatchError(value.$schema, parts.version, "7.16.0");
|
|
105
108
|
switch (kind) {
|
|
106
109
|
case "DocumentTree": return {
|
|
107
110
|
kind,
|
|
@@ -112,6 +115,7 @@ function documentFromJson(value) {
|
|
|
112
115
|
value: ContentDocumentSchema.parse(value)
|
|
113
116
|
};
|
|
114
117
|
}
|
|
118
|
+
return assertNeverDocumentSchemaKind(kind);
|
|
115
119
|
}
|
|
116
120
|
//#endregion
|
|
117
|
-
export { DocumentPackageRenamedError, LayoutSchemaDemotedError, SCHEMA_FILE_NAMES, SchemaVersionMismatchError, UnrecognizedDocumentSchemaError, contentDocumentWithSchema, documentFromJson, documentSchemaKindOf, documentTreeWithSchema, schemaUriFor };
|
|
121
|
+
export { DocumentPackageRenamedError, LayoutSchemaDemotedError, SCHEMA_FILE_NAMES, SchemaVersionMismatchError, UnrecognizedDocumentSchemaError, assertNeverDocumentSchemaKind, contentDocumentWithSchema, documentFromJson, documentSchemaKindOf, documentTreeWithSchema, schemaUriFor };
|