@json-to-office/core-docx 4.0.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.
@@ -6,6 +6,7 @@ import type { ThemeConfig } from '../styles';
6
6
  import { type GenerationThemeContext } from '../core/generationContext';
7
7
  import { type ResolvedDocumentTree } from '../core/structure';
8
8
  import { type BlockSourceMap } from '../blocks';
9
+ import { type DocxTextFact } from './text-inventory';
9
10
  export interface DocxTableWidthFact extends QualityFact {
10
11
  kind: 'docx/table-width';
11
12
  totalWidthTwips: number;
@@ -244,7 +245,7 @@ export interface DocxSectionChromeFact extends QualityFact {
244
245
  footer: boolean;
245
246
  pageNumber: boolean;
246
247
  }
247
- export type DocxQualityFact = DocxChromeSlotFact | DocxSectionChromeFact | DocxTableWidthFact | DocxHeadingFact | DocxFrameTextFact | DocxSvgTextFact | DocxLineBoxFact | DocxPlaceholderFact | DocxBlockSlotFact | DocxThemeFact | DocxTextSizeFact | DocxColorFact | DocxFontFact | DocxChartFact | DocxTableFact;
248
+ export type DocxQualityFact = DocxTextFact | DocxChromeSlotFact | DocxSectionChromeFact | DocxTableWidthFact | DocxHeadingFact | DocxFrameTextFact | DocxSvgTextFact | DocxLineBoxFact | DocxPlaceholderFact | DocxBlockSlotFact | DocxThemeFact | DocxTextSizeFact | DocxColorFact | DocxFontFact | DocxChartFact | DocxTableFact;
248
249
  export interface DocxQualityModel {
249
250
  authored: ReportComponentDefinition;
250
251
  /** 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,EACl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AAc,CAAC;IAC1B,gDAAgD;IAChD,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,yEAAyE;IACzE,QAAQ,EAAE,yBAAyB,CAAC;CACrC;AAED,MAAM,WAAW,yBAAyB;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAC3C,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,QAAQ,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC/B,OAAO,CAAC,EAAE,sBAAsB,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AA2wBD,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,yBAAyB,EACnC,OAAO,GAAE,yBAA8B,GACtC,gBAAgB,CAAC,gBAAgB,EAAE,eAAe,CAAC,CAkcrD"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Every string the document paints, with where it was written and what it
3
+ * is — the authored side of the rendered pass's text matching (#344).
4
+ *
5
+ * The rendered PDF knows where each word landed and nothing about which
6
+ * paragraph put it there. This inventory is the join key: a rendered finding
7
+ * locates its words in the PDF, matches them back to one of these entries,
8
+ * and reports at the entry's pointer. Walked over the expanded tree, so a
9
+ * paragraph a block compiled is inventoried too; `prepareDocxQualityDocument`
10
+ * then maps its pointer to the authored slot through the block source maps.
11
+ *
12
+ * An allowlist by component, unlike the placeholder walk that visits every
13
+ * string: a colour, a style name or a file path is a string the page never
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.
23
+ */
24
+ import type { QualityFact } from '@json-to-office/quality';
25
+ export type DocxTextRole = 'heading' | 'body' | 'list-item' | 'table-header' | 'table-cell' | 'statistic' | 'caption' | 'toc-entry' | 'chrome';
26
+ export interface DocxTextFact extends QualityFact {
27
+ kind: 'docx/text';
28
+ text: string;
29
+ role: DocxTextRole;
30
+ /** Heading level, for `heading` entries. */
31
+ level?: number;
32
+ /** Position in reading order across the whole document, from 0. */
33
+ order: number;
34
+ /**
35
+ * Set when the paragraph sits in a floating frame. Only the width is a
36
+ * bound: a docx frame's height is a minimum the frame grows past, so the
37
+ * rendered pass compares width alone.
38
+ */
39
+ frame?: {
40
+ widthPt: number;
41
+ };
42
+ /** Header or footer text repeats on every page of its section. */
43
+ repeats?: boolean;
44
+ /** Compiled by a block: `path` is the authored slot, not the paragraph. */
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;
51
+ }
52
+ /**
53
+ * Inventory the text of a component tree in reading order. `basePath` is the
54
+ * pointer of the array `children` sits at; entries carry pointers to the
55
+ * exact string so a finding lands where the author can edit it.
56
+ */
57
+ export declare function collectDocxTextInventory(children: readonly unknown[], basePath?: string): DocxTextFact[];
58
+ //# sourceMappingURL=text-inventory.d.ts.map
@@ -0,0 +1 @@
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;