@json-to-office/core-docx 4.1.0 → 4.2.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/index.js +89 -5
- package/dist/index.js.map +1 -1
- package/dist/plugin/example/index.js +89 -5
- package/dist/plugin/example/index.js.map +1 -1
- package/dist/quality/text-inventory.d.ts +14 -1
- package/dist/quality/text-inventory.d.ts.map +1 -1
- package/dist/templates/themes/index.d.ts +5 -5
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -12,9 +12,17 @@
|
|
|
12
12
|
* An allowlist by component, unlike the placeholder walk that visits every
|
|
13
13
|
* string: a colour, a style name or a file path is a string the page never
|
|
14
14
|
* shows, and an entry the PDF cannot contain would read as clipped text.
|
|
15
|
+
*
|
|
16
|
+
* Two kinds of string are painted without being authored where they show.
|
|
17
|
+
* A table of contents repeats the headings it collects — cached into the
|
|
18
|
+
* field so headless LibreOffice shows them — and a native chart sets its
|
|
19
|
+
* title and axis titles inside the drawing. Both are inventoried where they
|
|
20
|
+
* render so a heading's first occurrence is not stolen by the contents page;
|
|
21
|
+
* the contents entries are `optional`, since which headings a field collects
|
|
22
|
+
* is the field's decision and an entry the page lacks is no defect.
|
|
15
23
|
*/
|
|
16
24
|
import type { QualityFact } from '@json-to-office/quality';
|
|
17
|
-
export type DocxTextRole = 'heading' | 'body' | 'list-item' | 'table-header' | 'table-cell' | 'statistic' | 'caption' | 'chrome';
|
|
25
|
+
export type DocxTextRole = 'heading' | 'body' | 'list-item' | 'table-header' | 'table-cell' | 'statistic' | 'caption' | 'toc-entry' | 'chrome';
|
|
18
26
|
export interface DocxTextFact extends QualityFact {
|
|
19
27
|
kind: 'docx/text';
|
|
20
28
|
text: string;
|
|
@@ -35,6 +43,11 @@ export interface DocxTextFact extends QualityFact {
|
|
|
35
43
|
repeats?: boolean;
|
|
36
44
|
/** Compiled by a block: `path` is the authored slot, not the paragraph. */
|
|
37
45
|
generated?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Painted by the renderer from other authored text — a contents entry —
|
|
48
|
+
* so its absence is not a defect and never a `missing` finding.
|
|
49
|
+
*/
|
|
50
|
+
optional?: boolean;
|
|
38
51
|
}
|
|
39
52
|
/**
|
|
40
53
|
* Inventory the text of a component tree in reading order. `basePath` is the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-inventory.d.ts","sourceRoot":"","sources":["../../src/quality/text-inventory.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"text-inventory.d.ts","sourceRoot":"","sources":["../../src/quality/text-inventory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,MAAM,GACN,WAAW,GACX,cAAc,GACd,YAAY,GACZ,WAAW,GACX,SAAS,GACT,WAAW,GACX,QAAQ,CAAC;AAEb,MAAM,WAAW,YAAa,SAAQ,WAAW;IAC/C,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,YAAY,CAAC;IACnB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mEAAmE;IACnE,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,KAAK,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5B,kEAAkE;IAClE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,2EAA2E;IAC3E,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AA+BD;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,SAAS,OAAO,EAAE,EAC5B,QAAQ,SAAc,GACrB,YAAY,EAAE,CAgUhB"}
|
|
@@ -1317,7 +1317,6 @@ export declare const themes: Record<string, {
|
|
|
1317
1317
|
} | undefined;
|
|
1318
1318
|
text: string;
|
|
1319
1319
|
})[] | undefined;
|
|
1320
|
-
bullet?: string | undefined;
|
|
1321
1320
|
reference?: string | undefined;
|
|
1322
1321
|
levels?: {
|
|
1323
1322
|
text?: string | undefined;
|
|
@@ -1338,6 +1337,7 @@ export declare const themes: Record<string, {
|
|
|
1338
1337
|
format?: "none" | "decimal" | "bullet" | "upperRoman" | "lowerRoman" | "upperLetter" | "lowerLetter" | "ordinal" | "cardinalText" | "ordinalText" | "hex" | "chicago" | "ideographDigital" | "japaneseCounting" | "aiueo" | "iroha" | "decimalFullWidth" | "decimalHalfWidth" | "japaneseLegal" | "japaneseDigitalTenThousand" | "decimalEnclosedCircle" | "decimalFullWidth2" | "aiueoFullWidth" | "irohaFullWidth" | "decimalZero" | "ganada" | "chosung" | "decimalEnclosedFullstop" | "decimalEnclosedParen" | "decimalEnclosedCircleChinese" | "ideographEnclosedCircle" | "ideographTraditional" | "ideographZodiac" | "ideographZodiacTraditional" | "taiwaneseCounting" | "ideographLegalTraditional" | "taiwaneseCountingThousand" | "taiwaneseDigital" | "chineseCounting" | "chineseLegalSimplified" | "chineseCountingThousand" | "koreanDigital" | "koreanCounting" | "koreanLegal" | "koreanDigital2" | "vietnameseCounting" | "russianLower" | "russianUpper" | "numberInDash" | "hebrew1" | "hebrew2" | "arabicAlpha" | "arabicAbjad" | "hindiVowels" | "hindiConsonants" | "hindiNumbers" | "hindiCounting" | "thaiLetters" | "thaiNumbers" | "thaiCounting" | undefined;
|
|
1339
1338
|
level: number;
|
|
1340
1339
|
}[] | undefined;
|
|
1340
|
+
bullet?: string | undefined;
|
|
1341
1341
|
} | undefined;
|
|
1342
1342
|
} | undefined;
|
|
1343
1343
|
noProofWords?: string[] | undefined;
|
|
@@ -3108,7 +3108,6 @@ export declare const minimalTheme: {
|
|
|
3108
3108
|
} | undefined;
|
|
3109
3109
|
text: string;
|
|
3110
3110
|
})[] | undefined;
|
|
3111
|
-
bullet?: string | undefined;
|
|
3112
3111
|
reference?: string | undefined;
|
|
3113
3112
|
levels?: {
|
|
3114
3113
|
text?: string | undefined;
|
|
@@ -3129,6 +3128,7 @@ export declare const minimalTheme: {
|
|
|
3129
3128
|
format?: "none" | "decimal" | "bullet" | "upperRoman" | "lowerRoman" | "upperLetter" | "lowerLetter" | "ordinal" | "cardinalText" | "ordinalText" | "hex" | "chicago" | "ideographDigital" | "japaneseCounting" | "aiueo" | "iroha" | "decimalFullWidth" | "decimalHalfWidth" | "japaneseLegal" | "japaneseDigitalTenThousand" | "decimalEnclosedCircle" | "decimalFullWidth2" | "aiueoFullWidth" | "irohaFullWidth" | "decimalZero" | "ganada" | "chosung" | "decimalEnclosedFullstop" | "decimalEnclosedParen" | "decimalEnclosedCircleChinese" | "ideographEnclosedCircle" | "ideographTraditional" | "ideographZodiac" | "ideographZodiacTraditional" | "taiwaneseCounting" | "ideographLegalTraditional" | "taiwaneseCountingThousand" | "taiwaneseDigital" | "chineseCounting" | "chineseLegalSimplified" | "chineseCountingThousand" | "koreanDigital" | "koreanCounting" | "koreanLegal" | "koreanDigital2" | "vietnameseCounting" | "russianLower" | "russianUpper" | "numberInDash" | "hebrew1" | "hebrew2" | "arabicAlpha" | "arabicAbjad" | "hindiVowels" | "hindiConsonants" | "hindiNumbers" | "hindiCounting" | "thaiLetters" | "thaiNumbers" | "thaiCounting" | undefined;
|
|
3130
3129
|
level: number;
|
|
3131
3130
|
}[] | undefined;
|
|
3131
|
+
bullet?: string | undefined;
|
|
3132
3132
|
} | undefined;
|
|
3133
3133
|
} | undefined;
|
|
3134
3134
|
noProofWords?: string[] | undefined;
|
|
@@ -4864,7 +4864,6 @@ export declare const devportalTheme: {
|
|
|
4864
4864
|
} | undefined;
|
|
4865
4865
|
text: string;
|
|
4866
4866
|
})[] | undefined;
|
|
4867
|
-
bullet?: string | undefined;
|
|
4868
4867
|
reference?: string | undefined;
|
|
4869
4868
|
levels?: {
|
|
4870
4869
|
text?: string | undefined;
|
|
@@ -4885,6 +4884,7 @@ export declare const devportalTheme: {
|
|
|
4885
4884
|
format?: "none" | "decimal" | "bullet" | "upperRoman" | "lowerRoman" | "upperLetter" | "lowerLetter" | "ordinal" | "cardinalText" | "ordinalText" | "hex" | "chicago" | "ideographDigital" | "japaneseCounting" | "aiueo" | "iroha" | "decimalFullWidth" | "decimalHalfWidth" | "japaneseLegal" | "japaneseDigitalTenThousand" | "decimalEnclosedCircle" | "decimalFullWidth2" | "aiueoFullWidth" | "irohaFullWidth" | "decimalZero" | "ganada" | "chosung" | "decimalEnclosedFullstop" | "decimalEnclosedParen" | "decimalEnclosedCircleChinese" | "ideographEnclosedCircle" | "ideographTraditional" | "ideographZodiac" | "ideographZodiacTraditional" | "taiwaneseCounting" | "ideographLegalTraditional" | "taiwaneseCountingThousand" | "taiwaneseDigital" | "chineseCounting" | "chineseLegalSimplified" | "chineseCountingThousand" | "koreanDigital" | "koreanCounting" | "koreanLegal" | "koreanDigital2" | "vietnameseCounting" | "russianLower" | "russianUpper" | "numberInDash" | "hebrew1" | "hebrew2" | "arabicAlpha" | "arabicAbjad" | "hindiVowels" | "hindiConsonants" | "hindiNumbers" | "hindiCounting" | "thaiLetters" | "thaiNumbers" | "thaiCounting" | undefined;
|
|
4886
4885
|
level: number;
|
|
4887
4886
|
}[] | undefined;
|
|
4887
|
+
bullet?: string | undefined;
|
|
4888
4888
|
} | undefined;
|
|
4889
4889
|
} | undefined;
|
|
4890
4890
|
noProofWords?: string[] | undefined;
|
|
@@ -6620,7 +6620,6 @@ export declare const vermilionTheme: {
|
|
|
6620
6620
|
} | undefined;
|
|
6621
6621
|
text: string;
|
|
6622
6622
|
})[] | undefined;
|
|
6623
|
-
bullet?: string | undefined;
|
|
6624
6623
|
reference?: string | undefined;
|
|
6625
6624
|
levels?: {
|
|
6626
6625
|
text?: string | undefined;
|
|
@@ -6641,6 +6640,7 @@ export declare const vermilionTheme: {
|
|
|
6641
6640
|
format?: "none" | "decimal" | "bullet" | "upperRoman" | "lowerRoman" | "upperLetter" | "lowerLetter" | "ordinal" | "cardinalText" | "ordinalText" | "hex" | "chicago" | "ideographDigital" | "japaneseCounting" | "aiueo" | "iroha" | "decimalFullWidth" | "decimalHalfWidth" | "japaneseLegal" | "japaneseDigitalTenThousand" | "decimalEnclosedCircle" | "decimalFullWidth2" | "aiueoFullWidth" | "irohaFullWidth" | "decimalZero" | "ganada" | "chosung" | "decimalEnclosedFullstop" | "decimalEnclosedParen" | "decimalEnclosedCircleChinese" | "ideographEnclosedCircle" | "ideographTraditional" | "ideographZodiac" | "ideographZodiacTraditional" | "taiwaneseCounting" | "ideographLegalTraditional" | "taiwaneseCountingThousand" | "taiwaneseDigital" | "chineseCounting" | "chineseLegalSimplified" | "chineseCountingThousand" | "koreanDigital" | "koreanCounting" | "koreanLegal" | "koreanDigital2" | "vietnameseCounting" | "russianLower" | "russianUpper" | "numberInDash" | "hebrew1" | "hebrew2" | "arabicAlpha" | "arabicAbjad" | "hindiVowels" | "hindiConsonants" | "hindiNumbers" | "hindiCounting" | "thaiLetters" | "thaiNumbers" | "thaiCounting" | undefined;
|
|
6642
6641
|
level: number;
|
|
6643
6642
|
}[] | undefined;
|
|
6643
|
+
bullet?: string | undefined;
|
|
6644
6644
|
} | undefined;
|
|
6645
6645
|
} | undefined;
|
|
6646
6646
|
noProofWords?: string[] | undefined;
|
|
@@ -8376,7 +8376,6 @@ export declare const consultingTheme: {
|
|
|
8376
8376
|
} | undefined;
|
|
8377
8377
|
text: string;
|
|
8378
8378
|
})[] | undefined;
|
|
8379
|
-
bullet?: string | undefined;
|
|
8380
8379
|
reference?: string | undefined;
|
|
8381
8380
|
levels?: {
|
|
8382
8381
|
text?: string | undefined;
|
|
@@ -8397,6 +8396,7 @@ export declare const consultingTheme: {
|
|
|
8397
8396
|
format?: "none" | "decimal" | "bullet" | "upperRoman" | "lowerRoman" | "upperLetter" | "lowerLetter" | "ordinal" | "cardinalText" | "ordinalText" | "hex" | "chicago" | "ideographDigital" | "japaneseCounting" | "aiueo" | "iroha" | "decimalFullWidth" | "decimalHalfWidth" | "japaneseLegal" | "japaneseDigitalTenThousand" | "decimalEnclosedCircle" | "decimalFullWidth2" | "aiueoFullWidth" | "irohaFullWidth" | "decimalZero" | "ganada" | "chosung" | "decimalEnclosedFullstop" | "decimalEnclosedParen" | "decimalEnclosedCircleChinese" | "ideographEnclosedCircle" | "ideographTraditional" | "ideographZodiac" | "ideographZodiacTraditional" | "taiwaneseCounting" | "ideographLegalTraditional" | "taiwaneseCountingThousand" | "taiwaneseDigital" | "chineseCounting" | "chineseLegalSimplified" | "chineseCountingThousand" | "koreanDigital" | "koreanCounting" | "koreanLegal" | "koreanDigital2" | "vietnameseCounting" | "russianLower" | "russianUpper" | "numberInDash" | "hebrew1" | "hebrew2" | "arabicAlpha" | "arabicAbjad" | "hindiVowels" | "hindiConsonants" | "hindiNumbers" | "hindiCounting" | "thaiLetters" | "thaiNumbers" | "thaiCounting" | undefined;
|
|
8398
8397
|
level: number;
|
|
8399
8398
|
}[] | undefined;
|
|
8399
|
+
bullet?: string | undefined;
|
|
8400
8400
|
} | undefined;
|
|
8401
8401
|
} | undefined;
|
|
8402
8402
|
noProofWords?: string[] | undefined;
|