@zeke-02/docx-editor 0.0.35 → 0.5.2

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 (168) hide show
  1. package/README.md +34 -29
  2. package/dist/{ClipboardManager-C1l58nzE.d.ts → ClipboardManager-CVKX0v9q.d.ts} +1 -1
  3. package/dist/{ClipboardManager-Cjb_v74d.d.mts → ClipboardManager-V3aaMnWE.d.mts} +1 -1
  4. package/dist/{DocumentAgent-E8OX_8j0.d.mts → DocumentAgent-BWflKHpH.d.mts} +1 -1
  5. package/dist/{DocumentAgent-iedmc_8s.d.ts → DocumentAgent-DsdXtetF.d.ts} +1 -1
  6. package/dist/{FindReplaceDialog-YW3R4FHM.mjs → FindReplaceDialog-L3YF5HIS.mjs} +1 -1
  7. package/dist/FindReplaceDialog-SEBWC5P7.js +1 -0
  8. package/dist/{FootnotePropertiesDialog-LNFJXQUG.mjs → FootnotePropertiesDialog-TNVJJCY6.mjs} +1 -1
  9. package/dist/{FootnotePropertiesDialog-7QX54WQT.js → FootnotePropertiesDialog-XQ7NIFIU.js} +1 -1
  10. package/dist/{HyperlinkDialog-HNYTXDCB.mjs → HyperlinkDialog-FR4IZZ7E.mjs} +1 -1
  11. package/dist/HyperlinkDialog-WEK6JSAC.js +1 -0
  12. package/dist/{ImagePositionDialog-M65BYQQE.js → ImagePositionDialog-2YXRAGZS.js} +1 -1
  13. package/dist/{ImagePositionDialog-B4RLP2W5.mjs → ImagePositionDialog-JSZSIKF5.mjs} +1 -1
  14. package/dist/ImagePropertiesDialog-527MFLQO.mjs +1 -0
  15. package/dist/{ImagePropertiesDialog-O4WQSF5M.js → ImagePropertiesDialog-HG4K3IE7.js} +1 -1
  16. package/dist/PageSetupDialog-GALVJMUB.js +1 -0
  17. package/dist/PageSetupDialog-TGQIAMI7.mjs +1 -0
  18. package/dist/SplitCellDialog-JIAC3RYV.js +1 -0
  19. package/dist/SplitCellDialog-NP3JJYHD.mjs +1 -0
  20. package/dist/{TablePropertiesDialog-WOZ4ES3H.js → TablePropertiesDialog-T7D4HSVP.js} +1 -1
  21. package/dist/TablePropertiesDialog-TIK4AA5M.mjs +1 -0
  22. package/dist/{clipboard-BWhM0CRj.d.mts → TableToolbar-DUgmob2I.d.ts} +227 -135
  23. package/dist/{clipboard-BvkuNZub.d.ts → TableToolbar-YL74HNS1.d.mts} +227 -135
  24. package/dist/{agentApi-mv532p8I.d.mts → agentApi-DLt94vXk.d.mts} +83 -5
  25. package/dist/{agentApi-mv532p8I.d.ts → agentApi-DLt94vXk.d.ts} +83 -5
  26. package/dist/chunk-23SXXIZS.js +111 -0
  27. package/dist/chunk-3F52AP2Q.js +1 -0
  28. package/dist/chunk-42O5GXM5.mjs +82 -0
  29. package/dist/chunk-54ULJEHM.mjs +1 -0
  30. package/dist/chunk-5XK326FI.mjs +1 -0
  31. package/dist/chunk-76IYR7C7.mjs +1 -0
  32. package/dist/chunk-AGRIVA4G.js +1 -0
  33. package/dist/chunk-BTCQ2QI3.mjs +3 -0
  34. package/dist/chunk-BXRC4U3X.mjs +2 -0
  35. package/dist/chunk-CPAYKE6X.mjs +1 -0
  36. package/dist/chunk-DACWLFKI.mjs +1 -0
  37. package/dist/{chunk-377ZVTSE.js → chunk-EHFEG3TX.js} +1 -1
  38. package/dist/chunk-EPBFWE36.js +2 -0
  39. package/dist/chunk-FXES3YDB.js +82 -0
  40. package/dist/chunk-HI66BSGS.mjs +9 -0
  41. package/dist/chunk-INTPVEO6.mjs +9 -0
  42. package/dist/chunk-IOAGVW6Q.mjs +2 -0
  43. package/dist/chunk-JCEWC5QL.mjs +4 -0
  44. package/dist/chunk-JTIUFACT.js +1 -0
  45. package/dist/{chunk-KCOGY3V2.js → chunk-LUF7PWIC.js} +4 -4
  46. package/dist/chunk-LVGJKS7Y.mjs +24 -0
  47. package/dist/chunk-MGEN6GOE.mjs +2 -0
  48. package/dist/chunk-MOE2ZGUE.js +18 -0
  49. package/dist/chunk-MWLHJWB6.js +9 -0
  50. package/dist/chunk-OFYVDN3U.mjs +2 -0
  51. package/dist/chunk-P4VSHBGZ.js +2 -0
  52. package/dist/chunk-P5FQHIES.mjs +1 -0
  53. package/dist/chunk-PBC7XAYZ.js +3 -0
  54. package/dist/chunk-PEMB6SZT.js +2 -0
  55. package/dist/chunk-PKEOQIQO.mjs +2 -0
  56. package/dist/chunk-PQMSZTBB.js +9 -0
  57. package/dist/chunk-Q7UDQXAF.js +1 -0
  58. package/dist/chunk-QGTAIC5E.js +1 -0
  59. package/dist/chunk-R3QMYPL5.mjs +59 -0
  60. package/dist/chunk-RBUTXXQJ.mjs +18 -0
  61. package/dist/chunk-RRWYZ2TS.mjs +111 -0
  62. package/dist/chunk-S3STEPVO.js +182 -0
  63. package/dist/{chunk-AU5NVRHP.js → chunk-SFUM35DH.js} +2 -2
  64. package/dist/chunk-SNLC6EK2.js +1 -0
  65. package/dist/chunk-TMTLIGLZ.js +59 -0
  66. package/dist/{chunk-RTFUE3KK.mjs → chunk-TSE2PWFX.mjs} +3 -3
  67. package/dist/chunk-UKESXQS5.mjs +182 -0
  68. package/dist/chunk-UWYD42WV.js +4 -0
  69. package/dist/chunk-UXVACQCY.mjs +1 -0
  70. package/dist/{chunk-Z26WOH6R.mjs → chunk-W4EIKDM6.mjs} +2 -2
  71. package/dist/chunk-WNS2RBQD.js +2 -0
  72. package/dist/chunk-YC5KZSYD.js +24 -0
  73. package/dist/chunk-Z3KMSHUP.js +1 -0
  74. package/dist/core-plugins-reexport.d.mts +4 -4
  75. package/dist/core-plugins-reexport.d.ts +4 -4
  76. package/dist/core-plugins-reexport.js +1 -1
  77. package/dist/core-plugins-reexport.mjs +1 -1
  78. package/dist/core-reexport.d.mts +47 -16
  79. package/dist/core-reexport.d.ts +47 -16
  80. package/dist/core-reexport.js +1 -1
  81. package/dist/core-reexport.mjs +1 -1
  82. package/dist/{colorResolver-C5fQ4fxP.d.mts → documentSerializer-DtS_-oGA.d.mts} +378 -376
  83. package/dist/{colorResolver-Bp9flT3l.d.ts → documentSerializer-Wj1p2ASa.d.ts} +378 -376
  84. package/dist/executor-C3VXF7QA.mjs +1 -0
  85. package/dist/executor-GDBV3AGV.js +1 -0
  86. package/dist/headless-reexport.d.mts +14 -12
  87. package/dist/headless-reexport.d.ts +14 -12
  88. package/dist/headless-reexport.js +1 -4
  89. package/dist/headless-reexport.mjs +1 -4
  90. package/dist/index.css +1 -1
  91. package/dist/index.d.mts +284 -172
  92. package/dist/index.d.ts +284 -172
  93. package/dist/index.js +17 -9
  94. package/dist/index.mjs +17 -9
  95. package/dist/{fontLoader-0G00frKD.d.mts → insertOperations-BTH1Asas.d.mts} +86 -86
  96. package/dist/{fontLoader-DPdt4JvW.d.ts → insertOperations-CbUnXAXH.d.ts} +86 -86
  97. package/dist/layout-bridge-EA4DJ227.js +1 -0
  98. package/dist/layout-bridge-XDPSO6GO.mjs +1 -0
  99. package/dist/mcp-reexport.d.mts +2 -2
  100. package/dist/mcp-reexport.d.ts +2 -2
  101. package/dist/mcp-reexport.js +8 -8
  102. package/dist/mcp-reexport.mjs +7 -7
  103. package/dist/processTemplate-MJ2PCSO5.js +1 -0
  104. package/dist/{processTemplate-LRHXOWMZ.mjs → processTemplate-W2C5PXZB.mjs} +1 -1
  105. package/dist/{react-1OO-DXvx.d.ts → react-B0W16SV6.d.ts} +384 -166
  106. package/dist/{react-B1dSZ_w1.d.mts → react-D0Pn1nww.d.mts} +384 -166
  107. package/dist/react.css +1 -1
  108. package/dist/react.d.mts +5 -5
  109. package/dist/react.d.ts +5 -5
  110. package/dist/react.js +1 -1
  111. package/dist/react.mjs +1 -1
  112. package/dist/{registry-BWGKcKc1.d.ts → registry-CH9V-IX0.d.ts} +1 -1
  113. package/dist/{registry-8XOdjHGC.d.mts → registry-CWBKYlNW.d.mts} +1 -1
  114. package/dist/styles.css +1 -1
  115. package/dist/{types-DIBvJ7AJ.d.mts → types-UDsUq8D3.d.mts} +1 -1
  116. package/dist/{types-CfAiObQo.d.ts → types-jbivc9Lj.d.ts} +1 -1
  117. package/dist/ui.d.mts +33 -83
  118. package/dist/ui.d.ts +33 -83
  119. package/dist/ui.js +1 -1
  120. package/dist/ui.mjs +1 -1
  121. package/dist/{variableDetector-DNO18eZ1.d.mts → variableDetector-CdQ7ZTzA.d.mts} +1 -1
  122. package/dist/{variableDetector-BIJFVpkl.d.ts → variableDetector-DsRV3A9z.d.ts} +1 -1
  123. package/i18n/de.json +49 -2
  124. package/i18n/en.json +55 -8
  125. package/i18n/he.json +792 -0
  126. package/i18n/pl.json +49 -2
  127. package/i18n/pt-BR.json +792 -0
  128. package/i18n/tr.json +792 -0
  129. package/i18n/zh-CN.json +792 -0
  130. package/package.json +17 -5
  131. package/dist/FindReplaceDialog-KNJETYJX.js +0 -1
  132. package/dist/HyperlinkDialog-GBAYMTUE.js +0 -1
  133. package/dist/ImagePropertiesDialog-JOGW3WDU.mjs +0 -1
  134. package/dist/PageSetupDialog-2GIBTKMJ.js +0 -1
  135. package/dist/PageSetupDialog-Q7SHEZIJ.mjs +0 -1
  136. package/dist/TablePropertiesDialog-LMXWX3FI.mjs +0 -1
  137. package/dist/chunk-2HDYCD2Q.mjs +0 -1
  138. package/dist/chunk-37SLIJPH.mjs +0 -58
  139. package/dist/chunk-3OKYQQQ5.js +0 -111
  140. package/dist/chunk-4VUZBV2S.js +0 -1
  141. package/dist/chunk-6YRWZ32V.js +0 -261
  142. package/dist/chunk-7MGFEP2R.mjs +0 -26
  143. package/dist/chunk-7QTNB64A.mjs +0 -9
  144. package/dist/chunk-AARNCPWR.js +0 -1
  145. package/dist/chunk-DC65PJYE.js +0 -4
  146. package/dist/chunk-DLVLK5FT.mjs +0 -24
  147. package/dist/chunk-EV3CM6TU.js +0 -1
  148. package/dist/chunk-FVUGBRDD.js +0 -1
  149. package/dist/chunk-FW5LYOOZ.mjs +0 -111
  150. package/dist/chunk-GZOCOWWB.mjs +0 -2
  151. package/dist/chunk-KUL2SDYC.js +0 -26
  152. package/dist/chunk-LYBG4YI7.mjs +0 -1
  153. package/dist/chunk-M5F4SK3W.mjs +0 -1
  154. package/dist/chunk-P7WEP4JU.js +0 -9
  155. package/dist/chunk-PB7VMDDP.js +0 -24
  156. package/dist/chunk-QAZ4233N.mjs +0 -1
  157. package/dist/chunk-QSUPYUOP.js +0 -2
  158. package/dist/chunk-QTSXJRP6.mjs +0 -1
  159. package/dist/chunk-S67UBZDL.mjs +0 -261
  160. package/dist/chunk-SE5EN2QL.js +0 -1
  161. package/dist/chunk-X5A54T6S.mjs +0 -4
  162. package/dist/chunk-YKBSKEBS.mjs +0 -2
  163. package/dist/chunk-ZJNGMDRE.js +0 -58
  164. package/dist/executor-L2MVKMXO.js +0 -1
  165. package/dist/executor-XKBCCVNY.mjs +0 -1
  166. package/dist/processTemplate-5ZST2Q5L.js +0 -1
  167. package/dist/selectionRects-DEX5THEG.js +0 -1
  168. package/dist/selectionRects-SQTAHMCH.mjs +0 -1
package/README.md CHANGED
@@ -1,33 +1,18 @@
1
1
  <p align="center">
2
- <a href="https://github.com/eigenpal/docx-js-editor">
3
- <img src="https://raw.githubusercontent.com/eigenpal/docx-js-editor/main/assets/logo.png" alt="DOCX JS Editor" width="600" />
2
+ <a href="https://www.docx-editor.dev/">
3
+ <img src="https://raw.githubusercontent.com/eigenpal/docx-editor/main/assets/header.png" alt="DOCX Editor — .docx in, .docx out. Open source, agent ready, client-side." width="500" />
4
4
  </a>
5
5
  </p>
6
6
 
7
7
  <p align="center">
8
- <a href="https://www.npmjs.com/package/@eigenpal/docx-js-editor"><img src="https://img.shields.io/npm/v/@eigenpal/docx-js-editor.svg?style=flat-square&color=00C853" alt="npm version" /></a>
9
- <a href="https://www.npmjs.com/package/@eigenpal/docx-js-editor"><img src="https://img.shields.io/npm/dm/@eigenpal/docx-js-editor.svg?style=flat-square&color=00C853" alt="npm downloads" /></a>
10
- <a href="https://github.com/eigenpal/docx-js-editor/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square&color=00C853" alt="license" /></a>
11
- <a href="https://docx-editor.dev/editor"><img src="https://img.shields.io/badge/Live_Demo-00C853?style=flat-square&logo=vercel&logoColor=white" alt="Live Demo" /></a>
12
- <a href="https://www.docx-editor.dev/docs"><img src="https://img.shields.io/badge/Docs-00C853?style=flat-square&logo=readthedocs&logoColor=white" alt="Documentation" /></a>
8
+ <a href="https://www.npmjs.com/package/@eigenpal/docx-js-editor"><img src="https://img.shields.io/npm/v/@eigenpal/docx-js-editor.svg?style=flat-square&color=3B5BDB" alt="npm version" /></a>
9
+ <a href="https://www.npmjs.com/package/@eigenpal/docx-js-editor"><img src="https://img.shields.io/npm/dm/@eigenpal/docx-js-editor.svg?style=flat-square&color=3B5BDB" alt="npm downloads" /></a>
10
+ <a href="https://github.com/eigenpal/docx-js-editor/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square&color=3B5BDB" alt="license" /></a>
11
+ <a href="https://docx-editor.dev/editor"><img src="https://img.shields.io/badge/Live_Demo-3B5BDB?style=flat-square&logo=vercel&logoColor=white" alt="Demo" /></a>
12
+ <a href="https://www.docx-editor.dev/docs"><img src="https://img.shields.io/badge/Docs-3B5BDB?style=flat-square&logo=readthedocs&logoColor=white" alt="Documentation" /></a>
13
13
  </p>
14
14
 
15
- # @eigenpal/docx-js-editor
16
-
17
- Open-source WYSIWYG DOCX editor for the browser. No server required. **[Live demo](https://docx-editor.dev/editor)** | **[Documentation](https://www.docx-editor.dev/docs)**
18
-
19
- <p align="center">
20
- <a href="https://docx-editor.dev/editor">
21
- <img src="https://raw.githubusercontent.com/eigenpal/docx-js-editor/main/assets/editor.png" alt="DOCX JS Editor screenshot" width="700" />
22
- </a>
23
- </p>
24
-
25
- - WYSIWYG editing with Word fidelity — formatting, tables, images, hyperlinks
26
- - Track changes (suggestion mode) with accept/reject
27
- - Comments with replies, resolve/reopen, scroll-to-highlight
28
- - Internationalization (i18n) - [community-contributed translations welcome](https://github.com/eigenpal/docx-js-editor/blob/main/docs/i18n.md#contributing-a-new-locale)
29
- - Plugin system, undo/redo, find & replace, print preview
30
- - Client-side only, zero server dependencies
15
+ Open-source WYSIWYG `.docx` editor for React with canonical OOXML, tracked changes, and real-time collaboration. Agent-ready. **[Live demo](https://docx-editor.dev/editor)** | **[Documentation](https://www.docx-editor.dev/docs)**
31
16
 
32
17
  ## Quick Start
33
18
 
@@ -48,12 +33,18 @@ function Editor({ file }: { file: ArrayBuffer }) {
48
33
 
49
34
  > **Next.js / SSR:** Use dynamic import — the editor requires the DOM.
50
35
 
36
+ <p align="center">
37
+ <a href="https://docx-editor.dev/editor">
38
+ <img src="https://raw.githubusercontent.com/eigenpal/docx-editor/main/assets/editor.png" alt="DOCX JS Editor screenshot" width="100%" />
39
+ </a>
40
+ </p>
41
+
51
42
  ## Packages
52
43
 
53
44
  | Package | Description |
54
45
  | -------------------------------------------- | ------------------------------------------------------------ |
55
- | [`@eigenpal/docx-js-editor`](https://github.com/eigenpal/docx-js-editor/tree/main/packages/react) | React UI — toolbar, paged editor, plugins. **Install this.** |
56
- | [`@eigenpal/docx-editor-vue`](https://github.com/eigenpal/docx-js-editor/tree/main/packages/vue) | Vue.js scaffold — contributions welcome |
46
+ | [`@eigenpal/docx-js-editor`](https://github.com/eigenpal/docx-editor/tree/main/packages/react) | React UI — toolbar, paged editor, plugins. **Install this.** |
47
+ | [`@eigenpal/docx-editor-vue`](https://github.com/eigenpal/docx-editor/tree/main/packages/vue) | Vue.js scaffold — contributions welcome |
57
48
 
58
49
  ## Plugins
59
50
 
@@ -76,19 +67,33 @@ bun run build
76
67
  bun run typecheck
77
68
  ```
78
69
 
79
- Examples: [Vite](https://github.com/eigenpal/docx-js-editor/tree/main/examples/vite) | [Next.js](https://github.com/eigenpal/docx-js-editor/tree/main/examples/nextjs) | [Remix](https://github.com/eigenpal/docx-js-editor/tree/main/examples/remix) | [Astro](https://github.com/eigenpal/docx-js-editor/tree/main/examples/astro) | [Vue](https://github.com/eigenpal/docx-js-editor/tree/main/examples/vue)
70
+ A live preview of `main` is auto-deployed at **[latest.docx-editor.dev](https://latest.docx-editor.dev/)** useful for trying out changes before they ship to npm.
71
+
72
+ Examples: [Vite](https://github.com/eigenpal/docx-editor/tree/main/examples/vite) | [Next.js](https://github.com/eigenpal/docx-editor/tree/main/examples/nextjs) | [Remix](https://github.com/eigenpal/docx-editor/tree/main/examples/remix) | [Astro](https://github.com/eigenpal/docx-editor/tree/main/examples/astro) | [Vue](https://github.com/eigenpal/docx-editor/tree/main/examples/vue)
80
73
 
81
74
  **[Documentation](https://www.docx-editor.dev/docs)** | **[Props & Ref Methods](https://www.docx-editor.dev/docs/props)** | **[Plugins](https://www.docx-editor.dev/docs/plugins)** | **[Architecture](https://www.docx-editor.dev/docs/architecture)**
82
75
 
76
+ ## Contributing
77
+
78
+ Contributions welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for setup, tests, and the one-time CLA signature.
79
+
83
80
  ## Translations
84
81
 
85
- Help translate the editor into your language! See the full **[i18n contribution guide](https://github.com/eigenpal/docx-js-editor/blob/main/docs/i18n.md)**.
82
+ | Locale | Language | Coverage |
83
+ | ------- | ------------------- | -------- |
84
+ | `en` | English | 100% |
85
+ | `de` | German | 100% |
86
+ | `pl` | Polish | 100% |
87
+ | `pt-BR` | Portuguese (Brazil) | 100% |
88
+
89
+ Help translate the editor into your language! See the full **[i18n contribution guide](https://github.com/eigenpal/docx-editor/blob/main/docs/i18n.md)**.
86
90
 
87
91
  ```bash
88
92
  bun run i18n:new de # scaffold German locale
89
93
  bun run i18n:status # check translation coverage
90
94
  ```
91
95
 
92
- ## License
96
+ ## Commercial Support
93
97
 
94
- MIT
98
+ > [!TIP]
99
+ > Questions or custom features? Email **[docx-editor@eigenpal.com](mailto:docx-editor@eigenpal.com)**.
@@ -1,7 +1,7 @@
1
1
  import { Plugin } from 'prosemirror-state';
2
2
  import { EditorView } from 'prosemirror-view';
3
3
  import { Node } from 'prosemirror-model';
4
- import { D as Document, e as Table, b as Run } from './agentApi-mv532p8I.js';
4
+ import { D as Document, e as Table, b as Run } from './agentApi-DLt94vXk.js';
5
5
 
6
6
  /**
7
7
  * Framework-Agnostic Plugin Interface for the DOCX Editor
@@ -1,7 +1,7 @@
1
1
  import { Plugin } from 'prosemirror-state';
2
2
  import { EditorView } from 'prosemirror-view';
3
3
  import { Node } from 'prosemirror-model';
4
- import { D as Document, e as Table, b as Run } from './agentApi-mv532p8I.mjs';
4
+ import { D as Document, e as Table, b as Run } from './agentApi-DLt94vXk.mjs';
5
5
 
6
6
  /**
7
7
  * Framework-Agnostic Plugin Interface for the DOCX Editor
@@ -1,4 +1,4 @@
1
- import { D as Document, T as TextFormatting, _ as StyleInfo, h as AgentContext, P as Position, R as Range, K as ParagraphFormatting, A as AgentCommand } from './agentApi-mv532p8I.mjs';
1
+ import { D as Document, T as TextFormatting, _ as StyleInfo, h as AgentContext, P as Position, R as Range, K as ParagraphFormatting, A as AgentCommand } from './agentApi-DLt94vXk.mjs';
2
2
 
3
3
  /**
4
4
  * Selective Save Module
@@ -1,4 +1,4 @@
1
- import { D as Document, T as TextFormatting, _ as StyleInfo, h as AgentContext, P as Position, R as Range, K as ParagraphFormatting, A as AgentCommand } from './agentApi-mv532p8I.js';
1
+ import { D as Document, T as TextFormatting, _ as StyleInfo, h as AgentContext, P as Position, R as Range, K as ParagraphFormatting, A as AgentCommand } from './agentApi-DLt94vXk.js';
2
2
 
3
3
  /**
4
4
  * Selective Save Module
@@ -1 +1 @@
1
- export{n as FindReplaceDialog,a as createDefaultFindOptions,c as createSearchPattern,o as default,b as escapeRegexString,d as findAllMatches,j as findInDocument,k as findInParagraph,i as getDefaultHighlightOptions,g as getMatchCountText,h as isEmptySearch,e as replaceAllInContent,f as replaceFirstInContent,l as scrollToMatch,m as useFindReplace}from'./chunk-Z26WOH6R.mjs';import'./chunk-GZOCOWWB.mjs';import'./chunk-TAUMSKRE.mjs';
1
+ export{n as FindReplaceDialog,a as createDefaultFindOptions,c as createSearchPattern,o as default,b as escapeRegexString,d as findAllMatches,j as findInDocument,k as findInParagraph,i as getDefaultHighlightOptions,g as getMatchCountText,h as isEmptySearch,e as replaceAllInContent,f as replaceFirstInContent,l as scrollToMatch,m as useFindReplace}from'./chunk-W4EIKDM6.mjs';import'./chunk-MGEN6GOE.mjs';import'./chunk-TAUMSKRE.mjs';
@@ -0,0 +1 @@
1
+ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var chunkSFUM35DH_js=require('./chunk-SFUM35DH.js');require('./chunk-WNS2RBQD.js'),require('./chunk-H5NTJZO4.js');Object.defineProperty(exports,"FindReplaceDialog",{enumerable:true,get:function(){return chunkSFUM35DH_js.n}});Object.defineProperty(exports,"createDefaultFindOptions",{enumerable:true,get:function(){return chunkSFUM35DH_js.a}});Object.defineProperty(exports,"createSearchPattern",{enumerable:true,get:function(){return chunkSFUM35DH_js.c}});Object.defineProperty(exports,"default",{enumerable:true,get:function(){return chunkSFUM35DH_js.o}});Object.defineProperty(exports,"escapeRegexString",{enumerable:true,get:function(){return chunkSFUM35DH_js.b}});Object.defineProperty(exports,"findAllMatches",{enumerable:true,get:function(){return chunkSFUM35DH_js.d}});Object.defineProperty(exports,"findInDocument",{enumerable:true,get:function(){return chunkSFUM35DH_js.j}});Object.defineProperty(exports,"findInParagraph",{enumerable:true,get:function(){return chunkSFUM35DH_js.k}});Object.defineProperty(exports,"getDefaultHighlightOptions",{enumerable:true,get:function(){return chunkSFUM35DH_js.i}});Object.defineProperty(exports,"getMatchCountText",{enumerable:true,get:function(){return chunkSFUM35DH_js.g}});Object.defineProperty(exports,"isEmptySearch",{enumerable:true,get:function(){return chunkSFUM35DH_js.h}});Object.defineProperty(exports,"replaceAllInContent",{enumerable:true,get:function(){return chunkSFUM35DH_js.e}});Object.defineProperty(exports,"replaceFirstInContent",{enumerable:true,get:function(){return chunkSFUM35DH_js.f}});Object.defineProperty(exports,"scrollToMatch",{enumerable:true,get:function(){return chunkSFUM35DH_js.l}});Object.defineProperty(exports,"useFindReplace",{enumerable:true,get:function(){return chunkSFUM35DH_js.m}});
@@ -1 +1 @@
1
- import {b}from'./chunk-GZOCOWWB.mjs';import'./chunk-TAUMSKRE.mjs';import {useState,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},A={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",padding:24,minWidth:400,maxWidth:500},S={marginBottom:16,padding:12,border:"1px solid #e0e0e0",borderRadius:4},r={display:"block",fontSize:12,color:"#666",marginBottom:4},s={width:"100%",padding:"4px 8px",border:"1px solid #ccc",borderRadius:4,fontSize:13,marginBottom:8},h={width:60,padding:"4px 8px",border:"1px solid #ccc",borderRadius:4,fontSize:13,marginBottom:8},D={display:"flex",justifyContent:"flex-end",gap:8,marginTop:16},F={padding:"6px 16px",border:"1px solid #ccc",borderRadius:4,cursor:"pointer",fontSize:13,backgroundColor:"white"},L={...F,backgroundColor:"#2563eb",color:"white",border:"1px solid #2563eb"},x=[{value:"decimal",labelKey:"dialogs.footnoteProperties.formats.decimal"},{value:"lowerRoman",labelKey:"dialogs.footnoteProperties.formats.lowerRoman"},{value:"upperRoman",labelKey:"dialogs.footnoteProperties.formats.upperRoman"},{value:"lowerLetter",labelKey:"dialogs.footnoteProperties.formats.lowerAlpha"},{value:"upperLetter",labelKey:"dialogs.footnoteProperties.formats.upperAlpha"},{value:"chicago",labelKey:"dialogs.footnoteProperties.formats.symbols"}];function G({isOpen:C,onClose:a,onApply:v,footnotePr:l,endnotePr:p}){let{t:o}=b(),[u,R]=useState(l?.position??"pageBottom"),[d,N]=useState(l?.numFmt??"decimal"),[m,E]=useState(l?.numStart??1),[c,w]=useState(l?.numRestart??"continuous"),[g,k]=useState(p?.position??"docEnd"),[b$1,K]=useState(p?.numFmt??"lowerRoman"),[y,O]=useState(p?.numStart??1),[f,z]=useState(p?.numRestart??"continuous"),B=useCallback(()=>{v({position:u,numFmt:d,numStart:m,numRestart:c},{position:g,numFmt:b$1,numStart:y,numRestart:f}),a();},[u,d,m,c,g,b$1,y,f,v,a]);return C?jsx("div",{style:T,onClick:a,children:jsxs("div",{style:A,onClick:t=>t.stopPropagation(),children:[jsx("h3",{style:{margin:"0 0 16px",fontSize:16},children:o("dialogs.footnoteProperties.title")}),jsxs("div",{style:S,children:[jsx("h4",{style:{margin:"0 0 8px",fontSize:14},children:o("dialogs.footnoteProperties.footnotes")}),jsx("label",{style:r,children:o("dialogs.footnoteProperties.position")}),jsxs("select",{style:s,value:u,onChange:t=>R(t.target.value),children:[jsx("option",{value:"pageBottom",children:o("dialogs.footnoteProperties.footnotePositions.bottomOfPage")}),jsx("option",{value:"beneathText",children:o("dialogs.footnoteProperties.footnotePositions.belowText")})]}),jsx("label",{style:r,children:o("dialogs.footnoteProperties.numberFormat")}),jsx("select",{style:s,value:d,onChange:t=>N(t.target.value),children:x.map(t=>jsx("option",{value:t.value,children:o(t.labelKey)},t.value))}),jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[jsxs("div",{children:[jsx("label",{style:r,children:o("dialogs.footnoteProperties.startAt")}),jsx("input",{type:"number",min:1,style:h,value:m,onChange:t=>E(parseInt(t.target.value,10)||1)})]}),jsxs("div",{style:{flex:1},children:[jsx("label",{style:r,children:o("dialogs.footnoteProperties.numbering")}),jsxs("select",{style:s,value:c,onChange:t=>w(t.target.value),children:[jsx("option",{value:"continuous",children:o("dialogs.footnoteProperties.numberingOptions.continuous")}),jsx("option",{value:"eachSect",children:o("dialogs.footnoteProperties.numberingOptions.restartSection")}),jsx("option",{value:"eachPage",children:o("dialogs.footnoteProperties.numberingOptions.restartPage")})]})]})]})]}),jsxs("div",{style:S,children:[jsx("h4",{style:{margin:"0 0 8px",fontSize:14},children:o("dialogs.footnoteProperties.endnotes")}),jsx("label",{style:r,children:o("dialogs.footnoteProperties.position")}),jsxs("select",{style:s,value:g,onChange:t=>k(t.target.value),children:[jsx("option",{value:"docEnd",children:o("dialogs.footnoteProperties.endnotePositions.endOfDocument")}),jsx("option",{value:"sectEnd",children:o("dialogs.footnoteProperties.endnotePositions.endOfSection")})]}),jsx("label",{style:r,children:o("dialogs.footnoteProperties.numberFormat")}),jsx("select",{style:s,value:b$1,onChange:t=>K(t.target.value),children:x.map(t=>jsx("option",{value:t.value,children:o(t.labelKey)},t.value))}),jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[jsxs("div",{children:[jsx("label",{style:r,children:o("dialogs.footnoteProperties.startAt")}),jsx("input",{type:"number",min:1,style:h,value:y,onChange:t=>O(parseInt(t.target.value,10)||1)})]}),jsxs("div",{style:{flex:1},children:[jsx("label",{style:r,children:o("dialogs.footnoteProperties.numbering")}),jsxs("select",{style:s,value:f,onChange:t=>z(t.target.value),children:[jsx("option",{value:"continuous",children:o("dialogs.footnoteProperties.numberingOptions.continuous")}),jsx("option",{value:"eachSect",children:o("dialogs.footnoteProperties.numberingOptions.restartSection")})]})]})]})]}),jsxs("div",{style:D,children:[jsx("button",{style:F,onClick:a,children:o("common.cancel")}),jsx("button",{style:L,onClick:B,children:o("common.apply")})]})]})}):null}export{G as FootnotePropertiesDialog};
1
+ import {c}from'./chunk-MGEN6GOE.mjs';import'./chunk-TAUMSKRE.mjs';import {useState,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},A={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",padding:24,minWidth:400,maxWidth:500},S={marginBottom:16,padding:12,border:"1px solid #e0e0e0",borderRadius:4},r={display:"block",fontSize:12,color:"#666",marginBottom:4},s={width:"100%",padding:"4px 8px",border:"1px solid #ccc",borderRadius:4,fontSize:13,marginBottom:8},h={width:60,padding:"4px 8px",border:"1px solid #ccc",borderRadius:4,fontSize:13,marginBottom:8},D={display:"flex",justifyContent:"flex-end",gap:8,marginTop:16},F={padding:"6px 16px",border:"1px solid #ccc",borderRadius:4,cursor:"pointer",fontSize:13,backgroundColor:"white"},L={...F,backgroundColor:"#2563eb",color:"white",border:"1px solid #2563eb"},x=[{value:"decimal",labelKey:"dialogs.footnoteProperties.formats.decimal"},{value:"lowerRoman",labelKey:"dialogs.footnoteProperties.formats.lowerRoman"},{value:"upperRoman",labelKey:"dialogs.footnoteProperties.formats.upperRoman"},{value:"lowerLetter",labelKey:"dialogs.footnoteProperties.formats.lowerAlpha"},{value:"upperLetter",labelKey:"dialogs.footnoteProperties.formats.upperAlpha"},{value:"chicago",labelKey:"dialogs.footnoteProperties.formats.symbols"}];function G({isOpen:C,onClose:a,onApply:v,footnotePr:l,endnotePr:p}){let{t:o}=c(),[u,R]=useState(l?.position??"pageBottom"),[d,N]=useState(l?.numFmt??"decimal"),[m,E]=useState(l?.numStart??1),[c$1,w]=useState(l?.numRestart??"continuous"),[g,k]=useState(p?.position??"docEnd"),[b,K]=useState(p?.numFmt??"lowerRoman"),[y,O]=useState(p?.numStart??1),[f,z]=useState(p?.numRestart??"continuous"),B=useCallback(()=>{v({position:u,numFmt:d,numStart:m,numRestart:c$1},{position:g,numFmt:b,numStart:y,numRestart:f}),a();},[u,d,m,c$1,g,b,y,f,v,a]);return C?jsx("div",{style:T,onClick:a,children:jsxs("div",{style:A,onClick:t=>t.stopPropagation(),children:[jsx("h3",{style:{margin:"0 0 16px",fontSize:16},children:o("dialogs.footnoteProperties.title")}),jsxs("div",{style:S,children:[jsx("h4",{style:{margin:"0 0 8px",fontSize:14},children:o("dialogs.footnoteProperties.footnotes")}),jsx("label",{style:r,children:o("dialogs.footnoteProperties.position")}),jsxs("select",{style:s,value:u,onChange:t=>R(t.target.value),children:[jsx("option",{value:"pageBottom",children:o("dialogs.footnoteProperties.footnotePositions.bottomOfPage")}),jsx("option",{value:"beneathText",children:o("dialogs.footnoteProperties.footnotePositions.belowText")})]}),jsx("label",{style:r,children:o("dialogs.footnoteProperties.numberFormat")}),jsx("select",{style:s,value:d,onChange:t=>N(t.target.value),children:x.map(t=>jsx("option",{value:t.value,children:o(t.labelKey)},t.value))}),jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[jsxs("div",{children:[jsx("label",{style:r,children:o("dialogs.footnoteProperties.startAt")}),jsx("input",{type:"number",min:1,style:h,value:m,onChange:t=>E(parseInt(t.target.value,10)||1)})]}),jsxs("div",{style:{flex:1},children:[jsx("label",{style:r,children:o("dialogs.footnoteProperties.numbering")}),jsxs("select",{style:s,value:c$1,onChange:t=>w(t.target.value),children:[jsx("option",{value:"continuous",children:o("dialogs.footnoteProperties.numberingOptions.continuous")}),jsx("option",{value:"eachSect",children:o("dialogs.footnoteProperties.numberingOptions.restartSection")}),jsx("option",{value:"eachPage",children:o("dialogs.footnoteProperties.numberingOptions.restartPage")})]})]})]})]}),jsxs("div",{style:S,children:[jsx("h4",{style:{margin:"0 0 8px",fontSize:14},children:o("dialogs.footnoteProperties.endnotes")}),jsx("label",{style:r,children:o("dialogs.footnoteProperties.position")}),jsxs("select",{style:s,value:g,onChange:t=>k(t.target.value),children:[jsx("option",{value:"docEnd",children:o("dialogs.footnoteProperties.endnotePositions.endOfDocument")}),jsx("option",{value:"sectEnd",children:o("dialogs.footnoteProperties.endnotePositions.endOfSection")})]}),jsx("label",{style:r,children:o("dialogs.footnoteProperties.numberFormat")}),jsx("select",{style:s,value:b,onChange:t=>K(t.target.value),children:x.map(t=>jsx("option",{value:t.value,children:o(t.labelKey)},t.value))}),jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[jsxs("div",{children:[jsx("label",{style:r,children:o("dialogs.footnoteProperties.startAt")}),jsx("input",{type:"number",min:1,style:h,value:y,onChange:t=>O(parseInt(t.target.value,10)||1)})]}),jsxs("div",{style:{flex:1},children:[jsx("label",{style:r,children:o("dialogs.footnoteProperties.numbering")}),jsxs("select",{style:s,value:f,onChange:t=>z(t.target.value),children:[jsx("option",{value:"continuous",children:o("dialogs.footnoteProperties.numberingOptions.continuous")}),jsx("option",{value:"eachSect",children:o("dialogs.footnoteProperties.numberingOptions.restartSection")})]})]})]})]}),jsxs("div",{style:D,children:[jsx("button",{style:F,onClick:a,children:o("common.cancel")}),jsx("button",{style:L,onClick:B,children:o("common.apply")})]})]})}):null}export{G as FootnotePropertiesDialog};
@@ -1 +1 @@
1
- 'use strict';var chunkQSUPYUOP_js=require('./chunk-QSUPYUOP.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},A={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",padding:24,minWidth:400,maxWidth:500},S={marginBottom:16,padding:12,border:"1px solid #e0e0e0",borderRadius:4},r={display:"block",fontSize:12,color:"#666",marginBottom:4},s={width:"100%",padding:"4px 8px",border:"1px solid #ccc",borderRadius:4,fontSize:13,marginBottom:8},h={width:60,padding:"4px 8px",border:"1px solid #ccc",borderRadius:4,fontSize:13,marginBottom:8},D={display:"flex",justifyContent:"flex-end",gap:8,marginTop:16},F={padding:"6px 16px",border:"1px solid #ccc",borderRadius:4,cursor:"pointer",fontSize:13,backgroundColor:"white"},L={...F,backgroundColor:"#2563eb",color:"white",border:"1px solid #2563eb"},x=[{value:"decimal",labelKey:"dialogs.footnoteProperties.formats.decimal"},{value:"lowerRoman",labelKey:"dialogs.footnoteProperties.formats.lowerRoman"},{value:"upperRoman",labelKey:"dialogs.footnoteProperties.formats.upperRoman"},{value:"lowerLetter",labelKey:"dialogs.footnoteProperties.formats.lowerAlpha"},{value:"upperLetter",labelKey:"dialogs.footnoteProperties.formats.upperAlpha"},{value:"chicago",labelKey:"dialogs.footnoteProperties.formats.symbols"}];function G({isOpen:C,onClose:a,onApply:v,footnotePr:l,endnotePr:p}){let{t:o}=chunkQSUPYUOP_js.b(),[u,R]=react.useState(l?.position??"pageBottom"),[d,N]=react.useState(l?.numFmt??"decimal"),[m,E]=react.useState(l?.numStart??1),[c,w]=react.useState(l?.numRestart??"continuous"),[g,k]=react.useState(p?.position??"docEnd"),[b,K]=react.useState(p?.numFmt??"lowerRoman"),[y,O]=react.useState(p?.numStart??1),[f,z]=react.useState(p?.numRestart??"continuous"),B=react.useCallback(()=>{v({position:u,numFmt:d,numStart:m,numRestart:c},{position:g,numFmt:b,numStart:y,numRestart:f}),a();},[u,d,m,c,g,b,y,f,v,a]);return C?jsxRuntime.jsx("div",{style:T,onClick:a,children:jsxRuntime.jsxs("div",{style:A,onClick:t=>t.stopPropagation(),children:[jsxRuntime.jsx("h3",{style:{margin:"0 0 16px",fontSize:16},children:o("dialogs.footnoteProperties.title")}),jsxRuntime.jsxs("div",{style:S,children:[jsxRuntime.jsx("h4",{style:{margin:"0 0 8px",fontSize:14},children:o("dialogs.footnoteProperties.footnotes")}),jsxRuntime.jsx("label",{style:r,children:o("dialogs.footnoteProperties.position")}),jsxRuntime.jsxs("select",{style:s,value:u,onChange:t=>R(t.target.value),children:[jsxRuntime.jsx("option",{value:"pageBottom",children:o("dialogs.footnoteProperties.footnotePositions.bottomOfPage")}),jsxRuntime.jsx("option",{value:"beneathText",children:o("dialogs.footnoteProperties.footnotePositions.belowText")})]}),jsxRuntime.jsx("label",{style:r,children:o("dialogs.footnoteProperties.numberFormat")}),jsxRuntime.jsx("select",{style:s,value:d,onChange:t=>N(t.target.value),children:x.map(t=>jsxRuntime.jsx("option",{value:t.value,children:o(t.labelKey)},t.value))}),jsxRuntime.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{style:r,children:o("dialogs.footnoteProperties.startAt")}),jsxRuntime.jsx("input",{type:"number",min:1,style:h,value:m,onChange:t=>E(parseInt(t.target.value,10)||1)})]}),jsxRuntime.jsxs("div",{style:{flex:1},children:[jsxRuntime.jsx("label",{style:r,children:o("dialogs.footnoteProperties.numbering")}),jsxRuntime.jsxs("select",{style:s,value:c,onChange:t=>w(t.target.value),children:[jsxRuntime.jsx("option",{value:"continuous",children:o("dialogs.footnoteProperties.numberingOptions.continuous")}),jsxRuntime.jsx("option",{value:"eachSect",children:o("dialogs.footnoteProperties.numberingOptions.restartSection")}),jsxRuntime.jsx("option",{value:"eachPage",children:o("dialogs.footnoteProperties.numberingOptions.restartPage")})]})]})]})]}),jsxRuntime.jsxs("div",{style:S,children:[jsxRuntime.jsx("h4",{style:{margin:"0 0 8px",fontSize:14},children:o("dialogs.footnoteProperties.endnotes")}),jsxRuntime.jsx("label",{style:r,children:o("dialogs.footnoteProperties.position")}),jsxRuntime.jsxs("select",{style:s,value:g,onChange:t=>k(t.target.value),children:[jsxRuntime.jsx("option",{value:"docEnd",children:o("dialogs.footnoteProperties.endnotePositions.endOfDocument")}),jsxRuntime.jsx("option",{value:"sectEnd",children:o("dialogs.footnoteProperties.endnotePositions.endOfSection")})]}),jsxRuntime.jsx("label",{style:r,children:o("dialogs.footnoteProperties.numberFormat")}),jsxRuntime.jsx("select",{style:s,value:b,onChange:t=>K(t.target.value),children:x.map(t=>jsxRuntime.jsx("option",{value:t.value,children:o(t.labelKey)},t.value))}),jsxRuntime.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{style:r,children:o("dialogs.footnoteProperties.startAt")}),jsxRuntime.jsx("input",{type:"number",min:1,style:h,value:y,onChange:t=>O(parseInt(t.target.value,10)||1)})]}),jsxRuntime.jsxs("div",{style:{flex:1},children:[jsxRuntime.jsx("label",{style:r,children:o("dialogs.footnoteProperties.numbering")}),jsxRuntime.jsxs("select",{style:s,value:f,onChange:t=>z(t.target.value),children:[jsxRuntime.jsx("option",{value:"continuous",children:o("dialogs.footnoteProperties.numberingOptions.continuous")}),jsxRuntime.jsx("option",{value:"eachSect",children:o("dialogs.footnoteProperties.numberingOptions.restartSection")})]})]})]})]}),jsxRuntime.jsxs("div",{style:D,children:[jsxRuntime.jsx("button",{style:F,onClick:a,children:o("common.cancel")}),jsxRuntime.jsx("button",{style:L,onClick:B,children:o("common.apply")})]})]})}):null}exports.FootnotePropertiesDialog=G;
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},A={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",padding:24,minWidth:400,maxWidth:500},S={marginBottom:16,padding:12,border:"1px solid #e0e0e0",borderRadius:4},r={display:"block",fontSize:12,color:"#666",marginBottom:4},s={width:"100%",padding:"4px 8px",border:"1px solid #ccc",borderRadius:4,fontSize:13,marginBottom:8},h={width:60,padding:"4px 8px",border:"1px solid #ccc",borderRadius:4,fontSize:13,marginBottom:8},D={display:"flex",justifyContent:"flex-end",gap:8,marginTop:16},F={padding:"6px 16px",border:"1px solid #ccc",borderRadius:4,cursor:"pointer",fontSize:13,backgroundColor:"white"},L={...F,backgroundColor:"#2563eb",color:"white",border:"1px solid #2563eb"},x=[{value:"decimal",labelKey:"dialogs.footnoteProperties.formats.decimal"},{value:"lowerRoman",labelKey:"dialogs.footnoteProperties.formats.lowerRoman"},{value:"upperRoman",labelKey:"dialogs.footnoteProperties.formats.upperRoman"},{value:"lowerLetter",labelKey:"dialogs.footnoteProperties.formats.lowerAlpha"},{value:"upperLetter",labelKey:"dialogs.footnoteProperties.formats.upperAlpha"},{value:"chicago",labelKey:"dialogs.footnoteProperties.formats.symbols"}];function G({isOpen:C,onClose:a,onApply:v,footnotePr:l,endnotePr:p}){let{t:o}=chunkWNS2RBQD_js.c(),[u,R]=react.useState(l?.position??"pageBottom"),[d,N]=react.useState(l?.numFmt??"decimal"),[m,E]=react.useState(l?.numStart??1),[c,w]=react.useState(l?.numRestart??"continuous"),[g,k]=react.useState(p?.position??"docEnd"),[b,K]=react.useState(p?.numFmt??"lowerRoman"),[y,O]=react.useState(p?.numStart??1),[f,z]=react.useState(p?.numRestart??"continuous"),B=react.useCallback(()=>{v({position:u,numFmt:d,numStart:m,numRestart:c},{position:g,numFmt:b,numStart:y,numRestart:f}),a();},[u,d,m,c,g,b,y,f,v,a]);return C?jsxRuntime.jsx("div",{style:T,onClick:a,children:jsxRuntime.jsxs("div",{style:A,onClick:t=>t.stopPropagation(),children:[jsxRuntime.jsx("h3",{style:{margin:"0 0 16px",fontSize:16},children:o("dialogs.footnoteProperties.title")}),jsxRuntime.jsxs("div",{style:S,children:[jsxRuntime.jsx("h4",{style:{margin:"0 0 8px",fontSize:14},children:o("dialogs.footnoteProperties.footnotes")}),jsxRuntime.jsx("label",{style:r,children:o("dialogs.footnoteProperties.position")}),jsxRuntime.jsxs("select",{style:s,value:u,onChange:t=>R(t.target.value),children:[jsxRuntime.jsx("option",{value:"pageBottom",children:o("dialogs.footnoteProperties.footnotePositions.bottomOfPage")}),jsxRuntime.jsx("option",{value:"beneathText",children:o("dialogs.footnoteProperties.footnotePositions.belowText")})]}),jsxRuntime.jsx("label",{style:r,children:o("dialogs.footnoteProperties.numberFormat")}),jsxRuntime.jsx("select",{style:s,value:d,onChange:t=>N(t.target.value),children:x.map(t=>jsxRuntime.jsx("option",{value:t.value,children:o(t.labelKey)},t.value))}),jsxRuntime.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{style:r,children:o("dialogs.footnoteProperties.startAt")}),jsxRuntime.jsx("input",{type:"number",min:1,style:h,value:m,onChange:t=>E(parseInt(t.target.value,10)||1)})]}),jsxRuntime.jsxs("div",{style:{flex:1},children:[jsxRuntime.jsx("label",{style:r,children:o("dialogs.footnoteProperties.numbering")}),jsxRuntime.jsxs("select",{style:s,value:c,onChange:t=>w(t.target.value),children:[jsxRuntime.jsx("option",{value:"continuous",children:o("dialogs.footnoteProperties.numberingOptions.continuous")}),jsxRuntime.jsx("option",{value:"eachSect",children:o("dialogs.footnoteProperties.numberingOptions.restartSection")}),jsxRuntime.jsx("option",{value:"eachPage",children:o("dialogs.footnoteProperties.numberingOptions.restartPage")})]})]})]})]}),jsxRuntime.jsxs("div",{style:S,children:[jsxRuntime.jsx("h4",{style:{margin:"0 0 8px",fontSize:14},children:o("dialogs.footnoteProperties.endnotes")}),jsxRuntime.jsx("label",{style:r,children:o("dialogs.footnoteProperties.position")}),jsxRuntime.jsxs("select",{style:s,value:g,onChange:t=>k(t.target.value),children:[jsxRuntime.jsx("option",{value:"docEnd",children:o("dialogs.footnoteProperties.endnotePositions.endOfDocument")}),jsxRuntime.jsx("option",{value:"sectEnd",children:o("dialogs.footnoteProperties.endnotePositions.endOfSection")})]}),jsxRuntime.jsx("label",{style:r,children:o("dialogs.footnoteProperties.numberFormat")}),jsxRuntime.jsx("select",{style:s,value:b,onChange:t=>K(t.target.value),children:x.map(t=>jsxRuntime.jsx("option",{value:t.value,children:o(t.labelKey)},t.value))}),jsxRuntime.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{style:r,children:o("dialogs.footnoteProperties.startAt")}),jsxRuntime.jsx("input",{type:"number",min:1,style:h,value:y,onChange:t=>O(parseInt(t.target.value,10)||1)})]}),jsxRuntime.jsxs("div",{style:{flex:1},children:[jsxRuntime.jsx("label",{style:r,children:o("dialogs.footnoteProperties.numbering")}),jsxRuntime.jsxs("select",{style:s,value:f,onChange:t=>z(t.target.value),children:[jsxRuntime.jsx("option",{value:"continuous",children:o("dialogs.footnoteProperties.numberingOptions.continuous")}),jsxRuntime.jsx("option",{value:"eachSect",children:o("dialogs.footnoteProperties.numberingOptions.restartSection")})]})]})]})]}),jsxRuntime.jsxs("div",{style:D,children:[jsxRuntime.jsx("button",{style:F,onClick:a,children:o("common.cancel")}),jsxRuntime.jsx("button",{style:L,onClick:B,children:o("common.apply")})]})]})}):null}exports.FootnotePropertiesDialog=G;
@@ -1 +1 @@
1
- export{d as HyperlinkDialog,f as createBookmarkLinkData,e as createHyperlinkData,n as default,j as emailToMailto,l as extractBookmarksForDialog,i as getDisplayText,c as getUrlType,h as isBookmarkHyperlinkData,g as isExternalHyperlinkData,a as isValidUrl,b as normalizeUrl,k as phoneToTel,m as useHyperlinkDialog}from'./chunk-YKBSKEBS.mjs';import'./chunk-GZOCOWWB.mjs';import'./chunk-TAUMSKRE.mjs';
1
+ export{d as HyperlinkDialog,f as createBookmarkLinkData,e as createHyperlinkData,n as default,j as emailToMailto,l as extractBookmarksForDialog,i as getDisplayText,c as getUrlType,h as isBookmarkHyperlinkData,g as isExternalHyperlinkData,a as isValidUrl,b as normalizeUrl,k as phoneToTel,m as useHyperlinkDialog}from'./chunk-PKEOQIQO.mjs';import'./chunk-MGEN6GOE.mjs';import'./chunk-TAUMSKRE.mjs';
@@ -0,0 +1 @@
1
+ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var chunkEHFEG3TX_js=require('./chunk-EHFEG3TX.js');require('./chunk-WNS2RBQD.js'),require('./chunk-H5NTJZO4.js');Object.defineProperty(exports,"HyperlinkDialog",{enumerable:true,get:function(){return chunkEHFEG3TX_js.d}});Object.defineProperty(exports,"createBookmarkLinkData",{enumerable:true,get:function(){return chunkEHFEG3TX_js.f}});Object.defineProperty(exports,"createHyperlinkData",{enumerable:true,get:function(){return chunkEHFEG3TX_js.e}});Object.defineProperty(exports,"default",{enumerable:true,get:function(){return chunkEHFEG3TX_js.n}});Object.defineProperty(exports,"emailToMailto",{enumerable:true,get:function(){return chunkEHFEG3TX_js.j}});Object.defineProperty(exports,"extractBookmarksForDialog",{enumerable:true,get:function(){return chunkEHFEG3TX_js.l}});Object.defineProperty(exports,"getDisplayText",{enumerable:true,get:function(){return chunkEHFEG3TX_js.i}});Object.defineProperty(exports,"getUrlType",{enumerable:true,get:function(){return chunkEHFEG3TX_js.c}});Object.defineProperty(exports,"isBookmarkHyperlinkData",{enumerable:true,get:function(){return chunkEHFEG3TX_js.h}});Object.defineProperty(exports,"isExternalHyperlinkData",{enumerable:true,get:function(){return chunkEHFEG3TX_js.g}});Object.defineProperty(exports,"isValidUrl",{enumerable:true,get:function(){return chunkEHFEG3TX_js.a}});Object.defineProperty(exports,"normalizeUrl",{enumerable:true,get:function(){return chunkEHFEG3TX_js.b}});Object.defineProperty(exports,"phoneToTel",{enumerable:true,get:function(){return chunkEHFEG3TX_js.k}});Object.defineProperty(exports,"useHyperlinkDialog",{enumerable:true,get:function(){return chunkEHFEG3TX_js.m}});
@@ -1 +1 @@
1
- 'use strict';var chunkQSUPYUOP_js=require('./chunk-QSUPYUOP.js');require('./chunk-H5NTJZO4.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var J={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},Q={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:400,maxWidth:480,width:"100%",margin:20},U={padding:"16px 20px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:16,fontWeight:600},X={padding:"16px 20px",display:"flex",flexDirection:"column",gap:16},D={display:"flex",flexDirection:"column",gap:8},k={fontSize:13,fontWeight:600,color:"var(--doc-text)"},a={display:"flex",alignItems:"center",gap:8},n={width:75,fontSize:12,color:"var(--doc-text-muted)"},g={flex:1,padding:"4px 6px",border:"1px solid var(--doc-border)",borderRadius:4,fontSize:12},p={...g},Y={padding:"12px 20px 16px",borderTop:"1px solid var(--doc-border)",display:"flex",justifyContent:"flex-end",gap:8},q={padding:"6px 16px",fontSize:13,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"};function tt({isOpen:f,onClose:r,onApply:z,currentData:s}){let{t:i}=chunkQSUPYUOP_js.b(),[v,c]=react.useState("align"),[u,I]=react.useState("center"),[y,B]=react.useState("column"),[b,L]=react.useState(0),[m,P]=react.useState("align"),[h,N]=react.useState("top"),[S,A]=react.useState("paragraph"),[x,E]=react.useState(0),[C,H]=react.useState(0),[O,M]=react.useState(0),[T,V]=react.useState(0),[R,W]=react.useState(0);react.useEffect(()=>{if(!f)return;let t=s?.horizontal,d=s?.vertical;t?.align?(c("align"),I(t.align)):t?.posOffset!=null&&(c("offset"),L(t.posOffset)),t?.relativeTo&&B(t.relativeTo),d?.align?(P("align"),N(d.align)):d?.posOffset!=null&&(P("offset"),E(d.posOffset)),d?.relativeTo&&A(d.relativeTo),H(s?.distTop??0),M(s?.distBottom??0),V(s?.distLeft??0),W(s?.distRight??0);},[f,s]);let w=react.useCallback(()=>{let t={};t.horizontal={relativeTo:y,...v==="align"?{align:u}:{posOffset:b}},t.vertical={relativeTo:S,...m==="align"?{align:h}:{posOffset:x}},t.distTop=C,t.distBottom=O,t.distLeft=T,t.distRight=R,z(t),r();},[v,u,y,b,m,h,S,x,C,O,T,R,z,r]),F=react.useCallback(t=>{t.key==="Escape"&&r(),t.key==="Enter"&&w();},[r,w]);return f?jsxRuntime.jsx("div",{style:J,onClick:r,onKeyDown:F,children:jsxRuntime.jsxs("div",{style:Q,onClick:t=>t.stopPropagation(),role:"dialog","aria-label":i("dialogs.imagePosition.title"),children:[jsxRuntime.jsx("div",{style:U,children:i("dialogs.imagePosition.title")}),jsxRuntime.jsxs("div",{style:X,children:[jsxRuntime.jsxs("div",{style:D,children:[jsxRuntime.jsx("div",{style:k,children:i("dialogs.imagePosition.horizontal")}),jsxRuntime.jsxs("div",{style:a,children:[jsxRuntime.jsx("label",{style:n,children:i("dialogs.imagePosition.position")}),jsxRuntime.jsxs("select",{style:p,value:v,onChange:t=>c(t.target.value),children:[jsxRuntime.jsx("option",{value:"align",children:i("dialogs.imagePosition.alignment")}),jsxRuntime.jsx("option",{value:"offset",children:i("dialogs.imagePosition.offset")})]})]}),v==="align"?jsxRuntime.jsxs("div",{style:a,children:[jsxRuntime.jsx("label",{style:n,children:i("dialogs.imagePosition.align")}),jsxRuntime.jsxs("select",{style:p,value:u,onChange:t=>I(t.target.value),children:[jsxRuntime.jsx("option",{value:"left",children:i("dialogs.imagePosition.alignOptions.left")}),jsxRuntime.jsx("option",{value:"center",children:i("dialogs.imagePosition.alignOptions.center")}),jsxRuntime.jsx("option",{value:"right",children:i("dialogs.imagePosition.alignOptions.right")})]})]}):jsxRuntime.jsxs("div",{style:a,children:[jsxRuntime.jsx("label",{style:n,children:i("dialogs.imagePosition.offsetPx")}),jsxRuntime.jsx("input",{type:"number",style:g,value:b,onChange:t=>L(Number(t.target.value)||0)})]}),jsxRuntime.jsxs("div",{style:a,children:[jsxRuntime.jsx("label",{style:n,children:i("dialogs.imagePosition.relativeTo")}),jsxRuntime.jsxs("select",{style:p,value:y,onChange:t=>B(t.target.value),children:[jsxRuntime.jsx("option",{value:"page",children:i("dialogs.imagePosition.relativeOptions.page")}),jsxRuntime.jsx("option",{value:"column",children:i("dialogs.imagePosition.relativeOptions.column")}),jsxRuntime.jsx("option",{value:"margin",children:i("dialogs.imagePosition.relativeOptions.margin")}),jsxRuntime.jsx("option",{value:"character",children:i("dialogs.imagePosition.relativeOptions.character")})]})]})]}),jsxRuntime.jsxs("div",{style:D,children:[jsxRuntime.jsx("div",{style:k,children:i("dialogs.imagePosition.vertical")}),jsxRuntime.jsxs("div",{style:a,children:[jsxRuntime.jsx("label",{style:n,children:i("dialogs.imagePosition.position")}),jsxRuntime.jsxs("select",{style:p,value:m,onChange:t=>P(t.target.value),children:[jsxRuntime.jsx("option",{value:"align",children:i("dialogs.imagePosition.alignment")}),jsxRuntime.jsx("option",{value:"offset",children:i("dialogs.imagePosition.offset")})]})]}),m==="align"?jsxRuntime.jsxs("div",{style:a,children:[jsxRuntime.jsx("label",{style:n,children:i("dialogs.imagePosition.align")}),jsxRuntime.jsxs("select",{style:p,value:h,onChange:t=>N(t.target.value),children:[jsxRuntime.jsx("option",{value:"top",children:i("dialogs.imagePosition.alignOptions.top")}),jsxRuntime.jsx("option",{value:"center",children:i("dialogs.imagePosition.alignOptions.center")}),jsxRuntime.jsx("option",{value:"bottom",children:i("dialogs.imagePosition.alignOptions.bottom")})]})]}):jsxRuntime.jsxs("div",{style:a,children:[jsxRuntime.jsx("label",{style:n,children:i("dialogs.imagePosition.offsetPx")}),jsxRuntime.jsx("input",{type:"number",style:g,value:x,onChange:t=>E(Number(t.target.value)||0)})]}),jsxRuntime.jsxs("div",{style:a,children:[jsxRuntime.jsx("label",{style:n,children:i("dialogs.imagePosition.relativeTo")}),jsxRuntime.jsxs("select",{style:p,value:S,onChange:t=>A(t.target.value),children:[jsxRuntime.jsx("option",{value:"page",children:i("dialogs.imagePosition.relativeOptions.page")}),jsxRuntime.jsx("option",{value:"margin",children:i("dialogs.imagePosition.relativeOptions.margin")}),jsxRuntime.jsx("option",{value:"paragraph",children:i("dialogs.imagePosition.relativeOptions.paragraph")}),jsxRuntime.jsx("option",{value:"line",children:i("dialogs.imagePosition.relativeOptions.line")})]})]})]}),jsxRuntime.jsxs("div",{style:D,children:[jsxRuntime.jsx("div",{style:k,children:"Distance from text (px)"}),jsxRuntime.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8},children:[jsxRuntime.jsxs("div",{style:a,children:[jsxRuntime.jsx("label",{style:{...n,width:45},children:i("dialogs.imagePosition.alignOptions.top")}),jsxRuntime.jsx("input",{type:"number",style:g,min:0,value:C,onChange:t=>H(Number(t.target.value)||0)})]}),jsxRuntime.jsxs("div",{style:a,children:[jsxRuntime.jsx("label",{style:{...n,width:45},children:i("dialogs.imagePosition.alignOptions.bottom")}),jsxRuntime.jsx("input",{type:"number",style:g,min:0,value:O,onChange:t=>M(Number(t.target.value)||0)})]}),jsxRuntime.jsxs("div",{style:a,children:[jsxRuntime.jsx("label",{style:{...n,width:45},children:i("dialogs.imagePosition.alignOptions.left")}),jsxRuntime.jsx("input",{type:"number",style:g,min:0,value:T,onChange:t=>V(Number(t.target.value)||0)})]}),jsxRuntime.jsxs("div",{style:a,children:[jsxRuntime.jsx("label",{style:{...n,width:45},children:i("dialogs.imagePosition.alignOptions.right")}),jsxRuntime.jsx("input",{type:"number",style:g,min:0,value:R,onChange:t=>W(Number(t.target.value)||0)})]})]})]})]}),jsxRuntime.jsxs("div",{style:Y,children:[jsxRuntime.jsx("button",{type:"button",style:q,onClick:r,children:i("common.cancel")}),jsxRuntime.jsx("button",{type:"button",style:{...q,backgroundColor:"var(--doc-primary)",color:"white",borderColor:"var(--doc-primary)"},onClick:w,children:i("common.apply")})]})]})}):null}exports.ImagePositionDialog=tt;
1
+ 'use strict';var chunkWNS2RBQD_js=require('./chunk-WNS2RBQD.js');require('./chunk-H5NTJZO4.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var J={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},Q={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:400,maxWidth:480,width:"100%",margin:20},U={padding:"16px 20px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:16,fontWeight:600},X={padding:"16px 20px",display:"flex",flexDirection:"column",gap:16},D={display:"flex",flexDirection:"column",gap:8},k={fontSize:13,fontWeight:600,color:"var(--doc-text)"},a={display:"flex",alignItems:"center",gap:8},n={width:75,fontSize:12,color:"var(--doc-text-muted)"},g={flex:1,padding:"4px 6px",border:"1px solid var(--doc-border)",borderRadius:4,fontSize:12},p={...g},Y={padding:"12px 20px 16px",borderTop:"1px solid var(--doc-border)",display:"flex",justifyContent:"flex-end",gap:8},q={padding:"6px 16px",fontSize:13,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"};function tt({isOpen:f,onClose:r,onApply:z,currentData:s}){let{t:i}=chunkWNS2RBQD_js.c(),[v,c]=react.useState("align"),[u,I]=react.useState("center"),[y,B]=react.useState("column"),[b,L]=react.useState(0),[m,P]=react.useState("align"),[h,N]=react.useState("top"),[S,A]=react.useState("paragraph"),[x,E]=react.useState(0),[C,H]=react.useState(0),[O,M]=react.useState(0),[T,V]=react.useState(0),[R,W]=react.useState(0);react.useEffect(()=>{if(!f)return;let t=s?.horizontal,d=s?.vertical;t?.align?(c("align"),I(t.align)):t?.posOffset!=null&&(c("offset"),L(t.posOffset)),t?.relativeTo&&B(t.relativeTo),d?.align?(P("align"),N(d.align)):d?.posOffset!=null&&(P("offset"),E(d.posOffset)),d?.relativeTo&&A(d.relativeTo),H(s?.distTop??0),M(s?.distBottom??0),V(s?.distLeft??0),W(s?.distRight??0);},[f,s]);let w=react.useCallback(()=>{let t={};t.horizontal={relativeTo:y,...v==="align"?{align:u}:{posOffset:b}},t.vertical={relativeTo:S,...m==="align"?{align:h}:{posOffset:x}},t.distTop=C,t.distBottom=O,t.distLeft=T,t.distRight=R,z(t),r();},[v,u,y,b,m,h,S,x,C,O,T,R,z,r]),F=react.useCallback(t=>{t.key==="Escape"&&r(),t.key==="Enter"&&w();},[r,w]);return f?jsxRuntime.jsx("div",{style:J,onClick:r,onKeyDown:F,children:jsxRuntime.jsxs("div",{style:Q,onClick:t=>t.stopPropagation(),role:"dialog","aria-label":i("dialogs.imagePosition.title"),children:[jsxRuntime.jsx("div",{style:U,children:i("dialogs.imagePosition.title")}),jsxRuntime.jsxs("div",{style:X,children:[jsxRuntime.jsxs("div",{style:D,children:[jsxRuntime.jsx("div",{style:k,children:i("dialogs.imagePosition.horizontal")}),jsxRuntime.jsxs("div",{style:a,children:[jsxRuntime.jsx("label",{style:n,children:i("dialogs.imagePosition.position")}),jsxRuntime.jsxs("select",{style:p,value:v,onChange:t=>c(t.target.value),children:[jsxRuntime.jsx("option",{value:"align",children:i("dialogs.imagePosition.alignment")}),jsxRuntime.jsx("option",{value:"offset",children:i("dialogs.imagePosition.offset")})]})]}),v==="align"?jsxRuntime.jsxs("div",{style:a,children:[jsxRuntime.jsx("label",{style:n,children:i("dialogs.imagePosition.align")}),jsxRuntime.jsxs("select",{style:p,value:u,onChange:t=>I(t.target.value),children:[jsxRuntime.jsx("option",{value:"left",children:i("dialogs.imagePosition.alignOptions.left")}),jsxRuntime.jsx("option",{value:"center",children:i("dialogs.imagePosition.alignOptions.center")}),jsxRuntime.jsx("option",{value:"right",children:i("dialogs.imagePosition.alignOptions.right")})]})]}):jsxRuntime.jsxs("div",{style:a,children:[jsxRuntime.jsx("label",{style:n,children:i("dialogs.imagePosition.offsetPx")}),jsxRuntime.jsx("input",{type:"number",style:g,value:b,onChange:t=>L(Number(t.target.value)||0)})]}),jsxRuntime.jsxs("div",{style:a,children:[jsxRuntime.jsx("label",{style:n,children:i("dialogs.imagePosition.relativeTo")}),jsxRuntime.jsxs("select",{style:p,value:y,onChange:t=>B(t.target.value),children:[jsxRuntime.jsx("option",{value:"page",children:i("dialogs.imagePosition.relativeOptions.page")}),jsxRuntime.jsx("option",{value:"column",children:i("dialogs.imagePosition.relativeOptions.column")}),jsxRuntime.jsx("option",{value:"margin",children:i("dialogs.imagePosition.relativeOptions.margin")}),jsxRuntime.jsx("option",{value:"character",children:i("dialogs.imagePosition.relativeOptions.character")})]})]})]}),jsxRuntime.jsxs("div",{style:D,children:[jsxRuntime.jsx("div",{style:k,children:i("dialogs.imagePosition.vertical")}),jsxRuntime.jsxs("div",{style:a,children:[jsxRuntime.jsx("label",{style:n,children:i("dialogs.imagePosition.position")}),jsxRuntime.jsxs("select",{style:p,value:m,onChange:t=>P(t.target.value),children:[jsxRuntime.jsx("option",{value:"align",children:i("dialogs.imagePosition.alignment")}),jsxRuntime.jsx("option",{value:"offset",children:i("dialogs.imagePosition.offset")})]})]}),m==="align"?jsxRuntime.jsxs("div",{style:a,children:[jsxRuntime.jsx("label",{style:n,children:i("dialogs.imagePosition.align")}),jsxRuntime.jsxs("select",{style:p,value:h,onChange:t=>N(t.target.value),children:[jsxRuntime.jsx("option",{value:"top",children:i("dialogs.imagePosition.alignOptions.top")}),jsxRuntime.jsx("option",{value:"center",children:i("dialogs.imagePosition.alignOptions.center")}),jsxRuntime.jsx("option",{value:"bottom",children:i("dialogs.imagePosition.alignOptions.bottom")})]})]}):jsxRuntime.jsxs("div",{style:a,children:[jsxRuntime.jsx("label",{style:n,children:i("dialogs.imagePosition.offsetPx")}),jsxRuntime.jsx("input",{type:"number",style:g,value:x,onChange:t=>E(Number(t.target.value)||0)})]}),jsxRuntime.jsxs("div",{style:a,children:[jsxRuntime.jsx("label",{style:n,children:i("dialogs.imagePosition.relativeTo")}),jsxRuntime.jsxs("select",{style:p,value:S,onChange:t=>A(t.target.value),children:[jsxRuntime.jsx("option",{value:"page",children:i("dialogs.imagePosition.relativeOptions.page")}),jsxRuntime.jsx("option",{value:"margin",children:i("dialogs.imagePosition.relativeOptions.margin")}),jsxRuntime.jsx("option",{value:"paragraph",children:i("dialogs.imagePosition.relativeOptions.paragraph")}),jsxRuntime.jsx("option",{value:"line",children:i("dialogs.imagePosition.relativeOptions.line")})]})]})]}),jsxRuntime.jsxs("div",{style:D,children:[jsxRuntime.jsx("div",{style:k,children:"Distance from text (px)"}),jsxRuntime.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8},children:[jsxRuntime.jsxs("div",{style:a,children:[jsxRuntime.jsx("label",{style:{...n,width:45},children:i("dialogs.imagePosition.alignOptions.top")}),jsxRuntime.jsx("input",{type:"number",style:g,min:0,value:C,onChange:t=>H(Number(t.target.value)||0)})]}),jsxRuntime.jsxs("div",{style:a,children:[jsxRuntime.jsx("label",{style:{...n,width:45},children:i("dialogs.imagePosition.alignOptions.bottom")}),jsxRuntime.jsx("input",{type:"number",style:g,min:0,value:O,onChange:t=>M(Number(t.target.value)||0)})]}),jsxRuntime.jsxs("div",{style:a,children:[jsxRuntime.jsx("label",{style:{...n,width:45},children:i("dialogs.imagePosition.alignOptions.left")}),jsxRuntime.jsx("input",{type:"number",style:g,min:0,value:T,onChange:t=>V(Number(t.target.value)||0)})]}),jsxRuntime.jsxs("div",{style:a,children:[jsxRuntime.jsx("label",{style:{...n,width:45},children:i("dialogs.imagePosition.alignOptions.right")}),jsxRuntime.jsx("input",{type:"number",style:g,min:0,value:R,onChange:t=>W(Number(t.target.value)||0)})]})]})]})]}),jsxRuntime.jsxs("div",{style:Y,children:[jsxRuntime.jsx("button",{type:"button",style:q,onClick:r,children:i("common.cancel")}),jsxRuntime.jsx("button",{type:"button",style:{...q,backgroundColor:"var(--doc-primary)",color:"white",borderColor:"var(--doc-primary)"},onClick:w,children:i("common.apply")})]})]})}):null}exports.ImagePositionDialog=tt;
@@ -1 +1 @@
1
- import {b}from'./chunk-GZOCOWWB.mjs';import'./chunk-TAUMSKRE.mjs';import {useState,useEffect,useCallback}from'react';import {jsx,jsxs}from'react/jsx-runtime';var J={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},Q={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:400,maxWidth:480,width:"100%",margin:20},U={padding:"16px 20px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:16,fontWeight:600},X={padding:"16px 20px",display:"flex",flexDirection:"column",gap:16},D={display:"flex",flexDirection:"column",gap:8},k={fontSize:13,fontWeight:600,color:"var(--doc-text)"},a={display:"flex",alignItems:"center",gap:8},n={width:75,fontSize:12,color:"var(--doc-text-muted)"},g={flex:1,padding:"4px 6px",border:"1px solid var(--doc-border)",borderRadius:4,fontSize:12},p={...g},Y={padding:"12px 20px 16px",borderTop:"1px solid var(--doc-border)",display:"flex",justifyContent:"flex-end",gap:8},q={padding:"6px 16px",fontSize:13,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"};function tt({isOpen:f,onClose:r,onApply:z,currentData:s}){let{t:i}=b(),[v,c]=useState("align"),[u,I]=useState("center"),[y,B]=useState("column"),[b$1,L]=useState(0),[m,P]=useState("align"),[h,N]=useState("top"),[S,A]=useState("paragraph"),[x,E]=useState(0),[C,H]=useState(0),[O,M]=useState(0),[T,V]=useState(0),[R,W]=useState(0);useEffect(()=>{if(!f)return;let t=s?.horizontal,d=s?.vertical;t?.align?(c("align"),I(t.align)):t?.posOffset!=null&&(c("offset"),L(t.posOffset)),t?.relativeTo&&B(t.relativeTo),d?.align?(P("align"),N(d.align)):d?.posOffset!=null&&(P("offset"),E(d.posOffset)),d?.relativeTo&&A(d.relativeTo),H(s?.distTop??0),M(s?.distBottom??0),V(s?.distLeft??0),W(s?.distRight??0);},[f,s]);let w=useCallback(()=>{let t={};t.horizontal={relativeTo:y,...v==="align"?{align:u}:{posOffset:b$1}},t.vertical={relativeTo:S,...m==="align"?{align:h}:{posOffset:x}},t.distTop=C,t.distBottom=O,t.distLeft=T,t.distRight=R,z(t),r();},[v,u,y,b$1,m,h,S,x,C,O,T,R,z,r]),F=useCallback(t=>{t.key==="Escape"&&r(),t.key==="Enter"&&w();},[r,w]);return f?jsx("div",{style:J,onClick:r,onKeyDown:F,children:jsxs("div",{style:Q,onClick:t=>t.stopPropagation(),role:"dialog","aria-label":i("dialogs.imagePosition.title"),children:[jsx("div",{style:U,children:i("dialogs.imagePosition.title")}),jsxs("div",{style:X,children:[jsxs("div",{style:D,children:[jsx("div",{style:k,children:i("dialogs.imagePosition.horizontal")}),jsxs("div",{style:a,children:[jsx("label",{style:n,children:i("dialogs.imagePosition.position")}),jsxs("select",{style:p,value:v,onChange:t=>c(t.target.value),children:[jsx("option",{value:"align",children:i("dialogs.imagePosition.alignment")}),jsx("option",{value:"offset",children:i("dialogs.imagePosition.offset")})]})]}),v==="align"?jsxs("div",{style:a,children:[jsx("label",{style:n,children:i("dialogs.imagePosition.align")}),jsxs("select",{style:p,value:u,onChange:t=>I(t.target.value),children:[jsx("option",{value:"left",children:i("dialogs.imagePosition.alignOptions.left")}),jsx("option",{value:"center",children:i("dialogs.imagePosition.alignOptions.center")}),jsx("option",{value:"right",children:i("dialogs.imagePosition.alignOptions.right")})]})]}):jsxs("div",{style:a,children:[jsx("label",{style:n,children:i("dialogs.imagePosition.offsetPx")}),jsx("input",{type:"number",style:g,value:b$1,onChange:t=>L(Number(t.target.value)||0)})]}),jsxs("div",{style:a,children:[jsx("label",{style:n,children:i("dialogs.imagePosition.relativeTo")}),jsxs("select",{style:p,value:y,onChange:t=>B(t.target.value),children:[jsx("option",{value:"page",children:i("dialogs.imagePosition.relativeOptions.page")}),jsx("option",{value:"column",children:i("dialogs.imagePosition.relativeOptions.column")}),jsx("option",{value:"margin",children:i("dialogs.imagePosition.relativeOptions.margin")}),jsx("option",{value:"character",children:i("dialogs.imagePosition.relativeOptions.character")})]})]})]}),jsxs("div",{style:D,children:[jsx("div",{style:k,children:i("dialogs.imagePosition.vertical")}),jsxs("div",{style:a,children:[jsx("label",{style:n,children:i("dialogs.imagePosition.position")}),jsxs("select",{style:p,value:m,onChange:t=>P(t.target.value),children:[jsx("option",{value:"align",children:i("dialogs.imagePosition.alignment")}),jsx("option",{value:"offset",children:i("dialogs.imagePosition.offset")})]})]}),m==="align"?jsxs("div",{style:a,children:[jsx("label",{style:n,children:i("dialogs.imagePosition.align")}),jsxs("select",{style:p,value:h,onChange:t=>N(t.target.value),children:[jsx("option",{value:"top",children:i("dialogs.imagePosition.alignOptions.top")}),jsx("option",{value:"center",children:i("dialogs.imagePosition.alignOptions.center")}),jsx("option",{value:"bottom",children:i("dialogs.imagePosition.alignOptions.bottom")})]})]}):jsxs("div",{style:a,children:[jsx("label",{style:n,children:i("dialogs.imagePosition.offsetPx")}),jsx("input",{type:"number",style:g,value:x,onChange:t=>E(Number(t.target.value)||0)})]}),jsxs("div",{style:a,children:[jsx("label",{style:n,children:i("dialogs.imagePosition.relativeTo")}),jsxs("select",{style:p,value:S,onChange:t=>A(t.target.value),children:[jsx("option",{value:"page",children:i("dialogs.imagePosition.relativeOptions.page")}),jsx("option",{value:"margin",children:i("dialogs.imagePosition.relativeOptions.margin")}),jsx("option",{value:"paragraph",children:i("dialogs.imagePosition.relativeOptions.paragraph")}),jsx("option",{value:"line",children:i("dialogs.imagePosition.relativeOptions.line")})]})]})]}),jsxs("div",{style:D,children:[jsx("div",{style:k,children:"Distance from text (px)"}),jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8},children:[jsxs("div",{style:a,children:[jsx("label",{style:{...n,width:45},children:i("dialogs.imagePosition.alignOptions.top")}),jsx("input",{type:"number",style:g,min:0,value:C,onChange:t=>H(Number(t.target.value)||0)})]}),jsxs("div",{style:a,children:[jsx("label",{style:{...n,width:45},children:i("dialogs.imagePosition.alignOptions.bottom")}),jsx("input",{type:"number",style:g,min:0,value:O,onChange:t=>M(Number(t.target.value)||0)})]}),jsxs("div",{style:a,children:[jsx("label",{style:{...n,width:45},children:i("dialogs.imagePosition.alignOptions.left")}),jsx("input",{type:"number",style:g,min:0,value:T,onChange:t=>V(Number(t.target.value)||0)})]}),jsxs("div",{style:a,children:[jsx("label",{style:{...n,width:45},children:i("dialogs.imagePosition.alignOptions.right")}),jsx("input",{type:"number",style:g,min:0,value:R,onChange:t=>W(Number(t.target.value)||0)})]})]})]})]}),jsxs("div",{style:Y,children:[jsx("button",{type:"button",style:q,onClick:r,children:i("common.cancel")}),jsx("button",{type:"button",style:{...q,backgroundColor:"var(--doc-primary)",color:"white",borderColor:"var(--doc-primary)"},onClick:w,children:i("common.apply")})]})]})}):null}export{tt as ImagePositionDialog};
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 J={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},Q={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:400,maxWidth:480,width:"100%",margin:20},U={padding:"16px 20px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:16,fontWeight:600},X={padding:"16px 20px",display:"flex",flexDirection:"column",gap:16},D={display:"flex",flexDirection:"column",gap:8},k={fontSize:13,fontWeight:600,color:"var(--doc-text)"},a={display:"flex",alignItems:"center",gap:8},n={width:75,fontSize:12,color:"var(--doc-text-muted)"},g={flex:1,padding:"4px 6px",border:"1px solid var(--doc-border)",borderRadius:4,fontSize:12},p={...g},Y={padding:"12px 20px 16px",borderTop:"1px solid var(--doc-border)",display:"flex",justifyContent:"flex-end",gap:8},q={padding:"6px 16px",fontSize:13,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"};function tt({isOpen:f,onClose:r,onApply:z,currentData:s}){let{t:i}=c(),[v,c$1]=useState("align"),[u,I]=useState("center"),[y,B]=useState("column"),[b,L]=useState(0),[m,P]=useState("align"),[h,N]=useState("top"),[S,A]=useState("paragraph"),[x,E]=useState(0),[C,H]=useState(0),[O,M]=useState(0),[T,V]=useState(0),[R,W]=useState(0);useEffect(()=>{if(!f)return;let t=s?.horizontal,d=s?.vertical;t?.align?(c$1("align"),I(t.align)):t?.posOffset!=null&&(c$1("offset"),L(t.posOffset)),t?.relativeTo&&B(t.relativeTo),d?.align?(P("align"),N(d.align)):d?.posOffset!=null&&(P("offset"),E(d.posOffset)),d?.relativeTo&&A(d.relativeTo),H(s?.distTop??0),M(s?.distBottom??0),V(s?.distLeft??0),W(s?.distRight??0);},[f,s]);let w=useCallback(()=>{let t={};t.horizontal={relativeTo:y,...v==="align"?{align:u}:{posOffset:b}},t.vertical={relativeTo:S,...m==="align"?{align:h}:{posOffset:x}},t.distTop=C,t.distBottom=O,t.distLeft=T,t.distRight=R,z(t),r();},[v,u,y,b,m,h,S,x,C,O,T,R,z,r]),F=useCallback(t=>{t.key==="Escape"&&r(),t.key==="Enter"&&w();},[r,w]);return f?jsx("div",{style:J,onClick:r,onKeyDown:F,children:jsxs("div",{style:Q,onClick:t=>t.stopPropagation(),role:"dialog","aria-label":i("dialogs.imagePosition.title"),children:[jsx("div",{style:U,children:i("dialogs.imagePosition.title")}),jsxs("div",{style:X,children:[jsxs("div",{style:D,children:[jsx("div",{style:k,children:i("dialogs.imagePosition.horizontal")}),jsxs("div",{style:a,children:[jsx("label",{style:n,children:i("dialogs.imagePosition.position")}),jsxs("select",{style:p,value:v,onChange:t=>c$1(t.target.value),children:[jsx("option",{value:"align",children:i("dialogs.imagePosition.alignment")}),jsx("option",{value:"offset",children:i("dialogs.imagePosition.offset")})]})]}),v==="align"?jsxs("div",{style:a,children:[jsx("label",{style:n,children:i("dialogs.imagePosition.align")}),jsxs("select",{style:p,value:u,onChange:t=>I(t.target.value),children:[jsx("option",{value:"left",children:i("dialogs.imagePosition.alignOptions.left")}),jsx("option",{value:"center",children:i("dialogs.imagePosition.alignOptions.center")}),jsx("option",{value:"right",children:i("dialogs.imagePosition.alignOptions.right")})]})]}):jsxs("div",{style:a,children:[jsx("label",{style:n,children:i("dialogs.imagePosition.offsetPx")}),jsx("input",{type:"number",style:g,value:b,onChange:t=>L(Number(t.target.value)||0)})]}),jsxs("div",{style:a,children:[jsx("label",{style:n,children:i("dialogs.imagePosition.relativeTo")}),jsxs("select",{style:p,value:y,onChange:t=>B(t.target.value),children:[jsx("option",{value:"page",children:i("dialogs.imagePosition.relativeOptions.page")}),jsx("option",{value:"column",children:i("dialogs.imagePosition.relativeOptions.column")}),jsx("option",{value:"margin",children:i("dialogs.imagePosition.relativeOptions.margin")}),jsx("option",{value:"character",children:i("dialogs.imagePosition.relativeOptions.character")})]})]})]}),jsxs("div",{style:D,children:[jsx("div",{style:k,children:i("dialogs.imagePosition.vertical")}),jsxs("div",{style:a,children:[jsx("label",{style:n,children:i("dialogs.imagePosition.position")}),jsxs("select",{style:p,value:m,onChange:t=>P(t.target.value),children:[jsx("option",{value:"align",children:i("dialogs.imagePosition.alignment")}),jsx("option",{value:"offset",children:i("dialogs.imagePosition.offset")})]})]}),m==="align"?jsxs("div",{style:a,children:[jsx("label",{style:n,children:i("dialogs.imagePosition.align")}),jsxs("select",{style:p,value:h,onChange:t=>N(t.target.value),children:[jsx("option",{value:"top",children:i("dialogs.imagePosition.alignOptions.top")}),jsx("option",{value:"center",children:i("dialogs.imagePosition.alignOptions.center")}),jsx("option",{value:"bottom",children:i("dialogs.imagePosition.alignOptions.bottom")})]})]}):jsxs("div",{style:a,children:[jsx("label",{style:n,children:i("dialogs.imagePosition.offsetPx")}),jsx("input",{type:"number",style:g,value:x,onChange:t=>E(Number(t.target.value)||0)})]}),jsxs("div",{style:a,children:[jsx("label",{style:n,children:i("dialogs.imagePosition.relativeTo")}),jsxs("select",{style:p,value:S,onChange:t=>A(t.target.value),children:[jsx("option",{value:"page",children:i("dialogs.imagePosition.relativeOptions.page")}),jsx("option",{value:"margin",children:i("dialogs.imagePosition.relativeOptions.margin")}),jsx("option",{value:"paragraph",children:i("dialogs.imagePosition.relativeOptions.paragraph")}),jsx("option",{value:"line",children:i("dialogs.imagePosition.relativeOptions.line")})]})]})]}),jsxs("div",{style:D,children:[jsx("div",{style:k,children:"Distance from text (px)"}),jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8},children:[jsxs("div",{style:a,children:[jsx("label",{style:{...n,width:45},children:i("dialogs.imagePosition.alignOptions.top")}),jsx("input",{type:"number",style:g,min:0,value:C,onChange:t=>H(Number(t.target.value)||0)})]}),jsxs("div",{style:a,children:[jsx("label",{style:{...n,width:45},children:i("dialogs.imagePosition.alignOptions.bottom")}),jsx("input",{type:"number",style:g,min:0,value:O,onChange:t=>M(Number(t.target.value)||0)})]}),jsxs("div",{style:a,children:[jsx("label",{style:{...n,width:45},children:i("dialogs.imagePosition.alignOptions.left")}),jsx("input",{type:"number",style:g,min:0,value:T,onChange:t=>V(Number(t.target.value)||0)})]}),jsxs("div",{style:a,children:[jsx("label",{style:{...n,width:45},children:i("dialogs.imagePosition.alignOptions.right")}),jsx("input",{type:"number",style:g,min:0,value:R,onChange:t=>W(Number(t.target.value)||0)})]})]})]})]}),jsxs("div",{style:Y,children:[jsx("button",{type:"button",style:q,onClick:r,children:i("common.cancel")}),jsx("button",{type:"button",style:{...q,backgroundColor:"var(--doc-primary)",color:"white",borderColor:"var(--doc-primary)"},onClick:w,children:i("common.apply")})]})]})}):null}export{tt as ImagePositionDialog};
@@ -0,0 +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 I={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},R={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:380,maxWidth:440,width:"100%",margin:20},D={padding:"16px 20px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:16,fontWeight:600},E={padding:"16px 20px",display:"flex",flexDirection:"column",gap:16},C={display:"flex",flexDirection:"column",gap:8},w={fontSize:13,fontWeight:600,color:"var(--doc-text)"},v={display:"flex",alignItems:"center",gap:8},S={width:60,fontSize:12,color:"var(--doc-text-muted)"},p={flex:1,padding:"4px 6px",border:"1px solid var(--doc-border)",borderRadius:4,fontSize:12},T={...p},B={...p,minHeight:60,resize:"vertical",fontFamily:"inherit"},K={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 F({isOpen:g,onClose:l,onApply:u,currentData:d}){let{t:o}=c(),[y,m]=useState(""),[i,x]=useState(0),[a,c$1]=useState("#000000"),[s,f]=useState("solid");useEffect(()=>{g&&(m(d?.alt??""),x(d?.borderWidth??0),c$1(d?.borderColor??"#000000"),f(d?.borderStyle??"solid"));},[g,d]);let b=useCallback(()=>{u({alt:y||void 0,borderWidth:i>0?i:void 0,borderColor:i>0?a:void 0,borderStyle:i>0?s:void 0}),l();},[y,i,a,s,u,l]),k=useCallback(t=>{t.key==="Escape"&&l(),t.key==="Enter"&&!t.shiftKey&&b();},[l,b]);return g?jsx("div",{style:I,onClick:l,onKeyDown:k,children:jsxs("div",{style:R,onClick:t=>t.stopPropagation(),role:"dialog","aria-label":o("dialogs.imageProperties.title"),children:[jsx("div",{style:D,children:o("dialogs.imageProperties.title")}),jsxs("div",{style:E,children:[jsxs("div",{style:C,children:[jsx("div",{style:w,children:o("dialogs.imageProperties.altText")}),jsx("textarea",{style:B,value:y,onChange:t=>m(t.target.value),placeholder:o("dialogs.imageProperties.altTextPlaceholder")})]}),jsxs("div",{style:C,children:[jsx("div",{style:w,children:o("dialogs.imageProperties.border")}),jsxs("div",{style:v,children:[jsx("label",{style:S,children:o("dialogs.imageProperties.width")}),jsx("input",{type:"number",style:{...p,maxWidth:80},min:0,max:20,step:.5,value:i,onChange:t=>x(Number(t.target.value)||0)}),jsx("span",{style:{fontSize:12,color:"var(--doc-text-muted)"},children:o("common.px")})]}),jsxs("div",{style:v,children:[jsx("label",{style:S,children:o("dialogs.imageProperties.style")}),jsxs("select",{style:T,value:s,onChange:t=>f(t.target.value),children:[jsx("option",{value:"solid",children:o("dialogs.imageProperties.borderStyles.solid")}),jsx("option",{value:"dashed",children:o("dialogs.imageProperties.borderStyles.dashed")}),jsx("option",{value:"dotted",children:o("dialogs.imageProperties.borderStyles.dotted")}),jsx("option",{value:"double",children:o("dialogs.imageProperties.borderStyles.double")}),jsx("option",{value:"groove",children:o("dialogs.imageProperties.borderStyles.groove")}),jsx("option",{value:"ridge",children:o("dialogs.imageProperties.borderStyles.ridge")}),jsx("option",{value:"inset",children:o("dialogs.imageProperties.borderStyles.inset")}),jsx("option",{value:"outset",children:o("dialogs.imageProperties.borderStyles.outset")})]})]}),jsxs("div",{style:v,children:[jsx("label",{style:S,children:o("dialogs.imageProperties.color")}),jsx("input",{type:"color",value:a,onChange:t=>c$1(t.target.value),style:{width:32,height:24,padding:0,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"}}),jsx("input",{type:"text",style:{...p,maxWidth:90},value:a,onChange:t=>c$1(t.target.value)})]}),i>0&&jsx("div",{style:{marginTop:4,padding:8,border:`${i}px ${s} ${a}`,borderRadius:4,fontSize:11,color:"var(--doc-text-muted)",textAlign:"center"},children:o("dialogs.imageProperties.preview")})]})]}),jsxs("div",{style:K,children:[jsx("button",{type:"button",style:W,onClick:l,children:o("common.cancel")}),jsx("button",{type:"button",style:{...W,backgroundColor:"var(--doc-primary)",color:"white",borderColor:"var(--doc-primary)"},onClick:b,children:o("common.apply")})]})]})}):null}export{F as ImagePropertiesDialog};
@@ -1 +1 @@
1
- 'use strict';var chunkQSUPYUOP_js=require('./chunk-QSUPYUOP.js');require('./chunk-H5NTJZO4.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var I={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},R={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:380,maxWidth:440,width:"100%",margin:20},D={padding:"16px 20px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:16,fontWeight:600},E={padding:"16px 20px",display:"flex",flexDirection:"column",gap:16},C={display:"flex",flexDirection:"column",gap:8},w={fontSize:13,fontWeight:600,color:"var(--doc-text)"},v={display:"flex",alignItems:"center",gap:8},S={width:60,fontSize:12,color:"var(--doc-text-muted)"},p={flex:1,padding:"4px 6px",border:"1px solid var(--doc-border)",borderRadius:4,fontSize:12},T={...p},B={...p,minHeight:60,resize:"vertical",fontFamily:"inherit"},K={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 F({isOpen:g,onClose:l,onApply:u,currentData:d}){let{t:o}=chunkQSUPYUOP_js.b(),[y,m]=react.useState(""),[i,x]=react.useState(0),[a,c]=react.useState("#000000"),[s,f]=react.useState("solid");react.useEffect(()=>{g&&(m(d?.alt??""),x(d?.borderWidth??0),c(d?.borderColor??"#000000"),f(d?.borderStyle??"solid"));},[g,d]);let b=react.useCallback(()=>{u({alt:y||void 0,borderWidth:i>0?i:void 0,borderColor:i>0?a:void 0,borderStyle:i>0?s:void 0}),l();},[y,i,a,s,u,l]),k=react.useCallback(t=>{t.key==="Escape"&&l(),t.key==="Enter"&&!t.shiftKey&&b();},[l,b]);return g?jsxRuntime.jsx("div",{style:I,onClick:l,onKeyDown:k,children:jsxRuntime.jsxs("div",{style:R,onClick:t=>t.stopPropagation(),role:"dialog","aria-label":o("dialogs.imageProperties.title"),children:[jsxRuntime.jsx("div",{style:D,children:o("dialogs.imageProperties.title")}),jsxRuntime.jsxs("div",{style:E,children:[jsxRuntime.jsxs("div",{style:C,children:[jsxRuntime.jsx("div",{style:w,children:o("dialogs.imageProperties.altText")}),jsxRuntime.jsx("textarea",{style:B,value:y,onChange:t=>m(t.target.value),placeholder:o("dialogs.imageProperties.altTextPlaceholder")})]}),jsxRuntime.jsxs("div",{style:C,children:[jsxRuntime.jsx("div",{style:w,children:o("dialogs.imageProperties.border")}),jsxRuntime.jsxs("div",{style:v,children:[jsxRuntime.jsx("label",{style:S,children:o("dialogs.imageProperties.width")}),jsxRuntime.jsx("input",{type:"number",style:{...p,maxWidth:80},min:0,max:20,step:.5,value:i,onChange:t=>x(Number(t.target.value)||0)}),jsxRuntime.jsx("span",{style:{fontSize:12,color:"var(--doc-text-muted)"},children:o("common.px")})]}),jsxRuntime.jsxs("div",{style:v,children:[jsxRuntime.jsx("label",{style:S,children:o("dialogs.imageProperties.style")}),jsxRuntime.jsxs("select",{style:T,value:s,onChange:t=>f(t.target.value),children:[jsxRuntime.jsx("option",{value:"solid",children:o("dialogs.imageProperties.borderStyles.solid")}),jsxRuntime.jsx("option",{value:"dashed",children:o("dialogs.imageProperties.borderStyles.dashed")}),jsxRuntime.jsx("option",{value:"dotted",children:o("dialogs.imageProperties.borderStyles.dotted")}),jsxRuntime.jsx("option",{value:"double",children:o("dialogs.imageProperties.borderStyles.double")}),jsxRuntime.jsx("option",{value:"groove",children:o("dialogs.imageProperties.borderStyles.groove")}),jsxRuntime.jsx("option",{value:"ridge",children:o("dialogs.imageProperties.borderStyles.ridge")}),jsxRuntime.jsx("option",{value:"inset",children:o("dialogs.imageProperties.borderStyles.inset")}),jsxRuntime.jsx("option",{value:"outset",children:o("dialogs.imageProperties.borderStyles.outset")})]})]}),jsxRuntime.jsxs("div",{style:v,children:[jsxRuntime.jsx("label",{style:S,children:o("dialogs.imageProperties.color")}),jsxRuntime.jsx("input",{type:"color",value:a,onChange:t=>c(t.target.value),style:{width:32,height:24,padding:0,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"}}),jsxRuntime.jsx("input",{type:"text",style:{...p,maxWidth:90},value:a,onChange:t=>c(t.target.value)})]}),i>0&&jsxRuntime.jsx("div",{style:{marginTop:4,padding:8,border:`${i}px ${s} ${a}`,borderRadius:4,fontSize:11,color:"var(--doc-text-muted)",textAlign:"center"},children:o("dialogs.imageProperties.preview")})]})]}),jsxRuntime.jsxs("div",{style:K,children:[jsxRuntime.jsx("button",{type:"button",style:W,onClick:l,children:o("common.cancel")}),jsxRuntime.jsx("button",{type:"button",style:{...W,backgroundColor:"var(--doc-primary)",color:"white",borderColor:"var(--doc-primary)"},onClick:b,children:o("common.apply")})]})]})}):null}exports.ImagePropertiesDialog=F;
1
+ 'use strict';var chunkWNS2RBQD_js=require('./chunk-WNS2RBQD.js');require('./chunk-H5NTJZO4.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var I={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},R={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:380,maxWidth:440,width:"100%",margin:20},D={padding:"16px 20px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:16,fontWeight:600},E={padding:"16px 20px",display:"flex",flexDirection:"column",gap:16},C={display:"flex",flexDirection:"column",gap:8},w={fontSize:13,fontWeight:600,color:"var(--doc-text)"},v={display:"flex",alignItems:"center",gap:8},S={width:60,fontSize:12,color:"var(--doc-text-muted)"},p={flex:1,padding:"4px 6px",border:"1px solid var(--doc-border)",borderRadius:4,fontSize:12},T={...p},B={...p,minHeight:60,resize:"vertical",fontFamily:"inherit"},K={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 F({isOpen:g,onClose:l,onApply:u,currentData:d}){let{t:o}=chunkWNS2RBQD_js.c(),[y,m]=react.useState(""),[i,x]=react.useState(0),[a,c]=react.useState("#000000"),[s,f]=react.useState("solid");react.useEffect(()=>{g&&(m(d?.alt??""),x(d?.borderWidth??0),c(d?.borderColor??"#000000"),f(d?.borderStyle??"solid"));},[g,d]);let b=react.useCallback(()=>{u({alt:y||void 0,borderWidth:i>0?i:void 0,borderColor:i>0?a:void 0,borderStyle:i>0?s:void 0}),l();},[y,i,a,s,u,l]),k=react.useCallback(t=>{t.key==="Escape"&&l(),t.key==="Enter"&&!t.shiftKey&&b();},[l,b]);return g?jsxRuntime.jsx("div",{style:I,onClick:l,onKeyDown:k,children:jsxRuntime.jsxs("div",{style:R,onClick:t=>t.stopPropagation(),role:"dialog","aria-label":o("dialogs.imageProperties.title"),children:[jsxRuntime.jsx("div",{style:D,children:o("dialogs.imageProperties.title")}),jsxRuntime.jsxs("div",{style:E,children:[jsxRuntime.jsxs("div",{style:C,children:[jsxRuntime.jsx("div",{style:w,children:o("dialogs.imageProperties.altText")}),jsxRuntime.jsx("textarea",{style:B,value:y,onChange:t=>m(t.target.value),placeholder:o("dialogs.imageProperties.altTextPlaceholder")})]}),jsxRuntime.jsxs("div",{style:C,children:[jsxRuntime.jsx("div",{style:w,children:o("dialogs.imageProperties.border")}),jsxRuntime.jsxs("div",{style:v,children:[jsxRuntime.jsx("label",{style:S,children:o("dialogs.imageProperties.width")}),jsxRuntime.jsx("input",{type:"number",style:{...p,maxWidth:80},min:0,max:20,step:.5,value:i,onChange:t=>x(Number(t.target.value)||0)}),jsxRuntime.jsx("span",{style:{fontSize:12,color:"var(--doc-text-muted)"},children:o("common.px")})]}),jsxRuntime.jsxs("div",{style:v,children:[jsxRuntime.jsx("label",{style:S,children:o("dialogs.imageProperties.style")}),jsxRuntime.jsxs("select",{style:T,value:s,onChange:t=>f(t.target.value),children:[jsxRuntime.jsx("option",{value:"solid",children:o("dialogs.imageProperties.borderStyles.solid")}),jsxRuntime.jsx("option",{value:"dashed",children:o("dialogs.imageProperties.borderStyles.dashed")}),jsxRuntime.jsx("option",{value:"dotted",children:o("dialogs.imageProperties.borderStyles.dotted")}),jsxRuntime.jsx("option",{value:"double",children:o("dialogs.imageProperties.borderStyles.double")}),jsxRuntime.jsx("option",{value:"groove",children:o("dialogs.imageProperties.borderStyles.groove")}),jsxRuntime.jsx("option",{value:"ridge",children:o("dialogs.imageProperties.borderStyles.ridge")}),jsxRuntime.jsx("option",{value:"inset",children:o("dialogs.imageProperties.borderStyles.inset")}),jsxRuntime.jsx("option",{value:"outset",children:o("dialogs.imageProperties.borderStyles.outset")})]})]}),jsxRuntime.jsxs("div",{style:v,children:[jsxRuntime.jsx("label",{style:S,children:o("dialogs.imageProperties.color")}),jsxRuntime.jsx("input",{type:"color",value:a,onChange:t=>c(t.target.value),style:{width:32,height:24,padding:0,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"}}),jsxRuntime.jsx("input",{type:"text",style:{...p,maxWidth:90},value:a,onChange:t=>c(t.target.value)})]}),i>0&&jsxRuntime.jsx("div",{style:{marginTop:4,padding:8,border:`${i}px ${s} ${a}`,borderRadius:4,fontSize:11,color:"var(--doc-text-muted)",textAlign:"center"},children:o("dialogs.imageProperties.preview")})]})]}),jsxRuntime.jsxs("div",{style:K,children:[jsxRuntime.jsx("button",{type:"button",style:W,onClick:l,children:o("common.cancel")}),jsxRuntime.jsx("button",{type:"button",style:{...W,backgroundColor:"var(--doc-primary)",color:"white",borderColor:"var(--doc-primary)"},onClick:b,children:o("common.apply")})]})]})}):null}exports.ImagePropertiesDialog=F;
@@ -0,0 +1 @@
1
+ 'use strict';require('./chunk-FXES3YDB.js'),require('./chunk-PBC7XAYZ.js');var chunkWNS2RBQD_js=require('./chunk-WNS2RBQD.js');require('./chunk-AGRIVA4G.js'),require('./chunk-3F52AP2Q.js'),require('./chunk-SNLC6EK2.js'),require('./chunk-MWLHJWB6.js'),require('./chunk-Q7UDQXAF.js'),require('./chunk-YC5KZSYD.js'),require('./chunk-H5NTJZO4.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var E=[{labelKey:"dialogs.pageSetup.pageSizes.letter",width:12240,height:15840},{labelKey:"dialogs.pageSetup.pageSizes.a4",width:11906,height:16838},{labelKey:"dialogs.pageSetup.pageSizes.legal",width:12240,height:20160},{labelKey:"dialogs.pageSetup.pageSizes.a3",width:16838,height:23811},{labelKey:"dialogs.pageSetup.pageSizes.a5",width:8391,height:11906},{labelKey:"dialogs.pageSetup.pageSizes.b5",width:9979,height:14175},{labelKey:"dialogs.pageSetup.pageSizes.executive",width:10440,height:15120}];function f(i){return Math.round(i/1440*100)/100}function x(i){return Math.round(i*1440)}function J(i,l){let b=Math.min(i,l),n=Math.max(i,l);return E.findIndex(a=>Math.abs(a.width-b)<20&&Math.abs(a.height-n)<20)}var O={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},Q={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:400,maxWidth:480,width:"100%",margin:20},V={padding:"16px 20px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:16,fontWeight:600},X={padding:"16px 20px",display:"flex",flexDirection:"column",gap:14},H={fontSize:12,fontWeight:600,color:"var(--doc-text-muted)",textTransform:"uppercase",letterSpacing:"0.5px"},g={display:"flex",alignItems:"center",gap:12},c={width:80,fontSize:13,color:"var(--doc-text-muted)"},y={flex:1,padding:"6px 8px",border:"1px solid var(--doc-border)",borderRadius:4,fontSize:13},N={...y},C={fontSize:11,color:"var(--doc-text-muted)",width:16},Y={padding:"12px 20px 16px",borderTop:"1px solid var(--doc-border)",display:"flex",justifyContent:"flex-end",gap:8},A={padding:"6px 16px",fontSize:13,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"},_=12240,B=15840,p=1440;function ae({isOpen:i,onClose:l,onApply:b,currentProps:n}){let{t:a}=chunkWNS2RBQD_js.c(),[u,h]=react.useState(_),[S,m]=react.useState(B),[r,K]=react.useState("portrait"),[P,M]=react.useState(p),[w,R]=react.useState(p),[z,k]=react.useState(p),[T,D]=react.useState(p);react.useEffect(()=>{if(!i)return;let e=n?.pageWidth||_,s=n?.pageHeight||B,j=n?.orientation||(e>s?"landscape":"portrait");h(e),m(s),K(j),M(n?.marginTop??p),R(n?.marginBottom??p),k(n?.marginLeft??p),D(n?.marginRight??p);},[i,n]);let F=react.useCallback(e=>{if(e<0)return;let s=E[e];r==="landscape"?(h(s.height),m(s.width)):(h(s.width),m(s.height));},[r]),G=react.useCallback(e=>{e!==r&&(K(e),h(S),m(u));},[r,u,S]),I=react.useCallback(()=>{b({pageWidth:u,pageHeight:S,orientation:r,marginTop:P,marginBottom:w,marginLeft:z,marginRight:T}),l();},[u,S,r,P,w,z,T,b,l]),U=react.useCallback(e=>{e.key==="Escape"&&l(),e.key==="Enter"&&I();},[l,I]);if(!i)return null;let W=J(u,S);return jsxRuntime.jsx("div",{style:O,onClick:l,onKeyDown:U,children:jsxRuntime.jsxs("div",{style:Q,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),role:"dialog","aria-label":a("dialogs.pageSetup.title"),children:[jsxRuntime.jsx("div",{style:V,children:a("dialogs.pageSetup.title")}),jsxRuntime.jsxs("div",{style:X,children:[jsxRuntime.jsx("div",{style:H,children:a("dialogs.pageSetup.pageSize")}),jsxRuntime.jsxs("div",{style:g,children:[jsxRuntime.jsx("label",{style:c,children:a("dialogs.pageSetup.sizeLabel")}),jsxRuntime.jsxs("select",{style:N,value:W,onChange:e=>F(Number(e.target.value)),children:[E.map((e,s)=>jsxRuntime.jsx("option",{value:s,children:a(e.labelKey)},e.labelKey)),W<0&&jsxRuntime.jsx("option",{value:-1,children:a("dialogs.pageSetup.custom")})]})]}),jsxRuntime.jsxs("div",{style:g,children:[jsxRuntime.jsx("label",{style:c,children:a("dialogs.pageSetup.orientation")}),jsxRuntime.jsxs("select",{style:N,value:r,onChange:e=>G(e.target.value),children:[jsxRuntime.jsx("option",{value:"portrait",children:a("dialogs.pageSetup.portrait")}),jsxRuntime.jsx("option",{value:"landscape",children:a("dialogs.pageSetup.landscape")})]})]}),jsxRuntime.jsx("div",{style:{...H,marginTop:4},children:a("dialogs.pageSetup.margins")}),jsxRuntime.jsxs("div",{style:g,children:[jsxRuntime.jsx("label",{style:c,children:a("dialogs.pageSetup.top")}),jsxRuntime.jsx("input",{type:"number",style:y,min:0,max:10,step:.1,value:f(P),onChange:e=>M(x(Number(e.target.value)||0))}),jsxRuntime.jsx("span",{style:C,children:"in"})]}),jsxRuntime.jsxs("div",{style:g,children:[jsxRuntime.jsx("label",{style:c,children:a("dialogs.pageSetup.bottom")}),jsxRuntime.jsx("input",{type:"number",style:y,min:0,max:10,step:.1,value:f(w),onChange:e=>R(x(Number(e.target.value)||0))}),jsxRuntime.jsx("span",{style:C,children:"in"})]}),jsxRuntime.jsxs("div",{style:g,children:[jsxRuntime.jsx("label",{style:c,children:a("dialogs.pageSetup.left")}),jsxRuntime.jsx("input",{type:"number",style:y,min:0,max:10,step:.1,value:f(z),onChange:e=>k(x(Number(e.target.value)||0))}),jsxRuntime.jsx("span",{style:C,children:"in"})]}),jsxRuntime.jsxs("div",{style:g,children:[jsxRuntime.jsx("label",{style:c,children:a("dialogs.pageSetup.right")}),jsxRuntime.jsx("input",{type:"number",style:y,min:0,max:10,step:.1,value:f(T),onChange:e=>D(x(Number(e.target.value)||0))}),jsxRuntime.jsx("span",{style:C,children:"in"})]})]}),jsxRuntime.jsxs("div",{style:Y,children:[jsxRuntime.jsx("button",{type:"button",style:A,onClick:l,children:a("common.cancel")}),jsxRuntime.jsx("button",{type:"button",style:{...A,backgroundColor:"var(--doc-primary)",color:"white",borderColor:"var(--doc-primary)"},onClick:I,children:a("common.apply")})]})]})})}exports.PageSetupDialog=ae;
@@ -0,0 +1 @@
1
+ import'./chunk-42O5GXM5.mjs';import'./chunk-BTCQ2QI3.mjs';import {c as c$1}from'./chunk-MGEN6GOE.mjs';import'./chunk-P5FQHIES.mjs';import'./chunk-UXVACQCY.mjs';import'./chunk-CPAYKE6X.mjs';import'./chunk-INTPVEO6.mjs';import'./chunk-54ULJEHM.mjs';import'./chunk-LVGJKS7Y.mjs';import'./chunk-TAUMSKRE.mjs';import {useState,useEffect,useCallback}from'react';import {jsx,jsxs}from'react/jsx-runtime';var E=[{labelKey:"dialogs.pageSetup.pageSizes.letter",width:12240,height:15840},{labelKey:"dialogs.pageSetup.pageSizes.a4",width:11906,height:16838},{labelKey:"dialogs.pageSetup.pageSizes.legal",width:12240,height:20160},{labelKey:"dialogs.pageSetup.pageSizes.a3",width:16838,height:23811},{labelKey:"dialogs.pageSetup.pageSizes.a5",width:8391,height:11906},{labelKey:"dialogs.pageSetup.pageSizes.b5",width:9979,height:14175},{labelKey:"dialogs.pageSetup.pageSizes.executive",width:10440,height:15120}];function f(i){return Math.round(i/1440*100)/100}function x(i){return Math.round(i*1440)}function J(i,l){let b=Math.min(i,l),n=Math.max(i,l);return E.findIndex(a=>Math.abs(a.width-b)<20&&Math.abs(a.height-n)<20)}var O={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},Q={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:400,maxWidth:480,width:"100%",margin:20},V={padding:"16px 20px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:16,fontWeight:600},X={padding:"16px 20px",display:"flex",flexDirection:"column",gap:14},H={fontSize:12,fontWeight:600,color:"var(--doc-text-muted)",textTransform:"uppercase",letterSpacing:"0.5px"},g={display:"flex",alignItems:"center",gap:12},c={width:80,fontSize:13,color:"var(--doc-text-muted)"},y={flex:1,padding:"6px 8px",border:"1px solid var(--doc-border)",borderRadius:4,fontSize:13},N={...y},C={fontSize:11,color:"var(--doc-text-muted)",width:16},Y={padding:"12px 20px 16px",borderTop:"1px solid var(--doc-border)",display:"flex",justifyContent:"flex-end",gap:8},A={padding:"6px 16px",fontSize:13,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"},_=12240,B=15840,p=1440;function ae({isOpen:i,onClose:l,onApply:b,currentProps:n}){let{t:a}=c$1(),[u,h]=useState(_),[S,m]=useState(B),[r,K]=useState("portrait"),[P,M]=useState(p),[w,R]=useState(p),[z,k]=useState(p),[T,D]=useState(p);useEffect(()=>{if(!i)return;let e=n?.pageWidth||_,s=n?.pageHeight||B,j=n?.orientation||(e>s?"landscape":"portrait");h(e),m(s),K(j),M(n?.marginTop??p),R(n?.marginBottom??p),k(n?.marginLeft??p),D(n?.marginRight??p);},[i,n]);let F=useCallback(e=>{if(e<0)return;let s=E[e];r==="landscape"?(h(s.height),m(s.width)):(h(s.width),m(s.height));},[r]),G=useCallback(e=>{e!==r&&(K(e),h(S),m(u));},[r,u,S]),I=useCallback(()=>{b({pageWidth:u,pageHeight:S,orientation:r,marginTop:P,marginBottom:w,marginLeft:z,marginRight:T}),l();},[u,S,r,P,w,z,T,b,l]),U=useCallback(e=>{e.key==="Escape"&&l(),e.key==="Enter"&&I();},[l,I]);if(!i)return null;let W=J(u,S);return jsx("div",{style:O,onClick:l,onKeyDown:U,children:jsxs("div",{style:Q,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),role:"dialog","aria-label":a("dialogs.pageSetup.title"),children:[jsx("div",{style:V,children:a("dialogs.pageSetup.title")}),jsxs("div",{style:X,children:[jsx("div",{style:H,children:a("dialogs.pageSetup.pageSize")}),jsxs("div",{style:g,children:[jsx("label",{style:c,children:a("dialogs.pageSetup.sizeLabel")}),jsxs("select",{style:N,value:W,onChange:e=>F(Number(e.target.value)),children:[E.map((e,s)=>jsx("option",{value:s,children:a(e.labelKey)},e.labelKey)),W<0&&jsx("option",{value:-1,children:a("dialogs.pageSetup.custom")})]})]}),jsxs("div",{style:g,children:[jsx("label",{style:c,children:a("dialogs.pageSetup.orientation")}),jsxs("select",{style:N,value:r,onChange:e=>G(e.target.value),children:[jsx("option",{value:"portrait",children:a("dialogs.pageSetup.portrait")}),jsx("option",{value:"landscape",children:a("dialogs.pageSetup.landscape")})]})]}),jsx("div",{style:{...H,marginTop:4},children:a("dialogs.pageSetup.margins")}),jsxs("div",{style:g,children:[jsx("label",{style:c,children:a("dialogs.pageSetup.top")}),jsx("input",{type:"number",style:y,min:0,max:10,step:.1,value:f(P),onChange:e=>M(x(Number(e.target.value)||0))}),jsx("span",{style:C,children:"in"})]}),jsxs("div",{style:g,children:[jsx("label",{style:c,children:a("dialogs.pageSetup.bottom")}),jsx("input",{type:"number",style:y,min:0,max:10,step:.1,value:f(w),onChange:e=>R(x(Number(e.target.value)||0))}),jsx("span",{style:C,children:"in"})]}),jsxs("div",{style:g,children:[jsx("label",{style:c,children:a("dialogs.pageSetup.left")}),jsx("input",{type:"number",style:y,min:0,max:10,step:.1,value:f(z),onChange:e=>k(x(Number(e.target.value)||0))}),jsx("span",{style:C,children:"in"})]}),jsxs("div",{style:g,children:[jsx("label",{style:c,children:a("dialogs.pageSetup.right")}),jsx("input",{type:"number",style:y,min:0,max:10,step:.1,value:f(T),onChange:e=>D(x(Number(e.target.value)||0))}),jsx("span",{style:C,children:"in"})]})]}),jsxs("div",{style:Y,children:[jsx("button",{type:"button",style:A,onClick:l,children:a("common.cancel")}),jsx("button",{type:"button",style:{...A,backgroundColor:"var(--doc-primary)",color:"white",borderColor:"var(--doc-primary)"},onClick:I,children:a("common.apply")})]})]})})}export{ae as PageSetupDialog};
@@ -0,0 +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;
@@ -0,0 +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 +1 @@
1
- 'use strict';var chunkQSUPYUOP_js=require('./chunk-QSUPYUOP.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}=chunkQSUPYUOP_js.b(),[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 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;
@@ -0,0 +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};