@json-to-office/core-docx 2.3.0 → 2.5.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.
Files changed (33) hide show
  1. package/dist/components/highcharts.d.ts.map +1 -1
  2. package/dist/core/generationContext.d.ts.map +1 -1
  3. package/dist/index.js +653 -52
  4. package/dist/index.js.map +1 -1
  5. package/dist/ir/compiler.d.ts.map +1 -1
  6. package/dist/plugin/example/index.js +476 -61
  7. package/dist/plugin/example/index.js.map +1 -1
  8. package/dist/quality/facts.d.ts +56 -2
  9. package/dist/quality/facts.d.ts.map +1 -1
  10. package/dist/quality/rules.d.ts +16 -0
  11. package/dist/quality/rules.d.ts.map +1 -1
  12. package/dist/renderers/docxjs/emit.d.ts.map +1 -1
  13. package/dist/renderers/docxjs/index.d.ts.map +1 -1
  14. package/dist/renderers/office-open/index.d.ts.map +1 -1
  15. package/dist/styles/themeToStyles.d.ts.map +1 -1
  16. package/dist/styles/utils/colorUtils.d.ts +12 -1
  17. package/dist/styles/utils/colorUtils.d.ts.map +1 -1
  18. package/dist/styles/utils/styleHelpers.d.ts +2 -0
  19. package/dist/styles/utils/styleHelpers.d.ts.map +1 -1
  20. package/dist/templates/themes/index.d.ts +1896 -668
  21. package/dist/templates/themes/index.d.ts.map +1 -1
  22. package/dist/themes/defaults.d.ts +196 -181
  23. package/dist/themes/defaults.d.ts.map +1 -1
  24. package/dist/themes/design-system.d.ts +4 -0
  25. package/dist/themes/design-system.d.ts.map +1 -0
  26. package/dist/themes/overrides.d.ts +2 -1
  27. package/dist/themes/overrides.d.ts.map +1 -1
  28. package/dist/tsconfig.tsbuildinfo +1 -1
  29. package/dist/utils/normalizeTextCase.d.ts +15 -0
  30. package/dist/utils/normalizeTextCase.d.ts.map +1 -0
  31. package/dist/utils/packageDocument.d.ts +2 -0
  32. package/dist/utils/packageDocument.d.ts.map +1 -1
  33. package/package.json +4 -4
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Case is a run property with two mutually exclusive OOXML flags, `w:caps` and
3
+ * `w:smallCaps`, and both DOCX writers emit only the one that is true (docx.js
4
+ * `RunProperties` writes `w:smallCaps` *or* `w:caps`, never both). A run that
5
+ * turns case off, or swaps one kind for the other, therefore inherits the flag
6
+ * it did not state from its style. This pass states the opposite flag as false.
7
+ *
8
+ * `CT_RPr` is an ordered sequence — `w:caps` precedes `w:smallCaps`, and both
9
+ * precede `w:strike`, `w:color`, `w:sz` — so the added flag goes next to the
10
+ * flag already present, never at the end of the property bag.
11
+ */
12
+ import type AdmZip from 'adm-zip';
13
+ /** Add the missing case flag to every run that states exactly one of them. */
14
+ export declare function normalizeTextCase(zip: AdmZip): boolean;
15
+ //# sourceMappingURL=normalizeTextCase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeTextCase.d.ts","sourceRoot":"","sources":["../../src/utils/normalizeTextCase.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,MAAM,MAAM,SAAS,CAAC;AAOlC,8EAA8E;AAC9E,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAYtD"}
@@ -16,4 +16,6 @@ export declare function toDosTime(date: Date): number;
16
16
  * timezone; this produces identical header bits in every locale.
17
17
  */
18
18
  export declare function canonicalizeDocxBuffer(buffer: Buffer, generatedAt?: Date): Buffer;
19
+ /** Case semantics also apply when timestamp normalization is disabled. */
20
+ export declare function normalizeDocxCaseBuffer(buffer: Buffer): Buffer;
19
21
  //# sourceMappingURL=packageDocument.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageDocument.d.ts","sourceRoot":"","sources":["../../src/utils/packageDocument.ts"],"names":[],"mappings":";AAEA,MAAM,WAAW,sBAAsB;IACrC,8EAA8E;IAC9E,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,kFAAkF;AAClF,eAAO,MAAM,uBAAuB,MAAuC,CAAC;AAE5E,wBAAgB,qBAAqB,CAAC,OAAO,CAAC,EAAE,sBAAsB,GAAG,IAAI,CAiB5E;AAED,mFAAmF;AACnF,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAU5C;AA0FD;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,EACd,WAAW,GAAE,IAA8B,GAC1C,MAAM,CA+BR"}
1
+ {"version":3,"file":"packageDocument.d.ts","sourceRoot":"","sources":["../../src/utils/packageDocument.ts"],"names":[],"mappings":";AAGA,MAAM,WAAW,sBAAsB;IACrC,8EAA8E;IAC9E,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,kFAAkF;AAClF,eAAO,MAAM,uBAAuB,MAAuC,CAAC;AAE5E,wBAAgB,qBAAqB,CAAC,OAAO,CAAC,EAAE,sBAAsB,GAAG,IAAI,CAiB5E;AAED,mFAAmF;AACnF,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAU5C;AA0FD;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,EACd,WAAW,GAAE,IAA8B,GAC1C,MAAM,CAgCR;AAED,0EAA0E;AAC1E,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAG9D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@json-to-office/core-docx",
3
- "version": "2.3.0",
3
+ "version": "2.5.0",
4
4
  "description": "Core DOCX document generation engine",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -24,9 +24,9 @@
24
24
  "adm-zip": "0.5.16",
25
25
  "date-fns": "3.6.0",
26
26
  "probe-image-size": "7.2.3",
27
- "@json-to-office/quality": "^1.9.0",
28
- "@json-to-office/shared": "^1.11.2",
29
- "@json-to-office/shared-docx": "^2.0.0"
27
+ "@json-to-office/quality": "^2.4.0",
28
+ "@json-to-office/shared": "^2.5.0",
29
+ "@json-to-office/shared-docx": "^2.5.0"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "docx": "9.7.1"