ooxml.js 3.1.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +64 -25
- package/dist/{build-CBL9scQK.d.cts → build-D-ldsmtA.d.cts} +2 -2
- package/dist/{build-C0gS5QeG.d.ts → build-q0qMH_ML.d.ts} +2 -2
- package/dist/codec-BOGj_yQL.d.ts +90 -0
- package/dist/codec-CZkWeDXF.d.cts +90 -0
- package/dist/codec.d.cts +1 -1
- package/dist/codec.d.ts +1 -1
- package/dist/document-package-BDr3nkqJ.d.cts +10 -0
- package/dist/document-package-kartHoyl.d.ts +10 -0
- package/dist/index.cjs +253 -7
- package/dist/index.d.cts +8 -7
- package/dist/index.d.ts +8 -7
- package/dist/index.js +8 -7
- package/dist/{read-D_CpruL_.d.cts → read-ClIHv1ef.d.cts} +2 -2
- package/dist/{read-OBV7MMlF.d.cts → read-DY3Sm5T3.d.cts} +2 -2
- package/dist/{read-CeCtSzjQ.d.ts → read-DcJZITV9.d.ts} +2 -2
- package/dist/{read-B2-FFhqI.d.ts → read-gB0H2bff.d.ts} +2 -2
- package/dist/typed/document-package.cjs +43 -0
- package/dist/typed/document-package.d.cts +2 -0
- package/dist/typed/document-package.d.ts +2 -0
- package/dist/typed/document-package.js +38 -0
- package/dist/typed/docx/read.cjs +4 -4
- package/dist/typed/docx/read.d.cts +2 -2
- package/dist/typed/docx/read.d.ts +2 -2
- package/dist/typed/docx/read.js +4 -4
- package/dist/typed/docx/write.cjs +3 -3
- package/dist/typed/docx/write.d.cts +2 -2
- package/dist/typed/docx/write.d.ts +2 -2
- package/dist/typed/docx/write.js +3 -3
- package/dist/typed/pptx/read.cjs +2 -2
- package/dist/typed/pptx/read.d.cts +2 -2
- package/dist/typed/pptx/read.d.ts +2 -2
- package/dist/typed/pptx/read.js +2 -2
- package/dist/typed/xlsx/build.cjs +4 -4
- package/dist/typed/xlsx/build.d.cts +2 -2
- package/dist/typed/xlsx/build.d.ts +2 -2
- package/dist/typed/xlsx/build.js +4 -4
- package/dist/typed/xlsx/content.cjs +2 -2
- package/dist/typed/xlsx/content.js +2 -2
- package/dist/typed/xlsx.cjs +2 -2
- package/dist/typed/xlsx.d.cts +2 -2
- package/dist/typed/xlsx.d.ts +2 -2
- package/dist/typed/xlsx.js +2 -2
- package/dist/{write-U3Ap0vHi.d.ts → write-97yEqc6w.d.ts} +2 -2
- package/dist/{write-C08_maSc.d.cts → write-BFEF46Ir.d.cts} +2 -2
- package/dist/{xlsx-B97t4YE-.d.cts → xlsx-CpX5nzGV.d.cts} +2 -2
- package/dist/{xlsx-BxKODiLX.d.ts → xlsx-DacFqZeF.d.ts} +2 -2
- package/package.json +2 -2
- package/dist/codec-B3qT1CGZ.d.ts +0 -89
- package/dist/codec-CuzuI9Dy.d.cts +0 -89
package/dist/index.cjs
CHANGED
|
@@ -19,9 +19,10 @@ const require_typed_docx_numbering = require("./typed/docx/numbering.cjs");
|
|
|
19
19
|
const require_typed_docx_read = require("./typed/docx/read.cjs");
|
|
20
20
|
const require_typed_docx_write = require("./typed/docx/write.cjs");
|
|
21
21
|
const require_typed_pptx_read = require("./typed/pptx/read.cjs");
|
|
22
|
-
const require_typed_xlsx = require("./typed/xlsx.cjs");
|
|
23
|
-
const require_typed_xlsx_content = require("./typed/xlsx/content.cjs");
|
|
24
22
|
const require_typed_xlsx_build = require("./typed/xlsx/build.cjs");
|
|
23
|
+
const require_typed_xlsx_content = require("./typed/xlsx/content.cjs");
|
|
24
|
+
const require_typed_document_package = require("./typed/document-package.cjs");
|
|
25
|
+
const require_typed_xlsx = require("./typed/xlsx.cjs");
|
|
25
26
|
let document_schema_js = require("document-schema.js");
|
|
26
27
|
Object.defineProperty(exports, "AlignmentSchema", {
|
|
27
28
|
enumerable: true,
|
|
@@ -71,6 +72,12 @@ Object.defineProperty(exports, "ConstructDescriptorSchema", {
|
|
|
71
72
|
return document_schema_js.ConstructDescriptorSchema;
|
|
72
73
|
}
|
|
73
74
|
});
|
|
75
|
+
Object.defineProperty(exports, "ConstructMarkerImbalanceError", {
|
|
76
|
+
enumerable: true,
|
|
77
|
+
get: function() {
|
|
78
|
+
return document_schema_js.ConstructMarkerImbalanceError;
|
|
79
|
+
}
|
|
80
|
+
});
|
|
74
81
|
Object.defineProperty(exports, "ContentBlockSchema", {
|
|
75
82
|
enumerable: true,
|
|
76
83
|
get: function() {
|
|
@@ -259,7 +266,19 @@ Object.defineProperty(exports, "DivisionDescriptorSchema", {
|
|
|
259
266
|
}
|
|
260
267
|
});
|
|
261
268
|
exports.DocumentMetadataSchema = require_typed_shared_metadata.DocumentMetadataSchema;
|
|
269
|
+
Object.defineProperty(exports, "DocumentPackageSchema", {
|
|
270
|
+
enumerable: true,
|
|
271
|
+
get: function() {
|
|
272
|
+
return document_schema_js.DocumentPackageSchema;
|
|
273
|
+
}
|
|
274
|
+
});
|
|
262
275
|
exports.DocxDocumentSchema = require_typed_docx_read.DocxDocumentSchema;
|
|
276
|
+
Object.defineProperty(exports, "DrawPageGroupSchema", {
|
|
277
|
+
enumerable: true,
|
|
278
|
+
get: function() {
|
|
279
|
+
return document_schema_js.DrawPageGroupSchema;
|
|
280
|
+
}
|
|
281
|
+
});
|
|
263
282
|
Object.defineProperty(exports, "FieldDescriptorSchema", {
|
|
264
283
|
enumerable: true,
|
|
265
284
|
get: function() {
|
|
@@ -267,6 +286,12 @@ Object.defineProperty(exports, "FieldDescriptorSchema", {
|
|
|
267
286
|
}
|
|
268
287
|
});
|
|
269
288
|
exports.FootnoteSchema = require_typed_docx_read.FootnoteSchema;
|
|
289
|
+
Object.defineProperty(exports, "HeadingGroupSchema", {
|
|
290
|
+
enumerable: true,
|
|
291
|
+
get: function() {
|
|
292
|
+
return document_schema_js.HeadingGroupSchema;
|
|
293
|
+
}
|
|
294
|
+
});
|
|
270
295
|
Object.defineProperty(exports, "LinkDescriptorSchema", {
|
|
271
296
|
enumerable: true,
|
|
272
297
|
get: function() {
|
|
@@ -279,6 +304,12 @@ Object.defineProperty(exports, "LinkTargetSchema", {
|
|
|
279
304
|
return document_schema_js.LinkTargetSchema;
|
|
280
305
|
}
|
|
281
306
|
});
|
|
307
|
+
Object.defineProperty(exports, "ListGroupSchema", {
|
|
308
|
+
enumerable: true,
|
|
309
|
+
get: function() {
|
|
310
|
+
return document_schema_js.ListGroupSchema;
|
|
311
|
+
}
|
|
312
|
+
});
|
|
282
313
|
Object.defineProperty(exports, "MarginsSchema", {
|
|
283
314
|
enumerable: true,
|
|
284
315
|
get: function() {
|
|
@@ -299,6 +330,30 @@ Object.defineProperty(exports, "PAGE_SIZE_LETTER", {
|
|
|
299
330
|
return document_schema_js.PAGE_SIZE_LETTER;
|
|
300
331
|
}
|
|
301
332
|
});
|
|
333
|
+
Object.defineProperty(exports, "PackageBlockLeafSchema", {
|
|
334
|
+
enumerable: true,
|
|
335
|
+
get: function() {
|
|
336
|
+
return document_schema_js.PackageBlockLeafSchema;
|
|
337
|
+
}
|
|
338
|
+
});
|
|
339
|
+
Object.defineProperty(exports, "PackageGroupSchema", {
|
|
340
|
+
enumerable: true,
|
|
341
|
+
get: function() {
|
|
342
|
+
return document_schema_js.PackageGroupSchema;
|
|
343
|
+
}
|
|
344
|
+
});
|
|
345
|
+
Object.defineProperty(exports, "PackageLeafSchema", {
|
|
346
|
+
enumerable: true,
|
|
347
|
+
get: function() {
|
|
348
|
+
return document_schema_js.PackageLeafSchema;
|
|
349
|
+
}
|
|
350
|
+
});
|
|
351
|
+
Object.defineProperty(exports, "PackageNodeSchema", {
|
|
352
|
+
enumerable: true,
|
|
353
|
+
get: function() {
|
|
354
|
+
return document_schema_js.PackageNodeSchema;
|
|
355
|
+
}
|
|
356
|
+
});
|
|
302
357
|
exports.PackageSchema = require_model_package.PackageSchema;
|
|
303
358
|
Object.defineProperty(exports, "PageSizeSchema", {
|
|
304
359
|
enumerable: true,
|
|
@@ -332,6 +387,66 @@ Object.defineProperty(exports, "SLIDE_SIZE_WIDESCREEN", {
|
|
|
332
387
|
return document_schema_js.SLIDE_SIZE_WIDESCREEN;
|
|
333
388
|
}
|
|
334
389
|
});
|
|
390
|
+
Object.defineProperty(exports, "SectionConstructGroupSchema", {
|
|
391
|
+
enumerable: true,
|
|
392
|
+
get: function() {
|
|
393
|
+
return document_schema_js.SectionConstructGroupSchema;
|
|
394
|
+
}
|
|
395
|
+
});
|
|
396
|
+
Object.defineProperty(exports, "SectionGroupSchema", {
|
|
397
|
+
enumerable: true,
|
|
398
|
+
get: function() {
|
|
399
|
+
return document_schema_js.SectionGroupSchema;
|
|
400
|
+
}
|
|
401
|
+
});
|
|
402
|
+
Object.defineProperty(exports, "ShapeConstructGroupSchema", {
|
|
403
|
+
enumerable: true,
|
|
404
|
+
get: function() {
|
|
405
|
+
return document_schema_js.ShapeConstructGroupSchema;
|
|
406
|
+
}
|
|
407
|
+
});
|
|
408
|
+
Object.defineProperty(exports, "ShapeGroupSchema", {
|
|
409
|
+
enumerable: true,
|
|
410
|
+
get: function() {
|
|
411
|
+
return document_schema_js.ShapeGroupSchema;
|
|
412
|
+
}
|
|
413
|
+
});
|
|
414
|
+
Object.defineProperty(exports, "SheetGroupSchema", {
|
|
415
|
+
enumerable: true,
|
|
416
|
+
get: function() {
|
|
417
|
+
return document_schema_js.SheetGroupSchema;
|
|
418
|
+
}
|
|
419
|
+
});
|
|
420
|
+
Object.defineProperty(exports, "SlideGroupSchema", {
|
|
421
|
+
enumerable: true,
|
|
422
|
+
get: function() {
|
|
423
|
+
return document_schema_js.SlideGroupSchema;
|
|
424
|
+
}
|
|
425
|
+
});
|
|
426
|
+
Object.defineProperty(exports, "StyleEntrySchema", {
|
|
427
|
+
enumerable: true,
|
|
428
|
+
get: function() {
|
|
429
|
+
return document_schema_js.StyleEntrySchema;
|
|
430
|
+
}
|
|
431
|
+
});
|
|
432
|
+
Object.defineProperty(exports, "StyleParagraphPropertiesSchema", {
|
|
433
|
+
enumerable: true,
|
|
434
|
+
get: function() {
|
|
435
|
+
return document_schema_js.StyleParagraphPropertiesSchema;
|
|
436
|
+
}
|
|
437
|
+
});
|
|
438
|
+
Object.defineProperty(exports, "StyleRunPropertiesSchema", {
|
|
439
|
+
enumerable: true,
|
|
440
|
+
get: function() {
|
|
441
|
+
return document_schema_js.StyleRunPropertiesSchema;
|
|
442
|
+
}
|
|
443
|
+
});
|
|
444
|
+
Object.defineProperty(exports, "StylesTableSchema", {
|
|
445
|
+
enumerable: true,
|
|
446
|
+
get: function() {
|
|
447
|
+
return document_schema_js.StylesTableSchema;
|
|
448
|
+
}
|
|
449
|
+
});
|
|
335
450
|
exports.XlsxCellSchema = require_typed_xlsx.XlsxCellSchema;
|
|
336
451
|
exports.XlsxSheetSchema = require_typed_xlsx.XlsxSheetSchema;
|
|
337
452
|
exports.XlsxWorkbookSchema = require_typed_xlsx.XlsxWorkbookSchema;
|
|
@@ -344,10 +459,30 @@ exports.XmlPartSchema = require_model_package.XmlPartSchema;
|
|
|
344
459
|
exports.XmlPiSchema = require_model_node.XmlPiSchema;
|
|
345
460
|
exports.XmlTextSchema = require_model_node.XmlTextSchema;
|
|
346
461
|
exports.applyColorTransforms = require_typed_shared_color.applyColorTransforms;
|
|
462
|
+
Object.defineProperty(exports, "applyParagraphStyleProperties", {
|
|
463
|
+
enumerable: true,
|
|
464
|
+
get: function() {
|
|
465
|
+
return document_schema_js.applyParagraphStyleProperties;
|
|
466
|
+
}
|
|
467
|
+
});
|
|
468
|
+
Object.defineProperty(exports, "applyRunStyleProperties", {
|
|
469
|
+
enumerable: true,
|
|
470
|
+
get: function() {
|
|
471
|
+
return document_schema_js.applyRunStyleProperties;
|
|
472
|
+
}
|
|
473
|
+
});
|
|
474
|
+
Object.defineProperty(exports, "assemblePackage", {
|
|
475
|
+
enumerable: true,
|
|
476
|
+
get: function() {
|
|
477
|
+
return document_schema_js.assemblePackage;
|
|
478
|
+
}
|
|
479
|
+
});
|
|
347
480
|
exports.attr = require_typed_util.attr;
|
|
348
481
|
exports.base64ToBytes = require_util_base64.base64ToBytes;
|
|
349
|
-
exports.buildDocxPackage =
|
|
350
|
-
exports.
|
|
482
|
+
exports.buildDocxPackage = require_typed_document_package.buildDocxPackage;
|
|
483
|
+
exports.buildDocxPackageFromContent = require_typed_docx_write.buildDocxPackageFromContent;
|
|
484
|
+
exports.buildXlsxPackage = require_typed_document_package.buildXlsxPackage;
|
|
485
|
+
exports.buildXlsxPackageFromContent = require_typed_xlsx_build.buildXlsxPackageFromContent;
|
|
351
486
|
exports.buildXml = require_xml_build.buildXml;
|
|
352
487
|
exports.bytesToBase64 = require_util_base64.bytesToBase64;
|
|
353
488
|
exports.childrenWithTag = require_typed_util.childrenWithTag;
|
|
@@ -362,17 +497,35 @@ exports.compactPackageCodec = require_compact.compactPackageCodec;
|
|
|
362
497
|
exports.decodeCompactPackage = require_compact.decodeCompactPackage;
|
|
363
498
|
exports.decodeEntities = require_typed_util.decodeEntities;
|
|
364
499
|
exports.decodePackage = require_codec.decodePackage;
|
|
500
|
+
Object.defineProperty(exports, "decompose", {
|
|
501
|
+
enumerable: true,
|
|
502
|
+
get: function() {
|
|
503
|
+
return document_schema_js.decompose;
|
|
504
|
+
}
|
|
505
|
+
});
|
|
365
506
|
exports.el = require_xml_fragment.el;
|
|
366
507
|
exports.elementsWithTag = require_typed_util.elementsWithTag;
|
|
367
508
|
exports.encodeCompactPackage = require_compact.encodeCompactPackage;
|
|
368
509
|
exports.encodePackage = require_codec.encodePackage;
|
|
369
510
|
exports.encodeXmlText = require_xml_entities.encodeXmlText;
|
|
511
|
+
Object.defineProperty(exports, "factorStyles", {
|
|
512
|
+
enumerable: true,
|
|
513
|
+
get: function() {
|
|
514
|
+
return document_schema_js.factorStyles;
|
|
515
|
+
}
|
|
516
|
+
});
|
|
370
517
|
Object.defineProperty(exports, "findConstructMarkerImbalance", {
|
|
371
518
|
enumerable: true,
|
|
372
519
|
get: function() {
|
|
373
520
|
return document_schema_js.findConstructMarkerImbalance;
|
|
374
521
|
}
|
|
375
522
|
});
|
|
523
|
+
Object.defineProperty(exports, "flattenPackage", {
|
|
524
|
+
enumerable: true,
|
|
525
|
+
get: function() {
|
|
526
|
+
return document_schema_js.flattenPackage;
|
|
527
|
+
}
|
|
528
|
+
});
|
|
376
529
|
exports.fromCompact = require_compact.fromCompact;
|
|
377
530
|
exports.isCompactXmlNode = require_compact.isCompactXmlNode;
|
|
378
531
|
Object.defineProperty(exports, "isContentBlock", {
|
|
@@ -393,16 +546,109 @@ Object.defineProperty(exports, "isContentConstructStart", {
|
|
|
393
546
|
return document_schema_js.isContentConstructStart;
|
|
394
547
|
}
|
|
395
548
|
});
|
|
549
|
+
Object.defineProperty(exports, "isDrawPageGroupNode", {
|
|
550
|
+
enumerable: true,
|
|
551
|
+
get: function() {
|
|
552
|
+
return document_schema_js.isDrawPageGroupNode;
|
|
553
|
+
}
|
|
554
|
+
});
|
|
555
|
+
Object.defineProperty(exports, "isHeadingGroupNode", {
|
|
556
|
+
enumerable: true,
|
|
557
|
+
get: function() {
|
|
558
|
+
return document_schema_js.isHeadingGroupNode;
|
|
559
|
+
}
|
|
560
|
+
});
|
|
561
|
+
Object.defineProperty(exports, "isListGroupNode", {
|
|
562
|
+
enumerable: true,
|
|
563
|
+
get: function() {
|
|
564
|
+
return document_schema_js.isListGroupNode;
|
|
565
|
+
}
|
|
566
|
+
});
|
|
567
|
+
Object.defineProperty(exports, "isPackageBlockLeaf", {
|
|
568
|
+
enumerable: true,
|
|
569
|
+
get: function() {
|
|
570
|
+
return document_schema_js.isPackageBlockLeaf;
|
|
571
|
+
}
|
|
572
|
+
});
|
|
573
|
+
Object.defineProperty(exports, "isPackageGroup", {
|
|
574
|
+
enumerable: true,
|
|
575
|
+
get: function() {
|
|
576
|
+
return document_schema_js.isPackageGroup;
|
|
577
|
+
}
|
|
578
|
+
});
|
|
579
|
+
Object.defineProperty(exports, "isPackageLeaf", {
|
|
580
|
+
enumerable: true,
|
|
581
|
+
get: function() {
|
|
582
|
+
return document_schema_js.isPackageLeaf;
|
|
583
|
+
}
|
|
584
|
+
});
|
|
585
|
+
Object.defineProperty(exports, "isPackageNode", {
|
|
586
|
+
enumerable: true,
|
|
587
|
+
get: function() {
|
|
588
|
+
return document_schema_js.isPackageNode;
|
|
589
|
+
}
|
|
590
|
+
});
|
|
591
|
+
Object.defineProperty(exports, "isSectionConstructGroupNode", {
|
|
592
|
+
enumerable: true,
|
|
593
|
+
get: function() {
|
|
594
|
+
return document_schema_js.isSectionConstructGroupNode;
|
|
595
|
+
}
|
|
596
|
+
});
|
|
597
|
+
Object.defineProperty(exports, "isSectionGroupNode", {
|
|
598
|
+
enumerable: true,
|
|
599
|
+
get: function() {
|
|
600
|
+
return document_schema_js.isSectionGroupNode;
|
|
601
|
+
}
|
|
602
|
+
});
|
|
603
|
+
Object.defineProperty(exports, "isShapeConstructGroupNode", {
|
|
604
|
+
enumerable: true,
|
|
605
|
+
get: function() {
|
|
606
|
+
return document_schema_js.isShapeConstructGroupNode;
|
|
607
|
+
}
|
|
608
|
+
});
|
|
609
|
+
Object.defineProperty(exports, "isShapeGroupNode", {
|
|
610
|
+
enumerable: true,
|
|
611
|
+
get: function() {
|
|
612
|
+
return document_schema_js.isShapeGroupNode;
|
|
613
|
+
}
|
|
614
|
+
});
|
|
615
|
+
Object.defineProperty(exports, "isSheetGroupNode", {
|
|
616
|
+
enumerable: true,
|
|
617
|
+
get: function() {
|
|
618
|
+
return document_schema_js.isSheetGroupNode;
|
|
619
|
+
}
|
|
620
|
+
});
|
|
621
|
+
Object.defineProperty(exports, "isSlideGroupNode", {
|
|
622
|
+
enumerable: true,
|
|
623
|
+
get: function() {
|
|
624
|
+
return document_schema_js.isSlideGroupNode;
|
|
625
|
+
}
|
|
626
|
+
});
|
|
396
627
|
exports.isXmlNode = require_model_node.isXmlNode;
|
|
628
|
+
Object.defineProperty(exports, "overlayStyleEntries", {
|
|
629
|
+
enumerable: true,
|
|
630
|
+
get: function() {
|
|
631
|
+
return document_schema_js.overlayStyleEntries;
|
|
632
|
+
}
|
|
633
|
+
});
|
|
397
634
|
exports.packageCodec = require_codec.packageCodec;
|
|
398
635
|
exports.parsePackage = require_package_io_read.parsePackage;
|
|
399
636
|
exports.parseXml = require_xml_parse.parseXml;
|
|
400
|
-
exports.readDocx =
|
|
637
|
+
exports.readDocx = require_typed_document_package.readDocx;
|
|
638
|
+
exports.readDocxContent = require_typed_docx_read.readDocxContent;
|
|
401
639
|
exports.readNumberingDefinitions = require_typed_docx_numbering.readNumberingDefinitions;
|
|
402
|
-
exports.readPptx =
|
|
403
|
-
exports.
|
|
640
|
+
exports.readPptx = require_typed_document_package.readPptx;
|
|
641
|
+
exports.readPptxContent = require_typed_pptx_read.readPptxContent;
|
|
642
|
+
exports.readXlsx = require_typed_document_package.readXlsx;
|
|
404
643
|
exports.readXlsxContent = require_typed_xlsx_content.readXlsxContent;
|
|
644
|
+
exports.readXlsxWorkbook = require_typed_xlsx.readXlsxWorkbook;
|
|
405
645
|
exports.resolveRelationships = require_typed_util.resolveRelationships;
|
|
646
|
+
Object.defineProperty(exports, "resolveStyleChain", {
|
|
647
|
+
enumerable: true,
|
|
648
|
+
get: function() {
|
|
649
|
+
return document_schema_js.resolveStyleChain;
|
|
650
|
+
}
|
|
651
|
+
});
|
|
406
652
|
Object.defineProperty(exports, "rgbHexToColor", {
|
|
407
653
|
enumerable: true,
|
|
408
654
|
get: function() {
|
package/dist/index.d.cts
CHANGED
|
@@ -13,12 +13,13 @@ import { _ as encodeCompactPackage, b as toCompact, c as CompactPart, f as Compa
|
|
|
13
13
|
import { n as applyColorTransforms, t as ColorTransform } from "./color-fFIKAs-Y.cjs";
|
|
14
14
|
import { n as DocumentMetadataSchema, t as DocumentMetadata } from "./metadata-D6o-kLpg.cjs";
|
|
15
15
|
import { n as sniffImageFormat, t as ImageFormat } from "./sniff-DjpnUZRp.cjs";
|
|
16
|
-
import { a as
|
|
17
|
-
import { n as
|
|
16
|
+
import { a as readXlsx, i as readPptx, n as buildXlsxPackage, r as readDocx, t as buildDocxPackage } from "./document-package-BDr3nkqJ.cjs";
|
|
17
|
+
import { a as Footnote, i as DocxDocumentSchema, n as CommentSchema, o as FootnoteSchema, r as DocxDocument, s as readDocxContent, t as Comment } from "./read-ClIHv1ef.cjs";
|
|
18
|
+
import { n as buildDocxPackageFromContent, t as DocxContent } from "./write-BFEF46Ir.cjs";
|
|
18
19
|
import { a as NumberingLevelSchema, i as NumberingLevel, n as NumberingDefinitionSchema, o as readNumberingDefinitions, r as NumberingDefinitions, t as NumberingDefinition } from "./numbering-C53LT-Jx.cjs";
|
|
19
|
-
import { n as PptxDocumentSchema, r as
|
|
20
|
-
import { a as XlsxSheet, c as XlsxWorkbookSchema, i as XlsxCellSchema, l as
|
|
20
|
+
import { n as PptxDocumentSchema, r as readPptxContent, t as PptxDocument } from "./read-DY3Sm5T3.cjs";
|
|
21
|
+
import { a as XlsxSheet, c as XlsxWorkbookSchema, i as XlsxCellSchema, l as readXlsxWorkbook, n as DefinedNameSchema, o as XlsxSheetSchema, r as XlsxCell, s as XlsxWorkbook, t as DefinedName } from "./xlsx-CpX5nzGV.cjs";
|
|
21
22
|
import { t as readXlsxContent } from "./content-UlQ-Nhgi.cjs";
|
|
22
|
-
import { t as
|
|
23
|
-
import { $ as
|
|
24
|
-
export { type Alignment, AlignmentSchema, type AnchorDescriptor, AnchorDescriptorSchema, type AnchorType, AnchorTypeSchema, type Attribute, AttributeSchema, type BinaryPart, BinaryPartSchema, type Box, BoxSchema, COLOR_BLACK, type Color, ColorSchema, type ColorTransform, type Comment, CommentSchema, type CompactAttrPairs, type CompactPackage, CompactPackageSchema, type CompactPart, CompactPartSchema, type CompactXmlNode, CompactXmlNodeSchema, type ConstructDescriptor, ConstructDescriptorSchema, type ConstructMarkerImbalance, type ContentBlock, ContentBlockSchema, type ContentBorder, ContentBorderSchema, type ContentCellBorders, ContentCellBordersSchema, type ContentCellValue, ContentCellValueSchema, type ContentConstructEnd, ContentConstructEndSchema, type ContentConstructStart, ContentConstructStartSchema, type ContentControlDescriptor, ContentControlDescriptorSchema, type ContentControlLock, ContentControlLockSchema, type ContentControlType, ContentControlTypeSchema, type ContentDocument, ContentDocumentSchema, type ContentImageBlock, ContentImageBlockSchema, type ContentListMembership, ContentListMembershipSchema, type ContentPageBreak, ContentPageBreakSchema, type ContentParagraph, ContentParagraphSchema, type ContentRun, ContentRunSchema, type ContentSection, ContentSectionSchema, type ContentShape, ContentShapeSchema, type ContentSheet, type ContentSheetCell, ContentSheetCellSchema, type ContentSheetColumn, ContentSheetColumnSchema, type ContentSheetImage, ContentSheetImageSchema, type ContentSheetPrintRange, ContentSheetPrintRangeSchema, type ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, type ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, type ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, type ContentSlide, ContentSlideSchema, type ContentStrokeStyle, ContentStrokeStyleSchema, type ContentTable, type ContentTableCell, ContentTableCellSchema, type ContentTableRow, ContentTableRowSchema, ContentTableSchema, type DefinedName, DefinedNameSchema, type DivisionDescriptor, DivisionDescriptorSchema, type DocumentMetadata, DocumentMetadataSchema, type DocxContent, type DocxDocument, DocxDocumentSchema, type FieldDescriptor, FieldDescriptorSchema, type Footnote, FootnoteSchema, type ImageFormat, type LinkDescriptor, LinkDescriptorSchema, type LinkTarget, LinkTargetSchema, type Margins, MarginsSchema, type NumberingDefinition, NumberingDefinitionSchema, type NumberingDefinitions, type NumberingLevel, NumberingLevelSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, type Package, PackageSchema, type PageSize, PageSizeSchema, type Part, PartSchema, type PptxDocument, PptxDocumentSchema, type ProvenanceChange, ProvenanceChangeSchema, type ProvenanceDescriptor, ProvenanceDescriptorSchema, type Relationship, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, 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, applyColorTransforms, attr, base64ToBytes, buildDocxPackage, buildXlsxPackage, buildXml, bytesToBase64, childrenWithTag, colorToRgbHex, compactCodec, compactPackageCodec, decodeCompactPackage, decodeEntities, decodePackage, el, elementsWithTag, encodeCompactPackage, encodePackage, encodeXmlText, findConstructMarkerImbalance, fromCompact, isCompactXmlNode, isContentBlock, isContentConstructEnd, isContentConstructStart, isXmlNode, packageCodec, parsePackage, parseXml, readDocx, readNumberingDefinitions, readPptx, readXlsx, readXlsxContent, resolveRelationships, rgbHexToColor, rootElement, serializePackage, sniffImageFormat, textContent, toCompact, txt, unzipPackage, walk, xmlCodec, zipPackage };
|
|
23
|
+
import { t as buildXlsxPackageFromContent } from "./build-D-ldsmtA.cjs";
|
|
24
|
+
import { $ as ContentShapeSchema, $n as isHeadingGroupNode, $t as PackageChildren, A as ContentConstructStart, An as SlideDescriptor, At as DrawPageChild, B as ContentImageBlock, Bn as StylesTableSchema, Bt as LinkDescriptorSchema, C as ContentBorderSchema, Cn as ShapeDescriptor, Ct as ContentTableRow, D as ContentCellValueSchema, Dn as SheetDescriptor, Dt as DivisionDescriptorSchema, E as ContentCellValue, En as SheetChild, Et as DivisionDescriptor, F as ContentControlLockSchema, Fn as StyleParagraphProperties, Ft as FieldDescriptorSchema, G as ContentPageBreakSchema, Gn as decompose, Gt as ListGroupSchema, H as ContentListMembership, Hn as applyRunStyleProperties, Ht as LinkTargetSchema, I as ContentControlType, In as StyleParagraphPropertiesSchema, It as HeadingGroupNode, J as ContentRun, Jn as flattenPackage, Jt as MarginsSchema, K as ContentParagraph, Kn as factorStyles, Kt as ListParagraph, L as ContentControlTypeSchema, Ln as StyleRunProperties, Lt as HeadingGroupSchema, M as ContentControlDescriptor, Mn as SlideGroupSchema, Mt as DrawPageGroupNode, N as ContentControlDescriptorSchema, Nn as StyleEntry, Nt as DrawPageGroupSchema, O as ContentConstructEnd, On as SheetGroupNode, Ot as DocumentPackage, P as ContentControlLock, Pn as StyleEntrySchema, Pt as FieldDescriptor, Q as ContentShape, Qn as isDrawPageGroupNode, Qt as PackageBlockLeafSchema, R as ContentDocument, Rn as StyleRunPropertiesSchema, Rt as HeadingParagraph, S as ContentBorder, Sn as ShapeConstructGroupSchema, St as ContentTableCellSchema, T as ContentCellBordersSchema, Tn as ShapeGroupSchema, Tt as ContentTableSchema, U as ContentListMembershipSchema, Un as assemblePackage, Ut as ListChild, V as ContentImageBlockSchema, Vn as applyParagraphStyleProperties, Vt as LinkTarget, W as ContentPageBreak, Wn as colorToRgbHex, Wt as ListGroupNode, X as ContentSection, Xn as isContentConstructEnd, Xt as PAGE_SIZE_LETTER, Y as ContentRunSchema, Yn as isContentBlock, Yt as PAGE_SIZE_A4, Z as ContentSectionSchema, Zn as isContentConstructStart, Zt as PackageBlockLeaf, _ as ConstructDescriptorSchema, _n as SectionDescriptor, _t as ContentSlideSchema, a as Alignment, an as PackageNodeSchema, ar as isSectionConstructGroupNode, at as ContentSheetImage, b as ContentBlock, bn as ShapeChild, bt as ContentTable, c as AnchorDescriptorSchema, cn as ProvenanceChange, cr as isShapeGroupNode, ct as ContentSheetPrintRangeSchema, d as Box, dn as ProvenanceDescriptorSchema, dr as overlayStyleEntries, dt as ContentSheetRepeatRange, en as PackageGroup, er as isListGroupNode, et as ContentSheet, f as BoxSchema, fn as SLIDE_SIZE_STANDARD, fr as resolveStyleChain, ft as ContentSheetRepeatRangeSchema, g as ConstructDescriptor, gn as SectionConstructGroupSchema, gt as ContentSlide, h as ColorSchema, hn as SectionConstructGroupNode, ht as ContentSheetSchema, i as xmlCodec, in as PackageNode, ir as isPackageNode, it as ContentSheetColumnSchema, j as ContentConstructStartSchema, jn as SlideGroupNode, jt as DrawPageDescriptor, k as ContentConstructEndSchema, kn as SheetGroupSchema, kt as DocumentPackageSchema, l as AnchorType, ln as ProvenanceChangeSchema, lr as isSheetGroupNode, lt as ContentSheetPrintSettings, m as Color, mn as SectionChild, mt as ContentSheetRowSchema, n as encodePackage, nn as PackageLeaf, nr as isPackageGroup, nt as ContentSheetCellSchema, o as AlignmentSchema, on as PageSize, or as isSectionGroupNode, ot as ContentSheetImageSchema, p as COLOR_BLACK, pn as SLIDE_SIZE_WIDESCREEN, pr as rgbHexToColor, pt as ContentSheetRow, q as ContentParagraphSchema, qn as findConstructMarkerImbalance, qt as Margins, r as packageCodec, rn as PackageLeafSchema, rr as isPackageLeaf, rt as ContentSheetColumn, s as AnchorDescriptor, sn as PageSizeSchema, sr as isShapeConstructGroupNode, st as ContentSheetPrintRange, t as decodePackage, tn as PackageGroupSchema, tr as isPackageBlockLeaf, tt as ContentSheetCell, u as AnchorTypeSchema, un as ProvenanceDescriptor, ur as isSlideGroupNode, ut as ContentSheetPrintSettingsSchema, v as ConstructMarkerImbalance, vn as SectionGroupNode, vt as ContentStrokeStyle, w as ContentCellBorders, wn as ShapeGroupNode, wt as ContentTableRowSchema, x as ContentBlockSchema, xn as ShapeConstructGroupNode, xt as ContentTableCell, y as ConstructMarkerImbalanceError, yn as SectionGroupSchema, yt as ContentStrokeStyleSchema, z as ContentDocumentSchema, zn as StylesTable, zt as LinkDescriptor } from "./codec-CZkWeDXF.cjs";
|
|
25
|
+
export { type Alignment, AlignmentSchema, type AnchorDescriptor, AnchorDescriptorSchema, type AnchorType, AnchorTypeSchema, type Attribute, AttributeSchema, type BinaryPart, BinaryPartSchema, type Box, BoxSchema, COLOR_BLACK, type Color, ColorSchema, type ColorTransform, type Comment, CommentSchema, type CompactAttrPairs, type CompactPackage, CompactPackageSchema, type CompactPart, CompactPartSchema, type CompactXmlNode, CompactXmlNodeSchema, type ConstructDescriptor, ConstructDescriptorSchema, type ConstructMarkerImbalance, ConstructMarkerImbalanceError, type ContentBlock, ContentBlockSchema, type ContentBorder, ContentBorderSchema, type ContentCellBorders, ContentCellBordersSchema, type ContentCellValue, ContentCellValueSchema, type ContentConstructEnd, ContentConstructEndSchema, type ContentConstructStart, ContentConstructStartSchema, type ContentControlDescriptor, ContentControlDescriptorSchema, type ContentControlLock, ContentControlLockSchema, type ContentControlType, ContentControlTypeSchema, type ContentDocument, ContentDocumentSchema, type ContentImageBlock, ContentImageBlockSchema, type ContentListMembership, ContentListMembershipSchema, type ContentPageBreak, ContentPageBreakSchema, type ContentParagraph, ContentParagraphSchema, type ContentRun, ContentRunSchema, type ContentSection, ContentSectionSchema, type ContentShape, ContentShapeSchema, type ContentSheet, type ContentSheetCell, ContentSheetCellSchema, type ContentSheetColumn, ContentSheetColumnSchema, type ContentSheetImage, ContentSheetImageSchema, type ContentSheetPrintRange, ContentSheetPrintRangeSchema, type ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, type ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, type ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, type ContentSlide, ContentSlideSchema, type ContentStrokeStyle, ContentStrokeStyleSchema, type ContentTable, type ContentTableCell, ContentTableCellSchema, type ContentTableRow, ContentTableRowSchema, ContentTableSchema, type DefinedName, DefinedNameSchema, type DivisionDescriptor, DivisionDescriptorSchema, type DocumentMetadata, DocumentMetadataSchema, type DocumentPackage, DocumentPackageSchema, type DocxContent, type DocxDocument, DocxDocumentSchema, type DrawPageChild, type DrawPageDescriptor, type DrawPageGroupNode, DrawPageGroupSchema, type FieldDescriptor, FieldDescriptorSchema, type Footnote, FootnoteSchema, type HeadingGroupNode, HeadingGroupSchema, type HeadingParagraph, type ImageFormat, type LinkDescriptor, LinkDescriptorSchema, type LinkTarget, LinkTargetSchema, type ListChild, type ListGroupNode, ListGroupSchema, type ListParagraph, type Margins, MarginsSchema, type NumberingDefinition, NumberingDefinitionSchema, type NumberingDefinitions, type NumberingLevel, NumberingLevelSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, type Package, type PackageBlockLeaf, PackageBlockLeafSchema, type PackageChildren, type PackageGroup, PackageGroupSchema, type PackageLeaf, PackageLeafSchema, type PackageNode, PackageNodeSchema, PackageSchema, type PageSize, PageSizeSchema, type Part, PartSchema, type PptxDocument, PptxDocumentSchema, type ProvenanceChange, ProvenanceChangeSchema, type ProvenanceDescriptor, ProvenanceDescriptorSchema, type Relationship, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, type SectionChild, type SectionConstructGroupNode, SectionConstructGroupSchema, type SectionDescriptor, type SectionGroupNode, SectionGroupSchema, type ShapeChild, type ShapeConstructGroupNode, ShapeConstructGroupSchema, type ShapeDescriptor, type ShapeGroupNode, ShapeGroupSchema, type SheetChild, type SheetDescriptor, type SheetGroupNode, SheetGroupSchema, type SlideDescriptor, type SlideGroupNode, SlideGroupSchema, type StyleEntry, StyleEntrySchema, type StyleParagraphProperties, StyleParagraphPropertiesSchema, type StyleRunProperties, StyleRunPropertiesSchema, type StylesTable, StylesTableSchema, 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, applyColorTransforms, applyParagraphStyleProperties, applyRunStyleProperties, assemblePackage, attr, base64ToBytes, buildDocxPackage, buildDocxPackageFromContent, buildXlsxPackage, buildXlsxPackageFromContent, buildXml, bytesToBase64, childrenWithTag, colorToRgbHex, compactCodec, compactPackageCodec, decodeCompactPackage, decodeEntities, decodePackage, decompose, el, elementsWithTag, encodeCompactPackage, encodePackage, encodeXmlText, factorStyles, findConstructMarkerImbalance, flattenPackage, fromCompact, isCompactXmlNode, isContentBlock, isContentConstructEnd, isContentConstructStart, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isPackageBlockLeaf, isPackageGroup, isPackageLeaf, isPackageNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, isXmlNode, overlayStyleEntries, packageCodec, parsePackage, parseXml, readDocx, readDocxContent, readNumberingDefinitions, readPptx, readPptxContent, readXlsx, readXlsxContent, readXlsxWorkbook, resolveRelationships, resolveStyleChain, rgbHexToColor, rootElement, serializePackage, sniffImageFormat, textContent, toCompact, txt, unzipPackage, walk, xmlCodec, zipPackage };
|
package/dist/index.d.ts
CHANGED
|
@@ -13,12 +13,13 @@ import { _ as encodeCompactPackage, b as toCompact, c as CompactPart, f as Compa
|
|
|
13
13
|
import { n as applyColorTransforms, t as ColorTransform } from "./color-fFIKAs-Y.js";
|
|
14
14
|
import { n as DocumentMetadataSchema, t as DocumentMetadata } from "./metadata-o_WH9V_I.js";
|
|
15
15
|
import { n as sniffImageFormat, t as ImageFormat } from "./sniff-DjpnUZRp.js";
|
|
16
|
-
import { a as
|
|
17
|
-
import { n as
|
|
16
|
+
import { a as readXlsx, i as readPptx, n as buildXlsxPackage, r as readDocx, t as buildDocxPackage } from "./document-package-kartHoyl.js";
|
|
17
|
+
import { a as Footnote, i as DocxDocumentSchema, n as CommentSchema, o as FootnoteSchema, r as DocxDocument, s as readDocxContent, t as Comment } from "./read-gB0H2bff.js";
|
|
18
|
+
import { n as buildDocxPackageFromContent, t as DocxContent } from "./write-97yEqc6w.js";
|
|
18
19
|
import { a as NumberingLevelSchema, i as NumberingLevel, n as NumberingDefinitionSchema, o as readNumberingDefinitions, r as NumberingDefinitions, t as NumberingDefinition } from "./numbering-D0YfuiOO.js";
|
|
19
|
-
import { n as PptxDocumentSchema, r as
|
|
20
|
-
import { a as XlsxSheet, c as XlsxWorkbookSchema, i as XlsxCellSchema, l as
|
|
20
|
+
import { n as PptxDocumentSchema, r as readPptxContent, t as PptxDocument } from "./read-DcJZITV9.js";
|
|
21
|
+
import { a as XlsxSheet, c as XlsxWorkbookSchema, i as XlsxCellSchema, l as readXlsxWorkbook, n as DefinedNameSchema, o as XlsxSheetSchema, r as XlsxCell, s as XlsxWorkbook, t as DefinedName } from "./xlsx-DacFqZeF.js";
|
|
21
22
|
import { t as readXlsxContent } from "./content-t6ZfmfQM.js";
|
|
22
|
-
import { t as
|
|
23
|
-
import { $ as
|
|
24
|
-
export { type Alignment, AlignmentSchema, type AnchorDescriptor, AnchorDescriptorSchema, type AnchorType, AnchorTypeSchema, type Attribute, AttributeSchema, type BinaryPart, BinaryPartSchema, type Box, BoxSchema, COLOR_BLACK, type Color, ColorSchema, type ColorTransform, type Comment, CommentSchema, type CompactAttrPairs, type CompactPackage, CompactPackageSchema, type CompactPart, CompactPartSchema, type CompactXmlNode, CompactXmlNodeSchema, type ConstructDescriptor, ConstructDescriptorSchema, type ConstructMarkerImbalance, type ContentBlock, ContentBlockSchema, type ContentBorder, ContentBorderSchema, type ContentCellBorders, ContentCellBordersSchema, type ContentCellValue, ContentCellValueSchema, type ContentConstructEnd, ContentConstructEndSchema, type ContentConstructStart, ContentConstructStartSchema, type ContentControlDescriptor, ContentControlDescriptorSchema, type ContentControlLock, ContentControlLockSchema, type ContentControlType, ContentControlTypeSchema, type ContentDocument, ContentDocumentSchema, type ContentImageBlock, ContentImageBlockSchema, type ContentListMembership, ContentListMembershipSchema, type ContentPageBreak, ContentPageBreakSchema, type ContentParagraph, ContentParagraphSchema, type ContentRun, ContentRunSchema, type ContentSection, ContentSectionSchema, type ContentShape, ContentShapeSchema, type ContentSheet, type ContentSheetCell, ContentSheetCellSchema, type ContentSheetColumn, ContentSheetColumnSchema, type ContentSheetImage, ContentSheetImageSchema, type ContentSheetPrintRange, ContentSheetPrintRangeSchema, type ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, type ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, type ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, type ContentSlide, ContentSlideSchema, type ContentStrokeStyle, ContentStrokeStyleSchema, type ContentTable, type ContentTableCell, ContentTableCellSchema, type ContentTableRow, ContentTableRowSchema, ContentTableSchema, type DefinedName, DefinedNameSchema, type DivisionDescriptor, DivisionDescriptorSchema, type DocumentMetadata, DocumentMetadataSchema, type DocxContent, type DocxDocument, DocxDocumentSchema, type FieldDescriptor, FieldDescriptorSchema, type Footnote, FootnoteSchema, type ImageFormat, type LinkDescriptor, LinkDescriptorSchema, type LinkTarget, LinkTargetSchema, type Margins, MarginsSchema, type NumberingDefinition, NumberingDefinitionSchema, type NumberingDefinitions, type NumberingLevel, NumberingLevelSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, type Package, PackageSchema, type PageSize, PageSizeSchema, type Part, PartSchema, type PptxDocument, PptxDocumentSchema, type ProvenanceChange, ProvenanceChangeSchema, type ProvenanceDescriptor, ProvenanceDescriptorSchema, type Relationship, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, 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, applyColorTransforms, attr, base64ToBytes, buildDocxPackage, buildXlsxPackage, buildXml, bytesToBase64, childrenWithTag, colorToRgbHex, compactCodec, compactPackageCodec, decodeCompactPackage, decodeEntities, decodePackage, el, elementsWithTag, encodeCompactPackage, encodePackage, encodeXmlText, findConstructMarkerImbalance, fromCompact, isCompactXmlNode, isContentBlock, isContentConstructEnd, isContentConstructStart, isXmlNode, packageCodec, parsePackage, parseXml, readDocx, readNumberingDefinitions, readPptx, readXlsx, readXlsxContent, resolveRelationships, rgbHexToColor, rootElement, serializePackage, sniffImageFormat, textContent, toCompact, txt, unzipPackage, walk, xmlCodec, zipPackage };
|
|
23
|
+
import { t as buildXlsxPackageFromContent } from "./build-q0qMH_ML.js";
|
|
24
|
+
import { $ as ContentShapeSchema, $n as isHeadingGroupNode, $t as PackageChildren, A as ContentConstructStart, An as SlideDescriptor, At as DrawPageChild, B as ContentImageBlock, Bn as StylesTableSchema, Bt as LinkDescriptorSchema, C as ContentBorderSchema, Cn as ShapeDescriptor, Ct as ContentTableRow, D as ContentCellValueSchema, Dn as SheetDescriptor, Dt as DivisionDescriptorSchema, E as ContentCellValue, En as SheetChild, Et as DivisionDescriptor, F as ContentControlLockSchema, Fn as StyleParagraphProperties, Ft as FieldDescriptorSchema, G as ContentPageBreakSchema, Gn as decompose, Gt as ListGroupSchema, H as ContentListMembership, Hn as applyRunStyleProperties, Ht as LinkTargetSchema, I as ContentControlType, In as StyleParagraphPropertiesSchema, It as HeadingGroupNode, J as ContentRun, Jn as flattenPackage, Jt as MarginsSchema, K as ContentParagraph, Kn as factorStyles, Kt as ListParagraph, L as ContentControlTypeSchema, Ln as StyleRunProperties, Lt as HeadingGroupSchema, M as ContentControlDescriptor, Mn as SlideGroupSchema, Mt as DrawPageGroupNode, N as ContentControlDescriptorSchema, Nn as StyleEntry, Nt as DrawPageGroupSchema, O as ContentConstructEnd, On as SheetGroupNode, Ot as DocumentPackage, P as ContentControlLock, Pn as StyleEntrySchema, Pt as FieldDescriptor, Q as ContentShape, Qn as isDrawPageGroupNode, Qt as PackageBlockLeafSchema, R as ContentDocument, Rn as StyleRunPropertiesSchema, Rt as HeadingParagraph, S as ContentBorder, Sn as ShapeConstructGroupSchema, St as ContentTableCellSchema, T as ContentCellBordersSchema, Tn as ShapeGroupSchema, Tt as ContentTableSchema, U as ContentListMembershipSchema, Un as assemblePackage, Ut as ListChild, V as ContentImageBlockSchema, Vn as applyParagraphStyleProperties, Vt as LinkTarget, W as ContentPageBreak, Wn as colorToRgbHex, Wt as ListGroupNode, X as ContentSection, Xn as isContentConstructEnd, Xt as PAGE_SIZE_LETTER, Y as ContentRunSchema, Yn as isContentBlock, Yt as PAGE_SIZE_A4, Z as ContentSectionSchema, Zn as isContentConstructStart, Zt as PackageBlockLeaf, _ as ConstructDescriptorSchema, _n as SectionDescriptor, _t as ContentSlideSchema, a as Alignment, an as PackageNodeSchema, ar as isSectionConstructGroupNode, at as ContentSheetImage, b as ContentBlock, bn as ShapeChild, bt as ContentTable, c as AnchorDescriptorSchema, cn as ProvenanceChange, cr as isShapeGroupNode, ct as ContentSheetPrintRangeSchema, d as Box, dn as ProvenanceDescriptorSchema, dr as overlayStyleEntries, dt as ContentSheetRepeatRange, en as PackageGroup, er as isListGroupNode, et as ContentSheet, f as BoxSchema, fn as SLIDE_SIZE_STANDARD, fr as resolveStyleChain, ft as ContentSheetRepeatRangeSchema, g as ConstructDescriptor, gn as SectionConstructGroupSchema, gt as ContentSlide, h as ColorSchema, hn as SectionConstructGroupNode, ht as ContentSheetSchema, i as xmlCodec, in as PackageNode, ir as isPackageNode, it as ContentSheetColumnSchema, j as ContentConstructStartSchema, jn as SlideGroupNode, jt as DrawPageDescriptor, k as ContentConstructEndSchema, kn as SheetGroupSchema, kt as DocumentPackageSchema, l as AnchorType, ln as ProvenanceChangeSchema, lr as isSheetGroupNode, lt as ContentSheetPrintSettings, m as Color, mn as SectionChild, mt as ContentSheetRowSchema, n as encodePackage, nn as PackageLeaf, nr as isPackageGroup, nt as ContentSheetCellSchema, o as AlignmentSchema, on as PageSize, or as isSectionGroupNode, ot as ContentSheetImageSchema, p as COLOR_BLACK, pn as SLIDE_SIZE_WIDESCREEN, pr as rgbHexToColor, pt as ContentSheetRow, q as ContentParagraphSchema, qn as findConstructMarkerImbalance, qt as Margins, r as packageCodec, rn as PackageLeafSchema, rr as isPackageLeaf, rt as ContentSheetColumn, s as AnchorDescriptor, sn as PageSizeSchema, sr as isShapeConstructGroupNode, st as ContentSheetPrintRange, t as decodePackage, tn as PackageGroupSchema, tr as isPackageBlockLeaf, tt as ContentSheetCell, u as AnchorTypeSchema, un as ProvenanceDescriptor, ur as isSlideGroupNode, ut as ContentSheetPrintSettingsSchema, v as ConstructMarkerImbalance, vn as SectionGroupNode, vt as ContentStrokeStyle, w as ContentCellBorders, wn as ShapeGroupNode, wt as ContentTableRowSchema, x as ContentBlockSchema, xn as ShapeConstructGroupNode, xt as ContentTableCell, y as ConstructMarkerImbalanceError, yn as SectionGroupSchema, yt as ContentStrokeStyleSchema, z as ContentDocumentSchema, zn as StylesTable, zt as LinkDescriptor } from "./codec-BOGj_yQL.js";
|
|
25
|
+
export { type Alignment, AlignmentSchema, type AnchorDescriptor, AnchorDescriptorSchema, type AnchorType, AnchorTypeSchema, type Attribute, AttributeSchema, type BinaryPart, BinaryPartSchema, type Box, BoxSchema, COLOR_BLACK, type Color, ColorSchema, type ColorTransform, type Comment, CommentSchema, type CompactAttrPairs, type CompactPackage, CompactPackageSchema, type CompactPart, CompactPartSchema, type CompactXmlNode, CompactXmlNodeSchema, type ConstructDescriptor, ConstructDescriptorSchema, type ConstructMarkerImbalance, ConstructMarkerImbalanceError, type ContentBlock, ContentBlockSchema, type ContentBorder, ContentBorderSchema, type ContentCellBorders, ContentCellBordersSchema, type ContentCellValue, ContentCellValueSchema, type ContentConstructEnd, ContentConstructEndSchema, type ContentConstructStart, ContentConstructStartSchema, type ContentControlDescriptor, ContentControlDescriptorSchema, type ContentControlLock, ContentControlLockSchema, type ContentControlType, ContentControlTypeSchema, type ContentDocument, ContentDocumentSchema, type ContentImageBlock, ContentImageBlockSchema, type ContentListMembership, ContentListMembershipSchema, type ContentPageBreak, ContentPageBreakSchema, type ContentParagraph, ContentParagraphSchema, type ContentRun, ContentRunSchema, type ContentSection, ContentSectionSchema, type ContentShape, ContentShapeSchema, type ContentSheet, type ContentSheetCell, ContentSheetCellSchema, type ContentSheetColumn, ContentSheetColumnSchema, type ContentSheetImage, ContentSheetImageSchema, type ContentSheetPrintRange, ContentSheetPrintRangeSchema, type ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, type ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, type ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, type ContentSlide, ContentSlideSchema, type ContentStrokeStyle, ContentStrokeStyleSchema, type ContentTable, type ContentTableCell, ContentTableCellSchema, type ContentTableRow, ContentTableRowSchema, ContentTableSchema, type DefinedName, DefinedNameSchema, type DivisionDescriptor, DivisionDescriptorSchema, type DocumentMetadata, DocumentMetadataSchema, type DocumentPackage, DocumentPackageSchema, type DocxContent, type DocxDocument, DocxDocumentSchema, type DrawPageChild, type DrawPageDescriptor, type DrawPageGroupNode, DrawPageGroupSchema, type FieldDescriptor, FieldDescriptorSchema, type Footnote, FootnoteSchema, type HeadingGroupNode, HeadingGroupSchema, type HeadingParagraph, type ImageFormat, type LinkDescriptor, LinkDescriptorSchema, type LinkTarget, LinkTargetSchema, type ListChild, type ListGroupNode, ListGroupSchema, type ListParagraph, type Margins, MarginsSchema, type NumberingDefinition, NumberingDefinitionSchema, type NumberingDefinitions, type NumberingLevel, NumberingLevelSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, type Package, type PackageBlockLeaf, PackageBlockLeafSchema, type PackageChildren, type PackageGroup, PackageGroupSchema, type PackageLeaf, PackageLeafSchema, type PackageNode, PackageNodeSchema, PackageSchema, type PageSize, PageSizeSchema, type Part, PartSchema, type PptxDocument, PptxDocumentSchema, type ProvenanceChange, ProvenanceChangeSchema, type ProvenanceDescriptor, ProvenanceDescriptorSchema, type Relationship, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, type SectionChild, type SectionConstructGroupNode, SectionConstructGroupSchema, type SectionDescriptor, type SectionGroupNode, SectionGroupSchema, type ShapeChild, type ShapeConstructGroupNode, ShapeConstructGroupSchema, type ShapeDescriptor, type ShapeGroupNode, ShapeGroupSchema, type SheetChild, type SheetDescriptor, type SheetGroupNode, SheetGroupSchema, type SlideDescriptor, type SlideGroupNode, SlideGroupSchema, type StyleEntry, StyleEntrySchema, type StyleParagraphProperties, StyleParagraphPropertiesSchema, type StyleRunProperties, StyleRunPropertiesSchema, type StylesTable, StylesTableSchema, 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, applyColorTransforms, applyParagraphStyleProperties, applyRunStyleProperties, assemblePackage, attr, base64ToBytes, buildDocxPackage, buildDocxPackageFromContent, buildXlsxPackage, buildXlsxPackageFromContent, buildXml, bytesToBase64, childrenWithTag, colorToRgbHex, compactCodec, compactPackageCodec, decodeCompactPackage, decodeEntities, decodePackage, decompose, el, elementsWithTag, encodeCompactPackage, encodePackage, encodeXmlText, factorStyles, findConstructMarkerImbalance, flattenPackage, fromCompact, isCompactXmlNode, isContentBlock, isContentConstructEnd, isContentConstructStart, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isPackageBlockLeaf, isPackageGroup, isPackageLeaf, isPackageNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, isXmlNode, overlayStyleEntries, packageCodec, parsePackage, parseXml, readDocx, readDocxContent, readNumberingDefinitions, readPptx, readPptxContent, readXlsx, readXlsxContent, readXlsxWorkbook, resolveRelationships, resolveStyleChain, rgbHexToColor, rootElement, serializePackage, sniffImageFormat, textContent, toCompact, txt, unzipPackage, walk, xmlCodec, zipPackage };
|
package/dist/index.js
CHANGED
|
@@ -15,11 +15,12 @@ import { applyColorTransforms } from "./typed/shared/color.js";
|
|
|
15
15
|
import { DocumentMetadataSchema } from "./typed/shared/metadata.js";
|
|
16
16
|
import { sniffImageFormat } from "./image/sniff.js";
|
|
17
17
|
import { NumberingDefinitionSchema, NumberingLevelSchema, readNumberingDefinitions } from "./typed/docx/numbering.js";
|
|
18
|
-
import { CommentSchema, DocxDocumentSchema, FootnoteSchema,
|
|
19
|
-
import {
|
|
20
|
-
import { PptxDocumentSchema,
|
|
21
|
-
import {
|
|
18
|
+
import { CommentSchema, DocxDocumentSchema, FootnoteSchema, readDocxContent } from "./typed/docx/read.js";
|
|
19
|
+
import { buildDocxPackageFromContent } from "./typed/docx/write.js";
|
|
20
|
+
import { PptxDocumentSchema, readPptxContent } from "./typed/pptx/read.js";
|
|
21
|
+
import { buildXlsxPackageFromContent } from "./typed/xlsx/build.js";
|
|
22
22
|
import { readXlsxContent } from "./typed/xlsx/content.js";
|
|
23
|
-
import { buildXlsxPackage } from "./typed/
|
|
24
|
-
import {
|
|
25
|
-
|
|
23
|
+
import { buildDocxPackage, buildXlsxPackage, readDocx, readPptx, readXlsx } from "./typed/document-package.js";
|
|
24
|
+
import { DefinedNameSchema, XlsxCellSchema, XlsxSheetSchema, XlsxWorkbookSchema, readXlsxWorkbook } from "./typed/xlsx.js";
|
|
25
|
+
import { AlignmentSchema, AnchorDescriptorSchema, AnchorTypeSchema, BoxSchema, COLOR_BLACK, ColorSchema, ConstructDescriptorSchema, ConstructMarkerImbalanceError, ContentBlockSchema, ContentBorderSchema, ContentCellBordersSchema, ContentCellValueSchema, ContentConstructEndSchema, ContentConstructStartSchema, ContentControlDescriptorSchema, ContentControlLockSchema, ContentControlTypeSchema, ContentDocumentSchema, ContentImageBlockSchema, ContentListMembershipSchema, ContentPageBreakSchema, ContentParagraphSchema, ContentRunSchema, ContentSectionSchema, ContentShapeSchema, ContentSheetCellSchema, ContentSheetColumnSchema, ContentSheetImageSchema, ContentSheetPrintRangeSchema, ContentSheetPrintSettingsSchema, ContentSheetRepeatRangeSchema, ContentSheetRowSchema, ContentSheetSchema, ContentSlideSchema, ContentStrokeStyleSchema, ContentTableCellSchema, ContentTableRowSchema, ContentTableSchema, DivisionDescriptorSchema, DocumentPackageSchema, DrawPageGroupSchema, FieldDescriptorSchema, HeadingGroupSchema, LinkDescriptorSchema, LinkTargetSchema, ListGroupSchema, MarginsSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PackageBlockLeafSchema, PackageGroupSchema, PackageLeafSchema, PackageNodeSchema, PageSizeSchema, ProvenanceChangeSchema, ProvenanceDescriptorSchema, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, SectionConstructGroupSchema, SectionGroupSchema, ShapeConstructGroupSchema, ShapeGroupSchema, SheetGroupSchema, SlideGroupSchema, StyleEntrySchema, StyleParagraphPropertiesSchema, StyleRunPropertiesSchema, StylesTableSchema, applyParagraphStyleProperties, applyRunStyleProperties, assemblePackage, colorToRgbHex, decompose, factorStyles, findConstructMarkerImbalance, flattenPackage, isContentBlock, isContentConstructEnd, isContentConstructStart, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isPackageBlockLeaf, isPackageGroup, isPackageLeaf, isPackageNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, overlayStyleEntries, resolveStyleChain, rgbHexToColor } from "document-schema.js";
|
|
26
|
+
export { AlignmentSchema, AnchorDescriptorSchema, AnchorTypeSchema, AttributeSchema, BinaryPartSchema, BoxSchema, COLOR_BLACK, ColorSchema, CommentSchema, CompactPackageSchema, CompactPartSchema, CompactXmlNodeSchema, ConstructDescriptorSchema, ConstructMarkerImbalanceError, ContentBlockSchema, ContentBorderSchema, ContentCellBordersSchema, ContentCellValueSchema, ContentConstructEndSchema, ContentConstructStartSchema, ContentControlDescriptorSchema, ContentControlLockSchema, ContentControlTypeSchema, ContentDocumentSchema, ContentImageBlockSchema, ContentListMembershipSchema, ContentPageBreakSchema, ContentParagraphSchema, ContentRunSchema, ContentSectionSchema, ContentShapeSchema, ContentSheetCellSchema, ContentSheetColumnSchema, ContentSheetImageSchema, ContentSheetPrintRangeSchema, ContentSheetPrintSettingsSchema, ContentSheetRepeatRangeSchema, ContentSheetRowSchema, ContentSheetSchema, ContentSlideSchema, ContentStrokeStyleSchema, ContentTableCellSchema, ContentTableRowSchema, ContentTableSchema, DefinedNameSchema, DivisionDescriptorSchema, DocumentMetadataSchema, DocumentPackageSchema, DocxDocumentSchema, DrawPageGroupSchema, FieldDescriptorSchema, FootnoteSchema, HeadingGroupSchema, LinkDescriptorSchema, LinkTargetSchema, ListGroupSchema, MarginsSchema, NumberingDefinitionSchema, NumberingLevelSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PackageBlockLeafSchema, PackageGroupSchema, PackageLeafSchema, PackageNodeSchema, PackageSchema, PageSizeSchema, PartSchema, PptxDocumentSchema, ProvenanceChangeSchema, ProvenanceDescriptorSchema, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, SectionConstructGroupSchema, SectionGroupSchema, ShapeConstructGroupSchema, ShapeGroupSchema, SheetGroupSchema, SlideGroupSchema, StyleEntrySchema, StyleParagraphPropertiesSchema, StyleRunPropertiesSchema, StylesTableSchema, XlsxCellSchema, XlsxSheetSchema, XlsxWorkbookSchema, XmlCdataSchema, XmlCommentSchema, XmlDeclarationSchema, XmlElementSchema, XmlNodeSchema, XmlPartSchema, XmlPiSchema, XmlTextSchema, applyColorTransforms, applyParagraphStyleProperties, applyRunStyleProperties, assemblePackage, attr, base64ToBytes, buildDocxPackage, buildDocxPackageFromContent, buildXlsxPackage, buildXlsxPackageFromContent, buildXml, bytesToBase64, childrenWithTag, colorToRgbHex, compactCodec, compactPackageCodec, decodeCompactPackage, decodeEntities, decodePackage, decompose, el, elementsWithTag, encodeCompactPackage, encodePackage, encodeXmlText, factorStyles, findConstructMarkerImbalance, flattenPackage, fromCompact, isCompactXmlNode, isContentBlock, isContentConstructEnd, isContentConstructStart, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isPackageBlockLeaf, isPackageGroup, isPackageLeaf, isPackageNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, isXmlNode, overlayStyleEntries, packageCodec, parsePackage, parseXml, readDocx, readDocxContent, readNumberingDefinitions, readPptx, readPptxContent, readXlsx, readXlsxContent, readXlsxWorkbook, resolveRelationships, resolveStyleChain, rgbHexToColor, rootElement, serializePackage, sniffImageFormat, textContent, toCompact, txt, unzipPackage, walk, xmlCodec, zipPackage };
|
|
@@ -55,6 +55,6 @@ declare const DocxDocumentSchema: z.ZodObject<{
|
|
|
55
55
|
}, z.core.$strip>>;
|
|
56
56
|
}, z.core.$strip>;
|
|
57
57
|
type DocxDocument = z.infer<typeof DocxDocumentSchema>;
|
|
58
|
-
declare function
|
|
58
|
+
declare function readDocxContent(pkg: Package): DocxDocument;
|
|
59
59
|
//#endregion
|
|
60
|
-
export { Footnote as a, DocxDocumentSchema as i, CommentSchema as n, FootnoteSchema as o, DocxDocument as r,
|
|
60
|
+
export { Footnote as a, DocxDocumentSchema as i, CommentSchema as n, FootnoteSchema as o, DocxDocument as r, readDocxContent as s, Comment as t };
|
|
@@ -47,6 +47,6 @@ declare const PptxDocumentSchema: z.ZodObject<{
|
|
|
47
47
|
}, z.core.$strip>>;
|
|
48
48
|
}, z.core.$strip>;
|
|
49
49
|
type PptxDocument = z.infer<typeof PptxDocumentSchema>;
|
|
50
|
-
declare function
|
|
50
|
+
declare function readPptxContent(pkg: Package): PptxDocument;
|
|
51
51
|
//#endregion
|
|
52
|
-
export { PptxDocumentSchema as n,
|
|
52
|
+
export { PptxDocumentSchema as n, readPptxContent as r, PptxDocument as t };
|
|
@@ -47,6 +47,6 @@ declare const PptxDocumentSchema: z.ZodObject<{
|
|
|
47
47
|
}, z.core.$strip>>;
|
|
48
48
|
}, z.core.$strip>;
|
|
49
49
|
type PptxDocument = z.infer<typeof PptxDocumentSchema>;
|
|
50
|
-
declare function
|
|
50
|
+
declare function readPptxContent(pkg: Package): PptxDocument;
|
|
51
51
|
//#endregion
|
|
52
|
-
export { PptxDocumentSchema as n,
|
|
52
|
+
export { PptxDocumentSchema as n, readPptxContent as r, PptxDocument as t };
|
|
@@ -55,6 +55,6 @@ declare const DocxDocumentSchema: z.ZodObject<{
|
|
|
55
55
|
}, z.core.$strip>>;
|
|
56
56
|
}, z.core.$strip>;
|
|
57
57
|
type DocxDocument = z.infer<typeof DocxDocumentSchema>;
|
|
58
|
-
declare function
|
|
58
|
+
declare function readDocxContent(pkg: Package): DocxDocument;
|
|
59
59
|
//#endregion
|
|
60
|
-
export { Footnote as a, DocxDocumentSchema as i, CommentSchema as n, FootnoteSchema as o, DocxDocument as r,
|
|
60
|
+
export { Footnote as a, DocxDocumentSchema as i, CommentSchema as n, FootnoteSchema as o, DocxDocument as r, readDocxContent as s, Comment as t };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_typed_docx_read = require("./docx/read.cjs");
|
|
3
|
+
const require_typed_docx_write = require("./docx/write.cjs");
|
|
4
|
+
const require_typed_pptx_read = require("./pptx/read.cjs");
|
|
5
|
+
const require_typed_xlsx_build = require("./xlsx/build.cjs");
|
|
6
|
+
const require_typed_xlsx_content = require("./xlsx/content.cjs");
|
|
7
|
+
let document_schema_js = require("document-schema.js");
|
|
8
|
+
//#region src/typed/document-package.ts
|
|
9
|
+
function readDocx(pkg) {
|
|
10
|
+
const { metadata, sections } = require_typed_docx_read.readDocxContent(pkg);
|
|
11
|
+
return (0, document_schema_js.assemblePackage)({
|
|
12
|
+
kind: "wordprocessing",
|
|
13
|
+
metadata,
|
|
14
|
+
sections
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function buildDocxPackage(document) {
|
|
18
|
+
const content = (0, document_schema_js.flattenPackage)(document);
|
|
19
|
+
if (content.kind !== "wordprocessing") throw new Error(`buildDocxPackage: expected a DocumentPackage of kind "wordprocessing", got "${content.kind}"`);
|
|
20
|
+
return require_typed_docx_write.buildDocxPackageFromContent(content);
|
|
21
|
+
}
|
|
22
|
+
function readPptx(pkg) {
|
|
23
|
+
const { metadata, slides } = require_typed_pptx_read.readPptxContent(pkg);
|
|
24
|
+
return (0, document_schema_js.assemblePackage)({
|
|
25
|
+
kind: "presentation",
|
|
26
|
+
metadata,
|
|
27
|
+
slides
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function readXlsx(pkg) {
|
|
31
|
+
return (0, document_schema_js.assemblePackage)(require_typed_xlsx_content.readXlsxContent(pkg));
|
|
32
|
+
}
|
|
33
|
+
function buildXlsxPackage(document) {
|
|
34
|
+
const content = (0, document_schema_js.flattenPackage)(document);
|
|
35
|
+
if (content.kind !== "spreadsheet") throw new Error(`buildXlsxPackage: expected a DocumentPackage of kind "spreadsheet", got "${content.kind}"`);
|
|
36
|
+
return require_typed_xlsx_build.buildXlsxPackageFromContent(content);
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
exports.buildDocxPackage = buildDocxPackage;
|
|
40
|
+
exports.buildXlsxPackage = buildXlsxPackage;
|
|
41
|
+
exports.readDocx = readDocx;
|
|
42
|
+
exports.readPptx = readPptx;
|
|
43
|
+
exports.readXlsx = readXlsx;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { readDocxContent } from "./docx/read.js";
|
|
2
|
+
import { buildDocxPackageFromContent } from "./docx/write.js";
|
|
3
|
+
import { readPptxContent } from "./pptx/read.js";
|
|
4
|
+
import { buildXlsxPackageFromContent } from "./xlsx/build.js";
|
|
5
|
+
import { readXlsxContent } from "./xlsx/content.js";
|
|
6
|
+
import { assemblePackage, flattenPackage } from "document-schema.js";
|
|
7
|
+
//#region src/typed/document-package.ts
|
|
8
|
+
function readDocx(pkg) {
|
|
9
|
+
const { metadata, sections } = readDocxContent(pkg);
|
|
10
|
+
return assemblePackage({
|
|
11
|
+
kind: "wordprocessing",
|
|
12
|
+
metadata,
|
|
13
|
+
sections
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function buildDocxPackage(document) {
|
|
17
|
+
const content = flattenPackage(document);
|
|
18
|
+
if (content.kind !== "wordprocessing") throw new Error(`buildDocxPackage: expected a DocumentPackage of kind "wordprocessing", got "${content.kind}"`);
|
|
19
|
+
return buildDocxPackageFromContent(content);
|
|
20
|
+
}
|
|
21
|
+
function readPptx(pkg) {
|
|
22
|
+
const { metadata, slides } = readPptxContent(pkg);
|
|
23
|
+
return assemblePackage({
|
|
24
|
+
kind: "presentation",
|
|
25
|
+
metadata,
|
|
26
|
+
slides
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function readXlsx(pkg) {
|
|
30
|
+
return assemblePackage(readXlsxContent(pkg));
|
|
31
|
+
}
|
|
32
|
+
function buildXlsxPackage(document) {
|
|
33
|
+
const content = flattenPackage(document);
|
|
34
|
+
if (content.kind !== "spreadsheet") throw new Error(`buildXlsxPackage: expected a DocumentPackage of kind "spreadsheet", got "${content.kind}"`);
|
|
35
|
+
return buildXlsxPackageFromContent(content);
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { buildDocxPackage, buildXlsxPackage, readDocx, readPptx, readXlsx };
|