@eigenpal/docx-js-editor 0.0.12 → 0.0.13

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 (99) hide show
  1. package/dist/DocumentAgent-Ci6_T-XM.d.ts +412 -0
  2. package/dist/DocumentAgent-DEGFgYEN.d.cts +412 -0
  3. package/dist/FindReplaceDialog-BAACAU67.cjs +1 -0
  4. package/dist/FindReplaceDialog-RWYDRWHF.js +1 -0
  5. package/dist/FootnotePropertiesDialog-BC6JIPDA.cjs +1 -0
  6. package/dist/FootnotePropertiesDialog-CWQF5EBK.js +1 -0
  7. package/dist/HyperlinkDialog-EG2BSLPD.cjs +1 -0
  8. package/dist/HyperlinkDialog-YAVK64F4.js +1 -0
  9. package/dist/ImagePositionDialog-IGYS5KMK.cjs +1 -0
  10. package/dist/ImagePositionDialog-S6SMH7XH.js +1 -0
  11. package/dist/ImagePropertiesDialog-UO5QUIBS.js +1 -0
  12. package/dist/ImagePropertiesDialog-VGV4E4SN.cjs +1 -0
  13. package/dist/TablePropertiesDialog-VBOU4DID.js +1 -0
  14. package/dist/TablePropertiesDialog-WRM47JI6.cjs +1 -0
  15. package/dist/{types-BALm1KBi.d.cts → agentApi-CbVUCZRu.d.cts} +1 -308
  16. package/dist/{types-BALm1KBi.d.ts → agentApi-CbVUCZRu.d.ts} +1 -308
  17. package/dist/chunk-2ASOEN3V.js +1 -0
  18. package/dist/chunk-6MBDPZVD.js +111 -0
  19. package/dist/chunk-6YLNNCRZ.cjs +10 -0
  20. package/dist/chunk-BVQ2QRHA.cjs +4 -0
  21. package/dist/chunk-COP5BIBZ.js +10 -0
  22. package/dist/chunk-CZ7W7MCM.cjs +2 -0
  23. package/dist/chunk-E6XDMUAM.js +4 -0
  24. package/dist/chunk-EMKABJPH.js +1 -0
  25. package/dist/{chunk-GIZ5CTBD.cjs → chunk-EPCZ24TY.cjs} +5 -5
  26. package/dist/chunk-ESI4BSBF.js +1 -0
  27. package/dist/chunk-FLECKDK4.cjs +58 -0
  28. package/dist/chunk-ITWEFKGQ.cjs +1 -0
  29. package/dist/chunk-KESNGXGO.js +1 -0
  30. package/dist/chunk-KVAT5SVD.js +2 -0
  31. package/dist/chunk-L34XFLQZ.cjs +1 -0
  32. package/dist/chunk-M7F2CUUD.js +2 -0
  33. package/dist/chunk-MDPDH7KS.js +58 -0
  34. package/dist/chunk-MTX3EEBJ.js +258 -0
  35. package/dist/chunk-NT2REEAA.cjs +1 -0
  36. package/dist/{chunk-P332HWDE.js → chunk-OTG4NABM.js} +5 -5
  37. package/dist/chunk-OW5H5DNE.cjs +1 -0
  38. package/dist/chunk-PJVI53AH.js +2 -0
  39. package/dist/chunk-PNMZPPPI.cjs +2 -0
  40. package/dist/chunk-SF53KLDZ.cjs +1 -0
  41. package/dist/chunk-TOI5W3HK.js +8 -0
  42. package/dist/chunk-UAVOWAIF.cjs +8 -0
  43. package/dist/chunk-VN7XH644.cjs +258 -0
  44. package/dist/chunk-W4DUKACP.cjs +111 -0
  45. package/dist/chunk-XS2AQFMF.cjs +2 -0
  46. package/dist/chunk-ZDYHAYN6.js +1 -0
  47. package/dist/clipboard-BOocwmAM.d.ts +539 -0
  48. package/dist/clipboard-Cx7cb3kX.d.cts +539 -0
  49. package/dist/{colorResolver-BNj-uZ58.d.ts → colorResolver-CIDiSPWd.d.cts} +3 -411
  50. package/dist/{colorResolver-DiMquGWR.d.cts → colorResolver-KXbUgzWC.d.ts} +3 -411
  51. package/dist/core-plugins.cjs +1 -1
  52. package/dist/core-plugins.d.cts +4 -3
  53. package/dist/core-plugins.d.ts +4 -3
  54. package/dist/core-plugins.js +1 -1
  55. package/dist/core.cjs +1 -0
  56. package/dist/core.d.cts +23 -0
  57. package/dist/core.d.ts +23 -0
  58. package/dist/core.js +1 -0
  59. package/dist/headless.cjs +2 -2
  60. package/dist/headless.d.cts +8 -175
  61. package/dist/headless.d.ts +8 -175
  62. package/dist/headless.js +1 -1
  63. package/dist/index.cjs +9 -378
  64. package/dist/index.d.cts +17 -4161
  65. package/dist/index.d.ts +17 -4161
  66. package/dist/index.js +9 -378
  67. package/dist/insertOperations-CzB5b-Of.d.ts +176 -0
  68. package/dist/insertOperations-DKVmCV32.d.cts +176 -0
  69. package/dist/mcp-cli.js +21 -21
  70. package/dist/mcp.cjs +10 -10
  71. package/dist/mcp.d.cts +2 -1
  72. package/dist/mcp.d.ts +2 -1
  73. package/dist/mcp.js +9 -9
  74. package/dist/processTemplate-BHBTDAIC.js +1 -0
  75. package/dist/processTemplate-QOEAXCKA.cjs +1 -0
  76. package/dist/react-Be1YOl4z.d.ts +1356 -0
  77. package/dist/react-DPuSVbgY.d.cts +1356 -0
  78. package/dist/react.cjs +1 -0
  79. package/dist/react.css +1 -0
  80. package/dist/react.d.cts +9 -0
  81. package/dist/react.d.ts +9 -0
  82. package/dist/react.js +1 -0
  83. package/dist/{registry-CzqAPdui.d.ts → registry-D4tvj9f3.d.ts} +1 -1
  84. package/dist/{registry-BUTMLqSj.d.cts → registry-ngv6Bumt.d.cts} +1 -1
  85. package/dist/types-D96elyJF.d.cts +310 -0
  86. package/dist/types-xMzSPT4i.d.ts +310 -0
  87. package/dist/ui.cjs +1 -0
  88. package/dist/ui.d.cts +2103 -0
  89. package/dist/ui.d.ts +2103 -0
  90. package/dist/ui.js +1 -0
  91. package/dist/variableDetector-CPxKo9jP.d.cts +173 -0
  92. package/dist/variableDetector-DeM1N-_L.d.ts +173 -0
  93. package/package.json +85 -10
  94. package/dist/chunk-56AGRHVO.cjs +0 -58
  95. package/dist/chunk-E23CAQXT.js +0 -9
  96. package/dist/chunk-HIBC7HTU.cjs +0 -9
  97. package/dist/chunk-ICEPOA7G.js +0 -58
  98. package/dist/chunk-IZGUXSCC.js +0 -10
  99. package/dist/chunk-XF3IPO7C.cjs +0 -10
@@ -1,7 +1,10 @@
1
- export { A as AgentContextOptions, S as ContextSelectionOptions, C as CreateEmptyDocumentOptions, D as DocumentAgent, E as ExtendedSelectionContext, F as FormattedTextSegment, a as FormattingSummary, I as InsertHyperlinkOptions, b as InsertImageOptions, c as InsertTableOptions, d as InsertTextOptions, P as ProcessTemplateOptions, e as ProcessTemplateResult, f as SelectionContextOptions, T as TemplateError, g as blendColors, h as buildExtendedSelectionContext, i as buildSelectionContext, j as buildSelectionContextFromContext, k as colorsEqual, l as createAgent, m as createAgentFromDocument, n as createDocumentWithText, o as createEmptyDocument, p as createRgbColor, q as createTemplateProcessor, r as createThemeColor, s as darkenColor, t as emuToPixels, u as emuToTwips, v as executeCommand, w as executeCommands, x as formatPx, y as getAgentContext, z as getContrastingColor, B as getDocumentSummary, G as getMissingVariables, H as getSelectionFormattingSummary, J as getTemplateTags, K as halfPointsToPixels, L as isBlack, M as isWhite, N as lightenColor, O as parseColorString, Q as parseDocx, R as pixelsToEmu, U as pixelsToTwips, V as pointsToPixels, W as previewTemplate, X as processTemplate, Y as processTemplateAdvanced, Z as processTemplateAsBlob, _ as processTemplateDetailed, $ as resolveColor, a0 as resolveHighlightColor, a1 as resolveShadingColor, a2 as serializeDocumentBody, a3 as serializeDocx, a4 as serializeSectionProperties, a5 as twipsToEmu, a6 as twipsToPixels, a7 as validateTemplate } from './colorResolver-DiMquGWR.cjs';
2
- import { D as DocumentBody, e as Paragraph, T as TextFormatting, H as Hyperlink, R as Run, f as Table, g as Position, h as Document } from './types-BALm1KBi.cjs';
3
- export { A as AIAction, i as AIActionRequest, j as AgentCommand, k as AgentContext, l as AgentResponse, m as ApplyStyleCommand, n as ApplyVariablesCommand, B as BlockContent, b as CommandHandler, o as CommandResult, C as CorePlugin, p as DEFAULT_AI_ACTIONS, q as DeleteTextCommand, r as DocxPackage, E as Endnote, F as Footnote, s as FormatParagraphCommand, t as FormatTextCommand, I as Image, u as InsertHyperlinkCommand, v as InsertImageCommand, w as InsertTableCommand, x as InsertTextCommand, J as JsonSchema, L as ListLevel, y as LoadedDocument, d as McpSession, z as McpToolAnnotations, G as McpToolContent, K as McpToolContext, M as McpToolDefinition, N as McpToolHandler, O as McpToolResult, Q as NumberingDefinitions, S as ParagraphContext, U as ParagraphFormatting, V as ParagraphOutline, C as Plugin, W as PluginCommand, b as PluginCommandHandler, X as PluginEvent, c as PluginEventListener, P as PluginOptions, a as PluginRegistrationResult, Y as Range, Z as Relationship, _ as ReplaceTextCommand, $ as RunContent, a0 as SectionInfo, a1 as SectionProperties, a2 as SelectionContext, a3 as SetVariableCommand, a4 as Style, a5 as StyleDefinitions, a6 as StyleInfo, a7 as SuggestedAction, a8 as TableCell, a9 as TableRow, aa as TextContent, ab as Theme, M as ToolDefinition, N as ToolHandler, O as ToolResult, ac as ZodSchemaLike, ad as comparePositions, ae as createCollapsedRange, af as createCommand, ag as createRange, ah as getActionDescription, ai as getActionLabel, aj as isPositionInRange, ak as isZodSchema } from './types-BALm1KBi.cjs';
4
- export { P as PluginRegistry, c as createPluginRegistrar, p as pluginRegistry, r as registerPlugins } from './registry-BUTMLqSj.cjs';
1
+ export { D as DocumentAgent, F as FormattedTextSegment, I as InsertHyperlinkOptions, b as InsertImageOptions, c as InsertTableOptions, d as InsertTextOptions, e as createAgent, f as createAgentFromDocument } from './DocumentAgent-DEGFgYEN.cjs';
2
+ export { A as AgentContextOptions, T as ContextSelectionOptions, C as CreateEmptyDocumentOptions, E as ExtendedSelectionContext, U as FormattingSummary, P as ProcessTemplateOptions, a as ProcessTemplateResult, S as SelectionContextOptions, V as TemplateError, b as blendColors, c as buildExtendedSelectionContext, d as buildSelectionContext, W as buildSelectionContextFromContext, e as colorsEqual, f as createDocumentWithText, g as createEmptyDocument, h as createRgbColor, X as createTemplateProcessor, i as createThemeColor, j as darkenColor, k as emuToPixels, l as emuToTwips, m as executeCommand, n as executeCommands, o as formatPx, p as getAgentContext, q as getContrastingColor, r as getDocumentSummary, Y as getMissingVariables, Z as getSelectionFormattingSummary, s as getTemplateTags, t as halfPointsToPixels, u as isBlack, v as isWhite, w as lightenColor, x as parseColorString, y as parseDocx, z as pixelsToEmu, B as pixelsToTwips, D as pointsToPixels, _ as previewTemplate, F as processTemplate, $ as processTemplateAdvanced, G as processTemplateAsBlob, H as processTemplateDetailed, I as resolveColor, J as resolveHighlightColor, K as resolveShadingColor, L as serializeDocumentBody, M as serializeDocx, N as serializeSectionProperties, O as twipsToEmu, Q as twipsToPixels, R as validateTemplate } from './colorResolver-CIDiSPWd.cjs';
3
+ import { i as DocumentBody, P as Paragraph, X as TextFormatting, o as Hyperlink, y as Run, T as Table, v as Position } from './agentApi-CbVUCZRu.cjs';
4
+ export { A as AIAction, a as AIActionRequest, b as AgentCommand, c as AgentContext, d as AgentResponse, e as ApplyStyleCommand, a0 as ApplyVariablesCommand, B as BlockContent, a1 as DEFAULT_AI_ACTIONS, D as DeleteTextCommand, h as Document, j as DocxPackage, E as Endnote, l as Footnote, a2 as FormatParagraphCommand, m as FormatTextCommand, I as Image, p as InsertHyperlinkCommand, q as InsertImageCommand, r as InsertTableCommand, s as InsertTextCommand, L as ListLevel, N as NumberingDefinitions, t as ParagraphContext, u as ParagraphFormatting, a3 as ParagraphOutline, R as Range, w as Relationship, x as ReplaceTextCommand, z as RunContent, a4 as SectionInfo, S as SectionProperties, C as SelectionContext, G as SetVariableCommand, K as Style, M as StyleDefinitions, a5 as StyleInfo, O as SuggestedAction, Q as TableCell, U as TableRow, W as TextContent, Y as Theme, a6 as comparePositions, a7 as createCollapsedRange, a8 as createCommand, a9 as createRange, aa as getActionDescription, ab as getActionLabel, ac as isPositionInRange } from './agentApi-CbVUCZRu.cjs';
5
+ export { V as VariableDetectionResult, a as VariableOccurrence, c as createDocx, d as detectVariables, b as detectVariablesDetailed, e as detectVariablesInBody, f as detectVariablesInParagraph, g as documentHasVariables, h as extractVariablesFromText, i as formatVariable, j as hasTemplateVariables, k as isValidVariableName, p as parseVariable, r as removeVariables, l as repackDocx, m as replaceVariables, s as sanitizeVariableName } from './variableDetector-CPxKo9jP.cjs';
6
+ export { e as CommandHandler, g as CommandResult, C as CorePlugin, J as JsonSchema, L as LoadedDocument, M as McpSession, h as McpToolAnnotations, i as McpToolContent, j as McpToolContext, a as McpToolDefinition, b as McpToolHandler, c as McpToolResult, C as Plugin, k as PluginCommand, e as PluginCommandHandler, l as PluginEvent, f as PluginEventListener, P as PluginOptions, d as PluginRegistrationResult, a as ToolDefinition, b as ToolHandler, c as ToolResult, Z as ZodSchemaLike, m as isZodSchema } from './types-D96elyJF.cjs';
7
+ export { P as PluginRegistry, c as createPluginRegistrar, p as pluginRegistry, r as registerPlugins } from './registry-ngv6Bumt.cjs';
5
8
 
6
9
  /**
7
10
  * Shared Text Utilities for Agent Module
@@ -149,176 +152,6 @@ declare function getParagraphAtIndex(body: DocumentBody, index: number): Paragra
149
152
  */
150
153
  declare function getBlockIndexForParagraph(body: DocumentBody, paragraphIndex: number): number;
151
154
 
152
- /**
153
- * DOCX Repacker - Repack modified document into valid DOCX
154
- *
155
- * Takes a Document with modified content and creates a new DOCX file
156
- * by updating document.xml while preserving all other files from
157
- * the original ZIP archive.
158
- *
159
- * This ensures round-trip fidelity:
160
- * - styles.xml, theme1.xml, fontTable.xml remain untouched
161
- * - Media files preserved
162
- * - Relationships preserved
163
- * - Only document.xml is updated with new content
164
- *
165
- * OOXML Package Structure:
166
- * - [Content_Types].xml - Content type declarations
167
- * - _rels/.rels - Package relationships
168
- * - word/document.xml - Main document (modified)
169
- * - word/styles.xml - Styles (preserved)
170
- * - word/theme/theme1.xml - Theme (preserved)
171
- * - word/numbering.xml - Numbering (preserved)
172
- * - word/fontTable.xml - Font table (preserved)
173
- * - word/settings.xml - Settings (preserved)
174
- * - word/header*.xml - Headers (preserved)
175
- * - word/footer*.xml - Footers (preserved)
176
- * - word/footnotes.xml - Footnotes (preserved)
177
- * - word/endnotes.xml - Endnotes (preserved)
178
- * - word/media/* - Media files (preserved)
179
- * - word/_rels/document.xml.rels - Document relationships (preserved)
180
- * - docProps/* - Document properties (preserved)
181
- */
182
-
183
- /**
184
- * Options for repacking DOCX
185
- */
186
- interface RepackOptions {
187
- /** Compression level (0-9, default: 6) */
188
- compressionLevel?: number;
189
- /** Whether to update modification date in docProps/core.xml */
190
- updateModifiedDate?: boolean;
191
- /** Custom modifier name for lastModifiedBy */
192
- modifiedBy?: string;
193
- }
194
- /**
195
- * Repack a Document into a valid DOCX file
196
- *
197
- * @param doc - Document with modified content
198
- * @param options - Optional repack options
199
- * @returns Promise resolving to DOCX as ArrayBuffer
200
- * @throws Error if document has no original buffer for round-trip
201
- */
202
- declare function repackDocx(doc: Document, options?: RepackOptions): Promise<ArrayBuffer>;
203
- /**
204
- * Create a new DOCX from a Document (without requiring original buffer)
205
- *
206
- * @param doc - Document to serialize
207
- * @returns Promise resolving to DOCX as ArrayBuffer
208
- */
209
- declare function createDocx(doc: Document): Promise<ArrayBuffer>;
210
-
211
- /**
212
- * Variable Detector Utility
213
- *
214
- * Scans a DOCX document for template variables in the format {variable_name}
215
- * (standard docxtemplater syntax).
216
- * Returns a unique, sorted list of variable names found in the document.
217
- */
218
-
219
- /**
220
- * Result of variable detection
221
- */
222
- interface VariableDetectionResult {
223
- /** Unique variable names sorted alphabetically */
224
- variables: string[];
225
- /** Total count of variable occurrences */
226
- totalOccurrences: number;
227
- /** Variables by location */
228
- byLocation: {
229
- body: string[];
230
- headers: string[];
231
- footers: string[];
232
- footnotes: string[];
233
- endnotes: string[];
234
- textBoxes: string[];
235
- };
236
- /** Variable occurrences with positions */
237
- occurrences: VariableOccurrence[];
238
- }
239
- /**
240
- * A single variable occurrence with location info
241
- */
242
- interface VariableOccurrence {
243
- /** Variable name (without braces) */
244
- name: string;
245
- /** Location type */
246
- location: 'body' | 'header' | 'footer' | 'footnote' | 'endnote' | 'textBox';
247
- /** Paragraph index within location */
248
- paragraphIndex?: number;
249
- /** Section index (for headers/footers) */
250
- sectionIndex?: number;
251
- }
252
- /**
253
- * Detect all template variables in a document
254
- *
255
- * @param doc - The parsed document
256
- * @returns Array of unique variable names sorted alphabetically
257
- */
258
- declare function detectVariables(doc: Document): string[];
259
- /**
260
- * Detect variables with detailed information
261
- *
262
- * @param doc - The parsed document
263
- * @returns Detailed detection result
264
- */
265
- declare function detectVariablesDetailed(doc: Document): VariableDetectionResult;
266
- /**
267
- * Detect variables in document body
268
- */
269
- declare function detectVariablesInBody(body: DocumentBody): string[];
270
- /**
271
- * Detect variables in a paragraph
272
- */
273
- declare function detectVariablesInParagraph(paragraph: Paragraph): string[];
274
- /**
275
- * Extract variable names from text
276
- *
277
- * @param text - The text to search
278
- * @returns Array of variable names (without braces)
279
- */
280
- declare function extractVariablesFromText(text: string): string[];
281
- /**
282
- * Check if text contains template variables
283
- */
284
- declare function hasTemplateVariables(text: string): boolean;
285
- /**
286
- * Check if a variable name is valid
287
- */
288
- declare function isValidVariableName(name: string): boolean;
289
- /**
290
- * Sanitize a variable name
291
- */
292
- declare function sanitizeVariableName(name: string): string;
293
- /**
294
- * Format a variable name with braces (standard docxtemplater syntax)
295
- */
296
- declare function formatVariable(name: string): string;
297
- /**
298
- * Parse a variable string to get the name
299
- */
300
- declare function parseVariable(variable: string): string | null;
301
- /**
302
- * Replace variables in text with values
303
- *
304
- * @param text - The text containing variables
305
- * @param values - Map of variable name to replacement value
306
- * @returns Text with variables replaced
307
- */
308
- declare function replaceVariables(text: string, values: Record<string, string>): string;
309
- /**
310
- * Replace all variables in text with a placeholder
311
- *
312
- * @param text - The text containing variables
313
- * @param placeholder - Placeholder to use (default: empty string)
314
- * @returns Text with variables replaced
315
- */
316
- declare function removeVariables(text: string, placeholder?: string): string;
317
- /**
318
- * Check if document has any template variables
319
- */
320
- declare function documentHasVariables(doc: Document): boolean;
321
-
322
155
  /**
323
156
  * Headless API Entry Point
324
157
  *
@@ -359,4 +192,4 @@ declare function documentHasVariables(doc: Document): boolean;
359
192
  */
360
193
  declare const VERSION = "0.0.2";
361
194
 
362
- export { Document, DocumentBody, Hyperlink, Paragraph, Position, Run, Table, TextFormatting, VERSION, type VariableDetectionResult, type VariableOccurrence, countCharacters, countWords, createDocx, detectVariables, detectVariablesDetailed, detectVariablesInBody, detectVariablesInParagraph, documentHasVariables, extractVariablesFromText, formatVariable, getBlockIndexForParagraph, getBodyCharacterCount, getBodyText, getBodyWordCount, getFormattingAtPosition, getHyperlinkAtPosition, getHyperlinkText, getParagraphAtIndex, getParagraphText, getParagraphs, getRunText, getTableText, getTextAfter, getTextBefore, hasHyperlinks, hasImages, hasTables, hasTemplateVariables, isHeadingStyle, isPositionInHyperlink, isValidVariableName, parseHeadingLevel, parseVariable, removeVariables, repackDocx, replaceVariables, sanitizeVariableName };
195
+ export { DocumentBody, Hyperlink, Paragraph, Position, Run, Table, TextFormatting, VERSION, countCharacters, countWords, getBlockIndexForParagraph, getBodyCharacterCount, getBodyText, getBodyWordCount, getFormattingAtPosition, getHyperlinkAtPosition, getHyperlinkText, getParagraphAtIndex, getParagraphText, getParagraphs, getRunText, getTableText, getTextAfter, getTextBefore, hasHyperlinks, hasImages, hasTables, isHeadingStyle, isPositionInHyperlink, parseHeadingLevel };
@@ -1,7 +1,10 @@
1
- export { A as AgentContextOptions, S as ContextSelectionOptions, C as CreateEmptyDocumentOptions, D as DocumentAgent, E as ExtendedSelectionContext, F as FormattedTextSegment, a as FormattingSummary, I as InsertHyperlinkOptions, b as InsertImageOptions, c as InsertTableOptions, d as InsertTextOptions, P as ProcessTemplateOptions, e as ProcessTemplateResult, f as SelectionContextOptions, T as TemplateError, g as blendColors, h as buildExtendedSelectionContext, i as buildSelectionContext, j as buildSelectionContextFromContext, k as colorsEqual, l as createAgent, m as createAgentFromDocument, n as createDocumentWithText, o as createEmptyDocument, p as createRgbColor, q as createTemplateProcessor, r as createThemeColor, s as darkenColor, t as emuToPixels, u as emuToTwips, v as executeCommand, w as executeCommands, x as formatPx, y as getAgentContext, z as getContrastingColor, B as getDocumentSummary, G as getMissingVariables, H as getSelectionFormattingSummary, J as getTemplateTags, K as halfPointsToPixels, L as isBlack, M as isWhite, N as lightenColor, O as parseColorString, Q as parseDocx, R as pixelsToEmu, U as pixelsToTwips, V as pointsToPixels, W as previewTemplate, X as processTemplate, Y as processTemplateAdvanced, Z as processTemplateAsBlob, _ as processTemplateDetailed, $ as resolveColor, a0 as resolveHighlightColor, a1 as resolveShadingColor, a2 as serializeDocumentBody, a3 as serializeDocx, a4 as serializeSectionProperties, a5 as twipsToEmu, a6 as twipsToPixels, a7 as validateTemplate } from './colorResolver-BNj-uZ58.js';
2
- import { D as DocumentBody, e as Paragraph, T as TextFormatting, H as Hyperlink, R as Run, f as Table, g as Position, h as Document } from './types-BALm1KBi.js';
3
- export { A as AIAction, i as AIActionRequest, j as AgentCommand, k as AgentContext, l as AgentResponse, m as ApplyStyleCommand, n as ApplyVariablesCommand, B as BlockContent, b as CommandHandler, o as CommandResult, C as CorePlugin, p as DEFAULT_AI_ACTIONS, q as DeleteTextCommand, r as DocxPackage, E as Endnote, F as Footnote, s as FormatParagraphCommand, t as FormatTextCommand, I as Image, u as InsertHyperlinkCommand, v as InsertImageCommand, w as InsertTableCommand, x as InsertTextCommand, J as JsonSchema, L as ListLevel, y as LoadedDocument, d as McpSession, z as McpToolAnnotations, G as McpToolContent, K as McpToolContext, M as McpToolDefinition, N as McpToolHandler, O as McpToolResult, Q as NumberingDefinitions, S as ParagraphContext, U as ParagraphFormatting, V as ParagraphOutline, C as Plugin, W as PluginCommand, b as PluginCommandHandler, X as PluginEvent, c as PluginEventListener, P as PluginOptions, a as PluginRegistrationResult, Y as Range, Z as Relationship, _ as ReplaceTextCommand, $ as RunContent, a0 as SectionInfo, a1 as SectionProperties, a2 as SelectionContext, a3 as SetVariableCommand, a4 as Style, a5 as StyleDefinitions, a6 as StyleInfo, a7 as SuggestedAction, a8 as TableCell, a9 as TableRow, aa as TextContent, ab as Theme, M as ToolDefinition, N as ToolHandler, O as ToolResult, ac as ZodSchemaLike, ad as comparePositions, ae as createCollapsedRange, af as createCommand, ag as createRange, ah as getActionDescription, ai as getActionLabel, aj as isPositionInRange, ak as isZodSchema } from './types-BALm1KBi.js';
4
- export { P as PluginRegistry, c as createPluginRegistrar, p as pluginRegistry, r as registerPlugins } from './registry-CzqAPdui.js';
1
+ export { D as DocumentAgent, F as FormattedTextSegment, I as InsertHyperlinkOptions, b as InsertImageOptions, c as InsertTableOptions, d as InsertTextOptions, e as createAgent, f as createAgentFromDocument } from './DocumentAgent-Ci6_T-XM.js';
2
+ export { A as AgentContextOptions, T as ContextSelectionOptions, C as CreateEmptyDocumentOptions, E as ExtendedSelectionContext, U as FormattingSummary, P as ProcessTemplateOptions, a as ProcessTemplateResult, S as SelectionContextOptions, V as TemplateError, b as blendColors, c as buildExtendedSelectionContext, d as buildSelectionContext, W as buildSelectionContextFromContext, e as colorsEqual, f as createDocumentWithText, g as createEmptyDocument, h as createRgbColor, X as createTemplateProcessor, i as createThemeColor, j as darkenColor, k as emuToPixels, l as emuToTwips, m as executeCommand, n as executeCommands, o as formatPx, p as getAgentContext, q as getContrastingColor, r as getDocumentSummary, Y as getMissingVariables, Z as getSelectionFormattingSummary, s as getTemplateTags, t as halfPointsToPixels, u as isBlack, v as isWhite, w as lightenColor, x as parseColorString, y as parseDocx, z as pixelsToEmu, B as pixelsToTwips, D as pointsToPixels, _ as previewTemplate, F as processTemplate, $ as processTemplateAdvanced, G as processTemplateAsBlob, H as processTemplateDetailed, I as resolveColor, J as resolveHighlightColor, K as resolveShadingColor, L as serializeDocumentBody, M as serializeDocx, N as serializeSectionProperties, O as twipsToEmu, Q as twipsToPixels, R as validateTemplate } from './colorResolver-KXbUgzWC.js';
3
+ import { i as DocumentBody, P as Paragraph, X as TextFormatting, o as Hyperlink, y as Run, T as Table, v as Position } from './agentApi-CbVUCZRu.js';
4
+ export { A as AIAction, a as AIActionRequest, b as AgentCommand, c as AgentContext, d as AgentResponse, e as ApplyStyleCommand, a0 as ApplyVariablesCommand, B as BlockContent, a1 as DEFAULT_AI_ACTIONS, D as DeleteTextCommand, h as Document, j as DocxPackage, E as Endnote, l as Footnote, a2 as FormatParagraphCommand, m as FormatTextCommand, I as Image, p as InsertHyperlinkCommand, q as InsertImageCommand, r as InsertTableCommand, s as InsertTextCommand, L as ListLevel, N as NumberingDefinitions, t as ParagraphContext, u as ParagraphFormatting, a3 as ParagraphOutline, R as Range, w as Relationship, x as ReplaceTextCommand, z as RunContent, a4 as SectionInfo, S as SectionProperties, C as SelectionContext, G as SetVariableCommand, K as Style, M as StyleDefinitions, a5 as StyleInfo, O as SuggestedAction, Q as TableCell, U as TableRow, W as TextContent, Y as Theme, a6 as comparePositions, a7 as createCollapsedRange, a8 as createCommand, a9 as createRange, aa as getActionDescription, ab as getActionLabel, ac as isPositionInRange } from './agentApi-CbVUCZRu.js';
5
+ export { V as VariableDetectionResult, a as VariableOccurrence, c as createDocx, d as detectVariables, b as detectVariablesDetailed, e as detectVariablesInBody, f as detectVariablesInParagraph, g as documentHasVariables, h as extractVariablesFromText, i as formatVariable, j as hasTemplateVariables, k as isValidVariableName, p as parseVariable, r as removeVariables, l as repackDocx, m as replaceVariables, s as sanitizeVariableName } from './variableDetector-DeM1N-_L.js';
6
+ export { e as CommandHandler, g as CommandResult, C as CorePlugin, J as JsonSchema, L as LoadedDocument, M as McpSession, h as McpToolAnnotations, i as McpToolContent, j as McpToolContext, a as McpToolDefinition, b as McpToolHandler, c as McpToolResult, C as Plugin, k as PluginCommand, e as PluginCommandHandler, l as PluginEvent, f as PluginEventListener, P as PluginOptions, d as PluginRegistrationResult, a as ToolDefinition, b as ToolHandler, c as ToolResult, Z as ZodSchemaLike, m as isZodSchema } from './types-xMzSPT4i.js';
7
+ export { P as PluginRegistry, c as createPluginRegistrar, p as pluginRegistry, r as registerPlugins } from './registry-D4tvj9f3.js';
5
8
 
6
9
  /**
7
10
  * Shared Text Utilities for Agent Module
@@ -149,176 +152,6 @@ declare function getParagraphAtIndex(body: DocumentBody, index: number): Paragra
149
152
  */
150
153
  declare function getBlockIndexForParagraph(body: DocumentBody, paragraphIndex: number): number;
151
154
 
152
- /**
153
- * DOCX Repacker - Repack modified document into valid DOCX
154
- *
155
- * Takes a Document with modified content and creates a new DOCX file
156
- * by updating document.xml while preserving all other files from
157
- * the original ZIP archive.
158
- *
159
- * This ensures round-trip fidelity:
160
- * - styles.xml, theme1.xml, fontTable.xml remain untouched
161
- * - Media files preserved
162
- * - Relationships preserved
163
- * - Only document.xml is updated with new content
164
- *
165
- * OOXML Package Structure:
166
- * - [Content_Types].xml - Content type declarations
167
- * - _rels/.rels - Package relationships
168
- * - word/document.xml - Main document (modified)
169
- * - word/styles.xml - Styles (preserved)
170
- * - word/theme/theme1.xml - Theme (preserved)
171
- * - word/numbering.xml - Numbering (preserved)
172
- * - word/fontTable.xml - Font table (preserved)
173
- * - word/settings.xml - Settings (preserved)
174
- * - word/header*.xml - Headers (preserved)
175
- * - word/footer*.xml - Footers (preserved)
176
- * - word/footnotes.xml - Footnotes (preserved)
177
- * - word/endnotes.xml - Endnotes (preserved)
178
- * - word/media/* - Media files (preserved)
179
- * - word/_rels/document.xml.rels - Document relationships (preserved)
180
- * - docProps/* - Document properties (preserved)
181
- */
182
-
183
- /**
184
- * Options for repacking DOCX
185
- */
186
- interface RepackOptions {
187
- /** Compression level (0-9, default: 6) */
188
- compressionLevel?: number;
189
- /** Whether to update modification date in docProps/core.xml */
190
- updateModifiedDate?: boolean;
191
- /** Custom modifier name for lastModifiedBy */
192
- modifiedBy?: string;
193
- }
194
- /**
195
- * Repack a Document into a valid DOCX file
196
- *
197
- * @param doc - Document with modified content
198
- * @param options - Optional repack options
199
- * @returns Promise resolving to DOCX as ArrayBuffer
200
- * @throws Error if document has no original buffer for round-trip
201
- */
202
- declare function repackDocx(doc: Document, options?: RepackOptions): Promise<ArrayBuffer>;
203
- /**
204
- * Create a new DOCX from a Document (without requiring original buffer)
205
- *
206
- * @param doc - Document to serialize
207
- * @returns Promise resolving to DOCX as ArrayBuffer
208
- */
209
- declare function createDocx(doc: Document): Promise<ArrayBuffer>;
210
-
211
- /**
212
- * Variable Detector Utility
213
- *
214
- * Scans a DOCX document for template variables in the format {variable_name}
215
- * (standard docxtemplater syntax).
216
- * Returns a unique, sorted list of variable names found in the document.
217
- */
218
-
219
- /**
220
- * Result of variable detection
221
- */
222
- interface VariableDetectionResult {
223
- /** Unique variable names sorted alphabetically */
224
- variables: string[];
225
- /** Total count of variable occurrences */
226
- totalOccurrences: number;
227
- /** Variables by location */
228
- byLocation: {
229
- body: string[];
230
- headers: string[];
231
- footers: string[];
232
- footnotes: string[];
233
- endnotes: string[];
234
- textBoxes: string[];
235
- };
236
- /** Variable occurrences with positions */
237
- occurrences: VariableOccurrence[];
238
- }
239
- /**
240
- * A single variable occurrence with location info
241
- */
242
- interface VariableOccurrence {
243
- /** Variable name (without braces) */
244
- name: string;
245
- /** Location type */
246
- location: 'body' | 'header' | 'footer' | 'footnote' | 'endnote' | 'textBox';
247
- /** Paragraph index within location */
248
- paragraphIndex?: number;
249
- /** Section index (for headers/footers) */
250
- sectionIndex?: number;
251
- }
252
- /**
253
- * Detect all template variables in a document
254
- *
255
- * @param doc - The parsed document
256
- * @returns Array of unique variable names sorted alphabetically
257
- */
258
- declare function detectVariables(doc: Document): string[];
259
- /**
260
- * Detect variables with detailed information
261
- *
262
- * @param doc - The parsed document
263
- * @returns Detailed detection result
264
- */
265
- declare function detectVariablesDetailed(doc: Document): VariableDetectionResult;
266
- /**
267
- * Detect variables in document body
268
- */
269
- declare function detectVariablesInBody(body: DocumentBody): string[];
270
- /**
271
- * Detect variables in a paragraph
272
- */
273
- declare function detectVariablesInParagraph(paragraph: Paragraph): string[];
274
- /**
275
- * Extract variable names from text
276
- *
277
- * @param text - The text to search
278
- * @returns Array of variable names (without braces)
279
- */
280
- declare function extractVariablesFromText(text: string): string[];
281
- /**
282
- * Check if text contains template variables
283
- */
284
- declare function hasTemplateVariables(text: string): boolean;
285
- /**
286
- * Check if a variable name is valid
287
- */
288
- declare function isValidVariableName(name: string): boolean;
289
- /**
290
- * Sanitize a variable name
291
- */
292
- declare function sanitizeVariableName(name: string): string;
293
- /**
294
- * Format a variable name with braces (standard docxtemplater syntax)
295
- */
296
- declare function formatVariable(name: string): string;
297
- /**
298
- * Parse a variable string to get the name
299
- */
300
- declare function parseVariable(variable: string): string | null;
301
- /**
302
- * Replace variables in text with values
303
- *
304
- * @param text - The text containing variables
305
- * @param values - Map of variable name to replacement value
306
- * @returns Text with variables replaced
307
- */
308
- declare function replaceVariables(text: string, values: Record<string, string>): string;
309
- /**
310
- * Replace all variables in text with a placeholder
311
- *
312
- * @param text - The text containing variables
313
- * @param placeholder - Placeholder to use (default: empty string)
314
- * @returns Text with variables replaced
315
- */
316
- declare function removeVariables(text: string, placeholder?: string): string;
317
- /**
318
- * Check if document has any template variables
319
- */
320
- declare function documentHasVariables(doc: Document): boolean;
321
-
322
155
  /**
323
156
  * Headless API Entry Point
324
157
  *
@@ -359,4 +192,4 @@ declare function documentHasVariables(doc: Document): boolean;
359
192
  */
360
193
  declare const VERSION = "0.0.2";
361
194
 
362
- export { Document, DocumentBody, Hyperlink, Paragraph, Position, Run, Table, TextFormatting, VERSION, type VariableDetectionResult, type VariableOccurrence, countCharacters, countWords, createDocx, detectVariables, detectVariablesDetailed, detectVariablesInBody, detectVariablesInParagraph, documentHasVariables, extractVariablesFromText, formatVariable, getBlockIndexForParagraph, getBodyCharacterCount, getBodyText, getBodyWordCount, getFormattingAtPosition, getHyperlinkAtPosition, getHyperlinkText, getParagraphAtIndex, getParagraphText, getParagraphs, getRunText, getTableText, getTextAfter, getTextBefore, hasHyperlinks, hasImages, hasTables, hasTemplateVariables, isHeadingStyle, isPositionInHyperlink, isValidVariableName, parseHeadingLevel, parseVariable, removeVariables, repackDocx, replaceVariables, sanitizeVariableName };
195
+ export { DocumentBody, Hyperlink, Paragraph, Position, Run, Table, TextFormatting, VERSION, countCharacters, countWords, getBlockIndexForParagraph, getBodyCharacterCount, getBodyText, getBodyWordCount, getFormattingAtPosition, getHyperlinkAtPosition, getHyperlinkText, getParagraphAtIndex, getParagraphText, getParagraphs, getRunText, getTableText, getTextAfter, getTextBefore, hasHyperlinks, hasImages, hasTables, isHeadingStyle, isPositionInHyperlink, parseHeadingLevel };
package/dist/headless.js CHANGED
@@ -1,4 +1,4 @@
1
- export{P as DEFAULT_AI_ACTIONS,y as DocumentAgent,l as blendColors,F as buildExtendedSelectionContext,E as buildSelectionContext,C as buildSelectionContextFromContext,m as colorsEqual,M as comparePositions,z as createAgent,A as createAgentFromDocument,J as createCollapsedRange,Q as createCommand,I as createDocumentWithText,H as createEmptyDocument,K as createRange,i as createRgbColor,h as createThemeColor,j as darkenColor,p as emuToPixels,r as emuToTwips,x as formatPx,O as getActionDescription,N as getActionLabel,B as getAgentContext,f as getContrastingColor,D as getDocumentSummary,G as getSelectionFormattingSummary,u as halfPointsToPixels,d as isBlack,L as isPositionInRange,e as isWhite,k as lightenColor,g as parseColorString,q as pixelsToEmu,o as pixelsToTwips,t as pointsToPixels,a as resolveColor,b as resolveHighlightColor,c as resolveShadingColor,s as twipsToEmu,n as twipsToPixels}from'./chunk-E23CAQXT.js';export{v as createTemplateProcessor,a as detectVariables,b as detectVariablesDetailed,c as detectVariablesInBody,d as detectVariablesInParagraph,m as documentHasVariables,e as extractVariablesFromText,i as formatVariable,s as getMissingVariables,q as getTemplateTags,f as hasTemplateVariables,g as isValidVariableName,w as isZodSchema,j as parseVariable,t as previewTemplate,n as processTemplate,u as processTemplateAdvanced,p as processTemplateAsBlob,o as processTemplateDetailed,l as removeVariables,k as replaceVariables,h as sanitizeVariableName,r as validateTemplate}from'./chunk-IZGUXSCC.js';export{e as createDocx,d as repackDocx,b as serializeDocumentBody,c as serializeDocx,a as serializeSectionProperties}from'./chunk-ICEPOA7G.js';export{o as parseDocx}from'./chunk-P332HWDE.js';export{a as executeCommand,b as executeCommands}from'./chunk-MMJD2DLL.js';export{a as PluginRegistry,d as createPluginRegistrar,b as pluginRegistry,c as registerPlugins}from'./chunk-QHWHCIUW.js';import'./chunk-3IYNTJO5.js';function p(n){let e=[];for(let t of n.content)t.type==="run"?e.push(c(t)):t.type==="hyperlink"&&e.push(g(t));return e.join("")}function c(n){return n.content.filter(e=>e.type==="text").map(e=>e.text).join("")}function g(n){let e=[];for(let t of n.children)t.type==="run"&&e.push(c(t));return e.join("")}function m(n){let e=[];for(let t of n.rows)for(let o of t.cells)for(let r of o.content)r.type==="paragraph"&&e.push(p(r));return e.join(" ")}function Me(n){let e=[];for(let t of n.content)t.type==="paragraph"?e.push(p(t)):t.type==="table"&&e.push(m(t));return e.join(`
1
+ export{e as buildExtendedSelectionContext,d as buildSelectionContext,b as buildSelectionContextFromContext,h as createDocumentWithText,g as createEmptyDocument,a as getAgentContext,c as getDocumentSummary,f as getSelectionFormattingSummary}from'./chunk-TOI5W3HK.js';export{a as DocumentAgent,b as createAgent,c as createAgentFromDocument}from'./chunk-M7F2CUUD.js';export{g as DEFAULT_AI_ACTIONS,d as comparePositions,a as createCollapsedRange,h as createCommand,b as createRange,f as getActionDescription,e as getActionLabel,c as isPositionInRange}from'./chunk-EMKABJPH.js';export{l as blendColors,m as colorsEqual,i as createRgbColor,h as createThemeColor,j as darkenColor,p as emuToPixels,r as emuToTwips,x as formatPx,f as getContrastingColor,u as halfPointsToPixels,d as isBlack,e as isWhite,k as lightenColor,g as parseColorString,q as pixelsToEmu,o as pixelsToTwips,t as pointsToPixels,a as resolveColor,b as resolveHighlightColor,c as resolveShadingColor,s as twipsToEmu,n as twipsToPixels}from'./chunk-ZDYHAYN6.js';export{a as isZodSchema}from'./chunk-COP5BIBZ.js';export{j as createTemplateProcessor,g as getMissingVariables,e as getTemplateTags,h as previewTemplate,a as processTemplate,i as processTemplateAdvanced,c as processTemplateAsBlob,b as processTemplateDetailed,f as validateTemplate}from'./chunk-ESI4BSBF.js';export{a as detectVariables,b as detectVariablesDetailed,c as detectVariablesInBody,d as detectVariablesInParagraph,m as documentHasVariables,e as extractVariablesFromText,i as formatVariable,f as hasTemplateVariables,g as isValidVariableName,j as parseVariable,l as removeVariables,k as replaceVariables,h as sanitizeVariableName}from'./chunk-2ASOEN3V.js';export{e as createDocx,d as repackDocx,b as serializeDocumentBody,c as serializeDocx,a as serializeSectionProperties}from'./chunk-MDPDH7KS.js';export{a as executeCommand,b as executeCommands}from'./chunk-MMJD2DLL.js';export{p as parseDocx}from'./chunk-OTG4NABM.js';export{a as PluginRegistry,d as createPluginRegistrar,b as pluginRegistry,c as registerPlugins}from'./chunk-QHWHCIUW.js';import'./chunk-3IYNTJO5.js';function p(n){let e=[];for(let t of n.content)t.type==="run"?e.push(c(t)):t.type==="hyperlink"&&e.push(g(t));return e.join("")}function c(n){return n.content.filter(e=>e.type==="text").map(e=>e.text).join("")}function g(n){let e=[];for(let t of n.children)t.type==="run"&&e.push(c(t));return e.join("")}function m(n){let e=[];for(let t of n.rows)for(let o of t.cells)for(let r of o.content)r.type==="paragraph"&&e.push(p(r));return e.join(" ")}function Me(n){let e=[];for(let t of n.content)t.type==="paragraph"?e.push(p(t)):t.type==="table"&&e.push(m(t));return e.join(`
2
2
  `)}function f(n){return n.split(/\s+/).filter(t=>t.length>0).length}function je(n,e=true){return e?n.length:n.replace(/\s/g,"").length}function We(n){let e=0;for(let t of n.content)t.type==="paragraph"?e+=f(p(t)):t.type==="table"&&(e+=ze(t));return e}function ze(n){let e=0;for(let t of n.rows)for(let o of t.cells)for(let r of o.content)r.type==="paragraph"&&(e+=f(p(r)));return e}function Ne(n){let e=0;for(let t of n.content)t.type==="paragraph"?e+=p(t).length:t.type==="table"&&(e+=qe(t));return e}function qe(n){let e=0;for(let t of n.rows)for(let o of t.cells)for(let r of o.content)r.type==="paragraph"&&(e+=p(r).length);return e}function Ze(n,e,t){let o=[],r=0,i=n[e.paragraphIndex];if(i){let s=p(i).slice(0,e.offset);o.unshift(s),r+=s.length;}for(let l=e.paragraphIndex-1;l>=0&&r<t;l--){let s=n[l];if(!s)continue;let u=p(s);o.unshift(u),r+=u.length;}let a=o.join(`
3
3
  `);return a.length>t?"..."+a.slice(-t):a}function _e(n,e,t){let o=[],r=0,i=n[e.paragraphIndex];if(i){let s=p(i).slice(e.offset);o.push(s),r+=s.length;}for(let l=e.paragraphIndex+1;l<n.length&&r<t;l++){let s=n[l];if(!s)continue;let u=p(s);o.push(u),r+=u.length;}let a=o.join(`
4
4
  `);return a.length>t?a.slice(0,t)+"...":a}function Je(n,e){let t=0;for(let o of n.content)if(o.type==="run"){let r=c(o),i=t+r.length;if(e>=t&&e<i)return o.formatting||{};t=i;}else if(o.type==="hyperlink"){let r=g(o),i=t+r.length;if(e>=t&&e<i){for(let a of o.children)if(a.type==="run")return a.formatting||{}}t=i;}return {}}function Ue(n,e){let t=0;for(let o of n.content)if(o.type==="run"){let r=c(o);t+=r.length;}else if(o.type==="hyperlink"){let r=g(o),i=t,a=t+r.length;if(e>=i&&e<a)return true;t=a;}return false}function Ge(n,e){let t=0;for(let o of n.content)if(o.type==="run"){let r=c(o);t+=r.length;}else if(o.type==="hyperlink"){let r=g(o),i=t,a=t+r.length;if(e>=i&&e<a)return o;t=a;}}function Ke(n){return n?n.toLowerCase().includes("heading"):false}function Qe(n){if(!n)return;let e=n.match(/heading\s*(\d)/i);if(e)return parseInt(e[1],10)}function Xe(n){for(let e of n.content)if(e.type==="paragraph"){for(let t of e.content)if(t.type==="run"){for(let o of t.content)if(o.type==="drawing")return true}}return false}function Ye(n){for(let e of n.content)if(e.type==="paragraph"){for(let t of e.content)if(t.type==="hyperlink")return true}return false}function $e(n){return n.content.some(e=>e.type==="table")}function x(n){return n.content.filter(e=>e.type==="paragraph")}function et(n,e){return x(n)[e]}function tt(n,e){let t=0;for(let o=0;o<n.content.length;o++)if(n.content[o].type==="paragraph"){if(t===e)return o;t++;}return -1}var ot="0.0.2";export{ot as VERSION,je as countCharacters,f as countWords,tt as getBlockIndexForParagraph,Ne as getBodyCharacterCount,Me as getBodyText,We as getBodyWordCount,Je as getFormattingAtPosition,Ge as getHyperlinkAtPosition,g as getHyperlinkText,et as getParagraphAtIndex,p as getParagraphText,x as getParagraphs,c as getRunText,m as getTableText,_e as getTextAfter,Ze as getTextBefore,Ye as hasHyperlinks,Xe as hasImages,$e as hasTables,Ke as isHeadingStyle,Ue as isPositionInHyperlink,Qe as parseHeadingLevel};