@json-to-office/core-docx 1.11.0 → 2.0.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.
@@ -184,545 +184,181 @@ var minimal_docx_theme_default;
184
184
  var init_minimal_docx_theme = __esm({
185
185
  "src/templates/themes/minimal.docx.theme.json"() {
186
186
  minimal_docx_theme_default = {
187
- $schema: "../../../../shared/json-schemas/theme.schema.json",
188
187
  name: "minimal",
189
188
  displayName: "Minimal Clean",
190
- description: "A clean, minimalist theme focused on readability and elegant simplicity",
191
- version: "2.0.0",
189
+ description: "A quiet, warm minimal theme \u2014 Calibri throughout, sage-green ink on ivory neutrals, a large tracked-tight bold title, wide margins and hairline rules",
190
+ version: "4.0.0",
192
191
  colors: {
193
- primary: "#000000",
194
- secondary: "#666666",
195
- accent: "#2c3e50",
196
- background: "#ffffff",
197
- text: "#2c2c2c",
198
- border: "#f0f0f0",
199
- textPrimary: "#000000",
200
- textSecondary: "#4a4a4a",
201
- textMuted: "#999999",
202
- borderPrimary: "#e0e0e0",
203
- borderSecondary: "#f5f5f5",
204
- backgroundPrimary: "#ffffff",
205
- backgroundSecondary: "#fafafa"
206
- },
207
- fonts: {
208
- heading: {
209
- family: "Arial",
210
- size: 24
211
- },
212
- body: {
213
- family: "Arial",
214
- size: 11
215
- },
216
- mono: {
217
- family: "Menlo",
218
- size: 10
219
- },
220
- light: {
221
- family: "Arial",
222
- size: 24
223
- }
224
- },
225
- page: {
226
- size: "A4",
227
- margins: {
228
- top: 1440,
229
- bottom: 1440,
230
- left: 1080,
231
- right: 1080,
232
- header: 720,
233
- footer: 720,
234
- gutter: 0
235
- }
236
- },
237
- styles: {
238
- normal: {
239
- font: "body",
240
- color: "#000000",
241
- lineSpacing: {
242
- type: "multiple",
243
- value: 1.5
244
- },
245
- alignment: "justify",
246
- spacing: {
247
- after: 9
248
- }
249
- },
250
- heading1: {
251
- font: "light",
252
- size: 24,
253
- bold: false,
254
- color: "#000000",
255
- spacing: {
256
- before: 18,
257
- after: 12
258
- },
259
- keepNext: true,
260
- alignment: "left",
261
- characterSpacing: {
262
- type: "expanded",
263
- value: 1.2
264
- }
265
- },
266
- heading2: {
267
- font: "light",
268
- size: 20,
269
- bold: false,
270
- color: "#000000",
271
- spacing: {
272
- before: 12,
273
- after: 9
274
- },
275
- keepNext: true,
276
- alignment: "left",
277
- characterSpacing: {
278
- type: "expanded",
279
- value: 0.8
280
- }
281
- },
282
- heading3: {
283
- font: "heading",
284
- size: 16,
285
- bold: false,
286
- color: "#2c2c2c",
287
- spacing: {
288
- before: 9,
289
- after: 6
290
- },
291
- keepNext: true,
292
- alignment: "left"
293
- },
294
- heading4: {
295
- font: "heading",
296
- size: 14,
297
- bold: true,
298
- color: "#4a4a4a",
299
- spacing: {
300
- before: 6,
301
- after: 4
302
- },
303
- keepNext: true
304
- },
305
- heading5: {
306
- font: "heading",
307
- size: 12,
308
- bold: false,
309
- italic: true,
310
- color: "#666666",
311
- spacing: {
312
- before: 4,
313
- after: 3
314
- }
315
- },
316
- heading6: {
317
- font: "light",
318
- size: 11,
319
- bold: false,
320
- color: "#999999",
321
- spacing: {
322
- before: 3,
323
- after: 2
324
- }
325
- },
326
- title: {
327
- font: "light",
328
- bold: false,
329
- color: "#000000",
330
- alignment: "left",
331
- spacing: {
332
- before: 0,
333
- after: 24
334
- },
335
- characterSpacing: {
336
- type: "condensed",
337
- value: 20
338
- }
339
- },
340
- subtitle: {
341
- font: "light",
342
- size: 16,
343
- italic: false,
344
- color: "#666666",
345
- alignment: "left",
346
- spacing: {
347
- before: 0,
348
- after: 18
349
- }
350
- }
351
- },
352
- componentDefaults: {
353
- table: {
354
- borderColor: "#f0f0f0"
355
- },
356
- list: {
357
- format: "bullet",
358
- bullet: "\u2022"
359
- },
360
- image: {
361
- alignment: "left"
362
- },
363
- statistic: {
364
- alignment: "left"
365
- },
366
- section: {
367
- pageBreak: false
368
- }
369
- }
370
- };
371
- }
372
- });
373
-
374
- // src/templates/themes/corporate.docx.theme.json
375
- var corporate_docx_theme_default;
376
- var init_corporate_docx_theme = __esm({
377
- "src/templates/themes/corporate.docx.theme.json"() {
378
- corporate_docx_theme_default = {
379
- name: "corporate",
380
- displayName: "Corporate Professional",
381
- description: "A polished corporate theme with blue accents and structured typography",
382
- version: "2.0.0",
383
- colors: {
384
- primary: "#1a365d",
385
- secondary: "#2D3748",
386
- accent: "#3182CE",
387
- text: "#1A202C",
192
+ primary: "#2B302B",
193
+ secondary: "#4A5B4E",
194
+ accent: "#6E7F71",
195
+ text: "#3B3C38",
388
196
  background: "#FFFFFF",
389
- border: "#E2E8F0",
390
- textPrimary: "#1A202C",
391
- textSecondary: "#4A5568",
392
- textMuted: "#A0AEC0",
393
- borderPrimary: "#CBD5E0",
394
- borderSecondary: "#E2E8F0",
197
+ border: "#D8D3C8",
198
+ textPrimary: "#3B3C38",
199
+ textSecondary: "#5B5B54",
200
+ textMuted: "#75726A",
201
+ borderPrimary: "#D8D3C8",
202
+ borderSecondary: "#E9E6DE",
395
203
  backgroundPrimary: "#FFFFFF",
396
- backgroundSecondary: "#F7FAFC"
204
+ backgroundSecondary: "#F1EFE9",
205
+ accent4: "#9AA69C",
206
+ accent5: "#C9CFC7",
207
+ accent6: "#B5AC9D"
397
208
  },
398
209
  fonts: {
399
- heading: { family: "Georgia", size: 26 },
400
- body: { family: "Calibri", size: 11 },
401
- mono: { family: "Consolas", size: 10 },
402
- light: { family: "Georgia", size: 26 }
210
+ heading: { family: "Calibri", size: 21 },
211
+ body: { family: "Calibri", size: 10 },
212
+ mono: { family: "Courier New", size: 10 },
213
+ light: { family: "Calibri", size: 21 }
403
214
  },
404
215
  page: {
405
216
  size: "A4",
406
217
  margins: {
407
- top: 1440,
408
- bottom: 1440,
409
- left: 1200,
410
- right: 1200,
411
- header: 720,
412
- footer: 720,
218
+ top: 1700,
219
+ bottom: 1700,
220
+ left: 1700,
221
+ right: 1700,
222
+ header: 850,
223
+ footer: 850,
413
224
  gutter: 0
414
225
  }
415
226
  },
416
227
  styles: {
417
228
  normal: {
418
229
  font: "body",
419
- color: "#1A202C",
420
- lineSpacing: { type: "multiple", value: 1.4 },
421
- alignment: "justify",
422
- spacing: { after: 8 }
423
- },
424
- heading1: {
425
- font: "heading",
426
- size: 26,
427
- bold: false,
428
- color: "primary",
429
- spacing: { before: 24, after: 12 },
430
- keepNext: true,
230
+ color: "textPrimary",
231
+ lineSpacing: { type: "multiple", value: 1.35 },
431
232
  alignment: "left",
432
- borders: {
433
- bottom: {
434
- style: "single",
435
- size: 2,
436
- color: "primary",
437
- space: 6
438
- }
439
- }
233
+ spacing: { after: 8 }
440
234
  },
441
- heading2: {
235
+ title: {
442
236
  font: "heading",
443
- size: 18,
444
- bold: false,
445
- color: "secondary",
446
- spacing: { before: 18, after: 8 },
447
- keepNext: true,
448
- alignment: "left"
449
- },
450
- heading3: {
451
- font: "body",
452
- size: 13,
237
+ size: 34,
453
238
  bold: true,
454
- color: "accent",
455
- spacing: { before: 12, after: 6 },
456
- keepNext: true,
457
- alignment: "left"
458
- },
459
- title: {
460
- font: "light",
461
- size: 32,
462
- bold: false,
463
239
  color: "primary",
464
240
  alignment: "left",
465
- spacing: { before: 0, after: 18 }
241
+ lineSpacing: { type: "multiple", value: 1 },
242
+ characterSpacing: { type: "condensed", value: 20 },
243
+ spacing: { before: 0, after: 11 }
466
244
  },
467
245
  subtitle: {
468
246
  font: "body",
469
- size: 16,
247
+ size: 13,
470
248
  italic: false,
471
249
  color: "textSecondary",
472
250
  alignment: "left",
473
- spacing: { before: 0, after: 24 }
474
- }
475
- },
476
- componentDefaults: {
477
- table: {
478
- borderColor: "#E2E8F0"
479
- },
480
- list: {
481
- format: "bullet",
482
- bullet: "\u2022"
483
- },
484
- statistic: {
485
- alignment: "center"
486
- },
487
- section: {
488
- pageBreak: false
489
- }
490
- }
491
- };
492
- }
493
- });
494
-
495
- // src/templates/themes/modern.docx.theme.json
496
- var modern_docx_theme_default;
497
- var init_modern_docx_theme = __esm({
498
- "src/templates/themes/modern.docx.theme.json"() {
499
- modern_docx_theme_default = {
500
- name: "modern",
501
- displayName: "Modern Clean",
502
- description: "A contemporary theme with vibrant accents and generous whitespace",
503
- version: "2.0.0",
504
- colors: {
505
- primary: "#6D28D9",
506
- secondary: "#1E293B",
507
- accent: "#0891B2",
508
- text: "#0F172A",
509
- background: "#FFFFFF",
510
- border: "#E2E8F0",
511
- textPrimary: "#0F172A",
512
- textSecondary: "#475569",
513
- textMuted: "#94A3B8",
514
- borderPrimary: "#CBD5E1",
515
- borderSecondary: "#E2E8F0",
516
- backgroundPrimary: "#FFFFFF",
517
- backgroundSecondary: "#F8FAFC"
518
- },
519
- fonts: {
520
- heading: { family: "Helvetica", size: 28 },
521
- body: { family: "Helvetica", size: 11 },
522
- mono: { family: "Menlo", size: 10 },
523
- light: { family: "Helvetica", size: 28 }
524
- },
525
- page: {
526
- size: "A4",
527
- margins: {
528
- top: 1440,
529
- bottom: 1440,
530
- left: 1080,
531
- right: 1080,
532
- header: 720,
533
- footer: 720,
534
- gutter: 0
535
- }
536
- },
537
- styles: {
538
- normal: {
539
- font: "body",
540
- color: "#0F172A",
541
- lineSpacing: { type: "multiple", value: 1.5 },
542
- alignment: "left",
543
- spacing: { after: 10 }
251
+ lineSpacing: { type: "multiple", value: 1.2 },
252
+ spacing: { before: 0, after: 22 }
544
253
  },
545
254
  heading1: {
546
255
  font: "heading",
547
- size: 28,
256
+ size: 21,
548
257
  bold: true,
549
258
  color: "primary",
550
- spacing: { before: 24, after: 14 },
259
+ lineSpacing: { type: "multiple", value: 1.15 },
260
+ spacing: { before: 30, after: 10 },
551
261
  keepNext: true,
552
262
  alignment: "left"
553
263
  },
554
264
  heading2: {
555
265
  font: "heading",
556
- size: 20,
266
+ size: 14.5,
557
267
  bold: true,
558
- color: "secondary",
559
- spacing: { before: 18, after: 10 },
268
+ color: "primary",
269
+ lineSpacing: { type: "multiple", value: 1.15 },
270
+ spacing: { before: 22, after: 8 },
560
271
  keepNext: true,
561
272
  alignment: "left"
562
273
  },
563
274
  heading3: {
564
- font: "body",
565
- size: 14,
275
+ font: "heading",
276
+ size: 12,
566
277
  bold: true,
567
- color: "accent",
568
- spacing: { before: 12, after: 6 },
278
+ color: "primary",
279
+ spacing: { before: 16, after: 6 },
569
280
  keepNext: true,
570
281
  alignment: "left"
571
282
  },
572
- title: {
573
- font: "heading",
574
- size: 36,
283
+ heading4: {
284
+ font: "body",
285
+ size: 10.5,
575
286
  bold: true,
576
287
  color: "primary",
577
- alignment: "left",
578
- spacing: { before: 0, after: 12 }
579
- },
580
- subtitle: {
581
- font: "light",
582
- size: 18,
583
- italic: false,
584
- color: "textSecondary",
585
- alignment: "left",
586
- spacing: { before: 0, after: 24 }
587
- }
588
- },
589
- componentDefaults: {
590
- table: {
591
- borderColor: "#E2E8F0"
592
- },
593
- list: {
594
- format: "bullet",
595
- bullet: "\u2013"
596
- },
597
- image: {
598
- alignment: "center"
599
- },
600
- statistic: {
601
- alignment: "center"
288
+ spacing: { before: 12, after: 4 },
289
+ keepNext: true,
290
+ alignment: "left"
602
291
  },
603
- section: {
604
- pageBreak: false
605
- }
606
- }
607
- };
608
- }
609
- });
610
-
611
- // src/templates/themes/apex.docx.theme.json
612
- var apex_docx_theme_default;
613
- var init_apex_docx_theme = __esm({
614
- "src/templates/themes/apex.docx.theme.json"() {
615
- apex_docx_theme_default = {
616
- name: "apex",
617
- displayName: "Apex Consulting",
618
- description: "A premium consulting theme with deep navy, warm amber accents, and authoritative typography",
619
- version: "2.0.0",
620
- colors: {
621
- primary: "#0C2340",
622
- secondary: "#1B3A5C",
623
- accent: "#D4A843",
624
- text: "#1A1A2E",
625
- background: "#FFFFFF",
626
- border: "#D6DAE0",
627
- textPrimary: "#1A1A2E",
628
- textSecondary: "#4A5066",
629
- textMuted: "#8B91A0",
630
- borderPrimary: "#B8BCC6",
631
- borderSecondary: "#E8EAF0",
632
- backgroundPrimary: "#FFFFFF",
633
- backgroundSecondary: "#F4F5F8"
634
- },
635
- fonts: {
636
- heading: { family: "Georgia", size: 26 },
637
- body: { family: "Calibri", size: 11 },
638
- mono: { family: "Consolas", size: 10 },
639
- light: { family: "Georgia", size: 26 }
640
- },
641
- page: {
642
- size: "A4",
643
- margins: {
644
- top: 1440,
645
- bottom: 1440,
646
- left: 1200,
647
- right: 1200,
648
- header: 720,
649
- footer: 720,
650
- gutter: 0
651
- }
652
- },
653
- styles: {
654
- normal: {
292
+ heading5: {
655
293
  font: "body",
656
- color: "textPrimary",
657
- lineSpacing: { type: "multiple", value: 1.4 },
658
- alignment: "justify",
659
- spacing: { after: 8 }
660
- },
661
- heading1: {
662
- font: "heading",
663
- size: 26,
294
+ size: 10.5,
664
295
  bold: false,
665
- color: "primary",
666
- spacing: { before: 24, after: 12 },
296
+ italic: true,
297
+ color: "textSecondary",
298
+ spacing: { before: 10, after: 4 },
667
299
  keepNext: true,
668
- alignment: "left",
669
- borders: {
670
- bottom: {
671
- style: "single",
672
- size: 2,
673
- color: "accent",
674
- space: 6
675
- }
676
- }
300
+ alignment: "left"
677
301
  },
678
- heading2: {
679
- font: "heading",
680
- size: 18,
302
+ heading6: {
303
+ font: "body",
304
+ size: 10,
681
305
  bold: false,
682
- color: "secondary",
683
- spacing: { before: 18, after: 8 },
306
+ color: "textMuted",
307
+ characterSpacing: { type: "expanded", value: 20 },
308
+ spacing: { before: 10, after: 4 },
684
309
  keepNext: true,
685
310
  alignment: "left"
686
311
  },
687
- heading3: {
312
+ TOC1: {
688
313
  font: "body",
689
- size: 13,
314
+ size: 10.5,
690
315
  bold: true,
691
- color: "accent",
692
- spacing: { before: 12, after: 6 },
693
- keepNext: true,
694
- alignment: "left"
695
- },
696
- title: {
697
- font: "light",
698
- size: 36,
699
- bold: false,
700
- color: "primary",
701
- alignment: "left",
702
- spacing: { before: 0, after: 18 }
316
+ color: "textPrimary",
317
+ spacing: { before: 4, after: 3 },
318
+ tabStops: [{ type: "right", position: 8506, leader: "none" }]
703
319
  },
704
- subtitle: {
320
+ TOC2: {
705
321
  font: "body",
706
- size: 16,
707
- italic: false,
322
+ size: 10.5,
708
323
  color: "textSecondary",
709
- alignment: "left",
710
- spacing: { before: 0, after: 24 }
324
+ indent: { left: 240 },
325
+ spacing: { after: 2 },
326
+ tabStops: [{ type: "right", position: 8506, leader: "none" }]
327
+ },
328
+ TOC3: {
329
+ font: "body",
330
+ size: 10,
331
+ color: "textMuted",
332
+ indent: { left: 480 },
333
+ spacing: { after: 2 },
334
+ tabStops: [{ type: "right", position: 8506, leader: "none" }]
711
335
  }
712
336
  },
713
337
  componentDefaults: {
714
338
  table: {
715
- borderColor: "#D6DAE0"
339
+ borderColor: "#D8D3C8",
340
+ borderSize: 0.5,
341
+ hideBorders: { left: true, right: true, insideVertical: true },
342
+ cellDefaults: {
343
+ padding: { top: 3, bottom: 3 }
344
+ },
345
+ headerCellDefaults: {
346
+ font: { bold: true },
347
+ color: "#2B302B",
348
+ borderColor: { bottom: "#2B302B" },
349
+ borderSize: { bottom: 1 }
350
+ }
716
351
  },
717
352
  list: {
718
353
  format: "bullet",
719
- bullet: "\u2022"
354
+ bullet: "\u2013",
355
+ spacing: { item: 2 }
720
356
  },
721
357
  image: {
722
- alignment: "center"
358
+ alignment: "left"
723
359
  },
724
360
  statistic: {
725
- alignment: "center"
361
+ alignment: "left"
726
362
  },
727
363
  section: {
728
364
  pageBreak: false
@@ -738,29 +374,32 @@ var init_devportal_docx_theme = __esm({
738
374
  "src/templates/themes/devportal.docx.theme.json"() {
739
375
  devportal_docx_theme_default = {
740
376
  name: "devportal",
741
- displayName: "Developer Portal",
742
- description: "A modern developer-focused theme with cool grays, teal accents, and monospace code styling",
743
- version: "2.0.0",
377
+ displayName: "Field Editorial",
378
+ description: "A compact editorial theme \u2014 Helvetica in near-black ink with a burnt-orange accent, tight condensed titles, letterspaced labels, warm tinted fills and hairline rules",
379
+ version: "4.0.0",
744
380
  colors: {
745
- primary: "#0F172A",
746
- secondary: "#334155",
747
- accent: "#0D9488",
748
- text: "#0F172A",
381
+ primary: "#12191F",
382
+ secondary: "#172028",
383
+ accent: "#E35B3F",
384
+ text: "#232323",
749
385
  background: "#FFFFFF",
750
- border: "#E2E8F0",
751
- textPrimary: "#0F172A",
752
- textSecondary: "#475569",
753
- textMuted: "#94A3B8",
754
- borderPrimary: "#CBD5E1",
755
- borderSecondary: "#F1F5F9",
386
+ border: "#E2E0DD",
387
+ textPrimary: "#232323",
388
+ textSecondary: "#46494C",
389
+ textMuted: "#737373",
390
+ borderPrimary: "#D8D5D1",
391
+ borderSecondary: "#F2F3F3",
756
392
  backgroundPrimary: "#FFFFFF",
757
- backgroundSecondary: "#F8FAFC"
393
+ backgroundSecondary: "#F7ECE7",
394
+ accent4: "#46494C",
395
+ accent5: "#8A9299",
396
+ accent6: "#E8A18D"
758
397
  },
759
398
  fonts: {
760
- heading: { family: "Helvetica", size: 24 },
761
- body: { family: "Calibri", size: 11 },
762
- mono: { family: "Consolas", size: 10 },
763
- light: { family: "Helvetica", size: 24 }
399
+ heading: { family: "Helvetica", size: 23 },
400
+ body: { family: "Helvetica", size: 9.5 },
401
+ mono: { family: "Courier New", size: 10 },
402
+ light: { family: "Helvetica", size: 23 }
764
403
  },
765
404
  page: {
766
405
  size: "A4",
@@ -778,22 +417,42 @@ var init_devportal_docx_theme = __esm({
778
417
  normal: {
779
418
  font: "body",
780
419
  color: "textPrimary",
781
- lineSpacing: { type: "multiple", value: 1.5 },
420
+ lineSpacing: { type: "multiple", value: 1.3 },
782
421
  alignment: "left",
783
- spacing: { after: 8 }
422
+ spacing: { after: 7 }
423
+ },
424
+ title: {
425
+ font: "heading",
426
+ size: 29,
427
+ bold: true,
428
+ color: "primary",
429
+ alignment: "left",
430
+ lineSpacing: { type: "multiple", value: 1.02 },
431
+ characterSpacing: { type: "condensed", value: 8 },
432
+ spacing: { before: 0, after: 10 }
433
+ },
434
+ subtitle: {
435
+ font: "body",
436
+ size: 10.5,
437
+ italic: false,
438
+ color: "textSecondary",
439
+ alignment: "left",
440
+ lineSpacing: { type: "multiple", value: 1.25 },
441
+ spacing: { before: 0, after: 12 }
784
442
  },
785
443
  heading1: {
786
444
  font: "heading",
787
- size: 24,
445
+ size: 21,
788
446
  bold: true,
789
447
  color: "primary",
790
- spacing: { before: 24, after: 12 },
448
+ lineSpacing: { type: "multiple", value: 1.15 },
449
+ spacing: { before: 26, after: 12 },
791
450
  keepNext: true,
792
451
  alignment: "left",
793
452
  borders: {
794
453
  bottom: {
795
454
  style: "single",
796
- size: 1,
455
+ size: 4,
797
456
  color: "accent",
798
457
  space: 6
799
458
  }
@@ -801,54 +460,97 @@ var init_devportal_docx_theme = __esm({
801
460
  },
802
461
  heading2: {
803
462
  font: "heading",
804
- size: 18,
463
+ size: 15.5,
805
464
  bold: true,
806
465
  color: "secondary",
807
- spacing: { before: 18, after: 8 },
466
+ lineSpacing: { type: "multiple", value: 1.15 },
467
+ spacing: { before: 20, after: 8 },
808
468
  keepNext: true,
809
469
  alignment: "left"
810
470
  },
811
471
  heading3: {
812
472
  font: "body",
813
- size: 13,
473
+ size: 12.5,
814
474
  bold: true,
815
- color: "accent",
816
- spacing: { before: 12, after: 6 },
475
+ color: "secondary",
476
+ spacing: { before: 14, after: 6 },
817
477
  keepNext: true,
818
478
  alignment: "left"
819
479
  },
820
480
  heading4: {
821
481
  font: "body",
822
- size: 12,
482
+ size: 11.5,
483
+ bold: true,
484
+ color: "textPrimary",
485
+ spacing: { before: 12, after: 4 },
486
+ keepNext: true,
487
+ alignment: "left"
488
+ },
489
+ heading5: {
490
+ font: "mono",
491
+ size: 10.5,
823
492
  bold: true,
493
+ color: "secondary",
494
+ spacing: { before: 10, after: 4 },
495
+ keepNext: true,
496
+ alignment: "left"
497
+ },
498
+ heading6: {
499
+ font: "body",
500
+ size: 10.5,
501
+ bold: false,
824
502
  color: "textSecondary",
825
- spacing: { before: 8, after: 4 },
826
- keepNext: true
503
+ characterSpacing: { type: "expanded", value: 20 },
504
+ spacing: { before: 10, after: 4 },
505
+ keepNext: true,
506
+ alignment: "left"
827
507
  },
828
- title: {
829
- font: "heading",
830
- size: 32,
508
+ TOC1: {
509
+ font: "body",
510
+ size: 11,
831
511
  bold: true,
832
512
  color: "primary",
833
- alignment: "left",
834
- spacing: { before: 0, after: 12 }
513
+ spacing: { before: 5, after: 3 },
514
+ tabStops: [{ type: "right", position: 9746, leader: "dot" }]
835
515
  },
836
- subtitle: {
837
- font: "light",
838
- size: 16,
839
- italic: false,
516
+ TOC2: {
517
+ font: "body",
518
+ size: 10.5,
519
+ color: "textPrimary",
520
+ indent: { left: 240 },
521
+ spacing: { after: 2 },
522
+ tabStops: [{ type: "right", position: 9746, leader: "dot" }]
523
+ },
524
+ TOC3: {
525
+ font: "body",
526
+ size: 10,
840
527
  color: "textSecondary",
841
- alignment: "left",
842
- spacing: { before: 0, after: 24 }
528
+ indent: { left: 480 },
529
+ spacing: { after: 2 },
530
+ tabStops: [{ type: "right", position: 9746, leader: "dot" }]
843
531
  }
844
532
  },
845
533
  componentDefaults: {
846
534
  table: {
847
- borderColor: "#E2E8F0"
535
+ width: 100,
536
+ borderColor: "#E2E0DD",
537
+ borderSize: 0.5,
538
+ hideBorders: { left: true, right: true, insideVertical: true },
539
+ cellDefaults: {
540
+ padding: { top: 3, bottom: 3 }
541
+ },
542
+ headerCellDefaults: {
543
+ font: { bold: true },
544
+ color: "#172028",
545
+ backgroundColor: "#F7ECE7",
546
+ borderColor: { bottom: "#D8D5D1" },
547
+ borderSize: { bottom: 1 }
548
+ }
848
549
  },
849
550
  list: {
850
551
  format: "bullet",
851
- bullet: "\u2013"
552
+ bullet: "\u2014",
553
+ spacing: { item: 2 }
852
554
  },
853
555
  image: {
854
556
  alignment: "center"
@@ -898,7 +600,7 @@ var init_vermilion_docx_theme = __esm({
898
600
  size: 10.5
899
601
  },
900
602
  mono: {
901
- family: "Consolas",
603
+ family: "Courier New",
902
604
  size: 10
903
605
  },
904
606
  light: {
@@ -975,6 +677,47 @@ var init_vermilion_docx_theme = __esm({
975
677
  keepNext: true,
976
678
  alignment: "left"
977
679
  },
680
+ heading4: {
681
+ font: "body",
682
+ size: 10.5,
683
+ bold: true,
684
+ color: "textSecondary",
685
+ spacing: {
686
+ before: 10,
687
+ after: 4
688
+ },
689
+ keepNext: true,
690
+ alignment: "left"
691
+ },
692
+ heading5: {
693
+ font: "body",
694
+ size: 10.5,
695
+ bold: false,
696
+ italic: true,
697
+ color: "textSecondary",
698
+ spacing: {
699
+ before: 9,
700
+ after: 4
701
+ },
702
+ keepNext: true,
703
+ alignment: "left"
704
+ },
705
+ heading6: {
706
+ font: "body",
707
+ size: 10,
708
+ bold: true,
709
+ color: "textMuted",
710
+ characterSpacing: {
711
+ type: "expanded",
712
+ value: 30
713
+ },
714
+ spacing: {
715
+ before: 9,
716
+ after: 4
717
+ },
718
+ keepNext: true,
719
+ alignment: "left"
720
+ },
978
721
  title: {
979
722
  font: "heading",
980
723
  size: 38,
@@ -996,6 +739,46 @@ var init_vermilion_docx_theme = __esm({
996
739
  after: 10
997
740
  }
998
741
  }
742
+ },
743
+ componentDefaults: {
744
+ table: {
745
+ width: 100,
746
+ borderColor: "#C7C8CA",
747
+ borderSize: 0.5,
748
+ hideBorders: {
749
+ top: true,
750
+ left: true,
751
+ right: true,
752
+ insideVertical: true
753
+ },
754
+ cellDefaults: {
755
+ font: { size: 9.5 },
756
+ padding: { top: 7, bottom: 7 },
757
+ verticalAlignment: "middle"
758
+ },
759
+ headerCellDefaults: {
760
+ color: "#EF4130",
761
+ font: { size: 9.5, bold: true },
762
+ padding: { top: 0, bottom: 8 },
763
+ verticalAlignment: "bottom",
764
+ borderColor: { bottom: "#EF4130" },
765
+ borderSize: { bottom: 0.5 }
766
+ }
767
+ },
768
+ list: {
769
+ format: "bullet",
770
+ bullet: "\u2014",
771
+ spacing: { item: 2 }
772
+ },
773
+ image: {
774
+ alignment: "center"
775
+ },
776
+ statistic: {
777
+ alignment: "center"
778
+ },
779
+ section: {
780
+ pageBreak: false
781
+ }
999
782
  }
1000
783
  };
1001
784
  }
@@ -1014,9 +797,6 @@ function loadThemesFromJson() {
1014
797
  }
1015
798
  const themes2 = {
1016
799
  minimal: ensureThemeDefaults(minimal_docx_theme_default),
1017
- corporate: ensureThemeDefaults(corporate_docx_theme_default),
1018
- modern: ensureThemeDefaults(modern_docx_theme_default),
1019
- apex: ensureThemeDefaults(apex_docx_theme_default),
1020
800
  devportal: ensureThemeDefaults(devportal_docx_theme_default),
1021
801
  vermilion: ensureThemeDefaults(vermilion_docx_theme_default)
1022
802
  };
@@ -1056,15 +836,12 @@ function loadThemesFromJson() {
1056
836
  _themesCache = themes2;
1057
837
  return themes2;
1058
838
  }
1059
- var _themesCache, themes, getTheme, getThemeWithFallback, hasTheme, getThemeNames, minimalTheme, corporateTheme, modernTheme;
839
+ var _themesCache, themes, getTheme, getThemeWithFallback, hasTheme, getThemeNames, minimalTheme, devportalTheme, vermilionTheme;
1060
840
  var init_themes = __esm({
1061
841
  "src/templates/themes/index.ts"() {
1062
842
  "use strict";
1063
843
  init_defaults();
1064
844
  init_minimal_docx_theme();
1065
- init_corporate_docx_theme();
1066
- init_modern_docx_theme();
1067
- init_apex_docx_theme();
1068
845
  init_devportal_docx_theme();
1069
846
  init_vermilion_docx_theme();
1070
847
  _themesCache = null;
@@ -1088,8 +865,8 @@ var init_themes = __esm({
1088
865
  return Object.keys(themes);
1089
866
  };
1090
867
  minimalTheme = themes["minimal"];
1091
- corporateTheme = themes["corporate"];
1092
- modernTheme = themes["modern"];
868
+ devportalTheme = themes["devportal"];
869
+ vermilionTheme = themes["vermilion"];
1093
870
  }
1094
871
  });
1095
872
 
@@ -7013,6 +6790,9 @@ function createLevelsFromSimplifiedProps(props) {
7013
6790
  text = "";
7014
6791
  } else {
7015
6792
  format2 = props.format;
6793
+ if (format2 === "bullet") {
6794
+ text = props.bullet || "\u2022";
6795
+ }
7016
6796
  }
7017
6797
  } else {
7018
6798
  format2 = "bullet";
@@ -7224,7 +7004,7 @@ function outerBorderOverride(position, tableBorderColor, tableBorderSize) {
7224
7004
  const color = normalizeBorderColor(tableBorderColor);
7225
7005
  if (tableBorderColor && color) {
7226
7006
  result.borderColor = {};
7227
- if (position.isHeader && color.top !== UNSET_COLOR) {
7007
+ if ((position.isHeader || position.isFirstRow) && color.top !== UNSET_COLOR) {
7228
7008
  result.borderColor.top = color.top;
7229
7009
  }
7230
7010
  if (position.isFirstCol && color.left !== UNSET_COLOR) {
@@ -7240,7 +7020,7 @@ function outerBorderOverride(position, tableBorderColor, tableBorderSize) {
7240
7020
  const size = normalizeBorderSize(tableBorderSize);
7241
7021
  if (tableBorderSize && size) {
7242
7022
  result.borderSize = {};
7243
- if (position.isHeader && size.top !== UNSET_SIZE) {
7023
+ if ((position.isHeader || position.isFirstRow) && size.top !== UNSET_SIZE) {
7244
7024
  result.borderSize.top = size.top;
7245
7025
  }
7246
7026
  if (position.isFirstCol && size.left !== UNSET_SIZE) {
@@ -7460,6 +7240,7 @@ function resolveTableModel(source, theme, themeName, options = {}) {
7460
7240
  (max, height) => height === void 0 ? max : max === void 0 ? height : Math.max(max, height),
7461
7241
  void 0
7462
7242
  );
7243
+ const hasHeader = columns.some((column) => column.header !== void 0);
7463
7244
  const headerMerges = columns.map(
7464
7245
  (column, colIndex) => mergeHeaderCellDefaults(
7465
7246
  source.cellDefaults,
@@ -7501,6 +7282,7 @@ function resolveTableModel(source, theme, themeName, options = {}) {
7501
7282
  };
7502
7283
  const rows = Array.from({ length: rowCount }, (_, rowIndex) => {
7503
7284
  const isLastRow = rowIndex === rowCount - 1;
7285
+ const isFirstRow = !hasHeader && rowIndex === 0;
7504
7286
  const rowProps = source.rows?.[rowIndex];
7505
7287
  const merges = columns.map(
7506
7288
  (column, colIndex) => mergeCellDefaults(
@@ -7508,6 +7290,7 @@ function resolveTableModel(source, theme, themeName, options = {}) {
7508
7290
  column.cellDefaults,
7509
7291
  column.cells?.[rowIndex],
7510
7292
  {
7293
+ isFirstRow,
7511
7294
  isFirstCol: colIndex === 0,
7512
7295
  isLastCol: colIndex === columnCount - 1,
7513
7296
  isLastRow
@@ -7534,8 +7317,7 @@ function resolveTableModel(source, theme, themeName, options = {}) {
7534
7317
  const cell = column.cells?.[rowIndex];
7535
7318
  const merged = merges[colIndex];
7536
7319
  const position = {
7537
- // Data rows are never the first row; the header is.
7538
- isFirstRow: false,
7320
+ isFirstRow,
7539
7321
  isFirstCol: colIndex === 0,
7540
7322
  isLastCol: colIndex === columnCount - 1,
7541
7323
  isLastRow
@@ -7565,10 +7347,10 @@ function resolveTableModel(source, theme, themeName, options = {}) {
7565
7347
  };
7566
7348
  return row;
7567
7349
  });
7568
- adjudicateInteriorEdges([header, ...rows]);
7350
+ adjudicateInteriorEdges([...hasHeader ? [header] : [], ...rows]);
7569
7351
  return {
7570
7352
  ...resolveWidths(source, columns, theme, themeName),
7571
- header,
7353
+ ...hasHeader ? { header } : {},
7572
7354
  rows,
7573
7355
  repeatHeader: source.repeatHeaderOnPageBreak ?? true
7574
7356
  };
@@ -8449,18 +8231,32 @@ function compileDocument(structure, layout, warnings = [], images = /* @__PURE__
8449
8231
  };
8450
8232
  }
8451
8233
  var AFTER_TABLE_TWIPS = 120;
8234
+ var BEFORE_TABLE_TWIPS = 240;
8452
8235
  var BODY_STYLE_IDS = /* @__PURE__ */ new Set([void 0, "Normal"]);
8453
- function separateFromTables(blocks) {
8236
+ function separateFromTables(blocks, bodyAfterTwips) {
8454
8237
  for (let i = 1; i < blocks.length; i += 1) {
8455
8238
  const block2 = blocks[i];
8456
- if (blocks[i - 1].kind !== "table") continue;
8457
- if (block2.kind !== "paragraph") continue;
8458
- if (!BODY_STYLE_IDS.has(block2.styleId)) continue;
8459
- if (block2.formatting?.spacing?.beforeTwips !== void 0) continue;
8460
- block2.formatting = {
8461
- ...block2.formatting,
8462
- spacing: { ...block2.formatting?.spacing, beforeTwips: AFTER_TABLE_TWIPS }
8463
- };
8239
+ const previous = blocks[i - 1];
8240
+ if (previous.kind === "table" && block2.kind === "paragraph" && BODY_STYLE_IDS.has(block2.styleId) && // An author who stated their own space-before has already answered this.
8241
+ block2.formatting?.spacing?.beforeTwips === void 0) {
8242
+ block2.formatting = {
8243
+ ...block2.formatting,
8244
+ spacing: {
8245
+ ...block2.formatting?.spacing,
8246
+ beforeTwips: AFTER_TABLE_TWIPS
8247
+ }
8248
+ };
8249
+ }
8250
+ if (block2.kind === "table" && previous.kind === "paragraph" && BODY_STYLE_IDS.has(previous.styleId) && // Same rule as below: a stated space-after is the author's answer.
8251
+ previous.formatting?.spacing?.afterTwips === void 0) {
8252
+ previous.formatting = {
8253
+ ...previous.formatting,
8254
+ spacing: {
8255
+ ...previous.formatting?.spacing,
8256
+ afterTwips: Math.max(bodyAfterTwips, BEFORE_TABLE_TWIPS)
8257
+ }
8258
+ };
8259
+ }
8464
8260
  }
8465
8261
  }
8466
8262
  function collectOutline(layout, warnings) {
@@ -8539,7 +8335,10 @@ function compileSection(section2, index, ordinal, chrome, ctx) {
8539
8335
  })
8540
8336
  );
8541
8337
  });
8542
- separateFromTables(children);
8338
+ separateFromTables(
8339
+ children,
8340
+ pointsToTwips2(getNormalStyle(ctx.theme).spacing?.after ?? 0)
8341
+ );
8543
8342
  const compiled = {
8544
8343
  id: `s${index}`,
8545
8344
  path: path3,
@@ -9558,8 +9357,10 @@ function itemSpacing(spacing, index, count) {
9558
9357
  if (index === 0 && spacing?.before !== void 0) {
9559
9358
  out.beforeTwips = pointsToTwips2(spacing.before);
9560
9359
  }
9561
- if (index === count - 1 && spacing?.after !== void 0) {
9562
- out.afterTwips = pointsToTwips2(spacing.after);
9360
+ if (index === count - 1) {
9361
+ if (spacing?.after !== void 0) {
9362
+ out.afterTwips = pointsToTwips2(spacing.after);
9363
+ }
9563
9364
  } else if (spacing?.item !== void 0) {
9564
9365
  out.afterTwips = pointsToTwips2(spacing.item);
9565
9366
  }
@@ -10639,13 +10440,20 @@ function compileTable(component, scope) {
10639
10440
  return [];
10640
10441
  }
10641
10442
  const rows = [
10642
- compileTableRow(model.header, style.headerParagraph, style.tableHeader, {
10643
- ctx,
10644
- path: `${path3}.header`,
10645
- id: `${scope.id}:h`,
10646
- // Headers repeat across page breaks unless the source disabled it.
10647
- isHeader: model.repeatHeader
10648
- }),
10443
+ ...model.header ? [
10444
+ compileTableRow(
10445
+ model.header,
10446
+ style.headerParagraph,
10447
+ style.tableHeader,
10448
+ {
10449
+ ctx,
10450
+ path: `${path3}.header`,
10451
+ id: `${scope.id}:h`,
10452
+ // Headers repeat across page breaks unless the source disabled it.
10453
+ isHeader: model.repeatHeader
10454
+ }
10455
+ )
10456
+ ] : [],
10649
10457
  ...model.rows.map(
10650
10458
  (row, index) => compileTableRow(row, style.cellParagraph, style.tableCell, {
10651
10459
  ctx,
@@ -10707,9 +10515,10 @@ function tableSource(props) {
10707
10515
  };
10708
10516
  }
10709
10517
  function tableBlocker(model, path3) {
10710
- const rows = [model.header, ...model.rows];
10518
+ const headerRows = model.header ? [model.header] : [];
10519
+ const rows = [...headerRows, ...model.rows];
10711
10520
  for (const [rowIndex, row] of rows.entries()) {
10712
- const rowPath = row.isHeader ? `${path3}.header` : `${path3}.rows[${rowIndex - 1}]`;
10521
+ const rowPath = row.isHeader ? `${path3}.header` : `${path3}.rows[${rowIndex - headerRows.length}]`;
10713
10522
  for (const [colIndex, cell] of row.cells.entries()) {
10714
10523
  const cellPath = `${rowPath}.cells[${colIndex}]`;
10715
10524
  const content = cell.content;