@json-to-office/shared-docx 0.13.0 → 0.14.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.
Files changed (41) hide show
  1. package/dist/{chunk-ZQNAWKEI.js → chunk-52PV5JQK.js} +2 -2
  2. package/dist/chunk-52PV5JQK.js.map +1 -0
  3. package/dist/{chunk-7LRSVYGN.js → chunk-5BKZFYJL.js} +61 -51
  4. package/dist/chunk-5BKZFYJL.js.map +1 -0
  5. package/dist/{chunk-CIBMJ7QA.js → chunk-6IXK54YE.js} +2 -2
  6. package/dist/{chunk-YUV5CJMG.js → chunk-CGMJ665Z.js} +488 -436
  7. package/dist/chunk-CGMJ665Z.js.map +1 -0
  8. package/dist/{chunk-BFJJ5HYD.js → chunk-CY6IVMEZ.js} +7 -2
  9. package/dist/chunk-CY6IVMEZ.js.map +1 -0
  10. package/dist/{chunk-VBZC5WT6.js → chunk-FA6FKO3L.js} +2 -2
  11. package/dist/{chunk-ANU2V2BM.js → chunk-HJIS6RRQ.js} +6 -6
  12. package/dist/{chunk-25SAKHVN.js → chunk-PQGT7BU5.js} +2 -2
  13. package/dist/{chunk-IHZIO72A.js → chunk-QUA2GDH7.js} +2 -2
  14. package/dist/{chunk-YK2UUG65.js → chunk-X2B5OVWA.js} +2 -2
  15. package/dist/index.d.ts +144 -19
  16. package/dist/index.js +688 -10
  17. package/dist/index.js.map +1 -1
  18. package/dist/schemas/api.js +4 -4
  19. package/dist/schemas/component-defaults.d.ts +48 -32
  20. package/dist/schemas/component-defaults.js +1 -1
  21. package/dist/schemas/component-registry.js +2 -2
  22. package/dist/schemas/components.d.ts +90 -33
  23. package/dist/schemas/components.js +7 -3
  24. package/dist/schemas/document.js +5 -5
  25. package/dist/schemas/export.js +3 -3
  26. package/dist/schemas/generator.js +3 -3
  27. package/dist/schemas/theme.d.ts +24 -16
  28. package/dist/schemas/theme.js +2 -2
  29. package/dist/validation/unified/index.d.ts +59 -19
  30. package/dist/validation/unified/index.js +6 -6
  31. package/package.json +2 -2
  32. package/dist/chunk-7LRSVYGN.js.map +0 -1
  33. package/dist/chunk-BFJJ5HYD.js.map +0 -1
  34. package/dist/chunk-YUV5CJMG.js.map +0 -1
  35. package/dist/chunk-ZQNAWKEI.js.map +0 -1
  36. /package/dist/{chunk-CIBMJ7QA.js.map → chunk-6IXK54YE.js.map} +0 -0
  37. /package/dist/{chunk-VBZC5WT6.js.map → chunk-FA6FKO3L.js.map} +0 -0
  38. /package/dist/{chunk-ANU2V2BM.js.map → chunk-HJIS6RRQ.js.map} +0 -0
  39. /package/dist/{chunk-25SAKHVN.js.map → chunk-PQGT7BU5.js.map} +0 -0
  40. /package/dist/{chunk-IHZIO72A.js.map → chunk-QUA2GDH7.js.map} +0 -0
  41. /package/dist/{chunk-YK2UUG65.js.map → chunk-X2B5OVWA.js.map} +0 -0
@@ -5,10 +5,10 @@ import {
5
5
  } from "./chunk-H56RLQOF.js";
6
6
 
7
7
  // src/schemas/component-defaults.ts
8
- import { Type as Type10 } from "@sinclair/typebox";
8
+ import { Type as Type11 } from "@sinclair/typebox";
9
9
 
10
10
  // src/schemas/components/heading.ts
11
- import { Type as Type2 } from "@sinclair/typebox";
11
+ import { Type as Type3 } from "@sinclair/typebox";
12
12
 
13
13
  // src/schemas/components/common.ts
14
14
  import { Type } from "@sinclair/typebox";
@@ -369,46 +369,90 @@ var BaseComponentPropsSchema = Type.Object(BaseComponentFields, {
369
369
  additionalProperties: true
370
370
  });
371
371
 
372
- // src/schemas/components/heading.ts
373
- var HeadingPropsSchema = Type2.Object(
372
+ // src/schemas/components/revision.ts
373
+ import { Type as Type2 } from "@sinclair/typebox";
374
+ var RevisionSegmentSchema = Type2.Object(
374
375
  {
376
+ type: Type2.Union(
377
+ [Type2.Literal("equal"), Type2.Literal("insert"), Type2.Literal("delete")],
378
+ {
379
+ description: "Segment kind: 'equal' renders as normal text, 'insert' as a tracked insertion, 'delete' as a tracked deletion"
380
+ }
381
+ ),
375
382
  text: Type2.String({
383
+ description: "Literal text of this segment (rendered without markdown)"
384
+ })
385
+ },
386
+ {
387
+ description: "A contiguous run of text sharing one revision state",
388
+ additionalProperties: false
389
+ }
390
+ );
391
+ var RevisionSchema = Type2.Object(
392
+ {
393
+ author: Type2.Optional(
394
+ Type2.String({
395
+ description: 'Revision author shown in Word (default: "json-to-office")'
396
+ })
397
+ ),
398
+ date: Type2.Optional(
399
+ Type2.String({
400
+ format: "date-time",
401
+ description: "Revision timestamp (ISO 8601). Defaults to the Unix epoch for deterministic output"
402
+ })
403
+ ),
404
+ segments: Type2.Array(RevisionSegmentSchema, {
405
+ minItems: 1,
406
+ description: "Ordered text segments; concatenating equal+insert segments yields the new text, equal+delete the old text"
407
+ })
408
+ },
409
+ {
410
+ description: "Tracked-change data: renders the component text as native Word revisions (accept/reject in Word)",
411
+ additionalProperties: false
412
+ }
413
+ );
414
+
415
+ // src/schemas/components/heading.ts
416
+ var HeadingPropsSchema = Type3.Object(
417
+ {
418
+ text: Type3.String({
376
419
  description: "Heading text (required)"
377
420
  }),
378
- level: Type2.Optional(HeadingLevelSchema),
421
+ level: Type3.Optional(HeadingLevelSchema),
379
422
  // Local font override: allows customizing family/size/color/bold/italic/underline
380
423
  // without modifying theme styles. Supports partial overrides.
381
- font: Type2.Optional(Type2.Partial(FontDefinitionSchema)),
382
- alignment: Type2.Optional(JustifiedAlignmentSchema),
383
- spacing: Type2.Optional(SpacingSchema),
384
- lineSpacing: Type2.Optional(
385
- Type2.Union([Type2.Number({ minimum: 0 }), LineSpacingSchema])
386
- ),
387
- pageBreak: Type2.Optional(
388
- Type2.Boolean({
424
+ font: Type3.Optional(Type3.Partial(FontDefinitionSchema)),
425
+ alignment: Type3.Optional(JustifiedAlignmentSchema),
426
+ spacing: Type3.Optional(SpacingSchema),
427
+ lineSpacing: Type3.Optional(
428
+ Type3.Union([Type3.Number({ minimum: 0 }), LineSpacingSchema])
429
+ ),
430
+ pageBreak: Type3.Optional(
431
+ Type3.Boolean({
389
432
  description: "Insert page break before heading"
390
433
  })
391
434
  ),
392
- columnBreak: Type2.Optional(
393
- Type2.Boolean({
435
+ columnBreak: Type3.Optional(
436
+ Type3.Boolean({
394
437
  description: "Insert column break before heading"
395
438
  })
396
439
  ),
397
- numbering: Type2.Optional(
398
- Type2.Boolean({
440
+ numbering: Type3.Optional(
441
+ Type3.Boolean({
399
442
  description: "Include in numbering"
400
443
  })
401
444
  ),
402
- keepNext: Type2.Optional(
403
- Type2.Boolean({
445
+ keepNext: Type3.Optional(
446
+ Type3.Boolean({
404
447
  description: "Keep heading with next paragraph on same page"
405
448
  })
406
449
  ),
407
- keepLines: Type2.Optional(
408
- Type2.Boolean({
450
+ keepLines: Type3.Optional(
451
+ Type3.Boolean({
409
452
  description: "Keep all lines of heading together on same page"
410
453
  })
411
- )
454
+ ),
455
+ revision: Type3.Optional(RevisionSchema)
412
456
  },
413
457
  {
414
458
  description: "Heading component props",
@@ -417,63 +461,63 @@ var HeadingPropsSchema = Type2.Object(
417
461
  );
418
462
 
419
463
  // src/schemas/components/paragraph.ts
420
- import { Type as Type3 } from "@sinclair/typebox";
421
- var FrameWrapTypeSchema = Type3.Union(
464
+ import { Type as Type4 } from "@sinclair/typebox";
465
+ var FrameWrapTypeSchema = Type4.Union(
422
466
  [
423
- Type3.Literal("around"),
424
- Type3.Literal("none"),
425
- Type3.Literal("notBeside"),
426
- Type3.Literal("through"),
427
- Type3.Literal("tight"),
428
- Type3.Literal("auto")
467
+ Type4.Literal("around"),
468
+ Type4.Literal("none"),
469
+ Type4.Literal("notBeside"),
470
+ Type4.Literal("through"),
471
+ Type4.Literal("tight"),
472
+ Type4.Literal("auto")
429
473
  ],
430
474
  {
431
475
  description: "Frame text wrapping type"
432
476
  }
433
477
  );
434
- var FrameAnchorTypeSchema = Type3.Union(
435
- [Type3.Literal("margin"), Type3.Literal("page"), Type3.Literal("text")],
478
+ var FrameAnchorTypeSchema = Type4.Union(
479
+ [Type4.Literal("margin"), Type4.Literal("page"), Type4.Literal("text")],
436
480
  {
437
481
  description: "Frame anchor type"
438
482
  }
439
483
  );
440
- var FrameHorizontalAlignSchema = Type3.Union(
484
+ var FrameHorizontalAlignSchema = Type4.Union(
441
485
  [
442
- Type3.Literal("left"),
443
- Type3.Literal("center"),
444
- Type3.Literal("right"),
445
- Type3.Literal("inside"),
446
- Type3.Literal("outside")
486
+ Type4.Literal("left"),
487
+ Type4.Literal("center"),
488
+ Type4.Literal("right"),
489
+ Type4.Literal("inside"),
490
+ Type4.Literal("outside")
447
491
  ],
448
492
  {
449
493
  description: "Frame horizontal alignment"
450
494
  }
451
495
  );
452
- var FrameVerticalAlignSchema = Type3.Union(
496
+ var FrameVerticalAlignSchema = Type4.Union(
453
497
  [
454
- Type3.Literal("top"),
455
- Type3.Literal("center"),
456
- Type3.Literal("bottom"),
457
- Type3.Literal("inside"),
458
- Type3.Literal("outside")
498
+ Type4.Literal("top"),
499
+ Type4.Literal("center"),
500
+ Type4.Literal("bottom"),
501
+ Type4.Literal("inside"),
502
+ Type4.Literal("outside")
459
503
  ],
460
504
  {
461
505
  description: "Frame vertical alignment"
462
506
  }
463
507
  );
464
- var FloatingFramePropertiesSchema = Type3.Object(
508
+ var FloatingFramePropertiesSchema = Type4.Object(
465
509
  {
466
- horizontalPosition: Type3.Optional(
467
- Type3.Object(
510
+ horizontalPosition: Type4.Optional(
511
+ Type4.Object(
468
512
  {
469
- relative: Type3.Optional(FrameAnchorTypeSchema),
470
- align: Type3.Optional(FrameHorizontalAlignSchema),
471
- offset: Type3.Optional(
472
- Type3.Union([
473
- Type3.Number({
513
+ relative: Type4.Optional(FrameAnchorTypeSchema),
514
+ align: Type4.Optional(FrameHorizontalAlignSchema),
515
+ offset: Type4.Optional(
516
+ Type4.Union([
517
+ Type4.Number({
474
518
  description: "Horizontal offset in twips (1/20 of a point)"
475
519
  }),
476
- Type3.String({
520
+ Type4.String({
477
521
  pattern: "^\\d+(\\.\\d+)?%$",
478
522
  description: 'Horizontal offset as percentage (e.g., "50%") relative to page or margin width'
479
523
  })
@@ -485,17 +529,17 @@ var FloatingFramePropertiesSchema = Type3.Object(
485
529
  }
486
530
  )
487
531
  ),
488
- verticalPosition: Type3.Optional(
489
- Type3.Object(
532
+ verticalPosition: Type4.Optional(
533
+ Type4.Object(
490
534
  {
491
- relative: Type3.Optional(FrameAnchorTypeSchema),
492
- align: Type3.Optional(FrameVerticalAlignSchema),
493
- offset: Type3.Optional(
494
- Type3.Union([
495
- Type3.Number({
535
+ relative: Type4.Optional(FrameAnchorTypeSchema),
536
+ align: Type4.Optional(FrameVerticalAlignSchema),
537
+ offset: Type4.Optional(
538
+ Type4.Union([
539
+ Type4.Number({
496
540
  description: "Vertical offset in twips (1/20 of a point)"
497
541
  }),
498
- Type3.String({
542
+ Type4.String({
499
543
  pattern: "^\\d+(\\.\\d+)?%$",
500
544
  description: 'Vertical offset as percentage (e.g., "50%") relative to page or margin height'
501
545
  })
@@ -507,8 +551,8 @@ var FloatingFramePropertiesSchema = Type3.Object(
507
551
  }
508
552
  )
509
553
  ),
510
- wrap: Type3.Optional(
511
- Type3.Object(
554
+ wrap: Type4.Optional(
555
+ Type4.Object(
512
556
  {
513
557
  type: FrameWrapTypeSchema
514
558
  },
@@ -517,19 +561,19 @@ var FloatingFramePropertiesSchema = Type3.Object(
517
561
  }
518
562
  )
519
563
  ),
520
- lockAnchor: Type3.Optional(
521
- Type3.Boolean({
564
+ lockAnchor: Type4.Optional(
565
+ Type4.Boolean({
522
566
  description: "Lock the anchor position"
523
567
  })
524
568
  ),
525
- width: Type3.Optional(
526
- Type3.Number({
569
+ width: Type4.Optional(
570
+ Type4.Number({
527
571
  minimum: 1,
528
572
  description: "Frame width in twips (DXA units)"
529
573
  })
530
574
  ),
531
- height: Type3.Optional(
532
- Type3.Number({
575
+ height: Type4.Optional(
576
+ Type4.Number({
533
577
  minimum: 1,
534
578
  description: "Frame height in twips (DXA units)"
535
579
  })
@@ -539,59 +583,60 @@ var FloatingFramePropertiesSchema = Type3.Object(
539
583
  description: "Floating text frame properties"
540
584
  }
541
585
  );
542
- var AlignmentSchema2 = Type3.Union(
586
+ var AlignmentSchema2 = Type4.Union(
543
587
  [
544
- Type3.Literal("left"),
545
- Type3.Literal("center"),
546
- Type3.Literal("right"),
547
- Type3.Literal("justify")
588
+ Type4.Literal("left"),
589
+ Type4.Literal("center"),
590
+ Type4.Literal("right"),
591
+ Type4.Literal("justify")
548
592
  ],
549
593
  {
550
594
  description: "Paragraph text alignment"
551
595
  }
552
596
  );
553
- var ParagraphPropsSchema = Type3.Object(
597
+ var ParagraphPropsSchema = Type4.Object(
554
598
  {
555
- text: Type3.String({
599
+ text: Type4.String({
556
600
  description: "Text content (required)"
557
601
  }),
558
602
  // New nested font object, aligned with theme's FontDefinitionSchema
559
603
  // Allow partial overrides (family not required when overriding a subset)
560
- font: Type3.Optional(Type3.Partial(FontDefinitionSchema)),
604
+ font: Type4.Optional(Type4.Partial(FontDefinitionSchema)),
561
605
  // Optional reference to a named style from theme.styles (e.g., 'heading1', 'normal')
562
- themeStyle: Type3.Optional(Type3.String()),
606
+ themeStyle: Type4.Optional(Type4.String()),
563
607
  // Rich-text decoration color for bold segments (kept as top-level behavior option)
564
- boldColor: Type3.Optional(Type3.String()),
608
+ boldColor: Type4.Optional(Type4.String()),
565
609
  // Paragraph spacing (in points) — limited paragraph-level option allowed
566
- spacing: Type3.Optional(SpacingSchema),
610
+ spacing: Type4.Optional(SpacingSchema),
567
611
  // Paragraph alignment (moved from font to config level)
568
- alignment: Type3.Optional(AlignmentSchema2),
569
- pageBreak: Type3.Optional(
570
- Type3.Boolean({
612
+ alignment: Type4.Optional(AlignmentSchema2),
613
+ pageBreak: Type4.Optional(
614
+ Type4.Boolean({
571
615
  description: "Insert page break before paragraph"
572
616
  })
573
617
  ),
574
- columnBreak: Type3.Optional(
575
- Type3.Boolean({
618
+ columnBreak: Type4.Optional(
619
+ Type4.Boolean({
576
620
  description: "Insert column break before paragraph"
577
621
  })
578
622
  ),
579
- floating: Type3.Optional(FloatingFramePropertiesSchema),
580
- keepNext: Type3.Optional(
581
- Type3.Boolean({
623
+ floating: Type4.Optional(FloatingFramePropertiesSchema),
624
+ keepNext: Type4.Optional(
625
+ Type4.Boolean({
582
626
  description: "Keep paragraph with next paragraph on same page"
583
627
  })
584
628
  ),
585
- keepLines: Type3.Optional(
586
- Type3.Boolean({
629
+ keepLines: Type4.Optional(
630
+ Type4.Boolean({
587
631
  description: "Keep all lines of paragraph together on same page"
588
632
  })
589
633
  ),
590
- id: Type3.Optional(
591
- Type3.String({
634
+ id: Type4.Optional(
635
+ Type4.String({
592
636
  description: "Unique identifier for internal linking (bookmark anchor)"
593
637
  })
594
- )
638
+ ),
639
+ revision: Type4.Optional(RevisionSchema)
595
640
  },
596
641
  {
597
642
  description: "Paragraph component props (font nested for theme consistency; no flat font properties)",
@@ -600,32 +645,32 @@ var ParagraphPropsSchema = Type3.Object(
600
645
  );
601
646
 
602
647
  // src/schemas/components/image.ts
603
- import { Type as Type4 } from "@sinclair/typebox";
604
- var ImagePropsSchema = Type4.Object(
648
+ import { Type as Type5 } from "@sinclair/typebox";
649
+ var ImagePropsSchema = Type5.Object(
605
650
  {
606
- path: Type4.Optional(
607
- Type4.String({
651
+ path: Type5.Optional(
652
+ Type5.String({
608
653
  description: "Image source URL or file path (mutually exclusive with base64)"
609
654
  })
610
655
  ),
611
- base64: Type4.Optional(
612
- Type4.String({
656
+ base64: Type5.Optional(
657
+ Type5.String({
613
658
  description: 'Base64-encoded image data in data URI format (e.g., "data:image/png;base64,iVBORw0KGgo...") (mutually exclusive with path)'
614
659
  })
615
660
  ),
616
- alt: Type4.Optional(
617
- Type4.String({
661
+ alt: Type5.Optional(
662
+ Type5.String({
618
663
  description: "Alternative text for accessibility"
619
664
  })
620
665
  ),
621
- width: Type4.Optional(
622
- Type4.Union(
666
+ width: Type5.Optional(
667
+ Type5.Union(
623
668
  [
624
- Type4.Number({
669
+ Type5.Number({
625
670
  minimum: 1,
626
671
  description: "Image width in pixels"
627
672
  }),
628
- Type4.String({
673
+ Type5.String({
629
674
  pattern: "^\\d+(\\.\\d+)?%$",
630
675
  description: 'Image width as percentage (e.g., "90%") relative to widthRelativeTo (defaults to content width)'
631
676
  })
@@ -636,14 +681,14 @@ var ImagePropsSchema = Type4.Object(
636
681
  }
637
682
  )
638
683
  ),
639
- height: Type4.Optional(
640
- Type4.Union(
684
+ height: Type5.Optional(
685
+ Type5.Union(
641
686
  [
642
- Type4.Number({
687
+ Type5.Number({
643
688
  minimum: 1,
644
689
  description: "Image height in pixels"
645
690
  }),
646
- Type4.String({
691
+ Type5.String({
647
692
  pattern: "^\\d+(\\.\\d+)?%$",
648
693
  description: 'Image height as percentage (e.g., "90%") relative to heightRelativeTo (defaults to content height)'
649
694
  })
@@ -653,33 +698,33 @@ var ImagePropsSchema = Type4.Object(
653
698
  }
654
699
  )
655
700
  ),
656
- widthRelativeTo: Type4.Optional(
657
- Type4.Union([Type4.Literal("content"), Type4.Literal("page")], {
701
+ widthRelativeTo: Type5.Optional(
702
+ Type5.Union([Type5.Literal("content"), Type5.Literal("page")], {
658
703
  description: "Reference for width percentages: content (page width minus margins) or page (full page width)",
659
704
  default: "content"
660
705
  })
661
706
  ),
662
- heightRelativeTo: Type4.Optional(
663
- Type4.Union([Type4.Literal("content"), Type4.Literal("page")], {
707
+ heightRelativeTo: Type5.Optional(
708
+ Type5.Union([Type5.Literal("content"), Type5.Literal("page")], {
664
709
  description: "Reference for height percentages: content (page height minus margins) or page (full page height)",
665
710
  default: "content"
666
711
  })
667
712
  ),
668
- alignment: Type4.Optional(AlignmentSchema),
669
- caption: Type4.Optional(
670
- Type4.String({
713
+ alignment: Type5.Optional(AlignmentSchema),
714
+ caption: Type5.Optional(
715
+ Type5.String({
671
716
  description: "Image caption (supports rich text with **bold**, *italic*, ***both***)"
672
717
  })
673
718
  ),
674
- spacing: Type4.Optional(SpacingSchema),
675
- floating: Type4.Optional(FloatingPropertiesSchema),
676
- keepNext: Type4.Optional(
677
- Type4.Boolean({
719
+ spacing: Type5.Optional(SpacingSchema),
720
+ floating: Type5.Optional(FloatingPropertiesSchema),
721
+ keepNext: Type5.Optional(
722
+ Type5.Boolean({
678
723
  description: "Keep paragraph with next paragraph on same page"
679
724
  })
680
725
  ),
681
- keepLines: Type4.Optional(
682
- Type4.Boolean({
726
+ keepLines: Type5.Optional(
727
+ Type5.Boolean({
683
728
  description: "Keep all lines of paragraph together on same page"
684
729
  })
685
730
  )
@@ -691,40 +736,40 @@ var ImagePropsSchema = Type4.Object(
691
736
  );
692
737
 
693
738
  // src/schemas/components/statistic.ts
694
- import { Type as Type5 } from "@sinclair/typebox";
695
- var StatisticPropsSchema = Type5.Object(
739
+ import { Type as Type6 } from "@sinclair/typebox";
740
+ var StatisticPropsSchema = Type6.Object(
696
741
  {
697
- number: Type5.String({
742
+ number: Type6.String({
698
743
  description: "Statistic number/value (required)"
699
744
  }),
700
- description: Type5.String({
745
+ description: Type6.String({
701
746
  description: "Statistic description (required)"
702
747
  }),
703
- unit: Type5.Optional(
704
- Type5.String({
748
+ unit: Type6.Optional(
749
+ Type6.String({
705
750
  description: "Unit of measurement"
706
751
  })
707
752
  ),
708
- format: Type5.Optional(
709
- Type5.String({
753
+ format: Type6.Optional(
754
+ Type6.String({
710
755
  description: "Number format pattern"
711
756
  })
712
757
  ),
713
- trend: Type5.Optional(
714
- Type5.Union([
715
- Type5.Literal("up"),
716
- Type5.Literal("down"),
717
- Type5.Literal("neutral")
758
+ trend: Type6.Optional(
759
+ Type6.Union([
760
+ Type6.Literal("up"),
761
+ Type6.Literal("down"),
762
+ Type6.Literal("neutral")
718
763
  ])
719
764
  ),
720
- trendValue: Type5.Optional(Type5.Union([Type5.String(), Type5.Number()])),
721
- alignment: Type5.Optional(AlignmentSchema),
722
- spacing: Type5.Optional(SpacingSchema),
723
- size: Type5.Optional(
724
- Type5.Union([
725
- Type5.Literal("small"),
726
- Type5.Literal("medium"),
727
- Type5.Literal("large")
765
+ trendValue: Type6.Optional(Type6.Union([Type6.String(), Type6.Number()])),
766
+ alignment: Type6.Optional(AlignmentSchema),
767
+ spacing: Type6.Optional(SpacingSchema),
768
+ size: Type6.Optional(
769
+ Type6.Union([
770
+ Type6.Literal("small"),
771
+ Type6.Literal("medium"),
772
+ Type6.Literal("large")
728
773
  ])
729
774
  )
730
775
  },
@@ -735,208 +780,208 @@ var StatisticPropsSchema = Type5.Object(
735
780
  );
736
781
 
737
782
  // src/schemas/components/table.ts
738
- import { Type as Type6 } from "@sinclair/typebox";
739
- var CellContentSchema = Type6.Recursive(
740
- (This) => Type6.Union([
741
- Type6.String(),
742
- Type6.Object(
783
+ import { Type as Type7 } from "@sinclair/typebox";
784
+ var CellContentSchema = Type7.Recursive(
785
+ (This) => Type7.Union([
786
+ Type7.String(),
787
+ Type7.Object(
743
788
  {
744
- name: Type6.String(),
745
- props: Type6.Object({}, { additionalProperties: true }),
746
- children: Type6.Optional(Type6.Array(This))
789
+ name: Type7.String(),
790
+ props: Type7.Object({}, { additionalProperties: true }),
791
+ children: Type7.Optional(Type7.Array(This))
747
792
  },
748
793
  { additionalProperties: false }
749
794
  )
750
795
  ])
751
796
  );
752
- var HorizontalAlignmentSchema = Type6.Union(
797
+ var HorizontalAlignmentSchema = Type7.Union(
753
798
  [
754
- Type6.Literal("left"),
755
- Type6.Literal("center"),
756
- Type6.Literal("right"),
757
- Type6.Literal("justify")
799
+ Type7.Literal("left"),
800
+ Type7.Literal("center"),
801
+ Type7.Literal("right"),
802
+ Type7.Literal("justify")
758
803
  ],
759
804
  { description: "Horizontal text alignment" }
760
805
  );
761
- var VerticalAlignmentSchema = Type6.Union(
762
- [Type6.Literal("top"), Type6.Literal("middle"), Type6.Literal("bottom")],
806
+ var VerticalAlignmentSchema = Type7.Union(
807
+ [Type7.Literal("top"), Type7.Literal("middle"), Type7.Literal("bottom")],
763
808
  { description: "Vertical cell alignment" }
764
809
  );
765
- var FontConfigSchema = Type6.Object({
766
- family: Type6.Optional(Type6.String({ description: "Font family name" })),
767
- size: Type6.Optional(
768
- Type6.Number({ minimum: 0, description: "Font size in points" })
810
+ var FontConfigSchema = Type7.Object({
811
+ family: Type7.Optional(Type7.String({ description: "Font family name" })),
812
+ size: Type7.Optional(
813
+ Type7.Number({ minimum: 0, description: "Font size in points" })
769
814
  ),
770
- bold: Type6.Optional(Type6.Boolean({ description: "Bold text" })),
771
- fontWeight: Type6.Optional(
772
- Type6.Integer({
815
+ bold: Type7.Optional(Type7.Boolean({ description: "Bold text" })),
816
+ fontWeight: Type7.Optional(
817
+ Type7.Integer({
773
818
  minimum: 100,
774
819
  maximum: 900,
775
820
  description: "Per-cell weight (100\u2013900). Overrides `bold` when set."
776
821
  })
777
822
  ),
778
- italic: Type6.Optional(Type6.Boolean({ description: "Italic text" })),
779
- underline: Type6.Optional(Type6.Boolean({ description: "Underlined text" }))
823
+ italic: Type7.Optional(Type7.Boolean({ description: "Italic text" })),
824
+ underline: Type7.Optional(Type7.Boolean({ description: "Underlined text" }))
780
825
  });
781
- var BorderColorSchema = Type6.Union([
782
- Type6.String({ description: "Border color for all sides (hex without #)" }),
783
- Type6.Object({
784
- bottom: Type6.Optional(
785
- Type6.String({ description: "Bottom border color (hex without #)" })
826
+ var BorderColorSchema = Type7.Union([
827
+ Type7.String({ description: "Border color for all sides (hex without #)" }),
828
+ Type7.Object({
829
+ bottom: Type7.Optional(
830
+ Type7.String({ description: "Bottom border color (hex without #)" })
786
831
  ),
787
- top: Type6.Optional(
788
- Type6.String({ description: "Top border color (hex without #)" })
832
+ top: Type7.Optional(
833
+ Type7.String({ description: "Top border color (hex without #)" })
789
834
  ),
790
- right: Type6.Optional(
791
- Type6.String({ description: "Right border color (hex without #)" })
835
+ right: Type7.Optional(
836
+ Type7.String({ description: "Right border color (hex without #)" })
792
837
  ),
793
- left: Type6.Optional(
794
- Type6.String({ description: "Left border color (hex without #)" })
838
+ left: Type7.Optional(
839
+ Type7.String({ description: "Left border color (hex without #)" })
795
840
  )
796
841
  })
797
842
  ]);
798
- var BorderSizeSchema = Type6.Union([
799
- Type6.Number({
843
+ var BorderSizeSchema = Type7.Union([
844
+ Type7.Number({
800
845
  minimum: 0,
801
846
  description: "Border size for all sides in points"
802
847
  }),
803
- Type6.Object({
804
- bottom: Type6.Optional(
805
- Type6.Number({ minimum: 0, description: "Bottom border size in points" })
848
+ Type7.Object({
849
+ bottom: Type7.Optional(
850
+ Type7.Number({ minimum: 0, description: "Bottom border size in points" })
806
851
  ),
807
- top: Type6.Optional(
808
- Type6.Number({ minimum: 0, description: "Top border size in points" })
852
+ top: Type7.Optional(
853
+ Type7.Number({ minimum: 0, description: "Top border size in points" })
809
854
  ),
810
- right: Type6.Optional(
811
- Type6.Number({ minimum: 0, description: "Right border size in points" })
855
+ right: Type7.Optional(
856
+ Type7.Number({ minimum: 0, description: "Right border size in points" })
812
857
  ),
813
- left: Type6.Optional(
814
- Type6.Number({ minimum: 0, description: "Left border size in points" })
858
+ left: Type7.Optional(
859
+ Type7.Number({ minimum: 0, description: "Left border size in points" })
815
860
  )
816
861
  })
817
862
  ]);
818
- var HideBordersSchema = Type6.Union([
819
- Type6.Boolean({
863
+ var HideBordersSchema = Type7.Union([
864
+ Type7.Boolean({
820
865
  description: "Hide all borders when true"
821
866
  }),
822
- Type6.Object(
867
+ Type7.Object(
823
868
  {
824
- bottom: Type6.Optional(
825
- Type6.Boolean({ description: "Hide bottom border" })
869
+ bottom: Type7.Optional(
870
+ Type7.Boolean({ description: "Hide bottom border" })
826
871
  ),
827
- top: Type6.Optional(Type6.Boolean({ description: "Hide top border" })),
828
- right: Type6.Optional(Type6.Boolean({ description: "Hide right border" })),
829
- left: Type6.Optional(Type6.Boolean({ description: "Hide left border" })),
830
- insideHorizontal: Type6.Optional(
831
- Type6.Boolean({ description: "Hide horizontal borders between rows" })
872
+ top: Type7.Optional(Type7.Boolean({ description: "Hide top border" })),
873
+ right: Type7.Optional(Type7.Boolean({ description: "Hide right border" })),
874
+ left: Type7.Optional(Type7.Boolean({ description: "Hide left border" })),
875
+ insideHorizontal: Type7.Optional(
876
+ Type7.Boolean({ description: "Hide horizontal borders between rows" })
832
877
  ),
833
- insideVertical: Type6.Optional(
834
- Type6.Boolean({ description: "Hide vertical borders between columns" })
878
+ insideVertical: Type7.Optional(
879
+ Type7.Boolean({ description: "Hide vertical borders between columns" })
835
880
  )
836
881
  },
837
882
  { description: "Selectively hide specific borders" }
838
883
  )
839
884
  ]);
840
- var PaddingSchema = Type6.Union([
841
- Type6.Number({ minimum: 0, description: "Padding for all sides in points" }),
842
- Type6.Object({
843
- bottom: Type6.Optional(
844
- Type6.Number({ minimum: 0, description: "Bottom padding in points" })
885
+ var PaddingSchema = Type7.Union([
886
+ Type7.Number({ minimum: 0, description: "Padding for all sides in points" }),
887
+ Type7.Object({
888
+ bottom: Type7.Optional(
889
+ Type7.Number({ minimum: 0, description: "Bottom padding in points" })
845
890
  ),
846
- top: Type6.Optional(
847
- Type6.Number({ minimum: 0, description: "Top padding in points" })
891
+ top: Type7.Optional(
892
+ Type7.Number({ minimum: 0, description: "Top padding in points" })
848
893
  ),
849
- right: Type6.Optional(
850
- Type6.Number({ minimum: 0, description: "Right padding in points" })
894
+ right: Type7.Optional(
895
+ Type7.Number({ minimum: 0, description: "Right padding in points" })
851
896
  ),
852
- left: Type6.Optional(
853
- Type6.Number({ minimum: 0, description: "Left padding in points" })
897
+ left: Type7.Optional(
898
+ Type7.Number({ minimum: 0, description: "Left padding in points" })
854
899
  )
855
900
  })
856
901
  ]);
857
- var CellDefaultsSchema = Type6.Object({
858
- color: Type6.Optional(HexColorSchema),
859
- backgroundColor: Type6.Optional(HexColorOrTransparentSchema),
860
- horizontalAlignment: Type6.Optional(HorizontalAlignmentSchema),
861
- verticalAlignment: Type6.Optional(VerticalAlignmentSchema),
862
- font: Type6.Optional(FontConfigSchema),
863
- borderColor: Type6.Optional(BorderColorSchema),
864
- borderSize: Type6.Optional(BorderSizeSchema),
865
- padding: Type6.Optional(PaddingSchema),
866
- height: Type6.Optional(
867
- Type6.Number({ minimum: 0, description: "Cell height in points" })
902
+ var CellDefaultsSchema = Type7.Object({
903
+ color: Type7.Optional(HexColorSchema),
904
+ backgroundColor: Type7.Optional(HexColorOrTransparentSchema),
905
+ horizontalAlignment: Type7.Optional(HorizontalAlignmentSchema),
906
+ verticalAlignment: Type7.Optional(VerticalAlignmentSchema),
907
+ font: Type7.Optional(FontConfigSchema),
908
+ borderColor: Type7.Optional(BorderColorSchema),
909
+ borderSize: Type7.Optional(BorderSizeSchema),
910
+ padding: Type7.Optional(PaddingSchema),
911
+ height: Type7.Optional(
912
+ Type7.Number({ minimum: 0, description: "Cell height in points" })
868
913
  )
869
914
  });
870
915
  function createTablePropsSchema(componentRef) {
871
- const cellContent = Type6.Union([Type6.String(), componentRef]);
916
+ const cellContent = Type7.Union([Type7.String(), componentRef]);
872
917
  const cellFields = {
873
- color: Type6.Optional(HexColorSchema),
874
- backgroundColor: Type6.Optional(HexColorOrTransparentSchema),
875
- horizontalAlignment: Type6.Optional(HorizontalAlignmentSchema),
876
- verticalAlignment: Type6.Optional(VerticalAlignmentSchema),
877
- font: Type6.Optional(FontConfigSchema),
878
- borderColor: Type6.Optional(BorderColorSchema),
879
- borderSize: Type6.Optional(BorderSizeSchema),
880
- padding: Type6.Optional(PaddingSchema),
881
- height: Type6.Optional(
882
- Type6.Number({ minimum: 0, description: "Cell height in points" })
918
+ color: Type7.Optional(HexColorSchema),
919
+ backgroundColor: Type7.Optional(HexColorOrTransparentSchema),
920
+ horizontalAlignment: Type7.Optional(HorizontalAlignmentSchema),
921
+ verticalAlignment: Type7.Optional(VerticalAlignmentSchema),
922
+ font: Type7.Optional(FontConfigSchema),
923
+ borderColor: Type7.Optional(BorderColorSchema),
924
+ borderSize: Type7.Optional(BorderSizeSchema),
925
+ padding: Type7.Optional(PaddingSchema),
926
+ height: Type7.Optional(
927
+ Type7.Number({ minimum: 0, description: "Cell height in points" })
883
928
  )
884
929
  };
885
- const headerSchema = Type6.Object({
930
+ const headerSchema = Type7.Object({
886
931
  ...cellFields,
887
- content: Type6.Optional(cellContent)
932
+ content: Type7.Optional(cellContent)
888
933
  });
889
- const cellSchema = Type6.Object({
934
+ const cellSchema = Type7.Object({
890
935
  ...cellFields,
891
- content: Type6.Optional(cellContent)
936
+ content: Type7.Optional(cellContent)
892
937
  });
893
- const columnSchema = Type6.Object({
894
- width: Type6.Optional(
895
- Type6.Union([
896
- Type6.Number({
938
+ const columnSchema = Type7.Object({
939
+ width: Type7.Optional(
940
+ Type7.Union([
941
+ Type7.Number({
897
942
  minimum: 0,
898
943
  description: "Column width in points. When set on some columns, remaining columns will automatically share the leftover table space equally. Leave undefined to distribute space evenly among unspecified columns."
899
944
  }),
900
- Type6.String({
945
+ Type7.String({
901
946
  pattern: "^\\d+(\\.\\d+)?%$",
902
947
  description: 'Column width as percentage of available width (e.g., "40%")'
903
948
  })
904
949
  ])
905
950
  ),
906
- cellDefaults: Type6.Optional(CellDefaultsSchema),
907
- header: Type6.Optional(headerSchema),
908
- cells: Type6.Optional(Type6.Array(cellSchema))
951
+ cellDefaults: Type7.Optional(CellDefaultsSchema),
952
+ header: Type7.Optional(headerSchema),
953
+ cells: Type7.Optional(Type7.Array(cellSchema))
909
954
  });
910
- return Type6.Object(
955
+ return Type7.Object(
911
956
  {
912
- borderColor: Type6.Optional(BorderColorSchema),
913
- borderSize: Type6.Optional(BorderSizeSchema),
914
- hideBorders: Type6.Optional(HideBordersSchema),
915
- cellDefaults: Type6.Optional(CellDefaultsSchema),
916
- headerCellDefaults: Type6.Optional(CellDefaultsSchema),
917
- width: Type6.Optional(
918
- Type6.Number({
957
+ borderColor: Type7.Optional(BorderColorSchema),
958
+ borderSize: Type7.Optional(BorderSizeSchema),
959
+ hideBorders: Type7.Optional(HideBordersSchema),
960
+ cellDefaults: Type7.Optional(CellDefaultsSchema),
961
+ headerCellDefaults: Type7.Optional(CellDefaultsSchema),
962
+ width: Type7.Optional(
963
+ Type7.Number({
919
964
  minimum: 0,
920
965
  maximum: 100,
921
966
  description: "Table width in percentage (0-100)"
922
967
  })
923
968
  ),
924
- columns: Type6.Array(columnSchema, {
969
+ columns: Type7.Array(columnSchema, {
925
970
  description: "Table columns with headers and cells",
926
971
  minItems: 1
927
972
  }),
928
- keepInOnePage: Type6.Optional(
929
- Type6.Boolean({
973
+ keepInOnePage: Type7.Optional(
974
+ Type7.Boolean({
930
975
  description: "Keep table rows together on the same page by setting keepNext on all paragraphs"
931
976
  })
932
977
  ),
933
- keepNext: Type6.Optional(
934
- Type6.Boolean({
978
+ keepNext: Type7.Optional(
979
+ Type7.Boolean({
935
980
  description: "Set keepNext on the last row to keep it connected to the next element. Works independently of keepInOnePage. Defaults to false."
936
981
  })
937
982
  ),
938
- repeatHeaderOnPageBreak: Type6.Optional(
939
- Type6.Boolean({
983
+ repeatHeaderOnPageBreak: Type7.Optional(
984
+ Type7.Boolean({
940
985
  description: "Repeat the header row on each page when the table spans multiple pages. Defaults to false.",
941
986
  default: true
942
987
  })
@@ -950,74 +995,74 @@ function createTablePropsSchema(componentRef) {
950
995
  var TablePropsSchema = createTablePropsSchema(CellContentSchema);
951
996
 
952
997
  // src/schemas/components/section.ts
953
- import { Type as Type7 } from "@sinclair/typebox";
954
- var createSectionPropsSchema = (moduleRef) => Type7.Object(
998
+ import { Type as Type8 } from "@sinclair/typebox";
999
+ var createSectionPropsSchema = (moduleRef) => Type8.Object(
955
1000
  {
956
- title: Type7.Optional(
957
- Type7.String({
1001
+ title: Type8.Optional(
1002
+ Type8.String({
958
1003
  description: "Section title (optional)"
959
1004
  })
960
1005
  ),
961
- level: Type7.Optional(
962
- Type7.Number({
1006
+ level: Type8.Optional(
1007
+ Type8.Number({
963
1008
  minimum: 1,
964
1009
  maximum: 9,
965
1010
  description: "Heading level for section title (1-9)",
966
1011
  default: 1
967
1012
  })
968
1013
  ),
969
- header: Type7.Optional(
970
- Type7.Union([
971
- Type7.Array(moduleRef || Type7.Any(), {
1014
+ header: Type8.Optional(
1015
+ Type8.Union([
1016
+ Type8.Array(moduleRef || Type8.Any(), {
972
1017
  description: "Section header modules"
973
1018
  }),
974
- Type7.Literal("linkToPrevious", {
1019
+ Type8.Literal("linkToPrevious", {
975
1020
  description: "Link header to previous section"
976
1021
  })
977
1022
  ])
978
1023
  ),
979
- footer: Type7.Optional(
980
- Type7.Union([
981
- Type7.Array(moduleRef || Type7.Any(), {
1024
+ footer: Type8.Optional(
1025
+ Type8.Union([
1026
+ Type8.Array(moduleRef || Type8.Any(), {
982
1027
  description: "Section footer modules"
983
1028
  }),
984
- Type7.Literal("linkToPrevious", {
1029
+ Type8.Literal("linkToPrevious", {
985
1030
  description: "Link footer to previous section"
986
1031
  })
987
1032
  ])
988
1033
  ),
989
- pageBreak: Type7.Optional(
990
- Type7.Boolean({
1034
+ pageBreak: Type8.Optional(
1035
+ Type8.Boolean({
991
1036
  description: "Insert page break before section",
992
1037
  default: true
993
1038
  })
994
1039
  ),
995
- spacing: Type7.Optional(SpacingSchema),
996
- page: Type7.Optional(
997
- Type7.Object(
1040
+ spacing: Type8.Optional(SpacingSchema),
1041
+ page: Type8.Optional(
1042
+ Type8.Object(
998
1043
  {
999
- size: Type7.Optional(
1000
- Type7.Union([
1001
- Type7.Literal("A4"),
1002
- Type7.Literal("A3"),
1003
- Type7.Literal("LETTER"),
1004
- Type7.Literal("LEGAL"),
1005
- Type7.Object({
1006
- width: Type7.Number({ minimum: 0 }),
1007
- height: Type7.Number({ minimum: 0 })
1044
+ size: Type8.Optional(
1045
+ Type8.Union([
1046
+ Type8.Literal("A4"),
1047
+ Type8.Literal("A3"),
1048
+ Type8.Literal("LETTER"),
1049
+ Type8.Literal("LEGAL"),
1050
+ Type8.Object({
1051
+ width: Type8.Number({ minimum: 0 }),
1052
+ height: Type8.Number({ minimum: 0 })
1008
1053
  })
1009
1054
  ])
1010
1055
  ),
1011
- margins: Type7.Optional(
1012
- Type7.Object(
1056
+ margins: Type8.Optional(
1057
+ Type8.Object(
1013
1058
  {
1014
- top: Type7.Optional(Type7.Number({ minimum: 0 })),
1015
- bottom: Type7.Optional(Type7.Number({ minimum: 0 })),
1016
- left: Type7.Optional(Type7.Number({ minimum: 0 })),
1017
- right: Type7.Optional(Type7.Number({ minimum: 0 })),
1018
- header: Type7.Optional(Type7.Number({ minimum: 0 })),
1019
- footer: Type7.Optional(Type7.Number({ minimum: 0 })),
1020
- gutter: Type7.Optional(Type7.Number({ minimum: 0 }))
1059
+ top: Type8.Optional(Type8.Number({ minimum: 0 })),
1060
+ bottom: Type8.Optional(Type8.Number({ minimum: 0 })),
1061
+ left: Type8.Optional(Type8.Number({ minimum: 0 })),
1062
+ right: Type8.Optional(Type8.Number({ minimum: 0 })),
1063
+ header: Type8.Optional(Type8.Number({ minimum: 0 })),
1064
+ footer: Type8.Optional(Type8.Number({ minimum: 0 })),
1065
+ gutter: Type8.Optional(Type8.Number({ minimum: 0 }))
1021
1066
  },
1022
1067
  {
1023
1068
  additionalProperties: false
@@ -1040,31 +1085,31 @@ var createSectionPropsSchema = (moduleRef) => Type7.Object(
1040
1085
  var SectionPropsSchema = createSectionPropsSchema();
1041
1086
 
1042
1087
  // src/schemas/components/columns.ts
1043
- import { Type as Type8 } from "@sinclair/typebox";
1044
- var ColumnDescriptorSchema = Type8.Object(
1088
+ import { Type as Type9 } from "@sinclair/typebox";
1089
+ var ColumnDescriptorSchema = Type9.Object(
1045
1090
  {
1046
- width: Type8.Optional(
1047
- Type8.Union([
1048
- Type8.Number({
1091
+ width: Type9.Optional(
1092
+ Type9.Union([
1093
+ Type9.Number({
1049
1094
  minimum: 1,
1050
1095
  description: "Column width in points"
1051
1096
  }),
1052
- Type8.String({
1097
+ Type9.String({
1053
1098
  pattern: "^\\d+(\\.\\d+)?%$",
1054
1099
  description: 'Column width as percentage of available width (e.g., "30%")'
1055
1100
  }),
1056
- Type8.Literal("auto", {
1101
+ Type9.Literal("auto", {
1057
1102
  description: "Auto width: consume remaining space after fixed widths and gaps"
1058
1103
  })
1059
1104
  ])
1060
1105
  ),
1061
- gap: Type8.Optional(
1062
- Type8.Union([
1063
- Type8.Number({
1106
+ gap: Type9.Optional(
1107
+ Type9.Union([
1108
+ Type9.Number({
1064
1109
  minimum: 0,
1065
1110
  description: "Gap after this column in points"
1066
1111
  }),
1067
- Type8.String({
1112
+ Type9.String({
1068
1113
  pattern: "^\\d+(\\.\\d+)?%$",
1069
1114
  description: 'Gap after this column as percentage of available width (e.g., "5%")'
1070
1115
  })
@@ -1073,25 +1118,25 @@ var ColumnDescriptorSchema = Type8.Object(
1073
1118
  },
1074
1119
  { additionalProperties: false }
1075
1120
  );
1076
- var ColumnsPropsSchema = Type8.Object(
1121
+ var ColumnsPropsSchema = Type9.Object(
1077
1122
  {
1078
- columns: Type8.Union([
1079
- Type8.Number({
1123
+ columns: Type9.Union([
1124
+ Type9.Number({
1080
1125
  minimum: 1,
1081
1126
  description: "Number of equal-width columns (converter will normalize to array)"
1082
1127
  }),
1083
- Type8.Array(ColumnDescriptorSchema, {
1128
+ Type9.Array(ColumnDescriptorSchema, {
1084
1129
  minItems: 1,
1085
1130
  description: "List of columns in order; width and gap can be points, percentages, or auto width"
1086
1131
  })
1087
1132
  ]),
1088
- gap: Type8.Optional(
1089
- Type8.Union([
1090
- Type8.Number({
1133
+ gap: Type9.Optional(
1134
+ Type9.Union([
1135
+ Type9.Number({
1091
1136
  minimum: 0,
1092
1137
  description: "Default gap applied after each column except the last (points)"
1093
1138
  }),
1094
- Type8.String({
1139
+ Type9.String({
1095
1140
  pattern: "^\\d+(\\.\\d+)?%$",
1096
1141
  description: 'Default gap applied after each column except the last as percentage of available width (e.g., "5%")'
1097
1142
  })
@@ -1105,104 +1150,104 @@ var ColumnsPropsSchema = Type8.Object(
1105
1150
  );
1106
1151
 
1107
1152
  // src/schemas/components/list.ts
1108
- import { Type as Type9 } from "@sinclair/typebox";
1109
- var LevelFormatSchema = Type9.Union(
1153
+ import { Type as Type10 } from "@sinclair/typebox";
1154
+ var LevelFormatSchema = Type10.Union(
1110
1155
  [
1111
- Type9.Literal("decimal"),
1112
- Type9.Literal("upperRoman"),
1113
- Type9.Literal("lowerRoman"),
1114
- Type9.Literal("upperLetter"),
1115
- Type9.Literal("lowerLetter"),
1116
- Type9.Literal("bullet"),
1117
- Type9.Literal("ordinal"),
1118
- Type9.Literal("cardinalText"),
1119
- Type9.Literal("ordinalText"),
1120
- Type9.Literal("hex"),
1121
- Type9.Literal("chicago"),
1122
- Type9.Literal("ideographDigital"),
1123
- Type9.Literal("japaneseCounting"),
1124
- Type9.Literal("aiueo"),
1125
- Type9.Literal("iroha"),
1126
- Type9.Literal("decimalFullWidth"),
1127
- Type9.Literal("decimalHalfWidth"),
1128
- Type9.Literal("japaneseLegal"),
1129
- Type9.Literal("japaneseDigitalTenThousand"),
1130
- Type9.Literal("decimalEnclosedCircle"),
1131
- Type9.Literal("decimalFullWidth2"),
1132
- Type9.Literal("aiueoFullWidth"),
1133
- Type9.Literal("irohaFullWidth"),
1134
- Type9.Literal("decimalZero"),
1135
- Type9.Literal("ganada"),
1136
- Type9.Literal("chosung"),
1137
- Type9.Literal("decimalEnclosedFullstop"),
1138
- Type9.Literal("decimalEnclosedParen"),
1139
- Type9.Literal("decimalEnclosedCircleChinese"),
1140
- Type9.Literal("ideographEnclosedCircle"),
1141
- Type9.Literal("ideographTraditional"),
1142
- Type9.Literal("ideographZodiac"),
1143
- Type9.Literal("ideographZodiacTraditional"),
1144
- Type9.Literal("taiwaneseCounting"),
1145
- Type9.Literal("ideographLegalTraditional"),
1146
- Type9.Literal("taiwaneseCountingThousand"),
1147
- Type9.Literal("taiwaneseDigital"),
1148
- Type9.Literal("chineseCounting"),
1149
- Type9.Literal("chineseLegalSimplified"),
1150
- Type9.Literal("chineseCountingThousand"),
1151
- Type9.Literal("koreanDigital"),
1152
- Type9.Literal("koreanCounting"),
1153
- Type9.Literal("koreanLegal"),
1154
- Type9.Literal("koreanDigital2"),
1155
- Type9.Literal("vietnameseCounting"),
1156
- Type9.Literal("russianLower"),
1157
- Type9.Literal("russianUpper"),
1158
- Type9.Literal("none"),
1159
- Type9.Literal("numberInDash"),
1160
- Type9.Literal("hebrew1"),
1161
- Type9.Literal("hebrew2"),
1162
- Type9.Literal("arabicAlpha"),
1163
- Type9.Literal("arabicAbjad"),
1164
- Type9.Literal("hindiVowels"),
1165
- Type9.Literal("hindiConsonants"),
1166
- Type9.Literal("hindiNumbers"),
1167
- Type9.Literal("hindiCounting"),
1168
- Type9.Literal("thaiLetters"),
1169
- Type9.Literal("thaiNumbers"),
1170
- Type9.Literal("thaiCounting")
1156
+ Type10.Literal("decimal"),
1157
+ Type10.Literal("upperRoman"),
1158
+ Type10.Literal("lowerRoman"),
1159
+ Type10.Literal("upperLetter"),
1160
+ Type10.Literal("lowerLetter"),
1161
+ Type10.Literal("bullet"),
1162
+ Type10.Literal("ordinal"),
1163
+ Type10.Literal("cardinalText"),
1164
+ Type10.Literal("ordinalText"),
1165
+ Type10.Literal("hex"),
1166
+ Type10.Literal("chicago"),
1167
+ Type10.Literal("ideographDigital"),
1168
+ Type10.Literal("japaneseCounting"),
1169
+ Type10.Literal("aiueo"),
1170
+ Type10.Literal("iroha"),
1171
+ Type10.Literal("decimalFullWidth"),
1172
+ Type10.Literal("decimalHalfWidth"),
1173
+ Type10.Literal("japaneseLegal"),
1174
+ Type10.Literal("japaneseDigitalTenThousand"),
1175
+ Type10.Literal("decimalEnclosedCircle"),
1176
+ Type10.Literal("decimalFullWidth2"),
1177
+ Type10.Literal("aiueoFullWidth"),
1178
+ Type10.Literal("irohaFullWidth"),
1179
+ Type10.Literal("decimalZero"),
1180
+ Type10.Literal("ganada"),
1181
+ Type10.Literal("chosung"),
1182
+ Type10.Literal("decimalEnclosedFullstop"),
1183
+ Type10.Literal("decimalEnclosedParen"),
1184
+ Type10.Literal("decimalEnclosedCircleChinese"),
1185
+ Type10.Literal("ideographEnclosedCircle"),
1186
+ Type10.Literal("ideographTraditional"),
1187
+ Type10.Literal("ideographZodiac"),
1188
+ Type10.Literal("ideographZodiacTraditional"),
1189
+ Type10.Literal("taiwaneseCounting"),
1190
+ Type10.Literal("ideographLegalTraditional"),
1191
+ Type10.Literal("taiwaneseCountingThousand"),
1192
+ Type10.Literal("taiwaneseDigital"),
1193
+ Type10.Literal("chineseCounting"),
1194
+ Type10.Literal("chineseLegalSimplified"),
1195
+ Type10.Literal("chineseCountingThousand"),
1196
+ Type10.Literal("koreanDigital"),
1197
+ Type10.Literal("koreanCounting"),
1198
+ Type10.Literal("koreanLegal"),
1199
+ Type10.Literal("koreanDigital2"),
1200
+ Type10.Literal("vietnameseCounting"),
1201
+ Type10.Literal("russianLower"),
1202
+ Type10.Literal("russianUpper"),
1203
+ Type10.Literal("none"),
1204
+ Type10.Literal("numberInDash"),
1205
+ Type10.Literal("hebrew1"),
1206
+ Type10.Literal("hebrew2"),
1207
+ Type10.Literal("arabicAlpha"),
1208
+ Type10.Literal("arabicAbjad"),
1209
+ Type10.Literal("hindiVowels"),
1210
+ Type10.Literal("hindiConsonants"),
1211
+ Type10.Literal("hindiNumbers"),
1212
+ Type10.Literal("hindiCounting"),
1213
+ Type10.Literal("thaiLetters"),
1214
+ Type10.Literal("thaiNumbers"),
1215
+ Type10.Literal("thaiCounting")
1171
1216
  ],
1172
1217
  {
1173
1218
  description: "Number or bullet format for list levels"
1174
1219
  }
1175
1220
  );
1176
- var ListLevelPropsSchema = Type9.Object(
1221
+ var ListLevelPropsSchema = Type10.Object(
1177
1222
  {
1178
- level: Type9.Number({
1223
+ level: Type10.Number({
1179
1224
  minimum: 0,
1180
1225
  maximum: 8,
1181
1226
  description: "Nesting level (0 = root, 1 = first sublevel, etc.)"
1182
1227
  }),
1183
- format: Type9.Optional(LevelFormatSchema),
1184
- text: Type9.Optional(
1185
- Type9.String({
1228
+ format: Type10.Optional(LevelFormatSchema),
1229
+ text: Type10.Optional(
1230
+ Type10.String({
1186
1231
  description: 'Number format string (e.g., "%1." for "1.", "%1)" for "1)", custom bullet character for bullet format)'
1187
1232
  })
1188
1233
  ),
1189
- alignment: Type9.Optional(
1190
- Type9.Union(
1234
+ alignment: Type10.Optional(
1235
+ Type10.Union(
1191
1236
  [
1192
- Type9.Literal("start"),
1193
- Type9.Literal("end"),
1194
- Type9.Literal("left"),
1195
- Type9.Literal("right"),
1196
- Type9.Literal("center")
1237
+ Type10.Literal("start"),
1238
+ Type10.Literal("end"),
1239
+ Type10.Literal("left"),
1240
+ Type10.Literal("right"),
1241
+ Type10.Literal("center")
1197
1242
  ],
1198
1243
  {
1199
1244
  description: "Alignment of the numbering/bullet"
1200
1245
  }
1201
1246
  )
1202
1247
  ),
1203
- indent: Type9.Optional(IndentSchema),
1204
- start: Type9.Optional(
1205
- Type9.Number({
1248
+ indent: Type10.Optional(IndentSchema),
1249
+ start: Type10.Optional(
1250
+ Type10.Number({
1206
1251
  minimum: 1,
1207
1252
  description: "Starting number for this level (default: 1)"
1208
1253
  })
@@ -1212,20 +1257,21 @@ var ListLevelPropsSchema = Type9.Object(
1212
1257
  description: "Configuration for a single list level"
1213
1258
  }
1214
1259
  );
1215
- var ListPropsSchema = Type9.Object(
1260
+ var ListPropsSchema = Type10.Object(
1216
1261
  {
1217
- items: Type9.Array(
1218
- Type9.Union([
1219
- Type9.String(),
1220
- Type9.Object({
1221
- text: Type9.String(),
1222
- level: Type9.Optional(
1223
- Type9.Number({
1262
+ items: Type10.Array(
1263
+ Type10.Union([
1264
+ Type10.String(),
1265
+ Type10.Object({
1266
+ text: Type10.String(),
1267
+ level: Type10.Optional(
1268
+ Type10.Number({
1224
1269
  minimum: 0,
1225
1270
  maximum: 8,
1226
1271
  description: "Nesting level for this item"
1227
1272
  })
1228
- )
1273
+ ),
1274
+ revision: Type10.Optional(RevisionSchema)
1229
1275
  })
1230
1276
  ]),
1231
1277
  {
@@ -1233,42 +1279,42 @@ var ListPropsSchema = Type9.Object(
1233
1279
  minItems: 1
1234
1280
  }
1235
1281
  ),
1236
- reference: Type9.Optional(
1237
- Type9.String({
1282
+ reference: Type10.Optional(
1283
+ Type10.String({
1238
1284
  description: "Unique reference ID for this numbering configuration (auto-generated if not provided)"
1239
1285
  })
1240
1286
  ),
1241
- levels: Type9.Optional(
1242
- Type9.Array(ListLevelPropsSchema, {
1287
+ levels: Type10.Optional(
1288
+ Type10.Array(ListLevelPropsSchema, {
1243
1289
  description: "Configuration for each nesting level",
1244
1290
  minItems: 1,
1245
1291
  maxItems: 9
1246
1292
  })
1247
1293
  ),
1248
1294
  // Simplified options for common use cases (when levels not specified)
1249
- format: Type9.Optional(
1250
- Type9.Union(
1251
- [LevelFormatSchema, Type9.Literal("numbered"), Type9.Literal("none")],
1295
+ format: Type10.Optional(
1296
+ Type10.Union(
1297
+ [LevelFormatSchema, Type10.Literal("numbered"), Type10.Literal("none")],
1252
1298
  {
1253
1299
  description: "Format for level 0 (simplified option when levels not specified)"
1254
1300
  }
1255
1301
  )
1256
1302
  ),
1257
- bullet: Type9.Optional(
1258
- Type9.String({
1303
+ bullet: Type10.Optional(
1304
+ Type10.String({
1259
1305
  description: "Custom bullet character (simplified option when levels not specified)"
1260
1306
  })
1261
1307
  ),
1262
- start: Type9.Optional(
1263
- Type9.Number({
1308
+ start: Type10.Optional(
1309
+ Type10.Number({
1264
1310
  minimum: 1,
1265
1311
  description: "Starting number for level 0 (simplified option when levels not specified)"
1266
1312
  })
1267
1313
  ),
1268
- spacing: Type9.Optional(ListSpacingSchema),
1269
- alignment: Type9.Optional(JustifiedAlignmentSchema),
1270
- indent: Type9.Optional(
1271
- Type9.Union([Type9.Number({ minimum: 0 }), IndentSchema])
1314
+ spacing: Type10.Optional(ListSpacingSchema),
1315
+ alignment: Type10.Optional(JustifiedAlignmentSchema),
1316
+ indent: Type10.Optional(
1317
+ Type10.Union([Type10.Number({ minimum: 0 }), IndentSchema])
1272
1318
  )
1273
1319
  },
1274
1320
  {
@@ -1278,24 +1324,28 @@ var ListPropsSchema = Type9.Object(
1278
1324
  );
1279
1325
 
1280
1326
  // src/schemas/component-defaults.ts
1281
- var HeadingComponentDefaultsSchema = Type10.Partial(HeadingPropsSchema);
1282
- var ParagraphComponentDefaultsSchema = Type10.Partial(ParagraphPropsSchema);
1283
- var ImageComponentDefaultsSchema = Type10.Partial(ImagePropsSchema);
1284
- var StatisticComponentDefaultsSchema = Type10.Partial(StatisticPropsSchema);
1285
- var TableComponentDefaultsSchema = Type10.Partial(TablePropsSchema);
1286
- var SectionComponentDefaultsSchema = Type10.Partial(SectionPropsSchema);
1287
- var ColumnsComponentDefaultsSchema = Type10.Partial(ColumnsPropsSchema);
1288
- var ListComponentDefaultsSchema = Type10.Partial(ListPropsSchema);
1289
- var ComponentDefaultsSchema = Type10.Object(
1327
+ var HeadingComponentDefaultsSchema = Type11.Partial(
1328
+ Type11.Omit(HeadingPropsSchema, ["revision"])
1329
+ );
1330
+ var ParagraphComponentDefaultsSchema = Type11.Partial(
1331
+ Type11.Omit(ParagraphPropsSchema, ["revision"])
1332
+ );
1333
+ var ImageComponentDefaultsSchema = Type11.Partial(ImagePropsSchema);
1334
+ var StatisticComponentDefaultsSchema = Type11.Partial(StatisticPropsSchema);
1335
+ var TableComponentDefaultsSchema = Type11.Partial(TablePropsSchema);
1336
+ var SectionComponentDefaultsSchema = Type11.Partial(SectionPropsSchema);
1337
+ var ColumnsComponentDefaultsSchema = Type11.Partial(ColumnsPropsSchema);
1338
+ var ListComponentDefaultsSchema = Type11.Partial(ListPropsSchema);
1339
+ var ComponentDefaultsSchema = Type11.Object(
1290
1340
  {
1291
- heading: Type10.Optional(HeadingComponentDefaultsSchema),
1292
- paragraph: Type10.Optional(ParagraphComponentDefaultsSchema),
1293
- image: Type10.Optional(ImageComponentDefaultsSchema),
1294
- statistic: Type10.Optional(StatisticComponentDefaultsSchema),
1295
- table: Type10.Optional(TableComponentDefaultsSchema),
1296
- section: Type10.Optional(SectionComponentDefaultsSchema),
1297
- columns: Type10.Optional(ColumnsComponentDefaultsSchema),
1298
- list: Type10.Optional(ListComponentDefaultsSchema)
1341
+ heading: Type11.Optional(HeadingComponentDefaultsSchema),
1342
+ paragraph: Type11.Optional(ParagraphComponentDefaultsSchema),
1343
+ image: Type11.Optional(ImageComponentDefaultsSchema),
1344
+ statistic: Type11.Optional(StatisticComponentDefaultsSchema),
1345
+ table: Type11.Optional(TableComponentDefaultsSchema),
1346
+ section: Type11.Optional(SectionComponentDefaultsSchema),
1347
+ columns: Type11.Optional(ColumnsComponentDefaultsSchema),
1348
+ list: Type11.Optional(ListComponentDefaultsSchema)
1299
1349
  },
1300
1350
  { additionalProperties: true }
1301
1351
  // TODO: add a way to add strict custom component defaults when the plugin/registry paradigm will be implemented
@@ -1321,6 +1371,8 @@ export {
1321
1371
  NumberingSchema,
1322
1372
  BaseComponentFields,
1323
1373
  BaseComponentPropsSchema,
1374
+ RevisionSegmentSchema,
1375
+ RevisionSchema,
1324
1376
  HeadingPropsSchema,
1325
1377
  ParagraphPropsSchema,
1326
1378
  ImagePropsSchema,
@@ -1343,4 +1395,4 @@ export {
1343
1395
  ListComponentDefaultsSchema,
1344
1396
  ComponentDefaultsSchema
1345
1397
  };
1346
- //# sourceMappingURL=chunk-YUV5CJMG.js.map
1398
+ //# sourceMappingURL=chunk-CGMJ665Z.js.map