@usejunior/docx-core 0.11.0 → 0.11.2

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 (63) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/generation/compile.d.ts +4 -3
  3. package/dist/generation/compile.d.ts.map +1 -1
  4. package/dist/generation/compile.js +17 -5
  5. package/dist/generation/compile.js.map +1 -1
  6. package/dist/generation/emit/emit-context.d.ts +3 -1
  7. package/dist/generation/emit/emit-context.d.ts.map +1 -1
  8. package/dist/generation/emit/font-table-part.d.ts +16 -0
  9. package/dist/generation/emit/font-table-part.d.ts.map +1 -0
  10. package/dist/generation/emit/font-table-part.js +74 -0
  11. package/dist/generation/emit/font-table-part.js.map +1 -0
  12. package/dist/generation/emit/numbering-part.d.ts.map +1 -1
  13. package/dist/generation/emit/numbering-part.js +8 -6
  14. package/dist/generation/emit/numbering-part.js.map +1 -1
  15. package/dist/generation/emit/paragraph.d.ts +1 -1
  16. package/dist/generation/emit/paragraph.js +2 -2
  17. package/dist/generation/emit/paragraph.js.map +1 -1
  18. package/dist/generation/emit/properties.d.ts +5 -3
  19. package/dist/generation/emit/properties.d.ts.map +1 -1
  20. package/dist/generation/emit/properties.js +22 -3
  21. package/dist/generation/emit/properties.js.map +1 -1
  22. package/dist/generation/emit/run.d.ts +2 -1
  23. package/dist/generation/emit/run.d.ts.map +1 -1
  24. package/dist/generation/emit/run.js +13 -13
  25. package/dist/generation/emit/run.js.map +1 -1
  26. package/dist/generation/emit/settings-part.d.ts +3 -3
  27. package/dist/generation/emit/settings-part.d.ts.map +1 -1
  28. package/dist/generation/emit/settings-part.js +49 -5
  29. package/dist/generation/emit/settings-part.js.map +1 -1
  30. package/dist/generation/emit/styles-part.d.ts.map +1 -1
  31. package/dist/generation/emit/styles-part.js +5 -3
  32. package/dist/generation/emit/styles-part.js.map +1 -1
  33. package/dist/generation/emit/table.d.ts.map +1 -1
  34. package/dist/generation/emit/table.js +15 -2
  35. package/dist/generation/emit/table.js.map +1 -1
  36. package/dist/generation/emit/theme-part.d.ts +21 -0
  37. package/dist/generation/emit/theme-part.d.ts.map +1 -0
  38. package/dist/generation/emit/theme-part.js +151 -0
  39. package/dist/generation/emit/theme-part.js.map +1 -0
  40. package/dist/generation/emit/web-settings-part.d.ts +12 -0
  41. package/dist/generation/emit/web-settings-part.d.ts.map +1 -0
  42. package/dist/generation/emit/web-settings-part.js +19 -0
  43. package/dist/generation/emit/web-settings-part.js.map +1 -0
  44. package/dist/generation/recipes.d.ts +50 -10
  45. package/dist/generation/recipes.d.ts.map +1 -1
  46. package/dist/generation/recipes.js +156 -8
  47. package/dist/generation/recipes.js.map +1 -1
  48. package/dist/generation/theme-colors.d.ts +4 -0
  49. package/dist/generation/theme-colors.d.ts.map +1 -0
  50. package/dist/generation/theme-colors.js +18 -0
  51. package/dist/generation/theme-colors.js.map +1 -0
  52. package/dist/generation/types.d.ts +49 -0
  53. package/dist/generation/types.d.ts.map +1 -1
  54. package/dist/generation/types.js +48 -1
  55. package/dist/generation/types.js.map +1 -1
  56. package/dist/generation/validate-spec.d.ts.map +1 -1
  57. package/dist/generation/validate-spec.js +56 -0
  58. package/dist/generation/validate-spec.js.map +1 -1
  59. package/dist/primitives/namespaces.d.ts +6 -0
  60. package/dist/primitives/namespaces.d.ts.map +1 -1
  61. package/dist/primitives/namespaces.js +7 -0
  62. package/dist/primitives/namespaces.js.map +1 -1
  63. package/package.json +1 -1
@@ -0,0 +1,21 @@
1
+ /**
2
+ * word/theme/theme1.xml emitter.
3
+ *
4
+ * Emitted on every package. Word-authored documents always reference a theme
5
+ * (default fonts/colors resolve through it); shipping the canonical Office theme
6
+ * keeps generated output part-for-part comparable to genuine Word output and
7
+ * removes a suspected Word-for-Mac repair trigger (issue #482). The body is the
8
+ * complete, static Office default theme — a truncated fmtScheme is itself a repair
9
+ * trigger, so the full color/font/format scheme is emitted verbatim. Static body →
10
+ * determinism holds.
11
+ *
12
+ * The root is the DrawingML `a:theme` element carrying themeElements
13
+ * (clrScheme + fontScheme + fmtScheme). Optional generation theme input applies
14
+ * partial color/font overrides to that canonical template before serialization.
15
+ */
16
+ import type { CompileContext } from '../context.js';
17
+ import type { DocumentThemeSpec, ThemeColorSlot } from '../types.js';
18
+ /** Maps each authoring slot to its `clrScheme` child element name in theme1.xml. */
19
+ export declare const THEME_SLOT_TO_CLR_SCHEME: Record<ThemeColorSlot, string>;
20
+ export declare function emitThemePart(ctx: CompileContext, theme?: DocumentThemeSpec): void;
21
+ //# sourceMappingURL=theme-part.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme-part.d.ts","sourceRoot":"","sources":["../../../src/generation/emit/theme-part.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAQrE,oFAAoF;AACpF,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAanE,CAAC;AAgFF,wBAAgB,aAAa,CAAC,GAAG,EAAE,cAAc,EAAE,KAAK,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAQlF"}
@@ -0,0 +1,151 @@
1
+ /**
2
+ * word/theme/theme1.xml emitter.
3
+ *
4
+ * Emitted on every package. Word-authored documents always reference a theme
5
+ * (default fonts/colors resolve through it); shipping the canonical Office theme
6
+ * keeps generated output part-for-part comparable to genuine Word output and
7
+ * removes a suspected Word-for-Mac repair trigger (issue #482). The body is the
8
+ * complete, static Office default theme — a truncated fmtScheme is itself a repair
9
+ * trigger, so the full color/font/format scheme is emitted verbatim. Static body →
10
+ * determinism holds.
11
+ *
12
+ * The root is the DrawingML `a:theme` element carrying themeElements
13
+ * (clrScheme + fontScheme + fmtScheme). Optional generation theme input applies
14
+ * partial color/font overrides to that canonical template before serialization.
15
+ */
16
+ import { parseXml, serializeXml, XML_DECL } from '../../primitives/xml.js';
17
+ const THEME_CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.theme+xml';
18
+ const THEME_REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme';
19
+ const A_NS = 'http://schemas.openxmlformats.org/drawingml/2006/main';
20
+ /** Maps each authoring slot to its `clrScheme` child element name in theme1.xml. */
21
+ export const THEME_SLOT_TO_CLR_SCHEME = {
22
+ text1: 'dk1',
23
+ background1: 'lt1',
24
+ text2: 'dk2',
25
+ background2: 'lt2',
26
+ accent1: 'accent1',
27
+ accent2: 'accent2',
28
+ accent3: 'accent3',
29
+ accent4: 'accent4',
30
+ accent5: 'accent5',
31
+ accent6: 'accent6',
32
+ hyperlink: 'hlink',
33
+ followedHyperlink: 'folHlink',
34
+ };
35
+ /** The canonical Office default theme (clrScheme + fontScheme + full fmtScheme). */
36
+ const THEME1_XML = `<a:theme xmlns:a="${A_NS}" name="Office Theme">` +
37
+ '<a:themeElements>' +
38
+ '<a:clrScheme name="Office">' +
39
+ '<a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1>' +
40
+ '<a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1>' +
41
+ '<a:dk2><a:srgbClr val="44546A"/></a:dk2>' +
42
+ '<a:lt2><a:srgbClr val="E7E6E6"/></a:lt2>' +
43
+ '<a:accent1><a:srgbClr val="4472C4"/></a:accent1>' +
44
+ '<a:accent2><a:srgbClr val="ED7D31"/></a:accent2>' +
45
+ '<a:accent3><a:srgbClr val="A5A5A5"/></a:accent3>' +
46
+ '<a:accent4><a:srgbClr val="FFC000"/></a:accent4>' +
47
+ '<a:accent5><a:srgbClr val="5B9BD5"/></a:accent5>' +
48
+ '<a:accent6><a:srgbClr val="70AD47"/></a:accent6>' +
49
+ '<a:hlink><a:srgbClr val="0563C1"/></a:hlink>' +
50
+ '<a:folHlink><a:srgbClr val="954F72"/></a:folHlink>' +
51
+ '</a:clrScheme>' +
52
+ '<a:fontScheme name="Office">' +
53
+ '<a:majorFont>' +
54
+ '<a:latin typeface="Calibri Light" panose="020F0302020204030204"/>' +
55
+ '<a:ea typeface=""/>' +
56
+ '<a:cs typeface=""/>' +
57
+ '</a:majorFont>' +
58
+ '<a:minorFont>' +
59
+ '<a:latin typeface="Calibri" panose="020F0502020204030204"/>' +
60
+ '<a:ea typeface=""/>' +
61
+ '<a:cs typeface=""/>' +
62
+ '</a:minorFont>' +
63
+ '</a:fontScheme>' +
64
+ '<a:fmtScheme name="Office">' +
65
+ '<a:fillStyleLst>' +
66
+ '<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>' +
67
+ '<a:gradFill rotWithShape="1">' +
68
+ '<a:gsLst>' +
69
+ '<a:gs pos="0"><a:schemeClr val="phClr"><a:lumMod val="110000"/><a:satMod val="105000"/><a:tint val="67000"/></a:schemeClr></a:gs>' +
70
+ '<a:gs pos="50000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="103000"/><a:tint val="73000"/></a:schemeClr></a:gs>' +
71
+ '<a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="109000"/><a:tint val="81000"/></a:schemeClr></a:gs>' +
72
+ '</a:gsLst>' +
73
+ '<a:lin ang="5400000" scaled="0"/>' +
74
+ '</a:gradFill>' +
75
+ '<a:gradFill rotWithShape="1">' +
76
+ '<a:gsLst>' +
77
+ '<a:gs pos="0"><a:schemeClr val="phClr"><a:satMod val="103000"/><a:lumMod val="102000"/><a:tint val="94000"/></a:schemeClr></a:gs>' +
78
+ '<a:gs pos="50000"><a:schemeClr val="phClr"><a:satMod val="110000"/><a:lumMod val="100000"/><a:shade val="100000"/></a:schemeClr></a:gs>' +
79
+ '<a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="99000"/><a:satMod val="120000"/><a:shade val="78000"/></a:schemeClr></a:gs>' +
80
+ '</a:gsLst>' +
81
+ '<a:lin ang="5400000" scaled="0"/>' +
82
+ '</a:gradFill>' +
83
+ '</a:fillStyleLst>' +
84
+ '<a:lnStyleLst>' +
85
+ '<a:ln w="6350" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln>' +
86
+ '<a:ln w="12700" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln>' +
87
+ '<a:ln w="19050" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln>' +
88
+ '</a:lnStyleLst>' +
89
+ '<a:effectStyleLst>' +
90
+ '<a:effectStyle><a:effectLst/></a:effectStyle>' +
91
+ '<a:effectStyle><a:effectLst/></a:effectStyle>' +
92
+ '<a:effectStyle><a:effectLst><a:outerShdw blurRad="57150" dist="19050" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="63000"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle>' +
93
+ '</a:effectStyleLst>' +
94
+ '<a:bgFillStyleLst>' +
95
+ '<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>' +
96
+ '<a:solidFill><a:schemeClr val="phClr"><a:tint val="95000"/><a:satMod val="170000"/></a:schemeClr></a:solidFill>' +
97
+ '<a:gradFill rotWithShape="1">' +
98
+ '<a:gsLst>' +
99
+ '<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="93000"/><a:satMod val="150000"/><a:shade val="98000"/><a:lumMod val="102000"/></a:schemeClr></a:gs>' +
100
+ '<a:gs pos="50000"><a:schemeClr val="phClr"><a:tint val="98000"/><a:satMod val="130000"/><a:shade val="90000"/><a:lumMod val="103000"/></a:schemeClr></a:gs>' +
101
+ '<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="63000"/><a:satMod val="120000"/></a:schemeClr></a:gs>' +
102
+ '</a:gsLst>' +
103
+ '<a:lin ang="5400000" scaled="0"/>' +
104
+ '</a:gradFill>' +
105
+ '</a:bgFillStyleLst>' +
106
+ '</a:fmtScheme>' +
107
+ '</a:themeElements>' +
108
+ '<a:objectDefaults/>' +
109
+ '<a:extraClrSchemeLst/>' +
110
+ '</a:theme>';
111
+ export function emitThemePart(ctx, theme) {
112
+ ctx.registerPart('word/theme/theme1.xml', THEME_CONTENT_TYPE, THEME_REL_TYPE);
113
+ // Parse + reserialize: normalizes output and fails loudly if the static body is
114
+ // ever edited into malformed XML. Theme overrides mutate that parsed template
115
+ // so callers get the complete Office fmtScheme with only requested changes.
116
+ const doc = parseXml(THEME1_XML);
117
+ applyThemeOverrides(doc, theme);
118
+ ctx.setFileContent('word/theme/theme1.xml', XML_DECL + serializeXml(doc));
119
+ }
120
+ function applyThemeOverrides(doc, theme) {
121
+ if (!theme)
122
+ return;
123
+ for (const [slot, hex] of Object.entries(theme.colors ?? {})) {
124
+ replaceSchemeColor(doc, slot, hex);
125
+ }
126
+ if (theme.fonts?.major !== undefined) {
127
+ setLatinTypeface(doc, 'a:majorFont', theme.fonts.major);
128
+ }
129
+ if (theme.fonts?.minor !== undefined) {
130
+ setLatinTypeface(doc, 'a:minorFont', theme.fonts.minor);
131
+ }
132
+ }
133
+ function replaceSchemeColor(doc, slot, hex) {
134
+ const elementName = THEME_SLOT_TO_CLR_SCHEME[slot];
135
+ const schemeEl = doc.getElementsByTagName(`a:${elementName}`).item(0);
136
+ if (!schemeEl)
137
+ throw new Error(`theme clrScheme is missing a:${elementName}`);
138
+ while (schemeEl.firstChild)
139
+ schemeEl.removeChild(schemeEl.firstChild);
140
+ const srgb = doc.createElementNS(A_NS, 'a:srgbClr');
141
+ srgb.setAttribute('val', hex);
142
+ schemeEl.appendChild(srgb);
143
+ }
144
+ function setLatinTypeface(doc, fontElementName, typeface) {
145
+ const fontEl = doc.getElementsByTagName(fontElementName).item(0);
146
+ const latin = fontEl?.getElementsByTagName('a:latin').item(0);
147
+ if (!latin)
148
+ throw new Error(`theme fontScheme is missing ${fontElementName}/a:latin`);
149
+ latin.setAttribute('typeface', typeface);
150
+ }
151
+ //# sourceMappingURL=theme-part.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme-part.js","sourceRoot":"","sources":["../../../src/generation/emit/theme-part.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAI3E,MAAM,kBAAkB,GAAG,yDAAyD,CAAC;AACrF,MAAM,cAAc,GAClB,2EAA2E,CAAC;AAE9E,MAAM,IAAI,GAAG,uDAAuD,CAAC;AAErE,oFAAoF;AACpF,MAAM,CAAC,MAAM,wBAAwB,GAAmC;IACtE,KAAK,EAAE,KAAK;IACZ,WAAW,EAAE,KAAK;IAClB,KAAK,EAAE,KAAK;IACZ,WAAW,EAAE,KAAK;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,OAAO;IAClB,iBAAiB,EAAE,UAAU;CAC9B,CAAC;AAEF,oFAAoF;AACpF,MAAM,UAAU,GACd,qBAAqB,IAAI,wBAAwB;IACjD,mBAAmB;IACnB,6BAA6B;IAC7B,8DAA8D;IAC9D,0DAA0D;IAC1D,0CAA0C;IAC1C,0CAA0C;IAC1C,kDAAkD;IAClD,kDAAkD;IAClD,kDAAkD;IAClD,kDAAkD;IAClD,kDAAkD;IAClD,kDAAkD;IAClD,8CAA8C;IAC9C,oDAAoD;IACpD,gBAAgB;IAChB,8BAA8B;IAC9B,eAAe;IACf,mEAAmE;IACnE,qBAAqB;IACrB,qBAAqB;IACrB,gBAAgB;IAChB,eAAe;IACf,6DAA6D;IAC7D,qBAAqB;IACrB,qBAAqB;IACrB,gBAAgB;IAChB,iBAA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,KAAK,GAAG,MAAM,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC9D,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,+BAA+B,eAAe,UAAU,CAAC,CAAC;IACtF,KAAK,CAAC,YAAY,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;AAC3C,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * word/webSettings.xml emitter.
3
+ *
4
+ * Emitted on every package. Word-authored documents always carry a web-settings
5
+ * part; shipping a minimal one keeps generated output part-for-part comparable to
6
+ * genuine Word output (see issue #482). The body is static, so determinism holds.
7
+ *
8
+ * The root is the WordprocessingML `w:webSettings` element.
9
+ */
10
+ import type { CompileContext } from '../context.js';
11
+ export declare function emitWebSettingsPart(ctx: CompileContext): void;
12
+ //# sourceMappingURL=web-settings-part.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-settings-part.d.ts","sourceRoot":"","sources":["../../../src/generation/emit/web-settings-part.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAQpD,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,IAAI,CAM7D"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * word/webSettings.xml emitter.
3
+ *
4
+ * Emitted on every package. Word-authored documents always carry a web-settings
5
+ * part; shipping a minimal one keeps generated output part-for-part comparable to
6
+ * genuine Word output (see issue #482). The body is static, so determinism holds.
7
+ *
8
+ * The root is the WordprocessingML `w:webSettings` element.
9
+ */
10
+ import { parseXml, serializeXml, XML_DECL } from '../../primitives/xml.js';
11
+ import { OOXML } from '../../primitives/namespaces.js';
12
+ const WEB_SETTINGS_CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml';
13
+ const WEB_SETTINGS_REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings';
14
+ export function emitWebSettingsPart(ctx) {
15
+ ctx.registerPart('word/webSettings.xml', WEB_SETTINGS_CONTENT_TYPE, WEB_SETTINGS_REL_TYPE);
16
+ const doc = parseXml(`<w:webSettings xmlns:w="${OOXML.W_NS}"><w:optimizeForBrowser/><w:allowPNG/></w:webSettings>`);
17
+ ctx.setFileContent('word/webSettings.xml', XML_DECL + serializeXml(doc));
18
+ }
19
+ //# sourceMappingURL=web-settings-part.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-settings-part.js","sourceRoot":"","sources":["../../../src/generation/emit/web-settings-part.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAE3E,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAEvD,MAAM,yBAAyB,GAC7B,gFAAgF,CAAC;AACnF,MAAM,qBAAqB,GACzB,iFAAiF,CAAC;AAEpF,MAAM,UAAU,mBAAmB,CAAC,GAAmB;IACrD,GAAG,CAAC,YAAY,CAAC,sBAAsB,EAAE,yBAAyB,EAAE,qBAAqB,CAAC,CAAC;IAC3F,MAAM,GAAG,GAAG,QAAQ,CAClB,2BAA2B,KAAK,CAAC,IAAI,wDAAwD,CAC9F,CAAC;IACF,GAAG,CAAC,cAAc,CAAC,sBAAsB,EAAE,QAAQ,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;AAC3E,CAAC"}
@@ -9,20 +9,43 @@
9
9
  * VML shapes: Pages and Google Docs mangle VML, borders survive everywhere.
10
10
  */
11
11
  import type { BlockSpec, TableSpec } from './types.js';
12
+ export type CoverTermRow = {
13
+ label: string;
14
+ value: string;
15
+ };
16
+ export type CoverTermGroupRow = {
17
+ group: string;
18
+ };
19
+ export type CoverTermSubrow = {
20
+ label: string;
21
+ value: string;
22
+ subrow: true;
23
+ };
24
+ export type CoverTermEntry = CoverTermRow | CoverTermGroupRow | CoverTermSubrow;
12
25
  export type CoverTermsOptions = {
13
- /** Label/value pairs, rendered one row each in declaration order. */
14
- terms: Array<{
15
- label: string;
16
- value: string;
17
- }>;
26
+ /** Plain rows, group headers, and subrows rendered in declaration order. */
27
+ terms: CoverTermEntry[];
18
28
  /** Two-column widths in twips; defaults to a 2880/6480 split of a 6.5" body. */
19
29
  columnWidthsTwips?: [number, number];
20
30
  /** Heading text for a shaded full-width header row; omitted when absent. */
21
31
  title?: string;
32
+ /** Table border style; defaults to the historical full grid. */
33
+ borderMode?: 'grid' | 'horizontal-rules';
34
+ /** Optional minimum row height applied to term/group/sub rows, not the title row. */
35
+ rowHeightTwips?: number;
36
+ /** Optional uniform cell padding applied to every cover-terms cell. */
37
+ cellPaddingTwips?: number;
38
+ /** Text color for subrow labels and values; defaults to mid-gray. */
39
+ subrowColorHex?: string;
40
+ /**
41
+ * Extra left indent on subrow label cells, added on top of `cellPaddingTwips`
42
+ * (so the label sits further right than a normal row). Defaults to 240 twips.
43
+ */
44
+ subrowLabelIndentTwips?: number;
22
45
  };
23
46
  /**
24
47
  * A fixed-layout two-column label/value table for cover-terms blocks
25
- * (scenario SDX-GEN-070).
48
+ * (scenario SDX-GEN-070), with optional house-style grouped/sub rows.
26
49
  */
27
50
  export declare function coverTermsTable(options: CoverTermsOptions): TableSpec;
28
51
  export type SignatureBlockOptions = {
@@ -35,13 +58,30 @@ export type SignatureBlockOptions = {
35
58
  /** Label for the date row; defaults to 'Date:'. */
36
59
  dateLabel?: string;
37
60
  }>;
38
- /** Signature-line column width in twips; defaults to 4320 (3"). */
61
+ /** Signature-line column width in twips; defaults to 4320 (3"). Single-column only. */
39
62
  lineWidthTwips?: number;
63
+ /** Layout selector. Defaults to 'single-column' (the historical behavior). */
64
+ layout?: 'single-column' | 'two-column';
65
+ /** Total grid width in twips, split across the two signer columns. Defaults to 9360 (6.5" body). */
66
+ totalWidthTwips?: number;
67
+ /** Center gutter column width between the two signer cells. Defaults to 360 (0.25"). */
68
+ gutterTwips?: number;
69
+ /** Color for the muted party header and field captions. Defaults to '595959'. */
70
+ headerColorHex?: string;
71
+ /** Captions for the four ruled lines. Defaults to ['Signature', 'Print Name', 'Title', 'Date']. */
72
+ ruledLineLabels?: [string, string, string, string];
40
73
  };
41
74
  /**
42
- * Signature blocks rendered as borderless single-column tables whose first
43
- * content cell carries only a bottom border — the signature line — followed
44
- * by name, title, and date rows (scenario SDX-GEN-071). No VML, no images.
75
+ * Signature blocks rendered as borderless tables whose content cells carry
76
+ * only bottom borders — the signature lines. No VML, no images.
77
+ *
78
+ * Default `layout: 'single-column'` keeps the historical stacked block: one
79
+ * table per party, a bottom-bordered line then name/title/date rows
80
+ * (scenario SDX-GEN-071). With `layout: 'two-column'` the parties render as a
81
+ * paired signing grid — two signers per row, each a centered uppercase muted
82
+ * header over ruled Signature / Print Name / Title / Date lines (Print Name and
83
+ * Title pre-filled from the party data), with an empty padding cell when the
84
+ * signer count is odd (scenario SDX-GEN-109).
45
85
  */
46
86
  export declare function signatureBlock(options: SignatureBlockOptions): BlockSpec[];
47
87
  //# sourceMappingURL=recipes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"recipes.d.ts","sourceRoot":"","sources":["../../src/generation/recipes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,SAAS,EAA6B,SAAS,EAAE,MAAM,YAAY,CAAC;AAIlF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,qEAAqE;IACrE,KAAK,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/C,gFAAgF;IAChF,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,4EAA4E;IAC5E,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,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E,MAAM,GAAG,kBAAkB,CAAC;IACzC,qFAAqF;IACrF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uEAAuE;IACvE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qEAAqE;IACrE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC,CAAC;AAEF;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,iBAAiB,GAAG,SAAS,CA4ErE;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,KAAK,CAAC;QACb,qEAAqE;QACrE,KAAK,EAAE,MAAM,CAAC;QACd,6CAA6C;QAC7C,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,mDAAmD;QACnD,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC,CAAC;IACH,uFAAuF;IACvF,cAAc,CAAC,EAAE,MAAM,CAAC;IAGxB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,eAAe,GAAG,YAAY,CAAC;IACxC,oGAAoG;IACpG,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,wFAAwF;IACxF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iFAAiF;IACjF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mGAAmG;IACnG,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CACpD,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,SAAS,EAAE,CAyB1E"}
@@ -9,12 +9,19 @@
9
9
  * VML shapes: Pages and Google Docs mangle VML, borders survive everywhere.
10
10
  */
11
11
  const SINGLE = { style: 'single' };
12
+ const NONE = { style: 'none' };
13
+ const DEFAULT_SUBROW_COLOR_HEX = '595959';
14
+ const DEFAULT_SUBROW_LABEL_INDENT_TWIPS = 240;
12
15
  /**
13
16
  * A fixed-layout two-column label/value table for cover-terms blocks
14
- * (scenario SDX-GEN-070).
17
+ * (scenario SDX-GEN-070), with optional house-style grouped/sub rows.
15
18
  */
16
19
  export function coverTermsTable(options) {
17
20
  const [labelWidth, valueWidth] = options.columnWidthsTwips ?? [2880, 6480];
21
+ const borders = options.borderMode === 'horizontal-rules'
22
+ ? { top: SINGLE, bottom: SINGLE, left: NONE, right: NONE, insideH: SINGLE, insideV: NONE }
23
+ : { top: SINGLE, bottom: SINGLE, left: SINGLE, right: SINGLE, insideH: SINGLE, insideV: SINGLE };
24
+ const rowRhythm = rowRhythmProps(options);
18
25
  const rows = [];
19
26
  if (options.title !== undefined) {
20
27
  rows.push({
@@ -24,16 +31,52 @@ export function coverTermsTable(options) {
24
31
  gridSpan: 2,
25
32
  shadingHex: 'D9D9D9',
26
33
  vAlign: 'center',
34
+ ...cellPaddingProps(options),
27
35
  blocks: [paragraph(options.title, { bold: true, alignment: 'center' })],
28
36
  },
29
37
  ],
30
38
  });
31
39
  }
32
40
  for (const term of options.terms) {
41
+ if ('group' in term) {
42
+ rows.push({
43
+ ...rowRhythm,
44
+ cells: [
45
+ {
46
+ gridSpan: 2,
47
+ vAlign: 'center',
48
+ ...cellPaddingProps(options),
49
+ blocks: [paragraph(term.group, { bold: true })],
50
+ },
51
+ ],
52
+ });
53
+ continue;
54
+ }
55
+ const subrow = 'subrow' in term && term.subrow === true;
33
56
  rows.push({
57
+ ...rowRhythm,
34
58
  cells: [
35
- { blocks: [paragraph(term.label, { bold: true })] },
36
- { blocks: [paragraph(term.value)] },
59
+ {
60
+ ...cellPaddingProps(options, subrow
61
+ ? { left: (options.cellPaddingTwips ?? 0) + (options.subrowLabelIndentTwips ?? DEFAULT_SUBROW_LABEL_INDENT_TWIPS) }
62
+ : undefined),
63
+ blocks: [
64
+ paragraph(term.label, {
65
+ bold: !subrow,
66
+ italic: subrow,
67
+ colorHex: subrow ? (options.subrowColorHex ?? DEFAULT_SUBROW_COLOR_HEX) : undefined,
68
+ }),
69
+ ],
70
+ },
71
+ {
72
+ ...cellPaddingProps(options),
73
+ blocks: [
74
+ paragraph(term.value, {
75
+ italic: subrow,
76
+ colorHex: subrow ? (options.subrowColorHex ?? DEFAULT_SUBROW_COLOR_HEX) : undefined,
77
+ }),
78
+ ],
79
+ },
37
80
  ],
38
81
  });
39
82
  }
@@ -41,16 +84,26 @@ export function coverTermsTable(options) {
41
84
  kind: 'table',
42
85
  layout: 'fixed',
43
86
  columnWidthsTwips: [labelWidth, valueWidth],
44
- borders: { top: SINGLE, bottom: SINGLE, left: SINGLE, right: SINGLE, insideH: SINGLE, insideV: SINGLE },
87
+ borders,
45
88
  rows,
46
89
  };
47
90
  }
48
91
  /**
49
- * Signature blocks rendered as borderless single-column tables whose first
50
- * content cell carries only a bottom border — the signature line — followed
51
- * by name, title, and date rows (scenario SDX-GEN-071). No VML, no images.
92
+ * Signature blocks rendered as borderless tables whose content cells carry
93
+ * only bottom borders — the signature lines. No VML, no images.
94
+ *
95
+ * Default `layout: 'single-column'` keeps the historical stacked block: one
96
+ * table per party, a bottom-bordered line then name/title/date rows
97
+ * (scenario SDX-GEN-071). With `layout: 'two-column'` the parties render as a
98
+ * paired signing grid — two signers per row, each a centered uppercase muted
99
+ * header over ruled Signature / Print Name / Title / Date lines (Print Name and
100
+ * Title pre-filled from the party data), with an empty padding cell when the
101
+ * signer count is odd (scenario SDX-GEN-109).
52
102
  */
53
103
  export function signatureBlock(options) {
104
+ if ((options.layout ?? 'single-column') === 'two-column') {
105
+ return [twoColumnSignatureGrid(options)];
106
+ }
54
107
  const width = options.lineWidthTwips ?? 4320;
55
108
  const blocks = [];
56
109
  options.parties.forEach((party, index) => {
@@ -78,7 +131,102 @@ function paragraph(text, opts) {
78
131
  return {
79
132
  kind: 'paragraph',
80
133
  ...(opts?.alignment !== undefined ? { alignment: opts.alignment } : {}),
81
- runs: [{ kind: 'text', text, ...(opts?.bold ? { bold: true } : {}) }],
134
+ runs: [
135
+ {
136
+ kind: 'text',
137
+ text,
138
+ ...(opts?.bold ? { bold: true } : {}),
139
+ ...(opts?.italic ? { italic: true } : {}),
140
+ ...(opts?.caps ? { caps: true } : {}),
141
+ ...(opts?.colorHex !== undefined ? { colorHex: opts.colorHex } : {}),
142
+ },
143
+ ],
144
+ };
145
+ }
146
+ /**
147
+ * Two-column signing grid: parties chunked into pairs across a 3-column table
148
+ * `[signer, gutter, signer]`, with an empty padding cell for an odd final
149
+ * signer. Each signer cell stacks a centered uppercase muted header over a
150
+ * nested one-column table of four ruled fields (Signature / Print Name / Title
151
+ * / Date), reusing the bottom-bordered-cell rule from the single-column path.
152
+ */
153
+ function twoColumnSignatureGrid(options) {
154
+ const total = options.totalWidthTwips ?? 9360;
155
+ const gutter = options.gutterTwips ?? 360;
156
+ const signer = Math.max(1, Math.floor((total - gutter) / 2));
157
+ const mutedColor = options.headerColorHex ?? DEFAULT_SUBROW_COLOR_HEX;
158
+ const labels = options.ruledLineLabels ?? ['Signature', 'Print Name', 'Title', 'Date'];
159
+ const gutterCell = {
160
+ borders: { top: NONE, bottom: NONE, left: NONE, right: NONE },
161
+ blocks: [paragraph('')],
162
+ };
163
+ const paddingCell = {
164
+ borders: { top: NONE, bottom: NONE, left: NONE, right: NONE },
165
+ blocks: [paragraph('')],
166
+ };
167
+ const rows = [];
168
+ for (let i = 0; i < options.parties.length; i += 2) {
169
+ const left = options.parties[i];
170
+ if (left === undefined)
171
+ continue;
172
+ const right = options.parties[i + 1];
173
+ rows.push({
174
+ cells: [
175
+ signerCell(left, labels, mutedColor),
176
+ gutterCell,
177
+ right === undefined ? paddingCell : signerCell(right, labels, mutedColor),
178
+ ],
179
+ });
180
+ }
181
+ return {
182
+ kind: 'table',
183
+ layout: 'fixed',
184
+ columnWidthsTwips: [signer, gutter, signer],
185
+ borders: { top: NONE, bottom: NONE, left: NONE, right: NONE, insideH: NONE, insideV: NONE },
186
+ rows,
187
+ };
188
+ }
189
+ function signerCell(party, labels, mutedColor) {
190
+ // Pre-fill Print Name / Title from the party data; Signature / Date stay blank.
191
+ const fields = [
192
+ ['', labels[0]],
193
+ [party.name, labels[1]],
194
+ [party.title ?? '', labels[2]],
195
+ ['', party.dateLabel ?? labels[3]],
196
+ ];
197
+ return {
198
+ vAlign: 'top',
199
+ blocks: [
200
+ paragraph(party.party, { alignment: 'center', caps: true, colorHex: mutedColor }),
201
+ {
202
+ kind: 'table',
203
+ layout: 'fixed',
204
+ columnWidthsTwips: [4320],
205
+ borders: { top: NONE, bottom: NONE, left: NONE, right: NONE, insideH: NONE, insideV: NONE },
206
+ rows: fields.flatMap(([value, caption]) => ruledFieldRows(value, caption, mutedColor)),
207
+ },
208
+ ],
209
+ };
210
+ }
211
+ /** A ruled field = the bottom-bordered value line, then its muted caption beneath. */
212
+ function ruledFieldRows(value, caption, mutedColor) {
213
+ return [
214
+ { cells: [{ borders: { bottom: SINGLE }, blocks: [paragraph(value)] }] },
215
+ { cells: [{ blocks: [paragraph(caption, { colorHex: mutedColor })] }] },
216
+ ];
217
+ }
218
+ function rowRhythmProps(options) {
219
+ return options.rowHeightTwips === undefined ? {} : { heightTwips: options.rowHeightTwips, heightRule: 'atLeast' };
220
+ }
221
+ function cellPaddingProps(options, overrides) {
222
+ if (options.cellPaddingTwips === undefined && overrides === undefined)
223
+ return {};
224
+ const uniform = options.cellPaddingTwips;
225
+ return {
226
+ marginsTwips: {
227
+ ...(uniform === undefined ? {} : { top: uniform, right: uniform, bottom: uniform, left: uniform }),
228
+ ...overrides,
229
+ },
82
230
  };
83
231
  }
84
232
  //# sourceMappingURL=recipes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"recipes.js","sourceRoot":"","sources":["../../src/generation/recipes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,MAAM,MAAM,GAAe,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AAW/C;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,OAA0B;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,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE;QACxE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE;KACxE,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CAAC,OAA0B;IAChD,OAAO,OAAO,CAAC,cAAc,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,cAAc,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC;AACpH,CAAC;AAED,SAAS,gBAAgB,CACvB,OAA0B,EAC1B,SAAmF;IAEnF,IAAI,OAAO,CAAC,gBAAgB,KAAK,SAAS,IAAI,SAAS,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACjF,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;IACzC,OAAO;QACL,YAAY,EAAE;YACZ,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;YAClG,GAAG,SAAS;SACb;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { DocumentThemeSpec, ThemeColorSlot } from './types.js';
2
+ export declare const CANONICAL_THEME_COLORS: Record<ThemeColorSlot, string>;
3
+ export declare function resolveThemeColorValues(theme?: DocumentThemeSpec): ReadonlyMap<ThemeColorSlot, string>;
4
+ //# sourceMappingURL=theme-colors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme-colors.d.ts","sourceRoot":"","sources":["../../src/generation/theme-colors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEpE,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAajE,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,KAAK,CAAC,EAAE,iBAAiB,GAAG,WAAW,CAAC,cAAc,EAAE,MAAM,CAAC,CAEtG"}
@@ -0,0 +1,18 @@
1
+ export const CANONICAL_THEME_COLORS = {
2
+ text1: '000000',
3
+ background1: 'FFFFFF',
4
+ text2: '44546A',
5
+ background2: 'E7E6E6',
6
+ accent1: '4472C4',
7
+ accent2: 'ED7D31',
8
+ accent3: 'A5A5A5',
9
+ accent4: 'FFC000',
10
+ accent5: '5B9BD5',
11
+ accent6: '70AD47',
12
+ hyperlink: '0563C1',
13
+ followedHyperlink: '954F72',
14
+ };
15
+ export function resolveThemeColorValues(theme) {
16
+ return new Map(Object.entries({ ...CANONICAL_THEME_COLORS, ...(theme?.colors ?? {}) }));
17
+ }
18
+ //# sourceMappingURL=theme-colors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme-colors.js","sourceRoot":"","sources":["../../src/generation/theme-colors.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,sBAAsB,GAAmC;IACpE,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,QAAQ;IACrB,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,QAAQ;IACrB,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,QAAQ;IACjB,SAAS,EAAE,QAAQ;IACnB,iBAAiB,EAAE,QAAQ;CAC5B,CAAC;AAEF,MAAM,UAAU,uBAAuB,CAAC,KAAyB;IAC/D,OAAO,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,GAAG,sBAAsB,EAAE,GAAG,CAAC,KAAK,EAAE,MAAM,IAAI,EAAE,CAAC,EAAE,CAAoC,CAAC,CAAC;AAC7H,CAAC"}