@postnzt/docx-js-editor 0.0.33

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 (117) hide show
  1. package/dist/ClipboardManager-C0rTRkVQ.d.ts +464 -0
  2. package/dist/ClipboardManager-CgpKW2At.d.mts +464 -0
  3. package/dist/DocumentAgent-BqA9EJ3F.d.mts +442 -0
  4. package/dist/DocumentAgent-CRCXiBT7.d.ts +442 -0
  5. package/dist/FindReplaceDialog-KNJETYJX.js +1 -0
  6. package/dist/FindReplaceDialog-YW3R4FHM.mjs +1 -0
  7. package/dist/FootnotePropertiesDialog-452A4UT5.js +1 -0
  8. package/dist/FootnotePropertiesDialog-H24AC5XK.mjs +1 -0
  9. package/dist/HyperlinkDialog-GBAYMTUE.js +1 -0
  10. package/dist/HyperlinkDialog-HNYTXDCB.mjs +1 -0
  11. package/dist/ImagePositionDialog-B4RLP2W5.mjs +1 -0
  12. package/dist/ImagePositionDialog-M65BYQQE.js +1 -0
  13. package/dist/ImagePropertiesDialog-JOGW3WDU.mjs +1 -0
  14. package/dist/ImagePropertiesDialog-O4WQSF5M.js +1 -0
  15. package/dist/PageSetupDialog-2GIBTKMJ.js +1 -0
  16. package/dist/PageSetupDialog-Q7SHEZIJ.mjs +1 -0
  17. package/dist/TablePropertiesDialog-LMXWX3FI.mjs +1 -0
  18. package/dist/TablePropertiesDialog-WOZ4ES3H.js +1 -0
  19. package/dist/agentApi-BVHzyk2l.d.mts +2239 -0
  20. package/dist/agentApi-BVHzyk2l.d.ts +2239 -0
  21. package/dist/chunk-2HDYCD2Q.mjs +1 -0
  22. package/dist/chunk-377ZVTSE.js +2 -0
  23. package/dist/chunk-37SLIJPH.mjs +58 -0
  24. package/dist/chunk-4VUZBV2S.js +1 -0
  25. package/dist/chunk-6WPRCJ5A.mjs +1 -0
  26. package/dist/chunk-7MGFEP2R.mjs +26 -0
  27. package/dist/chunk-7QTNB64A.mjs +9 -0
  28. package/dist/chunk-AARNCPWR.js +1 -0
  29. package/dist/chunk-AU5NVRHP.js +2 -0
  30. package/dist/chunk-BP3V2HDD.js +261 -0
  31. package/dist/chunk-BUEMG4NW.js +1 -0
  32. package/dist/chunk-DC65PJYE.js +4 -0
  33. package/dist/chunk-DLVLK5FT.mjs +24 -0
  34. package/dist/chunk-EV3CM6TU.js +1 -0
  35. package/dist/chunk-FVUGBRDD.js +1 -0
  36. package/dist/chunk-GZOCOWWB.mjs +2 -0
  37. package/dist/chunk-H5NTJZO4.js +1 -0
  38. package/dist/chunk-IFPN3NT3.js +3 -0
  39. package/dist/chunk-KCOGY3V2.js +10 -0
  40. package/dist/chunk-KUL2SDYC.js +26 -0
  41. package/dist/chunk-LFZXSNOF.mjs +261 -0
  42. package/dist/chunk-LYBG4YI7.mjs +1 -0
  43. package/dist/chunk-M5F4SK3W.mjs +1 -0
  44. package/dist/chunk-P7WEP4JU.js +9 -0
  45. package/dist/chunk-PB7VMDDP.js +24 -0
  46. package/dist/chunk-QAZ4233N.mjs +1 -0
  47. package/dist/chunk-QSUPYUOP.js +2 -0
  48. package/dist/chunk-QTSXJRP6.mjs +1 -0
  49. package/dist/chunk-QVPR2W5S.js +1 -0
  50. package/dist/chunk-RTFUE3KK.mjs +10 -0
  51. package/dist/chunk-SCYTWBF5.mjs +111 -0
  52. package/dist/chunk-SE5EN2QL.js +1 -0
  53. package/dist/chunk-T6X4C2QO.js +111 -0
  54. package/dist/chunk-TAUMSKRE.mjs +1 -0
  55. package/dist/chunk-W53SI3XW.mjs +1 -0
  56. package/dist/chunk-WOHFANC5.mjs +3 -0
  57. package/dist/chunk-X5A54T6S.mjs +4 -0
  58. package/dist/chunk-YKBSKEBS.mjs +2 -0
  59. package/dist/chunk-Z26WOH6R.mjs +2 -0
  60. package/dist/chunk-ZJNGMDRE.js +58 -0
  61. package/dist/clipboard-Cu80iVDh.d.ts +1181 -0
  62. package/dist/clipboard-dFROLI95.d.mts +1181 -0
  63. package/dist/colorResolver-BwI_Uxp3.d.mts +662 -0
  64. package/dist/colorResolver-Dlmk3itT.d.ts +662 -0
  65. package/dist/core-plugins-reexport.d.mts +31 -0
  66. package/dist/core-plugins-reexport.d.ts +31 -0
  67. package/dist/core-plugins-reexport.js +1 -0
  68. package/dist/core-plugins-reexport.mjs +1 -0
  69. package/dist/core-reexport.d.mts +309 -0
  70. package/dist/core-reexport.d.ts +309 -0
  71. package/dist/core-reexport.js +1 -0
  72. package/dist/core-reexport.mjs +1 -0
  73. package/dist/executor-L2MVKMXO.js +1 -0
  74. package/dist/executor-XKBCCVNY.mjs +1 -0
  75. package/dist/fontLoader-BI9ZoACv.d.ts +176 -0
  76. package/dist/fontLoader-DicgJidU.d.mts +176 -0
  77. package/dist/headless-reexport.d.mts +195 -0
  78. package/dist/headless-reexport.d.ts +195 -0
  79. package/dist/headless-reexport.js +4 -0
  80. package/dist/headless-reexport.mjs +4 -0
  81. package/dist/index.css +1 -0
  82. package/dist/index.d.mts +480 -0
  83. package/dist/index.d.ts +480 -0
  84. package/dist/index.js +112 -0
  85. package/dist/index.mjs +112 -0
  86. package/dist/lib-BCT2DRYI.mjs +1 -0
  87. package/dist/lib-U35UU4OU.js +1 -0
  88. package/dist/mcp-reexport.d.mts +156 -0
  89. package/dist/mcp-reexport.d.ts +156 -0
  90. package/dist/mcp-reexport.js +16 -0
  91. package/dist/mcp-reexport.mjs +16 -0
  92. package/dist/processTemplate-5ZST2Q5L.js +1 -0
  93. package/dist/processTemplate-LRHXOWMZ.mjs +1 -0
  94. package/dist/react-Cl2n0F5S.d.ts +1091 -0
  95. package/dist/react-DZlAKNXg.d.mts +1091 -0
  96. package/dist/react.css +1 -0
  97. package/dist/react.d.mts +10 -0
  98. package/dist/react.d.ts +10 -0
  99. package/dist/react.js +1 -0
  100. package/dist/react.mjs +1 -0
  101. package/dist/registry-D4FQ9aKX.d.mts +165 -0
  102. package/dist/registry-DrYyUXQr.d.ts +165 -0
  103. package/dist/selectionRects-DEX5THEG.js +1 -0
  104. package/dist/selectionRects-SQTAHMCH.mjs +1 -0
  105. package/dist/styles.css +1 -0
  106. package/dist/types-B3LkfO0u.d.mts +310 -0
  107. package/dist/types-igZ1x_e4.d.ts +310 -0
  108. package/dist/ui.d.mts +2005 -0
  109. package/dist/ui.d.ts +2005 -0
  110. package/dist/ui.js +1 -0
  111. package/dist/ui.mjs +1 -0
  112. package/dist/variableDetector-CIqTek7A.d.mts +204 -0
  113. package/dist/variableDetector-CkYvLv62.d.ts +204 -0
  114. package/i18n/de.json +745 -0
  115. package/i18n/en.json +745 -0
  116. package/i18n/pl.json +745 -0
  117. package/package.json +127 -0
@@ -0,0 +1,195 @@
1
+ import { d as DocumentBody, a as Paragraph, T as TextFormatting, H as Hyperlink, b as Run, e as Table, P as Position } from './agentApi-BVHzyk2l.js';
2
+ export { f as AIAction, g as AIActionRequest, A as AgentCommand, h as AgentContext, i as AgentResponse, j as ApplyStyleCommand, k as ApplyVariablesCommand, l as BlockContent, C as Comment, m as CommentRangeEnd, n as CommentRangeStart, o as DEFAULT_AI_ACTIONS, p as DeleteTextCommand, q as Deletion, D as Document, 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, y as Insertion, L as ListLevel, M as MoveFrom, z as MoveTo, N as NumberingDefinitions, G as ParagraphContent, J as ParagraphContext, K as ParagraphFormatting, O as ParagraphOutline, R as Range, Q as Relationship, S as ReplaceTextCommand, c as RunContent, U as SectionInfo, V as SectionProperties, W as SelectionContext, X as SetVariableCommand, Y as Style, Z as StyleDefinitions, _ as StyleInfo, $ as SuggestedAction, a0 as TableCell, a1 as TableRow, a2 as TextContent, a3 as Theme, a4 as TrackedChangeInfo, a5 as TrackedRunChange, a6 as comparePositions, a7 as createCollapsedRange, a8 as createCommand, a9 as createRange, aa as getActionDescription, ab as getActionLabel, ac as isPositionInRange } from './agentApi-BVHzyk2l.js';
3
+ export { A as AgentContextOptions, S as ContextSelectionOptions, C as CreateEmptyDocumentOptions, E as ExtendedSelectionContext, F as FormattingSummary, P as ProcessTemplateOptions, a as ProcessTemplateResult, b as SelectionContextOptions, T as TemplateError, c as blendColors, d as buildExtendedSelectionContext, e as buildSelectionContext, f as buildSelectionContextFromContext, g as colorsEqual, h as createDocumentWithText, i as createEmptyDocument, j as createRgbColor, k as createTemplateProcessor, l as createThemeColor, m as darkenColor, n as emuToPixels, o as emuToTwips, p as executeCommand, q as executeCommands, r as formatPx, s as getAgentContext, t as getContrastingColor, u as getDocumentSummary, v as getMissingVariables, w as getSelectionFormattingSummary, x as getTemplateTags, y as halfPointsToPixels, z as isBlack, B as isWhite, D as lightenColor, G as parseColorString, H as parseDocx, I as pixelsToEmu, J as pixelsToTwips, K as pointsToPixels, L as previewTemplate, M as processTemplate, N as processTemplateAdvanced, O as processTemplateAsBlob, Q as processTemplateDetailed, R as resolveColor, U as resolveHighlightColor, V as resolveShadingColor, W as serializeDocumentBody, X as serializeDocx, Y as serializeSectionProperties, Z as twipsToEmu, _ as twipsToPixels, $ as validateTemplate } from './colorResolver-Dlmk3itT.js';
4
+ export { b as CommandHandler, d as CommandResult, C as CorePlugin, J as JsonSchema, L as LoadedDocument, e as McpSession, f as McpToolAnnotations, g as McpToolContent, h as McpToolContext, M as McpToolDefinition, i as McpToolHandler, j as McpToolResult, C as Plugin, k as PluginCommand, b as PluginCommandHandler, l as PluginEvent, c as PluginEventListener, P as PluginOptions, a as PluginRegistrationResult, M as ToolDefinition, i as ToolHandler, j as ToolResult, Z as ZodSchemaLike, m as isZodSchema } from './types-igZ1x_e4.js';
5
+ export { D as DocumentAgent, F as FormattedTextSegment, I as InsertHyperlinkOptions, a as InsertImageOptions, b as InsertTableOptions, c as InsertTextOptions, d as attemptSelectiveSave, e as createAgent, f as createAgentFromDocument } from './DocumentAgent-CRCXiBT7.js';
6
+ export { P as PluginRegistry, c as createPluginRegistrar, p as pluginRegistry, r as registerPlugins } from './registry-DrYyUXQr.js';
7
+ export { V as VariableDetectionResult, a as VariableOccurrence, b as buildPatchedDocumentXml, c as createDocx, d as detectVariables, e as detectVariablesDetailed, f as detectVariablesInBody, g as detectVariablesInParagraph, h as documentHasVariables, i as extractVariablesFromText, j as formatVariable, k as hasTemplateVariables, l as isValidVariableName, p as parseVariable, r as removeVariables, m as repackDocx, n as replaceVariables, s as sanitizeVariableName, u as updateMultipleFiles, v as validatePatchSafety } from './variableDetector-CkYvLv62.js';
8
+
9
+ /**
10
+ * Shared Text Utilities for Agent Module
11
+ *
12
+ * Common text extraction and manipulation utilities used by
13
+ * context.ts, selectionContext.ts, and other agent-related code.
14
+ *
15
+ * Consolidates duplicated helper functions into a single location.
16
+ */
17
+
18
+ /**
19
+ * Get plain text from a paragraph
20
+ */
21
+ declare function getParagraphText(paragraph: Paragraph): string;
22
+ /**
23
+ * Get plain text from a run
24
+ */
25
+ declare function getRunText(run: Run): string;
26
+ /**
27
+ * Get plain text from a hyperlink
28
+ */
29
+ declare function getHyperlinkText(hyperlink: Hyperlink): string;
30
+ /**
31
+ * Get plain text from a table
32
+ */
33
+ declare function getTableText(table: Table): string;
34
+ /**
35
+ * Get plain text from document body
36
+ */
37
+ declare function getBodyText(body: DocumentBody): string;
38
+ /**
39
+ * Count words in text
40
+ */
41
+ declare function countWords(text: string): number;
42
+ /**
43
+ * Count characters in text
44
+ */
45
+ declare function countCharacters(text: string, includeSpaces?: boolean): number;
46
+ /**
47
+ * Get word count from document body
48
+ */
49
+ declare function getBodyWordCount(body: DocumentBody): number;
50
+ /**
51
+ * Get character count from document body
52
+ */
53
+ declare function getBodyCharacterCount(body: DocumentBody): number;
54
+ /**
55
+ * Get text before a position
56
+ *
57
+ * @param paragraphs - Array of paragraphs
58
+ * @param position - Position to get text before
59
+ * @param maxChars - Maximum characters to return
60
+ * @returns Text before the position
61
+ */
62
+ declare function getTextBefore(paragraphs: Paragraph[], position: Position, maxChars: number): string;
63
+ /**
64
+ * Get text after a position
65
+ *
66
+ * @param paragraphs - Array of paragraphs
67
+ * @param position - Position to get text after
68
+ * @param maxChars - Maximum characters to return
69
+ * @returns Text after the position
70
+ */
71
+ declare function getTextAfter(paragraphs: Paragraph[], position: Position, maxChars: number): string;
72
+ /**
73
+ * Get formatting at a specific position in a paragraph
74
+ *
75
+ * @param paragraph - The paragraph to check
76
+ * @param offset - Character offset in the paragraph
77
+ * @returns Formatting at that position
78
+ */
79
+ declare function getFormattingAtPosition(paragraph: Paragraph, offset: number): Partial<TextFormatting>;
80
+ /**
81
+ * Check if position is within a hyperlink
82
+ *
83
+ * @param paragraph - The paragraph to check
84
+ * @param offset - Character offset in the paragraph
85
+ * @returns True if position is in a hyperlink
86
+ */
87
+ declare function isPositionInHyperlink(paragraph: Paragraph, offset: number): boolean;
88
+ /**
89
+ * Get hyperlink at position
90
+ *
91
+ * @param paragraph - The paragraph to check
92
+ * @param offset - Character offset in the paragraph
93
+ * @returns The hyperlink at that position, or undefined
94
+ */
95
+ declare function getHyperlinkAtPosition(paragraph: Paragraph, offset: number): Hyperlink | undefined;
96
+ /**
97
+ * Check if style ID represents a heading
98
+ *
99
+ * @param styleId - Style ID to check
100
+ * @returns True if it's a heading style
101
+ */
102
+ declare function isHeadingStyle(styleId?: string): boolean;
103
+ /**
104
+ * Parse heading level from style ID
105
+ *
106
+ * @param styleId - Style ID to parse
107
+ * @returns Heading level (1-9) or undefined
108
+ */
109
+ declare function parseHeadingLevel(styleId?: string): number | undefined;
110
+ /**
111
+ * Check if document body has images
112
+ *
113
+ * @param body - Document body to check
114
+ * @returns True if contains images
115
+ */
116
+ declare function hasImages(body: DocumentBody): boolean;
117
+ /**
118
+ * Check if document body has hyperlinks
119
+ *
120
+ * @param body - Document body to check
121
+ * @returns True if contains hyperlinks
122
+ */
123
+ declare function hasHyperlinks(body: DocumentBody): boolean;
124
+ /**
125
+ * Check if document body has tables
126
+ *
127
+ * @param body - Document body to check
128
+ * @returns True if contains tables
129
+ */
130
+ declare function hasTables(body: DocumentBody): boolean;
131
+ /**
132
+ * Get all paragraphs from document body
133
+ *
134
+ * @param body - Document body
135
+ * @returns Array of paragraphs
136
+ */
137
+ declare function getParagraphs(body: DocumentBody): Paragraph[];
138
+ /**
139
+ * Get paragraph at index from document body
140
+ *
141
+ * @param body - Document body
142
+ * @param index - Paragraph index (0-indexed)
143
+ * @returns Paragraph or undefined
144
+ */
145
+ declare function getParagraphAtIndex(body: DocumentBody, index: number): Paragraph | undefined;
146
+ /**
147
+ * Get block index for a paragraph index
148
+ *
149
+ * @param body - Document body
150
+ * @param paragraphIndex - Paragraph index
151
+ * @returns Block index or -1 if not found
152
+ */
153
+ declare function getBlockIndexForParagraph(body: DocumentBody, paragraphIndex: number): number;
154
+
155
+ /**
156
+ * Headless API Entry Point
157
+ *
158
+ * Provides document manipulation functionality without React/DOM dependencies.
159
+ * Suitable for Node.js scripts, CLI tools, and server-side processing.
160
+ *
161
+ * @example
162
+ * ```ts
163
+ * import { DocumentAgent, parseDocx, pluginRegistry } from '@postnzt/docx-editor/headless';
164
+ * import { docxtemplaterPlugin } from '@postnzt/docx-editor/core-plugins';
165
+ *
166
+ * // Register plugins
167
+ * pluginRegistry.register(docxtemplaterPlugin);
168
+ *
169
+ * // Load and manipulate document
170
+ * const buffer = fs.readFileSync('template.docx');
171
+ * const agent = await DocumentAgent.fromBuffer(buffer);
172
+ *
173
+ * // Get document info
174
+ * console.log('Word count:', agent.getWordCount());
175
+ * console.log('Variables:', agent.getVariables());
176
+ *
177
+ * // Edit document
178
+ * const newAgent = agent
179
+ * .insertText({ paragraphIndex: 0, offset: 0 }, 'Hello ')
180
+ * .applyStyle(0, 'Heading1');
181
+ *
182
+ * // Apply template variables
183
+ * const finalAgent = await newAgent.applyVariables({
184
+ * customer_name: 'Jane Doe',
185
+ * date: '2024-02-15',
186
+ * });
187
+ *
188
+ * // Export
189
+ * const output = await finalAgent.toBuffer();
190
+ * fs.writeFileSync('output.docx', Buffer.from(output));
191
+ * ```
192
+ */
193
+ declare const VERSION = "0.0.2";
194
+
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 };
@@ -0,0 +1,4 @@
1
+ 'use strict';var chunkQVPR2W5S_js=require('./chunk-QVPR2W5S.js'),chunkP7WEP4JU_js=require('./chunk-P7WEP4JU.js'),chunk4VUZBV2S_js=require('./chunk-4VUZBV2S.js'),chunkKCOGY3V2_js=require('./chunk-KCOGY3V2.js'),chunkPB7VMDDP_js=require('./chunk-PB7VMDDP.js'),chunkZJNGMDRE_js=require('./chunk-ZJNGMDRE.js'),chunkAARNCPWR_js=require('./chunk-AARNCPWR.js'),chunkKUL2SDYC_js=require('./chunk-KUL2SDYC.js'),chunkBUEMG4NW_js=require('./chunk-BUEMG4NW.js'),chunkSE5EN2QL_js=require('./chunk-SE5EN2QL.js');require('./chunk-IFPN3NT3.js'),require('./chunk-H5NTJZO4.js');function l(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 f(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(l(r));return e.join(" ")}function Ne(n){let e=[];for(let t of n.content)t.type==="paragraph"?e.push(l(t)):t.type==="table"&&e.push(f(t));return e.join(`
2
+ `)}function m(n){return n.split(/\s+/).filter(t=>t.length>0).length}function qe(n,e=true){return e?n.length:n.replace(/\s/g,"").length}function Ze(n){let e=0;for(let t of n.content)t.type==="paragraph"?e+=m(l(t)):t.type==="table"&&(e+=_e(t));return e}function _e(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+=m(l(r)));return e}function Je(n){let e=0;for(let t of n.content)t.type==="paragraph"?e+=l(t).length:t.type==="table"&&(e+=Ue(t));return e}function Ue(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+=l(r).length);return e}function Xe(n,e,t){let o=[],r=0,i=n[e.paragraphIndex];if(i){let s=l(i).slice(0,e.offset);o.unshift(s),r+=s.length;}for(let p=e.paragraphIndex-1;p>=0&&r<t;p--){let s=n[p];if(!s)continue;let u=l(s);o.unshift(u),r+=u.length;}let a=o.join(`
3
+ `);return a.length>t?"..."+a.slice(-t):a}function Ge(n,e,t){let o=[],r=0,i=n[e.paragraphIndex];if(i){let s=l(i).slice(e.offset);o.push(s),r+=s.length;}for(let p=e.paragraphIndex+1;p<n.length&&r<t;p++){let s=n[p];if(!s)continue;let u=l(s);o.push(u),r+=u.length;}let a=o.join(`
4
+ `);return a.length>t?a.slice(0,t)+"...":a}function Ke(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 Qe(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 Ye(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 $e(n){return n?n.toLowerCase().includes("heading"):false}function et(n){if(!n)return;let e=n.match(/heading\s*(\d)/i);if(e)return parseInt(e[1],10)}function tt(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 nt(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 ot(n){return n.content.some(e=>e.type==="table")}function x(n){return n.content.filter(e=>e.type==="paragraph")}function rt(n,e){return x(n)[e]}function at(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 st="0.0.2";Object.defineProperty(exports,"DEFAULT_AI_ACTIONS",{enumerable:true,get:function(){return chunkQVPR2W5S_js.g}});Object.defineProperty(exports,"comparePositions",{enumerable:true,get:function(){return chunkQVPR2W5S_js.d}});Object.defineProperty(exports,"createCollapsedRange",{enumerable:true,get:function(){return chunkQVPR2W5S_js.a}});Object.defineProperty(exports,"createCommand",{enumerable:true,get:function(){return chunkQVPR2W5S_js.h}});Object.defineProperty(exports,"createRange",{enumerable:true,get:function(){return chunkQVPR2W5S_js.b}});Object.defineProperty(exports,"getActionDescription",{enumerable:true,get:function(){return chunkQVPR2W5S_js.f}});Object.defineProperty(exports,"getActionLabel",{enumerable:true,get:function(){return chunkQVPR2W5S_js.e}});Object.defineProperty(exports,"isPositionInRange",{enumerable:true,get:function(){return chunkQVPR2W5S_js.c}});Object.defineProperty(exports,"DocumentAgent",{enumerable:true,get:function(){return chunkP7WEP4JU_js.f}});Object.defineProperty(exports,"attemptSelectiveSave",{enumerable:true,get:function(){return chunkP7WEP4JU_js.c}});Object.defineProperty(exports,"buildExtendedSelectionContext",{enumerable:true,get:function(){return chunkP7WEP4JU_js.m}});Object.defineProperty(exports,"buildPatchedDocumentXml",{enumerable:true,get:function(){return chunkP7WEP4JU_js.b}});Object.defineProperty(exports,"buildSelectionContext",{enumerable:true,get:function(){return chunkP7WEP4JU_js.l}});Object.defineProperty(exports,"buildSelectionContextFromContext",{enumerable:true,get:function(){return chunkP7WEP4JU_js.j}});Object.defineProperty(exports,"createAgent",{enumerable:true,get:function(){return chunkP7WEP4JU_js.g}});Object.defineProperty(exports,"createAgentFromDocument",{enumerable:true,get:function(){return chunkP7WEP4JU_js.h}});Object.defineProperty(exports,"createDocumentWithText",{enumerable:true,get:function(){return chunkP7WEP4JU_js.e}});Object.defineProperty(exports,"createEmptyDocument",{enumerable:true,get:function(){return chunkP7WEP4JU_js.d}});Object.defineProperty(exports,"getAgentContext",{enumerable:true,get:function(){return chunkP7WEP4JU_js.i}});Object.defineProperty(exports,"getDocumentSummary",{enumerable:true,get:function(){return chunkP7WEP4JU_js.k}});Object.defineProperty(exports,"getSelectionFormattingSummary",{enumerable:true,get:function(){return chunkP7WEP4JU_js.n}});Object.defineProperty(exports,"validatePatchSafety",{enumerable:true,get:function(){return chunkP7WEP4JU_js.a}});Object.defineProperty(exports,"blendColors",{enumerable:true,get:function(){return chunk4VUZBV2S_js.l}});Object.defineProperty(exports,"colorsEqual",{enumerable:true,get:function(){return chunk4VUZBV2S_js.q}});Object.defineProperty(exports,"createRgbColor",{enumerable:true,get:function(){return chunk4VUZBV2S_js.i}});Object.defineProperty(exports,"createThemeColor",{enumerable:true,get:function(){return chunk4VUZBV2S_js.h}});Object.defineProperty(exports,"darkenColor",{enumerable:true,get:function(){return chunk4VUZBV2S_js.j}});Object.defineProperty(exports,"getContrastingColor",{enumerable:true,get:function(){return chunk4VUZBV2S_js.f}});Object.defineProperty(exports,"isBlack",{enumerable:true,get:function(){return chunk4VUZBV2S_js.d}});Object.defineProperty(exports,"isWhite",{enumerable:true,get:function(){return chunk4VUZBV2S_js.e}});Object.defineProperty(exports,"lightenColor",{enumerable:true,get:function(){return chunk4VUZBV2S_js.k}});Object.defineProperty(exports,"parseColorString",{enumerable:true,get:function(){return chunk4VUZBV2S_js.g}});Object.defineProperty(exports,"resolveColor",{enumerable:true,get:function(){return chunk4VUZBV2S_js.a}});Object.defineProperty(exports,"resolveHighlightColor",{enumerable:true,get:function(){return chunk4VUZBV2S_js.b}});Object.defineProperty(exports,"resolveShadingColor",{enumerable:true,get:function(){return chunk4VUZBV2S_js.c}});Object.defineProperty(exports,"detectVariables",{enumerable:true,get:function(){return chunkKCOGY3V2_js.a}});Object.defineProperty(exports,"detectVariablesDetailed",{enumerable:true,get:function(){return chunkKCOGY3V2_js.b}});Object.defineProperty(exports,"detectVariablesInBody",{enumerable:true,get:function(){return chunkKCOGY3V2_js.c}});Object.defineProperty(exports,"detectVariablesInParagraph",{enumerable:true,get:function(){return chunkKCOGY3V2_js.d}});Object.defineProperty(exports,"documentHasVariables",{enumerable:true,get:function(){return chunkKCOGY3V2_js.m}});Object.defineProperty(exports,"extractVariablesFromText",{enumerable:true,get:function(){return chunkKCOGY3V2_js.e}});Object.defineProperty(exports,"formatVariable",{enumerable:true,get:function(){return chunkKCOGY3V2_js.i}});Object.defineProperty(exports,"hasTemplateVariables",{enumerable:true,get:function(){return chunkKCOGY3V2_js.f}});Object.defineProperty(exports,"isValidVariableName",{enumerable:true,get:function(){return chunkKCOGY3V2_js.g}});Object.defineProperty(exports,"isZodSchema",{enumerable:true,get:function(){return chunkKCOGY3V2_js.n}});Object.defineProperty(exports,"parseVariable",{enumerable:true,get:function(){return chunkKCOGY3V2_js.j}});Object.defineProperty(exports,"removeVariables",{enumerable:true,get:function(){return chunkKCOGY3V2_js.l}});Object.defineProperty(exports,"replaceVariables",{enumerable:true,get:function(){return chunkKCOGY3V2_js.k}});Object.defineProperty(exports,"sanitizeVariableName",{enumerable:true,get:function(){return chunkKCOGY3V2_js.h}});Object.defineProperty(exports,"createTemplateProcessor",{enumerable:true,get:function(){return chunkPB7VMDDP_js.j}});Object.defineProperty(exports,"getMissingVariables",{enumerable:true,get:function(){return chunkPB7VMDDP_js.g}});Object.defineProperty(exports,"getTemplateTags",{enumerable:true,get:function(){return chunkPB7VMDDP_js.e}});Object.defineProperty(exports,"previewTemplate",{enumerable:true,get:function(){return chunkPB7VMDDP_js.h}});Object.defineProperty(exports,"processTemplate",{enumerable:true,get:function(){return chunkPB7VMDDP_js.a}});Object.defineProperty(exports,"processTemplateAdvanced",{enumerable:true,get:function(){return chunkPB7VMDDP_js.i}});Object.defineProperty(exports,"processTemplateAsBlob",{enumerable:true,get:function(){return chunkPB7VMDDP_js.c}});Object.defineProperty(exports,"processTemplateDetailed",{enumerable:true,get:function(){return chunkPB7VMDDP_js.b}});Object.defineProperty(exports,"validateTemplate",{enumerable:true,get:function(){return chunkPB7VMDDP_js.f}});Object.defineProperty(exports,"createDocx",{enumerable:true,get:function(){return chunkZJNGMDRE_js.r}});Object.defineProperty(exports,"repackDocx",{enumerable:true,get:function(){return chunkZJNGMDRE_js.i}});Object.defineProperty(exports,"serializeDocumentBody",{enumerable:true,get:function(){return chunkZJNGMDRE_js.b}});Object.defineProperty(exports,"serializeDocx",{enumerable:true,get:function(){return chunkZJNGMDRE_js.c}});Object.defineProperty(exports,"serializeSectionProperties",{enumerable:true,get:function(){return chunkZJNGMDRE_js.a}});Object.defineProperty(exports,"updateMultipleFiles",{enumerable:true,get:function(){return chunkZJNGMDRE_js.n}});Object.defineProperty(exports,"executeCommand",{enumerable:true,get:function(){return chunkAARNCPWR_js.a}});Object.defineProperty(exports,"executeCommands",{enumerable:true,get:function(){return chunkAARNCPWR_js.b}});Object.defineProperty(exports,"parseDocx",{enumerable:true,get:function(){return chunkKUL2SDYC_js.n}});Object.defineProperty(exports,"PluginRegistry",{enumerable:true,get:function(){return chunkBUEMG4NW_js.a}});Object.defineProperty(exports,"createPluginRegistrar",{enumerable:true,get:function(){return chunkBUEMG4NW_js.d}});Object.defineProperty(exports,"pluginRegistry",{enumerable:true,get:function(){return chunkBUEMG4NW_js.b}});Object.defineProperty(exports,"registerPlugins",{enumerable:true,get:function(){return chunkBUEMG4NW_js.c}});Object.defineProperty(exports,"emuToPixels",{enumerable:true,get:function(){return chunkSE5EN2QL_js.c}});Object.defineProperty(exports,"emuToTwips",{enumerable:true,get:function(){return chunkSE5EN2QL_js.e}});Object.defineProperty(exports,"formatPx",{enumerable:true,get:function(){return chunkSE5EN2QL_js.k}});Object.defineProperty(exports,"halfPointsToPixels",{enumerable:true,get:function(){return chunkSE5EN2QL_js.h}});Object.defineProperty(exports,"pixelsToEmu",{enumerable:true,get:function(){return chunkSE5EN2QL_js.d}});Object.defineProperty(exports,"pixelsToTwips",{enumerable:true,get:function(){return chunkSE5EN2QL_js.b}});Object.defineProperty(exports,"pointsToPixels",{enumerable:true,get:function(){return chunkSE5EN2QL_js.g}});Object.defineProperty(exports,"twipsToEmu",{enumerable:true,get:function(){return chunkSE5EN2QL_js.f}});Object.defineProperty(exports,"twipsToPixels",{enumerable:true,get:function(){return chunkSE5EN2QL_js.a}});exports.VERSION=st;exports.countCharacters=qe;exports.countWords=m;exports.getBlockIndexForParagraph=at;exports.getBodyCharacterCount=Je;exports.getBodyText=Ne;exports.getBodyWordCount=Ze;exports.getFormattingAtPosition=Ke;exports.getHyperlinkAtPosition=Ye;exports.getHyperlinkText=g;exports.getParagraphAtIndex=rt;exports.getParagraphText=l;exports.getParagraphs=x;exports.getRunText=c;exports.getTableText=f;exports.getTextAfter=Ge;exports.getTextBefore=Xe;exports.hasHyperlinks=nt;exports.hasImages=tt;exports.hasTables=ot;exports.isHeadingStyle=$e;exports.isPositionInHyperlink=Qe;exports.parseHeadingLevel=et;
@@ -0,0 +1,4 @@
1
+ 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-6WPRCJ5A.mjs';export{f as DocumentAgent,c as attemptSelectiveSave,m as buildExtendedSelectionContext,b as buildPatchedDocumentXml,l as buildSelectionContext,j as buildSelectionContextFromContext,g as createAgent,h as createAgentFromDocument,e as createDocumentWithText,d as createEmptyDocument,i as getAgentContext,k as getDocumentSummary,n as getSelectionFormattingSummary,a as validatePatchSafety}from'./chunk-7QTNB64A.mjs';export{l as blendColors,q as colorsEqual,i as createRgbColor,h as createThemeColor,j as darkenColor,f as getContrastingColor,d as isBlack,e as isWhite,k as lightenColor,g as parseColorString,a as resolveColor,b as resolveHighlightColor,c as resolveShadingColor}from'./chunk-QAZ4233N.mjs';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,n as isZodSchema,j as parseVariable,l as removeVariables,k as replaceVariables,h as sanitizeVariableName}from'./chunk-RTFUE3KK.mjs';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-DLVLK5FT.mjs';export{r as createDocx,i as repackDocx,b as serializeDocumentBody,c as serializeDocx,a as serializeSectionProperties,n as updateMultipleFiles}from'./chunk-37SLIJPH.mjs';export{a as executeCommand,b as executeCommands}from'./chunk-M5F4SK3W.mjs';export{n as parseDocx}from'./chunk-7MGFEP2R.mjs';export{a as PluginRegistry,d as createPluginRegistrar,b as pluginRegistry,c as registerPlugins}from'./chunk-W53SI3XW.mjs';export{c as emuToPixels,e as emuToTwips,k as formatPx,h as halfPointsToPixels,d as pixelsToEmu,b as pixelsToTwips,g as pointsToPixels,f as twipsToEmu,a as twipsToPixels}from'./chunk-LYBG4YI7.mjs';import'./chunk-WOHFANC5.mjs';import'./chunk-TAUMSKRE.mjs';function l(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 f(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(l(r));return e.join(" ")}function Ne(n){let e=[];for(let t of n.content)t.type==="paragraph"?e.push(l(t)):t.type==="table"&&e.push(f(t));return e.join(`
2
+ `)}function m(n){return n.split(/\s+/).filter(t=>t.length>0).length}function qe(n,e=true){return e?n.length:n.replace(/\s/g,"").length}function Ze(n){let e=0;for(let t of n.content)t.type==="paragraph"?e+=m(l(t)):t.type==="table"&&(e+=_e(t));return e}function _e(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+=m(l(r)));return e}function Je(n){let e=0;for(let t of n.content)t.type==="paragraph"?e+=l(t).length:t.type==="table"&&(e+=Ue(t));return e}function Ue(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+=l(r).length);return e}function Xe(n,e,t){let o=[],r=0,i=n[e.paragraphIndex];if(i){let s=l(i).slice(0,e.offset);o.unshift(s),r+=s.length;}for(let p=e.paragraphIndex-1;p>=0&&r<t;p--){let s=n[p];if(!s)continue;let u=l(s);o.unshift(u),r+=u.length;}let a=o.join(`
3
+ `);return a.length>t?"..."+a.slice(-t):a}function Ge(n,e,t){let o=[],r=0,i=n[e.paragraphIndex];if(i){let s=l(i).slice(e.offset);o.push(s),r+=s.length;}for(let p=e.paragraphIndex+1;p<n.length&&r<t;p++){let s=n[p];if(!s)continue;let u=l(s);o.push(u),r+=u.length;}let a=o.join(`
4
+ `);return a.length>t?a.slice(0,t)+"...":a}function Ke(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 Qe(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 Ye(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 $e(n){return n?n.toLowerCase().includes("heading"):false}function et(n){if(!n)return;let e=n.match(/heading\s*(\d)/i);if(e)return parseInt(e[1],10)}function tt(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 nt(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 ot(n){return n.content.some(e=>e.type==="table")}function x(n){return n.content.filter(e=>e.type==="paragraph")}function rt(n,e){return x(n)[e]}function at(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 st="0.0.2";export{st as VERSION,qe as countCharacters,m as countWords,at as getBlockIndexForParagraph,Je as getBodyCharacterCount,Ne as getBodyText,Ze as getBodyWordCount,Ke as getFormattingAtPosition,Ye as getHyperlinkAtPosition,g as getHyperlinkText,rt as getParagraphAtIndex,l as getParagraphText,x as getParagraphs,c as getRunText,f as getTableText,Ge as getTextAfter,Xe as getTextBefore,nt as hasHyperlinks,tt as hasImages,ot as hasTables,$e as isHeadingStyle,Qe as isPositionInHyperlink,et as parseHeadingLevel};
package/dist/index.css ADDED
@@ -0,0 +1 @@
1
+ .prosemirror-editor-wrapper{min-height:100%}.prosemirror-editor{width:var(--page-width, 8.5in)}.prosemirror-editor .ProseMirror{background:#fff;box-shadow:0 2px 8px #00000026;width:var(--page-width, 8.5in);min-height:var(--page-height, 11in);padding-top:var(--margin-top, 72px);padding-bottom:var(--margin-bottom, 72px);padding-left:var(--margin-left, 72px);padding-right:var(--margin-right, 72px);outline:none;font-family:Calibri,Arial,sans-serif;font-size:11pt;color:#000;white-space:pre-wrap;word-wrap:break-word;-o-tab-size:48;tab-size:48;-moz-tab-size:48;box-sizing:border-box;position:relative}.prosemirror-editor .ProseMirror .docx-page-break{display:block;position:relative;height:40px;margin:0 calc(-1 * var(--margin-left, 72px));margin-right:calc(-1 * var(--margin-right, 72px));background:var(--doc-bg);border:none;pointer-events:none}.prosemirror-editor .ProseMirror .docx-page-break:before{content:"";position:absolute;bottom:0;left:0;right:0;height:8px;background:linear-gradient(to bottom,transparent,rgba(0,0,0,.08))}.prosemirror-editor .ProseMirror .docx-page-break:after{content:"";position:absolute;top:0;left:0;right:0;height:8px;background:linear-gradient(to top,transparent,rgba(0,0,0,.08))}.prosemirror-editor .ProseMirror [data-page-break-before=true]{-moz-column-break-before:page;break-before:page}.prosemirror-editor .ProseMirror .docx-page-break-line{display:block;position:relative;height:1px;margin:20px calc(-1 * var(--margin-left, 72px));margin-right:calc(-1 * var(--margin-right, 72px));border-top:1px dashed var(--doc-border)}.prosemirror-editor .ProseMirror .docx-page-break-line:before{content:"Page Break";position:absolute;top:-10px;left:50%;transform:translate(-50%);background:var(--doc-bg);padding:0 8px;font-size:10px;color:var(--doc-text-muted);white-space:nowrap}.prosemirror-editor .ProseMirror:focus{outline:none}.prosemirror-editor .ProseMirror p{display:block;margin:0;padding:0;min-height:1em;white-space:pre-wrap;word-wrap:break-word;line-height:normal}.prosemirror-editor .ProseMirror p:empty:before{content:"\a0"}.prosemirror-editor .ProseMirror span{display:inline;white-space:pre-wrap}.prosemirror-editor .ProseMirror .docx-list-bullet,.prosemirror-editor .ProseMirror .docx-list-numbered{position:relative;padding-left:48px}.prosemirror-editor .ProseMirror [data-list-marker]:before{content:attr(data-list-marker);position:absolute;left:0;width:44px;text-align:right;white-space:nowrap}.prosemirror-editor .ProseMirror .docx-list-bullet:not([data-list-marker]):before{content:"\2022";position:absolute;left:0;width:44px;text-align:right}.prosemirror-editor .ProseMirror .docx-list-numbered:not([data-list-marker]){counter-increment:list-counter}.prosemirror-editor .ProseMirror .docx-list-decimal:not([data-list-marker]):before{content:counter(list-counter) ".";position:absolute;left:0;width:44px;text-align:right}.prosemirror-editor .ProseMirror .docx-list-lower-roman:not([data-list-marker]):before{content:counter(list-counter,lower-roman) ".";position:absolute;left:0;width:44px;text-align:right}.prosemirror-editor .ProseMirror .docx-list-upper-roman:not([data-list-marker]):before{content:counter(list-counter,upper-roman) ".";position:absolute;left:0;width:44px;text-align:right}.prosemirror-editor .ProseMirror .docx-list-lower-alpha:not([data-list-marker]):before{content:counter(list-counter,lower-alpha) ".";position:absolute;left:0;width:44px;text-align:right}.prosemirror-editor .ProseMirror .docx-list-upper-alpha:not([data-list-marker]):before{content:counter(list-counter,upper-alpha) ".";position:absolute;left:0;width:44px;text-align:right}.prosemirror-editor .ProseMirror .docx-list-level-0:not([data-list-marker]):first-of-type{counter-reset:list-counter}.prosemirror-editor .ProseMirror .docx-list-level-1{margin-left:.5in}.prosemirror-editor .ProseMirror .docx-list-level-2{margin-left:1in}.prosemirror-editor .ProseMirror .docx-list-level-3{margin-left:1.5in}.prosemirror-editor .ProseMirror .docx-list-level-4{margin-left:2in}.prosemirror-editor .ProseMirror .docx-list-level-5{margin-left:2.5in}.prosemirror-editor .ProseMirror .docx-list-level-6{margin-left:3in}.prosemirror-editor .ProseMirror .docx-list-level-7{margin-left:3.5in}.prosemirror-editor .ProseMirror .docx-list-level-8{margin-left:4in}.prosemirror-editor .ProseMirror ::-moz-selection{background:#4285f44d}.prosemirror-editor .ProseMirror ::selection{background:#4285f44d}.prosemirror-editor[data-placeholder]:before{content:attr(data-placeholder);color:#aaa;position:absolute;pointer-events:none}.prosemirror-editor .ProseMirror img.docx-image{display:inline;max-width:100%;-o-object-fit:contain;object-fit:contain;vertical-align:baseline;outline:none}.prosemirror-editor .ProseMirror img.docx-image-float-left{clear:left}.prosemirror-editor .ProseMirror img.docx-image-float-right{clear:right}.prosemirror-editor .ProseMirror img.docx-image-block{clear:both}.prosemirror-editor .ProseMirror p:has(>img.docx-image-block:only-child){text-indent:0!important;text-align:center}.prosemirror-editor .ProseMirror p:has(img.docx-image-float):after{content:"";display:table;clear:both}.prosemirror-editor .ProseMirror img.docx-image.ProseMirror-selectednode{outline:2px solid var(--doc-primary, #4285f4);outline-offset:2px;cursor:grab}.prosemirror-editor .ProseMirror.pm-image-dragging img.docx-image.ProseMirror-selectednode{opacity:.4;outline:2px dashed var(--doc-primary, #4285f4);cursor:grabbing}.prosemirror-editor .ProseMirror img:not(.docx-image){max-width:100%;height:auto}.prosemirror-editor .ProseMirror .docx-shape{display:inline-block;vertical-align:middle;line-height:0;cursor:pointer}.prosemirror-editor .ProseMirror .docx-shape.ProseMirror-selectednode{outline:2px solid var(--doc-primary, #4285f4);outline-offset:2px}.prosemirror-editor .ProseMirror .docx-textbox{border-radius:2px;margin:4px 0;cursor:text}.prosemirror-editor .ProseMirror .docx-textbox.ProseMirror-selectednode{outline:2px solid var(--doc-primary, #4285f4);outline-offset:2px}.prosemirror-editor .ProseMirror a{color:var(--doc-link);text-decoration:underline}.prosemirror-editor .ProseMirror a:hover{color:var(--doc-primary-hover)}.prosemirror-editor .ProseMirror .docx-footnote-ref,.prosemirror-editor .ProseMirror .docx-endnote-ref{color:var(--doc-link, #0066cc);cursor:pointer;vertical-align:super;font-size:smaller}.prosemirror-editor .ProseMirror .docx-footnote-ref:hover,.prosemirror-editor .ProseMirror .docx-endnote-ref:hover{text-decoration:underline}.prosemirror-editor .ProseMirror hr{border:none;border-top:1px solid #000;margin:12pt 0;height:0}.prosemirror-editor .ProseMirror table.docx-table{border-collapse:collapse;margin:12pt 0;max-width:100%}.prosemirror-editor .ProseMirror td.docx-table-cell,.prosemirror-editor .ProseMirror th.docx-table-header{padding:4px 8px;vertical-align:top;min-width:30px}.prosemirror-editor .ProseMirror th.docx-table-header{font-weight:700;text-align:left}.prosemirror-editor .ProseMirror td p,.prosemirror-editor .ProseMirror th p{margin:0;padding:0;min-height:auto}.prosemirror-editor .ProseMirror td p:first-child,.prosemirror-editor .ProseMirror th p:first-child{margin-top:0}.prosemirror-editor .ProseMirror td p:last-child,.prosemirror-editor .ProseMirror th p:last-child{margin-bottom:0}.prosemirror-editor .ProseMirror .activeCell{outline:2px solid rgba(66,133,244,.5);outline-offset:-2px}.prosemirror-editor .ProseMirror .selectedCell{background-color:#4285f426}.prosemirror-editor .ProseMirror .selectedCell:after{content:"";position:absolute;inset:0;background:#4285f41a;pointer-events:none}.prosemirror-editor .ProseMirror table table{margin:4px 0}.prosemirror-editor .ProseMirror .column-resize-handle{position:absolute;right:-2px;top:0;bottom:0;width:4px;background-color:#4285f480;cursor:col-resize;z-index:20}.prosemirror-editor .ProseMirror td.docx-table-cell,.prosemirror-editor .ProseMirror th.docx-table-header{position:relative}.prosemirror-editor .ProseMirror.resize-cursor{cursor:col-resize}.prosemirror-editor .ProseMirror table:not(:hover) .column-resize-handle{background-color:transparent}.prosemirror-editor .ProseMirror table:hover .column-resize-handle{background-color:#4285f44d}.prosemirror-editor .ProseMirror .column-resize-handle:hover{background-color:#4285f4b3}.prosemirror-editor .ProseMirror span.docx-tab{display:inline-block;min-width:48px;white-space:pre;background:transparent}.prosemirror-editor .ProseMirror span.docx-tab[data-leader=dot]:before{content:"...........";position:absolute;color:inherit;white-space:nowrap;overflow:hidden}.prosemirror-editor .ProseMirror span.docx-tab[data-leader=hyphen]:before{content:"-----------";position:absolute;color:inherit;white-space:nowrap;overflow:hidden}.prosemirror-editor .ProseMirror span.docx-tab[data-leader=underscore]:before{content:"___________";position:absolute;color:inherit;white-space:nowrap;overflow:hidden}.prosemirror-editor .ProseMirror .docx-run-all-caps{text-transform:uppercase}.prosemirror-editor .ProseMirror .docx-run-small-caps{font-variant:small-caps}.docx-section-break{position:relative}.docx-section-break:after{content:"Section Break (" attr(data-section-break) ")";display:block;text-align:center;font-size:9px;color:var(--doc-text-muted, #9ca3af);border-top:1px dashed var(--doc-border, #d1d5db);margin-top:4px;padding-top:2px;pointer-events:none}.prosemirror-editor .ProseMirror .pm-drop-indicator{position:absolute;width:2px;background:var(--doc-primary, #4285f4);pointer-events:none;z-index:50}.prosemirror-editor .ProseMirror .ProseMirror-dropcursor{z-index:50}.layout-page-content{cursor:text}.layout-page-header,.layout-page-footer{cursor:pointer;transition:background-color .15s ease}.layout-page-header:hover,.layout-page-footer:hover{background-color:#2563eb0f}.layout-page-header:empty:hover:after{content:"Double-click to add header";display:block;text-align:center;color:#9ca3af;font-size:11px;padding:4px 0}.layout-page-footer:empty:hover:after{content:"Double-click to add footer";display:block;text-align:center;color:#9ca3af;font-size:11px;padding:4px 0}.hf-editor-pm .ProseMirror{outline:none;min-height:40px;padding:4px}.hf-editor-pm .ProseMirror:focus{outline:none}.hf-editor-pm .ProseMirror p{display:block;margin:0!important;padding:0;min-height:1em;white-space:pre-wrap;word-wrap:break-word;line-height:normal!important}.paged-editor--hf-editing .layout-page-content{opacity:.4;pointer-events:none;transition:opacity .15s ease}.paged-editor--editing-header .layout-page-header{border-bottom:1px dotted #4285f4}.paged-editor--editing-footer .layout-page-footer{border-top:1px dotted #4285f4}.paged-editor--editing-header .layout-page-header>*{visibility:hidden}.paged-editor--editing-footer .layout-page-footer>*{visibility:hidden}.paged-editor--hf-editing .layout-page-header:hover,.paged-editor--hf-editing .layout-page-footer:hover{background-color:transparent}