@json-to-office/shared-docx 0.38.1 → 1.1.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 (49) hide show
  1. package/dist/{chunk-ZC2I7CTZ.js → chunk-45I2NASU.js} +5 -3
  2. package/dist/{chunk-ZC2I7CTZ.js.map → chunk-45I2NASU.js.map} +1 -1
  3. package/dist/chunk-5KOKA5GY.js +687 -0
  4. package/dist/chunk-5KOKA5GY.js.map +1 -0
  5. package/dist/{chunk-PMZEVOBL.js → chunk-6B3LHADB.js} +2 -2
  6. package/dist/{chunk-XR7ZEDXZ.js → chunk-6HFF6XZN.js} +50 -6
  7. package/dist/chunk-6HFF6XZN.js.map +1 -0
  8. package/dist/{chunk-IU2F2FYO.js → chunk-6YMJWMEC.js} +34 -18
  9. package/dist/chunk-6YMJWMEC.js.map +1 -0
  10. package/dist/{chunk-JF5ZJQNR.js → chunk-A2K66URO.js} +47 -149
  11. package/dist/chunk-A2K66URO.js.map +1 -0
  12. package/dist/{chunk-LATN6QG6.js → chunk-BBFR3RRN.js} +45 -8
  13. package/dist/chunk-BBFR3RRN.js.map +1 -0
  14. package/dist/{chunk-W523ZTYH.js → chunk-LBXOAXMG.js} +6 -6
  15. package/dist/{chunk-E5EWXZWO.js → chunk-MYLVUQCN.js} +2 -2
  16. package/dist/chunk-OP5PCDNN.js +1272 -0
  17. package/dist/chunk-OP5PCDNN.js.map +1 -0
  18. package/dist/{chunk-HPZPUB6J.js → chunk-TODYYVZ4.js} +2 -2
  19. package/dist/chunk-VX2J2KWA.js +465 -0
  20. package/dist/chunk-VX2J2KWA.js.map +1 -0
  21. package/dist/index.d.ts +12 -2
  22. package/dist/index.js +57 -25
  23. package/dist/index.js.map +1 -1
  24. package/dist/schemas/api.js +7 -5
  25. package/dist/schemas/component-defaults.js +2 -1
  26. package/dist/schemas/component-registry.d.ts +10 -2
  27. package/dist/schemas/component-registry.js +5 -3
  28. package/dist/schemas/components.d.ts +1092 -4
  29. package/dist/schemas/components.js +72 -26
  30. package/dist/schemas/document.js +8 -6
  31. package/dist/schemas/export.d.ts +8 -2
  32. package/dist/schemas/export.js +6 -4
  33. package/dist/schemas/generator.js +6 -4
  34. package/dist/schemas/renderer.d.ts +30 -0
  35. package/dist/schemas/renderer.js +17 -0
  36. package/dist/schemas/renderer.js.map +1 -0
  37. package/dist/schemas/theme.js +3 -2
  38. package/dist/validation/unified/index.js +8 -6
  39. package/package.json +2 -2
  40. package/dist/chunk-2YUAD26Q.js +0 -1718
  41. package/dist/chunk-2YUAD26Q.js.map +0 -1
  42. package/dist/chunk-IU2F2FYO.js.map +0 -1
  43. package/dist/chunk-JF5ZJQNR.js.map +0 -1
  44. package/dist/chunk-LATN6QG6.js.map +0 -1
  45. package/dist/chunk-XR7ZEDXZ.js.map +0 -1
  46. /package/dist/{chunk-PMZEVOBL.js.map → chunk-6B3LHADB.js.map} +0 -0
  47. /package/dist/{chunk-W523ZTYH.js.map → chunk-LBXOAXMG.js.map} +0 -0
  48. /package/dist/{chunk-E5EWXZWO.js.map → chunk-MYLVUQCN.js.map} +0 -0
  49. /package/dist/{chunk-HPZPUB6J.js.map → chunk-TODYYVZ4.js.map} +0 -0
@@ -3,11 +3,13 @@ import {
3
3
  GenerateDocumentResponseSchema,
4
4
  ValidateDocumentRequestSchema,
5
5
  ValidateDocumentResponseSchema
6
- } from "../chunk-HPZPUB6J.js";
7
- import "../chunk-PMZEVOBL.js";
8
- import "../chunk-JF5ZJQNR.js";
9
- import "../chunk-ZC2I7CTZ.js";
10
- import "../chunk-2YUAD26Q.js";
6
+ } from "../chunk-TODYYVZ4.js";
7
+ import "../chunk-6B3LHADB.js";
8
+ import "../chunk-A2K66URO.js";
9
+ import "../chunk-5KOKA5GY.js";
10
+ import "../chunk-45I2NASU.js";
11
+ import "../chunk-OP5PCDNN.js";
12
+ import "../chunk-VX2J2KWA.js";
11
13
  import "../chunk-7TTAAYQ5.js";
12
14
  export {
13
15
  GenerateDocumentRequestSchema,
@@ -9,7 +9,8 @@ import {
9
9
  SectionComponentDefaultsSchema,
10
10
  StatisticComponentDefaultsSchema,
11
11
  TableComponentDefaultsSchema
12
- } from "../chunk-2YUAD26Q.js";
12
+ } from "../chunk-OP5PCDNN.js";
13
+ import "../chunk-VX2J2KWA.js";
13
14
  import "../chunk-7TTAAYQ5.js";
14
15
  export {
15
16
  ColumnsComponentDefaultsSchema,
@@ -1,4 +1,6 @@
1
1
  import { TSchema } from '@sinclair/typebox';
2
+ import { DocxRendererId } from './renderer.js';
3
+ import '@json-to-office/shared';
2
4
 
3
5
  /**
4
6
  * Component Registry - SINGLE SOURCE OF TRUTH
@@ -92,7 +94,10 @@ declare function isStandardComponent(name: string): boolean;
92
94
  * a narrowed union of allowed children; for leaves omit it.
93
95
  * @returns TypeBox schema object for the component
94
96
  */
95
- declare function createComponentSchemaObject(component: StandardComponentDefinition, childrenType?: TSchema, selfRef?: TSchema): TSchema;
97
+ declare function createComponentSchemaObject(component: StandardComponentDefinition, childrenType?: TSchema, selfRef?: TSchema, profile?: {
98
+ renderer: DocxRendererId;
99
+ requireDiscriminator: boolean;
100
+ }): TSchema;
96
101
  /**
97
102
  * Generate an array of TypeBox schemas for all standard components.
98
103
  * Uses a flat recursive ref for all containers (legacy behavior).
@@ -112,7 +117,10 @@ declare function createAllComponentSchemas(recursiveRef?: TSchema): readonly TSc
112
117
  * @param pluginSchemas - Plugin component schemas (always allowed in all containers)
113
118
  * @returns schemas array and a byName map for direct lookups
114
119
  */
115
- declare function createAllComponentSchemasNarrowed(selfRef: TSchema, pluginSchemas?: TSchema[]): {
120
+ declare function createAllComponentSchemasNarrowed(selfRef: TSchema, pluginSchemas?: TSchema[], profile?: {
121
+ renderer: DocxRendererId;
122
+ requireDiscriminator: boolean;
123
+ }): {
116
124
  schemas: TSchema[];
117
125
  byName: Map<string, TSchema>;
118
126
  };
@@ -9,9 +9,11 @@ import {
9
9
  getContentComponents,
10
10
  getStandardComponent,
11
11
  isStandardComponent
12
- } from "../chunk-JF5ZJQNR.js";
13
- import "../chunk-ZC2I7CTZ.js";
14
- import "../chunk-2YUAD26Q.js";
12
+ } from "../chunk-A2K66URO.js";
13
+ import "../chunk-5KOKA5GY.js";
14
+ import "../chunk-45I2NASU.js";
15
+ import "../chunk-OP5PCDNN.js";
16
+ import "../chunk-VX2J2KWA.js";
15
17
  import "../chunk-7TTAAYQ5.js";
16
18
  export {
17
19
  STANDARD_COMPONENTS_REGISTRY,