@json-to-office/shared-docx 0.23.0 → 0.25.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 (48) hide show
  1. package/dist/{chunk-GJBRYTGZ.js → chunk-55OMIWMP.js} +8 -14
  2. package/dist/chunk-55OMIWMP.js.map +1 -0
  3. package/dist/{chunk-E5YI66B3.js → chunk-7TTAAYQ5.js} +9 -2
  4. package/dist/chunk-7TTAAYQ5.js.map +1 -0
  5. package/dist/{chunk-KNMPYZUO.js → chunk-AZWXGOAE.js} +88 -9
  6. package/dist/chunk-AZWXGOAE.js.map +1 -0
  7. package/dist/{chunk-3JOBFRYR.js → chunk-BA7VBTKF.js} +41 -3
  8. package/dist/chunk-BA7VBTKF.js.map +1 -0
  9. package/dist/{chunk-S4TSENRQ.js → chunk-BRXPJ26B.js} +8 -4
  10. package/dist/chunk-BRXPJ26B.js.map +1 -0
  11. package/dist/{chunk-FNCLWYTA.js → chunk-DTBB6YZI.js} +2 -2
  12. package/dist/{chunk-2TQ74H6S.js → chunk-JFMVBHIY.js} +2 -2
  13. package/dist/{chunk-HTOT7PVC.js → chunk-MF2PDHIE.js} +42 -5
  14. package/dist/chunk-MF2PDHIE.js.map +1 -0
  15. package/dist/{chunk-U7UNC7QH.js → chunk-O3RPJ35G.js} +2 -2
  16. package/dist/{chunk-YQE7H4H4.js → chunk-Q3H7Z724.js} +15 -7
  17. package/dist/chunk-Q3H7Z724.js.map +1 -0
  18. package/dist/{chunk-7636IMZ5.js → chunk-YCDRARTU.js} +2 -2
  19. package/dist/index.d.ts +1076 -2
  20. package/dist/index.js +31 -18
  21. package/dist/index.js.map +1 -1
  22. package/dist/schemas/api.js +6 -5
  23. package/dist/schemas/component-defaults.d.ts +38 -0
  24. package/dist/schemas/component-defaults.js +2 -2
  25. package/dist/schemas/component-registry.js +4 -3
  26. package/dist/schemas/components.d.ts +2430 -220
  27. package/dist/schemas/components.js +15 -4
  28. package/dist/schemas/document.js +7 -6
  29. package/dist/schemas/export.js +5 -4
  30. package/dist/schemas/font.d.ts +3 -1
  31. package/dist/schemas/font.js +1 -1
  32. package/dist/schemas/generator.js +5 -4
  33. package/dist/schemas/theme.d.ts +1113 -1
  34. package/dist/schemas/theme.js +7 -3
  35. package/dist/validation/unified/index.d.ts +1087 -9
  36. package/dist/validation/unified/index.js +9 -9
  37. package/package.json +2 -2
  38. package/dist/chunk-3JOBFRYR.js.map +0 -1
  39. package/dist/chunk-E5YI66B3.js.map +0 -1
  40. package/dist/chunk-GJBRYTGZ.js.map +0 -1
  41. package/dist/chunk-HTOT7PVC.js.map +0 -1
  42. package/dist/chunk-KNMPYZUO.js.map +0 -1
  43. package/dist/chunk-S4TSENRQ.js.map +0 -1
  44. package/dist/chunk-YQE7H4H4.js.map +0 -1
  45. /package/dist/{chunk-FNCLWYTA.js.map → chunk-DTBB6YZI.js.map} +0 -0
  46. /package/dist/{chunk-2TQ74H6S.js.map → chunk-JFMVBHIY.js.map} +0 -0
  47. /package/dist/{chunk-U7UNC7QH.js.map → chunk-O3RPJ35G.js.map} +0 -0
  48. /package/dist/{chunk-7636IMZ5.js.map → chunk-YCDRARTU.js.map} +0 -0
package/dist/index.js CHANGED
@@ -1,8 +1,7 @@
1
1
  import {
2
2
  generateUnifiedDocumentSchema
3
- } from "./chunk-YQE7H4H4.js";
3
+ } from "./chunk-Q3H7Z724.js";
4
4
  import {
5
- DOC_LINKS,
6
5
  ERROR_TEMPLATES,
7
6
  componentValidator,
8
7
  createComponentValidator,
@@ -32,23 +31,19 @@ import {
32
31
  validateTheme,
33
32
  validateThemeJson,
34
33
  validateThemeWithEnhancement
35
- } from "./chunk-GJBRYTGZ.js";
36
- import {
37
- ThemeConfigSchema,
38
- createMinimalTheme,
39
- isValidThemeConfig
40
- } from "./chunk-3JOBFRYR.js";
34
+ } from "./chunk-55OMIWMP.js";
41
35
  import {
42
36
  GenerateDocumentRequestSchema,
43
37
  GenerateDocumentResponseSchema,
44
38
  ValidateDocumentRequestSchema,
45
39
  ValidateDocumentResponseSchema
46
- } from "./chunk-7636IMZ5.js";
40
+ } from "./chunk-YCDRARTU.js";
47
41
  import {
48
42
  JSON_SCHEMA_URLS,
49
43
  JsonComponentDefinitionSchema
50
- } from "./chunk-FNCLWYTA.js";
44
+ } from "./chunk-DTBB6YZI.js";
51
45
  import {
46
+ collectIndentConflicts,
52
47
  comprehensiveValidateDocument,
53
48
  createDocumentValidator,
54
49
  createJsonValidator,
@@ -69,11 +64,11 @@ import {
69
64
  validateJsonComponent,
70
65
  validateJsonDocument,
71
66
  validateWithEnhancement
72
- } from "./chunk-HTOT7PVC.js";
67
+ } from "./chunk-MF2PDHIE.js";
73
68
  import {
74
69
  ComponentDefinitionSchema,
75
70
  StandardComponentDefinitionSchema
76
- } from "./chunk-2TQ74H6S.js";
71
+ } from "./chunk-JFMVBHIY.js";
77
72
  import {
78
73
  CustomComponentDefinitionSchema,
79
74
  TextSpaceAfterComponentSchema,
@@ -87,7 +82,7 @@ import {
87
82
  createComponentSchema,
88
83
  exportSchemaToFile,
89
84
  fixSchemaReferences
90
- } from "./chunk-U7UNC7QH.js";
85
+ } from "./chunk-O3RPJ35G.js";
91
86
  import {
92
87
  HighchartsPropsSchema,
93
88
  ReportPropsSchema,
@@ -96,7 +91,12 @@ import {
96
91
  VisualCanvasBackgroundSchema,
97
92
  VisualCanvasSchema,
98
93
  VisualPropsSchema
99
- } from "./chunk-S4TSENRQ.js";
94
+ } from "./chunk-BRXPJ26B.js";
95
+ import {
96
+ ThemeConfigSchema,
97
+ createMinimalTheme,
98
+ isValidThemeConfig
99
+ } from "./chunk-BA7VBTKF.js";
100
100
  import {
101
101
  AlignmentSchema,
102
102
  BaseComponentPropsSchema,
@@ -111,15 +111,20 @@ import {
111
111
  ListPropsSchema,
112
112
  MarginsSchema,
113
113
  NumberingSchema,
114
+ ParagraphIndentSchema,
114
115
  ParagraphPropsSchema,
115
116
  RevisionSchema,
116
117
  RevisionSegmentSchema,
117
118
  SectionPropsSchema,
118
119
  SpacingSchema,
119
120
  StatisticPropsSchema,
121
+ TabStopLeaderSchema,
122
+ TabStopSchema,
123
+ TabStopTypeSchema,
124
+ TabStopsSchema,
120
125
  TablePropsSchema
121
- } from "./chunk-KNMPYZUO.js";
122
- import "./chunk-E5YI66B3.js";
126
+ } from "./chunk-AZWXGOAE.js";
127
+ import "./chunk-7TTAAYQ5.js";
123
128
 
124
129
  // src/diff/word-diff.ts
125
130
  var MAX_LCS_CELLS = 1e6;
@@ -1051,7 +1056,10 @@ var JsonDocumentParser = class {
1051
1056
  suggestions.push(
1052
1057
  "Check that the value matches one of the allowed formats"
1053
1058
  );
1054
- suggestions.push("Verify the module type is spelled correctly");
1059
+ const path = error.path ?? "";
1060
+ if (/\/children\/\d+$/.test(path) || path.endsWith("/name")) {
1061
+ suggestions.push("Verify the component name is spelled correctly");
1062
+ }
1055
1063
  } else if (message.includes("minimum")) {
1056
1064
  const match = message.match(/minimum.*?(\d+)/);
1057
1065
  if (match) {
@@ -1639,7 +1647,6 @@ export {
1639
1647
  ComponentDefinitionSchema,
1640
1648
  CustomComponentDefinitionSchema,
1641
1649
  DEFAULT_ERROR_CONFIG,
1642
- DOC_LINKS,
1643
1650
  ERROR_EMOJIS,
1644
1651
  ERROR_TEMPLATES,
1645
1652
  GenerateDocumentRequestSchema,
@@ -1659,6 +1666,7 @@ export {
1659
1666
  ListPropsSchema,
1660
1667
  MarginsSchema,
1661
1668
  NumberingSchema,
1669
+ ParagraphIndentSchema,
1662
1670
  ParagraphPropsSchema,
1663
1671
  ReportPropsSchema,
1664
1672
  RevisionSchema,
@@ -1671,6 +1679,10 @@ export {
1671
1679
  StandardComponentDefinitionSchema,
1672
1680
  StatisticPropsSchema,
1673
1681
  THEME_SCHEMA_METADATA,
1682
+ TabStopLeaderSchema,
1683
+ TabStopSchema,
1684
+ TabStopTypeSchema,
1685
+ TabStopsSchema,
1674
1686
  TablePropsSchema,
1675
1687
  TextBoxPropsSchema,
1676
1688
  TextSpaceAfterComponentSchema,
@@ -1684,6 +1696,7 @@ export {
1684
1696
  VisualPropsSchema,
1685
1697
  calculatePosition,
1686
1698
  clearComponentNamesCache,
1699
+ collectIndentConflicts,
1687
1700
  compareSemver,
1688
1701
  componentValidator,
1689
1702
  comprehensiveValidateDocument,