ooxml.js 1.3.0 → 2.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 +7 -4
- package/dist/index.cjs +1336 -128
- package/dist/index.d.cts +280 -131
- package/dist/index.d.ts +280 -131
- package/dist/index.js +1308 -116
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -360,83 +360,262 @@ declare const compactPackageCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer
|
|
|
360
360
|
declare function decodeCompactPackage(bytes: Uint8Array<ArrayBuffer>): CompactPackage;
|
|
361
361
|
declare function encodeCompactPackage(cpkg: CompactPackage): Uint8Array<ArrayBuffer>;
|
|
362
362
|
//#endregion
|
|
363
|
-
//#region src/typed/
|
|
364
|
-
declare const
|
|
363
|
+
//#region src/typed/shared/geometry.d.ts
|
|
364
|
+
declare const BoxSchema: z.ZodObject<{
|
|
365
|
+
xPt: z.ZodNumber;
|
|
366
|
+
yPt: z.ZodNumber;
|
|
367
|
+
widthPt: z.ZodNumber;
|
|
368
|
+
heightPt: z.ZodNumber;
|
|
369
|
+
}, z.core.$strip>;
|
|
370
|
+
type Box = z.infer<typeof BoxSchema>;
|
|
371
|
+
declare const PageSizeSchema: z.ZodObject<{
|
|
372
|
+
widthPt: z.ZodNumber;
|
|
373
|
+
heightPt: z.ZodNumber;
|
|
374
|
+
}, z.core.$strip>;
|
|
375
|
+
type PageSize = z.infer<typeof PageSizeSchema>;
|
|
376
|
+
declare const MarginsSchema: z.ZodObject<{
|
|
377
|
+
topPt: z.ZodNumber;
|
|
378
|
+
rightPt: z.ZodNumber;
|
|
379
|
+
bottomPt: z.ZodNumber;
|
|
380
|
+
leftPt: z.ZodNumber;
|
|
381
|
+
}, z.core.$strip>;
|
|
382
|
+
type Margins = z.infer<typeof MarginsSchema>;
|
|
383
|
+
declare const PAGE_SIZE_LETTER: PageSize;
|
|
384
|
+
declare const PAGE_SIZE_A4: PageSize;
|
|
385
|
+
declare const SLIDE_SIZE_WIDESCREEN: PageSize;
|
|
386
|
+
declare const SLIDE_SIZE_STANDARD: PageSize;
|
|
387
|
+
//#endregion
|
|
388
|
+
//#region src/typed/shared/color.d.ts
|
|
389
|
+
declare const ColorSchema: z.ZodObject<{
|
|
390
|
+
r: z.ZodNumber;
|
|
391
|
+
g: z.ZodNumber;
|
|
392
|
+
b: z.ZodNumber;
|
|
393
|
+
}, z.core.$strip>;
|
|
394
|
+
type Color = z.infer<typeof ColorSchema>;
|
|
395
|
+
declare const COLOR_BLACK: Color;
|
|
396
|
+
declare function rgbHexToColor(hex: string): Color;
|
|
397
|
+
declare function colorToRgbHex(color: Color): string;
|
|
398
|
+
interface ColorTransform {
|
|
399
|
+
readonly kind: 'shade' | 'tint' | 'lumMod' | 'lumOff';
|
|
400
|
+
readonly value: number;
|
|
401
|
+
}
|
|
402
|
+
declare function applyColorTransforms(base: Color, transforms: readonly ColorTransform[]): Color;
|
|
403
|
+
//#endregion
|
|
404
|
+
//#region src/typed/shared/style.d.ts
|
|
405
|
+
declare const AlignmentSchema: z.ZodEnum<{
|
|
406
|
+
left: "left";
|
|
407
|
+
center: "center";
|
|
408
|
+
right: "right";
|
|
409
|
+
justify: "justify";
|
|
410
|
+
}>;
|
|
411
|
+
type Alignment = z.infer<typeof AlignmentSchema>;
|
|
412
|
+
//#endregion
|
|
413
|
+
//#region src/typed/shared/metadata.d.ts
|
|
414
|
+
declare const DocumentMetadataSchema: z.ZodObject<{
|
|
415
|
+
title: z.ZodOptional<z.ZodString>;
|
|
416
|
+
author: z.ZodOptional<z.ZodString>;
|
|
417
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
418
|
+
keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
419
|
+
creator: z.ZodOptional<z.ZodString>;
|
|
420
|
+
createdIso: z.ZodOptional<z.ZodString>;
|
|
421
|
+
modifiedIso: z.ZodOptional<z.ZodString>;
|
|
422
|
+
}, z.core.$strip>;
|
|
423
|
+
type DocumentMetadata = z.infer<typeof DocumentMetadataSchema>;
|
|
424
|
+
//#endregion
|
|
425
|
+
//#region src/typed/shared/content.d.ts
|
|
426
|
+
declare const ContentRunSchema: z.ZodObject<{
|
|
365
427
|
text: z.ZodString;
|
|
366
428
|
bold: z.ZodOptional<z.ZodBoolean>;
|
|
367
429
|
italic: z.ZodOptional<z.ZodBoolean>;
|
|
430
|
+
underline: z.ZodOptional<z.ZodBoolean>;
|
|
431
|
+
strike: z.ZodOptional<z.ZodBoolean>;
|
|
432
|
+
fontFamily: z.ZodOptional<z.ZodString>;
|
|
433
|
+
sizePt: z.ZodOptional<z.ZodNumber>;
|
|
434
|
+
color: z.ZodOptional<z.ZodObject<{
|
|
435
|
+
r: z.ZodNumber;
|
|
436
|
+
g: z.ZodNumber;
|
|
437
|
+
b: z.ZodNumber;
|
|
438
|
+
}, z.core.$strip>>;
|
|
439
|
+
hyperlink: z.ZodOptional<z.ZodString>;
|
|
368
440
|
}, z.core.$strip>;
|
|
369
|
-
type
|
|
370
|
-
declare const
|
|
441
|
+
type ContentRun = z.infer<typeof ContentRunSchema>;
|
|
442
|
+
declare const ContentListMembershipSchema: z.ZodObject<{
|
|
371
443
|
numId: z.ZodString;
|
|
372
444
|
level: z.ZodNumber;
|
|
373
445
|
}, z.core.$strip>;
|
|
374
|
-
type
|
|
375
|
-
declare const
|
|
446
|
+
type ContentListMembership = z.infer<typeof ContentListMembershipSchema>;
|
|
447
|
+
declare const ContentParagraphSchema: z.ZodObject<{
|
|
448
|
+
kind: z.ZodLiteral<"paragraph">;
|
|
376
449
|
runs: z.ZodArray<z.ZodObject<{
|
|
377
450
|
text: z.ZodString;
|
|
378
451
|
bold: z.ZodOptional<z.ZodBoolean>;
|
|
379
452
|
italic: z.ZodOptional<z.ZodBoolean>;
|
|
453
|
+
underline: z.ZodOptional<z.ZodBoolean>;
|
|
454
|
+
strike: z.ZodOptional<z.ZodBoolean>;
|
|
455
|
+
fontFamily: z.ZodOptional<z.ZodString>;
|
|
456
|
+
sizePt: z.ZodOptional<z.ZodNumber>;
|
|
457
|
+
color: z.ZodOptional<z.ZodObject<{
|
|
458
|
+
r: z.ZodNumber;
|
|
459
|
+
g: z.ZodNumber;
|
|
460
|
+
b: z.ZodNumber;
|
|
461
|
+
}, z.core.$strip>>;
|
|
462
|
+
hyperlink: z.ZodOptional<z.ZodString>;
|
|
380
463
|
}, z.core.$strip>>;
|
|
464
|
+
styleId: z.ZodOptional<z.ZodString>;
|
|
465
|
+
alignment: z.ZodOptional<z.ZodEnum<{
|
|
466
|
+
left: "left";
|
|
467
|
+
center: "center";
|
|
468
|
+
right: "right";
|
|
469
|
+
justify: "justify";
|
|
470
|
+
}>>;
|
|
381
471
|
list: z.ZodOptional<z.ZodObject<{
|
|
382
472
|
numId: z.ZodString;
|
|
383
473
|
level: z.ZodNumber;
|
|
384
474
|
}, z.core.$strip>>;
|
|
475
|
+
spacingBeforePt: z.ZodOptional<z.ZodNumber>;
|
|
476
|
+
spacingAfterPt: z.ZodOptional<z.ZodNumber>;
|
|
477
|
+
lineSpacing: z.ZodOptional<z.ZodNumber>;
|
|
478
|
+
indentLeftPt: z.ZodOptional<z.ZodNumber>;
|
|
479
|
+
indentFirstLinePt: z.ZodOptional<z.ZodNumber>;
|
|
385
480
|
}, z.core.$strip>;
|
|
386
|
-
type
|
|
387
|
-
declare const
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
481
|
+
type ContentParagraph = z.infer<typeof ContentParagraphSchema>;
|
|
482
|
+
declare const ContentImageBlockSchema: z.ZodObject<{
|
|
483
|
+
kind: z.ZodLiteral<"image">;
|
|
484
|
+
format: z.ZodEnum<{
|
|
485
|
+
png: "png";
|
|
486
|
+
jpeg: "jpeg";
|
|
487
|
+
}>;
|
|
488
|
+
base64: z.ZodString;
|
|
489
|
+
widthPt: z.ZodNumber;
|
|
490
|
+
heightPt: z.ZodNumber;
|
|
491
|
+
altText: z.ZodOptional<z.ZodString>;
|
|
492
|
+
}, z.core.$strip>;
|
|
493
|
+
type ContentImageBlock = z.infer<typeof ContentImageBlockSchema>;
|
|
494
|
+
declare const ContentPageBreakSchema: z.ZodObject<{
|
|
495
|
+
kind: z.ZodLiteral<"pageBreak">;
|
|
496
|
+
}, z.core.$strip>;
|
|
497
|
+
type ContentPageBreak = z.infer<typeof ContentPageBreakSchema>;
|
|
498
|
+
interface ContentTableCell {
|
|
499
|
+
blocks: ContentBlock[];
|
|
500
|
+
colSpan?: number;
|
|
501
|
+
rowSpan?: number;
|
|
502
|
+
background?: Color;
|
|
503
|
+
}
|
|
504
|
+
interface ContentTableRow {
|
|
505
|
+
cells: ContentTableCell[];
|
|
506
|
+
heightPt?: number;
|
|
507
|
+
}
|
|
508
|
+
interface ContentTable {
|
|
509
|
+
kind: 'table';
|
|
510
|
+
rows: ContentTableRow[];
|
|
511
|
+
columnWidthsPt: number[];
|
|
512
|
+
}
|
|
513
|
+
type ContentBlock = ContentParagraph | ContentTable | ContentImageBlock | ContentPageBreak;
|
|
514
|
+
declare function isContentBlock(value: unknown): value is ContentBlock;
|
|
515
|
+
declare const ContentBlockSchema: z.ZodCustom<ContentBlock, ContentBlock>;
|
|
516
|
+
declare const ContentTableCellSchema: z.ZodObject<{
|
|
517
|
+
blocks: z.ZodArray<z.ZodCustom<ContentBlock, ContentBlock>>;
|
|
518
|
+
colSpan: z.ZodOptional<z.ZodNumber>;
|
|
519
|
+
rowSpan: z.ZodOptional<z.ZodNumber>;
|
|
520
|
+
background: z.ZodOptional<z.ZodObject<{
|
|
521
|
+
r: z.ZodNumber;
|
|
522
|
+
g: z.ZodNumber;
|
|
523
|
+
b: z.ZodNumber;
|
|
398
524
|
}, z.core.$strip>>;
|
|
399
525
|
}, z.core.$strip>;
|
|
400
|
-
|
|
401
|
-
declare const TableRowSchema: z.ZodObject<{
|
|
526
|
+
declare const ContentTableRowSchema: z.ZodObject<{
|
|
402
527
|
cells: z.ZodArray<z.ZodObject<{
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
numId: z.ZodString;
|
|
411
|
-
level: z.ZodNumber;
|
|
412
|
-
}, z.core.$strip>>;
|
|
528
|
+
blocks: z.ZodArray<z.ZodCustom<ContentBlock, ContentBlock>>;
|
|
529
|
+
colSpan: z.ZodOptional<z.ZodNumber>;
|
|
530
|
+
rowSpan: z.ZodOptional<z.ZodNumber>;
|
|
531
|
+
background: z.ZodOptional<z.ZodObject<{
|
|
532
|
+
r: z.ZodNumber;
|
|
533
|
+
g: z.ZodNumber;
|
|
534
|
+
b: z.ZodNumber;
|
|
413
535
|
}, z.core.$strip>>;
|
|
414
536
|
}, z.core.$strip>>;
|
|
537
|
+
heightPt: z.ZodOptional<z.ZodNumber>;
|
|
415
538
|
}, z.core.$strip>;
|
|
416
|
-
|
|
417
|
-
|
|
539
|
+
declare const ContentTableSchema: z.ZodObject<{
|
|
540
|
+
kind: z.ZodLiteral<"table">;
|
|
418
541
|
rows: z.ZodArray<z.ZodObject<{
|
|
419
542
|
cells: z.ZodArray<z.ZodObject<{
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
numId: z.ZodString;
|
|
428
|
-
level: z.ZodNumber;
|
|
429
|
-
}, z.core.$strip>>;
|
|
543
|
+
blocks: z.ZodArray<z.ZodCustom<ContentBlock, ContentBlock>>;
|
|
544
|
+
colSpan: z.ZodOptional<z.ZodNumber>;
|
|
545
|
+
rowSpan: z.ZodOptional<z.ZodNumber>;
|
|
546
|
+
background: z.ZodOptional<z.ZodObject<{
|
|
547
|
+
r: z.ZodNumber;
|
|
548
|
+
g: z.ZodNumber;
|
|
549
|
+
b: z.ZodNumber;
|
|
430
550
|
}, z.core.$strip>>;
|
|
431
551
|
}, z.core.$strip>>;
|
|
552
|
+
heightPt: z.ZodOptional<z.ZodNumber>;
|
|
432
553
|
}, z.core.$strip>>;
|
|
554
|
+
columnWidthsPt: z.ZodArray<z.ZodNumber>;
|
|
433
555
|
}, z.core.$strip>;
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
556
|
+
declare const ContentSectionSchema: z.ZodObject<{
|
|
557
|
+
pageSize: z.ZodObject<{
|
|
558
|
+
widthPt: z.ZodNumber;
|
|
559
|
+
heightPt: z.ZodNumber;
|
|
560
|
+
}, z.core.$strip>;
|
|
561
|
+
margins: z.ZodObject<{
|
|
562
|
+
topPt: z.ZodNumber;
|
|
563
|
+
rightPt: z.ZodNumber;
|
|
564
|
+
bottomPt: z.ZodNumber;
|
|
565
|
+
leftPt: z.ZodNumber;
|
|
566
|
+
}, z.core.$strip>;
|
|
567
|
+
blocks: z.ZodArray<z.ZodCustom<ContentBlock, ContentBlock>>;
|
|
568
|
+
}, z.core.$strip>;
|
|
569
|
+
type ContentSection = z.infer<typeof ContentSectionSchema>;
|
|
570
|
+
declare const ContentShapeSchema: z.ZodObject<{
|
|
571
|
+
name: z.ZodOptional<z.ZodString>;
|
|
572
|
+
frame: z.ZodObject<{
|
|
573
|
+
xPt: z.ZodNumber;
|
|
574
|
+
yPt: z.ZodNumber;
|
|
575
|
+
widthPt: z.ZodNumber;
|
|
576
|
+
heightPt: z.ZodNumber;
|
|
577
|
+
}, z.core.$strip>;
|
|
578
|
+
rotationDeg: z.ZodOptional<z.ZodNumber>;
|
|
579
|
+
insetLeftPt: z.ZodNumber;
|
|
580
|
+
insetTopPt: z.ZodNumber;
|
|
581
|
+
insetRightPt: z.ZodNumber;
|
|
582
|
+
insetBottomPt: z.ZodNumber;
|
|
583
|
+
fontScale: z.ZodOptional<z.ZodNumber>;
|
|
584
|
+
lineSpacingReduction: z.ZodOptional<z.ZodNumber>;
|
|
585
|
+
blocks: z.ZodArray<z.ZodCustom<ContentBlock, ContentBlock>>;
|
|
438
586
|
}, z.core.$strip>;
|
|
439
|
-
type
|
|
587
|
+
type ContentShape = z.infer<typeof ContentShapeSchema>;
|
|
588
|
+
declare const ContentSlideSchema: z.ZodObject<{
|
|
589
|
+
size: z.ZodObject<{
|
|
590
|
+
widthPt: z.ZodNumber;
|
|
591
|
+
heightPt: z.ZodNumber;
|
|
592
|
+
}, z.core.$strip>;
|
|
593
|
+
shapes: z.ZodArray<z.ZodObject<{
|
|
594
|
+
name: z.ZodOptional<z.ZodString>;
|
|
595
|
+
frame: z.ZodObject<{
|
|
596
|
+
xPt: z.ZodNumber;
|
|
597
|
+
yPt: z.ZodNumber;
|
|
598
|
+
widthPt: z.ZodNumber;
|
|
599
|
+
heightPt: z.ZodNumber;
|
|
600
|
+
}, z.core.$strip>;
|
|
601
|
+
rotationDeg: z.ZodOptional<z.ZodNumber>;
|
|
602
|
+
insetLeftPt: z.ZodNumber;
|
|
603
|
+
insetTopPt: z.ZodNumber;
|
|
604
|
+
insetRightPt: z.ZodNumber;
|
|
605
|
+
insetBottomPt: z.ZodNumber;
|
|
606
|
+
fontScale: z.ZodOptional<z.ZodNumber>;
|
|
607
|
+
lineSpacingReduction: z.ZodOptional<z.ZodNumber>;
|
|
608
|
+
blocks: z.ZodArray<z.ZodCustom<ContentBlock, ContentBlock>>;
|
|
609
|
+
}, z.core.$strip>>;
|
|
610
|
+
notes: z.ZodString;
|
|
611
|
+
}, z.core.$strip>;
|
|
612
|
+
type ContentSlide = z.infer<typeof ContentSlideSchema>;
|
|
613
|
+
//#endregion
|
|
614
|
+
//#region src/image/sniff.d.ts
|
|
615
|
+
type ImageFormat = 'png' | 'jpeg';
|
|
616
|
+
declare function sniffImageFormat(bytes: Uint8Array<ArrayBuffer>): ImageFormat | undefined;
|
|
617
|
+
//#endregion
|
|
618
|
+
//#region src/typed/docx/read.d.ts
|
|
440
619
|
declare const CommentSchema: z.ZodObject<{
|
|
441
620
|
author: z.ZodOptional<z.ZodString>;
|
|
442
621
|
text: z.ZodString;
|
|
@@ -448,37 +627,27 @@ declare const FootnoteSchema: z.ZodObject<{
|
|
|
448
627
|
}, z.core.$strip>;
|
|
449
628
|
type Footnote = z.infer<typeof FootnoteSchema>;
|
|
450
629
|
declare const DocxDocumentSchema: z.ZodObject<{
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
numId: z.ZodString;
|
|
473
|
-
level: z.ZodNumber;
|
|
474
|
-
}, z.core.$strip>>;
|
|
475
|
-
}, z.core.$strip>>;
|
|
476
|
-
}, z.core.$strip>>;
|
|
477
|
-
}, z.core.$strip>>;
|
|
478
|
-
}, z.core.$strip>>;
|
|
479
|
-
hyperlinks: z.ZodArray<z.ZodObject<{
|
|
480
|
-
text: z.ZodString;
|
|
481
|
-
target: z.ZodString;
|
|
630
|
+
metadata: z.ZodObject<{
|
|
631
|
+
title: z.ZodOptional<z.ZodString>;
|
|
632
|
+
author: z.ZodOptional<z.ZodString>;
|
|
633
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
634
|
+
keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
635
|
+
creator: z.ZodOptional<z.ZodString>;
|
|
636
|
+
createdIso: z.ZodOptional<z.ZodString>;
|
|
637
|
+
modifiedIso: z.ZodOptional<z.ZodString>;
|
|
638
|
+
}, z.core.$strip>;
|
|
639
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
640
|
+
pageSize: z.ZodObject<{
|
|
641
|
+
widthPt: z.ZodNumber;
|
|
642
|
+
heightPt: z.ZodNumber;
|
|
643
|
+
}, z.core.$strip>;
|
|
644
|
+
margins: z.ZodObject<{
|
|
645
|
+
topPt: z.ZodNumber;
|
|
646
|
+
rightPt: z.ZodNumber;
|
|
647
|
+
bottomPt: z.ZodNumber;
|
|
648
|
+
leftPt: z.ZodNumber;
|
|
649
|
+
}, z.core.$strip>;
|
|
650
|
+
blocks: z.ZodArray<z.ZodCustom<ContentBlock, ContentBlock>>;
|
|
482
651
|
}, z.core.$strip>>;
|
|
483
652
|
comments: z.ZodArray<z.ZodObject<{
|
|
484
653
|
author: z.ZodOptional<z.ZodString>;
|
|
@@ -494,64 +663,44 @@ declare const DocxDocumentSchema: z.ZodObject<{
|
|
|
494
663
|
type DocxDocument = z.infer<typeof DocxDocumentSchema>;
|
|
495
664
|
declare function readDocx(pkg: Package): DocxDocument;
|
|
496
665
|
//#endregion
|
|
497
|
-
//#region src/typed/pptx.d.ts
|
|
498
|
-
declare const
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
text: z.ZodString;
|
|
509
|
-
}, z.core.$strip>>;
|
|
510
|
-
}, z.core.$strip>;
|
|
511
|
-
type PptxTableRow = z.infer<typeof PptxTableRowSchema>;
|
|
512
|
-
declare const PptxTableSchema: z.ZodObject<{
|
|
513
|
-
rows: z.ZodArray<z.ZodObject<{
|
|
514
|
-
cells: z.ZodArray<z.ZodObject<{
|
|
515
|
-
text: z.ZodString;
|
|
516
|
-
}, z.core.$strip>>;
|
|
517
|
-
}, z.core.$strip>>;
|
|
518
|
-
}, z.core.$strip>;
|
|
519
|
-
type PptxTable = z.infer<typeof PptxTableSchema>;
|
|
520
|
-
declare const SlideSchema: z.ZodObject<{
|
|
521
|
-
index: z.ZodNumber;
|
|
522
|
-
text: z.ZodString;
|
|
523
|
-
shapes: z.ZodArray<z.ZodObject<{
|
|
524
|
-
text: z.ZodString;
|
|
525
|
-
}, z.core.$strip>>;
|
|
526
|
-
tables: z.ZodArray<z.ZodObject<{
|
|
527
|
-
rows: z.ZodArray<z.ZodObject<{
|
|
528
|
-
cells: z.ZodArray<z.ZodObject<{
|
|
529
|
-
text: z.ZodString;
|
|
530
|
-
}, z.core.$strip>>;
|
|
531
|
-
}, z.core.$strip>>;
|
|
532
|
-
}, z.core.$strip>>;
|
|
533
|
-
notes: z.ZodString;
|
|
534
|
-
}, z.core.$strip>;
|
|
535
|
-
type Slide = z.infer<typeof SlideSchema>;
|
|
536
|
-
declare const PptxPresentationSchema: z.ZodObject<{
|
|
666
|
+
//#region src/typed/pptx/read.d.ts
|
|
667
|
+
declare const PptxDocumentSchema: z.ZodObject<{
|
|
668
|
+
metadata: z.ZodObject<{
|
|
669
|
+
title: z.ZodOptional<z.ZodString>;
|
|
670
|
+
author: z.ZodOptional<z.ZodString>;
|
|
671
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
672
|
+
keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
673
|
+
creator: z.ZodOptional<z.ZodString>;
|
|
674
|
+
createdIso: z.ZodOptional<z.ZodString>;
|
|
675
|
+
modifiedIso: z.ZodOptional<z.ZodString>;
|
|
676
|
+
}, z.core.$strip>;
|
|
537
677
|
slides: z.ZodArray<z.ZodObject<{
|
|
538
|
-
|
|
539
|
-
|
|
678
|
+
size: z.ZodObject<{
|
|
679
|
+
widthPt: z.ZodNumber;
|
|
680
|
+
heightPt: z.ZodNumber;
|
|
681
|
+
}, z.core.$strip>;
|
|
540
682
|
shapes: z.ZodArray<z.ZodObject<{
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
683
|
+
name: z.ZodOptional<z.ZodString>;
|
|
684
|
+
frame: z.ZodObject<{
|
|
685
|
+
xPt: z.ZodNumber;
|
|
686
|
+
yPt: z.ZodNumber;
|
|
687
|
+
widthPt: z.ZodNumber;
|
|
688
|
+
heightPt: z.ZodNumber;
|
|
689
|
+
}, z.core.$strip>;
|
|
690
|
+
rotationDeg: z.ZodOptional<z.ZodNumber>;
|
|
691
|
+
insetLeftPt: z.ZodNumber;
|
|
692
|
+
insetTopPt: z.ZodNumber;
|
|
693
|
+
insetRightPt: z.ZodNumber;
|
|
694
|
+
insetBottomPt: z.ZodNumber;
|
|
695
|
+
fontScale: z.ZodOptional<z.ZodNumber>;
|
|
696
|
+
lineSpacingReduction: z.ZodOptional<z.ZodNumber>;
|
|
697
|
+
blocks: z.ZodArray<z.ZodCustom<ContentBlock, ContentBlock>>;
|
|
549
698
|
}, z.core.$strip>>;
|
|
550
699
|
notes: z.ZodString;
|
|
551
700
|
}, z.core.$strip>>;
|
|
552
701
|
}, z.core.$strip>;
|
|
553
|
-
type
|
|
554
|
-
declare function readPptx(pkg: Package):
|
|
702
|
+
type PptxDocument = z.infer<typeof PptxDocumentSchema>;
|
|
703
|
+
declare function readPptx(pkg: Package): PptxDocument;
|
|
555
704
|
//#endregion
|
|
556
705
|
//#region src/typed/xlsx.d.ts
|
|
557
706
|
declare const XlsxCellSchema: z.ZodObject<{
|
|
@@ -593,4 +742,4 @@ declare const XlsxWorkbookSchema: z.ZodObject<{
|
|
|
593
742
|
type XlsxWorkbook = z.infer<typeof XlsxWorkbookSchema>;
|
|
594
743
|
declare function readXlsx(pkg: Package): XlsxWorkbook;
|
|
595
744
|
//#endregion
|
|
596
|
-
export { type Attribute, AttributeSchema, type BinaryPart, BinaryPartSchema, type Comment, CommentSchema, type CompactAttrPairs, type CompactPackage, CompactPackageSchema, type CompactPart, CompactPartSchema, type CompactXmlNode, CompactXmlNodeSchema, type
|
|
745
|
+
export { type Alignment, AlignmentSchema, 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 ContentBlock, ContentBlockSchema, type ContentImageBlock, ContentImageBlockSchema, type ContentListMembership, ContentListMembershipSchema, type ContentPageBreak, ContentPageBreakSchema, type ContentParagraph, ContentParagraphSchema, type ContentRun, ContentRunSchema, type ContentSection, ContentSectionSchema, type ContentShape, ContentShapeSchema, type ContentSlide, ContentSlideSchema, type ContentTable, type ContentTableCell, ContentTableCellSchema, type ContentTableRow, ContentTableRowSchema, ContentTableSchema, type DefinedName, DefinedNameSchema, type DocumentMetadata, DocumentMetadataSchema, type DocxDocument, DocxDocumentSchema, type Footnote, FootnoteSchema, type ImageFormat, type Margins, MarginsSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, type Package, PackageSchema, type PageSize, PageSizeSchema, type Part, PartSchema, type PptxDocument, PptxDocumentSchema, 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, buildXml, bytesToBase64, childrenWithTag, colorToRgbHex, compactCodec, compactPackageCodec, decodeCompactPackage, decodeEntities, decodePackage, elementsWithTag, encodeCompactPackage, encodePackage, fromCompact, isCompactXmlNode, isContentBlock, isXmlNode, packageCodec, parsePackage, parseXml, readDocx, readPptx, readXlsx, resolveRelationships, rgbHexToColor, rootElement, serializePackage, sniffImageFormat, textContent, toCompact, unzipPackage, walk, xmlCodec, zipPackage };
|