document-schema 2.7.17 → 3.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/README.md +12 -4
- package/dist/content-json-schema-defs.cjs +67 -6
- package/dist/content-json-schema-defs.js +67 -6
- package/dist/content.cjs +45 -17
- package/dist/content.d.cts +298 -8
- package/dist/content.d.ts +298 -8
- package/dist/content.js +45 -19
- package/dist/{geometry-rj_ACBLD.d.cts → geometry-CvcjSwnA.d.cts} +9 -1
- package/dist/{geometry-rj_ACBLD.d.ts → geometry-CvcjSwnA.d.ts} +9 -1
- package/dist/geometry.cjs +8 -0
- package/dist/geometry.d.cts +2 -2
- package/dist/geometry.d.ts +2 -2
- package/dist/geometry.js +8 -1
- package/dist/index.cjs +3 -0
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/package.cjs +4 -4
- package/dist/package.d.cts +83 -181
- package/dist/package.d.ts +83 -181
- package/dist/package.js +4 -4
- package/dist/schema-io.cjs +1 -1
- package/dist/schema-io.js +1 -1
- package/package.json +1 -1
- package/schemas/content-document.schema.json +438 -8
- package/schemas/document-package.schema.json +23 -5
- package/schemas/layout-document.schema.json +1 -1
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({
|
|
@@ -184,6 +195,15 @@ const ContentCellValueSchema = z.discriminatedUnion("kind", [
|
|
|
184
195
|
}),
|
|
185
196
|
z.object({ kind: z.literal("empty") })
|
|
186
197
|
]);
|
|
198
|
+
const ContentSheetCellCommentSchema = z.object({
|
|
199
|
+
text: z.string(),
|
|
200
|
+
author: z.string().optional(),
|
|
201
|
+
createdAt: z.string().optional(),
|
|
202
|
+
replies: z.array(z.object({
|
|
203
|
+
text: z.string(),
|
|
204
|
+
author: z.string().optional()
|
|
205
|
+
})).optional()
|
|
206
|
+
});
|
|
187
207
|
const ContentSheetCellSchema = z.object({
|
|
188
208
|
row: z.number().int().nonnegative(),
|
|
189
209
|
column: z.number().int().nonnegative(),
|
|
@@ -201,7 +221,9 @@ const ContentSheetCellSchema = z.object({
|
|
|
201
221
|
"middle",
|
|
202
222
|
"bottom"
|
|
203
223
|
]).optional(),
|
|
204
|
-
|
|
224
|
+
comment: ContentSheetCellCommentSchema.optional(),
|
|
225
|
+
sourcePath: z.string().optional(),
|
|
226
|
+
frames: z.array(LayoutFrameSchema).optional()
|
|
205
227
|
});
|
|
206
228
|
const ContentSheetColumnSchema = z.object({
|
|
207
229
|
index: z.number().int().nonnegative(),
|
|
@@ -288,7 +310,8 @@ const ContentVectorSchema = z.discriminatedUnion("kind", [
|
|
|
288
310
|
fill: ColorSchema.optional(),
|
|
289
311
|
stroke: ContentStrokeSchema.optional(),
|
|
290
312
|
paintOrder: z.number().optional(),
|
|
291
|
-
sourcePath: z.string().optional()
|
|
313
|
+
sourcePath: z.string().optional(),
|
|
314
|
+
frames: z.array(LayoutFrameSchema).optional()
|
|
292
315
|
}),
|
|
293
316
|
z.object({
|
|
294
317
|
kind: z.literal("ellipse"),
|
|
@@ -297,7 +320,8 @@ const ContentVectorSchema = z.discriminatedUnion("kind", [
|
|
|
297
320
|
fill: ColorSchema.optional(),
|
|
298
321
|
stroke: ContentStrokeSchema.optional(),
|
|
299
322
|
paintOrder: z.number().optional(),
|
|
300
|
-
sourcePath: z.string().optional()
|
|
323
|
+
sourcePath: z.string().optional(),
|
|
324
|
+
frames: z.array(LayoutFrameSchema).optional()
|
|
301
325
|
}),
|
|
302
326
|
z.object({
|
|
303
327
|
kind: z.literal("line"),
|
|
@@ -305,7 +329,8 @@ const ContentVectorSchema = z.discriminatedUnion("kind", [
|
|
|
305
329
|
to: ContentPathPointSchema,
|
|
306
330
|
stroke: ContentStrokeSchema,
|
|
307
331
|
paintOrder: z.number().optional(),
|
|
308
|
-
sourcePath: z.string().optional()
|
|
332
|
+
sourcePath: z.string().optional(),
|
|
333
|
+
frames: z.array(LayoutFrameSchema).optional()
|
|
309
334
|
}),
|
|
310
335
|
z.object({
|
|
311
336
|
kind: z.literal("path"),
|
|
@@ -316,7 +341,8 @@ const ContentVectorSchema = z.discriminatedUnion("kind", [
|
|
|
316
341
|
fillRule: z.enum(["nonzero", "evenodd"]).optional(),
|
|
317
342
|
stroke: ContentStrokeSchema.optional(),
|
|
318
343
|
paintOrder: z.number().optional(),
|
|
319
|
-
sourcePath: z.string().optional()
|
|
344
|
+
sourcePath: z.string().optional(),
|
|
345
|
+
frames: z.array(LayoutFrameSchema).optional()
|
|
320
346
|
})
|
|
321
347
|
]);
|
|
322
348
|
const ContentDrawPageSchema = z.object({
|
|
@@ -328,38 +354,38 @@ const ContentFormulaSchema = z.object({
|
|
|
328
354
|
mathml: z.array(MathMlNodeSchema),
|
|
329
355
|
starMath: z.string().optional()
|
|
330
356
|
});
|
|
331
|
-
const CONTENT_FORMAT_VERSION =
|
|
357
|
+
const CONTENT_FORMAT_VERSION = 3;
|
|
332
358
|
const ContentDocumentSchema = z.discriminatedUnion("kind", [
|
|
333
359
|
z.object({
|
|
334
360
|
kind: z.literal("wordprocessing"),
|
|
335
|
-
formatVersion: z.literal(
|
|
361
|
+
formatVersion: z.literal(3),
|
|
336
362
|
metadata: LayoutMetadataSchema,
|
|
337
363
|
sections: z.array(ContentSectionSchema)
|
|
338
364
|
}),
|
|
339
365
|
z.object({
|
|
340
366
|
kind: z.literal("presentation"),
|
|
341
|
-
formatVersion: z.literal(
|
|
367
|
+
formatVersion: z.literal(3),
|
|
342
368
|
metadata: LayoutMetadataSchema,
|
|
343
369
|
slides: z.array(ContentSlideSchema)
|
|
344
370
|
}),
|
|
345
371
|
z.object({
|
|
346
372
|
kind: z.literal("spreadsheet"),
|
|
347
|
-
formatVersion: z.literal(
|
|
373
|
+
formatVersion: z.literal(3),
|
|
348
374
|
metadata: LayoutMetadataSchema,
|
|
349
375
|
sheets: z.array(ContentSheetSchema)
|
|
350
376
|
}),
|
|
351
377
|
z.object({
|
|
352
378
|
kind: z.literal("drawing"),
|
|
353
|
-
formatVersion: z.literal(
|
|
379
|
+
formatVersion: z.literal(3),
|
|
354
380
|
metadata: LayoutMetadataSchema,
|
|
355
381
|
pages: z.array(ContentDrawPageSchema)
|
|
356
382
|
}),
|
|
357
383
|
z.object({
|
|
358
384
|
kind: z.literal("formula"),
|
|
359
|
-
formatVersion: z.literal(
|
|
385
|
+
formatVersion: z.literal(3),
|
|
360
386
|
metadata: LayoutMetadataSchema,
|
|
361
387
|
formula: ContentFormulaSchema
|
|
362
388
|
})
|
|
363
389
|
]);
|
|
364
390
|
//#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 };
|
|
391
|
+
export { CONTENT_FORMAT_VERSION, ContentBlockSchema, ContentBorderSchema, ContentCellBordersSchema, ContentCellValueSchema, ContentDocumentSchema, ContentDrawPageSchema, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectSchema, ContentFormulaSchema, ContentImageBlockSchema, ContentListMembershipSchema, ContentPageBreakSchema, ContentParagraphSchema, ContentPathPointSchema, ContentPathSegmentSchema, ContentRunSchema, ContentSectionSchema, ContentShapeSchema, ContentSheetCellCommentSchema, 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 {
|
|
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 {
|
|
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;
|
package/dist/geometry.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
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 };
|
package/dist/geometry.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
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
|
@@ -39,6 +39,7 @@ exports.ContentPathSegmentSchema = require_content.ContentPathSegmentSchema;
|
|
|
39
39
|
exports.ContentRunSchema = require_content.ContentRunSchema;
|
|
40
40
|
exports.ContentSectionSchema = require_content.ContentSectionSchema;
|
|
41
41
|
exports.ContentShapeSchema = require_content.ContentShapeSchema;
|
|
42
|
+
exports.ContentSheetCellCommentSchema = require_content.ContentSheetCellCommentSchema;
|
|
42
43
|
exports.ContentSheetCellSchema = require_content.ContentSheetCellSchema;
|
|
43
44
|
exports.ContentSheetColumnSchema = require_content.ContentSheetColumnSchema;
|
|
44
45
|
exports.ContentSheetImageSchema = require_content.ContentSheetImageSchema;
|
|
@@ -64,6 +65,7 @@ exports.LAYOUT_FORMAT_VERSION = require_layout.LAYOUT_FORMAT_VERSION;
|
|
|
64
65
|
exports.LayoutDocumentSchema = require_layout.LayoutDocumentSchema;
|
|
65
66
|
exports.LayoutEllipseSchema = require_layout.LayoutEllipseSchema;
|
|
66
67
|
exports.LayoutFontSchema = require_style.LayoutFontSchema;
|
|
68
|
+
exports.LayoutFrameSchema = require_geometry.LayoutFrameSchema;
|
|
67
69
|
exports.LayoutImageAssetSchema = require_layout.LayoutImageAssetSchema;
|
|
68
70
|
exports.LayoutImageSchema = require_layout.LayoutImageSchema;
|
|
69
71
|
exports.LayoutItemSchema = require_layout.LayoutItemSchema;
|
|
@@ -94,6 +96,7 @@ exports.SLIDE_SIZE_STANDARD = require_geometry.SLIDE_SIZE_STANDARD;
|
|
|
94
96
|
exports.SLIDE_SIZE_WIDESCREEN = require_geometry.SLIDE_SIZE_WIDESCREEN;
|
|
95
97
|
exports.UnrecognizedDocumentSchemaError = require_schema_io.UnrecognizedDocumentSchemaError;
|
|
96
98
|
exports.cellReference = require_a1.cellReference;
|
|
99
|
+
exports.clampHeadingLevel = require_content.clampHeadingLevel;
|
|
97
100
|
exports.colorToRgbHex = require_color.colorToRgbHex;
|
|
98
101
|
exports.columnIndexToLetters = require_a1.columnIndexToLetters;
|
|
99
102
|
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
|
|
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, ContentSheetCellComment, ContentSheetCellCommentSchema, 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, ContentSheetCellComment, ContentSheetCellCommentSchema, 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
|
|
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, ContentSheetCellComment, ContentSheetCellCommentSchema, 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, ContentSheetCellComment, ContentSheetCellCommentSchema, 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, ContentSheetCellCommentSchema, 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, ContentSheetCellCommentSchema, 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/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 =
|
|
6
|
+
const DOCUMENT_PACKAGE_FORMAT_VERSION = 2;
|
|
7
7
|
const DocumentPackageSchema = zod.z.object({
|
|
8
|
-
formatVersion: zod.z.literal(
|
|
8
|
+
formatVersion: zod.z.literal(2),
|
|
9
9
|
content: require_content.ContentDocumentSchema,
|
|
10
|
-
|
|
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;
|