@json-to-office/shared-docx 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/{chunk-6SLVQATI.js → chunk-3AJ5NHUF.js} +2 -2
  2. package/dist/{chunk-YQECZGRR.js → chunk-7PK36JXG.js} +2 -2
  3. package/dist/chunk-F5IGGVWN.js +1339 -0
  4. package/dist/chunk-F5IGGVWN.js.map +1 -0
  5. package/dist/{chunk-V4L4S6ZS.js → chunk-JYGWHRMY.js} +2 -2
  6. package/dist/{chunk-L5TZFC47.js → chunk-M4OD7UER.js} +4 -42
  7. package/dist/chunk-M4OD7UER.js.map +1 -0
  8. package/dist/{chunk-22VYYAC2.js → chunk-MQ7KNRW2.js} +6 -4
  9. package/dist/{chunk-22VYYAC2.js.map → chunk-MQ7KNRW2.js.map} +1 -1
  10. package/dist/{chunk-OE5JFL7S.js → chunk-QEDASPGD.js} +8 -6
  11. package/dist/{chunk-OE5JFL7S.js.map → chunk-QEDASPGD.js.map} +1 -1
  12. package/dist/{chunk-SK6LSPFN.js → chunk-RFNU2AYT.js} +2 -2
  13. package/dist/chunk-S5KMAUDZ.js +645 -0
  14. package/dist/chunk-S5KMAUDZ.js.map +1 -0
  15. package/dist/{chunk-ABVYMFDA.js → chunk-VQXTI6WF.js} +2 -2
  16. package/dist/index.d.ts +220 -1
  17. package/dist/index.js +16 -14
  18. package/dist/index.js.map +1 -1
  19. package/dist/schemas/api.js +4 -3
  20. package/dist/schemas/component-defaults.d.ts +448 -0
  21. package/dist/schemas/component-defaults.js +24 -0
  22. package/dist/schemas/component-defaults.js.map +1 -0
  23. package/dist/schemas/component-registry.js +2 -1
  24. package/dist/schemas/components.d.ts +436 -0
  25. package/dist/schemas/components.js +13 -11
  26. package/dist/schemas/document.js +5 -4
  27. package/dist/schemas/export.js +3 -2
  28. package/dist/schemas/generator.js +3 -2
  29. package/dist/schemas/theme.d.ts +4 -444
  30. package/dist/schemas/theme.js +12 -12
  31. package/dist/validation/unified/index.d.ts +223 -0
  32. package/dist/validation/unified/index.js +6 -5
  33. package/package.json +2 -2
  34. package/dist/chunk-L5TZFC47.js.map +0 -1
  35. package/dist/chunk-PN6JT3KF.js +0 -1926
  36. package/dist/chunk-PN6JT3KF.js.map +0 -1
  37. /package/dist/{chunk-6SLVQATI.js.map → chunk-3AJ5NHUF.js.map} +0 -0
  38. /package/dist/{chunk-YQECZGRR.js.map → chunk-7PK36JXG.js.map} +0 -0
  39. /package/dist/{chunk-V4L4S6ZS.js.map → chunk-JYGWHRMY.js.map} +0 -0
  40. /package/dist/{chunk-SK6LSPFN.js.map → chunk-RFNU2AYT.js.map} +0 -0
  41. /package/dist/{chunk-ABVYMFDA.js.map → chunk-VQXTI6WF.js.map} +0 -0
@@ -0,0 +1,1339 @@
1
+ import {
2
+ FontDefinitionSchema,
3
+ HexColorOrTransparentSchema,
4
+ HexColorSchema
5
+ } from "./chunk-JOXJOD2C.js";
6
+
7
+ // src/schemas/component-defaults.ts
8
+ import { Type as Type10 } from "@sinclair/typebox";
9
+
10
+ // src/schemas/components/heading.ts
11
+ import { Type as Type2 } from "@sinclair/typebox";
12
+
13
+ // src/schemas/components/common.ts
14
+ import { Type } from "@sinclair/typebox";
15
+ var AlignmentSchema = Type.Union(
16
+ [Type.Literal("left"), Type.Literal("center"), Type.Literal("right")],
17
+ { description: "Text alignment options" }
18
+ );
19
+ var JustifiedAlignmentSchema = Type.Union(
20
+ [
21
+ Type.Literal("left"),
22
+ Type.Literal("center"),
23
+ Type.Literal("right"),
24
+ Type.Literal("justify")
25
+ ],
26
+ { description: "Text alignment options including justify" }
27
+ );
28
+ var HeadingLevelSchema = Type.Union(
29
+ [
30
+ Type.Literal(1),
31
+ Type.Literal(2),
32
+ Type.Literal(3),
33
+ Type.Literal(4),
34
+ Type.Literal(5),
35
+ Type.Literal(6)
36
+ ],
37
+ { description: "Heading level (1-6)" }
38
+ );
39
+ var SpacingSchema = Type.Object(
40
+ {
41
+ before: Type.Optional(
42
+ Type.Number({
43
+ minimum: 0,
44
+ description: "Spacing before element in points"
45
+ })
46
+ ),
47
+ after: Type.Optional(
48
+ Type.Number({
49
+ minimum: 0,
50
+ description: "Spacing after element in points"
51
+ })
52
+ )
53
+ },
54
+ {
55
+ description: "Spacing configuration",
56
+ additionalProperties: false
57
+ }
58
+ );
59
+ var ListSpacingSchema = Type.Object(
60
+ {
61
+ before: Type.Optional(
62
+ Type.Number({
63
+ minimum: 0,
64
+ description: "Spacing before list in points"
65
+ })
66
+ ),
67
+ after: Type.Optional(
68
+ Type.Number({
69
+ minimum: 0,
70
+ description: "Spacing after list in points"
71
+ })
72
+ ),
73
+ item: Type.Optional(
74
+ Type.Number({
75
+ minimum: 0,
76
+ description: "Spacing between list items in points"
77
+ })
78
+ )
79
+ },
80
+ {
81
+ description: "List spacing configuration with item spacing",
82
+ additionalProperties: false
83
+ }
84
+ );
85
+ var MarginsSchema = Type.Object(
86
+ {
87
+ top: Type.Optional(Type.Number({ minimum: 0 })),
88
+ bottom: Type.Optional(Type.Number({ minimum: 0 })),
89
+ left: Type.Optional(Type.Number({ minimum: 0 })),
90
+ right: Type.Optional(Type.Number({ minimum: 0 }))
91
+ },
92
+ { description: "Margin configuration" }
93
+ );
94
+ var BorderSchema = Type.Object(
95
+ {
96
+ style: Type.Optional(
97
+ Type.Union([
98
+ Type.Literal("solid"),
99
+ Type.Literal("dashed"),
100
+ Type.Literal("dotted"),
101
+ Type.Literal("double"),
102
+ Type.Literal("none")
103
+ ])
104
+ ),
105
+ width: Type.Optional(Type.Number({ minimum: 0 })),
106
+ color: Type.Optional(HexColorSchema)
107
+ },
108
+ { description: "Border configuration" }
109
+ );
110
+ var LineSpacingSchema = Type.Object(
111
+ {
112
+ type: Type.Union([
113
+ Type.Literal("single"),
114
+ Type.Literal("atLeast"),
115
+ Type.Literal("exactly"),
116
+ Type.Literal("double"),
117
+ Type.Literal("multiple")
118
+ ]),
119
+ value: Type.Optional(Type.Number({ minimum: 0 }))
120
+ },
121
+ { description: "Line spacing configuration" }
122
+ );
123
+ var IndentSchema = Type.Object(
124
+ {
125
+ left: Type.Optional(Type.Number({ minimum: 0 })),
126
+ hanging: Type.Optional(Type.Number({ minimum: 0 }))
127
+ },
128
+ { description: "Indentation configuration" }
129
+ );
130
+ var HorizontalPositionRelativeFromSchema = Type.Union(
131
+ [
132
+ Type.Literal("character"),
133
+ Type.Literal("column"),
134
+ Type.Literal("margin"),
135
+ Type.Literal("page"),
136
+ Type.Literal("text")
137
+ // VML compatibility for text-box
138
+ ],
139
+ {
140
+ description: "Horizontal position relative to"
141
+ }
142
+ );
143
+ var VerticalPositionRelativeFromSchema = Type.Union(
144
+ [
145
+ Type.Literal("margin"),
146
+ Type.Literal("page"),
147
+ Type.Literal("paragraph"),
148
+ Type.Literal("line"),
149
+ Type.Literal("text")
150
+ // VML compatibility for text-box
151
+ ],
152
+ {
153
+ description: "Vertical position relative to"
154
+ }
155
+ );
156
+ var HorizontalPositionAlignSchema = Type.Union(
157
+ [
158
+ Type.Literal("left"),
159
+ Type.Literal("center"),
160
+ Type.Literal("right"),
161
+ Type.Literal("inside"),
162
+ Type.Literal("outside")
163
+ ],
164
+ {
165
+ description: "Horizontal alignment"
166
+ }
167
+ );
168
+ var VerticalPositionAlignSchema = Type.Union(
169
+ [
170
+ Type.Literal("top"),
171
+ Type.Literal("center"),
172
+ Type.Literal("bottom"),
173
+ Type.Literal("inside"),
174
+ Type.Literal("outside")
175
+ ],
176
+ {
177
+ description: "Vertical alignment"
178
+ }
179
+ );
180
+ var TextWrappingTypeSchema = Type.Union(
181
+ [
182
+ Type.Literal("none"),
183
+ Type.Literal("square"),
184
+ Type.Literal("topAndBottom"),
185
+ Type.Literal("around"),
186
+ // VML compatibility for text-box
187
+ Type.Literal("tight"),
188
+ // VML compatibility for text-box
189
+ Type.Literal("through")
190
+ // VML compatibility for text-box
191
+ ],
192
+ {
193
+ description: "Text wrapping type"
194
+ }
195
+ );
196
+ var TextWrappingSideSchema = Type.Union(
197
+ [
198
+ Type.Literal("bothSides"),
199
+ Type.Literal("left"),
200
+ Type.Literal("right"),
201
+ Type.Literal("largest")
202
+ ],
203
+ {
204
+ description: "Text wrapping side"
205
+ }
206
+ );
207
+ var FloatingPropertiesSchema = Type.Object(
208
+ {
209
+ horizontalPosition: Type.Optional(
210
+ Type.Object(
211
+ {
212
+ relative: Type.Optional(HorizontalPositionRelativeFromSchema),
213
+ align: Type.Optional(HorizontalPositionAlignSchema),
214
+ offset: Type.Optional(
215
+ Type.Union([
216
+ Type.Number({
217
+ description: "Horizontal offset in twips (1/20 of a point)"
218
+ }),
219
+ Type.String({
220
+ pattern: "^\\d+(\\.\\d+)?%$",
221
+ description: 'Horizontal offset as percentage (e.g., "50%") relative to page or margin width'
222
+ })
223
+ ])
224
+ )
225
+ },
226
+ {
227
+ description: "Horizontal positioning (use either align or offset, not both)"
228
+ }
229
+ )
230
+ ),
231
+ verticalPosition: Type.Optional(
232
+ Type.Object(
233
+ {
234
+ relative: Type.Optional(VerticalPositionRelativeFromSchema),
235
+ align: Type.Optional(VerticalPositionAlignSchema),
236
+ offset: Type.Optional(
237
+ Type.Union([
238
+ Type.Number({
239
+ description: "Vertical offset in twips (1/20 of a point)"
240
+ }),
241
+ Type.String({
242
+ pattern: "^\\d+(\\.\\d+)?%$",
243
+ description: 'Vertical offset as percentage (e.g., "50%") relative to page or margin height'
244
+ })
245
+ ])
246
+ )
247
+ },
248
+ {
249
+ description: "Vertical positioning (use either align or offset, not both)"
250
+ }
251
+ )
252
+ ),
253
+ wrap: Type.Optional(
254
+ Type.Object(
255
+ {
256
+ type: TextWrappingTypeSchema,
257
+ side: Type.Optional(TextWrappingSideSchema),
258
+ margins: Type.Optional(
259
+ Type.Object(
260
+ {
261
+ top: Type.Optional(
262
+ Type.Union([
263
+ Type.Number({ description: "Top margin in twips" }),
264
+ Type.String({
265
+ pattern: "^\\d+(\\.\\d+)?%$",
266
+ description: "Top margin as percentage of page height"
267
+ })
268
+ ])
269
+ ),
270
+ bottom: Type.Optional(
271
+ Type.Union([
272
+ Type.Number({ description: "Bottom margin in twips" }),
273
+ Type.String({
274
+ pattern: "^\\d+(\\.\\d+)?%$",
275
+ description: "Bottom margin as percentage of page height"
276
+ })
277
+ ])
278
+ ),
279
+ left: Type.Optional(
280
+ Type.Union([
281
+ Type.Number({ description: "Left margin in twips" }),
282
+ Type.String({
283
+ pattern: "^\\d+(\\.\\d+)?%$",
284
+ description: "Left margin as percentage of page width"
285
+ })
286
+ ])
287
+ ),
288
+ right: Type.Optional(
289
+ Type.Union([
290
+ Type.Number({ description: "Right margin in twips" }),
291
+ Type.String({
292
+ pattern: "^\\d+(\\.\\d+)?%$",
293
+ description: "Right margin as percentage of page width"
294
+ })
295
+ ])
296
+ )
297
+ },
298
+ {
299
+ description: "Distance from text margins"
300
+ }
301
+ )
302
+ )
303
+ },
304
+ {
305
+ description: "Text wrapping configuration"
306
+ }
307
+ )
308
+ ),
309
+ allowOverlap: Type.Optional(
310
+ Type.Boolean({
311
+ description: "Allow element to overlap with other elements"
312
+ })
313
+ ),
314
+ behindDocument: Type.Optional(
315
+ Type.Boolean({
316
+ description: "Place element behind document text"
317
+ })
318
+ ),
319
+ lockAnchor: Type.Optional(
320
+ Type.Boolean({
321
+ description: "Lock the anchor position"
322
+ })
323
+ ),
324
+ layoutInCell: Type.Optional(
325
+ Type.Boolean({
326
+ description: "Layout element within table cell"
327
+ })
328
+ ),
329
+ zIndex: Type.Optional(
330
+ Type.Number({
331
+ minimum: 0,
332
+ description: "Z-order for overlapping elements (must be non-negative)"
333
+ })
334
+ ),
335
+ rotation: Type.Optional(
336
+ Type.Number({
337
+ description: "Rotation angle in degrees"
338
+ })
339
+ ),
340
+ visibility: Type.Optional(
341
+ Type.Union([Type.Literal("hidden"), Type.Literal("inherit")], {
342
+ description: "Visibility of the floating element"
343
+ })
344
+ )
345
+ },
346
+ {
347
+ description: "Floating element properties"
348
+ }
349
+ );
350
+ var NumberingSchema = Type.Object(
351
+ {
352
+ start: Type.Optional(Type.Number({ minimum: 1 })),
353
+ style: Type.Optional(
354
+ Type.Union([
355
+ Type.Literal("decimal"),
356
+ Type.Literal("lowerLetter"),
357
+ Type.Literal("upperLetter"),
358
+ Type.Literal("lowerRoman"),
359
+ Type.Literal("upperRoman")
360
+ ])
361
+ ),
362
+ separator: Type.Optional(Type.String())
363
+ },
364
+ { description: "Numbering configuration for lists" }
365
+ );
366
+ var BaseComponentFields = {};
367
+ var BaseComponentPropsSchema = Type.Object(BaseComponentFields, {
368
+ description: "Base component props",
369
+ additionalProperties: true
370
+ });
371
+
372
+ // src/schemas/components/heading.ts
373
+ var HeadingPropsSchema = Type2.Object(
374
+ {
375
+ text: Type2.String({
376
+ description: "Heading text (required)"
377
+ }),
378
+ level: Type2.Optional(HeadingLevelSchema),
379
+ // Local font override: allows customizing family/size/color/bold/italic/underline
380
+ // without modifying theme styles. Supports partial overrides.
381
+ font: Type2.Optional(Type2.Partial(FontDefinitionSchema)),
382
+ alignment: Type2.Optional(JustifiedAlignmentSchema),
383
+ spacing: Type2.Optional(SpacingSchema),
384
+ lineSpacing: Type2.Optional(
385
+ Type2.Union([Type2.Number({ minimum: 0 }), LineSpacingSchema])
386
+ ),
387
+ pageBreak: Type2.Optional(
388
+ Type2.Boolean({
389
+ description: "Insert page break before heading"
390
+ })
391
+ ),
392
+ columnBreak: Type2.Optional(
393
+ Type2.Boolean({
394
+ description: "Insert column break before heading"
395
+ })
396
+ ),
397
+ numbering: Type2.Optional(
398
+ Type2.Boolean({
399
+ description: "Include in numbering"
400
+ })
401
+ ),
402
+ keepNext: Type2.Optional(
403
+ Type2.Boolean({
404
+ description: "Keep heading with next paragraph on same page"
405
+ })
406
+ ),
407
+ keepLines: Type2.Optional(
408
+ Type2.Boolean({
409
+ description: "Keep all lines of heading together on same page"
410
+ })
411
+ )
412
+ },
413
+ {
414
+ description: "Heading component props",
415
+ additionalProperties: false
416
+ }
417
+ );
418
+
419
+ // src/schemas/components/paragraph.ts
420
+ import { Type as Type3 } from "@sinclair/typebox";
421
+ var FrameWrapTypeSchema = Type3.Union(
422
+ [
423
+ Type3.Literal("around"),
424
+ Type3.Literal("none"),
425
+ Type3.Literal("notBeside"),
426
+ Type3.Literal("through"),
427
+ Type3.Literal("tight"),
428
+ Type3.Literal("auto")
429
+ ],
430
+ {
431
+ description: "Frame text wrapping type"
432
+ }
433
+ );
434
+ var FrameAnchorTypeSchema = Type3.Union(
435
+ [Type3.Literal("margin"), Type3.Literal("page"), Type3.Literal("text")],
436
+ {
437
+ description: "Frame anchor type"
438
+ }
439
+ );
440
+ var FrameHorizontalAlignSchema = Type3.Union(
441
+ [
442
+ Type3.Literal("left"),
443
+ Type3.Literal("center"),
444
+ Type3.Literal("right"),
445
+ Type3.Literal("inside"),
446
+ Type3.Literal("outside")
447
+ ],
448
+ {
449
+ description: "Frame horizontal alignment"
450
+ }
451
+ );
452
+ var FrameVerticalAlignSchema = Type3.Union(
453
+ [
454
+ Type3.Literal("top"),
455
+ Type3.Literal("center"),
456
+ Type3.Literal("bottom"),
457
+ Type3.Literal("inside"),
458
+ Type3.Literal("outside")
459
+ ],
460
+ {
461
+ description: "Frame vertical alignment"
462
+ }
463
+ );
464
+ var FloatingFramePropertiesSchema = Type3.Object(
465
+ {
466
+ horizontalPosition: Type3.Optional(
467
+ Type3.Object(
468
+ {
469
+ relative: Type3.Optional(FrameAnchorTypeSchema),
470
+ align: Type3.Optional(FrameHorizontalAlignSchema),
471
+ offset: Type3.Optional(
472
+ Type3.Union([
473
+ Type3.Number({
474
+ description: "Horizontal offset in twips (1/20 of a point)"
475
+ }),
476
+ Type3.String({
477
+ pattern: "^\\d+(\\.\\d+)?%$",
478
+ description: 'Horizontal offset as percentage (e.g., "50%") relative to page or margin width'
479
+ })
480
+ ])
481
+ )
482
+ },
483
+ {
484
+ description: "Horizontal positioning (use either align or offset, not both)"
485
+ }
486
+ )
487
+ ),
488
+ verticalPosition: Type3.Optional(
489
+ Type3.Object(
490
+ {
491
+ relative: Type3.Optional(FrameAnchorTypeSchema),
492
+ align: Type3.Optional(FrameVerticalAlignSchema),
493
+ offset: Type3.Optional(
494
+ Type3.Union([
495
+ Type3.Number({
496
+ description: "Vertical offset in twips (1/20 of a point)"
497
+ }),
498
+ Type3.String({
499
+ pattern: "^\\d+(\\.\\d+)?%$",
500
+ description: 'Vertical offset as percentage (e.g., "50%") relative to page or margin height'
501
+ })
502
+ ])
503
+ )
504
+ },
505
+ {
506
+ description: "Vertical positioning (use either align or offset, not both)"
507
+ }
508
+ )
509
+ ),
510
+ wrap: Type3.Optional(
511
+ Type3.Object(
512
+ {
513
+ type: FrameWrapTypeSchema
514
+ },
515
+ {
516
+ description: "Text wrapping configuration"
517
+ }
518
+ )
519
+ ),
520
+ lockAnchor: Type3.Optional(
521
+ Type3.Boolean({
522
+ description: "Lock the anchor position"
523
+ })
524
+ ),
525
+ width: Type3.Optional(
526
+ Type3.Number({
527
+ minimum: 1,
528
+ description: "Frame width in twips (DXA units)"
529
+ })
530
+ ),
531
+ height: Type3.Optional(
532
+ Type3.Number({
533
+ minimum: 1,
534
+ description: "Frame height in twips (DXA units)"
535
+ })
536
+ )
537
+ },
538
+ {
539
+ description: "Floating text frame properties"
540
+ }
541
+ );
542
+ var AlignmentSchema2 = Type3.Union(
543
+ [
544
+ Type3.Literal("left"),
545
+ Type3.Literal("center"),
546
+ Type3.Literal("right"),
547
+ Type3.Literal("justify")
548
+ ],
549
+ {
550
+ description: "Paragraph text alignment"
551
+ }
552
+ );
553
+ var ParagraphPropsSchema = Type3.Object(
554
+ {
555
+ text: Type3.String({
556
+ description: "Text content (required)"
557
+ }),
558
+ // New nested font object, aligned with theme's FontDefinitionSchema
559
+ // Allow partial overrides (family not required when overriding a subset)
560
+ font: Type3.Optional(Type3.Partial(FontDefinitionSchema)),
561
+ // Optional reference to a named style from theme.styles (e.g., 'heading1', 'normal')
562
+ themeStyle: Type3.Optional(Type3.String()),
563
+ // Rich-text decoration color for bold segments (kept as top-level behavior option)
564
+ boldColor: Type3.Optional(Type3.String()),
565
+ // Paragraph spacing (in points) — limited paragraph-level option allowed
566
+ spacing: Type3.Optional(SpacingSchema),
567
+ // Paragraph alignment (moved from font to config level)
568
+ alignment: Type3.Optional(AlignmentSchema2),
569
+ pageBreak: Type3.Optional(
570
+ Type3.Boolean({
571
+ description: "Insert page break before paragraph"
572
+ })
573
+ ),
574
+ columnBreak: Type3.Optional(
575
+ Type3.Boolean({
576
+ description: "Insert column break before paragraph"
577
+ })
578
+ ),
579
+ floating: Type3.Optional(FloatingFramePropertiesSchema),
580
+ keepNext: Type3.Optional(
581
+ Type3.Boolean({
582
+ description: "Keep paragraph with next paragraph on same page"
583
+ })
584
+ ),
585
+ keepLines: Type3.Optional(
586
+ Type3.Boolean({
587
+ description: "Keep all lines of paragraph together on same page"
588
+ })
589
+ ),
590
+ id: Type3.Optional(
591
+ Type3.String({
592
+ description: "Unique identifier for internal linking (bookmark anchor)"
593
+ })
594
+ )
595
+ },
596
+ {
597
+ description: "Paragraph component props (font nested for theme consistency; no flat font properties)",
598
+ additionalProperties: false
599
+ }
600
+ );
601
+
602
+ // src/schemas/components/image.ts
603
+ import { Type as Type4 } from "@sinclair/typebox";
604
+ var ImagePropsSchema = Type4.Object(
605
+ {
606
+ path: Type4.Optional(
607
+ Type4.String({
608
+ description: "Image source URL or file path (mutually exclusive with base64)"
609
+ })
610
+ ),
611
+ base64: Type4.Optional(
612
+ Type4.String({
613
+ description: 'Base64-encoded image data in data URI format (e.g., "data:image/png;base64,iVBORw0KGgo...") (mutually exclusive with path)'
614
+ })
615
+ ),
616
+ alt: Type4.Optional(
617
+ Type4.String({
618
+ description: "Alternative text for accessibility"
619
+ })
620
+ ),
621
+ width: Type4.Optional(
622
+ Type4.Union(
623
+ [
624
+ Type4.Number({
625
+ minimum: 1,
626
+ description: "Image width in pixels"
627
+ }),
628
+ Type4.String({
629
+ pattern: "^\\d+(\\.\\d+)?%$",
630
+ description: 'Image width as percentage (e.g., "90%") relative to widthRelativeTo (defaults to content width)'
631
+ })
632
+ ],
633
+ {
634
+ description: 'Image width in pixels (number) or as percentage string (e.g., "90%")',
635
+ default: "100%"
636
+ }
637
+ )
638
+ ),
639
+ height: Type4.Optional(
640
+ Type4.Union(
641
+ [
642
+ Type4.Number({
643
+ minimum: 1,
644
+ description: "Image height in pixels"
645
+ }),
646
+ Type4.String({
647
+ pattern: "^\\d+(\\.\\d+)?%$",
648
+ description: 'Image height as percentage (e.g., "90%") relative to heightRelativeTo (defaults to content height)'
649
+ })
650
+ ],
651
+ {
652
+ description: 'Image height in pixels (number) or as percentage string (e.g., "90%")'
653
+ }
654
+ )
655
+ ),
656
+ widthRelativeTo: Type4.Optional(
657
+ Type4.Union([Type4.Literal("content"), Type4.Literal("page")], {
658
+ description: "Reference for width percentages: content (page width minus margins) or page (full page width)",
659
+ default: "content"
660
+ })
661
+ ),
662
+ heightRelativeTo: Type4.Optional(
663
+ Type4.Union([Type4.Literal("content"), Type4.Literal("page")], {
664
+ description: "Reference for height percentages: content (page height minus margins) or page (full page height)",
665
+ default: "content"
666
+ })
667
+ ),
668
+ alignment: Type4.Optional(AlignmentSchema),
669
+ caption: Type4.Optional(
670
+ Type4.String({
671
+ description: "Image caption (supports rich text with **bold**, *italic*, ***both***)"
672
+ })
673
+ ),
674
+ spacing: Type4.Optional(SpacingSchema),
675
+ floating: Type4.Optional(FloatingPropertiesSchema),
676
+ keepNext: Type4.Optional(
677
+ Type4.Boolean({
678
+ description: "Keep paragraph with next paragraph on same page"
679
+ })
680
+ ),
681
+ keepLines: Type4.Optional(
682
+ Type4.Boolean({
683
+ description: "Keep all lines of paragraph together on same page"
684
+ })
685
+ )
686
+ },
687
+ {
688
+ description: "Image component props",
689
+ additionalProperties: false
690
+ }
691
+ );
692
+
693
+ // src/schemas/components/statistic.ts
694
+ import { Type as Type5 } from "@sinclair/typebox";
695
+ var StatisticPropsSchema = Type5.Object(
696
+ {
697
+ number: Type5.String({
698
+ description: "Statistic number/value (required)"
699
+ }),
700
+ description: Type5.String({
701
+ description: "Statistic description (required)"
702
+ }),
703
+ unit: Type5.Optional(
704
+ Type5.String({
705
+ description: "Unit of measurement"
706
+ })
707
+ ),
708
+ format: Type5.Optional(
709
+ Type5.String({
710
+ description: "Number format pattern"
711
+ })
712
+ ),
713
+ trend: Type5.Optional(
714
+ Type5.Union([
715
+ Type5.Literal("up"),
716
+ Type5.Literal("down"),
717
+ Type5.Literal("neutral")
718
+ ])
719
+ ),
720
+ trendValue: Type5.Optional(Type5.Union([Type5.String(), Type5.Number()])),
721
+ alignment: Type5.Optional(AlignmentSchema),
722
+ spacing: Type5.Optional(SpacingSchema),
723
+ size: Type5.Optional(
724
+ Type5.Union([
725
+ Type5.Literal("small"),
726
+ Type5.Literal("medium"),
727
+ Type5.Literal("large")
728
+ ])
729
+ )
730
+ },
731
+ {
732
+ description: "Statistic component props",
733
+ additionalProperties: false
734
+ }
735
+ );
736
+
737
+ // src/schemas/components/table.ts
738
+ import { Type as Type6 } from "@sinclair/typebox";
739
+ var CellContentSchema = Type6.Recursive(
740
+ (This) => Type6.Union([
741
+ Type6.String(),
742
+ Type6.Object(
743
+ {
744
+ name: Type6.String(),
745
+ props: Type6.Object({}, { additionalProperties: true }),
746
+ children: Type6.Optional(Type6.Array(This))
747
+ },
748
+ { additionalProperties: false }
749
+ )
750
+ ])
751
+ );
752
+ var HorizontalAlignmentSchema = Type6.Union(
753
+ [
754
+ Type6.Literal("left"),
755
+ Type6.Literal("center"),
756
+ Type6.Literal("right"),
757
+ Type6.Literal("justify")
758
+ ],
759
+ { description: "Horizontal text alignment" }
760
+ );
761
+ var VerticalAlignmentSchema = Type6.Union(
762
+ [Type6.Literal("top"), Type6.Literal("middle"), Type6.Literal("bottom")],
763
+ { description: "Vertical cell alignment" }
764
+ );
765
+ var FontConfigSchema = Type6.Object({
766
+ family: Type6.Optional(Type6.String({ description: "Font family name" })),
767
+ size: Type6.Optional(
768
+ Type6.Number({ minimum: 0, description: "Font size in points" })
769
+ ),
770
+ bold: Type6.Optional(Type6.Boolean({ description: "Bold text" })),
771
+ italic: Type6.Optional(Type6.Boolean({ description: "Italic text" })),
772
+ underline: Type6.Optional(Type6.Boolean({ description: "Underlined text" }))
773
+ });
774
+ var BorderColorSchema = Type6.Union([
775
+ Type6.String({ description: "Border color for all sides (hex without #)" }),
776
+ Type6.Object({
777
+ bottom: Type6.Optional(
778
+ Type6.String({ description: "Bottom border color (hex without #)" })
779
+ ),
780
+ top: Type6.Optional(
781
+ Type6.String({ description: "Top border color (hex without #)" })
782
+ ),
783
+ right: Type6.Optional(
784
+ Type6.String({ description: "Right border color (hex without #)" })
785
+ ),
786
+ left: Type6.Optional(
787
+ Type6.String({ description: "Left border color (hex without #)" })
788
+ )
789
+ })
790
+ ]);
791
+ var BorderSizeSchema = Type6.Union([
792
+ Type6.Number({
793
+ minimum: 0,
794
+ description: "Border size for all sides in points"
795
+ }),
796
+ Type6.Object({
797
+ bottom: Type6.Optional(
798
+ Type6.Number({ minimum: 0, description: "Bottom border size in points" })
799
+ ),
800
+ top: Type6.Optional(
801
+ Type6.Number({ minimum: 0, description: "Top border size in points" })
802
+ ),
803
+ right: Type6.Optional(
804
+ Type6.Number({ minimum: 0, description: "Right border size in points" })
805
+ ),
806
+ left: Type6.Optional(
807
+ Type6.Number({ minimum: 0, description: "Left border size in points" })
808
+ )
809
+ })
810
+ ]);
811
+ var HideBordersSchema = Type6.Union([
812
+ Type6.Boolean({
813
+ description: "Hide all borders when true"
814
+ }),
815
+ Type6.Object(
816
+ {
817
+ bottom: Type6.Optional(
818
+ Type6.Boolean({ description: "Hide bottom border" })
819
+ ),
820
+ top: Type6.Optional(Type6.Boolean({ description: "Hide top border" })),
821
+ right: Type6.Optional(Type6.Boolean({ description: "Hide right border" })),
822
+ left: Type6.Optional(Type6.Boolean({ description: "Hide left border" })),
823
+ insideHorizontal: Type6.Optional(
824
+ Type6.Boolean({ description: "Hide horizontal borders between rows" })
825
+ ),
826
+ insideVertical: Type6.Optional(
827
+ Type6.Boolean({ description: "Hide vertical borders between columns" })
828
+ )
829
+ },
830
+ { description: "Selectively hide specific borders" }
831
+ )
832
+ ]);
833
+ var PaddingSchema = Type6.Union([
834
+ Type6.Number({ minimum: 0, description: "Padding for all sides in points" }),
835
+ Type6.Object({
836
+ bottom: Type6.Optional(
837
+ Type6.Number({ minimum: 0, description: "Bottom padding in points" })
838
+ ),
839
+ top: Type6.Optional(
840
+ Type6.Number({ minimum: 0, description: "Top padding in points" })
841
+ ),
842
+ right: Type6.Optional(
843
+ Type6.Number({ minimum: 0, description: "Right padding in points" })
844
+ ),
845
+ left: Type6.Optional(
846
+ Type6.Number({ minimum: 0, description: "Left padding in points" })
847
+ )
848
+ })
849
+ ]);
850
+ var CellDefaultsSchema = Type6.Object({
851
+ color: Type6.Optional(HexColorSchema),
852
+ backgroundColor: Type6.Optional(HexColorOrTransparentSchema),
853
+ horizontalAlignment: Type6.Optional(HorizontalAlignmentSchema),
854
+ verticalAlignment: Type6.Optional(VerticalAlignmentSchema),
855
+ font: Type6.Optional(FontConfigSchema),
856
+ borderColor: Type6.Optional(BorderColorSchema),
857
+ borderSize: Type6.Optional(BorderSizeSchema),
858
+ padding: Type6.Optional(PaddingSchema),
859
+ height: Type6.Optional(
860
+ Type6.Number({ minimum: 0, description: "Cell height in points" })
861
+ )
862
+ });
863
+ function createTablePropsSchema(componentRef) {
864
+ const cellContent = Type6.Union([Type6.String(), componentRef]);
865
+ const cellFields = {
866
+ color: Type6.Optional(HexColorSchema),
867
+ backgroundColor: Type6.Optional(HexColorOrTransparentSchema),
868
+ horizontalAlignment: Type6.Optional(HorizontalAlignmentSchema),
869
+ verticalAlignment: Type6.Optional(VerticalAlignmentSchema),
870
+ font: Type6.Optional(FontConfigSchema),
871
+ borderColor: Type6.Optional(BorderColorSchema),
872
+ borderSize: Type6.Optional(BorderSizeSchema),
873
+ padding: Type6.Optional(PaddingSchema),
874
+ height: Type6.Optional(
875
+ Type6.Number({ minimum: 0, description: "Cell height in points" })
876
+ )
877
+ };
878
+ const headerSchema = Type6.Object({
879
+ ...cellFields,
880
+ content: Type6.Optional(cellContent)
881
+ });
882
+ const cellSchema = Type6.Object({
883
+ ...cellFields,
884
+ content: Type6.Optional(cellContent)
885
+ });
886
+ const columnSchema = Type6.Object({
887
+ width: Type6.Optional(
888
+ Type6.Union([
889
+ Type6.Number({
890
+ minimum: 0,
891
+ description: "Column width in points. When set on some columns, remaining columns will automatically share the leftover table space equally. Leave undefined to distribute space evenly among unspecified columns."
892
+ }),
893
+ Type6.String({
894
+ pattern: "^\\d+(\\.\\d+)?%$",
895
+ description: 'Column width as percentage of available width (e.g., "40%")'
896
+ })
897
+ ])
898
+ ),
899
+ cellDefaults: Type6.Optional(CellDefaultsSchema),
900
+ header: Type6.Optional(headerSchema),
901
+ cells: Type6.Optional(Type6.Array(cellSchema))
902
+ });
903
+ return Type6.Object(
904
+ {
905
+ borderColor: Type6.Optional(BorderColorSchema),
906
+ borderSize: Type6.Optional(BorderSizeSchema),
907
+ hideBorders: Type6.Optional(HideBordersSchema),
908
+ cellDefaults: Type6.Optional(CellDefaultsSchema),
909
+ headerCellDefaults: Type6.Optional(CellDefaultsSchema),
910
+ width: Type6.Optional(
911
+ Type6.Number({
912
+ minimum: 0,
913
+ maximum: 100,
914
+ description: "Table width in percentage (0-100)"
915
+ })
916
+ ),
917
+ columns: Type6.Array(columnSchema, {
918
+ description: "Table columns with headers and cells",
919
+ minItems: 1
920
+ }),
921
+ keepInOnePage: Type6.Optional(
922
+ Type6.Boolean({
923
+ description: "Keep table rows together on the same page by setting keepNext on all paragraphs"
924
+ })
925
+ ),
926
+ keepNext: Type6.Optional(
927
+ Type6.Boolean({
928
+ description: "Set keepNext on the last row to keep it connected to the next element. Works independently of keepInOnePage. Defaults to false."
929
+ })
930
+ ),
931
+ repeatHeaderOnPageBreak: Type6.Optional(
932
+ Type6.Boolean({
933
+ description: "Repeat the header row on each page when the table spans multiple pages. Defaults to false.",
934
+ default: true
935
+ })
936
+ )
937
+ },
938
+ {
939
+ description: "Table component props with column-based structure"
940
+ }
941
+ );
942
+ }
943
+ var TablePropsSchema = createTablePropsSchema(CellContentSchema);
944
+
945
+ // src/schemas/components/section.ts
946
+ import { Type as Type7 } from "@sinclair/typebox";
947
+ var createSectionPropsSchema = (moduleRef) => Type7.Object(
948
+ {
949
+ title: Type7.Optional(
950
+ Type7.String({
951
+ description: "Section title (optional)"
952
+ })
953
+ ),
954
+ level: Type7.Optional(
955
+ Type7.Number({
956
+ minimum: 1,
957
+ maximum: 9,
958
+ description: "Heading level for section title (1-9)",
959
+ default: 1
960
+ })
961
+ ),
962
+ header: Type7.Optional(
963
+ Type7.Union([
964
+ Type7.Array(moduleRef || Type7.Any(), {
965
+ description: "Section header modules"
966
+ }),
967
+ Type7.Literal("linkToPrevious", {
968
+ description: "Link header to previous section"
969
+ })
970
+ ])
971
+ ),
972
+ footer: Type7.Optional(
973
+ Type7.Union([
974
+ Type7.Array(moduleRef || Type7.Any(), {
975
+ description: "Section footer modules"
976
+ }),
977
+ Type7.Literal("linkToPrevious", {
978
+ description: "Link footer to previous section"
979
+ })
980
+ ])
981
+ ),
982
+ pageBreak: Type7.Optional(
983
+ Type7.Boolean({
984
+ description: "Insert page break before section",
985
+ default: true
986
+ })
987
+ ),
988
+ spacing: Type7.Optional(SpacingSchema),
989
+ page: Type7.Optional(
990
+ Type7.Object(
991
+ {
992
+ size: Type7.Optional(
993
+ Type7.Union([
994
+ Type7.Literal("A4"),
995
+ Type7.Literal("A3"),
996
+ Type7.Literal("LETTER"),
997
+ Type7.Literal("LEGAL"),
998
+ Type7.Object({
999
+ width: Type7.Number({ minimum: 0 }),
1000
+ height: Type7.Number({ minimum: 0 })
1001
+ })
1002
+ ])
1003
+ ),
1004
+ margins: Type7.Optional(
1005
+ Type7.Object(
1006
+ {
1007
+ top: Type7.Optional(Type7.Number({ minimum: 0 })),
1008
+ bottom: Type7.Optional(Type7.Number({ minimum: 0 })),
1009
+ left: Type7.Optional(Type7.Number({ minimum: 0 })),
1010
+ right: Type7.Optional(Type7.Number({ minimum: 0 })),
1011
+ header: Type7.Optional(Type7.Number({ minimum: 0 })),
1012
+ footer: Type7.Optional(Type7.Number({ minimum: 0 })),
1013
+ gutter: Type7.Optional(Type7.Number({ minimum: 0 }))
1014
+ },
1015
+ {
1016
+ additionalProperties: false
1017
+ }
1018
+ )
1019
+ )
1020
+ },
1021
+ {
1022
+ description: "Page configuration override for this section (overrides theme page settings)",
1023
+ additionalProperties: false
1024
+ }
1025
+ )
1026
+ )
1027
+ },
1028
+ {
1029
+ description: "Section component props",
1030
+ additionalProperties: false
1031
+ }
1032
+ );
1033
+ var SectionPropsSchema = createSectionPropsSchema();
1034
+
1035
+ // src/schemas/components/columns.ts
1036
+ import { Type as Type8 } from "@sinclair/typebox";
1037
+ var ColumnDescriptorSchema = Type8.Object(
1038
+ {
1039
+ width: Type8.Optional(
1040
+ Type8.Union([
1041
+ Type8.Number({
1042
+ minimum: 1,
1043
+ description: "Column width in points"
1044
+ }),
1045
+ Type8.String({
1046
+ pattern: "^\\d+(\\.\\d+)?%$",
1047
+ description: 'Column width as percentage of available width (e.g., "30%")'
1048
+ }),
1049
+ Type8.Literal("auto", {
1050
+ description: "Auto width: consume remaining space after fixed widths and gaps"
1051
+ })
1052
+ ])
1053
+ ),
1054
+ gap: Type8.Optional(
1055
+ Type8.Union([
1056
+ Type8.Number({
1057
+ minimum: 0,
1058
+ description: "Gap after this column in points"
1059
+ }),
1060
+ Type8.String({
1061
+ pattern: "^\\d+(\\.\\d+)?%$",
1062
+ description: 'Gap after this column as percentage of available width (e.g., "5%")'
1063
+ })
1064
+ ])
1065
+ )
1066
+ },
1067
+ { additionalProperties: false }
1068
+ );
1069
+ var ColumnsPropsSchema = Type8.Object(
1070
+ {
1071
+ columns: Type8.Union([
1072
+ Type8.Number({
1073
+ minimum: 1,
1074
+ description: "Number of equal-width columns (converter will normalize to array)"
1075
+ }),
1076
+ Type8.Array(ColumnDescriptorSchema, {
1077
+ minItems: 1,
1078
+ description: "List of columns in order; width and gap can be points, percentages, or auto width"
1079
+ })
1080
+ ]),
1081
+ gap: Type8.Optional(
1082
+ Type8.Union([
1083
+ Type8.Number({
1084
+ minimum: 0,
1085
+ description: "Default gap applied after each column except the last (points)"
1086
+ }),
1087
+ Type8.String({
1088
+ pattern: "^\\d+(\\.\\d+)?%$",
1089
+ description: 'Default gap applied after each column except the last as percentage of available width (e.g., "5%")'
1090
+ })
1091
+ ])
1092
+ )
1093
+ },
1094
+ {
1095
+ description: "Columns component props",
1096
+ additionalProperties: false
1097
+ }
1098
+ );
1099
+
1100
+ // src/schemas/components/list.ts
1101
+ import { Type as Type9 } from "@sinclair/typebox";
1102
+ var LevelFormatSchema = Type9.Union(
1103
+ [
1104
+ Type9.Literal("decimal"),
1105
+ Type9.Literal("upperRoman"),
1106
+ Type9.Literal("lowerRoman"),
1107
+ Type9.Literal("upperLetter"),
1108
+ Type9.Literal("lowerLetter"),
1109
+ Type9.Literal("bullet"),
1110
+ Type9.Literal("ordinal"),
1111
+ Type9.Literal("cardinalText"),
1112
+ Type9.Literal("ordinalText"),
1113
+ Type9.Literal("hex"),
1114
+ Type9.Literal("chicago"),
1115
+ Type9.Literal("ideographDigital"),
1116
+ Type9.Literal("japaneseCounting"),
1117
+ Type9.Literal("aiueo"),
1118
+ Type9.Literal("iroha"),
1119
+ Type9.Literal("decimalFullWidth"),
1120
+ Type9.Literal("decimalHalfWidth"),
1121
+ Type9.Literal("japaneseLegal"),
1122
+ Type9.Literal("japaneseDigitalTenThousand"),
1123
+ Type9.Literal("decimalEnclosedCircle"),
1124
+ Type9.Literal("decimalFullWidth2"),
1125
+ Type9.Literal("aiueoFullWidth"),
1126
+ Type9.Literal("irohaFullWidth"),
1127
+ Type9.Literal("decimalZero"),
1128
+ Type9.Literal("ganada"),
1129
+ Type9.Literal("chosung"),
1130
+ Type9.Literal("decimalEnclosedFullstop"),
1131
+ Type9.Literal("decimalEnclosedParen"),
1132
+ Type9.Literal("decimalEnclosedCircleChinese"),
1133
+ Type9.Literal("ideographEnclosedCircle"),
1134
+ Type9.Literal("ideographTraditional"),
1135
+ Type9.Literal("ideographZodiac"),
1136
+ Type9.Literal("ideographZodiacTraditional"),
1137
+ Type9.Literal("taiwaneseCounting"),
1138
+ Type9.Literal("ideographLegalTraditional"),
1139
+ Type9.Literal("taiwaneseCountingThousand"),
1140
+ Type9.Literal("taiwaneseDigital"),
1141
+ Type9.Literal("chineseCounting"),
1142
+ Type9.Literal("chineseLegalSimplified"),
1143
+ Type9.Literal("chineseCountingThousand"),
1144
+ Type9.Literal("koreanDigital"),
1145
+ Type9.Literal("koreanCounting"),
1146
+ Type9.Literal("koreanLegal"),
1147
+ Type9.Literal("koreanDigital2"),
1148
+ Type9.Literal("vietnameseCounting"),
1149
+ Type9.Literal("russianLower"),
1150
+ Type9.Literal("russianUpper"),
1151
+ Type9.Literal("none"),
1152
+ Type9.Literal("numberInDash"),
1153
+ Type9.Literal("hebrew1"),
1154
+ Type9.Literal("hebrew2"),
1155
+ Type9.Literal("arabicAlpha"),
1156
+ Type9.Literal("arabicAbjad"),
1157
+ Type9.Literal("hindiVowels"),
1158
+ Type9.Literal("hindiConsonants"),
1159
+ Type9.Literal("hindiNumbers"),
1160
+ Type9.Literal("hindiCounting"),
1161
+ Type9.Literal("thaiLetters"),
1162
+ Type9.Literal("thaiNumbers"),
1163
+ Type9.Literal("thaiCounting")
1164
+ ],
1165
+ {
1166
+ description: "Number or bullet format for list levels"
1167
+ }
1168
+ );
1169
+ var ListLevelPropsSchema = Type9.Object(
1170
+ {
1171
+ level: Type9.Number({
1172
+ minimum: 0,
1173
+ maximum: 8,
1174
+ description: "Nesting level (0 = root, 1 = first sublevel, etc.)"
1175
+ }),
1176
+ format: Type9.Optional(LevelFormatSchema),
1177
+ text: Type9.Optional(
1178
+ Type9.String({
1179
+ description: 'Number format string (e.g., "%1." for "1.", "%1)" for "1)", custom bullet character for bullet format)'
1180
+ })
1181
+ ),
1182
+ alignment: Type9.Optional(
1183
+ Type9.Union(
1184
+ [
1185
+ Type9.Literal("start"),
1186
+ Type9.Literal("end"),
1187
+ Type9.Literal("left"),
1188
+ Type9.Literal("right"),
1189
+ Type9.Literal("center")
1190
+ ],
1191
+ {
1192
+ description: "Alignment of the numbering/bullet"
1193
+ }
1194
+ )
1195
+ ),
1196
+ indent: Type9.Optional(IndentSchema),
1197
+ start: Type9.Optional(
1198
+ Type9.Number({
1199
+ minimum: 1,
1200
+ description: "Starting number for this level (default: 1)"
1201
+ })
1202
+ )
1203
+ },
1204
+ {
1205
+ description: "Configuration for a single list level"
1206
+ }
1207
+ );
1208
+ var ListPropsSchema = Type9.Object(
1209
+ {
1210
+ items: Type9.Array(
1211
+ Type9.Union([
1212
+ Type9.String(),
1213
+ Type9.Object({
1214
+ text: Type9.String(),
1215
+ level: Type9.Optional(
1216
+ Type9.Number({
1217
+ minimum: 0,
1218
+ maximum: 8,
1219
+ description: "Nesting level for this item"
1220
+ })
1221
+ )
1222
+ })
1223
+ ]),
1224
+ {
1225
+ description: "List items (required)",
1226
+ minItems: 1
1227
+ }
1228
+ ),
1229
+ reference: Type9.Optional(
1230
+ Type9.String({
1231
+ description: "Unique reference ID for this numbering configuration (auto-generated if not provided)"
1232
+ })
1233
+ ),
1234
+ levels: Type9.Optional(
1235
+ Type9.Array(ListLevelPropsSchema, {
1236
+ description: "Configuration for each nesting level",
1237
+ minItems: 1,
1238
+ maxItems: 9
1239
+ })
1240
+ ),
1241
+ // Simplified options for common use cases (when levels not specified)
1242
+ format: Type9.Optional(
1243
+ Type9.Union(
1244
+ [LevelFormatSchema, Type9.Literal("numbered"), Type9.Literal("none")],
1245
+ {
1246
+ description: "Format for level 0 (simplified option when levels not specified)"
1247
+ }
1248
+ )
1249
+ ),
1250
+ bullet: Type9.Optional(
1251
+ Type9.String({
1252
+ description: "Custom bullet character (simplified option when levels not specified)"
1253
+ })
1254
+ ),
1255
+ start: Type9.Optional(
1256
+ Type9.Number({
1257
+ minimum: 1,
1258
+ description: "Starting number for level 0 (simplified option when levels not specified)"
1259
+ })
1260
+ ),
1261
+ spacing: Type9.Optional(ListSpacingSchema),
1262
+ alignment: Type9.Optional(JustifiedAlignmentSchema),
1263
+ indent: Type9.Optional(
1264
+ Type9.Union([Type9.Number({ minimum: 0 }), IndentSchema])
1265
+ )
1266
+ },
1267
+ {
1268
+ description: "List component props",
1269
+ additionalProperties: false
1270
+ }
1271
+ );
1272
+
1273
+ // src/schemas/component-defaults.ts
1274
+ var HeadingComponentDefaultsSchema = Type10.Partial(HeadingPropsSchema);
1275
+ var ParagraphComponentDefaultsSchema = Type10.Partial(ParagraphPropsSchema);
1276
+ var ImageComponentDefaultsSchema = Type10.Partial(ImagePropsSchema);
1277
+ var StatisticComponentDefaultsSchema = Type10.Partial(StatisticPropsSchema);
1278
+ var TableComponentDefaultsSchema = Type10.Partial(TablePropsSchema);
1279
+ var SectionComponentDefaultsSchema = Type10.Partial(SectionPropsSchema);
1280
+ var ColumnsComponentDefaultsSchema = Type10.Partial(ColumnsPropsSchema);
1281
+ var ListComponentDefaultsSchema = Type10.Partial(ListPropsSchema);
1282
+ var ComponentDefaultsSchema = Type10.Object(
1283
+ {
1284
+ heading: Type10.Optional(HeadingComponentDefaultsSchema),
1285
+ paragraph: Type10.Optional(ParagraphComponentDefaultsSchema),
1286
+ image: Type10.Optional(ImageComponentDefaultsSchema),
1287
+ statistic: Type10.Optional(StatisticComponentDefaultsSchema),
1288
+ table: Type10.Optional(TableComponentDefaultsSchema),
1289
+ section: Type10.Optional(SectionComponentDefaultsSchema),
1290
+ columns: Type10.Optional(ColumnsComponentDefaultsSchema),
1291
+ list: Type10.Optional(ListComponentDefaultsSchema)
1292
+ },
1293
+ { additionalProperties: true }
1294
+ // TODO: add a way to add strict custom component defaults when the plugin/registry paradigm will be implemented
1295
+ );
1296
+
1297
+ export {
1298
+ AlignmentSchema,
1299
+ JustifiedAlignmentSchema,
1300
+ HeadingLevelSchema,
1301
+ SpacingSchema,
1302
+ ListSpacingSchema,
1303
+ MarginsSchema,
1304
+ BorderSchema,
1305
+ LineSpacingSchema,
1306
+ IndentSchema,
1307
+ HorizontalPositionRelativeFromSchema,
1308
+ VerticalPositionRelativeFromSchema,
1309
+ HorizontalPositionAlignSchema,
1310
+ VerticalPositionAlignSchema,
1311
+ TextWrappingTypeSchema,
1312
+ TextWrappingSideSchema,
1313
+ FloatingPropertiesSchema,
1314
+ NumberingSchema,
1315
+ BaseComponentFields,
1316
+ BaseComponentPropsSchema,
1317
+ HeadingPropsSchema,
1318
+ ParagraphPropsSchema,
1319
+ ImagePropsSchema,
1320
+ StatisticPropsSchema,
1321
+ createTablePropsSchema,
1322
+ TablePropsSchema,
1323
+ createSectionPropsSchema,
1324
+ SectionPropsSchema,
1325
+ ColumnsPropsSchema,
1326
+ LevelFormatSchema,
1327
+ ListLevelPropsSchema,
1328
+ ListPropsSchema,
1329
+ HeadingComponentDefaultsSchema,
1330
+ ParagraphComponentDefaultsSchema,
1331
+ ImageComponentDefaultsSchema,
1332
+ StatisticComponentDefaultsSchema,
1333
+ TableComponentDefaultsSchema,
1334
+ SectionComponentDefaultsSchema,
1335
+ ColumnsComponentDefaultsSchema,
1336
+ ListComponentDefaultsSchema,
1337
+ ComponentDefaultsSchema
1338
+ };
1339
+ //# sourceMappingURL=chunk-F5IGGVWN.js.map