@json-to-office/shared-docx 1.7.0 → 1.10.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/dist/{chunk-TCEEX3OY.js → chunk-2HFXG2VP.js} +6 -6
- package/dist/{chunk-Y6FW7T32.js → chunk-6A25WCKU.js} +4 -4
- package/dist/{chunk-ZF3JUN3R.js → chunk-B7QVLWCF.js} +3 -3
- package/dist/{chunk-TVMTDS57.js → chunk-CEEW7MC6.js} +2 -2
- package/dist/{chunk-KGQAQE4S.js → chunk-JW5NOPVQ.js} +2 -2
- package/dist/{chunk-5SMBRJIZ.js → chunk-N6CCWDPF.js} +4 -4
- package/dist/{chunk-MCS7JCUD.js → chunk-P43S7QYT.js} +6 -4
- package/dist/chunk-P43S7QYT.js.map +1 -0
- package/dist/{chunk-KLINZKYA.js → chunk-R4N6E4JK.js} +2 -2
- package/dist/{chunk-ZKBTTJN6.js → chunk-V3YRROBV.js} +20 -10
- package/dist/chunk-V3YRROBV.js.map +1 -0
- package/dist/{chunk-4LLFZ5OY.js → chunk-XKTKIG57.js} +2 -2
- package/dist/{chunk-7TTAAYQ5.js → chunk-Y3XKLR27.js} +19 -9
- package/dist/chunk-Y3XKLR27.js.map +1 -0
- package/dist/{chunk-DQ3DTWOC.js → chunk-YFP757D6.js} +2 -2
- package/dist/chunk-YFP757D6.js.map +1 -0
- package/dist/{chunk-OYSBFM6W.js → chunk-YJMOIHYP.js} +166 -98
- package/dist/chunk-YJMOIHYP.js.map +1 -0
- package/dist/index.d.ts +15 -5
- package/dist/index.js +16 -13
- package/dist/index.js.map +1 -1
- package/dist/schemas/api.js +8 -8
- package/dist/schemas/component-defaults.js +3 -3
- package/dist/schemas/component-registry.js +6 -6
- package/dist/schemas/components.d.ts +14 -1
- package/dist/schemas/components.js +9 -7
- package/dist/schemas/document.js +9 -9
- package/dist/schemas/export.js +7 -7
- package/dist/schemas/font.js +1 -1
- package/dist/schemas/generator.js +7 -7
- package/dist/schemas/renderer.js +3 -3
- package/dist/schemas/theme.js +4 -4
- package/dist/validation/unified/index.js +9 -9
- package/package.json +1 -1
- package/dist/chunk-7TTAAYQ5.js.map +0 -1
- package/dist/chunk-DQ3DTWOC.js.map +0 -1
- package/dist/chunk-MCS7JCUD.js.map +0 -1
- package/dist/chunk-OYSBFM6W.js.map +0 -1
- package/dist/chunk-ZKBTTJN6.js.map +0 -1
- /package/dist/{chunk-TCEEX3OY.js.map → chunk-2HFXG2VP.js.map} +0 -0
- /package/dist/{chunk-Y6FW7T32.js.map → chunk-6A25WCKU.js.map} +0 -0
- /package/dist/{chunk-ZF3JUN3R.js.map → chunk-B7QVLWCF.js.map} +0 -0
- /package/dist/{chunk-TVMTDS57.js.map → chunk-CEEW7MC6.js.map} +0 -0
- /package/dist/{chunk-KGQAQE4S.js.map → chunk-JW5NOPVQ.js.map} +0 -0
- /package/dist/{chunk-5SMBRJIZ.js.map → chunk-N6CCWDPF.js.map} +0 -0
- /package/dist/{chunk-KLINZKYA.js.map → chunk-R4N6E4JK.js.map} +0 -0
- /package/dist/{chunk-4LLFZ5OY.js.map → chunk-XKTKIG57.js.map} +0 -0
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
DOCX_RENDERER_IDS,
|
|
3
3
|
VisualPropsSchema,
|
|
4
4
|
docxPropsSchemaForRenderer
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-JW5NOPVQ.js";
|
|
6
6
|
import {
|
|
7
7
|
ThemeOverridesSchema
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-N6CCWDPF.js";
|
|
9
9
|
import {
|
|
10
10
|
ColumnsPropsSchema,
|
|
11
11
|
ComponentDefaultsSchema,
|
|
@@ -18,19 +18,19 @@ import {
|
|
|
18
18
|
TablePropsSchema,
|
|
19
19
|
createSectionPropsSchema,
|
|
20
20
|
createTablePropsSchema
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-P43S7QYT.js";
|
|
22
22
|
import {
|
|
23
23
|
AlignmentSchema,
|
|
24
24
|
FloatingPropertiesSchema,
|
|
25
25
|
SpacingSchema
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-V3YRROBV.js";
|
|
27
27
|
import {
|
|
28
28
|
HexColorSchema,
|
|
29
29
|
NoProofWordsSchema
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-Y3XKLR27.js";
|
|
31
31
|
|
|
32
32
|
// src/schemas/component-registry.ts
|
|
33
|
-
import { Type as
|
|
33
|
+
import { Type as Type7 } from "@sinclair/typebox";
|
|
34
34
|
|
|
35
35
|
// src/schemas/components/report.ts
|
|
36
36
|
import { Type } from "@sinclair/typebox";
|
|
@@ -452,45 +452,103 @@ var TocPropsSchema = Type3.Object(
|
|
|
452
452
|
}
|
|
453
453
|
);
|
|
454
454
|
|
|
455
|
-
// src/schemas/components/
|
|
455
|
+
// src/schemas/components/divider.ts
|
|
456
456
|
import { Type as Type4 } from "@sinclair/typebox";
|
|
457
|
-
var
|
|
457
|
+
var DividerPropsSchema = Type4.Object(
|
|
458
|
+
{
|
|
459
|
+
thickness: Type4.Optional(
|
|
460
|
+
Type4.Number({
|
|
461
|
+
minimum: 0.25,
|
|
462
|
+
maximum: 12,
|
|
463
|
+
description: "Line weight in points (default 1). OOXML measures a border in eighths of a point and Word stops at 12pt, so this is the whole usable range."
|
|
464
|
+
})
|
|
465
|
+
),
|
|
466
|
+
color: Type4.Optional(HexColorSchema),
|
|
467
|
+
style: Type4.Optional(
|
|
468
|
+
Type4.Union(
|
|
469
|
+
[
|
|
470
|
+
Type4.Literal("solid"),
|
|
471
|
+
Type4.Literal("dashed"),
|
|
472
|
+
Type4.Literal("dotted"),
|
|
473
|
+
Type4.Literal("double")
|
|
474
|
+
],
|
|
475
|
+
{
|
|
476
|
+
description: 'Line style (default "solid"). `double` draws two lines and is measured per line, so it reads about twice as tall as its thickness.'
|
|
477
|
+
}
|
|
478
|
+
)
|
|
479
|
+
),
|
|
480
|
+
width: Type4.Optional(
|
|
481
|
+
Type4.Union(
|
|
482
|
+
[
|
|
483
|
+
Type4.Number({
|
|
484
|
+
minimum: 1,
|
|
485
|
+
description: "Divider width in points"
|
|
486
|
+
}),
|
|
487
|
+
Type4.String({
|
|
488
|
+
pattern: "^\\d+(\\.\\d+)?%$",
|
|
489
|
+
description: 'Divider width as a percentage of the text measure (e.g. "40%")'
|
|
490
|
+
})
|
|
491
|
+
],
|
|
492
|
+
{
|
|
493
|
+
description: "How far the line runs (default: the full text measure). A percentage or a point width is turned into paragraph indents, resolved against the theme page \u2014 so a partial divider inside a column or a re-margined section is measured against the page, while the default full-measure divider is exact everywhere."
|
|
494
|
+
}
|
|
495
|
+
)
|
|
496
|
+
),
|
|
497
|
+
alignment: Type4.Optional(
|
|
498
|
+
Type4.Union(
|
|
499
|
+
[Type4.Literal("left"), Type4.Literal("center"), Type4.Literal("right")],
|
|
500
|
+
{
|
|
501
|
+
description: 'Which end of the measure a partial divider sits at (default "left"). Ignored at full width.'
|
|
502
|
+
}
|
|
503
|
+
)
|
|
504
|
+
),
|
|
505
|
+
spacing: Type4.Optional(SpacingSchema)
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
description: "Horizontal divider \u2014 a thin line across the measure, drawn as a Word paragraph border so it stays editable in Word.",
|
|
509
|
+
additionalProperties: false
|
|
510
|
+
}
|
|
511
|
+
);
|
|
512
|
+
|
|
513
|
+
// src/schemas/components/highcharts.ts
|
|
514
|
+
import { Type as Type5 } from "@sinclair/typebox";
|
|
515
|
+
var HighchartsPropsSchema = Type5.Object({
|
|
458
516
|
// Highcharts chart options - can be anything but must at least have chart.width and chart.height
|
|
459
|
-
options:
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
chart:
|
|
463
|
-
width:
|
|
464
|
-
height:
|
|
517
|
+
options: Type5.Intersect([
|
|
518
|
+
Type5.Record(Type5.String(), Type5.Unknown()),
|
|
519
|
+
Type5.Object({
|
|
520
|
+
chart: Type5.Object({
|
|
521
|
+
width: Type5.Number(),
|
|
522
|
+
height: Type5.Number()
|
|
465
523
|
})
|
|
466
524
|
})
|
|
467
525
|
]),
|
|
468
526
|
// Optional scale factor for export
|
|
469
|
-
scale:
|
|
527
|
+
scale: Type5.Optional(Type5.Number()),
|
|
470
528
|
// Optional resources forwarded verbatim to the export server (CSS/JS/files).
|
|
471
529
|
// Notably enables @font-face rules so charts render in custom fonts.
|
|
472
|
-
resources:
|
|
473
|
-
|
|
474
|
-
css:
|
|
475
|
-
js:
|
|
476
|
-
files:
|
|
530
|
+
resources: Type5.Optional(
|
|
531
|
+
Type5.Object({
|
|
532
|
+
css: Type5.Optional(Type5.String()),
|
|
533
|
+
js: Type5.Optional(Type5.String()),
|
|
534
|
+
files: Type5.Optional(Type5.Array(Type5.String()))
|
|
477
535
|
})
|
|
478
536
|
),
|
|
479
537
|
// Optional Highcharts Export Server URL override
|
|
480
|
-
serverUrl:
|
|
481
|
-
|
|
538
|
+
serverUrl: Type5.Optional(
|
|
539
|
+
Type5.String({
|
|
482
540
|
description: "Highcharts Export Server URL (default: http://localhost:7801)"
|
|
483
541
|
})
|
|
484
542
|
),
|
|
485
543
|
// Optional width for rendering (overrides chart width)
|
|
486
|
-
width:
|
|
487
|
-
|
|
544
|
+
width: Type5.Optional(
|
|
545
|
+
Type5.Union(
|
|
488
546
|
[
|
|
489
|
-
|
|
547
|
+
Type5.Number({
|
|
490
548
|
minimum: 1,
|
|
491
549
|
description: "Image width in pixels"
|
|
492
550
|
}),
|
|
493
|
-
|
|
551
|
+
Type5.String({
|
|
494
552
|
pattern: "^\\d+(\\.\\d+)?%$",
|
|
495
553
|
description: 'Image width as percentage (e.g., "90%") relative to content width'
|
|
496
554
|
})
|
|
@@ -501,14 +559,14 @@ var HighchartsPropsSchema = Type4.Object({
|
|
|
501
559
|
)
|
|
502
560
|
),
|
|
503
561
|
// Optional height for rendering (overrides chart height)
|
|
504
|
-
height:
|
|
505
|
-
|
|
562
|
+
height: Type5.Optional(
|
|
563
|
+
Type5.Union(
|
|
506
564
|
[
|
|
507
|
-
|
|
565
|
+
Type5.Number({
|
|
508
566
|
minimum: 1,
|
|
509
567
|
description: "Image height in pixels"
|
|
510
568
|
}),
|
|
511
|
-
|
|
569
|
+
Type5.String({
|
|
512
570
|
pattern: "^\\d+(\\.\\d+)?%$",
|
|
513
571
|
description: 'Image height as percentage (e.g., "90%") relative to content height'
|
|
514
572
|
})
|
|
@@ -521,112 +579,112 @@ var HighchartsPropsSchema = Type4.Object({
|
|
|
521
579
|
});
|
|
522
580
|
|
|
523
581
|
// src/schemas/components/chart.ts
|
|
524
|
-
import { Type as
|
|
525
|
-
var ChartTypeSchema =
|
|
582
|
+
import { Type as Type6 } from "@sinclair/typebox";
|
|
583
|
+
var ChartTypeSchema = Type6.Union(
|
|
526
584
|
[
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
585
|
+
Type6.Literal("area"),
|
|
586
|
+
Type6.Literal("bar"),
|
|
587
|
+
Type6.Literal("column"),
|
|
588
|
+
Type6.Literal("doughnut"),
|
|
589
|
+
Type6.Literal("line"),
|
|
590
|
+
Type6.Literal("pie"),
|
|
591
|
+
Type6.Literal("radar"),
|
|
592
|
+
Type6.Literal("scatter")
|
|
535
593
|
],
|
|
536
594
|
{ description: "Chart type" }
|
|
537
595
|
);
|
|
538
|
-
var ChartDataSeriesSchema =
|
|
596
|
+
var ChartDataSeriesSchema = Type6.Object(
|
|
539
597
|
{
|
|
540
|
-
name:
|
|
541
|
-
labels:
|
|
542
|
-
|
|
598
|
+
name: Type6.Optional(Type6.String({ description: "Series name" })),
|
|
599
|
+
labels: Type6.Optional(
|
|
600
|
+
Type6.Array(Type6.String(), {
|
|
543
601
|
description: "Category labels. Needed on every series, not just the first, and the same length as `values`; a series without both `labels` and `values` drops the whole chart."
|
|
544
602
|
})
|
|
545
603
|
),
|
|
546
|
-
values:
|
|
547
|
-
|
|
604
|
+
values: Type6.Optional(
|
|
605
|
+
Type6.Array(Type6.Number(), {
|
|
548
606
|
description: "Data values, one per label. Needed on every series \u2014 see `labels`."
|
|
549
607
|
})
|
|
550
608
|
)
|
|
551
609
|
},
|
|
552
610
|
{ additionalProperties: false }
|
|
553
611
|
);
|
|
554
|
-
var ChartPropsSchema =
|
|
612
|
+
var ChartPropsSchema = Type6.Object(
|
|
555
613
|
{
|
|
556
614
|
type: ChartTypeSchema,
|
|
557
|
-
data:
|
|
615
|
+
data: Type6.Array(ChartDataSeriesSchema, {
|
|
558
616
|
description: "Chart data series",
|
|
559
617
|
minItems: 1
|
|
560
618
|
}),
|
|
561
619
|
// Title
|
|
562
|
-
title:
|
|
563
|
-
showTitle:
|
|
564
|
-
|
|
620
|
+
title: Type6.Optional(Type6.String({ description: "Chart title text" })),
|
|
621
|
+
showTitle: Type6.Optional(
|
|
622
|
+
Type6.Boolean({
|
|
565
623
|
description: "Show the chart title. Defaults to true when `title` is set."
|
|
566
624
|
})
|
|
567
625
|
),
|
|
568
626
|
// Legend
|
|
569
|
-
showLegend:
|
|
570
|
-
|
|
627
|
+
showLegend: Type6.Optional(
|
|
628
|
+
Type6.Boolean({ description: "Show chart legend" })
|
|
571
629
|
),
|
|
572
|
-
legendPos:
|
|
573
|
-
|
|
630
|
+
legendPos: Type6.Optional(
|
|
631
|
+
Type6.Union(
|
|
574
632
|
[
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
633
|
+
Type6.Literal("b"),
|
|
634
|
+
Type6.Literal("l"),
|
|
635
|
+
Type6.Literal("r"),
|
|
636
|
+
Type6.Literal("t"),
|
|
637
|
+
Type6.Literal("tr")
|
|
580
638
|
],
|
|
581
639
|
{ description: "Legend position" }
|
|
582
640
|
)
|
|
583
641
|
),
|
|
584
642
|
// Series colors
|
|
585
|
-
chartColors:
|
|
586
|
-
|
|
643
|
+
chartColors: Type6.Optional(
|
|
644
|
+
Type6.Array(Type6.String(), {
|
|
587
645
|
description: "Series colors (hex or semantic theme names). Defaults to the theme palette."
|
|
588
646
|
})
|
|
589
647
|
),
|
|
590
648
|
// Axis titles
|
|
591
|
-
catAxisTitle:
|
|
592
|
-
|
|
649
|
+
catAxisTitle: Type6.Optional(
|
|
650
|
+
Type6.String({ description: "Category axis title" })
|
|
593
651
|
),
|
|
594
|
-
valAxisTitle:
|
|
595
|
-
|
|
652
|
+
valAxisTitle: Type6.Optional(
|
|
653
|
+
Type6.String({ description: "Value axis title" })
|
|
596
654
|
),
|
|
597
655
|
// Flow placement — the same vocabulary as `image` and `highcharts`.
|
|
598
|
-
width:
|
|
599
|
-
|
|
656
|
+
width: Type6.Optional(
|
|
657
|
+
Type6.Number({
|
|
600
658
|
minimum: 0,
|
|
601
659
|
exclusiveMinimum: 0,
|
|
602
660
|
description: "Chart width in inches. Defaults to the content width."
|
|
603
661
|
})
|
|
604
662
|
),
|
|
605
|
-
height:
|
|
606
|
-
|
|
663
|
+
height: Type6.Optional(
|
|
664
|
+
Type6.Number({
|
|
607
665
|
minimum: 0,
|
|
608
666
|
exclusiveMinimum: 0,
|
|
609
667
|
description: "Chart height in inches. Defaults to 3."
|
|
610
668
|
})
|
|
611
669
|
),
|
|
612
|
-
alignment:
|
|
613
|
-
caption:
|
|
614
|
-
|
|
670
|
+
alignment: Type6.Optional(AlignmentSchema),
|
|
671
|
+
caption: Type6.Optional(
|
|
672
|
+
Type6.String({
|
|
615
673
|
description: "Chart caption (supports rich text with **bold**, *italic*, ***both***)"
|
|
616
674
|
})
|
|
617
675
|
),
|
|
618
|
-
alt:
|
|
619
|
-
|
|
676
|
+
alt: Type6.Optional(
|
|
677
|
+
Type6.String({ description: "Alternative text for accessibility" })
|
|
620
678
|
),
|
|
621
|
-
spacing:
|
|
622
|
-
floating:
|
|
623
|
-
keepNext:
|
|
624
|
-
|
|
679
|
+
spacing: Type6.Optional(SpacingSchema),
|
|
680
|
+
floating: Type6.Optional(FloatingPropertiesSchema),
|
|
681
|
+
keepNext: Type6.Optional(
|
|
682
|
+
Type6.Boolean({
|
|
625
683
|
description: "Keep paragraph with next paragraph on same page"
|
|
626
684
|
})
|
|
627
685
|
),
|
|
628
|
-
keepLines:
|
|
629
|
-
|
|
686
|
+
keepLines: Type6.Optional(
|
|
687
|
+
Type6.Boolean({
|
|
630
688
|
description: "Keep all lines of paragraph together on same page"
|
|
631
689
|
})
|
|
632
690
|
)
|
|
@@ -674,6 +732,7 @@ var STANDARD_COMPONENTS_REGISTRY = [
|
|
|
674
732
|
"table",
|
|
675
733
|
"list",
|
|
676
734
|
"toc",
|
|
735
|
+
"divider",
|
|
677
736
|
"highcharts",
|
|
678
737
|
"chart",
|
|
679
738
|
"visual",
|
|
@@ -695,6 +754,7 @@ var STANDARD_COMPONENTS_REGISTRY = [
|
|
|
695
754
|
"table",
|
|
696
755
|
"list",
|
|
697
756
|
"toc",
|
|
757
|
+
"divider",
|
|
698
758
|
"highcharts",
|
|
699
759
|
"chart",
|
|
700
760
|
"visual",
|
|
@@ -707,7 +767,7 @@ var STANDARD_COMPONENTS_REGISTRY = [
|
|
|
707
767
|
name: "text-box",
|
|
708
768
|
propsSchema: TextBoxPropsSchema,
|
|
709
769
|
hasChildren: true,
|
|
710
|
-
allowedChildren: ["heading", "paragraph", "image"],
|
|
770
|
+
allowedChildren: ["heading", "paragraph", "image", "divider"],
|
|
711
771
|
category: "layout",
|
|
712
772
|
description: "Floating text container - allows positioning text anywhere on the page with absolute or relative positioning."
|
|
713
773
|
},
|
|
@@ -780,6 +840,13 @@ var STANDARD_COMPONENTS_REGISTRY = [
|
|
|
780
840
|
category: "content",
|
|
781
841
|
description: "Table of contents - automatically generates TOC from document headings. Supports depth ranges and custom styles."
|
|
782
842
|
},
|
|
843
|
+
{
|
|
844
|
+
name: "divider",
|
|
845
|
+
propsSchema: DividerPropsSchema,
|
|
846
|
+
hasChildren: false,
|
|
847
|
+
category: "content",
|
|
848
|
+
description: "Horizontal divider - a thin line across the measure, for separating sections. Drawn as a Word paragraph border, so it stays a real Word object. Use this rather than collapsing a paragraph's line spacing to fake one."
|
|
849
|
+
},
|
|
783
850
|
{
|
|
784
851
|
name: "highcharts",
|
|
785
852
|
propsSchema: HighchartsPropsSchema,
|
|
@@ -830,26 +897,26 @@ function demandsProps(propsSchema) {
|
|
|
830
897
|
}
|
|
831
898
|
function createComponentSchemaObject(component, childrenType, selfRef, profile) {
|
|
832
899
|
const schema = {
|
|
833
|
-
name:
|
|
834
|
-
id:
|
|
835
|
-
enabled:
|
|
836
|
-
|
|
900
|
+
name: Type7.Literal(component.name),
|
|
901
|
+
id: Type7.Optional(Type7.String()),
|
|
902
|
+
enabled: Type7.Optional(
|
|
903
|
+
Type7.Boolean({
|
|
837
904
|
default: true,
|
|
838
905
|
description: "When false, this component is filtered out and not rendered. Defaults to true. Useful for conditional component inclusion."
|
|
839
906
|
})
|
|
840
907
|
)
|
|
841
908
|
};
|
|
842
909
|
if (component.special?.hasSchemaField) {
|
|
843
|
-
schema.$schema =
|
|
844
|
-
schema.renderer = profile ? profile.requireDiscriminator ?
|
|
910
|
+
schema.$schema = Type7.Optional(Type7.String({ format: "uri" }));
|
|
911
|
+
schema.renderer = profile ? profile.requireDiscriminator ? Type7.Literal(profile.renderer, {
|
|
845
912
|
description: "Renderer backend for this document"
|
|
846
|
-
}) :
|
|
847
|
-
|
|
913
|
+
}) : Type7.Optional(
|
|
914
|
+
Type7.Literal(profile.renderer, {
|
|
848
915
|
description: 'Renderer backend. Omitted defaults to "docxjs".'
|
|
849
916
|
})
|
|
850
|
-
) :
|
|
851
|
-
|
|
852
|
-
DOCX_RENDERER_IDS.map((renderer) =>
|
|
917
|
+
) : Type7.Optional(
|
|
918
|
+
Type7.Union(
|
|
919
|
+
DOCX_RENDERER_IDS.map((renderer) => Type7.Literal(renderer)),
|
|
853
920
|
{
|
|
854
921
|
description: 'Renderer backend. Omitted defaults to "docxjs".'
|
|
855
922
|
}
|
|
@@ -862,11 +929,11 @@ function createComponentSchemaObject(component, childrenType, selfRef, profile)
|
|
|
862
929
|
basePropsSchema,
|
|
863
930
|
profile.renderer
|
|
864
931
|
) : basePropsSchema;
|
|
865
|
-
schema.props = demandsProps(propsSchema) ? propsSchema :
|
|
932
|
+
schema.props = demandsProps(propsSchema) ? propsSchema : Type7.Optional(propsSchema);
|
|
866
933
|
if (component.hasChildren && childrenType) {
|
|
867
|
-
schema.children = component.special?.hasSchemaField ?
|
|
934
|
+
schema.children = component.special?.hasSchemaField ? Type7.Array(childrenType) : Type7.Optional(Type7.Array(childrenType));
|
|
868
935
|
}
|
|
869
|
-
return
|
|
936
|
+
return Type7.Object(schema, {
|
|
870
937
|
additionalProperties: false,
|
|
871
938
|
description: component.description
|
|
872
939
|
});
|
|
@@ -911,7 +978,7 @@ function createAllComponentSchemasNarrowed(selfRef, pluginSchemas = [], profile)
|
|
|
911
978
|
if (!containerDeps.every((d) => resolved.has(d))) continue;
|
|
912
979
|
const childSchemas = comp.allowedChildren.map((name) => resolved.get(name) ?? leafSchemas.get(name)).filter((s) => s !== void 0);
|
|
913
980
|
const allChildSchemas = [...childSchemas, ...pluginSchemas];
|
|
914
|
-
const childrenType = allChildSchemas.length === 1 ? allChildSchemas[0] :
|
|
981
|
+
const childrenType = allChildSchemas.length === 1 ? allChildSchemas[0] : Type7.Union(allChildSchemas);
|
|
915
982
|
resolved.set(
|
|
916
983
|
comp.name,
|
|
917
984
|
createComponentSchemaObject(comp, childrenType, selfRef, profile)
|
|
@@ -937,6 +1004,7 @@ export {
|
|
|
937
1004
|
TocStyleMappingSchema,
|
|
938
1005
|
TocDepthRangeSchema,
|
|
939
1006
|
TocPropsSchema,
|
|
1007
|
+
DividerPropsSchema,
|
|
940
1008
|
HighchartsPropsSchema,
|
|
941
1009
|
ChartPropsSchema,
|
|
942
1010
|
STANDARD_COMPONENTS_REGISTRY,
|
|
@@ -950,4 +1018,4 @@ export {
|
|
|
950
1018
|
createAllComponentSchemas,
|
|
951
1019
|
createAllComponentSchemasNarrowed
|
|
952
1020
|
};
|
|
953
|
-
//# sourceMappingURL=chunk-
|
|
1021
|
+
//# sourceMappingURL=chunk-YJMOIHYP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schemas/component-registry.ts","../src/schemas/components/report.ts","../src/schemas/components/text-box.ts","../src/schemas/components/toc.ts","../src/schemas/components/divider.ts","../src/schemas/components/highcharts.ts","../src/schemas/components/chart.ts"],"sourcesContent":["/**\n * Component Registry - SINGLE SOURCE OF TRUTH\n *\n * This is the ONLY place where standard components are defined.\n * All schema generators MUST use this registry.\n *\n * Adding a new component: Add it to STANDARD_COMPONENTS_REGISTRY below.\n * It will automatically be included in:\n * - StandardComponentDefinitionSchema (components.ts)\n * - ComponentDefinitionSchema (components.ts)\n * - generateUnifiedDocumentSchema (generator.ts)\n * - Monaco editor autocomplete\n * - Build-time JSON schemas\n */\n\nimport { Type, TSchema } from '@sinclair/typebox';\n// Import directly from individual component files to avoid circular dependency\n// (components.ts imports from this file, so we can't import from components.ts)\nimport { ReportPropsSchema } from './components/report';\nimport {\n SectionPropsSchema,\n createSectionPropsSchema,\n} from './components/section';\nimport { ColumnsPropsSchema } from './components/columns';\nimport { HeadingPropsSchema } from './components/heading';\nimport { ParagraphPropsSchema } from './components/paragraph';\nimport { TextBoxPropsSchema } from './components/text-box';\nimport { ImagePropsSchema } from './components/image';\nimport { StatisticPropsSchema } from './components/statistic';\nimport { TablePropsSchema, createTablePropsSchema } from './components/table';\nimport { ListPropsSchema } from './components/list';\nimport { TocPropsSchema } from './components/toc';\nimport { DividerPropsSchema } from './components/divider';\nimport { HighchartsPropsSchema } from './components/highcharts';\nimport { ChartPropsSchema } from './components/chart';\nimport { VisualPropsSchema } from './components/visual';\nimport {\n DOCX_RENDERER_IDS,\n docxPropsSchemaForRenderer,\n type DocxRendererId,\n} from './renderer';\n\n/**\n * A position under a component's `props` where full component definitions are\n * embedded outside the shared `children` array.\n *\n * Declaring these here is what keeps the deep-validation walk aligned with the\n * live document schema: the same entry's `createPropsSchema` wires a recursive\n * component ref into these positions, and the walk visits exactly what is\n * declared. `embedded-component-regions.test.ts` probes each factory with a\n * marker schema and fails when a declaration and the factory disagree, so a\n * new embedded position cannot silently become a walk blind spot (#292).\n */\nexport interface EmbeddedComponentRegion {\n /** Path segments under `props`; `'*'` means every element of an array. */\n path: readonly string[];\n /**\n * `'component'` — the position holds one component definition;\n * `'component-array'` — it holds an array of them. Values of another legal\n * shape at the position (a string cell content, `'linkToPrevious'`) are\n * simply not walked.\n */\n arity: 'component' | 'component-array';\n /**\n * Whether the walk reports malformed entries (a non-object, a missing\n * `name`) at this position. True where the static props schema types the\n * position loosely (`Type.Any()` — the walk is its only structural checker);\n * false where the props schema already validates structure, so the walk only\n * adds per-component prop errors and must not double-report.\n */\n reportStructure: boolean;\n}\n\n/**\n * Component definition with metadata\n */\nexport interface StandardComponentDefinition {\n /** Component name identifier (e.g., 'heading', 'text', 'toc') */\n name: string;\n /** TypeBox schema for the component's props */\n propsSchema: TSchema;\n /** Whether this component can contain children */\n hasChildren: boolean;\n /**\n * Names of standard components allowed as direct children.\n * Only meaningful when hasChildren is true.\n * Plugin components are always allowed in addition to these.\n * Omit to allow the full recursive union (backward-compat).\n */\n allowedChildren?: readonly string[];\n /**\n * Factory that builds props with a live recursive ref (e.g., for section\n * header/footer, table cell content). When present and a recursive ref is\n * available, used instead of the static `propsSchema`.\n */\n createPropsSchema?: (recursiveRef: TSchema) => TSchema;\n /**\n * Where `createPropsSchema` embeds component definitions inside `props`.\n * Drives the deep-validation walk; must match the factory (enforced by\n * `embedded-component-regions.test.ts`). Omit when the component embeds\n * none.\n */\n embeddedComponents?: readonly EmbeddedComponentRegion[];\n /**\n * The renderers that can draw this component. Omitted means all of them.\n *\n * Only for a component whose backend gap is real, not a slice boundary: a\n * component listed here disappears from the other renderers' schema branch\n * entirely, so a schema-driven editor stops offering it rather than\n * offering it and failing at render time.\n */\n renderers?: readonly DocxRendererId[];\n /** Component category for organization */\n category: 'container' | 'content' | 'layout';\n /** Human-readable description */\n description: string;\n /** Special flags for this component */\n special?: {\n /** Has $schema field (only 'docx') */\n hasSchemaField?: boolean;\n };\n}\n\n/**\n * SINGLE SOURCE OF TRUTH for all standard components\n *\n * This is the ONLY place where standard components are defined.\n * All schema generators MUST use this registry.\n *\n * IMPORTANT: When adding a new component:\n * 1. Add the component definition to this array\n * 2. Import its props schema at the top of this file\n * 3. That's it! The component will automatically appear everywhere.\n */\nexport const STANDARD_COMPONENTS_REGISTRY: readonly StandardComponentDefinition[] =\n [\n // ========================================================================\n // Container Components (can contain children)\n // ========================================================================\n {\n name: 'docx',\n propsSchema: ReportPropsSchema,\n hasChildren: true,\n allowedChildren: ['section'],\n category: 'container',\n description:\n 'Main document container - defines the overall document structure. Required as the root component.',\n special: {\n hasSchemaField: true, // Only docx root has $schema field\n },\n },\n {\n name: 'section',\n propsSchema: SectionPropsSchema,\n createPropsSchema: createSectionPropsSchema,\n embeddedComponents: [\n // The static schema types both regions as an array of Type.Any() (or\n // the 'linkToPrevious' literal), so the walk is their only structural\n // checker — report malformed entries too.\n { path: ['header'], arity: 'component-array', reportStructure: true },\n { path: ['footer'], arity: 'component-array', reportStructure: true },\n ],\n hasChildren: true,\n allowedChildren: [\n 'heading',\n 'paragraph',\n 'image',\n 'statistic',\n 'table',\n 'list',\n 'toc',\n 'divider',\n 'highcharts',\n 'chart',\n 'visual',\n 'columns',\n 'text-box',\n ],\n category: 'container',\n description:\n 'Section container - groups related content with optional title. Use for organizing document structure.',\n },\n {\n name: 'columns',\n propsSchema: ColumnsPropsSchema,\n hasChildren: true,\n allowedChildren: [\n 'heading',\n 'paragraph',\n 'image',\n 'statistic',\n 'table',\n 'list',\n 'toc',\n 'divider',\n 'highcharts',\n 'chart',\n 'visual',\n 'text-box',\n ],\n category: 'layout',\n description:\n 'Multi-column layout - arranges content in 2-4 columns. Great for side-by-side content.',\n },\n {\n name: 'text-box',\n propsSchema: TextBoxPropsSchema,\n hasChildren: true,\n allowedChildren: ['heading', 'paragraph', 'image', 'divider'],\n category: 'layout',\n description:\n 'Floating text container - allows positioning text anywhere on the page with absolute or relative positioning.',\n },\n\n // ========================================================================\n // Content Components (leaf nodes, no children)\n // ========================================================================\n {\n name: 'heading',\n propsSchema: HeadingPropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Heading text - supports levels 1-6 for document hierarchy. Level 1 is largest. Never skip a level going down (1 → 3): the gap breaks the document outline.',\n },\n {\n name: 'paragraph',\n propsSchema: ParagraphPropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Paragraph text - supports formatting like bold, italic, and color. Main content element.',\n },\n {\n name: 'image',\n propsSchema: ImagePropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Image element - displays images with optional caption. Supports various formats.',\n },\n {\n name: 'statistic',\n propsSchema: StatisticPropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Statistic display - shows a number with description. Perfect for KPIs and metrics.',\n },\n {\n name: 'table',\n propsSchema: TablePropsSchema,\n createPropsSchema: createTablePropsSchema,\n embeddedComponents: [\n // Cell content is `string | component`. The table's own props schema\n // already validates the cell structure, so the walk only adds the\n // per-component prop errors the loose static content ref misses —\n // reporting structure here would double-report.\n {\n path: ['columns', '*', 'header', 'content'],\n arity: 'component',\n reportStructure: false,\n },\n {\n path: ['columns', '*', 'cells', '*', 'content'],\n arity: 'component',\n reportStructure: false,\n },\n ],\n hasChildren: false,\n category: 'content',\n description:\n 'Data table, declared COLUMN-MAJOR: `props.columns[]`, each with its own `header` and its own `cells[]` running down the column. Note the PPTX `table` is the other way round — rows of cells — so a table cannot be moved between the formats unchanged. Fixed column widths are points and must fit the page; leave some columns unsized so they share the leftover space.',\n },\n {\n name: 'list',\n propsSchema: ListPropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'List element - bulleted or numbered list items. Supports nested lists.',\n },\n {\n name: 'toc',\n propsSchema: TocPropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Table of contents - automatically generates TOC from document headings. Supports depth ranges and custom styles.',\n },\n {\n name: 'divider',\n propsSchema: DividerPropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n \"Horizontal divider - a thin line across the measure, for separating sections. Drawn as a Word paragraph border, so it stays a real Word object. Use this rather than collapsing a paragraph's line spacing to fake one.\",\n },\n {\n name: 'highcharts',\n propsSchema: HighchartsPropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Chart component powered by Highcharts - render line, bar, pie, heatmap, and more with rich options.',\n },\n {\n name: 'chart',\n propsSchema: ChartPropsSchema,\n hasChildren: false,\n // docx.js has no chart primitive at all, so this is a backend gap rather\n // than a slice boundary — the same reasoning that keeps `drawing-groups`\n // off the docxjs capability set.\n renderers: ['office-open'],\n category: 'content',\n description:\n 'Native Word chart - editable, scalable, no export server needed. Requires renderer \"office-open\".',\n },\n {\n name: 'visual',\n propsSchema: VisualPropsSchema,\n hasChildren: false,\n category: 'content',\n description:\n 'Free-canvas graphic for infographics, diagrams and layered compositions the document flow cannot express. Rasterized from a pptx slide by default; renderMode \"native\" draws it as an editable Word drawing group (renderer \"office-open\").',\n },\n ] as const;\n\n// ============================================================================\n// Helper Functions\n// ============================================================================\n\n/**\n * Get a component definition by name\n */\nexport function getStandardComponent(\n name: string\n): StandardComponentDefinition | undefined {\n return STANDARD_COMPONENTS_REGISTRY.find((c) => c.name === name);\n}\n\n/**\n * Get all standard component names\n */\nexport function getAllStandardComponentNames(): readonly string[] {\n return STANDARD_COMPONENTS_REGISTRY.map((c) => c.name);\n}\n\n/**\n * Get components by category\n */\nexport function getComponentsByCategory(\n category: StandardComponentDefinition['category']\n): readonly StandardComponentDefinition[] {\n return STANDARD_COMPONENTS_REGISTRY.filter((c) => c.category === category);\n}\n\n/**\n * Get container components (components that can have children)\n */\nexport function getContainerComponents(): readonly StandardComponentDefinition[] {\n return STANDARD_COMPONENTS_REGISTRY.filter((c) => c.hasChildren);\n}\n\n/**\n * Get content components (components that cannot have children)\n */\nexport function getContentComponents(): readonly StandardComponentDefinition[] {\n return STANDARD_COMPONENTS_REGISTRY.filter((c) => !c.hasChildren);\n}\n\n/**\n * Check if a component name is a standard component\n */\nexport function isStandardComponent(name: string): boolean {\n return STANDARD_COMPONENTS_REGISTRY.some((c) => c.name === name);\n}\n\n// ============================================================================\n// Schema Generation Helpers\n// ============================================================================\n\n/**\n * True when a props schema rejects `{}`, i.e. the `props` key cannot be omitted.\n *\n * Only object schemas are inspected. Anything else (a union, a bare ref) is\n * treated as demanding props, preserving the previous stricter behavior for\n * shapes this cannot reason about.\n */\nfunction demandsProps(propsSchema: TSchema): boolean {\n const schema = propsSchema as { type?: string; required?: readonly string[] };\n return schema.type !== 'object' || (schema.required?.length ?? 0) > 0;\n}\n\n/**\n * Generate TypeBox schema object for a component.\n *\n * @param component - Component definition from the registry\n * @param childrenType - Schema for children items. For containers this should be\n * a narrowed union of allowed children; for leaves omit it.\n * @returns TypeBox schema object for the component\n */\nexport function createComponentSchemaObject(\n component: StandardComponentDefinition,\n childrenType?: TSchema,\n selfRef?: TSchema,\n profile?: { renderer: DocxRendererId; requireDiscriminator: boolean }\n): TSchema {\n const schema: Record<string, TSchema> = {\n name: Type.Literal(component.name),\n id: Type.Optional(Type.String()),\n enabled: Type.Optional(\n Type.Boolean({\n default: true,\n description:\n 'When false, this component is filtered out and not rendered. Defaults to true. Useful for conditional component inclusion.',\n })\n ),\n };\n\n // Special handling for report component (has $schema field)\n if (component.special?.hasSchemaField) {\n schema.$schema = Type.Optional(Type.String({ format: 'uri' }));\n schema.renderer = profile\n ? profile.requireDiscriminator\n ? Type.Literal(profile.renderer, {\n description: 'Renderer backend for this document',\n })\n : Type.Optional(\n Type.Literal(profile.renderer, {\n description: 'Renderer backend. Omitted defaults to \"docxjs\".',\n })\n )\n : Type.Optional(\n Type.Union(\n DOCX_RENDERER_IDS.map((renderer) => Type.Literal(renderer)),\n {\n description: 'Renderer backend. Omitted defaults to \"docxjs\".',\n }\n )\n );\n }\n\n // selfRef (full union) is intentionally passed to createPropsSchema so that\n // header/footer sub-schemas and table cell content can reference any component.\n const basePropsSchema =\n component.createPropsSchema && selfRef\n ? component.createPropsSchema(selfRef)\n : component.propsSchema;\n const propsSchema = profile\n ? docxPropsSchemaForRenderer(\n component.name,\n basePropsSchema,\n profile.renderer\n )\n : basePropsSchema;\n\n // `props` is required only when the props schema itself demands a field.\n // The runtime validator treats an omitted `props` as `{}` and lets the props\n // schema decide (see deep-validator.ts), so `section`, `toc`, `image` and\n // `text-box` are legal without the key. Exporting `props` as unconditionally\n // required reddened documents that build: the playground flagged all 23\n // propless sections in the shipped tech-report template while every runtime\n // gate stayed green. The root `docx` node already carried this fix locally in\n // generator.ts; this generalizes it to every component.\n schema.props = demandsProps(propsSchema)\n ? propsSchema\n : Type.Optional(propsSchema);\n\n // Add children support if applicable. The root component requires its\n // `children` array — deep-validator.ts enforces the same rule, but only on\n // the fallback path it takes when the TypeBox check already failed. That\n // made the rule fire only as a side effect of `props` being required, so\n // relaxing `props` above would silently retire it. Nested containers may\n // legitimately be empty.\n if (component.hasChildren && childrenType) {\n schema.children = component.special?.hasSchemaField\n ? Type.Array(childrenType)\n : Type.Optional(Type.Array(childrenType));\n }\n\n return Type.Object(schema, {\n additionalProperties: false,\n description: component.description,\n });\n}\n\n/**\n * Generate an array of TypeBox schemas for all standard components.\n * Uses a flat recursive ref for all containers (legacy behavior).\n *\n * @param recursiveRef - Optional recursive reference for children\n * @returns Array of TypeBox schemas for all components in the registry\n */\nexport function createAllComponentSchemas(\n recursiveRef?: TSchema\n): readonly TSchema[] {\n return STANDARD_COMPONENTS_REGISTRY.map((component) =>\n createComponentSchemaObject(component, recursiveRef)\n );\n}\n\n/**\n * Build all standard component schemas with per-container narrowed children.\n *\n * Resolves containers in dependency order so each container's children union\n * only references its allowedChildren. Plugin schemas are always included in\n * every container's children.\n *\n * @param selfRef - The Type.Recursive self-reference (used as fallback and for plugin children)\n * @param pluginSchemas - Plugin component schemas (always allowed in all containers)\n * @returns schemas array and a byName map for direct lookups\n */\nexport function createAllComponentSchemasNarrowed(\n selfRef: TSchema,\n pluginSchemas: TSchema[] = [],\n profile?: { renderer: DocxRendererId; requireDiscriminator: boolean }\n): { schemas: TSchema[]; byName: Map<string, TSchema> } {\n // A component whose `renderers` excludes this profile is not built at all,\n // so it is absent from the union *and* from every container's narrowed\n // children — `allowedChildren` maps through these maps and drops what it\n // cannot find, which keeps the two lists from disagreeing.\n const drawnHere = (comp: StandardComponentDefinition): boolean =>\n !profile || !comp.renderers || comp.renderers.includes(profile.renderer);\n\n // Phase 1: Build leaf (non-container) component schemas — no children\n // selfRef is passed so factories (e.g. table) can wire up recursive refs.\n const leafSchemas = new Map<string, TSchema>();\n for (const comp of STANDARD_COMPONENTS_REGISTRY) {\n if (!drawnHere(comp)) continue;\n if (!comp.hasChildren) {\n leafSchemas.set(\n comp.name,\n createComponentSchemaObject(comp, undefined, selfRef, profile)\n );\n }\n }\n\n // Phase 2: Resolve containers in dependency order\n const containers = STANDARD_COMPONENTS_REGISTRY.filter(\n (c) => c.hasChildren && drawnHere(c)\n );\n const resolved = new Map<string, TSchema>();\n const pending = [...containers];\n\n while (pending.length > 0) {\n const before = pending.length;\n for (let i = pending.length - 1; i >= 0; i--) {\n const comp = pending[i];\n\n if (!comp.allowedChildren) {\n // No allowedChildren declared — fallback to full recursive ref\n resolved.set(\n comp.name,\n createComponentSchemaObject(comp, selfRef, selfRef, profile)\n );\n pending.splice(i, 1);\n continue;\n }\n\n // Check if all container dependencies are resolved\n const containerDeps = comp.allowedChildren.filter((name) =>\n containers.some((c) => c.name === name)\n );\n if (!containerDeps.every((d) => resolved.has(d))) continue;\n\n // Build narrowed children union\n const childSchemas = comp.allowedChildren\n .map((name) => resolved.get(name) ?? leafSchemas.get(name))\n .filter((s): s is TSchema => s !== undefined);\n\n const allChildSchemas = [...childSchemas, ...pluginSchemas];\n const childrenType =\n allChildSchemas.length === 1\n ? allChildSchemas[0]\n : Type.Union(allChildSchemas);\n\n resolved.set(\n comp.name,\n createComponentSchemaObject(comp, childrenType, selfRef, profile)\n );\n pending.splice(i, 1);\n }\n\n if (pending.length === before) {\n throw new Error(\n `Circular allowedChildren among: ${pending.map((c) => c.name).join(', ')}`\n );\n }\n }\n\n // Combine: containers (resolved) + leaves\n const byName = new Map([...resolved, ...leafSchemas]);\n return { schemas: [...byName.values()], byName };\n}\n","/**\n * Report Component Schema\n */\n\nimport { Type, Static, TSchema } from '@sinclair/typebox';\nimport { FontRegistrySchema } from '@json-to-office/shared';\nimport { ComponentDefaultsSchema } from '../component-defaults';\nimport { NoProofWordsSchema } from '../font';\nimport { ThemeOverridesSchema } from '../theme';\n\n// Create a function to generate ReportPropsSchema with recursive component reference\nexport const createReportPropsSchema = (_componentRef?: TSchema) =>\n Type.Object(\n {\n theme: Type.Optional(\n Type.String({\n description: 'Theme name to apply (default: \"minimal\")',\n examples: ['minimal', 'corporate', 'modern'],\n default: 'minimal',\n })\n ),\n themeOverrides: Type.Optional(ThemeOverridesSchema),\n fontRegistry: Type.Optional(FontRegistrySchema),\n componentDefaults: Type.Optional(ComponentDefaultsSchema),\n language: Type.Optional(\n Type.String({\n pattern: '^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$',\n description:\n 'Default document language (BCP-47 tag, e.g. \"en-US\"). Sets Word\\'s default proofing/spell-check language; individual components can override it locally.',\n examples: ['en-US', 'fr-FR', 'de-DE', 'it-IT', 'es-ES'],\n })\n ),\n noProofWords: Type.Optional(NoProofWordsSchema),\n trackRevisions: Type.Optional(\n Type.Boolean({\n description:\n 'Open the document in track-changes mode: Word marks any further edits as revisions. Set automatically on redline documents produced by the diff engine',\n })\n ),\n metadata: Type.Optional(\n Type.Object(\n {\n title: Type.Optional(\n Type.String({\n description: 'Document title',\n examples: ['Annual Report 2024', 'Technical Documentation'],\n })\n ),\n subtitle: Type.Optional(\n Type.String({\n description: 'Document subtitle',\n })\n ),\n description: Type.Optional(Type.String()),\n author: Type.Optional(Type.String()),\n company: Type.Optional(\n Type.String({\n description:\n 'Company name, written to docProps/custom.xml (Word has no core-property slot for it)',\n })\n ),\n date: Type.Optional(\n Type.String({\n description:\n 'Document date used by {DATE}/{DATETIME} placeholders (defaults to the generation timestamp)',\n })\n ),\n version: Type.Optional(\n Type.String({\n description: 'Document version, written to docProps/custom.xml',\n examples: ['1.0', '2024.3'],\n })\n ),\n tags: Type.Optional(Type.Array(Type.String())),\n },\n {\n description:\n 'Document metadata (title, author, company, version, etc.). Package timestamps (dcterms:created/modified) are not part of this object: they come from the `generatedAt` generation option so repeated builds stay byte-identical.',\n additionalProperties: false,\n }\n )\n ),\n },\n {\n description: 'Report component props',\n additionalProperties: false,\n }\n );\n\nexport const ReportPropsSchema = createReportPropsSchema();\n\nexport type ReportProps = Static<typeof ReportPropsSchema>;\n","/**\n * Text Box Component Schema\n * A floating container that can hold child components (e.g., text, image, columns)\n *\n * Positioning API mirrors existing floating options from text/image for consistency.\n *\n * **Nested Columns Support:**\n * When a `columns` component is nested inside a `text-box`, it automatically renders\n * as a multi-column table instead of a section-level column layout. This allows\n * for columnar content within floating or inline containers.\n */\n\nimport { Type, Static } from '@sinclair/typebox';\nimport { FloatingPropertiesSchema } from './common';\nimport { HexColorSchema } from '../font';\n\nexport const TextBoxPropsSchema = Type.Object(\n {\n width: Type.Optional(\n Type.Union(\n [\n Type.Number({\n minimum: 1,\n description: 'Text box width in pixels',\n }),\n Type.String({\n pattern: '^\\\\d+(\\\\.\\\\d+)?%$',\n description:\n 'Text box width as percentage (e.g., \"50%\") relative to content width',\n }),\n ],\n {\n description:\n 'Text box width in pixels (number) or as percentage string (e.g., \"50%\")',\n }\n )\n ),\n height: Type.Optional(\n Type.Union(\n [\n Type.Number({\n minimum: 1,\n description: 'Text box height in pixels',\n }),\n Type.String({\n pattern: '^\\\\d+(\\\\.\\\\d+)?%$',\n description:\n 'Text box height as percentage (e.g., \"50%\") relative to content height',\n }),\n ],\n {\n description:\n 'Text box height in pixels (number) or as percentage string (e.g., \"50%\")',\n }\n )\n ),\n renderAs: Type.Optional(\n Type.Union([Type.Literal('table'), Type.Literal('shape')], {\n description:\n \"Rendering strategy. 'table' (default): borderless one-cell table — height auto-fits content, per-side borders and percentage widths resolve in Word. 'shape': native Word text box (WPS shape) — real wrap modes and z-order, but requires explicit width and height (no autofit), a single uniform border, and eagerly-resolved percentage sizes.\",\n })\n ),\n floating: Type.Optional(FloatingPropertiesSchema),\n style: Type.Optional(\n Type.Object(\n {\n padding: Type.Optional(\n Type.Object(\n {\n top: Type.Optional(Type.Number({ minimum: 0 })),\n right: Type.Optional(Type.Number({ minimum: 0 })),\n bottom: Type.Optional(Type.Number({ minimum: 0 })),\n left: Type.Optional(Type.Number({ minimum: 0 })),\n },\n { additionalProperties: false }\n )\n ),\n border: Type.Optional(\n Type.Object(\n {\n top: Type.Optional(\n // Reuse border schema semantics: style/width/color\n Type.Object(\n {\n style: Type.Optional(\n Type.Union([\n Type.Literal('solid'),\n Type.Literal('dashed'),\n Type.Literal('dotted'),\n Type.Literal('double'),\n Type.Literal('none'),\n ])\n ),\n width: Type.Optional(Type.Number({ minimum: 0 })),\n color: Type.Optional(HexColorSchema),\n },\n { additionalProperties: false }\n )\n ),\n right: Type.Optional(\n Type.Object(\n {\n style: Type.Optional(\n Type.Union([\n Type.Literal('solid'),\n Type.Literal('dashed'),\n Type.Literal('dotted'),\n Type.Literal('double'),\n Type.Literal('none'),\n ])\n ),\n width: Type.Optional(Type.Number({ minimum: 0 })),\n color: Type.Optional(HexColorSchema),\n },\n { additionalProperties: false }\n )\n ),\n bottom: Type.Optional(\n Type.Object(\n {\n style: Type.Optional(\n Type.Union([\n Type.Literal('solid'),\n Type.Literal('dashed'),\n Type.Literal('dotted'),\n Type.Literal('double'),\n Type.Literal('none'),\n ])\n ),\n width: Type.Optional(Type.Number({ minimum: 0 })),\n color: Type.Optional(HexColorSchema),\n },\n { additionalProperties: false }\n )\n ),\n left: Type.Optional(\n Type.Object(\n {\n style: Type.Optional(\n Type.Union([\n Type.Literal('solid'),\n Type.Literal('dashed'),\n Type.Literal('dotted'),\n Type.Literal('double'),\n Type.Literal('none'),\n ])\n ),\n width: Type.Optional(Type.Number({ minimum: 0 })),\n color: Type.Optional(HexColorSchema),\n },\n { additionalProperties: false }\n )\n ),\n },\n { additionalProperties: false }\n )\n ),\n shading: Type.Optional(\n Type.Object(\n {\n // Same domain as every other colour prop and as the border\n // colours above: resolveColor() accepts \"#RRGGBB\" or a theme\n // colour name, and throws on anything else at render time.\n fill: Type.Optional(HexColorSchema),\n },\n { additionalProperties: false }\n )\n ),\n },\n { additionalProperties: false }\n )\n ),\n },\n {\n additionalProperties: false,\n /**\n * The same two shape limits `collectTextBoxShapeConflicts` enforces, said\n * in JSON Schema so an editor can say it too.\n *\n * The deep validator only runs when a document is generated, so until now\n * an author learned that a shape needs a height by pressing Run. These are\n * plain cross-field rules, and `if`/`then` expresses them — which is what\n * Monaco checks the buffer against, so the editor underlines the mistake\n * while it is being made. The deep validator stays as the backstop: it\n * carries the remediation text, and it is what the API enforces for\n * callers who never see an editor.\n */\n allOf: [\n {\n if: {\n properties: { renderAs: { const: 'shape' } },\n required: ['renderAs'],\n },\n then: {\n required: ['width', 'height'],\n properties: {\n style: {\n properties: {\n border: {\n properties: Object.fromEntries(\n ['top', 'right', 'bottom', 'left'].map((side) => [\n side,\n { properties: { style: { enum: ['solid', 'none'] } } },\n ])\n ),\n },\n },\n },\n },\n },\n },\n ],\n }\n);\n\nexport type TextBoxProps = Static<typeof TextBoxPropsSchema>;\n","/**\n * Table of Contents Component Schema\n */\n\nimport { Type, Static } from '@sinclair/typebox';\n\n/**\n * Kept for back-compat only. Word's TOC field has no numbering switch, so the\n * renderer cannot apply this and logs a warning when it is set; entries inherit\n * the numbering of the heading styles they reference.\n */\nexport const TocStyleSchema = Type.Union(\n [Type.Literal('numeric'), Type.Literal('bullet'), Type.Literal('none')],\n {\n description:\n 'TOC numbering style — accepted but not applied (Word TOC fields carry no numbering switch); setting it logs a warning during generation',\n }\n);\n\nexport const TocScopeSchema = Type.Union(\n [Type.Literal('document'), Type.Literal('section')],\n { description: 'TOC scope: document-wide or section-only' }\n);\n\nexport const TocStyleMappingSchema = Type.Object(\n {\n styleId: Type.String({\n description: 'Custom style ID matching a key in theme.styles',\n }),\n level: Type.Number({\n minimum: 1,\n maximum: 6,\n description: 'TOC level (1-6) to assign to this style',\n }),\n },\n {\n description: 'Mapping of custom style to TOC level',\n additionalProperties: false,\n }\n);\n\nexport const TocDepthRangeSchema = Type.Object(\n {\n from: Type.Optional(\n Type.Number({\n minimum: 1,\n maximum: 6,\n default: 1,\n description:\n 'Starting heading level (1-6). Defaults to 1 if not specified.',\n })\n ),\n to: Type.Optional(\n Type.Number({\n minimum: 1,\n maximum: 6,\n default: 3,\n description:\n 'Ending heading level (1-6). Defaults to 3 if not specified.',\n })\n ),\n },\n {\n description:\n 'Range of heading levels to include in TOC. Specify at least one of \"from\" or \"to\".',\n additionalProperties: false,\n }\n);\n\nexport const TocPropsSchema = Type.Object(\n {\n pageBreak: Type.Optional(\n Type.Boolean({\n description: 'Insert page break before TOC block',\n })\n ),\n depth: Type.Optional(\n Type.Object(\n {\n from: Type.Optional(\n Type.Number({\n minimum: 1,\n maximum: 6,\n default: 1,\n description:\n 'Starting heading level (1-6). Defaults to 1 if not specified.',\n })\n ),\n to: Type.Optional(\n Type.Number({\n minimum: 1,\n maximum: 6,\n default: 3,\n description:\n 'Ending heading level (1-6). Defaults to 3 if not specified.',\n })\n ),\n },\n {\n description:\n 'Range of heading levels to include in TOC. Specify \"from\", \"to\", or both. Defaults: from=1, to=3',\n additionalProperties: false,\n default: { to: 3 },\n }\n )\n ),\n pageNumbersDepth: Type.Optional(\n Type.Object(\n {\n from: Type.Optional(\n Type.Number({\n minimum: 1,\n maximum: 6,\n default: 1,\n description:\n 'Starting heading level (1-6). Defaults to 1 if not specified.',\n })\n ),\n to: Type.Optional(\n Type.Number({\n minimum: 1,\n maximum: 6,\n default: 3,\n description:\n 'Ending heading level (1-6). Defaults to 3 if not specified.',\n })\n ),\n },\n {\n description:\n 'Range of heading levels to show page numbers. Specify \"from\", \"to\", or both. When specified, page numbers are hidden for entries outside this range.',\n additionalProperties: false,\n }\n )\n ),\n numberingStyle: Type.Optional(TocStyleSchema),\n title: Type.Optional(\n Type.String({\n description: 'TOC heading title',\n })\n ),\n includePageNumbers: Type.Optional(\n Type.Boolean({\n default: true,\n description: 'Show page numbers next to entries',\n })\n ),\n numberSeparator: Type.Optional(\n Type.Boolean({\n default: true,\n description:\n 'Use tab separator between entry and page number. True applies \"\\\\t\" (default), false applies \" \"',\n })\n ),\n scope: Type.Optional(\n Type.Union([TocScopeSchema, Type.Literal('auto')], {\n default: 'auto',\n description:\n 'TOC scope: \"document\" for entire document, \"section\" for parent section only, \"auto\" for automatic detection (section if inside section, otherwise document)',\n })\n ),\n styles: Type.Optional(\n Type.Array(TocStyleMappingSchema, {\n description:\n 'Custom style mappings for TOC entries. Maps custom theme styles to TOC levels.',\n })\n ),\n },\n {\n description: 'Table of Contents component props',\n additionalProperties: false,\n }\n);\n\nexport type TocProps = Static<typeof TocPropsSchema>;\n","/**\n * Divider Component Schema\n *\n * A horizontal divider: the thin line a brand system draws between sections.\n *\n * Word has no divider element — it draws one as a paragraph border (`w:pBdr`)\n * on an empty paragraph whose line box is collapsed so the paragraph costs no\n * more height than the line itself. That is degenerate text geometry, and\n * authoring it by hand is what `W_QUALITY_LINE_BOX_COLLAPSE` reports: the\n * observed route to a 3pt line was an 8pt paragraph with a 1pt exact line box,\n * which renders as a smear the moment anyone puts text in it. This component\n * owns that construction so nobody has to reach for it.\n *\n * Named `divider` rather than `rule`, the typographic term, because this\n * codebase already spends \"rule\" on the quality lint — `QualityRule`, rule\n * packs, rule ids — and on OOXML's own `lineRule`. Component libraries settle\n * on the same word for the same reason.\n */\n\nimport { Type, Static } from '@sinclair/typebox';\nimport { SpacingSchema } from './common';\nimport { HexColorSchema } from '../font';\n\nexport const DividerPropsSchema = Type.Object(\n {\n thickness: Type.Optional(\n Type.Number({\n minimum: 0.25,\n maximum: 12,\n description:\n 'Line weight in points (default 1). OOXML measures a border in eighths of a point and Word stops at 12pt, so this is the whole usable range.',\n })\n ),\n color: Type.Optional(HexColorSchema),\n style: Type.Optional(\n Type.Union(\n [\n Type.Literal('solid'),\n Type.Literal('dashed'),\n Type.Literal('dotted'),\n Type.Literal('double'),\n ],\n {\n description:\n 'Line style (default \"solid\"). `double` draws two lines and is measured per line, so it reads about twice as tall as its thickness.',\n }\n )\n ),\n width: Type.Optional(\n Type.Union(\n [\n Type.Number({\n minimum: 1,\n description: 'Divider width in points',\n }),\n Type.String({\n pattern: '^\\\\d+(\\\\.\\\\d+)?%$',\n description:\n 'Divider width as a percentage of the text measure (e.g. \"40%\")',\n }),\n ],\n {\n description:\n 'How far the line runs (default: the full text measure). A percentage or a point width is turned into paragraph indents, resolved against the theme page — so a partial divider inside a column or a re-margined section is measured against the page, while the default full-measure divider is exact everywhere.',\n }\n )\n ),\n alignment: Type.Optional(\n Type.Union(\n [Type.Literal('left'), Type.Literal('center'), Type.Literal('right')],\n {\n description:\n 'Which end of the measure a partial divider sits at (default \"left\"). Ignored at full width.',\n }\n )\n ),\n spacing: Type.Optional(SpacingSchema),\n },\n {\n description:\n 'Horizontal divider — a thin line across the measure, drawn as a Word paragraph border so it stays editable in Word.',\n additionalProperties: false,\n }\n);\n\nexport type DividerProps = Static<typeof DividerPropsSchema>;\n","/**\n * Highcharts Component Schema\n *\n * Standard component for rendering charts using Highcharts export server.\n */\n\nimport { Type, Static } from '@sinclair/typebox';\n\n/**\n * Highcharts component props schema\n * Accepts options that will be passed to Highcharts export server\n */\nexport const HighchartsPropsSchema = Type.Object({\n // Highcharts chart options - can be anything but must at least have chart.width and chart.height\n options: Type.Intersect([\n Type.Record(Type.String(), Type.Unknown()),\n Type.Object({\n chart: Type.Object({\n width: Type.Number(),\n height: Type.Number(),\n }),\n }),\n ]),\n // Optional scale factor for export\n scale: Type.Optional(Type.Number()),\n // Optional resources forwarded verbatim to the export server (CSS/JS/files).\n // Notably enables @font-face rules so charts render in custom fonts.\n resources: Type.Optional(\n Type.Object({\n css: Type.Optional(Type.String()),\n js: Type.Optional(Type.String()),\n files: Type.Optional(Type.Array(Type.String())),\n })\n ),\n // Optional Highcharts Export Server URL override\n serverUrl: Type.Optional(\n Type.String({\n description:\n 'Highcharts Export Server URL (default: http://localhost:7801)',\n })\n ),\n // Optional width for rendering (overrides chart width)\n width: Type.Optional(\n Type.Union(\n [\n Type.Number({\n minimum: 1,\n description: 'Image width in pixels',\n }),\n Type.String({\n pattern: '^\\\\d+(\\\\.\\\\d+)?%$',\n description:\n 'Image width as percentage (e.g., \"90%\") relative to content width',\n }),\n ],\n {\n description:\n 'Rendered image width in pixels (number) or as percentage string (e.g., \"90%\")',\n }\n )\n ),\n // Optional height for rendering (overrides chart height)\n height: Type.Optional(\n Type.Union(\n [\n Type.Number({\n minimum: 1,\n description: 'Image height in pixels',\n }),\n Type.String({\n pattern: '^\\\\d+(\\\\.\\\\d+)?%$',\n description:\n 'Image height as percentage (e.g., \"90%\") relative to content height',\n }),\n ],\n {\n description:\n 'Rendered image height in pixels (number) or as percentage string (e.g., \"90%\")',\n }\n )\n ),\n});\n\nexport type HighchartsProps = Static<typeof HighchartsPropsSchema>;\n","/**\n * Chart Component Schema (DOCX) — a native Word chart, drawn by `office-open`.\n *\n * The sibling of the pptx `chart` component, and deliberately spelled the same\n * way: `type`, `data`, `title`, `showLegend`, `chartColors` carry identical\n * names and shapes here, so an author who has charted a slide can chart a\n * document without relearning the vocabulary. What differs is placement, and\n * only placement — a slide chart is positioned with `x`/`y`/`w`/`h`, a document\n * chart flows, so it takes the `width`/`height`/`alignment`/`caption` props\n * `image` and `highcharts` already use. The slide coordinates are refused\n * rather than ignored, because a chart that silently lands somewhere other than\n * where it was told to is worse than one that fails.\n *\n * Distinct from `highcharts`, which is a PNG from an export server. This is a\n * real chart part: editable, vector, and reachable without a service.\n */\n\nimport { Type, Static } from '@sinclair/typebox';\nimport {\n AlignmentSchema,\n SpacingSchema,\n FloatingPropertiesSchema,\n} from './common';\n\n/**\n * The chart types v1 draws.\n *\n * `@office-open/core` reaches twelve; these are the ones the pptx `chart`\n * component also offers, so the two formats agree, plus `column` — which\n * PowerPoint spells as a bar with a vertical direction and Word spells as its\n * own type. `stock`, `surface`, `ofPie` and the 3-D variants are left out until\n * there is a counterpart to be consistent with.\n *\n * `bubble` is left out for a harder reason: `@office-open` spells a bubble\n * series as `xValues`/`yValues`/`bubbleSize` rather than categories and values,\n * and handing it the latter throws a TypeError from inside its own bundle.\n * There is also no unambiguous reading of a category label as a numeric x. The\n * pptx component refuses it by name for the same reason; here the type simply\n * does not exist, because `office-open` is the only renderer that draws a docx\n * chart at all.\n */\nconst ChartTypeSchema = Type.Union(\n [\n Type.Literal('area'),\n Type.Literal('bar'),\n Type.Literal('column'),\n Type.Literal('doughnut'),\n Type.Literal('line'),\n Type.Literal('pie'),\n Type.Literal('radar'),\n Type.Literal('scatter'),\n ],\n { description: 'Chart type' }\n);\n\n/**\n * One series.\n *\n * `labels` and `values` are needed on EVERY series, not just the first, and the\n * same rule and wording as the pptx component: a series missing either drops\n * the whole chart. They stay schema-optional because the compiler owns that\n * refusal and names the series that caused it.\n */\nconst ChartDataSeriesSchema = Type.Object(\n {\n name: Type.Optional(Type.String({ description: 'Series name' })),\n labels: Type.Optional(\n Type.Array(Type.String(), {\n description:\n 'Category labels. Needed on every series, not just the first, and the same length as `values`; a series without both `labels` and `values` drops the whole chart.',\n })\n ),\n values: Type.Optional(\n Type.Array(Type.Number(), {\n description:\n 'Data values, one per label. Needed on every series — see `labels`.',\n })\n ),\n },\n { additionalProperties: false }\n);\n\nexport const ChartPropsSchema = Type.Object(\n {\n type: ChartTypeSchema,\n data: Type.Array(ChartDataSeriesSchema, {\n description: 'Chart data series',\n minItems: 1,\n }),\n\n // Title\n title: Type.Optional(Type.String({ description: 'Chart title text' })),\n showTitle: Type.Optional(\n Type.Boolean({\n description:\n 'Show the chart title. Defaults to true when `title` is set.',\n })\n ),\n\n // Legend\n showLegend: Type.Optional(\n Type.Boolean({ description: 'Show chart legend' })\n ),\n legendPos: Type.Optional(\n Type.Union(\n [\n Type.Literal('b'),\n Type.Literal('l'),\n Type.Literal('r'),\n Type.Literal('t'),\n Type.Literal('tr'),\n ],\n { description: 'Legend position' }\n )\n ),\n\n // Series colors\n chartColors: Type.Optional(\n Type.Array(Type.String(), {\n description:\n 'Series colors (hex or semantic theme names). Defaults to the theme palette.',\n })\n ),\n\n // Axis titles\n catAxisTitle: Type.Optional(\n Type.String({ description: 'Category axis title' })\n ),\n valAxisTitle: Type.Optional(\n Type.String({ description: 'Value axis title' })\n ),\n\n // Flow placement — the same vocabulary as `image` and `highcharts`.\n width: Type.Optional(\n Type.Number({\n minimum: 0,\n exclusiveMinimum: 0,\n description: 'Chart width in inches. Defaults to the content width.',\n })\n ),\n height: Type.Optional(\n Type.Number({\n minimum: 0,\n exclusiveMinimum: 0,\n description: 'Chart height in inches. Defaults to 3.',\n })\n ),\n alignment: Type.Optional(AlignmentSchema),\n caption: Type.Optional(\n Type.String({\n description:\n 'Chart caption (supports rich text with **bold**, *italic*, ***both***)',\n })\n ),\n alt: Type.Optional(\n Type.String({ description: 'Alternative text for accessibility' })\n ),\n spacing: Type.Optional(SpacingSchema),\n floating: Type.Optional(FloatingPropertiesSchema),\n keepNext: Type.Optional(\n Type.Boolean({\n description: 'Keep paragraph with next paragraph on same page',\n })\n ),\n keepLines: Type.Optional(\n Type.Boolean({\n description: 'Keep all lines of paragraph together on same page',\n })\n ),\n },\n {\n description:\n 'Native Word chart - editable, scalable, no export server needed. Requires renderer \"office-open\".',\n additionalProperties: false,\n }\n);\n\nexport type ChartProps = Static<typeof ChartPropsSchema>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,SAAS,QAAAA,aAAqB;;;ACX9B,SAAS,YAA6B;AACtC,SAAS,0BA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