@json-to-office/core-docx 0.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 (169) hide show
  1. package/LICENSE +18 -0
  2. package/README.md +9 -0
  3. package/dist/cache/index.d.ts +7 -0
  4. package/dist/cache/index.d.ts.map +1 -0
  5. package/dist/cache/key-generator.d.ts +34 -0
  6. package/dist/cache/key-generator.d.ts.map +1 -0
  7. package/dist/components/columns.d.ts +12 -0
  8. package/dist/components/columns.d.ts.map +1 -0
  9. package/dist/components/footer.d.ts +12 -0
  10. package/dist/components/footer.d.ts.map +1 -0
  11. package/dist/components/header.d.ts +12 -0
  12. package/dist/components/header.d.ts.map +1 -0
  13. package/dist/components/heading.d.ts +12 -0
  14. package/dist/components/heading.d.ts.map +1 -0
  15. package/dist/components/highcharts.d.ts +21 -0
  16. package/dist/components/highcharts.d.ts.map +1 -0
  17. package/dist/components/image.d.ts +12 -0
  18. package/dist/components/image.d.ts.map +1 -0
  19. package/dist/components/index.d.ts +19 -0
  20. package/dist/components/index.d.ts.map +1 -0
  21. package/dist/components/list.d.ts +12 -0
  22. package/dist/components/list.d.ts.map +1 -0
  23. package/dist/components/paragraph.d.ts +12 -0
  24. package/dist/components/paragraph.d.ts.map +1 -0
  25. package/dist/components/section.d.ts +12 -0
  26. package/dist/components/section.d.ts.map +1 -0
  27. package/dist/components/statistic.d.ts +12 -0
  28. package/dist/components/statistic.d.ts.map +1 -0
  29. package/dist/components/table.d.ts +13 -0
  30. package/dist/components/table.d.ts.map +1 -0
  31. package/dist/components/text-box.d.ts +9 -0
  32. package/dist/components/text-box.d.ts.map +1 -0
  33. package/dist/components/text-space-after.d.ts +35 -0
  34. package/dist/components/text-space-after.d.ts.map +1 -0
  35. package/dist/components/toc/index.d.ts +30 -0
  36. package/dist/components/toc/index.d.ts.map +1 -0
  37. package/dist/core/cached-render.d.ts +46 -0
  38. package/dist/core/cached-render.d.ts.map +1 -0
  39. package/dist/core/content.d.ts +263 -0
  40. package/dist/core/content.d.ts.map +1 -0
  41. package/dist/core/generator.d.ts +93 -0
  42. package/dist/core/generator.d.ts.map +1 -0
  43. package/dist/core/index.d.ts +14 -0
  44. package/dist/core/index.d.ts.map +1 -0
  45. package/dist/core/layout.d.ts +107 -0
  46. package/dist/core/layout.d.ts.map +1 -0
  47. package/dist/core/render.d.ts +26 -0
  48. package/dist/core/render.d.ts.map +1 -0
  49. package/dist/core/structure.d.ts +67 -0
  50. package/dist/core/structure.d.ts.map +1 -0
  51. package/dist/examples/test-spacing-debug.d.ts +2 -0
  52. package/dist/examples/test-spacing-debug.d.ts.map +1 -0
  53. package/dist/examples/test-spacing.d.ts +6 -0
  54. package/dist/examples/test-spacing.d.ts.map +1 -0
  55. package/dist/index.d.ts +20 -0
  56. package/dist/index.d.ts.map +1 -0
  57. package/dist/index.js +7726 -0
  58. package/dist/index.js.map +1 -0
  59. package/dist/json/filesystem.d.ts +81 -0
  60. package/dist/json/filesystem.d.ts.map +1 -0
  61. package/dist/json/index.d.ts +6 -0
  62. package/dist/json/index.d.ts.map +1 -0
  63. package/dist/json/normalizer.d.ts +30 -0
  64. package/dist/json/normalizer.d.ts.map +1 -0
  65. package/dist/json/parser.d.ts +9 -0
  66. package/dist/json/parser.d.ts.map +1 -0
  67. package/dist/plugin/createComponent.d.ts +113 -0
  68. package/dist/plugin/createComponent.d.ts.map +1 -0
  69. package/dist/plugin/createDocumentGenerator.d.ts +18 -0
  70. package/dist/plugin/createDocumentGenerator.d.ts.map +1 -0
  71. package/dist/plugin/example/columns-layout.component.d.ts +29 -0
  72. package/dist/plugin/example/columns-layout.component.d.ts.map +1 -0
  73. package/dist/plugin/example/index.d.ts +6 -0
  74. package/dist/plugin/example/index.d.ts.map +1 -0
  75. package/dist/plugin/example/index.js +7449 -0
  76. package/dist/plugin/example/index.js.map +1 -0
  77. package/dist/plugin/example/nested-section.component.d.ts +16 -0
  78. package/dist/plugin/example/nested-section.component.d.ts.map +1 -0
  79. package/dist/plugin/example/plugin-demo.json +103 -0
  80. package/dist/plugin/example/text-space-after.component.d.ts +22 -0
  81. package/dist/plugin/example/text-space-after.component.d.ts.map +1 -0
  82. package/dist/plugin/example/weather.component.d.ts +29 -0
  83. package/dist/plugin/example/weather.component.d.ts.map +1 -0
  84. package/dist/plugin/index.d.ts +35 -0
  85. package/dist/plugin/index.d.ts.map +1 -0
  86. package/dist/plugin/schema.d.ts +30 -0
  87. package/dist/plugin/schema.d.ts.map +1 -0
  88. package/dist/plugin/types.d.ts +144 -0
  89. package/dist/plugin/types.d.ts.map +1 -0
  90. package/dist/plugin/validation.d.ts +45 -0
  91. package/dist/plugin/validation.d.ts.map +1 -0
  92. package/dist/plugin/version-resolver.d.ts +10 -0
  93. package/dist/plugin/version-resolver.d.ts.map +1 -0
  94. package/dist/styles/index.d.ts +13 -0
  95. package/dist/styles/index.d.ts.map +1 -0
  96. package/dist/styles/theme-resolver.d.ts +6 -0
  97. package/dist/styles/theme-resolver.d.ts.map +1 -0
  98. package/dist/styles/theme-validator.d.ts +7 -0
  99. package/dist/styles/theme-validator.d.ts.map +1 -0
  100. package/dist/styles/themeToDocxAdapter.d.ts +22 -0
  101. package/dist/styles/themeToDocxAdapter.d.ts.map +1 -0
  102. package/dist/styles/utils/borderUtils.d.ts +88 -0
  103. package/dist/styles/utils/borderUtils.d.ts.map +1 -0
  104. package/dist/styles/utils/cellUtils.d.ts +55 -0
  105. package/dist/styles/utils/cellUtils.d.ts.map +1 -0
  106. package/dist/styles/utils/colorUtils.d.ts +27 -0
  107. package/dist/styles/utils/colorUtils.d.ts.map +1 -0
  108. package/dist/styles/utils/componentDefaults.d.ts +97 -0
  109. package/dist/styles/utils/componentDefaults.d.ts.map +1 -0
  110. package/dist/styles/utils/layoutUtils.d.ts +87 -0
  111. package/dist/styles/utils/layoutUtils.d.ts.map +1 -0
  112. package/dist/styles/utils/styleHelpers.d.ts +90 -0
  113. package/dist/styles/utils/styleHelpers.d.ts.map +1 -0
  114. package/dist/templates/documents/index.d.ts +34 -0
  115. package/dist/templates/documents/index.d.ts.map +1 -0
  116. package/dist/templates/documents/proposal.docx.json +171 -0
  117. package/dist/templates/documents/quarterly-report.docx.json +117 -0
  118. package/dist/templates/documents/technical-guide.docx.json +178 -0
  119. package/dist/templates/themes/corporate.docx.theme.json +118 -0
  120. package/dist/templates/themes/index.d.ts +5765 -0
  121. package/dist/templates/themes/index.d.ts.map +1 -0
  122. package/dist/templates/themes/minimal.docx.theme.json +194 -0
  123. package/dist/templates/themes/modern.docx.theme.json +115 -0
  124. package/dist/themes/defaults.d.ts +1300 -0
  125. package/dist/themes/defaults.d.ts.map +1 -0
  126. package/dist/themes/json/index.d.ts +44 -0
  127. package/dist/themes/json/index.d.ts.map +1 -0
  128. package/dist/themes/json/loader.d.ts +26 -0
  129. package/dist/themes/json/loader.d.ts.map +1 -0
  130. package/dist/themes/json/parser.d.ts +25 -0
  131. package/dist/themes/json/parser.d.ts.map +1 -0
  132. package/dist/themes/json/validator.d.ts +35 -0
  133. package/dist/themes/json/validator.d.ts.map +1 -0
  134. package/dist/tsconfig.tsbuildinfo +1 -0
  135. package/dist/types/index.d.ts +158 -0
  136. package/dist/types/index.d.ts.map +1 -0
  137. package/dist/types/plugin.d.ts +67 -0
  138. package/dist/types/plugin.d.ts.map +1 -0
  139. package/dist/utils/alignmentUtils.d.ts +10 -0
  140. package/dist/utils/alignmentUtils.d.ts.map +1 -0
  141. package/dist/utils/bookmarkRegistry.d.ts +49 -0
  142. package/dist/utils/bookmarkRegistry.d.ts.map +1 -0
  143. package/dist/utils/docxImagePositioning.d.ts +18 -0
  144. package/dist/utils/docxImagePositioning.d.ts.map +1 -0
  145. package/dist/utils/environment.d.ts +14 -0
  146. package/dist/utils/environment.d.ts.map +1 -0
  147. package/dist/utils/exampleRunner.d.ts +17 -0
  148. package/dist/utils/exampleRunner.d.ts.map +1 -0
  149. package/dist/utils/fixFloatingImageIds.d.ts +18 -0
  150. package/dist/utils/fixFloatingImageIds.d.ts.map +1 -0
  151. package/dist/utils/formatters.d.ts +2 -0
  152. package/dist/utils/formatters.d.ts.map +1 -0
  153. package/dist/utils/imageUtils.d.ts +84 -0
  154. package/dist/utils/imageUtils.d.ts.map +1 -0
  155. package/dist/utils/numberingConfig.d.ts +84 -0
  156. package/dist/utils/numberingConfig.d.ts.map +1 -0
  157. package/dist/utils/placeholderImage.d.ts +31 -0
  158. package/dist/utils/placeholderImage.d.ts.map +1 -0
  159. package/dist/utils/placeholderProcessor.d.ts +58 -0
  160. package/dist/utils/placeholderProcessor.d.ts.map +1 -0
  161. package/dist/utils/textParser.d.ts +35 -0
  162. package/dist/utils/textParser.d.ts.map +1 -0
  163. package/dist/utils/unicode.d.ts +6 -0
  164. package/dist/utils/unicode.d.ts.map +1 -0
  165. package/dist/utils/warningsDocument.d.ts +17 -0
  166. package/dist/utils/warningsDocument.d.ts.map +1 -0
  167. package/dist/utils/widthUtils.d.ts +27 -0
  168. package/dist/utils/widthUtils.d.ts.map +1 -0
  169. package/package.json +88 -0
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Placeholder Processing System
3
+ * Handles dynamic content replacement in text with support for rich text formatting
4
+ */
5
+ import { TextRun, ExternalHyperlink, InternalHyperlink } from 'docx';
6
+ import { TextStyle } from './textParser';
7
+ type ParagraphChild = TextRun | ExternalHyperlink | InternalHyperlink;
8
+ /**
9
+ * Placeholder handler function type
10
+ */
11
+ export type PlaceholderHandler = (_context?: PlaceholderContext) => TextRun | TextRun[] | string;
12
+ /**
13
+ * Context passed to placeholder handlers
14
+ */
15
+ export interface PlaceholderContext {
16
+ style?: TextStyle;
17
+ [key: string]: unknown;
18
+ }
19
+ /**
20
+ * Placeholder registry for managing dynamic content
21
+ */
22
+ export declare class PlaceholderRegistry {
23
+ private static handlers;
24
+ /**
25
+ * Register a placeholder handler
26
+ */
27
+ static register(name: string, handler: PlaceholderHandler): void;
28
+ /**
29
+ * Get a placeholder handler
30
+ */
31
+ static get(name: string): PlaceholderHandler | undefined;
32
+ /**
33
+ * Check if a placeholder is registered
34
+ */
35
+ static has(name: string): boolean;
36
+ /**
37
+ * Get all registered placeholder names
38
+ */
39
+ static getRegisteredNames(): string[];
40
+ /**
41
+ * Clear all registered placeholders
42
+ */
43
+ static clear(): void;
44
+ }
45
+ /**
46
+ * Process text containing placeholders and return array of paragraph children
47
+ */
48
+ export declare function processPlaceholders(text: string, baseStyle?: TextStyle, context?: PlaceholderContext): ParagraphChild[];
49
+ /**
50
+ * Process text with both decorators and placeholders
51
+ */
52
+ export declare function processTextWithPlaceholders(text: string, baseStyle?: TextStyle, context?: PlaceholderContext): ParagraphChild[];
53
+ /**
54
+ * Initialize built-in placeholders
55
+ */
56
+ export declare function initializeBuiltinPlaceholders(): void;
57
+ export {};
58
+ //# sourceMappingURL=placeholderProcessor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"placeholderProcessor.d.ts","sourceRoot":"","sources":["../../src/utils/placeholderProcessor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,OAAO,EAEP,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,MAAM,CAAC;AACd,OAAO,EAA2B,SAAS,EAAE,MAAM,cAAc,CAAC;AAIlE,KAAK,cAAc,GAAG,OAAO,GAAG,iBAAiB,GAAG,iBAAiB,CAAC;AAEtE;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAC/B,QAAQ,CAAC,EAAE,kBAAkB,KAC1B,OAAO,GAAG,OAAO,EAAE,GAAG,MAAM,CAAC;AAElC;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAyC;IAEhE;;OAEG;IACH,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,GAAG,IAAI;IAIhE;;OAEG;IACH,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS;IAIxD;;OAEG;IACH,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAIjC;;OAEG;IACH,MAAM,CAAC,kBAAkB,IAAI,MAAM,EAAE;IAIrC;;OAEG;IACH,MAAM,CAAC,KAAK,IAAI,IAAI;CAGrB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,SAAS,GAAE,SAAc,EACzB,OAAO,GAAE,kBAAuB,GAC/B,cAAc,EAAE,CAgDlB;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,MAAM,EACZ,SAAS,GAAE,SAAc,EACzB,OAAO,GAAE,kBAAuB,GAC/B,cAAc,EAAE,CA6FlB;AAmCD;;GAEG;AACH,wBAAgB,6BAA6B,IAAI,IAAI,CAsEpD"}
@@ -0,0 +1,35 @@
1
+ import { TextRun, ExternalHyperlink, InternalHyperlink } from 'docx';
2
+ import { PlaceholderContext } from './placeholderProcessor';
3
+ export interface TextStyle {
4
+ font?: string;
5
+ size?: number;
6
+ color?: string;
7
+ bold?: boolean;
8
+ italics?: boolean;
9
+ underline?: {
10
+ type?: 'single' | 'double' | 'thick' | 'dotted' | 'dash' | 'dotDash' | 'dotDotDash' | 'wave' | 'none' | 'words' | 'dottedHeavy' | 'dashedHeavy' | 'dashLong' | 'dashLongHeavy' | 'dashDotHeavy' | 'dashDotDotHeavy' | 'wavyHeavy' | 'wavyDouble';
11
+ color?: string;
12
+ };
13
+ }
14
+ export interface TextDecoratorOptions {
15
+ boldColor?: string;
16
+ placeholderContext?: PlaceholderContext;
17
+ enableHyperlinks?: boolean;
18
+ }
19
+ /**
20
+ * Parses text with inline markdown-style decorators, placeholders, and newlines, returning an array of TextRun objects
21
+ * Supports:
22
+ * - **bold** or __bold__
23
+ * - *italic* or _italic_
24
+ * - ***bold italic*** or ___bold italic___
25
+ * - \n for line breaks
26
+ * - {PLACEHOLDER} for dynamic content
27
+ * - [link text](url) for hyperlinks (when enableHyperlinks is true)
28
+ *
29
+ * @param text The text to parse
30
+ * @param baseStyle The base style to apply to all text runs
31
+ * @param options Additional options for text decoration
32
+ * @returns Array of TextRun and hyperlink objects with appropriate styling
33
+ */
34
+ export declare function parseTextWithDecorators(text: string, baseStyle?: TextStyle, options?: TextDecoratorOptions): (TextRun | ExternalHyperlink | InternalHyperlink)[];
35
+ //# sourceMappingURL=textParser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textParser.d.ts","sourceRoot":"","sources":["../../src/utils/textParser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AACrE,OAAO,EAEL,kBAAkB,EACnB,MAAM,wBAAwB,CAAC;AAGhC,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE;QACV,IAAI,CAAC,EACD,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,MAAM,GACN,SAAS,GACT,YAAY,GACZ,MAAM,GACN,MAAM,GACN,OAAO,GACP,aAAa,GACb,aAAa,GACb,UAAU,GACV,eAAe,GACf,cAAc,GACd,iBAAiB,GACjB,WAAW,GACX,YAAY,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AAED,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,EACZ,SAAS,GAAE,SAAc,EACzB,OAAO,GAAE,oBAAyB,GACjC,CAAC,OAAO,GAAG,iBAAiB,GAAG,iBAAiB,CAAC,EAAE,CAmGrD"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Normalize text to NFC so composed accented characters are preserved
3
+ * consistently across DOCX renderers (including LibreOffice).
4
+ */
5
+ export declare function normalizeUnicodeText(text: string | null | undefined): string;
6
+ //# sourceMappingURL=unicode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unicode.d.ts","sourceRoot":"","sources":["../../src/utils/unicode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAE5E"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Warnings Document Generator
3
+ * Utility to generate a document from generation warnings
4
+ */
5
+ import type { GenerationWarning } from '@json-to-office/shared-docx';
6
+ import type { ReportComponentDefinition } from '../types';
7
+ /**
8
+ * Generate a report document from warnings
9
+ * Returns null if there are no warnings
10
+ */
11
+ export declare function generateWarningsDocument(warnings: GenerationWarning[] | null): ReportComponentDefinition | null;
12
+ /**
13
+ * Format warnings as plain text
14
+ * Useful for logging or text output
15
+ */
16
+ export declare function formatWarningsText(warnings: GenerationWarning[] | null): string;
17
+ //# sourceMappingURL=warningsDocument.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"warningsDocument.d.ts","sourceRoot":"","sources":["../../src/utils/warningsDocument.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,KAAK,EAAuB,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAE/E;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,iBAAiB,EAAE,GAAG,IAAI,GACnC,yBAAyB,GAAG,IAAI,CA+ElC;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,iBAAiB,EAAE,GAAG,IAAI,GACnC,MAAM,CAoCR"}
@@ -0,0 +1,27 @@
1
+ import { ThemeConfig } from '../styles';
2
+ /**
3
+ * Compute available page width in twips (page width minus left/right margins)
4
+ */
5
+ export declare function getAvailableWidthTwips(theme?: ThemeConfig, themeName?: string): number;
6
+ /**
7
+ * Compute full page width in twips (ignores margins)
8
+ */
9
+ export declare function getPageWidthTwips(theme?: ThemeConfig, themeName?: string): number;
10
+ /**
11
+ * Compute available page height in twips (page height minus top/bottom margins)
12
+ */
13
+ export declare function getAvailableHeightTwips(theme?: ThemeConfig, themeName?: string): number;
14
+ /**
15
+ * Compute full page height in twips (ignores margins)
16
+ */
17
+ export declare function getPageHeightTwips(theme?: ThemeConfig, themeName?: string): number;
18
+ /**
19
+ * Parse a percentage string like "75%" into a fraction 0..1
20
+ */
21
+ export declare function parsePercentageStringToFraction(value: string): number | undefined;
22
+ /**
23
+ * Convert a numeric (points) or percentage string to twips using available width
24
+ */
25
+ export declare function relativeLengthToTwips(value: number | string, availableWidthTwips: number): number;
26
+ export declare const __widthUtils = true;
27
+ //# sourceMappingURL=widthUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widthUtils.d.ts","sourceRoot":"","sources":["../../src/utils/widthUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAIxC;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,CAAC,EAAE,WAAW,EACnB,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,CAMR;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,CAAC,EAAE,WAAW,EACnB,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,CAGR;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,CAAC,EAAE,WAAW,EACnB,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,CAMR;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,CAAC,EAAE,WAAW,EACnB,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,CAGR;AAED;;GAEG;AACH,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,MAAM,GACZ,MAAM,GAAG,SAAS,CAMpB;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,MAAM,GAAG,MAAM,EACtB,mBAAmB,EAAE,MAAM,GAC1B,MAAM,CAOR;AAED,eAAO,MAAM,YAAY,OAAO,CAAC"}
package/package.json ADDED
@@ -0,0 +1,88 @@
1
+ {
2
+ "name": "@json-to-office/core-docx",
3
+ "version": "0.1.0",
4
+ "description": "Core DOCX document generation engine",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js",
12
+ "default": "./dist/index.js"
13
+ },
14
+ "./*": {
15
+ "types": "./dist/*.d.ts",
16
+ "import": "./dist/*.js",
17
+ "default": "./dist/*.js"
18
+ }
19
+ },
20
+ "dependencies": {
21
+ "@sinclair/typebox": "0.34.38",
22
+ "adm-zip": "0.5.16",
23
+ "date-fns": "3.6.0",
24
+ "jszip": "3.10.1",
25
+ "probe-image-size": "7.2.3",
26
+ "@json-to-office/shared": "^0.1.0",
27
+ "@json-to-office/shared-docx": "^0.1.0"
28
+ },
29
+ "peerDependencies": {
30
+ "docx": "9.5.1",
31
+ "highcharts-export-server": "5.0.0"
32
+ },
33
+ "peerDependenciesMeta": {
34
+ "highcharts-export-server": {
35
+ "optional": true
36
+ }
37
+ },
38
+ "devDependencies": {
39
+ "@types/adm-zip": "0.5.7",
40
+ "@types/jszip": "3.4.1",
41
+ "@types/node": "20.11.0",
42
+ "@types/probe-image-size": "7.2.4",
43
+ "tsup": "8.5.0",
44
+ "typescript": "5.3.3"
45
+ },
46
+ "license": "MIT",
47
+ "author": "Paolo Barbato",
48
+ "repository": {
49
+ "type": "git",
50
+ "url": "https://github.com/Wiseair-srl/json-to-office.git",
51
+ "directory": "packages/core-docx"
52
+ },
53
+ "homepage": "https://github.com/Wiseair-srl/json-to-office/tree/main/packages/core-docx",
54
+ "bugs": {
55
+ "url": "https://github.com/Wiseair-srl/json-to-office/issues"
56
+ },
57
+ "publishConfig": {
58
+ "access": "public"
59
+ },
60
+ "files": [
61
+ "dist",
62
+ "LICENSE"
63
+ ],
64
+ "keywords": [
65
+ "json-to-office",
66
+ "typescript",
67
+ "docx",
68
+ "document",
69
+ "word"
70
+ ],
71
+ "engines": {
72
+ "node": ">=20.0.0"
73
+ },
74
+ "scripts": {
75
+ "build": "tsup && tsc --emitDeclarationOnly --declaration",
76
+ "build:js": "tsup",
77
+ "build:types": "tsc --emitDeclarationOnly --declaration",
78
+ "dev": "tsup --watch",
79
+ "clean": "rm -rf dist",
80
+ "lint": "eslint src/**/*.ts",
81
+ "lint:fix": "eslint src/**/*.ts --fix",
82
+ "format": "prettier --write src/**/*.ts",
83
+ "typecheck": "tsc --noEmit",
84
+ "test": "vitest run --passWithNoTests",
85
+ "test:watch": "vitest",
86
+ "test:coverage": "vitest run --coverage --passWithNoTests"
87
+ }
88
+ }