@zeke-02/docx-editor 0.5.2 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (211) hide show
  1. package/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-5D_FoAp6.d.ts +395 -0
  13. package/dist/KeyboardShortcutsDialog-D7ihAj18.d.mts +395 -0
  14. package/dist/PageSetupDialog-642IAVG2.js +1 -0
  15. package/dist/PageSetupDialog-ERUQDHAY.mjs +1 -0
  16. package/dist/{SplitCellDialog-NP3JJYHD.mjs → SplitCellDialog-GFWCFCTD.mjs} +1 -1
  17. package/dist/{SplitCellDialog-JIAC3RYV.js → SplitCellDialog-M7WF7ANE.js} +1 -1
  18. package/dist/{TablePropertiesDialog-TIK4AA5M.mjs → TablePropertiesDialog-TZ7VCL6V.mjs} +1 -1
  19. package/dist/{TablePropertiesDialog-T7D4HSVP.js → TablePropertiesDialog-ZKU2FTUX.js} +1 -1
  20. package/dist/agentApi-C41hiW-n.d.mts +486 -0
  21. package/dist/agentApi-D4AZmNfB.d.ts +486 -0
  22. package/dist/chunk-2XXILKEQ.js +1 -0
  23. package/dist/chunk-35DG3R42.js +2 -0
  24. package/dist/chunk-47VJOBJD.mjs +60 -0
  25. package/dist/chunk-5UX5CD4C.js +1 -0
  26. package/dist/chunk-7QQSDIWK.mjs +2 -0
  27. package/dist/chunk-AW5TISUL.js +3 -0
  28. package/dist/chunk-AYMGSTNG.js +1 -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-E6MQXELR.js +1 -0
  34. package/dist/chunk-F5SERL7X.mjs +2 -0
  35. package/dist/chunk-FWPVBFKQ.mjs +1 -0
  36. package/dist/chunk-GGQK26JO.js +2 -0
  37. package/dist/chunk-GM2S2WMT.mjs +1 -0
  38. package/dist/chunk-ILYKDR3C.js +1 -0
  39. package/dist/chunk-IP5NAYHL.js +60 -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-LUJ6HCMH.mjs +1 -0
  44. package/dist/chunk-MKNSJOCN.js +70 -0
  45. package/dist/chunk-NIBCC7WQ.js +1 -0
  46. package/dist/chunk-NLFXR2VH.js +2 -0
  47. package/dist/chunk-ONIYA2FU.mjs +2 -0
  48. package/dist/chunk-ONNHQWAX.mjs +1 -0
  49. package/dist/chunk-RCIZ7OM3.mjs +70 -0
  50. package/dist/{chunk-EHFEG3TX.js → chunk-SNZ57XBI.js} +1 -1
  51. package/dist/chunk-SOTWG3KJ.mjs +1 -0
  52. package/dist/chunk-TYPGB4KF.js +1 -0
  53. package/dist/chunk-U7ZW2DOO.mjs +2 -0
  54. package/dist/{chunk-PKEOQIQO.mjs → chunk-WPI3YRFO.mjs} +1 -1
  55. package/dist/chunk-XQZTWWRF.mjs +18 -0
  56. package/dist/chunk-ZVAFVHWR.mjs +3 -0
  57. package/dist/chunk-ZXPCJWVY.js +2 -0
  58. package/dist/{agentApi-DLt94vXk.d.mts → content-B2MzIMwA.d.mts} +8 -755
  59. package/dist/{agentApi-DLt94vXk.d.ts → content-B2MzIMwA.d.ts} +8 -755
  60. package/dist/dialogs.d.mts +25 -0
  61. package/dist/dialogs.d.ts +25 -0
  62. package/dist/dialogs.js +1 -0
  63. package/dist/dialogs.mjs +1 -0
  64. package/dist/document-DZ_ZeZEH.d.ts +294 -0
  65. package/dist/document-Di1qGqLS.d.mts +294 -0
  66. package/dist/executor-EPEB53SJ.js +1 -0
  67. package/dist/executor-TVJ6K6MW.mjs +1 -0
  68. package/dist/findReplace-CpIoILbP.d.mts +138 -0
  69. package/dist/findReplace-pkMskVJU.d.ts +138 -0
  70. package/dist/hooks.d.mts +598 -0
  71. package/dist/hooks.d.ts +598 -0
  72. package/dist/hooks.js +1 -0
  73. package/dist/hooks.mjs +1 -0
  74. package/dist/index.d.mts +1013 -483
  75. package/dist/index.d.ts +1013 -483
  76. package/dist/index.js +40 -120
  77. package/dist/index.mjs +40 -120
  78. package/dist/layout-bridge-5GYGYKM5.mjs +1 -0
  79. package/dist/layout-bridge-QQDA7ELH.js +1 -0
  80. package/dist/plugin-api.d.mts +176 -0
  81. package/dist/plugin-api.d.ts +176 -0
  82. package/dist/plugin-api.js +260 -0
  83. package/dist/plugin-api.mjs +260 -0
  84. package/dist/processTemplate-BTBTR7AM.js +1 -0
  85. package/dist/{processTemplate-W2C5PXZB.mjs → processTemplate-MBX2KDLE.mjs} +1 -1
  86. package/dist/styles.css +1 -1
  87. package/dist/styles.d.mts +18 -0
  88. package/dist/styles.d.ts +18 -0
  89. package/dist/styles.js +1 -0
  90. package/dist/styles.mjs +1 -0
  91. package/dist/types-Bd_YzkhG.d.mts +281 -0
  92. package/dist/types-Bd_YzkhG.d.ts +281 -0
  93. package/dist/types-CkfDgB0O.d.mts +39 -0
  94. package/dist/types-DZUhB7Ao.d.mts +18 -0
  95. package/dist/types-DZUhB7Ao.d.ts +18 -0
  96. package/dist/types-DcxHFUSc.d.ts +39 -0
  97. package/dist/ui.d.mts +111 -552
  98. package/dist/ui.d.ts +111 -552
  99. package/dist/ui.js +111 -1
  100. package/dist/ui.mjs +111 -1
  101. package/dist/useFindReplace-DDs533b-.d.mts +261 -0
  102. package/dist/useFindReplace-eyhMSZZf.d.ts +261 -0
  103. package/package.json +41 -43
  104. package/dist/ClipboardManager-CVKX0v9q.d.ts +0 -464
  105. package/dist/ClipboardManager-V3aaMnWE.d.mts +0 -464
  106. package/dist/DocumentAgent-BWflKHpH.d.mts +0 -442
  107. package/dist/DocumentAgent-DsdXtetF.d.ts +0 -442
  108. package/dist/FindReplaceDialog-L3YF5HIS.mjs +0 -1
  109. package/dist/FindReplaceDialog-SEBWC5P7.js +0 -1
  110. package/dist/HyperlinkDialog-WEK6JSAC.js +0 -1
  111. package/dist/ImagePropertiesDialog-527MFLQO.mjs +0 -1
  112. package/dist/ImagePropertiesDialog-HG4K3IE7.js +0 -1
  113. package/dist/PageSetupDialog-GALVJMUB.js +0 -1
  114. package/dist/PageSetupDialog-TGQIAMI7.mjs +0 -1
  115. package/dist/TableToolbar-DUgmob2I.d.ts +0 -1273
  116. package/dist/TableToolbar-YL74HNS1.d.mts +0 -1273
  117. package/dist/chunk-23SXXIZS.js +0 -111
  118. package/dist/chunk-3F52AP2Q.js +0 -1
  119. package/dist/chunk-42O5GXM5.mjs +0 -82
  120. package/dist/chunk-54ULJEHM.mjs +0 -1
  121. package/dist/chunk-5XK326FI.mjs +0 -1
  122. package/dist/chunk-6WPRCJ5A.mjs +0 -1
  123. package/dist/chunk-76IYR7C7.mjs +0 -1
  124. package/dist/chunk-AGRIVA4G.js +0 -1
  125. package/dist/chunk-BTCQ2QI3.mjs +0 -3
  126. package/dist/chunk-BUEMG4NW.js +0 -1
  127. package/dist/chunk-BXRC4U3X.mjs +0 -2
  128. package/dist/chunk-CPAYKE6X.mjs +0 -1
  129. package/dist/chunk-DACWLFKI.mjs +0 -1
  130. package/dist/chunk-EPBFWE36.js +0 -2
  131. package/dist/chunk-FXES3YDB.js +0 -82
  132. package/dist/chunk-HI66BSGS.mjs +0 -9
  133. package/dist/chunk-INTPVEO6.mjs +0 -9
  134. package/dist/chunk-IOAGVW6Q.mjs +0 -2
  135. package/dist/chunk-JCEWC5QL.mjs +0 -4
  136. package/dist/chunk-JTIUFACT.js +0 -1
  137. package/dist/chunk-LUF7PWIC.js +0 -10
  138. package/dist/chunk-MGEN6GOE.mjs +0 -2
  139. package/dist/chunk-MOE2ZGUE.js +0 -18
  140. package/dist/chunk-MWLHJWB6.js +0 -9
  141. package/dist/chunk-OFYVDN3U.mjs +0 -2
  142. package/dist/chunk-P4VSHBGZ.js +0 -2
  143. package/dist/chunk-P5FQHIES.mjs +0 -1
  144. package/dist/chunk-PBC7XAYZ.js +0 -3
  145. package/dist/chunk-PEMB6SZT.js +0 -2
  146. package/dist/chunk-PQMSZTBB.js +0 -9
  147. package/dist/chunk-Q7UDQXAF.js +0 -1
  148. package/dist/chunk-QGTAIC5E.js +0 -1
  149. package/dist/chunk-QVPR2W5S.js +0 -1
  150. package/dist/chunk-R3QMYPL5.mjs +0 -59
  151. package/dist/chunk-RBUTXXQJ.mjs +0 -18
  152. package/dist/chunk-RRWYZ2TS.mjs +0 -111
  153. package/dist/chunk-S3STEPVO.js +0 -182
  154. package/dist/chunk-SFUM35DH.js +0 -2
  155. package/dist/chunk-SNLC6EK2.js +0 -1
  156. package/dist/chunk-TMTLIGLZ.js +0 -59
  157. package/dist/chunk-TSE2PWFX.mjs +0 -10
  158. package/dist/chunk-UKESXQS5.mjs +0 -182
  159. package/dist/chunk-UWYD42WV.js +0 -4
  160. package/dist/chunk-UXVACQCY.mjs +0 -1
  161. package/dist/chunk-W4EIKDM6.mjs +0 -2
  162. package/dist/chunk-W53SI3XW.mjs +0 -1
  163. package/dist/chunk-WNS2RBQD.js +0 -2
  164. package/dist/chunk-Z3KMSHUP.js +0 -1
  165. package/dist/core-plugins-reexport.d.mts +0 -31
  166. package/dist/core-plugins-reexport.d.ts +0 -31
  167. package/dist/core-plugins-reexport.js +0 -1
  168. package/dist/core-plugins-reexport.mjs +0 -1
  169. package/dist/core-reexport.d.mts +0 -340
  170. package/dist/core-reexport.d.ts +0 -340
  171. package/dist/core-reexport.js +0 -1
  172. package/dist/core-reexport.mjs +0 -1
  173. package/dist/documentSerializer-DtS_-oGA.d.mts +0 -664
  174. package/dist/documentSerializer-Wj1p2ASa.d.ts +0 -664
  175. package/dist/executor-C3VXF7QA.mjs +0 -1
  176. package/dist/executor-GDBV3AGV.js +0 -1
  177. package/dist/headless-reexport.d.mts +0 -197
  178. package/dist/headless-reexport.d.ts +0 -197
  179. package/dist/headless-reexport.js +0 -1
  180. package/dist/headless-reexport.mjs +0 -1
  181. package/dist/insertOperations-BTH1Asas.d.mts +0 -176
  182. package/dist/insertOperations-CbUnXAXH.d.ts +0 -176
  183. package/dist/layout-bridge-EA4DJ227.js +0 -1
  184. package/dist/layout-bridge-XDPSO6GO.mjs +0 -1
  185. package/dist/mcp-reexport.d.mts +0 -156
  186. package/dist/mcp-reexport.d.ts +0 -156
  187. package/dist/mcp-reexport.js +0 -16
  188. package/dist/mcp-reexport.mjs +0 -16
  189. package/dist/processTemplate-MJ2PCSO5.js +0 -1
  190. package/dist/react-B0W16SV6.d.ts +0 -1330
  191. package/dist/react-D0Pn1nww.d.mts +0 -1330
  192. package/dist/react.css +0 -1
  193. package/dist/react.d.mts +0 -10
  194. package/dist/react.d.ts +0 -10
  195. package/dist/react.js +0 -1
  196. package/dist/react.mjs +0 -1
  197. package/dist/registry-CH9V-IX0.d.ts +0 -165
  198. package/dist/registry-CWBKYlNW.d.mts +0 -165
  199. package/dist/types-UDsUq8D3.d.mts +0 -310
  200. package/dist/types-jbivc9Lj.d.ts +0 -310
  201. package/dist/variableDetector-CdQ7ZTzA.d.mts +0 -204
  202. package/dist/variableDetector-DsRV3A9z.d.ts +0 -204
  203. package/i18n/de.json +0 -792
  204. package/i18n/en.json +0 -792
  205. package/i18n/he.json +0 -792
  206. package/i18n/pl.json +0 -792
  207. package/i18n/pt-BR.json +0 -792
  208. package/i18n/tr.json +0 -792
  209. package/i18n/zh-CN.json +0 -792
  210. /package/dist/{chunk-YC5KZSYD.js → chunk-ESZ6JRTW.js} +0 -0
  211. /package/dist/{chunk-LVGJKS7Y.mjs → chunk-TZMMD6RR.mjs} +0 -0
@@ -1,1273 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import React__default, { CSSProperties, ReactNode } from 'react';
3
- import { a3 as Theme, b as Run, a as Paragraph, e as Table, a0 as TableCell } from './agentApi-DLt94vXk.mjs';
4
-
5
- /**
6
- * Font Picker Component (Radix UI)
7
- *
8
- * A dropdown selector for choosing font families using Radix Select.
9
- */
10
- interface FontOption {
11
- name: string;
12
- fontFamily: string;
13
- category?: 'sans-serif' | 'serif' | 'monospace' | 'other';
14
- }
15
- interface FontPickerProps {
16
- value?: string;
17
- onChange?: (fontFamily: string) => void;
18
- fonts?: FontOption[];
19
- disabled?: boolean;
20
- className?: string;
21
- placeholder?: string;
22
- width?: number | string;
23
- showPreview?: boolean;
24
- }
25
- declare function FontPicker({ value, onChange, fonts, disabled, className, placeholder, width, showPreview, }: FontPickerProps): react_jsx_runtime.JSX.Element;
26
-
27
- var _lang = "en";
28
- var common = {
29
- cancel: "Cancel",
30
- insert: "Insert",
31
- apply: "Apply",
32
- close: "Close",
33
- "delete": "Delete",
34
- update: "Update",
35
- save: "Save",
36
- retry: "Retry",
37
- send: "Send",
38
- edit: "Edit",
39
- comment: "Comment",
40
- reply: "Reply",
41
- accept: "Accept",
42
- reject: "Reject",
43
- dismiss: "Dismiss",
44
- change: "Change",
45
- px: "px",
46
- closeDialog: "Close dialog"
47
- };
48
- var toolbar = {
49
- ariaLabel: "Formatting toolbar",
50
- file: "File",
51
- format: "Format",
52
- insert: "Insert",
53
- open: "Open",
54
- openShortcut: "Ctrl+O",
55
- save: "Save",
56
- saveShortcut: "Ctrl+S",
57
- print: "Print",
58
- printShortcut: "Ctrl+P",
59
- pageSetup: "Page setup",
60
- leftToRight: "Left-to-right text",
61
- rightToLeft: "Right-to-left text",
62
- image: "Image",
63
- table: "Table",
64
- pageBreak: "Page break",
65
- tableOfContents: "Table of contents",
66
- symbol: "Symbol",
67
- help: "Help",
68
- reportIssue: "Report issue"
69
- };
70
- var formattingBar = {
71
- groups: {
72
- history: "History",
73
- zoom: "Zoom",
74
- styles: "Styles",
75
- font: "Font",
76
- textFormatting: "Text formatting",
77
- script: "Script",
78
- alignment: "Alignment",
79
- listFormatting: "List formatting",
80
- image: "Image",
81
- table: "Table"
82
- },
83
- undo: "Undo",
84
- undoShortcut: "Undo (Ctrl+Z)",
85
- redo: "Redo",
86
- redoShortcut: "Redo (Ctrl+Y)",
87
- bold: "Bold",
88
- boldShortcut: "Bold (Ctrl+B)",
89
- italic: "Italic",
90
- italicShortcut: "Italic (Ctrl+I)",
91
- underline: "Underline",
92
- underlineShortcut: "Underline (Ctrl+U)",
93
- strikethrough: "Strikethrough",
94
- fontColor: "Font Color",
95
- highlightColor: "Text Highlight Color",
96
- insertLink: "Insert link",
97
- insertLinkShortcut: "Insert link (Ctrl+K)",
98
- superscript: "Superscript",
99
- superscriptShortcut: "Superscript (Ctrl+Shift+=)",
100
- subscript: "Subscript",
101
- subscriptShortcut: "Subscript (Ctrl+=)",
102
- imageProperties: "Image properties",
103
- imagePropertiesShortcut: "Image properties (alt text, border)...",
104
- clearFormatting: "Clear formatting"
105
- };
106
- var alignment = {
107
- alignLeft: "Align Left",
108
- alignLeftShortcut: "Ctrl+L",
109
- center: "Center",
110
- centerShortcut: "Ctrl+E",
111
- alignRight: "Align Right",
112
- alignRightShortcut: "Ctrl+R",
113
- justify: "Justify",
114
- justifyShortcut: "Ctrl+J"
115
- };
116
- var lists = {
117
- ariaLabel: "List formatting",
118
- typeAriaLabel: "List type",
119
- indentationAriaLabel: "List indentation",
120
- bulletList: "Bullet List",
121
- numberedList: "Numbered List",
122
- decreaseIndent: "Decrease Indent",
123
- increaseIndent: "Increase Indent"
124
- };
125
- var lineSpacing = {
126
- single: "Single",
127
- double: "Double",
128
- lineSpacingTitle: "Line spacing: {label}",
129
- paragraphSpacing: "Paragraph spacing"
130
- };
131
- var styles = {
132
- selectAriaLabel: "Select paragraph style",
133
- normalText: "Normal text",
134
- title: "Title",
135
- subtitle: "Subtitle",
136
- heading1: "Heading 1",
137
- heading2: "Heading 2",
138
- heading3: "Heading 3"
139
- };
140
- var font = {
141
- selectAriaLabel: "Select font family",
142
- sansSerif: "Sans Serif",
143
- serif: "Serif",
144
- monospace: "Monospace"
145
- };
146
- var fontSize = {
147
- decrease: "Decrease font size",
148
- increase: "Increase font size",
149
- label: "Font size",
150
- listLabel: "Font sizes"
151
- };
152
- var zoom = {
153
- ariaLabel: "Zoom: {label}"
154
- };
155
- var colorPicker = {
156
- ariaLabel: "{type} color picker",
157
- highlightColors: "Highlight Colors",
158
- customColor: "Custom Color",
159
- noColor: "No Color",
160
- automatic: "Automatic",
161
- themeColors: "Theme Colors",
162
- standardColors: "Standard Colors",
163
- colors: {
164
- black: "Black",
165
- darkRed: "Dark Red",
166
- red: "Red",
167
- orange: "Orange",
168
- yellow: "Yellow",
169
- darkYellow: "Dark Yellow",
170
- green: "Green",
171
- darkGreen: "Dark Green",
172
- teal: "Teal",
173
- darkTeal: "Dark Teal",
174
- blue: "Blue",
175
- darkBlue: "Dark Blue",
176
- purple: "Purple",
177
- darkPurple: "Dark Purple",
178
- brown: "Brown",
179
- grey50: "Grey 50%",
180
- grey25: "Grey 25%",
181
- grey10: "Grey 10%",
182
- white: "White",
183
- lightRed: "Light Red",
184
- lightOrange: "Light Orange",
185
- lightYellow: "Light Yellow",
186
- lightGreen: "Light Green",
187
- lightBlue: "Light Blue",
188
- lightPurple: "Light Purple",
189
- pink: "Pink",
190
- rose: "Rose",
191
- gold: "Gold",
192
- aqua: "Aqua",
193
- lavender: "Lavender",
194
- silver: "Silver",
195
- darkOrange: "Dark Orange",
196
- darkGray: "Dark Gray",
197
- gray: "Gray",
198
- cyan: "Cyan",
199
- magenta: "Magenta",
200
- paleGreen: "Pale Green",
201
- lightCyan: "Light Cyan",
202
- skyBlue: "Sky Blue",
203
- lightBlue2: "Light Blue 2",
204
- lightMagenta: "Light Magenta",
205
- brightGreen: "Bright Green",
206
- violet: "Violet"
207
- }
208
- };
209
- var dialogs = {
210
- findReplace: {
211
- titleFind: "Find",
212
- titleFindReplace: "Find and Replace",
213
- findLabel: "Find:",
214
- findPlaceholder: "Enter text to find...",
215
- findAriaLabel: "Find text",
216
- findPrevious: "Find previous",
217
- findPreviousTitle: "Find Previous (Shift+Enter)",
218
- findNext: "Find next",
219
- findNextTitle: "Find Next (Enter)",
220
- matchCount: "{current} of {total} matches",
221
- noResults: "No results found",
222
- replaceLabel: "Replace:",
223
- replacePlaceholder: "Enter replacement text...",
224
- replaceAriaLabel: "Replace text",
225
- replaceButton: "Replace",
226
- replaceCurrentTitle: "Replace current match",
227
- replaceAllButton: "Replace All",
228
- replaceAllTitle: "Replace all matches",
229
- matchCase: "Match case",
230
- wholeWords: "Whole words",
231
- toggleReplace: "+ Replace"
232
- },
233
- hyperlink: {
234
- titleEdit: "Edit Hyperlink",
235
- titleInsert: "Insert Hyperlink",
236
- tabWebAddress: "Web Address",
237
- tabBookmark: "Bookmark",
238
- urlLabel: "URL",
239
- urlPlaceholder: "https://example.com",
240
- urlHint: "Enter a web address, email (mailto:), or phone (tel:)",
241
- bookmarkLabel: "Bookmark",
242
- bookmarkPlaceholder: "Select a bookmark...",
243
- displayTextLabel: "Display Text",
244
- displayTextPlaceholder: "Text to display (optional)",
245
- displayTextHint: "Leave empty to use the selected text",
246
- tooltipLabel: "Tooltip (optional)",
247
- tooltipPlaceholder: "Text shown on hover",
248
- removeLink: "Remove Link",
249
- invalidUrl: "Please enter a valid URL",
250
- urlRequired: "URL is required"
251
- },
252
- insertTable: {
253
- title: "Insert Table",
254
- hoverToSelect: "Hover to select size",
255
- tableSize: "{cols} x {rows} Table",
256
- orSpecifySize: "or specify size",
257
- rowsLabel: "Rows:",
258
- columnsLabel: "Columns:",
259
- insertButton: "Insert Table",
260
- sizeSelector: "Table size selector"
261
- },
262
- splitCell: {
263
- title: "Split Cell",
264
- description: "Set how many rows and columns to split the selected cell into.",
265
- rowsLabel: "Rows:",
266
- columnsLabel: "Columns:",
267
- currentMinimum: "Minimum from current span: {rows} row(s) x {cols} column(s)",
268
- minValue: "Use at least {rows} row(s) and {cols} column(s).",
269
- notOneByOne: "Choose at least two resulting cells."
270
- },
271
- insertImage: {
272
- title: "Insert Image",
273
- uploadAriaLabel: "Click or drag to upload image",
274
- uploadText: "Click to select or drag and drop an image",
275
- uploadSubtext: "PNG, JPG, GIF up to 10MB",
276
- dimensions: "Dimensions",
277
- widthLabel: "Width:",
278
- heightLabel: "Height:",
279
- aspectRatioLocked: "Aspect ratio locked",
280
- aspectRatioUnlocked: "Aspect ratio unlocked",
281
- altTextLabel: "Alt Text (optional)",
282
- altTextPlaceholder: "Describe the image for accessibility",
283
- insertButton: "Insert Image",
284
- invalidFile: "Please select a valid image file",
285
- fileTooLarge: "Image file is too large (max 10MB)",
286
- readFailed: "Failed to read image file",
287
- loadFailed: "Failed to load image",
288
- preview: "Preview"
289
- },
290
- insertSymbol: {
291
- title: "Insert Symbol",
292
- searchPlaceholder: "Search symbols (character or Unicode)...",
293
- noResults: "No symbols found for \"{query}\"",
294
- decimal: "Decimal: {value}",
295
- categories: {
296
- common: "Common",
297
- arrows: "Arrows",
298
- math: "Math",
299
- greek: "Greek",
300
- shapes: "Shapes",
301
- punctuation: "Punctuation",
302
- currency: "Currency",
303
- music: "Music",
304
- emoji: "Emoji"
305
- }
306
- },
307
- imageProperties: {
308
- title: "Image Properties",
309
- altText: "Alt Text",
310
- altTextPlaceholder: "Describe this image for accessibility...",
311
- border: "Border",
312
- width: "Width",
313
- style: "Style",
314
- color: "Color",
315
- preview: "Preview",
316
- borderStyles: {
317
- solid: "Solid",
318
- dashed: "Dashed",
319
- dotted: "Dotted",
320
- double: "Double",
321
- groove: "Groove",
322
- ridge: "Ridge",
323
- inset: "Inset",
324
- outset: "Outset"
325
- }
326
- },
327
- imagePosition: {
328
- title: "Image Position",
329
- horizontal: "Horizontal",
330
- vertical: "Vertical",
331
- position: "Position",
332
- alignment: "Alignment",
333
- offset: "Offset",
334
- offsetPx: "Offset (px)",
335
- align: "Align",
336
- relativeTo: "Relative to",
337
- alignOptions: {
338
- left: "Left",
339
- center: "Center",
340
- right: "Right",
341
- top: "Top",
342
- bottom: "Bottom"
343
- },
344
- relativeOptions: {
345
- page: "Page",
346
- column: "Column",
347
- margin: "Margin",
348
- character: "Character",
349
- paragraph: "Paragraph",
350
- line: "Line"
351
- }
352
- },
353
- pageSetup: {
354
- title: "Page Setup",
355
- pageSize: "PAGE SIZE",
356
- sizeLabel: "Size",
357
- custom: "Custom",
358
- orientation: "Orientation",
359
- portrait: "Portrait",
360
- landscape: "Landscape",
361
- margins: "MARGINS",
362
- top: "Top",
363
- bottom: "Bottom",
364
- left: "Left",
365
- right: "Right",
366
- pageSizes: {
367
- letter: "Letter (8.5\" × 11\")",
368
- a4: "A4 (8.27\" × 11.69\")",
369
- legal: "Legal (8.5\" × 14\")",
370
- a3: "A3 (11.69\" × 16.54\")",
371
- a5: "A5 (5.83\" × 8.27\")",
372
- b5: "B5 (6.93\" × 9.84\")",
373
- executive: "Executive (7.25\" × 10.5\")"
374
- }
375
- },
376
- tableProperties: {
377
- title: "Table Properties",
378
- widthType: "Width type",
379
- widthLabel: "Width",
380
- alignmentLabel: "Alignment",
381
- widthTypes: {
382
- auto: "Auto",
383
- fixed: "Fixed (twips)",
384
- percentage: "Percentage"
385
- },
386
- units: {
387
- fiftiethsPercent: "(50ths of %)",
388
- twips: "tw"
389
- },
390
- alignOptions: {
391
- left: "Left",
392
- center: "Center",
393
- right: "Right"
394
- }
395
- },
396
- pasteSpecial: {
397
- title: "Paste Special",
398
- keepFormatting: "Keep Source Formatting",
399
- keepFormattingDescription: "Paste with original formatting",
400
- keepFormattingShortcut: "Ctrl+V",
401
- plainText: "Paste as Plain Text",
402
- plainTextDescription: "Paste without any formatting",
403
- plainTextShortcut: "Ctrl+Shift+V",
404
- readingClipboard: "Reading clipboard...",
405
- preview: "Preview:",
406
- noContent: "No content available to paste",
407
- clipboardError: "Unable to read clipboard. Please use Ctrl+V to paste."
408
- },
409
- footnoteProperties: {
410
- title: "Footnote & Endnote Properties",
411
- footnotes: "Footnotes",
412
- endnotes: "Endnotes",
413
- position: "Position",
414
- numberFormat: "Number format",
415
- startAt: "Start at",
416
- numbering: "Numbering",
417
- footnotePositions: {
418
- bottomOfPage: "Bottom of page",
419
- belowText: "Below text"
420
- },
421
- endnotePositions: {
422
- endOfDocument: "End of document",
423
- endOfSection: "End of section"
424
- },
425
- numberingOptions: {
426
- continuous: "Continuous",
427
- restartSection: "Restart each section",
428
- restartPage: "Restart each page"
429
- },
430
- formats: {
431
- decimal: "1, 2, 3, ...",
432
- lowerRoman: "i, ii, iii, ...",
433
- upperRoman: "I, II, III, ...",
434
- lowerAlpha: "a, b, c, ...",
435
- upperAlpha: "A, B, C, ...",
436
- symbols: "*, †, ‡, ..."
437
- }
438
- },
439
- keyboardShortcuts: {
440
- ariaLabel: "Keyboard Shortcuts",
441
- searchPlaceholder: "Search shortcuts...",
442
- categories: {
443
- editing: "Editing",
444
- formatting: "Formatting",
445
- navigation: "Navigation",
446
- clipboard: "Clipboard",
447
- selection: "Selection",
448
- view: "View",
449
- file: "File",
450
- other: "Other"
451
- },
452
- shortcuts: {
453
- save: "Save",
454
- saveDescription: "Save document",
455
- print: "Print",
456
- printDescription: "Print document",
457
- undo: "Undo",
458
- undoDescription: "Undo last action",
459
- redo: "Redo",
460
- redoDescription: "Redo last action",
461
- "delete": "Delete",
462
- deleteDescription: "Delete selected text",
463
- find: "Find",
464
- findDescription: "Find text in document",
465
- findReplace: "Find & Replace",
466
- findReplaceDescription: "Find and replace text",
467
- cut: "Cut",
468
- cutDescription: "Cut selected text",
469
- copy: "Copy",
470
- copyDescription: "Copy selected text",
471
- paste: "Paste",
472
- pasteDescription: "Paste from clipboard",
473
- pastePlainText: "Paste as Plain Text",
474
- pastePlainTextDescription: "Paste without formatting",
475
- bold: "Bold",
476
- boldDescription: "Toggle bold formatting",
477
- italic: "Italic",
478
- italicDescription: "Toggle italic formatting",
479
- underline: "Underline",
480
- underlineDescription: "Toggle underline formatting",
481
- strikethrough: "Strikethrough",
482
- strikethroughDescription: "Toggle strikethrough",
483
- subscript: "Subscript",
484
- subscriptDescription: "Toggle subscript",
485
- superscript: "Superscript",
486
- superscriptDescription: "Toggle superscript",
487
- alignLeft: "Align Left",
488
- alignLeftDescription: "Left align paragraph",
489
- alignCenter: "Align Center",
490
- alignCenterDescription: "Center align paragraph",
491
- alignRight: "Align Right",
492
- alignRightDescription: "Right align paragraph",
493
- justify: "Justify",
494
- justifyDescription: "Justify paragraph",
495
- increaseIndent: "Increase Indent",
496
- increaseIndentDescription: "Increase paragraph indent",
497
- decreaseIndent: "Decrease Indent",
498
- decreaseIndentDescription: "Decrease paragraph indent",
499
- selectAll: "Select All",
500
- selectAllDescription: "Select all content",
501
- selectWord: "Select Word",
502
- selectWordDescription: "Select current word",
503
- selectParagraph: "Select Paragraph",
504
- selectParagraphDescription: "Select current paragraph",
505
- extendSelectionByWord: "Extend Selection by Word",
506
- extendSelectionByWordDescription: "Extend selection to next/previous word",
507
- extendSelectionToLineEdge: "Extend Selection to Line Edge",
508
- extendSelectionToLineEdgeDescription: "Extend selection to line start/end",
509
- moveByWord: "Move by Word",
510
- moveByWordDescription: "Move cursor to next/previous word",
511
- moveToLineStart: "Move to Line Start",
512
- moveToLineStartDescription: "Move cursor to start of line",
513
- moveToLineEnd: "Move to Line End",
514
- moveToLineEndDescription: "Move cursor to end of line",
515
- moveToDocumentStart: "Move to Document Start",
516
- moveToDocumentStartDescription: "Move cursor to start of document",
517
- moveToDocumentEnd: "Move to Document End",
518
- moveToDocumentEndDescription: "Move cursor to end of document",
519
- pageUp: "Page Up",
520
- pageUpDescription: "Scroll up one page",
521
- pageDown: "Page Down",
522
- pageDownDescription: "Scroll down one page",
523
- zoomIn: "Zoom In",
524
- zoomInDescription: "Increase zoom level",
525
- zoomOut: "Zoom Out",
526
- zoomOutDescription: "Decrease zoom level",
527
- resetZoom: "Reset Zoom",
528
- resetZoomDescription: "Reset zoom to 100%",
529
- keyboardShortcuts: "Keyboard Shortcuts",
530
- keyboardShortcutsDescription: "Show this help dialog"
531
- },
532
- noResults: "No shortcuts found matching \"{query}\"",
533
- pressEscToClose: "Press {key} to close",
534
- or: "or"
535
- }
536
- };
537
- var comments = {
538
- resolved: "Resolved",
539
- resolve: "Resolve",
540
- reopen: "Reopen",
541
- moreOptions: "More options",
542
- unknown: "Unknown",
543
- addComment: "Add a comment...",
544
- replyPlaceholder: "Reply or add others with @",
545
- replyCount: "{count, plural, one {# reply} other {# replies}}"
546
- };
547
- var trackedChanges = {
548
- unknown: "Unknown",
549
- replaced: "Replaced",
550
- "with": "with",
551
- added: "Added",
552
- deleted: "Deleted"
553
- };
554
- var contextMenu = {
555
- ariaLabel: "AI actions menu",
556
- textMenuAriaLabel: "Text editing menu",
557
- customPromptPlaceholder: "Enter custom prompt...",
558
- cut: "Cut",
559
- cutShortcut: "Ctrl+X",
560
- copy: "Copy",
561
- copyShortcut: "Ctrl+C",
562
- paste: "Paste",
563
- pasteShortcut: "Ctrl+V",
564
- pastePlainText: "Paste as Plain Text",
565
- pastePlainTextShortcut: "Ctrl+Shift+V",
566
- "delete": "Delete",
567
- deleteShortcut: "Del",
568
- selectAll: "Select All",
569
- selectAllShortcut: "Ctrl+A",
570
- selected: "Selected:",
571
- aiActions: {
572
- askAi: "Ask AI",
573
- rewrite: "Rewrite",
574
- expand: "Expand",
575
- summarize: "Summarize",
576
- translate: "Translate",
577
- explain: "Explain",
578
- fixGrammar: "Fix Grammar",
579
- makeFormal: "Make Formal",
580
- makeCasual: "Make Casual",
581
- custom: "Custom"
582
- }
583
- };
584
- var documentOutline = {
585
- ariaLabel: "Document outline",
586
- closeAriaLabel: "Close outline",
587
- closeTitle: "Close outline",
588
- title: "Outline",
589
- noHeadings: "No headings found. Add headings to your document to see them here."
590
- };
591
- var sidebar = {
592
- ariaLabel: "Annotations sidebar"
593
- };
594
- var viewer = {
595
- pageIndicator: "{current} of {total}"
596
- };
597
- var titleBar = {
598
- untitled: "Untitled",
599
- documentNameAriaLabel: "Document name",
600
- menuBarAriaLabel: "Menu bar"
601
- };
602
- var errors = {
603
- loadingDocument: "Loading document...",
604
- noDocumentLoaded: "No document loaded",
605
- failedToLoad: "Failed to Load Document",
606
- unableToParse: "Unable to Parse Document",
607
- somethingWentWrong: "Something went wrong",
608
- errorDescription: "An error occurred while rendering this component. Please try again or contact support if the problem persists.",
609
- errorLabel: "Error:",
610
- componentStack: "Component Stack:",
611
- tryAgain: "Try Again",
612
- showDetails: "Show details",
613
- hideDetails: "Hide details",
614
- unsavedChanges: "You have unsaved changes. Are you sure you want to leave?"
615
- };
616
- var table = {
617
- insertRowAbove: "Insert row above",
618
- insertRowBelow: "Insert row below",
619
- insertColumnLeft: "Insert column left",
620
- insertColumnRight: "Insert column right",
621
- deleteRow: "Delete row",
622
- deleteColumn: "Delete column",
623
- deleteTable: "Delete table",
624
- mergeCells: "Merge cells",
625
- splitCell: "Split cell",
626
- editingTools: "Table editing tools",
627
- label: "Table:",
628
- cellFillColor: "Cell Fill Color",
629
- borderColor: "Border Color",
630
- borderWidth: "Border width",
631
- unknownAction: "Unknown Action",
632
- borders: {
633
- all: "All borders",
634
- outside: "Outside borders",
635
- inside: "Inside borders",
636
- none: "No borders",
637
- remove: "Remove borders",
638
- top: "Top border",
639
- bottom: "Bottom border",
640
- left: "Left border",
641
- right: "Right border",
642
- styleAriaLabel: "Border style",
643
- tooltip: "Borders"
644
- },
645
- moreOptions: "More table options",
646
- styles: {
647
- title: "Table Styles",
648
- label: "Styles",
649
- normalTable: "Normal Table",
650
- tableGrid: "Table Grid",
651
- gridTableLight: "Grid Table Light",
652
- plainTable1: "Plain Table 1",
653
- plainTable2: "Plain Table 2",
654
- plainTable3: "Plain Table 3",
655
- plainTable4: "Plain Table 4",
656
- gridTable1Light: "Grid Table 1 Light",
657
- gridTable4Accent1: "Grid Table 4 Accent 1",
658
- gridTable5Dark: "Grid Table 5 Dark",
659
- listTable3Accent2: "List Table 3 Accent 2",
660
- listTable4Accent3: "List Table 4 Accent 3",
661
- gridTable4Accent5: "Grid Table 4 Accent 5",
662
- gridTable4Accent6: "Grid Table 4 Accent 6"
663
- }
664
- };
665
- var tableAdvanced = {
666
- verticalAlignment: "Vertical alignment",
667
- top: "Top",
668
- middle: "Middle",
669
- bottom: "Bottom",
670
- cellMargins: "Cell margins",
671
- textDirection: "Text direction",
672
- textDirections: {
673
- horizontal: "Horizontal (LR)",
674
- verticalRL: "Vertical (top-bottom, RL)",
675
- verticalLR: "Vertical (bottom-top, LR)"
676
- },
677
- toggleNoWrap: "Toggle no-wrap",
678
- rowHeight: "Row height",
679
- heightRules: {
680
- auto: "Auto",
681
- atLeast: "At least",
682
- exact: "Exact"
683
- },
684
- rule: "Rule",
685
- height: "Height",
686
- toggleHeaderRow: "Toggle header row",
687
- distributeColumns: "Distribute columns evenly",
688
- autoFit: "Auto-fit to contents",
689
- tableProperties: "Table properties...",
690
- tableAlignment: "Table alignment",
691
- alignTableLeft: "Align table left",
692
- alignTableCenter: "Align table center",
693
- alignTableRight: "Align table right",
694
- tableOptionsMenu: "Table options menu",
695
- tableOptions: "Table options"
696
- };
697
- var imageTransform = {
698
- tooltip: "Transform",
699
- rotateClockwise: "Rotate clockwise",
700
- rotateCounterClockwise: "Rotate counter-clockwise",
701
- flipHorizontal: "Flip horizontal",
702
- flipVertical: "Flip vertical"
703
- };
704
- var imageWrap = {
705
- inline: "In Line with Text",
706
- floatLeft: "Square Left",
707
- floatRight: "Square Right",
708
- topAndBottom: "Top and Bottom",
709
- behindText: "Behind Text",
710
- inFrontOfText: "In Front of Text",
711
- tooltipPrefix: "Wrap: {label}",
712
- menu: {
713
- inLineWithText: "In Line with Text",
714
- squareLeft: "Square Left",
715
- squareRight: "Square Right",
716
- behindText: "Behind Text",
717
- inFrontOfText: "In Front of Text",
718
- ariaLabel: "Image layout options"
719
- },
720
- menuDesc: {
721
- inLineWithText: "Image flows in the line as a glyph",
722
- squareLeft: "Image floats left, text wraps on the right",
723
- squareRight: "Image floats right, text wraps on the left",
724
- behindText: "Image paints behind body text",
725
- inFrontOfText: "Image paints over body text"
726
- }
727
- };
728
- var responsePreview = {
729
- loading: "{action}...",
730
- result: "{action} Result",
731
- closeEsc: "Close (Esc)",
732
- editPrompt: "Edit the result before accepting:",
733
- changes: "Changes:",
734
- original: "Original:",
735
- "new": "New:",
736
- cancelEdit: "Cancel Edit"
737
- };
738
- var commentMarkers = {
739
- resolvedComment: "Resolved comment",
740
- comment: "Comment"
741
- };
742
- var editor = {
743
- toggleCommentsSidebar: "Toggle comments sidebar",
744
- showDocumentOutline: "Show document outline",
745
- editing: "Editing",
746
- editingDescription: "Edit document directly",
747
- suggesting: "Suggesting",
748
- suggestingDescription: "Edits become suggestions",
749
- viewing: "Viewing",
750
- viewingDescription: "Read-only, no edits",
751
- failedToParse: "Failed to parse document",
752
- linkRemoved: "Link removed",
753
- linkCopied: "Link copied to clipboard",
754
- failedToSave: "Failed to save document"
755
- };
756
- var hyperlinkPopup = {
757
- displayTextPlaceholder: "Display text",
758
- urlPlaceholder: "https://example.com",
759
- copyLink: "Copy link",
760
- editLink: "Edit link",
761
- removeLink: "Remove link"
762
- };
763
- var headerFooter = {
764
- header: "Header",
765
- footer: "Footer",
766
- options: "Options",
767
- insertPageNumber: "Insert current page number",
768
- insertTotalPages: "Insert total page count",
769
- remove: "Remove {label}",
770
- closeEditing: "Close {label} editing"
771
- };
772
- var image = {
773
- placeholder: "Image placeholder",
774
- placeholderText: "[Image]",
775
- editableAriaLabel: "Editable image"
776
- };
777
- var ruler = {
778
- horizontal: "Horizontal ruler",
779
- vertical: "Vertical ruler",
780
- firstLineIndent: "First line indent",
781
- leftIndent: "Left indent",
782
- rightIndent: "Right indent",
783
- topMargin: "Top margin",
784
- bottomMargin: "Bottom margin"
785
- };
786
- var print = {
787
- label: "Print",
788
- allPages: "All ({totalPages} pages)",
789
- singlePage: "Page {start}",
790
- pageRange: "Pages {start}-{end}"
791
- };
792
- var unsaved = {
793
- unsaved: "Unsaved",
794
- saved: "Saved",
795
- unsavedTitle: "Document has unsaved changes",
796
- savedTitle: "All changes saved",
797
- unsavedAriaLabel: "Unsaved changes",
798
- savedAriaLabel: "All changes saved"
799
- };
800
- var loading = {
801
- label: "Loading"
802
- };
803
- var agentPanel = {
804
- defaultTitle: "Assistant",
805
- toggle: "Open assistant",
806
- close: "Close panel",
807
- resizeHandle: "Resize agent panel",
808
- thinking: "Assistant is thinking",
809
- composerPlaceholder: "Ask the assistant…",
810
- send: "Send",
811
- timeline: {
812
- working: "Working… {count, plural, one {# step} other {# steps}}",
813
- summary: "{count, plural, one {# step} other {# steps}}",
814
- earlier: "+ {count, plural, one {# earlier step} other {# earlier steps}}"
815
- }
816
- };
817
- var en = {
818
- _lang: _lang,
819
- common: common,
820
- toolbar: toolbar,
821
- formattingBar: formattingBar,
822
- alignment: alignment,
823
- lists: lists,
824
- lineSpacing: lineSpacing,
825
- styles: styles,
826
- font: font,
827
- fontSize: fontSize,
828
- zoom: zoom,
829
- colorPicker: colorPicker,
830
- dialogs: dialogs,
831
- comments: comments,
832
- trackedChanges: trackedChanges,
833
- contextMenu: contextMenu,
834
- documentOutline: documentOutline,
835
- sidebar: sidebar,
836
- viewer: viewer,
837
- titleBar: titleBar,
838
- errors: errors,
839
- table: table,
840
- tableAdvanced: tableAdvanced,
841
- imageTransform: imageTransform,
842
- imageWrap: imageWrap,
843
- responsePreview: responsePreview,
844
- commentMarkers: commentMarkers,
845
- editor: editor,
846
- hyperlinkPopup: hyperlinkPopup,
847
- headerFooter: headerFooter,
848
- image: image,
849
- ruler: ruler,
850
- print: print,
851
- unsaved: unsaved,
852
- loading: loading,
853
- agentPanel: agentPanel
854
- };
855
-
856
- /** Auto-derived from en.json — never manually maintained */
857
- type LocaleStrings = typeof en;
858
- /** Recursively makes all properties optional */
859
- type DeepPartial<T> = {
860
- [K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K] | null;
861
- };
862
- type PartialLocaleStrings = DeepPartial<LocaleStrings>;
863
- /** Consumer-facing type for the i18n prop. */
864
- type Translations = PartialLocaleStrings;
865
- /** Generates a union of all valid dot-notation paths through a nested object type */
866
- type DotPath<T, Prefix extends string = ''> = {
867
- [K in keyof T & string]: T[K] extends Record<string, unknown> ? DotPath<T[K], `${Prefix}${K}.`> : `${Prefix}${K}`;
868
- }[keyof T & string];
869
- type TranslationKey = DotPath<LocaleStrings>;
870
-
871
- /**
872
- * Print Utilities
873
- *
874
- * Provides print functionality with:
875
- * - Print button component for toolbar
876
- * - Print-specific CSS styles
877
- * - Browser print dialog trigger
878
- * - Page range utilities
879
- */
880
-
881
- /**
882
- * Print options
883
- */
884
- interface PrintOptions {
885
- /** Whether to include headers */
886
- includeHeaders?: boolean;
887
- /** Whether to include footers */
888
- includeFooters?: boolean;
889
- /** Whether to include page numbers */
890
- includePageNumbers?: boolean;
891
- /** Page range to print (null = all) */
892
- pageRange?: {
893
- start: number;
894
- end: number;
895
- } | null;
896
- /** Scale factor for printing (1.0 = 100%) */
897
- scale?: number;
898
- /** Whether to show background colors */
899
- printBackground?: boolean;
900
- /** Margins mode */
901
- margins?: 'default' | 'none' | 'minimum';
902
- }
903
- /**
904
- * PrintButton props
905
- */
906
- interface PrintButtonProps {
907
- /** Callback when print is triggered */
908
- onPrint: () => void;
909
- /** Whether the button is disabled */
910
- disabled?: boolean;
911
- /** Button label */
912
- label?: string;
913
- /** Additional CSS class */
914
- className?: string;
915
- /** Additional inline styles */
916
- style?: CSSProperties;
917
- /** Show icon */
918
- showIcon?: boolean;
919
- /** Compact mode */
920
- compact?: boolean;
921
- }
922
- /**
923
- * PrintButton - Standalone print button for toolbar
924
- */
925
- declare function PrintButton({ onPrint, disabled, label: labelProp, className, style, showIcon, compact, }: PrintButtonProps): React__default.ReactElement;
926
- /**
927
- * PrintStyles - Injects print-specific CSS
928
- */
929
- declare function PrintStyles(): React__default.ReactElement;
930
- /**
931
- * Trigger browser print dialog for the current document
932
- */
933
- declare function triggerPrint(): void;
934
- /**
935
- * Create print-optimized document view in a new window
936
- */
937
- declare function openPrintWindow(title: string | undefined, content: string): Window | null;
938
- /**
939
- * Get default print options
940
- */
941
- declare function getDefaultPrintOptions(): PrintOptions;
942
- /**
943
- * Create page range from string (e.g., "1-5", "3", "1,3,5")
944
- */
945
- declare function parsePageRange(input: string, maxPages: number): {
946
- start: number;
947
- end: number;
948
- } | null;
949
- /**
950
- * Format page range for display
951
- */
952
- declare function formatPageRange(range: {
953
- start: number;
954
- end: number;
955
- } | null, totalPages: number): string;
956
- /**
957
- * Check if browser supports good print functionality
958
- */
959
- declare function isPrintSupported(): boolean;
960
-
961
- /**
962
- * Clipboard utilities for copy/paste with formatting
963
- *
964
- * Handles:
965
- * - Copy: puts formatted HTML and plain text on clipboard
966
- * - Paste: reads HTML clipboard, converts to runs with formatting
967
- * - Handles paste from Word (cleans up Word HTML)
968
- * - Ctrl+C, Ctrl+V, Ctrl+X keyboard shortcuts
969
- */
970
-
971
- /**
972
- * Clipboard content format
973
- */
974
- interface ClipboardContent {
975
- /** Plain text representation */
976
- plainText: string;
977
- /** HTML representation */
978
- html: string;
979
- /** Internal format (JSON) for preserving full formatting */
980
- internal?: string;
981
- }
982
- /**
983
- * Parsed clipboard content
984
- */
985
- interface ParsedClipboardContent {
986
- /** Runs parsed from clipboard */
987
- runs: Run[];
988
- /** Whether content came from Word */
989
- fromWord: boolean;
990
- /** Whether content came from our editor */
991
- fromEditor: boolean;
992
- /** Original plain text */
993
- plainText: string;
994
- }
995
- /**
996
- * Options for clipboard operations
997
- */
998
- interface ClipboardOptions {
999
- /** Whether to include formatting in copy */
1000
- includeFormatting?: boolean;
1001
- /** Whether to clean Word-specific formatting */
1002
- cleanWordFormatting?: boolean;
1003
- /** Callback for handling errors */
1004
- onError?: (error: Error) => void;
1005
- /** Document theme — required to resolve themed text/shading colors in HTML. */
1006
- theme?: Theme | null;
1007
- }
1008
- /**
1009
- * Custom MIME type for internal clipboard format
1010
- */
1011
- declare const INTERNAL_CLIPBOARD_TYPE = "application/x-docx-editor";
1012
- /**
1013
- * Standard clipboard MIME types
1014
- */
1015
- declare const CLIPBOARD_TYPES: {
1016
- readonly HTML: "text/html";
1017
- readonly PLAIN: "text/plain";
1018
- };
1019
- /**
1020
- * Copy runs to clipboard with formatting
1021
- */
1022
- declare function copyRuns(runs: Run[], options?: ClipboardOptions): Promise<boolean>;
1023
- /**
1024
- * Copy paragraphs to clipboard with formatting
1025
- */
1026
- declare function copyParagraphs(paragraphs: Paragraph[], options?: ClipboardOptions): Promise<boolean>;
1027
- /**
1028
- * Convert runs to clipboard content (HTML and plain text).
1029
- *
1030
- * @param theme - Optional document theme. Pass it so themed text color and
1031
- * shading resolve correctly in the HTML payload (matters when pasting into
1032
- * Gmail/Word/etc.). Omit for rgb-only content.
1033
- */
1034
- declare function runsToClipboardContent(runs: Run[], includeFormatting?: boolean, theme?: Theme | null): ClipboardContent;
1035
- /**
1036
- * Convert paragraphs to clipboard content.
1037
- *
1038
- * @param theme - See {@link runsToClipboardContent}.
1039
- */
1040
- declare function paragraphsToClipboardContent(paragraphs: Paragraph[], includeFormatting?: boolean, theme?: Theme | null): ClipboardContent;
1041
- /**
1042
- * Write content to clipboard
1043
- */
1044
- declare function writeToClipboard(content: ClipboardContent): Promise<boolean>;
1045
- /**
1046
- * Read content from clipboard
1047
- */
1048
- declare function readFromClipboard(options?: ClipboardOptions): Promise<ParsedClipboardContent | null>;
1049
- /**
1050
- * Handle paste event
1051
- */
1052
- declare function handlePasteEvent(event: ClipboardEvent, options?: ClipboardOptions): ParsedClipboardContent | null;
1053
- /**
1054
- * Parse HTML from clipboard
1055
- */
1056
- declare function parseClipboardHtml(html: string, plainText: string, cleanWordFormatting?: boolean): ParsedClipboardContent;
1057
- /**
1058
- * Check if HTML is from Microsoft Word
1059
- */
1060
- declare function isWordHtml(html: string): boolean;
1061
- /**
1062
- * Check if HTML is from our editor
1063
- */
1064
- declare function isEditorHtml(html: string): boolean;
1065
- /**
1066
- * Clean Microsoft Word HTML
1067
- */
1068
- declare function cleanWordHtml(html: string): string;
1069
- /**
1070
- * Convert HTML to runs
1071
- */
1072
- declare function htmlToRuns(html: string, plainTextFallback: string): Run[];
1073
- /**
1074
- * Create clipboard keyboard handlers for an editor
1075
- */
1076
- declare function createClipboardHandlers(options: {
1077
- onCopy?: () => {
1078
- runs: Run[];
1079
- } | null;
1080
- onCut?: () => {
1081
- runs: Run[];
1082
- } | null;
1083
- onPaste?: (content: ParsedClipboardContent) => void;
1084
- clipboardOptions?: ClipboardOptions;
1085
- }): {
1086
- handleCopy: (event: ClipboardEvent) => Promise<void>;
1087
- handleCut: (event: ClipboardEvent) => Promise<void>;
1088
- handlePaste: (event: ClipboardEvent) => void;
1089
- handleKeyDown: (event: KeyboardEvent) => Promise<void>;
1090
- };
1091
-
1092
- /**
1093
- * TableToolbar Component
1094
- *
1095
- * Provides controls for editing tables:
1096
- * - Add row above/below
1097
- * - Add column left/right
1098
- * - Delete row/column
1099
- * - Merge cells
1100
- * - Split cell
1101
- *
1102
- * Shows when cursor is in a table.
1103
- */
1104
-
1105
- /**
1106
- * Table editing action types
1107
- */
1108
- type TableAction = 'addRowAbove' | 'addRowBelow' | 'addColumnLeft' | 'addColumnRight' | 'deleteRow' | 'deleteColumn' | 'mergeCells' | 'splitCell' | 'deleteTable' | 'selectTable' | 'selectRow' | 'selectColumn' | 'borderAll' | 'borderOutside' | 'borderInside' | 'borderNone' | 'borderTop' | 'borderBottom' | 'borderLeft' | 'borderRight' | {
1109
- type: 'cellFillColor';
1110
- color: string | null;
1111
- } | {
1112
- type: 'borderColor';
1113
- color: string;
1114
- } | {
1115
- type: 'borderWidth';
1116
- size: number;
1117
- } | {
1118
- type: 'cellBorder';
1119
- side: 'top' | 'bottom' | 'left' | 'right' | 'all';
1120
- style: string;
1121
- size: number;
1122
- color: string;
1123
- } | {
1124
- type: 'cellVerticalAlign';
1125
- align: 'top' | 'center' | 'bottom';
1126
- } | {
1127
- type: 'cellMargins';
1128
- margins: {
1129
- top?: number;
1130
- bottom?: number;
1131
- left?: number;
1132
- right?: number;
1133
- };
1134
- } | {
1135
- type: 'cellTextDirection';
1136
- direction: string | null;
1137
- } | {
1138
- type: 'toggleNoWrap';
1139
- } | {
1140
- type: 'rowHeight';
1141
- height: number | null;
1142
- rule?: 'auto' | 'atLeast' | 'exact';
1143
- } | {
1144
- type: 'toggleHeaderRow';
1145
- } | {
1146
- type: 'distributeColumns';
1147
- } | {
1148
- type: 'autoFitContents';
1149
- } | {
1150
- type: 'tableProperties';
1151
- props: {
1152
- width?: number | null;
1153
- widthType?: string | null;
1154
- justification?: 'left' | 'center' | 'right' | null;
1155
- };
1156
- } | {
1157
- type: 'openTableProperties';
1158
- } | {
1159
- type: 'applyTableStyle';
1160
- styleId: string;
1161
- };
1162
- /**
1163
- * Selection within a table
1164
- */
1165
- interface TableSelection {
1166
- /** Index of the table in the document */
1167
- tableIndex: number;
1168
- /** Row index (0-indexed) */
1169
- rowIndex: number;
1170
- /** Column index (0-indexed) */
1171
- columnIndex: number;
1172
- /** Selected cell range for multi-cell selection */
1173
- selectedCells?: {
1174
- startRow: number;
1175
- startCol: number;
1176
- endRow: number;
1177
- endCol: number;
1178
- };
1179
- }
1180
- /**
1181
- * Context for table operations
1182
- */
1183
- interface TableContext {
1184
- /** The table being edited */
1185
- table: Table;
1186
- /** Current selection within the table */
1187
- selection: TableSelection;
1188
- /** Whether multiple cells are selected (for merge) */
1189
- hasMultiCellSelection: boolean;
1190
- /** Whether current cell can be split */
1191
- canSplitCell: boolean;
1192
- /** Total number of rows */
1193
- rowCount: number;
1194
- /** Total number of columns */
1195
- columnCount: number;
1196
- }
1197
- interface TableSplitConfig {
1198
- minRows: number;
1199
- minCols: number;
1200
- initialRows: number;
1201
- initialCols: number;
1202
- }
1203
- /**
1204
- * Props for TableToolbar component
1205
- */
1206
- interface TableToolbarProps {
1207
- /** Current table context (null if cursor not in table) */
1208
- context: TableContext | null;
1209
- /** Callback when a table action is triggered */
1210
- onAction?: (action: TableAction, context: TableContext) => void;
1211
- /** Whether the toolbar is disabled */
1212
- disabled?: boolean;
1213
- /** Additional CSS class name */
1214
- className?: string;
1215
- /** Additional inline styles */
1216
- style?: CSSProperties;
1217
- /** Show labels next to icons */
1218
- showLabels?: boolean;
1219
- /** Compact mode */
1220
- compact?: boolean;
1221
- /** Position of the toolbar */
1222
- position?: 'top' | 'floating';
1223
- /** Custom render for additional buttons */
1224
- children?: ReactNode;
1225
- }
1226
- /**
1227
- * TableToolbar - Shows table manipulation controls when cursor is in a table
1228
- */
1229
- declare function TableToolbar({ context, onAction, disabled, className, style, showLabels, compact, position, children, }: TableToolbarProps): React__default.ReactElement | null;
1230
- /**
1231
- * Create a table context from a table and selection
1232
- */
1233
- declare function createTableContext(table: Table, selection: TableSelection): TableContext;
1234
- /**
1235
- * Get column count from a table
1236
- */
1237
- declare function getColumnCount(table: Table): number;
1238
- /**
1239
- * Get cell at specific row and column index
1240
- */
1241
- declare function getCellAt(table: Table, rowIndex: number, columnIndex: number): TableCell | null;
1242
- declare function getTableSplitCellDialogConfig(table: Table, rowIndex: number, columnIndex: number): TableSplitConfig | null;
1243
- declare function splitTableCell(table: Table, rowIndex: number, columnIndex: number, rows: number, cols: number): Table;
1244
- /**
1245
- * Add a row to a table at the specified index
1246
- */
1247
- declare function addRow(table: Table, atIndex: number, position?: 'before' | 'after'): Table;
1248
- /**
1249
- * Delete a row from a table
1250
- */
1251
- declare function deleteRow(table: Table, rowIndex: number): Table;
1252
- /**
1253
- * Add a column to a table at the specified index
1254
- */
1255
- declare function addColumn(table: Table, atIndex: number, position?: 'before' | 'after'): Table;
1256
- /**
1257
- * Delete a column from a table
1258
- */
1259
- declare function deleteColumn(table: Table, columnIndex: number): Table;
1260
- /**
1261
- * Merge cells in a selection
1262
- */
1263
- declare function mergeCells(table: Table, selection: TableSelection): Table;
1264
- /**
1265
- * Backward-compatible helper for callers that still use the older merged-cell
1266
- * split behavior directly.
1267
- *
1268
- * User-facing Split cell is now dialog-driven. For document-model tables, use
1269
- * `getTableSplitCellDialogConfig()` and `splitTableCell()` instead.
1270
- */
1271
- declare function splitCell(table: Table, rowIndex: number, columnIndex: number): Table;
1272
-
1273
- export { getCellAt as A, getColumnCount as B, CLIPBOARD_TYPES as C, getDefaultPrintOptions as D, getTableSplitCellDialogConfig as E, type FontOption as F, handlePasteEvent as G, htmlToRuns as H, INTERNAL_CLIPBOARD_TYPE as I, isEditorHtml as J, isPrintSupported as K, type LocaleStrings as L, isWordHtml as M, mergeCells as N, openPrintWindow as O, type ParsedClipboardContent as P, paragraphsToClipboardContent as Q, parseClipboardHtml as R, parsePageRange as S, type Translations as T, readFromClipboard as U, runsToClipboardContent as V, splitCell as W, splitTableCell as X, triggerPrint as Y, writeToClipboard as Z, type TranslationKey as a, type ClipboardContent as b, type ClipboardOptions as c, FontPicker as d, type FontPickerProps as e, type PartialLocaleStrings as f, PrintButton as g, type PrintButtonProps as h, type PrintOptions as i, PrintStyles as j, type TableAction as k, type TableContext as l, type TableSelection as m, type TableSplitConfig as n, TableToolbar as o, type TableToolbarProps as p, addColumn as q, addRow as r, cleanWordHtml as s, copyParagraphs as t, copyRuns as u, createClipboardHandlers as v, createTableContext as w, deleteColumn as x, deleteRow as y, formatPageRange as z };