document-content-model 2.7.17 → 3.0.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,5 @@
1
1
  import { ColorSchema } from "./color.js";
2
- import { BoxSchema, MarginsSchema, PageSizeSchema } from "./geometry.js";
2
+ import { BoxSchema, LayoutFrameSchema, MarginsSchema, PageSizeSchema } from "./geometry.js";
3
3
  import { MathMlNodeSchema } from "./mathml.js";
4
4
  import { LayoutMetadataSchema } from "./metadata.js";
5
5
  import { AlignmentSchema } from "./style.js";
@@ -15,7 +15,8 @@ const ContentRunSchema = z.object({
15
15
  sizePt: z.number().positive().optional(),
16
16
  color: ColorSchema.optional(),
17
17
  hyperlink: z.string().optional(),
18
- sourcePath: z.string().optional()
18
+ sourcePath: z.string().optional(),
19
+ frames: z.array(LayoutFrameSchema).optional()
19
20
  });
20
21
  const ContentListMembershipSchema = z.object({
21
22
  numId: z.string(),
@@ -25,6 +26,7 @@ const ContentParagraphSchema = z.object({
25
26
  kind: z.literal("paragraph"),
26
27
  runs: z.array(ContentRunSchema),
27
28
  styleId: z.string().optional(),
29
+ headingLevel: z.number().int().positive().optional(),
28
30
  alignment: AlignmentSchema.optional(),
29
31
  list: ContentListMembershipSchema.optional(),
30
32
  spacingBeforePt: z.number().optional(),
@@ -32,8 +34,12 @@ const ContentParagraphSchema = z.object({
32
34
  lineSpacing: z.number().positive().optional(),
33
35
  indentLeftPt: z.number().optional(),
34
36
  indentFirstLinePt: z.number().optional(),
35
- sourcePath: z.string().optional()
37
+ sourcePath: z.string().optional(),
38
+ frames: z.array(LayoutFrameSchema).optional()
36
39
  });
40
+ function clampHeadingLevel(level) {
41
+ return Math.min(6, Math.max(1, Math.round(level)));
42
+ }
37
43
  const ContentImageBlockSchema = z.object({
38
44
  kind: z.literal("image"),
39
45
  format: z.enum(["png", "jpeg"]),
@@ -41,11 +47,13 @@ const ContentImageBlockSchema = z.object({
41
47
  widthPt: z.number().positive(),
42
48
  heightPt: z.number().positive(),
43
49
  altText: z.string().optional(),
44
- sourcePath: z.string().optional()
50
+ sourcePath: z.string().optional(),
51
+ frames: z.array(LayoutFrameSchema).optional()
45
52
  });
46
53
  const ContentPageBreakSchema = z.object({
47
54
  kind: z.literal("pageBreak"),
48
- sourcePath: z.string().optional()
55
+ sourcePath: z.string().optional(),
56
+ frames: z.array(LayoutFrameSchema).optional()
49
57
  });
50
58
  function isRecord(value) {
51
59
  return typeof value === "object" && value !== null && !Array.isArray(value);
@@ -104,7 +112,8 @@ const ContentTableCellSchema = z.object({
104
112
  rowSpan: z.number().int().positive().optional(),
105
113
  background: ColorSchema.optional(),
106
114
  borders: ContentCellBordersSchema.optional(),
107
- sourcePath: z.string().optional()
115
+ sourcePath: z.string().optional(),
116
+ frames: z.array(LayoutFrameSchema).optional()
108
117
  });
109
118
  const ContentTableRowSchema = z.object({
110
119
  cells: z.array(ContentTableCellSchema),
@@ -114,7 +123,8 @@ const ContentTableSchema = z.object({
114
123
  kind: z.literal("table"),
115
124
  rows: z.array(ContentTableRowSchema),
116
125
  columnWidthsPt: z.array(z.number().positive()),
117
- sourcePath: z.string().optional()
126
+ sourcePath: z.string().optional(),
127
+ frames: z.array(LayoutFrameSchema).optional()
118
128
  });
119
129
  const ContentSectionSchema = z.object({
120
130
  pageSize: PageSizeSchema,
@@ -133,6 +143,7 @@ const ContentShapeSchema = z.object({
133
143
  lineSpacingReduction: z.number().nonnegative().optional(),
134
144
  paintOrder: z.number().optional(),
135
145
  sourcePath: z.string().optional(),
146
+ frames: z.array(LayoutFrameSchema).optional(),
136
147
  blocks: z.array(ContentBlockSchema)
137
148
  });
138
149
  const ContentSlideSchema = z.object({
@@ -201,7 +212,8 @@ const ContentSheetCellSchema = z.object({
201
212
  "middle",
202
213
  "bottom"
203
214
  ]).optional(),
204
- sourcePath: z.string().optional()
215
+ sourcePath: z.string().optional(),
216
+ frames: z.array(LayoutFrameSchema).optional()
205
217
  });
206
218
  const ContentSheetColumnSchema = z.object({
207
219
  index: z.number().int().nonnegative(),
@@ -288,7 +300,8 @@ const ContentVectorSchema = z.discriminatedUnion("kind", [
288
300
  fill: ColorSchema.optional(),
289
301
  stroke: ContentStrokeSchema.optional(),
290
302
  paintOrder: z.number().optional(),
291
- sourcePath: z.string().optional()
303
+ sourcePath: z.string().optional(),
304
+ frames: z.array(LayoutFrameSchema).optional()
292
305
  }),
293
306
  z.object({
294
307
  kind: z.literal("ellipse"),
@@ -297,7 +310,8 @@ const ContentVectorSchema = z.discriminatedUnion("kind", [
297
310
  fill: ColorSchema.optional(),
298
311
  stroke: ContentStrokeSchema.optional(),
299
312
  paintOrder: z.number().optional(),
300
- sourcePath: z.string().optional()
313
+ sourcePath: z.string().optional(),
314
+ frames: z.array(LayoutFrameSchema).optional()
301
315
  }),
302
316
  z.object({
303
317
  kind: z.literal("line"),
@@ -305,7 +319,8 @@ const ContentVectorSchema = z.discriminatedUnion("kind", [
305
319
  to: ContentPathPointSchema,
306
320
  stroke: ContentStrokeSchema,
307
321
  paintOrder: z.number().optional(),
308
- sourcePath: z.string().optional()
322
+ sourcePath: z.string().optional(),
323
+ frames: z.array(LayoutFrameSchema).optional()
309
324
  }),
310
325
  z.object({
311
326
  kind: z.literal("path"),
@@ -316,7 +331,8 @@ const ContentVectorSchema = z.discriminatedUnion("kind", [
316
331
  fillRule: z.enum(["nonzero", "evenodd"]).optional(),
317
332
  stroke: ContentStrokeSchema.optional(),
318
333
  paintOrder: z.number().optional(),
319
- sourcePath: z.string().optional()
334
+ sourcePath: z.string().optional(),
335
+ frames: z.array(LayoutFrameSchema).optional()
320
336
  })
321
337
  ]);
322
338
  const ContentDrawPageSchema = z.object({
@@ -328,38 +344,38 @@ const ContentFormulaSchema = z.object({
328
344
  mathml: z.array(MathMlNodeSchema),
329
345
  starMath: z.string().optional()
330
346
  });
331
- const CONTENT_FORMAT_VERSION = 2;
347
+ const CONTENT_FORMAT_VERSION = 3;
332
348
  const ContentDocumentSchema = z.discriminatedUnion("kind", [
333
349
  z.object({
334
350
  kind: z.literal("wordprocessing"),
335
- formatVersion: z.literal(2),
351
+ formatVersion: z.literal(3),
336
352
  metadata: LayoutMetadataSchema,
337
353
  sections: z.array(ContentSectionSchema)
338
354
  }),
339
355
  z.object({
340
356
  kind: z.literal("presentation"),
341
- formatVersion: z.literal(2),
357
+ formatVersion: z.literal(3),
342
358
  metadata: LayoutMetadataSchema,
343
359
  slides: z.array(ContentSlideSchema)
344
360
  }),
345
361
  z.object({
346
362
  kind: z.literal("spreadsheet"),
347
- formatVersion: z.literal(2),
363
+ formatVersion: z.literal(3),
348
364
  metadata: LayoutMetadataSchema,
349
365
  sheets: z.array(ContentSheetSchema)
350
366
  }),
351
367
  z.object({
352
368
  kind: z.literal("drawing"),
353
- formatVersion: z.literal(2),
369
+ formatVersion: z.literal(3),
354
370
  metadata: LayoutMetadataSchema,
355
371
  pages: z.array(ContentDrawPageSchema)
356
372
  }),
357
373
  z.object({
358
374
  kind: z.literal("formula"),
359
- formatVersion: z.literal(2),
375
+ formatVersion: z.literal(3),
360
376
  metadata: LayoutMetadataSchema,
361
377
  formula: ContentFormulaSchema
362
378
  })
363
379
  ]);
364
380
  //#endregion
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 };
381
+ 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, clampHeadingLevel, isContentBlock };
@@ -23,9 +23,17 @@ declare const MarginsSchema: z.ZodObject<{
23
23
  leftPt: z.ZodNumber;
24
24
  }, z.core.$strip>;
25
25
  type Margins = z.infer<typeof MarginsSchema>;
26
+ declare const LayoutFrameSchema: z.ZodObject<{
27
+ pageIndex: z.ZodNumber;
28
+ xPt: z.ZodNumber;
29
+ yPt: z.ZodNumber;
30
+ widthPt: z.ZodNumber;
31
+ heightPt: z.ZodNumber;
32
+ }, z.core.$strip>;
33
+ type LayoutFrame = z.infer<typeof LayoutFrameSchema>;
26
34
  declare const PAGE_SIZE_LETTER: PageSize;
27
35
  declare const PAGE_SIZE_A4: PageSize;
28
36
  declare const SLIDE_SIZE_WIDESCREEN: PageSize;
29
37
  declare const SLIDE_SIZE_STANDARD: PageSize;
30
38
  //#endregion
31
- export { PAGE_SIZE_A4 as a, PageSizeSchema as c, SLIDE_SIZE_WIDESCREEN as d, MarginsSchema as i, Point as l, BoxSchema as n, PAGE_SIZE_LETTER as o, Margins as r, PageSize as s, Box as t, SLIDE_SIZE_STANDARD as u };
39
+ export { Margins as a, PAGE_SIZE_LETTER as c, Point as d, SLIDE_SIZE_STANDARD as f, LayoutFrameSchema as i, PageSize as l, BoxSchema as n, MarginsSchema as o, SLIDE_SIZE_WIDESCREEN as p, LayoutFrame as r, PAGE_SIZE_A4 as s, Box as t, PageSizeSchema as u };
@@ -23,9 +23,17 @@ declare const MarginsSchema: z.ZodObject<{
23
23
  leftPt: z.ZodNumber;
24
24
  }, z.core.$strip>;
25
25
  type Margins = z.infer<typeof MarginsSchema>;
26
+ declare const LayoutFrameSchema: z.ZodObject<{
27
+ pageIndex: z.ZodNumber;
28
+ xPt: z.ZodNumber;
29
+ yPt: z.ZodNumber;
30
+ widthPt: z.ZodNumber;
31
+ heightPt: z.ZodNumber;
32
+ }, z.core.$strip>;
33
+ type LayoutFrame = z.infer<typeof LayoutFrameSchema>;
26
34
  declare const PAGE_SIZE_LETTER: PageSize;
27
35
  declare const PAGE_SIZE_A4: PageSize;
28
36
  declare const SLIDE_SIZE_WIDESCREEN: PageSize;
29
37
  declare const SLIDE_SIZE_STANDARD: PageSize;
30
38
  //#endregion
31
- export { PAGE_SIZE_A4 as a, PageSizeSchema as c, SLIDE_SIZE_WIDESCREEN as d, MarginsSchema as i, Point as l, BoxSchema as n, PAGE_SIZE_LETTER as o, Margins as r, PageSize as s, Box as t, SLIDE_SIZE_STANDARD as u };
39
+ export { Margins as a, PAGE_SIZE_LETTER as c, Point as d, SLIDE_SIZE_STANDARD as f, LayoutFrameSchema as i, PageSize as l, BoxSchema as n, MarginsSchema as o, SLIDE_SIZE_WIDESCREEN as p, LayoutFrame as r, PAGE_SIZE_A4 as s, Box as t, PageSizeSchema as u };
package/dist/geometry.cjs CHANGED
@@ -17,6 +17,13 @@ const MarginsSchema = zod.z.object({
17
17
  bottomPt: zod.z.number().nonnegative(),
18
18
  leftPt: zod.z.number().nonnegative()
19
19
  });
20
+ const LayoutFrameSchema = zod.z.object({
21
+ pageIndex: zod.z.number().int().nonnegative(),
22
+ xPt: zod.z.number(),
23
+ yPt: zod.z.number(),
24
+ widthPt: zod.z.number().nonnegative(),
25
+ heightPt: zod.z.number().nonnegative()
26
+ });
20
27
  const PAGE_SIZE_LETTER = {
21
28
  widthPt: 612,
22
29
  heightPt: 792
@@ -35,6 +42,7 @@ const SLIDE_SIZE_STANDARD = {
35
42
  };
36
43
  //#endregion
37
44
  exports.BoxSchema = BoxSchema;
45
+ exports.LayoutFrameSchema = LayoutFrameSchema;
38
46
  exports.MarginsSchema = MarginsSchema;
39
47
  exports.PAGE_SIZE_A4 = PAGE_SIZE_A4;
40
48
  exports.PAGE_SIZE_LETTER = PAGE_SIZE_LETTER;
@@ -1,2 +1,2 @@
1
- import { a as PAGE_SIZE_A4, c as PageSizeSchema, d as SLIDE_SIZE_WIDESCREEN, i as MarginsSchema, l as Point, n as BoxSchema, o as PAGE_SIZE_LETTER, r as Margins, s as PageSize, t as Box, u as SLIDE_SIZE_STANDARD } from "./geometry-rj_ACBLD.cjs";
2
- export { Box, BoxSchema, Margins, MarginsSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSize, PageSizeSchema, Point, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN };
1
+ import { a as Margins, c as PAGE_SIZE_LETTER, d as Point, f as SLIDE_SIZE_STANDARD, i as LayoutFrameSchema, l as PageSize, n as BoxSchema, o as MarginsSchema, p as SLIDE_SIZE_WIDESCREEN, r as LayoutFrame, s as PAGE_SIZE_A4, t as Box, u as PageSizeSchema } from "./geometry-CvcjSwnA.cjs";
2
+ export { Box, BoxSchema, LayoutFrame, LayoutFrameSchema, Margins, MarginsSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSize, PageSizeSchema, Point, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN };
@@ -1,2 +1,2 @@
1
- import { a as PAGE_SIZE_A4, c as PageSizeSchema, d as SLIDE_SIZE_WIDESCREEN, i as MarginsSchema, l as Point, n as BoxSchema, o as PAGE_SIZE_LETTER, r as Margins, s as PageSize, t as Box, u as SLIDE_SIZE_STANDARD } from "./geometry-rj_ACBLD.js";
2
- export { Box, BoxSchema, Margins, MarginsSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSize, PageSizeSchema, Point, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN };
1
+ import { a as Margins, c as PAGE_SIZE_LETTER, d as Point, f as SLIDE_SIZE_STANDARD, i as LayoutFrameSchema, l as PageSize, n as BoxSchema, o as MarginsSchema, p as SLIDE_SIZE_WIDESCREEN, r as LayoutFrame, s as PAGE_SIZE_A4, t as Box, u as PageSizeSchema } from "./geometry-CvcjSwnA.js";
2
+ export { Box, BoxSchema, LayoutFrame, LayoutFrameSchema, Margins, MarginsSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSize, PageSizeSchema, Point, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN };
package/dist/geometry.js CHANGED
@@ -16,6 +16,13 @@ const MarginsSchema = z.object({
16
16
  bottomPt: z.number().nonnegative(),
17
17
  leftPt: z.number().nonnegative()
18
18
  });
19
+ const LayoutFrameSchema = z.object({
20
+ pageIndex: z.number().int().nonnegative(),
21
+ xPt: z.number(),
22
+ yPt: z.number(),
23
+ widthPt: z.number().nonnegative(),
24
+ heightPt: z.number().nonnegative()
25
+ });
19
26
  const PAGE_SIZE_LETTER = {
20
27
  widthPt: 612,
21
28
  heightPt: 792
@@ -33,4 +40,4 @@ const SLIDE_SIZE_STANDARD = {
33
40
  heightPt: 540
34
41
  };
35
42
  //#endregion
36
- export { BoxSchema, MarginsSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSizeSchema, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN };
43
+ export { BoxSchema, LayoutFrameSchema, MarginsSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSizeSchema, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN };
package/dist/index.cjs CHANGED
@@ -64,6 +64,7 @@ exports.LAYOUT_FORMAT_VERSION = require_layout.LAYOUT_FORMAT_VERSION;
64
64
  exports.LayoutDocumentSchema = require_layout.LayoutDocumentSchema;
65
65
  exports.LayoutEllipseSchema = require_layout.LayoutEllipseSchema;
66
66
  exports.LayoutFontSchema = require_style.LayoutFontSchema;
67
+ exports.LayoutFrameSchema = require_geometry.LayoutFrameSchema;
67
68
  exports.LayoutImageAssetSchema = require_layout.LayoutImageAssetSchema;
68
69
  exports.LayoutImageSchema = require_layout.LayoutImageSchema;
69
70
  exports.LayoutItemSchema = require_layout.LayoutItemSchema;
@@ -94,6 +95,7 @@ exports.SLIDE_SIZE_STANDARD = require_geometry.SLIDE_SIZE_STANDARD;
94
95
  exports.SLIDE_SIZE_WIDESCREEN = require_geometry.SLIDE_SIZE_WIDESCREEN;
95
96
  exports.UnrecognizedDocumentSchemaError = require_schema_io.UnrecognizedDocumentSchemaError;
96
97
  exports.cellReference = require_a1.cellReference;
98
+ exports.clampHeadingLevel = require_content.clampHeadingLevel;
97
99
  exports.colorToRgbHex = require_color.colorToRgbHex;
98
100
  exports.columnIndexToLetters = require_a1.columnIndexToLetters;
99
101
  exports.columnLettersToIndex = require_a1.columnLettersToIndex;
package/dist/index.d.cts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { CellPosition, CellRange, cellReference, columnIndexToLetters, columnLettersToIndex, parseCellReference, parseRangeReference, rangeReference } from "./a1.cjs";
2
2
  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";
3
3
  import { a as rgbHexToColor, i as colorToRgbHex, n as Color, r as ColorSchema, t as COLOR_BLACK } from "./color-AELCDH_b.cjs";
4
- import { a as PAGE_SIZE_A4, c as PageSizeSchema, d as SLIDE_SIZE_WIDESCREEN, i as MarginsSchema, l as Point, n as BoxSchema, o as PAGE_SIZE_LETTER, r as Margins, s as PageSize, t as Box, u as SLIDE_SIZE_STANDARD } from "./geometry-rj_ACBLD.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
+ import { a as Margins, c as PAGE_SIZE_LETTER, d as Point, f as SLIDE_SIZE_STANDARD, i as LayoutFrameSchema, l as PageSize, n as BoxSchema, o as MarginsSchema, p as SLIDE_SIZE_WIDESCREEN, r as LayoutFrame, s as PAGE_SIZE_A4, t as Box, u as PageSizeSchema } from "./geometry-CvcjSwnA.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, FusedNode, clampHeadingLevel, isContentBlock } from "./content.cjs";
6
6
  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
7
  import { ContentCodec, LayoutCodec } from "./codec.cjs";
8
8
  import { CONTENT_DEFS, CONTENT_DOCUMENT_URI, EMBEDDED_OBJECT_KINDS, MAX_SAFE_INTEGER } from "./content-json-schema-defs.cjs";
@@ -13,4 +13,4 @@ import { DOCUMENT_PACKAGE_FORMAT_VERSION, DocumentPackage, DocumentPackageSchema
13
13
  import { ContentDocumentJson, DocumentJsonResult, DocumentPackageJson, DocumentSchemaKind, LayoutDocumentJson, SCHEMA_FILE_NAMES, UnrecognizedDocumentSchemaError, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, layoutDocumentWithSchema, schemaUriFor } from "./schema-io.cjs";
14
14
  import { StyledFragment, StyledRun, TextMeasurer, UnderlineMetrics, WrapOptions, WrappedLine } from "./text-layout.cjs";
15
15
  import { MathAssembledGlyphs, MathBox, MathColor, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathRule, MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke, PositionedFormula } from "./math-layout.cjs";
16
- export { Alignment, AlignmentSchema, Box, BoxSchema, COLOR_BLACK, CONTENT_DEFS, CONTENT_DOCUMENT_URI, CONTENT_FORMAT_VERSION, CellPosition, CellRange, Color, ColorSchema, ContentBlock, ContentBlockSchema, ContentBorder, ContentBorderSchema, ContentCellBorders, ContentCellBordersSchema, ContentCellValue, ContentCellValueSchema, ContentCodec, 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, FontFace, FontRegistryOptions, FontSubstitution, LAYOUT_FORMAT_VERSION, LayoutCodec, 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, MathAssembledGlyphs, MathBox, MathColor, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathMlAttribute, MathMlAttributeSchema, MathMlCdata, MathMlCdataSchema, MathMlComment, MathMlCommentSchema, MathMlDeclaration, MathMlDeclarationSchema, MathMlElement, MathMlElementSchema, MathMlNode, MathMlNodeSchema, MathMlPi, MathMlPiSchema, MathMlText, MathMlTextSchema, MathRule, MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSize, PageSizeSchema, Point, PositionedFormula, ProvidedFont, SCHEMA_FILE_NAMES, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, StyledFragment, StyledRun, TextMeasurer, UnderlineMetrics, UnrecognizedDocumentSchemaError, WrapOptions, WrappedLine, cellReference, colorToRgbHex, columnIndexToLetters, columnLettersToIndex, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, isContentBlock, isMathMlNode, layoutDocumentWithSchema, parseCellReference, parseRangeReference, rangeReference, rgbHexToColor, schemaUriFor };
16
+ export { Alignment, AlignmentSchema, Box, BoxSchema, COLOR_BLACK, CONTENT_DEFS, CONTENT_DOCUMENT_URI, CONTENT_FORMAT_VERSION, CellPosition, CellRange, Color, ColorSchema, ContentBlock, ContentBlockSchema, ContentBorder, ContentBorderSchema, ContentCellBorders, ContentCellBordersSchema, ContentCellValue, ContentCellValueSchema, ContentCodec, 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, FontFace, FontRegistryOptions, FontSubstitution, FusedNode, LAYOUT_FORMAT_VERSION, LayoutCodec, LayoutDocument, LayoutDocumentJson, LayoutDocumentSchema, LayoutEllipse, LayoutEllipseSchema, LayoutFont, LayoutFontSchema, LayoutFrame, LayoutFrameSchema, 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, MathAssembledGlyphs, MathBox, MathColor, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathMlAttribute, MathMlAttributeSchema, MathMlCdata, MathMlCdataSchema, MathMlComment, MathMlCommentSchema, MathMlDeclaration, MathMlDeclarationSchema, MathMlElement, MathMlElementSchema, MathMlNode, MathMlNodeSchema, MathMlPi, MathMlPiSchema, MathMlText, MathMlTextSchema, MathRule, MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSize, PageSizeSchema, Point, PositionedFormula, ProvidedFont, SCHEMA_FILE_NAMES, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, StyledFragment, StyledRun, TextMeasurer, UnderlineMetrics, UnrecognizedDocumentSchemaError, WrapOptions, WrappedLine, cellReference, clampHeadingLevel, colorToRgbHex, columnIndexToLetters, columnLettersToIndex, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, isContentBlock, isMathMlNode, layoutDocumentWithSchema, parseCellReference, parseRangeReference, rangeReference, rgbHexToColor, schemaUriFor };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { CellPosition, CellRange, cellReference, columnIndexToLetters, columnLettersToIndex, parseCellReference, parseRangeReference, rangeReference } from "./a1.js";
2
2
  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";
3
3
  import { a as rgbHexToColor, i as colorToRgbHex, n as Color, r as ColorSchema, t as COLOR_BLACK } from "./color-AELCDH_b.js";
4
- import { a as PAGE_SIZE_A4, c as PageSizeSchema, d as SLIDE_SIZE_WIDESCREEN, i as MarginsSchema, l as Point, n as BoxSchema, o as PAGE_SIZE_LETTER, r as Margins, s as PageSize, t as Box, u as SLIDE_SIZE_STANDARD } from "./geometry-rj_ACBLD.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
+ import { a as Margins, c as PAGE_SIZE_LETTER, d as Point, f as SLIDE_SIZE_STANDARD, i as LayoutFrameSchema, l as PageSize, n as BoxSchema, o as MarginsSchema, p as SLIDE_SIZE_WIDESCREEN, r as LayoutFrame, s as PAGE_SIZE_A4, t as Box, u as PageSizeSchema } from "./geometry-CvcjSwnA.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, FusedNode, clampHeadingLevel, isContentBlock } from "./content.js";
6
6
  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
7
  import { ContentCodec, LayoutCodec } from "./codec.js";
8
8
  import { CONTENT_DEFS, CONTENT_DOCUMENT_URI, EMBEDDED_OBJECT_KINDS, MAX_SAFE_INTEGER } from "./content-json-schema-defs.js";
@@ -13,4 +13,4 @@ import { DOCUMENT_PACKAGE_FORMAT_VERSION, DocumentPackage, DocumentPackageSchema
13
13
  import { ContentDocumentJson, DocumentJsonResult, DocumentPackageJson, DocumentSchemaKind, LayoutDocumentJson, SCHEMA_FILE_NAMES, UnrecognizedDocumentSchemaError, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, layoutDocumentWithSchema, schemaUriFor } from "./schema-io.js";
14
14
  import { StyledFragment, StyledRun, TextMeasurer, UnderlineMetrics, WrapOptions, WrappedLine } from "./text-layout.js";
15
15
  import { MathAssembledGlyphs, MathBox, MathColor, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathRule, MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke, PositionedFormula } from "./math-layout.js";
16
- export { Alignment, AlignmentSchema, Box, BoxSchema, COLOR_BLACK, CONTENT_DEFS, CONTENT_DOCUMENT_URI, CONTENT_FORMAT_VERSION, CellPosition, CellRange, Color, ColorSchema, ContentBlock, ContentBlockSchema, ContentBorder, ContentBorderSchema, ContentCellBorders, ContentCellBordersSchema, ContentCellValue, ContentCellValueSchema, ContentCodec, 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, FontFace, FontRegistryOptions, FontSubstitution, LAYOUT_FORMAT_VERSION, LayoutCodec, 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, MathAssembledGlyphs, MathBox, MathColor, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathMlAttribute, MathMlAttributeSchema, MathMlCdata, MathMlCdataSchema, MathMlComment, MathMlCommentSchema, MathMlDeclaration, MathMlDeclarationSchema, MathMlElement, MathMlElementSchema, MathMlNode, MathMlNodeSchema, MathMlPi, MathMlPiSchema, MathMlText, MathMlTextSchema, MathRule, MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSize, PageSizeSchema, Point, PositionedFormula, ProvidedFont, SCHEMA_FILE_NAMES, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, StyledFragment, StyledRun, TextMeasurer, UnderlineMetrics, UnrecognizedDocumentSchemaError, WrapOptions, WrappedLine, cellReference, colorToRgbHex, columnIndexToLetters, columnLettersToIndex, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, isContentBlock, isMathMlNode, layoutDocumentWithSchema, parseCellReference, parseRangeReference, rangeReference, rgbHexToColor, schemaUriFor };
16
+ export { Alignment, AlignmentSchema, Box, BoxSchema, COLOR_BLACK, CONTENT_DEFS, CONTENT_DOCUMENT_URI, CONTENT_FORMAT_VERSION, CellPosition, CellRange, Color, ColorSchema, ContentBlock, ContentBlockSchema, ContentBorder, ContentBorderSchema, ContentCellBorders, ContentCellBordersSchema, ContentCellValue, ContentCellValueSchema, ContentCodec, 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, FontFace, FontRegistryOptions, FontSubstitution, FusedNode, LAYOUT_FORMAT_VERSION, LayoutCodec, LayoutDocument, LayoutDocumentJson, LayoutDocumentSchema, LayoutEllipse, LayoutEllipseSchema, LayoutFont, LayoutFontSchema, LayoutFrame, LayoutFrameSchema, 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, MathAssembledGlyphs, MathBox, MathColor, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathMlAttribute, MathMlAttributeSchema, MathMlCdata, MathMlCdataSchema, MathMlComment, MathMlCommentSchema, MathMlDeclaration, MathMlDeclarationSchema, MathMlElement, MathMlElementSchema, MathMlNode, MathMlNodeSchema, MathMlPi, MathMlPiSchema, MathMlText, MathMlTextSchema, MathRule, MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSize, PageSizeSchema, Point, PositionedFormula, ProvidedFont, SCHEMA_FILE_NAMES, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, StyledFragment, StyledRun, TextMeasurer, UnderlineMetrics, UnrecognizedDocumentSchemaError, WrapOptions, WrappedLine, cellReference, clampHeadingLevel, colorToRgbHex, columnIndexToLetters, columnLettersToIndex, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, isContentBlock, isMathMlNode, layoutDocumentWithSchema, parseCellReference, parseRangeReference, rangeReference, rgbHexToColor, schemaUriFor };
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { cellReference, columnIndexToLetters, columnLettersToIndex, parseCellReference, parseRangeReference, rangeReference } from "./a1.js";
2
2
  import "./codec.js";
3
3
  import { COLOR_BLACK, ColorSchema, colorToRgbHex, rgbHexToColor } from "./color.js";
4
- import { BoxSchema, MarginsSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSizeSchema, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN } from "./geometry.js";
4
+ import { BoxSchema, LayoutFrameSchema, MarginsSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSizeSchema, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN } from "./geometry.js";
5
5
  import { MathMlAttributeSchema, MathMlCdataSchema, MathMlCommentSchema, MathMlDeclarationSchema, MathMlElementSchema, MathMlNodeSchema, MathMlPiSchema, MathMlTextSchema, isMathMlNode } from "./mathml.js";
6
6
  import { LayoutMetadataSchema } from "./metadata.js";
7
7
  import { AlignmentSchema, DEFAULT_LAYOUT_FONT, LayoutFontSchema } from "./style.js";
8
- 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";
8
+ 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, clampHeadingLevel, isContentBlock } from "./content.js";
9
9
  import { LAYOUT_FORMAT_VERSION, LayoutDocumentSchema, LayoutEllipseSchema, LayoutImageAssetSchema, LayoutImageSchema, LayoutItemSchema, LayoutLineSchema, LayoutLinkSchema, LayoutPageSchema, LayoutPathSchema, LayoutPathSegmentSchema, LayoutRectSchema, LayoutSubpathSchema, LayoutTextSchema } from "./layout.js";
10
10
  import { DOCUMENT_PACKAGE_FORMAT_VERSION, DocumentPackageSchema } from "./package.js";
11
11
  import { SCHEMA_FILE_NAMES, UnrecognizedDocumentSchemaError, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, layoutDocumentWithSchema, schemaUriFor } from "./schema-io.js";
@@ -13,4 +13,4 @@ import { CONTENT_DEFS, CONTENT_DOCUMENT_URI, EMBEDDED_OBJECT_KINDS, MAX_SAFE_INT
13
13
  import "./font-port.js";
14
14
  import "./text-layout.js";
15
15
  import "./math-layout.js";
16
- 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, cellReference, colorToRgbHex, columnIndexToLetters, columnLettersToIndex, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, isContentBlock, isMathMlNode, layoutDocumentWithSchema, parseCellReference, parseRangeReference, rangeReference, rgbHexToColor, schemaUriFor };
16
+ 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, LayoutFrameSchema, 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, cellReference, clampHeadingLevel, colorToRgbHex, columnIndexToLetters, columnLettersToIndex, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, isContentBlock, isMathMlNode, layoutDocumentWithSchema, parseCellReference, parseRangeReference, rangeReference, rgbHexToColor, schemaUriFor };
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
- normal: "normal";
13
12
  bold: "bold";
13
+ normal: "normal";
14
14
  }>;
15
15
  style: z.ZodEnum<{
16
- normal: "normal";
17
16
  italic: "italic";
17
+ normal: "normal";
18
18
  }>;
19
19
  }, z.core.$strip>;
20
20
  sizePt: z.ZodNumber;
@@ -202,12 +202,12 @@ declare const LayoutItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
202
202
  font: z.ZodObject<{
203
203
  family: z.ZodString;
204
204
  weight: z.ZodEnum<{
205
- normal: "normal";
206
205
  bold: "bold";
206
+ normal: "normal";
207
207
  }>;
208
208
  style: z.ZodEnum<{
209
- normal: "normal";
210
209
  italic: "italic";
210
+ normal: "normal";
211
211
  }>;
212
212
  }, z.core.$strip>;
213
213
  sizePt: z.ZodNumber;
@@ -353,12 +353,12 @@ declare const LayoutPageSchema: z.ZodObject<{
353
353
  font: z.ZodObject<{
354
354
  family: z.ZodString;
355
355
  weight: z.ZodEnum<{
356
- normal: "normal";
357
356
  bold: "bold";
357
+ normal: "normal";
358
358
  }>;
359
359
  style: z.ZodEnum<{
360
- normal: "normal";
361
360
  italic: "italic";
361
+ normal: "normal";
362
362
  }>;
363
363
  }, z.core.$strip>;
364
364
  sizePt: z.ZodNumber;
@@ -528,12 +528,12 @@ declare const LayoutDocumentSchema: z.ZodObject<{
528
528
  font: z.ZodObject<{
529
529
  family: z.ZodString;
530
530
  weight: z.ZodEnum<{
531
- normal: "normal";
532
531
  bold: "bold";
532
+ normal: "normal";
533
533
  }>;
534
534
  style: z.ZodEnum<{
535
- normal: "normal";
536
535
  italic: "italic";
536
+ normal: "normal";
537
537
  }>;
538
538
  }, z.core.$strip>;
539
539
  sizePt: z.ZodNumber;
package/dist/layout.d.ts 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
- normal: "normal";
13
12
  bold: "bold";
13
+ normal: "normal";
14
14
  }>;
15
15
  style: z.ZodEnum<{
16
- normal: "normal";
17
16
  italic: "italic";
17
+ normal: "normal";
18
18
  }>;
19
19
  }, z.core.$strip>;
20
20
  sizePt: z.ZodNumber;
@@ -202,12 +202,12 @@ declare const LayoutItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
202
202
  font: z.ZodObject<{
203
203
  family: z.ZodString;
204
204
  weight: z.ZodEnum<{
205
- normal: "normal";
206
205
  bold: "bold";
206
+ normal: "normal";
207
207
  }>;
208
208
  style: z.ZodEnum<{
209
- normal: "normal";
210
209
  italic: "italic";
210
+ normal: "normal";
211
211
  }>;
212
212
  }, z.core.$strip>;
213
213
  sizePt: z.ZodNumber;
@@ -353,12 +353,12 @@ declare const LayoutPageSchema: z.ZodObject<{
353
353
  font: z.ZodObject<{
354
354
  family: z.ZodString;
355
355
  weight: z.ZodEnum<{
356
- normal: "normal";
357
356
  bold: "bold";
357
+ normal: "normal";
358
358
  }>;
359
359
  style: z.ZodEnum<{
360
- normal: "normal";
361
360
  italic: "italic";
361
+ normal: "normal";
362
362
  }>;
363
363
  }, z.core.$strip>;
364
364
  sizePt: z.ZodNumber;
@@ -528,12 +528,12 @@ declare const LayoutDocumentSchema: z.ZodObject<{
528
528
  font: z.ZodObject<{
529
529
  family: z.ZodString;
530
530
  weight: z.ZodEnum<{
531
- normal: "normal";
532
531
  bold: "bold";
532
+ normal: "normal";
533
533
  }>;
534
534
  style: z.ZodEnum<{
535
- normal: "normal";
536
535
  italic: "italic";
536
+ normal: "normal";
537
537
  }>;
538
538
  }, z.core.$strip>;
539
539
  sizePt: z.ZodNumber;
package/dist/package.cjs CHANGED
@@ -1,13 +1,13 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_geometry = require("./geometry.cjs");
2
3
  const require_content = require("./content.cjs");
3
- const require_layout = require("./layout.cjs");
4
4
  let zod = require("zod");
5
5
  //#region src/package.ts
6
- const DOCUMENT_PACKAGE_FORMAT_VERSION = 1;
6
+ const DOCUMENT_PACKAGE_FORMAT_VERSION = 2;
7
7
  const DocumentPackageSchema = zod.z.object({
8
- formatVersion: zod.z.literal(1),
8
+ formatVersion: zod.z.literal(2),
9
9
  content: require_content.ContentDocumentSchema,
10
- layout: require_layout.LayoutDocumentSchema.optional()
10
+ pages: zod.z.array(require_geometry.PageSizeSchema).optional()
11
11
  });
12
12
  //#endregion
13
13
  exports.DOCUMENT_PACKAGE_FORMAT_VERSION = DOCUMENT_PACKAGE_FORMAT_VERSION;