@zeke-02/docx-editor 0.5.1 → 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-7BG7QY7I.js +0 -182
  125. package/dist/chunk-AGRIVA4G.js +0 -1
  126. package/dist/chunk-BTCQ2QI3.mjs +0 -3
  127. package/dist/chunk-BUEMG4NW.js +0 -1
  128. package/dist/chunk-BXRC4U3X.mjs +0 -2
  129. package/dist/chunk-CPAYKE6X.mjs +0 -1
  130. package/dist/chunk-DACWLFKI.mjs +0 -1
  131. package/dist/chunk-EPBFWE36.js +0 -2
  132. package/dist/chunk-FXES3YDB.js +0 -82
  133. package/dist/chunk-HI66BSGS.mjs +0 -9
  134. package/dist/chunk-INTPVEO6.mjs +0 -9
  135. package/dist/chunk-IOAGVW6Q.mjs +0 -2
  136. package/dist/chunk-JCEWC5QL.mjs +0 -4
  137. package/dist/chunk-JTIUFACT.js +0 -1
  138. package/dist/chunk-KUTCCI4X.mjs +0 -182
  139. package/dist/chunk-LUF7PWIC.js +0 -10
  140. package/dist/chunk-MGEN6GOE.mjs +0 -2
  141. package/dist/chunk-MOE2ZGUE.js +0 -18
  142. package/dist/chunk-MWLHJWB6.js +0 -9
  143. package/dist/chunk-OFYVDN3U.mjs +0 -2
  144. package/dist/chunk-P4VSHBGZ.js +0 -2
  145. package/dist/chunk-P5FQHIES.mjs +0 -1
  146. package/dist/chunk-PBC7XAYZ.js +0 -3
  147. package/dist/chunk-PEMB6SZT.js +0 -2
  148. package/dist/chunk-PQMSZTBB.js +0 -9
  149. package/dist/chunk-Q7UDQXAF.js +0 -1
  150. package/dist/chunk-QGTAIC5E.js +0 -1
  151. package/dist/chunk-QVPR2W5S.js +0 -1
  152. package/dist/chunk-R3QMYPL5.mjs +0 -59
  153. package/dist/chunk-RBUTXXQJ.mjs +0 -18
  154. package/dist/chunk-RRWYZ2TS.mjs +0 -111
  155. package/dist/chunk-SFUM35DH.js +0 -2
  156. package/dist/chunk-SNLC6EK2.js +0 -1
  157. package/dist/chunk-TMTLIGLZ.js +0 -59
  158. package/dist/chunk-TSE2PWFX.mjs +0 -10
  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
@@ -0,0 +1,395 @@
1
+ import React__default, { CSSProperties } from 'react';
2
+ import { a as FindOptions, b as FindResult, F as FindMatch, P as ParsedClipboardContent } from './findReplace-CpIoILbP.mjs';
3
+ import { a as TranslationKey } from './types-DZUhB7Ao.mjs';
4
+
5
+ /**
6
+ * Find and Replace Dialog Component
7
+ *
8
+ * Modal dialog for searching and replacing text in the document.
9
+ * Supports find, find next/previous, replace, and replace all operations.
10
+ *
11
+ * Logic and utilities are in separate files:
12
+ * - findReplaceUtils.ts — Pure search/replace functions and types
13
+ * - useFindReplace.ts — React hook for dialog state management
14
+ */
15
+
16
+ /**
17
+ * Props for the FindReplaceDialog component
18
+ */
19
+ interface FindReplaceDialogProps {
20
+ /** Whether the dialog is open */
21
+ isOpen: boolean;
22
+ /** Callback when dialog is closed */
23
+ onClose: () => void;
24
+ /** Callback when searching for text */
25
+ onFind: (searchText: string, options: FindOptions) => FindResult | null;
26
+ /** Callback when navigating to next match */
27
+ onFindNext: () => FindMatch | null;
28
+ /** Callback when navigating to previous match */
29
+ onFindPrevious: () => FindMatch | null;
30
+ /** Callback when replacing current match */
31
+ onReplace: (replaceText: string) => boolean;
32
+ /** Callback when replacing all matches */
33
+ onReplaceAll: (searchText: string, replaceText: string, options: FindOptions) => number;
34
+ /** Callback to highlight matches in document */
35
+ onHighlightMatches?: (matches: FindMatch[]) => void;
36
+ /** Callback to clear highlights */
37
+ onClearHighlights?: () => void;
38
+ /** Initial search text (e.g., from selected text) */
39
+ initialSearchText?: string;
40
+ /** Whether to start in replace mode */
41
+ replaceMode?: boolean;
42
+ /** Current match result (from external state) */
43
+ currentResult?: FindResult | null;
44
+ /** Additional CSS class */
45
+ className?: string;
46
+ /** Additional inline styles */
47
+ style?: CSSProperties;
48
+ }
49
+ /**
50
+ * FindReplaceDialog component - Modal for finding and replacing text
51
+ */
52
+ declare function FindReplaceDialog({ isOpen, onClose, onFind, onFindNext, onFindPrevious, onReplace, onReplaceAll, onHighlightMatches, onClearHighlights, initialSearchText, replaceMode, currentResult, className, style, }: FindReplaceDialogProps): React__default.ReactElement | null;
53
+
54
+ /**
55
+ * Hyperlink Dialog Component
56
+ *
57
+ * Modal dialog for inserting and editing hyperlinks in the document.
58
+ * Supports both external URLs and internal bookmark links.
59
+ *
60
+ * Features:
61
+ * - Input for URL (http, https, mailto, tel, etc.)
62
+ * - Input for display text
63
+ * - Edit existing hyperlinks
64
+ * - Remove hyperlink option
65
+ * - Internal bookmark selection
66
+ * - Validation and error handling
67
+ */
68
+
69
+ /**
70
+ * Hyperlink data structure for dialog
71
+ */
72
+ interface HyperlinkData {
73
+ /** URL for external link */
74
+ url?: string;
75
+ /** Display text for the link */
76
+ displayText?: string;
77
+ /** Internal bookmark name */
78
+ bookmark?: string;
79
+ /** Tooltip text */
80
+ tooltip?: string;
81
+ }
82
+ /**
83
+ * Bookmark option for internal link selection
84
+ */
85
+ interface BookmarkOption {
86
+ /** Bookmark name/ID */
87
+ name: string;
88
+ /** Optional display label */
89
+ label?: string;
90
+ }
91
+ /**
92
+ * Props for the HyperlinkDialog component
93
+ */
94
+ interface HyperlinkDialogProps {
95
+ /** Whether the dialog is open */
96
+ isOpen: boolean;
97
+ /** Callback when dialog is closed */
98
+ onClose: () => void;
99
+ /** Callback when hyperlink is inserted/updated */
100
+ onSubmit: (data: HyperlinkData) => void;
101
+ /** Callback when hyperlink is removed */
102
+ onRemove?: () => void;
103
+ /** Initial data for editing existing hyperlink */
104
+ initialData?: HyperlinkData;
105
+ /** Currently selected text (used as default display text) */
106
+ selectedText?: string;
107
+ /** Whether we're editing an existing hyperlink */
108
+ isEditing?: boolean;
109
+ /** Available bookmarks for internal links */
110
+ bookmarks?: BookmarkOption[];
111
+ /** Additional CSS class */
112
+ className?: string;
113
+ /** Additional inline styles */
114
+ style?: CSSProperties;
115
+ }
116
+ /**
117
+ * Validate a URL string
118
+ * Supports http, https, mailto, tel, ftp protocols
119
+ */
120
+ declare function isValidUrl(url: string): boolean;
121
+ /**
122
+ * Normalize a URL by adding protocol if needed
123
+ */
124
+ declare function normalizeUrl(url: string): string;
125
+ /**
126
+ * Detect URL type from string
127
+ */
128
+ declare function getUrlType(url: string): 'web' | 'email' | 'phone' | 'ftp' | 'unknown';
129
+ /**
130
+ * HyperlinkDialog component - Modal for inserting/editing hyperlinks
131
+ */
132
+ declare function HyperlinkDialog({ isOpen, onClose, onSubmit, onRemove, initialData, selectedText, isEditing, bookmarks, className, style, }: HyperlinkDialogProps): React__default.ReactElement | null;
133
+ /**
134
+ * Create HyperlinkData from a URL string
135
+ */
136
+ declare function createHyperlinkData(url: string, displayText?: string): HyperlinkData;
137
+ /**
138
+ * Create HyperlinkData for an internal bookmark
139
+ */
140
+ declare function createBookmarkLinkData(bookmark: string, displayText?: string): HyperlinkData;
141
+ /**
142
+ * Check if HyperlinkData is for an external URL
143
+ */
144
+ declare function isExternalHyperlinkData(data: HyperlinkData): boolean;
145
+ /**
146
+ * Check if HyperlinkData is for an internal bookmark
147
+ */
148
+ declare function isBookmarkHyperlinkData(data: HyperlinkData): boolean;
149
+ /**
150
+ * Get display text from HyperlinkData, falling back to URL/bookmark
151
+ */
152
+ declare function getDisplayText(data: HyperlinkData): string;
153
+ /**
154
+ * Convert email address to mailto: link
155
+ */
156
+ declare function emailToMailto(email: string): string;
157
+ /**
158
+ * Convert phone number to tel: link
159
+ */
160
+ declare function phoneToTel(phone: string): string;
161
+ /**
162
+ * Extract bookmarks from document for the dialog
163
+ */
164
+ declare function extractBookmarksForDialog(bookmarks: {
165
+ name: string;
166
+ id: number;
167
+ }[]): BookmarkOption[];
168
+ /**
169
+ * Hook state for the Hyperlink dialog
170
+ */
171
+ interface UseHyperlinkDialogState {
172
+ /** Whether the dialog is open */
173
+ isOpen: boolean;
174
+ /** Initial data for the dialog (for editing) */
175
+ initialData?: HyperlinkData;
176
+ /** Currently selected text */
177
+ selectedText?: string;
178
+ /** Whether we're editing an existing hyperlink */
179
+ isEditing: boolean;
180
+ }
181
+ /**
182
+ * Hook return type for the Hyperlink dialog
183
+ */
184
+ interface UseHyperlinkDialogReturn {
185
+ /** Current state */
186
+ state: UseHyperlinkDialogState;
187
+ /** Open dialog for inserting new hyperlink */
188
+ openInsert: (selectedText?: string) => void;
189
+ /** Open dialog for editing existing hyperlink */
190
+ openEdit: (data: HyperlinkData) => void;
191
+ /** Close the dialog */
192
+ close: () => void;
193
+ /** Toggle dialog open/closed */
194
+ toggle: () => void;
195
+ }
196
+ /**
197
+ * Hook for managing Hyperlink dialog state
198
+ */
199
+ declare function useHyperlinkDialog(): UseHyperlinkDialogReturn;
200
+
201
+ /**
202
+ * Paste Special Dialog Component
203
+ *
204
+ * Provides paste options for pasting content with or without formatting.
205
+ * Features:
206
+ * - Paste with formatting (default)
207
+ * - Paste as plain text (unformatted)
208
+ * - Keyboard shortcut: Ctrl+Shift+V opens dialog
209
+ */
210
+
211
+ /**
212
+ * Paste option type
213
+ */
214
+ type PasteOption = 'formatted' | 'plainText';
215
+ /**
216
+ * Paste special dialog props
217
+ */
218
+ interface PasteSpecialDialogProps {
219
+ /** Whether the dialog is open */
220
+ isOpen: boolean;
221
+ /** Callback when dialog is closed */
222
+ onClose: () => void;
223
+ /** Callback when paste is confirmed */
224
+ onPaste: (content: ParsedClipboardContent, asPlainText: boolean) => void;
225
+ /** Optional custom position */
226
+ position?: {
227
+ x: number;
228
+ y: number;
229
+ };
230
+ /** Additional className */
231
+ className?: string;
232
+ }
233
+ /**
234
+ * Paste option definition with translation keys
235
+ */
236
+ interface PasteOptionDef {
237
+ id: PasteOption;
238
+ labelKey: TranslationKey;
239
+ descriptionKey: TranslationKey;
240
+ shortcutKey: TranslationKey;
241
+ }
242
+ /**
243
+ * Hook return value for paste special
244
+ */
245
+ interface UsePasteSpecialReturn {
246
+ /** Whether the dialog is open */
247
+ isOpen: boolean;
248
+ /** Open the paste special dialog */
249
+ openDialog: () => void;
250
+ /** Close the dialog */
251
+ closeDialog: () => void;
252
+ /** Handle keyboard shortcut (Ctrl+Shift+V) */
253
+ handleKeyDown: (event: KeyboardEvent) => boolean;
254
+ /** Paste as plain text directly */
255
+ pasteAsPlainText: () => Promise<void>;
256
+ }
257
+ /**
258
+ * Options for usePasteSpecial hook
259
+ */
260
+ interface UsePasteSpecialOptions {
261
+ /** Callback when paste is confirmed */
262
+ onPaste?: (content: ParsedClipboardContent, asPlainText: boolean) => void;
263
+ /** Whether paste operations are enabled */
264
+ enabled?: boolean;
265
+ }
266
+ declare const PasteSpecialDialog: React__default.FC<PasteSpecialDialogProps>;
267
+ /**
268
+ * Hook to manage paste special dialog
269
+ */
270
+ declare function usePasteSpecial(options?: UsePasteSpecialOptions): UsePasteSpecialReturn;
271
+ /**
272
+ * Get paste option definition by id
273
+ */
274
+ declare function getPasteOption(id: PasteOption): PasteOptionDef | undefined;
275
+ /**
276
+ * Get all paste option definitions
277
+ */
278
+ declare function getAllPasteOptions(): PasteOptionDef[];
279
+ /**
280
+ * Get default paste option
281
+ */
282
+ declare function getDefaultPasteOption(): PasteOption;
283
+ /**
284
+ * Check if paste special shortcut
285
+ */
286
+ declare function isPasteSpecialShortcut(event: KeyboardEvent): boolean;
287
+
288
+ /**
289
+ * Keyboard Shortcuts Dialog Component
290
+ *
291
+ * Displays all available keyboard shortcuts organized by category.
292
+ * Features:
293
+ * - Categorized shortcut list
294
+ * - Search/filter functionality
295
+ * - Platform-aware modifier keys (Ctrl/Cmd)
296
+ * - Keyboard shortcut to open (Ctrl+/)
297
+ */
298
+
299
+ /**
300
+ * Keyboard shortcut definition
301
+ */
302
+ interface KeyboardShortcut {
303
+ /** Unique identifier */
304
+ id: string;
305
+ /** Display name */
306
+ name: string;
307
+ /** Description of what the shortcut does */
308
+ description: string;
309
+ /** Primary key combination (e.g., 'Ctrl+C') */
310
+ keys: string;
311
+ /** Alternative key combination */
312
+ altKeys?: string;
313
+ /** Category for grouping */
314
+ category: ShortcutCategory;
315
+ /** Whether this is a common/frequently used shortcut */
316
+ common?: boolean;
317
+ /** Translation key for display name (used internally) */
318
+ nameKey?: TranslationKey;
319
+ /** Translation key for description (used internally) */
320
+ descriptionKey?: TranslationKey;
321
+ }
322
+ /**
323
+ * Shortcut category
324
+ */
325
+ type ShortcutCategory = 'editing' | 'formatting' | 'navigation' | 'clipboard' | 'selection' | 'view' | 'file' | 'other';
326
+ /**
327
+ * Dialog props
328
+ */
329
+ interface KeyboardShortcutsDialogProps {
330
+ /** Whether the dialog is open */
331
+ isOpen: boolean;
332
+ /** Close callback */
333
+ onClose: () => void;
334
+ /** Custom shortcuts (merged with defaults) */
335
+ customShortcuts?: KeyboardShortcut[];
336
+ /** Whether to show search */
337
+ showSearch?: boolean;
338
+ /** Additional className */
339
+ className?: string;
340
+ }
341
+ /**
342
+ * Hook options
343
+ */
344
+ interface UseKeyboardShortcutsDialogOptions {
345
+ /** Whether the dialog can be opened with Ctrl+? or F1 */
346
+ enabled?: boolean;
347
+ /** Custom open shortcut (default: Ctrl+/) */
348
+ openShortcut?: string;
349
+ }
350
+ /**
351
+ * Hook return value
352
+ */
353
+ interface UseKeyboardShortcutsDialogReturn {
354
+ /** Whether dialog is open */
355
+ isOpen: boolean;
356
+ /** Open the dialog */
357
+ open: () => void;
358
+ /** Close the dialog */
359
+ close: () => void;
360
+ /** Toggle the dialog */
361
+ toggle: () => void;
362
+ /** Keyboard event handler */
363
+ handleKeyDown: (event: KeyboardEvent) => void;
364
+ }
365
+ declare const KeyboardShortcutsDialog: React__default.FC<KeyboardShortcutsDialogProps>;
366
+ /**
367
+ * Hook to manage keyboard shortcuts dialog
368
+ */
369
+ declare function useKeyboardShortcutsDialog(options?: UseKeyboardShortcutsDialogOptions): UseKeyboardShortcutsDialogReturn;
370
+ /**
371
+ * Get all default shortcuts
372
+ */
373
+ declare function getDefaultShortcuts(): KeyboardShortcut[];
374
+ /**
375
+ * Get shortcuts by category
376
+ */
377
+ declare function getShortcutsByCategory(category: ShortcutCategory): KeyboardShortcut[];
378
+ /**
379
+ * Get common/frequently used shortcuts
380
+ */
381
+ declare function getCommonShortcuts(): KeyboardShortcut[];
382
+ /**
383
+ * Get category label translation key
384
+ */
385
+ declare function getCategoryLabel(category: ShortcutCategory): string;
386
+ /**
387
+ * Get all categories
388
+ */
389
+ declare function getAllCategories(): ShortcutCategory[];
390
+ /**
391
+ * Format shortcut keys for display
392
+ */
393
+ declare function formatShortcutKeys(keys: string): string;
394
+
395
+ export { extractBookmarksForDialog as A, type BookmarkOption as B, getDisplayText as C, getUrlType as D, isBookmarkHyperlinkData as E, FindReplaceDialog as F, isExternalHyperlinkData as G, type HyperlinkData as H, isValidUrl as I, normalizeUrl as J, type KeyboardShortcut as K, phoneToTel as L, type PasteOption as P, type ShortcutCategory as S, type UseKeyboardShortcutsDialogOptions as U, type FindReplaceDialogProps as a, HyperlinkDialog as b, type HyperlinkDialogProps as c, KeyboardShortcutsDialog as d, type KeyboardShortcutsDialogProps as e, PasteSpecialDialog as f, type PasteSpecialDialogProps as g, type UseKeyboardShortcutsDialogReturn as h, type UsePasteSpecialOptions as i, type UsePasteSpecialReturn as j, formatShortcutKeys as k, getAllCategories as l, getAllPasteOptions as m, getCategoryLabel as n, getCommonShortcuts as o, getDefaultPasteOption as p, getDefaultShortcuts as q, getPasteOption as r, getShortcutsByCategory as s, isPasteSpecialShortcut as t, useHyperlinkDialog as u, useKeyboardShortcutsDialog as v, usePasteSpecial as w, createBookmarkLinkData as x, createHyperlinkData as y, emailToMailto as z };
@@ -0,0 +1 @@
1
+ 'use strict';var chunk5UX5CD4C_js=require('./chunk-5UX5CD4C.js');require('./chunk-MKNSJOCN.js'),require('./chunk-NLFXR2VH.js'),require('./chunk-GGQK26JO.js'),require('./chunk-ZXPCJWVY.js'),require('./chunk-ESZ6JRTW.js'),require('./chunk-ILYKDR3C.js'),require('./chunk-H5NTJZO4.js');Object.defineProperty(exports,"PageSetupDialog",{enumerable:true,get:function(){return chunk5UX5CD4C_js.a}});
@@ -0,0 +1 @@
1
+ export{a as PageSetupDialog}from'./chunk-SOTWG3KJ.mjs';import'./chunk-RCIZ7OM3.mjs';import'./chunk-7QQSDIWK.mjs';import'./chunk-B7CCL7SL.mjs';import'./chunk-ONIYA2FU.mjs';import'./chunk-TZMMD6RR.mjs';import'./chunk-FWPVBFKQ.mjs';import'./chunk-TAUMSKRE.mjs';
@@ -1 +1 @@
1
- import {c}from'./chunk-MGEN6GOE.mjs';import'./chunk-TAUMSKRE.mjs';import {useState,useEffect,useMemo,useCallback}from'react';import {jsx,jsxs}from'react/jsx-runtime';var E={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},M={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:360,maxWidth:440,width:"100%",margin:20},R={padding:"16px 20px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:16,fontWeight:600},I={padding:"16px 20px",display:"flex",flexDirection:"column",gap:12},C={display:"flex",alignItems:"center",gap:12},h={width:88,fontSize:13,color:"var(--doc-text-muted)"},P={flex:1,padding:"6px 8px",border:"1px solid var(--doc-border)",borderRadius:4,fontSize:13},b={fontSize:12,color:"var(--doc-text-muted)",lineHeight:1.5},K={...b,color:"var(--doc-error)"},W={padding:"12px 20px 16px",borderTop:"1px solid var(--doc-border)",display:"flex",justifyContent:"flex-end",gap:8},w={padding:"6px 16px",fontSize:13,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"};function B({isOpen:p,onClose:l,onApply:S,initialRows:c$1=1,initialCols:u=1,minRows:a=1,minCols:d=1}){let{t:e}=c(),[i,g]=useState(c$1),[n,m]=useState(u);useEffect(()=>{p&&(g(c$1),m(u));},[u,c$1,p]);let r=useMemo(()=>i<a||n<d?e("dialogs.splitCell.minValue",{rows:a,cols:d}):i===1&&n===1?e("dialogs.splitCell.notOneByOne"):null,[n,d,a,i,e]),y=useCallback(()=>{r||(S(i,n),l());},[n,S,l,i,r]),k=useCallback(t=>{t.key==="Escape"&&l(),t.key==="Enter"&&y();},[y,l]);return p?jsx("div",{style:E,onClick:l,onKeyDown:k,onMouseDown:t=>t.stopPropagation(),children:jsxs("div",{style:M,onClick:t=>t.stopPropagation(),role:"dialog","aria-label":e("dialogs.splitCell.title"),children:[jsx("div",{style:R,children:e("dialogs.splitCell.title")}),jsxs("div",{style:I,children:[jsx("div",{style:b,children:e("dialogs.splitCell.description")}),jsxs("div",{style:C,children:[jsx("label",{style:h,children:e("dialogs.splitCell.rowsLabel")}),jsx("input",{type:"number",style:P,min:a,step:1,value:i,onChange:t=>g(Math.max(0,Number(t.target.value)||0))})]}),jsxs("div",{style:C,children:[jsx("label",{style:h,children:e("dialogs.splitCell.columnsLabel")}),jsx("input",{type:"number",style:P,min:d,step:1,value:n,onChange:t=>m(Math.max(0,Number(t.target.value)||0))})]}),jsx("div",{style:r?K:b,children:r??e("dialogs.splitCell.currentMinimum",{rows:a,cols:d})})]}),jsxs("div",{style:W,children:[jsx("button",{type:"button",style:w,onClick:l,children:e("common.cancel")}),jsx("button",{type:"button",style:{...w,backgroundColor:"var(--doc-primary)",color:"white",borderColor:"var(--doc-primary)",opacity:r?.6:1,cursor:r?"not-allowed":"pointer"},disabled:!!r,onClick:y,children:e("common.apply")})]})]})}):null}var j=B;export{B as SplitCellDialog,j as default};
1
+ import {c}from'./chunk-7QQSDIWK.mjs';import'./chunk-TAUMSKRE.mjs';import {useState,useEffect,useMemo,useCallback}from'react';import {jsx,jsxs}from'react/jsx-runtime';var E={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},M={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:360,maxWidth:440,width:"100%",margin:20},R={padding:"16px 20px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:16,fontWeight:600},I={padding:"16px 20px",display:"flex",flexDirection:"column",gap:12},C={display:"flex",alignItems:"center",gap:12},h={width:88,fontSize:13,color:"var(--doc-text-muted)"},P={flex:1,padding:"6px 8px",border:"1px solid var(--doc-border)",borderRadius:4,fontSize:13},b={fontSize:12,color:"var(--doc-text-muted)",lineHeight:1.5},K={...b,color:"var(--doc-error)"},W={padding:"12px 20px 16px",borderTop:"1px solid var(--doc-border)",display:"flex",justifyContent:"flex-end",gap:8},w={padding:"6px 16px",fontSize:13,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"};function B({isOpen:p,onClose:l,onApply:S,initialRows:c$1=1,initialCols:u=1,minRows:a=1,minCols:d=1}){let{t:e}=c(),[i,g]=useState(c$1),[n,m]=useState(u);useEffect(()=>{p&&(g(c$1),m(u));},[u,c$1,p]);let r=useMemo(()=>i<a||n<d?e("dialogs.splitCell.minValue",{rows:a,cols:d}):i===1&&n===1?e("dialogs.splitCell.notOneByOne"):null,[n,d,a,i,e]),y=useCallback(()=>{r||(S(i,n),l());},[n,S,l,i,r]),k=useCallback(t=>{t.key==="Escape"&&l(),t.key==="Enter"&&y();},[y,l]);return p?jsx("div",{style:E,onClick:l,onKeyDown:k,onMouseDown:t=>t.stopPropagation(),children:jsxs("div",{style:M,onClick:t=>t.stopPropagation(),role:"dialog","aria-label":e("dialogs.splitCell.title"),children:[jsx("div",{style:R,children:e("dialogs.splitCell.title")}),jsxs("div",{style:I,children:[jsx("div",{style:b,children:e("dialogs.splitCell.description")}),jsxs("div",{style:C,children:[jsx("label",{style:h,children:e("dialogs.splitCell.rowsLabel")}),jsx("input",{type:"number",style:P,min:a,step:1,value:i,onChange:t=>g(Math.max(0,Number(t.target.value)||0))})]}),jsxs("div",{style:C,children:[jsx("label",{style:h,children:e("dialogs.splitCell.columnsLabel")}),jsx("input",{type:"number",style:P,min:d,step:1,value:n,onChange:t=>m(Math.max(0,Number(t.target.value)||0))})]}),jsx("div",{style:r?K:b,children:r??e("dialogs.splitCell.currentMinimum",{rows:a,cols:d})})]}),jsxs("div",{style:W,children:[jsx("button",{type:"button",style:w,onClick:l,children:e("common.cancel")}),jsx("button",{type:"button",style:{...w,backgroundColor:"var(--doc-primary)",color:"white",borderColor:"var(--doc-primary)",opacity:r?.6:1,cursor:r?"not-allowed":"pointer"},disabled:!!r,onClick:y,children:e("common.apply")})]})]})}):null}var j=B;export{B as SplitCellDialog,j as default};
@@ -1 +1 @@
1
- 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var chunkWNS2RBQD_js=require('./chunk-WNS2RBQD.js');require('./chunk-H5NTJZO4.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var E={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},M={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:360,maxWidth:440,width:"100%",margin:20},R={padding:"16px 20px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:16,fontWeight:600},I={padding:"16px 20px",display:"flex",flexDirection:"column",gap:12},C={display:"flex",alignItems:"center",gap:12},h={width:88,fontSize:13,color:"var(--doc-text-muted)"},P={flex:1,padding:"6px 8px",border:"1px solid var(--doc-border)",borderRadius:4,fontSize:13},b={fontSize:12,color:"var(--doc-text-muted)",lineHeight:1.5},K={...b,color:"var(--doc-error)"},W={padding:"12px 20px 16px",borderTop:"1px solid var(--doc-border)",display:"flex",justifyContent:"flex-end",gap:8},w={padding:"6px 16px",fontSize:13,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"};function B({isOpen:p,onClose:l,onApply:S,initialRows:c=1,initialCols:u=1,minRows:a=1,minCols:d=1}){let{t:e}=chunkWNS2RBQD_js.c(),[i,g]=react.useState(c),[n,m]=react.useState(u);react.useEffect(()=>{p&&(g(c),m(u));},[u,c,p]);let r=react.useMemo(()=>i<a||n<d?e("dialogs.splitCell.minValue",{rows:a,cols:d}):i===1&&n===1?e("dialogs.splitCell.notOneByOne"):null,[n,d,a,i,e]),y=react.useCallback(()=>{r||(S(i,n),l());},[n,S,l,i,r]),k=react.useCallback(t=>{t.key==="Escape"&&l(),t.key==="Enter"&&y();},[y,l]);return p?jsxRuntime.jsx("div",{style:E,onClick:l,onKeyDown:k,onMouseDown:t=>t.stopPropagation(),children:jsxRuntime.jsxs("div",{style:M,onClick:t=>t.stopPropagation(),role:"dialog","aria-label":e("dialogs.splitCell.title"),children:[jsxRuntime.jsx("div",{style:R,children:e("dialogs.splitCell.title")}),jsxRuntime.jsxs("div",{style:I,children:[jsxRuntime.jsx("div",{style:b,children:e("dialogs.splitCell.description")}),jsxRuntime.jsxs("div",{style:C,children:[jsxRuntime.jsx("label",{style:h,children:e("dialogs.splitCell.rowsLabel")}),jsxRuntime.jsx("input",{type:"number",style:P,min:a,step:1,value:i,onChange:t=>g(Math.max(0,Number(t.target.value)||0))})]}),jsxRuntime.jsxs("div",{style:C,children:[jsxRuntime.jsx("label",{style:h,children:e("dialogs.splitCell.columnsLabel")}),jsxRuntime.jsx("input",{type:"number",style:P,min:d,step:1,value:n,onChange:t=>m(Math.max(0,Number(t.target.value)||0))})]}),jsxRuntime.jsx("div",{style:r?K:b,children:r??e("dialogs.splitCell.currentMinimum",{rows:a,cols:d})})]}),jsxRuntime.jsxs("div",{style:W,children:[jsxRuntime.jsx("button",{type:"button",style:w,onClick:l,children:e("common.cancel")}),jsxRuntime.jsx("button",{type:"button",style:{...w,backgroundColor:"var(--doc-primary)",color:"white",borderColor:"var(--doc-primary)",opacity:r?.6:1,cursor:r?"not-allowed":"pointer"},disabled:!!r,onClick:y,children:e("common.apply")})]})]})}):null}var j=B;exports.SplitCellDialog=B;exports.default=j;
1
+ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var chunkNLFXR2VH_js=require('./chunk-NLFXR2VH.js');require('./chunk-H5NTJZO4.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var E={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},M={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:360,maxWidth:440,width:"100%",margin:20},R={padding:"16px 20px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:16,fontWeight:600},I={padding:"16px 20px",display:"flex",flexDirection:"column",gap:12},C={display:"flex",alignItems:"center",gap:12},h={width:88,fontSize:13,color:"var(--doc-text-muted)"},P={flex:1,padding:"6px 8px",border:"1px solid var(--doc-border)",borderRadius:4,fontSize:13},b={fontSize:12,color:"var(--doc-text-muted)",lineHeight:1.5},K={...b,color:"var(--doc-error)"},W={padding:"12px 20px 16px",borderTop:"1px solid var(--doc-border)",display:"flex",justifyContent:"flex-end",gap:8},w={padding:"6px 16px",fontSize:13,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"};function B({isOpen:p,onClose:l,onApply:S,initialRows:c=1,initialCols:u=1,minRows:a=1,minCols:d=1}){let{t:e}=chunkNLFXR2VH_js.c(),[i,g]=react.useState(c),[n,m]=react.useState(u);react.useEffect(()=>{p&&(g(c),m(u));},[u,c,p]);let r=react.useMemo(()=>i<a||n<d?e("dialogs.splitCell.minValue",{rows:a,cols:d}):i===1&&n===1?e("dialogs.splitCell.notOneByOne"):null,[n,d,a,i,e]),y=react.useCallback(()=>{r||(S(i,n),l());},[n,S,l,i,r]),k=react.useCallback(t=>{t.key==="Escape"&&l(),t.key==="Enter"&&y();},[y,l]);return p?jsxRuntime.jsx("div",{style:E,onClick:l,onKeyDown:k,onMouseDown:t=>t.stopPropagation(),children:jsxRuntime.jsxs("div",{style:M,onClick:t=>t.stopPropagation(),role:"dialog","aria-label":e("dialogs.splitCell.title"),children:[jsxRuntime.jsx("div",{style:R,children:e("dialogs.splitCell.title")}),jsxRuntime.jsxs("div",{style:I,children:[jsxRuntime.jsx("div",{style:b,children:e("dialogs.splitCell.description")}),jsxRuntime.jsxs("div",{style:C,children:[jsxRuntime.jsx("label",{style:h,children:e("dialogs.splitCell.rowsLabel")}),jsxRuntime.jsx("input",{type:"number",style:P,min:a,step:1,value:i,onChange:t=>g(Math.max(0,Number(t.target.value)||0))})]}),jsxRuntime.jsxs("div",{style:C,children:[jsxRuntime.jsx("label",{style:h,children:e("dialogs.splitCell.columnsLabel")}),jsxRuntime.jsx("input",{type:"number",style:P,min:d,step:1,value:n,onChange:t=>m(Math.max(0,Number(t.target.value)||0))})]}),jsxRuntime.jsx("div",{style:r?K:b,children:r??e("dialogs.splitCell.currentMinimum",{rows:a,cols:d})})]}),jsxRuntime.jsxs("div",{style:W,children:[jsxRuntime.jsx("button",{type:"button",style:w,onClick:l,children:e("common.cancel")}),jsxRuntime.jsx("button",{type:"button",style:{...w,backgroundColor:"var(--doc-primary)",color:"white",borderColor:"var(--doc-primary)",opacity:r?.6:1,cursor:r?"not-allowed":"pointer"},disabled:!!r,onClick:y,children:e("common.apply")})]})]})}):null}var j=B;exports.SplitCellDialog=B;exports.default=j;
@@ -1 +1 @@
1
- import {c}from'./chunk-MGEN6GOE.mjs';import'./chunk-TAUMSKRE.mjs';import {useState,useEffect,useCallback}from'react';import {jsx,jsxs}from'react/jsx-runtime';var T={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},k={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:360,maxWidth:440,width:"100%",margin:20},j={padding:"16px 20px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:16,fontWeight:600},R={padding:"16px 20px",display:"flex",flexDirection:"column",gap:12},b={display:"flex",alignItems:"center",gap:12},u={width:80,fontSize:13,color:"var(--doc-text-muted)"},P={flex:1,padding:"6px 8px",border:"1px solid var(--doc-border)",borderRadius:4,fontSize:13},x={...P},z={padding:"12px 20px 16px",borderTop:"1px solid var(--doc-border)",display:"flex",justifyContent:"flex-end",gap:8},m={padding:"6px 16px",fontSize:13,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"};function I({isOpen:n,onClose:a,onApply:y,currentProps:l}){let{t:e}=c(),[s,g]=useState(l?.width||0),[r,f]=useState(l?.widthType||"auto"),[p,h]=useState(l?.justification||"left");useEffect(()=>{n&&(g(l?.width||0),f(l?.widthType||"auto"),h(l?.justification||"left"));},[n,l]);let d=useCallback(()=>{let t={};r==="auto"?(t.width=null,t.widthType="auto"):(t.width=s,t.widthType=r),t.justification=p,y(t),a();},[s,r,p,y,a]),w=useCallback(t=>{t.key==="Escape"&&a(),t.key==="Enter"&&d();},[a,d]);return n?jsx("div",{style:T,onClick:a,onKeyDown:w,children:jsxs("div",{style:k,onClick:t=>t.stopPropagation(),role:"dialog","aria-label":e("dialogs.tableProperties.title"),children:[jsx("div",{style:j,children:e("dialogs.tableProperties.title")}),jsxs("div",{style:R,children:[jsxs("div",{style:b,children:[jsx("label",{style:u,children:e("dialogs.tableProperties.widthType")}),jsxs("select",{style:x,value:r,onChange:t=>f(t.target.value),children:[jsx("option",{value:"auto",children:e("dialogs.tableProperties.widthTypes.auto")}),jsx("option",{value:"dxa",children:e("dialogs.tableProperties.widthTypes.fixed")}),jsx("option",{value:"pct",children:e("dialogs.tableProperties.widthTypes.percentage")})]})]}),r!=="auto"&&jsxs("div",{style:b,children:[jsx("label",{style:u,children:e("dialogs.tableProperties.widthLabel")}),jsx("input",{type:"number",style:P,min:0,step:r==="pct"?5:100,value:s,onChange:t=>g(Number(t.target.value)||0)}),jsx("span",{style:{fontSize:11,color:"var(--doc-text-muted)"},children:e(r==="pct"?"dialogs.tableProperties.units.fiftiethsPercent":"dialogs.tableProperties.units.twips")})]}),jsxs("div",{style:b,children:[jsx("label",{style:u,children:e("dialogs.tableProperties.alignmentLabel")}),jsxs("select",{style:x,value:p,onChange:t=>h(t.target.value),children:[jsx("option",{value:"left",children:e("dialogs.tableProperties.alignOptions.left")}),jsx("option",{value:"center",children:e("dialogs.tableProperties.alignOptions.center")}),jsx("option",{value:"right",children:e("dialogs.tableProperties.alignOptions.right")})]})]})]}),jsxs("div",{style:z,children:[jsx("button",{type:"button",style:m,onClick:a,children:e("common.cancel")}),jsx("button",{type:"button",style:{...m,backgroundColor:"var(--doc-primary)",color:"white",borderColor:"var(--doc-primary)"},onClick:d,children:e("common.apply")})]})]})}):null}export{I as TablePropertiesDialog};
1
+ import {c}from'./chunk-7QQSDIWK.mjs';import'./chunk-TAUMSKRE.mjs';import {useState,useEffect,useCallback}from'react';import {jsx,jsxs}from'react/jsx-runtime';var T={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},k={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:360,maxWidth:440,width:"100%",margin:20},j={padding:"16px 20px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:16,fontWeight:600},R={padding:"16px 20px",display:"flex",flexDirection:"column",gap:12},b={display:"flex",alignItems:"center",gap:12},u={width:80,fontSize:13,color:"var(--doc-text-muted)"},P={flex:1,padding:"6px 8px",border:"1px solid var(--doc-border)",borderRadius:4,fontSize:13},x={...P},z={padding:"12px 20px 16px",borderTop:"1px solid var(--doc-border)",display:"flex",justifyContent:"flex-end",gap:8},m={padding:"6px 16px",fontSize:13,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"};function I({isOpen:n,onClose:a,onApply:y,currentProps:l}){let{t:e}=c(),[s,g]=useState(l?.width||0),[r,f]=useState(l?.widthType||"auto"),[p,h]=useState(l?.justification||"left");useEffect(()=>{n&&(g(l?.width||0),f(l?.widthType||"auto"),h(l?.justification||"left"));},[n,l]);let d=useCallback(()=>{let t={};r==="auto"?(t.width=null,t.widthType="auto"):(t.width=s,t.widthType=r),t.justification=p,y(t),a();},[s,r,p,y,a]),w=useCallback(t=>{t.key==="Escape"&&a(),t.key==="Enter"&&d();},[a,d]);return n?jsx("div",{style:T,onClick:a,onKeyDown:w,children:jsxs("div",{style:k,onClick:t=>t.stopPropagation(),role:"dialog","aria-label":e("dialogs.tableProperties.title"),children:[jsx("div",{style:j,children:e("dialogs.tableProperties.title")}),jsxs("div",{style:R,children:[jsxs("div",{style:b,children:[jsx("label",{style:u,children:e("dialogs.tableProperties.widthType")}),jsxs("select",{style:x,value:r,onChange:t=>f(t.target.value),children:[jsx("option",{value:"auto",children:e("dialogs.tableProperties.widthTypes.auto")}),jsx("option",{value:"dxa",children:e("dialogs.tableProperties.widthTypes.fixed")}),jsx("option",{value:"pct",children:e("dialogs.tableProperties.widthTypes.percentage")})]})]}),r!=="auto"&&jsxs("div",{style:b,children:[jsx("label",{style:u,children:e("dialogs.tableProperties.widthLabel")}),jsx("input",{type:"number",style:P,min:0,step:r==="pct"?5:100,value:s,onChange:t=>g(Number(t.target.value)||0)}),jsx("span",{style:{fontSize:11,color:"var(--doc-text-muted)"},children:e(r==="pct"?"dialogs.tableProperties.units.fiftiethsPercent":"dialogs.tableProperties.units.twips")})]}),jsxs("div",{style:b,children:[jsx("label",{style:u,children:e("dialogs.tableProperties.alignmentLabel")}),jsxs("select",{style:x,value:p,onChange:t=>h(t.target.value),children:[jsx("option",{value:"left",children:e("dialogs.tableProperties.alignOptions.left")}),jsx("option",{value:"center",children:e("dialogs.tableProperties.alignOptions.center")}),jsx("option",{value:"right",children:e("dialogs.tableProperties.alignOptions.right")})]})]})]}),jsxs("div",{style:z,children:[jsx("button",{type:"button",style:m,onClick:a,children:e("common.cancel")}),jsx("button",{type:"button",style:{...m,backgroundColor:"var(--doc-primary)",color:"white",borderColor:"var(--doc-primary)"},onClick:d,children:e("common.apply")})]})]})}):null}export{I as TablePropertiesDialog};
@@ -1 +1 @@
1
- 'use strict';var chunkWNS2RBQD_js=require('./chunk-WNS2RBQD.js');require('./chunk-H5NTJZO4.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var T={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},k={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:360,maxWidth:440,width:"100%",margin:20},j={padding:"16px 20px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:16,fontWeight:600},R={padding:"16px 20px",display:"flex",flexDirection:"column",gap:12},b={display:"flex",alignItems:"center",gap:12},u={width:80,fontSize:13,color:"var(--doc-text-muted)"},P={flex:1,padding:"6px 8px",border:"1px solid var(--doc-border)",borderRadius:4,fontSize:13},x={...P},z={padding:"12px 20px 16px",borderTop:"1px solid var(--doc-border)",display:"flex",justifyContent:"flex-end",gap:8},m={padding:"6px 16px",fontSize:13,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"};function I({isOpen:n,onClose:a,onApply:y,currentProps:l}){let{t:e}=chunkWNS2RBQD_js.c(),[s,g]=react.useState(l?.width||0),[r,f]=react.useState(l?.widthType||"auto"),[p,h]=react.useState(l?.justification||"left");react.useEffect(()=>{n&&(g(l?.width||0),f(l?.widthType||"auto"),h(l?.justification||"left"));},[n,l]);let d=react.useCallback(()=>{let t={};r==="auto"?(t.width=null,t.widthType="auto"):(t.width=s,t.widthType=r),t.justification=p,y(t),a();},[s,r,p,y,a]),w=react.useCallback(t=>{t.key==="Escape"&&a(),t.key==="Enter"&&d();},[a,d]);return n?jsxRuntime.jsx("div",{style:T,onClick:a,onKeyDown:w,children:jsxRuntime.jsxs("div",{style:k,onClick:t=>t.stopPropagation(),role:"dialog","aria-label":e("dialogs.tableProperties.title"),children:[jsxRuntime.jsx("div",{style:j,children:e("dialogs.tableProperties.title")}),jsxRuntime.jsxs("div",{style:R,children:[jsxRuntime.jsxs("div",{style:b,children:[jsxRuntime.jsx("label",{style:u,children:e("dialogs.tableProperties.widthType")}),jsxRuntime.jsxs("select",{style:x,value:r,onChange:t=>f(t.target.value),children:[jsxRuntime.jsx("option",{value:"auto",children:e("dialogs.tableProperties.widthTypes.auto")}),jsxRuntime.jsx("option",{value:"dxa",children:e("dialogs.tableProperties.widthTypes.fixed")}),jsxRuntime.jsx("option",{value:"pct",children:e("dialogs.tableProperties.widthTypes.percentage")})]})]}),r!=="auto"&&jsxRuntime.jsxs("div",{style:b,children:[jsxRuntime.jsx("label",{style:u,children:e("dialogs.tableProperties.widthLabel")}),jsxRuntime.jsx("input",{type:"number",style:P,min:0,step:r==="pct"?5:100,value:s,onChange:t=>g(Number(t.target.value)||0)}),jsxRuntime.jsx("span",{style:{fontSize:11,color:"var(--doc-text-muted)"},children:e(r==="pct"?"dialogs.tableProperties.units.fiftiethsPercent":"dialogs.tableProperties.units.twips")})]}),jsxRuntime.jsxs("div",{style:b,children:[jsxRuntime.jsx("label",{style:u,children:e("dialogs.tableProperties.alignmentLabel")}),jsxRuntime.jsxs("select",{style:x,value:p,onChange:t=>h(t.target.value),children:[jsxRuntime.jsx("option",{value:"left",children:e("dialogs.tableProperties.alignOptions.left")}),jsxRuntime.jsx("option",{value:"center",children:e("dialogs.tableProperties.alignOptions.center")}),jsxRuntime.jsx("option",{value:"right",children:e("dialogs.tableProperties.alignOptions.right")})]})]})]}),jsxRuntime.jsxs("div",{style:z,children:[jsxRuntime.jsx("button",{type:"button",style:m,onClick:a,children:e("common.cancel")}),jsxRuntime.jsx("button",{type:"button",style:{...m,backgroundColor:"var(--doc-primary)",color:"white",borderColor:"var(--doc-primary)"},onClick:d,children:e("common.apply")})]})]})}):null}exports.TablePropertiesDialog=I;
1
+ 'use strict';var chunkNLFXR2VH_js=require('./chunk-NLFXR2VH.js');require('./chunk-H5NTJZO4.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var T={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},k={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:360,maxWidth:440,width:"100%",margin:20},j={padding:"16px 20px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:16,fontWeight:600},R={padding:"16px 20px",display:"flex",flexDirection:"column",gap:12},b={display:"flex",alignItems:"center",gap:12},u={width:80,fontSize:13,color:"var(--doc-text-muted)"},P={flex:1,padding:"6px 8px",border:"1px solid var(--doc-border)",borderRadius:4,fontSize:13},x={...P},z={padding:"12px 20px 16px",borderTop:"1px solid var(--doc-border)",display:"flex",justifyContent:"flex-end",gap:8},m={padding:"6px 16px",fontSize:13,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"};function I({isOpen:n,onClose:a,onApply:y,currentProps:l}){let{t:e}=chunkNLFXR2VH_js.c(),[s,g]=react.useState(l?.width||0),[r,f]=react.useState(l?.widthType||"auto"),[p,h]=react.useState(l?.justification||"left");react.useEffect(()=>{n&&(g(l?.width||0),f(l?.widthType||"auto"),h(l?.justification||"left"));},[n,l]);let d=react.useCallback(()=>{let t={};r==="auto"?(t.width=null,t.widthType="auto"):(t.width=s,t.widthType=r),t.justification=p,y(t),a();},[s,r,p,y,a]),w=react.useCallback(t=>{t.key==="Escape"&&a(),t.key==="Enter"&&d();},[a,d]);return n?jsxRuntime.jsx("div",{style:T,onClick:a,onKeyDown:w,children:jsxRuntime.jsxs("div",{style:k,onClick:t=>t.stopPropagation(),role:"dialog","aria-label":e("dialogs.tableProperties.title"),children:[jsxRuntime.jsx("div",{style:j,children:e("dialogs.tableProperties.title")}),jsxRuntime.jsxs("div",{style:R,children:[jsxRuntime.jsxs("div",{style:b,children:[jsxRuntime.jsx("label",{style:u,children:e("dialogs.tableProperties.widthType")}),jsxRuntime.jsxs("select",{style:x,value:r,onChange:t=>f(t.target.value),children:[jsxRuntime.jsx("option",{value:"auto",children:e("dialogs.tableProperties.widthTypes.auto")}),jsxRuntime.jsx("option",{value:"dxa",children:e("dialogs.tableProperties.widthTypes.fixed")}),jsxRuntime.jsx("option",{value:"pct",children:e("dialogs.tableProperties.widthTypes.percentage")})]})]}),r!=="auto"&&jsxRuntime.jsxs("div",{style:b,children:[jsxRuntime.jsx("label",{style:u,children:e("dialogs.tableProperties.widthLabel")}),jsxRuntime.jsx("input",{type:"number",style:P,min:0,step:r==="pct"?5:100,value:s,onChange:t=>g(Number(t.target.value)||0)}),jsxRuntime.jsx("span",{style:{fontSize:11,color:"var(--doc-text-muted)"},children:e(r==="pct"?"dialogs.tableProperties.units.fiftiethsPercent":"dialogs.tableProperties.units.twips")})]}),jsxRuntime.jsxs("div",{style:b,children:[jsxRuntime.jsx("label",{style:u,children:e("dialogs.tableProperties.alignmentLabel")}),jsxRuntime.jsxs("select",{style:x,value:p,onChange:t=>h(t.target.value),children:[jsxRuntime.jsx("option",{value:"left",children:e("dialogs.tableProperties.alignOptions.left")}),jsxRuntime.jsx("option",{value:"center",children:e("dialogs.tableProperties.alignOptions.center")}),jsxRuntime.jsx("option",{value:"right",children:e("dialogs.tableProperties.alignOptions.right")})]})]})]}),jsxRuntime.jsxs("div",{style:z,children:[jsxRuntime.jsx("button",{type:"button",style:m,onClick:a,children:e("common.cancel")}),jsxRuntime.jsx("button",{type:"button",style:{...m,backgroundColor:"var(--doc-primary)",color:"white",borderColor:"var(--doc-primary)"},onClick:d,children:e("common.apply")})]})]})}):null}exports.TablePropertiesDialog=I;