@json-to-office/shared-docx 1.2.0 → 1.4.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-BBFR3RRN.js → chunk-37G3V2NS.js} +3 -3
- package/dist/{chunk-TODYYVZ4.js → chunk-74WV6KFK.js} +2 -2
- package/dist/{chunk-OP5PCDNN.js → chunk-BCZ26ZVH.js} +2 -2
- package/dist/{chunk-NAZDY3PK.js → chunk-CBH763W5.js} +4 -4
- package/dist/{chunk-B4STXH5L.js → chunk-EGT7UWOS.js} +2 -2
- package/dist/{chunk-5KOKA5GY.js → chunk-KGQAQE4S.js} +9 -2
- package/dist/{chunk-5KOKA5GY.js.map → chunk-KGQAQE4S.js.map} +1 -1
- package/dist/{chunk-SOI64OJZ.js → chunk-NPI34OFV.js} +6 -6
- package/dist/{chunk-6B3LHADB.js → chunk-PZ6RN72D.js} +2 -2
- package/dist/chunk-PZ6RN72D.js.map +1 -0
- package/dist/{chunk-MYLVUQCN.js → chunk-RPVVIG43.js} +2 -2
- package/dist/{chunk-A2K66URO.js → chunk-YWLLE44T.js} +161 -24
- package/dist/chunk-YWLLE44T.js.map +1 -0
- package/dist/{chunk-VX2J2KWA.js → chunk-ZKBTTJN6.js} +17 -4
- package/dist/chunk-ZKBTTJN6.js.map +1 -0
- package/dist/{chunk-45I2NASU.js → chunk-ZKFPP7QB.js} +3 -3
- package/dist/index.d.ts +18 -5
- package/dist/index.js +15 -12
- package/dist/index.js.map +1 -1
- package/dist/schemas/api.js +7 -7
- package/dist/schemas/component-defaults.js +2 -2
- package/dist/schemas/component-registry.d.ts +9 -0
- package/dist/schemas/component-registry.js +5 -5
- package/dist/schemas/components.d.ts +88 -1
- package/dist/schemas/components.js +8 -6
- package/dist/schemas/document.js +8 -8
- package/dist/schemas/export.js +6 -6
- package/dist/schemas/generator.js +6 -6
- package/dist/schemas/renderer.js +2 -2
- package/dist/schemas/theme.d.ts +0 -3
- package/dist/schemas/theme.js +3 -3
- package/dist/validation/unified/index.js +8 -8
- package/package.json +5 -5
- package/dist/chunk-6B3LHADB.js.map +0 -1
- package/dist/chunk-A2K66URO.js.map +0 -1
- package/dist/chunk-VX2J2KWA.js.map +0 -1
- /package/dist/{chunk-BBFR3RRN.js.map → chunk-37G3V2NS.js.map} +0 -0
- /package/dist/{chunk-TODYYVZ4.js.map → chunk-74WV6KFK.js.map} +0 -0
- /package/dist/{chunk-OP5PCDNN.js.map → chunk-BCZ26ZVH.js.map} +0 -0
- /package/dist/{chunk-NAZDY3PK.js.map → chunk-CBH763W5.js.map} +0 -0
- /package/dist/{chunk-B4STXH5L.js.map → chunk-EGT7UWOS.js.map} +0 -0
- /package/dist/{chunk-SOI64OJZ.js.map → chunk-NPI34OFV.js.map} +0 -0
- /package/dist/{chunk-MYLVUQCN.js.map → chunk-RPVVIG43.js.map} +0 -0
- /package/dist/{chunk-45I2NASU.js.map → chunk-ZKFPP7QB.js.map} +0 -0
package/dist/schemas/api.js
CHANGED
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
GenerateDocumentResponseSchema,
|
|
4
4
|
ValidateDocumentRequestSchema,
|
|
5
5
|
ValidateDocumentResponseSchema
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-74WV6KFK.js";
|
|
7
|
+
import "../chunk-PZ6RN72D.js";
|
|
8
|
+
import "../chunk-YWLLE44T.js";
|
|
9
|
+
import "../chunk-KGQAQE4S.js";
|
|
10
|
+
import "../chunk-ZKFPP7QB.js";
|
|
11
|
+
import "../chunk-BCZ26ZVH.js";
|
|
12
|
+
import "../chunk-ZKBTTJN6.js";
|
|
13
13
|
import "../chunk-7TTAAYQ5.js";
|
|
14
14
|
export {
|
|
15
15
|
GenerateDocumentRequestSchema,
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
SectionComponentDefaultsSchema,
|
|
10
10
|
StatisticComponentDefaultsSchema,
|
|
11
11
|
TableComponentDefaultsSchema
|
|
12
|
-
} from "../chunk-
|
|
13
|
-
import "../chunk-
|
|
12
|
+
} from "../chunk-BCZ26ZVH.js";
|
|
13
|
+
import "../chunk-ZKBTTJN6.js";
|
|
14
14
|
import "../chunk-7TTAAYQ5.js";
|
|
15
15
|
export {
|
|
16
16
|
ColumnsComponentDefaultsSchema,
|
|
@@ -40,6 +40,15 @@ interface StandardComponentDefinition {
|
|
|
40
40
|
* available, used instead of the static `propsSchema`.
|
|
41
41
|
*/
|
|
42
42
|
createPropsSchema?: (recursiveRef: TSchema) => TSchema;
|
|
43
|
+
/**
|
|
44
|
+
* The renderers that can draw this component. Omitted means all of them.
|
|
45
|
+
*
|
|
46
|
+
* Only for a component whose backend gap is real, not a slice boundary: a
|
|
47
|
+
* component listed here disappears from the other renderers' schema branch
|
|
48
|
+
* entirely, so a schema-driven editor stops offering it rather than
|
|
49
|
+
* offering it and failing at render time.
|
|
50
|
+
*/
|
|
51
|
+
renderers?: readonly DocxRendererId[];
|
|
43
52
|
/** Component category for organization */
|
|
44
53
|
category: 'container' | 'content' | 'layout';
|
|
45
54
|
/** Human-readable description */
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
getContentComponents,
|
|
10
10
|
getStandardComponent,
|
|
11
11
|
isStandardComponent
|
|
12
|
-
} from "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
12
|
+
} from "../chunk-YWLLE44T.js";
|
|
13
|
+
import "../chunk-KGQAQE4S.js";
|
|
14
|
+
import "../chunk-ZKFPP7QB.js";
|
|
15
|
+
import "../chunk-BCZ26ZVH.js";
|
|
16
|
+
import "../chunk-ZKBTTJN6.js";
|
|
17
17
|
import "../chunk-7TTAAYQ5.js";
|
|
18
18
|
export {
|
|
19
19
|
STANDARD_COMPONENTS_REGISTRY,
|
|
@@ -56,6 +56,15 @@ declare const LineSpacingSchema: _sinclair_typebox.TObject<{
|
|
|
56
56
|
type: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"single">, _sinclair_typebox.TLiteral<"atLeast">, _sinclair_typebox.TLiteral<"exactly">, _sinclair_typebox.TLiteral<"double">, _sinclair_typebox.TLiteral<"multiple">]>;
|
|
57
57
|
value: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
58
58
|
}>;
|
|
59
|
+
/**
|
|
60
|
+
* List-level indentation, in POINTS.
|
|
61
|
+
*
|
|
62
|
+
* Points, unlike `ParagraphIndentSchema` next door, which is twips — the two
|
|
63
|
+
* have always disagreed and neither said so, which is how every bundled theme
|
|
64
|
+
* came to ship `indent: 3` meaning half an inch and getting three points: the
|
|
65
|
+
* marker landed outside the page margin, to the left of the body text it was
|
|
66
|
+
* supposed to label.
|
|
67
|
+
*/
|
|
59
68
|
declare const IndentSchema: _sinclair_typebox.TObject<{
|
|
60
69
|
left: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
61
70
|
hanging: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
@@ -3378,6 +3387,80 @@ declare const HighchartsPropsSchema: _sinclair_typebox.TObject<{
|
|
|
3378
3387
|
}>;
|
|
3379
3388
|
type HighchartsProps = Static<typeof HighchartsPropsSchema>;
|
|
3380
3389
|
|
|
3390
|
+
declare const ChartPropsSchema: _sinclair_typebox.TObject<{
|
|
3391
|
+
type: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"area">, _sinclair_typebox.TLiteral<"bar">, _sinclair_typebox.TLiteral<"column">, _sinclair_typebox.TLiteral<"doughnut">, _sinclair_typebox.TLiteral<"line">, _sinclair_typebox.TLiteral<"pie">, _sinclair_typebox.TLiteral<"radar">, _sinclair_typebox.TLiteral<"scatter">]>;
|
|
3392
|
+
data: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
3393
|
+
name: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
3394
|
+
labels: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TString>>;
|
|
3395
|
+
values: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TNumber>>;
|
|
3396
|
+
}>>;
|
|
3397
|
+
title: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
3398
|
+
showTitle: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
3399
|
+
showLegend: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
3400
|
+
legendPos: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"b">, _sinclair_typebox.TLiteral<"l">, _sinclair_typebox.TLiteral<"r">, _sinclair_typebox.TLiteral<"t">, _sinclair_typebox.TLiteral<"tr">]>>;
|
|
3401
|
+
chartColors: _sinclair_typebox.TOptional<_sinclair_typebox.TArray<_sinclair_typebox.TString>>;
|
|
3402
|
+
catAxisTitle: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
3403
|
+
valAxisTitle: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
3404
|
+
width: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
3405
|
+
height: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
3406
|
+
alignment: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">]>>;
|
|
3407
|
+
caption: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
3408
|
+
alt: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
3409
|
+
spacing: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
3410
|
+
/**
|
|
3411
|
+
* The chart types v1 draws.
|
|
3412
|
+
*
|
|
3413
|
+
* `@office-open/core` reaches twelve; these are the ones the pptx `chart`
|
|
3414
|
+
* component also offers, so the two formats agree, plus `column` — which
|
|
3415
|
+
* PowerPoint spells as a bar with a vertical direction and Word spells as its
|
|
3416
|
+
* own type. `stock`, `surface`, `ofPie` and the 3-D variants are left out until
|
|
3417
|
+
* there is a counterpart to be consistent with.
|
|
3418
|
+
*
|
|
3419
|
+
* `bubble` is left out for a harder reason: `@office-open` spells a bubble
|
|
3420
|
+
* series as `xValues`/`yValues`/`bubbleSize` rather than categories and values,
|
|
3421
|
+
* and handing it the latter throws a TypeError from inside its own bundle.
|
|
3422
|
+
* There is also no unambiguous reading of a category label as a numeric x. The
|
|
3423
|
+
* pptx component refuses it by name for the same reason; here the type simply
|
|
3424
|
+
* does not exist, because `office-open` is the only renderer that draws a docx
|
|
3425
|
+
* chart at all.
|
|
3426
|
+
*/
|
|
3427
|
+
before: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
3428
|
+
after: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
3429
|
+
}>>;
|
|
3430
|
+
floating: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
3431
|
+
horizontalPosition: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
3432
|
+
relative: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"character">, _sinclair_typebox.TLiteral<"column">, _sinclair_typebox.TLiteral<"margin">, _sinclair_typebox.TLiteral<"page">, _sinclair_typebox.TLiteral<"text">]>>;
|
|
3433
|
+
align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">, _sinclair_typebox.TLiteral<"inside">, _sinclair_typebox.TLiteral<"outside">]>>;
|
|
3434
|
+
offset: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
3435
|
+
}>>;
|
|
3436
|
+
verticalPosition: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
3437
|
+
relative: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"margin">, _sinclair_typebox.TLiteral<"page">, _sinclair_typebox.TLiteral<"paragraph">, _sinclair_typebox.TLiteral<"line">, _sinclair_typebox.TLiteral<"text">]>>;
|
|
3438
|
+
align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"bottom">, _sinclair_typebox.TLiteral<"inside">, _sinclair_typebox.TLiteral<"outside">]>>;
|
|
3439
|
+
offset: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
3440
|
+
}>>;
|
|
3441
|
+
wrap: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
3442
|
+
type: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"none">, _sinclair_typebox.TLiteral<"square">, _sinclair_typebox.TLiteral<"topAndBottom">, _sinclair_typebox.TLiteral<"around">, _sinclair_typebox.TLiteral<"tight">, _sinclair_typebox.TLiteral<"through">]>;
|
|
3443
|
+
side: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"bothSides">, _sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"right">, _sinclair_typebox.TLiteral<"largest">]>>;
|
|
3444
|
+
margins: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
3445
|
+
top: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
3446
|
+
bottom: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
3447
|
+
left: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
3448
|
+
right: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
3449
|
+
}>>;
|
|
3450
|
+
}>>;
|
|
3451
|
+
allowOverlap: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
3452
|
+
behindDocument: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
3453
|
+
lockAnchor: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
3454
|
+
layoutInCell: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
3455
|
+
zIndex: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
3456
|
+
rotation: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
3457
|
+
visibility: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"hidden">, _sinclair_typebox.TLiteral<"inherit">]>>;
|
|
3458
|
+
}>>;
|
|
3459
|
+
keepNext: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
3460
|
+
keepLines: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
3461
|
+
}>;
|
|
3462
|
+
type ChartProps = Static<typeof ChartPropsSchema>;
|
|
3463
|
+
|
|
3381
3464
|
/**
|
|
3382
3465
|
* A colour anywhere inside a native visual.
|
|
3383
3466
|
*
|
|
@@ -4190,6 +4273,7 @@ declare const VisualRasterPropsSchema: _sinclair_typebox.TObject<{
|
|
|
4190
4273
|
color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
4191
4274
|
align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">]>>;
|
|
4192
4275
|
valign: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"middle">, _sinclair_typebox.TLiteral<"bottom">]>>;
|
|
4276
|
+
headerRow: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
4193
4277
|
autoPage: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
4194
4278
|
autoPageRepeatHeader: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
4195
4279
|
margin: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TArray<_sinclair_typebox.TNumber>]>>;
|
|
@@ -4234,6 +4318,7 @@ declare const VisualRasterPropsSchema: _sinclair_typebox.TObject<{
|
|
|
4234
4318
|
color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
4235
4319
|
align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">]>>;
|
|
4236
4320
|
valign: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"middle">, _sinclair_typebox.TLiteral<"bottom">]>>;
|
|
4321
|
+
headerRow: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
4237
4322
|
autoPage: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
4238
4323
|
autoPageRepeatHeader: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
4239
4324
|
margin: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TArray<_sinclair_typebox.TNumber>]>>;
|
|
@@ -5129,6 +5214,7 @@ declare const VisualPropsSchema: _sinclair_typebox.TUnion<[_sinclair_typebox.TOb
|
|
|
5129
5214
|
color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
5130
5215
|
align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">]>>;
|
|
5131
5216
|
valign: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"middle">, _sinclair_typebox.TLiteral<"bottom">]>>;
|
|
5217
|
+
headerRow: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
5132
5218
|
autoPage: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
5133
5219
|
autoPageRepeatHeader: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
5134
5220
|
margin: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TArray<_sinclair_typebox.TNumber>]>>;
|
|
@@ -5173,6 +5259,7 @@ declare const VisualPropsSchema: _sinclair_typebox.TUnion<[_sinclair_typebox.TOb
|
|
|
5173
5259
|
color: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
5174
5260
|
align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">]>>;
|
|
5175
5261
|
valign: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"top">, _sinclair_typebox.TLiteral<"middle">, _sinclair_typebox.TLiteral<"bottom">]>>;
|
|
5262
|
+
headerRow: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
5176
5263
|
autoPage: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
5177
5264
|
autoPageRepeatHeader: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
5178
5265
|
margin: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TArray<_sinclair_typebox.TNumber>]>>;
|
|
@@ -5833,4 +5920,4 @@ declare const StandardComponentDefinitionSchema: _sinclair_typebox.TUnion<_sincl
|
|
|
5833
5920
|
declare const ComponentDefinitionSchema: _sinclair_typebox.TRecursive<_sinclair_typebox.TUnion<_sinclair_typebox.TSchema[]>>;
|
|
5834
5921
|
type ComponentDefinition = Static<typeof ComponentDefinitionSchema>;
|
|
5835
5922
|
|
|
5836
|
-
export { type Alignment, AlignmentSchema, BaseComponentFields, type BaseComponentProps, BaseComponentPropsSchema, type Border, BorderSchema, type ColumnsProps, ColumnsPropsSchema, type Comment, type CommentReply, CommentReplySchema, CommentSchema, type ComponentDefinition, ComponentDefinitionSchema, EndnotesSchema, type FloatingProperties, FloatingPropertiesSchema, FootnotesSchema, type HeadingLevel, HeadingLevelSchema, type HeadingProps, HeadingPropsSchema, type HighchartsProps, HighchartsPropsSchema, type HorizontalPositionAlign, HorizontalPositionAlignSchema, type HorizontalPositionRelativeFrom, HorizontalPositionRelativeFromSchema, type ImageProps, ImagePropsSchema, type Indent, IndentSchema, type JustifiedAlignment, JustifiedAlignmentSchema, type LevelFormat, LevelFormatSchema, type LineSpacing, LineSpacingSchema, type ListLevelProps, ListLevelPropsSchema, type ListMarkerFont, ListMarkerFontSchema, type ListProps, ListPropsSchema, type ListSpacing, ListSpacingSchema, type Margins, MarginsSchema, NATIVE_RENDER_MODE, NATIVE_VISUAL_ELEMENT_NAMES, NativeVisualAlignmentSchema, type NativeVisualCanvas, NativeVisualCanvasSchema, NativeVisualColorSchema, type NativeVisualElement, type NativeVisualElementName, NativeVisualElementSchema, NativeVisualExtentSchema, type NativeVisualFill, NativeVisualFillSchema, type NativeVisualImageProps, NativeVisualImagePropsSchema, type NativeVisualLine, NativeVisualLineSchema, NativeVisualMarginSchema, NativeVisualOffsetSchema, type NativeVisualShapeProps, NativeVisualShapePropsSchema, type NativeVisualTextProps, NativeVisualTextPropsSchema, type NativeVisualTextRun, NativeVisualTextRunSchema, type NativeVisualTextSegment, NativeVisualTextSegmentSchema, NativeVisualUnderlineSchema, NativeVisualVerticalAlignmentSchema, type Note, NoteSchema, type Numbering, NumberingSchema, type ParagraphIndent, ParagraphIndentSchema, type ParagraphProps, ParagraphPropsSchema, type ReportProps, ReportPropsSchema, type Revision, type RevisionMark, RevisionMarkSchema, RevisionSchema, type RevisionSegment, RevisionSegmentSchema, type SectionProps, SectionPropsSchema, type Spacing, SpacingSchema, StandardComponentDefinitionSchema, type StatisticProps, StatisticPropsSchema, type TabStop, type TabStopLeader, TabStopLeaderSchema, TabStopSchema, type TabStopType, TabStopTypeSchema, type TabStops, TabStopsSchema, type TableProps, TablePropsSchema, type TextBoxProps, TextBoxPropsSchema, type TextWrappingSide, TextWrappingSideSchema, type TextWrappingType, TextWrappingTypeSchema, TocDepthRangeSchema, type TocProps, TocPropsSchema, TocScopeSchema, TocStyleMappingSchema, TocStyleSchema, type VerticalPositionAlign, VerticalPositionAlignSchema, type VerticalPositionRelativeFrom, VerticalPositionRelativeFromSchema, type VisualCanvas, VisualCanvasBackgroundSchema, VisualCanvasSchema, type VisualNativeProps, VisualNativePropsSchema, type VisualProps, VisualPropsSchema, type VisualRasterProps, VisualRasterPropsSchema, createReportPropsSchema, createSectionPropsSchema, createTablePropsSchema, isNativeVisualProps };
|
|
5923
|
+
export { type Alignment, AlignmentSchema, BaseComponentFields, type BaseComponentProps, BaseComponentPropsSchema, type Border, BorderSchema, type ChartProps, ChartPropsSchema, type ColumnsProps, ColumnsPropsSchema, type Comment, type CommentReply, CommentReplySchema, CommentSchema, type ComponentDefinition, ComponentDefinitionSchema, EndnotesSchema, type FloatingProperties, FloatingPropertiesSchema, FootnotesSchema, type HeadingLevel, HeadingLevelSchema, type HeadingProps, HeadingPropsSchema, type HighchartsProps, HighchartsPropsSchema, type HorizontalPositionAlign, HorizontalPositionAlignSchema, type HorizontalPositionRelativeFrom, HorizontalPositionRelativeFromSchema, type ImageProps, ImagePropsSchema, type Indent, IndentSchema, type JustifiedAlignment, JustifiedAlignmentSchema, type LevelFormat, LevelFormatSchema, type LineSpacing, LineSpacingSchema, type ListLevelProps, ListLevelPropsSchema, type ListMarkerFont, ListMarkerFontSchema, type ListProps, ListPropsSchema, type ListSpacing, ListSpacingSchema, type Margins, MarginsSchema, NATIVE_RENDER_MODE, NATIVE_VISUAL_ELEMENT_NAMES, NativeVisualAlignmentSchema, type NativeVisualCanvas, NativeVisualCanvasSchema, NativeVisualColorSchema, type NativeVisualElement, type NativeVisualElementName, NativeVisualElementSchema, NativeVisualExtentSchema, type NativeVisualFill, NativeVisualFillSchema, type NativeVisualImageProps, NativeVisualImagePropsSchema, type NativeVisualLine, NativeVisualLineSchema, NativeVisualMarginSchema, NativeVisualOffsetSchema, type NativeVisualShapeProps, NativeVisualShapePropsSchema, type NativeVisualTextProps, NativeVisualTextPropsSchema, type NativeVisualTextRun, NativeVisualTextRunSchema, type NativeVisualTextSegment, NativeVisualTextSegmentSchema, NativeVisualUnderlineSchema, NativeVisualVerticalAlignmentSchema, type Note, NoteSchema, type Numbering, NumberingSchema, type ParagraphIndent, ParagraphIndentSchema, type ParagraphProps, ParagraphPropsSchema, type ReportProps, ReportPropsSchema, type Revision, type RevisionMark, RevisionMarkSchema, RevisionSchema, type RevisionSegment, RevisionSegmentSchema, type SectionProps, SectionPropsSchema, type Spacing, SpacingSchema, StandardComponentDefinitionSchema, type StatisticProps, StatisticPropsSchema, type TabStop, type TabStopLeader, TabStopLeaderSchema, TabStopSchema, type TabStopType, TabStopTypeSchema, type TabStops, TabStopsSchema, type TableProps, TablePropsSchema, type TextBoxProps, TextBoxPropsSchema, type TextWrappingSide, TextWrappingSideSchema, type TextWrappingType, TextWrappingTypeSchema, TocDepthRangeSchema, type TocProps, TocPropsSchema, TocScopeSchema, TocStyleMappingSchema, TocStyleSchema, type VerticalPositionAlign, VerticalPositionAlignSchema, type VerticalPositionRelativeFrom, VerticalPositionRelativeFromSchema, type VisualCanvas, VisualCanvasBackgroundSchema, VisualCanvasSchema, type VisualNativeProps, VisualNativePropsSchema, type VisualProps, VisualPropsSchema, type VisualRasterProps, VisualRasterPropsSchema, createReportPropsSchema, createSectionPropsSchema, createTablePropsSchema, isNativeVisualProps };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ComponentDefinitionSchema,
|
|
3
3
|
StandardComponentDefinitionSchema
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-PZ6RN72D.js";
|
|
5
5
|
import {
|
|
6
|
+
ChartPropsSchema,
|
|
6
7
|
HighchartsPropsSchema,
|
|
7
8
|
ReportPropsSchema,
|
|
8
9
|
TextBoxPropsSchema,
|
|
@@ -12,7 +13,7 @@ import {
|
|
|
12
13
|
TocStyleMappingSchema,
|
|
13
14
|
TocStyleSchema,
|
|
14
15
|
createReportPropsSchema
|
|
15
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-YWLLE44T.js";
|
|
16
17
|
import {
|
|
17
18
|
NATIVE_RENDER_MODE,
|
|
18
19
|
NATIVE_VISUAL_ELEMENT_NAMES,
|
|
@@ -38,8 +39,8 @@ import {
|
|
|
38
39
|
VisualPropsSchema,
|
|
39
40
|
VisualRasterPropsSchema,
|
|
40
41
|
isNativeVisualProps
|
|
41
|
-
} from "../chunk-
|
|
42
|
-
import "../chunk-
|
|
42
|
+
} from "../chunk-KGQAQE4S.js";
|
|
43
|
+
import "../chunk-ZKFPP7QB.js";
|
|
43
44
|
import {
|
|
44
45
|
ColumnsPropsSchema,
|
|
45
46
|
CommentReplySchema,
|
|
@@ -62,7 +63,7 @@ import {
|
|
|
62
63
|
TablePropsSchema,
|
|
63
64
|
createSectionPropsSchema,
|
|
64
65
|
createTablePropsSchema
|
|
65
|
-
} from "../chunk-
|
|
66
|
+
} from "../chunk-BCZ26ZVH.js";
|
|
66
67
|
import {
|
|
67
68
|
AlignmentSchema,
|
|
68
69
|
BaseComponentFields,
|
|
@@ -88,13 +89,14 @@ import {
|
|
|
88
89
|
TextWrappingTypeSchema,
|
|
89
90
|
VerticalPositionAlignSchema,
|
|
90
91
|
VerticalPositionRelativeFromSchema
|
|
91
|
-
} from "../chunk-
|
|
92
|
+
} from "../chunk-ZKBTTJN6.js";
|
|
92
93
|
import "../chunk-7TTAAYQ5.js";
|
|
93
94
|
export {
|
|
94
95
|
AlignmentSchema,
|
|
95
96
|
BaseComponentFields,
|
|
96
97
|
BaseComponentPropsSchema,
|
|
97
98
|
BorderSchema,
|
|
99
|
+
ChartPropsSchema,
|
|
98
100
|
ColumnsPropsSchema,
|
|
99
101
|
CommentReplySchema,
|
|
100
102
|
CommentSchema,
|
package/dist/schemas/document.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
JSON_SCHEMA_URLS,
|
|
3
3
|
JsonComponentDefinitionSchema
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-RPVVIG43.js";
|
|
5
5
|
import {
|
|
6
6
|
validateDocumentWithSchema,
|
|
7
7
|
validateJsonComponent
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
} from "../chunk-CBH763W5.js";
|
|
9
|
+
import "../chunk-PZ6RN72D.js";
|
|
10
10
|
import "../chunk-7GGTZ4TA.js";
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-YWLLE44T.js";
|
|
12
|
+
import "../chunk-KGQAQE4S.js";
|
|
13
|
+
import "../chunk-ZKFPP7QB.js";
|
|
14
|
+
import "../chunk-BCZ26ZVH.js";
|
|
15
|
+
import "../chunk-ZKBTTJN6.js";
|
|
16
16
|
import "../chunk-7TTAAYQ5.js";
|
|
17
17
|
export {
|
|
18
18
|
JSON_SCHEMA_URLS,
|
package/dist/schemas/export.js
CHANGED
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
createComponentSchema,
|
|
7
7
|
exportSchemaToFile,
|
|
8
8
|
fixSchemaReferences
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
9
|
+
} from "../chunk-EGT7UWOS.js";
|
|
10
|
+
import "../chunk-YWLLE44T.js";
|
|
11
|
+
import "../chunk-KGQAQE4S.js";
|
|
12
|
+
import "../chunk-ZKFPP7QB.js";
|
|
13
|
+
import "../chunk-BCZ26ZVH.js";
|
|
14
|
+
import "../chunk-ZKBTTJN6.js";
|
|
15
15
|
import "../chunk-7TTAAYQ5.js";
|
|
16
16
|
export {
|
|
17
17
|
BASE_SCHEMA_METADATA,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generateUnifiedDocumentSchema
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-37G3V2NS.js";
|
|
4
|
+
import "../chunk-YWLLE44T.js";
|
|
5
|
+
import "../chunk-KGQAQE4S.js";
|
|
6
|
+
import "../chunk-ZKFPP7QB.js";
|
|
7
|
+
import "../chunk-BCZ26ZVH.js";
|
|
8
|
+
import "../chunk-ZKBTTJN6.js";
|
|
9
9
|
import "../chunk-7TTAAYQ5.js";
|
|
10
10
|
export {
|
|
11
11
|
generateUnifiedDocumentSchema
|
package/dist/schemas/renderer.js
CHANGED
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
collectDocxRendererErrors,
|
|
5
5
|
docxComponentDefinitionName,
|
|
6
6
|
docxPropsSchemaForRenderer
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-KGQAQE4S.js";
|
|
8
|
+
import "../chunk-ZKBTTJN6.js";
|
|
9
9
|
import "../chunk-7TTAAYQ5.js";
|
|
10
10
|
export {
|
|
11
11
|
DEFAULT_DOCX_RENDERER_ID,
|
package/dist/schemas/theme.d.ts
CHANGED
|
@@ -3670,9 +3670,6 @@ declare const ThemeConfigSchema: _sinclair_typebox.TObject<{
|
|
|
3670
3670
|
floating: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
3671
3671
|
horizontalPosition: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
3672
3672
|
relative: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"character">, _sinclair_typebox.TLiteral<"column">, _sinclair_typebox.TLiteral<"margin">, _sinclair_typebox.TLiteral<"page">, _sinclair_typebox.TLiteral<"text">]>>;
|
|
3673
|
-
/**
|
|
3674
|
-
* Tab stop definition schema
|
|
3675
|
-
*/
|
|
3676
3673
|
align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">, _sinclair_typebox.TLiteral<"inside">, _sinclair_typebox.TLiteral<"outside">]>>;
|
|
3677
3674
|
offset: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString]>>;
|
|
3678
3675
|
}>>;
|
package/dist/schemas/theme.js
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
ThemeOverridesSchema,
|
|
11
11
|
createMinimalTheme,
|
|
12
12
|
isValidThemeConfig
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-ZKFPP7QB.js";
|
|
14
14
|
import {
|
|
15
15
|
ColumnsComponentDefaultsSchema,
|
|
16
16
|
ComponentDefaultsSchema,
|
|
@@ -21,8 +21,8 @@ import {
|
|
|
21
21
|
SectionComponentDefaultsSchema,
|
|
22
22
|
StatisticComponentDefaultsSchema,
|
|
23
23
|
TableComponentDefaultsSchema
|
|
24
|
-
} from "../chunk-
|
|
25
|
-
import "../chunk-
|
|
24
|
+
} from "../chunk-BCZ26ZVH.js";
|
|
25
|
+
import "../chunk-ZKBTTJN6.js";
|
|
26
26
|
import "../chunk-7TTAAYQ5.js";
|
|
27
27
|
export {
|
|
28
28
|
ColumnsComponentDefaultsSchema,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
validateTheme,
|
|
48
48
|
validateThemeJson,
|
|
49
49
|
validateThemeWithEnhancement
|
|
50
|
-
} from "../../chunk-
|
|
50
|
+
} from "../../chunk-NPI34OFV.js";
|
|
51
51
|
import {
|
|
52
52
|
collectIndentConflicts,
|
|
53
53
|
collectNoteRevisionConflicts,
|
|
@@ -72,14 +72,14 @@ import {
|
|
|
72
72
|
validateJsonComponent,
|
|
73
73
|
validateJsonDocument,
|
|
74
74
|
validateWithEnhancement
|
|
75
|
-
} from "../../chunk-
|
|
76
|
-
import "../../chunk-
|
|
75
|
+
} from "../../chunk-CBH763W5.js";
|
|
76
|
+
import "../../chunk-PZ6RN72D.js";
|
|
77
77
|
import "../../chunk-7GGTZ4TA.js";
|
|
78
|
-
import "../../chunk-
|
|
79
|
-
import "../../chunk-
|
|
80
|
-
import "../../chunk-
|
|
81
|
-
import "../../chunk-
|
|
82
|
-
import "../../chunk-
|
|
78
|
+
import "../../chunk-YWLLE44T.js";
|
|
79
|
+
import "../../chunk-KGQAQE4S.js";
|
|
80
|
+
import "../../chunk-ZKFPP7QB.js";
|
|
81
|
+
import "../../chunk-BCZ26ZVH.js";
|
|
82
|
+
import "../../chunk-ZKBTTJN6.js";
|
|
83
83
|
import "../../chunk-7TTAAYQ5.js";
|
|
84
84
|
export {
|
|
85
85
|
DEFAULT_ERROR_CONFIG,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@json-to-office/shared-docx",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "DOCX-specific schemas, component registry and validation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@sinclair/typebox": "0.34.38",
|
|
32
32
|
"docx": "9.7.1",
|
|
33
|
-
"@json-to-office/shared": "^1.
|
|
33
|
+
"@json-to-office/shared": "^1.4.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/node": "20.11.0",
|
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
"build": "tsup",
|
|
71
71
|
"dev": "tsup --watch",
|
|
72
72
|
"clean": "rm -rf dist",
|
|
73
|
-
"lint": "eslint src
|
|
74
|
-
"lint:fix": "eslint src
|
|
75
|
-
"format": "prettier --write src/**/*.ts",
|
|
73
|
+
"lint": "eslint src --ext .ts",
|
|
74
|
+
"lint:fix": "eslint src --ext .ts --fix",
|
|
75
|
+
"format": "prettier --write \"src/**/*.ts\"",
|
|
76
76
|
"typecheck": "tsc --noEmit",
|
|
77
77
|
"test": "vitest run --passWithNoTests",
|
|
78
78
|
"test:watch": "vitest",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/schemas/components.ts"],"sourcesContent":["/**\n * TypeBox Component Schemas\n *\n * Complete component definitions with discriminated unions for perfect\n * JSON schema autocompletion and validation.\n *\n * IMPORTANT: Standard components are defined in component-registry.ts (SINGLE SOURCE OF TRUTH).\n * This file uses that registry to generate TypeBox schemas.\n */\n\nimport { Type, Static } from '@sinclair/typebox';\nimport {\n createAllComponentSchemas,\n createAllComponentSchemasNarrowed,\n} from './component-registry';\n\n// Re-export all schemas from individual component files\nexport * from './components/common';\nexport * from './components/revision';\nexport * from './components/comment';\nexport * from './components/note';\nexport * from './components/report';\nexport * from './components/section';\nexport * from './components/columns';\nexport * from './components/heading';\nexport * from './components/paragraph';\nexport * from './components/image';\nexport * from './components/highcharts';\nexport * from './components/visual';\nexport * from './components/statistic';\nexport * from './components/table';\nexport * from './components/list';\nexport * from './components/toc';\nexport * from './components/text-box';\n\n// ============================================================================\n// Component Definitions with Discriminated Union\n// ============================================================================\n\n// StandardComponentDefinitionSchema - Union of all standard component types\n// Generated from the component registry (SINGLE SOURCE OF TRUTH)\nexport const StandardComponentDefinitionSchema = Type.Union(\n // Use Type.Any() for non-recursive standard components\n // Convert readonly array to mutable array for Type.Union\n [...createAllComponentSchemas(Type.Any())],\n {\n discriminator: { propertyName: 'name' },\n description: 'Standard component definition with discriminated union',\n }\n);\n\nexport const ComponentDefinitionSchema = Type.Recursive((This) =>\n Type.Union(\n [\n // Standard components from registry with per-container narrowed children\n ...createAllComponentSchemasNarrowed(This).schemas,\n ],\n {\n discriminator: { propertyName: 'name' },\n description: 'Component definition with discriminated union',\n }\n )\n);\n\n// ============================================================================\n// TypeScript Types\n// ============================================================================\n\nexport type ComponentDefinition = Static<typeof ComponentDefinitionSchema>;\n"],"mappings":";;;;;;AAUA,SAAS,YAAoB;AA+BtB,IAAM,oCAAoC,KAAK;AAAA;AAAA;AAAA,EAGpD,CAAC,GAAG,0BAA0B,KAAK,IAAI,CAAC,CAAC;AAAA,EACzC;AAAA,IACE,eAAe,EAAE,cAAc,OAAO;AAAA,IACtC,aAAa;AAAA,EACf;AACF;AAEO,IAAM,4BAA4B,KAAK;AAAA,EAAU,CAAC,SACvD,KAAK;AAAA,IACH;AAAA;AAAA,MAEE,GAAG,kCAAkC,IAAI,EAAE;AAAA,IAC7C;AAAA,IACA;AAAA,MACE,eAAe,EAAE,cAAc,OAAO;AAAA,MACtC,aAAa;AAAA,IACf;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
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/highcharts.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 { HighchartsPropsSchema } from './components/highcharts';\nimport { VisualPropsSchema } from './components/visual';\nimport {\n DOCX_RENDERER_IDS,\n docxPropsSchemaForRenderer,\n type DocxRendererId,\n} from './renderer';\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 /** 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 hasChildren: true,\n allowedChildren: [\n 'heading',\n 'paragraph',\n 'image',\n 'statistic',\n 'table',\n 'list',\n 'toc',\n 'highcharts',\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 'highcharts',\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'],\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.',\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 hasChildren: false,\n category: 'content',\n description:\n 'Data table - displays tabular data with headers. Supports formatting and alignment.',\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: '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: '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 // 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 (!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((c) => c.hasChildren);\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 * 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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,SAAS,QAAAA,aAAqB;;;ACX9B,SAAS,YAA6B;AACtC,SAAS,0BAA0B;AAM5B,IAAM,0BAA0B,CAAC,kBACtC,KAAK;AAAA,EACH;AAAA,IACE,OAAO,KAAK;AAAA,MACV,KAAK,OAAO;AAAA,QACV,aAAa;AAAA,QACb,UAAU,CAAC,WAAW,aAAa,QAAQ;AAAA,QAC3C,SAAS;AAAA,MACX,CAAC;AAAA,IACH;AAAA,IACA,gBAAgB,KAAK,SAAS,oBAAoB;AAAA,IAClD,cAAc,KAAK,SAAS,kBAAkB;AAAA,IAC9C,mBAAmB,KAAK,SAAS,uBAAuB;AAAA,IACxD,UAAU,KAAK;AAAA,MACb,KAAK,OAAO;AAAA,QACV,SAAS;AAAA,QACT,aACE;AAAA,QACF,UAAU,CAAC,SAAS,SAAS,SAAS,SAAS,OAAO;AAAA,MACxD,CAAC;AAAA,IACH;AAA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