@json-to-office/core-docx 3.2.0 → 4.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.
- package/dist/blueprints/index.d.ts +45 -0
- package/dist/blueprints/index.d.ts.map +1 -0
- package/dist/core/structure.d.ts.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1135 -8
- package/dist/index.js.map +1 -1
- package/dist/plugin/example/index.js +220 -4
- package/dist/plugin/example/index.js.map +1 -1
- package/dist/quality/facts.d.ts +53 -1
- package/dist/quality/facts.d.ts.map +1 -1
- package/dist/quality/preflight.d.ts.map +1 -1
- package/dist/quality/rules.d.ts +77 -0
- package/dist/quality/rules.d.ts.map +1 -1
- package/dist/templates/blueprints/client-report.docx.blueprint.json +473 -0
- package/dist/templates/themes/consulting.docx.theme.json +1 -0
- package/dist/templates/themes/devportal.docx.theme.json +1 -0
- package/dist/templates/themes/index.d.ts +5 -0
- package/dist/templates/themes/index.d.ts.map +1 -1
- package/dist/templates/themes/minimal.docx.theme.json +1 -0
- package/dist/templates/themes/vermilion.docx.theme.json +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/serviceClient.d.ts +6 -0
- package/dist/utils/serviceClient.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/quality/facts.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ChartInfoDesign, type PlaceholderKind, type PreparedDocument, type QualityFact, type TableColumnInfoDesign, type TableInfoDesign } from '@json-to-office/quality';
|
|
2
2
|
import type { FontRuntimeOpts, GenerationWarning } from '@json-to-office/shared';
|
|
3
|
+
import { type BlockSlotRole } from '@json-to-office/shared';
|
|
3
4
|
import type { ReportComponentDefinition } from '../types';
|
|
4
5
|
import type { ThemeConfig } from '../styles';
|
|
5
6
|
import { type GenerationThemeContext } from '../core/generationContext';
|
|
@@ -161,6 +162,31 @@ export interface DocxThemeFact extends QualityFact {
|
|
|
161
162
|
/** Token name to `#RRGGBB`, for every palette entry that resolves. */
|
|
162
163
|
paletteHexes: Readonly<Record<string, string>>;
|
|
163
164
|
fontFamilies: readonly string[];
|
|
165
|
+
/**
|
|
166
|
+
* Every size the theme paints, ascending: each named style, each font role
|
|
167
|
+
* and, where the theme declares a type scale, every step of it. A size an
|
|
168
|
+
* author writes by hand is on the theme's scale when it is in this list.
|
|
169
|
+
*/
|
|
170
|
+
typeScalePt: readonly number[];
|
|
171
|
+
/** Style key (`heading2`, `normal`, a `themeStyle`) to the size it paints. */
|
|
172
|
+
roleSizesPt: Readonly<Record<string, number>>;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* One painted size, wherever the document paints it: a paragraph, a heading, a
|
|
176
|
+
* table cell, a line of a running head. `role` is the style the size belongs
|
|
177
|
+
* to; `authored` says the size was written rather than inherited, and then
|
|
178
|
+
* `sizePath` is the pointer that wrote it — the only thing a fix can replace.
|
|
179
|
+
* `generated` says a block compiled the node, so its pointer is not the
|
|
180
|
+
* author's to patch.
|
|
181
|
+
*/
|
|
182
|
+
export interface DocxTextSizeFact extends QualityFact {
|
|
183
|
+
kind: 'docx/text-size';
|
|
184
|
+
role: string;
|
|
185
|
+
fontSizePt: number;
|
|
186
|
+
authored: boolean;
|
|
187
|
+
generated: boolean;
|
|
188
|
+
/** Pointer to the authored size value; absent when the size is inherited. */
|
|
189
|
+
sizePath?: string;
|
|
164
190
|
}
|
|
165
191
|
/** A colour written as a literal rather than as a theme token. */
|
|
166
192
|
export interface DocxColorFact extends QualityFact {
|
|
@@ -192,7 +218,33 @@ export interface DocxPlaceholderFact extends QualityFact {
|
|
|
192
218
|
pattern: string;
|
|
193
219
|
excerpt: string;
|
|
194
220
|
}
|
|
195
|
-
|
|
221
|
+
/**
|
|
222
|
+
* A role-bearing slot of a block invocation, present or not. A profile reads
|
|
223
|
+
* these to require a takeaway under every chart or a source under every
|
|
224
|
+
* table; the theme that styles them never adds a requirement.
|
|
225
|
+
*/
|
|
226
|
+
export interface DocxChromeSlotFact extends QualityFact {
|
|
227
|
+
kind: 'docx/chrome-slot';
|
|
228
|
+
block: string;
|
|
229
|
+
slot: string;
|
|
230
|
+
role: BlockSlotRole;
|
|
231
|
+
present: boolean;
|
|
232
|
+
/** The invocation the slot belongs to. */
|
|
233
|
+
invocation: string;
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* What a top-level section carries once blocks have expanded: a header, a
|
|
237
|
+
* footer, and a page-number field in either. A profile decides whether a
|
|
238
|
+
* body section owes a running head; the first section is where a cover lives.
|
|
239
|
+
*/
|
|
240
|
+
export interface DocxSectionChromeFact extends QualityFact {
|
|
241
|
+
kind: 'docx/section-chrome';
|
|
242
|
+
index: number;
|
|
243
|
+
header: boolean;
|
|
244
|
+
footer: boolean;
|
|
245
|
+
pageNumber: boolean;
|
|
246
|
+
}
|
|
247
|
+
export type DocxQualityFact = DocxChromeSlotFact | DocxSectionChromeFact | DocxTableWidthFact | DocxHeadingFact | DocxFrameTextFact | DocxSvgTextFact | DocxLineBoxFact | DocxPlaceholderFact | DocxBlockSlotFact | DocxThemeFact | DocxTextSizeFact | DocxColorFact | DocxFontFact | DocxChartFact | DocxTableFact;
|
|
196
248
|
export interface DocxQualityModel {
|
|
197
249
|
authored: ReportComponentDefinition;
|
|
198
250
|
/** Theme context over the expanded tree: every block lowered in place. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facts.d.ts","sourceRoot":"","sources":["../../src/quality/facts.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EAErB,KAAK,WAAW,EAEhB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EAClB,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"facts.d.ts","sourceRoot":"","sources":["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,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"preflight.d.ts","sourceRoot":"","sources":["../../src/quality/preflight.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAElE,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,cAAc,EAEpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAG7C,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAWjE,MAAM,WAAW,kBAAkB;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;CAC5C;AAED,MAAM,WAAW,0BAA2B,SAAQ,kBAAkB;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,QAAQ,CAAC,EAAE,gBAAgB,CAAC,gBAAgB,EAAE,eAAe,CAAC,CAAC;CAChE;AAiBD,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,OAAO,EACZ,OAAO,GAAE,0BAA+B,GACvC,eAAe,CA4CjB"}
|
package/dist/quality/rules.d.ts
CHANGED
|
@@ -28,8 +28,79 @@ export declare const docxPaletteRule: QualityRule<DocxQualityModel, DocxQualityF
|
|
|
28
28
|
export declare const docxChartRule: QualityRule<DocxQualityModel, DocxQualityFact>;
|
|
29
29
|
/** Information design for tables: alignment, rounding, rules and length. */
|
|
30
30
|
export declare const docxTableDesignRule: QualityRule<DocxQualityModel, DocxQualityFact>;
|
|
31
|
+
/**
|
|
32
|
+
* Chrome a profile requires, judged where the block declared the slot. Off by
|
|
33
|
+
* default: a takeaway under a chart or a source under a table is an archetype
|
|
34
|
+
* convention, and the theme that styles the slot never asks for it.
|
|
35
|
+
*/
|
|
36
|
+
export declare const docxRequiredChromeRule: QualityRule<DocxQualityModel, DocxQualityFact>;
|
|
37
|
+
/**
|
|
38
|
+
* A running head where the profile expects one: every top-level section from
|
|
39
|
+
* `fromSection` on must carry the parts in `required` — a header, a footer,
|
|
40
|
+
* a page-number field in either. The first section is exempt by default, so
|
|
41
|
+
* a cover stays clean. Off by default; the theme only paints a running head.
|
|
42
|
+
*/
|
|
43
|
+
export declare const docxRunningHeadRule: QualityRule<DocxQualityModel, DocxQualityFact>;
|
|
44
|
+
/**
|
|
45
|
+
* An authored size the theme never paints. The theme owns the list — its
|
|
46
|
+
* styles, its font roles, every step of its scale — so a custom theme is
|
|
47
|
+
* judged by its own values, and a size a block compiled from its definition
|
|
48
|
+
* is never reported: the author has no pointer to patch there. Off until a
|
|
49
|
+
* profile turns it on: an editorial layout on any theme sets display sizes by
|
|
50
|
+
* hand, and only an archetype decides that a document must keep to the scale.
|
|
51
|
+
*/
|
|
52
|
+
export declare const docxTypeScaleRule: QualityRule<DocxQualityModel, DocxQualityFact>;
|
|
53
|
+
/**
|
|
54
|
+
* How many distinct sizes a document paints, blocks included: the count of
|
|
55
|
+
* what reaches the page rather than of what the author typed. Off until a
|
|
56
|
+
* profile turns it on and sets `maximumSizes`: a theme sets no ceiling of
|
|
57
|
+
* its own, the ceiling is an archetype convention.
|
|
58
|
+
*/
|
|
59
|
+
export declare const docxSizeCountRule: QualityRule<DocxQualityModel, DocxQualityFact>;
|
|
60
|
+
/**
|
|
61
|
+
* One role at two sizes: a heading level or a paragraph style that is painted
|
|
62
|
+
* at more than one size across the document. The theme's size for the role
|
|
63
|
+
* is the expected value, and every authored departure from it is reported and
|
|
64
|
+
* repaired to it. A role that is consistently overridden is not drift. Off
|
|
65
|
+
* until a profile turns it on, for the same reason as `docx/type-scale`,
|
|
66
|
+
* which yields to this rule on any pointer it reports.
|
|
67
|
+
*/
|
|
68
|
+
export declare const docxRoleDriftRule: QualityRule<DocxQualityModel, DocxQualityFact>;
|
|
31
69
|
export declare const DOCX_QUALITY_RULES: QualityRulePack<DocxQualityModel, DocxQualityFact>;
|
|
32
70
|
export declare const DOCX_QUALITY_PROFILES: {
|
|
71
|
+
readonly 'client-report': {
|
|
72
|
+
readonly id: "client-report";
|
|
73
|
+
readonly formats: readonly ["docx"];
|
|
74
|
+
readonly description: "Client or public-administration report: a running head with page numbers on every section after the cover, a takeaway and a source wherever a block declares them, no heading skipped, and every size on the theme scale with at most eight in play.";
|
|
75
|
+
readonly rules: {
|
|
76
|
+
readonly 'docx/required-chrome': {
|
|
77
|
+
readonly parameters: {
|
|
78
|
+
readonly required: readonly ["takeaway", "source"];
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
readonly 'docx/running-head': {
|
|
82
|
+
readonly parameters: {
|
|
83
|
+
readonly required: readonly ["header", "footer", "pageNumber"];
|
|
84
|
+
readonly fromSection: 1;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
readonly 'docx/heading-hierarchy': {
|
|
88
|
+
readonly severity: "warning";
|
|
89
|
+
};
|
|
90
|
+
readonly 'docx/type-scale': {
|
|
91
|
+
readonly enabled: true;
|
|
92
|
+
};
|
|
93
|
+
readonly 'docx/size-count': {
|
|
94
|
+
readonly enabled: true;
|
|
95
|
+
readonly parameters: {
|
|
96
|
+
readonly maximumSizes: 8;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
readonly 'docx/role-drift': {
|
|
100
|
+
readonly enabled: true;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
};
|
|
33
104
|
readonly 'executive-report': {
|
|
34
105
|
readonly id: "executive-report";
|
|
35
106
|
readonly formats: readonly ["docx"];
|
|
@@ -52,6 +123,12 @@ export declare const DOCX_QUALITY_PROFILES: {
|
|
|
52
123
|
};
|
|
53
124
|
};
|
|
54
125
|
export declare const DOCX_DEFAULT_QUALITY_PROFILE: QualityProfile;
|
|
126
|
+
/**
|
|
127
|
+
* The shipped profile a document names in `props.qualityProfile`, so that
|
|
128
|
+
* validation without arguments judges a blueprint scaffold by its archetype.
|
|
129
|
+
* An unknown name is nobody's profile: the format default applies.
|
|
130
|
+
*/
|
|
131
|
+
export declare function declaredDocxQualityProfile(document: unknown): QualityProfile | undefined;
|
|
55
132
|
/**
|
|
56
133
|
* Callers name a shipped profile by id — `{ id: 'executive-report', formats: ['docx'] }`.
|
|
57
134
|
* Without this lookup that request reaches the engine carrying nothing but its id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../src/quality/rules.ts"],"names":[],"mappings":"AAAA,OAAO,EAUL,aAAa,EAGb,KAAK,cAAc,EACnB,KAAK,WAAW,
|
|
1
|
+
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../src/quality/rules.ts"],"names":[],"mappings":"AAAA,OAAO,EAUL,aAAa,EAGb,KAAK,cAAc,EACnB,KAAK,WAAW,EAEhB,KAAK,eAAe,EACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAUV,eAAe,EACf,gBAAgB,EAQjB,MAAM,SAAS,CAAC;AAejB,eAAO,MAAM,kBAAkB,EAAE,WAAW,CAC1C,gBAAgB,EAChB,eAAe,CA+DhB,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,WAAW,CAChD,gBAAgB,EAChB,eAAe,CAwChB,CAAC;AAsBF,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,gBAAgB,EAAE,eAAe,CA0F1E,CAAC;AA+BF,eAAO,MAAM,sBAAsB,EAAE,WAAW,CAC9C,gBAAgB,EAChB,eAAe,CA+HhB,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,WAAW,CAC7C,gBAAgB,EAChB,eAAe,CAuChB,CAAC;AAsBF,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,gBAAgB,EAAE,eAAe,CAgE1E,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAC3C,gBAAgB,EAChB,eA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