@eigenpal/docx-js-editor 0.0.16 → 0.0.19

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 (211) hide show
  1. package/dist/ClipboardManager-D6dkOFg6.d.ts +436 -0
  2. package/dist/ClipboardManager-EZ0C6Onq.d.cts +436 -0
  3. package/dist/{DocumentAgent-Ci6_T-XM.d.ts → DocumentAgent-B0EC8lPC.d.cts} +2 -2
  4. package/dist/{DocumentAgent-DEGFgYEN.d.cts → DocumentAgent-BcCDg7i2.d.ts} +2 -2
  5. package/dist/{FindReplaceDialog-UMXCBBST.js → FindReplaceDialog-AWQXKEUQ.js} +2 -1
  6. package/dist/FindReplaceDialog-AWQXKEUQ.js.map +1 -0
  7. package/dist/FindReplaceDialog-I4SZDSVP.cjs +2 -0
  8. package/dist/FindReplaceDialog-I4SZDSVP.cjs.map +1 -0
  9. package/dist/{FootnotePropertiesDialog-OBQXOBJE.cjs → FootnotePropertiesDialog-73VT2ZVZ.cjs} +2 -1
  10. package/dist/FootnotePropertiesDialog-73VT2ZVZ.cjs.map +1 -0
  11. package/dist/{FootnotePropertiesDialog-TYQGPWPX.js → FootnotePropertiesDialog-ZM3EF3EF.js} +2 -1
  12. package/dist/FootnotePropertiesDialog-ZM3EF3EF.js.map +1 -0
  13. package/dist/{HyperlinkDialog-UOERZIBM.js → HyperlinkDialog-BA25XUT5.js} +2 -1
  14. package/dist/HyperlinkDialog-BA25XUT5.js.map +1 -0
  15. package/dist/HyperlinkDialog-V63LPOT2.cjs +2 -0
  16. package/dist/HyperlinkDialog-V63LPOT2.cjs.map +1 -0
  17. package/dist/{ImagePositionDialog-52FDANUK.js → ImagePositionDialog-AIAMKPFK.js} +2 -1
  18. package/dist/ImagePositionDialog-AIAMKPFK.js.map +1 -0
  19. package/dist/{ImagePositionDialog-ZK5WFBRC.cjs → ImagePositionDialog-KMK7ROV2.cjs} +2 -1
  20. package/dist/ImagePositionDialog-KMK7ROV2.cjs.map +1 -0
  21. package/dist/{ImagePropertiesDialog-YPSLPSF6.js → ImagePropertiesDialog-ERFCUVCW.js} +2 -1
  22. package/dist/ImagePropertiesDialog-ERFCUVCW.js.map +1 -0
  23. package/dist/{ImagePropertiesDialog-LU44RDIY.cjs → ImagePropertiesDialog-USMMRK6X.cjs} +2 -1
  24. package/dist/ImagePropertiesDialog-USMMRK6X.cjs.map +1 -0
  25. package/dist/{TablePropertiesDialog-KMOYHPGF.cjs → TablePropertiesDialog-72CIUAZT.cjs} +2 -1
  26. package/dist/TablePropertiesDialog-72CIUAZT.cjs.map +1 -0
  27. package/dist/{TablePropertiesDialog-OUUJAA7D.js → TablePropertiesDialog-EMUEVYB3.js} +2 -1
  28. package/dist/TablePropertiesDialog-EMUEVYB3.js.map +1 -0
  29. package/dist/{agentApi-CbVUCZRu.d.cts → agentApi-BFVyKagE.d.cts} +143 -2
  30. package/dist/{agentApi-CbVUCZRu.d.ts → agentApi-BFVyKagE.d.ts} +143 -2
  31. package/dist/{chunk-OEOUMSWH.cjs → chunk-2CHPKB5A.cjs} +8 -7
  32. package/dist/chunk-2CHPKB5A.cjs.map +1 -0
  33. package/dist/{chunk-R5SKERM2.js → chunk-2QOEHCBX.js} +2 -1
  34. package/dist/chunk-2QOEHCBX.js.map +1 -0
  35. package/dist/chunk-4QT5LPBA.cjs +24 -0
  36. package/dist/chunk-4QT5LPBA.cjs.map +1 -0
  37. package/dist/chunk-5DYSI4O4.cjs +60 -0
  38. package/dist/chunk-5DYSI4O4.cjs.map +1 -0
  39. package/dist/{chunk-DYQUXFE5.cjs → chunk-5FJXHXFV.cjs} +2 -1
  40. package/dist/chunk-5FJXHXFV.cjs.map +1 -0
  41. package/dist/chunk-6FEWNF6B.js +4 -0
  42. package/dist/chunk-6FEWNF6B.js.map +1 -0
  43. package/dist/chunk-6LF5HZCV.js +10 -0
  44. package/dist/chunk-6LF5HZCV.js.map +1 -0
  45. package/dist/{chunk-EMKABJPH.js → chunk-7JSPKVOW.js} +2 -1
  46. package/dist/chunk-7JSPKVOW.js.map +1 -0
  47. package/dist/chunk-C33XDRDJ.cjs +28 -0
  48. package/dist/chunk-C33XDRDJ.cjs.map +1 -0
  49. package/dist/chunk-CV5WFE7K.js +24 -0
  50. package/dist/chunk-CV5WFE7K.js.map +1 -0
  51. package/dist/{chunk-WFYRA2TH.js → chunk-CXJRNISO.js} +2 -1
  52. package/dist/chunk-CXJRNISO.js.map +1 -0
  53. package/dist/{chunk-VTAS7VZ6.cjs → chunk-DJAEBZ33.cjs} +2 -1
  54. package/dist/chunk-DJAEBZ33.cjs.map +1 -0
  55. package/dist/chunk-DP6Q75ZD.js +28 -0
  56. package/dist/chunk-DP6Q75ZD.js.map +1 -0
  57. package/dist/chunk-FDANI5P4.cjs +2 -0
  58. package/dist/chunk-FDANI5P4.cjs.map +1 -0
  59. package/dist/chunk-FGVGZLBL.js +2 -0
  60. package/dist/chunk-FGVGZLBL.js.map +1 -0
  61. package/dist/{chunk-SF53KLDZ.cjs → chunk-GJ4GKSDU.cjs} +2 -1
  62. package/dist/chunk-GJ4GKSDU.cjs.map +1 -0
  63. package/dist/{chunk-FYAWM7MP.cjs → chunk-GWBTKVFD.cjs} +2 -1
  64. package/dist/chunk-GWBTKVFD.cjs.map +1 -0
  65. package/dist/{chunk-WFWLPKQA.js → chunk-JOYPFQW2.js} +2 -1
  66. package/dist/chunk-JOYPFQW2.js.map +1 -0
  67. package/dist/{chunk-ZDYHAYN6.js → chunk-L54YNLSE.js} +2 -1
  68. package/dist/chunk-L54YNLSE.js.map +1 -0
  69. package/dist/chunk-LPGMLJMO.js +259 -0
  70. package/dist/chunk-LPGMLJMO.js.map +1 -0
  71. package/dist/{chunk-CTYOM6BE.js → chunk-M2T6XKT5.js} +2 -1
  72. package/dist/chunk-M2T6XKT5.js.map +1 -0
  73. package/dist/chunk-OHG7ROFC.js +11 -0
  74. package/dist/chunk-OHG7ROFC.js.map +1 -0
  75. package/dist/chunk-PANKMCFX.cjs +4 -0
  76. package/dist/chunk-PANKMCFX.cjs.map +1 -0
  77. package/dist/{chunk-PJVI53AH.js → chunk-Q6HUGWO6.js} +2 -1
  78. package/dist/chunk-Q6HUGWO6.js.map +1 -0
  79. package/dist/{chunk-MLSHZVL7.js → chunk-QDV75OJ4.js} +8 -7
  80. package/dist/chunk-QDV75OJ4.js.map +1 -0
  81. package/dist/chunk-QEBO3EQP.cjs +2 -0
  82. package/dist/chunk-QEBO3EQP.cjs.map +1 -0
  83. package/dist/chunk-QVIZ775M.cjs +259 -0
  84. package/dist/chunk-QVIZ775M.cjs.map +1 -0
  85. package/dist/chunk-RMUMR42R.cjs +10 -0
  86. package/dist/chunk-RMUMR42R.cjs.map +1 -0
  87. package/dist/{chunk-XS2AQFMF.cjs → chunk-S26DZVRQ.cjs} +2 -1
  88. package/dist/chunk-S26DZVRQ.cjs.map +1 -0
  89. package/dist/{chunk-L34XFLQZ.cjs → chunk-T2HQYRA7.cjs} +2 -1
  90. package/dist/chunk-T2HQYRA7.cjs.map +1 -0
  91. package/dist/chunk-ULXNEG66.js +60 -0
  92. package/dist/chunk-ULXNEG66.js.map +1 -0
  93. package/dist/{chunk-PXC7ARQB.cjs → chunk-WD2HTKRR.cjs} +2 -1
  94. package/dist/chunk-WD2HTKRR.cjs.map +1 -0
  95. package/dist/chunk-XZNOV52K.cjs +11 -0
  96. package/dist/chunk-XZNOV52K.cjs.map +1 -0
  97. package/dist/chunk-Y6VCTLCJ.js +2 -0
  98. package/dist/chunk-Y6VCTLCJ.js.map +1 -0
  99. package/dist/{clipboard-Cx7cb3kX.d.cts → clipboard-CqE-UZ2d.d.cts} +1 -1
  100. package/dist/{clipboard-BOocwmAM.d.ts → clipboard-beGtyabO.d.ts} +1 -1
  101. package/dist/{colorResolver-KXbUgzWC.d.ts → colorResolver-B5YbO_a4.d.ts} +170 -170
  102. package/dist/{colorResolver-CIDiSPWd.d.cts → colorResolver-Cu46bSKr.d.cts} +170 -170
  103. package/dist/core-plugins-reexport.cjs +2 -0
  104. package/dist/core-plugins-reexport.cjs.map +1 -0
  105. package/dist/{core-plugins.d.cts → core-plugins-reexport.d.cts} +4 -4
  106. package/dist/{core-plugins.d.ts → core-plugins-reexport.d.ts} +4 -4
  107. package/dist/core-plugins-reexport.js +2 -0
  108. package/dist/core-plugins-reexport.js.map +1 -0
  109. package/dist/core-reexport.cjs +2 -0
  110. package/dist/core-reexport.cjs.map +1 -0
  111. package/dist/core-reexport.d.cts +309 -0
  112. package/dist/core-reexport.d.ts +309 -0
  113. package/dist/core-reexport.js +2 -0
  114. package/dist/core-reexport.js.map +1 -0
  115. package/dist/executor-K5RXUTTR.js +2 -0
  116. package/dist/executor-K5RXUTTR.js.map +1 -0
  117. package/dist/executor-XIPIU3H4.cjs +2 -0
  118. package/dist/executor-XIPIU3H4.cjs.map +1 -0
  119. package/dist/{insertOperations-CzB5b-Of.d.ts → fontLoader-CFKpg0Ri.d.ts} +86 -86
  120. package/dist/{insertOperations-DKVmCV32.d.cts → fontLoader-HZYfILUm.d.cts} +86 -86
  121. package/dist/headless-reexport.cjs +5 -0
  122. package/dist/headless-reexport.cjs.map +1 -0
  123. package/dist/{headless.d.cts → headless-reexport.d.cts} +7 -7
  124. package/dist/{headless.d.ts → headless-reexport.d.ts} +7 -7
  125. package/dist/{headless.js → headless-reexport.js} +3 -2
  126. package/dist/headless-reexport.js.map +1 -0
  127. package/dist/index.cjs +6 -5
  128. package/dist/index.cjs.map +1 -0
  129. package/dist/index.css +1 -0
  130. package/dist/index.css.map +1 -0
  131. package/dist/index.d.cts +15 -13
  132. package/dist/index.d.ts +15 -13
  133. package/dist/index.js +6 -5
  134. package/dist/index.js.map +1 -0
  135. package/dist/{mcp.cjs → mcp-reexport.cjs} +11 -10
  136. package/dist/mcp-reexport.cjs.map +1 -0
  137. package/dist/{mcp.d.cts → mcp-reexport.d.cts} +2 -2
  138. package/dist/{mcp.d.ts → mcp-reexport.d.ts} +2 -2
  139. package/dist/{mcp.js → mcp-reexport.js} +10 -9
  140. package/dist/mcp-reexport.js.map +1 -0
  141. package/dist/{processTemplate-RJN6452W.js → processTemplate-G37IM66O.js} +2 -1
  142. package/dist/processTemplate-G37IM66O.js.map +1 -0
  143. package/dist/processTemplate-RFBGVH7T.cjs +2 -0
  144. package/dist/processTemplate-RFBGVH7T.cjs.map +1 -0
  145. package/dist/{react-BZxD04XV.d.ts → react-BjOCdeTs.d.ts} +43 -366
  146. package/dist/{react-D8eAYckC.d.cts → react-UzAn4o7l.d.cts} +43 -366
  147. package/dist/react.cjs +2 -1
  148. package/dist/react.cjs.map +1 -0
  149. package/dist/react.css +1 -0
  150. package/dist/react.css.map +1 -0
  151. package/dist/react.d.cts +6 -5
  152. package/dist/react.d.ts +6 -5
  153. package/dist/react.js +2 -1
  154. package/dist/react.js.map +1 -0
  155. package/dist/{registry-D4tvj9f3.d.ts → registry-CV6nYWqP.d.ts} +1 -1
  156. package/dist/{registry-ngv6Bumt.d.cts → registry-DjacfR6Q.d.cts} +1 -1
  157. package/dist/selectionRects-6DU7HN7E.js +2 -0
  158. package/dist/selectionRects-6DU7HN7E.js.map +1 -0
  159. package/dist/selectionRects-YZSC24ZP.cjs +2 -0
  160. package/dist/selectionRects-YZSC24ZP.cjs.map +1 -0
  161. package/dist/styles.css +1 -1
  162. package/dist/{types-D96elyJF.d.cts → types-Bnp8rvJn.d.cts} +2 -2
  163. package/dist/{types-xMzSPT4i.d.ts → types-DwZ3xysp.d.ts} +2 -2
  164. package/dist/ui.cjs +2 -1
  165. package/dist/ui.cjs.map +1 -0
  166. package/dist/ui.d.cts +3 -3
  167. package/dist/ui.d.ts +3 -3
  168. package/dist/ui.js +2 -1
  169. package/dist/ui.js.map +1 -0
  170. package/dist/{variableDetector-DeM1N-_L.d.ts → variableDetector-BaDeXz7D.d.ts} +1 -1
  171. package/dist/{variableDetector-CPxKo9jP.d.cts → variableDetector-CMhJtM96.d.cts} +1 -1
  172. package/package.json +26 -79
  173. package/LICENSE +0 -21
  174. package/README.md +0 -171
  175. package/dist/FindReplaceDialog-46BE7Q2G.cjs +0 -1
  176. package/dist/HyperlinkDialog-22NH7ZLP.cjs +0 -1
  177. package/dist/chunk-24N3L4IL.cjs +0 -258
  178. package/dist/chunk-2ASOEN3V.js +0 -1
  179. package/dist/chunk-46OFHSPJ.cjs +0 -2
  180. package/dist/chunk-65OFYOHF.cjs +0 -58
  181. package/dist/chunk-6YFGCUHU.js +0 -4
  182. package/dist/chunk-ESI4BSBF.js +0 -1
  183. package/dist/chunk-GLFFXY2X.js +0 -258
  184. package/dist/chunk-ITWEFKGQ.cjs +0 -1
  185. package/dist/chunk-JKN7TNPA.js +0 -12
  186. package/dist/chunk-KESNGXGO.js +0 -1
  187. package/dist/chunk-NO7WUK5E.cjs +0 -12
  188. package/dist/chunk-NT2REEAA.cjs +0 -1
  189. package/dist/chunk-O7QVCJN6.cjs +0 -4
  190. package/dist/chunk-OW5H5DNE.cjs +0 -1
  191. package/dist/chunk-OWMXCVKB.js +0 -1
  192. package/dist/chunk-RM3ITJ2H.cjs +0 -10
  193. package/dist/chunk-TOI5W3HK.js +0 -8
  194. package/dist/chunk-UAVOWAIF.cjs +0 -8
  195. package/dist/chunk-ULNHBTYA.js +0 -2
  196. package/dist/chunk-UXXV4GT6.js +0 -10
  197. package/dist/chunk-VOWKSURW.cjs +0 -1
  198. package/dist/chunk-YMXKVLTU.js +0 -58
  199. package/dist/core-plugins.cjs +0 -1
  200. package/dist/core-plugins.js +0 -1
  201. package/dist/core.cjs +0 -1
  202. package/dist/core.d.cts +0 -23
  203. package/dist/core.d.ts +0 -23
  204. package/dist/core.js +0 -1
  205. package/dist/executor-ITYZTNSH.cjs +0 -1
  206. package/dist/executor-TC7CLATE.js +0 -1
  207. package/dist/headless.cjs +0 -4
  208. package/dist/mcp-cli.js +0 -136
  209. package/dist/processTemplate-525HZL4S.cjs +0 -1
  210. package/dist/selectionRects-PQEUEW35.cjs +0 -1
  211. package/dist/selectionRects-QAG5RSHD.js +0 -1
@@ -1,172 +1,5 @@
1
- import { h as Document, b as AgentCommand, c as AgentContext, R as Range, C as SelectionContext, X as TextFormatting, i as DocumentBody, S as SectionProperties, ae as ColorValue, Y as Theme, af as ThemeColorSlot } from './agentApi-CbVUCZRu.js';
2
- import { a as DocxInput } from './DocumentAgent-Ci6_T-XM.js';
3
-
4
- /**
5
- * Command Executor
6
- *
7
- * Executes agent commands on a document immutably:
8
- * - Handles all command types from AgentCommand
9
- * - Preserves surrounding formatting
10
- * - Returns new document (immutable updates)
11
- */
12
-
13
- /**
14
- * Execute an agent command on a document
15
- * Returns a new document with the command applied (immutable)
16
- *
17
- * Dispatch order:
18
- * 1. Try plugin handlers first (allows plugins to override built-in commands)
19
- * 2. Fall back to built-in handlers
20
- *
21
- * @param doc - The document to modify
22
- * @param command - The command to execute
23
- * @returns New document with command applied
24
- */
25
- declare function executeCommand(doc: Document, command: AgentCommand): Document;
26
- /**
27
- * Execute multiple commands in sequence
28
- *
29
- * @param doc - The document to modify
30
- * @param commands - Commands to execute in order
31
- * @returns New document with all commands applied
32
- */
33
- declare function executeCommands(doc: Document, commands: AgentCommand[]): Document;
34
-
35
- /**
36
- * Agent Context Builder
37
- *
38
- * Generates context objects for AI/LLM consumption from DOCX documents.
39
- * The context provides a structured summary of the document that can be
40
- * used by AI agents to understand the document structure and content.
41
- *
42
- * All outputs are JSON serializable for easy transmission to AI backends.
43
- */
44
-
45
- /**
46
- * Options for building agent context
47
- */
48
- interface AgentContextOptions {
49
- /** Maximum characters per paragraph in outline (default: 100) */
50
- outlineMaxChars?: number;
51
- /** Maximum paragraphs to include in outline (default: 50) */
52
- maxOutlineParagraphs?: number;
53
- /** Include table content in context (default: false) */
54
- includeTableContent?: boolean;
55
- /** Include detailed formatting info (default: false) */
56
- includeFormatting?: boolean;
57
- }
58
- /**
59
- * Options for building selection context
60
- */
61
- interface SelectionContextOptions$1 {
62
- /** Characters of context before/after selection (default: 200) */
63
- contextChars?: number;
64
- /** Include suggested actions (default: true) */
65
- includeSuggestions?: boolean;
66
- }
67
- /**
68
- * Build agent context from a document
69
- *
70
- * @param doc - The parsed document
71
- * @param options - Context building options
72
- * @returns AgentContext object (JSON serializable)
73
- */
74
- declare function getAgentContext(doc: Document, options?: AgentContextOptions): AgentContext;
75
- /**
76
- * Build selection context for AI operations
77
- *
78
- * @param doc - The parsed document
79
- * @param range - The selected range
80
- * @param options - Selection context options
81
- * @returns SelectionContext object (JSON serializable)
82
- */
83
- declare function buildSelectionContext$1(doc: Document, range: Range, options?: SelectionContextOptions$1): SelectionContext;
84
- /**
85
- * Get a simple document summary for quick context
86
- *
87
- * @param doc - The parsed document
88
- * @returns Summary string
89
- */
90
- declare function getDocumentSummary(doc: Document): string;
91
-
92
- /**
93
- * Selection Context Builder
94
- *
95
- * Builds rich context objects from document selections for AI operations.
96
- * Includes selected text, formatting, surrounding context, and suggested actions.
97
- */
98
-
99
- /**
100
- * Options for building selection context
101
- */
102
- interface SelectionContextOptions {
103
- /** Characters of context before selection (default: 200) */
104
- contextCharsBefore?: number;
105
- /** Characters of context after selection (default: 200) */
106
- contextCharsAfter?: number;
107
- /** Include suggested actions (default: true) */
108
- includeSuggestions?: boolean;
109
- /** Include document summary (default: true) */
110
- includeDocumentSummary?: boolean;
111
- /** Maximum suggested actions (default: 8) */
112
- maxSuggestions?: number;
113
- }
114
- /**
115
- * Extended selection context with additional details
116
- */
117
- interface ExtendedSelectionContext extends SelectionContext {
118
- /** Document summary for additional context */
119
- documentSummary?: string;
120
- /** Selection word count */
121
- wordCount?: number;
122
- /** Selection character count */
123
- characterCount?: number;
124
- /** Is selection multi-paragraph */
125
- isMultiParagraph?: boolean;
126
- /** Selected paragraph indices */
127
- paragraphIndices?: number[];
128
- /** Language detection hint */
129
- detectedLanguage?: string;
130
- /** Content type hints */
131
- contentType?: 'prose' | 'list' | 'heading' | 'table' | 'mixed';
132
- }
133
- /**
134
- * Selection formatting summary
135
- */
136
- interface FormattingSummary {
137
- /** Predominant formatting */
138
- predominant: Partial<TextFormatting>;
139
- /** Is formatting consistent across selection */
140
- isConsistent: boolean;
141
- /** All formatting found */
142
- allFormatting: Partial<TextFormatting>[];
143
- }
144
- /**
145
- * Build selection context for AI operations
146
- *
147
- * @param doc - The parsed document
148
- * @param range - The selected range
149
- * @param options - Selection context options
150
- * @returns SelectionContext object
151
- */
152
- declare function buildSelectionContext(doc: Document, range: Range, options?: SelectionContextOptions): SelectionContext;
153
- /**
154
- * Build extended selection context with additional details
155
- *
156
- * @param doc - The parsed document
157
- * @param range - The selected range
158
- * @param options - Selection context options
159
- * @returns ExtendedSelectionContext object
160
- */
161
- declare function buildExtendedSelectionContext(doc: Document, range: Range, options?: SelectionContextOptions): ExtendedSelectionContext;
162
- /**
163
- * Get formatting summary for a selection
164
- *
165
- * @param doc - The parsed document
166
- * @param range - The selected range
167
- * @returns FormattingSummary object
168
- */
169
- declare function getSelectionFormattingSummary(doc: Document, range: Range): FormattingSummary;
1
+ import { D as Document, d as DocumentBody, C as SectionProperties, A as AgentCommand, h as AgentContext, R as Range, G as SelectionContext, T as TextFormatting, ae as ColorValue, X as Theme, af as ThemeColorSlot } from './agentApi-BFVyKagE.js';
2
+ import { f as DocxInput } from './DocumentAgent-BcCDg7i2.js';
170
3
 
171
4
  /**
172
5
  * Main Parser Orchestrator - Unified parseDocx function
@@ -438,6 +271,173 @@ declare function createEmptyDocument(options?: CreateEmptyDocumentOptions): Docu
438
271
  */
439
272
  declare function createDocumentWithText(text: string, options?: Omit<CreateEmptyDocumentOptions, 'initialText'>): Document;
440
273
 
274
+ /**
275
+ * Command Executor
276
+ *
277
+ * Executes agent commands on a document immutably:
278
+ * - Handles all command types from AgentCommand
279
+ * - Preserves surrounding formatting
280
+ * - Returns new document (immutable updates)
281
+ */
282
+
283
+ /**
284
+ * Execute an agent command on a document
285
+ * Returns a new document with the command applied (immutable)
286
+ *
287
+ * Dispatch order:
288
+ * 1. Try plugin handlers first (allows plugins to override built-in commands)
289
+ * 2. Fall back to built-in handlers
290
+ *
291
+ * @param doc - The document to modify
292
+ * @param command - The command to execute
293
+ * @returns New document with command applied
294
+ */
295
+ declare function executeCommand(doc: Document, command: AgentCommand): Document;
296
+ /**
297
+ * Execute multiple commands in sequence
298
+ *
299
+ * @param doc - The document to modify
300
+ * @param commands - Commands to execute in order
301
+ * @returns New document with all commands applied
302
+ */
303
+ declare function executeCommands(doc: Document, commands: AgentCommand[]): Document;
304
+
305
+ /**
306
+ * Agent Context Builder
307
+ *
308
+ * Generates context objects for AI/LLM consumption from DOCX documents.
309
+ * The context provides a structured summary of the document that can be
310
+ * used by AI agents to understand the document structure and content.
311
+ *
312
+ * All outputs are JSON serializable for easy transmission to AI backends.
313
+ */
314
+
315
+ /**
316
+ * Options for building agent context
317
+ */
318
+ interface AgentContextOptions {
319
+ /** Maximum characters per paragraph in outline (default: 100) */
320
+ outlineMaxChars?: number;
321
+ /** Maximum paragraphs to include in outline (default: 50) */
322
+ maxOutlineParagraphs?: number;
323
+ /** Include table content in context (default: false) */
324
+ includeTableContent?: boolean;
325
+ /** Include detailed formatting info (default: false) */
326
+ includeFormatting?: boolean;
327
+ }
328
+ /**
329
+ * Options for building selection context
330
+ */
331
+ interface SelectionContextOptions$1 {
332
+ /** Characters of context before/after selection (default: 200) */
333
+ contextChars?: number;
334
+ /** Include suggested actions (default: true) */
335
+ includeSuggestions?: boolean;
336
+ }
337
+ /**
338
+ * Build agent context from a document
339
+ *
340
+ * @param doc - The parsed document
341
+ * @param options - Context building options
342
+ * @returns AgentContext object (JSON serializable)
343
+ */
344
+ declare function getAgentContext(doc: Document, options?: AgentContextOptions): AgentContext;
345
+ /**
346
+ * Build selection context for AI operations
347
+ *
348
+ * @param doc - The parsed document
349
+ * @param range - The selected range
350
+ * @param options - Selection context options
351
+ * @returns SelectionContext object (JSON serializable)
352
+ */
353
+ declare function buildSelectionContext$1(doc: Document, range: Range, options?: SelectionContextOptions$1): SelectionContext;
354
+ /**
355
+ * Get a simple document summary for quick context
356
+ *
357
+ * @param doc - The parsed document
358
+ * @returns Summary string
359
+ */
360
+ declare function getDocumentSummary(doc: Document): string;
361
+
362
+ /**
363
+ * Selection Context Builder
364
+ *
365
+ * Builds rich context objects from document selections for AI operations.
366
+ * Includes selected text, formatting, surrounding context, and suggested actions.
367
+ */
368
+
369
+ /**
370
+ * Options for building selection context
371
+ */
372
+ interface SelectionContextOptions {
373
+ /** Characters of context before selection (default: 200) */
374
+ contextCharsBefore?: number;
375
+ /** Characters of context after selection (default: 200) */
376
+ contextCharsAfter?: number;
377
+ /** Include suggested actions (default: true) */
378
+ includeSuggestions?: boolean;
379
+ /** Include document summary (default: true) */
380
+ includeDocumentSummary?: boolean;
381
+ /** Maximum suggested actions (default: 8) */
382
+ maxSuggestions?: number;
383
+ }
384
+ /**
385
+ * Extended selection context with additional details
386
+ */
387
+ interface ExtendedSelectionContext extends SelectionContext {
388
+ /** Document summary for additional context */
389
+ documentSummary?: string;
390
+ /** Selection word count */
391
+ wordCount?: number;
392
+ /** Selection character count */
393
+ characterCount?: number;
394
+ /** Is selection multi-paragraph */
395
+ isMultiParagraph?: boolean;
396
+ /** Selected paragraph indices */
397
+ paragraphIndices?: number[];
398
+ /** Language detection hint */
399
+ detectedLanguage?: string;
400
+ /** Content type hints */
401
+ contentType?: 'prose' | 'list' | 'heading' | 'table' | 'mixed';
402
+ }
403
+ /**
404
+ * Selection formatting summary
405
+ */
406
+ interface FormattingSummary {
407
+ /** Predominant formatting */
408
+ predominant: Partial<TextFormatting>;
409
+ /** Is formatting consistent across selection */
410
+ isConsistent: boolean;
411
+ /** All formatting found */
412
+ allFormatting: Partial<TextFormatting>[];
413
+ }
414
+ /**
415
+ * Build selection context for AI operations
416
+ *
417
+ * @param doc - The parsed document
418
+ * @param range - The selected range
419
+ * @param options - Selection context options
420
+ * @returns SelectionContext object
421
+ */
422
+ declare function buildSelectionContext(doc: Document, range: Range, options?: SelectionContextOptions): SelectionContext;
423
+ /**
424
+ * Build extended selection context with additional details
425
+ *
426
+ * @param doc - The parsed document
427
+ * @param range - The selected range
428
+ * @param options - Selection context options
429
+ * @returns ExtendedSelectionContext object
430
+ */
431
+ declare function buildExtendedSelectionContext(doc: Document, range: Range, options?: SelectionContextOptions): ExtendedSelectionContext;
432
+ /**
433
+ * Get formatting summary for a selection
434
+ *
435
+ * @param doc - The parsed document
436
+ * @param range - The selected range
437
+ * @returns FormattingSummary object
438
+ */
439
+ declare function getSelectionFormattingSummary(doc: Document, range: Range): FormattingSummary;
440
+
441
441
  /**
442
442
  * Convert twips to pixels (at 96 DPI)
443
443
  *
@@ -615,4 +615,4 @@ declare function blendColors(color1: ColorValue | undefined | null, color2: Colo
615
615
  */
616
616
  declare function colorsEqual(color1: ColorValue | undefined | null, color2: ColorValue | undefined | null, theme: Theme | null | undefined): boolean;
617
617
 
618
- export { processTemplateAdvanced as $, type AgentContextOptions as A, pixelsToTwips as B, type CreateEmptyDocumentOptions as C, pointsToPixels as D, type ExtendedSelectionContext as E, processTemplate as F, processTemplateAsBlob as G, processTemplateDetailed as H, resolveColor as I, resolveHighlightColor as J, resolveShadingColor as K, serializeDocumentBody as L, serializeDocument as M, serializeSectionProperties as N, twipsToEmu as O, type ProcessTemplateOptions as P, twipsToPixels as Q, validateTemplate as R, type SelectionContextOptions as S, type SelectionContextOptions$1 as T, type FormattingSummary as U, type TemplateError as V, buildSelectionContext$1 as W, createTemplateProcessor as X, getMissingVariables as Y, getSelectionFormattingSummary as Z, previewTemplate as _, type ProcessTemplateResult as a, blendColors as b, buildExtendedSelectionContext as c, buildSelectionContext as d, colorsEqual as e, createDocumentWithText as f, createEmptyDocument as g, createRgbColor as h, createThemeColor as i, darkenColor as j, emuToPixels as k, emuToTwips as l, executeCommand as m, executeCommands as n, formatPx as o, getAgentContext as p, getContrastingColor as q, getDocumentSummary as r, getTemplateTags as s, halfPointsToPixels as t, isBlack as u, isWhite as v, lightenColor as w, parseColorString as x, parseDocx as y, pixelsToEmu as z };
618
+ export { validateTemplate as $, type AgentContextOptions as A, isWhite as B, type CreateEmptyDocumentOptions as C, lightenColor as D, type ExtendedSelectionContext as E, type FormattingSummary as F, parseColorString as G, parseDocx as H, pixelsToEmu as I, pixelsToTwips as J, pointsToPixels as K, previewTemplate as L, processTemplate as M, processTemplateAdvanced as N, processTemplateAsBlob as O, type ProcessTemplateOptions as P, processTemplateDetailed as Q, resolveColor as R, type SelectionContextOptions$1 as S, type TemplateError as T, resolveHighlightColor as U, resolveShadingColor as V, serializeDocumentBody as W, serializeDocument as X, serializeSectionProperties as Y, twipsToEmu as Z, twipsToPixels as _, type ProcessTemplateResult as a, type SelectionContextOptions as b, blendColors as c, buildExtendedSelectionContext as d, buildSelectionContext as e, buildSelectionContext$1 as f, colorsEqual as g, createDocumentWithText as h, createEmptyDocument as i, createRgbColor as j, createTemplateProcessor as k, createThemeColor as l, darkenColor as m, emuToPixels as n, emuToTwips as o, executeCommand as p, executeCommands as q, formatPx as r, getAgentContext as s, getContrastingColor as t, getDocumentSummary as u, getMissingVariables as v, getSelectionFormattingSummary as w, getTemplateTags as x, halfPointsToPixels as y, isBlack as z };