document-content-model 7.7.0 → 7.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/dist/codec.d.cts +1 -1
- package/dist/codec.d.ts +1 -1
- 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-BIM8bWWt.d.ts → content-DAc4O272.d.ts} +1772 -71
- package/dist/{content-DpsxyPMw.d.cts → content-SgKmas45.d.cts} +1772 -71
- package/dist/content-json-schema-defs.cjs +126 -15
- package/dist/content-json-schema-defs.js +126 -15
- package/dist/content.cjs +70 -17
- package/dist/content.d.cts +2 -2
- package/dist/content.d.ts +2 -2
- package/dist/content.js +67 -18
- package/dist/decompose.d.cts +2 -2
- package/dist/decompose.d.ts +2 -2
- package/dist/definitions.d.cts +1 -1
- package/dist/definitions.d.ts +1 -1
- package/dist/factor-styles.d.cts +1 -1
- package/dist/factor-styles.d.ts +1 -1
- package/dist/flatten.d.cts +1 -1
- package/dist/flatten.d.ts +1 -1
- package/dist/index.cjs +4 -0
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/{package-node-B8LBrCCD.d.ts → package-node-BnFUnaa0.d.ts} +322 -25
- package/dist/{package-node-CENJl5PH.d.cts → package-node-DnUyGT61.d.cts} +322 -25
- package/dist/package-node.d.cts +1 -1
- package/dist/package-node.d.ts +1 -1
- package/dist/package.d.cts +28 -1
- package/dist/package.d.ts +28 -1
- package/dist/schema-io.cjs +2 -2
- package/dist/schema-io.d.cts +1 -1
- package/dist/schema-io.d.ts +1 -1
- package/dist/schema-io.js +2 -2
- package/package.json +1 -1
- package/schemas/content-document.schema.json +1138 -13
- package/schemas/document-tree.schema.json +208 -3
package/dist/content.cjs
CHANGED
|
@@ -9,6 +9,35 @@ const require_style = require("./style.cjs");
|
|
|
9
9
|
const require_metadata = require("./metadata.cjs");
|
|
10
10
|
let zod = require("zod");
|
|
11
11
|
//#region src/content.ts
|
|
12
|
+
const ContentOriginSchema = zod.z.enum([
|
|
13
|
+
"chart",
|
|
14
|
+
"diagram",
|
|
15
|
+
"table",
|
|
16
|
+
"image",
|
|
17
|
+
"notes",
|
|
18
|
+
"body"
|
|
19
|
+
]);
|
|
20
|
+
const ContentTranscriptSchema = zod.z.object({
|
|
21
|
+
text: zod.z.string(),
|
|
22
|
+
confidence: zod.z.enum([
|
|
23
|
+
"high",
|
|
24
|
+
"medium",
|
|
25
|
+
"low"
|
|
26
|
+
]),
|
|
27
|
+
mechanism: zod.z.enum(["deterministic", "model"])
|
|
28
|
+
});
|
|
29
|
+
const ContentInterpretationSchema = zod.z.object({
|
|
30
|
+
transcript: ContentTranscriptSchema.optional(),
|
|
31
|
+
description: zod.z.string().optional(),
|
|
32
|
+
by: zod.z.object({
|
|
33
|
+
model: zod.z.string(),
|
|
34
|
+
at: zod.z.string()
|
|
35
|
+
}).optional()
|
|
36
|
+
});
|
|
37
|
+
const CONTENT_ANNOTATION_FIELDS = {
|
|
38
|
+
origin: ContentOriginSchema.optional(),
|
|
39
|
+
interpretation: ContentInterpretationSchema.optional()
|
|
40
|
+
};
|
|
12
41
|
const RUN_FONT_PROPERTY_SHAPE = {
|
|
13
42
|
bold: zod.z.boolean().optional(),
|
|
14
43
|
italic: zod.z.boolean().optional(),
|
|
@@ -27,7 +56,8 @@ const ContentRunSchema = zod.z.object({
|
|
|
27
56
|
direction: require_style.TextDirectionSchema.optional(),
|
|
28
57
|
sourcePath: zod.z.string().optional(),
|
|
29
58
|
source: require_source.SourceResidueSchema.optional(),
|
|
30
|
-
frames: zod.z.array(require_geometry.LayoutFrameSchema).optional()
|
|
59
|
+
frames: zod.z.array(require_geometry.LayoutFrameSchema).optional(),
|
|
60
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
31
61
|
});
|
|
32
62
|
const ContentListMembershipSchema = zod.z.object({
|
|
33
63
|
numId: zod.z.string().optional(),
|
|
@@ -87,7 +117,8 @@ const ContentParagraphSchema = zod.z.object({
|
|
|
87
117
|
borders: ContentParagraphBordersSchema.optional(),
|
|
88
118
|
sourcePath: zod.z.string().optional(),
|
|
89
119
|
source: require_source.SourceResidueSchema.optional(),
|
|
90
|
-
frames: zod.z.array(require_geometry.LayoutFrameSchema).optional()
|
|
120
|
+
frames: zod.z.array(require_geometry.LayoutFrameSchema).optional(),
|
|
121
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
91
122
|
});
|
|
92
123
|
function clampHeadingLevel(level) {
|
|
93
124
|
return Math.min(6, Math.max(1, Math.round(level)));
|
|
@@ -149,16 +180,20 @@ const ContentImageBlockSchema = zod.z.object({
|
|
|
149
180
|
heightPt: zod.z.number().positive(),
|
|
150
181
|
altText: zod.z.string().optional(),
|
|
151
182
|
original: ContentImageOriginalSchema.optional(),
|
|
183
|
+
anchorRunIndex: zod.z.number().int().nonnegative().optional(),
|
|
184
|
+
anchorOffset: zod.z.number().int().nonnegative().optional(),
|
|
152
185
|
floatPosition: ContentFloatPositionSchema.optional(),
|
|
153
186
|
sourcePath: zod.z.string().optional(),
|
|
154
187
|
source: require_source.SourceResidueSchema.optional(),
|
|
155
|
-
frames: zod.z.array(require_geometry.LayoutFrameSchema).optional()
|
|
188
|
+
frames: zod.z.array(require_geometry.LayoutFrameSchema).optional(),
|
|
189
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
156
190
|
});
|
|
157
191
|
const ContentPageBreakSchema = zod.z.object({
|
|
158
192
|
kind: zod.z.literal("pageBreak"),
|
|
159
193
|
sourcePath: zod.z.string().optional(),
|
|
160
194
|
source: require_source.SourceResidueSchema.optional(),
|
|
161
|
-
frames: zod.z.array(require_geometry.LayoutFrameSchema).optional()
|
|
195
|
+
frames: zod.z.array(require_geometry.LayoutFrameSchema).optional(),
|
|
196
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
162
197
|
});
|
|
163
198
|
const ContentConstructStartSchema = zod.z.object({
|
|
164
199
|
kind: zod.z.literal("constructStart"),
|
|
@@ -224,7 +259,8 @@ const CONTENT_EMBEDDED_OBJECT_FIELDS = {
|
|
|
224
259
|
anchorColumn: zod.z.number().int().nonnegative().optional(),
|
|
225
260
|
offsetXPt: zod.z.number().optional(),
|
|
226
261
|
offsetYPt: zod.z.number().optional(),
|
|
227
|
-
source: require_source.SourceResidueSchema.optional()
|
|
262
|
+
source: require_source.SourceResidueSchema.optional(),
|
|
263
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
228
264
|
};
|
|
229
265
|
const ContentEmbeddedObjectSchema = zod.z.object(CONTENT_EMBEDDED_OBJECT_FIELDS);
|
|
230
266
|
const ContentEmbeddedObjectBlockSchema = zod.z.object({
|
|
@@ -351,7 +387,8 @@ const ContentTableCellSchema = zod.z.object({
|
|
|
351
387
|
formula: zod.z.string().optional(),
|
|
352
388
|
sourcePath: zod.z.string().optional(),
|
|
353
389
|
source: require_source.SourceResidueSchema.optional(),
|
|
354
|
-
frames: zod.z.array(require_geometry.LayoutFrameSchema).optional()
|
|
390
|
+
frames: zod.z.array(require_geometry.LayoutFrameSchema).optional(),
|
|
391
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
355
392
|
});
|
|
356
393
|
const ContentTableRowSchema = zod.z.object({
|
|
357
394
|
cells: zod.z.array(ContentTableCellSchema),
|
|
@@ -364,7 +401,8 @@ const ContentTableSchema = zod.z.object({
|
|
|
364
401
|
columnWidthsPt: zod.z.array(zod.z.number().nonnegative()),
|
|
365
402
|
sourcePath: zod.z.string().optional(),
|
|
366
403
|
source: require_source.SourceResidueSchema.optional(),
|
|
367
|
-
frames: zod.z.array(require_geometry.LayoutFrameSchema).optional()
|
|
404
|
+
frames: zod.z.array(require_geometry.LayoutFrameSchema).optional(),
|
|
405
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
368
406
|
});
|
|
369
407
|
const ContentBlockSchema = zod.z.discriminatedUnion("kind", [
|
|
370
408
|
ContentParagraphSchema,
|
|
@@ -392,7 +430,8 @@ const ContentSectionSchema = zod.z.object({
|
|
|
392
430
|
]).optional(),
|
|
393
431
|
headers: ContentPageFurnitureSchema.optional(),
|
|
394
432
|
footers: ContentPageFurnitureSchema.optional(),
|
|
395
|
-
source: require_source.SourceResidueSchema.optional()
|
|
433
|
+
source: require_source.SourceResidueSchema.optional(),
|
|
434
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
396
435
|
});
|
|
397
436
|
const ContentShapeSchema = zod.z.object({
|
|
398
437
|
name: zod.z.string().optional(),
|
|
@@ -408,13 +447,15 @@ const ContentShapeSchema = zod.z.object({
|
|
|
408
447
|
sourcePath: zod.z.string().optional(),
|
|
409
448
|
source: require_source.SourceResidueSchema.optional(),
|
|
410
449
|
frames: zod.z.array(require_geometry.LayoutFrameSchema).optional(),
|
|
450
|
+
...CONTENT_ANNOTATION_FIELDS,
|
|
411
451
|
blocks: zod.z.lazy(() => zod.z.array(ContentBlockSchema))
|
|
412
452
|
});
|
|
413
453
|
const ContentSlideSchema = zod.z.object({
|
|
414
454
|
size: require_geometry.PageSizeSchema,
|
|
415
455
|
shapes: zod.z.array(ContentShapeSchema),
|
|
416
456
|
notes: zod.z.string(),
|
|
417
|
-
source: require_source.SourceResidueSchema.optional()
|
|
457
|
+
source: require_source.SourceResidueSchema.optional(),
|
|
458
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
418
459
|
});
|
|
419
460
|
const DecimalStringSchema = zod.z.string().regex(/^-?(0|[1-9]\d*)(\.\d+)?$/);
|
|
420
461
|
const ContentCellValueSchema = zod.z.discriminatedUnion("kind", [
|
|
@@ -491,7 +532,8 @@ const ContentSheetCellSchema = zod.z.object({
|
|
|
491
532
|
comment: ContentSheetCellCommentSchema.optional(),
|
|
492
533
|
sourcePath: zod.z.string().optional(),
|
|
493
534
|
source: require_source.SourceResidueSchema.optional(),
|
|
494
|
-
frames: zod.z.array(require_geometry.LayoutFrameSchema).optional()
|
|
535
|
+
frames: zod.z.array(require_geometry.LayoutFrameSchema).optional(),
|
|
536
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
495
537
|
});
|
|
496
538
|
const ContentSheetColumnSchema = zod.z.object({
|
|
497
539
|
index: zod.z.number().int().nonnegative(),
|
|
@@ -709,7 +751,8 @@ const ContentSheetSchema = zod.z.object({
|
|
|
709
751
|
embeddedObjects: zod.z.array(ContentEmbeddedObjectSchema).optional(),
|
|
710
752
|
dataValidations: zod.z.array(ContentSheetDataValidationSchema).optional(),
|
|
711
753
|
conditionalFormats: zod.z.array(ContentSheetConditionalFormatSchema).optional(),
|
|
712
|
-
source: require_source.SourceResidueSchema.optional()
|
|
754
|
+
source: require_source.SourceResidueSchema.optional(),
|
|
755
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
713
756
|
});
|
|
714
757
|
const ContentStrokeDashSchema = zod.z.object({
|
|
715
758
|
dots1: zod.z.number().int().positive(),
|
|
@@ -797,7 +840,8 @@ const ContentVectorSchema = zod.z.discriminatedUnion("kind", [
|
|
|
797
840
|
paintOrder: zod.z.number().optional(),
|
|
798
841
|
sourcePath: zod.z.string().optional(),
|
|
799
842
|
source: require_source.SourceResidueSchema.optional(),
|
|
800
|
-
frames: zod.z.array(require_geometry.LayoutFrameSchema).optional()
|
|
843
|
+
frames: zod.z.array(require_geometry.LayoutFrameSchema).optional(),
|
|
844
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
801
845
|
}),
|
|
802
846
|
zod.z.object({
|
|
803
847
|
kind: zod.z.literal("ellipse"),
|
|
@@ -810,7 +854,8 @@ const ContentVectorSchema = zod.z.discriminatedUnion("kind", [
|
|
|
810
854
|
paintOrder: zod.z.number().optional(),
|
|
811
855
|
sourcePath: zod.z.string().optional(),
|
|
812
856
|
source: require_source.SourceResidueSchema.optional(),
|
|
813
|
-
frames: zod.z.array(require_geometry.LayoutFrameSchema).optional()
|
|
857
|
+
frames: zod.z.array(require_geometry.LayoutFrameSchema).optional(),
|
|
858
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
814
859
|
}),
|
|
815
860
|
zod.z.object({
|
|
816
861
|
kind: zod.z.literal("line"),
|
|
@@ -820,7 +865,8 @@ const ContentVectorSchema = zod.z.discriminatedUnion("kind", [
|
|
|
820
865
|
paintOrder: zod.z.number().optional(),
|
|
821
866
|
sourcePath: zod.z.string().optional(),
|
|
822
867
|
source: require_source.SourceResidueSchema.optional(),
|
|
823
|
-
frames: zod.z.array(require_geometry.LayoutFrameSchema).optional()
|
|
868
|
+
frames: zod.z.array(require_geometry.LayoutFrameSchema).optional(),
|
|
869
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
824
870
|
}),
|
|
825
871
|
zod.z.object({
|
|
826
872
|
kind: zod.z.literal("path"),
|
|
@@ -835,14 +881,16 @@ const ContentVectorSchema = zod.z.discriminatedUnion("kind", [
|
|
|
835
881
|
paintOrder: zod.z.number().optional(),
|
|
836
882
|
sourcePath: zod.z.string().optional(),
|
|
837
883
|
source: require_source.SourceResidueSchema.optional(),
|
|
838
|
-
frames: zod.z.array(require_geometry.LayoutFrameSchema).optional()
|
|
884
|
+
frames: zod.z.array(require_geometry.LayoutFrameSchema).optional(),
|
|
885
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
839
886
|
})
|
|
840
887
|
]);
|
|
841
888
|
const ContentDrawPageSchema = zod.z.object({
|
|
842
889
|
size: require_geometry.PageSizeSchema,
|
|
843
890
|
shapes: zod.z.array(ContentShapeSchema),
|
|
844
891
|
vectors: zod.z.array(ContentVectorSchema),
|
|
845
|
-
source: require_source.SourceResidueSchema.optional()
|
|
892
|
+
source: require_source.SourceResidueSchema.optional(),
|
|
893
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
846
894
|
});
|
|
847
895
|
const ContentFormulaSchema = zod.z.object({
|
|
848
896
|
mathml: zod.z.array(require_mathml.MathMlNodeSchema),
|
|
@@ -850,7 +898,8 @@ const ContentFormulaSchema = zod.z.object({
|
|
|
850
898
|
presentation: require_math.MathPresentationSchema.optional(),
|
|
851
899
|
content: require_math.MathExpressionSchema.optional(),
|
|
852
900
|
provenance: require_math.MathProvenanceSchema.optional(),
|
|
853
|
-
source: require_source.SourceResidueSchema.optional()
|
|
901
|
+
source: require_source.SourceResidueSchema.optional(),
|
|
902
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
854
903
|
});
|
|
855
904
|
const contentDocumentSharedFields = { symbolTable: require_math.SymbolTableSchema.optional() };
|
|
856
905
|
const ContentDefinedNameSchema = zod.z.object({
|
|
@@ -892,6 +941,7 @@ const ContentDocumentSchema = zod.z.discriminatedUnion("kind", [
|
|
|
892
941
|
})
|
|
893
942
|
]);
|
|
894
943
|
//#endregion
|
|
944
|
+
exports.CONTENT_ANNOTATION_FIELDS = CONTENT_ANNOTATION_FIELDS;
|
|
895
945
|
exports.ContentBitmapFillSchema = ContentBitmapFillSchema;
|
|
896
946
|
exports.ContentBlockSchema = ContentBlockSchema;
|
|
897
947
|
exports.ContentBorderSchema = ContentBorderSchema;
|
|
@@ -919,7 +969,9 @@ exports.ContentHatchFillSchema = ContentHatchFillSchema;
|
|
|
919
969
|
exports.ContentHatchStyleSchema = ContentHatchStyleSchema;
|
|
920
970
|
exports.ContentImageBlockSchema = ContentImageBlockSchema;
|
|
921
971
|
exports.ContentImageOriginalSchema = ContentImageOriginalSchema;
|
|
972
|
+
exports.ContentInterpretationSchema = ContentInterpretationSchema;
|
|
922
973
|
exports.ContentListMembershipSchema = ContentListMembershipSchema;
|
|
974
|
+
exports.ContentOriginSchema = ContentOriginSchema;
|
|
923
975
|
exports.ContentPageBreakSchema = ContentPageBreakSchema;
|
|
924
976
|
exports.ContentPageFurnitureSchema = ContentPageFurnitureSchema;
|
|
925
977
|
exports.ContentParagraphBordersSchema = ContentParagraphBordersSchema;
|
|
@@ -952,6 +1004,7 @@ exports.ContentSubpathSchema = ContentSubpathSchema;
|
|
|
952
1004
|
exports.ContentTableCellSchema = ContentTableCellSchema;
|
|
953
1005
|
exports.ContentTableRowSchema = ContentTableRowSchema;
|
|
954
1006
|
exports.ContentTableSchema = ContentTableSchema;
|
|
1007
|
+
exports.ContentTranscriptSchema = ContentTranscriptSchema;
|
|
955
1008
|
exports.ContentVectorSchema = ContentVectorSchema;
|
|
956
1009
|
exports.DecimalStringSchema = DecimalStringSchema;
|
|
957
1010
|
exports.IMAGE_FORMATS = IMAGE_FORMATS;
|
package/dist/content.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
export { ConstructMarkerImbalance, ContentBitmapFill, ContentBitmapFillSchema, ContentBlock, ContentBlockSchema, ContentBorder, ContentBorderSchema, ContentCellBorders, ContentCellBordersSchema, ContentCellFill, ContentCellFillSchema, ContentCellPatternType, ContentCellPatternTypeSchema, ContentCellValue, ContentCellValueSchema, ContentConstructEnd, ContentConstructEndSchema, ContentConstructStart, ContentConstructStartSchema, ContentDefinedName, ContentDefinedNameSchema, ContentDocument, ContentDocumentSchema, ContentDrawPage, ContentDrawPageSchema, ContentEmbeddedObject, ContentEmbeddedObjectBlock, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectKind, ContentEmbeddedObjectSchema, ContentFillPattern, ContentFillPatternSchema, ContentFloatAlign, ContentFloatAlignSchema, ContentFloatAxis, ContentFloatAxisSchema, ContentFloatOrigin, ContentFloatOriginSchema, ContentFloatPosition, ContentFloatPositionSchema, ContentFont, ContentFontSchema, ContentFormula, ContentFormulaSchema, ContentGradientFill, ContentGradientFillSchema, ContentGradientStyle, ContentGradientStyleSchema, ContentHatchFill, ContentHatchFillSchema, ContentHatchStyle, ContentHatchStyleSchema, ContentImageBlock, ContentImageBlockSchema, ContentImageOriginal, ContentImageOriginalSchema, ContentListMembership, ContentListMembershipSchema, ContentPageBreak, ContentPageBreakSchema, ContentPageFurniture, ContentPageFurnitureSchema, ContentParagraph, ContentParagraphBorders, ContentParagraphBordersSchema, ContentParagraphSchema, ContentPathPoint, ContentPathPointSchema, ContentPathSegment, ContentPathSegmentSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellComment, ContentSheetCellCommentSchema, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetConditionalFormat, ContentSheetConditionalFormatSchema, ContentSheetConditionalFormatStyle, ContentSheetConditionalFormatStyleSchema, ContentSheetConditionalFormatValue, ContentSheetConditionalFormatValueSchema, ContentSheetDataValidation, ContentSheetDataValidationSchema, ContentSheetDataValidationType, ContentSheetDataValidationTypeSchema, ContentSheetImage, ContentSheetImageSchema, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, ContentSheetRange, ContentSheetRangeSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStroke, ContentStrokeDash, ContentStrokeDashSchema, ContentStrokeSchema, ContentStrokeStyle, ContentStrokeStyleSchema, ContentSubpath, ContentSubpathSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, ContentVector, ContentVectorSchema, DecimalString, DecimalStringSchema, FusedNode, IMAGE_FORMATS, ImageFormat, RUN_FONT_PROPERTY_SHAPE, RunConstructExtent, RunConstructExtentSchema, RunConstructFault, SheetRuleOperator, SheetRuleOperatorSchema, clampHeadingLevel, contentDocumentSharedFields, findConstructMarkerImbalance, findRunConstructFault, isContentBlock, isContentConstructEnd, isContentConstructStart, isRunConstructExtent, resolveCellFillColor, unrecognizedFillKind };
|
|
1
|
+
import { $ as ContentHatchStyleSchema, $t as ContentSheetRepeatRange, A as ContentEmbeddedObjectKind, An as RunConstructExtent, At as ContentSheetCellComment, B as ContentFloatPosition, Bn as isContentConstructEnd, Bt as ContentSheetConditionalFormatValueSchema, C as ContentDocument, Cn as ContentVectorSchema, Ct as ContentRunSchema, D as ContentEmbeddedObject, Dn as IMAGE_FORMATS, Dt as ContentShapeSchema, E as ContentDrawPageSchema, En as FusedNode, Et as ContentShape, F as ContentFloatAlignSchema, Fn as clampHeadingLevel, Ft as ContentSheetConditionalFormat, G as ContentFormulaSchema, Gt as ContentSheetImage, H as ContentFont, Hn as isRunConstructExtent, Ht as ContentSheetDataValidationSchema, I as ContentFloatAxis, In as contentDocumentSharedFields, It as ContentSheetConditionalFormatSchema, J as ContentGradientStyle, Jt as ContentSheetPrintRangeSchema, K as ContentGradientFill, Kt as ContentSheetImageSchema, L as ContentFloatAxisSchema, Ln as findConstructMarkerImbalance, Lt as ContentSheetConditionalFormatStyle, M as ContentFillPattern, Mn as RunConstructFault, Mt as ContentSheetCellSchema, N as ContentFillPatternSchema, Nn as SheetRuleOperator, Nt as ContentSheetColumn, O as ContentEmbeddedObjectBlock, On as ImageFormat, Ot as ContentSheet, P as ContentFloatAlign, Pn as SheetRuleOperatorSchema, Pt as ContentSheetColumnSchema, Q as ContentHatchStyle, Qt as ContentSheetRangeSchema, R as ContentFloatOrigin, Rn as findRunConstructFault, Rt as ContentSheetConditionalFormatStyleSchema, S as ContentDefinedNameSchema, Sn as ContentVector, St as ContentRun, T as ContentDrawPage, Tn as DecimalStringSchema, Tt as ContentSectionSchema, U as ContentFontSchema, Un as resolveCellFillColor, Ut as ContentSheetDataValidationType, V as ContentFloatPositionSchema, Vn as isContentConstructStart, Vt as ContentSheetDataValidation, W as ContentFormula, Wn as unrecognizedFillKind, Wt as ContentSheetDataValidationTypeSchema, X as ContentHatchFill, Xt as ContentSheetPrintSettingsSchema, Y as ContentGradientStyleSchema, Yt as ContentSheetPrintSettings, Z as ContentHatchFillSchema, Zt as ContentSheetRange, _ as ContentConstructEnd, _n as ContentTableRow, _t as ContentParagraphSchema, a as ContentBlock, an as ContentSlideSchema, at as ContentInterpretationSchema, b as ContentConstructStartSchema, bn as ContentTranscript, bt as ContentPathSegment, c as ContentBorderSchema, cn as ContentStrokeDashSchema, ct as ContentOrigin, d as ContentCellFill, dn as ContentStrokeStyleSchema, dt as ContentPageBreakSchema, en as ContentSheetRepeatRangeSchema, et as ContentImageBlock, f as ContentCellFillSchema, fn as ContentSubpath, ft as ContentPageFurniture, g as ContentCellValueSchema, gn as ContentTableCellSchema, gt as ContentParagraphBordersSchema, h as ContentCellValue, hn as ContentTableCell, ht as ContentParagraphBorders, i as ContentBitmapFillSchema, in as ContentSlide, it as ContentInterpretation, j as ContentEmbeddedObjectSchema, jn as RunConstructExtentSchema, jt as ContentSheetCellCommentSchema, k as ContentEmbeddedObjectBlockSchema, kn as RUN_FONT_PROPERTY_SHAPE, kt as ContentSheetCell, l as ContentCellBorders, ln as ContentStrokeSchema, lt as ContentOriginSchema, m as ContentCellPatternTypeSchema, mn as ContentTable, mt as ContentParagraph, n as ConstructMarkerImbalance, nn as ContentSheetRowSchema, nt as ContentImageOriginal, o as ContentBlockSchema, on as ContentStroke, ot as ContentListMembership, p as ContentCellPatternType, pn as ContentSubpathSchema, pt as ContentPageFurnitureSchema, q as ContentGradientFillSchema, qt as ContentSheetPrintRange, r as ContentBitmapFill, rn as ContentSheetSchema, rt as ContentImageOriginalSchema, s as ContentBorder, sn as ContentStrokeDash, st as ContentListMembershipSchema, t as CONTENT_ANNOTATION_FIELDS, tn as ContentSheetRow, tt as ContentImageBlockSchema, u as ContentCellBordersSchema, un as ContentStrokeStyle, ut as ContentPageBreak, v as ContentConstructEndSchema, vn as ContentTableRowSchema, vt as ContentPathPoint, w as ContentDocumentSchema, wn as DecimalString, wt as ContentSection, x as ContentDefinedName, xn as ContentTranscriptSchema, xt as ContentPathSegmentSchema, y as ContentConstructStart, yn as ContentTableSchema, yt as ContentPathPointSchema, z as ContentFloatOriginSchema, zn as isContentBlock, zt as ContentSheetConditionalFormatValue } from "./content-SgKmas45.cjs";
|
|
2
|
+
export { CONTENT_ANNOTATION_FIELDS, ConstructMarkerImbalance, ContentBitmapFill, ContentBitmapFillSchema, ContentBlock, ContentBlockSchema, ContentBorder, ContentBorderSchema, ContentCellBorders, ContentCellBordersSchema, ContentCellFill, ContentCellFillSchema, ContentCellPatternType, ContentCellPatternTypeSchema, ContentCellValue, ContentCellValueSchema, ContentConstructEnd, ContentConstructEndSchema, ContentConstructStart, ContentConstructStartSchema, ContentDefinedName, ContentDefinedNameSchema, ContentDocument, ContentDocumentSchema, ContentDrawPage, ContentDrawPageSchema, ContentEmbeddedObject, ContentEmbeddedObjectBlock, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectKind, ContentEmbeddedObjectSchema, ContentFillPattern, ContentFillPatternSchema, ContentFloatAlign, ContentFloatAlignSchema, ContentFloatAxis, ContentFloatAxisSchema, ContentFloatOrigin, ContentFloatOriginSchema, ContentFloatPosition, ContentFloatPositionSchema, ContentFont, ContentFontSchema, ContentFormula, ContentFormulaSchema, ContentGradientFill, ContentGradientFillSchema, ContentGradientStyle, ContentGradientStyleSchema, ContentHatchFill, ContentHatchFillSchema, ContentHatchStyle, ContentHatchStyleSchema, ContentImageBlock, ContentImageBlockSchema, ContentImageOriginal, ContentImageOriginalSchema, ContentInterpretation, ContentInterpretationSchema, ContentListMembership, ContentListMembershipSchema, ContentOrigin, ContentOriginSchema, ContentPageBreak, ContentPageBreakSchema, ContentPageFurniture, ContentPageFurnitureSchema, ContentParagraph, ContentParagraphBorders, ContentParagraphBordersSchema, ContentParagraphSchema, ContentPathPoint, ContentPathPointSchema, ContentPathSegment, ContentPathSegmentSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellComment, ContentSheetCellCommentSchema, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetConditionalFormat, ContentSheetConditionalFormatSchema, ContentSheetConditionalFormatStyle, ContentSheetConditionalFormatStyleSchema, ContentSheetConditionalFormatValue, ContentSheetConditionalFormatValueSchema, ContentSheetDataValidation, ContentSheetDataValidationSchema, ContentSheetDataValidationType, ContentSheetDataValidationTypeSchema, ContentSheetImage, ContentSheetImageSchema, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, ContentSheetRange, ContentSheetRangeSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStroke, ContentStrokeDash, ContentStrokeDashSchema, ContentStrokeSchema, ContentStrokeStyle, ContentStrokeStyleSchema, ContentSubpath, ContentSubpathSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, ContentTranscript, ContentTranscriptSchema, ContentVector, ContentVectorSchema, DecimalString, DecimalStringSchema, FusedNode, IMAGE_FORMATS, ImageFormat, RUN_FONT_PROPERTY_SHAPE, RunConstructExtent, RunConstructExtentSchema, RunConstructFault, SheetRuleOperator, SheetRuleOperatorSchema, clampHeadingLevel, contentDocumentSharedFields, findConstructMarkerImbalance, findRunConstructFault, isContentBlock, isContentConstructEnd, isContentConstructStart, isRunConstructExtent, resolveCellFillColor, unrecognizedFillKind };
|
package/dist/content.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
export { ConstructMarkerImbalance, ContentBitmapFill, ContentBitmapFillSchema, ContentBlock, ContentBlockSchema, ContentBorder, ContentBorderSchema, ContentCellBorders, ContentCellBordersSchema, ContentCellFill, ContentCellFillSchema, ContentCellPatternType, ContentCellPatternTypeSchema, ContentCellValue, ContentCellValueSchema, ContentConstructEnd, ContentConstructEndSchema, ContentConstructStart, ContentConstructStartSchema, ContentDefinedName, ContentDefinedNameSchema, ContentDocument, ContentDocumentSchema, ContentDrawPage, ContentDrawPageSchema, ContentEmbeddedObject, ContentEmbeddedObjectBlock, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectKind, ContentEmbeddedObjectSchema, ContentFillPattern, ContentFillPatternSchema, ContentFloatAlign, ContentFloatAlignSchema, ContentFloatAxis, ContentFloatAxisSchema, ContentFloatOrigin, ContentFloatOriginSchema, ContentFloatPosition, ContentFloatPositionSchema, ContentFont, ContentFontSchema, ContentFormula, ContentFormulaSchema, ContentGradientFill, ContentGradientFillSchema, ContentGradientStyle, ContentGradientStyleSchema, ContentHatchFill, ContentHatchFillSchema, ContentHatchStyle, ContentHatchStyleSchema, ContentImageBlock, ContentImageBlockSchema, ContentImageOriginal, ContentImageOriginalSchema, ContentListMembership, ContentListMembershipSchema, ContentPageBreak, ContentPageBreakSchema, ContentPageFurniture, ContentPageFurnitureSchema, ContentParagraph, ContentParagraphBorders, ContentParagraphBordersSchema, ContentParagraphSchema, ContentPathPoint, ContentPathPointSchema, ContentPathSegment, ContentPathSegmentSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellComment, ContentSheetCellCommentSchema, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetConditionalFormat, ContentSheetConditionalFormatSchema, ContentSheetConditionalFormatStyle, ContentSheetConditionalFormatStyleSchema, ContentSheetConditionalFormatValue, ContentSheetConditionalFormatValueSchema, ContentSheetDataValidation, ContentSheetDataValidationSchema, ContentSheetDataValidationType, ContentSheetDataValidationTypeSchema, ContentSheetImage, ContentSheetImageSchema, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, ContentSheetRange, ContentSheetRangeSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStroke, ContentStrokeDash, ContentStrokeDashSchema, ContentStrokeSchema, ContentStrokeStyle, ContentStrokeStyleSchema, ContentSubpath, ContentSubpathSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, ContentVector, ContentVectorSchema, DecimalString, DecimalStringSchema, FusedNode, IMAGE_FORMATS, ImageFormat, RUN_FONT_PROPERTY_SHAPE, RunConstructExtent, RunConstructExtentSchema, RunConstructFault, SheetRuleOperator, SheetRuleOperatorSchema, clampHeadingLevel, contentDocumentSharedFields, findConstructMarkerImbalance, findRunConstructFault, isContentBlock, isContentConstructEnd, isContentConstructStart, isRunConstructExtent, resolveCellFillColor, unrecognizedFillKind };
|
|
1
|
+
import { $ as ContentHatchStyleSchema, $t as ContentSheetRepeatRange, A as ContentEmbeddedObjectKind, An as RunConstructExtent, At as ContentSheetCellComment, B as ContentFloatPosition, Bn as isContentConstructEnd, Bt as ContentSheetConditionalFormatValueSchema, C as ContentDocument, Cn as ContentVectorSchema, Ct as ContentRunSchema, D as ContentEmbeddedObject, Dn as IMAGE_FORMATS, Dt as ContentShapeSchema, E as ContentDrawPageSchema, En as FusedNode, Et as ContentShape, F as ContentFloatAlignSchema, Fn as clampHeadingLevel, Ft as ContentSheetConditionalFormat, G as ContentFormulaSchema, Gt as ContentSheetImage, H as ContentFont, Hn as isRunConstructExtent, Ht as ContentSheetDataValidationSchema, I as ContentFloatAxis, In as contentDocumentSharedFields, It as ContentSheetConditionalFormatSchema, J as ContentGradientStyle, Jt as ContentSheetPrintRangeSchema, K as ContentGradientFill, Kt as ContentSheetImageSchema, L as ContentFloatAxisSchema, Ln as findConstructMarkerImbalance, Lt as ContentSheetConditionalFormatStyle, M as ContentFillPattern, Mn as RunConstructFault, Mt as ContentSheetCellSchema, N as ContentFillPatternSchema, Nn as SheetRuleOperator, Nt as ContentSheetColumn, O as ContentEmbeddedObjectBlock, On as ImageFormat, Ot as ContentSheet, P as ContentFloatAlign, Pn as SheetRuleOperatorSchema, Pt as ContentSheetColumnSchema, Q as ContentHatchStyle, Qt as ContentSheetRangeSchema, R as ContentFloatOrigin, Rn as findRunConstructFault, Rt as ContentSheetConditionalFormatStyleSchema, S as ContentDefinedNameSchema, Sn as ContentVector, St as ContentRun, T as ContentDrawPage, Tn as DecimalStringSchema, Tt as ContentSectionSchema, U as ContentFontSchema, Un as resolveCellFillColor, Ut as ContentSheetDataValidationType, V as ContentFloatPositionSchema, Vn as isContentConstructStart, Vt as ContentSheetDataValidation, W as ContentFormula, Wn as unrecognizedFillKind, Wt as ContentSheetDataValidationTypeSchema, X as ContentHatchFill, Xt as ContentSheetPrintSettingsSchema, Y as ContentGradientStyleSchema, Yt as ContentSheetPrintSettings, Z as ContentHatchFillSchema, Zt as ContentSheetRange, _ as ContentConstructEnd, _n as ContentTableRow, _t as ContentParagraphSchema, a as ContentBlock, an as ContentSlideSchema, at as ContentInterpretationSchema, b as ContentConstructStartSchema, bn as ContentTranscript, bt as ContentPathSegment, c as ContentBorderSchema, cn as ContentStrokeDashSchema, ct as ContentOrigin, d as ContentCellFill, dn as ContentStrokeStyleSchema, dt as ContentPageBreakSchema, en as ContentSheetRepeatRangeSchema, et as ContentImageBlock, f as ContentCellFillSchema, fn as ContentSubpath, ft as ContentPageFurniture, g as ContentCellValueSchema, gn as ContentTableCellSchema, gt as ContentParagraphBordersSchema, h as ContentCellValue, hn as ContentTableCell, ht as ContentParagraphBorders, i as ContentBitmapFillSchema, in as ContentSlide, it as ContentInterpretation, j as ContentEmbeddedObjectSchema, jn as RunConstructExtentSchema, jt as ContentSheetCellCommentSchema, k as ContentEmbeddedObjectBlockSchema, kn as RUN_FONT_PROPERTY_SHAPE, kt as ContentSheetCell, l as ContentCellBorders, ln as ContentStrokeSchema, lt as ContentOriginSchema, m as ContentCellPatternTypeSchema, mn as ContentTable, mt as ContentParagraph, n as ConstructMarkerImbalance, nn as ContentSheetRowSchema, nt as ContentImageOriginal, o as ContentBlockSchema, on as ContentStroke, ot as ContentListMembership, p as ContentCellPatternType, pn as ContentSubpathSchema, pt as ContentPageFurnitureSchema, q as ContentGradientFillSchema, qt as ContentSheetPrintRange, r as ContentBitmapFill, rn as ContentSheetSchema, rt as ContentImageOriginalSchema, s as ContentBorder, sn as ContentStrokeDash, st as ContentListMembershipSchema, t as CONTENT_ANNOTATION_FIELDS, tn as ContentSheetRow, tt as ContentImageBlockSchema, u as ContentCellBordersSchema, un as ContentStrokeStyle, ut as ContentPageBreak, v as ContentConstructEndSchema, vn as ContentTableRowSchema, vt as ContentPathPoint, w as ContentDocumentSchema, wn as DecimalString, wt as ContentSection, x as ContentDefinedName, xn as ContentTranscriptSchema, xt as ContentPathSegmentSchema, y as ContentConstructStart, yn as ContentTableSchema, yt as ContentPathPointSchema, z as ContentFloatOriginSchema, zn as isContentBlock, zt as ContentSheetConditionalFormatValue } from "./content-DAc4O272.js";
|
|
2
|
+
export { CONTENT_ANNOTATION_FIELDS, ConstructMarkerImbalance, ContentBitmapFill, ContentBitmapFillSchema, ContentBlock, ContentBlockSchema, ContentBorder, ContentBorderSchema, ContentCellBorders, ContentCellBordersSchema, ContentCellFill, ContentCellFillSchema, ContentCellPatternType, ContentCellPatternTypeSchema, ContentCellValue, ContentCellValueSchema, ContentConstructEnd, ContentConstructEndSchema, ContentConstructStart, ContentConstructStartSchema, ContentDefinedName, ContentDefinedNameSchema, ContentDocument, ContentDocumentSchema, ContentDrawPage, ContentDrawPageSchema, ContentEmbeddedObject, ContentEmbeddedObjectBlock, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectKind, ContentEmbeddedObjectSchema, ContentFillPattern, ContentFillPatternSchema, ContentFloatAlign, ContentFloatAlignSchema, ContentFloatAxis, ContentFloatAxisSchema, ContentFloatOrigin, ContentFloatOriginSchema, ContentFloatPosition, ContentFloatPositionSchema, ContentFont, ContentFontSchema, ContentFormula, ContentFormulaSchema, ContentGradientFill, ContentGradientFillSchema, ContentGradientStyle, ContentGradientStyleSchema, ContentHatchFill, ContentHatchFillSchema, ContentHatchStyle, ContentHatchStyleSchema, ContentImageBlock, ContentImageBlockSchema, ContentImageOriginal, ContentImageOriginalSchema, ContentInterpretation, ContentInterpretationSchema, ContentListMembership, ContentListMembershipSchema, ContentOrigin, ContentOriginSchema, ContentPageBreak, ContentPageBreakSchema, ContentPageFurniture, ContentPageFurnitureSchema, ContentParagraph, ContentParagraphBorders, ContentParagraphBordersSchema, ContentParagraphSchema, ContentPathPoint, ContentPathPointSchema, ContentPathSegment, ContentPathSegmentSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellComment, ContentSheetCellCommentSchema, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetConditionalFormat, ContentSheetConditionalFormatSchema, ContentSheetConditionalFormatStyle, ContentSheetConditionalFormatStyleSchema, ContentSheetConditionalFormatValue, ContentSheetConditionalFormatValueSchema, ContentSheetDataValidation, ContentSheetDataValidationSchema, ContentSheetDataValidationType, ContentSheetDataValidationTypeSchema, ContentSheetImage, ContentSheetImageSchema, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, ContentSheetRange, ContentSheetRangeSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStroke, ContentStrokeDash, ContentStrokeDashSchema, ContentStrokeSchema, ContentStrokeStyle, ContentStrokeStyleSchema, ContentSubpath, ContentSubpathSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, ContentTranscript, ContentTranscriptSchema, ContentVector, ContentVectorSchema, DecimalString, DecimalStringSchema, FusedNode, IMAGE_FORMATS, ImageFormat, RUN_FONT_PROPERTY_SHAPE, RunConstructExtent, RunConstructExtentSchema, RunConstructFault, SheetRuleOperator, SheetRuleOperatorSchema, clampHeadingLevel, contentDocumentSharedFields, findConstructMarkerImbalance, findRunConstructFault, isContentBlock, isContentConstructEnd, isContentConstructStart, isRunConstructExtent, resolveCellFillColor, unrecognizedFillKind };
|
package/dist/content.js
CHANGED
|
@@ -8,6 +8,35 @@ import { AlignmentSchema, TextDirectionSchema } from "./style.js";
|
|
|
8
8
|
import { LayoutMetadataSchema } from "./metadata.js";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
//#region src/content.ts
|
|
11
|
+
const ContentOriginSchema = z.enum([
|
|
12
|
+
"chart",
|
|
13
|
+
"diagram",
|
|
14
|
+
"table",
|
|
15
|
+
"image",
|
|
16
|
+
"notes",
|
|
17
|
+
"body"
|
|
18
|
+
]);
|
|
19
|
+
const ContentTranscriptSchema = z.object({
|
|
20
|
+
text: z.string(),
|
|
21
|
+
confidence: z.enum([
|
|
22
|
+
"high",
|
|
23
|
+
"medium",
|
|
24
|
+
"low"
|
|
25
|
+
]),
|
|
26
|
+
mechanism: z.enum(["deterministic", "model"])
|
|
27
|
+
});
|
|
28
|
+
const ContentInterpretationSchema = z.object({
|
|
29
|
+
transcript: ContentTranscriptSchema.optional(),
|
|
30
|
+
description: z.string().optional(),
|
|
31
|
+
by: z.object({
|
|
32
|
+
model: z.string(),
|
|
33
|
+
at: z.string()
|
|
34
|
+
}).optional()
|
|
35
|
+
});
|
|
36
|
+
const CONTENT_ANNOTATION_FIELDS = {
|
|
37
|
+
origin: ContentOriginSchema.optional(),
|
|
38
|
+
interpretation: ContentInterpretationSchema.optional()
|
|
39
|
+
};
|
|
11
40
|
const RUN_FONT_PROPERTY_SHAPE = {
|
|
12
41
|
bold: z.boolean().optional(),
|
|
13
42
|
italic: z.boolean().optional(),
|
|
@@ -26,7 +55,8 @@ const ContentRunSchema = z.object({
|
|
|
26
55
|
direction: TextDirectionSchema.optional(),
|
|
27
56
|
sourcePath: z.string().optional(),
|
|
28
57
|
source: SourceResidueSchema.optional(),
|
|
29
|
-
frames: z.array(LayoutFrameSchema).optional()
|
|
58
|
+
frames: z.array(LayoutFrameSchema).optional(),
|
|
59
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
30
60
|
});
|
|
31
61
|
const ContentListMembershipSchema = z.object({
|
|
32
62
|
numId: z.string().optional(),
|
|
@@ -86,7 +116,8 @@ const ContentParagraphSchema = z.object({
|
|
|
86
116
|
borders: ContentParagraphBordersSchema.optional(),
|
|
87
117
|
sourcePath: z.string().optional(),
|
|
88
118
|
source: SourceResidueSchema.optional(),
|
|
89
|
-
frames: z.array(LayoutFrameSchema).optional()
|
|
119
|
+
frames: z.array(LayoutFrameSchema).optional(),
|
|
120
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
90
121
|
});
|
|
91
122
|
function clampHeadingLevel(level) {
|
|
92
123
|
return Math.min(6, Math.max(1, Math.round(level)));
|
|
@@ -148,16 +179,20 @@ const ContentImageBlockSchema = z.object({
|
|
|
148
179
|
heightPt: z.number().positive(),
|
|
149
180
|
altText: z.string().optional(),
|
|
150
181
|
original: ContentImageOriginalSchema.optional(),
|
|
182
|
+
anchorRunIndex: z.number().int().nonnegative().optional(),
|
|
183
|
+
anchorOffset: z.number().int().nonnegative().optional(),
|
|
151
184
|
floatPosition: ContentFloatPositionSchema.optional(),
|
|
152
185
|
sourcePath: z.string().optional(),
|
|
153
186
|
source: SourceResidueSchema.optional(),
|
|
154
|
-
frames: z.array(LayoutFrameSchema).optional()
|
|
187
|
+
frames: z.array(LayoutFrameSchema).optional(),
|
|
188
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
155
189
|
});
|
|
156
190
|
const ContentPageBreakSchema = z.object({
|
|
157
191
|
kind: z.literal("pageBreak"),
|
|
158
192
|
sourcePath: z.string().optional(),
|
|
159
193
|
source: SourceResidueSchema.optional(),
|
|
160
|
-
frames: z.array(LayoutFrameSchema).optional()
|
|
194
|
+
frames: z.array(LayoutFrameSchema).optional(),
|
|
195
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
161
196
|
});
|
|
162
197
|
const ContentConstructStartSchema = z.object({
|
|
163
198
|
kind: z.literal("constructStart"),
|
|
@@ -223,7 +258,8 @@ const CONTENT_EMBEDDED_OBJECT_FIELDS = {
|
|
|
223
258
|
anchorColumn: z.number().int().nonnegative().optional(),
|
|
224
259
|
offsetXPt: z.number().optional(),
|
|
225
260
|
offsetYPt: z.number().optional(),
|
|
226
|
-
source: SourceResidueSchema.optional()
|
|
261
|
+
source: SourceResidueSchema.optional(),
|
|
262
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
227
263
|
};
|
|
228
264
|
const ContentEmbeddedObjectSchema = z.object(CONTENT_EMBEDDED_OBJECT_FIELDS);
|
|
229
265
|
const ContentEmbeddedObjectBlockSchema = z.object({
|
|
@@ -350,7 +386,8 @@ const ContentTableCellSchema = z.object({
|
|
|
350
386
|
formula: z.string().optional(),
|
|
351
387
|
sourcePath: z.string().optional(),
|
|
352
388
|
source: SourceResidueSchema.optional(),
|
|
353
|
-
frames: z.array(LayoutFrameSchema).optional()
|
|
389
|
+
frames: z.array(LayoutFrameSchema).optional(),
|
|
390
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
354
391
|
});
|
|
355
392
|
const ContentTableRowSchema = z.object({
|
|
356
393
|
cells: z.array(ContentTableCellSchema),
|
|
@@ -363,7 +400,8 @@ const ContentTableSchema = z.object({
|
|
|
363
400
|
columnWidthsPt: z.array(z.number().nonnegative()),
|
|
364
401
|
sourcePath: z.string().optional(),
|
|
365
402
|
source: SourceResidueSchema.optional(),
|
|
366
|
-
frames: z.array(LayoutFrameSchema).optional()
|
|
403
|
+
frames: z.array(LayoutFrameSchema).optional(),
|
|
404
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
367
405
|
});
|
|
368
406
|
const ContentBlockSchema = z.discriminatedUnion("kind", [
|
|
369
407
|
ContentParagraphSchema,
|
|
@@ -391,7 +429,8 @@ const ContentSectionSchema = z.object({
|
|
|
391
429
|
]).optional(),
|
|
392
430
|
headers: ContentPageFurnitureSchema.optional(),
|
|
393
431
|
footers: ContentPageFurnitureSchema.optional(),
|
|
394
|
-
source: SourceResidueSchema.optional()
|
|
432
|
+
source: SourceResidueSchema.optional(),
|
|
433
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
395
434
|
});
|
|
396
435
|
const ContentShapeSchema = z.object({
|
|
397
436
|
name: z.string().optional(),
|
|
@@ -407,13 +446,15 @@ const ContentShapeSchema = z.object({
|
|
|
407
446
|
sourcePath: z.string().optional(),
|
|
408
447
|
source: SourceResidueSchema.optional(),
|
|
409
448
|
frames: z.array(LayoutFrameSchema).optional(),
|
|
449
|
+
...CONTENT_ANNOTATION_FIELDS,
|
|
410
450
|
blocks: z.lazy(() => z.array(ContentBlockSchema))
|
|
411
451
|
});
|
|
412
452
|
const ContentSlideSchema = z.object({
|
|
413
453
|
size: PageSizeSchema,
|
|
414
454
|
shapes: z.array(ContentShapeSchema),
|
|
415
455
|
notes: z.string(),
|
|
416
|
-
source: SourceResidueSchema.optional()
|
|
456
|
+
source: SourceResidueSchema.optional(),
|
|
457
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
417
458
|
});
|
|
418
459
|
const DecimalStringSchema = z.string().regex(/^-?(0|[1-9]\d*)(\.\d+)?$/);
|
|
419
460
|
const ContentCellValueSchema = z.discriminatedUnion("kind", [
|
|
@@ -490,7 +531,8 @@ const ContentSheetCellSchema = z.object({
|
|
|
490
531
|
comment: ContentSheetCellCommentSchema.optional(),
|
|
491
532
|
sourcePath: z.string().optional(),
|
|
492
533
|
source: SourceResidueSchema.optional(),
|
|
493
|
-
frames: z.array(LayoutFrameSchema).optional()
|
|
534
|
+
frames: z.array(LayoutFrameSchema).optional(),
|
|
535
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
494
536
|
});
|
|
495
537
|
const ContentSheetColumnSchema = z.object({
|
|
496
538
|
index: z.number().int().nonnegative(),
|
|
@@ -708,7 +750,8 @@ const ContentSheetSchema = z.object({
|
|
|
708
750
|
embeddedObjects: z.array(ContentEmbeddedObjectSchema).optional(),
|
|
709
751
|
dataValidations: z.array(ContentSheetDataValidationSchema).optional(),
|
|
710
752
|
conditionalFormats: z.array(ContentSheetConditionalFormatSchema).optional(),
|
|
711
|
-
source: SourceResidueSchema.optional()
|
|
753
|
+
source: SourceResidueSchema.optional(),
|
|
754
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
712
755
|
});
|
|
713
756
|
const ContentStrokeDashSchema = z.object({
|
|
714
757
|
dots1: z.number().int().positive(),
|
|
@@ -796,7 +839,8 @@ const ContentVectorSchema = z.discriminatedUnion("kind", [
|
|
|
796
839
|
paintOrder: z.number().optional(),
|
|
797
840
|
sourcePath: z.string().optional(),
|
|
798
841
|
source: SourceResidueSchema.optional(),
|
|
799
|
-
frames: z.array(LayoutFrameSchema).optional()
|
|
842
|
+
frames: z.array(LayoutFrameSchema).optional(),
|
|
843
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
800
844
|
}),
|
|
801
845
|
z.object({
|
|
802
846
|
kind: z.literal("ellipse"),
|
|
@@ -809,7 +853,8 @@ const ContentVectorSchema = z.discriminatedUnion("kind", [
|
|
|
809
853
|
paintOrder: z.number().optional(),
|
|
810
854
|
sourcePath: z.string().optional(),
|
|
811
855
|
source: SourceResidueSchema.optional(),
|
|
812
|
-
frames: z.array(LayoutFrameSchema).optional()
|
|
856
|
+
frames: z.array(LayoutFrameSchema).optional(),
|
|
857
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
813
858
|
}),
|
|
814
859
|
z.object({
|
|
815
860
|
kind: z.literal("line"),
|
|
@@ -819,7 +864,8 @@ const ContentVectorSchema = z.discriminatedUnion("kind", [
|
|
|
819
864
|
paintOrder: z.number().optional(),
|
|
820
865
|
sourcePath: z.string().optional(),
|
|
821
866
|
source: SourceResidueSchema.optional(),
|
|
822
|
-
frames: z.array(LayoutFrameSchema).optional()
|
|
867
|
+
frames: z.array(LayoutFrameSchema).optional(),
|
|
868
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
823
869
|
}),
|
|
824
870
|
z.object({
|
|
825
871
|
kind: z.literal("path"),
|
|
@@ -834,14 +880,16 @@ const ContentVectorSchema = z.discriminatedUnion("kind", [
|
|
|
834
880
|
paintOrder: z.number().optional(),
|
|
835
881
|
sourcePath: z.string().optional(),
|
|
836
882
|
source: SourceResidueSchema.optional(),
|
|
837
|
-
frames: z.array(LayoutFrameSchema).optional()
|
|
883
|
+
frames: z.array(LayoutFrameSchema).optional(),
|
|
884
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
838
885
|
})
|
|
839
886
|
]);
|
|
840
887
|
const ContentDrawPageSchema = z.object({
|
|
841
888
|
size: PageSizeSchema,
|
|
842
889
|
shapes: z.array(ContentShapeSchema),
|
|
843
890
|
vectors: z.array(ContentVectorSchema),
|
|
844
|
-
source: SourceResidueSchema.optional()
|
|
891
|
+
source: SourceResidueSchema.optional(),
|
|
892
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
845
893
|
});
|
|
846
894
|
const ContentFormulaSchema = z.object({
|
|
847
895
|
mathml: z.array(MathMlNodeSchema),
|
|
@@ -849,7 +897,8 @@ const ContentFormulaSchema = z.object({
|
|
|
849
897
|
presentation: MathPresentationSchema.optional(),
|
|
850
898
|
content: MathExpressionSchema.optional(),
|
|
851
899
|
provenance: MathProvenanceSchema.optional(),
|
|
852
|
-
source: SourceResidueSchema.optional()
|
|
900
|
+
source: SourceResidueSchema.optional(),
|
|
901
|
+
...CONTENT_ANNOTATION_FIELDS
|
|
853
902
|
});
|
|
854
903
|
const contentDocumentSharedFields = { symbolTable: SymbolTableSchema.optional() };
|
|
855
904
|
const ContentDefinedNameSchema = z.object({
|
|
@@ -891,4 +940,4 @@ const ContentDocumentSchema = z.discriminatedUnion("kind", [
|
|
|
891
940
|
})
|
|
892
941
|
]);
|
|
893
942
|
//#endregion
|
|
894
|
-
export { ContentBitmapFillSchema, ContentBlockSchema, ContentBorderSchema, ContentCellBordersSchema, ContentCellFillSchema, ContentCellPatternTypeSchema, ContentCellValueSchema, ContentConstructEndSchema, ContentConstructStartSchema, ContentDefinedNameSchema, ContentDocumentSchema, ContentDrawPageSchema, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectSchema, ContentFillPatternSchema, ContentFloatAlignSchema, ContentFloatAxisSchema, ContentFloatOriginSchema, ContentFloatPositionSchema, ContentFontSchema, ContentFormulaSchema, ContentGradientFillSchema, ContentGradientStyleSchema, ContentHatchFillSchema, ContentHatchStyleSchema, ContentImageBlockSchema, ContentImageOriginalSchema, ContentListMembershipSchema, ContentPageBreakSchema, ContentPageFurnitureSchema, ContentParagraphBordersSchema, ContentParagraphSchema, ContentPathPointSchema, ContentPathSegmentSchema, ContentRunSchema, ContentSectionSchema, ContentShapeSchema, ContentSheetCellCommentSchema, ContentSheetCellSchema, ContentSheetColumnSchema, ContentSheetConditionalFormatSchema, ContentSheetConditionalFormatStyleSchema, ContentSheetConditionalFormatValueSchema, ContentSheetDataValidationSchema, ContentSheetDataValidationTypeSchema, ContentSheetImageSchema, ContentSheetPrintRangeSchema, ContentSheetPrintSettingsSchema, ContentSheetRangeSchema, ContentSheetRepeatRangeSchema, ContentSheetRowSchema, ContentSheetSchema, ContentSlideSchema, ContentStrokeDashSchema, ContentStrokeSchema, ContentStrokeStyleSchema, ContentSubpathSchema, ContentTableCellSchema, ContentTableRowSchema, ContentTableSchema, ContentVectorSchema, DecimalStringSchema, IMAGE_FORMATS, RUN_FONT_PROPERTY_SHAPE, RunConstructExtentSchema, SheetRuleOperatorSchema, clampHeadingLevel, contentDocumentSharedFields, findConstructMarkerImbalance, findRunConstructFault, isContentBlock, isContentConstructEnd, isContentConstructStart, isRunConstructExtent, resolveCellFillColor, unrecognizedFillKind };
|
|
943
|
+
export { CONTENT_ANNOTATION_FIELDS, ContentBitmapFillSchema, ContentBlockSchema, ContentBorderSchema, ContentCellBordersSchema, ContentCellFillSchema, ContentCellPatternTypeSchema, ContentCellValueSchema, ContentConstructEndSchema, ContentConstructStartSchema, ContentDefinedNameSchema, ContentDocumentSchema, ContentDrawPageSchema, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectSchema, ContentFillPatternSchema, ContentFloatAlignSchema, ContentFloatAxisSchema, ContentFloatOriginSchema, ContentFloatPositionSchema, ContentFontSchema, ContentFormulaSchema, ContentGradientFillSchema, ContentGradientStyleSchema, ContentHatchFillSchema, ContentHatchStyleSchema, ContentImageBlockSchema, ContentImageOriginalSchema, ContentInterpretationSchema, ContentListMembershipSchema, ContentOriginSchema, ContentPageBreakSchema, ContentPageFurnitureSchema, ContentParagraphBordersSchema, ContentParagraphSchema, ContentPathPointSchema, ContentPathSegmentSchema, ContentRunSchema, ContentSectionSchema, ContentShapeSchema, ContentSheetCellCommentSchema, ContentSheetCellSchema, ContentSheetColumnSchema, ContentSheetConditionalFormatSchema, ContentSheetConditionalFormatStyleSchema, ContentSheetConditionalFormatValueSchema, ContentSheetDataValidationSchema, ContentSheetDataValidationTypeSchema, ContentSheetImageSchema, ContentSheetPrintRangeSchema, ContentSheetPrintSettingsSchema, ContentSheetRangeSchema, ContentSheetRepeatRangeSchema, ContentSheetRowSchema, ContentSheetSchema, ContentSlideSchema, ContentStrokeDashSchema, ContentStrokeSchema, ContentStrokeStyleSchema, ContentSubpathSchema, ContentTableCellSchema, ContentTableRowSchema, ContentTableSchema, ContentTranscriptSchema, ContentVectorSchema, DecimalStringSchema, IMAGE_FORMATS, RUN_FONT_PROPERTY_SHAPE, RunConstructExtentSchema, SheetRuleOperatorSchema, clampHeadingLevel, contentDocumentSharedFields, findConstructMarkerImbalance, findRunConstructFault, isContentBlock, isContentConstructEnd, isContentConstructStart, isRunConstructExtent, resolveCellFillColor, unrecognizedFillKind };
|
package/dist/decompose.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { D as ShapeGroupNode, I as SlideGroupNode, M as SheetGroupNode, b as SectionGroupNode, c as HeadingParagraph, i as DrawPageGroupNode, p as ListParagraph } from "./package-node-
|
|
1
|
+
import { C as ContentDocument, Et as ContentShape, Ot as ContentSheet, T as ContentDrawPage, W as ContentFormula, in as ContentSlide, mt as ContentParagraph, n as ConstructMarkerImbalance, wt as ContentSection } from "./content-SgKmas45.cjs";
|
|
2
|
+
import { D as ShapeGroupNode, I as SlideGroupNode, M as SheetGroupNode, b as SectionGroupNode, c as HeadingParagraph, i as DrawPageGroupNode, p as ListParagraph } from "./package-node-DnUyGT61.cjs";
|
|
3
3
|
//#region src/decompose.d.ts
|
|
4
4
|
declare function isHeadingParagraph(paragraph: ContentParagraph): paragraph is HeadingParagraph;
|
|
5
5
|
declare function isListParagraph(paragraph: ContentParagraph): paragraph is ListParagraph;
|
package/dist/decompose.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { D as ShapeGroupNode, I as SlideGroupNode, M as SheetGroupNode, b as SectionGroupNode, c as HeadingParagraph, i as DrawPageGroupNode, p as ListParagraph } from "./package-node-
|
|
1
|
+
import { C as ContentDocument, Et as ContentShape, Ot as ContentSheet, T as ContentDrawPage, W as ContentFormula, in as ContentSlide, mt as ContentParagraph, n as ConstructMarkerImbalance, wt as ContentSection } from "./content-DAc4O272.js";
|
|
2
|
+
import { D as ShapeGroupNode, I as SlideGroupNode, M as SheetGroupNode, b as SectionGroupNode, c as HeadingParagraph, i as DrawPageGroupNode, p as ListParagraph } from "./package-node-BnFUnaa0.js";
|
|
3
3
|
//#region src/decompose.d.ts
|
|
4
4
|
declare function isHeadingParagraph(paragraph: ContentParagraph): paragraph is HeadingParagraph;
|
|
5
5
|
declare function isListParagraph(paragraph: ContentParagraph): paragraph is ListParagraph;
|
package/dist/definitions.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { St as ContentRun, mt as ContentParagraph } from "./content-SgKmas45.cjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/definitions.d.ts
|
|
4
4
|
declare const StyleParagraphPropertiesSchema: z.ZodObject<{
|
package/dist/definitions.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { St as ContentRun, mt as ContentParagraph } from "./content-DAc4O272.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/definitions.d.ts
|
|
4
4
|
declare const StyleParagraphPropertiesSchema: z.ZodObject<{
|
package/dist/factor-styles.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { l as PageSize } from "./geometry-CvcjSwnA.cjs";
|
|
2
|
-
import {
|
|
2
|
+
import { C as ContentDocument } from "./content-SgKmas45.cjs";
|
|
3
3
|
import { DocumentTree } from "./package.cjs";
|
|
4
4
|
//#region src/factor-styles.d.ts
|
|
5
5
|
declare function assembleTree(content: ContentDocument, pages?: readonly PageSize[]): DocumentTree;
|
package/dist/factor-styles.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { l as PageSize } from "./geometry-CvcjSwnA.js";
|
|
2
|
-
import {
|
|
2
|
+
import { C as ContentDocument } from "./content-DAc4O272.js";
|
|
3
3
|
import { DocumentTree } from "./package.js";
|
|
4
4
|
//#region src/factor-styles.d.ts
|
|
5
5
|
declare function assembleTree(content: ContentDocument, pages?: readonly PageSize[]): DocumentTree;
|
package/dist/flatten.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as ContentDocument } from "./content-SgKmas45.cjs";
|
|
2
2
|
import { DocumentTree } from "./package.cjs";
|
|
3
3
|
//#region src/flatten.d.ts
|
|
4
4
|
declare function flattenTree(pkg: DocumentTree): ContentDocument;
|
package/dist/flatten.d.ts
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -28,6 +28,7 @@ exports.AnchorTypeSchema = require_construct.AnchorTypeSchema;
|
|
|
28
28
|
exports.BORDER_WIDTH_PT = require_border_weight.BORDER_WIDTH_PT;
|
|
29
29
|
exports.BoxSchema = require_geometry.BoxSchema;
|
|
30
30
|
exports.COLOR_BLACK = require_color.COLOR_BLACK;
|
|
31
|
+
exports.CONTENT_ANNOTATION_FIELDS = require_content.CONTENT_ANNOTATION_FIELDS;
|
|
31
32
|
exports.CONTENT_DEFS = require_content_json_schema_defs.CONTENT_DEFS;
|
|
32
33
|
exports.CONTENT_DOCUMENT_URI = require_content_json_schema_defs.CONTENT_DOCUMENT_URI;
|
|
33
34
|
exports.ColorSchema = require_color.ColorSchema;
|
|
@@ -63,7 +64,9 @@ exports.ContentHatchFillSchema = require_content.ContentHatchFillSchema;
|
|
|
63
64
|
exports.ContentHatchStyleSchema = require_content.ContentHatchStyleSchema;
|
|
64
65
|
exports.ContentImageBlockSchema = require_content.ContentImageBlockSchema;
|
|
65
66
|
exports.ContentImageOriginalSchema = require_content.ContentImageOriginalSchema;
|
|
67
|
+
exports.ContentInterpretationSchema = require_content.ContentInterpretationSchema;
|
|
66
68
|
exports.ContentListMembershipSchema = require_content.ContentListMembershipSchema;
|
|
69
|
+
exports.ContentOriginSchema = require_content.ContentOriginSchema;
|
|
67
70
|
exports.ContentPageBreakSchema = require_content.ContentPageBreakSchema;
|
|
68
71
|
exports.ContentPageFurnitureSchema = require_content.ContentPageFurnitureSchema;
|
|
69
72
|
exports.ContentParagraphBordersSchema = require_content.ContentParagraphBordersSchema;
|
|
@@ -96,6 +99,7 @@ exports.ContentSubpathSchema = require_content.ContentSubpathSchema;
|
|
|
96
99
|
exports.ContentTableCellSchema = require_content.ContentTableCellSchema;
|
|
97
100
|
exports.ContentTableRowSchema = require_content.ContentTableRowSchema;
|
|
98
101
|
exports.ContentTableSchema = require_content.ContentTableSchema;
|
|
102
|
+
exports.ContentTranscriptSchema = require_content.ContentTranscriptSchema;
|
|
99
103
|
exports.ContentVectorSchema = require_content.ContentVectorSchema;
|
|
100
104
|
exports.DEFAULT_LAYOUT_FONT = require_style.DEFAULT_LAYOUT_FONT;
|
|
101
105
|
exports.DecimalStringSchema = require_content.DecimalStringSchema;
|