document-model.js 1.9.0 → 1.10.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 +36 -0
- package/dist/color-AELCDH_b.d.cts +13 -0
- package/dist/color-AELCDH_b.d.ts +13 -0
- package/dist/color.cjs +40 -0
- package/dist/color.d.cts +2 -0
- package/dist/color.d.ts +2 -0
- package/dist/color.js +36 -0
- package/dist/content.cjs +341 -0
- package/dist/content.d.cts +1188 -0
- package/dist/content.d.ts +1188 -0
- package/dist/content.js +309 -0
- package/dist/geometry-CokwQGtJ.d.cts +27 -0
- package/dist/geometry-CokwQGtJ.d.ts +27 -0
- package/dist/geometry.cjs +43 -0
- package/dist/geometry.d.cts +2 -0
- package/dist/geometry.d.ts +2 -0
- package/dist/geometry.js +36 -0
- package/dist/index.cjs +79 -684
- package/dist/index.d.cts +8 -2448
- package/dist/index.d.ts +8 -2448
- package/dist/index.js +8 -613
- package/dist/layout.cjs +147 -0
- package/dist/layout.d.cts +636 -0
- package/dist/layout.d.ts +636 -0
- package/dist/layout.js +133 -0
- package/dist/metadata.cjs +15 -0
- package/dist/metadata.d.cts +15 -0
- package/dist/metadata.d.ts +15 -0
- package/dist/metadata.js +14 -0
- package/dist/package.cjs +14 -0
- package/dist/package.d.cts +528 -0
- package/dist/package.d.ts +528 -0
- package/dist/package.js +12 -0
- package/dist/schema-io.cjs +87 -0
- package/dist/schema-io.d.cts +37 -0
- package/dist/schema-io.d.ts +37 -0
- package/dist/schema-io.js +79 -0
- package/dist/style.cjs +23 -0
- package/dist/style.d.cts +24 -0
- package/dist/style.d.ts +24 -0
- package/dist/style.js +20 -0
- package/package.json +10 -4
- package/schemas/content-document.schema.json +3 -3
- package/schemas/document-package.schema.json +3 -3
- package/schemas/layout-document.schema.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,685 +1,80 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
style: zod.z.enum(["normal", "italic"])
|
|
82
|
-
});
|
|
83
|
-
const DEFAULT_LAYOUT_FONT = {
|
|
84
|
-
family: "Helvetica",
|
|
85
|
-
weight: "normal",
|
|
86
|
-
style: "normal"
|
|
87
|
-
};
|
|
88
|
-
//#endregion
|
|
89
|
-
//#region src/metadata.ts
|
|
90
|
-
const LayoutMetadataSchema = zod.z.object({
|
|
91
|
-
title: zod.z.string().optional(),
|
|
92
|
-
author: zod.z.string().optional(),
|
|
93
|
-
subject: zod.z.string().optional(),
|
|
94
|
-
keywords: zod.z.array(zod.z.string()).optional(),
|
|
95
|
-
creator: zod.z.string().optional(),
|
|
96
|
-
producer: zod.z.string().optional(),
|
|
97
|
-
createdIso: zod.z.string().optional(),
|
|
98
|
-
modifiedIso: zod.z.string().optional()
|
|
99
|
-
});
|
|
100
|
-
//#endregion
|
|
101
|
-
//#region src/content.ts
|
|
102
|
-
const ContentRunSchema = zod.z.object({
|
|
103
|
-
text: zod.z.string(),
|
|
104
|
-
bold: zod.z.boolean().optional(),
|
|
105
|
-
italic: zod.z.boolean().optional(),
|
|
106
|
-
underline: zod.z.boolean().optional(),
|
|
107
|
-
strike: zod.z.boolean().optional(),
|
|
108
|
-
fontFamily: zod.z.string().optional(),
|
|
109
|
-
sizePt: zod.z.number().positive().optional(),
|
|
110
|
-
color: ColorSchema.optional(),
|
|
111
|
-
hyperlink: zod.z.string().optional(),
|
|
112
|
-
sourcePath: zod.z.string().optional()
|
|
113
|
-
});
|
|
114
|
-
const ContentListMembershipSchema = zod.z.object({
|
|
115
|
-
numId: zod.z.string(),
|
|
116
|
-
level: zod.z.number().int().nonnegative()
|
|
117
|
-
});
|
|
118
|
-
const ContentParagraphSchema = zod.z.object({
|
|
119
|
-
kind: zod.z.literal("paragraph"),
|
|
120
|
-
runs: zod.z.array(ContentRunSchema),
|
|
121
|
-
styleId: zod.z.string().optional(),
|
|
122
|
-
alignment: AlignmentSchema.optional(),
|
|
123
|
-
list: ContentListMembershipSchema.optional(),
|
|
124
|
-
spacingBeforePt: zod.z.number().optional(),
|
|
125
|
-
spacingAfterPt: zod.z.number().optional(),
|
|
126
|
-
lineSpacing: zod.z.number().positive().optional(),
|
|
127
|
-
indentLeftPt: zod.z.number().optional(),
|
|
128
|
-
indentFirstLinePt: zod.z.number().optional(),
|
|
129
|
-
sourcePath: zod.z.string().optional()
|
|
130
|
-
});
|
|
131
|
-
const ContentImageBlockSchema = zod.z.object({
|
|
132
|
-
kind: zod.z.literal("image"),
|
|
133
|
-
format: zod.z.enum(["png", "jpeg"]),
|
|
134
|
-
base64: zod.z.string(),
|
|
135
|
-
widthPt: zod.z.number().positive(),
|
|
136
|
-
heightPt: zod.z.number().positive(),
|
|
137
|
-
altText: zod.z.string().optional(),
|
|
138
|
-
sourcePath: zod.z.string().optional()
|
|
139
|
-
});
|
|
140
|
-
const ContentPageBreakSchema = zod.z.object({
|
|
141
|
-
kind: zod.z.literal("pageBreak"),
|
|
142
|
-
sourcePath: zod.z.string().optional()
|
|
143
|
-
});
|
|
144
|
-
function isRecord$1(value) {
|
|
145
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
146
|
-
}
|
|
147
|
-
function isContentRun(value) {
|
|
148
|
-
return isRecord$1(value) && typeof value.text === "string";
|
|
149
|
-
}
|
|
150
|
-
function isContentTableCell(value) {
|
|
151
|
-
return isRecord$1(value) && Array.isArray(value.blocks) && value.blocks.every(isContentBlock);
|
|
152
|
-
}
|
|
153
|
-
function isContentTableRow(value) {
|
|
154
|
-
return isRecord$1(value) && Array.isArray(value.cells) && value.cells.every(isContentTableCell) && (value.heightPt === void 0 || typeof value.heightPt === "number");
|
|
155
|
-
}
|
|
156
|
-
function isContentEmbeddedObjectKind(value) {
|
|
157
|
-
return value === "formula" || value === "wordprocessing" || value === "presentation" || value === "spreadsheet" || value === "drawing";
|
|
158
|
-
}
|
|
159
|
-
function isContentEmbeddedObject(value) {
|
|
160
|
-
return isRecord$1(value) && isContentEmbeddedObjectKind(value.objectKind) && BoxSchema.safeParse(value.frame).success && ContentDocumentSchema.safeParse(value.document).success;
|
|
161
|
-
}
|
|
162
|
-
function isContentEmbeddedObjectBlock(value) {
|
|
163
|
-
return isRecord$1(value) && value.kind === "embeddedObject" && isContentEmbeddedObject(value);
|
|
164
|
-
}
|
|
165
|
-
function isContentBlock(value) {
|
|
166
|
-
if (!isRecord$1(value)) return false;
|
|
167
|
-
const kind = value.kind;
|
|
168
|
-
if (kind === "paragraph") return Array.isArray(value.runs) && value.runs.every(isContentRun);
|
|
169
|
-
if (kind === "image") return (value.format === "png" || value.format === "jpeg") && typeof value.base64 === "string" && typeof value.widthPt === "number" && typeof value.heightPt === "number";
|
|
170
|
-
if (kind === "pageBreak") return true;
|
|
171
|
-
if (kind === "table") return Array.isArray(value.rows) && value.rows.every(isContentTableRow) && Array.isArray(value.columnWidthsPt) && value.columnWidthsPt.every((w) => typeof w === "number");
|
|
172
|
-
if (kind === "embeddedObject") return isContentEmbeddedObject(value);
|
|
173
|
-
return false;
|
|
174
|
-
}
|
|
175
|
-
const ContentBlockSchema = zod.z.custom(isContentBlock);
|
|
176
|
-
const ContentEmbeddedObjectSchema = zod.z.custom(isContentEmbeddedObject);
|
|
177
|
-
const ContentEmbeddedObjectBlockSchema = zod.z.custom(isContentEmbeddedObjectBlock);
|
|
178
|
-
const ContentTableCellSchema = zod.z.object({
|
|
179
|
-
blocks: zod.z.array(ContentBlockSchema),
|
|
180
|
-
colSpan: zod.z.number().int().positive().optional(),
|
|
181
|
-
rowSpan: zod.z.number().int().positive().optional(),
|
|
182
|
-
background: ColorSchema.optional()
|
|
183
|
-
});
|
|
184
|
-
const ContentTableRowSchema = zod.z.object({
|
|
185
|
-
cells: zod.z.array(ContentTableCellSchema),
|
|
186
|
-
heightPt: zod.z.number().positive().optional()
|
|
187
|
-
});
|
|
188
|
-
const ContentTableSchema = zod.z.object({
|
|
189
|
-
kind: zod.z.literal("table"),
|
|
190
|
-
rows: zod.z.array(ContentTableRowSchema),
|
|
191
|
-
columnWidthsPt: zod.z.array(zod.z.number().positive()),
|
|
192
|
-
sourcePath: zod.z.string().optional()
|
|
193
|
-
});
|
|
194
|
-
const ContentSectionSchema = zod.z.object({
|
|
195
|
-
pageSize: PageSizeSchema,
|
|
196
|
-
margins: MarginsSchema,
|
|
197
|
-
blocks: zod.z.array(ContentBlockSchema)
|
|
198
|
-
});
|
|
199
|
-
const ContentShapeSchema = zod.z.object({
|
|
200
|
-
name: zod.z.string().optional(),
|
|
201
|
-
frame: BoxSchema,
|
|
202
|
-
rotationDeg: zod.z.number().optional(),
|
|
203
|
-
insetLeftPt: zod.z.number().nonnegative(),
|
|
204
|
-
insetTopPt: zod.z.number().nonnegative(),
|
|
205
|
-
insetRightPt: zod.z.number().nonnegative(),
|
|
206
|
-
insetBottomPt: zod.z.number().nonnegative(),
|
|
207
|
-
fontScale: zod.z.number().positive().optional(),
|
|
208
|
-
lineSpacingReduction: zod.z.number().nonnegative().optional(),
|
|
209
|
-
sourcePath: zod.z.string().optional(),
|
|
210
|
-
blocks: zod.z.array(ContentBlockSchema)
|
|
211
|
-
});
|
|
212
|
-
const ContentSlideSchema = zod.z.object({
|
|
213
|
-
size: PageSizeSchema,
|
|
214
|
-
shapes: zod.z.array(ContentShapeSchema),
|
|
215
|
-
notes: zod.z.string()
|
|
216
|
-
});
|
|
217
|
-
const ContentCellValueSchema = zod.z.discriminatedUnion("kind", [
|
|
218
|
-
zod.z.object({
|
|
219
|
-
kind: zod.z.literal("number"),
|
|
220
|
-
value: zod.z.number()
|
|
221
|
-
}),
|
|
222
|
-
zod.z.object({
|
|
223
|
-
kind: zod.z.literal("percentage"),
|
|
224
|
-
value: zod.z.number()
|
|
225
|
-
}),
|
|
226
|
-
zod.z.object({
|
|
227
|
-
kind: zod.z.literal("currency"),
|
|
228
|
-
value: zod.z.number(),
|
|
229
|
-
currency: zod.z.string().optional()
|
|
230
|
-
}),
|
|
231
|
-
zod.z.object({
|
|
232
|
-
kind: zod.z.literal("boolean"),
|
|
233
|
-
value: zod.z.boolean()
|
|
234
|
-
}),
|
|
235
|
-
zod.z.object({
|
|
236
|
-
kind: zod.z.literal("date"),
|
|
237
|
-
value: zod.z.string()
|
|
238
|
-
}),
|
|
239
|
-
zod.z.object({
|
|
240
|
-
kind: zod.z.literal("time"),
|
|
241
|
-
value: zod.z.string()
|
|
242
|
-
}),
|
|
243
|
-
zod.z.object({
|
|
244
|
-
kind: zod.z.literal("string"),
|
|
245
|
-
value: zod.z.string()
|
|
246
|
-
}),
|
|
247
|
-
zod.z.object({
|
|
248
|
-
kind: zod.z.literal("error"),
|
|
249
|
-
value: zod.z.string()
|
|
250
|
-
}),
|
|
251
|
-
zod.z.object({ kind: zod.z.literal("empty") })
|
|
252
|
-
]);
|
|
253
|
-
const ContentSheetCellSchema = zod.z.object({
|
|
254
|
-
row: zod.z.number().int().nonnegative(),
|
|
255
|
-
column: zod.z.number().int().nonnegative(),
|
|
256
|
-
value: ContentCellValueSchema,
|
|
257
|
-
formula: zod.z.string().optional(),
|
|
258
|
-
displayText: zod.z.string(),
|
|
259
|
-
runs: zod.z.array(ContentRunSchema).optional(),
|
|
260
|
-
colSpan: zod.z.number().int().positive().optional(),
|
|
261
|
-
rowSpan: zod.z.number().int().positive().optional()
|
|
262
|
-
});
|
|
263
|
-
const ContentSheetColumnSchema = zod.z.object({
|
|
264
|
-
index: zod.z.number().int().nonnegative(),
|
|
265
|
-
widthPt: zod.z.number().nonnegative(),
|
|
266
|
-
hidden: zod.z.boolean().optional()
|
|
267
|
-
});
|
|
268
|
-
const ContentSheetRowSchema = zod.z.object({
|
|
269
|
-
index: zod.z.number().int().nonnegative(),
|
|
270
|
-
heightPt: zod.z.number().nonnegative(),
|
|
271
|
-
hidden: zod.z.boolean().optional()
|
|
272
|
-
});
|
|
273
|
-
const ContentSheetPrintRangeSchema = zod.z.object({
|
|
274
|
-
startRow: zod.z.number().int().nonnegative(),
|
|
275
|
-
startColumn: zod.z.number().int().nonnegative(),
|
|
276
|
-
endRow: zod.z.number().int().nonnegative(),
|
|
277
|
-
endColumn: zod.z.number().int().nonnegative()
|
|
278
|
-
});
|
|
279
|
-
const ContentSheetRepeatRangeSchema = zod.z.object({
|
|
280
|
-
start: zod.z.number().int().nonnegative(),
|
|
281
|
-
end: zod.z.number().int().nonnegative()
|
|
282
|
-
});
|
|
283
|
-
const ContentSheetPrintSettingsSchema = zod.z.object({
|
|
284
|
-
pageSize: PageSizeSchema,
|
|
285
|
-
margins: MarginsSchema,
|
|
286
|
-
printRange: ContentSheetPrintRangeSchema.optional(),
|
|
287
|
-
scale: zod.z.number().positive().optional(),
|
|
288
|
-
fitToPages: zod.z.object({
|
|
289
|
-
width: zod.z.number().int().positive(),
|
|
290
|
-
height: zod.z.number().int().positive()
|
|
291
|
-
}).optional(),
|
|
292
|
-
repeatRows: ContentSheetRepeatRangeSchema.optional(),
|
|
293
|
-
repeatColumns: ContentSheetRepeatRangeSchema.optional(),
|
|
294
|
-
gridlines: zod.z.boolean(),
|
|
295
|
-
headers: zod.z.boolean(),
|
|
296
|
-
pageOrder: zod.z.enum(["downThenOver", "overThenDown"]),
|
|
297
|
-
manualBreaks: zod.z.object({
|
|
298
|
-
rows: zod.z.array(zod.z.number().int().nonnegative()),
|
|
299
|
-
columns: zod.z.array(zod.z.number().int().nonnegative())
|
|
300
|
-
}).optional()
|
|
301
|
-
});
|
|
302
|
-
const ContentSheetImageSchema = ContentImageBlockSchema.extend({
|
|
303
|
-
anchorRow: zod.z.number().int().nonnegative(),
|
|
304
|
-
anchorColumn: zod.z.number().int().nonnegative(),
|
|
305
|
-
offsetXPt: zod.z.number(),
|
|
306
|
-
offsetYPt: zod.z.number()
|
|
307
|
-
});
|
|
308
|
-
const ContentSheetSchema = zod.z.object({
|
|
309
|
-
name: zod.z.string(),
|
|
310
|
-
cells: zod.z.array(ContentSheetCellSchema),
|
|
311
|
-
columns: zod.z.array(ContentSheetColumnSchema),
|
|
312
|
-
rows: zod.z.array(ContentSheetRowSchema),
|
|
313
|
-
images: zod.z.array(ContentSheetImageSchema),
|
|
314
|
-
printSettings: ContentSheetPrintSettingsSchema,
|
|
315
|
-
embeddedObjects: zod.z.array(ContentEmbeddedObjectSchema).optional()
|
|
316
|
-
});
|
|
317
|
-
const ContentStrokeSchema = zod.z.object({
|
|
318
|
-
color: ColorSchema,
|
|
319
|
-
widthPt: zod.z.number().positive()
|
|
320
|
-
});
|
|
321
|
-
const ContentPathPointSchema = zod.z.object({
|
|
322
|
-
xPt: zod.z.number(),
|
|
323
|
-
yPt: zod.z.number()
|
|
324
|
-
});
|
|
325
|
-
const ContentPathSegmentSchema = zod.z.discriminatedUnion("kind", [zod.z.object({
|
|
326
|
-
kind: zod.z.literal("line"),
|
|
327
|
-
to: ContentPathPointSchema
|
|
328
|
-
}), zod.z.object({
|
|
329
|
-
kind: zod.z.literal("cubic"),
|
|
330
|
-
control1: ContentPathPointSchema,
|
|
331
|
-
control2: ContentPathPointSchema,
|
|
332
|
-
to: ContentPathPointSchema
|
|
333
|
-
})]);
|
|
334
|
-
const ContentSubpathSchema = zod.z.object({
|
|
335
|
-
start: ContentPathPointSchema,
|
|
336
|
-
segments: zod.z.array(ContentPathSegmentSchema),
|
|
337
|
-
closed: zod.z.boolean()
|
|
338
|
-
});
|
|
339
|
-
const ContentVectorSchema = zod.z.discriminatedUnion("kind", [
|
|
340
|
-
zod.z.object({
|
|
341
|
-
kind: zod.z.literal("rect"),
|
|
342
|
-
frame: BoxSchema,
|
|
343
|
-
fill: ColorSchema.optional(),
|
|
344
|
-
stroke: ContentStrokeSchema.optional(),
|
|
345
|
-
sourcePath: zod.z.string().optional()
|
|
346
|
-
}),
|
|
347
|
-
zod.z.object({
|
|
348
|
-
kind: zod.z.literal("ellipse"),
|
|
349
|
-
frame: BoxSchema,
|
|
350
|
-
fill: ColorSchema.optional(),
|
|
351
|
-
stroke: ContentStrokeSchema.optional(),
|
|
352
|
-
sourcePath: zod.z.string().optional()
|
|
353
|
-
}),
|
|
354
|
-
zod.z.object({
|
|
355
|
-
kind: zod.z.literal("line"),
|
|
356
|
-
from: ContentPathPointSchema,
|
|
357
|
-
to: ContentPathPointSchema,
|
|
358
|
-
stroke: ContentStrokeSchema,
|
|
359
|
-
sourcePath: zod.z.string().optional()
|
|
360
|
-
}),
|
|
361
|
-
zod.z.object({
|
|
362
|
-
kind: zod.z.literal("path"),
|
|
363
|
-
frame: BoxSchema,
|
|
364
|
-
subpaths: zod.z.array(ContentSubpathSchema),
|
|
365
|
-
fill: ColorSchema.optional(),
|
|
366
|
-
fillRule: zod.z.enum(["nonzero", "evenodd"]).optional(),
|
|
367
|
-
stroke: ContentStrokeSchema.optional(),
|
|
368
|
-
sourcePath: zod.z.string().optional()
|
|
369
|
-
})
|
|
370
|
-
]);
|
|
371
|
-
const ContentDrawPageSchema = zod.z.object({
|
|
372
|
-
size: PageSizeSchema,
|
|
373
|
-
shapes: zod.z.array(ContentShapeSchema),
|
|
374
|
-
vectors: zod.z.array(ContentVectorSchema)
|
|
375
|
-
});
|
|
376
|
-
const CONTENT_FORMAT_VERSION = 1;
|
|
377
|
-
const ContentDocumentSchema = zod.z.discriminatedUnion("kind", [
|
|
378
|
-
zod.z.object({
|
|
379
|
-
kind: zod.z.literal("wordprocessing"),
|
|
380
|
-
formatVersion: zod.z.literal(1),
|
|
381
|
-
metadata: LayoutMetadataSchema,
|
|
382
|
-
sections: zod.z.array(ContentSectionSchema)
|
|
383
|
-
}),
|
|
384
|
-
zod.z.object({
|
|
385
|
-
kind: zod.z.literal("presentation"),
|
|
386
|
-
formatVersion: zod.z.literal(1),
|
|
387
|
-
metadata: LayoutMetadataSchema,
|
|
388
|
-
slides: zod.z.array(ContentSlideSchema)
|
|
389
|
-
}),
|
|
390
|
-
zod.z.object({
|
|
391
|
-
kind: zod.z.literal("spreadsheet"),
|
|
392
|
-
formatVersion: zod.z.literal(1),
|
|
393
|
-
metadata: LayoutMetadataSchema,
|
|
394
|
-
sheets: zod.z.array(ContentSheetSchema)
|
|
395
|
-
}),
|
|
396
|
-
zod.z.object({
|
|
397
|
-
kind: zod.z.literal("drawing"),
|
|
398
|
-
formatVersion: zod.z.literal(1),
|
|
399
|
-
metadata: LayoutMetadataSchema,
|
|
400
|
-
pages: zod.z.array(ContentDrawPageSchema)
|
|
401
|
-
})
|
|
402
|
-
]);
|
|
403
|
-
//#endregion
|
|
404
|
-
//#region src/layout.ts
|
|
405
|
-
const LAYOUT_FORMAT_VERSION = 1;
|
|
406
|
-
const LayoutTextSchema = zod.z.object({
|
|
407
|
-
kind: zod.z.literal("text"),
|
|
408
|
-
text: zod.z.string(),
|
|
409
|
-
xPt: zod.z.number(),
|
|
410
|
-
yPt: zod.z.number(),
|
|
411
|
-
font: LayoutFontSchema,
|
|
412
|
-
sizePt: zod.z.number().positive(),
|
|
413
|
-
color: ColorSchema,
|
|
414
|
-
widthPt: zod.z.number().nonnegative().optional(),
|
|
415
|
-
rotationDeg: zod.z.number().optional(),
|
|
416
|
-
underline: zod.z.boolean().optional(),
|
|
417
|
-
sourcePath: zod.z.string().optional()
|
|
418
|
-
});
|
|
419
|
-
const LayoutImageSchema = zod.z.object({
|
|
420
|
-
kind: zod.z.literal("image"),
|
|
421
|
-
imageId: zod.z.string(),
|
|
422
|
-
xPt: zod.z.number(),
|
|
423
|
-
yPt: zod.z.number(),
|
|
424
|
-
widthPt: zod.z.number().positive(),
|
|
425
|
-
heightPt: zod.z.number().positive(),
|
|
426
|
-
rotationDeg: zod.z.number().optional(),
|
|
427
|
-
sourcePath: zod.z.string().optional()
|
|
428
|
-
});
|
|
429
|
-
const LayoutRectSchema = zod.z.object({
|
|
430
|
-
kind: zod.z.literal("rect"),
|
|
431
|
-
xPt: zod.z.number(),
|
|
432
|
-
yPt: zod.z.number(),
|
|
433
|
-
widthPt: zod.z.number().nonnegative(),
|
|
434
|
-
heightPt: zod.z.number().nonnegative(),
|
|
435
|
-
fill: ColorSchema.optional(),
|
|
436
|
-
stroke: zod.z.object({
|
|
437
|
-
color: ColorSchema,
|
|
438
|
-
widthPt: zod.z.number().positive()
|
|
439
|
-
}).optional(),
|
|
440
|
-
sourcePath: zod.z.string().optional()
|
|
441
|
-
});
|
|
442
|
-
const LayoutLineSchema = zod.z.object({
|
|
443
|
-
kind: zod.z.literal("line"),
|
|
444
|
-
x1Pt: zod.z.number(),
|
|
445
|
-
y1Pt: zod.z.number(),
|
|
446
|
-
x2Pt: zod.z.number(),
|
|
447
|
-
y2Pt: zod.z.number(),
|
|
448
|
-
color: ColorSchema,
|
|
449
|
-
widthPt: zod.z.number().positive(),
|
|
450
|
-
sourcePath: zod.z.string().optional()
|
|
451
|
-
});
|
|
452
|
-
const LayoutEllipseSchema = zod.z.object({
|
|
453
|
-
kind: zod.z.literal("ellipse"),
|
|
454
|
-
xPt: zod.z.number(),
|
|
455
|
-
yPt: zod.z.number(),
|
|
456
|
-
widthPt: zod.z.number().positive(),
|
|
457
|
-
heightPt: zod.z.number().positive(),
|
|
458
|
-
fill: ColorSchema.optional(),
|
|
459
|
-
stroke: zod.z.object({
|
|
460
|
-
color: ColorSchema,
|
|
461
|
-
widthPt: zod.z.number().positive()
|
|
462
|
-
}).optional(),
|
|
463
|
-
sourcePath: zod.z.string().optional()
|
|
464
|
-
});
|
|
465
|
-
const LayoutPathSegmentSchema = zod.z.discriminatedUnion("kind", [zod.z.object({
|
|
466
|
-
kind: zod.z.literal("line"),
|
|
467
|
-
xPt: zod.z.number(),
|
|
468
|
-
yPt: zod.z.number()
|
|
469
|
-
}), zod.z.object({
|
|
470
|
-
kind: zod.z.literal("cubic"),
|
|
471
|
-
c1xPt: zod.z.number(),
|
|
472
|
-
c1yPt: zod.z.number(),
|
|
473
|
-
c2xPt: zod.z.number(),
|
|
474
|
-
c2yPt: zod.z.number(),
|
|
475
|
-
xPt: zod.z.number(),
|
|
476
|
-
yPt: zod.z.number()
|
|
477
|
-
})]);
|
|
478
|
-
const LayoutSubpathSchema = zod.z.object({
|
|
479
|
-
startXPt: zod.z.number(),
|
|
480
|
-
startYPt: zod.z.number(),
|
|
481
|
-
segments: zod.z.array(LayoutPathSegmentSchema),
|
|
482
|
-
closed: zod.z.boolean()
|
|
483
|
-
});
|
|
484
|
-
const LayoutPathSchema = zod.z.object({
|
|
485
|
-
kind: zod.z.literal("path"),
|
|
486
|
-
subpaths: zod.z.array(LayoutSubpathSchema),
|
|
487
|
-
fill: ColorSchema.optional(),
|
|
488
|
-
fillRule: zod.z.enum(["nonzero", "evenodd"]).optional(),
|
|
489
|
-
stroke: zod.z.object({
|
|
490
|
-
color: ColorSchema,
|
|
491
|
-
widthPt: zod.z.number().positive()
|
|
492
|
-
}).optional(),
|
|
493
|
-
sourcePath: zod.z.string().optional()
|
|
494
|
-
});
|
|
495
|
-
const LayoutLinkSchema = zod.z.object({
|
|
496
|
-
kind: zod.z.literal("link"),
|
|
497
|
-
uri: zod.z.string(),
|
|
498
|
-
xPt: zod.z.number(),
|
|
499
|
-
yPt: zod.z.number(),
|
|
500
|
-
widthPt: zod.z.number().nonnegative(),
|
|
501
|
-
heightPt: zod.z.number().nonnegative(),
|
|
502
|
-
sourcePath: zod.z.string().optional()
|
|
503
|
-
});
|
|
504
|
-
const LayoutItemSchema = zod.z.discriminatedUnion("kind", [
|
|
505
|
-
LayoutTextSchema,
|
|
506
|
-
LayoutImageSchema,
|
|
507
|
-
LayoutRectSchema,
|
|
508
|
-
LayoutLineSchema,
|
|
509
|
-
LayoutEllipseSchema,
|
|
510
|
-
LayoutPathSchema,
|
|
511
|
-
LayoutLinkSchema
|
|
512
|
-
]);
|
|
513
|
-
const LayoutPageSchema = zod.z.object({
|
|
514
|
-
widthPt: zod.z.number().positive(),
|
|
515
|
-
heightPt: zod.z.number().positive(),
|
|
516
|
-
items: zod.z.array(LayoutItemSchema),
|
|
517
|
-
notes: zod.z.string().optional()
|
|
518
|
-
});
|
|
519
|
-
const LayoutImageAssetSchema = zod.z.object({
|
|
520
|
-
format: zod.z.enum(["png", "jpeg"]),
|
|
521
|
-
base64: zod.z.string(),
|
|
522
|
-
widthPx: zod.z.number().int().positive(),
|
|
523
|
-
heightPx: zod.z.number().int().positive()
|
|
524
|
-
});
|
|
525
|
-
const LayoutDocumentSchema = zod.z.object({
|
|
526
|
-
formatVersion: zod.z.literal(1),
|
|
527
|
-
metadata: LayoutMetadataSchema,
|
|
528
|
-
pages: zod.z.array(LayoutPageSchema),
|
|
529
|
-
images: zod.z.record(zod.z.string(), LayoutImageAssetSchema)
|
|
530
|
-
});
|
|
531
|
-
//#endregion
|
|
532
|
-
//#region src/package.ts
|
|
533
|
-
const DOCUMENT_PACKAGE_FORMAT_VERSION = 1;
|
|
534
|
-
const DocumentPackageSchema = zod.z.object({
|
|
535
|
-
formatVersion: zod.z.literal(1),
|
|
536
|
-
content: ContentDocumentSchema,
|
|
537
|
-
layout: LayoutDocumentSchema.optional()
|
|
538
|
-
});
|
|
539
|
-
//#endregion
|
|
540
|
-
//#region src/schema-io.ts
|
|
541
|
-
const SCHEMA_FILE_NAMES = {
|
|
542
|
-
DocumentPackage: "document-package.schema.json",
|
|
543
|
-
ContentDocument: "content-document.schema.json",
|
|
544
|
-
LayoutDocument: "layout-document.schema.json"
|
|
545
|
-
};
|
|
546
|
-
function schemaUriFor(kind) {
|
|
547
|
-
return `https://cdn.jsdelivr.net/npm/document-schema.js@1.9.0/schemas/${SCHEMA_FILE_NAMES[kind]}`;
|
|
548
|
-
}
|
|
549
|
-
const SCHEMA_URI_PATTERN = /^https:\/\/cdn\.jsdelivr\.net\/npm\/document-schema\.js@[^/]+\/schemas\/(document-package|content-document|layout-document)\.schema\.json$/;
|
|
550
|
-
function kindForFileStem(stem) {
|
|
551
|
-
switch (stem) {
|
|
552
|
-
case "document-package": return "DocumentPackage";
|
|
553
|
-
case "content-document": return "ContentDocument";
|
|
554
|
-
case "layout-document": return "LayoutDocument";
|
|
555
|
-
default: return;
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
function isRecord(value) {
|
|
559
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
560
|
-
}
|
|
561
|
-
function documentSchemaKindOf(value) {
|
|
562
|
-
if (!isRecord(value)) return void 0;
|
|
563
|
-
if (!("$schema" in value) || typeof value.$schema !== "string") return void 0;
|
|
564
|
-
const match = SCHEMA_URI_PATTERN.exec(value.$schema);
|
|
565
|
-
if (match === null) return void 0;
|
|
566
|
-
const stem = match[1];
|
|
567
|
-
if (stem === void 0) return void 0;
|
|
568
|
-
return kindForFileStem(stem);
|
|
569
|
-
}
|
|
570
|
-
function documentPackageWithSchema(value) {
|
|
571
|
-
return {
|
|
572
|
-
$schema: schemaUriFor("DocumentPackage"),
|
|
573
|
-
...value
|
|
574
|
-
};
|
|
575
|
-
}
|
|
576
|
-
function contentDocumentWithSchema(value) {
|
|
577
|
-
return {
|
|
578
|
-
$schema: schemaUriFor("ContentDocument"),
|
|
579
|
-
...value
|
|
580
|
-
};
|
|
581
|
-
}
|
|
582
|
-
function layoutDocumentWithSchema(value) {
|
|
583
|
-
return {
|
|
584
|
-
$schema: schemaUriFor("LayoutDocument"),
|
|
585
|
-
...value
|
|
586
|
-
};
|
|
587
|
-
}
|
|
588
|
-
var UnrecognizedDocumentSchemaError = class extends Error {
|
|
589
|
-
schema;
|
|
590
|
-
constructor(schema) {
|
|
591
|
-
super(`documentFromJson: value has no recognized "$schema" property (expected one of the three document-schema.js .schema.json URIs; found: ${JSON.stringify(schema)}).`);
|
|
592
|
-
this.name = "UnrecognizedDocumentSchemaError";
|
|
593
|
-
this.schema = schema;
|
|
594
|
-
}
|
|
595
|
-
};
|
|
596
|
-
function documentFromJson(value) {
|
|
597
|
-
const kind = documentSchemaKindOf(value);
|
|
598
|
-
if (kind === void 0) throw new UnrecognizedDocumentSchemaError(isRecord(value) ? value.$schema : void 0);
|
|
599
|
-
switch (kind) {
|
|
600
|
-
case "DocumentPackage": return {
|
|
601
|
-
kind,
|
|
602
|
-
value: DocumentPackageSchema.parse(value)
|
|
603
|
-
};
|
|
604
|
-
case "ContentDocument": return {
|
|
605
|
-
kind,
|
|
606
|
-
value: ContentDocumentSchema.parse(value)
|
|
607
|
-
};
|
|
608
|
-
case "LayoutDocument": return {
|
|
609
|
-
kind,
|
|
610
|
-
value: LayoutDocumentSchema.parse(value)
|
|
611
|
-
};
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
//#endregion
|
|
615
|
-
exports.AlignmentSchema = AlignmentSchema;
|
|
616
|
-
exports.BoxSchema = BoxSchema;
|
|
617
|
-
exports.COLOR_BLACK = COLOR_BLACK;
|
|
618
|
-
exports.CONTENT_FORMAT_VERSION = CONTENT_FORMAT_VERSION;
|
|
619
|
-
exports.ColorSchema = ColorSchema;
|
|
620
|
-
exports.ContentBlockSchema = ContentBlockSchema;
|
|
621
|
-
exports.ContentCellValueSchema = ContentCellValueSchema;
|
|
622
|
-
exports.ContentDocumentSchema = ContentDocumentSchema;
|
|
623
|
-
exports.ContentDrawPageSchema = ContentDrawPageSchema;
|
|
624
|
-
exports.ContentEmbeddedObjectBlockSchema = ContentEmbeddedObjectBlockSchema;
|
|
625
|
-
exports.ContentEmbeddedObjectSchema = ContentEmbeddedObjectSchema;
|
|
626
|
-
exports.ContentImageBlockSchema = ContentImageBlockSchema;
|
|
627
|
-
exports.ContentListMembershipSchema = ContentListMembershipSchema;
|
|
628
|
-
exports.ContentPageBreakSchema = ContentPageBreakSchema;
|
|
629
|
-
exports.ContentParagraphSchema = ContentParagraphSchema;
|
|
630
|
-
exports.ContentPathPointSchema = ContentPathPointSchema;
|
|
631
|
-
exports.ContentPathSegmentSchema = ContentPathSegmentSchema;
|
|
632
|
-
exports.ContentRunSchema = ContentRunSchema;
|
|
633
|
-
exports.ContentSectionSchema = ContentSectionSchema;
|
|
634
|
-
exports.ContentShapeSchema = ContentShapeSchema;
|
|
635
|
-
exports.ContentSheetCellSchema = ContentSheetCellSchema;
|
|
636
|
-
exports.ContentSheetColumnSchema = ContentSheetColumnSchema;
|
|
637
|
-
exports.ContentSheetImageSchema = ContentSheetImageSchema;
|
|
638
|
-
exports.ContentSheetPrintRangeSchema = ContentSheetPrintRangeSchema;
|
|
639
|
-
exports.ContentSheetPrintSettingsSchema = ContentSheetPrintSettingsSchema;
|
|
640
|
-
exports.ContentSheetRepeatRangeSchema = ContentSheetRepeatRangeSchema;
|
|
641
|
-
exports.ContentSheetRowSchema = ContentSheetRowSchema;
|
|
642
|
-
exports.ContentSheetSchema = ContentSheetSchema;
|
|
643
|
-
exports.ContentSlideSchema = ContentSlideSchema;
|
|
644
|
-
exports.ContentStrokeSchema = ContentStrokeSchema;
|
|
645
|
-
exports.ContentSubpathSchema = ContentSubpathSchema;
|
|
646
|
-
exports.ContentTableCellSchema = ContentTableCellSchema;
|
|
647
|
-
exports.ContentTableRowSchema = ContentTableRowSchema;
|
|
648
|
-
exports.ContentTableSchema = ContentTableSchema;
|
|
649
|
-
exports.ContentVectorSchema = ContentVectorSchema;
|
|
650
|
-
exports.DEFAULT_LAYOUT_FONT = DEFAULT_LAYOUT_FONT;
|
|
651
|
-
exports.DOCUMENT_PACKAGE_FORMAT_VERSION = DOCUMENT_PACKAGE_FORMAT_VERSION;
|
|
652
|
-
exports.DocumentPackageSchema = DocumentPackageSchema;
|
|
653
|
-
exports.LAYOUT_FORMAT_VERSION = LAYOUT_FORMAT_VERSION;
|
|
654
|
-
exports.LayoutDocumentSchema = LayoutDocumentSchema;
|
|
655
|
-
exports.LayoutEllipseSchema = LayoutEllipseSchema;
|
|
656
|
-
exports.LayoutFontSchema = LayoutFontSchema;
|
|
657
|
-
exports.LayoutImageAssetSchema = LayoutImageAssetSchema;
|
|
658
|
-
exports.LayoutImageSchema = LayoutImageSchema;
|
|
659
|
-
exports.LayoutItemSchema = LayoutItemSchema;
|
|
660
|
-
exports.LayoutLineSchema = LayoutLineSchema;
|
|
661
|
-
exports.LayoutLinkSchema = LayoutLinkSchema;
|
|
662
|
-
exports.LayoutMetadataSchema = LayoutMetadataSchema;
|
|
663
|
-
exports.LayoutPageSchema = LayoutPageSchema;
|
|
664
|
-
exports.LayoutPathSchema = LayoutPathSchema;
|
|
665
|
-
exports.LayoutPathSegmentSchema = LayoutPathSegmentSchema;
|
|
666
|
-
exports.LayoutRectSchema = LayoutRectSchema;
|
|
667
|
-
exports.LayoutSubpathSchema = LayoutSubpathSchema;
|
|
668
|
-
exports.LayoutTextSchema = LayoutTextSchema;
|
|
669
|
-
exports.MarginsSchema = MarginsSchema;
|
|
670
|
-
exports.PAGE_SIZE_A4 = PAGE_SIZE_A4;
|
|
671
|
-
exports.PAGE_SIZE_LETTER = PAGE_SIZE_LETTER;
|
|
672
|
-
exports.PageSizeSchema = PageSizeSchema;
|
|
673
|
-
exports.SCHEMA_FILE_NAMES = SCHEMA_FILE_NAMES;
|
|
674
|
-
exports.SLIDE_SIZE_STANDARD = SLIDE_SIZE_STANDARD;
|
|
675
|
-
exports.SLIDE_SIZE_WIDESCREEN = SLIDE_SIZE_WIDESCREEN;
|
|
676
|
-
exports.UnrecognizedDocumentSchemaError = UnrecognizedDocumentSchemaError;
|
|
677
|
-
exports.colorToRgbHex = colorToRgbHex;
|
|
678
|
-
exports.contentDocumentWithSchema = contentDocumentWithSchema;
|
|
679
|
-
exports.documentFromJson = documentFromJson;
|
|
680
|
-
exports.documentPackageWithSchema = documentPackageWithSchema;
|
|
681
|
-
exports.documentSchemaKindOf = documentSchemaKindOf;
|
|
682
|
-
exports.isContentBlock = isContentBlock;
|
|
683
|
-
exports.layoutDocumentWithSchema = layoutDocumentWithSchema;
|
|
684
|
-
exports.rgbHexToColor = rgbHexToColor;
|
|
685
|
-
exports.schemaUriFor = schemaUriFor;
|
|
2
|
+
const require_color = require("./color.cjs");
|
|
3
|
+
const require_geometry = require("./geometry.cjs");
|
|
4
|
+
const require_metadata = require("./metadata.cjs");
|
|
5
|
+
const require_style = require("./style.cjs");
|
|
6
|
+
const require_content = require("./content.cjs");
|
|
7
|
+
const require_layout = require("./layout.cjs");
|
|
8
|
+
const require_package = require("./package.cjs");
|
|
9
|
+
const require_schema_io = require("./schema-io.cjs");
|
|
10
|
+
exports.AlignmentSchema = require_style.AlignmentSchema;
|
|
11
|
+
exports.BoxSchema = require_geometry.BoxSchema;
|
|
12
|
+
exports.COLOR_BLACK = require_color.COLOR_BLACK;
|
|
13
|
+
exports.CONTENT_FORMAT_VERSION = require_content.CONTENT_FORMAT_VERSION;
|
|
14
|
+
exports.ColorSchema = require_color.ColorSchema;
|
|
15
|
+
exports.ContentBlockSchema = require_content.ContentBlockSchema;
|
|
16
|
+
exports.ContentCellValueSchema = require_content.ContentCellValueSchema;
|
|
17
|
+
exports.ContentDocumentSchema = require_content.ContentDocumentSchema;
|
|
18
|
+
exports.ContentDrawPageSchema = require_content.ContentDrawPageSchema;
|
|
19
|
+
exports.ContentEmbeddedObjectBlockSchema = require_content.ContentEmbeddedObjectBlockSchema;
|
|
20
|
+
exports.ContentEmbeddedObjectSchema = require_content.ContentEmbeddedObjectSchema;
|
|
21
|
+
exports.ContentImageBlockSchema = require_content.ContentImageBlockSchema;
|
|
22
|
+
exports.ContentListMembershipSchema = require_content.ContentListMembershipSchema;
|
|
23
|
+
exports.ContentPageBreakSchema = require_content.ContentPageBreakSchema;
|
|
24
|
+
exports.ContentParagraphSchema = require_content.ContentParagraphSchema;
|
|
25
|
+
exports.ContentPathPointSchema = require_content.ContentPathPointSchema;
|
|
26
|
+
exports.ContentPathSegmentSchema = require_content.ContentPathSegmentSchema;
|
|
27
|
+
exports.ContentRunSchema = require_content.ContentRunSchema;
|
|
28
|
+
exports.ContentSectionSchema = require_content.ContentSectionSchema;
|
|
29
|
+
exports.ContentShapeSchema = require_content.ContentShapeSchema;
|
|
30
|
+
exports.ContentSheetCellSchema = require_content.ContentSheetCellSchema;
|
|
31
|
+
exports.ContentSheetColumnSchema = require_content.ContentSheetColumnSchema;
|
|
32
|
+
exports.ContentSheetImageSchema = require_content.ContentSheetImageSchema;
|
|
33
|
+
exports.ContentSheetPrintRangeSchema = require_content.ContentSheetPrintRangeSchema;
|
|
34
|
+
exports.ContentSheetPrintSettingsSchema = require_content.ContentSheetPrintSettingsSchema;
|
|
35
|
+
exports.ContentSheetRepeatRangeSchema = require_content.ContentSheetRepeatRangeSchema;
|
|
36
|
+
exports.ContentSheetRowSchema = require_content.ContentSheetRowSchema;
|
|
37
|
+
exports.ContentSheetSchema = require_content.ContentSheetSchema;
|
|
38
|
+
exports.ContentSlideSchema = require_content.ContentSlideSchema;
|
|
39
|
+
exports.ContentStrokeSchema = require_content.ContentStrokeSchema;
|
|
40
|
+
exports.ContentSubpathSchema = require_content.ContentSubpathSchema;
|
|
41
|
+
exports.ContentTableCellSchema = require_content.ContentTableCellSchema;
|
|
42
|
+
exports.ContentTableRowSchema = require_content.ContentTableRowSchema;
|
|
43
|
+
exports.ContentTableSchema = require_content.ContentTableSchema;
|
|
44
|
+
exports.ContentVectorSchema = require_content.ContentVectorSchema;
|
|
45
|
+
exports.DEFAULT_LAYOUT_FONT = require_style.DEFAULT_LAYOUT_FONT;
|
|
46
|
+
exports.DOCUMENT_PACKAGE_FORMAT_VERSION = require_package.DOCUMENT_PACKAGE_FORMAT_VERSION;
|
|
47
|
+
exports.DocumentPackageSchema = require_package.DocumentPackageSchema;
|
|
48
|
+
exports.LAYOUT_FORMAT_VERSION = require_layout.LAYOUT_FORMAT_VERSION;
|
|
49
|
+
exports.LayoutDocumentSchema = require_layout.LayoutDocumentSchema;
|
|
50
|
+
exports.LayoutEllipseSchema = require_layout.LayoutEllipseSchema;
|
|
51
|
+
exports.LayoutFontSchema = require_style.LayoutFontSchema;
|
|
52
|
+
exports.LayoutImageAssetSchema = require_layout.LayoutImageAssetSchema;
|
|
53
|
+
exports.LayoutImageSchema = require_layout.LayoutImageSchema;
|
|
54
|
+
exports.LayoutItemSchema = require_layout.LayoutItemSchema;
|
|
55
|
+
exports.LayoutLineSchema = require_layout.LayoutLineSchema;
|
|
56
|
+
exports.LayoutLinkSchema = require_layout.LayoutLinkSchema;
|
|
57
|
+
exports.LayoutMetadataSchema = require_metadata.LayoutMetadataSchema;
|
|
58
|
+
exports.LayoutPageSchema = require_layout.LayoutPageSchema;
|
|
59
|
+
exports.LayoutPathSchema = require_layout.LayoutPathSchema;
|
|
60
|
+
exports.LayoutPathSegmentSchema = require_layout.LayoutPathSegmentSchema;
|
|
61
|
+
exports.LayoutRectSchema = require_layout.LayoutRectSchema;
|
|
62
|
+
exports.LayoutSubpathSchema = require_layout.LayoutSubpathSchema;
|
|
63
|
+
exports.LayoutTextSchema = require_layout.LayoutTextSchema;
|
|
64
|
+
exports.MarginsSchema = require_geometry.MarginsSchema;
|
|
65
|
+
exports.PAGE_SIZE_A4 = require_geometry.PAGE_SIZE_A4;
|
|
66
|
+
exports.PAGE_SIZE_LETTER = require_geometry.PAGE_SIZE_LETTER;
|
|
67
|
+
exports.PageSizeSchema = require_geometry.PageSizeSchema;
|
|
68
|
+
exports.SCHEMA_FILE_NAMES = require_schema_io.SCHEMA_FILE_NAMES;
|
|
69
|
+
exports.SLIDE_SIZE_STANDARD = require_geometry.SLIDE_SIZE_STANDARD;
|
|
70
|
+
exports.SLIDE_SIZE_WIDESCREEN = require_geometry.SLIDE_SIZE_WIDESCREEN;
|
|
71
|
+
exports.UnrecognizedDocumentSchemaError = require_schema_io.UnrecognizedDocumentSchemaError;
|
|
72
|
+
exports.colorToRgbHex = require_color.colorToRgbHex;
|
|
73
|
+
exports.contentDocumentWithSchema = require_schema_io.contentDocumentWithSchema;
|
|
74
|
+
exports.documentFromJson = require_schema_io.documentFromJson;
|
|
75
|
+
exports.documentPackageWithSchema = require_schema_io.documentPackageWithSchema;
|
|
76
|
+
exports.documentSchemaKindOf = require_schema_io.documentSchemaKindOf;
|
|
77
|
+
exports.isContentBlock = require_content.isContentBlock;
|
|
78
|
+
exports.layoutDocumentWithSchema = require_schema_io.layoutDocumentWithSchema;
|
|
79
|
+
exports.rgbHexToColor = require_color.rgbHexToColor;
|
|
80
|
+
exports.schemaUriFor = require_schema_io.schemaUriFor;
|