@stll/folio-react 0.6.0 → 0.7.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 (30) hide show
  1. package/dist/{CommentsSidebar-_utmEkA9.js → CommentsSidebar-B8X5a8JW.js} +126 -129
  2. package/dist/{FindReplaceDialog-DLdBekSR.js → FindReplaceDialog-Bx7QaFQ_.js} +23 -18
  3. package/dist/FootnotePropertiesDialog-2lmpg9m8.js +646 -0
  4. package/dist/ImagePositionDialog-D3MileYL.js +842 -0
  5. package/dist/ImagePropertiesDialog-CzK8HCaW.js +465 -0
  6. package/dist/InsertSymbolDialog-Df9dyLvn.js +376 -0
  7. package/dist/PageSetupDialog-PSs9YdPb.js +684 -0
  8. package/dist/TablePropertiesDialog-PQxKKM0Y.js +344 -0
  9. package/dist/{TextContextMenu-CG0V37wi.js → TextContextMenu-Ci7-M4oU.js} +199 -79
  10. package/dist/compat/eigenpal.d.ts +1 -1
  11. package/dist/compat/eigenpal.js +89 -17
  12. package/dist/dialogChrome-BoGYPgeu.js +26 -0
  13. package/dist/{dialogs-j7qyw17x.d.ts → dialogs-DK8OVUT_.d.ts} +13 -1
  14. package/dist/{dialogs-CzvXYJyG.js → dialogs-DsHnfN0g.js} +508 -316
  15. package/dist/dialogs.d.ts +2 -2
  16. package/dist/dialogs.js +9 -8
  17. package/dist/editor.css +1 -1
  18. package/dist/folio-ui-C-85DSuK.js +1011 -0
  19. package/dist/index.d.ts +5 -4
  20. package/dist/index.js +12 -11
  21. package/dist/{renderAsync-B7UJsZye.d.ts → renderAsync-ChQI9UJG.d.ts} +11 -3
  22. package/dist/{renderAsync-CwHTsxBN.js → renderAsync-evdyE_GW.js} +5593 -3256
  23. package/dist/standalone.css +1 -1
  24. package/package.json +8 -6
  25. package/dist/FootnotePropertiesDialog-CUjq9c6H.js +0 -267
  26. package/dist/ImagePositionDialog-BMuO9rLT.js +0 -395
  27. package/dist/ImagePropertiesDialog-C8iEgdmN.js +0 -198
  28. package/dist/PageSetupDialog-BKsSMCGb.js +0 -312
  29. package/dist/TablePropertiesDialog-Dw8gvL78.js +0 -159
  30. package/dist/useFindReplace-BPBpMWS9.js +0 -842
@@ -0,0 +1,842 @@
1
+ import { t as __exportAll } from "./rolldown-runtime-BBjsoOtd.js";
2
+ import { r as useFolioUI } from "./folio-ui-C-85DSuK.js";
3
+ import { u as useCloseOnDialogOpenChange } from "./dialogChrome-BoGYPgeu.js";
4
+ import { c } from "react-compiler-runtime";
5
+ import { useEffect, useId, useState } from "react";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ //#region src/components/dialogs/ImagePositionDialog.tsx
8
+ /**
9
+ * Image Position Dialog
10
+ *
11
+ * Modal for editing image positioning settings:
12
+ * - Horizontal: alignment or offset, relative to page/column/margin/paragraph
13
+ * - Vertical: alignment or offset, relative to page/margin/paragraph/line
14
+ * - Distance from text (top/bottom/left/right)
15
+ */
16
+ var ImagePositionDialog_exports = /* @__PURE__ */ __exportAll({ ImagePositionDialog: () => ImagePositionDialog });
17
+ function ImagePositionDialog(t0) {
18
+ const $ = c(180);
19
+ const { isOpen, onClose, onApply, currentData } = t0;
20
+ const { Root: Dialog, Portal: DialogPortal, Backdrop: DialogBackdrop, Popup: DialogPopup, Title: DialogTitle, Close: DialogClose } = useFolioUI().Dialog;
21
+ const handleOpenChange = useCloseOnDialogOpenChange(onClose);
22
+ const id = useId();
23
+ const [hMode, setHMode] = useState("align");
24
+ const [hAlign, setHAlign] = useState("center");
25
+ const [hRelativeTo, setHRelativeTo] = useState("column");
26
+ const [hOffset, setHOffset] = useState(0);
27
+ const [vMode, setVMode] = useState("align");
28
+ const [vAlign, setVAlign] = useState("top");
29
+ const [vRelativeTo, setVRelativeTo] = useState("paragraph");
30
+ const [vOffset, setVOffset] = useState(0);
31
+ const [distTop, setDistTop] = useState(0);
32
+ const [distBottom, setDistBottom] = useState(0);
33
+ const [distLeft, setDistLeft] = useState(0);
34
+ const [distRight, setDistRight] = useState(0);
35
+ let t1;
36
+ if ($[0] !== currentData?.distBottom || $[1] !== currentData?.distLeft || $[2] !== currentData?.distRight || $[3] !== currentData?.distTop || $[4] !== currentData?.horizontal || $[5] !== currentData?.vertical || $[6] !== isOpen) {
37
+ t1 = () => {
38
+ if (!isOpen) return;
39
+ const h = currentData?.horizontal;
40
+ const v = currentData?.vertical;
41
+ if (h?.align) {
42
+ setHMode("align");
43
+ setHAlign(h.align);
44
+ } else if (h?.posOffset !== void 0) {
45
+ setHMode("offset");
46
+ setHOffset(h.posOffset);
47
+ }
48
+ if (h?.relativeTo) setHRelativeTo(h.relativeTo);
49
+ if (v?.align) {
50
+ setVMode("align");
51
+ setVAlign(v.align);
52
+ } else if (v?.posOffset !== void 0) {
53
+ setVMode("offset");
54
+ setVOffset(v.posOffset);
55
+ }
56
+ if (v?.relativeTo) setVRelativeTo(v.relativeTo);
57
+ setDistTop(currentData?.distTop ?? 0);
58
+ setDistBottom(currentData?.distBottom ?? 0);
59
+ setDistLeft(currentData?.distLeft ?? 0);
60
+ setDistRight(currentData?.distRight ?? 0);
61
+ };
62
+ $[0] = currentData?.distBottom;
63
+ $[1] = currentData?.distLeft;
64
+ $[2] = currentData?.distRight;
65
+ $[3] = currentData?.distTop;
66
+ $[4] = currentData?.horizontal;
67
+ $[5] = currentData?.vertical;
68
+ $[6] = isOpen;
69
+ $[7] = t1;
70
+ } else t1 = $[7];
71
+ let t2;
72
+ if ($[8] !== currentData || $[9] !== isOpen) {
73
+ t2 = [isOpen, currentData];
74
+ $[8] = currentData;
75
+ $[9] = isOpen;
76
+ $[10] = t2;
77
+ } else t2 = $[10];
78
+ useEffect(t1, t2);
79
+ let t3;
80
+ if ($[11] !== distBottom || $[12] !== distLeft || $[13] !== distRight || $[14] !== distTop || $[15] !== hAlign || $[16] !== hMode || $[17] !== hOffset || $[18] !== hRelativeTo || $[19] !== onApply || $[20] !== onClose || $[21] !== vAlign || $[22] !== vMode || $[23] !== vOffset || $[24] !== vRelativeTo) {
81
+ t3 = () => {
82
+ const data = {};
83
+ data.horizontal = {
84
+ relativeTo: hRelativeTo,
85
+ ...hMode === "align" ? { align: hAlign } : { posOffset: hOffset }
86
+ };
87
+ data.vertical = {
88
+ relativeTo: vRelativeTo,
89
+ ...vMode === "align" ? { align: vAlign } : { posOffset: vOffset }
90
+ };
91
+ data.distTop = distTop;
92
+ data.distBottom = distBottom;
93
+ data.distLeft = distLeft;
94
+ data.distRight = distRight;
95
+ onApply(data);
96
+ onClose();
97
+ };
98
+ $[11] = distBottom;
99
+ $[12] = distLeft;
100
+ $[13] = distRight;
101
+ $[14] = distTop;
102
+ $[15] = hAlign;
103
+ $[16] = hMode;
104
+ $[17] = hOffset;
105
+ $[18] = hRelativeTo;
106
+ $[19] = onApply;
107
+ $[20] = onClose;
108
+ $[21] = vAlign;
109
+ $[22] = vMode;
110
+ $[23] = vOffset;
111
+ $[24] = vRelativeTo;
112
+ $[25] = t3;
113
+ } else t3 = $[25];
114
+ const handleApply = t3;
115
+ const t4 = `${id}-img-pos-h-mode`;
116
+ const t5 = `${id}-img-pos-h-align`;
117
+ const t6 = `${id}-img-pos-h-offset`;
118
+ const t7 = `${id}-img-pos-h-rel`;
119
+ const t8 = `${id}-img-pos-v-mode`;
120
+ const t9 = `${id}-img-pos-v-align`;
121
+ const t10 = `${id}-img-pos-v-offset`;
122
+ const t11 = `${id}-img-pos-v-rel`;
123
+ const t12 = `${id}-img-pos-dist-top`;
124
+ const t13 = `${id}-img-pos-dist-bottom`;
125
+ const t14 = `${id}-img-pos-dist-left`;
126
+ const t15 = `${id}-img-pos-dist-right`;
127
+ let t16;
128
+ if ($[26] !== t10 || $[27] !== t11 || $[28] !== t12 || $[29] !== t13 || $[30] !== t14 || $[31] !== t15 || $[32] !== t4 || $[33] !== t5 || $[34] !== t6 || $[35] !== t7 || $[36] !== t8 || $[37] !== t9) {
129
+ t16 = {
130
+ hMode: t4,
131
+ hAlign: t5,
132
+ hOffset: t6,
133
+ hRelativeTo: t7,
134
+ vMode: t8,
135
+ vAlign: t9,
136
+ vOffset: t10,
137
+ vRelativeTo: t11,
138
+ distTop: t12,
139
+ distBottom: t13,
140
+ distLeft: t14,
141
+ distRight: t15
142
+ };
143
+ $[26] = t10;
144
+ $[27] = t11;
145
+ $[28] = t12;
146
+ $[29] = t13;
147
+ $[30] = t14;
148
+ $[31] = t15;
149
+ $[32] = t4;
150
+ $[33] = t5;
151
+ $[34] = t6;
152
+ $[35] = t7;
153
+ $[36] = t8;
154
+ $[37] = t9;
155
+ $[38] = t16;
156
+ } else t16 = $[38];
157
+ const fieldIds = t16;
158
+ let t17;
159
+ if ($[39] !== DialogBackdrop) {
160
+ t17 = /* @__PURE__ */ jsx(DialogBackdrop, { className: "fixed inset-0 z-[10000] bg-black/50" });
161
+ $[39] = DialogBackdrop;
162
+ $[40] = t17;
163
+ } else t17 = $[40];
164
+ let t18;
165
+ if ($[41] !== DialogTitle) {
166
+ t18 = /* @__PURE__ */ jsx(DialogTitle, {
167
+ className: "border-b px-5 py-3 text-base font-semibold",
168
+ children: "Image Position"
169
+ });
170
+ $[41] = DialogTitle;
171
+ $[42] = t18;
172
+ } else t18 = $[42];
173
+ let t19;
174
+ if ($[43] === Symbol.for("react.memo_cache_sentinel")) {
175
+ t19 = /* @__PURE__ */ jsx("div", {
176
+ className: "text-foreground text-[13px] font-semibold",
177
+ children: "Horizontal"
178
+ });
179
+ $[43] = t19;
180
+ } else t19 = $[43];
181
+ let t20;
182
+ if ($[44] !== fieldIds.hMode) {
183
+ t20 = /* @__PURE__ */ jsx("label", {
184
+ className: "w-[75px] text-muted-foreground text-xs",
185
+ htmlFor: fieldIds.hMode,
186
+ children: "Position"
187
+ });
188
+ $[44] = fieldIds.hMode;
189
+ $[45] = t20;
190
+ } else t20 = $[45];
191
+ let t21;
192
+ let t22;
193
+ let t23;
194
+ if ($[46] === Symbol.for("react.memo_cache_sentinel")) {
195
+ t21 = (e) => setHMode(e.target.value);
196
+ t22 = /* @__PURE__ */ jsx("option", {
197
+ value: "align",
198
+ children: "Alignment"
199
+ });
200
+ t23 = /* @__PURE__ */ jsx("option", {
201
+ value: "offset",
202
+ children: "Offset"
203
+ });
204
+ $[46] = t21;
205
+ $[47] = t22;
206
+ $[48] = t23;
207
+ } else {
208
+ t21 = $[46];
209
+ t22 = $[47];
210
+ t23 = $[48];
211
+ }
212
+ let t24;
213
+ if ($[49] !== fieldIds.hMode || $[50] !== hMode) {
214
+ t24 = /* @__PURE__ */ jsxs("select", {
215
+ className: "border-input bg-background text-foreground flex-1 rounded border px-1.5 py-1 text-xs outline-none",
216
+ id: fieldIds.hMode,
217
+ value: hMode,
218
+ onChange: t21,
219
+ children: [t22, t23]
220
+ });
221
+ $[49] = fieldIds.hMode;
222
+ $[50] = hMode;
223
+ $[51] = t24;
224
+ } else t24 = $[51];
225
+ let t25;
226
+ if ($[52] !== t20 || $[53] !== t24) {
227
+ t25 = /* @__PURE__ */ jsxs("div", {
228
+ className: "flex items-center gap-2",
229
+ children: [t20, t24]
230
+ });
231
+ $[52] = t20;
232
+ $[53] = t24;
233
+ $[54] = t25;
234
+ } else t25 = $[54];
235
+ let t26;
236
+ if ($[55] !== fieldIds.hAlign || $[56] !== fieldIds.hOffset || $[57] !== hAlign || $[58] !== hMode || $[59] !== hOffset) {
237
+ t26 = hMode === "align" ? /* @__PURE__ */ jsxs("div", {
238
+ className: "flex items-center gap-2",
239
+ children: [/* @__PURE__ */ jsx("label", {
240
+ className: "w-[75px] text-muted-foreground text-xs",
241
+ htmlFor: fieldIds.hAlign,
242
+ children: "Align"
243
+ }), /* @__PURE__ */ jsxs("select", {
244
+ className: "border-input bg-background text-foreground flex-1 rounded border px-1.5 py-1 text-xs outline-none",
245
+ id: fieldIds.hAlign,
246
+ value: hAlign,
247
+ onChange: (e_0) => setHAlign(e_0.target.value),
248
+ children: [
249
+ /* @__PURE__ */ jsx("option", {
250
+ value: "left",
251
+ children: "Left"
252
+ }),
253
+ /* @__PURE__ */ jsx("option", {
254
+ value: "center",
255
+ children: "Center"
256
+ }),
257
+ /* @__PURE__ */ jsx("option", {
258
+ value: "right",
259
+ children: "Right"
260
+ })
261
+ ]
262
+ })]
263
+ }) : /* @__PURE__ */ jsxs("div", {
264
+ className: "flex items-center gap-2",
265
+ children: [/* @__PURE__ */ jsx("label", {
266
+ className: "w-[75px] text-muted-foreground text-xs",
267
+ htmlFor: fieldIds.hOffset,
268
+ children: "Offset (px)"
269
+ }), /* @__PURE__ */ jsx("input", {
270
+ className: "border-input bg-background text-foreground flex-1 rounded border px-1.5 py-1 text-xs outline-none",
271
+ id: fieldIds.hOffset,
272
+ type: "number",
273
+ value: hOffset,
274
+ onChange: (e_1) => setHOffset(Number(e_1.target.value) || 0)
275
+ })]
276
+ });
277
+ $[55] = fieldIds.hAlign;
278
+ $[56] = fieldIds.hOffset;
279
+ $[57] = hAlign;
280
+ $[58] = hMode;
281
+ $[59] = hOffset;
282
+ $[60] = t26;
283
+ } else t26 = $[60];
284
+ let t27;
285
+ if ($[61] !== fieldIds.hRelativeTo) {
286
+ t27 = /* @__PURE__ */ jsx("label", {
287
+ className: "w-[75px] text-muted-foreground text-xs",
288
+ htmlFor: fieldIds.hRelativeTo,
289
+ children: "Relative to"
290
+ });
291
+ $[61] = fieldIds.hRelativeTo;
292
+ $[62] = t27;
293
+ } else t27 = $[62];
294
+ let t28;
295
+ let t29;
296
+ let t30;
297
+ let t31;
298
+ let t32;
299
+ if ($[63] === Symbol.for("react.memo_cache_sentinel")) {
300
+ t28 = (e_2) => setHRelativeTo(e_2.target.value);
301
+ t29 = /* @__PURE__ */ jsx("option", {
302
+ value: "page",
303
+ children: "Page"
304
+ });
305
+ t30 = /* @__PURE__ */ jsx("option", {
306
+ value: "column",
307
+ children: "Column"
308
+ });
309
+ t31 = /* @__PURE__ */ jsx("option", {
310
+ value: "margin",
311
+ children: "Margin"
312
+ });
313
+ t32 = /* @__PURE__ */ jsx("option", {
314
+ value: "character",
315
+ children: "Character"
316
+ });
317
+ $[63] = t28;
318
+ $[64] = t29;
319
+ $[65] = t30;
320
+ $[66] = t31;
321
+ $[67] = t32;
322
+ } else {
323
+ t28 = $[63];
324
+ t29 = $[64];
325
+ t30 = $[65];
326
+ t31 = $[66];
327
+ t32 = $[67];
328
+ }
329
+ let t33;
330
+ if ($[68] !== fieldIds.hRelativeTo || $[69] !== hRelativeTo) {
331
+ t33 = /* @__PURE__ */ jsxs("select", {
332
+ className: "border-input bg-background text-foreground flex-1 rounded border px-1.5 py-1 text-xs outline-none",
333
+ id: fieldIds.hRelativeTo,
334
+ value: hRelativeTo,
335
+ onChange: t28,
336
+ children: [
337
+ t29,
338
+ t30,
339
+ t31,
340
+ t32
341
+ ]
342
+ });
343
+ $[68] = fieldIds.hRelativeTo;
344
+ $[69] = hRelativeTo;
345
+ $[70] = t33;
346
+ } else t33 = $[70];
347
+ let t34;
348
+ if ($[71] !== t27 || $[72] !== t33) {
349
+ t34 = /* @__PURE__ */ jsxs("div", {
350
+ className: "flex items-center gap-2",
351
+ children: [t27, t33]
352
+ });
353
+ $[71] = t27;
354
+ $[72] = t33;
355
+ $[73] = t34;
356
+ } else t34 = $[73];
357
+ let t35;
358
+ if ($[74] !== t25 || $[75] !== t26 || $[76] !== t34) {
359
+ t35 = /* @__PURE__ */ jsxs("div", {
360
+ className: "flex flex-col gap-2",
361
+ children: [
362
+ t19,
363
+ t25,
364
+ t26,
365
+ t34
366
+ ]
367
+ });
368
+ $[74] = t25;
369
+ $[75] = t26;
370
+ $[76] = t34;
371
+ $[77] = t35;
372
+ } else t35 = $[77];
373
+ let t36;
374
+ if ($[78] === Symbol.for("react.memo_cache_sentinel")) {
375
+ t36 = /* @__PURE__ */ jsx("div", {
376
+ className: "text-foreground text-[13px] font-semibold",
377
+ children: "Vertical"
378
+ });
379
+ $[78] = t36;
380
+ } else t36 = $[78];
381
+ let t37;
382
+ if ($[79] !== fieldIds.vMode) {
383
+ t37 = /* @__PURE__ */ jsx("label", {
384
+ className: "w-[75px] text-muted-foreground text-xs",
385
+ htmlFor: fieldIds.vMode,
386
+ children: "Position"
387
+ });
388
+ $[79] = fieldIds.vMode;
389
+ $[80] = t37;
390
+ } else t37 = $[80];
391
+ let t38;
392
+ let t39;
393
+ let t40;
394
+ if ($[81] === Symbol.for("react.memo_cache_sentinel")) {
395
+ t38 = (e_3) => setVMode(e_3.target.value);
396
+ t39 = /* @__PURE__ */ jsx("option", {
397
+ value: "align",
398
+ children: "Alignment"
399
+ });
400
+ t40 = /* @__PURE__ */ jsx("option", {
401
+ value: "offset",
402
+ children: "Offset"
403
+ });
404
+ $[81] = t38;
405
+ $[82] = t39;
406
+ $[83] = t40;
407
+ } else {
408
+ t38 = $[81];
409
+ t39 = $[82];
410
+ t40 = $[83];
411
+ }
412
+ let t41;
413
+ if ($[84] !== fieldIds.vMode || $[85] !== vMode) {
414
+ t41 = /* @__PURE__ */ jsxs("select", {
415
+ className: "border-input bg-background text-foreground flex-1 rounded border px-1.5 py-1 text-xs outline-none",
416
+ id: fieldIds.vMode,
417
+ value: vMode,
418
+ onChange: t38,
419
+ children: [t39, t40]
420
+ });
421
+ $[84] = fieldIds.vMode;
422
+ $[85] = vMode;
423
+ $[86] = t41;
424
+ } else t41 = $[86];
425
+ let t42;
426
+ if ($[87] !== t37 || $[88] !== t41) {
427
+ t42 = /* @__PURE__ */ jsxs("div", {
428
+ className: "flex items-center gap-2",
429
+ children: [t37, t41]
430
+ });
431
+ $[87] = t37;
432
+ $[88] = t41;
433
+ $[89] = t42;
434
+ } else t42 = $[89];
435
+ let t43;
436
+ if ($[90] !== fieldIds.vAlign || $[91] !== fieldIds.vOffset || $[92] !== vAlign || $[93] !== vMode || $[94] !== vOffset) {
437
+ t43 = vMode === "align" ? /* @__PURE__ */ jsxs("div", {
438
+ className: "flex items-center gap-2",
439
+ children: [/* @__PURE__ */ jsx("label", {
440
+ className: "w-[75px] text-muted-foreground text-xs",
441
+ htmlFor: fieldIds.vAlign,
442
+ children: "Align"
443
+ }), /* @__PURE__ */ jsxs("select", {
444
+ className: "border-input bg-background text-foreground flex-1 rounded border px-1.5 py-1 text-xs outline-none",
445
+ id: fieldIds.vAlign,
446
+ value: vAlign,
447
+ onChange: (e_4) => setVAlign(e_4.target.value),
448
+ children: [
449
+ /* @__PURE__ */ jsx("option", {
450
+ value: "top",
451
+ children: "Top"
452
+ }),
453
+ /* @__PURE__ */ jsx("option", {
454
+ value: "center",
455
+ children: "Center"
456
+ }),
457
+ /* @__PURE__ */ jsx("option", {
458
+ value: "bottom",
459
+ children: "Bottom"
460
+ })
461
+ ]
462
+ })]
463
+ }) : /* @__PURE__ */ jsxs("div", {
464
+ className: "flex items-center gap-2",
465
+ children: [/* @__PURE__ */ jsx("label", {
466
+ className: "w-[75px] text-muted-foreground text-xs",
467
+ htmlFor: fieldIds.vOffset,
468
+ children: "Offset (px)"
469
+ }), /* @__PURE__ */ jsx("input", {
470
+ className: "border-input bg-background text-foreground flex-1 rounded border px-1.5 py-1 text-xs outline-none",
471
+ id: fieldIds.vOffset,
472
+ type: "number",
473
+ value: vOffset,
474
+ onChange: (e_5) => setVOffset(Number(e_5.target.value) || 0)
475
+ })]
476
+ });
477
+ $[90] = fieldIds.vAlign;
478
+ $[91] = fieldIds.vOffset;
479
+ $[92] = vAlign;
480
+ $[93] = vMode;
481
+ $[94] = vOffset;
482
+ $[95] = t43;
483
+ } else t43 = $[95];
484
+ let t44;
485
+ if ($[96] !== fieldIds.vRelativeTo) {
486
+ t44 = /* @__PURE__ */ jsx("label", {
487
+ className: "w-[75px] text-muted-foreground text-xs",
488
+ htmlFor: fieldIds.vRelativeTo,
489
+ children: "Relative to"
490
+ });
491
+ $[96] = fieldIds.vRelativeTo;
492
+ $[97] = t44;
493
+ } else t44 = $[97];
494
+ let t45;
495
+ let t46;
496
+ let t47;
497
+ let t48;
498
+ let t49;
499
+ if ($[98] === Symbol.for("react.memo_cache_sentinel")) {
500
+ t45 = (e_6) => setVRelativeTo(e_6.target.value);
501
+ t46 = /* @__PURE__ */ jsx("option", {
502
+ value: "page",
503
+ children: "Page"
504
+ });
505
+ t47 = /* @__PURE__ */ jsx("option", {
506
+ value: "margin",
507
+ children: "Margin"
508
+ });
509
+ t48 = /* @__PURE__ */ jsx("option", {
510
+ value: "paragraph",
511
+ children: "Paragraph"
512
+ });
513
+ t49 = /* @__PURE__ */ jsx("option", {
514
+ value: "line",
515
+ children: "Line"
516
+ });
517
+ $[98] = t45;
518
+ $[99] = t46;
519
+ $[100] = t47;
520
+ $[101] = t48;
521
+ $[102] = t49;
522
+ } else {
523
+ t45 = $[98];
524
+ t46 = $[99];
525
+ t47 = $[100];
526
+ t48 = $[101];
527
+ t49 = $[102];
528
+ }
529
+ let t50;
530
+ if ($[103] !== fieldIds.vRelativeTo || $[104] !== vRelativeTo) {
531
+ t50 = /* @__PURE__ */ jsxs("select", {
532
+ className: "border-input bg-background text-foreground flex-1 rounded border px-1.5 py-1 text-xs outline-none",
533
+ id: fieldIds.vRelativeTo,
534
+ value: vRelativeTo,
535
+ onChange: t45,
536
+ children: [
537
+ t46,
538
+ t47,
539
+ t48,
540
+ t49
541
+ ]
542
+ });
543
+ $[103] = fieldIds.vRelativeTo;
544
+ $[104] = vRelativeTo;
545
+ $[105] = t50;
546
+ } else t50 = $[105];
547
+ let t51;
548
+ if ($[106] !== t44 || $[107] !== t50) {
549
+ t51 = /* @__PURE__ */ jsxs("div", {
550
+ className: "flex items-center gap-2",
551
+ children: [t44, t50]
552
+ });
553
+ $[106] = t44;
554
+ $[107] = t50;
555
+ $[108] = t51;
556
+ } else t51 = $[108];
557
+ let t52;
558
+ if ($[109] !== t42 || $[110] !== t43 || $[111] !== t51) {
559
+ t52 = /* @__PURE__ */ jsxs("div", {
560
+ className: "flex flex-col gap-2",
561
+ children: [
562
+ t36,
563
+ t42,
564
+ t43,
565
+ t51
566
+ ]
567
+ });
568
+ $[109] = t42;
569
+ $[110] = t43;
570
+ $[111] = t51;
571
+ $[112] = t52;
572
+ } else t52 = $[112];
573
+ let t53;
574
+ if ($[113] === Symbol.for("react.memo_cache_sentinel")) {
575
+ t53 = /* @__PURE__ */ jsx("div", {
576
+ className: "text-foreground text-[13px] font-semibold",
577
+ children: "Distance from text (px)"
578
+ });
579
+ $[113] = t53;
580
+ } else t53 = $[113];
581
+ let t54;
582
+ if ($[114] !== fieldIds.distTop) {
583
+ t54 = /* @__PURE__ */ jsx("label", {
584
+ className: "w-[45px] text-muted-foreground text-xs",
585
+ htmlFor: fieldIds.distTop,
586
+ children: "Top"
587
+ });
588
+ $[114] = fieldIds.distTop;
589
+ $[115] = t54;
590
+ } else t54 = $[115];
591
+ let t55;
592
+ if ($[116] === Symbol.for("react.memo_cache_sentinel")) {
593
+ t55 = (e_7) => setDistTop(Number(e_7.target.value) || 0);
594
+ $[116] = t55;
595
+ } else t55 = $[116];
596
+ let t56;
597
+ if ($[117] !== distTop || $[118] !== fieldIds.distTop) {
598
+ t56 = /* @__PURE__ */ jsx("input", {
599
+ className: "border-input bg-background text-foreground flex-1 rounded border px-1.5 py-1 text-xs outline-none",
600
+ id: fieldIds.distTop,
601
+ min: 0,
602
+ type: "number",
603
+ value: distTop,
604
+ onChange: t55
605
+ });
606
+ $[117] = distTop;
607
+ $[118] = fieldIds.distTop;
608
+ $[119] = t56;
609
+ } else t56 = $[119];
610
+ let t57;
611
+ if ($[120] !== t54 || $[121] !== t56) {
612
+ t57 = /* @__PURE__ */ jsxs("div", {
613
+ className: "flex items-center gap-2",
614
+ children: [t54, t56]
615
+ });
616
+ $[120] = t54;
617
+ $[121] = t56;
618
+ $[122] = t57;
619
+ } else t57 = $[122];
620
+ let t58;
621
+ if ($[123] !== fieldIds.distBottom) {
622
+ t58 = /* @__PURE__ */ jsx("label", {
623
+ className: "w-[45px] text-muted-foreground text-xs",
624
+ htmlFor: fieldIds.distBottom,
625
+ children: "Bottom"
626
+ });
627
+ $[123] = fieldIds.distBottom;
628
+ $[124] = t58;
629
+ } else t58 = $[124];
630
+ let t59;
631
+ if ($[125] === Symbol.for("react.memo_cache_sentinel")) {
632
+ t59 = (e_8) => setDistBottom(Number(e_8.target.value) || 0);
633
+ $[125] = t59;
634
+ } else t59 = $[125];
635
+ let t60;
636
+ if ($[126] !== distBottom || $[127] !== fieldIds.distBottom) {
637
+ t60 = /* @__PURE__ */ jsx("input", {
638
+ className: "border-input bg-background text-foreground flex-1 rounded border px-1.5 py-1 text-xs outline-none",
639
+ id: fieldIds.distBottom,
640
+ min: 0,
641
+ type: "number",
642
+ value: distBottom,
643
+ onChange: t59
644
+ });
645
+ $[126] = distBottom;
646
+ $[127] = fieldIds.distBottom;
647
+ $[128] = t60;
648
+ } else t60 = $[128];
649
+ let t61;
650
+ if ($[129] !== t58 || $[130] !== t60) {
651
+ t61 = /* @__PURE__ */ jsxs("div", {
652
+ className: "flex items-center gap-2",
653
+ children: [t58, t60]
654
+ });
655
+ $[129] = t58;
656
+ $[130] = t60;
657
+ $[131] = t61;
658
+ } else t61 = $[131];
659
+ let t62;
660
+ if ($[132] !== fieldIds.distLeft) {
661
+ t62 = /* @__PURE__ */ jsx("label", {
662
+ className: "w-[45px] text-muted-foreground text-xs",
663
+ htmlFor: fieldIds.distLeft,
664
+ children: "Left"
665
+ });
666
+ $[132] = fieldIds.distLeft;
667
+ $[133] = t62;
668
+ } else t62 = $[133];
669
+ let t63;
670
+ if ($[134] === Symbol.for("react.memo_cache_sentinel")) {
671
+ t63 = (e_9) => setDistLeft(Number(e_9.target.value) || 0);
672
+ $[134] = t63;
673
+ } else t63 = $[134];
674
+ let t64;
675
+ if ($[135] !== distLeft || $[136] !== fieldIds.distLeft) {
676
+ t64 = /* @__PURE__ */ jsx("input", {
677
+ className: "border-input bg-background text-foreground flex-1 rounded border px-1.5 py-1 text-xs outline-none",
678
+ id: fieldIds.distLeft,
679
+ min: 0,
680
+ type: "number",
681
+ value: distLeft,
682
+ onChange: t63
683
+ });
684
+ $[135] = distLeft;
685
+ $[136] = fieldIds.distLeft;
686
+ $[137] = t64;
687
+ } else t64 = $[137];
688
+ let t65;
689
+ if ($[138] !== t62 || $[139] !== t64) {
690
+ t65 = /* @__PURE__ */ jsxs("div", {
691
+ className: "flex items-center gap-2",
692
+ children: [t62, t64]
693
+ });
694
+ $[138] = t62;
695
+ $[139] = t64;
696
+ $[140] = t65;
697
+ } else t65 = $[140];
698
+ let t66;
699
+ if ($[141] !== fieldIds.distRight) {
700
+ t66 = /* @__PURE__ */ jsx("label", {
701
+ className: "w-[45px] text-muted-foreground text-xs",
702
+ htmlFor: fieldIds.distRight,
703
+ children: "Right"
704
+ });
705
+ $[141] = fieldIds.distRight;
706
+ $[142] = t66;
707
+ } else t66 = $[142];
708
+ let t67;
709
+ if ($[143] === Symbol.for("react.memo_cache_sentinel")) {
710
+ t67 = (e_10) => setDistRight(Number(e_10.target.value) || 0);
711
+ $[143] = t67;
712
+ } else t67 = $[143];
713
+ let t68;
714
+ if ($[144] !== distRight || $[145] !== fieldIds.distRight) {
715
+ t68 = /* @__PURE__ */ jsx("input", {
716
+ className: "border-input bg-background text-foreground flex-1 rounded border px-1.5 py-1 text-xs outline-none",
717
+ id: fieldIds.distRight,
718
+ min: 0,
719
+ type: "number",
720
+ value: distRight,
721
+ onChange: t67
722
+ });
723
+ $[144] = distRight;
724
+ $[145] = fieldIds.distRight;
725
+ $[146] = t68;
726
+ } else t68 = $[146];
727
+ let t69;
728
+ if ($[147] !== t66 || $[148] !== t68) {
729
+ t69 = /* @__PURE__ */ jsxs("div", {
730
+ className: "flex items-center gap-2",
731
+ children: [t66, t68]
732
+ });
733
+ $[147] = t66;
734
+ $[148] = t68;
735
+ $[149] = t69;
736
+ } else t69 = $[149];
737
+ let t70;
738
+ if ($[150] !== t57 || $[151] !== t61 || $[152] !== t65 || $[153] !== t69) {
739
+ t70 = /* @__PURE__ */ jsxs("div", {
740
+ className: "flex flex-col gap-2",
741
+ children: [t53, /* @__PURE__ */ jsxs("div", {
742
+ className: "grid grid-cols-2 gap-2",
743
+ children: [
744
+ t57,
745
+ t61,
746
+ t65,
747
+ t69
748
+ ]
749
+ })]
750
+ });
751
+ $[150] = t57;
752
+ $[151] = t61;
753
+ $[152] = t65;
754
+ $[153] = t69;
755
+ $[154] = t70;
756
+ } else t70 = $[154];
757
+ let t71;
758
+ if ($[155] !== t35 || $[156] !== t52 || $[157] !== t70) {
759
+ t71 = /* @__PURE__ */ jsxs("div", {
760
+ className: "flex flex-col gap-4 px-5 py-4",
761
+ children: [
762
+ t35,
763
+ t52,
764
+ t70
765
+ ]
766
+ });
767
+ $[155] = t35;
768
+ $[156] = t52;
769
+ $[157] = t70;
770
+ $[158] = t71;
771
+ } else t71 = $[158];
772
+ let t72;
773
+ if ($[159] !== DialogClose) {
774
+ t72 = /* @__PURE__ */ jsx(DialogClose, {
775
+ className: "border-input rounded border px-4 py-1.5 text-[13px]",
776
+ children: "Cancel"
777
+ });
778
+ $[159] = DialogClose;
779
+ $[160] = t72;
780
+ } else t72 = $[160];
781
+ let t73;
782
+ if ($[161] !== handleApply) {
783
+ t73 = /* @__PURE__ */ jsx("button", {
784
+ className: "bg-primary text-primary-foreground rounded px-4 py-1.5 text-[13px] font-medium",
785
+ onClick: handleApply,
786
+ type: "button",
787
+ children: "Apply"
788
+ });
789
+ $[161] = handleApply;
790
+ $[162] = t73;
791
+ } else t73 = $[162];
792
+ let t74;
793
+ if ($[163] !== t72 || $[164] !== t73) {
794
+ t74 = /* @__PURE__ */ jsxs("div", {
795
+ className: "flex justify-end gap-2 border-t px-5 py-3",
796
+ children: [t72, t73]
797
+ });
798
+ $[163] = t72;
799
+ $[164] = t73;
800
+ $[165] = t74;
801
+ } else t74 = $[165];
802
+ let t75;
803
+ if ($[166] !== DialogPopup || $[167] !== t18 || $[168] !== t71 || $[169] !== t74) {
804
+ t75 = /* @__PURE__ */ jsxs(DialogPopup, {
805
+ className: "bg-popover fixed start-1/2 top-1/2 z-[10001] w-full max-w-[480px] min-w-[400px] -translate-x-1/2 -translate-y-1/2 rounded-lg border shadow-xl",
806
+ children: [
807
+ t18,
808
+ t71,
809
+ t74
810
+ ]
811
+ });
812
+ $[166] = DialogPopup;
813
+ $[167] = t18;
814
+ $[168] = t71;
815
+ $[169] = t74;
816
+ $[170] = t75;
817
+ } else t75 = $[170];
818
+ let t76;
819
+ if ($[171] !== DialogPortal || $[172] !== t17 || $[173] !== t75) {
820
+ t76 = /* @__PURE__ */ jsxs(DialogPortal, { children: [t17, t75] });
821
+ $[171] = DialogPortal;
822
+ $[172] = t17;
823
+ $[173] = t75;
824
+ $[174] = t76;
825
+ } else t76 = $[174];
826
+ let t77;
827
+ if ($[175] !== Dialog || $[176] !== handleOpenChange || $[177] !== isOpen || $[178] !== t76) {
828
+ t77 = /* @__PURE__ */ jsx(Dialog, {
829
+ open: isOpen,
830
+ onOpenChange: handleOpenChange,
831
+ children: t76
832
+ });
833
+ $[175] = Dialog;
834
+ $[176] = handleOpenChange;
835
+ $[177] = isOpen;
836
+ $[178] = t76;
837
+ $[179] = t77;
838
+ } else t77 = $[179];
839
+ return t77;
840
+ }
841
+ //#endregion
842
+ export { ImagePositionDialog_exports as n, ImagePositionDialog as t };