@json-to-office/core-docx 1.11.0 → 2.1.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/core/tableModel.d.ts +1 -1
- package/dist/core/tableModel.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +357 -548
- package/dist/index.js.map +1 -1
- package/dist/plugin/example/index.d.ts.map +1 -1
- package/dist/plugin/example/index.js +586 -863
- package/dist/plugin/example/index.js.map +1 -1
- package/dist/plugin/example/plugin-demo.json +16 -93
- package/dist/plugin/example/weather.component.d.ts +73 -9
- package/dist/plugin/example/weather.component.d.ts.map +1 -1
- package/dist/styles/index.d.ts +1 -1
- package/dist/styles/index.d.ts.map +1 -1
- package/dist/templates/documents/field-review.docx.json +1148 -0
- package/dist/templates/documents/index.d.ts +2 -2
- package/dist/templates/documents/index.d.ts.map +1 -1
- package/dist/templates/documents/practice-note.docx.json +917 -0
- package/dist/templates/themes/devportal.docx.theme.json +110 -44
- package/dist/templates/themes/index.d.ts +2 -2
- package/dist/templates/themes/index.d.ts.map +1 -1
- package/dist/templates/themes/minimal.docx.theme.json +124 -127
- package/dist/templates/themes/vermilion.docx.theme.json +82 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/listLevels.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/plugin/example/columns-layout.component.d.ts +0 -29
- package/dist/plugin/example/columns-layout.component.d.ts.map +0 -1
- package/dist/plugin/example/eldermoor-census.component.d.ts +0 -32
- package/dist/plugin/example/eldermoor-census.component.d.ts.map +0 -1
- package/dist/plugin/example/nested-section.component.d.ts +0 -16
- package/dist/plugin/example/nested-section.component.d.ts.map +0 -1
- package/dist/plugin/example/text-space-after.component.d.ts +0 -22
- package/dist/plugin/example/text-space-after.component.d.ts.map +0 -1
- package/dist/templates/documents/proposal.docx.json +0 -8205
- package/dist/templates/documents/technical-guide.docx.json +0 -10220
- package/dist/templates/themes/apex.docx.theme.json +0 -117
- package/dist/templates/themes/corporate.docx.theme.json +0 -114
- package/dist/templates/themes/modern.docx.theme.json +0 -109
package/dist/index.js
CHANGED
|
@@ -257,545 +257,181 @@ var minimal_docx_theme_default;
|
|
|
257
257
|
var init_minimal_docx_theme = __esm({
|
|
258
258
|
"src/templates/themes/minimal.docx.theme.json"() {
|
|
259
259
|
minimal_docx_theme_default = {
|
|
260
|
-
$schema: "../../../../shared/json-schemas/theme.schema.json",
|
|
261
260
|
name: "minimal",
|
|
262
261
|
displayName: "Minimal Clean",
|
|
263
|
-
description: "A
|
|
264
|
-
version: "
|
|
262
|
+
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",
|
|
263
|
+
version: "4.0.0",
|
|
265
264
|
colors: {
|
|
266
|
-
primary: "#
|
|
267
|
-
secondary: "#
|
|
268
|
-
accent: "#
|
|
269
|
-
|
|
270
|
-
text: "#2c2c2c",
|
|
271
|
-
border: "#f0f0f0",
|
|
272
|
-
textPrimary: "#000000",
|
|
273
|
-
textSecondary: "#4a4a4a",
|
|
274
|
-
textMuted: "#999999",
|
|
275
|
-
borderPrimary: "#e0e0e0",
|
|
276
|
-
borderSecondary: "#f5f5f5",
|
|
277
|
-
backgroundPrimary: "#ffffff",
|
|
278
|
-
backgroundSecondary: "#fafafa"
|
|
279
|
-
},
|
|
280
|
-
fonts: {
|
|
281
|
-
heading: {
|
|
282
|
-
family: "Arial",
|
|
283
|
-
size: 24
|
|
284
|
-
},
|
|
285
|
-
body: {
|
|
286
|
-
family: "Arial",
|
|
287
|
-
size: 11
|
|
288
|
-
},
|
|
289
|
-
mono: {
|
|
290
|
-
family: "Menlo",
|
|
291
|
-
size: 10
|
|
292
|
-
},
|
|
293
|
-
light: {
|
|
294
|
-
family: "Arial",
|
|
295
|
-
size: 24
|
|
296
|
-
}
|
|
297
|
-
},
|
|
298
|
-
page: {
|
|
299
|
-
size: "A4",
|
|
300
|
-
margins: {
|
|
301
|
-
top: 1440,
|
|
302
|
-
bottom: 1440,
|
|
303
|
-
left: 1080,
|
|
304
|
-
right: 1080,
|
|
305
|
-
header: 720,
|
|
306
|
-
footer: 720,
|
|
307
|
-
gutter: 0
|
|
308
|
-
}
|
|
309
|
-
},
|
|
310
|
-
styles: {
|
|
311
|
-
normal: {
|
|
312
|
-
font: "body",
|
|
313
|
-
color: "#000000",
|
|
314
|
-
lineSpacing: {
|
|
315
|
-
type: "multiple",
|
|
316
|
-
value: 1.5
|
|
317
|
-
},
|
|
318
|
-
alignment: "justify",
|
|
319
|
-
spacing: {
|
|
320
|
-
after: 9
|
|
321
|
-
}
|
|
322
|
-
},
|
|
323
|
-
heading1: {
|
|
324
|
-
font: "light",
|
|
325
|
-
size: 24,
|
|
326
|
-
bold: false,
|
|
327
|
-
color: "#000000",
|
|
328
|
-
spacing: {
|
|
329
|
-
before: 18,
|
|
330
|
-
after: 12
|
|
331
|
-
},
|
|
332
|
-
keepNext: true,
|
|
333
|
-
alignment: "left",
|
|
334
|
-
characterSpacing: {
|
|
335
|
-
type: "expanded",
|
|
336
|
-
value: 1.2
|
|
337
|
-
}
|
|
338
|
-
},
|
|
339
|
-
heading2: {
|
|
340
|
-
font: "light",
|
|
341
|
-
size: 20,
|
|
342
|
-
bold: false,
|
|
343
|
-
color: "#000000",
|
|
344
|
-
spacing: {
|
|
345
|
-
before: 12,
|
|
346
|
-
after: 9
|
|
347
|
-
},
|
|
348
|
-
keepNext: true,
|
|
349
|
-
alignment: "left",
|
|
350
|
-
characterSpacing: {
|
|
351
|
-
type: "expanded",
|
|
352
|
-
value: 0.8
|
|
353
|
-
}
|
|
354
|
-
},
|
|
355
|
-
heading3: {
|
|
356
|
-
font: "heading",
|
|
357
|
-
size: 16,
|
|
358
|
-
bold: false,
|
|
359
|
-
color: "#2c2c2c",
|
|
360
|
-
spacing: {
|
|
361
|
-
before: 9,
|
|
362
|
-
after: 6
|
|
363
|
-
},
|
|
364
|
-
keepNext: true,
|
|
365
|
-
alignment: "left"
|
|
366
|
-
},
|
|
367
|
-
heading4: {
|
|
368
|
-
font: "heading",
|
|
369
|
-
size: 14,
|
|
370
|
-
bold: true,
|
|
371
|
-
color: "#4a4a4a",
|
|
372
|
-
spacing: {
|
|
373
|
-
before: 6,
|
|
374
|
-
after: 4
|
|
375
|
-
},
|
|
376
|
-
keepNext: true
|
|
377
|
-
},
|
|
378
|
-
heading5: {
|
|
379
|
-
font: "heading",
|
|
380
|
-
size: 12,
|
|
381
|
-
bold: false,
|
|
382
|
-
italic: true,
|
|
383
|
-
color: "#666666",
|
|
384
|
-
spacing: {
|
|
385
|
-
before: 4,
|
|
386
|
-
after: 3
|
|
387
|
-
}
|
|
388
|
-
},
|
|
389
|
-
heading6: {
|
|
390
|
-
font: "light",
|
|
391
|
-
size: 11,
|
|
392
|
-
bold: false,
|
|
393
|
-
color: "#999999",
|
|
394
|
-
spacing: {
|
|
395
|
-
before: 3,
|
|
396
|
-
after: 2
|
|
397
|
-
}
|
|
398
|
-
},
|
|
399
|
-
title: {
|
|
400
|
-
font: "light",
|
|
401
|
-
bold: false,
|
|
402
|
-
color: "#000000",
|
|
403
|
-
alignment: "left",
|
|
404
|
-
spacing: {
|
|
405
|
-
before: 0,
|
|
406
|
-
after: 24
|
|
407
|
-
},
|
|
408
|
-
characterSpacing: {
|
|
409
|
-
type: "condensed",
|
|
410
|
-
value: 20
|
|
411
|
-
}
|
|
412
|
-
},
|
|
413
|
-
subtitle: {
|
|
414
|
-
font: "light",
|
|
415
|
-
size: 16,
|
|
416
|
-
italic: false,
|
|
417
|
-
color: "#666666",
|
|
418
|
-
alignment: "left",
|
|
419
|
-
spacing: {
|
|
420
|
-
before: 0,
|
|
421
|
-
after: 18
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
},
|
|
425
|
-
componentDefaults: {
|
|
426
|
-
table: {
|
|
427
|
-
borderColor: "#f0f0f0"
|
|
428
|
-
},
|
|
429
|
-
list: {
|
|
430
|
-
format: "bullet",
|
|
431
|
-
bullet: "\u2022"
|
|
432
|
-
},
|
|
433
|
-
image: {
|
|
434
|
-
alignment: "left"
|
|
435
|
-
},
|
|
436
|
-
statistic: {
|
|
437
|
-
alignment: "left"
|
|
438
|
-
},
|
|
439
|
-
section: {
|
|
440
|
-
pageBreak: false
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
};
|
|
444
|
-
}
|
|
445
|
-
});
|
|
446
|
-
|
|
447
|
-
// src/templates/themes/corporate.docx.theme.json
|
|
448
|
-
var corporate_docx_theme_default;
|
|
449
|
-
var init_corporate_docx_theme = __esm({
|
|
450
|
-
"src/templates/themes/corporate.docx.theme.json"() {
|
|
451
|
-
corporate_docx_theme_default = {
|
|
452
|
-
name: "corporate",
|
|
453
|
-
displayName: "Corporate Professional",
|
|
454
|
-
description: "A polished corporate theme with blue accents and structured typography",
|
|
455
|
-
version: "2.0.0",
|
|
456
|
-
colors: {
|
|
457
|
-
primary: "#1a365d",
|
|
458
|
-
secondary: "#2D3748",
|
|
459
|
-
accent: "#3182CE",
|
|
460
|
-
text: "#1A202C",
|
|
265
|
+
primary: "#2B302B",
|
|
266
|
+
secondary: "#4A5B4E",
|
|
267
|
+
accent: "#6E7F71",
|
|
268
|
+
text: "#3B3C38",
|
|
461
269
|
background: "#FFFFFF",
|
|
462
|
-
border: "#
|
|
463
|
-
textPrimary: "#
|
|
464
|
-
textSecondary: "#
|
|
465
|
-
textMuted: "#
|
|
466
|
-
borderPrimary: "#
|
|
467
|
-
borderSecondary: "#
|
|
270
|
+
border: "#D8D3C8",
|
|
271
|
+
textPrimary: "#3B3C38",
|
|
272
|
+
textSecondary: "#5B5B54",
|
|
273
|
+
textMuted: "#75726A",
|
|
274
|
+
borderPrimary: "#D8D3C8",
|
|
275
|
+
borderSecondary: "#E9E6DE",
|
|
468
276
|
backgroundPrimary: "#FFFFFF",
|
|
469
|
-
backgroundSecondary: "#
|
|
277
|
+
backgroundSecondary: "#F1EFE9",
|
|
278
|
+
accent4: "#9AA69C",
|
|
279
|
+
accent5: "#C9CFC7",
|
|
280
|
+
accent6: "#B5AC9D"
|
|
470
281
|
},
|
|
471
282
|
fonts: {
|
|
472
|
-
heading: { family: "
|
|
473
|
-
body: { family: "Calibri", size:
|
|
474
|
-
mono: { family: "
|
|
475
|
-
light: { family: "
|
|
283
|
+
heading: { family: "Calibri", size: 21 },
|
|
284
|
+
body: { family: "Calibri", size: 10 },
|
|
285
|
+
mono: { family: "Courier New", size: 10 },
|
|
286
|
+
light: { family: "Calibri", size: 21 }
|
|
476
287
|
},
|
|
477
288
|
page: {
|
|
478
289
|
size: "A4",
|
|
479
290
|
margins: {
|
|
480
|
-
top:
|
|
481
|
-
bottom:
|
|
482
|
-
left:
|
|
483
|
-
right:
|
|
484
|
-
header:
|
|
485
|
-
footer:
|
|
291
|
+
top: 1700,
|
|
292
|
+
bottom: 1700,
|
|
293
|
+
left: 1700,
|
|
294
|
+
right: 1700,
|
|
295
|
+
header: 850,
|
|
296
|
+
footer: 850,
|
|
486
297
|
gutter: 0
|
|
487
298
|
}
|
|
488
299
|
},
|
|
489
300
|
styles: {
|
|
490
301
|
normal: {
|
|
491
302
|
font: "body",
|
|
492
|
-
color: "
|
|
493
|
-
lineSpacing: { type: "multiple", value: 1.
|
|
494
|
-
alignment: "justify",
|
|
495
|
-
spacing: { after: 8 }
|
|
496
|
-
},
|
|
497
|
-
heading1: {
|
|
498
|
-
font: "heading",
|
|
499
|
-
size: 26,
|
|
500
|
-
bold: false,
|
|
501
|
-
color: "primary",
|
|
502
|
-
spacing: { before: 24, after: 12 },
|
|
503
|
-
keepNext: true,
|
|
303
|
+
color: "textPrimary",
|
|
304
|
+
lineSpacing: { type: "multiple", value: 1.35 },
|
|
504
305
|
alignment: "left",
|
|
505
|
-
|
|
506
|
-
bottom: {
|
|
507
|
-
style: "single",
|
|
508
|
-
size: 2,
|
|
509
|
-
color: "primary",
|
|
510
|
-
space: 6
|
|
511
|
-
}
|
|
512
|
-
}
|
|
306
|
+
spacing: { after: 8 }
|
|
513
307
|
},
|
|
514
|
-
|
|
308
|
+
title: {
|
|
515
309
|
font: "heading",
|
|
516
|
-
size:
|
|
517
|
-
bold: false,
|
|
518
|
-
color: "secondary",
|
|
519
|
-
spacing: { before: 18, after: 8 },
|
|
520
|
-
keepNext: true,
|
|
521
|
-
alignment: "left"
|
|
522
|
-
},
|
|
523
|
-
heading3: {
|
|
524
|
-
font: "body",
|
|
525
|
-
size: 13,
|
|
310
|
+
size: 34,
|
|
526
311
|
bold: true,
|
|
527
|
-
color: "accent",
|
|
528
|
-
spacing: { before: 12, after: 6 },
|
|
529
|
-
keepNext: true,
|
|
530
|
-
alignment: "left"
|
|
531
|
-
},
|
|
532
|
-
title: {
|
|
533
|
-
font: "light",
|
|
534
|
-
size: 32,
|
|
535
|
-
bold: false,
|
|
536
312
|
color: "primary",
|
|
537
313
|
alignment: "left",
|
|
538
|
-
|
|
314
|
+
lineSpacing: { type: "multiple", value: 1 },
|
|
315
|
+
characterSpacing: { type: "condensed", value: 20 },
|
|
316
|
+
spacing: { before: 0, after: 11 }
|
|
539
317
|
},
|
|
540
318
|
subtitle: {
|
|
541
319
|
font: "body",
|
|
542
|
-
size:
|
|
320
|
+
size: 13,
|
|
543
321
|
italic: false,
|
|
544
322
|
color: "textSecondary",
|
|
545
323
|
alignment: "left",
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
},
|
|
549
|
-
componentDefaults: {
|
|
550
|
-
table: {
|
|
551
|
-
borderColor: "#E2E8F0"
|
|
552
|
-
},
|
|
553
|
-
list: {
|
|
554
|
-
format: "bullet",
|
|
555
|
-
bullet: "\u2022"
|
|
556
|
-
},
|
|
557
|
-
statistic: {
|
|
558
|
-
alignment: "center"
|
|
559
|
-
},
|
|
560
|
-
section: {
|
|
561
|
-
pageBreak: false
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
};
|
|
565
|
-
}
|
|
566
|
-
});
|
|
567
|
-
|
|
568
|
-
// src/templates/themes/modern.docx.theme.json
|
|
569
|
-
var modern_docx_theme_default;
|
|
570
|
-
var init_modern_docx_theme = __esm({
|
|
571
|
-
"src/templates/themes/modern.docx.theme.json"() {
|
|
572
|
-
modern_docx_theme_default = {
|
|
573
|
-
name: "modern",
|
|
574
|
-
displayName: "Modern Clean",
|
|
575
|
-
description: "A contemporary theme with vibrant accents and generous whitespace",
|
|
576
|
-
version: "2.0.0",
|
|
577
|
-
colors: {
|
|
578
|
-
primary: "#6D28D9",
|
|
579
|
-
secondary: "#1E293B",
|
|
580
|
-
accent: "#0891B2",
|
|
581
|
-
text: "#0F172A",
|
|
582
|
-
background: "#FFFFFF",
|
|
583
|
-
border: "#E2E8F0",
|
|
584
|
-
textPrimary: "#0F172A",
|
|
585
|
-
textSecondary: "#475569",
|
|
586
|
-
textMuted: "#94A3B8",
|
|
587
|
-
borderPrimary: "#CBD5E1",
|
|
588
|
-
borderSecondary: "#E2E8F0",
|
|
589
|
-
backgroundPrimary: "#FFFFFF",
|
|
590
|
-
backgroundSecondary: "#F8FAFC"
|
|
591
|
-
},
|
|
592
|
-
fonts: {
|
|
593
|
-
heading: { family: "Helvetica", size: 28 },
|
|
594
|
-
body: { family: "Helvetica", size: 11 },
|
|
595
|
-
mono: { family: "Menlo", size: 10 },
|
|
596
|
-
light: { family: "Helvetica", size: 28 }
|
|
597
|
-
},
|
|
598
|
-
page: {
|
|
599
|
-
size: "A4",
|
|
600
|
-
margins: {
|
|
601
|
-
top: 1440,
|
|
602
|
-
bottom: 1440,
|
|
603
|
-
left: 1080,
|
|
604
|
-
right: 1080,
|
|
605
|
-
header: 720,
|
|
606
|
-
footer: 720,
|
|
607
|
-
gutter: 0
|
|
608
|
-
}
|
|
609
|
-
},
|
|
610
|
-
styles: {
|
|
611
|
-
normal: {
|
|
612
|
-
font: "body",
|
|
613
|
-
color: "#0F172A",
|
|
614
|
-
lineSpacing: { type: "multiple", value: 1.5 },
|
|
615
|
-
alignment: "left",
|
|
616
|
-
spacing: { after: 10 }
|
|
324
|
+
lineSpacing: { type: "multiple", value: 1.2 },
|
|
325
|
+
spacing: { before: 0, after: 22 }
|
|
617
326
|
},
|
|
618
327
|
heading1: {
|
|
619
328
|
font: "heading",
|
|
620
|
-
size:
|
|
329
|
+
size: 21,
|
|
621
330
|
bold: true,
|
|
622
331
|
color: "primary",
|
|
623
|
-
|
|
332
|
+
lineSpacing: { type: "multiple", value: 1.15 },
|
|
333
|
+
spacing: { before: 30, after: 10 },
|
|
624
334
|
keepNext: true,
|
|
625
335
|
alignment: "left"
|
|
626
336
|
},
|
|
627
337
|
heading2: {
|
|
628
338
|
font: "heading",
|
|
629
|
-
size:
|
|
339
|
+
size: 14.5,
|
|
630
340
|
bold: true,
|
|
631
|
-
color: "
|
|
632
|
-
|
|
341
|
+
color: "primary",
|
|
342
|
+
lineSpacing: { type: "multiple", value: 1.15 },
|
|
343
|
+
spacing: { before: 22, after: 8 },
|
|
633
344
|
keepNext: true,
|
|
634
345
|
alignment: "left"
|
|
635
346
|
},
|
|
636
347
|
heading3: {
|
|
637
|
-
font: "
|
|
638
|
-
size:
|
|
348
|
+
font: "heading",
|
|
349
|
+
size: 12,
|
|
639
350
|
bold: true,
|
|
640
|
-
color: "
|
|
641
|
-
spacing: { before:
|
|
351
|
+
color: "primary",
|
|
352
|
+
spacing: { before: 16, after: 6 },
|
|
642
353
|
keepNext: true,
|
|
643
354
|
alignment: "left"
|
|
644
355
|
},
|
|
645
|
-
|
|
646
|
-
font: "
|
|
647
|
-
size:
|
|
356
|
+
heading4: {
|
|
357
|
+
font: "body",
|
|
358
|
+
size: 10.5,
|
|
648
359
|
bold: true,
|
|
649
360
|
color: "primary",
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
subtitle: {
|
|
654
|
-
font: "light",
|
|
655
|
-
size: 18,
|
|
656
|
-
italic: false,
|
|
657
|
-
color: "textSecondary",
|
|
658
|
-
alignment: "left",
|
|
659
|
-
spacing: { before: 0, after: 24 }
|
|
660
|
-
}
|
|
661
|
-
},
|
|
662
|
-
componentDefaults: {
|
|
663
|
-
table: {
|
|
664
|
-
borderColor: "#E2E8F0"
|
|
665
|
-
},
|
|
666
|
-
list: {
|
|
667
|
-
format: "bullet",
|
|
668
|
-
bullet: "\u2013"
|
|
669
|
-
},
|
|
670
|
-
image: {
|
|
671
|
-
alignment: "center"
|
|
672
|
-
},
|
|
673
|
-
statistic: {
|
|
674
|
-
alignment: "center"
|
|
361
|
+
spacing: { before: 12, after: 4 },
|
|
362
|
+
keepNext: true,
|
|
363
|
+
alignment: "left"
|
|
675
364
|
},
|
|
676
|
-
|
|
677
|
-
pageBreak: false
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
};
|
|
681
|
-
}
|
|
682
|
-
});
|
|
683
|
-
|
|
684
|
-
// src/templates/themes/apex.docx.theme.json
|
|
685
|
-
var apex_docx_theme_default;
|
|
686
|
-
var init_apex_docx_theme = __esm({
|
|
687
|
-
"src/templates/themes/apex.docx.theme.json"() {
|
|
688
|
-
apex_docx_theme_default = {
|
|
689
|
-
name: "apex",
|
|
690
|
-
displayName: "Apex Consulting",
|
|
691
|
-
description: "A premium consulting theme with deep navy, warm amber accents, and authoritative typography",
|
|
692
|
-
version: "2.0.0",
|
|
693
|
-
colors: {
|
|
694
|
-
primary: "#0C2340",
|
|
695
|
-
secondary: "#1B3A5C",
|
|
696
|
-
accent: "#D4A843",
|
|
697
|
-
text: "#1A1A2E",
|
|
698
|
-
background: "#FFFFFF",
|
|
699
|
-
border: "#D6DAE0",
|
|
700
|
-
textPrimary: "#1A1A2E",
|
|
701
|
-
textSecondary: "#4A5066",
|
|
702
|
-
textMuted: "#8B91A0",
|
|
703
|
-
borderPrimary: "#B8BCC6",
|
|
704
|
-
borderSecondary: "#E8EAF0",
|
|
705
|
-
backgroundPrimary: "#FFFFFF",
|
|
706
|
-
backgroundSecondary: "#F4F5F8"
|
|
707
|
-
},
|
|
708
|
-
fonts: {
|
|
709
|
-
heading: { family: "Georgia", size: 26 },
|
|
710
|
-
body: { family: "Calibri", size: 11 },
|
|
711
|
-
mono: { family: "Consolas", size: 10 },
|
|
712
|
-
light: { family: "Georgia", size: 26 }
|
|
713
|
-
},
|
|
714
|
-
page: {
|
|
715
|
-
size: "A4",
|
|
716
|
-
margins: {
|
|
717
|
-
top: 1440,
|
|
718
|
-
bottom: 1440,
|
|
719
|
-
left: 1200,
|
|
720
|
-
right: 1200,
|
|
721
|
-
header: 720,
|
|
722
|
-
footer: 720,
|
|
723
|
-
gutter: 0
|
|
724
|
-
}
|
|
725
|
-
},
|
|
726
|
-
styles: {
|
|
727
|
-
normal: {
|
|
365
|
+
heading5: {
|
|
728
366
|
font: "body",
|
|
729
|
-
|
|
730
|
-
lineSpacing: { type: "multiple", value: 1.4 },
|
|
731
|
-
alignment: "justify",
|
|
732
|
-
spacing: { after: 8 }
|
|
733
|
-
},
|
|
734
|
-
heading1: {
|
|
735
|
-
font: "heading",
|
|
736
|
-
size: 26,
|
|
367
|
+
size: 10.5,
|
|
737
368
|
bold: false,
|
|
738
|
-
|
|
739
|
-
|
|
369
|
+
italic: true,
|
|
370
|
+
color: "textSecondary",
|
|
371
|
+
spacing: { before: 10, after: 4 },
|
|
740
372
|
keepNext: true,
|
|
741
|
-
alignment: "left"
|
|
742
|
-
borders: {
|
|
743
|
-
bottom: {
|
|
744
|
-
style: "single",
|
|
745
|
-
size: 2,
|
|
746
|
-
color: "accent",
|
|
747
|
-
space: 6
|
|
748
|
-
}
|
|
749
|
-
}
|
|
373
|
+
alignment: "left"
|
|
750
374
|
},
|
|
751
|
-
|
|
752
|
-
font: "
|
|
753
|
-
size:
|
|
375
|
+
heading6: {
|
|
376
|
+
font: "body",
|
|
377
|
+
size: 10,
|
|
754
378
|
bold: false,
|
|
755
|
-
color: "
|
|
756
|
-
|
|
379
|
+
color: "textMuted",
|
|
380
|
+
characterSpacing: { type: "expanded", value: 20 },
|
|
381
|
+
spacing: { before: 10, after: 4 },
|
|
757
382
|
keepNext: true,
|
|
758
383
|
alignment: "left"
|
|
759
384
|
},
|
|
760
|
-
|
|
385
|
+
TOC1: {
|
|
761
386
|
font: "body",
|
|
762
|
-
size:
|
|
387
|
+
size: 10.5,
|
|
763
388
|
bold: true,
|
|
764
|
-
color: "
|
|
765
|
-
spacing: { before:
|
|
766
|
-
|
|
767
|
-
alignment: "left"
|
|
768
|
-
},
|
|
769
|
-
title: {
|
|
770
|
-
font: "light",
|
|
771
|
-
size: 36,
|
|
772
|
-
bold: false,
|
|
773
|
-
color: "primary",
|
|
774
|
-
alignment: "left",
|
|
775
|
-
spacing: { before: 0, after: 18 }
|
|
389
|
+
color: "textPrimary",
|
|
390
|
+
spacing: { before: 4, after: 3 },
|
|
391
|
+
tabStops: [{ type: "right", position: 8506, leader: "none" }]
|
|
776
392
|
},
|
|
777
|
-
|
|
393
|
+
TOC2: {
|
|
778
394
|
font: "body",
|
|
779
|
-
size:
|
|
780
|
-
italic: false,
|
|
395
|
+
size: 10.5,
|
|
781
396
|
color: "textSecondary",
|
|
782
|
-
|
|
783
|
-
spacing: {
|
|
397
|
+
indent: { left: 240 },
|
|
398
|
+
spacing: { after: 2 },
|
|
399
|
+
tabStops: [{ type: "right", position: 8506, leader: "none" }]
|
|
400
|
+
},
|
|
401
|
+
TOC3: {
|
|
402
|
+
font: "body",
|
|
403
|
+
size: 10,
|
|
404
|
+
color: "textMuted",
|
|
405
|
+
indent: { left: 480 },
|
|
406
|
+
spacing: { after: 2 },
|
|
407
|
+
tabStops: [{ type: "right", position: 8506, leader: "none" }]
|
|
784
408
|
}
|
|
785
409
|
},
|
|
786
410
|
componentDefaults: {
|
|
787
411
|
table: {
|
|
788
|
-
borderColor: "#
|
|
412
|
+
borderColor: "#D8D3C8",
|
|
413
|
+
borderSize: 0.5,
|
|
414
|
+
hideBorders: { left: true, right: true, insideVertical: true },
|
|
415
|
+
cellDefaults: {
|
|
416
|
+
padding: { top: 3, bottom: 3 }
|
|
417
|
+
},
|
|
418
|
+
headerCellDefaults: {
|
|
419
|
+
font: { bold: true },
|
|
420
|
+
color: "#2B302B",
|
|
421
|
+
borderColor: { bottom: "#2B302B" },
|
|
422
|
+
borderSize: { bottom: 1 }
|
|
423
|
+
}
|
|
789
424
|
},
|
|
790
425
|
list: {
|
|
791
426
|
format: "bullet",
|
|
792
|
-
bullet: "\
|
|
427
|
+
bullet: "\u2013",
|
|
428
|
+
spacing: { item: 2 }
|
|
793
429
|
},
|
|
794
430
|
image: {
|
|
795
|
-
alignment: "
|
|
431
|
+
alignment: "left"
|
|
796
432
|
},
|
|
797
433
|
statistic: {
|
|
798
|
-
alignment: "
|
|
434
|
+
alignment: "left"
|
|
799
435
|
},
|
|
800
436
|
section: {
|
|
801
437
|
pageBreak: false
|
|
@@ -811,29 +447,32 @@ var init_devportal_docx_theme = __esm({
|
|
|
811
447
|
"src/templates/themes/devportal.docx.theme.json"() {
|
|
812
448
|
devportal_docx_theme_default = {
|
|
813
449
|
name: "devportal",
|
|
814
|
-
displayName: "
|
|
815
|
-
description: "A
|
|
816
|
-
version: "
|
|
450
|
+
displayName: "Field Editorial",
|
|
451
|
+
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",
|
|
452
|
+
version: "4.0.0",
|
|
817
453
|
colors: {
|
|
818
|
-
primary: "#
|
|
819
|
-
secondary: "#
|
|
820
|
-
accent: "#
|
|
821
|
-
text: "#
|
|
454
|
+
primary: "#12191F",
|
|
455
|
+
secondary: "#172028",
|
|
456
|
+
accent: "#E35B3F",
|
|
457
|
+
text: "#232323",
|
|
822
458
|
background: "#FFFFFF",
|
|
823
|
-
border: "#
|
|
824
|
-
textPrimary: "#
|
|
825
|
-
textSecondary: "#
|
|
826
|
-
textMuted: "#
|
|
827
|
-
borderPrimary: "#
|
|
828
|
-
borderSecondary: "#
|
|
459
|
+
border: "#E2E0DD",
|
|
460
|
+
textPrimary: "#232323",
|
|
461
|
+
textSecondary: "#46494C",
|
|
462
|
+
textMuted: "#737373",
|
|
463
|
+
borderPrimary: "#D8D5D1",
|
|
464
|
+
borderSecondary: "#F2F3F3",
|
|
829
465
|
backgroundPrimary: "#FFFFFF",
|
|
830
|
-
backgroundSecondary: "#
|
|
466
|
+
backgroundSecondary: "#F7ECE7",
|
|
467
|
+
accent4: "#46494C",
|
|
468
|
+
accent5: "#8A9299",
|
|
469
|
+
accent6: "#E8A18D"
|
|
831
470
|
},
|
|
832
471
|
fonts: {
|
|
833
|
-
heading: { family: "Helvetica", size:
|
|
834
|
-
body: { family: "
|
|
835
|
-
mono: { family: "
|
|
836
|
-
light: { family: "Helvetica", size:
|
|
472
|
+
heading: { family: "Helvetica", size: 23 },
|
|
473
|
+
body: { family: "Helvetica", size: 9.5 },
|
|
474
|
+
mono: { family: "Courier New", size: 10 },
|
|
475
|
+
light: { family: "Helvetica", size: 23 }
|
|
837
476
|
},
|
|
838
477
|
page: {
|
|
839
478
|
size: "A4",
|
|
@@ -851,22 +490,42 @@ var init_devportal_docx_theme = __esm({
|
|
|
851
490
|
normal: {
|
|
852
491
|
font: "body",
|
|
853
492
|
color: "textPrimary",
|
|
854
|
-
lineSpacing: { type: "multiple", value: 1.
|
|
493
|
+
lineSpacing: { type: "multiple", value: 1.3 },
|
|
855
494
|
alignment: "left",
|
|
856
|
-
spacing: { after:
|
|
495
|
+
spacing: { after: 7 }
|
|
496
|
+
},
|
|
497
|
+
title: {
|
|
498
|
+
font: "heading",
|
|
499
|
+
size: 29,
|
|
500
|
+
bold: true,
|
|
501
|
+
color: "primary",
|
|
502
|
+
alignment: "left",
|
|
503
|
+
lineSpacing: { type: "multiple", value: 1.02 },
|
|
504
|
+
characterSpacing: { type: "condensed", value: 8 },
|
|
505
|
+
spacing: { before: 0, after: 10 }
|
|
506
|
+
},
|
|
507
|
+
subtitle: {
|
|
508
|
+
font: "body",
|
|
509
|
+
size: 10.5,
|
|
510
|
+
italic: false,
|
|
511
|
+
color: "textSecondary",
|
|
512
|
+
alignment: "left",
|
|
513
|
+
lineSpacing: { type: "multiple", value: 1.25 },
|
|
514
|
+
spacing: { before: 0, after: 12 }
|
|
857
515
|
},
|
|
858
516
|
heading1: {
|
|
859
517
|
font: "heading",
|
|
860
|
-
size:
|
|
518
|
+
size: 21,
|
|
861
519
|
bold: true,
|
|
862
520
|
color: "primary",
|
|
863
|
-
|
|
521
|
+
lineSpacing: { type: "multiple", value: 1.15 },
|
|
522
|
+
spacing: { before: 26, after: 12 },
|
|
864
523
|
keepNext: true,
|
|
865
524
|
alignment: "left",
|
|
866
525
|
borders: {
|
|
867
526
|
bottom: {
|
|
868
527
|
style: "single",
|
|
869
|
-
size:
|
|
528
|
+
size: 4,
|
|
870
529
|
color: "accent",
|
|
871
530
|
space: 6
|
|
872
531
|
}
|
|
@@ -874,54 +533,97 @@ var init_devportal_docx_theme = __esm({
|
|
|
874
533
|
},
|
|
875
534
|
heading2: {
|
|
876
535
|
font: "heading",
|
|
877
|
-
size:
|
|
536
|
+
size: 15.5,
|
|
878
537
|
bold: true,
|
|
879
538
|
color: "secondary",
|
|
880
|
-
|
|
539
|
+
lineSpacing: { type: "multiple", value: 1.15 },
|
|
540
|
+
spacing: { before: 20, after: 8 },
|
|
881
541
|
keepNext: true,
|
|
882
542
|
alignment: "left"
|
|
883
543
|
},
|
|
884
544
|
heading3: {
|
|
885
545
|
font: "body",
|
|
886
|
-
size:
|
|
546
|
+
size: 12.5,
|
|
887
547
|
bold: true,
|
|
888
|
-
color: "
|
|
889
|
-
spacing: { before:
|
|
548
|
+
color: "secondary",
|
|
549
|
+
spacing: { before: 14, after: 6 },
|
|
890
550
|
keepNext: true,
|
|
891
551
|
alignment: "left"
|
|
892
552
|
},
|
|
893
553
|
heading4: {
|
|
894
554
|
font: "body",
|
|
895
|
-
size:
|
|
555
|
+
size: 11.5,
|
|
556
|
+
bold: true,
|
|
557
|
+
color: "textPrimary",
|
|
558
|
+
spacing: { before: 12, after: 4 },
|
|
559
|
+
keepNext: true,
|
|
560
|
+
alignment: "left"
|
|
561
|
+
},
|
|
562
|
+
heading5: {
|
|
563
|
+
font: "mono",
|
|
564
|
+
size: 10.5,
|
|
896
565
|
bold: true,
|
|
566
|
+
color: "secondary",
|
|
567
|
+
spacing: { before: 10, after: 4 },
|
|
568
|
+
keepNext: true,
|
|
569
|
+
alignment: "left"
|
|
570
|
+
},
|
|
571
|
+
heading6: {
|
|
572
|
+
font: "body",
|
|
573
|
+
size: 10.5,
|
|
574
|
+
bold: false,
|
|
897
575
|
color: "textSecondary",
|
|
898
|
-
|
|
899
|
-
|
|
576
|
+
characterSpacing: { type: "expanded", value: 20 },
|
|
577
|
+
spacing: { before: 10, after: 4 },
|
|
578
|
+
keepNext: true,
|
|
579
|
+
alignment: "left"
|
|
900
580
|
},
|
|
901
|
-
|
|
902
|
-
font: "
|
|
903
|
-
size:
|
|
581
|
+
TOC1: {
|
|
582
|
+
font: "body",
|
|
583
|
+
size: 11,
|
|
904
584
|
bold: true,
|
|
905
585
|
color: "primary",
|
|
906
|
-
|
|
907
|
-
|
|
586
|
+
spacing: { before: 5, after: 3 },
|
|
587
|
+
tabStops: [{ type: "right", position: 9746, leader: "dot" }]
|
|
908
588
|
},
|
|
909
|
-
|
|
910
|
-
font: "
|
|
911
|
-
size:
|
|
912
|
-
|
|
589
|
+
TOC2: {
|
|
590
|
+
font: "body",
|
|
591
|
+
size: 10.5,
|
|
592
|
+
color: "textPrimary",
|
|
593
|
+
indent: { left: 240 },
|
|
594
|
+
spacing: { after: 2 },
|
|
595
|
+
tabStops: [{ type: "right", position: 9746, leader: "dot" }]
|
|
596
|
+
},
|
|
597
|
+
TOC3: {
|
|
598
|
+
font: "body",
|
|
599
|
+
size: 10,
|
|
913
600
|
color: "textSecondary",
|
|
914
|
-
|
|
915
|
-
spacing: {
|
|
601
|
+
indent: { left: 480 },
|
|
602
|
+
spacing: { after: 2 },
|
|
603
|
+
tabStops: [{ type: "right", position: 9746, leader: "dot" }]
|
|
916
604
|
}
|
|
917
605
|
},
|
|
918
606
|
componentDefaults: {
|
|
919
607
|
table: {
|
|
920
|
-
|
|
608
|
+
width: 100,
|
|
609
|
+
borderColor: "#E2E0DD",
|
|
610
|
+
borderSize: 0.5,
|
|
611
|
+
hideBorders: { left: true, right: true, insideVertical: true },
|
|
612
|
+
cellDefaults: {
|
|
613
|
+
padding: { top: 3, bottom: 3 }
|
|
614
|
+
},
|
|
615
|
+
headerCellDefaults: {
|
|
616
|
+
font: { bold: true },
|
|
617
|
+
color: "#172028",
|
|
618
|
+
backgroundColor: "#F7ECE7",
|
|
619
|
+
borderColor: { bottom: "#D8D5D1" },
|
|
620
|
+
borderSize: { bottom: 1 }
|
|
621
|
+
}
|
|
921
622
|
},
|
|
922
623
|
list: {
|
|
923
624
|
format: "bullet",
|
|
924
|
-
bullet: "\
|
|
625
|
+
bullet: "\u2014",
|
|
626
|
+
spacing: { item: 2 }
|
|
925
627
|
},
|
|
926
628
|
image: {
|
|
927
629
|
alignment: "center"
|
|
@@ -971,7 +673,7 @@ var init_vermilion_docx_theme = __esm({
|
|
|
971
673
|
size: 10.5
|
|
972
674
|
},
|
|
973
675
|
mono: {
|
|
974
|
-
family: "
|
|
676
|
+
family: "Courier New",
|
|
975
677
|
size: 10
|
|
976
678
|
},
|
|
977
679
|
light: {
|
|
@@ -1048,6 +750,47 @@ var init_vermilion_docx_theme = __esm({
|
|
|
1048
750
|
keepNext: true,
|
|
1049
751
|
alignment: "left"
|
|
1050
752
|
},
|
|
753
|
+
heading4: {
|
|
754
|
+
font: "body",
|
|
755
|
+
size: 10.5,
|
|
756
|
+
bold: true,
|
|
757
|
+
color: "textSecondary",
|
|
758
|
+
spacing: {
|
|
759
|
+
before: 10,
|
|
760
|
+
after: 4
|
|
761
|
+
},
|
|
762
|
+
keepNext: true,
|
|
763
|
+
alignment: "left"
|
|
764
|
+
},
|
|
765
|
+
heading5: {
|
|
766
|
+
font: "body",
|
|
767
|
+
size: 10.5,
|
|
768
|
+
bold: false,
|
|
769
|
+
italic: true,
|
|
770
|
+
color: "textSecondary",
|
|
771
|
+
spacing: {
|
|
772
|
+
before: 9,
|
|
773
|
+
after: 4
|
|
774
|
+
},
|
|
775
|
+
keepNext: true,
|
|
776
|
+
alignment: "left"
|
|
777
|
+
},
|
|
778
|
+
heading6: {
|
|
779
|
+
font: "body",
|
|
780
|
+
size: 10,
|
|
781
|
+
bold: true,
|
|
782
|
+
color: "textMuted",
|
|
783
|
+
characterSpacing: {
|
|
784
|
+
type: "expanded",
|
|
785
|
+
value: 30
|
|
786
|
+
},
|
|
787
|
+
spacing: {
|
|
788
|
+
before: 9,
|
|
789
|
+
after: 4
|
|
790
|
+
},
|
|
791
|
+
keepNext: true,
|
|
792
|
+
alignment: "left"
|
|
793
|
+
},
|
|
1051
794
|
title: {
|
|
1052
795
|
font: "heading",
|
|
1053
796
|
size: 38,
|
|
@@ -1069,6 +812,46 @@ var init_vermilion_docx_theme = __esm({
|
|
|
1069
812
|
after: 10
|
|
1070
813
|
}
|
|
1071
814
|
}
|
|
815
|
+
},
|
|
816
|
+
componentDefaults: {
|
|
817
|
+
table: {
|
|
818
|
+
width: 100,
|
|
819
|
+
borderColor: "#C7C8CA",
|
|
820
|
+
borderSize: 0.5,
|
|
821
|
+
hideBorders: {
|
|
822
|
+
top: true,
|
|
823
|
+
left: true,
|
|
824
|
+
right: true,
|
|
825
|
+
insideVertical: true
|
|
826
|
+
},
|
|
827
|
+
cellDefaults: {
|
|
828
|
+
font: { size: 9.5 },
|
|
829
|
+
padding: { top: 7, bottom: 7 },
|
|
830
|
+
verticalAlignment: "middle"
|
|
831
|
+
},
|
|
832
|
+
headerCellDefaults: {
|
|
833
|
+
color: "#EF4130",
|
|
834
|
+
font: { size: 9.5, bold: true },
|
|
835
|
+
padding: { top: 0, bottom: 8 },
|
|
836
|
+
verticalAlignment: "bottom",
|
|
837
|
+
borderColor: { bottom: "#EF4130" },
|
|
838
|
+
borderSize: { bottom: 0.5 }
|
|
839
|
+
}
|
|
840
|
+
},
|
|
841
|
+
list: {
|
|
842
|
+
format: "bullet",
|
|
843
|
+
bullet: "\u2014",
|
|
844
|
+
spacing: { item: 2 }
|
|
845
|
+
},
|
|
846
|
+
image: {
|
|
847
|
+
alignment: "center"
|
|
848
|
+
},
|
|
849
|
+
statistic: {
|
|
850
|
+
alignment: "center"
|
|
851
|
+
},
|
|
852
|
+
section: {
|
|
853
|
+
pageBreak: false
|
|
854
|
+
}
|
|
1072
855
|
}
|
|
1073
856
|
};
|
|
1074
857
|
}
|
|
@@ -1087,9 +870,6 @@ function loadThemesFromJson() {
|
|
|
1087
870
|
}
|
|
1088
871
|
const themes2 = {
|
|
1089
872
|
minimal: ensureThemeDefaults(minimal_docx_theme_default),
|
|
1090
|
-
corporate: ensureThemeDefaults(corporate_docx_theme_default),
|
|
1091
|
-
modern: ensureThemeDefaults(modern_docx_theme_default),
|
|
1092
|
-
apex: ensureThemeDefaults(apex_docx_theme_default),
|
|
1093
873
|
devportal: ensureThemeDefaults(devportal_docx_theme_default),
|
|
1094
874
|
vermilion: ensureThemeDefaults(vermilion_docx_theme_default)
|
|
1095
875
|
};
|
|
@@ -1129,15 +909,12 @@ function loadThemesFromJson() {
|
|
|
1129
909
|
_themesCache = themes2;
|
|
1130
910
|
return themes2;
|
|
1131
911
|
}
|
|
1132
|
-
var _themesCache, themes, getTheme, getThemeWithFallback, hasTheme, getThemeNames, minimalTheme,
|
|
912
|
+
var _themesCache, themes, getTheme, getThemeWithFallback, hasTheme, getThemeNames, minimalTheme, devportalTheme, vermilionTheme;
|
|
1133
913
|
var init_themes = __esm({
|
|
1134
914
|
"src/templates/themes/index.ts"() {
|
|
1135
915
|
"use strict";
|
|
1136
916
|
init_defaults();
|
|
1137
917
|
init_minimal_docx_theme();
|
|
1138
|
-
init_corporate_docx_theme();
|
|
1139
|
-
init_modern_docx_theme();
|
|
1140
|
-
init_apex_docx_theme();
|
|
1141
918
|
init_devportal_docx_theme();
|
|
1142
919
|
init_vermilion_docx_theme();
|
|
1143
920
|
_themesCache = null;
|
|
@@ -1161,8 +938,8 @@ var init_themes = __esm({
|
|
|
1161
938
|
return Object.keys(themes);
|
|
1162
939
|
};
|
|
1163
940
|
minimalTheme = themes["minimal"];
|
|
1164
|
-
|
|
1165
|
-
|
|
941
|
+
devportalTheme = themes["devportal"];
|
|
942
|
+
vermilionTheme = themes["vermilion"];
|
|
1166
943
|
}
|
|
1167
944
|
});
|
|
1168
945
|
|
|
@@ -6844,6 +6621,9 @@ function createLevelsFromSimplifiedProps(props) {
|
|
|
6844
6621
|
text = "";
|
|
6845
6622
|
} else {
|
|
6846
6623
|
format2 = props.format;
|
|
6624
|
+
if (format2 === "bullet") {
|
|
6625
|
+
text = props.bullet || "\u2022";
|
|
6626
|
+
}
|
|
6847
6627
|
}
|
|
6848
6628
|
} else {
|
|
6849
6629
|
format2 = "bullet";
|
|
@@ -7055,7 +6835,7 @@ function outerBorderOverride(position, tableBorderColor, tableBorderSize) {
|
|
|
7055
6835
|
const color = normalizeBorderColor(tableBorderColor);
|
|
7056
6836
|
if (tableBorderColor && color) {
|
|
7057
6837
|
result.borderColor = {};
|
|
7058
|
-
if (position.isHeader && color.top !== UNSET_COLOR) {
|
|
6838
|
+
if ((position.isHeader || position.isFirstRow) && color.top !== UNSET_COLOR) {
|
|
7059
6839
|
result.borderColor.top = color.top;
|
|
7060
6840
|
}
|
|
7061
6841
|
if (position.isFirstCol && color.left !== UNSET_COLOR) {
|
|
@@ -7071,7 +6851,7 @@ function outerBorderOverride(position, tableBorderColor, tableBorderSize) {
|
|
|
7071
6851
|
const size = normalizeBorderSize(tableBorderSize);
|
|
7072
6852
|
if (tableBorderSize && size) {
|
|
7073
6853
|
result.borderSize = {};
|
|
7074
|
-
if (position.isHeader && size.top !== UNSET_SIZE) {
|
|
6854
|
+
if ((position.isHeader || position.isFirstRow) && size.top !== UNSET_SIZE) {
|
|
7075
6855
|
result.borderSize.top = size.top;
|
|
7076
6856
|
}
|
|
7077
6857
|
if (position.isFirstCol && size.left !== UNSET_SIZE) {
|
|
@@ -7291,6 +7071,7 @@ function resolveTableModel(source, theme, themeName, options = {}) {
|
|
|
7291
7071
|
(max, height) => height === void 0 ? max : max === void 0 ? height : Math.max(max, height),
|
|
7292
7072
|
void 0
|
|
7293
7073
|
);
|
|
7074
|
+
const hasHeader = columns.some((column) => column.header !== void 0);
|
|
7294
7075
|
const headerMerges = columns.map(
|
|
7295
7076
|
(column, colIndex) => mergeHeaderCellDefaults(
|
|
7296
7077
|
source.cellDefaults,
|
|
@@ -7332,6 +7113,7 @@ function resolveTableModel(source, theme, themeName, options = {}) {
|
|
|
7332
7113
|
};
|
|
7333
7114
|
const rows = Array.from({ length: rowCount }, (_, rowIndex) => {
|
|
7334
7115
|
const isLastRow = rowIndex === rowCount - 1;
|
|
7116
|
+
const isFirstRow = !hasHeader && rowIndex === 0;
|
|
7335
7117
|
const rowProps = source.rows?.[rowIndex];
|
|
7336
7118
|
const merges = columns.map(
|
|
7337
7119
|
(column, colIndex) => mergeCellDefaults(
|
|
@@ -7339,6 +7121,7 @@ function resolveTableModel(source, theme, themeName, options = {}) {
|
|
|
7339
7121
|
column.cellDefaults,
|
|
7340
7122
|
column.cells?.[rowIndex],
|
|
7341
7123
|
{
|
|
7124
|
+
isFirstRow,
|
|
7342
7125
|
isFirstCol: colIndex === 0,
|
|
7343
7126
|
isLastCol: colIndex === columnCount - 1,
|
|
7344
7127
|
isLastRow
|
|
@@ -7365,8 +7148,7 @@ function resolveTableModel(source, theme, themeName, options = {}) {
|
|
|
7365
7148
|
const cell = column.cells?.[rowIndex];
|
|
7366
7149
|
const merged = merges[colIndex];
|
|
7367
7150
|
const position = {
|
|
7368
|
-
|
|
7369
|
-
isFirstRow: false,
|
|
7151
|
+
isFirstRow,
|
|
7370
7152
|
isFirstCol: colIndex === 0,
|
|
7371
7153
|
isLastCol: colIndex === columnCount - 1,
|
|
7372
7154
|
isLastRow
|
|
@@ -7396,10 +7178,10 @@ function resolveTableModel(source, theme, themeName, options = {}) {
|
|
|
7396
7178
|
};
|
|
7397
7179
|
return row;
|
|
7398
7180
|
});
|
|
7399
|
-
adjudicateInteriorEdges([header, ...rows]);
|
|
7181
|
+
adjudicateInteriorEdges([...hasHeader ? [header] : [], ...rows]);
|
|
7400
7182
|
return {
|
|
7401
7183
|
...resolveWidths(source, columns, theme, themeName),
|
|
7402
|
-
header,
|
|
7184
|
+
...hasHeader ? { header } : {},
|
|
7403
7185
|
rows,
|
|
7404
7186
|
repeatHeader: source.repeatHeaderOnPageBreak ?? true
|
|
7405
7187
|
};
|
|
@@ -8280,18 +8062,32 @@ function compileDocument(structure, layout, warnings = [], images = /* @__PURE__
|
|
|
8280
8062
|
};
|
|
8281
8063
|
}
|
|
8282
8064
|
var AFTER_TABLE_TWIPS = 120;
|
|
8065
|
+
var BEFORE_TABLE_TWIPS = 240;
|
|
8283
8066
|
var BODY_STYLE_IDS = /* @__PURE__ */ new Set([void 0, "Normal"]);
|
|
8284
|
-
function separateFromTables(blocks) {
|
|
8067
|
+
function separateFromTables(blocks, bodyAfterTwips) {
|
|
8285
8068
|
for (let i = 1; i < blocks.length; i += 1) {
|
|
8286
8069
|
const block2 = blocks[i];
|
|
8287
|
-
|
|
8288
|
-
if (block2.kind
|
|
8289
|
-
|
|
8290
|
-
|
|
8291
|
-
|
|
8292
|
-
|
|
8293
|
-
|
|
8294
|
-
|
|
8070
|
+
const previous = blocks[i - 1];
|
|
8071
|
+
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.
|
|
8072
|
+
block2.formatting?.spacing?.beforeTwips === void 0) {
|
|
8073
|
+
block2.formatting = {
|
|
8074
|
+
...block2.formatting,
|
|
8075
|
+
spacing: {
|
|
8076
|
+
...block2.formatting?.spacing,
|
|
8077
|
+
beforeTwips: AFTER_TABLE_TWIPS
|
|
8078
|
+
}
|
|
8079
|
+
};
|
|
8080
|
+
}
|
|
8081
|
+
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.
|
|
8082
|
+
previous.formatting?.spacing?.afterTwips === void 0) {
|
|
8083
|
+
previous.formatting = {
|
|
8084
|
+
...previous.formatting,
|
|
8085
|
+
spacing: {
|
|
8086
|
+
...previous.formatting?.spacing,
|
|
8087
|
+
afterTwips: Math.max(bodyAfterTwips, BEFORE_TABLE_TWIPS)
|
|
8088
|
+
}
|
|
8089
|
+
};
|
|
8090
|
+
}
|
|
8295
8091
|
}
|
|
8296
8092
|
}
|
|
8297
8093
|
function collectOutline(layout, warnings) {
|
|
@@ -8370,7 +8166,10 @@ function compileSection(section2, index, ordinal, chrome, ctx) {
|
|
|
8370
8166
|
})
|
|
8371
8167
|
);
|
|
8372
8168
|
});
|
|
8373
|
-
separateFromTables(
|
|
8169
|
+
separateFromTables(
|
|
8170
|
+
children,
|
|
8171
|
+
pointsToTwips2(getNormalStyle(ctx.theme).spacing?.after ?? 0)
|
|
8172
|
+
);
|
|
8374
8173
|
const compiled = {
|
|
8375
8174
|
id: `s${index}`,
|
|
8376
8175
|
path: path4,
|
|
@@ -9389,8 +9188,10 @@ function itemSpacing(spacing, index, count) {
|
|
|
9389
9188
|
if (index === 0 && spacing?.before !== void 0) {
|
|
9390
9189
|
out.beforeTwips = pointsToTwips2(spacing.before);
|
|
9391
9190
|
}
|
|
9392
|
-
if (index === count - 1
|
|
9393
|
-
|
|
9191
|
+
if (index === count - 1) {
|
|
9192
|
+
if (spacing?.after !== void 0) {
|
|
9193
|
+
out.afterTwips = pointsToTwips2(spacing.after);
|
|
9194
|
+
}
|
|
9394
9195
|
} else if (spacing?.item !== void 0) {
|
|
9395
9196
|
out.afterTwips = pointsToTwips2(spacing.item);
|
|
9396
9197
|
}
|
|
@@ -10470,13 +10271,20 @@ function compileTable(component, scope) {
|
|
|
10470
10271
|
return [];
|
|
10471
10272
|
}
|
|
10472
10273
|
const rows = [
|
|
10473
|
-
|
|
10474
|
-
|
|
10475
|
-
|
|
10476
|
-
|
|
10477
|
-
|
|
10478
|
-
|
|
10479
|
-
|
|
10274
|
+
...model.header ? [
|
|
10275
|
+
compileTableRow(
|
|
10276
|
+
model.header,
|
|
10277
|
+
style.headerParagraph,
|
|
10278
|
+
style.tableHeader,
|
|
10279
|
+
{
|
|
10280
|
+
ctx,
|
|
10281
|
+
path: `${path4}.header`,
|
|
10282
|
+
id: `${scope.id}:h`,
|
|
10283
|
+
// Headers repeat across page breaks unless the source disabled it.
|
|
10284
|
+
isHeader: model.repeatHeader
|
|
10285
|
+
}
|
|
10286
|
+
)
|
|
10287
|
+
] : [],
|
|
10480
10288
|
...model.rows.map(
|
|
10481
10289
|
(row, index) => compileTableRow(row, style.cellParagraph, style.tableCell, {
|
|
10482
10290
|
ctx,
|
|
@@ -10538,9 +10346,10 @@ function tableSource(props) {
|
|
|
10538
10346
|
};
|
|
10539
10347
|
}
|
|
10540
10348
|
function tableBlocker(model, path4) {
|
|
10541
|
-
const
|
|
10349
|
+
const headerRows = model.header ? [model.header] : [];
|
|
10350
|
+
const rows = [...headerRows, ...model.rows];
|
|
10542
10351
|
for (const [rowIndex, row] of rows.entries()) {
|
|
10543
|
-
const rowPath = row.isHeader ? `${path4}.header` : `${path4}.rows[${rowIndex -
|
|
10352
|
+
const rowPath = row.isHeader ? `${path4}.header` : `${path4}.rows[${rowIndex - headerRows.length}]`;
|
|
10544
10353
|
for (const [colIndex, cell] of row.cells.entries()) {
|
|
10545
10354
|
const cellPath = `${rowPath}.cells[${colIndex}]`;
|
|
10546
10355
|
const content = cell.content;
|
|
@@ -13875,11 +13684,11 @@ export {
|
|
|
13875
13684
|
UnknownPreservedComponentError,
|
|
13876
13685
|
analyzeDocxQuality,
|
|
13877
13686
|
cleanComponentProps,
|
|
13878
|
-
corporateTheme,
|
|
13879
13687
|
createComponent,
|
|
13880
13688
|
createDocumentGenerator,
|
|
13881
13689
|
createMinimalTheme,
|
|
13882
13690
|
createVersion,
|
|
13691
|
+
devportalTheme,
|
|
13883
13692
|
docxQualityEngine,
|
|
13884
13693
|
docxRendererIds,
|
|
13885
13694
|
docxRendererStatuses,
|
|
@@ -13922,7 +13731,6 @@ export {
|
|
|
13922
13731
|
loadThemeFromJson,
|
|
13923
13732
|
mergeSchemas,
|
|
13924
13733
|
minimalTheme,
|
|
13925
|
-
modernTheme,
|
|
13926
13734
|
prepareDocxQualityDocument,
|
|
13927
13735
|
resetVisualPrepassStats,
|
|
13928
13736
|
resolveDocxQualityProfile,
|
|
@@ -13931,6 +13739,7 @@ export {
|
|
|
13931
13739
|
validateComponentProps,
|
|
13932
13740
|
validateDocument,
|
|
13933
13741
|
validateJsonSchema,
|
|
13934
|
-
validateThemeJsonString
|
|
13742
|
+
validateThemeJsonString,
|
|
13743
|
+
vermilionTheme
|
|
13935
13744
|
};
|
|
13936
13745
|
//# sourceMappingURL=index.js.map
|