@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.
- package/dist/{chunk-6SLVQATI.js → chunk-3AJ5NHUF.js} +2 -2
- package/dist/{chunk-YQECZGRR.js → chunk-7PK36JXG.js} +2 -2
- package/dist/chunk-F5IGGVWN.js +1339 -0
- package/dist/chunk-F5IGGVWN.js.map +1 -0
- package/dist/{chunk-V4L4S6ZS.js → chunk-JYGWHRMY.js} +2 -2
- package/dist/{chunk-L5TZFC47.js → chunk-M4OD7UER.js} +4 -42
- package/dist/chunk-M4OD7UER.js.map +1 -0
- package/dist/{chunk-22VYYAC2.js → chunk-MQ7KNRW2.js} +6 -4
- package/dist/{chunk-22VYYAC2.js.map → chunk-MQ7KNRW2.js.map} +1 -1
- package/dist/{chunk-OE5JFL7S.js → chunk-QEDASPGD.js} +8 -6
- package/dist/{chunk-OE5JFL7S.js.map → chunk-QEDASPGD.js.map} +1 -1
- package/dist/{chunk-SK6LSPFN.js → chunk-RFNU2AYT.js} +2 -2
- package/dist/chunk-S5KMAUDZ.js +645 -0
- package/dist/chunk-S5KMAUDZ.js.map +1 -0
- package/dist/{chunk-ABVYMFDA.js → chunk-VQXTI6WF.js} +2 -2
- package/dist/index.d.ts +220 -1
- package/dist/index.js +16 -14
- package/dist/index.js.map +1 -1
- package/dist/schemas/api.js +4 -3
- package/dist/schemas/component-defaults.d.ts +448 -0
- package/dist/schemas/component-defaults.js +24 -0
- package/dist/schemas/component-defaults.js.map +1 -0
- package/dist/schemas/component-registry.js +2 -1
- package/dist/schemas/components.d.ts +436 -0
- package/dist/schemas/components.js +13 -11
- package/dist/schemas/document.js +5 -4
- package/dist/schemas/export.js +3 -2
- package/dist/schemas/generator.js +3 -2
- package/dist/schemas/theme.d.ts +4 -444
- package/dist/schemas/theme.js +12 -12
- package/dist/validation/unified/index.d.ts +223 -0
- package/dist/validation/unified/index.js +6 -5
- package/package.json +2 -2
- package/dist/chunk-L5TZFC47.js.map +0 -1
- package/dist/chunk-PN6JT3KF.js +0 -1926
- package/dist/chunk-PN6JT3KF.js.map +0 -1
- /package/dist/{chunk-6SLVQATI.js.map → chunk-3AJ5NHUF.js.map} +0 -0
- /package/dist/{chunk-YQECZGRR.js.map → chunk-7PK36JXG.js.map} +0 -0
- /package/dist/{chunk-V4L4S6ZS.js.map → chunk-JYGWHRMY.js.map} +0 -0
- /package/dist/{chunk-SK6LSPFN.js.map → chunk-RFNU2AYT.js.map} +0 -0
- /package/dist/{chunk-ABVYMFDA.js.map → chunk-VQXTI6WF.js.map} +0 -0
package/dist/chunk-PN6JT3KF.js
DELETED
|
@@ -1,1926 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
FontDefinitionSchema,
|
|
3
|
-
HexColorOrTransparentSchema,
|
|
4
|
-
HexColorSchema
|
|
5
|
-
} from "./chunk-JOXJOD2C.js";
|
|
6
|
-
|
|
7
|
-
// src/schemas/component-registry.ts
|
|
8
|
-
import { Type as Type14 } from "@sinclair/typebox";
|
|
9
|
-
|
|
10
|
-
// src/schemas/components/report.ts
|
|
11
|
-
import { Type } from "@sinclair/typebox";
|
|
12
|
-
var createReportPropsSchema = (_moduleRef) => Type.Object(
|
|
13
|
-
{
|
|
14
|
-
theme: Type.Optional(
|
|
15
|
-
Type.String({
|
|
16
|
-
description: 'Theme name to apply (default: "minimal")',
|
|
17
|
-
examples: ["minimal", "corporate", "modern"],
|
|
18
|
-
default: "minimal"
|
|
19
|
-
})
|
|
20
|
-
),
|
|
21
|
-
metadata: Type.Optional(
|
|
22
|
-
Type.Object(
|
|
23
|
-
{
|
|
24
|
-
title: Type.Optional(
|
|
25
|
-
Type.String({
|
|
26
|
-
description: "Document title",
|
|
27
|
-
examples: ["Annual Report 2024", "Technical Documentation"]
|
|
28
|
-
})
|
|
29
|
-
),
|
|
30
|
-
subtitle: Type.Optional(
|
|
31
|
-
Type.String({
|
|
32
|
-
description: "Document subtitle"
|
|
33
|
-
})
|
|
34
|
-
),
|
|
35
|
-
description: Type.Optional(Type.String()),
|
|
36
|
-
author: Type.Optional(Type.String()),
|
|
37
|
-
company: Type.Optional(Type.String()),
|
|
38
|
-
date: Type.Optional(Type.String()),
|
|
39
|
-
created: Type.Optional(Type.String({ format: "date-time" })),
|
|
40
|
-
modified: Type.Optional(Type.String({ format: "date-time" })),
|
|
41
|
-
version: Type.Optional(Type.String()),
|
|
42
|
-
tags: Type.Optional(Type.Array(Type.String()))
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
description: "Document metadata (title, author, company, dates, etc.)",
|
|
46
|
-
additionalProperties: false
|
|
47
|
-
}
|
|
48
|
-
)
|
|
49
|
-
)
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
description: "Report component props",
|
|
53
|
-
additionalProperties: false
|
|
54
|
-
}
|
|
55
|
-
);
|
|
56
|
-
var ReportPropsSchema = createReportPropsSchema();
|
|
57
|
-
|
|
58
|
-
// src/schemas/components/section.ts
|
|
59
|
-
import { Type as Type3 } from "@sinclair/typebox";
|
|
60
|
-
|
|
61
|
-
// src/schemas/components/common.ts
|
|
62
|
-
import { Type as Type2 } from "@sinclair/typebox";
|
|
63
|
-
var AlignmentSchema = Type2.Union(
|
|
64
|
-
[Type2.Literal("left"), Type2.Literal("center"), Type2.Literal("right")],
|
|
65
|
-
{ description: "Text alignment options" }
|
|
66
|
-
);
|
|
67
|
-
var JustifiedAlignmentSchema = Type2.Union(
|
|
68
|
-
[
|
|
69
|
-
Type2.Literal("left"),
|
|
70
|
-
Type2.Literal("center"),
|
|
71
|
-
Type2.Literal("right"),
|
|
72
|
-
Type2.Literal("justify")
|
|
73
|
-
],
|
|
74
|
-
{ description: "Text alignment options including justify" }
|
|
75
|
-
);
|
|
76
|
-
var HeadingLevelSchema = Type2.Union(
|
|
77
|
-
[
|
|
78
|
-
Type2.Literal(1),
|
|
79
|
-
Type2.Literal(2),
|
|
80
|
-
Type2.Literal(3),
|
|
81
|
-
Type2.Literal(4),
|
|
82
|
-
Type2.Literal(5),
|
|
83
|
-
Type2.Literal(6)
|
|
84
|
-
],
|
|
85
|
-
{ description: "Heading level (1-6)" }
|
|
86
|
-
);
|
|
87
|
-
var SpacingSchema = Type2.Object(
|
|
88
|
-
{
|
|
89
|
-
before: Type2.Optional(
|
|
90
|
-
Type2.Number({
|
|
91
|
-
minimum: 0,
|
|
92
|
-
description: "Spacing before element in points"
|
|
93
|
-
})
|
|
94
|
-
),
|
|
95
|
-
after: Type2.Optional(
|
|
96
|
-
Type2.Number({
|
|
97
|
-
minimum: 0,
|
|
98
|
-
description: "Spacing after element in points"
|
|
99
|
-
})
|
|
100
|
-
)
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
description: "Spacing configuration",
|
|
104
|
-
additionalProperties: false
|
|
105
|
-
}
|
|
106
|
-
);
|
|
107
|
-
var ListSpacingSchema = Type2.Object(
|
|
108
|
-
{
|
|
109
|
-
before: Type2.Optional(
|
|
110
|
-
Type2.Number({
|
|
111
|
-
minimum: 0,
|
|
112
|
-
description: "Spacing before list in points"
|
|
113
|
-
})
|
|
114
|
-
),
|
|
115
|
-
after: Type2.Optional(
|
|
116
|
-
Type2.Number({
|
|
117
|
-
minimum: 0,
|
|
118
|
-
description: "Spacing after list in points"
|
|
119
|
-
})
|
|
120
|
-
),
|
|
121
|
-
item: Type2.Optional(
|
|
122
|
-
Type2.Number({
|
|
123
|
-
minimum: 0,
|
|
124
|
-
description: "Spacing between list items in points"
|
|
125
|
-
})
|
|
126
|
-
)
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
description: "List spacing configuration with item spacing",
|
|
130
|
-
additionalProperties: false
|
|
131
|
-
}
|
|
132
|
-
);
|
|
133
|
-
var MarginsSchema = Type2.Object(
|
|
134
|
-
{
|
|
135
|
-
top: Type2.Optional(Type2.Number({ minimum: 0 })),
|
|
136
|
-
bottom: Type2.Optional(Type2.Number({ minimum: 0 })),
|
|
137
|
-
left: Type2.Optional(Type2.Number({ minimum: 0 })),
|
|
138
|
-
right: Type2.Optional(Type2.Number({ minimum: 0 }))
|
|
139
|
-
},
|
|
140
|
-
{ description: "Margin configuration" }
|
|
141
|
-
);
|
|
142
|
-
var BorderSchema = Type2.Object(
|
|
143
|
-
{
|
|
144
|
-
style: Type2.Optional(
|
|
145
|
-
Type2.Union([
|
|
146
|
-
Type2.Literal("solid"),
|
|
147
|
-
Type2.Literal("dashed"),
|
|
148
|
-
Type2.Literal("dotted"),
|
|
149
|
-
Type2.Literal("double"),
|
|
150
|
-
Type2.Literal("none")
|
|
151
|
-
])
|
|
152
|
-
),
|
|
153
|
-
width: Type2.Optional(Type2.Number({ minimum: 0 })),
|
|
154
|
-
color: Type2.Optional(HexColorSchema)
|
|
155
|
-
},
|
|
156
|
-
{ description: "Border configuration" }
|
|
157
|
-
);
|
|
158
|
-
var LineSpacingSchema = Type2.Object(
|
|
159
|
-
{
|
|
160
|
-
type: Type2.Union([
|
|
161
|
-
Type2.Literal("single"),
|
|
162
|
-
Type2.Literal("atLeast"),
|
|
163
|
-
Type2.Literal("exactly"),
|
|
164
|
-
Type2.Literal("double"),
|
|
165
|
-
Type2.Literal("multiple")
|
|
166
|
-
]),
|
|
167
|
-
value: Type2.Optional(Type2.Number({ minimum: 0 }))
|
|
168
|
-
},
|
|
169
|
-
{ description: "Line spacing configuration" }
|
|
170
|
-
);
|
|
171
|
-
var IndentSchema = Type2.Object(
|
|
172
|
-
{
|
|
173
|
-
left: Type2.Optional(Type2.Number({ minimum: 0 })),
|
|
174
|
-
hanging: Type2.Optional(Type2.Number({ minimum: 0 }))
|
|
175
|
-
},
|
|
176
|
-
{ description: "Indentation configuration" }
|
|
177
|
-
);
|
|
178
|
-
var HorizontalPositionRelativeFromSchema = Type2.Union(
|
|
179
|
-
[
|
|
180
|
-
Type2.Literal("character"),
|
|
181
|
-
Type2.Literal("column"),
|
|
182
|
-
Type2.Literal("margin"),
|
|
183
|
-
Type2.Literal("page"),
|
|
184
|
-
Type2.Literal("text")
|
|
185
|
-
// VML compatibility for text-box
|
|
186
|
-
],
|
|
187
|
-
{
|
|
188
|
-
description: "Horizontal position relative to"
|
|
189
|
-
}
|
|
190
|
-
);
|
|
191
|
-
var VerticalPositionRelativeFromSchema = Type2.Union(
|
|
192
|
-
[
|
|
193
|
-
Type2.Literal("margin"),
|
|
194
|
-
Type2.Literal("page"),
|
|
195
|
-
Type2.Literal("paragraph"),
|
|
196
|
-
Type2.Literal("line"),
|
|
197
|
-
Type2.Literal("text")
|
|
198
|
-
// VML compatibility for text-box
|
|
199
|
-
],
|
|
200
|
-
{
|
|
201
|
-
description: "Vertical position relative to"
|
|
202
|
-
}
|
|
203
|
-
);
|
|
204
|
-
var HorizontalPositionAlignSchema = Type2.Union(
|
|
205
|
-
[
|
|
206
|
-
Type2.Literal("left"),
|
|
207
|
-
Type2.Literal("center"),
|
|
208
|
-
Type2.Literal("right"),
|
|
209
|
-
Type2.Literal("inside"),
|
|
210
|
-
Type2.Literal("outside")
|
|
211
|
-
],
|
|
212
|
-
{
|
|
213
|
-
description: "Horizontal alignment"
|
|
214
|
-
}
|
|
215
|
-
);
|
|
216
|
-
var VerticalPositionAlignSchema = Type2.Union(
|
|
217
|
-
[
|
|
218
|
-
Type2.Literal("top"),
|
|
219
|
-
Type2.Literal("center"),
|
|
220
|
-
Type2.Literal("bottom"),
|
|
221
|
-
Type2.Literal("inside"),
|
|
222
|
-
Type2.Literal("outside")
|
|
223
|
-
],
|
|
224
|
-
{
|
|
225
|
-
description: "Vertical alignment"
|
|
226
|
-
}
|
|
227
|
-
);
|
|
228
|
-
var TextWrappingTypeSchema = Type2.Union(
|
|
229
|
-
[
|
|
230
|
-
Type2.Literal("none"),
|
|
231
|
-
Type2.Literal("square"),
|
|
232
|
-
Type2.Literal("topAndBottom"),
|
|
233
|
-
Type2.Literal("around"),
|
|
234
|
-
// VML compatibility for text-box
|
|
235
|
-
Type2.Literal("tight"),
|
|
236
|
-
// VML compatibility for text-box
|
|
237
|
-
Type2.Literal("through")
|
|
238
|
-
// VML compatibility for text-box
|
|
239
|
-
],
|
|
240
|
-
{
|
|
241
|
-
description: "Text wrapping type"
|
|
242
|
-
}
|
|
243
|
-
);
|
|
244
|
-
var TextWrappingSideSchema = Type2.Union(
|
|
245
|
-
[
|
|
246
|
-
Type2.Literal("bothSides"),
|
|
247
|
-
Type2.Literal("left"),
|
|
248
|
-
Type2.Literal("right"),
|
|
249
|
-
Type2.Literal("largest")
|
|
250
|
-
],
|
|
251
|
-
{
|
|
252
|
-
description: "Text wrapping side"
|
|
253
|
-
}
|
|
254
|
-
);
|
|
255
|
-
var FloatingPropertiesSchema = Type2.Object(
|
|
256
|
-
{
|
|
257
|
-
horizontalPosition: Type2.Optional(
|
|
258
|
-
Type2.Object(
|
|
259
|
-
{
|
|
260
|
-
relative: Type2.Optional(HorizontalPositionRelativeFromSchema),
|
|
261
|
-
align: Type2.Optional(HorizontalPositionAlignSchema),
|
|
262
|
-
offset: Type2.Optional(
|
|
263
|
-
Type2.Union([
|
|
264
|
-
Type2.Number({
|
|
265
|
-
description: "Horizontal offset in twips (1/20 of a point)"
|
|
266
|
-
}),
|
|
267
|
-
Type2.String({
|
|
268
|
-
pattern: "^\\d+(\\.\\d+)?%$",
|
|
269
|
-
description: 'Horizontal offset as percentage (e.g., "50%") relative to page or margin width'
|
|
270
|
-
})
|
|
271
|
-
])
|
|
272
|
-
)
|
|
273
|
-
},
|
|
274
|
-
{
|
|
275
|
-
description: "Horizontal positioning (use either align or offset, not both)"
|
|
276
|
-
}
|
|
277
|
-
)
|
|
278
|
-
),
|
|
279
|
-
verticalPosition: Type2.Optional(
|
|
280
|
-
Type2.Object(
|
|
281
|
-
{
|
|
282
|
-
relative: Type2.Optional(VerticalPositionRelativeFromSchema),
|
|
283
|
-
align: Type2.Optional(VerticalPositionAlignSchema),
|
|
284
|
-
offset: Type2.Optional(
|
|
285
|
-
Type2.Union([
|
|
286
|
-
Type2.Number({
|
|
287
|
-
description: "Vertical offset in twips (1/20 of a point)"
|
|
288
|
-
}),
|
|
289
|
-
Type2.String({
|
|
290
|
-
pattern: "^\\d+(\\.\\d+)?%$",
|
|
291
|
-
description: 'Vertical offset as percentage (e.g., "50%") relative to page or margin height'
|
|
292
|
-
})
|
|
293
|
-
])
|
|
294
|
-
)
|
|
295
|
-
},
|
|
296
|
-
{
|
|
297
|
-
description: "Vertical positioning (use either align or offset, not both)"
|
|
298
|
-
}
|
|
299
|
-
)
|
|
300
|
-
),
|
|
301
|
-
wrap: Type2.Optional(
|
|
302
|
-
Type2.Object(
|
|
303
|
-
{
|
|
304
|
-
type: TextWrappingTypeSchema,
|
|
305
|
-
side: Type2.Optional(TextWrappingSideSchema),
|
|
306
|
-
margins: Type2.Optional(
|
|
307
|
-
Type2.Object(
|
|
308
|
-
{
|
|
309
|
-
top: Type2.Optional(
|
|
310
|
-
Type2.Union([
|
|
311
|
-
Type2.Number({ description: "Top margin in twips" }),
|
|
312
|
-
Type2.String({
|
|
313
|
-
pattern: "^\\d+(\\.\\d+)?%$",
|
|
314
|
-
description: "Top margin as percentage of page height"
|
|
315
|
-
})
|
|
316
|
-
])
|
|
317
|
-
),
|
|
318
|
-
bottom: Type2.Optional(
|
|
319
|
-
Type2.Union([
|
|
320
|
-
Type2.Number({ description: "Bottom margin in twips" }),
|
|
321
|
-
Type2.String({
|
|
322
|
-
pattern: "^\\d+(\\.\\d+)?%$",
|
|
323
|
-
description: "Bottom margin as percentage of page height"
|
|
324
|
-
})
|
|
325
|
-
])
|
|
326
|
-
),
|
|
327
|
-
left: Type2.Optional(
|
|
328
|
-
Type2.Union([
|
|
329
|
-
Type2.Number({ description: "Left margin in twips" }),
|
|
330
|
-
Type2.String({
|
|
331
|
-
pattern: "^\\d+(\\.\\d+)?%$",
|
|
332
|
-
description: "Left margin as percentage of page width"
|
|
333
|
-
})
|
|
334
|
-
])
|
|
335
|
-
),
|
|
336
|
-
right: Type2.Optional(
|
|
337
|
-
Type2.Union([
|
|
338
|
-
Type2.Number({ description: "Right margin in twips" }),
|
|
339
|
-
Type2.String({
|
|
340
|
-
pattern: "^\\d+(\\.\\d+)?%$",
|
|
341
|
-
description: "Right margin as percentage of page width"
|
|
342
|
-
})
|
|
343
|
-
])
|
|
344
|
-
)
|
|
345
|
-
},
|
|
346
|
-
{
|
|
347
|
-
description: "Distance from text margins"
|
|
348
|
-
}
|
|
349
|
-
)
|
|
350
|
-
)
|
|
351
|
-
},
|
|
352
|
-
{
|
|
353
|
-
description: "Text wrapping configuration"
|
|
354
|
-
}
|
|
355
|
-
)
|
|
356
|
-
),
|
|
357
|
-
allowOverlap: Type2.Optional(
|
|
358
|
-
Type2.Boolean({
|
|
359
|
-
description: "Allow element to overlap with other elements"
|
|
360
|
-
})
|
|
361
|
-
),
|
|
362
|
-
behindDocument: Type2.Optional(
|
|
363
|
-
Type2.Boolean({
|
|
364
|
-
description: "Place element behind document text"
|
|
365
|
-
})
|
|
366
|
-
),
|
|
367
|
-
lockAnchor: Type2.Optional(
|
|
368
|
-
Type2.Boolean({
|
|
369
|
-
description: "Lock the anchor position"
|
|
370
|
-
})
|
|
371
|
-
),
|
|
372
|
-
layoutInCell: Type2.Optional(
|
|
373
|
-
Type2.Boolean({
|
|
374
|
-
description: "Layout element within table cell"
|
|
375
|
-
})
|
|
376
|
-
),
|
|
377
|
-
zIndex: Type2.Optional(
|
|
378
|
-
Type2.Number({
|
|
379
|
-
minimum: 0,
|
|
380
|
-
description: "Z-order for overlapping elements (must be non-negative)"
|
|
381
|
-
})
|
|
382
|
-
),
|
|
383
|
-
rotation: Type2.Optional(
|
|
384
|
-
Type2.Number({
|
|
385
|
-
description: "Rotation angle in degrees"
|
|
386
|
-
})
|
|
387
|
-
),
|
|
388
|
-
visibility: Type2.Optional(
|
|
389
|
-
Type2.Union([Type2.Literal("hidden"), Type2.Literal("inherit")], {
|
|
390
|
-
description: "Visibility of the floating element"
|
|
391
|
-
})
|
|
392
|
-
)
|
|
393
|
-
},
|
|
394
|
-
{
|
|
395
|
-
description: "Floating element properties"
|
|
396
|
-
}
|
|
397
|
-
);
|
|
398
|
-
var NumberingSchema = Type2.Object(
|
|
399
|
-
{
|
|
400
|
-
start: Type2.Optional(Type2.Number({ minimum: 1 })),
|
|
401
|
-
style: Type2.Optional(
|
|
402
|
-
Type2.Union([
|
|
403
|
-
Type2.Literal("decimal"),
|
|
404
|
-
Type2.Literal("lowerLetter"),
|
|
405
|
-
Type2.Literal("upperLetter"),
|
|
406
|
-
Type2.Literal("lowerRoman"),
|
|
407
|
-
Type2.Literal("upperRoman")
|
|
408
|
-
])
|
|
409
|
-
),
|
|
410
|
-
separator: Type2.Optional(Type2.String())
|
|
411
|
-
},
|
|
412
|
-
{ description: "Numbering configuration for lists" }
|
|
413
|
-
);
|
|
414
|
-
var BaseComponentFields = {};
|
|
415
|
-
var BaseComponentPropsSchema = Type2.Object(BaseComponentFields, {
|
|
416
|
-
description: "Base component props",
|
|
417
|
-
additionalProperties: true
|
|
418
|
-
});
|
|
419
|
-
|
|
420
|
-
// src/schemas/components/section.ts
|
|
421
|
-
var createSectionPropsSchema = (moduleRef) => Type3.Object(
|
|
422
|
-
{
|
|
423
|
-
title: Type3.Optional(
|
|
424
|
-
Type3.String({
|
|
425
|
-
description: "Section title (optional)"
|
|
426
|
-
})
|
|
427
|
-
),
|
|
428
|
-
level: Type3.Optional(
|
|
429
|
-
Type3.Number({
|
|
430
|
-
minimum: 1,
|
|
431
|
-
maximum: 9,
|
|
432
|
-
description: "Heading level for section title (1-9)",
|
|
433
|
-
default: 1
|
|
434
|
-
})
|
|
435
|
-
),
|
|
436
|
-
header: Type3.Optional(
|
|
437
|
-
Type3.Union([
|
|
438
|
-
Type3.Array(moduleRef || Type3.Any(), {
|
|
439
|
-
description: "Section header modules"
|
|
440
|
-
}),
|
|
441
|
-
Type3.Literal("linkToPrevious", {
|
|
442
|
-
description: "Link header to previous section"
|
|
443
|
-
})
|
|
444
|
-
])
|
|
445
|
-
),
|
|
446
|
-
footer: Type3.Optional(
|
|
447
|
-
Type3.Union([
|
|
448
|
-
Type3.Array(moduleRef || Type3.Any(), {
|
|
449
|
-
description: "Section footer modules"
|
|
450
|
-
}),
|
|
451
|
-
Type3.Literal("linkToPrevious", {
|
|
452
|
-
description: "Link footer to previous section"
|
|
453
|
-
})
|
|
454
|
-
])
|
|
455
|
-
),
|
|
456
|
-
pageBreak: Type3.Optional(
|
|
457
|
-
Type3.Boolean({
|
|
458
|
-
description: "Insert page break before section",
|
|
459
|
-
default: true
|
|
460
|
-
})
|
|
461
|
-
),
|
|
462
|
-
spacing: Type3.Optional(SpacingSchema),
|
|
463
|
-
page: Type3.Optional(
|
|
464
|
-
Type3.Object(
|
|
465
|
-
{
|
|
466
|
-
size: Type3.Optional(
|
|
467
|
-
Type3.Union([
|
|
468
|
-
Type3.Literal("A4"),
|
|
469
|
-
Type3.Literal("A3"),
|
|
470
|
-
Type3.Literal("LETTER"),
|
|
471
|
-
Type3.Literal("LEGAL"),
|
|
472
|
-
Type3.Object({
|
|
473
|
-
width: Type3.Number({ minimum: 0 }),
|
|
474
|
-
height: Type3.Number({ minimum: 0 })
|
|
475
|
-
})
|
|
476
|
-
])
|
|
477
|
-
),
|
|
478
|
-
margins: Type3.Optional(
|
|
479
|
-
Type3.Object(
|
|
480
|
-
{
|
|
481
|
-
top: Type3.Optional(Type3.Number({ minimum: 0 })),
|
|
482
|
-
bottom: Type3.Optional(Type3.Number({ minimum: 0 })),
|
|
483
|
-
left: Type3.Optional(Type3.Number({ minimum: 0 })),
|
|
484
|
-
right: Type3.Optional(Type3.Number({ minimum: 0 })),
|
|
485
|
-
header: Type3.Optional(Type3.Number({ minimum: 0 })),
|
|
486
|
-
footer: Type3.Optional(Type3.Number({ minimum: 0 })),
|
|
487
|
-
gutter: Type3.Optional(Type3.Number({ minimum: 0 }))
|
|
488
|
-
},
|
|
489
|
-
{
|
|
490
|
-
additionalProperties: false
|
|
491
|
-
}
|
|
492
|
-
)
|
|
493
|
-
)
|
|
494
|
-
},
|
|
495
|
-
{
|
|
496
|
-
description: "Page configuration override for this section (overrides theme page settings)",
|
|
497
|
-
additionalProperties: false
|
|
498
|
-
}
|
|
499
|
-
)
|
|
500
|
-
)
|
|
501
|
-
},
|
|
502
|
-
{
|
|
503
|
-
description: "Section component props",
|
|
504
|
-
additionalProperties: false
|
|
505
|
-
}
|
|
506
|
-
);
|
|
507
|
-
var SectionPropsSchema = createSectionPropsSchema();
|
|
508
|
-
|
|
509
|
-
// src/schemas/components/columns.ts
|
|
510
|
-
import { Type as Type4 } from "@sinclair/typebox";
|
|
511
|
-
var ColumnDescriptorSchema = Type4.Object(
|
|
512
|
-
{
|
|
513
|
-
width: Type4.Optional(
|
|
514
|
-
Type4.Union([
|
|
515
|
-
Type4.Number({
|
|
516
|
-
minimum: 1,
|
|
517
|
-
description: "Column width in points"
|
|
518
|
-
}),
|
|
519
|
-
Type4.String({
|
|
520
|
-
pattern: "^\\d+(\\.\\d+)?%$",
|
|
521
|
-
description: 'Column width as percentage of available width (e.g., "30%")'
|
|
522
|
-
}),
|
|
523
|
-
Type4.Literal("auto", {
|
|
524
|
-
description: "Auto width: consume remaining space after fixed widths and gaps"
|
|
525
|
-
})
|
|
526
|
-
])
|
|
527
|
-
),
|
|
528
|
-
gap: Type4.Optional(
|
|
529
|
-
Type4.Union([
|
|
530
|
-
Type4.Number({
|
|
531
|
-
minimum: 0,
|
|
532
|
-
description: "Gap after this column in points"
|
|
533
|
-
}),
|
|
534
|
-
Type4.String({
|
|
535
|
-
pattern: "^\\d+(\\.\\d+)?%$",
|
|
536
|
-
description: 'Gap after this column as percentage of available width (e.g., "5%")'
|
|
537
|
-
})
|
|
538
|
-
])
|
|
539
|
-
)
|
|
540
|
-
},
|
|
541
|
-
{ additionalProperties: false }
|
|
542
|
-
);
|
|
543
|
-
var ColumnsPropsSchema = Type4.Object(
|
|
544
|
-
{
|
|
545
|
-
columns: Type4.Union([
|
|
546
|
-
Type4.Number({
|
|
547
|
-
minimum: 1,
|
|
548
|
-
description: "Number of equal-width columns (converter will normalize to array)"
|
|
549
|
-
}),
|
|
550
|
-
Type4.Array(ColumnDescriptorSchema, {
|
|
551
|
-
minItems: 1,
|
|
552
|
-
description: "List of columns in order; width and gap can be points, percentages, or auto width"
|
|
553
|
-
})
|
|
554
|
-
]),
|
|
555
|
-
gap: Type4.Optional(
|
|
556
|
-
Type4.Union([
|
|
557
|
-
Type4.Number({
|
|
558
|
-
minimum: 0,
|
|
559
|
-
description: "Default gap applied after each column except the last (points)"
|
|
560
|
-
}),
|
|
561
|
-
Type4.String({
|
|
562
|
-
pattern: "^\\d+(\\.\\d+)?%$",
|
|
563
|
-
description: 'Default gap applied after each column except the last as percentage of available width (e.g., "5%")'
|
|
564
|
-
})
|
|
565
|
-
])
|
|
566
|
-
)
|
|
567
|
-
},
|
|
568
|
-
{
|
|
569
|
-
description: "Columns component props",
|
|
570
|
-
additionalProperties: false
|
|
571
|
-
}
|
|
572
|
-
);
|
|
573
|
-
|
|
574
|
-
// src/schemas/components/heading.ts
|
|
575
|
-
import { Type as Type5 } from "@sinclair/typebox";
|
|
576
|
-
var HeadingPropsSchema = Type5.Object(
|
|
577
|
-
{
|
|
578
|
-
text: Type5.String({
|
|
579
|
-
description: "Heading text (required)"
|
|
580
|
-
}),
|
|
581
|
-
level: Type5.Optional(HeadingLevelSchema),
|
|
582
|
-
// Local font override: allows customizing family/size/color/bold/italic/underline
|
|
583
|
-
// without modifying theme styles. Supports partial overrides.
|
|
584
|
-
font: Type5.Optional(Type5.Partial(FontDefinitionSchema)),
|
|
585
|
-
alignment: Type5.Optional(JustifiedAlignmentSchema),
|
|
586
|
-
spacing: Type5.Optional(SpacingSchema),
|
|
587
|
-
lineSpacing: Type5.Optional(
|
|
588
|
-
Type5.Union([Type5.Number({ minimum: 0 }), LineSpacingSchema])
|
|
589
|
-
),
|
|
590
|
-
pageBreak: Type5.Optional(
|
|
591
|
-
Type5.Boolean({
|
|
592
|
-
description: "Insert page break before heading"
|
|
593
|
-
})
|
|
594
|
-
),
|
|
595
|
-
columnBreak: Type5.Optional(
|
|
596
|
-
Type5.Boolean({
|
|
597
|
-
description: "Insert column break before heading"
|
|
598
|
-
})
|
|
599
|
-
),
|
|
600
|
-
numbering: Type5.Optional(
|
|
601
|
-
Type5.Boolean({
|
|
602
|
-
description: "Include in numbering"
|
|
603
|
-
})
|
|
604
|
-
),
|
|
605
|
-
keepNext: Type5.Optional(
|
|
606
|
-
Type5.Boolean({
|
|
607
|
-
description: "Keep heading with next paragraph on same page"
|
|
608
|
-
})
|
|
609
|
-
),
|
|
610
|
-
keepLines: Type5.Optional(
|
|
611
|
-
Type5.Boolean({
|
|
612
|
-
description: "Keep all lines of heading together on same page"
|
|
613
|
-
})
|
|
614
|
-
)
|
|
615
|
-
},
|
|
616
|
-
{
|
|
617
|
-
description: "Heading component props",
|
|
618
|
-
additionalProperties: false
|
|
619
|
-
}
|
|
620
|
-
);
|
|
621
|
-
|
|
622
|
-
// src/schemas/components/paragraph.ts
|
|
623
|
-
import { Type as Type6 } from "@sinclair/typebox";
|
|
624
|
-
var FrameWrapTypeSchema = Type6.Union(
|
|
625
|
-
[
|
|
626
|
-
Type6.Literal("around"),
|
|
627
|
-
Type6.Literal("none"),
|
|
628
|
-
Type6.Literal("notBeside"),
|
|
629
|
-
Type6.Literal("through"),
|
|
630
|
-
Type6.Literal("tight"),
|
|
631
|
-
Type6.Literal("auto")
|
|
632
|
-
],
|
|
633
|
-
{
|
|
634
|
-
description: "Frame text wrapping type"
|
|
635
|
-
}
|
|
636
|
-
);
|
|
637
|
-
var FrameAnchorTypeSchema = Type6.Union(
|
|
638
|
-
[Type6.Literal("margin"), Type6.Literal("page"), Type6.Literal("text")],
|
|
639
|
-
{
|
|
640
|
-
description: "Frame anchor type"
|
|
641
|
-
}
|
|
642
|
-
);
|
|
643
|
-
var FrameHorizontalAlignSchema = Type6.Union(
|
|
644
|
-
[
|
|
645
|
-
Type6.Literal("left"),
|
|
646
|
-
Type6.Literal("center"),
|
|
647
|
-
Type6.Literal("right"),
|
|
648
|
-
Type6.Literal("inside"),
|
|
649
|
-
Type6.Literal("outside")
|
|
650
|
-
],
|
|
651
|
-
{
|
|
652
|
-
description: "Frame horizontal alignment"
|
|
653
|
-
}
|
|
654
|
-
);
|
|
655
|
-
var FrameVerticalAlignSchema = Type6.Union(
|
|
656
|
-
[
|
|
657
|
-
Type6.Literal("top"),
|
|
658
|
-
Type6.Literal("center"),
|
|
659
|
-
Type6.Literal("bottom"),
|
|
660
|
-
Type6.Literal("inside"),
|
|
661
|
-
Type6.Literal("outside")
|
|
662
|
-
],
|
|
663
|
-
{
|
|
664
|
-
description: "Frame vertical alignment"
|
|
665
|
-
}
|
|
666
|
-
);
|
|
667
|
-
var FloatingFramePropertiesSchema = Type6.Object(
|
|
668
|
-
{
|
|
669
|
-
horizontalPosition: Type6.Optional(
|
|
670
|
-
Type6.Object(
|
|
671
|
-
{
|
|
672
|
-
relative: Type6.Optional(FrameAnchorTypeSchema),
|
|
673
|
-
align: Type6.Optional(FrameHorizontalAlignSchema),
|
|
674
|
-
offset: Type6.Optional(
|
|
675
|
-
Type6.Union([
|
|
676
|
-
Type6.Number({
|
|
677
|
-
description: "Horizontal offset in twips (1/20 of a point)"
|
|
678
|
-
}),
|
|
679
|
-
Type6.String({
|
|
680
|
-
pattern: "^\\d+(\\.\\d+)?%$",
|
|
681
|
-
description: 'Horizontal offset as percentage (e.g., "50%") relative to page or margin width'
|
|
682
|
-
})
|
|
683
|
-
])
|
|
684
|
-
)
|
|
685
|
-
},
|
|
686
|
-
{
|
|
687
|
-
description: "Horizontal positioning (use either align or offset, not both)"
|
|
688
|
-
}
|
|
689
|
-
)
|
|
690
|
-
),
|
|
691
|
-
verticalPosition: Type6.Optional(
|
|
692
|
-
Type6.Object(
|
|
693
|
-
{
|
|
694
|
-
relative: Type6.Optional(FrameAnchorTypeSchema),
|
|
695
|
-
align: Type6.Optional(FrameVerticalAlignSchema),
|
|
696
|
-
offset: Type6.Optional(
|
|
697
|
-
Type6.Union([
|
|
698
|
-
Type6.Number({
|
|
699
|
-
description: "Vertical offset in twips (1/20 of a point)"
|
|
700
|
-
}),
|
|
701
|
-
Type6.String({
|
|
702
|
-
pattern: "^\\d+(\\.\\d+)?%$",
|
|
703
|
-
description: 'Vertical offset as percentage (e.g., "50%") relative to page or margin height'
|
|
704
|
-
})
|
|
705
|
-
])
|
|
706
|
-
)
|
|
707
|
-
},
|
|
708
|
-
{
|
|
709
|
-
description: "Vertical positioning (use either align or offset, not both)"
|
|
710
|
-
}
|
|
711
|
-
)
|
|
712
|
-
),
|
|
713
|
-
wrap: Type6.Optional(
|
|
714
|
-
Type6.Object(
|
|
715
|
-
{
|
|
716
|
-
type: FrameWrapTypeSchema
|
|
717
|
-
},
|
|
718
|
-
{
|
|
719
|
-
description: "Text wrapping configuration"
|
|
720
|
-
}
|
|
721
|
-
)
|
|
722
|
-
),
|
|
723
|
-
lockAnchor: Type6.Optional(
|
|
724
|
-
Type6.Boolean({
|
|
725
|
-
description: "Lock the anchor position"
|
|
726
|
-
})
|
|
727
|
-
),
|
|
728
|
-
width: Type6.Optional(
|
|
729
|
-
Type6.Number({
|
|
730
|
-
minimum: 1,
|
|
731
|
-
description: "Frame width in twips (DXA units)"
|
|
732
|
-
})
|
|
733
|
-
),
|
|
734
|
-
height: Type6.Optional(
|
|
735
|
-
Type6.Number({
|
|
736
|
-
minimum: 1,
|
|
737
|
-
description: "Frame height in twips (DXA units)"
|
|
738
|
-
})
|
|
739
|
-
)
|
|
740
|
-
},
|
|
741
|
-
{
|
|
742
|
-
description: "Floating text frame properties"
|
|
743
|
-
}
|
|
744
|
-
);
|
|
745
|
-
var AlignmentSchema2 = Type6.Union(
|
|
746
|
-
[
|
|
747
|
-
Type6.Literal("left"),
|
|
748
|
-
Type6.Literal("center"),
|
|
749
|
-
Type6.Literal("right"),
|
|
750
|
-
Type6.Literal("justify")
|
|
751
|
-
],
|
|
752
|
-
{
|
|
753
|
-
description: "Paragraph text alignment"
|
|
754
|
-
}
|
|
755
|
-
);
|
|
756
|
-
var ParagraphPropsSchema = Type6.Object(
|
|
757
|
-
{
|
|
758
|
-
text: Type6.String({
|
|
759
|
-
description: "Text content (required)"
|
|
760
|
-
}),
|
|
761
|
-
// New nested font object, aligned with theme's FontDefinitionSchema
|
|
762
|
-
// Allow partial overrides (family not required when overriding a subset)
|
|
763
|
-
font: Type6.Optional(Type6.Partial(FontDefinitionSchema)),
|
|
764
|
-
// Optional reference to a named style from theme.styles (e.g., 'heading1', 'normal')
|
|
765
|
-
themeStyle: Type6.Optional(Type6.String()),
|
|
766
|
-
// Rich-text decoration color for bold segments (kept as top-level behavior option)
|
|
767
|
-
boldColor: Type6.Optional(Type6.String()),
|
|
768
|
-
// Paragraph spacing (in points) — limited paragraph-level option allowed
|
|
769
|
-
spacing: Type6.Optional(SpacingSchema),
|
|
770
|
-
// Paragraph alignment (moved from font to config level)
|
|
771
|
-
alignment: Type6.Optional(AlignmentSchema2),
|
|
772
|
-
pageBreak: Type6.Optional(
|
|
773
|
-
Type6.Boolean({
|
|
774
|
-
description: "Insert page break before paragraph"
|
|
775
|
-
})
|
|
776
|
-
),
|
|
777
|
-
columnBreak: Type6.Optional(
|
|
778
|
-
Type6.Boolean({
|
|
779
|
-
description: "Insert column break before paragraph"
|
|
780
|
-
})
|
|
781
|
-
),
|
|
782
|
-
floating: Type6.Optional(FloatingFramePropertiesSchema),
|
|
783
|
-
keepNext: Type6.Optional(
|
|
784
|
-
Type6.Boolean({
|
|
785
|
-
description: "Keep paragraph with next paragraph on same page"
|
|
786
|
-
})
|
|
787
|
-
),
|
|
788
|
-
keepLines: Type6.Optional(
|
|
789
|
-
Type6.Boolean({
|
|
790
|
-
description: "Keep all lines of paragraph together on same page"
|
|
791
|
-
})
|
|
792
|
-
),
|
|
793
|
-
id: Type6.Optional(
|
|
794
|
-
Type6.String({
|
|
795
|
-
description: "Unique identifier for internal linking (bookmark anchor)"
|
|
796
|
-
})
|
|
797
|
-
)
|
|
798
|
-
},
|
|
799
|
-
{
|
|
800
|
-
description: "Paragraph component props (font nested for theme consistency; no flat font properties)",
|
|
801
|
-
additionalProperties: false
|
|
802
|
-
}
|
|
803
|
-
);
|
|
804
|
-
|
|
805
|
-
// src/schemas/components/text-box.ts
|
|
806
|
-
import { Type as Type7 } from "@sinclair/typebox";
|
|
807
|
-
var TextBoxPropsSchema = Type7.Object(
|
|
808
|
-
{
|
|
809
|
-
width: Type7.Optional(
|
|
810
|
-
Type7.Union(
|
|
811
|
-
[
|
|
812
|
-
Type7.Number({
|
|
813
|
-
minimum: 1,
|
|
814
|
-
description: "Text box width in pixels"
|
|
815
|
-
}),
|
|
816
|
-
Type7.String({
|
|
817
|
-
pattern: "^\\d+(\\.\\d+)?%$",
|
|
818
|
-
description: 'Text box width as percentage (e.g., "50%") relative to content width'
|
|
819
|
-
})
|
|
820
|
-
],
|
|
821
|
-
{
|
|
822
|
-
description: 'Text box width in pixels (number) or as percentage string (e.g., "50%")'
|
|
823
|
-
}
|
|
824
|
-
)
|
|
825
|
-
),
|
|
826
|
-
height: Type7.Optional(
|
|
827
|
-
Type7.Union(
|
|
828
|
-
[
|
|
829
|
-
Type7.Number({
|
|
830
|
-
minimum: 1,
|
|
831
|
-
description: "Text box height in pixels"
|
|
832
|
-
}),
|
|
833
|
-
Type7.String({
|
|
834
|
-
pattern: "^\\d+(\\.\\d+)?%$",
|
|
835
|
-
description: 'Text box height as percentage (e.g., "50%") relative to content height'
|
|
836
|
-
})
|
|
837
|
-
],
|
|
838
|
-
{
|
|
839
|
-
description: 'Text box height in pixels (number) or as percentage string (e.g., "50%")'
|
|
840
|
-
}
|
|
841
|
-
)
|
|
842
|
-
),
|
|
843
|
-
floating: Type7.Optional(FloatingPropertiesSchema),
|
|
844
|
-
style: Type7.Optional(
|
|
845
|
-
Type7.Object(
|
|
846
|
-
{
|
|
847
|
-
padding: Type7.Optional(
|
|
848
|
-
Type7.Object(
|
|
849
|
-
{
|
|
850
|
-
top: Type7.Optional(Type7.Number({ minimum: 0 })),
|
|
851
|
-
right: Type7.Optional(Type7.Number({ minimum: 0 })),
|
|
852
|
-
bottom: Type7.Optional(Type7.Number({ minimum: 0 })),
|
|
853
|
-
left: Type7.Optional(Type7.Number({ minimum: 0 }))
|
|
854
|
-
},
|
|
855
|
-
{ additionalProperties: false }
|
|
856
|
-
)
|
|
857
|
-
),
|
|
858
|
-
border: Type7.Optional(
|
|
859
|
-
Type7.Object(
|
|
860
|
-
{
|
|
861
|
-
top: Type7.Optional(
|
|
862
|
-
// Reuse border schema semantics: style/width/color
|
|
863
|
-
Type7.Object({
|
|
864
|
-
style: Type7.Optional(
|
|
865
|
-
Type7.Union([
|
|
866
|
-
Type7.Literal("solid"),
|
|
867
|
-
Type7.Literal("dashed"),
|
|
868
|
-
Type7.Literal("dotted"),
|
|
869
|
-
Type7.Literal("double"),
|
|
870
|
-
Type7.Literal("none")
|
|
871
|
-
])
|
|
872
|
-
),
|
|
873
|
-
width: Type7.Optional(Type7.Number({ minimum: 0 })),
|
|
874
|
-
color: Type7.Optional(HexColorSchema)
|
|
875
|
-
})
|
|
876
|
-
),
|
|
877
|
-
right: Type7.Optional(
|
|
878
|
-
Type7.Object({
|
|
879
|
-
style: Type7.Optional(
|
|
880
|
-
Type7.Union([
|
|
881
|
-
Type7.Literal("solid"),
|
|
882
|
-
Type7.Literal("dashed"),
|
|
883
|
-
Type7.Literal("dotted"),
|
|
884
|
-
Type7.Literal("double"),
|
|
885
|
-
Type7.Literal("none")
|
|
886
|
-
])
|
|
887
|
-
),
|
|
888
|
-
width: Type7.Optional(Type7.Number({ minimum: 0 })),
|
|
889
|
-
color: Type7.Optional(HexColorSchema)
|
|
890
|
-
})
|
|
891
|
-
),
|
|
892
|
-
bottom: Type7.Optional(
|
|
893
|
-
Type7.Object({
|
|
894
|
-
style: Type7.Optional(
|
|
895
|
-
Type7.Union([
|
|
896
|
-
Type7.Literal("solid"),
|
|
897
|
-
Type7.Literal("dashed"),
|
|
898
|
-
Type7.Literal("dotted"),
|
|
899
|
-
Type7.Literal("double"),
|
|
900
|
-
Type7.Literal("none")
|
|
901
|
-
])
|
|
902
|
-
),
|
|
903
|
-
width: Type7.Optional(Type7.Number({ minimum: 0 })),
|
|
904
|
-
color: Type7.Optional(HexColorSchema)
|
|
905
|
-
})
|
|
906
|
-
),
|
|
907
|
-
left: Type7.Optional(
|
|
908
|
-
Type7.Object({
|
|
909
|
-
style: Type7.Optional(
|
|
910
|
-
Type7.Union([
|
|
911
|
-
Type7.Literal("solid"),
|
|
912
|
-
Type7.Literal("dashed"),
|
|
913
|
-
Type7.Literal("dotted"),
|
|
914
|
-
Type7.Literal("double"),
|
|
915
|
-
Type7.Literal("none")
|
|
916
|
-
])
|
|
917
|
-
),
|
|
918
|
-
width: Type7.Optional(Type7.Number({ minimum: 0 })),
|
|
919
|
-
color: Type7.Optional(HexColorSchema)
|
|
920
|
-
})
|
|
921
|
-
)
|
|
922
|
-
},
|
|
923
|
-
{ additionalProperties: false }
|
|
924
|
-
)
|
|
925
|
-
),
|
|
926
|
-
shading: Type7.Optional(
|
|
927
|
-
Type7.Object(
|
|
928
|
-
{
|
|
929
|
-
fill: Type7.Optional(Type7.String())
|
|
930
|
-
},
|
|
931
|
-
{ additionalProperties: false }
|
|
932
|
-
)
|
|
933
|
-
)
|
|
934
|
-
},
|
|
935
|
-
{ additionalProperties: false }
|
|
936
|
-
)
|
|
937
|
-
)
|
|
938
|
-
},
|
|
939
|
-
{ additionalProperties: false }
|
|
940
|
-
);
|
|
941
|
-
|
|
942
|
-
// src/schemas/components/image.ts
|
|
943
|
-
import { Type as Type8 } from "@sinclair/typebox";
|
|
944
|
-
var ImagePropsSchema = Type8.Object(
|
|
945
|
-
{
|
|
946
|
-
path: Type8.Optional(
|
|
947
|
-
Type8.String({
|
|
948
|
-
description: "Image source URL or file path (mutually exclusive with base64)"
|
|
949
|
-
})
|
|
950
|
-
),
|
|
951
|
-
base64: Type8.Optional(
|
|
952
|
-
Type8.String({
|
|
953
|
-
description: 'Base64-encoded image data in data URI format (e.g., "data:image/png;base64,iVBORw0KGgo...") (mutually exclusive with path)'
|
|
954
|
-
})
|
|
955
|
-
),
|
|
956
|
-
alt: Type8.Optional(
|
|
957
|
-
Type8.String({
|
|
958
|
-
description: "Alternative text for accessibility"
|
|
959
|
-
})
|
|
960
|
-
),
|
|
961
|
-
width: Type8.Optional(
|
|
962
|
-
Type8.Union(
|
|
963
|
-
[
|
|
964
|
-
Type8.Number({
|
|
965
|
-
minimum: 1,
|
|
966
|
-
description: "Image width in pixels"
|
|
967
|
-
}),
|
|
968
|
-
Type8.String({
|
|
969
|
-
pattern: "^\\d+(\\.\\d+)?%$",
|
|
970
|
-
description: 'Image width as percentage (e.g., "90%") relative to widthRelativeTo (defaults to content width)'
|
|
971
|
-
})
|
|
972
|
-
],
|
|
973
|
-
{
|
|
974
|
-
description: 'Image width in pixels (number) or as percentage string (e.g., "90%")',
|
|
975
|
-
default: "100%"
|
|
976
|
-
}
|
|
977
|
-
)
|
|
978
|
-
),
|
|
979
|
-
height: Type8.Optional(
|
|
980
|
-
Type8.Union(
|
|
981
|
-
[
|
|
982
|
-
Type8.Number({
|
|
983
|
-
minimum: 1,
|
|
984
|
-
description: "Image height in pixels"
|
|
985
|
-
}),
|
|
986
|
-
Type8.String({
|
|
987
|
-
pattern: "^\\d+(\\.\\d+)?%$",
|
|
988
|
-
description: 'Image height as percentage (e.g., "90%") relative to heightRelativeTo (defaults to content height)'
|
|
989
|
-
})
|
|
990
|
-
],
|
|
991
|
-
{
|
|
992
|
-
description: 'Image height in pixels (number) or as percentage string (e.g., "90%")'
|
|
993
|
-
}
|
|
994
|
-
)
|
|
995
|
-
),
|
|
996
|
-
widthRelativeTo: Type8.Optional(
|
|
997
|
-
Type8.Union([Type8.Literal("content"), Type8.Literal("page")], {
|
|
998
|
-
description: "Reference for width percentages: content (page width minus margins) or page (full page width)",
|
|
999
|
-
default: "content"
|
|
1000
|
-
})
|
|
1001
|
-
),
|
|
1002
|
-
heightRelativeTo: Type8.Optional(
|
|
1003
|
-
Type8.Union([Type8.Literal("content"), Type8.Literal("page")], {
|
|
1004
|
-
description: "Reference for height percentages: content (page height minus margins) or page (full page height)",
|
|
1005
|
-
default: "content"
|
|
1006
|
-
})
|
|
1007
|
-
),
|
|
1008
|
-
alignment: Type8.Optional(AlignmentSchema),
|
|
1009
|
-
caption: Type8.Optional(
|
|
1010
|
-
Type8.String({
|
|
1011
|
-
description: "Image caption (supports rich text with **bold**, *italic*, ***both***)"
|
|
1012
|
-
})
|
|
1013
|
-
),
|
|
1014
|
-
spacing: Type8.Optional(SpacingSchema),
|
|
1015
|
-
floating: Type8.Optional(FloatingPropertiesSchema),
|
|
1016
|
-
keepNext: Type8.Optional(
|
|
1017
|
-
Type8.Boolean({
|
|
1018
|
-
description: "Keep paragraph with next paragraph on same page"
|
|
1019
|
-
})
|
|
1020
|
-
),
|
|
1021
|
-
keepLines: Type8.Optional(
|
|
1022
|
-
Type8.Boolean({
|
|
1023
|
-
description: "Keep all lines of paragraph together on same page"
|
|
1024
|
-
})
|
|
1025
|
-
)
|
|
1026
|
-
},
|
|
1027
|
-
{
|
|
1028
|
-
description: "Image component props",
|
|
1029
|
-
additionalProperties: false
|
|
1030
|
-
}
|
|
1031
|
-
);
|
|
1032
|
-
|
|
1033
|
-
// src/schemas/components/statistic.ts
|
|
1034
|
-
import { Type as Type9 } from "@sinclair/typebox";
|
|
1035
|
-
var StatisticPropsSchema = Type9.Object(
|
|
1036
|
-
{
|
|
1037
|
-
number: Type9.String({
|
|
1038
|
-
description: "Statistic number/value (required)"
|
|
1039
|
-
}),
|
|
1040
|
-
description: Type9.String({
|
|
1041
|
-
description: "Statistic description (required)"
|
|
1042
|
-
}),
|
|
1043
|
-
unit: Type9.Optional(
|
|
1044
|
-
Type9.String({
|
|
1045
|
-
description: "Unit of measurement"
|
|
1046
|
-
})
|
|
1047
|
-
),
|
|
1048
|
-
format: Type9.Optional(
|
|
1049
|
-
Type9.String({
|
|
1050
|
-
description: "Number format pattern"
|
|
1051
|
-
})
|
|
1052
|
-
),
|
|
1053
|
-
trend: Type9.Optional(
|
|
1054
|
-
Type9.Union([
|
|
1055
|
-
Type9.Literal("up"),
|
|
1056
|
-
Type9.Literal("down"),
|
|
1057
|
-
Type9.Literal("neutral")
|
|
1058
|
-
])
|
|
1059
|
-
),
|
|
1060
|
-
trendValue: Type9.Optional(Type9.Union([Type9.String(), Type9.Number()])),
|
|
1061
|
-
alignment: Type9.Optional(AlignmentSchema),
|
|
1062
|
-
spacing: Type9.Optional(SpacingSchema),
|
|
1063
|
-
size: Type9.Optional(
|
|
1064
|
-
Type9.Union([
|
|
1065
|
-
Type9.Literal("small"),
|
|
1066
|
-
Type9.Literal("medium"),
|
|
1067
|
-
Type9.Literal("large")
|
|
1068
|
-
])
|
|
1069
|
-
)
|
|
1070
|
-
},
|
|
1071
|
-
{
|
|
1072
|
-
description: "Statistic component props",
|
|
1073
|
-
additionalProperties: false
|
|
1074
|
-
}
|
|
1075
|
-
);
|
|
1076
|
-
|
|
1077
|
-
// src/schemas/components/table.ts
|
|
1078
|
-
import { Type as Type10 } from "@sinclair/typebox";
|
|
1079
|
-
var CellContentSchema = Type10.Recursive(
|
|
1080
|
-
(This) => Type10.Union([
|
|
1081
|
-
Type10.String(),
|
|
1082
|
-
Type10.Object(
|
|
1083
|
-
{
|
|
1084
|
-
name: Type10.String(),
|
|
1085
|
-
props: Type10.Object({}, { additionalProperties: true }),
|
|
1086
|
-
children: Type10.Optional(Type10.Array(This))
|
|
1087
|
-
},
|
|
1088
|
-
{ additionalProperties: false }
|
|
1089
|
-
)
|
|
1090
|
-
])
|
|
1091
|
-
);
|
|
1092
|
-
var HorizontalAlignmentSchema = Type10.Union(
|
|
1093
|
-
[
|
|
1094
|
-
Type10.Literal("left"),
|
|
1095
|
-
Type10.Literal("center"),
|
|
1096
|
-
Type10.Literal("right"),
|
|
1097
|
-
Type10.Literal("justify")
|
|
1098
|
-
],
|
|
1099
|
-
{ description: "Horizontal text alignment" }
|
|
1100
|
-
);
|
|
1101
|
-
var VerticalAlignmentSchema = Type10.Union(
|
|
1102
|
-
[Type10.Literal("top"), Type10.Literal("middle"), Type10.Literal("bottom")],
|
|
1103
|
-
{ description: "Vertical cell alignment" }
|
|
1104
|
-
);
|
|
1105
|
-
var FontConfigSchema = Type10.Object({
|
|
1106
|
-
family: Type10.Optional(Type10.String({ description: "Font family name" })),
|
|
1107
|
-
size: Type10.Optional(
|
|
1108
|
-
Type10.Number({ minimum: 0, description: "Font size in points" })
|
|
1109
|
-
),
|
|
1110
|
-
bold: Type10.Optional(Type10.Boolean({ description: "Bold text" })),
|
|
1111
|
-
italic: Type10.Optional(Type10.Boolean({ description: "Italic text" })),
|
|
1112
|
-
underline: Type10.Optional(Type10.Boolean({ description: "Underlined text" }))
|
|
1113
|
-
});
|
|
1114
|
-
var BorderColorSchema = Type10.Union([
|
|
1115
|
-
Type10.String({ description: "Border color for all sides (hex without #)" }),
|
|
1116
|
-
Type10.Object({
|
|
1117
|
-
bottom: Type10.Optional(
|
|
1118
|
-
Type10.String({ description: "Bottom border color (hex without #)" })
|
|
1119
|
-
),
|
|
1120
|
-
top: Type10.Optional(
|
|
1121
|
-
Type10.String({ description: "Top border color (hex without #)" })
|
|
1122
|
-
),
|
|
1123
|
-
right: Type10.Optional(
|
|
1124
|
-
Type10.String({ description: "Right border color (hex without #)" })
|
|
1125
|
-
),
|
|
1126
|
-
left: Type10.Optional(
|
|
1127
|
-
Type10.String({ description: "Left border color (hex without #)" })
|
|
1128
|
-
)
|
|
1129
|
-
})
|
|
1130
|
-
]);
|
|
1131
|
-
var BorderSizeSchema = Type10.Union([
|
|
1132
|
-
Type10.Number({
|
|
1133
|
-
minimum: 0,
|
|
1134
|
-
description: "Border size for all sides in points"
|
|
1135
|
-
}),
|
|
1136
|
-
Type10.Object({
|
|
1137
|
-
bottom: Type10.Optional(
|
|
1138
|
-
Type10.Number({ minimum: 0, description: "Bottom border size in points" })
|
|
1139
|
-
),
|
|
1140
|
-
top: Type10.Optional(
|
|
1141
|
-
Type10.Number({ minimum: 0, description: "Top border size in points" })
|
|
1142
|
-
),
|
|
1143
|
-
right: Type10.Optional(
|
|
1144
|
-
Type10.Number({ minimum: 0, description: "Right border size in points" })
|
|
1145
|
-
),
|
|
1146
|
-
left: Type10.Optional(
|
|
1147
|
-
Type10.Number({ minimum: 0, description: "Left border size in points" })
|
|
1148
|
-
)
|
|
1149
|
-
})
|
|
1150
|
-
]);
|
|
1151
|
-
var HideBordersSchema = Type10.Union([
|
|
1152
|
-
Type10.Boolean({
|
|
1153
|
-
description: "Hide all borders when true"
|
|
1154
|
-
}),
|
|
1155
|
-
Type10.Object(
|
|
1156
|
-
{
|
|
1157
|
-
bottom: Type10.Optional(
|
|
1158
|
-
Type10.Boolean({ description: "Hide bottom border" })
|
|
1159
|
-
),
|
|
1160
|
-
top: Type10.Optional(Type10.Boolean({ description: "Hide top border" })),
|
|
1161
|
-
right: Type10.Optional(Type10.Boolean({ description: "Hide right border" })),
|
|
1162
|
-
left: Type10.Optional(Type10.Boolean({ description: "Hide left border" })),
|
|
1163
|
-
insideHorizontal: Type10.Optional(
|
|
1164
|
-
Type10.Boolean({ description: "Hide horizontal borders between rows" })
|
|
1165
|
-
),
|
|
1166
|
-
insideVertical: Type10.Optional(
|
|
1167
|
-
Type10.Boolean({ description: "Hide vertical borders between columns" })
|
|
1168
|
-
)
|
|
1169
|
-
},
|
|
1170
|
-
{ description: "Selectively hide specific borders" }
|
|
1171
|
-
)
|
|
1172
|
-
]);
|
|
1173
|
-
var PaddingSchema = Type10.Union([
|
|
1174
|
-
Type10.Number({ minimum: 0, description: "Padding for all sides in points" }),
|
|
1175
|
-
Type10.Object({
|
|
1176
|
-
bottom: Type10.Optional(
|
|
1177
|
-
Type10.Number({ minimum: 0, description: "Bottom padding in points" })
|
|
1178
|
-
),
|
|
1179
|
-
top: Type10.Optional(
|
|
1180
|
-
Type10.Number({ minimum: 0, description: "Top padding in points" })
|
|
1181
|
-
),
|
|
1182
|
-
right: Type10.Optional(
|
|
1183
|
-
Type10.Number({ minimum: 0, description: "Right padding in points" })
|
|
1184
|
-
),
|
|
1185
|
-
left: Type10.Optional(
|
|
1186
|
-
Type10.Number({ minimum: 0, description: "Left padding in points" })
|
|
1187
|
-
)
|
|
1188
|
-
})
|
|
1189
|
-
]);
|
|
1190
|
-
var CellDefaultsSchema = Type10.Object({
|
|
1191
|
-
color: Type10.Optional(HexColorSchema),
|
|
1192
|
-
backgroundColor: Type10.Optional(HexColorOrTransparentSchema),
|
|
1193
|
-
horizontalAlignment: Type10.Optional(HorizontalAlignmentSchema),
|
|
1194
|
-
verticalAlignment: Type10.Optional(VerticalAlignmentSchema),
|
|
1195
|
-
font: Type10.Optional(FontConfigSchema),
|
|
1196
|
-
borderColor: Type10.Optional(BorderColorSchema),
|
|
1197
|
-
borderSize: Type10.Optional(BorderSizeSchema),
|
|
1198
|
-
padding: Type10.Optional(PaddingSchema),
|
|
1199
|
-
height: Type10.Optional(
|
|
1200
|
-
Type10.Number({ minimum: 0, description: "Cell height in points" })
|
|
1201
|
-
)
|
|
1202
|
-
});
|
|
1203
|
-
function createTablePropsSchema(componentRef) {
|
|
1204
|
-
const cellContent = Type10.Union([Type10.String(), componentRef]);
|
|
1205
|
-
const cellFields = {
|
|
1206
|
-
color: Type10.Optional(HexColorSchema),
|
|
1207
|
-
backgroundColor: Type10.Optional(HexColorOrTransparentSchema),
|
|
1208
|
-
horizontalAlignment: Type10.Optional(HorizontalAlignmentSchema),
|
|
1209
|
-
verticalAlignment: Type10.Optional(VerticalAlignmentSchema),
|
|
1210
|
-
font: Type10.Optional(FontConfigSchema),
|
|
1211
|
-
borderColor: Type10.Optional(BorderColorSchema),
|
|
1212
|
-
borderSize: Type10.Optional(BorderSizeSchema),
|
|
1213
|
-
padding: Type10.Optional(PaddingSchema),
|
|
1214
|
-
height: Type10.Optional(
|
|
1215
|
-
Type10.Number({ minimum: 0, description: "Cell height in points" })
|
|
1216
|
-
)
|
|
1217
|
-
};
|
|
1218
|
-
const headerSchema = Type10.Object({
|
|
1219
|
-
...cellFields,
|
|
1220
|
-
content: Type10.Optional(cellContent)
|
|
1221
|
-
});
|
|
1222
|
-
const cellSchema = Type10.Object({
|
|
1223
|
-
...cellFields,
|
|
1224
|
-
content: Type10.Optional(cellContent)
|
|
1225
|
-
});
|
|
1226
|
-
const columnSchema = Type10.Object({
|
|
1227
|
-
width: Type10.Optional(
|
|
1228
|
-
Type10.Union([
|
|
1229
|
-
Type10.Number({
|
|
1230
|
-
minimum: 0,
|
|
1231
|
-
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."
|
|
1232
|
-
}),
|
|
1233
|
-
Type10.String({
|
|
1234
|
-
pattern: "^\\d+(\\.\\d+)?%$",
|
|
1235
|
-
description: 'Column width as percentage of available width (e.g., "40%")'
|
|
1236
|
-
})
|
|
1237
|
-
])
|
|
1238
|
-
),
|
|
1239
|
-
cellDefaults: Type10.Optional(CellDefaultsSchema),
|
|
1240
|
-
header: Type10.Optional(headerSchema),
|
|
1241
|
-
cells: Type10.Optional(Type10.Array(cellSchema))
|
|
1242
|
-
});
|
|
1243
|
-
return Type10.Object(
|
|
1244
|
-
{
|
|
1245
|
-
borderColor: Type10.Optional(BorderColorSchema),
|
|
1246
|
-
borderSize: Type10.Optional(BorderSizeSchema),
|
|
1247
|
-
hideBorders: Type10.Optional(HideBordersSchema),
|
|
1248
|
-
cellDefaults: Type10.Optional(CellDefaultsSchema),
|
|
1249
|
-
headerCellDefaults: Type10.Optional(CellDefaultsSchema),
|
|
1250
|
-
width: Type10.Optional(
|
|
1251
|
-
Type10.Number({
|
|
1252
|
-
minimum: 0,
|
|
1253
|
-
maximum: 100,
|
|
1254
|
-
description: "Table width in percentage (0-100)"
|
|
1255
|
-
})
|
|
1256
|
-
),
|
|
1257
|
-
columns: Type10.Array(columnSchema, {
|
|
1258
|
-
description: "Table columns with headers and cells",
|
|
1259
|
-
minItems: 1
|
|
1260
|
-
}),
|
|
1261
|
-
keepInOnePage: Type10.Optional(
|
|
1262
|
-
Type10.Boolean({
|
|
1263
|
-
description: "Keep table rows together on the same page by setting keepNext on all paragraphs"
|
|
1264
|
-
})
|
|
1265
|
-
),
|
|
1266
|
-
keepNext: Type10.Optional(
|
|
1267
|
-
Type10.Boolean({
|
|
1268
|
-
description: "Set keepNext on the last row to keep it connected to the next element. Works independently of keepInOnePage. Defaults to false."
|
|
1269
|
-
})
|
|
1270
|
-
),
|
|
1271
|
-
repeatHeaderOnPageBreak: Type10.Optional(
|
|
1272
|
-
Type10.Boolean({
|
|
1273
|
-
description: "Repeat the header row on each page when the table spans multiple pages. Defaults to false.",
|
|
1274
|
-
default: true
|
|
1275
|
-
})
|
|
1276
|
-
)
|
|
1277
|
-
},
|
|
1278
|
-
{
|
|
1279
|
-
description: "Table component props with column-based structure"
|
|
1280
|
-
}
|
|
1281
|
-
);
|
|
1282
|
-
}
|
|
1283
|
-
var TablePropsSchema = createTablePropsSchema(CellContentSchema);
|
|
1284
|
-
|
|
1285
|
-
// src/schemas/components/list.ts
|
|
1286
|
-
import { Type as Type11 } from "@sinclair/typebox";
|
|
1287
|
-
var LevelFormatSchema = Type11.Union(
|
|
1288
|
-
[
|
|
1289
|
-
Type11.Literal("decimal"),
|
|
1290
|
-
Type11.Literal("upperRoman"),
|
|
1291
|
-
Type11.Literal("lowerRoman"),
|
|
1292
|
-
Type11.Literal("upperLetter"),
|
|
1293
|
-
Type11.Literal("lowerLetter"),
|
|
1294
|
-
Type11.Literal("bullet"),
|
|
1295
|
-
Type11.Literal("ordinal"),
|
|
1296
|
-
Type11.Literal("cardinalText"),
|
|
1297
|
-
Type11.Literal("ordinalText"),
|
|
1298
|
-
Type11.Literal("hex"),
|
|
1299
|
-
Type11.Literal("chicago"),
|
|
1300
|
-
Type11.Literal("ideographDigital"),
|
|
1301
|
-
Type11.Literal("japaneseCounting"),
|
|
1302
|
-
Type11.Literal("aiueo"),
|
|
1303
|
-
Type11.Literal("iroha"),
|
|
1304
|
-
Type11.Literal("decimalFullWidth"),
|
|
1305
|
-
Type11.Literal("decimalHalfWidth"),
|
|
1306
|
-
Type11.Literal("japaneseLegal"),
|
|
1307
|
-
Type11.Literal("japaneseDigitalTenThousand"),
|
|
1308
|
-
Type11.Literal("decimalEnclosedCircle"),
|
|
1309
|
-
Type11.Literal("decimalFullWidth2"),
|
|
1310
|
-
Type11.Literal("aiueoFullWidth"),
|
|
1311
|
-
Type11.Literal("irohaFullWidth"),
|
|
1312
|
-
Type11.Literal("decimalZero"),
|
|
1313
|
-
Type11.Literal("ganada"),
|
|
1314
|
-
Type11.Literal("chosung"),
|
|
1315
|
-
Type11.Literal("decimalEnclosedFullstop"),
|
|
1316
|
-
Type11.Literal("decimalEnclosedParen"),
|
|
1317
|
-
Type11.Literal("decimalEnclosedCircleChinese"),
|
|
1318
|
-
Type11.Literal("ideographEnclosedCircle"),
|
|
1319
|
-
Type11.Literal("ideographTraditional"),
|
|
1320
|
-
Type11.Literal("ideographZodiac"),
|
|
1321
|
-
Type11.Literal("ideographZodiacTraditional"),
|
|
1322
|
-
Type11.Literal("taiwaneseCounting"),
|
|
1323
|
-
Type11.Literal("ideographLegalTraditional"),
|
|
1324
|
-
Type11.Literal("taiwaneseCountingThousand"),
|
|
1325
|
-
Type11.Literal("taiwaneseDigital"),
|
|
1326
|
-
Type11.Literal("chineseCounting"),
|
|
1327
|
-
Type11.Literal("chineseLegalSimplified"),
|
|
1328
|
-
Type11.Literal("chineseCountingThousand"),
|
|
1329
|
-
Type11.Literal("koreanDigital"),
|
|
1330
|
-
Type11.Literal("koreanCounting"),
|
|
1331
|
-
Type11.Literal("koreanLegal"),
|
|
1332
|
-
Type11.Literal("koreanDigital2"),
|
|
1333
|
-
Type11.Literal("vietnameseCounting"),
|
|
1334
|
-
Type11.Literal("russianLower"),
|
|
1335
|
-
Type11.Literal("russianUpper"),
|
|
1336
|
-
Type11.Literal("none"),
|
|
1337
|
-
Type11.Literal("numberInDash"),
|
|
1338
|
-
Type11.Literal("hebrew1"),
|
|
1339
|
-
Type11.Literal("hebrew2"),
|
|
1340
|
-
Type11.Literal("arabicAlpha"),
|
|
1341
|
-
Type11.Literal("arabicAbjad"),
|
|
1342
|
-
Type11.Literal("hindiVowels"),
|
|
1343
|
-
Type11.Literal("hindiConsonants"),
|
|
1344
|
-
Type11.Literal("hindiNumbers"),
|
|
1345
|
-
Type11.Literal("hindiCounting"),
|
|
1346
|
-
Type11.Literal("thaiLetters"),
|
|
1347
|
-
Type11.Literal("thaiNumbers"),
|
|
1348
|
-
Type11.Literal("thaiCounting")
|
|
1349
|
-
],
|
|
1350
|
-
{
|
|
1351
|
-
description: "Number or bullet format for list levels"
|
|
1352
|
-
}
|
|
1353
|
-
);
|
|
1354
|
-
var ListLevelPropsSchema = Type11.Object(
|
|
1355
|
-
{
|
|
1356
|
-
level: Type11.Number({
|
|
1357
|
-
minimum: 0,
|
|
1358
|
-
maximum: 8,
|
|
1359
|
-
description: "Nesting level (0 = root, 1 = first sublevel, etc.)"
|
|
1360
|
-
}),
|
|
1361
|
-
format: Type11.Optional(LevelFormatSchema),
|
|
1362
|
-
text: Type11.Optional(
|
|
1363
|
-
Type11.String({
|
|
1364
|
-
description: 'Number format string (e.g., "%1." for "1.", "%1)" for "1)", custom bullet character for bullet format)'
|
|
1365
|
-
})
|
|
1366
|
-
),
|
|
1367
|
-
alignment: Type11.Optional(
|
|
1368
|
-
Type11.Union(
|
|
1369
|
-
[
|
|
1370
|
-
Type11.Literal("start"),
|
|
1371
|
-
Type11.Literal("end"),
|
|
1372
|
-
Type11.Literal("left"),
|
|
1373
|
-
Type11.Literal("right"),
|
|
1374
|
-
Type11.Literal("center")
|
|
1375
|
-
],
|
|
1376
|
-
{
|
|
1377
|
-
description: "Alignment of the numbering/bullet"
|
|
1378
|
-
}
|
|
1379
|
-
)
|
|
1380
|
-
),
|
|
1381
|
-
indent: Type11.Optional(IndentSchema),
|
|
1382
|
-
start: Type11.Optional(
|
|
1383
|
-
Type11.Number({
|
|
1384
|
-
minimum: 1,
|
|
1385
|
-
description: "Starting number for this level (default: 1)"
|
|
1386
|
-
})
|
|
1387
|
-
)
|
|
1388
|
-
},
|
|
1389
|
-
{
|
|
1390
|
-
description: "Configuration for a single list level"
|
|
1391
|
-
}
|
|
1392
|
-
);
|
|
1393
|
-
var ListPropsSchema = Type11.Object(
|
|
1394
|
-
{
|
|
1395
|
-
items: Type11.Array(
|
|
1396
|
-
Type11.Union([
|
|
1397
|
-
Type11.String(),
|
|
1398
|
-
Type11.Object({
|
|
1399
|
-
text: Type11.String(),
|
|
1400
|
-
level: Type11.Optional(
|
|
1401
|
-
Type11.Number({
|
|
1402
|
-
minimum: 0,
|
|
1403
|
-
maximum: 8,
|
|
1404
|
-
description: "Nesting level for this item"
|
|
1405
|
-
})
|
|
1406
|
-
)
|
|
1407
|
-
})
|
|
1408
|
-
]),
|
|
1409
|
-
{
|
|
1410
|
-
description: "List items (required)",
|
|
1411
|
-
minItems: 1
|
|
1412
|
-
}
|
|
1413
|
-
),
|
|
1414
|
-
reference: Type11.Optional(
|
|
1415
|
-
Type11.String({
|
|
1416
|
-
description: "Unique reference ID for this numbering configuration (auto-generated if not provided)"
|
|
1417
|
-
})
|
|
1418
|
-
),
|
|
1419
|
-
levels: Type11.Optional(
|
|
1420
|
-
Type11.Array(ListLevelPropsSchema, {
|
|
1421
|
-
description: "Configuration for each nesting level",
|
|
1422
|
-
minItems: 1,
|
|
1423
|
-
maxItems: 9
|
|
1424
|
-
})
|
|
1425
|
-
),
|
|
1426
|
-
// Simplified options for common use cases (when levels not specified)
|
|
1427
|
-
format: Type11.Optional(
|
|
1428
|
-
Type11.Union(
|
|
1429
|
-
[LevelFormatSchema, Type11.Literal("numbered"), Type11.Literal("none")],
|
|
1430
|
-
{
|
|
1431
|
-
description: "Format for level 0 (simplified option when levels not specified)"
|
|
1432
|
-
}
|
|
1433
|
-
)
|
|
1434
|
-
),
|
|
1435
|
-
bullet: Type11.Optional(
|
|
1436
|
-
Type11.String({
|
|
1437
|
-
description: "Custom bullet character (simplified option when levels not specified)"
|
|
1438
|
-
})
|
|
1439
|
-
),
|
|
1440
|
-
start: Type11.Optional(
|
|
1441
|
-
Type11.Number({
|
|
1442
|
-
minimum: 1,
|
|
1443
|
-
description: "Starting number for level 0 (simplified option when levels not specified)"
|
|
1444
|
-
})
|
|
1445
|
-
),
|
|
1446
|
-
spacing: Type11.Optional(ListSpacingSchema),
|
|
1447
|
-
alignment: Type11.Optional(JustifiedAlignmentSchema),
|
|
1448
|
-
indent: Type11.Optional(
|
|
1449
|
-
Type11.Union([Type11.Number({ minimum: 0 }), IndentSchema])
|
|
1450
|
-
)
|
|
1451
|
-
},
|
|
1452
|
-
{
|
|
1453
|
-
description: "List component props",
|
|
1454
|
-
additionalProperties: false
|
|
1455
|
-
}
|
|
1456
|
-
);
|
|
1457
|
-
|
|
1458
|
-
// src/schemas/components/toc.ts
|
|
1459
|
-
import { Type as Type12 } from "@sinclair/typebox";
|
|
1460
|
-
var TocStyleSchema = Type12.Union(
|
|
1461
|
-
[Type12.Literal("numeric"), Type12.Literal("bullet"), Type12.Literal("none")],
|
|
1462
|
-
{ description: "TOC numbering style" }
|
|
1463
|
-
);
|
|
1464
|
-
var TocScopeSchema = Type12.Union(
|
|
1465
|
-
[Type12.Literal("document"), Type12.Literal("section")],
|
|
1466
|
-
{ description: "TOC scope: document-wide or section-only" }
|
|
1467
|
-
);
|
|
1468
|
-
var TocStyleMappingSchema = Type12.Object(
|
|
1469
|
-
{
|
|
1470
|
-
styleId: Type12.String({
|
|
1471
|
-
description: "Custom style ID matching a key in theme.styles"
|
|
1472
|
-
}),
|
|
1473
|
-
level: Type12.Number({
|
|
1474
|
-
minimum: 1,
|
|
1475
|
-
maximum: 6,
|
|
1476
|
-
description: "TOC level (1-6) to assign to this style"
|
|
1477
|
-
})
|
|
1478
|
-
},
|
|
1479
|
-
{
|
|
1480
|
-
description: "Mapping of custom style to TOC level",
|
|
1481
|
-
additionalProperties: false
|
|
1482
|
-
}
|
|
1483
|
-
);
|
|
1484
|
-
var TocDepthRangeSchema = Type12.Object(
|
|
1485
|
-
{
|
|
1486
|
-
from: Type12.Optional(
|
|
1487
|
-
Type12.Number({
|
|
1488
|
-
minimum: 1,
|
|
1489
|
-
maximum: 6,
|
|
1490
|
-
default: 1,
|
|
1491
|
-
description: "Starting heading level (1-6). Defaults to 1 if not specified."
|
|
1492
|
-
})
|
|
1493
|
-
),
|
|
1494
|
-
to: Type12.Optional(
|
|
1495
|
-
Type12.Number({
|
|
1496
|
-
minimum: 1,
|
|
1497
|
-
maximum: 6,
|
|
1498
|
-
default: 3,
|
|
1499
|
-
description: "Ending heading level (1-6). Defaults to 3 if not specified."
|
|
1500
|
-
})
|
|
1501
|
-
)
|
|
1502
|
-
},
|
|
1503
|
-
{
|
|
1504
|
-
description: 'Range of heading levels to include in TOC. Specify at least one of "from" or "to".',
|
|
1505
|
-
additionalProperties: false
|
|
1506
|
-
}
|
|
1507
|
-
);
|
|
1508
|
-
var TocPropsSchema = Type12.Object(
|
|
1509
|
-
{
|
|
1510
|
-
pageBreak: Type12.Optional(
|
|
1511
|
-
Type12.Boolean({
|
|
1512
|
-
description: "Insert page break before TOC block"
|
|
1513
|
-
})
|
|
1514
|
-
),
|
|
1515
|
-
depth: Type12.Optional(
|
|
1516
|
-
Type12.Object(
|
|
1517
|
-
{
|
|
1518
|
-
from: Type12.Optional(
|
|
1519
|
-
Type12.Number({
|
|
1520
|
-
minimum: 1,
|
|
1521
|
-
maximum: 6,
|
|
1522
|
-
default: 1,
|
|
1523
|
-
description: "Starting heading level (1-6). Defaults to 1 if not specified."
|
|
1524
|
-
})
|
|
1525
|
-
),
|
|
1526
|
-
to: Type12.Optional(
|
|
1527
|
-
Type12.Number({
|
|
1528
|
-
minimum: 1,
|
|
1529
|
-
maximum: 6,
|
|
1530
|
-
default: 3,
|
|
1531
|
-
description: "Ending heading level (1-6). Defaults to 3 if not specified."
|
|
1532
|
-
})
|
|
1533
|
-
)
|
|
1534
|
-
},
|
|
1535
|
-
{
|
|
1536
|
-
description: 'Range of heading levels to include in TOC. Specify "from", "to", or both. Defaults: from=1, to=3',
|
|
1537
|
-
additionalProperties: false,
|
|
1538
|
-
default: { to: 3 }
|
|
1539
|
-
}
|
|
1540
|
-
)
|
|
1541
|
-
),
|
|
1542
|
-
pageNumbersDepth: Type12.Optional(
|
|
1543
|
-
Type12.Object(
|
|
1544
|
-
{
|
|
1545
|
-
from: Type12.Optional(
|
|
1546
|
-
Type12.Number({
|
|
1547
|
-
minimum: 1,
|
|
1548
|
-
maximum: 6,
|
|
1549
|
-
default: 1,
|
|
1550
|
-
description: "Starting heading level (1-6). Defaults to 1 if not specified."
|
|
1551
|
-
})
|
|
1552
|
-
),
|
|
1553
|
-
to: Type12.Optional(
|
|
1554
|
-
Type12.Number({
|
|
1555
|
-
minimum: 1,
|
|
1556
|
-
maximum: 6,
|
|
1557
|
-
default: 3,
|
|
1558
|
-
description: "Ending heading level (1-6). Defaults to 3 if not specified."
|
|
1559
|
-
})
|
|
1560
|
-
)
|
|
1561
|
-
},
|
|
1562
|
-
{
|
|
1563
|
-
description: 'Range of heading levels to show page numbers. Specify "from", "to", or both. When specified, page numbers are hidden for entries outside this range.',
|
|
1564
|
-
additionalProperties: false
|
|
1565
|
-
}
|
|
1566
|
-
)
|
|
1567
|
-
),
|
|
1568
|
-
numberingStyle: Type12.Optional(TocStyleSchema),
|
|
1569
|
-
title: Type12.Optional(
|
|
1570
|
-
Type12.String({
|
|
1571
|
-
description: "TOC heading title"
|
|
1572
|
-
})
|
|
1573
|
-
),
|
|
1574
|
-
includePageNumbers: Type12.Optional(
|
|
1575
|
-
Type12.Boolean({
|
|
1576
|
-
default: true,
|
|
1577
|
-
description: "Show page numbers next to entries"
|
|
1578
|
-
})
|
|
1579
|
-
),
|
|
1580
|
-
numberSeparator: Type12.Optional(
|
|
1581
|
-
Type12.Boolean({
|
|
1582
|
-
default: true,
|
|
1583
|
-
description: 'Use tab separator between entry and page number. True applies "\\t" (default), false applies " "'
|
|
1584
|
-
})
|
|
1585
|
-
),
|
|
1586
|
-
scope: Type12.Optional(
|
|
1587
|
-
Type12.Union([TocScopeSchema, Type12.Literal("auto")], {
|
|
1588
|
-
default: "auto",
|
|
1589
|
-
description: 'TOC scope: "document" for entire document, "section" for parent section only, "auto" for automatic detection (section if inside section, otherwise document)'
|
|
1590
|
-
})
|
|
1591
|
-
),
|
|
1592
|
-
styles: Type12.Optional(
|
|
1593
|
-
Type12.Array(TocStyleMappingSchema, {
|
|
1594
|
-
description: "Custom style mappings for TOC entries. Maps custom theme styles to TOC levels."
|
|
1595
|
-
})
|
|
1596
|
-
)
|
|
1597
|
-
},
|
|
1598
|
-
{
|
|
1599
|
-
description: "Table of Contents component props",
|
|
1600
|
-
additionalProperties: false
|
|
1601
|
-
}
|
|
1602
|
-
);
|
|
1603
|
-
|
|
1604
|
-
// src/schemas/components/highcharts.ts
|
|
1605
|
-
import { Type as Type13 } from "@sinclair/typebox";
|
|
1606
|
-
var HighchartsPropsSchema = Type13.Object({
|
|
1607
|
-
// Highcharts chart options - can be anything but must at least have chart.width and chart.height
|
|
1608
|
-
options: Type13.Intersect([
|
|
1609
|
-
Type13.Record(Type13.String(), Type13.Unknown()),
|
|
1610
|
-
Type13.Object({
|
|
1611
|
-
chart: Type13.Object({
|
|
1612
|
-
width: Type13.Number(),
|
|
1613
|
-
height: Type13.Number()
|
|
1614
|
-
})
|
|
1615
|
-
})
|
|
1616
|
-
]),
|
|
1617
|
-
// Optional scale factor for export
|
|
1618
|
-
scale: Type13.Optional(Type13.Number()),
|
|
1619
|
-
// Optional Highcharts Export Server URL override
|
|
1620
|
-
serverUrl: Type13.Optional(Type13.String({ description: "Highcharts Export Server URL (default: http://localhost:7801)" })),
|
|
1621
|
-
// Optional width for rendering (overrides chart width)
|
|
1622
|
-
width: Type13.Optional(
|
|
1623
|
-
Type13.Union(
|
|
1624
|
-
[
|
|
1625
|
-
Type13.Number({
|
|
1626
|
-
minimum: 1,
|
|
1627
|
-
description: "Image width in pixels"
|
|
1628
|
-
}),
|
|
1629
|
-
Type13.String({
|
|
1630
|
-
pattern: "^\\d+(\\.\\d+)?%$",
|
|
1631
|
-
description: 'Image width as percentage (e.g., "90%") relative to content width'
|
|
1632
|
-
})
|
|
1633
|
-
],
|
|
1634
|
-
{
|
|
1635
|
-
description: 'Rendered image width in pixels (number) or as percentage string (e.g., "90%")'
|
|
1636
|
-
}
|
|
1637
|
-
)
|
|
1638
|
-
),
|
|
1639
|
-
// Optional height for rendering (overrides chart height)
|
|
1640
|
-
height: Type13.Optional(
|
|
1641
|
-
Type13.Union(
|
|
1642
|
-
[
|
|
1643
|
-
Type13.Number({
|
|
1644
|
-
minimum: 1,
|
|
1645
|
-
description: "Image height in pixels"
|
|
1646
|
-
}),
|
|
1647
|
-
Type13.String({
|
|
1648
|
-
pattern: "^\\d+(\\.\\d+)?%$",
|
|
1649
|
-
description: 'Image height as percentage (e.g., "90%") relative to content height'
|
|
1650
|
-
})
|
|
1651
|
-
],
|
|
1652
|
-
{
|
|
1653
|
-
description: 'Rendered image height in pixels (number) or as percentage string (e.g., "90%")'
|
|
1654
|
-
}
|
|
1655
|
-
)
|
|
1656
|
-
)
|
|
1657
|
-
});
|
|
1658
|
-
|
|
1659
|
-
// src/schemas/component-registry.ts
|
|
1660
|
-
var STANDARD_COMPONENTS_REGISTRY = [
|
|
1661
|
-
// ========================================================================
|
|
1662
|
-
// Container Components (can contain children)
|
|
1663
|
-
// ========================================================================
|
|
1664
|
-
{
|
|
1665
|
-
name: "docx",
|
|
1666
|
-
propsSchema: ReportPropsSchema,
|
|
1667
|
-
hasChildren: true,
|
|
1668
|
-
allowedChildren: ["section"],
|
|
1669
|
-
category: "container",
|
|
1670
|
-
description: "Main document container - defines the overall document structure. Required as the root component.",
|
|
1671
|
-
special: {
|
|
1672
|
-
hasSchemaField: true
|
|
1673
|
-
// Only docx root has $schema field
|
|
1674
|
-
}
|
|
1675
|
-
},
|
|
1676
|
-
{
|
|
1677
|
-
name: "section",
|
|
1678
|
-
propsSchema: SectionPropsSchema,
|
|
1679
|
-
createPropsSchema: createSectionPropsSchema,
|
|
1680
|
-
hasChildren: true,
|
|
1681
|
-
allowedChildren: [
|
|
1682
|
-
"heading",
|
|
1683
|
-
"paragraph",
|
|
1684
|
-
"image",
|
|
1685
|
-
"statistic",
|
|
1686
|
-
"table",
|
|
1687
|
-
"list",
|
|
1688
|
-
"toc",
|
|
1689
|
-
"highcharts",
|
|
1690
|
-
"columns",
|
|
1691
|
-
"text-box"
|
|
1692
|
-
],
|
|
1693
|
-
category: "container",
|
|
1694
|
-
description: "Section container - groups related content with optional title. Use for organizing document structure."
|
|
1695
|
-
},
|
|
1696
|
-
{
|
|
1697
|
-
name: "columns",
|
|
1698
|
-
propsSchema: ColumnsPropsSchema,
|
|
1699
|
-
hasChildren: true,
|
|
1700
|
-
allowedChildren: [
|
|
1701
|
-
"heading",
|
|
1702
|
-
"paragraph",
|
|
1703
|
-
"image",
|
|
1704
|
-
"statistic",
|
|
1705
|
-
"table",
|
|
1706
|
-
"list",
|
|
1707
|
-
"toc",
|
|
1708
|
-
"highcharts",
|
|
1709
|
-
"text-box"
|
|
1710
|
-
],
|
|
1711
|
-
category: "layout",
|
|
1712
|
-
description: "Multi-column layout - arranges content in 2-4 columns. Great for side-by-side content."
|
|
1713
|
-
},
|
|
1714
|
-
{
|
|
1715
|
-
name: "text-box",
|
|
1716
|
-
propsSchema: TextBoxPropsSchema,
|
|
1717
|
-
hasChildren: true,
|
|
1718
|
-
allowedChildren: ["heading", "paragraph", "image"],
|
|
1719
|
-
category: "layout",
|
|
1720
|
-
description: "Floating text container - allows positioning text anywhere on the page with absolute or relative positioning."
|
|
1721
|
-
},
|
|
1722
|
-
// ========================================================================
|
|
1723
|
-
// Content Components (leaf nodes, no children)
|
|
1724
|
-
// ========================================================================
|
|
1725
|
-
{
|
|
1726
|
-
name: "heading",
|
|
1727
|
-
propsSchema: HeadingPropsSchema,
|
|
1728
|
-
hasChildren: false,
|
|
1729
|
-
category: "content",
|
|
1730
|
-
description: "Heading text - supports levels 1-6 for document hierarchy. Level 1 is largest."
|
|
1731
|
-
},
|
|
1732
|
-
{
|
|
1733
|
-
name: "paragraph",
|
|
1734
|
-
propsSchema: ParagraphPropsSchema,
|
|
1735
|
-
hasChildren: false,
|
|
1736
|
-
category: "content",
|
|
1737
|
-
description: "Paragraph text - supports formatting like bold, italic, and color. Main content element."
|
|
1738
|
-
},
|
|
1739
|
-
{
|
|
1740
|
-
name: "image",
|
|
1741
|
-
propsSchema: ImagePropsSchema,
|
|
1742
|
-
hasChildren: false,
|
|
1743
|
-
category: "content",
|
|
1744
|
-
description: "Image element - displays images with optional caption. Supports various formats."
|
|
1745
|
-
},
|
|
1746
|
-
{
|
|
1747
|
-
name: "statistic",
|
|
1748
|
-
propsSchema: StatisticPropsSchema,
|
|
1749
|
-
hasChildren: false,
|
|
1750
|
-
category: "content",
|
|
1751
|
-
description: "Statistic display - shows a number with description. Perfect for KPIs and metrics."
|
|
1752
|
-
},
|
|
1753
|
-
{
|
|
1754
|
-
name: "table",
|
|
1755
|
-
propsSchema: TablePropsSchema,
|
|
1756
|
-
createPropsSchema: createTablePropsSchema,
|
|
1757
|
-
hasChildren: false,
|
|
1758
|
-
category: "content",
|
|
1759
|
-
description: "Data table - displays tabular data with headers. Supports formatting and alignment."
|
|
1760
|
-
},
|
|
1761
|
-
{
|
|
1762
|
-
name: "list",
|
|
1763
|
-
propsSchema: ListPropsSchema,
|
|
1764
|
-
hasChildren: false,
|
|
1765
|
-
category: "content",
|
|
1766
|
-
description: "List element - bulleted or numbered list items. Supports nested lists."
|
|
1767
|
-
},
|
|
1768
|
-
{
|
|
1769
|
-
name: "toc",
|
|
1770
|
-
propsSchema: TocPropsSchema,
|
|
1771
|
-
hasChildren: false,
|
|
1772
|
-
category: "content",
|
|
1773
|
-
description: "Table of contents - automatically generates TOC from document headings. Supports depth ranges and custom styles."
|
|
1774
|
-
},
|
|
1775
|
-
{
|
|
1776
|
-
name: "highcharts",
|
|
1777
|
-
propsSchema: HighchartsPropsSchema,
|
|
1778
|
-
hasChildren: false,
|
|
1779
|
-
category: "content",
|
|
1780
|
-
description: "Chart component powered by Highcharts - render line, bar, pie, heatmap, and more with rich options."
|
|
1781
|
-
}
|
|
1782
|
-
];
|
|
1783
|
-
function getStandardComponent(name) {
|
|
1784
|
-
return STANDARD_COMPONENTS_REGISTRY.find((c) => c.name === name);
|
|
1785
|
-
}
|
|
1786
|
-
function getAllStandardComponentNames() {
|
|
1787
|
-
return STANDARD_COMPONENTS_REGISTRY.map((c) => c.name);
|
|
1788
|
-
}
|
|
1789
|
-
function getComponentsByCategory(category) {
|
|
1790
|
-
return STANDARD_COMPONENTS_REGISTRY.filter((c) => c.category === category);
|
|
1791
|
-
}
|
|
1792
|
-
function getContainerComponents() {
|
|
1793
|
-
return STANDARD_COMPONENTS_REGISTRY.filter((c) => c.hasChildren);
|
|
1794
|
-
}
|
|
1795
|
-
function getContentComponents() {
|
|
1796
|
-
return STANDARD_COMPONENTS_REGISTRY.filter((c) => !c.hasChildren);
|
|
1797
|
-
}
|
|
1798
|
-
function isStandardComponent(name) {
|
|
1799
|
-
return STANDARD_COMPONENTS_REGISTRY.some((c) => c.name === name);
|
|
1800
|
-
}
|
|
1801
|
-
function createComponentSchemaObject(component, childrenType, selfRef) {
|
|
1802
|
-
const schema = {
|
|
1803
|
-
name: Type14.Literal(component.name),
|
|
1804
|
-
id: Type14.Optional(Type14.String()),
|
|
1805
|
-
enabled: Type14.Optional(
|
|
1806
|
-
Type14.Boolean({
|
|
1807
|
-
default: true,
|
|
1808
|
-
description: "When false, this component is filtered out and not rendered. Defaults to true. Useful for conditional component inclusion."
|
|
1809
|
-
})
|
|
1810
|
-
)
|
|
1811
|
-
};
|
|
1812
|
-
if (component.special?.hasSchemaField) {
|
|
1813
|
-
schema.$schema = Type14.Optional(Type14.String({ format: "uri" }));
|
|
1814
|
-
}
|
|
1815
|
-
schema.props = component.createPropsSchema && selfRef ? component.createPropsSchema(selfRef) : component.propsSchema;
|
|
1816
|
-
if (component.hasChildren && childrenType) {
|
|
1817
|
-
schema.children = Type14.Optional(Type14.Array(childrenType));
|
|
1818
|
-
}
|
|
1819
|
-
return Type14.Object(schema, { additionalProperties: false });
|
|
1820
|
-
}
|
|
1821
|
-
function createAllComponentSchemas(recursiveRef) {
|
|
1822
|
-
return STANDARD_COMPONENTS_REGISTRY.map(
|
|
1823
|
-
(component) => createComponentSchemaObject(component, recursiveRef)
|
|
1824
|
-
);
|
|
1825
|
-
}
|
|
1826
|
-
function createAllComponentSchemasNarrowed(selfRef, pluginSchemas = []) {
|
|
1827
|
-
const leafSchemas = /* @__PURE__ */ new Map();
|
|
1828
|
-
for (const comp of STANDARD_COMPONENTS_REGISTRY) {
|
|
1829
|
-
if (!comp.hasChildren) {
|
|
1830
|
-
leafSchemas.set(
|
|
1831
|
-
comp.name,
|
|
1832
|
-
createComponentSchemaObject(comp, void 0, selfRef)
|
|
1833
|
-
);
|
|
1834
|
-
}
|
|
1835
|
-
}
|
|
1836
|
-
const containers = STANDARD_COMPONENTS_REGISTRY.filter((c) => c.hasChildren);
|
|
1837
|
-
const resolved = /* @__PURE__ */ new Map();
|
|
1838
|
-
const pending = [...containers];
|
|
1839
|
-
while (pending.length > 0) {
|
|
1840
|
-
const before = pending.length;
|
|
1841
|
-
for (let i = pending.length - 1; i >= 0; i--) {
|
|
1842
|
-
const comp = pending[i];
|
|
1843
|
-
if (!comp.allowedChildren) {
|
|
1844
|
-
resolved.set(
|
|
1845
|
-
comp.name,
|
|
1846
|
-
createComponentSchemaObject(comp, selfRef, selfRef)
|
|
1847
|
-
);
|
|
1848
|
-
pending.splice(i, 1);
|
|
1849
|
-
continue;
|
|
1850
|
-
}
|
|
1851
|
-
const containerDeps = comp.allowedChildren.filter(
|
|
1852
|
-
(name) => containers.some((c) => c.name === name)
|
|
1853
|
-
);
|
|
1854
|
-
if (!containerDeps.every((d) => resolved.has(d))) continue;
|
|
1855
|
-
const childSchemas = comp.allowedChildren.map((name) => resolved.get(name) ?? leafSchemas.get(name)).filter((s) => s !== void 0);
|
|
1856
|
-
const allChildSchemas = [...childSchemas, ...pluginSchemas];
|
|
1857
|
-
const childrenType = allChildSchemas.length === 1 ? allChildSchemas[0] : Type14.Union(allChildSchemas);
|
|
1858
|
-
resolved.set(
|
|
1859
|
-
comp.name,
|
|
1860
|
-
createComponentSchemaObject(comp, childrenType, selfRef)
|
|
1861
|
-
);
|
|
1862
|
-
pending.splice(i, 1);
|
|
1863
|
-
}
|
|
1864
|
-
if (pending.length === before) {
|
|
1865
|
-
throw new Error(
|
|
1866
|
-
`Circular allowedChildren among: ${pending.map((c) => c.name).join(", ")}`
|
|
1867
|
-
);
|
|
1868
|
-
}
|
|
1869
|
-
}
|
|
1870
|
-
const byName = new Map([...resolved, ...leafSchemas]);
|
|
1871
|
-
return { schemas: [...byName.values()], byName };
|
|
1872
|
-
}
|
|
1873
|
-
|
|
1874
|
-
export {
|
|
1875
|
-
createReportPropsSchema,
|
|
1876
|
-
ReportPropsSchema,
|
|
1877
|
-
AlignmentSchema,
|
|
1878
|
-
JustifiedAlignmentSchema,
|
|
1879
|
-
HeadingLevelSchema,
|
|
1880
|
-
SpacingSchema,
|
|
1881
|
-
ListSpacingSchema,
|
|
1882
|
-
MarginsSchema,
|
|
1883
|
-
BorderSchema,
|
|
1884
|
-
LineSpacingSchema,
|
|
1885
|
-
IndentSchema,
|
|
1886
|
-
HorizontalPositionRelativeFromSchema,
|
|
1887
|
-
VerticalPositionRelativeFromSchema,
|
|
1888
|
-
HorizontalPositionAlignSchema,
|
|
1889
|
-
VerticalPositionAlignSchema,
|
|
1890
|
-
TextWrappingTypeSchema,
|
|
1891
|
-
TextWrappingSideSchema,
|
|
1892
|
-
FloatingPropertiesSchema,
|
|
1893
|
-
NumberingSchema,
|
|
1894
|
-
BaseComponentFields,
|
|
1895
|
-
BaseComponentPropsSchema,
|
|
1896
|
-
createSectionPropsSchema,
|
|
1897
|
-
SectionPropsSchema,
|
|
1898
|
-
ColumnsPropsSchema,
|
|
1899
|
-
HeadingPropsSchema,
|
|
1900
|
-
ParagraphPropsSchema,
|
|
1901
|
-
TextBoxPropsSchema,
|
|
1902
|
-
ImagePropsSchema,
|
|
1903
|
-
StatisticPropsSchema,
|
|
1904
|
-
createTablePropsSchema,
|
|
1905
|
-
TablePropsSchema,
|
|
1906
|
-
LevelFormatSchema,
|
|
1907
|
-
ListLevelPropsSchema,
|
|
1908
|
-
ListPropsSchema,
|
|
1909
|
-
TocStyleSchema,
|
|
1910
|
-
TocScopeSchema,
|
|
1911
|
-
TocStyleMappingSchema,
|
|
1912
|
-
TocDepthRangeSchema,
|
|
1913
|
-
TocPropsSchema,
|
|
1914
|
-
HighchartsPropsSchema,
|
|
1915
|
-
STANDARD_COMPONENTS_REGISTRY,
|
|
1916
|
-
getStandardComponent,
|
|
1917
|
-
getAllStandardComponentNames,
|
|
1918
|
-
getComponentsByCategory,
|
|
1919
|
-
getContainerComponents,
|
|
1920
|
-
getContentComponents,
|
|
1921
|
-
isStandardComponent,
|
|
1922
|
-
createComponentSchemaObject,
|
|
1923
|
-
createAllComponentSchemas,
|
|
1924
|
-
createAllComponentSchemasNarrowed
|
|
1925
|
-
};
|
|
1926
|
-
//# sourceMappingURL=chunk-PN6JT3KF.js.map
|