ooxml.js 0.0.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,581 @@
1
+ import { z } from "zod";
2
+ //#region src/model/node.d.ts
3
+ declare const AttributeSchema: z.ZodObject<{
4
+ name: z.ZodString;
5
+ value: z.ZodString;
6
+ }, z.core.$strip>;
7
+ type Attribute = z.infer<typeof AttributeSchema>;
8
+ declare const XmlTextSchema: z.ZodObject<{
9
+ type: z.ZodLiteral<"text">;
10
+ value: z.ZodString;
11
+ }, z.core.$strip>;
12
+ type XmlText = z.infer<typeof XmlTextSchema>;
13
+ declare const XmlCdataSchema: z.ZodObject<{
14
+ type: z.ZodLiteral<"cdata">;
15
+ value: z.ZodString;
16
+ }, z.core.$strip>;
17
+ type XmlCdata = z.infer<typeof XmlCdataSchema>;
18
+ declare const XmlCommentSchema: z.ZodObject<{
19
+ type: z.ZodLiteral<"comment">;
20
+ value: z.ZodString;
21
+ }, z.core.$strip>;
22
+ type XmlComment = z.infer<typeof XmlCommentSchema>;
23
+ declare const XmlDeclarationSchema: z.ZodObject<{
24
+ type: z.ZodLiteral<"declaration">;
25
+ attributes: z.ZodArray<z.ZodObject<{
26
+ name: z.ZodString;
27
+ value: z.ZodString;
28
+ }, z.core.$strip>>;
29
+ }, z.core.$strip>;
30
+ type XmlDeclaration = z.infer<typeof XmlDeclarationSchema>;
31
+ declare const XmlPiSchema: z.ZodObject<{
32
+ type: z.ZodLiteral<"pi">;
33
+ target: z.ZodString;
34
+ content: z.ZodString;
35
+ }, z.core.$strip>;
36
+ type XmlPi = z.infer<typeof XmlPiSchema>;
37
+ interface XmlElement {
38
+ type: 'element';
39
+ tag: string;
40
+ attributes: Attribute[];
41
+ children: XmlNode[];
42
+ }
43
+ type XmlNode = XmlText | XmlCdata | XmlComment | XmlDeclaration | XmlPi | XmlElement;
44
+ declare function isXmlNode(value: unknown): value is XmlNode;
45
+ declare const XmlElementSchema: z.ZodObject<{
46
+ type: z.ZodLiteral<"element">;
47
+ tag: z.ZodString;
48
+ attributes: z.ZodArray<z.ZodObject<{
49
+ name: z.ZodString;
50
+ value: z.ZodString;
51
+ }, z.core.$strip>>;
52
+ children: z.ZodArray<z.ZodCustom<XmlNode, XmlNode>>;
53
+ }, z.core.$strip>;
54
+ declare const XmlNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
55
+ type: z.ZodLiteral<"text">;
56
+ value: z.ZodString;
57
+ }, z.core.$strip>, z.ZodObject<{
58
+ type: z.ZodLiteral<"cdata">;
59
+ value: z.ZodString;
60
+ }, z.core.$strip>, z.ZodObject<{
61
+ type: z.ZodLiteral<"comment">;
62
+ value: z.ZodString;
63
+ }, z.core.$strip>, z.ZodObject<{
64
+ type: z.ZodLiteral<"declaration">;
65
+ attributes: z.ZodArray<z.ZodObject<{
66
+ name: z.ZodString;
67
+ value: z.ZodString;
68
+ }, z.core.$strip>>;
69
+ }, z.core.$strip>, z.ZodObject<{
70
+ type: z.ZodLiteral<"pi">;
71
+ target: z.ZodString;
72
+ content: z.ZodString;
73
+ }, z.core.$strip>, z.ZodObject<{
74
+ type: z.ZodLiteral<"element">;
75
+ tag: z.ZodString;
76
+ attributes: z.ZodArray<z.ZodObject<{
77
+ name: z.ZodString;
78
+ value: z.ZodString;
79
+ }, z.core.$strip>>;
80
+ children: z.ZodArray<z.ZodCustom<XmlNode, XmlNode>>;
81
+ }, z.core.$strip>], "type">;
82
+ //#endregion
83
+ //#region src/model/package.d.ts
84
+ declare const XmlPartSchema: z.ZodObject<{
85
+ kind: z.ZodLiteral<"xml">;
86
+ nodes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
87
+ type: z.ZodLiteral<"text">;
88
+ value: z.ZodString;
89
+ }, z.core.$strip>, z.ZodObject<{
90
+ type: z.ZodLiteral<"cdata">;
91
+ value: z.ZodString;
92
+ }, z.core.$strip>, z.ZodObject<{
93
+ type: z.ZodLiteral<"comment">;
94
+ value: z.ZodString;
95
+ }, z.core.$strip>, z.ZodObject<{
96
+ type: z.ZodLiteral<"declaration">;
97
+ attributes: z.ZodArray<z.ZodObject<{
98
+ name: z.ZodString;
99
+ value: z.ZodString;
100
+ }, z.core.$strip>>;
101
+ }, z.core.$strip>, z.ZodObject<{
102
+ type: z.ZodLiteral<"pi">;
103
+ target: z.ZodString;
104
+ content: z.ZodString;
105
+ }, z.core.$strip>, z.ZodObject<{
106
+ type: z.ZodLiteral<"element">;
107
+ tag: z.ZodString;
108
+ attributes: z.ZodArray<z.ZodObject<{
109
+ name: z.ZodString;
110
+ value: z.ZodString;
111
+ }, z.core.$strip>>;
112
+ children: z.ZodArray<z.ZodCustom<XmlNode, XmlNode>>;
113
+ }, z.core.$strip>], "type">>;
114
+ }, z.core.$strip>;
115
+ type XmlPart = z.infer<typeof XmlPartSchema>;
116
+ declare const BinaryPartSchema: z.ZodObject<{
117
+ kind: z.ZodLiteral<"binary">;
118
+ base64: z.ZodString;
119
+ }, z.core.$strip>;
120
+ type BinaryPart = z.infer<typeof BinaryPartSchema>;
121
+ declare const PartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
122
+ kind: z.ZodLiteral<"xml">;
123
+ nodes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
124
+ type: z.ZodLiteral<"text">;
125
+ value: z.ZodString;
126
+ }, z.core.$strip>, z.ZodObject<{
127
+ type: z.ZodLiteral<"cdata">;
128
+ value: z.ZodString;
129
+ }, z.core.$strip>, z.ZodObject<{
130
+ type: z.ZodLiteral<"comment">;
131
+ value: z.ZodString;
132
+ }, z.core.$strip>, z.ZodObject<{
133
+ type: z.ZodLiteral<"declaration">;
134
+ attributes: z.ZodArray<z.ZodObject<{
135
+ name: z.ZodString;
136
+ value: z.ZodString;
137
+ }, z.core.$strip>>;
138
+ }, z.core.$strip>, z.ZodObject<{
139
+ type: z.ZodLiteral<"pi">;
140
+ target: z.ZodString;
141
+ content: z.ZodString;
142
+ }, z.core.$strip>, z.ZodObject<{
143
+ type: z.ZodLiteral<"element">;
144
+ tag: z.ZodString;
145
+ attributes: z.ZodArray<z.ZodObject<{
146
+ name: z.ZodString;
147
+ value: z.ZodString;
148
+ }, z.core.$strip>>;
149
+ children: z.ZodArray<z.ZodCustom<XmlNode, XmlNode>>;
150
+ }, z.core.$strip>], "type">>;
151
+ }, z.core.$strip>, z.ZodObject<{
152
+ kind: z.ZodLiteral<"binary">;
153
+ base64: z.ZodString;
154
+ }, z.core.$strip>], "kind">;
155
+ type Part = z.infer<typeof PartSchema>;
156
+ declare const PackageSchema: z.ZodObject<{
157
+ parts: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
158
+ kind: z.ZodLiteral<"xml">;
159
+ nodes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
160
+ type: z.ZodLiteral<"text">;
161
+ value: z.ZodString;
162
+ }, z.core.$strip>, z.ZodObject<{
163
+ type: z.ZodLiteral<"cdata">;
164
+ value: z.ZodString;
165
+ }, z.core.$strip>, z.ZodObject<{
166
+ type: z.ZodLiteral<"comment">;
167
+ value: z.ZodString;
168
+ }, z.core.$strip>, z.ZodObject<{
169
+ type: z.ZodLiteral<"declaration">;
170
+ attributes: z.ZodArray<z.ZodObject<{
171
+ name: z.ZodString;
172
+ value: z.ZodString;
173
+ }, z.core.$strip>>;
174
+ }, z.core.$strip>, z.ZodObject<{
175
+ type: z.ZodLiteral<"pi">;
176
+ target: z.ZodString;
177
+ content: z.ZodString;
178
+ }, z.core.$strip>, z.ZodObject<{
179
+ type: z.ZodLiteral<"element">;
180
+ tag: z.ZodString;
181
+ attributes: z.ZodArray<z.ZodObject<{
182
+ name: z.ZodString;
183
+ value: z.ZodString;
184
+ }, z.core.$strip>>;
185
+ children: z.ZodArray<z.ZodCustom<XmlNode, XmlNode>>;
186
+ }, z.core.$strip>], "type">>;
187
+ }, z.core.$strip>, z.ZodObject<{
188
+ kind: z.ZodLiteral<"binary">;
189
+ base64: z.ZodString;
190
+ }, z.core.$strip>], "kind">>;
191
+ }, z.core.$strip>;
192
+ type Package = z.infer<typeof PackageSchema>;
193
+ //#endregion
194
+ //#region src/codec.d.ts
195
+ declare const xmlCodec: z.ZodCodec<z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
196
+ type: z.ZodLiteral<"text">;
197
+ value: z.ZodString;
198
+ }, z.core.$strip>, z.ZodObject<{
199
+ type: z.ZodLiteral<"cdata">;
200
+ value: z.ZodString;
201
+ }, z.core.$strip>, z.ZodObject<{
202
+ type: z.ZodLiteral<"comment">;
203
+ value: z.ZodString;
204
+ }, z.core.$strip>, z.ZodObject<{
205
+ type: z.ZodLiteral<"declaration">;
206
+ attributes: z.ZodArray<z.ZodObject<{
207
+ name: z.ZodString;
208
+ value: z.ZodString;
209
+ }, z.core.$strip>>;
210
+ }, z.core.$strip>, z.ZodObject<{
211
+ type: z.ZodLiteral<"pi">;
212
+ target: z.ZodString;
213
+ content: z.ZodString;
214
+ }, z.core.$strip>, z.ZodObject<{
215
+ type: z.ZodLiteral<"element">;
216
+ tag: z.ZodString;
217
+ attributes: z.ZodArray<z.ZodObject<{
218
+ name: z.ZodString;
219
+ value: z.ZodString;
220
+ }, z.core.$strip>>;
221
+ children: z.ZodArray<z.ZodCustom<XmlNode, XmlNode>>;
222
+ }, z.core.$strip>], "type">>>;
223
+ declare const packageCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodObject<{
224
+ parts: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
225
+ kind: z.ZodLiteral<"xml">;
226
+ nodes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
227
+ type: z.ZodLiteral<"text">;
228
+ value: z.ZodString;
229
+ }, z.core.$strip>, z.ZodObject<{
230
+ type: z.ZodLiteral<"cdata">;
231
+ value: z.ZodString;
232
+ }, z.core.$strip>, z.ZodObject<{
233
+ type: z.ZodLiteral<"comment">;
234
+ value: z.ZodString;
235
+ }, z.core.$strip>, z.ZodObject<{
236
+ type: z.ZodLiteral<"declaration">;
237
+ attributes: z.ZodArray<z.ZodObject<{
238
+ name: z.ZodString;
239
+ value: z.ZodString;
240
+ }, z.core.$strip>>;
241
+ }, z.core.$strip>, z.ZodObject<{
242
+ type: z.ZodLiteral<"pi">;
243
+ target: z.ZodString;
244
+ content: z.ZodString;
245
+ }, z.core.$strip>, z.ZodObject<{
246
+ type: z.ZodLiteral<"element">;
247
+ tag: z.ZodString;
248
+ attributes: z.ZodArray<z.ZodObject<{
249
+ name: z.ZodString;
250
+ value: z.ZodString;
251
+ }, z.core.$strip>>;
252
+ children: z.ZodArray<z.ZodCustom<XmlNode, XmlNode>>;
253
+ }, z.core.$strip>], "type">>;
254
+ }, z.core.$strip>, z.ZodObject<{
255
+ kind: z.ZodLiteral<"binary">;
256
+ base64: z.ZodString;
257
+ }, z.core.$strip>], "kind">>;
258
+ }, z.core.$strip>>;
259
+ declare function decodePackage(bytes: Uint8Array<ArrayBuffer>): Package;
260
+ declare function encodePackage(pkg: Package): Uint8Array<ArrayBuffer>;
261
+ //#endregion
262
+ //#region src/package-io/read.d.ts
263
+ declare function parsePackage(bytes: Uint8Array<ArrayBuffer>): Package;
264
+ //#endregion
265
+ //#region src/package-io/write.d.ts
266
+ declare function serializePackage(pkg: Package): Uint8Array<ArrayBuffer>;
267
+ //#endregion
268
+ //#region src/xml/parse.d.ts
269
+ declare function parseXml(xml: string): XmlNode[];
270
+ //#endregion
271
+ //#region src/xml/build.d.ts
272
+ declare function buildXml(nodes: XmlNode[]): string;
273
+ //#endregion
274
+ //#region src/zip.d.ts
275
+ declare function unzipPackage(bytes: Uint8Array<ArrayBuffer>): Record<string, Uint8Array<ArrayBuffer>>;
276
+ declare function zipPackage(parts: Record<string, Uint8Array<ArrayBuffer>>): Uint8Array<ArrayBuffer>;
277
+ //#endregion
278
+ //#region src/util/base64.d.ts
279
+ declare function bytesToBase64(bytes: Uint8Array<ArrayBuffer>): string;
280
+ declare function base64ToBytes(b64: string): Uint8Array<ArrayBuffer>;
281
+ //#endregion
282
+ //#region src/compact.d.ts
283
+ type CompactAttrPairs = number[];
284
+ type CompactElement = [0, number, CompactAttrPairs, CompactXmlNode[]];
285
+ type CompactText = [1, number];
286
+ type CompactCdata = [2, number];
287
+ type CompactComment = [3, number];
288
+ type CompactDeclaration = [4, CompactAttrPairs];
289
+ type CompactPi = [5, number, number];
290
+ type CompactXmlNode = CompactElement | CompactText | CompactCdata | CompactComment | CompactDeclaration | CompactPi;
291
+ declare function isCompactXmlNode(value: unknown): value is CompactXmlNode;
292
+ declare const CompactXmlNodeSchema: z.ZodCustom<CompactXmlNode, CompactXmlNode>;
293
+ declare const CompactPartSchema: z.ZodUnion<readonly [z.ZodArray<z.ZodCustom<CompactXmlNode, CompactXmlNode>>, z.ZodNumber]>;
294
+ type CompactPart = z.infer<typeof CompactPartSchema>;
295
+ declare const CompactPackageSchema: z.ZodObject<{
296
+ s: z.ZodArray<z.ZodString>;
297
+ p: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodArray<z.ZodCustom<CompactXmlNode, CompactXmlNode>>, z.ZodNumber]>>;
298
+ }, z.core.$strip>;
299
+ type CompactPackage = z.infer<typeof CompactPackageSchema>;
300
+ declare const compactCodec: z.ZodCodec<z.ZodObject<{
301
+ parts: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
302
+ kind: z.ZodLiteral<"xml">;
303
+ nodes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
304
+ type: z.ZodLiteral<"text">;
305
+ value: z.ZodString;
306
+ }, z.core.$strip>, z.ZodObject<{
307
+ type: z.ZodLiteral<"cdata">;
308
+ value: z.ZodString;
309
+ }, z.core.$strip>, z.ZodObject<{
310
+ type: z.ZodLiteral<"comment">;
311
+ value: z.ZodString;
312
+ }, z.core.$strip>, z.ZodObject<{
313
+ type: z.ZodLiteral<"declaration">;
314
+ attributes: z.ZodArray<z.ZodObject<{
315
+ name: z.ZodString;
316
+ value: z.ZodString;
317
+ }, z.core.$strip>>;
318
+ }, z.core.$strip>, z.ZodObject<{
319
+ type: z.ZodLiteral<"pi">;
320
+ target: z.ZodString;
321
+ content: z.ZodString;
322
+ }, z.core.$strip>, z.ZodObject<{
323
+ type: z.ZodLiteral<"element">;
324
+ tag: z.ZodString;
325
+ attributes: z.ZodArray<z.ZodObject<{
326
+ name: z.ZodString;
327
+ value: z.ZodString;
328
+ }, z.core.$strip>>;
329
+ children: z.ZodArray<z.ZodCustom<XmlNode, XmlNode>>;
330
+ }, z.core.$strip>], "type">>;
331
+ }, z.core.$strip>, z.ZodObject<{
332
+ kind: z.ZodLiteral<"binary">;
333
+ base64: z.ZodString;
334
+ }, z.core.$strip>], "kind">>;
335
+ }, z.core.$strip>, z.ZodObject<{
336
+ s: z.ZodArray<z.ZodString>;
337
+ p: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodArray<z.ZodCustom<CompactXmlNode, CompactXmlNode>>, z.ZodNumber]>>;
338
+ }, z.core.$strip>>;
339
+ declare function toCompact(pkg: Package): CompactPackage;
340
+ declare function fromCompact(cpkg: CompactPackage): Package;
341
+ declare const compactPackageCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodObject<{
342
+ s: z.ZodArray<z.ZodString>;
343
+ p: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodArray<z.ZodCustom<CompactXmlNode, CompactXmlNode>>, z.ZodNumber]>>;
344
+ }, z.core.$strip>>;
345
+ declare function decodeCompactPackage(bytes: Uint8Array<ArrayBuffer>): CompactPackage;
346
+ declare function encodeCompactPackage(cpkg: CompactPackage): Uint8Array<ArrayBuffer>;
347
+ //#endregion
348
+ //#region src/typed/docx.d.ts
349
+ declare const RunSchema: z.ZodObject<{
350
+ text: z.ZodString;
351
+ bold: z.ZodOptional<z.ZodBoolean>;
352
+ italic: z.ZodOptional<z.ZodBoolean>;
353
+ }, z.core.$strip>;
354
+ type Run = z.infer<typeof RunSchema>;
355
+ declare const ListMembershipSchema: z.ZodObject<{
356
+ numId: z.ZodString;
357
+ level: z.ZodNumber;
358
+ }, z.core.$strip>;
359
+ type ListMembership = z.infer<typeof ListMembershipSchema>;
360
+ declare const ParagraphSchema: z.ZodObject<{
361
+ runs: z.ZodArray<z.ZodObject<{
362
+ text: z.ZodString;
363
+ bold: z.ZodOptional<z.ZodBoolean>;
364
+ italic: z.ZodOptional<z.ZodBoolean>;
365
+ }, z.core.$strip>>;
366
+ list: z.ZodOptional<z.ZodObject<{
367
+ numId: z.ZodString;
368
+ level: z.ZodNumber;
369
+ }, z.core.$strip>>;
370
+ }, z.core.$strip>;
371
+ type Paragraph = z.infer<typeof ParagraphSchema>;
372
+ declare const TableCellSchema: z.ZodObject<{
373
+ paragraphs: z.ZodArray<z.ZodObject<{
374
+ runs: z.ZodArray<z.ZodObject<{
375
+ text: z.ZodString;
376
+ bold: z.ZodOptional<z.ZodBoolean>;
377
+ italic: z.ZodOptional<z.ZodBoolean>;
378
+ }, z.core.$strip>>;
379
+ list: z.ZodOptional<z.ZodObject<{
380
+ numId: z.ZodString;
381
+ level: z.ZodNumber;
382
+ }, z.core.$strip>>;
383
+ }, z.core.$strip>>;
384
+ }, z.core.$strip>;
385
+ type TableCell = z.infer<typeof TableCellSchema>;
386
+ declare const TableRowSchema: z.ZodObject<{
387
+ cells: z.ZodArray<z.ZodObject<{
388
+ paragraphs: z.ZodArray<z.ZodObject<{
389
+ runs: z.ZodArray<z.ZodObject<{
390
+ text: z.ZodString;
391
+ bold: z.ZodOptional<z.ZodBoolean>;
392
+ italic: z.ZodOptional<z.ZodBoolean>;
393
+ }, z.core.$strip>>;
394
+ list: z.ZodOptional<z.ZodObject<{
395
+ numId: z.ZodString;
396
+ level: z.ZodNumber;
397
+ }, z.core.$strip>>;
398
+ }, z.core.$strip>>;
399
+ }, z.core.$strip>>;
400
+ }, z.core.$strip>;
401
+ type TableRow = z.infer<typeof TableRowSchema>;
402
+ declare const TableSchema: z.ZodObject<{
403
+ rows: z.ZodArray<z.ZodObject<{
404
+ cells: z.ZodArray<z.ZodObject<{
405
+ paragraphs: z.ZodArray<z.ZodObject<{
406
+ runs: z.ZodArray<z.ZodObject<{
407
+ text: z.ZodString;
408
+ bold: z.ZodOptional<z.ZodBoolean>;
409
+ italic: z.ZodOptional<z.ZodBoolean>;
410
+ }, z.core.$strip>>;
411
+ list: z.ZodOptional<z.ZodObject<{
412
+ numId: z.ZodString;
413
+ level: z.ZodNumber;
414
+ }, z.core.$strip>>;
415
+ }, z.core.$strip>>;
416
+ }, z.core.$strip>>;
417
+ }, z.core.$strip>>;
418
+ }, z.core.$strip>;
419
+ type Table = z.infer<typeof TableSchema>;
420
+ declare const HyperlinkSchema: z.ZodObject<{
421
+ text: z.ZodString;
422
+ target: z.ZodString;
423
+ }, z.core.$strip>;
424
+ type Hyperlink = z.infer<typeof HyperlinkSchema>;
425
+ declare const CommentSchema: z.ZodObject<{
426
+ author: z.ZodOptional<z.ZodString>;
427
+ text: z.ZodString;
428
+ }, z.core.$strip>;
429
+ type Comment = z.infer<typeof CommentSchema>;
430
+ declare const FootnoteSchema: z.ZodObject<{
431
+ type: z.ZodOptional<z.ZodString>;
432
+ text: z.ZodString;
433
+ }, z.core.$strip>;
434
+ type Footnote = z.infer<typeof FootnoteSchema>;
435
+ declare const DocxDocumentSchema: z.ZodObject<{
436
+ paragraphs: z.ZodArray<z.ZodObject<{
437
+ runs: z.ZodArray<z.ZodObject<{
438
+ text: z.ZodString;
439
+ bold: z.ZodOptional<z.ZodBoolean>;
440
+ italic: z.ZodOptional<z.ZodBoolean>;
441
+ }, z.core.$strip>>;
442
+ list: z.ZodOptional<z.ZodObject<{
443
+ numId: z.ZodString;
444
+ level: z.ZodNumber;
445
+ }, z.core.$strip>>;
446
+ }, z.core.$strip>>;
447
+ tables: z.ZodArray<z.ZodObject<{
448
+ rows: z.ZodArray<z.ZodObject<{
449
+ cells: z.ZodArray<z.ZodObject<{
450
+ paragraphs: z.ZodArray<z.ZodObject<{
451
+ runs: z.ZodArray<z.ZodObject<{
452
+ text: z.ZodString;
453
+ bold: z.ZodOptional<z.ZodBoolean>;
454
+ italic: z.ZodOptional<z.ZodBoolean>;
455
+ }, z.core.$strip>>;
456
+ list: z.ZodOptional<z.ZodObject<{
457
+ numId: z.ZodString;
458
+ level: z.ZodNumber;
459
+ }, z.core.$strip>>;
460
+ }, z.core.$strip>>;
461
+ }, z.core.$strip>>;
462
+ }, z.core.$strip>>;
463
+ }, z.core.$strip>>;
464
+ hyperlinks: z.ZodArray<z.ZodObject<{
465
+ text: z.ZodString;
466
+ target: z.ZodString;
467
+ }, z.core.$strip>>;
468
+ comments: z.ZodArray<z.ZodObject<{
469
+ author: z.ZodOptional<z.ZodString>;
470
+ text: z.ZodString;
471
+ }, z.core.$strip>>;
472
+ footnotes: z.ZodArray<z.ZodObject<{
473
+ type: z.ZodOptional<z.ZodString>;
474
+ text: z.ZodString;
475
+ }, z.core.$strip>>;
476
+ headers: z.ZodArray<z.ZodString>;
477
+ footers: z.ZodArray<z.ZodString>;
478
+ }, z.core.$strip>;
479
+ type DocxDocument = z.infer<typeof DocxDocumentSchema>;
480
+ declare function readDocx(pkg: Package): DocxDocument;
481
+ //#endregion
482
+ //#region src/typed/pptx.d.ts
483
+ declare const ShapeSchema: z.ZodObject<{
484
+ text: z.ZodString;
485
+ }, z.core.$strip>;
486
+ type Shape = z.infer<typeof ShapeSchema>;
487
+ declare const PptxTableCellSchema: z.ZodObject<{
488
+ text: z.ZodString;
489
+ }, z.core.$strip>;
490
+ type PptxTableCell = z.infer<typeof PptxTableCellSchema>;
491
+ declare const PptxTableRowSchema: z.ZodObject<{
492
+ cells: z.ZodArray<z.ZodObject<{
493
+ text: z.ZodString;
494
+ }, z.core.$strip>>;
495
+ }, z.core.$strip>;
496
+ type PptxTableRow = z.infer<typeof PptxTableRowSchema>;
497
+ declare const PptxTableSchema: z.ZodObject<{
498
+ rows: z.ZodArray<z.ZodObject<{
499
+ cells: z.ZodArray<z.ZodObject<{
500
+ text: z.ZodString;
501
+ }, z.core.$strip>>;
502
+ }, z.core.$strip>>;
503
+ }, z.core.$strip>;
504
+ type PptxTable = z.infer<typeof PptxTableSchema>;
505
+ declare const SlideSchema: z.ZodObject<{
506
+ index: z.ZodNumber;
507
+ text: z.ZodString;
508
+ shapes: z.ZodArray<z.ZodObject<{
509
+ text: z.ZodString;
510
+ }, z.core.$strip>>;
511
+ tables: z.ZodArray<z.ZodObject<{
512
+ rows: z.ZodArray<z.ZodObject<{
513
+ cells: z.ZodArray<z.ZodObject<{
514
+ text: z.ZodString;
515
+ }, z.core.$strip>>;
516
+ }, z.core.$strip>>;
517
+ }, z.core.$strip>>;
518
+ notes: z.ZodString;
519
+ }, z.core.$strip>;
520
+ type Slide = z.infer<typeof SlideSchema>;
521
+ declare const PptxPresentationSchema: z.ZodObject<{
522
+ slides: z.ZodArray<z.ZodObject<{
523
+ index: z.ZodNumber;
524
+ text: z.ZodString;
525
+ shapes: z.ZodArray<z.ZodObject<{
526
+ text: z.ZodString;
527
+ }, z.core.$strip>>;
528
+ tables: z.ZodArray<z.ZodObject<{
529
+ rows: z.ZodArray<z.ZodObject<{
530
+ cells: z.ZodArray<z.ZodObject<{
531
+ text: z.ZodString;
532
+ }, z.core.$strip>>;
533
+ }, z.core.$strip>>;
534
+ }, z.core.$strip>>;
535
+ notes: z.ZodString;
536
+ }, z.core.$strip>>;
537
+ }, z.core.$strip>;
538
+ type PptxPresentation = z.infer<typeof PptxPresentationSchema>;
539
+ declare function readPptx(pkg: Package): PptxPresentation;
540
+ //#endregion
541
+ //#region src/typed/xlsx.d.ts
542
+ declare const XlsxCellSchema: z.ZodObject<{
543
+ reference: z.ZodString;
544
+ value: z.ZodString;
545
+ formula: z.ZodOptional<z.ZodString>;
546
+ }, z.core.$strip>;
547
+ type XlsxCell = z.infer<typeof XlsxCellSchema>;
548
+ declare const XlsxSheetSchema: z.ZodObject<{
549
+ name: z.ZodString;
550
+ cells: z.ZodArray<z.ZodObject<{
551
+ reference: z.ZodString;
552
+ value: z.ZodString;
553
+ formula: z.ZodOptional<z.ZodString>;
554
+ }, z.core.$strip>>;
555
+ mergedRanges: z.ZodArray<z.ZodString>;
556
+ }, z.core.$strip>;
557
+ type XlsxSheet = z.infer<typeof XlsxSheetSchema>;
558
+ declare const DefinedNameSchema: z.ZodObject<{
559
+ name: z.ZodString;
560
+ refersTo: z.ZodString;
561
+ }, z.core.$strip>;
562
+ type DefinedName = z.infer<typeof DefinedNameSchema>;
563
+ declare const XlsxWorkbookSchema: z.ZodObject<{
564
+ sheets: z.ZodArray<z.ZodObject<{
565
+ name: z.ZodString;
566
+ cells: z.ZodArray<z.ZodObject<{
567
+ reference: z.ZodString;
568
+ value: z.ZodString;
569
+ formula: z.ZodOptional<z.ZodString>;
570
+ }, z.core.$strip>>;
571
+ mergedRanges: z.ZodArray<z.ZodString>;
572
+ }, z.core.$strip>>;
573
+ definedNames: z.ZodArray<z.ZodObject<{
574
+ name: z.ZodString;
575
+ refersTo: z.ZodString;
576
+ }, z.core.$strip>>;
577
+ }, z.core.$strip>;
578
+ type XlsxWorkbook = z.infer<typeof XlsxWorkbookSchema>;
579
+ declare function readXlsx(pkg: Package): XlsxWorkbook;
580
+ //#endregion
581
+ export { type Attribute, AttributeSchema, type BinaryPart, BinaryPartSchema, type Comment, CommentSchema, type CompactAttrPairs, type CompactPackage, CompactPackageSchema, type CompactPart, CompactPartSchema, type CompactXmlNode, CompactXmlNodeSchema, type DefinedName, DefinedNameSchema, type DocxDocument, DocxDocumentSchema, type Footnote, FootnoteSchema, type Hyperlink, HyperlinkSchema, type ListMembership, ListMembershipSchema, type Package, PackageSchema, type Paragraph, ParagraphSchema, type Part, PartSchema, type PptxPresentation, PptxPresentationSchema, type PptxTable, type PptxTableCell, PptxTableCellSchema, type PptxTableRow, PptxTableRowSchema, PptxTableSchema, type Run, RunSchema, type Shape, ShapeSchema, type Slide, SlideSchema, type Table, type TableCell, TableCellSchema, type TableRow, TableRowSchema, TableSchema, type XlsxCell, XlsxCellSchema, type XlsxSheet, XlsxSheetSchema, type XlsxWorkbook, XlsxWorkbookSchema, type XmlCdata, XmlCdataSchema, type XmlComment, XmlCommentSchema, type XmlDeclaration, XmlDeclarationSchema, type XmlElement, XmlElementSchema, type XmlNode, XmlNodeSchema, type XmlPart, XmlPartSchema, type XmlPi, XmlPiSchema, type XmlText, XmlTextSchema, base64ToBytes, buildXml, bytesToBase64, compactCodec, compactPackageCodec, decodeCompactPackage, decodePackage, encodeCompactPackage, encodePackage, fromCompact, isCompactXmlNode, isXmlNode, packageCodec, parsePackage, parseXml, readDocx, readPptx, readXlsx, serializePackage, toCompact, unzipPackage, xmlCodec, zipPackage };