@stll/folio-vue 0.32.1 → 0.33.0

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 (65) hide show
  1. package/dist/FindReplaceDialog-CfcTl2Ra.cjs +1 -0
  2. package/dist/FindReplaceDialog-DEWjhuOw.js +168 -0
  3. package/dist/HorizontalRuler-Cuk0l4Us.cjs +1 -0
  4. package/dist/HorizontalRuler-TM9dg--R.js +341 -0
  5. package/dist/HyperlinkDialog-BEse_y7R.js +175 -0
  6. package/dist/HyperlinkDialog-Cs1y6aol.cjs +1 -0
  7. package/dist/ImagePropertiesDialog-CTbX2GrE.cjs +1 -0
  8. package/dist/ImagePropertiesDialog-mrJ8S3sl.js +186 -0
  9. package/dist/ImageSelectionOverlay-DULrvfOJ.js +386 -0
  10. package/dist/ImageSelectionOverlay-Dr0lg9WZ.cjs +1 -0
  11. package/dist/InsertSymbolDialog-BjB-Q9EO.js +93 -0
  12. package/dist/InsertSymbolDialog-BsjgPYM-.cjs +1 -0
  13. package/dist/PageSetupDialog-CZ5fE9rz.cjs +1 -0
  14. package/dist/PageSetupDialog-DNNSezj3.js +208 -0
  15. package/dist/SetNumberingValueDialog-ClCYr37D.cjs +1 -0
  16. package/dist/SetNumberingValueDialog-CwLHfO7f.js +54 -0
  17. package/dist/SplitCellDialog-Bfuo5WCO.cjs +1 -0
  18. package/dist/SplitCellDialog-HIg4ZEqt.js +1031 -0
  19. package/dist/StylePicker-BnGGlXOX.cjs +4 -0
  20. package/dist/{StylePicker-DmTN56Yg.js → StylePicker-F3cLPvRE.js} +593 -1100
  21. package/dist/TablePropertiesDialog-CRX9Xgdr.js +102 -0
  22. package/dist/TablePropertiesDialog-ClJSuB0F.cjs +1 -0
  23. package/dist/VerticalRuler-D973NTMv.js +178 -0
  24. package/dist/VerticalRuler-DVi2P_TO.cjs +1 -0
  25. package/dist/WatermarkDialog-BYyBTlDK.cjs +1 -0
  26. package/dist/WatermarkDialog-BoAdQ-qK.js +161 -0
  27. package/dist/components/dialogs/recentSymbols.d.ts +7 -0
  28. package/dist/composables/useDocxEditor.d.ts +4 -1
  29. package/dist/composables.cjs +1 -1
  30. package/dist/composables.js +1 -1
  31. package/dist/dialogs.cjs +1 -1
  32. package/dist/dialogs.js +9 -1
  33. package/dist/{SplitCellDialog-BczVYfpm.js → folio-ui-ctJdVP-s.js} +678 -2753
  34. package/dist/folio-ui-u7h3WXUO.cjs +15 -0
  35. package/dist/folio-vue.css +1 -1
  36. package/dist/index.cjs +1 -1
  37. package/dist/index.d.ts +0 -1
  38. package/dist/index.js +1665 -2064
  39. package/dist/messages/ar.cjs +1 -1
  40. package/dist/messages/cs.cjs +1 -1
  41. package/dist/messages/de.cjs +1 -1
  42. package/dist/messages/en.cjs +1 -1
  43. package/dist/messages/es.cjs +1 -1
  44. package/dist/messages/et.cjs +1 -1
  45. package/dist/messages/fr.cjs +1 -1
  46. package/dist/messages/he.cjs +1 -1
  47. package/dist/messages/hi.cjs +1 -1
  48. package/dist/messages/hu.cjs +1 -1
  49. package/dist/messages/lt.cjs +1 -1
  50. package/dist/messages/lv.cjs +1 -1
  51. package/dist/messages/pl.cjs +1 -1
  52. package/dist/messages/pt-BR.cjs +1 -1
  53. package/dist/messages/sk.cjs +1 -1
  54. package/dist/messages/tr.cjs +1 -1
  55. package/dist/messages/zh-CN.cjs +1 -1
  56. package/dist/rolldown-runtime-DbbDpzbe.cjs +1 -0
  57. package/dist/ui.cjs +1 -1
  58. package/dist/ui.js +28 -18
  59. package/dist/{useZoom-1kmdkmJ4.js → useZoom-CX69Me_z.js} +289 -285
  60. package/dist/useZoom-QSSrGY_r.cjs +1 -0
  61. package/package.json +2 -2
  62. package/dist/SplitCellDialog-CrLHwVLc.cjs +0 -15
  63. package/dist/StylePicker-C0iEQnw6.cjs +0 -4
  64. package/dist/rolldown-runtime-5iZMYShA.cjs +0 -1
  65. package/dist/useZoom-Bj5B9uT1.cjs +0 -1
@@ -0,0 +1,1031 @@
1
+ import { S as e, a as t, g as n } from "./folio-ui-ctJdVP-s.js";
2
+ import { Fragment as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createVNode as l, defineComponent as u, normalizeClass as d, normalizeStyle as f, openBlock as p, reactive as m, ref as h, renderList as g, toDisplayString as _, unref as v, vModelCheckbox as y, vModelRadio as b, vModelSelect as x, vModelText as S, watch as C, withCtx as w, withDirectives as T, withKeys as E, withModifiers as D } from "vue";
3
+ import { cssBorderStyle as O } from "@stll/folio-core/utils/borderCss";
4
+ // src/components/tableStylePresets.ts
5
+ var k = (e) => ({
6
+ style: "single",
7
+ size: 4,
8
+ color: { rgb: e }
9
+ }), A = [
10
+ {
11
+ id: "TableNormal",
12
+ name: "Normal Table",
13
+ look: {
14
+ firstRow: !1,
15
+ lastRow: !1,
16
+ noHBand: !0,
17
+ noVBand: !0
18
+ }
19
+ },
20
+ {
21
+ id: "TableGrid",
22
+ name: "Table Grid",
23
+ tableBorders: {
24
+ top: k("000000"),
25
+ bottom: k("000000"),
26
+ left: k("000000"),
27
+ right: k("000000"),
28
+ insideH: k("000000"),
29
+ insideV: k("000000")
30
+ },
31
+ look: {
32
+ firstRow: !1,
33
+ lastRow: !1,
34
+ noHBand: !0,
35
+ noVBand: !0
36
+ }
37
+ },
38
+ {
39
+ id: "TableGridLight",
40
+ name: "Grid Table Light",
41
+ tableBorders: {
42
+ top: k("BFBFBF"),
43
+ bottom: k("BFBFBF"),
44
+ left: k("BFBFBF"),
45
+ right: k("BFBFBF"),
46
+ insideH: k("BFBFBF"),
47
+ insideV: k("BFBFBF")
48
+ },
49
+ look: {
50
+ firstRow: !0,
51
+ lastRow: !1,
52
+ noHBand: !0,
53
+ noVBand: !0
54
+ },
55
+ conditionals: { firstRow: {
56
+ bold: !0,
57
+ borders: { bottom: k("000000") }
58
+ } }
59
+ },
60
+ {
61
+ id: "PlainTable1",
62
+ name: "Plain Table 1",
63
+ tableBorders: {
64
+ top: k("BFBFBF"),
65
+ bottom: k("BFBFBF"),
66
+ insideH: k("BFBFBF")
67
+ },
68
+ look: {
69
+ firstRow: !0,
70
+ lastRow: !1,
71
+ noHBand: !0,
72
+ noVBand: !0
73
+ },
74
+ conditionals: { firstRow: { bold: !0 } }
75
+ },
76
+ {
77
+ id: "PlainTable2",
78
+ name: "Plain Table 2",
79
+ look: {
80
+ firstRow: !0,
81
+ lastRow: !1,
82
+ noHBand: !1,
83
+ noVBand: !0
84
+ },
85
+ conditionals: {
86
+ firstRow: {
87
+ bold: !0,
88
+ borders: { bottom: k("7F7F7F") }
89
+ },
90
+ band1Horz: { backgroundColor: "#F2F2F2" }
91
+ }
92
+ },
93
+ {
94
+ id: "PlainTable3",
95
+ name: "Plain Table 3",
96
+ look: {
97
+ firstRow: !0,
98
+ lastRow: !1,
99
+ noHBand: !1,
100
+ noVBand: !0
101
+ },
102
+ conditionals: {
103
+ firstRow: {
104
+ bold: !0,
105
+ color: "#FFFFFF",
106
+ backgroundColor: "#A5A5A5"
107
+ },
108
+ band1Horz: { backgroundColor: "#E7E7E7" }
109
+ }
110
+ },
111
+ {
112
+ id: "PlainTable4",
113
+ name: "Plain Table 4",
114
+ look: {
115
+ firstRow: !0,
116
+ lastRow: !1,
117
+ noHBand: !1,
118
+ noVBand: !0
119
+ },
120
+ conditionals: {
121
+ firstRow: {
122
+ bold: !0,
123
+ color: "#FFFFFF",
124
+ backgroundColor: "#000000"
125
+ },
126
+ band1Horz: { backgroundColor: "#F2F2F2" }
127
+ }
128
+ },
129
+ {
130
+ id: "GridTable1Light-Accent1",
131
+ name: "Grid Table 1 Light",
132
+ tableBorders: {
133
+ top: k("B4C6E7"),
134
+ bottom: k("B4C6E7"),
135
+ left: k("B4C6E7"),
136
+ right: k("B4C6E7"),
137
+ insideH: k("B4C6E7"),
138
+ insideV: k("B4C6E7")
139
+ },
140
+ look: {
141
+ firstRow: !0,
142
+ lastRow: !1,
143
+ noHBand: !0,
144
+ noVBand: !0
145
+ },
146
+ conditionals: { firstRow: {
147
+ bold: !0,
148
+ borders: { bottom: k("4472C4") }
149
+ } }
150
+ },
151
+ {
152
+ id: "GridTable4-Accent1",
153
+ name: "Grid Table 4 Accent 1",
154
+ tableBorders: {
155
+ top: k("4472C4"),
156
+ bottom: k("4472C4"),
157
+ left: k("4472C4"),
158
+ right: k("4472C4"),
159
+ insideH: k("4472C4"),
160
+ insideV: k("4472C4")
161
+ },
162
+ look: {
163
+ firstRow: !0,
164
+ lastRow: !1,
165
+ noHBand: !1,
166
+ noVBand: !0
167
+ },
168
+ conditionals: {
169
+ firstRow: {
170
+ bold: !0,
171
+ color: "#FFFFFF",
172
+ backgroundColor: "#4472C4"
173
+ },
174
+ band1Horz: { backgroundColor: "#D6E4F0" }
175
+ }
176
+ },
177
+ {
178
+ id: "GridTable5Dark-Accent1",
179
+ name: "Grid Table 5 Dark",
180
+ tableBorders: {
181
+ top: k("FFFFFF"),
182
+ bottom: k("FFFFFF"),
183
+ left: k("FFFFFF"),
184
+ right: k("FFFFFF"),
185
+ insideH: k("FFFFFF"),
186
+ insideV: k("FFFFFF")
187
+ },
188
+ look: {
189
+ firstRow: !0,
190
+ lastRow: !1,
191
+ noHBand: !1,
192
+ noVBand: !0
193
+ },
194
+ conditionals: {
195
+ firstRow: {
196
+ bold: !0,
197
+ color: "#FFFFFF",
198
+ backgroundColor: "#4472C4"
199
+ },
200
+ band1Horz: { backgroundColor: "#D6E4F0" },
201
+ band2Horz: { backgroundColor: "#B4C6E7" }
202
+ }
203
+ },
204
+ {
205
+ id: "ListTable3-Accent2",
206
+ name: "List Table 3 Accent 2",
207
+ tableBorders: {
208
+ top: k("ED7D31"),
209
+ bottom: k("ED7D31")
210
+ },
211
+ look: {
212
+ firstRow: !0,
213
+ lastRow: !1,
214
+ noHBand: !1,
215
+ noVBand: !0
216
+ },
217
+ conditionals: {
218
+ firstRow: {
219
+ bold: !0,
220
+ color: "#FFFFFF",
221
+ backgroundColor: "#ED7D31"
222
+ },
223
+ band1Horz: { backgroundColor: "#FBE4D5" }
224
+ }
225
+ },
226
+ {
227
+ id: "ListTable4-Accent3",
228
+ name: "List Table 4 Accent 3",
229
+ tableBorders: {
230
+ top: k("A5A5A5"),
231
+ bottom: k("A5A5A5"),
232
+ insideH: k("A5A5A5")
233
+ },
234
+ look: {
235
+ firstRow: !0,
236
+ lastRow: !1,
237
+ noHBand: !1,
238
+ noVBand: !0
239
+ },
240
+ conditionals: {
241
+ firstRow: {
242
+ bold: !0,
243
+ color: "#FFFFFF",
244
+ backgroundColor: "#A5A5A5"
245
+ },
246
+ band1Horz: { backgroundColor: "#EDEDED" }
247
+ }
248
+ },
249
+ {
250
+ id: "GridTable4-Accent5",
251
+ name: "Grid Table 4 Accent 5",
252
+ tableBorders: {
253
+ top: k("5B9BD5"),
254
+ bottom: k("5B9BD5"),
255
+ left: k("5B9BD5"),
256
+ right: k("5B9BD5"),
257
+ insideH: k("5B9BD5"),
258
+ insideV: k("5B9BD5")
259
+ },
260
+ look: {
261
+ firstRow: !0,
262
+ lastRow: !1,
263
+ noHBand: !1,
264
+ noVBand: !0
265
+ },
266
+ conditionals: {
267
+ firstRow: {
268
+ bold: !0,
269
+ color: "#FFFFFF",
270
+ backgroundColor: "#5B9BD5"
271
+ },
272
+ band1Horz: { backgroundColor: "#DEEAF6" }
273
+ }
274
+ },
275
+ {
276
+ id: "GridTable4-Accent6",
277
+ name: "Grid Table 4 Accent 6",
278
+ tableBorders: {
279
+ top: k("70AD47"),
280
+ bottom: k("70AD47"),
281
+ left: k("70AD47"),
282
+ right: k("70AD47"),
283
+ insideH: k("70AD47"),
284
+ insideV: k("70AD47")
285
+ },
286
+ look: {
287
+ firstRow: !0,
288
+ lastRow: !1,
289
+ noHBand: !1,
290
+ noVBand: !0
291
+ },
292
+ conditionals: {
293
+ firstRow: {
294
+ bold: !0,
295
+ color: "#FFFFFF",
296
+ backgroundColor: "#70AD47"
297
+ },
298
+ band1Horz: { backgroundColor: "#E2EFDA" }
299
+ }
300
+ }
301
+ ], j = {
302
+ TableNormal: "table.styles.normalTable",
303
+ TableGrid: "table.styles.tableGrid",
304
+ TableGridLight: "table.styles.gridTableLight",
305
+ PlainTable1: "table.styles.plainTable1",
306
+ PlainTable2: "table.styles.plainTable2",
307
+ PlainTable3: "table.styles.plainTable3",
308
+ PlainTable4: "table.styles.plainTable4",
309
+ "GridTable1Light-Accent1": "table.styles.gridTable1Light",
310
+ "GridTable4-Accent1": "table.styles.gridTable4Accent1",
311
+ "GridTable5Dark-Accent1": "table.styles.gridTable5Dark",
312
+ "ListTable3-Accent2": "table.styles.listTable3Accent2",
313
+ "ListTable4-Accent3": "table.styles.listTable4Accent3",
314
+ "GridTable4-Accent5": "table.styles.gridTable4Accent5",
315
+ "GridTable4-Accent6": "table.styles.gridTable4Accent6"
316
+ }, M = 4, N = 3;
317
+ function P(e) {
318
+ let t = e ? O(e.style) : "none";
319
+ return !e || t === "none" ? "none" : `${e.size ? Math.max(1, Math.round(e.size / 8)) : 1}px ${t} ${e.color?.rgb ? `#${e.color.rgb}` : "#000"}`;
320
+ }
321
+ function F(e, t, n, r) {
322
+ return P(e === void 0 ? t ? n ?? r : r : e);
323
+ }
324
+ function I(e, t = M, n = N) {
325
+ let r = e.look ?? {}, i = e.conditionals ?? {}, a = e.tableBorders, o = [], s = 0;
326
+ for (let e = 0; e < t; e++) {
327
+ let c = e === 0 && !!r.firstRow, l = e === t - 1 && !!r.lastRow, u = r.noHBand !== !0, d;
328
+ c ? d = "firstRow" : l ? d = "lastRow" : (u && (d = s % 2 == 0 ? "band1Horz" : "band2Horz"), s++);
329
+ for (let s = 0; s < n; s++) {
330
+ let u = d, f = s === 0 && !!r.firstCol, p = s === n - 1 && !!r.lastCol;
331
+ c && f && i.nwCell ? u = "nwCell" : c && p && i.neCell ? u = "neCell" : l && f && i.swCell ? u = "swCell" : l && p && i.seCell ? u = "seCell" : f ? u = "firstCol" : p && (u = "lastCol");
332
+ let m = u ? i[u] : void 0, h = m?.borders, g = {
333
+ width: "20px",
334
+ height: "10px",
335
+ boxSizing: "border-box",
336
+ backgroundColor: m?.backgroundColor ?? "transparent",
337
+ borderTop: F(h?.top, e > 0, a?.insideH, a?.top),
338
+ borderBottom: F(h?.bottom, e < t - 1, a?.insideH, a?.bottom),
339
+ borderLeft: F(h?.left, s > 0, a?.insideV, a?.left),
340
+ borderRight: F(h?.right, s < n - 1, a?.insideV, a?.right)
341
+ };
342
+ o.push(g);
343
+ }
344
+ }
345
+ return o;
346
+ }
347
+ // src/components/ui/TableStyleGallery.vue?vue&type=script&setup=true&lang.ts
348
+ var L = { class: "tsg" }, ee = { class: "tsg__grid" }, te = ["title", "onMousedown"], ne = { class: "tsg__preview" }, re = { class: "tsg__name" }, R = /*#__PURE__*/ n(/* @__PURE__ */ u({
349
+ __name: "TableStyleGallery",
350
+ props: { currentStyleId: {} },
351
+ emits: ["apply"],
352
+ setup(t) {
353
+ let { t: n } = e(), i = A;
354
+ function a(e) {
355
+ let t = j[e.id];
356
+ return t ? n(t) : e.name;
357
+ }
358
+ return (e, n) => (p(), s("div", L, [c("div", ee, [(p(!0), s(r, null, g(v(i), (n) => (p(), s("button", {
359
+ key: n.id,
360
+ class: d(["tsg__item", { "tsg__item--selected": t.currentStyleId === n.id }]),
361
+ title: a(n),
362
+ onMousedown: D((t) => e.$emit("apply", n.id), ["prevent"])
363
+ }, [c("div", ne, [(p(!0), s(r, null, g(v(I)(n), (e, t) => (p(), s("div", {
364
+ key: t,
365
+ class: "tsg__cell",
366
+ style: f(e)
367
+ }, null, 4))), 128))]), c("span", re, _(a(n)), 1)], 42, te))), 128))])]));
368
+ }
369
+ }), [["__scopeId", "data-v-5db7fd3c"]]), ie = { class: "fnpd-dialog__header" }, ae = { class: "fnpd-dialog__body" }, oe = { class: "fnpd-fieldset" }, se = { class: "fnpd-legend" }, ce = { class: "fnpd-row" }, z = { class: "fnpd-label" }, B = { value: "pageBottom" }, V = { value: "beneathText" }, H = { class: "fnpd-row" }, U = { class: "fnpd-label" }, W = ["value"], G = { class: "fnpd-row" }, le = { class: "fnpd-label" }, ue = { class: "fnpd-row" }, de = { class: "fnpd-label" }, fe = { value: "continuous" }, pe = { value: "eachSect" }, me = { value: "eachPage" }, he = { class: "fnpd-fieldset" }, ge = { class: "fnpd-legend" }, _e = { class: "fnpd-row" }, ve = { class: "fnpd-label" }, ye = { value: "docEnd" }, be = { value: "sectEnd" }, xe = { class: "fnpd-row" }, Se = { class: "fnpd-label" }, Ce = ["value"], we = { class: "fnpd-row" }, Te = { class: "fnpd-label" }, Ee = { class: "fnpd-row" }, De = { class: "fnpd-label" }, Oe = { value: "continuous" }, ke = { value: "eachSect" }, Ae = { class: "fnpd-dialog__footer" }, je = /*#__PURE__*/ n(/* @__PURE__ */ u({
370
+ __name: "FootnotePropertiesDialog",
371
+ props: {
372
+ isOpen: { type: Boolean },
373
+ footnotePr: {},
374
+ endnotePr: {}
375
+ },
376
+ emits: ["close", "apply"],
377
+ setup(n, { emit: o }) {
378
+ let { t: l } = e(), { Dialog: u } = t(), d = n, f = o, m = i(() => [
379
+ {
380
+ value: "decimal",
381
+ label: l("dialogs.footnoteProperties.formats.decimal")
382
+ },
383
+ {
384
+ value: "lowerLetter",
385
+ label: l("dialogs.footnoteProperties.formats.lowerAlpha")
386
+ },
387
+ {
388
+ value: "upperLetter",
389
+ label: l("dialogs.footnoteProperties.formats.upperAlpha")
390
+ },
391
+ {
392
+ value: "lowerRoman",
393
+ label: l("dialogs.footnoteProperties.formats.lowerRoman")
394
+ },
395
+ {
396
+ value: "upperRoman",
397
+ label: l("dialogs.footnoteProperties.formats.upperRoman")
398
+ },
399
+ {
400
+ value: "chicago",
401
+ label: l("dialogs.footnoteProperties.formats.symbols")
402
+ }
403
+ ]), y = h("pageBottom"), b = h("decimal"), E = h(1), D = h("continuous"), O = h("docEnd"), k = h("lowerRoman"), A = h(1), j = h("continuous");
404
+ C(() => d.isOpen, (e) => {
405
+ e && (y.value = d.footnotePr?.position ?? "pageBottom", b.value = d.footnotePr?.numFmt ?? "decimal", E.value = d.footnotePr?.numStart ?? 1, D.value = d.footnotePr?.numRestart ?? "continuous", O.value = d.endnotePr?.position ?? "docEnd", k.value = d.endnotePr?.numFmt ?? "lowerRoman", A.value = d.endnotePr?.numStart ?? 1, j.value = d.endnotePr?.numRestart ?? "continuous");
406
+ });
407
+ function M() {
408
+ f("apply", {
409
+ position: y.value,
410
+ numFmt: b.value,
411
+ numStart: E.value,
412
+ numRestart: D.value
413
+ }, {
414
+ position: O.value,
415
+ numFmt: k.value,
416
+ numStart: A.value,
417
+ numRestart: j.value
418
+ }), f("close");
419
+ }
420
+ return (e, t) => (p(), a(v(u), {
421
+ open: n.isOpen,
422
+ "aria-label": v(l)("dialogs.footnoteProperties.title"),
423
+ style: {
424
+ width: "440px",
425
+ maxWidth: "90vw"
426
+ },
427
+ onClose: t[9] ||= (t) => e.$emit("close")
428
+ }, {
429
+ default: w(() => [
430
+ c("div", ie, _(v(l)("dialogs.footnoteProperties.title")), 1),
431
+ c("div", ae, [c("fieldset", oe, [
432
+ c("legend", se, _(v(l)("dialogs.footnoteProperties.footnotes")), 1),
433
+ c("div", ce, [c("label", z, _(v(l)("dialogs.footnoteProperties.position")), 1), T(c("select", {
434
+ "onUpdate:modelValue": t[0] ||= (e) => y.value = e,
435
+ class: "fnpd-select"
436
+ }, [c("option", B, _(v(l)("dialogs.footnoteProperties.footnotePositions.bottomOfPage")), 1), c("option", V, _(v(l)("dialogs.footnoteProperties.footnotePositions.belowText")), 1)], 512), [[x, y.value]])]),
437
+ c("div", H, [c("label", U, _(v(l)("dialogs.footnoteProperties.numberFormat")), 1), T(c("select", {
438
+ "onUpdate:modelValue": t[1] ||= (e) => b.value = e,
439
+ class: "fnpd-select"
440
+ }, [(p(!0), s(r, null, g(m.value, (e) => (p(), s("option", {
441
+ key: e.value,
442
+ value: e.value
443
+ }, _(e.label), 9, W))), 128))], 512), [[x, b.value]])]),
444
+ c("div", G, [c("label", le, _(v(l)("dialogs.footnoteProperties.startAt")), 1), T(c("input", {
445
+ "onUpdate:modelValue": t[2] ||= (e) => E.value = e,
446
+ type: "number",
447
+ class: "fnpd-input",
448
+ min: "1"
449
+ }, null, 512), [[
450
+ S,
451
+ E.value,
452
+ void 0,
453
+ { number: !0 }
454
+ ]])]),
455
+ c("div", ue, [c("label", de, _(v(l)("dialogs.footnoteProperties.numbering")), 1), T(c("select", {
456
+ "onUpdate:modelValue": t[3] ||= (e) => D.value = e,
457
+ class: "fnpd-select"
458
+ }, [
459
+ c("option", fe, _(v(l)("dialogs.footnoteProperties.numberingOptions.continuous")), 1),
460
+ c("option", pe, _(v(l)("dialogs.footnoteProperties.numberingOptions.restartSection")), 1),
461
+ c("option", me, _(v(l)("dialogs.footnoteProperties.numberingOptions.restartPage")), 1)
462
+ ], 512), [[x, D.value]])])
463
+ ]), c("fieldset", he, [
464
+ c("legend", ge, _(v(l)("dialogs.footnoteProperties.endnotes")), 1),
465
+ c("div", _e, [c("label", ve, _(v(l)("dialogs.footnoteProperties.position")), 1), T(c("select", {
466
+ "onUpdate:modelValue": t[4] ||= (e) => O.value = e,
467
+ class: "fnpd-select"
468
+ }, [c("option", ye, _(v(l)("dialogs.footnoteProperties.endnotePositions.endOfDocument")), 1), c("option", be, _(v(l)("dialogs.footnoteProperties.endnotePositions.endOfSection")), 1)], 512), [[x, O.value]])]),
469
+ c("div", xe, [c("label", Se, _(v(l)("dialogs.footnoteProperties.numberFormat")), 1), T(c("select", {
470
+ "onUpdate:modelValue": t[5] ||= (e) => k.value = e,
471
+ class: "fnpd-select"
472
+ }, [(p(!0), s(r, null, g(m.value, (e) => (p(), s("option", {
473
+ key: e.value,
474
+ value: e.value
475
+ }, _(e.label), 9, Ce))), 128))], 512), [[x, k.value]])]),
476
+ c("div", we, [c("label", Te, _(v(l)("dialogs.footnoteProperties.startAt")), 1), T(c("input", {
477
+ "onUpdate:modelValue": t[6] ||= (e) => A.value = e,
478
+ type: "number",
479
+ class: "fnpd-input",
480
+ min: "1"
481
+ }, null, 512), [[
482
+ S,
483
+ A.value,
484
+ void 0,
485
+ { number: !0 }
486
+ ]])]),
487
+ c("div", Ee, [c("label", De, _(v(l)("dialogs.footnoteProperties.numbering")), 1), T(c("select", {
488
+ "onUpdate:modelValue": t[7] ||= (e) => j.value = e,
489
+ class: "fnpd-select"
490
+ }, [c("option", Oe, _(v(l)("dialogs.footnoteProperties.numberingOptions.continuous")), 1), c("option", ke, _(v(l)("dialogs.footnoteProperties.numberingOptions.restartSection")), 1)], 512), [[x, j.value]])])
491
+ ])]),
492
+ c("div", Ae, [c("button", {
493
+ class: "fnpd-btn",
494
+ onClick: t[8] ||= (t) => e.$emit("close")
495
+ }, _(v(l)("common.cancel")), 1), c("button", {
496
+ class: "fnpd-btn fnpd-btn--primary",
497
+ onClick: M
498
+ }, _(v(l)("common.apply")), 1)])
499
+ ]),
500
+ _: 1
501
+ }, 8, ["open", "aria-label"]));
502
+ }
503
+ }), [["__scopeId", "data-v-93b3bef4"]]), Me = { class: "dialog__body" }, Ne = { class: "field" }, Pe = ["accept"], Fe = { class: "field" }, Ie = ["placeholder"], Le = { class: "grid" }, Re = { class: "field" }, ze = { class: "field" }, Be = { class: "dialog__footer" }, Ve = ["disabled"], He = /*#__PURE__*/ n(/* @__PURE__ */ u({
504
+ __name: "InsertImageDialog",
505
+ props: {
506
+ isOpen: { type: Boolean },
507
+ accept: { default: "image/png,image/jpeg,image/gif,image/webp" }
508
+ },
509
+ emits: ["close", "insert"],
510
+ setup(e, { emit: n }) {
511
+ let { Dialog: r } = t(), i = e, o = n, s = h(null), l = h(""), u = h(""), d = h("");
512
+ C(() => i.isOpen, (e) => {
513
+ e && (s.value = null, l.value = "", u.value = "", d.value = "");
514
+ });
515
+ function f(e) {
516
+ let t = e.target instanceof HTMLInputElement ? e.target : null;
517
+ s.value = t?.files?.[0] ?? null;
518
+ }
519
+ function m() {
520
+ if (!s.value) return;
521
+ let e = g(u.value), t = g(d.value);
522
+ o("insert", {
523
+ file: s.value,
524
+ ...l.value.trim() ? { alt: l.value.trim() } : {},
525
+ ...e ? { width: e } : {},
526
+ ...t ? { height: t } : {}
527
+ }), o("close");
528
+ }
529
+ function g(e) {
530
+ let t = Number(e);
531
+ return Number.isFinite(t) && t > 0 ? t : void 0;
532
+ }
533
+ return (t, n) => (p(), a(v(r), {
534
+ open: e.isOpen,
535
+ "aria-label": "Insert Image",
536
+ style: {
537
+ minWidth: "360px",
538
+ maxWidth: "520px",
539
+ width: "100%"
540
+ },
541
+ onClose: n[4] ||= (e) => t.$emit("close")
542
+ }, {
543
+ default: w(() => [
544
+ n[9] ||= c("div", { class: "dialog__header" }, "Insert Image", -1),
545
+ c("div", Me, [
546
+ c("label", Ne, [n[5] ||= c("span", { class: "field__label" }, "Image file", -1), c("input", {
547
+ class: "field__input",
548
+ type: "file",
549
+ accept: e.accept,
550
+ onChange: f
551
+ }, null, 40, Pe)]),
552
+ c("label", Fe, [n[6] ||= c("span", { class: "field__label" }, "Alt text", -1), T(c("input", {
553
+ "onUpdate:modelValue": n[0] ||= (e) => l.value = e,
554
+ class: "field__input",
555
+ placeholder: s.value?.name ?? ""
556
+ }, null, 8, Ie), [[S, l.value]])]),
557
+ c("div", Le, [c("label", Re, [n[7] ||= c("span", { class: "field__label" }, "Width", -1), T(c("input", {
558
+ "onUpdate:modelValue": n[1] ||= (e) => u.value = e,
559
+ class: "field__input",
560
+ min: "1",
561
+ placeholder: "Auto",
562
+ type: "number"
563
+ }, null, 512), [[S, u.value]])]), c("label", ze, [n[8] ||= c("span", { class: "field__label" }, "Height", -1), T(c("input", {
564
+ "onUpdate:modelValue": n[2] ||= (e) => d.value = e,
565
+ class: "field__input",
566
+ min: "1",
567
+ placeholder: "Auto",
568
+ type: "number"
569
+ }, null, 512), [[S, d.value]])])])
570
+ ]),
571
+ c("div", Be, [c("button", {
572
+ class: "dialog__btn",
573
+ onClick: n[3] ||= (e) => t.$emit("close")
574
+ }, "Cancel"), c("button", {
575
+ class: "dialog__btn dialog__btn--primary",
576
+ disabled: !s.value,
577
+ onClick: m
578
+ }, " Insert ", 8, Ve)])
579
+ ]),
580
+ _: 1
581
+ }, 8, ["open"]));
582
+ }
583
+ }), [["__scopeId", "data-v-bb3a51b6"]]), Ue = { class: "ipd-dialog__header" }, We = { class: "ipd-dialog__body" }, Ge = { class: "ipd-fieldset" }, Ke = { class: "ipd-legend" }, qe = { class: "ipd-row" }, Je = { value: "align" }, Ye = { value: "offset" }, Xe = {
584
+ key: 0,
585
+ class: "ipd-row"
586
+ }, Ze = { class: "ipd-label" }, Qe = { value: "left" }, $e = { value: "center" }, et = { value: "right" }, tt = {
587
+ key: 1,
588
+ class: "ipd-row"
589
+ }, nt = { class: "ipd-label" }, rt = { class: "ipd-row" }, it = { class: "ipd-label" }, at = { value: "page" }, ot = { value: "column" }, st = { value: "margin" }, ct = { value: "character" }, lt = { class: "ipd-fieldset" }, ut = { class: "ipd-legend" }, dt = { class: "ipd-row" }, ft = { value: "align" }, pt = { value: "offset" }, mt = {
590
+ key: 0,
591
+ class: "ipd-row"
592
+ }, ht = { class: "ipd-label" }, gt = { value: "top" }, _t = { value: "center" }, vt = { value: "bottom" }, yt = {
593
+ key: 1,
594
+ class: "ipd-row"
595
+ }, bt = { class: "ipd-label" }, xt = { class: "ipd-row" }, St = { class: "ipd-label" }, Ct = { value: "page" }, wt = { value: "margin" }, Tt = { value: "paragraph" }, Et = { value: "line" }, Dt = { class: "ipd-fieldset" }, Ot = { class: "ipd-row" }, kt = { class: "ipd-label" }, At = {
596
+ class: "ipd-label",
597
+ style: { width: "60px" }
598
+ }, jt = { class: "ipd-row" }, Mt = { class: "ipd-label" }, Nt = {
599
+ class: "ipd-label",
600
+ style: { width: "60px" }
601
+ }, Pt = { class: "ipd-dialog__footer" }, Ft = /*#__PURE__*/ n(/* @__PURE__ */ u({
602
+ __name: "ImagePositionDialog",
603
+ props: {
604
+ isOpen: { type: Boolean },
605
+ currentData: {}
606
+ },
607
+ emits: ["close", "apply"],
608
+ setup(n, { emit: r }) {
609
+ let { t: i } = e(), { Dialog: o } = t(), l = n, u = r, d = h("align"), f = h("left"), m = h(0), g = h("column"), y = h("align"), b = h("top"), E = h(0), D = h("paragraph"), O = h(0), k = h(0), A = h(0), j = h(0);
610
+ C(() => l.isOpen, (e) => {
611
+ if (!e) return;
612
+ let t = l.currentData;
613
+ t?.horizontal?.align ? (d.value = "align", f.value = t.horizontal.align) : t?.horizontal?.posOffset != null && (d.value = "offset", m.value = t.horizontal.posOffset), g.value = t?.horizontal?.relativeTo ?? "column", t?.vertical?.align ? (y.value = "align", b.value = t.vertical.align) : t?.vertical?.posOffset != null && (y.value = "offset", E.value = t.vertical.posOffset), D.value = t?.vertical?.relativeTo ?? "paragraph", O.value = t?.distTop ?? 0, k.value = t?.distBottom ?? 0, A.value = t?.distLeft ?? 0, j.value = t?.distRight ?? 0;
614
+ });
615
+ function M() {
616
+ let e = {
617
+ horizontal: {
618
+ relativeTo: g.value,
619
+ ...d.value === "align" ? { align: f.value } : { posOffset: m.value }
620
+ },
621
+ vertical: {
622
+ relativeTo: D.value,
623
+ ...y.value === "align" ? { align: b.value } : { posOffset: E.value }
624
+ },
625
+ distTop: O.value,
626
+ distBottom: k.value,
627
+ distLeft: A.value,
628
+ distRight: j.value
629
+ };
630
+ u("apply", e), u("close");
631
+ }
632
+ return (e, t) => (p(), a(v(o), {
633
+ open: n.isOpen,
634
+ "aria-label": v(i)("dialogs.imagePosition.title"),
635
+ style: {
636
+ width: "420px",
637
+ maxWidth: "90vw"
638
+ },
639
+ onClose: t[13] ||= (t) => e.$emit("close")
640
+ }, {
641
+ default: w(() => [
642
+ c("div", Ue, _(v(i)("dialogs.imagePosition.title")), 1),
643
+ c("div", We, [
644
+ c("fieldset", Ge, [
645
+ c("legend", Ke, _(v(i)("dialogs.imagePosition.horizontal")), 1),
646
+ c("div", qe, [t[14] ||= c("label", { class: "ipd-label" }, "Mode", -1), T(c("select", {
647
+ "onUpdate:modelValue": t[0] ||= (e) => d.value = e,
648
+ class: "ipd-select"
649
+ }, [c("option", Je, _(v(i)("dialogs.imagePosition.alignment")), 1), c("option", Ye, _(v(i)("dialogs.imagePosition.offset")), 1)], 512), [[x, d.value]])]),
650
+ d.value === "align" ? (p(), s("div", Xe, [c("label", Ze, _(v(i)("dialogs.imagePosition.align")), 1), T(c("select", {
651
+ "onUpdate:modelValue": t[1] ||= (e) => f.value = e,
652
+ class: "ipd-select"
653
+ }, [
654
+ c("option", Qe, _(v(i)("dialogs.imagePosition.alignOptions.left")), 1),
655
+ c("option", $e, _(v(i)("dialogs.imagePosition.alignOptions.center")), 1),
656
+ c("option", et, _(v(i)("dialogs.imagePosition.alignOptions.right")), 1)
657
+ ], 512), [[x, f.value]])])) : (p(), s("div", tt, [c("label", nt, _(v(i)("dialogs.imagePosition.offsetPx")), 1), T(c("input", {
658
+ "onUpdate:modelValue": t[2] ||= (e) => m.value = e,
659
+ type: "number",
660
+ class: "ipd-input"
661
+ }, null, 512), [[
662
+ S,
663
+ m.value,
664
+ void 0,
665
+ { number: !0 }
666
+ ]])])),
667
+ c("div", rt, [c("label", it, _(v(i)("dialogs.imagePosition.relativeTo")), 1), T(c("select", {
668
+ "onUpdate:modelValue": t[3] ||= (e) => g.value = e,
669
+ class: "ipd-select"
670
+ }, [
671
+ c("option", at, _(v(i)("dialogs.imagePosition.relativeOptions.page")), 1),
672
+ c("option", ot, _(v(i)("dialogs.imagePosition.relativeOptions.column")), 1),
673
+ c("option", st, _(v(i)("dialogs.imagePosition.relativeOptions.margin")), 1),
674
+ c("option", ct, _(v(i)("dialogs.imagePosition.relativeOptions.character")), 1)
675
+ ], 512), [[x, g.value]])])
676
+ ]),
677
+ c("fieldset", lt, [
678
+ c("legend", ut, _(v(i)("dialogs.imagePosition.vertical")), 1),
679
+ c("div", dt, [t[15] ||= c("label", { class: "ipd-label" }, "Mode", -1), T(c("select", {
680
+ "onUpdate:modelValue": t[4] ||= (e) => y.value = e,
681
+ class: "ipd-select"
682
+ }, [c("option", ft, _(v(i)("dialogs.imagePosition.alignment")), 1), c("option", pt, _(v(i)("dialogs.imagePosition.offset")), 1)], 512), [[x, y.value]])]),
683
+ y.value === "align" ? (p(), s("div", mt, [c("label", ht, _(v(i)("dialogs.imagePosition.align")), 1), T(c("select", {
684
+ "onUpdate:modelValue": t[5] ||= (e) => b.value = e,
685
+ class: "ipd-select"
686
+ }, [
687
+ c("option", gt, _(v(i)("dialogs.imagePosition.alignOptions.top")), 1),
688
+ c("option", _t, _(v(i)("dialogs.imagePosition.alignOptions.center")), 1),
689
+ c("option", vt, _(v(i)("dialogs.imagePosition.alignOptions.bottom")), 1)
690
+ ], 512), [[x, b.value]])])) : (p(), s("div", yt, [c("label", bt, _(v(i)("dialogs.imagePosition.offsetPx")), 1), T(c("input", {
691
+ "onUpdate:modelValue": t[6] ||= (e) => E.value = e,
692
+ type: "number",
693
+ class: "ipd-input"
694
+ }, null, 512), [[
695
+ S,
696
+ E.value,
697
+ void 0,
698
+ { number: !0 }
699
+ ]])])),
700
+ c("div", xt, [c("label", St, _(v(i)("dialogs.imagePosition.relativeTo")), 1), T(c("select", {
701
+ "onUpdate:modelValue": t[7] ||= (e) => D.value = e,
702
+ class: "ipd-select"
703
+ }, [
704
+ c("option", Ct, _(v(i)("dialogs.imagePosition.relativeOptions.page")), 1),
705
+ c("option", wt, _(v(i)("dialogs.imagePosition.relativeOptions.margin")), 1),
706
+ c("option", Tt, _(v(i)("dialogs.imagePosition.relativeOptions.paragraph")), 1),
707
+ c("option", Et, _(v(i)("dialogs.imagePosition.relativeOptions.line")), 1)
708
+ ], 512), [[x, D.value]])])
709
+ ]),
710
+ c("fieldset", Dt, [
711
+ t[16] ||= c("legend", { class: "ipd-legend" }, "Distance from text (px)", -1),
712
+ c("div", Ot, [
713
+ c("label", kt, _(v(i)("dialogs.imagePosition.alignOptions.top")), 1),
714
+ T(c("input", {
715
+ "onUpdate:modelValue": t[8] ||= (e) => O.value = e,
716
+ type: "number",
717
+ class: "ipd-input",
718
+ min: "0"
719
+ }, null, 512), [[
720
+ S,
721
+ O.value,
722
+ void 0,
723
+ { number: !0 }
724
+ ]]),
725
+ c("label", At, _(v(i)("dialogs.imagePosition.alignOptions.bottom")), 1),
726
+ T(c("input", {
727
+ "onUpdate:modelValue": t[9] ||= (e) => k.value = e,
728
+ type: "number",
729
+ class: "ipd-input",
730
+ min: "0"
731
+ }, null, 512), [[
732
+ S,
733
+ k.value,
734
+ void 0,
735
+ { number: !0 }
736
+ ]])
737
+ ]),
738
+ c("div", jt, [
739
+ c("label", Mt, _(v(i)("dialogs.imagePosition.alignOptions.left")), 1),
740
+ T(c("input", {
741
+ "onUpdate:modelValue": t[10] ||= (e) => A.value = e,
742
+ type: "number",
743
+ class: "ipd-input",
744
+ min: "0"
745
+ }, null, 512), [[
746
+ S,
747
+ A.value,
748
+ void 0,
749
+ { number: !0 }
750
+ ]]),
751
+ c("label", Nt, _(v(i)("dialogs.imagePosition.alignOptions.right")), 1),
752
+ T(c("input", {
753
+ "onUpdate:modelValue": t[11] ||= (e) => j.value = e,
754
+ type: "number",
755
+ class: "ipd-input",
756
+ min: "0"
757
+ }, null, 512), [[
758
+ S,
759
+ j.value,
760
+ void 0,
761
+ { number: !0 }
762
+ ]])
763
+ ])
764
+ ])
765
+ ]),
766
+ c("div", Pt, [c("button", {
767
+ class: "ipd-btn",
768
+ onClick: t[12] ||= (t) => e.$emit("close")
769
+ }, _(v(i)("common.cancel")), 1), c("button", {
770
+ class: "ipd-btn ipd-btn--primary",
771
+ onClick: M
772
+ }, _(v(i)("common.apply")), 1)])
773
+ ]),
774
+ _: 1
775
+ }, 8, ["open", "aria-label"]));
776
+ }
777
+ }), [["__scopeId", "data-v-55f53deb"]]), K = m({
778
+ rows: 3,
779
+ cols: 3
780
+ }), It = { class: "dialog__header" }, Lt = { class: "dialog__title" }, Rt = ["title"], zt = { class: "dialog__body" }, Bt = ["aria-label"], Vt = ["onMouseenter", "onMousedown"], Ht = { class: "table-grid__label" }, Ut = { class: "dialog__separator" }, Wt = { class: "table-manual" }, Gt = { class: "table-manual__field" }, Kt = { class: "table-manual__field" }, qt = { class: "table-options" }, Jt = { class: "table-options__radio" }, Yt = { class: "table-options__radio" }, Xt = { class: "dialog__separator" }, Zt = { class: "dialog__footer" }, Qt = ["disabled"], $t = 8, en = 10, q = 1, J = 100, Y = 1, X = 20, tn = /*#__PURE__*/ n(/* @__PURE__ */ u({
781
+ __name: "InsertTableDialog",
782
+ props: { isOpen: { type: Boolean } },
783
+ emits: ["close", "insert"],
784
+ setup(t, { emit: n }) {
785
+ let { t: a } = e(), u = t, f = n, m = h(0), y = h(0), x = h(K.rows), w = h(K.cols), E = h("fixed"), O = h(null);
786
+ C(() => u.isOpen, (e) => {
787
+ e && (x.value = K.rows, w.value = K.cols, m.value = 0, y.value = 0);
788
+ });
789
+ let k = i(() => Number.parseInt(String(x.value), 10)), A = i(() => Number.parseInt(String(w.value), 10)), j = i(() => Number.isFinite(k.value) && k.value >= q && k.value <= J), M = i(() => Number.isFinite(A.value) && A.value >= Y && A.value <= X), N = i(() => j.value && M.value);
790
+ function P() {
791
+ f("close");
792
+ }
793
+ function F(e, t) {
794
+ m.value = e, y.value = t, x.value = e, w.value = t;
795
+ }
796
+ function I(e) {
797
+ e.key === "Escape" ? P() : e.key === "Enter" && (e.preventDefault(), L());
798
+ }
799
+ function L() {
800
+ if (!N.value) return;
801
+ let e = Math.min(Math.max(q, k.value), J), t = Math.min(Math.max(Y, A.value), X);
802
+ K.rows = e, K.cols = t, f("insert", {
803
+ rows: e,
804
+ cols: t,
805
+ autofit: E.value === "autofit",
806
+ styleId: O.value
807
+ }), P();
808
+ }
809
+ return (e, n) => t.isOpen ? (p(), s("div", {
810
+ key: 0,
811
+ class: "dialog-overlay",
812
+ onMousedown: D(P, ["self"])
813
+ }, [c("div", {
814
+ class: "dialog",
815
+ onMousedown: n[7] ||= D(() => {}, ["stop"]),
816
+ onKeydown: D(I, ["stop"])
817
+ }, [
818
+ c("div", It, [c("span", Lt, _(v(a)("dialogs.insertTable.title")), 1), c("button", {
819
+ class: "dialog__close",
820
+ title: v(a)("common.closeDialog"),
821
+ onClick: P
822
+ }, " ✕ ", 8, Rt)]),
823
+ c("div", zt, [
824
+ c("div", {
825
+ class: "table-grid",
826
+ "aria-label": v(a)("dialogs.insertTable.sizeSelector"),
827
+ onMouseleave: n[0] ||= (e) => {
828
+ m.value = 0, y.value = 0;
829
+ }
830
+ }, [(p(), s(r, null, g($t, (e) => c("div", {
831
+ key: e,
832
+ class: "table-grid__row"
833
+ }, [(p(), s(r, null, g(en, (t) => c("div", {
834
+ key: t,
835
+ class: d(["table-grid__cell", { highlight: e <= m.value && t <= y.value }]),
836
+ onMouseenter: (n) => {
837
+ m.value = e, y.value = t;
838
+ },
839
+ onMousedown: D((n) => F(e, t), ["prevent"])
840
+ }, null, 42, Vt)), 64))])), 64))], 40, Bt),
841
+ c("div", Ht, _(m.value > 0 ? v(a)("dialogs.insertTable.tableSize", {
842
+ cols: y.value,
843
+ rows: m.value
844
+ }) : v(a)("dialogs.insertTable.hoverToSelect")), 1),
845
+ c("div", Ut, [c("span", null, _(v(a)("dialogs.insertTable.orSpecifySize")), 1)]),
846
+ c("div", Wt, [c("label", Gt, [c("span", null, _(v(a)("dialogs.insertTable.rowsLabel")), 1), T(c("input", {
847
+ "onUpdate:modelValue": n[1] ||= (e) => x.value = e,
848
+ type: "number",
849
+ min: q,
850
+ max: J,
851
+ class: d(["table-manual__input", { "table-manual__input--invalid": !j.value }])
852
+ }, null, 2), [[S, x.value]])]), c("label", Kt, [c("span", null, _(v(a)("dialogs.insertTable.columnsLabel")), 1), T(c("input", {
853
+ "onUpdate:modelValue": n[2] ||= (e) => w.value = e,
854
+ type: "number",
855
+ min: Y,
856
+ max: X,
857
+ class: d(["table-manual__input", { "table-manual__input--invalid": !M.value }])
858
+ }, null, 2), [[S, w.value]])])]),
859
+ c("div", { class: d(["table-manual__hint", { "table-manual__hint--error": !N.value }]) }, _(v(a)("dialogs.insertTable.validationHint", {
860
+ minRows: q,
861
+ maxRows: J,
862
+ minCols: Y,
863
+ maxCols: X
864
+ })), 3),
865
+ c("fieldset", qt, [
866
+ c("legend", null, _(v(a)("dialogs.insertTable.columnWidthLabel")), 1),
867
+ c("label", Jt, [T(c("input", {
868
+ type: "radio",
869
+ value: "fixed",
870
+ "onUpdate:modelValue": n[3] ||= (e) => E.value = e
871
+ }, null, 512), [[b, E.value]]), c("span", null, _(v(a)("dialogs.insertTable.fixedWidth")), 1)]),
872
+ c("label", Yt, [T(c("input", {
873
+ type: "radio",
874
+ value: "autofit",
875
+ "onUpdate:modelValue": n[4] ||= (e) => E.value = e
876
+ }, null, 512), [[b, E.value]]), c("span", null, _(v(a)("dialogs.insertTable.autofit")), 1)])
877
+ ]),
878
+ c("div", Xt, [c("span", null, _(v(a)("dialogs.insertTable.style")), 1)]),
879
+ l(R, {
880
+ "current-style-id": O.value,
881
+ onApply: n[5] ||= (e) => O.value = e
882
+ }, null, 8, ["current-style-id"])
883
+ ]),
884
+ c("div", Zt, [c("button", {
885
+ class: "dialog__btn",
886
+ onMousedown: D(P, ["prevent"])
887
+ }, _(v(a)("common.cancel")), 33), c("button", {
888
+ class: "dialog__btn dialog__btn--primary",
889
+ disabled: !N.value,
890
+ onMousedown: n[6] ||= D((e) => L(), ["prevent"])
891
+ }, _(v(a)("dialogs.insertTable.insertButton")), 41, Qt)])
892
+ ], 32)], 32)) : o("", !0);
893
+ }
894
+ }), [["__scopeId", "data-v-5aff406f"]]), nn = { class: "dialog__body" }, Z = { class: "options" }, rn = ["value"], an = { class: "option__body" }, on = { class: "option__label" }, sn = { class: "option__description" }, cn = { class: "dialog__footer" }, ln = /*#__PURE__*/ n(/* @__PURE__ */ u({
895
+ __name: "PasteSpecialDialog",
896
+ props: {
897
+ isOpen: { type: Boolean },
898
+ defaultMode: { default: "plainText" }
899
+ },
900
+ emits: ["close", "paste"],
901
+ setup(e, { emit: n }) {
902
+ let { Dialog: i } = t(), o = [
903
+ {
904
+ value: "keepFormatting",
905
+ label: "Keep source formatting",
906
+ description: "Preserve styles, links, and inline formatting from the clipboard."
907
+ },
908
+ {
909
+ value: "mergeFormatting",
910
+ label: "Merge formatting",
911
+ description: "Keep useful inline formatting while matching the destination paragraph."
912
+ },
913
+ {
914
+ value: "plainText",
915
+ label: "Unformatted text",
916
+ description: "Paste text only and use the destination formatting."
917
+ }
918
+ ], l = e, u = n, d = h(l.defaultMode);
919
+ C(() => l.isOpen, (e) => {
920
+ e && (d.value = l.defaultMode);
921
+ });
922
+ function f() {
923
+ u("paste", d.value), u("close");
924
+ }
925
+ return (t, n) => (p(), a(v(i), {
926
+ open: e.isOpen,
927
+ "aria-label": "Paste Special",
928
+ style: {
929
+ minWidth: "360px",
930
+ maxWidth: "520px",
931
+ width: "100%"
932
+ },
933
+ onClose: n[2] ||= (e) => t.$emit("close")
934
+ }, {
935
+ default: w(() => [
936
+ n[4] ||= c("div", { class: "dialog__header" }, "Paste Special", -1),
937
+ c("div", nn, [c("fieldset", Z, [n[3] ||= c("legend", { class: "options__legend" }, "Paste mode", -1), (p(), s(r, null, g(o, (e) => c("label", {
938
+ key: e.value,
939
+ class: "option"
940
+ }, [T(c("input", {
941
+ "onUpdate:modelValue": n[0] ||= (e) => d.value = e,
942
+ type: "radio",
943
+ value: e.value
944
+ }, null, 8, rn), [[b, d.value]]), c("span", an, [c("span", on, _(e.label), 1), c("span", sn, _(e.description), 1)])])), 64))])]),
945
+ c("div", cn, [c("button", {
946
+ class: "dialog__btn",
947
+ onClick: n[1] ||= (e) => t.$emit("close")
948
+ }, "Cancel"), c("button", {
949
+ class: "dialog__btn dialog__btn--primary",
950
+ onClick: f
951
+ }, " Paste ")])
952
+ ]),
953
+ _: 1
954
+ }, 8, ["open"]));
955
+ }
956
+ }), [["__scopeId", "data-v-b3987471"]]), un = { class: "dialog__body" }, dn = { class: "grid" }, fn = { class: "field" }, pn = { class: "field" }, mn = { class: "check" }, hn = { class: "dialog__footer" }, gn = ["disabled"], Q = 1, $ = 63, _n = /*#__PURE__*/ n(/* @__PURE__ */ u({
957
+ __name: "SplitCellDialog",
958
+ props: {
959
+ isOpen: { type: Boolean },
960
+ defaultRows: { default: 1 },
961
+ defaultColumns: { default: 2 }
962
+ },
963
+ emits: ["close", "split"],
964
+ setup(e, { emit: n }) {
965
+ let { Dialog: r } = t(), o = e, s = n, l = h(o.defaultRows), u = h(o.defaultColumns), d = h(!1), f = i(() => b(l.value)), m = i(() => b(u.value)), g = i(() => f.value > 1 || m.value > 1);
966
+ C(() => o.isOpen, (e) => {
967
+ e && (l.value = o.defaultRows, u.value = o.defaultColumns, d.value = !1);
968
+ });
969
+ function _() {
970
+ g.value && (s("split", {
971
+ rows: f.value,
972
+ columns: m.value,
973
+ mergeBeforeSplit: d.value
974
+ }), s("close"));
975
+ }
976
+ function b(e) {
977
+ return Math.min($, Math.max(Q, Math.trunc(e)));
978
+ }
979
+ return (t, n) => (p(), a(v(r), {
980
+ open: e.isOpen,
981
+ "aria-label": "Split Cell",
982
+ style: {
983
+ minWidth: "360px",
984
+ maxWidth: "520px",
985
+ width: "100%"
986
+ },
987
+ onClose: n[4] ||= (e) => t.$emit("close"),
988
+ onKeydown: E(_, ["enter"])
989
+ }, {
990
+ default: w(() => [
991
+ n[8] ||= c("div", { class: "dialog__header" }, "Split Cell", -1),
992
+ c("div", un, [c("div", dn, [c("label", fn, [n[5] ||= c("span", { class: "field__label" }, "Columns", -1), T(c("input", {
993
+ "onUpdate:modelValue": n[0] ||= (e) => u.value = e,
994
+ class: "field__input",
995
+ max: $,
996
+ min: Q,
997
+ type: "number"
998
+ }, null, 512), [[
999
+ S,
1000
+ u.value,
1001
+ void 0,
1002
+ { number: !0 }
1003
+ ]])]), c("label", pn, [n[6] ||= c("span", { class: "field__label" }, "Rows", -1), T(c("input", {
1004
+ "onUpdate:modelValue": n[1] ||= (e) => l.value = e,
1005
+ class: "field__input",
1006
+ max: $,
1007
+ min: Q,
1008
+ type: "number"
1009
+ }, null, 512), [[
1010
+ S,
1011
+ l.value,
1012
+ void 0,
1013
+ { number: !0 }
1014
+ ]])])]), c("label", mn, [T(c("input", {
1015
+ "onUpdate:modelValue": n[2] ||= (e) => d.value = e,
1016
+ type: "checkbox"
1017
+ }, null, 512), [[y, d.value]]), n[7] ||= c("span", null, "Merge selected cells before splitting", -1)])]),
1018
+ c("div", hn, [c("button", {
1019
+ class: "dialog__btn",
1020
+ onClick: n[3] ||= (e) => t.$emit("close")
1021
+ }, "Cancel"), c("button", {
1022
+ class: "dialog__btn dialog__btn--primary",
1023
+ disabled: !g.value,
1024
+ onClick: _
1025
+ }, " Split ", 8, gn)])
1026
+ ]),
1027
+ _: 1
1028
+ }, 8, ["open"]));
1029
+ }
1030
+ }), [["__scopeId", "data-v-022ada6a"]]);
1031
+ export { He as a, Ft as i, ln as n, je as o, tn as r, R as s, _n as t };