@zeke-02/docx-editor 0.5.2 → 0.5.4

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 (223) hide show
  1. package/LICENSE +204 -0
  2. package/dist/FindReplaceDialog-7SQOVQWH.js +1 -0
  3. package/dist/FindReplaceDialog-RK3A7MSK.mjs +1 -0
  4. package/dist/{FootnotePropertiesDialog-XQ7NIFIU.js → FootnotePropertiesDialog-2Q2SHVMR.js} +1 -1
  5. package/dist/{FootnotePropertiesDialog-TNVJJCY6.mjs → FootnotePropertiesDialog-ZKQXW3YO.mjs} +1 -1
  6. package/dist/{HyperlinkDialog-FR4IZZ7E.mjs → HyperlinkDialog-QV3CVFQU.mjs} +1 -1
  7. package/dist/HyperlinkDialog-XVAF7FVN.js +1 -0
  8. package/dist/{ImagePositionDialog-JSZSIKF5.mjs → ImagePositionDialog-EGRH3HPP.mjs} +1 -1
  9. package/dist/{ImagePositionDialog-2YXRAGZS.js → ImagePositionDialog-HIVHUTBT.js} +1 -1
  10. package/dist/ImagePropertiesDialog-67WLFIIZ.mjs +1 -0
  11. package/dist/ImagePropertiesDialog-HSM3JJ22.js +1 -0
  12. package/dist/KeyboardShortcutsDialog-B0UFuR4w.d.ts +395 -0
  13. package/dist/KeyboardShortcutsDialog-t6JKL4Aj.d.mts +395 -0
  14. package/dist/PageSetupDialog-642IAVG2.js +1 -0
  15. package/dist/PageSetupDialog-ERUQDHAY.mjs +1 -0
  16. package/dist/PluginHost-HS31VIuo.d.mts +16 -0
  17. package/dist/PluginHost-zILZO7zX.d.ts +16 -0
  18. package/dist/{SplitCellDialog-NP3JJYHD.mjs → SplitCellDialog-GFWCFCTD.mjs} +1 -1
  19. package/dist/{SplitCellDialog-JIAC3RYV.js → SplitCellDialog-M7WF7ANE.js} +1 -1
  20. package/dist/{TablePropertiesDialog-TIK4AA5M.mjs → TablePropertiesDialog-TZ7VCL6V.mjs} +1 -1
  21. package/dist/{TablePropertiesDialog-T7D4HSVP.js → TablePropertiesDialog-ZKU2FTUX.js} +1 -1
  22. package/dist/agentApi-B2Y7kexW.d.ts +486 -0
  23. package/dist/agentApi-BzUJ_kao.d.mts +486 -0
  24. package/dist/chunk-2XXILKEQ.js +1 -0
  25. package/dist/chunk-35DG3R42.js +2 -0
  26. package/dist/chunk-5UX5CD4C.js +1 -0
  27. package/dist/chunk-7QQSDIWK.mjs +2 -0
  28. package/dist/chunk-AW5TISUL.js +3 -0
  29. package/dist/chunk-B45ECEGY.js +18 -0
  30. package/dist/chunk-B7CCL7SL.mjs +2 -0
  31. package/dist/chunk-BRMTZRLJ.js +2 -0
  32. package/dist/chunk-D47GTKGU.js +2 -0
  33. package/dist/chunk-F5SERL7X.mjs +2 -0
  34. package/dist/chunk-FWPVBFKQ.mjs +1 -0
  35. package/dist/chunk-GGQK26JO.js +2 -0
  36. package/dist/chunk-GM2S2WMT.mjs +1 -0
  37. package/dist/chunk-HXDMASAR.js +1 -0
  38. package/dist/chunk-ILYKDR3C.js +1 -0
  39. package/dist/chunk-JFRDFK7V.mjs +260 -0
  40. package/dist/chunk-JPF5R2ZM.mjs +1 -0
  41. package/dist/chunk-KOXCF3CL.mjs +1 -0
  42. package/dist/chunk-KRLNX56Y.mjs +2 -0
  43. package/dist/chunk-LWOHVYKW.mjs +1 -0
  44. package/dist/chunk-MDTA25AN.mjs +60 -0
  45. package/dist/chunk-MKNSJOCN.js +70 -0
  46. package/dist/chunk-NIBCC7WQ.js +1 -0
  47. package/dist/chunk-NLFXR2VH.js +2 -0
  48. package/dist/chunk-NOLMVQNN.mjs +40 -0
  49. package/dist/chunk-ONIYA2FU.mjs +2 -0
  50. package/dist/chunk-RCIZ7OM3.mjs +70 -0
  51. package/dist/chunk-SGTUE33R.js +260 -0
  52. package/dist/{chunk-EHFEG3TX.js → chunk-SNZ57XBI.js} +1 -1
  53. package/dist/chunk-SOTWG3KJ.mjs +1 -0
  54. package/dist/chunk-TYPGB4KF.js +1 -0
  55. package/dist/chunk-U7ZW2DOO.mjs +2 -0
  56. package/dist/chunk-WO3FIV4B.js +40 -0
  57. package/dist/{chunk-PKEOQIQO.mjs → chunk-WPI3YRFO.mjs} +1 -1
  58. package/dist/chunk-XGJ2EORY.mjs +1 -0
  59. package/dist/chunk-XQZTWWRF.mjs +18 -0
  60. package/dist/chunk-Y3SEHWZ2.js +1 -0
  61. package/dist/chunk-YBEVHQCT.js +60 -0
  62. package/dist/chunk-ZVAFVHWR.mjs +3 -0
  63. package/dist/chunk-ZXPCJWVY.js +2 -0
  64. package/dist/{agentApi-DLt94vXk.d.mts → content-REFGFfEH.d.mts} +8 -755
  65. package/dist/{agentApi-DLt94vXk.d.ts → content-REFGFfEH.d.ts} +8 -755
  66. package/dist/dialogs.d.mts +25 -0
  67. package/dist/dialogs.d.ts +25 -0
  68. package/dist/dialogs.js +1 -0
  69. package/dist/dialogs.mjs +1 -0
  70. package/dist/document-Cu2vq_wS.d.mts +294 -0
  71. package/dist/document-CxOagoLQ.d.ts +294 -0
  72. package/dist/executor-WBHID2RK.mjs +1 -0
  73. package/dist/executor-Y5VUOAHY.js +1 -0
  74. package/dist/findReplace-Bue0JaXh.d.ts +138 -0
  75. package/dist/findReplace-shXbOjFQ.d.mts +138 -0
  76. package/dist/fork.d.mts +535 -0
  77. package/dist/fork.d.ts +535 -0
  78. package/dist/fork.js +1 -0
  79. package/dist/fork.mjs +1 -0
  80. package/dist/hooks.d.mts +598 -0
  81. package/dist/hooks.d.ts +598 -0
  82. package/dist/hooks.js +1 -0
  83. package/dist/hooks.mjs +1 -0
  84. package/dist/index-B5A-J9GC.d.ts +1119 -0
  85. package/dist/index-bw-PaozF.d.mts +1119 -0
  86. package/dist/index.d.mts +12 -591
  87. package/dist/index.d.ts +12 -591
  88. package/dist/index.js +1 -120
  89. package/dist/index.mjs +1 -120
  90. package/dist/layout-bridge-5GYGYKM5.mjs +1 -0
  91. package/dist/layout-bridge-QQDA7ELH.js +1 -0
  92. package/dist/plugin-api.d.mts +165 -0
  93. package/dist/plugin-api.d.ts +165 -0
  94. package/dist/plugin-api.js +1 -0
  95. package/dist/plugin-api.mjs +1 -0
  96. package/dist/processTemplate-BTBTR7AM.js +1 -0
  97. package/dist/{processTemplate-W2C5PXZB.mjs → processTemplate-MBX2KDLE.mjs} +1 -1
  98. package/dist/styles.css +1 -1
  99. package/dist/styles.d.mts +18 -0
  100. package/dist/styles.d.ts +18 -0
  101. package/dist/styles.js +1 -0
  102. package/dist/styles.mjs +1 -0
  103. package/dist/types-BF48VxkC.d.mts +18 -0
  104. package/dist/types-BF48VxkC.d.ts +18 -0
  105. package/dist/types-BnIs4sE7.d.mts +281 -0
  106. package/dist/types-BnIs4sE7.d.ts +281 -0
  107. package/dist/types-CW6HFAX6.d.ts +39 -0
  108. package/dist/types-DIsDCwTG.d.mts +39 -0
  109. package/dist/ui.d.mts +111 -552
  110. package/dist/ui.d.ts +111 -552
  111. package/dist/ui.js +111 -1
  112. package/dist/ui.mjs +111 -1
  113. package/dist/useFindReplace-DKy-s3gS.d.ts +261 -0
  114. package/dist/useFindReplace-vuoKpDKE.d.mts +261 -0
  115. package/package.json +47 -49
  116. package/dist/ClipboardManager-CVKX0v9q.d.ts +0 -464
  117. package/dist/ClipboardManager-V3aaMnWE.d.mts +0 -464
  118. package/dist/DocumentAgent-BWflKHpH.d.mts +0 -442
  119. package/dist/DocumentAgent-DsdXtetF.d.ts +0 -442
  120. package/dist/FindReplaceDialog-L3YF5HIS.mjs +0 -1
  121. package/dist/FindReplaceDialog-SEBWC5P7.js +0 -1
  122. package/dist/HyperlinkDialog-WEK6JSAC.js +0 -1
  123. package/dist/ImagePropertiesDialog-527MFLQO.mjs +0 -1
  124. package/dist/ImagePropertiesDialog-HG4K3IE7.js +0 -1
  125. package/dist/PageSetupDialog-GALVJMUB.js +0 -1
  126. package/dist/PageSetupDialog-TGQIAMI7.mjs +0 -1
  127. package/dist/TableToolbar-DUgmob2I.d.ts +0 -1273
  128. package/dist/TableToolbar-YL74HNS1.d.mts +0 -1273
  129. package/dist/chunk-23SXXIZS.js +0 -111
  130. package/dist/chunk-3F52AP2Q.js +0 -1
  131. package/dist/chunk-42O5GXM5.mjs +0 -82
  132. package/dist/chunk-54ULJEHM.mjs +0 -1
  133. package/dist/chunk-5XK326FI.mjs +0 -1
  134. package/dist/chunk-6WPRCJ5A.mjs +0 -1
  135. package/dist/chunk-76IYR7C7.mjs +0 -1
  136. package/dist/chunk-AGRIVA4G.js +0 -1
  137. package/dist/chunk-BTCQ2QI3.mjs +0 -3
  138. package/dist/chunk-BUEMG4NW.js +0 -1
  139. package/dist/chunk-BXRC4U3X.mjs +0 -2
  140. package/dist/chunk-CPAYKE6X.mjs +0 -1
  141. package/dist/chunk-DACWLFKI.mjs +0 -1
  142. package/dist/chunk-EPBFWE36.js +0 -2
  143. package/dist/chunk-FXES3YDB.js +0 -82
  144. package/dist/chunk-HI66BSGS.mjs +0 -9
  145. package/dist/chunk-INTPVEO6.mjs +0 -9
  146. package/dist/chunk-IOAGVW6Q.mjs +0 -2
  147. package/dist/chunk-JCEWC5QL.mjs +0 -4
  148. package/dist/chunk-JTIUFACT.js +0 -1
  149. package/dist/chunk-LUF7PWIC.js +0 -10
  150. package/dist/chunk-MGEN6GOE.mjs +0 -2
  151. package/dist/chunk-MOE2ZGUE.js +0 -18
  152. package/dist/chunk-MWLHJWB6.js +0 -9
  153. package/dist/chunk-OFYVDN3U.mjs +0 -2
  154. package/dist/chunk-P4VSHBGZ.js +0 -2
  155. package/dist/chunk-P5FQHIES.mjs +0 -1
  156. package/dist/chunk-PBC7XAYZ.js +0 -3
  157. package/dist/chunk-PEMB6SZT.js +0 -2
  158. package/dist/chunk-PQMSZTBB.js +0 -9
  159. package/dist/chunk-Q7UDQXAF.js +0 -1
  160. package/dist/chunk-QGTAIC5E.js +0 -1
  161. package/dist/chunk-QVPR2W5S.js +0 -1
  162. package/dist/chunk-R3QMYPL5.mjs +0 -59
  163. package/dist/chunk-RBUTXXQJ.mjs +0 -18
  164. package/dist/chunk-RRWYZ2TS.mjs +0 -111
  165. package/dist/chunk-S3STEPVO.js +0 -182
  166. package/dist/chunk-SFUM35DH.js +0 -2
  167. package/dist/chunk-SNLC6EK2.js +0 -1
  168. package/dist/chunk-TMTLIGLZ.js +0 -59
  169. package/dist/chunk-TSE2PWFX.mjs +0 -10
  170. package/dist/chunk-UKESXQS5.mjs +0 -182
  171. package/dist/chunk-UWYD42WV.js +0 -4
  172. package/dist/chunk-UXVACQCY.mjs +0 -1
  173. package/dist/chunk-W4EIKDM6.mjs +0 -2
  174. package/dist/chunk-W53SI3XW.mjs +0 -1
  175. package/dist/chunk-WNS2RBQD.js +0 -2
  176. package/dist/chunk-Z3KMSHUP.js +0 -1
  177. package/dist/core-plugins-reexport.d.mts +0 -31
  178. package/dist/core-plugins-reexport.d.ts +0 -31
  179. package/dist/core-plugins-reexport.js +0 -1
  180. package/dist/core-plugins-reexport.mjs +0 -1
  181. package/dist/core-reexport.d.mts +0 -340
  182. package/dist/core-reexport.d.ts +0 -340
  183. package/dist/core-reexport.js +0 -1
  184. package/dist/core-reexport.mjs +0 -1
  185. package/dist/documentSerializer-DtS_-oGA.d.mts +0 -664
  186. package/dist/documentSerializer-Wj1p2ASa.d.ts +0 -664
  187. package/dist/executor-C3VXF7QA.mjs +0 -1
  188. package/dist/executor-GDBV3AGV.js +0 -1
  189. package/dist/headless-reexport.d.mts +0 -197
  190. package/dist/headless-reexport.d.ts +0 -197
  191. package/dist/headless-reexport.js +0 -1
  192. package/dist/headless-reexport.mjs +0 -1
  193. package/dist/insertOperations-BTH1Asas.d.mts +0 -176
  194. package/dist/insertOperations-CbUnXAXH.d.ts +0 -176
  195. package/dist/layout-bridge-EA4DJ227.js +0 -1
  196. package/dist/layout-bridge-XDPSO6GO.mjs +0 -1
  197. package/dist/mcp-reexport.d.mts +0 -156
  198. package/dist/mcp-reexport.d.ts +0 -156
  199. package/dist/mcp-reexport.js +0 -16
  200. package/dist/mcp-reexport.mjs +0 -16
  201. package/dist/processTemplate-MJ2PCSO5.js +0 -1
  202. package/dist/react-B0W16SV6.d.ts +0 -1330
  203. package/dist/react-D0Pn1nww.d.mts +0 -1330
  204. package/dist/react.d.mts +0 -10
  205. package/dist/react.d.ts +0 -10
  206. package/dist/react.js +0 -1
  207. package/dist/react.mjs +0 -1
  208. package/dist/registry-CH9V-IX0.d.ts +0 -165
  209. package/dist/registry-CWBKYlNW.d.mts +0 -165
  210. package/dist/types-UDsUq8D3.d.mts +0 -310
  211. package/dist/types-jbivc9Lj.d.ts +0 -310
  212. package/dist/variableDetector-CdQ7ZTzA.d.mts +0 -204
  213. package/dist/variableDetector-DsRV3A9z.d.ts +0 -204
  214. package/i18n/de.json +0 -792
  215. package/i18n/en.json +0 -792
  216. package/i18n/he.json +0 -792
  217. package/i18n/pl.json +0 -792
  218. package/i18n/pt-BR.json +0 -792
  219. package/i18n/tr.json +0 -792
  220. package/i18n/zh-CN.json +0 -792
  221. /package/dist/{chunk-YC5KZSYD.js → chunk-ESZ6JRTW.js} +0 -0
  222. /package/dist/{chunk-LVGJKS7Y.mjs → chunk-TZMMD6RR.mjs} +0 -0
  223. /package/dist/{react.css → fork.css} +0 -0
@@ -0,0 +1,165 @@
1
+ import { R as RenderedDomContext, P as PositionCoordinates, b as ReactEditorPlugin } from './types-BnIs4sE7.js';
2
+ export { E as EditorPlugin, c as PanelConfig, d as PluginContext, e as PluginHostProps, f as PluginHostRef, g as PluginPanelProps, a as ReactSidebarItem, S as SidebarItem, h as SidebarItemContext, i as SidebarItemRenderProps } from './types-BnIs4sE7.js';
3
+ export { a as PLUGIN_HOST_STYLES, P as PluginHost } from './PluginHost-zILZO7zX.js';
4
+ import * as prosemirror_state from 'prosemirror-state';
5
+ import { Plugin, PluginKey } from 'prosemirror-state';
6
+ import { DecorationSet, EditorView } from 'prosemirror-view';
7
+ import 'react';
8
+ import 'prosemirror-model';
9
+
10
+ /**
11
+ * RenderedDomContext Implementation
12
+ *
13
+ * Provides DOM-based position mapping for the LayoutPainter output.
14
+ * Uses the same data-pm-start/data-pm-end attribute pattern as the
15
+ * selection overlay in PagedEditor.
16
+ */
17
+
18
+ /**
19
+ * Implementation of RenderedDomContext.
20
+ *
21
+ * This class provides position mapping between ProseMirror document
22
+ * positions and pixel coordinates in the rendered DOM. It uses the
23
+ * data-pm-start and data-pm-end attributes that LayoutPainter adds
24
+ * to span elements.
25
+ */
26
+ declare class RenderedDomContextImpl implements RenderedDomContext {
27
+ pagesContainer: HTMLElement;
28
+ zoom: number;
29
+ constructor(pagesContainer: HTMLElement, zoom?: number);
30
+ /**
31
+ * Get pixel coordinates for a ProseMirror position.
32
+ * Uses the browser's text rendering via Range API for precise positioning.
33
+ */
34
+ getCoordinatesForPosition(pmPos: number): PositionCoordinates | null;
35
+ /**
36
+ * Find DOM elements that overlap with a ProseMirror position range.
37
+ */
38
+ findElementsForRange(from: number, to: number): Element[];
39
+ /**
40
+ * Get bounding rectangles for a range of text.
41
+ * Handles line wraps by returning multiple rects.
42
+ */
43
+ getRectsForRange(from: number, to: number): Array<{
44
+ x: number;
45
+ y: number;
46
+ width: number;
47
+ height: number;
48
+ }>;
49
+ /**
50
+ * Get the offset of the pages container from its parent viewport.
51
+ * This is needed for positioning overlays that are rendered in the
52
+ * viewport container rather than directly in the pages container.
53
+ */
54
+ getContainerOffset(): {
55
+ x: number;
56
+ y: number;
57
+ };
58
+ }
59
+ /**
60
+ * Create a RenderedDomContext for a pages container element.
61
+ *
62
+ * @param pagesContainer - The container element holding rendered pages
63
+ * @param zoom - Current zoom level (default 1)
64
+ */
65
+ declare function createRenderedDomContext(pagesContainer: HTMLElement, zoom?: number): RenderedDomContext;
66
+
67
+ /**
68
+ * Template tag types
69
+ */
70
+ type TagType = 'variable' | 'sectionStart' | 'sectionEnd' | 'invertedStart' | 'raw';
71
+ /**
72
+ * A found template tag
73
+ */
74
+ interface TemplateTag {
75
+ id: string;
76
+ type: TagType;
77
+ name: string;
78
+ rawTag: string;
79
+ from: number;
80
+ to: number;
81
+ /** For sections: nested variable names */
82
+ nestedVars?: string[];
83
+ /** True if this variable is inside a section (shown in section's nested vars) */
84
+ insideSection?: boolean;
85
+ }
86
+ /**
87
+ * Plugin state
88
+ */
89
+ interface TemplatePluginState$1 {
90
+ tags: TemplateTag[];
91
+ decorations: DecorationSet;
92
+ hoveredId?: string;
93
+ selectedId?: string;
94
+ }
95
+ /**
96
+ * Plugin key
97
+ */
98
+ declare const templatePluginKey: PluginKey<TemplatePluginState$1>;
99
+ /**
100
+ * Create the template plugin
101
+ */
102
+ declare function createTemplatePlugin(): Plugin<TemplatePluginState$1>;
103
+ /**
104
+ * Get tags from editor state
105
+ */
106
+ declare function getTemplateTags(state: prosemirror_state.EditorState): TemplateTag[];
107
+ /**
108
+ * Set hovered tag
109
+ */
110
+ declare function setHoveredElement(view: EditorView, id: string | undefined): void;
111
+ /**
112
+ * Set selected tag
113
+ */
114
+ declare function setSelectedElement(view: EditorView, id: string | undefined): void;
115
+ /**
116
+ * CSS styles for template decorations
117
+ */
118
+ declare const TEMPLATE_DECORATION_STYLES = "\n.docx-template-tag {\n cursor: pointer;\n transition: background-color 0.1s;\n}\n\n.docx-template-tag:hover,\n.docx-template-tag.hovered {\n filter: brightness(0.95);\n}\n\n.docx-template-tag.selected {\n box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);\n}\n";
119
+
120
+ /**
121
+ * Template Plugin
122
+ *
123
+ * Docxtemplater template support as a plugin for the DOCX Editor.
124
+ *
125
+ * Features:
126
+ * - Full docxtemplater syntax detection (variables, loops, conditionals)
127
+ * - Sidebar annotation chips showing template structure (via getSidebarItems)
128
+ * - Differentiated visual highlighting by element type
129
+ *
130
+ * @example
131
+ * ```tsx
132
+ * import { PluginHost, templatePlugin } from '@eigenpal/docx-editor-react/plugin-api';
133
+ *
134
+ * function MyEditor() {
135
+ * return (
136
+ * <PluginHost plugins={[templatePlugin]}>
137
+ * <DocxEditor document={doc} onChange={handleChange} />
138
+ * </PluginHost>
139
+ * );
140
+ * }
141
+ * ```
142
+ */
143
+
144
+ interface TemplatePluginState {
145
+ tags: TemplateTag[];
146
+ hoveredId?: string;
147
+ selectedId?: string;
148
+ }
149
+ /**
150
+ * Create the template plugin instance.
151
+ */
152
+ declare function createPlugin(_options?: {
153
+ /** @deprecated — panel is no longer used; template chips render in the unified sidebar */
154
+ defaultCollapsed?: boolean;
155
+ /** @deprecated */
156
+ panelPosition?: 'left' | 'right';
157
+ /** @deprecated */
158
+ panelWidth?: number;
159
+ }): ReactEditorPlugin<TemplatePluginState>;
160
+ /**
161
+ * Default template plugin instance.
162
+ */
163
+ declare const templatePlugin: ReactEditorPlugin<TemplatePluginState>;
164
+
165
+ export { PositionCoordinates, ReactEditorPlugin, RenderedDomContext, RenderedDomContextImpl, TEMPLATE_DECORATION_STYLES, type TagType, type TemplateTag, createRenderedDomContext, createPlugin as createTemplatePlugin, createTemplatePlugin as createTemplateProseMirrorPlugin, getTemplateTags as getTemplatePluginTags, setHoveredElement, setSelectedElement, templatePlugin, templatePluginKey };
@@ -0,0 +1 @@
1
+ 'use strict';var chunkSGTUE33R_js=require('./chunk-SGTUE33R.js'),chunk2XXILKEQ_js=require('./chunk-2XXILKEQ.js');require('./chunk-YBEVHQCT.js'),require('./chunk-HXDMASAR.js'),require('./chunk-IFPN3NT3.js'),require('./chunk-B45ECEGY.js'),require('./chunk-GGQK26JO.js'),require('./chunk-ZXPCJWVY.js'),require('./chunk-ILYKDR3C.js'),require('./chunk-ESZ6JRTW.js'),require('./chunk-H5NTJZO4.js');Object.defineProperty(exports,"PLUGIN_HOST_STYLES",{enumerable:true,get:function(){return chunkSGTUE33R_js.a}});Object.defineProperty(exports,"PluginHost",{enumerable:true,get:function(){return chunkSGTUE33R_js.b}});Object.defineProperty(exports,"TEMPLATE_DECORATION_STYLES",{enumerable:true,get:function(){return chunkSGTUE33R_js.h}});Object.defineProperty(exports,"createTemplatePlugin",{enumerable:true,get:function(){return chunkSGTUE33R_js.i}});Object.defineProperty(exports,"createTemplateProseMirrorPlugin",{enumerable:true,get:function(){return chunkSGTUE33R_js.d}});Object.defineProperty(exports,"getTemplatePluginTags",{enumerable:true,get:function(){return chunkSGTUE33R_js.e}});Object.defineProperty(exports,"setHoveredElement",{enumerable:true,get:function(){return chunkSGTUE33R_js.f}});Object.defineProperty(exports,"setSelectedElement",{enumerable:true,get:function(){return chunkSGTUE33R_js.g}});Object.defineProperty(exports,"templatePlugin",{enumerable:true,get:function(){return chunkSGTUE33R_js.j}});Object.defineProperty(exports,"templatePluginKey",{enumerable:true,get:function(){return chunkSGTUE33R_js.c}});Object.defineProperty(exports,"RenderedDomContextImpl",{enumerable:true,get:function(){return chunk2XXILKEQ_js.a}});Object.defineProperty(exports,"createRenderedDomContext",{enumerable:true,get:function(){return chunk2XXILKEQ_js.b}});
@@ -0,0 +1 @@
1
+ export{a as PLUGIN_HOST_STYLES,b as PluginHost,h as TEMPLATE_DECORATION_STYLES,i as createTemplatePlugin,d as createTemplateProseMirrorPlugin,e as getTemplatePluginTags,f as setHoveredElement,g as setSelectedElement,j as templatePlugin,c as templatePluginKey}from'./chunk-JFRDFK7V.mjs';export{a as RenderedDomContextImpl,b as createRenderedDomContext}from'./chunk-KOXCF3CL.mjs';import'./chunk-MDTA25AN.mjs';import'./chunk-XGJ2EORY.mjs';import'./chunk-WOHFANC5.mjs';import'./chunk-XQZTWWRF.mjs';import'./chunk-B7CCL7SL.mjs';import'./chunk-ONIYA2FU.mjs';import'./chunk-FWPVBFKQ.mjs';import'./chunk-TZMMD6RR.mjs';import'./chunk-TAUMSKRE.mjs';
@@ -0,0 +1 @@
1
+ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var chunkESZ6JRTW_js=require('./chunk-ESZ6JRTW.js');require('./chunk-H5NTJZO4.js');Object.defineProperty(exports,"createTemplateProcessor",{enumerable:true,get:function(){return chunkESZ6JRTW_js.j}});Object.defineProperty(exports,"default",{enumerable:true,get:function(){return chunkESZ6JRTW_js.k}});Object.defineProperty(exports,"getMissingVariables",{enumerable:true,get:function(){return chunkESZ6JRTW_js.g}});Object.defineProperty(exports,"getTemplateTags",{enumerable:true,get:function(){return chunkESZ6JRTW_js.e}});Object.defineProperty(exports,"previewTemplate",{enumerable:true,get:function(){return chunkESZ6JRTW_js.h}});Object.defineProperty(exports,"processTemplate",{enumerable:true,get:function(){return chunkESZ6JRTW_js.a}});Object.defineProperty(exports,"processTemplateAdvanced",{enumerable:true,get:function(){return chunkESZ6JRTW_js.i}});Object.defineProperty(exports,"processTemplateAndDownload",{enumerable:true,get:function(){return chunkESZ6JRTW_js.d}});Object.defineProperty(exports,"processTemplateAsBlob",{enumerable:true,get:function(){return chunkESZ6JRTW_js.c}});Object.defineProperty(exports,"processTemplateDetailed",{enumerable:true,get:function(){return chunkESZ6JRTW_js.b}});Object.defineProperty(exports,"validateTemplate",{enumerable:true,get:function(){return chunkESZ6JRTW_js.f}});
@@ -1 +1 @@
1
- export{j as createTemplateProcessor,k as default,g as getMissingVariables,e as getTemplateTags,h as previewTemplate,a as processTemplate,i as processTemplateAdvanced,d as processTemplateAndDownload,c as processTemplateAsBlob,b as processTemplateDetailed,f as validateTemplate}from'./chunk-LVGJKS7Y.mjs';import'./chunk-TAUMSKRE.mjs';
1
+ export{j as createTemplateProcessor,k as default,g as getMissingVariables,e as getTemplateTags,h as previewTemplate,a as processTemplate,i as processTemplateAdvanced,d as processTemplateAndDownload,c as processTemplateAsBlob,b as processTemplateDetailed,f as validateTemplate}from'./chunk-TZMMD6RR.mjs';import'./chunk-TAUMSKRE.mjs';
package/dist/styles.css CHANGED
@@ -1 +1 @@
1
- .ep-root .\!visible{visibility:visible!important}.ep-root .visible{visibility:visible}.ep-root .invisible{visibility:hidden}.ep-root .collapse{visibility:collapse}.ep-root .static{position:static}.ep-root .fixed{position:fixed}.ep-root .absolute{position:absolute}.ep-root .relative{position:relative}.ep-root .sticky{position:sticky}.ep-root .right-2{right:.5rem}.ep-root .z-50{z-index:50}.ep-root .-mx-1{margin-left:-.25rem;margin-right:-.25rem}.ep-root .mx-1\.5{margin-left:.375rem;margin-right:.375rem}.ep-root .mx-2{margin-left:.5rem;margin-right:.5rem}.ep-root .my-1{margin-top:.25rem;margin-bottom:.25rem}.ep-root .-ml-1{margin-left:-.25rem}.ep-root .mb-1{margin-bottom:.25rem}.ep-root .ml-auto{margin-left:auto}.ep-root .\!block{display:block!important}.ep-root .block{display:block}.ep-root .inline-block{display:inline-block}.ep-root .\!inline{display:inline!important}.ep-root .inline{display:inline}.ep-root .flex{display:flex}.ep-root .inline-flex{display:inline-flex}.ep-root .\!table{display:table!important}.ep-root .table{display:table}.ep-root .grid{display:grid}.ep-root .inline-grid{display:inline-grid}.ep-root .contents{display:contents}.ep-root .hidden{display:none}.ep-root .h-10{height:2.5rem}.ep-root .h-11{height:2.75rem}.ep-root .h-3\.5{height:.875rem}.ep-root .h-4{height:1rem}.ep-root .h-5{height:1.25rem}.ep-root .h-6{height:1.5rem}.ep-root .h-7{height:1.75rem}.ep-root .h-8{height:2rem}.ep-root .h-9{height:2.25rem}.ep-root .h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.ep-root .h-px{height:1px}.ep-root .max-h-72{max-height:18rem}.ep-root .max-h-\[300px\]{max-height:300px}.ep-root .max-h-\[400px\]{max-height:400px}.ep-root .min-h-\[36px\]{min-height:36px}.ep-root .w-10{width:2.5rem}.ep-root .w-3\.5{width:.875rem}.ep-root .w-4{width:1rem}.ep-root .w-5{width:1.25rem}.ep-root .w-7{width:1.75rem}.ep-root .w-9{width:2.25rem}.ep-root .w-full{width:100%}.ep-root .w-px{width:1px}.ep-root .min-w-0{min-width:0}.ep-root .min-w-\[100px\]{min-width:100px}.ep-root .min-w-\[260px\]{min-width:260px}.ep-root .min-w-\[55px\]{min-width:55px}.ep-root .min-w-\[70px\]{min-width:70px}.ep-root .min-w-\[8rem\]{min-width:8rem}.ep-root .min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.ep-root .max-w-\[300px\]{max-width:300px}.ep-root .flex-1{flex:1 1 0%}.ep-root .flex-shrink{flex-shrink:1}.ep-root .flex-shrink-0{flex-shrink:0}.ep-root .shrink{flex-shrink:1}.ep-root .shrink-0{flex-shrink:0}.ep-root .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.ep-root .cursor-not-allowed{cursor:not-allowed}.ep-root .cursor-pointer{cursor:pointer}.ep-root .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ep-root .select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.ep-root .resize{resize:both}.ep-root .flex-col{flex-direction:column}.ep-root .flex-wrap{flex-wrap:wrap}.ep-root .items-center{align-items:center}.ep-root .items-stretch{align-items:stretch}.ep-root .justify-center{justify-content:center}.ep-root .justify-between{justify-content:space-between}.ep-root .gap-0{gap:0}.ep-root .gap-0\.5{gap:.125rem}.ep-root .gap-1{gap:.25rem}.ep-root .gap-2{gap:.5rem}.ep-root .gap-px{gap:1px}.ep-root .overflow-hidden{overflow:hidden}.ep-root .overflow-x-auto{overflow-x:auto}.ep-root .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ep-root .whitespace-nowrap{white-space:nowrap}.ep-root .rounded{border-radius:.25rem}.ep-root .rounded-full{border-radius:9999px}.ep-root .rounded-lg{border-radius:var(--radius)}.ep-root .rounded-md{border-radius:calc(var(--radius) - 2px)}.ep-root .rounded-none{border-radius:0}.ep-root .rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.ep-root .rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.ep-root .rounded-br-2xl{border-bottom-right-radius:1rem}.ep-root .\!border{border-width:1px!important}.ep-root .border{border-width:1px}.ep-root .border-0{border-width:0}.ep-root .border-b{border-bottom-width:1px}.ep-root .border-r{border-right-width:1px}.ep-root .border-input{border-color:hsl(var(--input))}.ep-root .border-slate-100{--tw-border-opacity:1;border-color:rgb(241 245 249/var(--tw-border-opacity,1))}.ep-root .border-slate-200{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity,1))}.ep-root .border-slate-200\/50{border-color:rgba(226,232,240,.5)}.ep-root .border-slate-300{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1))}.ep-root .bg-\[\#f1f5f9\]{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.ep-root .bg-background{background-color:hsl(var(--background))}.ep-root .bg-destructive{background-color:hsl(var(--destructive))}.ep-root .bg-doc-bg{background-color:var(--doc-bg)}.ep-root .bg-primary{background-color:hsl(var(--primary))}.ep-root .bg-secondary{background-color:hsl(var(--secondary))}.ep-root .bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.ep-root .bg-slate-200{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity,1))}.ep-root .bg-slate-900{--tw-bg-opacity:1;background-color:rgb(15 23 42/var(--tw-bg-opacity,1))}.ep-root .bg-transparent{background-color:transparent}.ep-root .bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.ep-root .p-1{padding:.25rem}.ep-root .px-1{padding-left:.25rem;padding-right:.25rem}.ep-root .px-1\.5{padding-left:.375rem;padding-right:.375rem}.ep-root .px-2{padding-left:.5rem;padding-right:.5rem}.ep-root .px-3{padding-left:.75rem;padding-right:.75rem}.ep-root .px-4{padding-left:1rem;padding-right:1rem}.ep-root .px-8{padding-left:2rem;padding-right:2rem}.ep-root .py-0{padding-top:0;padding-bottom:0}.ep-root .py-1{padding-top:.25rem;padding-bottom:.25rem}.ep-root .py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.ep-root .py-2{padding-top:.5rem;padding-bottom:.5rem}.ep-root .py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.ep-root .pb-1{padding-bottom:.25rem}.ep-root .pl-3{padding-left:.75rem}.ep-root .pr-1{padding-right:.25rem}.ep-root .pt-2{padding-top:.5rem}.ep-root .text-left{text-align:left}.ep-root .text-center{text-align:center}.ep-root .text-base{font-size:1rem;line-height:1.5rem}.ep-root .text-sm{font-size:.875rem;line-height:1.25rem}.ep-root .text-xs{font-size:.75rem;line-height:1rem}.ep-root .font-medium{font-weight:500}.ep-root .font-normal{font-weight:400}.ep-root .uppercase{text-transform:uppercase}.ep-root .lowercase{text-transform:lowercase}.ep-root .capitalize{text-transform:capitalize}.ep-root .italic{font-style:italic}.ep-root .ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.ep-root .leading-tight{line-height:1.25}.ep-root .text-destructive-foreground{color:hsl(var(--destructive-foreground))}.ep-root .text-primary{color:hsl(var(--primary))}.ep-root .text-primary-foreground{color:hsl(var(--primary-foreground))}.ep-root .text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.ep-root .text-secondary-foreground{color:hsl(var(--secondary-foreground))}.ep-root .text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.ep-root .text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.ep-root .text-slate-700{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1))}.ep-root .text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.ep-root .text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.ep-root .underline{text-decoration-line:underline}.ep-root .line-through{text-decoration-line:line-through}.ep-root .underline-offset-4{text-underline-offset:4px}.ep-root .opacity-30{opacity:.3}.ep-root .opacity-50{opacity:.5}.ep-root .shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.ep-root .shadow-lg,.ep-root .shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.ep-root .shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.ep-root .outline-none{outline:2px solid transparent;outline-offset:2px}.ep-root .\!outline{outline-style:solid!important}.ep-root .outline{outline-style:solid}.ep-root .ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.ep-root .blur{--tw-blur:blur(8px)}.ep-root .blur,.ep-root .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.ep-root .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ep-root .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ep-root .duration-150{transition-duration:.15s}.ep-root .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ep-root .ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.ep-root .zoom-in{--tw-enter-scale:0}.ep-root .zoom-out{--tw-exit-scale:0}.ep-root .duration-150{animation-duration:.15s}.ep-root .ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.ep-root .ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.ep-root .running{animation-play-state:running}.ep-root{--background:0 0% 100%;--foreground:222.2 84% 4.9%;--card:0 0% 100%;--card-foreground:222.2 84% 4.9%;--popover:0 0% 100%;--popover-foreground:222.2 84% 4.9%;--primary:221.2 83.2% 53.3%;--primary-foreground:210 40% 98%;--secondary:210 40% 96.1%;--secondary-foreground:222.2 47.4% 11.2%;--muted:210 40% 96.1%;--muted-foreground:215.4 16.3% 46.9%;--accent:210 40% 96.1%;--accent-foreground:222.2 47.4% 11.2%;--destructive:0 84.2% 60.2%;--destructive-foreground:210 40% 98%;--border:214.3 31.8% 91.4%;--input:214.3 31.8% 91.4%;--ring:221.2 83.2% 53.3%;--radius:0.5rem;--doc-bg:#f8f9fa;--doc-primary:#1a73e8;--doc-primary-hover:#1557b0;--doc-primary-light:#e8f0fe;--doc-text:#202124;--doc-text-muted:#5f6368;--doc-text-subtle:#9aa0a6;--doc-text-placeholder:#999;--doc-border:#e0e0e0;--doc-border-light:#dadce0;--doc-border-dark:#d0d0d0;--doc-border-input:#ccc;--doc-bg-subtle:#f5f5f5;--doc-bg-hover:#f1f3f4;--doc-bg-input:#f8f9fa;--doc-error:#c5221f;--doc-error-bg:#fce8e6;--doc-success:#34a853;--doc-success-bg:#e8f5e9;--doc-warning:#f9a825;--doc-warning-bg:#fff8e1;--doc-link:#0563c1}[contenteditable=true]{caret-color:#000;outline:none;caret-shape:bar}.docx-run-editable[contenteditable=true]{caret-color:#000;min-height:1em;display:inline}.docx-paragraph-empty [contenteditable=true]{min-height:1em;min-width:1px;display:inline-block}.docx-paragraph-editable{cursor:text}.docx-run-editable[contenteditable=true]:focus{outline:none}.docx-paragraph-editable:focus-within{outline:none}.docx-run ::selection,.docx-run-editable ::selection,.docx-run-editable::selection,.docx-run::selection,[contenteditable=true] ::selection,[contenteditable=true]::selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-run ::-moz-selection,.docx-run-editable ::-moz-selection,.docx-run-editable::-moz-selection,.docx-run::-moz-selection,[contenteditable=true] ::-moz-selection,[contenteditable=true]::-moz-selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-paragraph ::selection,.docx-paragraph-editable ::selection,.docx-paragraph-editable::selection,.docx-paragraph::selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-paragraph ::-moz-selection,.docx-paragraph-editable ::-moz-selection,.docx-paragraph-editable::-moz-selection,.docx-paragraph::-moz-selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-hyperlink ::selection,.docx-hyperlink::selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-hyperlink ::-moz-selection,.docx-hyperlink::-moz-selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-run-highlighted ::selection,.docx-run-highlighted::selection{background-color:rgba(26,115,232,.5)!important;color:inherit!important}.docx-run-highlighted ::-moz-selection,.docx-run-highlighted::-moz-selection{background-color:rgba(26,115,232,.5)!important;color:inherit!important}.docx-run-dark-bg ::selection,.docx-run-dark-bg::selection{background-color:rgba(100,181,246,.5)!important;color:inherit!important}.docx-run-dark-bg ::-moz-selection,.docx-run-dark-bg::-moz-selection{background-color:rgba(100,181,246,.5)!important;color:inherit!important}.docx-run-bold ::selection,.docx-run-bold::selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-run-bold ::-moz-selection,.docx-run-bold::-moz-selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-run-italic ::selection,.docx-run-italic::selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-run-italic ::-moz-selection,.docx-run-italic::-moz-selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-find-highlight{background-color:rgba(255,235,59,.5)!important;border-radius:2px}.docx-find-highlight-current{background-color:rgba(255,152,0,.6)!important;border-radius:2px;outline:2px solid rgba(255,152,0,.8)}.docx-ai-selection-preview{background-color:rgba(156,39,176,.2);border-bottom:2px dashed rgba(156,39,176,.6)}.docx-selection-overlay-container{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:1;overflow:hidden}.docx-selection-overlay-rect{position:absolute;background-color:rgba(66,133,244,.25);pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.docx-run-highlighted[contenteditable=true]{caret-color:#333}.docx-run-dark-bg[contenteditable=true]{caret-color:#fff}.docx-editor{cursor:default}.docx-editor-page{cursor:text}.docx-bookmark-end,.docx-bookmark-start,.docx-drawing-placeholder,.docx-field,.docx-list-marker,.docx-shape-placeholder{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none}.docx-run-has-variable [contenteditable=false]{cursor:default;-webkit-user-select:all;-moz-user-select:all;user-select:all}.layout-table-cell-selected{position:relative;outline:2px solid rgba(66,133,244,.6);outline-offset:-2px}.layout-table-cell-selected:after{content:"";position:absolute;inset:0;background-color:rgba(66,133,244,.15);pointer-events:none}.layout-table-resize-handle{background-color:transparent;transition:background-color .15s}.layout-table-resize-handle.dragging,.layout-table-resize-handle:hover{background-color:rgba(66,133,244,.6)}.layout-table-edge-handle-bottom,.layout-table-row-resize-handle{background-color:transparent;transition:background-color .15s}.layout-table-edge-handle-bottom.dragging,.layout-table-edge-handle-bottom:hover,.layout-table-row-resize-handle.dragging,.layout-table-row-resize-handle:hover{background-color:rgba(66,133,244,.6)}.layout-table-edge-handle-right{background-color:transparent;transition:background-color .15s}.layout-table-edge-handle-right.dragging,.layout-table-edge-handle-right:hover{background-color:rgba(66,133,244,.6)}.paged-editor--readonly .layout-table-edge-handle-bottom,.paged-editor--readonly .layout-table-edge-handle-right,.paged-editor--readonly .layout-table-resize-handle,.paged-editor--readonly .layout-table-row-resize-handle{display:none!important}.paged-editor--readonly .layout-page-footer,.paged-editor--readonly .layout-page-header{cursor:default;pointer-events:none}.paged-editor--readonly .layout-page-content{cursor:default}.docx-outline-heading-btn:hover{background-color:#f1f3f4}.layout-page-content{cursor:text}.layout-page-footer,.layout-page-header{cursor:pointer;transition:background-color .15s ease}.layout-page-footer:hover,.layout-page-header:hover{background-color:rgba(37,99,235,.06)}.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:0}.hf-editor-pm .ProseMirror:focus{outline:none}.hf-editor-pm .ProseMirror p{display:block;min-height:1em;white-space:pre-wrap;word-wrap:break-word}.hf-editor-pm .ProseMirror p,.hf-editor-pm .ProseMirror td p,.hf-editor-pm .ProseMirror th p{margin:0!important;padding-top:var(--docx-space-before,0);padding-bottom:var(--docx-space-after,0);padding-left:0;padding-right:0;line-height:normal!important}.hf-editor-pm .ProseMirror td p,.hf-editor-pm .ProseMirror th p{min-height:auto}.hf-editor-pm .ProseMirror .tableWrapper{overflow:visible}.hf-editor-pm .ProseMirror table{border-collapse:collapse!important;border-spacing:0!important;table-layout:fixed!important;margin:0}.hf-editor-pm .ProseMirror td.docx-table-cell,.hf-editor-pm .ProseMirror th.docx-table-header{box-sizing:border-box!important}.hf-editor-pm .ProseMirror td p:has(img),.hf-editor-pm .ProseMirror td p:has(span),.hf-editor-pm .ProseMirror th p:has(img),.hf-editor-pm .ProseMirror th p:has(span){font-size:0!important;line-height:0!important}.hf-editor-pm .ProseMirror td p span:not(:has(>span)),.hf-editor-pm .ProseMirror th p span:not(:has(>span)){position:relative;top:.4em}.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-footer .layout-page-footer>*,.paged-editor--editing-header .layout-page-header>*{visibility:hidden}.paged-editor--hf-editing .layout-page-footer:hover,.paged-editor--hf-editing .layout-page-header:hover{background-color:transparent}.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}.ep-hyperlink-popup__icon-btn:hover{background:#f1f3f4}.paged-editor__decoration-overlay{position:absolute;inset:0;pointer-events:none;z-index:11}.ProseMirror-yjs-cursor{position:relative;margin-left:-1px;margin-right:-1px;border-left:1px solid;border-right:1px solid;word-break:normal;pointer-events:none}.ProseMirror-yjs-cursor>div{position:absolute;top:-1.05em;left:-1px;font-size:11px;font-weight:600;line-height:1;color:#fff;padding:2px 4px;border-radius:3px 3px 3px 0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}.ep-root .first\:pl-0:first-child{padding-left:0}.ep-root .last\:border-r-0:last-child{border-right-width:0}.ep-root .hover\:border-slate-300:hover{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1))}.ep-root .hover\:bg-accent:hover{background-color:hsl(var(--accent))}.ep-root .hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive)/.9)}.ep-root .hover\:bg-primary\/90:hover{background-color:hsl(var(--primary)/.9)}.ep-root .hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary)/.8)}.ep-root .hover\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.ep-root .hover\:bg-slate-100\/80:hover{background-color:rgba(241,245,249,.8)}.ep-root .hover\:bg-slate-50:hover{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.ep-root .hover\:bg-slate-800:hover{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))}.ep-root .hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.ep-root .hover\:text-slate-900:hover{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.ep-root .hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.ep-root .hover\:underline:hover{text-decoration-line:underline}.ep-root .focus\:bg-slate-100:focus{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.ep-root .focus\:bg-slate-100\/80:focus{background-color:rgba(241,245,249,.8)}.ep-root .focus\:bg-white:focus{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.ep-root .focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.ep-root .focus\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ep-root .focus\:ring-slate-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(203 213 225/var(--tw-ring-opacity,1))}.ep-root .focus\:ring-slate-400:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(148 163 184/var(--tw-ring-opacity,1))}.ep-root .focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.ep-root .focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ep-root .focus-visible\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.ep-root .focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.ep-root .disabled\:pointer-events-none:disabled{pointer-events:none}.ep-root .disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.ep-root .disabled\:opacity-50:disabled{opacity:.5}.ep-root .data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.ep-root .data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.ep-root .data-\[side\=bottom\]\:translate-y-1[data-side=bottom],.ep-root .data-\[side\=top\]\:-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.ep-root .data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.ep-root .data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.ep-root .data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.ep-root .data-\[state\=closed\]\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.ep-root .data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.ep-root .data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.ep-root .data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.ep-root .data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.ep-root .data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.ep-root .data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.ep-root :is(.\[\&\>span\]\:truncate>span){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
1
+ .ep-root .visible{visibility:visible}.ep-root .invisible{visibility:hidden}.ep-root .collapse{visibility:collapse}.ep-root .static{position:static}.ep-root .fixed{position:fixed}.ep-root .absolute{position:absolute}.ep-root .relative{position:relative}.ep-root .sticky{position:sticky}.ep-root .right-2{right:.5rem}.ep-root .z-50{z-index:50}.ep-root .-mx-1{margin-left:-.25rem;margin-right:-.25rem}.ep-root .mx-1\.5{margin-left:.375rem;margin-right:.375rem}.ep-root .mx-2{margin-left:.5rem;margin-right:.5rem}.ep-root .my-1{margin-top:.25rem;margin-bottom:.25rem}.ep-root .-ml-1{margin-left:-.25rem}.ep-root .mb-1{margin-bottom:.25rem}.ep-root .ml-auto{margin-left:auto}.ep-root .block{display:block}.ep-root .inline-block{display:inline-block}.ep-root .\!inline{display:inline!important}.ep-root .inline{display:inline}.ep-root .flex{display:flex}.ep-root .inline-flex{display:inline-flex}.ep-root .\!table{display:table!important}.ep-root .table{display:table}.ep-root .grid{display:grid}.ep-root .inline-grid{display:inline-grid}.ep-root .contents{display:contents}.ep-root .hidden{display:none}.ep-root .h-10{height:2.5rem}.ep-root .h-11{height:2.75rem}.ep-root .h-3\.5{height:.875rem}.ep-root .h-4{height:1rem}.ep-root .h-5{height:1.25rem}.ep-root .h-6{height:1.5rem}.ep-root .h-7{height:1.75rem}.ep-root .h-8{height:2rem}.ep-root .h-9{height:2.25rem}.ep-root .h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.ep-root .h-px{height:1px}.ep-root .max-h-72{max-height:18rem}.ep-root .max-h-\[300px\]{max-height:300px}.ep-root .max-h-\[400px\]{max-height:400px}.ep-root .min-h-\[36px\]{min-height:36px}.ep-root .w-10{width:2.5rem}.ep-root .w-3\.5{width:.875rem}.ep-root .w-4{width:1rem}.ep-root .w-5{width:1.25rem}.ep-root .w-7{width:1.75rem}.ep-root .w-9{width:2.25rem}.ep-root .w-full{width:100%}.ep-root .w-px{width:1px}.ep-root .min-w-0{min-width:0}.ep-root .min-w-\[100px\]{min-width:100px}.ep-root .min-w-\[260px\]{min-width:260px}.ep-root .min-w-\[55px\]{min-width:55px}.ep-root .min-w-\[70px\]{min-width:70px}.ep-root .min-w-\[8rem\]{min-width:8rem}.ep-root .min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.ep-root .max-w-\[300px\]{max-width:300px}.ep-root .flex-1{flex:1 1 0%}.ep-root .flex-shrink{flex-shrink:1}.ep-root .flex-shrink-0{flex-shrink:0}.ep-root .shrink{flex-shrink:1}.ep-root .shrink-0{flex-shrink:0}.ep-root .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.ep-root .cursor-not-allowed{cursor:not-allowed}.ep-root .cursor-pointer{cursor:pointer}.ep-root .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ep-root .select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.ep-root .resize{resize:both}.ep-root .flex-col{flex-direction:column}.ep-root .flex-wrap{flex-wrap:wrap}.ep-root .items-center{align-items:center}.ep-root .items-stretch{align-items:stretch}.ep-root .justify-center{justify-content:center}.ep-root .justify-between{justify-content:space-between}.ep-root .gap-0{gap:0}.ep-root .gap-0\.5{gap:.125rem}.ep-root .gap-1{gap:.25rem}.ep-root .gap-2{gap:.5rem}.ep-root .gap-px{gap:1px}.ep-root .overflow-hidden{overflow:hidden}.ep-root .overflow-x-auto{overflow-x:auto}.ep-root .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ep-root .whitespace-nowrap{white-space:nowrap}.ep-root .rounded{border-radius:.25rem}.ep-root .rounded-full{border-radius:9999px}.ep-root .rounded-lg{border-radius:var(--radius)}.ep-root .rounded-md{border-radius:calc(var(--radius) - 2px)}.ep-root .rounded-none{border-radius:0}.ep-root .rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.ep-root .rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.ep-root .rounded-br-2xl{border-bottom-right-radius:1rem}.ep-root .\!border{border-width:1px!important}.ep-root .border{border-width:1px}.ep-root .border-0{border-width:0}.ep-root .border-r{border-right-width:1px}.ep-root .border-input{border-color:hsl(var(--input))}.ep-root .border-slate-200{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity,1))}.ep-root .border-slate-200\/50{border-color:rgba(226,232,240,.5)}.ep-root .border-slate-300{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1))}.ep-root .bg-\[\#f1f5f9\]{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.ep-root .bg-background{background-color:hsl(var(--background))}.ep-root .bg-destructive{background-color:hsl(var(--destructive))}.ep-root .bg-doc-bg{background-color:var(--doc-bg)}.ep-root .bg-primary{background-color:hsl(var(--primary))}.ep-root .bg-secondary{background-color:hsl(var(--secondary))}.ep-root .bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.ep-root .bg-slate-200{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity,1))}.ep-root .bg-slate-900{--tw-bg-opacity:1;background-color:rgb(15 23 42/var(--tw-bg-opacity,1))}.ep-root .bg-transparent{background-color:transparent}.ep-root .bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.ep-root .p-1{padding:.25rem}.ep-root .px-1{padding-left:.25rem;padding-right:.25rem}.ep-root .px-1\.5{padding-left:.375rem;padding-right:.375rem}.ep-root .px-2{padding-left:.5rem;padding-right:.5rem}.ep-root .px-3{padding-left:.75rem;padding-right:.75rem}.ep-root .px-4{padding-left:1rem;padding-right:1rem}.ep-root .px-8{padding-left:2rem;padding-right:2rem}.ep-root .py-0{padding-top:0;padding-bottom:0}.ep-root .py-1{padding-top:.25rem;padding-bottom:.25rem}.ep-root .py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.ep-root .py-2{padding-top:.5rem;padding-bottom:.5rem}.ep-root .py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.ep-root .pb-1{padding-bottom:.25rem}.ep-root .pl-3{padding-left:.75rem}.ep-root .pr-1{padding-right:.25rem}.ep-root .pt-2{padding-top:.5rem}.ep-root .text-left{text-align:left}.ep-root .text-center{text-align:center}.ep-root .text-base{font-size:1rem;line-height:1.5rem}.ep-root .text-sm{font-size:.875rem;line-height:1.25rem}.ep-root .text-xs{font-size:.75rem;line-height:1rem}.ep-root .font-medium{font-weight:500}.ep-root .font-normal{font-weight:400}.ep-root .uppercase{text-transform:uppercase}.ep-root .capitalize{text-transform:capitalize}.ep-root .italic{font-style:italic}.ep-root .leading-tight{line-height:1.25}.ep-root .text-destructive-foreground{color:hsl(var(--destructive-foreground))}.ep-root .text-primary{color:hsl(var(--primary))}.ep-root .text-primary-foreground{color:hsl(var(--primary-foreground))}.ep-root .text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.ep-root .text-secondary-foreground{color:hsl(var(--secondary-foreground))}.ep-root .text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.ep-root .text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.ep-root .text-slate-700{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1))}.ep-root .text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.ep-root .text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.ep-root .underline{text-decoration-line:underline}.ep-root .line-through{text-decoration-line:line-through}.ep-root .underline-offset-4{text-underline-offset:4px}.ep-root .opacity-30{opacity:.3}.ep-root .opacity-50{opacity:.5}.ep-root .shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.ep-root .shadow,.ep-root .shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.ep-root .shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.ep-root .shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.ep-root .outline-none{outline:2px solid transparent;outline-offset:2px}.ep-root .outline{outline-style:solid}.ep-root .ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.ep-root .blur{--tw-blur:blur(8px)}.ep-root .blur,.ep-root .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.ep-root .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ep-root .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ep-root .duration-150{transition-duration:.15s}.ep-root .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ep-root .ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.ep-root .zoom-in{--tw-enter-scale:0}.ep-root .zoom-out{--tw-exit-scale:0}.ep-root .duration-150{animation-duration:.15s}.ep-root .ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.ep-root .ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.ep-root .running{animation-play-state:running}.ep-root{--background:0 0% 100%;--foreground:222.2 84% 4.9%;--card:0 0% 100%;--card-foreground:222.2 84% 4.9%;--popover:0 0% 100%;--popover-foreground:222.2 84% 4.9%;--primary:221.2 83.2% 53.3%;--primary-foreground:210 40% 98%;--secondary:210 40% 96.1%;--secondary-foreground:222.2 47.4% 11.2%;--muted:210 40% 96.1%;--muted-foreground:215.4 16.3% 46.9%;--accent:210 40% 96.1%;--accent-foreground:222.2 47.4% 11.2%;--destructive:0 84.2% 60.2%;--destructive-foreground:210 40% 98%;--border:214.3 31.8% 91.4%;--input:214.3 31.8% 91.4%;--ring:221.2 83.2% 53.3%;--radius:0.5rem;--doc-bg:#f8f9fa;--doc-primary:#1a73e8;--doc-primary-hover:#1557b0;--doc-primary-light:#e8f0fe;--doc-text:#202124;--doc-text-muted:#5f6368;--doc-text-subtle:#9aa0a6;--doc-text-placeholder:#999;--doc-border:#e0e0e0;--doc-border-light:#dadce0;--doc-border-dark:#d0d0d0;--doc-border-input:#ccc;--doc-bg-subtle:#f5f5f5;--doc-bg-hover:#f1f3f4;--doc-bg-input:#f8f9fa;--doc-error:#c5221f;--doc-error-bg:#fce8e6;--doc-success:#34a853;--doc-success-bg:#e8f5e9;--doc-warning:#f9a825;--doc-warning-bg:#fff8e1;--doc-link:#0563c1}[contenteditable=true]{caret-color:#000;outline:none;caret-shape:bar}.docx-run-editable[contenteditable=true]{caret-color:#000;min-height:1em;display:inline}.docx-paragraph-empty [contenteditable=true]{min-height:1em;min-width:1px;display:inline-block}.docx-paragraph-editable{cursor:text}.docx-run-editable[contenteditable=true]:focus{outline:none}.docx-paragraph-editable:focus-within{outline:none}.docx-run ::selection,.docx-run-editable ::selection,.docx-run-editable::selection,.docx-run::selection,[contenteditable=true] ::selection,[contenteditable=true]::selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-run ::-moz-selection,.docx-run-editable ::-moz-selection,.docx-run-editable::-moz-selection,.docx-run::-moz-selection,[contenteditable=true] ::-moz-selection,[contenteditable=true]::-moz-selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-paragraph ::selection,.docx-paragraph-editable ::selection,.docx-paragraph-editable::selection,.docx-paragraph::selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-paragraph ::-moz-selection,.docx-paragraph-editable ::-moz-selection,.docx-paragraph-editable::-moz-selection,.docx-paragraph::-moz-selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-hyperlink ::selection,.docx-hyperlink::selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-hyperlink ::-moz-selection,.docx-hyperlink::-moz-selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-run-highlighted ::selection,.docx-run-highlighted::selection{background-color:rgba(26,115,232,.5)!important;color:inherit!important}.docx-run-highlighted ::-moz-selection,.docx-run-highlighted::-moz-selection{background-color:rgba(26,115,232,.5)!important;color:inherit!important}.docx-run-dark-bg ::selection,.docx-run-dark-bg::selection{background-color:rgba(100,181,246,.5)!important;color:inherit!important}.docx-run-dark-bg ::-moz-selection,.docx-run-dark-bg::-moz-selection{background-color:rgba(100,181,246,.5)!important;color:inherit!important}.docx-run-bold ::selection,.docx-run-bold::selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-run-bold ::-moz-selection,.docx-run-bold::-moz-selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-run-italic ::selection,.docx-run-italic::selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-run-italic ::-moz-selection,.docx-run-italic::-moz-selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-find-highlight{background-color:rgba(255,235,59,.5)!important;border-radius:2px}.docx-find-highlight-current{background-color:rgba(255,152,0,.6)!important;border-radius:2px;outline:2px solid rgba(255,152,0,.8)}.docx-ai-selection-preview{background-color:rgba(156,39,176,.2);border-bottom:2px dashed rgba(156,39,176,.6)}.docx-selection-overlay-container{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:1;overflow:hidden}.docx-selection-overlay-rect{position:absolute;background-color:rgba(66,133,244,.25);pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.docx-run-highlighted[contenteditable=true]{caret-color:#333}.docx-run-dark-bg[contenteditable=true]{caret-color:#fff}.docx-editor{cursor:default}.docx-editor-page{cursor:text}.docx-bookmark-end,.docx-bookmark-start,.docx-drawing-placeholder,.docx-field,.docx-list-marker,.docx-shape-placeholder{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none}.docx-run-has-variable [contenteditable=false]{cursor:default;-webkit-user-select:all;-moz-user-select:all;user-select:all}.layout-table-cell-selected{position:relative;outline:2px solid rgba(66,133,244,.6);outline-offset:-2px}.layout-table-cell-selected:after{content:"";position:absolute;inset:0;background-color:rgba(66,133,244,.15);pointer-events:none}.layout-table-resize-handle{background-color:transparent;transition:background-color .15s}.layout-table-resize-handle.dragging,.layout-table-resize-handle:hover{background-color:rgba(66,133,244,.6)}.layout-table-edge-handle-bottom,.layout-table-row-resize-handle{background-color:transparent;transition:background-color .15s}.layout-table-edge-handle-bottom.dragging,.layout-table-edge-handle-bottom:hover,.layout-table-row-resize-handle.dragging,.layout-table-row-resize-handle:hover{background-color:rgba(66,133,244,.6)}.layout-table-edge-handle-right{background-color:transparent;transition:background-color .15s}.layout-table-edge-handle-right.dragging,.layout-table-edge-handle-right:hover{background-color:rgba(66,133,244,.6)}.paged-editor--readonly .layout-table-edge-handle-bottom,.paged-editor--readonly .layout-table-edge-handle-right,.paged-editor--readonly .layout-table-resize-handle,.paged-editor--readonly .layout-table-row-resize-handle{display:none!important}.paged-editor--readonly .layout-page-footer,.paged-editor--readonly .layout-page-header{cursor:default;pointer-events:none}.paged-editor--readonly .layout-page-content{cursor:default}.docx-outline-heading-btn:hover{background-color:#f1f3f4}.layout-page-content{cursor:text}.layout-page-footer,.layout-page-header{cursor:pointer;transition:background-color .15s ease}.layout-page-footer:hover,.layout-page-header:hover{background-color:rgba(37,99,235,.06)}.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:0}.hf-editor-pm .ProseMirror:focus{outline:none}.hf-editor-pm .ProseMirror p{display:block;min-height:1em;white-space:pre-wrap;word-wrap:break-word}.hf-editor-pm .ProseMirror p,.hf-editor-pm .ProseMirror td p,.hf-editor-pm .ProseMirror th p{margin:0!important;padding-top:var(--docx-space-before,0);padding-bottom:var(--docx-space-after,0);padding-left:0;padding-right:0;line-height:normal!important}.hf-editor-pm .ProseMirror td p,.hf-editor-pm .ProseMirror th p{min-height:auto}.hf-editor-pm .ProseMirror .tableWrapper{overflow:visible}.hf-editor-pm .ProseMirror table{border-collapse:collapse!important;border-spacing:0!important;table-layout:fixed!important;margin:0}.hf-editor-pm .ProseMirror td.docx-table-cell,.hf-editor-pm .ProseMirror th.docx-table-header{box-sizing:border-box!important}.hf-editor-pm .ProseMirror td p:has(img),.hf-editor-pm .ProseMirror td p:has(span),.hf-editor-pm .ProseMirror th p:has(img),.hf-editor-pm .ProseMirror th p:has(span){font-size:0!important;line-height:0!important}.hf-editor-pm .ProseMirror td p span:not(:has(>span)),.hf-editor-pm .ProseMirror th p span:not(:has(>span)){position:relative;top:.4em}.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-footer .layout-page-footer>*,.paged-editor--editing-header .layout-page-header>*{visibility:hidden}.paged-editor--hf-editing .layout-page-footer:hover,.paged-editor--hf-editing .layout-page-header:hover{background-color:transparent}.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}.ep-hyperlink-popup__icon-btn:hover{background:#f1f3f4}.paged-editor__decoration-overlay{position:absolute;inset:0;pointer-events:none;z-index:11}.ProseMirror-yjs-cursor{position:relative;margin-left:-1px;margin-right:-1px;border-left:1px solid;border-right:1px solid;word-break:normal;pointer-events:none}.ProseMirror-yjs-cursor>div{position:absolute;top:-1.05em;left:-1px;font-size:11px;font-weight:600;line-height:1;color:#fff;padding:2px 4px;border-radius:3px 3px 3px 0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}.ep-root .first\:pl-0:first-child{padding-left:0}.ep-root .last\:border-r-0:last-child{border-right-width:0}.ep-root .hover\:border-slate-300:hover{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1))}.ep-root .hover\:bg-accent:hover{background-color:hsl(var(--accent))}.ep-root .hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive)/.9)}.ep-root .hover\:bg-primary\/90:hover{background-color:hsl(var(--primary)/.9)}.ep-root .hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary)/.8)}.ep-root .hover\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.ep-root .hover\:bg-slate-100\/80:hover{background-color:rgba(241,245,249,.8)}.ep-root .hover\:bg-slate-50:hover{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.ep-root .hover\:bg-slate-800:hover{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))}.ep-root .hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.ep-root .hover\:text-slate-900:hover{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.ep-root .hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.ep-root .hover\:underline:hover{text-decoration-line:underline}.ep-root .focus\:bg-slate-100:focus{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.ep-root .focus\:bg-slate-100\/80:focus{background-color:rgba(241,245,249,.8)}.ep-root .focus\:bg-white:focus{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.ep-root .focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.ep-root .focus\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ep-root .focus\:ring-slate-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(203 213 225/var(--tw-ring-opacity,1))}.ep-root .focus\:ring-slate-400:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(148 163 184/var(--tw-ring-opacity,1))}.ep-root .focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.ep-root .focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ep-root .focus-visible\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.ep-root .focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.ep-root .disabled\:pointer-events-none:disabled{pointer-events:none}.ep-root .disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.ep-root .disabled\:opacity-50:disabled{opacity:.5}.ep-root .data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.ep-root .data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.ep-root .data-\[side\=bottom\]\:translate-y-1[data-side=bottom],.ep-root .data-\[side\=top\]\:-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.ep-root .data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.ep-root .data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.ep-root .data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.ep-root .data-\[state\=closed\]\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.ep-root .data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.ep-root .data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.ep-root .data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.ep-root .data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.ep-root .data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.ep-root .data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.ep-root :is(.\[\&\>span\]\:truncate>span){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Editor Styles
3
+ *
4
+ * Export CSS styles for the DOCX editor.
5
+ * Import this file to include all editor styles:
6
+ *
7
+ * ```
8
+ * import '@eigenpal/docx-editor/styles';
9
+ * ```
10
+ *
11
+ * Or import the CSS directly:
12
+ * ```
13
+ * import '@eigenpal/docx-editor/styles/editor.css';
14
+ * ```
15
+ */
16
+ declare const EDITOR_CSS_PATH = "./editor.css";
17
+
18
+ export { EDITOR_CSS_PATH };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Editor Styles
3
+ *
4
+ * Export CSS styles for the DOCX editor.
5
+ * Import this file to include all editor styles:
6
+ *
7
+ * ```
8
+ * import '@eigenpal/docx-editor/styles';
9
+ * ```
10
+ *
11
+ * Or import the CSS directly:
12
+ * ```
13
+ * import '@eigenpal/docx-editor/styles/editor.css';
14
+ * ```
15
+ */
16
+ declare const EDITOR_CSS_PATH = "./editor.css";
17
+
18
+ export { EDITOR_CSS_PATH };
package/dist/styles.js ADDED
@@ -0,0 +1 @@
1
+ 'use strict';require('./chunk-H5NTJZO4.js');var o="./editor.css";exports.EDITOR_CSS_PATH=o;
@@ -0,0 +1 @@
1
+ import'./chunk-TAUMSKRE.mjs';var o="./editor.css";export{o as EDITOR_CSS_PATH};
@@ -0,0 +1,18 @@
1
+ import en from '@eigenpal/docx-editor-i18n/en.json';
2
+
3
+ /** Auto-derived from en.json — never manually maintained */
4
+ type LocaleStrings = typeof en;
5
+ /** Recursively makes all properties optional */
6
+ type DeepPartial<T> = {
7
+ [K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K] | null;
8
+ };
9
+ type PartialLocaleStrings = DeepPartial<LocaleStrings>;
10
+ /** Consumer-facing type for the i18n prop. */
11
+ type Translations = PartialLocaleStrings;
12
+ /** Generates a union of all valid dot-notation paths through a nested object type */
13
+ type DotPath<T, Prefix extends string = ''> = {
14
+ [K in keyof T & string]: T[K] extends Record<string, unknown> ? DotPath<T[K], `${Prefix}${K}.`> : `${Prefix}${K}`;
15
+ }[keyof T & string];
16
+ type TranslationKey = DotPath<LocaleStrings>;
17
+
18
+ export type { LocaleStrings as L, PartialLocaleStrings as P, TranslationKey as T, Translations as a };
@@ -0,0 +1,18 @@
1
+ import en from '@eigenpal/docx-editor-i18n/en.json';
2
+
3
+ /** Auto-derived from en.json — never manually maintained */
4
+ type LocaleStrings = typeof en;
5
+ /** Recursively makes all properties optional */
6
+ type DeepPartial<T> = {
7
+ [K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K] | null;
8
+ };
9
+ type PartialLocaleStrings = DeepPartial<LocaleStrings>;
10
+ /** Consumer-facing type for the i18n prop. */
11
+ type Translations = PartialLocaleStrings;
12
+ /** Generates a union of all valid dot-notation paths through a nested object type */
13
+ type DotPath<T, Prefix extends string = ''> = {
14
+ [K in keyof T & string]: T[K] extends Record<string, unknown> ? DotPath<T[K], `${Prefix}${K}.`> : `${Prefix}${K}`;
15
+ }[keyof T & string];
16
+ type TranslationKey = DotPath<LocaleStrings>;
17
+
18
+ export type { LocaleStrings as L, PartialLocaleStrings as P, TranslationKey as T, Translations as a };
@@ -0,0 +1,281 @@
1
+ import { EditorView } from 'prosemirror-view';
2
+ import { ReactNode } from 'react';
3
+ import { Plugin } from 'prosemirror-state';
4
+ import { Node } from 'prosemirror-model';
5
+
6
+ /**
7
+ * Framework-Agnostic Plugin Interface for the DOCX Editor
8
+ *
9
+ * Core plugin types that can be used by any framework (React, Vue, etc.).
10
+ * Framework-specific adapters extend EditorPluginCore with their own
11
+ * UI rendering capabilities (e.g., ReactEditorPlugin, VueEditorPlugin).
12
+ */
13
+
14
+ /**
15
+ * Coordinates returned by position lookup in the rendered DOM.
16
+ */
17
+ interface PositionCoordinates {
18
+ x: number;
19
+ y: number;
20
+ height: number;
21
+ }
22
+ /**
23
+ * Context for accessing the rendered DOM in the paged editor.
24
+ *
25
+ * Provides DOM-based position mapping that works with the LayoutPainter
26
+ * output (visible pages). Use this for rendering overlays, annotations,
27
+ * and other visual elements positioned relative to rendered content.
28
+ *
29
+ * The rendered DOM uses data-pm-start/data-pm-end attributes on spans
30
+ * to map between ProseMirror positions and DOM elements.
31
+ */
32
+ interface RenderedDomContext {
33
+ /** The container element holding all rendered pages. */
34
+ pagesContainer: HTMLElement;
35
+ /**
36
+ * Get pixel coordinates for a ProseMirror position in the rendered DOM.
37
+ * Returns null if the position cannot be found.
38
+ */
39
+ getCoordinatesForPosition(pmPos: number): PositionCoordinates | null;
40
+ /**
41
+ * Find DOM elements that overlap with a ProseMirror position range.
42
+ */
43
+ findElementsForRange(from: number, to: number): Element[];
44
+ /**
45
+ * Get bounding rectangles for a range of text, accounting for line wraps.
46
+ * Returns rects relative to the pages container.
47
+ */
48
+ getRectsForRange(from: number, to: number): Array<{
49
+ x: number;
50
+ y: number;
51
+ width: number;
52
+ height: number;
53
+ }>;
54
+ /** Current zoom level (1 = 100%). */
55
+ zoom: number;
56
+ /**
57
+ * Offset of the pages container from its parent viewport.
58
+ */
59
+ getContainerOffset(): {
60
+ x: number;
61
+ y: number;
62
+ };
63
+ }
64
+ /**
65
+ * Props passed to plugin panel components (framework-agnostic base).
66
+ */
67
+ interface PluginPanelProps<TState = unknown> {
68
+ /** Current ProseMirror editor view */
69
+ editorView: EditorView | null;
70
+ /** Current ProseMirror document */
71
+ doc: Node | null;
72
+ /** Scroll editor to a specific position */
73
+ scrollToPosition: (pos: number) => void;
74
+ /** Select a range in the editor */
75
+ selectRange: (from: number, to: number) => void;
76
+ /** Plugin-specific state (managed by the plugin) */
77
+ pluginState: TState;
78
+ /** Width of the panel in pixels */
79
+ panelWidth: number;
80
+ /**
81
+ * Context for the rendered DOM (LayoutPainter output).
82
+ * May be null if layout hasn't completed yet.
83
+ */
84
+ renderedDomContext: RenderedDomContext | null;
85
+ }
86
+ /**
87
+ * Configuration for plugin panel rendering.
88
+ */
89
+ interface PanelConfig {
90
+ /** Where to render the panel */
91
+ position: 'left' | 'right' | 'bottom';
92
+ /** Default width/height of the panel */
93
+ defaultSize: number;
94
+ /** Minimum size */
95
+ minSize?: number;
96
+ /** Maximum size */
97
+ maxSize?: number;
98
+ /** Whether the panel is resizable */
99
+ resizable?: boolean;
100
+ /** Whether the panel can be collapsed */
101
+ collapsible?: boolean;
102
+ /** Initial collapsed state */
103
+ defaultCollapsed?: boolean;
104
+ }
105
+ /**
106
+ * Framework-agnostic core plugin interface.
107
+ *
108
+ * Contains all non-UI plugin capabilities:
109
+ * - ProseMirror plugins (decorations, keymaps, etc.)
110
+ * - State management (initialize, onStateChange, destroy)
111
+ * - CSS injection
112
+ * - Panel configuration
113
+ *
114
+ * Framework adapters (ReactEditorPlugin, VueEditorPlugin) extend this
115
+ * with their own Panel component type and renderOverlay function.
116
+ */
117
+ interface EditorPluginCore<TState = any> {
118
+ /** Unique plugin identifier */
119
+ id: string;
120
+ /** Display name for the plugin */
121
+ name: string;
122
+ /**
123
+ * ProseMirror plugins to register with the editor.
124
+ * These are merged with the editor's internal plugins.
125
+ */
126
+ proseMirrorPlugins?: Plugin[];
127
+ /**
128
+ * Configuration for the panel (position, size, etc.)
129
+ */
130
+ panelConfig?: PanelConfig;
131
+ /**
132
+ * Called when the editor state changes.
133
+ * Use this to update plugin-specific state based on document changes.
134
+ */
135
+ onStateChange?: (view: EditorView) => TState | undefined;
136
+ /**
137
+ * Initialize plugin state when the plugin is first loaded.
138
+ */
139
+ initialize?: (view: EditorView | null) => TState;
140
+ /**
141
+ * Called when the plugin is being destroyed.
142
+ * Use this for cleanup (subscriptions, timers, etc.)
143
+ */
144
+ destroy?: () => void;
145
+ /**
146
+ * CSS styles to inject for this plugin.
147
+ * Can be a string of CSS or a URL to a stylesheet.
148
+ */
149
+ styles?: string;
150
+ }
151
+ /**
152
+ * A sidebar item anchored to a document position.
153
+ * Framework adapters extend this with rendering capabilities.
154
+ */
155
+ interface SidebarItem {
156
+ /** Unique ID for this item (used as React key and for overlap resolution). */
157
+ id: string;
158
+ /** ProseMirror document position this item anchors to. */
159
+ anchorPos: number;
160
+ /** Optional key into the anchorPositions Map (e.g. "comment-42", "revision-7"). */
161
+ anchorKey?: string;
162
+ /** Sort priority within items at the same anchor Y. Lower = first. Default: 0. */
163
+ priority?: number;
164
+ /** Temporary items (e.g. "add comment" input) skip entrance animation. */
165
+ isTemporary?: boolean;
166
+ /** Pre-computed Y position (scroll-container coords, pre-zoom). Overrides anchor resolution. */
167
+ fixedY?: number;
168
+ }
169
+ /**
170
+ * Context provided to plugins when computing sidebar items.
171
+ */
172
+ interface SidebarItemContext {
173
+ editorView: EditorView | null;
174
+ renderedDomContext: RenderedDomContext | null;
175
+ /** Pre-computed Y positions from layout engine (keys like "comment-{id}"). */
176
+ anchorPositions: Map<string, number>;
177
+ zoom: number;
178
+ }
179
+
180
+ /**
181
+ * React Plugin Interface for the DOCX Editor
182
+ *
183
+ * Extends the framework-agnostic EditorPluginCore with React-specific
184
+ * UI rendering capabilities (Panel component, renderOverlay).
185
+ */
186
+
187
+ /**
188
+ * React-specific editor plugin interface.
189
+ *
190
+ * Extends EditorPluginCore with:
191
+ * - Panel: React component for rendering in the annotation panel
192
+ * - renderOverlay: Function returning ReactNode for overlay rendering
193
+ */
194
+ /**
195
+ * Render props passed to each sidebar item.
196
+ */
197
+ interface SidebarItemRenderProps {
198
+ /** Whether this item is currently expanded/active. */
199
+ isExpanded: boolean;
200
+ /** Toggle expand/collapse for this item. */
201
+ onToggleExpand: () => void;
202
+ /** Ref callback to measure the rendered card height. */
203
+ measureRef: (el: HTMLDivElement | null) => void;
204
+ }
205
+ /**
206
+ * A sidebar item with React rendering, anchored to a document position.
207
+ */
208
+ interface ReactSidebarItem extends SidebarItem {
209
+ /** Render the card content. */
210
+ render: (props: SidebarItemRenderProps) => ReactNode;
211
+ /** Estimated height in pixels (for pre-layout before measurement). Default: 40. */
212
+ estimatedHeight?: number;
213
+ }
214
+ interface ReactEditorPlugin<TState = any> extends EditorPluginCore<TState> {
215
+ /**
216
+ * React component to render in the annotation panel area.
217
+ * Receives editor state and callbacks for interaction.
218
+ */
219
+ Panel?: React.ComponentType<PluginPanelProps<TState>>;
220
+ /**
221
+ * Render an overlay on top of the rendered pages.
222
+ * Use this for highlights, annotations, or other visual elements
223
+ * that need to be positioned relative to the document content.
224
+ */
225
+ renderOverlay?: (context: RenderedDomContext, state: TState, editorView: EditorView | null) => ReactNode;
226
+ /**
227
+ * Provide sidebar items anchored to document positions.
228
+ * Called whenever plugin state changes.
229
+ * Items from all plugins are merged and laid out together in a unified sidebar.
230
+ */
231
+ getSidebarItems?: (state: TState, context: SidebarItemContext) => ReactSidebarItem[];
232
+ }
233
+ /**
234
+ * Backwards-compatible alias — EditorPlugin is now ReactEditorPlugin.
235
+ */
236
+ type EditorPlugin<TState = any> = ReactEditorPlugin<TState>;
237
+ /**
238
+ * Context value provided to plugins and panels.
239
+ */
240
+ interface PluginContext {
241
+ /** All registered plugins */
242
+ plugins: EditorPlugin[];
243
+ /** Current editor view */
244
+ editorView: EditorView | null;
245
+ /** Set the editor view (called by editor on mount) */
246
+ setEditorView: (view: EditorView | null) => void;
247
+ /** Get plugin state by plugin ID */
248
+ getPluginState: <T>(pluginId: string) => T | undefined;
249
+ /** Update plugin state */
250
+ setPluginState: <T>(pluginId: string, state: T) => void;
251
+ /** Scroll to a position in the editor */
252
+ scrollToPosition: (pos: number) => void;
253
+ /** Select a range in the editor */
254
+ selectRange: (from: number, to: number) => void;
255
+ }
256
+ /**
257
+ * Props for the PluginHost component.
258
+ */
259
+ interface PluginHostProps {
260
+ /** Plugins to enable */
261
+ plugins: EditorPlugin[];
262
+ /** The editor component (passed as child) */
263
+ children: React.ReactElement;
264
+ /** Class name for the host container */
265
+ className?: string;
266
+ }
267
+ /**
268
+ * Ref interface for the PluginHost component.
269
+ */
270
+ interface PluginHostRef {
271
+ /** Get plugin state by plugin ID */
272
+ getPluginState: <T>(pluginId: string) => T | undefined;
273
+ /** Update plugin state for a plugin */
274
+ setPluginState: <T>(pluginId: string, state: T) => void;
275
+ /** Get the current editor view */
276
+ getEditorView: () => EditorView | null;
277
+ /** Force a refresh of all plugin states */
278
+ refreshPluginStates: () => void;
279
+ }
280
+
281
+ export type { EditorPlugin as E, PositionCoordinates as P, RenderedDomContext as R, SidebarItem as S, ReactSidebarItem as a, ReactEditorPlugin as b, PanelConfig as c, PluginContext as d, PluginHostProps as e, PluginHostRef as f, PluginPanelProps as g, SidebarItemContext as h, SidebarItemRenderProps as i };