documents.js 1.34.0 → 1.34.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,194 +1,8 @@
1
- import { Alignment, Attribute, AttributeSchema, BinaryPart, BinaryPartSchema, Box, Box as Box$1, COLOR_BLACK, Color as LayoutColor, Comment, CommentSchema, CompactAttrPairs, CompactPackage, CompactPackageSchema, CompactPart, CompactPartSchema, CompactXmlNode, CompactXmlNodeSchema, DefinedName, DefinedNameSchema, Margins, PAGE_SIZE_A4, PAGE_SIZE_LETTER, Package, Package as Package$1, PackageSchema, PageSize, Part, PartSchema, Relationship, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, XmlCdata, XmlCdataSchema, XmlComment, XmlCommentSchema, XmlDeclaration, XmlDeclarationSchema, XmlElement, XmlElement as XmlElement$1, XmlElementSchema, XmlNode, XmlNode as XmlNode$1, XmlNodeSchema, XmlPart, XmlPartSchema, XmlPi, XmlPiSchema, XmlText, XmlTextSchema, attr, base64ToBytes, buildXml, bytesToBase64, childrenWithTag, compactCodec, compactPackageCodec, decodeCompactPackage, decodeEntities, decodePackage, elementsWithTag, encodeCompactPackage, encodePackage, fromCompact, isCompactXmlNode, isXmlNode, packageCodec, parsePackage, parseXml, resolveRelationships, rgbHexToColor, rootElement, serializePackage, textContent, toCompact, unzipPackage, walk, xmlCodec, zipPackage } from "ooxml.js";
1
+ import { Attribute, AttributeSchema, BinaryPart, BinaryPartSchema, Comment, CommentSchema, CompactAttrPairs, CompactPackage, CompactPackageSchema, CompactPart, CompactPartSchema, CompactXmlNode, CompactXmlNodeSchema, DefinedName, DefinedNameSchema, Package, Package as Package$1, PackageSchema, Part, PartSchema, Relationship, XmlCdata, XmlCdataSchema, XmlComment, XmlCommentSchema, XmlDeclaration, XmlDeclarationSchema, XmlElement, XmlElement as XmlElement$1, XmlElementSchema, XmlNode, XmlNode as XmlNode$1, XmlNodeSchema, XmlPart, XmlPartSchema, XmlPi, XmlPiSchema, XmlText, XmlTextSchema, attr, base64ToBytes, buildXml, bytesToBase64, childrenWithTag, compactCodec, compactPackageCodec, decodeCompactPackage, decodeEntities, decodePackage, elementsWithTag, encodeCompactPackage, encodePackage, fromCompact, isCompactXmlNode, isXmlNode, packageCodec, parsePackage, parseXml, resolveRelationships, rootElement, serializePackage, textContent, toCompact, unzipPackage, walk, xmlCodec, zipPackage } from "ooxml.js";
2
+ import { Alignment, Box, Box as Box$1, COLOR_BLACK, Color as LayoutColor, ContentBlock, ContentBlockSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembership as ContentListMembership$1, ContentPageBreak, ContentPageBreakSchema, ContentParagraph, ContentParagraphSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSlide, ContentSlideSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, DEFAULT_LAYOUT_FONT, LAYOUT_FORMAT_VERSION, LayoutDocument, LayoutDocument as LayoutDocument$1, LayoutEllipse, LayoutFont, LayoutImage, LayoutImageAsset, LayoutItem, LayoutLine, LayoutLink, LayoutMetadata, LayoutPage, LayoutRect, LayoutText, Margins, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSize, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, isContentBlock, rgbHexToColor } from "document-content-model";
2
3
  import { z } from "zod";
3
4
  //#region src/model/content.d.ts
4
5
  declare const CONTENT_FORMAT_VERSION = 1;
5
- declare const ContentRunSchema: z.ZodObject<{
6
- text: z.ZodString;
7
- bold: z.ZodOptional<z.ZodBoolean>;
8
- italic: z.ZodOptional<z.ZodBoolean>;
9
- underline: z.ZodOptional<z.ZodBoolean>;
10
- strike: z.ZodOptional<z.ZodBoolean>;
11
- fontFamily: z.ZodOptional<z.ZodString>;
12
- sizePt: z.ZodOptional<z.ZodNumber>;
13
- color: z.ZodOptional<z.ZodObject<{
14
- r: z.ZodNumber;
15
- g: z.ZodNumber;
16
- b: z.ZodNumber;
17
- }, z.core.$strip>>;
18
- hyperlink: z.ZodOptional<z.ZodString>;
19
- }, z.core.$strip>;
20
- type ContentRun = z.infer<typeof ContentRunSchema>;
21
- declare const ContentListMembershipSchema: z.ZodObject<{
22
- numId: z.ZodString;
23
- level: z.ZodNumber;
24
- }, z.core.$strip>;
25
- type ContentListMembership = z.infer<typeof ContentListMembershipSchema>;
26
- declare const ContentParagraphSchema: z.ZodObject<{
27
- kind: z.ZodLiteral<"paragraph">;
28
- runs: z.ZodArray<z.ZodObject<{
29
- text: z.ZodString;
30
- bold: z.ZodOptional<z.ZodBoolean>;
31
- italic: z.ZodOptional<z.ZodBoolean>;
32
- underline: z.ZodOptional<z.ZodBoolean>;
33
- strike: z.ZodOptional<z.ZodBoolean>;
34
- fontFamily: z.ZodOptional<z.ZodString>;
35
- sizePt: z.ZodOptional<z.ZodNumber>;
36
- color: z.ZodOptional<z.ZodObject<{
37
- r: z.ZodNumber;
38
- g: z.ZodNumber;
39
- b: z.ZodNumber;
40
- }, z.core.$strip>>;
41
- hyperlink: z.ZodOptional<z.ZodString>;
42
- }, z.core.$strip>>;
43
- styleId: z.ZodOptional<z.ZodString>;
44
- alignment: z.ZodOptional<z.ZodEnum<{
45
- left: "left";
46
- center: "center";
47
- right: "right";
48
- justify: "justify";
49
- }>>;
50
- list: z.ZodOptional<z.ZodObject<{
51
- numId: z.ZodString;
52
- level: z.ZodNumber;
53
- }, z.core.$strip>>;
54
- spacingBeforePt: z.ZodOptional<z.ZodNumber>;
55
- spacingAfterPt: z.ZodOptional<z.ZodNumber>;
56
- lineSpacing: z.ZodOptional<z.ZodNumber>;
57
- indentLeftPt: z.ZodOptional<z.ZodNumber>;
58
- indentFirstLinePt: z.ZodOptional<z.ZodNumber>;
59
- }, z.core.$strip>;
60
- type ContentParagraph = z.infer<typeof ContentParagraphSchema>;
61
- declare const ContentImageBlockSchema: z.ZodObject<{
62
- kind: z.ZodLiteral<"image">;
63
- format: z.ZodEnum<{
64
- png: "png";
65
- jpeg: "jpeg";
66
- }>;
67
- base64: z.ZodString;
68
- widthPt: z.ZodNumber;
69
- heightPt: z.ZodNumber;
70
- altText: z.ZodOptional<z.ZodString>;
71
- }, z.core.$strip>;
72
- type ContentImageBlock = z.infer<typeof ContentImageBlockSchema>;
73
- declare const ContentPageBreakSchema: z.ZodObject<{
74
- kind: z.ZodLiteral<"pageBreak">;
75
- }, z.core.$strip>;
76
- type ContentPageBreak = z.infer<typeof ContentPageBreakSchema>;
77
- interface ContentTableCell {
78
- blocks: ContentBlock[];
79
- colSpan?: number;
80
- rowSpan?: number;
81
- background?: LayoutColor;
82
- }
83
- interface ContentTableRow {
84
- cells: ContentTableCell[];
85
- heightPt?: number;
86
- }
87
- interface ContentTable {
88
- kind: 'table';
89
- rows: ContentTableRow[];
90
- columnWidthsPt: number[];
91
- }
92
- type ContentBlock = ContentParagraph | ContentTable | ContentImageBlock | ContentPageBreak;
93
- declare function isContentBlock(value: unknown): value is ContentBlock;
94
- declare const ContentBlockSchema: z.ZodCustom<ContentBlock, ContentBlock>;
95
- declare const ContentTableCellSchema: z.ZodObject<{
96
- blocks: z.ZodArray<z.ZodCustom<ContentBlock, ContentBlock>>;
97
- colSpan: z.ZodOptional<z.ZodNumber>;
98
- rowSpan: z.ZodOptional<z.ZodNumber>;
99
- background: z.ZodOptional<z.ZodObject<{
100
- r: z.ZodNumber;
101
- g: z.ZodNumber;
102
- b: z.ZodNumber;
103
- }, z.core.$strip>>;
104
- }, z.core.$strip>;
105
- declare const ContentTableRowSchema: z.ZodObject<{
106
- cells: z.ZodArray<z.ZodObject<{
107
- blocks: z.ZodArray<z.ZodCustom<ContentBlock, ContentBlock>>;
108
- colSpan: z.ZodOptional<z.ZodNumber>;
109
- rowSpan: z.ZodOptional<z.ZodNumber>;
110
- background: z.ZodOptional<z.ZodObject<{
111
- r: z.ZodNumber;
112
- g: z.ZodNumber;
113
- b: z.ZodNumber;
114
- }, z.core.$strip>>;
115
- }, z.core.$strip>>;
116
- heightPt: z.ZodOptional<z.ZodNumber>;
117
- }, z.core.$strip>;
118
- declare const ContentTableSchema: z.ZodObject<{
119
- kind: z.ZodLiteral<"table">;
120
- rows: z.ZodArray<z.ZodObject<{
121
- cells: z.ZodArray<z.ZodObject<{
122
- blocks: z.ZodArray<z.ZodCustom<ContentBlock, ContentBlock>>;
123
- colSpan: z.ZodOptional<z.ZodNumber>;
124
- rowSpan: z.ZodOptional<z.ZodNumber>;
125
- background: z.ZodOptional<z.ZodObject<{
126
- r: z.ZodNumber;
127
- g: z.ZodNumber;
128
- b: z.ZodNumber;
129
- }, z.core.$strip>>;
130
- }, z.core.$strip>>;
131
- heightPt: z.ZodOptional<z.ZodNumber>;
132
- }, z.core.$strip>>;
133
- columnWidthsPt: z.ZodArray<z.ZodNumber>;
134
- }, z.core.$strip>;
135
- declare const ContentSectionSchema: z.ZodObject<{
136
- pageSize: z.ZodObject<{
137
- widthPt: z.ZodNumber;
138
- heightPt: z.ZodNumber;
139
- }, z.core.$strip>;
140
- margins: z.ZodObject<{
141
- topPt: z.ZodNumber;
142
- rightPt: z.ZodNumber;
143
- bottomPt: z.ZodNumber;
144
- leftPt: z.ZodNumber;
145
- }, z.core.$strip>;
146
- blocks: z.ZodArray<z.ZodCustom<ContentBlock, ContentBlock>>;
147
- }, z.core.$strip>;
148
- type ContentSection = z.infer<typeof ContentSectionSchema>;
149
- declare const ContentShapeSchema: z.ZodObject<{
150
- name: z.ZodOptional<z.ZodString>;
151
- frame: z.ZodObject<{
152
- xPt: z.ZodNumber;
153
- yPt: z.ZodNumber;
154
- widthPt: z.ZodNumber;
155
- heightPt: z.ZodNumber;
156
- }, z.core.$strip>;
157
- rotationDeg: z.ZodOptional<z.ZodNumber>;
158
- insetLeftPt: z.ZodNumber;
159
- insetTopPt: z.ZodNumber;
160
- insetRightPt: z.ZodNumber;
161
- insetBottomPt: z.ZodNumber;
162
- fontScale: z.ZodOptional<z.ZodNumber>;
163
- lineSpacingReduction: z.ZodOptional<z.ZodNumber>;
164
- blocks: z.ZodArray<z.ZodCustom<ContentBlock, ContentBlock>>;
165
- }, z.core.$strip>;
166
- type ContentShape = z.infer<typeof ContentShapeSchema>;
167
- declare const ContentSlideSchema: z.ZodObject<{
168
- size: z.ZodObject<{
169
- widthPt: z.ZodNumber;
170
- heightPt: z.ZodNumber;
171
- }, z.core.$strip>;
172
- shapes: z.ZodArray<z.ZodObject<{
173
- name: z.ZodOptional<z.ZodString>;
174
- frame: z.ZodObject<{
175
- xPt: z.ZodNumber;
176
- yPt: z.ZodNumber;
177
- widthPt: z.ZodNumber;
178
- heightPt: z.ZodNumber;
179
- }, z.core.$strip>;
180
- rotationDeg: z.ZodOptional<z.ZodNumber>;
181
- insetLeftPt: z.ZodNumber;
182
- insetTopPt: z.ZodNumber;
183
- insetRightPt: z.ZodNumber;
184
- insetBottomPt: z.ZodNumber;
185
- fontScale: z.ZodOptional<z.ZodNumber>;
186
- lineSpacingReduction: z.ZodOptional<z.ZodNumber>;
187
- blocks: z.ZodArray<z.ZodCustom<ContentBlock, ContentBlock>>;
188
- }, z.core.$strip>>;
189
- notes: z.ZodString;
190
- }, z.core.$strip>;
191
- type ContentSlide = z.infer<typeof ContentSlideSchema>;
192
6
  declare const ContentDocumentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
193
7
  kind: z.ZodLiteral<"wordprocessing">;
194
8
  formatVersion: z.ZodLiteral<1>;
@@ -213,7 +27,7 @@ declare const ContentDocumentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
213
27
  bottomPt: z.ZodNumber;
214
28
  leftPt: z.ZodNumber;
215
29
  }, z.core.$strip>;
216
- blocks: z.ZodArray<z.ZodCustom<ContentBlock, ContentBlock>>;
30
+ blocks: z.ZodArray<z.ZodCustom<import("document-content-model").ContentBlock, import("document-content-model").ContentBlock>>;
217
31
  }, z.core.$strip>>;
218
32
  }, z.core.$strip>, z.ZodObject<{
219
33
  kind: z.ZodLiteral<"presentation">;
@@ -248,465 +62,16 @@ declare const ContentDocumentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
248
62
  insetBottomPt: z.ZodNumber;
249
63
  fontScale: z.ZodOptional<z.ZodNumber>;
250
64
  lineSpacingReduction: z.ZodOptional<z.ZodNumber>;
251
- blocks: z.ZodArray<z.ZodCustom<ContentBlock, ContentBlock>>;
65
+ blocks: z.ZodArray<z.ZodCustom<import("document-content-model").ContentBlock, import("document-content-model").ContentBlock>>;
252
66
  }, z.core.$strip>>;
253
67
  notes: z.ZodString;
254
68
  }, z.core.$strip>>;
255
69
  }, z.core.$strip>], "kind">;
256
70
  type ContentDocument = z.infer<typeof ContentDocumentSchema>;
257
71
  //#endregion
258
- //#region src/model/layout.d.ts
259
- declare const LAYOUT_FORMAT_VERSION = 1;
260
- declare const LayoutTextSchema: z.ZodObject<{
261
- kind: z.ZodLiteral<"text">;
262
- text: z.ZodString;
263
- xPt: z.ZodNumber;
264
- yPt: z.ZodNumber;
265
- font: z.ZodObject<{
266
- family: z.ZodString;
267
- weight: z.ZodEnum<{
268
- bold: "bold";
269
- normal: "normal";
270
- }>;
271
- style: z.ZodEnum<{
272
- italic: "italic";
273
- normal: "normal";
274
- }>;
275
- }, z.core.$strip>;
276
- sizePt: z.ZodNumber;
277
- color: z.ZodObject<{
278
- r: z.ZodNumber;
279
- g: z.ZodNumber;
280
- b: z.ZodNumber;
281
- }, z.core.$strip>;
282
- widthPt: z.ZodOptional<z.ZodNumber>;
283
- rotationDeg: z.ZodOptional<z.ZodNumber>;
284
- underline: z.ZodOptional<z.ZodBoolean>;
285
- }, z.core.$strip>;
286
- type LayoutText = z.infer<typeof LayoutTextSchema>;
287
- declare const LayoutImageSchema: z.ZodObject<{
288
- kind: z.ZodLiteral<"image">;
289
- imageId: z.ZodString;
290
- xPt: z.ZodNumber;
291
- yPt: z.ZodNumber;
292
- widthPt: z.ZodNumber;
293
- heightPt: z.ZodNumber;
294
- rotationDeg: z.ZodOptional<z.ZodNumber>;
295
- }, z.core.$strip>;
296
- type LayoutImage = z.infer<typeof LayoutImageSchema>;
297
- declare const LayoutRectSchema: z.ZodObject<{
298
- kind: z.ZodLiteral<"rect">;
299
- xPt: z.ZodNumber;
300
- yPt: z.ZodNumber;
301
- widthPt: z.ZodNumber;
302
- heightPt: z.ZodNumber;
303
- fill: z.ZodOptional<z.ZodObject<{
304
- r: z.ZodNumber;
305
- g: z.ZodNumber;
306
- b: z.ZodNumber;
307
- }, z.core.$strip>>;
308
- stroke: z.ZodOptional<z.ZodObject<{
309
- color: z.ZodObject<{
310
- r: z.ZodNumber;
311
- g: z.ZodNumber;
312
- b: z.ZodNumber;
313
- }, z.core.$strip>;
314
- widthPt: z.ZodNumber;
315
- }, z.core.$strip>>;
316
- }, z.core.$strip>;
317
- type LayoutRect = z.infer<typeof LayoutRectSchema>;
318
- declare const LayoutLineSchema: z.ZodObject<{
319
- kind: z.ZodLiteral<"line">;
320
- x1Pt: z.ZodNumber;
321
- y1Pt: z.ZodNumber;
322
- x2Pt: z.ZodNumber;
323
- y2Pt: z.ZodNumber;
324
- color: z.ZodObject<{
325
- r: z.ZodNumber;
326
- g: z.ZodNumber;
327
- b: z.ZodNumber;
328
- }, z.core.$strip>;
329
- widthPt: z.ZodNumber;
330
- }, z.core.$strip>;
331
- type LayoutLine = z.infer<typeof LayoutLineSchema>;
332
- declare const LayoutEllipseSchema: z.ZodObject<{
333
- kind: z.ZodLiteral<"ellipse">;
334
- xPt: z.ZodNumber;
335
- yPt: z.ZodNumber;
336
- widthPt: z.ZodNumber;
337
- heightPt: z.ZodNumber;
338
- fill: z.ZodOptional<z.ZodObject<{
339
- r: z.ZodNumber;
340
- g: z.ZodNumber;
341
- b: z.ZodNumber;
342
- }, z.core.$strip>>;
343
- stroke: z.ZodOptional<z.ZodObject<{
344
- color: z.ZodObject<{
345
- r: z.ZodNumber;
346
- g: z.ZodNumber;
347
- b: z.ZodNumber;
348
- }, z.core.$strip>;
349
- widthPt: z.ZodNumber;
350
- }, z.core.$strip>>;
351
- }, z.core.$strip>;
352
- type LayoutEllipse = z.infer<typeof LayoutEllipseSchema>;
353
- declare const LayoutLinkSchema: z.ZodObject<{
354
- kind: z.ZodLiteral<"link">;
355
- uri: z.ZodString;
356
- xPt: z.ZodNumber;
357
- yPt: z.ZodNumber;
358
- widthPt: z.ZodNumber;
359
- heightPt: z.ZodNumber;
360
- }, z.core.$strip>;
361
- type LayoutLink = z.infer<typeof LayoutLinkSchema>;
362
- declare const LayoutItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
363
- kind: z.ZodLiteral<"text">;
364
- text: z.ZodString;
365
- xPt: z.ZodNumber;
366
- yPt: z.ZodNumber;
367
- font: z.ZodObject<{
368
- family: z.ZodString;
369
- weight: z.ZodEnum<{
370
- bold: "bold";
371
- normal: "normal";
372
- }>;
373
- style: z.ZodEnum<{
374
- italic: "italic";
375
- normal: "normal";
376
- }>;
377
- }, z.core.$strip>;
378
- sizePt: z.ZodNumber;
379
- color: z.ZodObject<{
380
- r: z.ZodNumber;
381
- g: z.ZodNumber;
382
- b: z.ZodNumber;
383
- }, z.core.$strip>;
384
- widthPt: z.ZodOptional<z.ZodNumber>;
385
- rotationDeg: z.ZodOptional<z.ZodNumber>;
386
- underline: z.ZodOptional<z.ZodBoolean>;
387
- }, z.core.$strip>, z.ZodObject<{
388
- kind: z.ZodLiteral<"image">;
389
- imageId: z.ZodString;
390
- xPt: z.ZodNumber;
391
- yPt: z.ZodNumber;
392
- widthPt: z.ZodNumber;
393
- heightPt: z.ZodNumber;
394
- rotationDeg: z.ZodOptional<z.ZodNumber>;
395
- }, z.core.$strip>, z.ZodObject<{
396
- kind: z.ZodLiteral<"rect">;
397
- xPt: z.ZodNumber;
398
- yPt: z.ZodNumber;
399
- widthPt: z.ZodNumber;
400
- heightPt: z.ZodNumber;
401
- fill: z.ZodOptional<z.ZodObject<{
402
- r: z.ZodNumber;
403
- g: z.ZodNumber;
404
- b: z.ZodNumber;
405
- }, z.core.$strip>>;
406
- stroke: z.ZodOptional<z.ZodObject<{
407
- color: z.ZodObject<{
408
- r: z.ZodNumber;
409
- g: z.ZodNumber;
410
- b: z.ZodNumber;
411
- }, z.core.$strip>;
412
- widthPt: z.ZodNumber;
413
- }, z.core.$strip>>;
414
- }, z.core.$strip>, z.ZodObject<{
415
- kind: z.ZodLiteral<"line">;
416
- x1Pt: z.ZodNumber;
417
- y1Pt: z.ZodNumber;
418
- x2Pt: z.ZodNumber;
419
- y2Pt: z.ZodNumber;
420
- color: z.ZodObject<{
421
- r: z.ZodNumber;
422
- g: z.ZodNumber;
423
- b: z.ZodNumber;
424
- }, z.core.$strip>;
425
- widthPt: z.ZodNumber;
426
- }, z.core.$strip>, z.ZodObject<{
427
- kind: z.ZodLiteral<"ellipse">;
428
- xPt: z.ZodNumber;
429
- yPt: z.ZodNumber;
430
- widthPt: z.ZodNumber;
431
- heightPt: z.ZodNumber;
432
- fill: z.ZodOptional<z.ZodObject<{
433
- r: z.ZodNumber;
434
- g: z.ZodNumber;
435
- b: z.ZodNumber;
436
- }, z.core.$strip>>;
437
- stroke: z.ZodOptional<z.ZodObject<{
438
- color: z.ZodObject<{
439
- r: z.ZodNumber;
440
- g: z.ZodNumber;
441
- b: z.ZodNumber;
442
- }, z.core.$strip>;
443
- widthPt: z.ZodNumber;
444
- }, z.core.$strip>>;
445
- }, z.core.$strip>, z.ZodObject<{
446
- kind: z.ZodLiteral<"link">;
447
- uri: z.ZodString;
448
- xPt: z.ZodNumber;
449
- yPt: z.ZodNumber;
450
- widthPt: z.ZodNumber;
451
- heightPt: z.ZodNumber;
452
- }, z.core.$strip>], "kind">;
453
- type LayoutItem = z.infer<typeof LayoutItemSchema>;
454
- declare const LayoutPageSchema: z.ZodObject<{
455
- widthPt: z.ZodNumber;
456
- heightPt: z.ZodNumber;
457
- items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
458
- kind: z.ZodLiteral<"text">;
459
- text: z.ZodString;
460
- xPt: z.ZodNumber;
461
- yPt: z.ZodNumber;
462
- font: z.ZodObject<{
463
- family: z.ZodString;
464
- weight: z.ZodEnum<{
465
- bold: "bold";
466
- normal: "normal";
467
- }>;
468
- style: z.ZodEnum<{
469
- italic: "italic";
470
- normal: "normal";
471
- }>;
472
- }, z.core.$strip>;
473
- sizePt: z.ZodNumber;
474
- color: z.ZodObject<{
475
- r: z.ZodNumber;
476
- g: z.ZodNumber;
477
- b: z.ZodNumber;
478
- }, z.core.$strip>;
479
- widthPt: z.ZodOptional<z.ZodNumber>;
480
- rotationDeg: z.ZodOptional<z.ZodNumber>;
481
- underline: z.ZodOptional<z.ZodBoolean>;
482
- }, z.core.$strip>, z.ZodObject<{
483
- kind: z.ZodLiteral<"image">;
484
- imageId: z.ZodString;
485
- xPt: z.ZodNumber;
486
- yPt: z.ZodNumber;
487
- widthPt: z.ZodNumber;
488
- heightPt: z.ZodNumber;
489
- rotationDeg: z.ZodOptional<z.ZodNumber>;
490
- }, z.core.$strip>, z.ZodObject<{
491
- kind: z.ZodLiteral<"rect">;
492
- xPt: z.ZodNumber;
493
- yPt: z.ZodNumber;
494
- widthPt: z.ZodNumber;
495
- heightPt: z.ZodNumber;
496
- fill: z.ZodOptional<z.ZodObject<{
497
- r: z.ZodNumber;
498
- g: z.ZodNumber;
499
- b: z.ZodNumber;
500
- }, z.core.$strip>>;
501
- stroke: z.ZodOptional<z.ZodObject<{
502
- color: z.ZodObject<{
503
- r: z.ZodNumber;
504
- g: z.ZodNumber;
505
- b: z.ZodNumber;
506
- }, z.core.$strip>;
507
- widthPt: z.ZodNumber;
508
- }, z.core.$strip>>;
509
- }, z.core.$strip>, z.ZodObject<{
510
- kind: z.ZodLiteral<"line">;
511
- x1Pt: z.ZodNumber;
512
- y1Pt: z.ZodNumber;
513
- x2Pt: z.ZodNumber;
514
- y2Pt: z.ZodNumber;
515
- color: z.ZodObject<{
516
- r: z.ZodNumber;
517
- g: z.ZodNumber;
518
- b: z.ZodNumber;
519
- }, z.core.$strip>;
520
- widthPt: z.ZodNumber;
521
- }, z.core.$strip>, z.ZodObject<{
522
- kind: z.ZodLiteral<"ellipse">;
523
- xPt: z.ZodNumber;
524
- yPt: z.ZodNumber;
525
- widthPt: z.ZodNumber;
526
- heightPt: z.ZodNumber;
527
- fill: z.ZodOptional<z.ZodObject<{
528
- r: z.ZodNumber;
529
- g: z.ZodNumber;
530
- b: z.ZodNumber;
531
- }, z.core.$strip>>;
532
- stroke: z.ZodOptional<z.ZodObject<{
533
- color: z.ZodObject<{
534
- r: z.ZodNumber;
535
- g: z.ZodNumber;
536
- b: z.ZodNumber;
537
- }, z.core.$strip>;
538
- widthPt: z.ZodNumber;
539
- }, z.core.$strip>>;
540
- }, z.core.$strip>, z.ZodObject<{
541
- kind: z.ZodLiteral<"link">;
542
- uri: z.ZodString;
543
- xPt: z.ZodNumber;
544
- yPt: z.ZodNumber;
545
- widthPt: z.ZodNumber;
546
- heightPt: z.ZodNumber;
547
- }, z.core.$strip>], "kind">>;
548
- notes: z.ZodOptional<z.ZodString>;
549
- }, z.core.$strip>;
550
- type LayoutPage = z.infer<typeof LayoutPageSchema>;
551
- declare const LayoutImageAssetSchema: z.ZodObject<{
552
- format: z.ZodEnum<{
553
- png: "png";
554
- jpeg: "jpeg";
555
- }>;
556
- base64: z.ZodString;
557
- widthPx: z.ZodNumber;
558
- heightPx: z.ZodNumber;
559
- }, z.core.$strip>;
560
- type LayoutImageAsset = z.infer<typeof LayoutImageAssetSchema>;
561
- declare const LayoutMetadataSchema: z.ZodObject<{
562
- title: z.ZodOptional<z.ZodString>;
563
- author: z.ZodOptional<z.ZodString>;
564
- subject: z.ZodOptional<z.ZodString>;
565
- keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
566
- creator: z.ZodOptional<z.ZodString>;
567
- producer: z.ZodOptional<z.ZodString>;
568
- createdIso: z.ZodOptional<z.ZodString>;
569
- modifiedIso: z.ZodOptional<z.ZodString>;
570
- }, z.core.$strip>;
571
- type LayoutMetadata = z.infer<typeof LayoutMetadataSchema>;
572
- declare const LayoutDocumentSchema: z.ZodObject<{
573
- formatVersion: z.ZodLiteral<1>;
574
- metadata: z.ZodObject<{
575
- title: z.ZodOptional<z.ZodString>;
576
- author: z.ZodOptional<z.ZodString>;
577
- subject: z.ZodOptional<z.ZodString>;
578
- keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
579
- creator: z.ZodOptional<z.ZodString>;
580
- producer: z.ZodOptional<z.ZodString>;
581
- createdIso: z.ZodOptional<z.ZodString>;
582
- modifiedIso: z.ZodOptional<z.ZodString>;
583
- }, z.core.$strip>;
584
- pages: z.ZodArray<z.ZodObject<{
585
- widthPt: z.ZodNumber;
586
- heightPt: z.ZodNumber;
587
- items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
588
- kind: z.ZodLiteral<"text">;
589
- text: z.ZodString;
590
- xPt: z.ZodNumber;
591
- yPt: z.ZodNumber;
592
- font: z.ZodObject<{
593
- family: z.ZodString;
594
- weight: z.ZodEnum<{
595
- bold: "bold";
596
- normal: "normal";
597
- }>;
598
- style: z.ZodEnum<{
599
- italic: "italic";
600
- normal: "normal";
601
- }>;
602
- }, z.core.$strip>;
603
- sizePt: z.ZodNumber;
604
- color: z.ZodObject<{
605
- r: z.ZodNumber;
606
- g: z.ZodNumber;
607
- b: z.ZodNumber;
608
- }, z.core.$strip>;
609
- widthPt: z.ZodOptional<z.ZodNumber>;
610
- rotationDeg: z.ZodOptional<z.ZodNumber>;
611
- underline: z.ZodOptional<z.ZodBoolean>;
612
- }, z.core.$strip>, z.ZodObject<{
613
- kind: z.ZodLiteral<"image">;
614
- imageId: z.ZodString;
615
- xPt: z.ZodNumber;
616
- yPt: z.ZodNumber;
617
- widthPt: z.ZodNumber;
618
- heightPt: z.ZodNumber;
619
- rotationDeg: z.ZodOptional<z.ZodNumber>;
620
- }, z.core.$strip>, z.ZodObject<{
621
- kind: z.ZodLiteral<"rect">;
622
- xPt: z.ZodNumber;
623
- yPt: z.ZodNumber;
624
- widthPt: z.ZodNumber;
625
- heightPt: z.ZodNumber;
626
- fill: z.ZodOptional<z.ZodObject<{
627
- r: z.ZodNumber;
628
- g: z.ZodNumber;
629
- b: z.ZodNumber;
630
- }, z.core.$strip>>;
631
- stroke: z.ZodOptional<z.ZodObject<{
632
- color: z.ZodObject<{
633
- r: z.ZodNumber;
634
- g: z.ZodNumber;
635
- b: z.ZodNumber;
636
- }, z.core.$strip>;
637
- widthPt: z.ZodNumber;
638
- }, z.core.$strip>>;
639
- }, z.core.$strip>, z.ZodObject<{
640
- kind: z.ZodLiteral<"line">;
641
- x1Pt: z.ZodNumber;
642
- y1Pt: z.ZodNumber;
643
- x2Pt: z.ZodNumber;
644
- y2Pt: z.ZodNumber;
645
- color: z.ZodObject<{
646
- r: z.ZodNumber;
647
- g: z.ZodNumber;
648
- b: z.ZodNumber;
649
- }, z.core.$strip>;
650
- widthPt: z.ZodNumber;
651
- }, z.core.$strip>, z.ZodObject<{
652
- kind: z.ZodLiteral<"ellipse">;
653
- xPt: z.ZodNumber;
654
- yPt: z.ZodNumber;
655
- widthPt: z.ZodNumber;
656
- heightPt: z.ZodNumber;
657
- fill: z.ZodOptional<z.ZodObject<{
658
- r: z.ZodNumber;
659
- g: z.ZodNumber;
660
- b: z.ZodNumber;
661
- }, z.core.$strip>>;
662
- stroke: z.ZodOptional<z.ZodObject<{
663
- color: z.ZodObject<{
664
- r: z.ZodNumber;
665
- g: z.ZodNumber;
666
- b: z.ZodNumber;
667
- }, z.core.$strip>;
668
- widthPt: z.ZodNumber;
669
- }, z.core.$strip>>;
670
- }, z.core.$strip>, z.ZodObject<{
671
- kind: z.ZodLiteral<"link">;
672
- uri: z.ZodString;
673
- xPt: z.ZodNumber;
674
- yPt: z.ZodNumber;
675
- widthPt: z.ZodNumber;
676
- heightPt: z.ZodNumber;
677
- }, z.core.$strip>], "kind">>;
678
- notes: z.ZodOptional<z.ZodString>;
679
- }, z.core.$strip>>;
680
- images: z.ZodRecord<z.ZodString, z.ZodObject<{
681
- format: z.ZodEnum<{
682
- png: "png";
683
- jpeg: "jpeg";
684
- }>;
685
- base64: z.ZodString;
686
- widthPx: z.ZodNumber;
687
- heightPx: z.ZodNumber;
688
- }, z.core.$strip>>;
689
- }, z.core.$strip>;
690
- type LayoutDocument = z.infer<typeof LayoutDocumentSchema>;
691
- //#endregion
692
72
  //#region src/model/geometry.d.ts
693
73
  declare function flipY(box: Box$1, containerHeightPt: number): Box$1;
694
74
  //#endregion
695
- //#region src/model/style.d.ts
696
- declare const LayoutFontSchema: z.ZodObject<{
697
- family: z.ZodString;
698
- weight: z.ZodEnum<{
699
- bold: "bold";
700
- normal: "normal";
701
- }>;
702
- style: z.ZodEnum<{
703
- italic: "italic";
704
- normal: "normal";
705
- }>;
706
- }, z.core.$strip>;
707
- type LayoutFont = z.infer<typeof LayoutFontSchema>;
708
- declare const DEFAULT_LAYOUT_FONT: LayoutFont;
709
- //#endregion
710
75
  //#region src/model/bytes.d.ts
711
76
  declare const DocxBytesSchema: z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
712
77
  declare const PptxBytesSchema: z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
@@ -788,8 +153,8 @@ declare class DocxParagraph {
788
153
  set styleId(value: string | undefined);
789
154
  get alignment(): 'left' | 'center' | 'right' | 'justify' | undefined;
790
155
  set alignment(value: 'left' | 'center' | 'right' | 'justify' | undefined);
791
- get list(): ContentListMembership | undefined;
792
- set list(value: ContentListMembership | undefined);
156
+ get list(): ContentListMembership$1 | undefined;
157
+ set list(value: ContentListMembership$1 | undefined);
793
158
  insertImageAfter(image: ImageInit$1): void;
794
159
  remove(): void;
795
160
  }
@@ -951,7 +316,7 @@ interface ReadPdfOptions {
951
316
  readonly sink?: PdfDiagnosticSink;
952
317
  readonly signal?: AbortSignal;
953
318
  }
954
- declare function readPdf(bytes: Uint8Array<ArrayBuffer>, options?: ReadPdfOptions): LayoutDocument;
319
+ declare function readPdf(bytes: Uint8Array<ArrayBuffer>, options?: ReadPdfOptions): LayoutDocument$1;
955
320
  //#endregion
956
321
  //#region src/pdf/winansi.d.ts
957
322
  interface WinAnsiSubstitution {
@@ -967,7 +332,7 @@ interface WritePdfOptions {
967
332
  readonly pageIndex: number;
968
333
  }) => void;
969
334
  }
970
- declare function writePdf(doc: LayoutDocument, options?: WritePdfOptions): Uint8Array<ArrayBuffer>;
335
+ declare function writePdf(doc: LayoutDocument$1, options?: WritePdfOptions): Uint8Array<ArrayBuffer>;
971
336
  //#endregion
972
337
  //#region src/pdf/codec.d.ts
973
338
  declare const pdfCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodObject<{
@@ -993,12 +358,12 @@ declare const pdfCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Arr
993
358
  font: z.ZodObject<{
994
359
  family: z.ZodString;
995
360
  weight: z.ZodEnum<{
996
- bold: "bold";
997
361
  normal: "normal";
362
+ bold: "bold";
998
363
  }>;
999
364
  style: z.ZodEnum<{
1000
- italic: "italic";
1001
365
  normal: "normal";
366
+ italic: "italic";
1002
367
  }>;
1003
368
  }, z.core.$strip>;
1004
369
  sizePt: z.ZodNumber;
@@ -1116,7 +481,7 @@ interface EngineLayoutOptions {
1116
481
  type WordprocessingContentDocument = Extract<ContentDocument, {
1117
482
  kind: 'wordprocessing';
1118
483
  }>;
1119
- declare function convertWordprocessingToLayout(doc: WordprocessingContentDocument, options: EngineLayoutOptions): LayoutDocument;
484
+ declare function convertWordprocessingToLayout(doc: WordprocessingContentDocument, options: EngineLayoutOptions): LayoutDocument$1;
1120
485
  //#endregion
1121
486
  //#region src/layout/slides.d.ts
1122
487
  interface SlidesLayoutOptions {
@@ -1125,14 +490,14 @@ interface SlidesLayoutOptions {
1125
490
  type PresentationContentDocument = Extract<ContentDocument, {
1126
491
  kind: 'presentation';
1127
492
  }>;
1128
- declare function convertPresentationToLayout(doc: PresentationContentDocument, options: SlidesLayoutOptions): LayoutDocument;
493
+ declare function convertPresentationToLayout(doc: PresentationContentDocument, options: SlidesLayoutOptions): LayoutDocument$1;
1129
494
  //#endregion
1130
495
  //#region src/layout/reconstruct.d.ts
1131
496
  interface ReconstructOptions {
1132
497
  readonly signal?: AbortSignal;
1133
498
  }
1134
- declare function reconstructWordprocessing(doc: LayoutDocument, options?: ReconstructOptions): ContentDocument;
1135
- declare function reconstructPresentation(doc: LayoutDocument, options?: ReconstructOptions): ContentDocument;
499
+ declare function reconstructWordprocessing(doc: LayoutDocument$1, options?: ReconstructOptions): ContentDocument;
500
+ declare function reconstructPresentation(doc: LayoutDocument$1, options?: ReconstructOptions): ContentDocument;
1136
501
  //#endregion
1137
502
  //#region src/convert/convert.d.ts
1138
503
  interface DocumentToPdfOptions {