@json-to-office/shared-docx 0.5.3 → 0.7.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 (42) hide show
  1. package/dist/{chunk-YNBTESFN.js → chunk-22VYYAC2.js} +4 -8
  2. package/dist/chunk-22VYYAC2.js.map +1 -0
  3. package/dist/{chunk-S4EFGCIC.js → chunk-6SLVQATI.js} +2 -2
  4. package/dist/{chunk-EDYWA2KA.js → chunk-ABVYMFDA.js} +2 -2
  5. package/dist/{chunk-F5LVWDTY.js → chunk-JOXJOD2C.js} +6 -1
  6. package/dist/chunk-JOXJOD2C.js.map +1 -0
  7. package/dist/{chunk-IFSM3GXH.js → chunk-L5TZFC47.js} +3 -3
  8. package/dist/{chunk-A325P5FV.js → chunk-OE5JFL7S.js} +5 -17
  9. package/dist/chunk-OE5JFL7S.js.map +1 -0
  10. package/dist/{chunk-3D6HY6AC.js → chunk-PN6JT3KF.js} +236 -284
  11. package/dist/chunk-PN6JT3KF.js.map +1 -0
  12. package/dist/{chunk-WJA5TGNI.js → chunk-SK6LSPFN.js} +2 -2
  13. package/dist/{chunk-AMVS7BRX.js → chunk-V4L4S6ZS.js} +2 -10
  14. package/dist/{chunk-AMVS7BRX.js.map → chunk-V4L4S6ZS.js.map} +1 -1
  15. package/dist/{chunk-CVI7GFWX.js → chunk-YQECZGRR.js} +2 -2
  16. package/dist/chunk-YQECZGRR.js.map +1 -0
  17. package/dist/index.d.ts +14 -62
  18. package/dist/index.js +10 -30
  19. package/dist/index.js.map +1 -1
  20. package/dist/schemas/api.js +4 -4
  21. package/dist/schemas/component-registry.js +2 -2
  22. package/dist/schemas/components.d.ts +21 -48
  23. package/dist/schemas/components.js +3 -7
  24. package/dist/schemas/document.js +5 -5
  25. package/dist/schemas/export.js +3 -3
  26. package/dist/schemas/font.d.ts +3 -1
  27. package/dist/schemas/font.js +3 -1
  28. package/dist/schemas/generator.js +3 -3
  29. package/dist/schemas/theme.d.ts +24 -24
  30. package/dist/schemas/theme.js +4 -4
  31. package/dist/validation/unified/index.d.ts +14 -35
  32. package/dist/validation/unified/index.js +6 -10
  33. package/package.json +2 -2
  34. package/dist/chunk-3D6HY6AC.js.map +0 -1
  35. package/dist/chunk-A325P5FV.js.map +0 -1
  36. package/dist/chunk-CVI7GFWX.js.map +0 -1
  37. package/dist/chunk-F5LVWDTY.js.map +0 -1
  38. package/dist/chunk-YNBTESFN.js.map +0 -1
  39. /package/dist/{chunk-S4EFGCIC.js.map → chunk-6SLVQATI.js.map} +0 -0
  40. /package/dist/{chunk-EDYWA2KA.js.map → chunk-ABVYMFDA.js.map} +0 -0
  41. /package/dist/{chunk-IFSM3GXH.js.map → chunk-L5TZFC47.js.map} +0 -0
  42. /package/dist/{chunk-WJA5TGNI.js.map → chunk-SK6LSPFN.js.map} +0 -0
@@ -1,10 +1,11 @@
1
1
  import {
2
2
  FontDefinitionSchema,
3
+ HexColorOrTransparentSchema,
3
4
  HexColorSchema
4
- } from "./chunk-F5LVWDTY.js";
5
+ } from "./chunk-JOXJOD2C.js";
5
6
 
6
7
  // src/schemas/component-registry.ts
7
- import { Type as Type16 } from "@sinclair/typebox";
8
+ import { Type as Type14 } from "@sinclair/typebox";
8
9
 
9
10
  // src/schemas/components/report.ts
10
11
  import { Type } from "@sinclair/typebox";
@@ -259,9 +260,15 @@ var FloatingPropertiesSchema = Type2.Object(
259
260
  relative: Type2.Optional(HorizontalPositionRelativeFromSchema),
260
261
  align: Type2.Optional(HorizontalPositionAlignSchema),
261
262
  offset: Type2.Optional(
262
- Type2.Number({
263
- description: "Horizontal offset in twips (1/20 of a point)"
264
- })
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
+ ])
265
272
  )
266
273
  },
267
274
  {
@@ -275,9 +282,15 @@ var FloatingPropertiesSchema = Type2.Object(
275
282
  relative: Type2.Optional(VerticalPositionRelativeFromSchema),
276
283
  align: Type2.Optional(VerticalPositionAlignSchema),
277
284
  offset: Type2.Optional(
278
- Type2.Number({
279
- description: "Vertical offset in twips (1/20 of a point)"
280
- })
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
+ ])
281
294
  )
282
295
  },
283
296
  {
@@ -294,16 +307,40 @@ var FloatingPropertiesSchema = Type2.Object(
294
307
  Type2.Object(
295
308
  {
296
309
  top: Type2.Optional(
297
- Type2.Number({ description: "Top margin in twips" })
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
+ ])
298
317
  ),
299
318
  bottom: Type2.Optional(
300
- Type2.Number({ description: "Bottom margin in twips" })
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
+ ])
301
326
  ),
302
327
  left: Type2.Optional(
303
- Type2.Number({ description: "Left margin in twips" })
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
+ ])
304
335
  ),
305
336
  right: Type2.Optional(
306
- Type2.Number({ description: "Right margin in twips" })
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
+ ])
307
344
  )
308
345
  },
309
346
  {
@@ -635,9 +672,15 @@ var FloatingFramePropertiesSchema = Type6.Object(
635
672
  relative: Type6.Optional(FrameAnchorTypeSchema),
636
673
  align: Type6.Optional(FrameHorizontalAlignSchema),
637
674
  offset: Type6.Optional(
638
- Type6.Number({
639
- description: "Horizontal offset in twips (1/20 of a point)"
640
- })
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
+ ])
641
684
  )
642
685
  },
643
686
  {
@@ -651,9 +694,15 @@ var FloatingFramePropertiesSchema = Type6.Object(
651
694
  relative: Type6.Optional(FrameAnchorTypeSchema),
652
695
  align: Type6.Optional(FrameVerticalAlignSchema),
653
696
  offset: Type6.Optional(
654
- Type6.Number({
655
- description: "Vertical offset in twips (1/20 of a point)"
656
- })
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
+ ])
657
706
  )
658
707
  },
659
708
  {
@@ -1140,7 +1189,7 @@ var PaddingSchema = Type10.Union([
1140
1189
  ]);
1141
1190
  var CellDefaultsSchema = Type10.Object({
1142
1191
  color: Type10.Optional(HexColorSchema),
1143
- backgroundColor: Type10.Optional(HexColorSchema),
1192
+ backgroundColor: Type10.Optional(HexColorOrTransparentSchema),
1144
1193
  horizontalAlignment: Type10.Optional(HorizontalAlignmentSchema),
1145
1194
  verticalAlignment: Type10.Optional(VerticalAlignmentSchema),
1146
1195
  font: Type10.Optional(FontConfigSchema),
@@ -1155,7 +1204,7 @@ function createTablePropsSchema(componentRef) {
1155
1204
  const cellContent = Type10.Union([Type10.String(), componentRef]);
1156
1205
  const cellFields = {
1157
1206
  color: Type10.Optional(HexColorSchema),
1158
- backgroundColor: Type10.Optional(HexColorSchema),
1207
+ backgroundColor: Type10.Optional(HexColorOrTransparentSchema),
1159
1208
  horizontalAlignment: Type10.Optional(HorizontalAlignmentSchema),
1160
1209
  verticalAlignment: Type10.Optional(VerticalAlignmentSchema),
1161
1210
  font: Type10.Optional(FontConfigSchema),
@@ -1233,186 +1282,105 @@ function createTablePropsSchema(componentRef) {
1233
1282
  }
1234
1283
  var TablePropsSchema = createTablePropsSchema(CellContentSchema);
1235
1284
 
1236
- // src/schemas/components/header.ts
1237
- import { Type as Type11 } from "@sinclair/typebox";
1238
- var HeaderPropsSchema = Type11.Object(
1239
- {
1240
- text: Type11.Optional(
1241
- Type11.String({
1242
- description: "Header text"
1243
- })
1244
- ),
1245
- logo: Type11.Optional(
1246
- Type11.String({
1247
- description: "Logo image URL or path"
1248
- })
1249
- ),
1250
- alignment: Type11.Optional(AlignmentSchema),
1251
- position: Type11.Optional(
1252
- Type11.Union([Type11.Literal("top"), Type11.Literal("bottom")])
1253
- ),
1254
- firstPage: Type11.Optional(
1255
- Type11.Boolean({
1256
- description: "Show header on first page"
1257
- })
1258
- ),
1259
- oddPages: Type11.Optional(
1260
- Type11.Boolean({
1261
- description: "Show header on odd pages"
1262
- })
1263
- ),
1264
- evenPages: Type11.Optional(
1265
- Type11.Boolean({
1266
- description: "Show header on even pages"
1267
- })
1268
- ),
1269
- showPageNumbers: Type11.Optional(Type11.Boolean()),
1270
- showDate: Type11.Optional(Type11.Boolean()),
1271
- height: Type11.Optional(Type11.Number({ minimum: 0 }))
1272
- },
1273
- {
1274
- description: "Document header configuration",
1275
- additionalProperties: false
1276
- }
1277
- );
1278
-
1279
- // src/schemas/components/footer.ts
1280
- import { Type as Type12 } from "@sinclair/typebox";
1281
- var FooterPropsSchema = Type12.Object(
1282
- {
1283
- text: Type12.Optional(
1284
- Type12.String({
1285
- description: "Footer text"
1286
- })
1287
- ),
1288
- alignment: Type12.Optional(AlignmentSchema),
1289
- position: Type12.Optional(
1290
- Type12.Union([Type12.Literal("top"), Type12.Literal("bottom")])
1291
- ),
1292
- firstPage: Type12.Optional(
1293
- Type12.Boolean({
1294
- description: "Show footer on first page"
1295
- })
1296
- ),
1297
- oddPages: Type12.Optional(
1298
- Type12.Boolean({
1299
- description: "Show footer on odd pages"
1300
- })
1301
- ),
1302
- evenPages: Type12.Optional(
1303
- Type12.Boolean({
1304
- description: "Show footer on even pages"
1305
- })
1306
- ),
1307
- showPageNumbers: Type12.Optional(Type12.Boolean()),
1308
- showDate: Type12.Optional(Type12.Boolean()),
1309
- height: Type12.Optional(Type12.Number({ minimum: 0 }))
1310
- },
1311
- {
1312
- description: "Document footer configuration",
1313
- additionalProperties: false
1314
- }
1315
- );
1316
-
1317
1285
  // src/schemas/components/list.ts
1318
- import { Type as Type13 } from "@sinclair/typebox";
1319
- var LevelFormatSchema = Type13.Union(
1286
+ import { Type as Type11 } from "@sinclair/typebox";
1287
+ var LevelFormatSchema = Type11.Union(
1320
1288
  [
1321
- Type13.Literal("decimal"),
1322
- Type13.Literal("upperRoman"),
1323
- Type13.Literal("lowerRoman"),
1324
- Type13.Literal("upperLetter"),
1325
- Type13.Literal("lowerLetter"),
1326
- Type13.Literal("bullet"),
1327
- Type13.Literal("ordinal"),
1328
- Type13.Literal("cardinalText"),
1329
- Type13.Literal("ordinalText"),
1330
- Type13.Literal("hex"),
1331
- Type13.Literal("chicago"),
1332
- Type13.Literal("ideographDigital"),
1333
- Type13.Literal("japaneseCounting"),
1334
- Type13.Literal("aiueo"),
1335
- Type13.Literal("iroha"),
1336
- Type13.Literal("decimalFullWidth"),
1337
- Type13.Literal("decimalHalfWidth"),
1338
- Type13.Literal("japaneseLegal"),
1339
- Type13.Literal("japaneseDigitalTenThousand"),
1340
- Type13.Literal("decimalEnclosedCircle"),
1341
- Type13.Literal("decimalFullWidth2"),
1342
- Type13.Literal("aiueoFullWidth"),
1343
- Type13.Literal("irohaFullWidth"),
1344
- Type13.Literal("decimalZero"),
1345
- Type13.Literal("ganada"),
1346
- Type13.Literal("chosung"),
1347
- Type13.Literal("decimalEnclosedFullstop"),
1348
- Type13.Literal("decimalEnclosedParen"),
1349
- Type13.Literal("decimalEnclosedCircleChinese"),
1350
- Type13.Literal("ideographEnclosedCircle"),
1351
- Type13.Literal("ideographTraditional"),
1352
- Type13.Literal("ideographZodiac"),
1353
- Type13.Literal("ideographZodiacTraditional"),
1354
- Type13.Literal("taiwaneseCounting"),
1355
- Type13.Literal("ideographLegalTraditional"),
1356
- Type13.Literal("taiwaneseCountingThousand"),
1357
- Type13.Literal("taiwaneseDigital"),
1358
- Type13.Literal("chineseCounting"),
1359
- Type13.Literal("chineseLegalSimplified"),
1360
- Type13.Literal("chineseCountingThousand"),
1361
- Type13.Literal("koreanDigital"),
1362
- Type13.Literal("koreanCounting"),
1363
- Type13.Literal("koreanLegal"),
1364
- Type13.Literal("koreanDigital2"),
1365
- Type13.Literal("vietnameseCounting"),
1366
- Type13.Literal("russianLower"),
1367
- Type13.Literal("russianUpper"),
1368
- Type13.Literal("none"),
1369
- Type13.Literal("numberInDash"),
1370
- Type13.Literal("hebrew1"),
1371
- Type13.Literal("hebrew2"),
1372
- Type13.Literal("arabicAlpha"),
1373
- Type13.Literal("arabicAbjad"),
1374
- Type13.Literal("hindiVowels"),
1375
- Type13.Literal("hindiConsonants"),
1376
- Type13.Literal("hindiNumbers"),
1377
- Type13.Literal("hindiCounting"),
1378
- Type13.Literal("thaiLetters"),
1379
- Type13.Literal("thaiNumbers"),
1380
- Type13.Literal("thaiCounting")
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")
1381
1349
  ],
1382
1350
  {
1383
1351
  description: "Number or bullet format for list levels"
1384
1352
  }
1385
1353
  );
1386
- var ListLevelPropsSchema = Type13.Object(
1354
+ var ListLevelPropsSchema = Type11.Object(
1387
1355
  {
1388
- level: Type13.Number({
1356
+ level: Type11.Number({
1389
1357
  minimum: 0,
1390
1358
  maximum: 8,
1391
1359
  description: "Nesting level (0 = root, 1 = first sublevel, etc.)"
1392
1360
  }),
1393
- format: Type13.Optional(LevelFormatSchema),
1394
- text: Type13.Optional(
1395
- Type13.String({
1361
+ format: Type11.Optional(LevelFormatSchema),
1362
+ text: Type11.Optional(
1363
+ Type11.String({
1396
1364
  description: 'Number format string (e.g., "%1." for "1.", "%1)" for "1)", custom bullet character for bullet format)'
1397
1365
  })
1398
1366
  ),
1399
- alignment: Type13.Optional(
1400
- Type13.Union(
1367
+ alignment: Type11.Optional(
1368
+ Type11.Union(
1401
1369
  [
1402
- Type13.Literal("start"),
1403
- Type13.Literal("end"),
1404
- Type13.Literal("left"),
1405
- Type13.Literal("right"),
1406
- Type13.Literal("center")
1370
+ Type11.Literal("start"),
1371
+ Type11.Literal("end"),
1372
+ Type11.Literal("left"),
1373
+ Type11.Literal("right"),
1374
+ Type11.Literal("center")
1407
1375
  ],
1408
1376
  {
1409
1377
  description: "Alignment of the numbering/bullet"
1410
1378
  }
1411
1379
  )
1412
1380
  ),
1413
- indent: Type13.Optional(IndentSchema),
1414
- start: Type13.Optional(
1415
- Type13.Number({
1381
+ indent: Type11.Optional(IndentSchema),
1382
+ start: Type11.Optional(
1383
+ Type11.Number({
1416
1384
  minimum: 1,
1417
1385
  description: "Starting number for this level (default: 1)"
1418
1386
  })
@@ -1422,15 +1390,15 @@ var ListLevelPropsSchema = Type13.Object(
1422
1390
  description: "Configuration for a single list level"
1423
1391
  }
1424
1392
  );
1425
- var ListPropsSchema = Type13.Object(
1426
- {
1427
- items: Type13.Array(
1428
- Type13.Union([
1429
- Type13.String(),
1430
- Type13.Object({
1431
- text: Type13.String(),
1432
- level: Type13.Optional(
1433
- Type13.Number({
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({
1434
1402
  minimum: 0,
1435
1403
  maximum: 8,
1436
1404
  description: "Nesting level for this item"
@@ -1443,42 +1411,42 @@ var ListPropsSchema = Type13.Object(
1443
1411
  minItems: 1
1444
1412
  }
1445
1413
  ),
1446
- reference: Type13.Optional(
1447
- Type13.String({
1414
+ reference: Type11.Optional(
1415
+ Type11.String({
1448
1416
  description: "Unique reference ID for this numbering configuration (auto-generated if not provided)"
1449
1417
  })
1450
1418
  ),
1451
- levels: Type13.Optional(
1452
- Type13.Array(ListLevelPropsSchema, {
1419
+ levels: Type11.Optional(
1420
+ Type11.Array(ListLevelPropsSchema, {
1453
1421
  description: "Configuration for each nesting level",
1454
1422
  minItems: 1,
1455
1423
  maxItems: 9
1456
1424
  })
1457
1425
  ),
1458
1426
  // Simplified options for common use cases (when levels not specified)
1459
- format: Type13.Optional(
1460
- Type13.Union(
1461
- [LevelFormatSchema, Type13.Literal("numbered"), Type13.Literal("none")],
1427
+ format: Type11.Optional(
1428
+ Type11.Union(
1429
+ [LevelFormatSchema, Type11.Literal("numbered"), Type11.Literal("none")],
1462
1430
  {
1463
1431
  description: "Format for level 0 (simplified option when levels not specified)"
1464
1432
  }
1465
1433
  )
1466
1434
  ),
1467
- bullet: Type13.Optional(
1468
- Type13.String({
1435
+ bullet: Type11.Optional(
1436
+ Type11.String({
1469
1437
  description: "Custom bullet character (simplified option when levels not specified)"
1470
1438
  })
1471
1439
  ),
1472
- start: Type13.Optional(
1473
- Type13.Number({
1440
+ start: Type11.Optional(
1441
+ Type11.Number({
1474
1442
  minimum: 1,
1475
1443
  description: "Starting number for level 0 (simplified option when levels not specified)"
1476
1444
  })
1477
1445
  ),
1478
- spacing: Type13.Optional(ListSpacingSchema),
1479
- alignment: Type13.Optional(JustifiedAlignmentSchema),
1480
- indent: Type13.Optional(
1481
- Type13.Union([Type13.Number({ minimum: 0 }), IndentSchema])
1446
+ spacing: Type11.Optional(ListSpacingSchema),
1447
+ alignment: Type11.Optional(JustifiedAlignmentSchema),
1448
+ indent: Type11.Optional(
1449
+ Type11.Union([Type11.Number({ minimum: 0 }), IndentSchema])
1482
1450
  )
1483
1451
  },
1484
1452
  {
@@ -1488,21 +1456,21 @@ var ListPropsSchema = Type13.Object(
1488
1456
  );
1489
1457
 
1490
1458
  // src/schemas/components/toc.ts
1491
- import { Type as Type14 } from "@sinclair/typebox";
1492
- var TocStyleSchema = Type14.Union(
1493
- [Type14.Literal("numeric"), Type14.Literal("bullet"), Type14.Literal("none")],
1459
+ import { Type as Type12 } from "@sinclair/typebox";
1460
+ var TocStyleSchema = Type12.Union(
1461
+ [Type12.Literal("numeric"), Type12.Literal("bullet"), Type12.Literal("none")],
1494
1462
  { description: "TOC numbering style" }
1495
1463
  );
1496
- var TocScopeSchema = Type14.Union(
1497
- [Type14.Literal("document"), Type14.Literal("section")],
1464
+ var TocScopeSchema = Type12.Union(
1465
+ [Type12.Literal("document"), Type12.Literal("section")],
1498
1466
  { description: "TOC scope: document-wide or section-only" }
1499
1467
  );
1500
- var TocStyleMappingSchema = Type14.Object(
1468
+ var TocStyleMappingSchema = Type12.Object(
1501
1469
  {
1502
- styleId: Type14.String({
1470
+ styleId: Type12.String({
1503
1471
  description: "Custom style ID matching a key in theme.styles"
1504
1472
  }),
1505
- level: Type14.Number({
1473
+ level: Type12.Number({
1506
1474
  minimum: 1,
1507
1475
  maximum: 6,
1508
1476
  description: "TOC level (1-6) to assign to this style"
@@ -1513,18 +1481,18 @@ var TocStyleMappingSchema = Type14.Object(
1513
1481
  additionalProperties: false
1514
1482
  }
1515
1483
  );
1516
- var TocDepthRangeSchema = Type14.Object(
1484
+ var TocDepthRangeSchema = Type12.Object(
1517
1485
  {
1518
- from: Type14.Optional(
1519
- Type14.Number({
1486
+ from: Type12.Optional(
1487
+ Type12.Number({
1520
1488
  minimum: 1,
1521
1489
  maximum: 6,
1522
1490
  default: 1,
1523
1491
  description: "Starting heading level (1-6). Defaults to 1 if not specified."
1524
1492
  })
1525
1493
  ),
1526
- to: Type14.Optional(
1527
- Type14.Number({
1494
+ to: Type12.Optional(
1495
+ Type12.Number({
1528
1496
  minimum: 1,
1529
1497
  maximum: 6,
1530
1498
  default: 3,
@@ -1537,26 +1505,26 @@ var TocDepthRangeSchema = Type14.Object(
1537
1505
  additionalProperties: false
1538
1506
  }
1539
1507
  );
1540
- var TocPropsSchema = Type14.Object(
1508
+ var TocPropsSchema = Type12.Object(
1541
1509
  {
1542
- pageBreak: Type14.Optional(
1543
- Type14.Boolean({
1510
+ pageBreak: Type12.Optional(
1511
+ Type12.Boolean({
1544
1512
  description: "Insert page break before TOC block"
1545
1513
  })
1546
1514
  ),
1547
- depth: Type14.Optional(
1548
- Type14.Object(
1515
+ depth: Type12.Optional(
1516
+ Type12.Object(
1549
1517
  {
1550
- from: Type14.Optional(
1551
- Type14.Number({
1518
+ from: Type12.Optional(
1519
+ Type12.Number({
1552
1520
  minimum: 1,
1553
1521
  maximum: 6,
1554
1522
  default: 1,
1555
1523
  description: "Starting heading level (1-6). Defaults to 1 if not specified."
1556
1524
  })
1557
1525
  ),
1558
- to: Type14.Optional(
1559
- Type14.Number({
1526
+ to: Type12.Optional(
1527
+ Type12.Number({
1560
1528
  minimum: 1,
1561
1529
  maximum: 6,
1562
1530
  default: 3,
@@ -1571,19 +1539,19 @@ var TocPropsSchema = Type14.Object(
1571
1539
  }
1572
1540
  )
1573
1541
  ),
1574
- pageNumbersDepth: Type14.Optional(
1575
- Type14.Object(
1542
+ pageNumbersDepth: Type12.Optional(
1543
+ Type12.Object(
1576
1544
  {
1577
- from: Type14.Optional(
1578
- Type14.Number({
1545
+ from: Type12.Optional(
1546
+ Type12.Number({
1579
1547
  minimum: 1,
1580
1548
  maximum: 6,
1581
1549
  default: 1,
1582
1550
  description: "Starting heading level (1-6). Defaults to 1 if not specified."
1583
1551
  })
1584
1552
  ),
1585
- to: Type14.Optional(
1586
- Type14.Number({
1553
+ to: Type12.Optional(
1554
+ Type12.Number({
1587
1555
  minimum: 1,
1588
1556
  maximum: 6,
1589
1557
  default: 3,
@@ -1597,32 +1565,32 @@ var TocPropsSchema = Type14.Object(
1597
1565
  }
1598
1566
  )
1599
1567
  ),
1600
- numberingStyle: Type14.Optional(TocStyleSchema),
1601
- title: Type14.Optional(
1602
- Type14.String({
1568
+ numberingStyle: Type12.Optional(TocStyleSchema),
1569
+ title: Type12.Optional(
1570
+ Type12.String({
1603
1571
  description: "TOC heading title"
1604
1572
  })
1605
1573
  ),
1606
- includePageNumbers: Type14.Optional(
1607
- Type14.Boolean({
1574
+ includePageNumbers: Type12.Optional(
1575
+ Type12.Boolean({
1608
1576
  default: true,
1609
1577
  description: "Show page numbers next to entries"
1610
1578
  })
1611
1579
  ),
1612
- numberSeparator: Type14.Optional(
1613
- Type14.Boolean({
1580
+ numberSeparator: Type12.Optional(
1581
+ Type12.Boolean({
1614
1582
  default: true,
1615
1583
  description: 'Use tab separator between entry and page number. True applies "\\t" (default), false applies " "'
1616
1584
  })
1617
1585
  ),
1618
- scope: Type14.Optional(
1619
- Type14.Union([TocScopeSchema, Type14.Literal("auto")], {
1586
+ scope: Type12.Optional(
1587
+ Type12.Union([TocScopeSchema, Type12.Literal("auto")], {
1620
1588
  default: "auto",
1621
1589
  description: 'TOC scope: "document" for entire document, "section" for parent section only, "auto" for automatic detection (section if inside section, otherwise document)'
1622
1590
  })
1623
1591
  ),
1624
- styles: Type14.Optional(
1625
- Type14.Array(TocStyleMappingSchema, {
1592
+ styles: Type12.Optional(
1593
+ Type12.Array(TocStyleMappingSchema, {
1626
1594
  description: "Custom style mappings for TOC entries. Maps custom theme styles to TOC levels."
1627
1595
  })
1628
1596
  )
@@ -1634,31 +1602,31 @@ var TocPropsSchema = Type14.Object(
1634
1602
  );
1635
1603
 
1636
1604
  // src/schemas/components/highcharts.ts
1637
- import { Type as Type15 } from "@sinclair/typebox";
1638
- var HighchartsPropsSchema = Type15.Object({
1605
+ import { Type as Type13 } from "@sinclair/typebox";
1606
+ var HighchartsPropsSchema = Type13.Object({
1639
1607
  // Highcharts chart options - can be anything but must at least have chart.width and chart.height
1640
- options: Type15.Intersect([
1641
- Type15.Record(Type15.String(), Type15.Unknown()),
1642
- Type15.Object({
1643
- chart: Type15.Object({
1644
- width: Type15.Number(),
1645
- height: Type15.Number()
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()
1646
1614
  })
1647
1615
  })
1648
1616
  ]),
1649
1617
  // Optional scale factor for export
1650
- scale: Type15.Optional(Type15.Number()),
1618
+ scale: Type13.Optional(Type13.Number()),
1651
1619
  // Optional Highcharts Export Server URL override
1652
- serverUrl: Type15.Optional(Type15.String({ description: "Highcharts Export Server URL (default: http://localhost:7801)" })),
1620
+ serverUrl: Type13.Optional(Type13.String({ description: "Highcharts Export Server URL (default: http://localhost:7801)" })),
1653
1621
  // Optional width for rendering (overrides chart width)
1654
- width: Type15.Optional(
1655
- Type15.Union(
1622
+ width: Type13.Optional(
1623
+ Type13.Union(
1656
1624
  [
1657
- Type15.Number({
1625
+ Type13.Number({
1658
1626
  minimum: 1,
1659
1627
  description: "Image width in pixels"
1660
1628
  }),
1661
- Type15.String({
1629
+ Type13.String({
1662
1630
  pattern: "^\\d+(\\.\\d+)?%$",
1663
1631
  description: 'Image width as percentage (e.g., "90%") relative to content width'
1664
1632
  })
@@ -1669,14 +1637,14 @@ var HighchartsPropsSchema = Type15.Object({
1669
1637
  )
1670
1638
  ),
1671
1639
  // Optional height for rendering (overrides chart height)
1672
- height: Type15.Optional(
1673
- Type15.Union(
1640
+ height: Type13.Optional(
1641
+ Type13.Union(
1674
1642
  [
1675
- Type15.Number({
1643
+ Type13.Number({
1676
1644
  minimum: 1,
1677
1645
  description: "Image height in pixels"
1678
1646
  }),
1679
- Type15.String({
1647
+ Type13.String({
1680
1648
  pattern: "^\\d+(\\.\\d+)?%$",
1681
1649
  description: 'Image height as percentage (e.g., "90%") relative to content height'
1682
1650
  })
@@ -1790,20 +1758,6 @@ var STANDARD_COMPONENTS_REGISTRY = [
1790
1758
  category: "content",
1791
1759
  description: "Data table - displays tabular data with headers. Supports formatting and alignment."
1792
1760
  },
1793
- {
1794
- name: "header",
1795
- propsSchema: HeaderPropsSchema,
1796
- hasChildren: false,
1797
- category: "content",
1798
- description: "Page header - appears at the top of pages. Can include text and page numbers."
1799
- },
1800
- {
1801
- name: "footer",
1802
- propsSchema: FooterPropsSchema,
1803
- hasChildren: false,
1804
- category: "content",
1805
- description: "Page footer - appears at the bottom of pages. Can include text and page numbers."
1806
- },
1807
1761
  {
1808
1762
  name: "list",
1809
1763
  propsSchema: ListPropsSchema,
@@ -1846,23 +1800,23 @@ function isStandardComponent(name) {
1846
1800
  }
1847
1801
  function createComponentSchemaObject(component, childrenType, selfRef) {
1848
1802
  const schema = {
1849
- name: Type16.Literal(component.name),
1850
- id: Type16.Optional(Type16.String()),
1851
- enabled: Type16.Optional(
1852
- Type16.Boolean({
1803
+ name: Type14.Literal(component.name),
1804
+ id: Type14.Optional(Type14.String()),
1805
+ enabled: Type14.Optional(
1806
+ Type14.Boolean({
1853
1807
  default: true,
1854
1808
  description: "When false, this component is filtered out and not rendered. Defaults to true. Useful for conditional component inclusion."
1855
1809
  })
1856
1810
  )
1857
1811
  };
1858
1812
  if (component.special?.hasSchemaField) {
1859
- schema.$schema = Type16.Optional(Type16.String({ format: "uri" }));
1813
+ schema.$schema = Type14.Optional(Type14.String({ format: "uri" }));
1860
1814
  }
1861
1815
  schema.props = component.createPropsSchema && selfRef ? component.createPropsSchema(selfRef) : component.propsSchema;
1862
1816
  if (component.hasChildren && childrenType) {
1863
- schema.children = Type16.Optional(Type16.Array(childrenType));
1817
+ schema.children = Type14.Optional(Type14.Array(childrenType));
1864
1818
  }
1865
- return Type16.Object(schema, { additionalProperties: false });
1819
+ return Type14.Object(schema, { additionalProperties: false });
1866
1820
  }
1867
1821
  function createAllComponentSchemas(recursiveRef) {
1868
1822
  return STANDARD_COMPONENTS_REGISTRY.map(
@@ -1900,7 +1854,7 @@ function createAllComponentSchemasNarrowed(selfRef, pluginSchemas = []) {
1900
1854
  if (!containerDeps.every((d) => resolved.has(d))) continue;
1901
1855
  const childSchemas = comp.allowedChildren.map((name) => resolved.get(name) ?? leafSchemas.get(name)).filter((s) => s !== void 0);
1902
1856
  const allChildSchemas = [...childSchemas, ...pluginSchemas];
1903
- const childrenType = allChildSchemas.length === 1 ? allChildSchemas[0] : Type16.Union(allChildSchemas);
1857
+ const childrenType = allChildSchemas.length === 1 ? allChildSchemas[0] : Type14.Union(allChildSchemas);
1904
1858
  resolved.set(
1905
1859
  comp.name,
1906
1860
  createComponentSchemaObject(comp, childrenType, selfRef)
@@ -1949,8 +1903,6 @@ export {
1949
1903
  StatisticPropsSchema,
1950
1904
  createTablePropsSchema,
1951
1905
  TablePropsSchema,
1952
- HeaderPropsSchema,
1953
- FooterPropsSchema,
1954
1906
  LevelFormatSchema,
1955
1907
  ListLevelPropsSchema,
1956
1908
  ListPropsSchema,
@@ -1971,4 +1923,4 @@ export {
1971
1923
  createAllComponentSchemas,
1972
1924
  createAllComponentSchemasNarrowed
1973
1925
  };
1974
- //# sourceMappingURL=chunk-3D6HY6AC.js.map
1926
+ //# sourceMappingURL=chunk-PN6JT3KF.js.map