ooxml.js 2.0.2 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +168 -213
- package/dist/index.d.cts +4 -235
- package/dist/index.d.ts +4 -235
- package/dist/index.js +18 -188
- package/package.json +4 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { Alignment, AlignmentSchema, Box, BoxSchema, COLOR_BLACK, Color, Color as Color$1, ColorSchema, ContentBlock, ContentBlock as ContentBlock$1, ContentBlockSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembershipSchema, ContentPageBreak, ContentPageBreakSchema, ContentParagraph, ContentParagraphSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSlide, ContentSlideSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, Margins, MarginsSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSize, PageSizeSchema, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, colorToRgbHex, isContentBlock, rgbHexToColor } from "document-content-model";
|
|
2
3
|
//#region src/model/node.d.ts
|
|
3
4
|
declare const AttributeSchema: z.ZodObject<{
|
|
4
5
|
name: z.ZodString;
|
|
@@ -360,55 +361,12 @@ declare const compactPackageCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer
|
|
|
360
361
|
declare function decodeCompactPackage(bytes: Uint8Array<ArrayBuffer>): CompactPackage;
|
|
361
362
|
declare function encodeCompactPackage(cpkg: CompactPackage): Uint8Array<ArrayBuffer>;
|
|
362
363
|
//#endregion
|
|
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
364
|
//#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
365
|
interface ColorTransform {
|
|
399
366
|
readonly kind: 'shade' | 'tint' | 'lumMod' | 'lumOff';
|
|
400
367
|
readonly value: number;
|
|
401
368
|
}
|
|
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>;
|
|
369
|
+
declare function applyColorTransforms(base: Color$1, transforms: readonly ColorTransform[]): Color$1;
|
|
412
370
|
//#endregion
|
|
413
371
|
//#region src/typed/shared/metadata.d.ts
|
|
414
372
|
declare const DocumentMetadataSchema: z.ZodObject<{
|
|
@@ -422,195 +380,6 @@ declare const DocumentMetadataSchema: z.ZodObject<{
|
|
|
422
380
|
}, z.core.$strip>;
|
|
423
381
|
type DocumentMetadata = z.infer<typeof DocumentMetadataSchema>;
|
|
424
382
|
//#endregion
|
|
425
|
-
//#region src/typed/shared/content.d.ts
|
|
426
|
-
declare const ContentRunSchema: z.ZodObject<{
|
|
427
|
-
text: z.ZodString;
|
|
428
|
-
bold: z.ZodOptional<z.ZodBoolean>;
|
|
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>;
|
|
440
|
-
}, z.core.$strip>;
|
|
441
|
-
type ContentRun = z.infer<typeof ContentRunSchema>;
|
|
442
|
-
declare const ContentListMembershipSchema: z.ZodObject<{
|
|
443
|
-
numId: z.ZodString;
|
|
444
|
-
level: z.ZodNumber;
|
|
445
|
-
}, z.core.$strip>;
|
|
446
|
-
type ContentListMembership = z.infer<typeof ContentListMembershipSchema>;
|
|
447
|
-
declare const ContentParagraphSchema: z.ZodObject<{
|
|
448
|
-
kind: z.ZodLiteral<"paragraph">;
|
|
449
|
-
runs: z.ZodArray<z.ZodObject<{
|
|
450
|
-
text: z.ZodString;
|
|
451
|
-
bold: z.ZodOptional<z.ZodBoolean>;
|
|
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>;
|
|
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
|
-
}>>;
|
|
471
|
-
list: z.ZodOptional<z.ZodObject<{
|
|
472
|
-
numId: z.ZodString;
|
|
473
|
-
level: z.ZodNumber;
|
|
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>;
|
|
480
|
-
}, z.core.$strip>;
|
|
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;
|
|
524
|
-
}, z.core.$strip>>;
|
|
525
|
-
}, z.core.$strip>;
|
|
526
|
-
declare const ContentTableRowSchema: z.ZodObject<{
|
|
527
|
-
cells: z.ZodArray<z.ZodObject<{
|
|
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;
|
|
535
|
-
}, z.core.$strip>>;
|
|
536
|
-
}, z.core.$strip>>;
|
|
537
|
-
heightPt: z.ZodOptional<z.ZodNumber>;
|
|
538
|
-
}, z.core.$strip>;
|
|
539
|
-
declare const ContentTableSchema: z.ZodObject<{
|
|
540
|
-
kind: z.ZodLiteral<"table">;
|
|
541
|
-
rows: z.ZodArray<z.ZodObject<{
|
|
542
|
-
cells: z.ZodArray<z.ZodObject<{
|
|
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;
|
|
550
|
-
}, z.core.$strip>>;
|
|
551
|
-
}, z.core.$strip>>;
|
|
552
|
-
heightPt: z.ZodOptional<z.ZodNumber>;
|
|
553
|
-
}, z.core.$strip>>;
|
|
554
|
-
columnWidthsPt: z.ZodArray<z.ZodNumber>;
|
|
555
|
-
}, z.core.$strip>;
|
|
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>>;
|
|
586
|
-
}, z.core.$strip>;
|
|
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
383
|
//#region src/image/sniff.d.ts
|
|
615
384
|
type ImageFormat = 'png' | 'jpeg';
|
|
616
385
|
declare function sniffImageFormat(bytes: Uint8Array<ArrayBuffer>): ImageFormat | undefined;
|
|
@@ -647,7 +416,7 @@ declare const DocxDocumentSchema: z.ZodObject<{
|
|
|
647
416
|
bottomPt: z.ZodNumber;
|
|
648
417
|
leftPt: z.ZodNumber;
|
|
649
418
|
}, z.core.$strip>;
|
|
650
|
-
blocks: z.ZodArray<z.ZodCustom<ContentBlock, ContentBlock>>;
|
|
419
|
+
blocks: z.ZodArray<z.ZodCustom<ContentBlock$1, ContentBlock$1>>;
|
|
651
420
|
}, z.core.$strip>>;
|
|
652
421
|
comments: z.ZodArray<z.ZodObject<{
|
|
653
422
|
author: z.ZodOptional<z.ZodString>;
|
|
@@ -694,7 +463,7 @@ declare const PptxDocumentSchema: z.ZodObject<{
|
|
|
694
463
|
insetBottomPt: z.ZodNumber;
|
|
695
464
|
fontScale: z.ZodOptional<z.ZodNumber>;
|
|
696
465
|
lineSpacingReduction: z.ZodOptional<z.ZodNumber>;
|
|
697
|
-
blocks: z.ZodArray<z.ZodCustom<ContentBlock, ContentBlock>>;
|
|
466
|
+
blocks: z.ZodArray<z.ZodCustom<ContentBlock$1, ContentBlock$1>>;
|
|
698
467
|
}, z.core.$strip>>;
|
|
699
468
|
notes: z.ZodString;
|
|
700
469
|
}, z.core.$strip>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { Alignment, AlignmentSchema, Box, BoxSchema, COLOR_BLACK, Color, Color as Color$1, ColorSchema, ContentBlock, ContentBlock as ContentBlock$1, ContentBlockSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembershipSchema, ContentPageBreak, ContentPageBreakSchema, ContentParagraph, ContentParagraphSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSlide, ContentSlideSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, Margins, MarginsSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSize, PageSizeSchema, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, colorToRgbHex, isContentBlock, rgbHexToColor } from "document-content-model";
|
|
2
3
|
//#region src/model/node.d.ts
|
|
3
4
|
declare const AttributeSchema: z.ZodObject<{
|
|
4
5
|
name: z.ZodString;
|
|
@@ -360,55 +361,12 @@ declare const compactPackageCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer
|
|
|
360
361
|
declare function decodeCompactPackage(bytes: Uint8Array<ArrayBuffer>): CompactPackage;
|
|
361
362
|
declare function encodeCompactPackage(cpkg: CompactPackage): Uint8Array<ArrayBuffer>;
|
|
362
363
|
//#endregion
|
|
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
364
|
//#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
365
|
interface ColorTransform {
|
|
399
366
|
readonly kind: 'shade' | 'tint' | 'lumMod' | 'lumOff';
|
|
400
367
|
readonly value: number;
|
|
401
368
|
}
|
|
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>;
|
|
369
|
+
declare function applyColorTransforms(base: Color$1, transforms: readonly ColorTransform[]): Color$1;
|
|
412
370
|
//#endregion
|
|
413
371
|
//#region src/typed/shared/metadata.d.ts
|
|
414
372
|
declare const DocumentMetadataSchema: z.ZodObject<{
|
|
@@ -422,195 +380,6 @@ declare const DocumentMetadataSchema: z.ZodObject<{
|
|
|
422
380
|
}, z.core.$strip>;
|
|
423
381
|
type DocumentMetadata = z.infer<typeof DocumentMetadataSchema>;
|
|
424
382
|
//#endregion
|
|
425
|
-
//#region src/typed/shared/content.d.ts
|
|
426
|
-
declare const ContentRunSchema: z.ZodObject<{
|
|
427
|
-
text: z.ZodString;
|
|
428
|
-
bold: z.ZodOptional<z.ZodBoolean>;
|
|
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>;
|
|
440
|
-
}, z.core.$strip>;
|
|
441
|
-
type ContentRun = z.infer<typeof ContentRunSchema>;
|
|
442
|
-
declare const ContentListMembershipSchema: z.ZodObject<{
|
|
443
|
-
numId: z.ZodString;
|
|
444
|
-
level: z.ZodNumber;
|
|
445
|
-
}, z.core.$strip>;
|
|
446
|
-
type ContentListMembership = z.infer<typeof ContentListMembershipSchema>;
|
|
447
|
-
declare const ContentParagraphSchema: z.ZodObject<{
|
|
448
|
-
kind: z.ZodLiteral<"paragraph">;
|
|
449
|
-
runs: z.ZodArray<z.ZodObject<{
|
|
450
|
-
text: z.ZodString;
|
|
451
|
-
bold: z.ZodOptional<z.ZodBoolean>;
|
|
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>;
|
|
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
|
-
}>>;
|
|
471
|
-
list: z.ZodOptional<z.ZodObject<{
|
|
472
|
-
numId: z.ZodString;
|
|
473
|
-
level: z.ZodNumber;
|
|
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>;
|
|
480
|
-
}, z.core.$strip>;
|
|
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;
|
|
524
|
-
}, z.core.$strip>>;
|
|
525
|
-
}, z.core.$strip>;
|
|
526
|
-
declare const ContentTableRowSchema: z.ZodObject<{
|
|
527
|
-
cells: z.ZodArray<z.ZodObject<{
|
|
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;
|
|
535
|
-
}, z.core.$strip>>;
|
|
536
|
-
}, z.core.$strip>>;
|
|
537
|
-
heightPt: z.ZodOptional<z.ZodNumber>;
|
|
538
|
-
}, z.core.$strip>;
|
|
539
|
-
declare const ContentTableSchema: z.ZodObject<{
|
|
540
|
-
kind: z.ZodLiteral<"table">;
|
|
541
|
-
rows: z.ZodArray<z.ZodObject<{
|
|
542
|
-
cells: z.ZodArray<z.ZodObject<{
|
|
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;
|
|
550
|
-
}, z.core.$strip>>;
|
|
551
|
-
}, z.core.$strip>>;
|
|
552
|
-
heightPt: z.ZodOptional<z.ZodNumber>;
|
|
553
|
-
}, z.core.$strip>>;
|
|
554
|
-
columnWidthsPt: z.ZodArray<z.ZodNumber>;
|
|
555
|
-
}, z.core.$strip>;
|
|
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>>;
|
|
586
|
-
}, z.core.$strip>;
|
|
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
383
|
//#region src/image/sniff.d.ts
|
|
615
384
|
type ImageFormat = 'png' | 'jpeg';
|
|
616
385
|
declare function sniffImageFormat(bytes: Uint8Array<ArrayBuffer>): ImageFormat | undefined;
|
|
@@ -647,7 +416,7 @@ declare const DocxDocumentSchema: z.ZodObject<{
|
|
|
647
416
|
bottomPt: z.ZodNumber;
|
|
648
417
|
leftPt: z.ZodNumber;
|
|
649
418
|
}, z.core.$strip>;
|
|
650
|
-
blocks: z.ZodArray<z.ZodCustom<ContentBlock, ContentBlock>>;
|
|
419
|
+
blocks: z.ZodArray<z.ZodCustom<ContentBlock$1, ContentBlock$1>>;
|
|
651
420
|
}, z.core.$strip>>;
|
|
652
421
|
comments: z.ZodArray<z.ZodObject<{
|
|
653
422
|
author: z.ZodOptional<z.ZodString>;
|
|
@@ -694,7 +463,7 @@ declare const PptxDocumentSchema: z.ZodObject<{
|
|
|
694
463
|
insetBottomPt: z.ZodNumber;
|
|
695
464
|
fontScale: z.ZodOptional<z.ZodNumber>;
|
|
696
465
|
lineSpacingReduction: z.ZodOptional<z.ZodNumber>;
|
|
697
|
-
blocks: z.ZodArray<z.ZodCustom<ContentBlock, ContentBlock>>;
|
|
466
|
+
blocks: z.ZodArray<z.ZodCustom<ContentBlock$1, ContentBlock$1>>;
|
|
698
467
|
}, z.core.$strip>>;
|
|
699
468
|
notes: z.ZodString;
|
|
700
469
|
}, z.core.$strip>>;
|