document-schema 1.10.1 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/content.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { ColorSchema } from "./color.js";
2
2
  import { BoxSchema, MarginsSchema, PageSizeSchema } from "./geometry.js";
3
+ import { MathMlNodeSchema } from "./mathml.js";
3
4
  import { LayoutMetadataSchema } from "./metadata.js";
4
5
  import { AlignmentSchema } from "./style.js";
5
6
  import { z } from "zod";
@@ -80,11 +81,30 @@ function isContentBlock(value) {
80
81
  const ContentBlockSchema = z.custom(isContentBlock);
81
82
  const ContentEmbeddedObjectSchema = z.custom(isContentEmbeddedObject);
82
83
  const ContentEmbeddedObjectBlockSchema = z.custom(isContentEmbeddedObjectBlock);
84
+ const ContentStrokeStyleSchema = z.enum([
85
+ "solid",
86
+ "dashed",
87
+ "dotted",
88
+ "double"
89
+ ]);
90
+ const ContentBorderSchema = z.object({
91
+ color: ColorSchema,
92
+ widthPt: z.number().positive(),
93
+ style: ContentStrokeStyleSchema.optional()
94
+ });
95
+ const ContentCellBordersSchema = z.object({
96
+ left: ContentBorderSchema.optional(),
97
+ right: ContentBorderSchema.optional(),
98
+ top: ContentBorderSchema.optional(),
99
+ bottom: ContentBorderSchema.optional()
100
+ });
83
101
  const ContentTableCellSchema = z.object({
84
102
  blocks: z.array(ContentBlockSchema),
85
103
  colSpan: z.number().int().positive().optional(),
86
104
  rowSpan: z.number().int().positive().optional(),
87
- background: ColorSchema.optional()
105
+ background: ColorSchema.optional(),
106
+ borders: ContentCellBordersSchema.optional(),
107
+ sourcePath: z.string().optional()
88
108
  });
89
109
  const ContentTableRowSchema = z.object({
90
110
  cells: z.array(ContentTableCellSchema),
@@ -111,6 +131,7 @@ const ContentShapeSchema = z.object({
111
131
  insetBottomPt: z.number().nonnegative(),
112
132
  fontScale: z.number().positive().optional(),
113
133
  lineSpacingReduction: z.number().nonnegative().optional(),
134
+ paintOrder: z.number().optional(),
114
135
  sourcePath: z.string().optional(),
115
136
  blocks: z.array(ContentBlockSchema)
116
137
  });
@@ -119,19 +140,23 @@ const ContentSlideSchema = z.object({
119
140
  shapes: z.array(ContentShapeSchema),
120
141
  notes: z.string()
121
142
  });
143
+ const DecimalStringSchema = z.string().regex(/^-?(0|[1-9]\d*)(\.\d+)?$/);
122
144
  const ContentCellValueSchema = z.discriminatedUnion("kind", [
123
145
  z.object({
124
146
  kind: z.literal("number"),
125
- value: z.number()
147
+ value: z.number(),
148
+ exactValue: DecimalStringSchema.optional()
126
149
  }),
127
150
  z.object({
128
151
  kind: z.literal("percentage"),
129
- value: z.number()
152
+ value: z.number(),
153
+ exactValue: DecimalStringSchema.optional()
130
154
  }),
131
155
  z.object({
132
156
  kind: z.literal("currency"),
133
157
  value: z.number(),
134
- currency: z.string().optional()
158
+ currency: z.string().optional(),
159
+ exactValue: DecimalStringSchema.optional()
135
160
  }),
136
161
  z.object({
137
162
  kind: z.literal("boolean"),
@@ -145,6 +170,10 @@ const ContentCellValueSchema = z.discriminatedUnion("kind", [
145
170
  kind: z.literal("time"),
146
171
  value: z.string()
147
172
  }),
173
+ z.object({
174
+ kind: z.literal("dateTime"),
175
+ value: z.string()
176
+ }),
148
177
  z.object({
149
178
  kind: z.literal("string"),
150
179
  value: z.string()
@@ -163,16 +192,25 @@ const ContentSheetCellSchema = z.object({
163
192
  displayText: z.string(),
164
193
  runs: z.array(ContentRunSchema).optional(),
165
194
  colSpan: z.number().int().positive().optional(),
166
- rowSpan: z.number().int().positive().optional()
195
+ rowSpan: z.number().int().positive().optional(),
196
+ background: ColorSchema.optional(),
197
+ borders: ContentCellBordersSchema.optional(),
198
+ alignment: AlignmentSchema.optional(),
199
+ verticalAlignment: z.enum([
200
+ "top",
201
+ "middle",
202
+ "bottom"
203
+ ]).optional(),
204
+ sourcePath: z.string().optional()
167
205
  });
168
206
  const ContentSheetColumnSchema = z.object({
169
207
  index: z.number().int().nonnegative(),
170
- widthPt: z.number().nonnegative(),
208
+ widthPt: z.number().positive().optional(),
171
209
  hidden: z.boolean().optional()
172
210
  });
173
211
  const ContentSheetRowSchema = z.object({
174
212
  index: z.number().int().nonnegative(),
175
- heightPt: z.number().nonnegative(),
213
+ heightPt: z.number().positive().optional(),
176
214
  hidden: z.boolean().optional()
177
215
  });
178
216
  const ContentSheetPrintRangeSchema = z.object({
@@ -189,7 +227,7 @@ const ContentSheetPrintSettingsSchema = z.object({
189
227
  pageSize: PageSizeSchema,
190
228
  margins: MarginsSchema,
191
229
  printRange: ContentSheetPrintRangeSchema.optional(),
192
- scale: z.number().positive().optional(),
230
+ scalePercent: z.number().positive().optional(),
193
231
  fitToPages: z.object({
194
232
  width: z.number().int().positive(),
195
233
  height: z.number().int().positive()
@@ -221,7 +259,8 @@ const ContentSheetSchema = z.object({
221
259
  });
222
260
  const ContentStrokeSchema = z.object({
223
261
  color: ColorSchema,
224
- widthPt: z.number().positive()
262
+ widthPt: z.number().positive(),
263
+ style: ContentStrokeStyleSchema.optional()
225
264
  });
226
265
  const ContentPathPointSchema = z.object({
227
266
  xPt: z.number(),
@@ -245,15 +284,19 @@ const ContentVectorSchema = z.discriminatedUnion("kind", [
245
284
  z.object({
246
285
  kind: z.literal("rect"),
247
286
  frame: BoxSchema,
287
+ rotationDeg: z.number().optional(),
248
288
  fill: ColorSchema.optional(),
249
289
  stroke: ContentStrokeSchema.optional(),
290
+ paintOrder: z.number().optional(),
250
291
  sourcePath: z.string().optional()
251
292
  }),
252
293
  z.object({
253
294
  kind: z.literal("ellipse"),
254
295
  frame: BoxSchema,
296
+ rotationDeg: z.number().optional(),
255
297
  fill: ColorSchema.optional(),
256
298
  stroke: ContentStrokeSchema.optional(),
299
+ paintOrder: z.number().optional(),
257
300
  sourcePath: z.string().optional()
258
301
  }),
259
302
  z.object({
@@ -261,15 +304,18 @@ const ContentVectorSchema = z.discriminatedUnion("kind", [
261
304
  from: ContentPathPointSchema,
262
305
  to: ContentPathPointSchema,
263
306
  stroke: ContentStrokeSchema,
307
+ paintOrder: z.number().optional(),
264
308
  sourcePath: z.string().optional()
265
309
  }),
266
310
  z.object({
267
311
  kind: z.literal("path"),
268
312
  frame: BoxSchema,
313
+ rotationDeg: z.number().optional(),
269
314
  subpaths: z.array(ContentSubpathSchema),
270
315
  fill: ColorSchema.optional(),
271
316
  fillRule: z.enum(["nonzero", "evenodd"]).optional(),
272
317
  stroke: ContentStrokeSchema.optional(),
318
+ paintOrder: z.number().optional(),
273
319
  sourcePath: z.string().optional()
274
320
  })
275
321
  ]);
@@ -278,32 +324,42 @@ const ContentDrawPageSchema = z.object({
278
324
  shapes: z.array(ContentShapeSchema),
279
325
  vectors: z.array(ContentVectorSchema)
280
326
  });
281
- const CONTENT_FORMAT_VERSION = 1;
327
+ const ContentFormulaSchema = z.object({
328
+ mathml: z.array(MathMlNodeSchema),
329
+ starMath: z.string().optional()
330
+ });
331
+ const CONTENT_FORMAT_VERSION = 2;
282
332
  const ContentDocumentSchema = z.discriminatedUnion("kind", [
283
333
  z.object({
284
334
  kind: z.literal("wordprocessing"),
285
- formatVersion: z.literal(1),
335
+ formatVersion: z.literal(2),
286
336
  metadata: LayoutMetadataSchema,
287
337
  sections: z.array(ContentSectionSchema)
288
338
  }),
289
339
  z.object({
290
340
  kind: z.literal("presentation"),
291
- formatVersion: z.literal(1),
341
+ formatVersion: z.literal(2),
292
342
  metadata: LayoutMetadataSchema,
293
343
  slides: z.array(ContentSlideSchema)
294
344
  }),
295
345
  z.object({
296
346
  kind: z.literal("spreadsheet"),
297
- formatVersion: z.literal(1),
347
+ formatVersion: z.literal(2),
298
348
  metadata: LayoutMetadataSchema,
299
349
  sheets: z.array(ContentSheetSchema)
300
350
  }),
301
351
  z.object({
302
352
  kind: z.literal("drawing"),
303
- formatVersion: z.literal(1),
353
+ formatVersion: z.literal(2),
304
354
  metadata: LayoutMetadataSchema,
305
355
  pages: z.array(ContentDrawPageSchema)
356
+ }),
357
+ z.object({
358
+ kind: z.literal("formula"),
359
+ formatVersion: z.literal(2),
360
+ metadata: LayoutMetadataSchema,
361
+ formula: ContentFormulaSchema
306
362
  })
307
363
  ]);
308
364
  //#endregion
309
- export { CONTENT_FORMAT_VERSION, ContentBlockSchema, ContentCellValueSchema, ContentDocumentSchema, ContentDrawPageSchema, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectSchema, ContentImageBlockSchema, ContentListMembershipSchema, ContentPageBreakSchema, ContentParagraphSchema, ContentPathPointSchema, ContentPathSegmentSchema, ContentRunSchema, ContentSectionSchema, ContentShapeSchema, ContentSheetCellSchema, ContentSheetColumnSchema, ContentSheetImageSchema, ContentSheetPrintRangeSchema, ContentSheetPrintSettingsSchema, ContentSheetRepeatRangeSchema, ContentSheetRowSchema, ContentSheetSchema, ContentSlideSchema, ContentStrokeSchema, ContentSubpathSchema, ContentTableCellSchema, ContentTableRowSchema, ContentTableSchema, ContentVectorSchema, isContentBlock };
365
+ export { CONTENT_FORMAT_VERSION, ContentBlockSchema, ContentBorderSchema, ContentCellBordersSchema, ContentCellValueSchema, ContentDocumentSchema, ContentDrawPageSchema, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectSchema, ContentFormulaSchema, ContentImageBlockSchema, ContentListMembershipSchema, ContentPageBreakSchema, ContentParagraphSchema, ContentPathPointSchema, ContentPathSegmentSchema, ContentRunSchema, ContentSectionSchema, ContentShapeSchema, ContentSheetCellSchema, ContentSheetColumnSchema, ContentSheetImageSchema, ContentSheetPrintRangeSchema, ContentSheetPrintSettingsSchema, ContentSheetRepeatRangeSchema, ContentSheetRowSchema, ContentSheetSchema, ContentSlideSchema, ContentStrokeSchema, ContentStrokeStyleSchema, ContentSubpathSchema, ContentTableCellSchema, ContentTableRowSchema, ContentTableSchema, ContentVectorSchema, DecimalStringSchema, isContentBlock };
package/dist/index.cjs CHANGED
@@ -1,23 +1,30 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_color = require("./color.cjs");
3
3
  const require_geometry = require("./geometry.cjs");
4
+ const require_mathml = require("./mathml.cjs");
4
5
  const require_metadata = require("./metadata.cjs");
5
6
  const require_style = require("./style.cjs");
6
7
  const require_content = require("./content.cjs");
7
8
  const require_layout = require("./layout.cjs");
8
9
  const require_package = require("./package.cjs");
9
10
  const require_schema_io = require("./schema-io.cjs");
11
+ const require_content_json_schema_defs = require("./content-json-schema-defs.cjs");
10
12
  exports.AlignmentSchema = require_style.AlignmentSchema;
11
13
  exports.BoxSchema = require_geometry.BoxSchema;
12
14
  exports.COLOR_BLACK = require_color.COLOR_BLACK;
15
+ exports.CONTENT_DEFS = require_content_json_schema_defs.CONTENT_DEFS;
16
+ exports.CONTENT_DOCUMENT_URI = require_content_json_schema_defs.CONTENT_DOCUMENT_URI;
13
17
  exports.CONTENT_FORMAT_VERSION = require_content.CONTENT_FORMAT_VERSION;
14
18
  exports.ColorSchema = require_color.ColorSchema;
15
19
  exports.ContentBlockSchema = require_content.ContentBlockSchema;
20
+ exports.ContentBorderSchema = require_content.ContentBorderSchema;
21
+ exports.ContentCellBordersSchema = require_content.ContentCellBordersSchema;
16
22
  exports.ContentCellValueSchema = require_content.ContentCellValueSchema;
17
23
  exports.ContentDocumentSchema = require_content.ContentDocumentSchema;
18
24
  exports.ContentDrawPageSchema = require_content.ContentDrawPageSchema;
19
25
  exports.ContentEmbeddedObjectBlockSchema = require_content.ContentEmbeddedObjectBlockSchema;
20
26
  exports.ContentEmbeddedObjectSchema = require_content.ContentEmbeddedObjectSchema;
27
+ exports.ContentFormulaSchema = require_content.ContentFormulaSchema;
21
28
  exports.ContentImageBlockSchema = require_content.ContentImageBlockSchema;
22
29
  exports.ContentListMembershipSchema = require_content.ContentListMembershipSchema;
23
30
  exports.ContentPageBreakSchema = require_content.ContentPageBreakSchema;
@@ -37,6 +44,7 @@ exports.ContentSheetRowSchema = require_content.ContentSheetRowSchema;
37
44
  exports.ContentSheetSchema = require_content.ContentSheetSchema;
38
45
  exports.ContentSlideSchema = require_content.ContentSlideSchema;
39
46
  exports.ContentStrokeSchema = require_content.ContentStrokeSchema;
47
+ exports.ContentStrokeStyleSchema = require_content.ContentStrokeStyleSchema;
40
48
  exports.ContentSubpathSchema = require_content.ContentSubpathSchema;
41
49
  exports.ContentTableCellSchema = require_content.ContentTableCellSchema;
42
50
  exports.ContentTableRowSchema = require_content.ContentTableRowSchema;
@@ -44,7 +52,9 @@ exports.ContentTableSchema = require_content.ContentTableSchema;
44
52
  exports.ContentVectorSchema = require_content.ContentVectorSchema;
45
53
  exports.DEFAULT_LAYOUT_FONT = require_style.DEFAULT_LAYOUT_FONT;
46
54
  exports.DOCUMENT_PACKAGE_FORMAT_VERSION = require_package.DOCUMENT_PACKAGE_FORMAT_VERSION;
55
+ exports.DecimalStringSchema = require_content.DecimalStringSchema;
47
56
  exports.DocumentPackageSchema = require_package.DocumentPackageSchema;
57
+ exports.EMBEDDED_OBJECT_KINDS = require_content_json_schema_defs.EMBEDDED_OBJECT_KINDS;
48
58
  exports.LAYOUT_FORMAT_VERSION = require_layout.LAYOUT_FORMAT_VERSION;
49
59
  exports.LayoutDocumentSchema = require_layout.LayoutDocumentSchema;
50
60
  exports.LayoutEllipseSchema = require_layout.LayoutEllipseSchema;
@@ -61,7 +71,16 @@ exports.LayoutPathSegmentSchema = require_layout.LayoutPathSegmentSchema;
61
71
  exports.LayoutRectSchema = require_layout.LayoutRectSchema;
62
72
  exports.LayoutSubpathSchema = require_layout.LayoutSubpathSchema;
63
73
  exports.LayoutTextSchema = require_layout.LayoutTextSchema;
74
+ exports.MAX_SAFE_INTEGER = require_content_json_schema_defs.MAX_SAFE_INTEGER;
64
75
  exports.MarginsSchema = require_geometry.MarginsSchema;
76
+ exports.MathMlAttributeSchema = require_mathml.MathMlAttributeSchema;
77
+ exports.MathMlCdataSchema = require_mathml.MathMlCdataSchema;
78
+ exports.MathMlCommentSchema = require_mathml.MathMlCommentSchema;
79
+ exports.MathMlDeclarationSchema = require_mathml.MathMlDeclarationSchema;
80
+ exports.MathMlElementSchema = require_mathml.MathMlElementSchema;
81
+ exports.MathMlNodeSchema = require_mathml.MathMlNodeSchema;
82
+ exports.MathMlPiSchema = require_mathml.MathMlPiSchema;
83
+ exports.MathMlTextSchema = require_mathml.MathMlTextSchema;
65
84
  exports.PAGE_SIZE_A4 = require_geometry.PAGE_SIZE_A4;
66
85
  exports.PAGE_SIZE_LETTER = require_geometry.PAGE_SIZE_LETTER;
67
86
  exports.PageSizeSchema = require_geometry.PageSizeSchema;
@@ -75,6 +94,7 @@ exports.documentFromJson = require_schema_io.documentFromJson;
75
94
  exports.documentPackageWithSchema = require_schema_io.documentPackageWithSchema;
76
95
  exports.documentSchemaKindOf = require_schema_io.documentSchemaKindOf;
77
96
  exports.isContentBlock = require_content.isContentBlock;
97
+ exports.isMathMlNode = require_mathml.isMathMlNode;
78
98
  exports.layoutDocumentWithSchema = require_schema_io.layoutDocumentWithSchema;
79
99
  exports.rgbHexToColor = require_color.rgbHexToColor;
80
100
  exports.schemaUriFor = require_schema_io.schemaUriFor;
package/dist/index.d.cts CHANGED
@@ -1,9 +1,11 @@
1
1
  import { a as rgbHexToColor, i as colorToRgbHex, n as Color, r as ColorSchema, t as COLOR_BLACK } from "./color-AELCDH_b.cjs";
2
+ import { CONTENT_DEFS, CONTENT_DOCUMENT_URI, EMBEDDED_OBJECT_KINDS, MAX_SAFE_INTEGER } from "./content-json-schema-defs.cjs";
3
+ import { _ as isMathMlNode, a as MathMlComment, c as MathMlDeclarationSchema, d as MathMlNode, f as MathMlNodeSchema, g as MathMlTextSchema, h as MathMlText, i as MathMlCdataSchema, l as MathMlElement, m as MathMlPiSchema, n as MathMlAttributeSchema, o as MathMlCommentSchema, p as MathMlPi, r as MathMlCdata, s as MathMlDeclaration, t as MathMlAttribute, u as MathMlElementSchema } from "./mathml-B1oTCtzc.cjs";
2
4
  import { a as PAGE_SIZE_A4, c as PageSizeSchema, i as MarginsSchema, l as SLIDE_SIZE_STANDARD, n as BoxSchema, o as PAGE_SIZE_LETTER, r as Margins, s as PageSize, t as Box, u as SLIDE_SIZE_WIDESCREEN } from "./geometry-CokwQGtJ.cjs";
3
- import { CONTENT_FORMAT_VERSION, ContentBlock, ContentBlockSchema, ContentCellValue, ContentCellValueSchema, ContentDocument, ContentDocumentSchema, ContentDrawPage, ContentDrawPageSchema, ContentEmbeddedObject, ContentEmbeddedObjectBlock, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectKind, ContentEmbeddedObjectSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembershipSchema, ContentPageBreak, ContentPageBreakSchema, ContentParagraph, ContentParagraphSchema, ContentPathPoint, ContentPathPointSchema, ContentPathSegment, ContentPathSegmentSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage, ContentSheetImageSchema, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStroke, ContentStrokeSchema, ContentSubpath, ContentSubpathSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, ContentVector, ContentVectorSchema, isContentBlock } from "./content.cjs";
5
+ import { CONTENT_FORMAT_VERSION, ContentBlock, ContentBlockSchema, ContentBorder, ContentBorderSchema, ContentCellBorders, ContentCellBordersSchema, ContentCellValue, ContentCellValueSchema, ContentDocument, ContentDocumentSchema, ContentDrawPage, ContentDrawPageSchema, ContentEmbeddedObject, ContentEmbeddedObjectBlock, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectKind, ContentEmbeddedObjectSchema, ContentFormula, ContentFormulaSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembershipSchema, ContentPageBreak, ContentPageBreakSchema, ContentParagraph, ContentParagraphSchema, ContentPathPoint, ContentPathPointSchema, ContentPathSegment, ContentPathSegmentSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage, ContentSheetImageSchema, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStroke, ContentStrokeSchema, ContentStrokeStyle, ContentStrokeStyleSchema, ContentSubpath, ContentSubpathSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, ContentVector, ContentVectorSchema, DecimalString, DecimalStringSchema, isContentBlock } from "./content.cjs";
4
6
  import { Alignment, AlignmentSchema, DEFAULT_LAYOUT_FONT, LayoutFont, LayoutFontSchema } from "./style.cjs";
5
7
  import { LayoutMetadata, LayoutMetadataSchema } from "./metadata.cjs";
6
8
  import { LAYOUT_FORMAT_VERSION, LayoutDocument, LayoutDocumentSchema, LayoutEllipse, LayoutEllipseSchema, LayoutImage, LayoutImageAsset, LayoutImageAssetSchema, LayoutImageSchema, LayoutItem, LayoutItemSchema, LayoutLine, LayoutLineSchema, LayoutLink, LayoutLinkSchema, LayoutPage, LayoutPageSchema, LayoutPath, LayoutPathSchema, LayoutPathSegment, LayoutPathSegmentSchema, LayoutRect, LayoutRectSchema, LayoutSubpath, LayoutSubpathSchema, LayoutText, LayoutTextSchema } from "./layout.cjs";
7
9
  import { DOCUMENT_PACKAGE_FORMAT_VERSION, DocumentPackage, DocumentPackageSchema } from "./package.cjs";
8
10
  import { ContentDocumentJson, DocumentJsonResult, DocumentPackageJson, DocumentSchemaKind, LayoutDocumentJson, SCHEMA_FILE_NAMES, UnrecognizedDocumentSchemaError, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, layoutDocumentWithSchema, schemaUriFor } from "./schema-io.cjs";
9
- export { Alignment, AlignmentSchema, Box, BoxSchema, COLOR_BLACK, CONTENT_FORMAT_VERSION, Color, ColorSchema, ContentBlock, ContentBlockSchema, ContentCellValue, ContentCellValueSchema, ContentDocument, ContentDocumentJson, ContentDocumentSchema, ContentDrawPage, ContentDrawPageSchema, ContentEmbeddedObject, ContentEmbeddedObjectBlock, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectKind, ContentEmbeddedObjectSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembershipSchema, ContentPageBreak, ContentPageBreakSchema, ContentParagraph, ContentParagraphSchema, ContentPathPoint, ContentPathPointSchema, ContentPathSegment, ContentPathSegmentSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage, ContentSheetImageSchema, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStroke, ContentStrokeSchema, ContentSubpath, ContentSubpathSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, ContentVector, ContentVectorSchema, DEFAULT_LAYOUT_FONT, DOCUMENT_PACKAGE_FORMAT_VERSION, DocumentJsonResult, DocumentPackage, DocumentPackageJson, DocumentPackageSchema, DocumentSchemaKind, LAYOUT_FORMAT_VERSION, LayoutDocument, LayoutDocumentJson, LayoutDocumentSchema, LayoutEllipse, LayoutEllipseSchema, LayoutFont, LayoutFontSchema, LayoutImage, LayoutImageAsset, LayoutImageAssetSchema, LayoutImageSchema, LayoutItem, LayoutItemSchema, LayoutLine, LayoutLineSchema, LayoutLink, LayoutLinkSchema, LayoutMetadata, LayoutMetadataSchema, LayoutPage, LayoutPageSchema, LayoutPath, LayoutPathSchema, LayoutPathSegment, LayoutPathSegmentSchema, LayoutRect, LayoutRectSchema, LayoutSubpath, LayoutSubpathSchema, LayoutText, LayoutTextSchema, Margins, MarginsSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSize, PageSizeSchema, SCHEMA_FILE_NAMES, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, UnrecognizedDocumentSchemaError, colorToRgbHex, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, isContentBlock, layoutDocumentWithSchema, rgbHexToColor, schemaUriFor };
11
+ export { Alignment, AlignmentSchema, Box, BoxSchema, COLOR_BLACK, CONTENT_DEFS, CONTENT_DOCUMENT_URI, CONTENT_FORMAT_VERSION, Color, ColorSchema, ContentBlock, ContentBlockSchema, ContentBorder, ContentBorderSchema, ContentCellBorders, ContentCellBordersSchema, ContentCellValue, ContentCellValueSchema, ContentDocument, ContentDocumentJson, ContentDocumentSchema, ContentDrawPage, ContentDrawPageSchema, ContentEmbeddedObject, ContentEmbeddedObjectBlock, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectKind, ContentEmbeddedObjectSchema, ContentFormula, ContentFormulaSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembershipSchema, ContentPageBreak, ContentPageBreakSchema, ContentParagraph, ContentParagraphSchema, ContentPathPoint, ContentPathPointSchema, ContentPathSegment, ContentPathSegmentSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage, ContentSheetImageSchema, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStroke, ContentStrokeSchema, ContentStrokeStyle, ContentStrokeStyleSchema, ContentSubpath, ContentSubpathSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, ContentVector, ContentVectorSchema, DEFAULT_LAYOUT_FONT, DOCUMENT_PACKAGE_FORMAT_VERSION, DecimalString, DecimalStringSchema, DocumentJsonResult, DocumentPackage, DocumentPackageJson, DocumentPackageSchema, DocumentSchemaKind, EMBEDDED_OBJECT_KINDS, LAYOUT_FORMAT_VERSION, LayoutDocument, LayoutDocumentJson, LayoutDocumentSchema, LayoutEllipse, LayoutEllipseSchema, LayoutFont, LayoutFontSchema, LayoutImage, LayoutImageAsset, LayoutImageAssetSchema, LayoutImageSchema, LayoutItem, LayoutItemSchema, LayoutLine, LayoutLineSchema, LayoutLink, LayoutLinkSchema, LayoutMetadata, LayoutMetadataSchema, LayoutPage, LayoutPageSchema, LayoutPath, LayoutPathSchema, LayoutPathSegment, LayoutPathSegmentSchema, LayoutRect, LayoutRectSchema, LayoutSubpath, LayoutSubpathSchema, LayoutText, LayoutTextSchema, MAX_SAFE_INTEGER, Margins, MarginsSchema, MathMlAttribute, MathMlAttributeSchema, MathMlCdata, MathMlCdataSchema, MathMlComment, MathMlCommentSchema, MathMlDeclaration, MathMlDeclarationSchema, MathMlElement, MathMlElementSchema, MathMlNode, MathMlNodeSchema, MathMlPi, MathMlPiSchema, MathMlText, MathMlTextSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSize, PageSizeSchema, SCHEMA_FILE_NAMES, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, UnrecognizedDocumentSchemaError, colorToRgbHex, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, isContentBlock, isMathMlNode, layoutDocumentWithSchema, rgbHexToColor, schemaUriFor };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,11 @@
1
1
  import { a as rgbHexToColor, i as colorToRgbHex, n as Color, r as ColorSchema, t as COLOR_BLACK } from "./color-AELCDH_b.js";
2
+ import { CONTENT_DEFS, CONTENT_DOCUMENT_URI, EMBEDDED_OBJECT_KINDS, MAX_SAFE_INTEGER } from "./content-json-schema-defs.js";
3
+ import { _ as isMathMlNode, a as MathMlComment, c as MathMlDeclarationSchema, d as MathMlNode, f as MathMlNodeSchema, g as MathMlTextSchema, h as MathMlText, i as MathMlCdataSchema, l as MathMlElement, m as MathMlPiSchema, n as MathMlAttributeSchema, o as MathMlCommentSchema, p as MathMlPi, r as MathMlCdata, s as MathMlDeclaration, t as MathMlAttribute, u as MathMlElementSchema } from "./mathml-B1oTCtzc.js";
2
4
  import { a as PAGE_SIZE_A4, c as PageSizeSchema, i as MarginsSchema, l as SLIDE_SIZE_STANDARD, n as BoxSchema, o as PAGE_SIZE_LETTER, r as Margins, s as PageSize, t as Box, u as SLIDE_SIZE_WIDESCREEN } from "./geometry-CokwQGtJ.js";
3
- import { CONTENT_FORMAT_VERSION, ContentBlock, ContentBlockSchema, ContentCellValue, ContentCellValueSchema, ContentDocument, ContentDocumentSchema, ContentDrawPage, ContentDrawPageSchema, ContentEmbeddedObject, ContentEmbeddedObjectBlock, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectKind, ContentEmbeddedObjectSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembershipSchema, ContentPageBreak, ContentPageBreakSchema, ContentParagraph, ContentParagraphSchema, ContentPathPoint, ContentPathPointSchema, ContentPathSegment, ContentPathSegmentSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage, ContentSheetImageSchema, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStroke, ContentStrokeSchema, ContentSubpath, ContentSubpathSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, ContentVector, ContentVectorSchema, isContentBlock } from "./content.js";
5
+ import { CONTENT_FORMAT_VERSION, ContentBlock, ContentBlockSchema, ContentBorder, ContentBorderSchema, ContentCellBorders, ContentCellBordersSchema, ContentCellValue, ContentCellValueSchema, ContentDocument, ContentDocumentSchema, ContentDrawPage, ContentDrawPageSchema, ContentEmbeddedObject, ContentEmbeddedObjectBlock, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectKind, ContentEmbeddedObjectSchema, ContentFormula, ContentFormulaSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembershipSchema, ContentPageBreak, ContentPageBreakSchema, ContentParagraph, ContentParagraphSchema, ContentPathPoint, ContentPathPointSchema, ContentPathSegment, ContentPathSegmentSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage, ContentSheetImageSchema, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStroke, ContentStrokeSchema, ContentStrokeStyle, ContentStrokeStyleSchema, ContentSubpath, ContentSubpathSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, ContentVector, ContentVectorSchema, DecimalString, DecimalStringSchema, isContentBlock } from "./content.js";
4
6
  import { Alignment, AlignmentSchema, DEFAULT_LAYOUT_FONT, LayoutFont, LayoutFontSchema } from "./style.js";
5
7
  import { LayoutMetadata, LayoutMetadataSchema } from "./metadata.js";
6
8
  import { LAYOUT_FORMAT_VERSION, LayoutDocument, LayoutDocumentSchema, LayoutEllipse, LayoutEllipseSchema, LayoutImage, LayoutImageAsset, LayoutImageAssetSchema, LayoutImageSchema, LayoutItem, LayoutItemSchema, LayoutLine, LayoutLineSchema, LayoutLink, LayoutLinkSchema, LayoutPage, LayoutPageSchema, LayoutPath, LayoutPathSchema, LayoutPathSegment, LayoutPathSegmentSchema, LayoutRect, LayoutRectSchema, LayoutSubpath, LayoutSubpathSchema, LayoutText, LayoutTextSchema } from "./layout.js";
7
9
  import { DOCUMENT_PACKAGE_FORMAT_VERSION, DocumentPackage, DocumentPackageSchema } from "./package.js";
8
10
  import { ContentDocumentJson, DocumentJsonResult, DocumentPackageJson, DocumentSchemaKind, LayoutDocumentJson, SCHEMA_FILE_NAMES, UnrecognizedDocumentSchemaError, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, layoutDocumentWithSchema, schemaUriFor } from "./schema-io.js";
9
- export { Alignment, AlignmentSchema, Box, BoxSchema, COLOR_BLACK, CONTENT_FORMAT_VERSION, Color, ColorSchema, ContentBlock, ContentBlockSchema, ContentCellValue, ContentCellValueSchema, ContentDocument, ContentDocumentJson, ContentDocumentSchema, ContentDrawPage, ContentDrawPageSchema, ContentEmbeddedObject, ContentEmbeddedObjectBlock, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectKind, ContentEmbeddedObjectSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembershipSchema, ContentPageBreak, ContentPageBreakSchema, ContentParagraph, ContentParagraphSchema, ContentPathPoint, ContentPathPointSchema, ContentPathSegment, ContentPathSegmentSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage, ContentSheetImageSchema, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStroke, ContentStrokeSchema, ContentSubpath, ContentSubpathSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, ContentVector, ContentVectorSchema, DEFAULT_LAYOUT_FONT, DOCUMENT_PACKAGE_FORMAT_VERSION, DocumentJsonResult, DocumentPackage, DocumentPackageJson, DocumentPackageSchema, DocumentSchemaKind, LAYOUT_FORMAT_VERSION, LayoutDocument, LayoutDocumentJson, LayoutDocumentSchema, LayoutEllipse, LayoutEllipseSchema, LayoutFont, LayoutFontSchema, LayoutImage, LayoutImageAsset, LayoutImageAssetSchema, LayoutImageSchema, LayoutItem, LayoutItemSchema, LayoutLine, LayoutLineSchema, LayoutLink, LayoutLinkSchema, LayoutMetadata, LayoutMetadataSchema, LayoutPage, LayoutPageSchema, LayoutPath, LayoutPathSchema, LayoutPathSegment, LayoutPathSegmentSchema, LayoutRect, LayoutRectSchema, LayoutSubpath, LayoutSubpathSchema, LayoutText, LayoutTextSchema, Margins, MarginsSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSize, PageSizeSchema, SCHEMA_FILE_NAMES, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, UnrecognizedDocumentSchemaError, colorToRgbHex, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, isContentBlock, layoutDocumentWithSchema, rgbHexToColor, schemaUriFor };
11
+ export { Alignment, AlignmentSchema, Box, BoxSchema, COLOR_BLACK, CONTENT_DEFS, CONTENT_DOCUMENT_URI, CONTENT_FORMAT_VERSION, Color, ColorSchema, ContentBlock, ContentBlockSchema, ContentBorder, ContentBorderSchema, ContentCellBorders, ContentCellBordersSchema, ContentCellValue, ContentCellValueSchema, ContentDocument, ContentDocumentJson, ContentDocumentSchema, ContentDrawPage, ContentDrawPageSchema, ContentEmbeddedObject, ContentEmbeddedObjectBlock, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectKind, ContentEmbeddedObjectSchema, ContentFormula, ContentFormulaSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembershipSchema, ContentPageBreak, ContentPageBreakSchema, ContentParagraph, ContentParagraphSchema, ContentPathPoint, ContentPathPointSchema, ContentPathSegment, ContentPathSegmentSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage, ContentSheetImageSchema, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStroke, ContentStrokeSchema, ContentStrokeStyle, ContentStrokeStyleSchema, ContentSubpath, ContentSubpathSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, ContentVector, ContentVectorSchema, DEFAULT_LAYOUT_FONT, DOCUMENT_PACKAGE_FORMAT_VERSION, DecimalString, DecimalStringSchema, DocumentJsonResult, DocumentPackage, DocumentPackageJson, DocumentPackageSchema, DocumentSchemaKind, EMBEDDED_OBJECT_KINDS, LAYOUT_FORMAT_VERSION, LayoutDocument, LayoutDocumentJson, LayoutDocumentSchema, LayoutEllipse, LayoutEllipseSchema, LayoutFont, LayoutFontSchema, LayoutImage, LayoutImageAsset, LayoutImageAssetSchema, LayoutImageSchema, LayoutItem, LayoutItemSchema, LayoutLine, LayoutLineSchema, LayoutLink, LayoutLinkSchema, LayoutMetadata, LayoutMetadataSchema, LayoutPage, LayoutPageSchema, LayoutPath, LayoutPathSchema, LayoutPathSegment, LayoutPathSegmentSchema, LayoutRect, LayoutRectSchema, LayoutSubpath, LayoutSubpathSchema, LayoutText, LayoutTextSchema, MAX_SAFE_INTEGER, Margins, MarginsSchema, MathMlAttribute, MathMlAttributeSchema, MathMlCdata, MathMlCdataSchema, MathMlComment, MathMlCommentSchema, MathMlDeclaration, MathMlDeclarationSchema, MathMlElement, MathMlElementSchema, MathMlNode, MathMlNodeSchema, MathMlPi, MathMlPiSchema, MathMlText, MathMlTextSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSize, PageSizeSchema, SCHEMA_FILE_NAMES, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, UnrecognizedDocumentSchemaError, colorToRgbHex, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, isContentBlock, isMathMlNode, layoutDocumentWithSchema, rgbHexToColor, schemaUriFor };
package/dist/index.js CHANGED
@@ -1,9 +1,11 @@
1
1
  import { COLOR_BLACK, ColorSchema, colorToRgbHex, rgbHexToColor } from "./color.js";
2
2
  import { BoxSchema, MarginsSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSizeSchema, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN } from "./geometry.js";
3
+ import { MathMlAttributeSchema, MathMlCdataSchema, MathMlCommentSchema, MathMlDeclarationSchema, MathMlElementSchema, MathMlNodeSchema, MathMlPiSchema, MathMlTextSchema, isMathMlNode } from "./mathml.js";
3
4
  import { LayoutMetadataSchema } from "./metadata.js";
4
5
  import { AlignmentSchema, DEFAULT_LAYOUT_FONT, LayoutFontSchema } from "./style.js";
5
- import { CONTENT_FORMAT_VERSION, ContentBlockSchema, ContentCellValueSchema, ContentDocumentSchema, ContentDrawPageSchema, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectSchema, ContentImageBlockSchema, ContentListMembershipSchema, ContentPageBreakSchema, ContentParagraphSchema, ContentPathPointSchema, ContentPathSegmentSchema, ContentRunSchema, ContentSectionSchema, ContentShapeSchema, ContentSheetCellSchema, ContentSheetColumnSchema, ContentSheetImageSchema, ContentSheetPrintRangeSchema, ContentSheetPrintSettingsSchema, ContentSheetRepeatRangeSchema, ContentSheetRowSchema, ContentSheetSchema, ContentSlideSchema, ContentStrokeSchema, ContentSubpathSchema, ContentTableCellSchema, ContentTableRowSchema, ContentTableSchema, ContentVectorSchema, isContentBlock } from "./content.js";
6
+ import { CONTENT_FORMAT_VERSION, ContentBlockSchema, ContentBorderSchema, ContentCellBordersSchema, ContentCellValueSchema, ContentDocumentSchema, ContentDrawPageSchema, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectSchema, ContentFormulaSchema, ContentImageBlockSchema, ContentListMembershipSchema, ContentPageBreakSchema, ContentParagraphSchema, ContentPathPointSchema, ContentPathSegmentSchema, ContentRunSchema, ContentSectionSchema, ContentShapeSchema, ContentSheetCellSchema, ContentSheetColumnSchema, ContentSheetImageSchema, ContentSheetPrintRangeSchema, ContentSheetPrintSettingsSchema, ContentSheetRepeatRangeSchema, ContentSheetRowSchema, ContentSheetSchema, ContentSlideSchema, ContentStrokeSchema, ContentStrokeStyleSchema, ContentSubpathSchema, ContentTableCellSchema, ContentTableRowSchema, ContentTableSchema, ContentVectorSchema, DecimalStringSchema, isContentBlock } from "./content.js";
6
7
  import { LAYOUT_FORMAT_VERSION, LayoutDocumentSchema, LayoutEllipseSchema, LayoutImageAssetSchema, LayoutImageSchema, LayoutItemSchema, LayoutLineSchema, LayoutLinkSchema, LayoutPageSchema, LayoutPathSchema, LayoutPathSegmentSchema, LayoutRectSchema, LayoutSubpathSchema, LayoutTextSchema } from "./layout.js";
7
8
  import { DOCUMENT_PACKAGE_FORMAT_VERSION, DocumentPackageSchema } from "./package.js";
8
9
  import { SCHEMA_FILE_NAMES, UnrecognizedDocumentSchemaError, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, layoutDocumentWithSchema, schemaUriFor } from "./schema-io.js";
9
- export { AlignmentSchema, BoxSchema, COLOR_BLACK, CONTENT_FORMAT_VERSION, ColorSchema, ContentBlockSchema, ContentCellValueSchema, ContentDocumentSchema, ContentDrawPageSchema, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectSchema, ContentImageBlockSchema, ContentListMembershipSchema, ContentPageBreakSchema, ContentParagraphSchema, ContentPathPointSchema, ContentPathSegmentSchema, ContentRunSchema, ContentSectionSchema, ContentShapeSchema, ContentSheetCellSchema, ContentSheetColumnSchema, ContentSheetImageSchema, ContentSheetPrintRangeSchema, ContentSheetPrintSettingsSchema, ContentSheetRepeatRangeSchema, ContentSheetRowSchema, ContentSheetSchema, ContentSlideSchema, ContentStrokeSchema, ContentSubpathSchema, ContentTableCellSchema, ContentTableRowSchema, ContentTableSchema, ContentVectorSchema, DEFAULT_LAYOUT_FONT, DOCUMENT_PACKAGE_FORMAT_VERSION, DocumentPackageSchema, LAYOUT_FORMAT_VERSION, LayoutDocumentSchema, LayoutEllipseSchema, LayoutFontSchema, LayoutImageAssetSchema, LayoutImageSchema, LayoutItemSchema, LayoutLineSchema, LayoutLinkSchema, LayoutMetadataSchema, LayoutPageSchema, LayoutPathSchema, LayoutPathSegmentSchema, LayoutRectSchema, LayoutSubpathSchema, LayoutTextSchema, MarginsSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSizeSchema, SCHEMA_FILE_NAMES, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, UnrecognizedDocumentSchemaError, colorToRgbHex, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, isContentBlock, layoutDocumentWithSchema, rgbHexToColor, schemaUriFor };
10
+ import { CONTENT_DEFS, CONTENT_DOCUMENT_URI, EMBEDDED_OBJECT_KINDS, MAX_SAFE_INTEGER } from "./content-json-schema-defs.js";
11
+ export { AlignmentSchema, BoxSchema, COLOR_BLACK, CONTENT_DEFS, CONTENT_DOCUMENT_URI, CONTENT_FORMAT_VERSION, ColorSchema, ContentBlockSchema, ContentBorderSchema, ContentCellBordersSchema, ContentCellValueSchema, ContentDocumentSchema, ContentDrawPageSchema, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectSchema, ContentFormulaSchema, ContentImageBlockSchema, ContentListMembershipSchema, ContentPageBreakSchema, ContentParagraphSchema, ContentPathPointSchema, ContentPathSegmentSchema, ContentRunSchema, ContentSectionSchema, ContentShapeSchema, ContentSheetCellSchema, ContentSheetColumnSchema, ContentSheetImageSchema, ContentSheetPrintRangeSchema, ContentSheetPrintSettingsSchema, ContentSheetRepeatRangeSchema, ContentSheetRowSchema, ContentSheetSchema, ContentSlideSchema, ContentStrokeSchema, ContentStrokeStyleSchema, ContentSubpathSchema, ContentTableCellSchema, ContentTableRowSchema, ContentTableSchema, ContentVectorSchema, DEFAULT_LAYOUT_FONT, DOCUMENT_PACKAGE_FORMAT_VERSION, DecimalStringSchema, DocumentPackageSchema, EMBEDDED_OBJECT_KINDS, LAYOUT_FORMAT_VERSION, LayoutDocumentSchema, LayoutEllipseSchema, LayoutFontSchema, LayoutImageAssetSchema, LayoutImageSchema, LayoutItemSchema, LayoutLineSchema, LayoutLinkSchema, LayoutMetadataSchema, LayoutPageSchema, LayoutPathSchema, LayoutPathSegmentSchema, LayoutRectSchema, LayoutSubpathSchema, LayoutTextSchema, MAX_SAFE_INTEGER, MarginsSchema, MathMlAttributeSchema, MathMlCdataSchema, MathMlCommentSchema, MathMlDeclarationSchema, MathMlElementSchema, MathMlNodeSchema, MathMlPiSchema, MathMlTextSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSizeSchema, SCHEMA_FILE_NAMES, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, UnrecognizedDocumentSchemaError, colorToRgbHex, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, isContentBlock, isMathMlNode, layoutDocumentWithSchema, rgbHexToColor, schemaUriFor };
package/dist/layout.cjs CHANGED
@@ -2,6 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_color = require("./color.cjs");
3
3
  const require_metadata = require("./metadata.cjs");
4
4
  const require_style = require("./style.cjs");
5
+ const require_content = require("./content.cjs");
5
6
  let zod = require("zod");
6
7
  //#region src/layout.ts
7
8
  const LAYOUT_FORMAT_VERSION = 1;
@@ -49,6 +50,7 @@ const LayoutLineSchema = zod.z.object({
49
50
  y2Pt: zod.z.number(),
50
51
  color: require_color.ColorSchema,
51
52
  widthPt: zod.z.number().positive(),
53
+ style: require_content.ContentStrokeStyleSchema.optional(),
52
54
  sourcePath: zod.z.string().optional()
53
55
  });
54
56
  const LayoutEllipseSchema = zod.z.object({
@@ -92,6 +94,7 @@ const LayoutPathSchema = zod.z.object({
92
94
  color: require_color.ColorSchema,
93
95
  widthPt: zod.z.number().positive()
94
96
  }).optional(),
97
+ style: require_content.ContentStrokeStyleSchema.optional(),
95
98
  sourcePath: zod.z.string().optional()
96
99
  });
97
100
  const LayoutLinkSchema = zod.z.object({
package/dist/layout.d.cts CHANGED
@@ -9,12 +9,12 @@ declare const LayoutTextSchema: z.ZodObject<{
9
9
  font: z.ZodObject<{
10
10
  family: z.ZodString;
11
11
  weight: z.ZodEnum<{
12
- bold: "bold";
13
12
  normal: "normal";
13
+ bold: "bold";
14
14
  }>;
15
15
  style: z.ZodEnum<{
16
- italic: "italic";
17
16
  normal: "normal";
17
+ italic: "italic";
18
18
  }>;
19
19
  }, z.core.$strip>;
20
20
  sizePt: z.ZodNumber;
@@ -74,6 +74,12 @@ declare const LayoutLineSchema: z.ZodObject<{
74
74
  b: z.ZodNumber;
75
75
  }, z.core.$strip>;
76
76
  widthPt: z.ZodNumber;
77
+ style: z.ZodOptional<z.ZodEnum<{
78
+ solid: "solid";
79
+ dashed: "dashed";
80
+ dotted: "dotted";
81
+ double: "double";
82
+ }>>;
77
83
  sourcePath: z.ZodOptional<z.ZodString>;
78
84
  }, z.core.$strip>;
79
85
  type LayoutLine = z.infer<typeof LayoutLineSchema>;
@@ -169,6 +175,12 @@ declare const LayoutPathSchema: z.ZodObject<{
169
175
  }, z.core.$strip>;
170
176
  widthPt: z.ZodNumber;
171
177
  }, z.core.$strip>>;
178
+ style: z.ZodOptional<z.ZodEnum<{
179
+ solid: "solid";
180
+ dashed: "dashed";
181
+ dotted: "dotted";
182
+ double: "double";
183
+ }>>;
172
184
  sourcePath: z.ZodOptional<z.ZodString>;
173
185
  }, z.core.$strip>;
174
186
  type LayoutPath = z.infer<typeof LayoutPathSchema>;
@@ -190,12 +202,12 @@ declare const LayoutItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
190
202
  font: z.ZodObject<{
191
203
  family: z.ZodString;
192
204
  weight: z.ZodEnum<{
193
- bold: "bold";
194
205
  normal: "normal";
206
+ bold: "bold";
195
207
  }>;
196
208
  style: z.ZodEnum<{
197
- italic: "italic";
198
209
  normal: "normal";
210
+ italic: "italic";
199
211
  }>;
200
212
  }, z.core.$strip>;
201
213
  sizePt: z.ZodNumber;
@@ -249,6 +261,12 @@ declare const LayoutItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
249
261
  b: z.ZodNumber;
250
262
  }, z.core.$strip>;
251
263
  widthPt: z.ZodNumber;
264
+ style: z.ZodOptional<z.ZodEnum<{
265
+ solid: "solid";
266
+ dashed: "dashed";
267
+ dotted: "dotted";
268
+ double: "double";
269
+ }>>;
252
270
  sourcePath: z.ZodOptional<z.ZodString>;
253
271
  }, z.core.$strip>, z.ZodObject<{
254
272
  kind: z.ZodLiteral<"ellipse">;
@@ -307,6 +325,12 @@ declare const LayoutItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
307
325
  }, z.core.$strip>;
308
326
  widthPt: z.ZodNumber;
309
327
  }, z.core.$strip>>;
328
+ style: z.ZodOptional<z.ZodEnum<{
329
+ solid: "solid";
330
+ dashed: "dashed";
331
+ dotted: "dotted";
332
+ double: "double";
333
+ }>>;
310
334
  sourcePath: z.ZodOptional<z.ZodString>;
311
335
  }, z.core.$strip>, z.ZodObject<{
312
336
  kind: z.ZodLiteral<"link">;
@@ -329,12 +353,12 @@ declare const LayoutPageSchema: z.ZodObject<{
329
353
  font: z.ZodObject<{
330
354
  family: z.ZodString;
331
355
  weight: z.ZodEnum<{
332
- bold: "bold";
333
356
  normal: "normal";
357
+ bold: "bold";
334
358
  }>;
335
359
  style: z.ZodEnum<{
336
- italic: "italic";
337
360
  normal: "normal";
361
+ italic: "italic";
338
362
  }>;
339
363
  }, z.core.$strip>;
340
364
  sizePt: z.ZodNumber;
@@ -388,6 +412,12 @@ declare const LayoutPageSchema: z.ZodObject<{
388
412
  b: z.ZodNumber;
389
413
  }, z.core.$strip>;
390
414
  widthPt: z.ZodNumber;
415
+ style: z.ZodOptional<z.ZodEnum<{
416
+ solid: "solid";
417
+ dashed: "dashed";
418
+ dotted: "dotted";
419
+ double: "double";
420
+ }>>;
391
421
  sourcePath: z.ZodOptional<z.ZodString>;
392
422
  }, z.core.$strip>, z.ZodObject<{
393
423
  kind: z.ZodLiteral<"ellipse">;
@@ -446,6 +476,12 @@ declare const LayoutPageSchema: z.ZodObject<{
446
476
  }, z.core.$strip>;
447
477
  widthPt: z.ZodNumber;
448
478
  }, z.core.$strip>>;
479
+ style: z.ZodOptional<z.ZodEnum<{
480
+ solid: "solid";
481
+ dashed: "dashed";
482
+ dotted: "dotted";
483
+ double: "double";
484
+ }>>;
449
485
  sourcePath: z.ZodOptional<z.ZodString>;
450
486
  }, z.core.$strip>, z.ZodObject<{
451
487
  kind: z.ZodLiteral<"link">;
@@ -492,12 +528,12 @@ declare const LayoutDocumentSchema: z.ZodObject<{
492
528
  font: z.ZodObject<{
493
529
  family: z.ZodString;
494
530
  weight: z.ZodEnum<{
495
- bold: "bold";
496
531
  normal: "normal";
532
+ bold: "bold";
497
533
  }>;
498
534
  style: z.ZodEnum<{
499
- italic: "italic";
500
535
  normal: "normal";
536
+ italic: "italic";
501
537
  }>;
502
538
  }, z.core.$strip>;
503
539
  sizePt: z.ZodNumber;
@@ -551,6 +587,12 @@ declare const LayoutDocumentSchema: z.ZodObject<{
551
587
  b: z.ZodNumber;
552
588
  }, z.core.$strip>;
553
589
  widthPt: z.ZodNumber;
590
+ style: z.ZodOptional<z.ZodEnum<{
591
+ solid: "solid";
592
+ dashed: "dashed";
593
+ dotted: "dotted";
594
+ double: "double";
595
+ }>>;
554
596
  sourcePath: z.ZodOptional<z.ZodString>;
555
597
  }, z.core.$strip>, z.ZodObject<{
556
598
  kind: z.ZodLiteral<"ellipse">;
@@ -609,6 +651,12 @@ declare const LayoutDocumentSchema: z.ZodObject<{
609
651
  }, z.core.$strip>;
610
652
  widthPt: z.ZodNumber;
611
653
  }, z.core.$strip>>;
654
+ style: z.ZodOptional<z.ZodEnum<{
655
+ solid: "solid";
656
+ dashed: "dashed";
657
+ dotted: "dotted";
658
+ double: "double";
659
+ }>>;
612
660
  sourcePath: z.ZodOptional<z.ZodString>;
613
661
  }, z.core.$strip>, z.ZodObject<{
614
662
  kind: z.ZodLiteral<"link">;