@stll/folio-react 0.6.0 → 0.8.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-Byn5lyrt.js} +127 -130
  2. package/dist/{FindReplaceDialog-DLdBekSR.js → FindReplaceDialog-CqKK82nE.js} +23 -18
  3. package/dist/FootnotePropertiesDialog-CixRdIiT.js +822 -0
  4. package/dist/ImagePositionDialog-DNodkoI2.js +1065 -0
  5. package/dist/ImagePropertiesDialog-CLsDIUWb.js +613 -0
  6. package/dist/InsertSymbolDialog-DCFLmfzn.js +376 -0
  7. package/dist/PageSetupDialog-COkgeOQn.js +820 -0
  8. package/dist/TablePropertiesDialog-B_AGrPR8.js +434 -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-CzvXYJyG.js → dialogs-Bj2PdycR.js} +608 -352
  14. package/dist/{dialogs-j7qyw17x.d.ts → dialogs-DK8OVUT_.d.ts} +13 -1
  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-BgDDRsUX.js +1013 -0
  19. package/dist/index.d.ts +5 -4
  20. package/dist/index.js +12 -11
  21. package/dist/{renderAsync-B7UJsZye.d.ts → renderAsync-BmxQE7iO.d.ts} +12 -3
  22. package/dist/{renderAsync-CwHTsxBN.js → renderAsync-BtWYvQMT.js} +5717 -3275
  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,822 @@
1
+ import { t as __exportAll } from "./rolldown-runtime-BBjsoOtd.js";
2
+ import { r as useFolioUI } from "./folio-ui-BgDDRsUX.js";
3
+ import { u as useCloseOnDialogOpenChange } from "./dialogChrome-BoGYPgeu.js";
4
+ import { c } from "react-compiler-runtime";
5
+ import { useId, useState } from "react";
6
+ import { useTranslations } from "use-intl";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ //#region src/components/dialogs/FootnotePropertiesDialog.tsx
9
+ /**
10
+ * Footnote & Endnote Properties Dialog
11
+ *
12
+ * Edits position, numbering format, start number, and restart rules.
13
+ */
14
+ var FootnotePropertiesDialog_exports = /* @__PURE__ */ __exportAll({ FootnotePropertiesDialog: () => FootnotePropertiesDialog });
15
+ const numberFormatOptions = [
16
+ {
17
+ value: "decimal",
18
+ labelKey: "dialogs.footnoteProperties.formats.decimal"
19
+ },
20
+ {
21
+ value: "lowerRoman",
22
+ labelKey: "dialogs.footnoteProperties.formats.lowerRoman"
23
+ },
24
+ {
25
+ value: "upperRoman",
26
+ labelKey: "dialogs.footnoteProperties.formats.upperRoman"
27
+ },
28
+ {
29
+ value: "lowerLetter",
30
+ labelKey: "dialogs.footnoteProperties.formats.lowerAlpha"
31
+ },
32
+ {
33
+ value: "upperLetter",
34
+ labelKey: "dialogs.footnoteProperties.formats.upperAlpha"
35
+ },
36
+ {
37
+ value: "chicago",
38
+ labelKey: "dialogs.footnoteProperties.formats.symbols"
39
+ }
40
+ ];
41
+ function FootnotePropertiesDialog(t0) {
42
+ const $ = c(220);
43
+ const { isOpen, onClose, onApply, footnotePr, endnotePr } = t0;
44
+ const { Root: Dialog, Portal: DialogPortal, Backdrop: DialogBackdrop, Popup: DialogPopup, Title: DialogTitle, Close: DialogClose } = useFolioUI().Dialog;
45
+ const handleOpenChange = useCloseOnDialogOpenChange(onClose);
46
+ const t = useTranslations("folio");
47
+ const id = useId();
48
+ const [fnPosition, setFnPosition] = useState(footnotePr?.position ?? "pageBottom");
49
+ const [fnNumFmt, setFnNumFmt] = useState(footnotePr?.numFmt ?? "decimal");
50
+ const [fnNumStart, setFnNumStart] = useState(footnotePr?.numStart ?? 1);
51
+ const [fnRestart, setFnRestart] = useState(footnotePr?.numRestart ?? "continuous");
52
+ const [enPosition, setEnPosition] = useState(endnotePr?.position ?? "docEnd");
53
+ const [enNumFmt, setEnNumFmt] = useState(endnotePr?.numFmt ?? "lowerRoman");
54
+ const [enNumStart, setEnNumStart] = useState(endnotePr?.numStart ?? 1);
55
+ const [enRestart, setEnRestart] = useState(endnotePr?.numRestart ?? "continuous");
56
+ let t1;
57
+ if ($[0] !== enNumFmt || $[1] !== enNumStart || $[2] !== enPosition || $[3] !== enRestart || $[4] !== fnNumFmt || $[5] !== fnNumStart || $[6] !== fnPosition || $[7] !== fnRestart || $[8] !== onApply || $[9] !== onClose) {
58
+ t1 = () => {
59
+ onApply({
60
+ position: fnPosition,
61
+ numFmt: fnNumFmt,
62
+ numStart: fnNumStart,
63
+ numRestart: fnRestart
64
+ }, {
65
+ position: enPosition,
66
+ numFmt: enNumFmt,
67
+ numStart: enNumStart,
68
+ numRestart: enRestart
69
+ });
70
+ onClose();
71
+ };
72
+ $[0] = enNumFmt;
73
+ $[1] = enNumStart;
74
+ $[2] = enPosition;
75
+ $[3] = enRestart;
76
+ $[4] = fnNumFmt;
77
+ $[5] = fnNumStart;
78
+ $[6] = fnPosition;
79
+ $[7] = fnRestart;
80
+ $[8] = onApply;
81
+ $[9] = onClose;
82
+ $[10] = t1;
83
+ } else t1 = $[10];
84
+ const handleApply = t1;
85
+ const t2 = `${id}-fn-position`;
86
+ const t3 = `${id}-fn-num-fmt`;
87
+ const t4 = `${id}-fn-start-at`;
88
+ const t5 = `${id}-fn-numbering`;
89
+ const t6 = `${id}-en-position`;
90
+ const t7 = `${id}-en-num-fmt`;
91
+ const t8 = `${id}-en-start-at`;
92
+ const t9 = `${id}-en-numbering`;
93
+ let t10;
94
+ if ($[11] !== t2 || $[12] !== t3 || $[13] !== t4 || $[14] !== t5 || $[15] !== t6 || $[16] !== t7 || $[17] !== t8 || $[18] !== t9) {
95
+ t10 = {
96
+ fnPosition: t2,
97
+ fnNumFmt: t3,
98
+ fnStartAt: t4,
99
+ fnNumbering: t5,
100
+ enPosition: t6,
101
+ enNumFmt: t7,
102
+ enStartAt: t8,
103
+ enNumbering: t9
104
+ };
105
+ $[11] = t2;
106
+ $[12] = t3;
107
+ $[13] = t4;
108
+ $[14] = t5;
109
+ $[15] = t6;
110
+ $[16] = t7;
111
+ $[17] = t8;
112
+ $[18] = t9;
113
+ $[19] = t10;
114
+ } else t10 = $[19];
115
+ const fieldIds = t10;
116
+ let t11;
117
+ if ($[20] !== DialogBackdrop) {
118
+ t11 = /* @__PURE__ */ jsx(DialogBackdrop, { className: "fixed inset-0 z-[10000] bg-black/50" });
119
+ $[20] = DialogBackdrop;
120
+ $[21] = t11;
121
+ } else t11 = $[21];
122
+ let t12;
123
+ if ($[22] !== t) {
124
+ t12 = t("dialogs.footnoteProperties.title");
125
+ $[22] = t;
126
+ $[23] = t12;
127
+ } else t12 = $[23];
128
+ let t13;
129
+ if ($[24] !== DialogTitle || $[25] !== t12) {
130
+ t13 = /* @__PURE__ */ jsx(DialogTitle, {
131
+ className: "border-b px-5 py-3 text-base font-semibold",
132
+ children: t12
133
+ });
134
+ $[24] = DialogTitle;
135
+ $[25] = t12;
136
+ $[26] = t13;
137
+ } else t13 = $[26];
138
+ let t14;
139
+ if ($[27] !== t) {
140
+ t14 = t("dialogs.footnoteProperties.footnotes");
141
+ $[27] = t;
142
+ $[28] = t14;
143
+ } else t14 = $[28];
144
+ let t15;
145
+ if ($[29] !== t14) {
146
+ t15 = /* @__PURE__ */ jsx("h4", {
147
+ className: "mb-2 text-sm font-semibold",
148
+ children: t14
149
+ });
150
+ $[29] = t14;
151
+ $[30] = t15;
152
+ } else t15 = $[30];
153
+ const t16 = fieldIds.fnPosition;
154
+ let t17;
155
+ if ($[31] !== t) {
156
+ t17 = t("dialogs.footnoteProperties.position");
157
+ $[31] = t;
158
+ $[32] = t17;
159
+ } else t17 = $[32];
160
+ let t18;
161
+ if ($[33] !== fieldIds.fnPosition || $[34] !== t17) {
162
+ t18 = /* @__PURE__ */ jsx("label", {
163
+ htmlFor: t16,
164
+ className: "block text-muted-foreground mb-1 text-xs",
165
+ children: t17
166
+ });
167
+ $[33] = fieldIds.fnPosition;
168
+ $[34] = t17;
169
+ $[35] = t18;
170
+ } else t18 = $[35];
171
+ const t19 = fieldIds.fnPosition;
172
+ let t20;
173
+ if ($[36] === Symbol.for("react.memo_cache_sentinel")) {
174
+ t20 = (e) => setFnPosition(e.target.value);
175
+ $[36] = t20;
176
+ } else t20 = $[36];
177
+ let t21;
178
+ if ($[37] !== t) {
179
+ t21 = t("dialogs.footnoteProperties.footnotePositions.bottomOfPage");
180
+ $[37] = t;
181
+ $[38] = t21;
182
+ } else t21 = $[38];
183
+ let t22;
184
+ if ($[39] !== t21) {
185
+ t22 = /* @__PURE__ */ jsx("option", {
186
+ value: "pageBottom",
187
+ children: t21
188
+ });
189
+ $[39] = t21;
190
+ $[40] = t22;
191
+ } else t22 = $[40];
192
+ let t23;
193
+ if ($[41] !== t) {
194
+ t23 = t("dialogs.footnoteProperties.footnotePositions.belowText");
195
+ $[41] = t;
196
+ $[42] = t23;
197
+ } else t23 = $[42];
198
+ let t24;
199
+ if ($[43] !== t23) {
200
+ t24 = /* @__PURE__ */ jsx("option", {
201
+ value: "beneathText",
202
+ children: t23
203
+ });
204
+ $[43] = t23;
205
+ $[44] = t24;
206
+ } else t24 = $[44];
207
+ let t25;
208
+ if ($[45] !== fieldIds.fnPosition || $[46] !== fnPosition || $[47] !== t22 || $[48] !== t24) {
209
+ t25 = /* @__PURE__ */ jsxs("select", {
210
+ id: t19,
211
+ className: "border-input bg-background text-foreground mb-2 w-full rounded border px-2 py-1 text-[13px] outline-none",
212
+ value: fnPosition,
213
+ onChange: t20,
214
+ children: [t22, t24]
215
+ });
216
+ $[45] = fieldIds.fnPosition;
217
+ $[46] = fnPosition;
218
+ $[47] = t22;
219
+ $[48] = t24;
220
+ $[49] = t25;
221
+ } else t25 = $[49];
222
+ const t26 = fieldIds.fnNumFmt;
223
+ let t27;
224
+ if ($[50] !== t) {
225
+ t27 = t("dialogs.footnoteProperties.numberFormat");
226
+ $[50] = t;
227
+ $[51] = t27;
228
+ } else t27 = $[51];
229
+ let t28;
230
+ if ($[52] !== fieldIds.fnNumFmt || $[53] !== t27) {
231
+ t28 = /* @__PURE__ */ jsx("label", {
232
+ htmlFor: t26,
233
+ className: "block text-muted-foreground mb-1 text-xs",
234
+ children: t27
235
+ });
236
+ $[52] = fieldIds.fnNumFmt;
237
+ $[53] = t27;
238
+ $[54] = t28;
239
+ } else t28 = $[54];
240
+ const t29 = fieldIds.fnNumFmt;
241
+ let t30;
242
+ if ($[55] === Symbol.for("react.memo_cache_sentinel")) {
243
+ t30 = (e_0) => setFnNumFmt(e_0.target.value);
244
+ $[55] = t30;
245
+ } else t30 = $[55];
246
+ let t31;
247
+ if ($[56] !== t) {
248
+ t31 = numberFormatOptions.map((o) => /* @__PURE__ */ jsx("option", {
249
+ value: o.value,
250
+ children: t(o.labelKey)
251
+ }, o.value));
252
+ $[56] = t;
253
+ $[57] = t31;
254
+ } else t31 = $[57];
255
+ let t32;
256
+ if ($[58] !== fieldIds.fnNumFmt || $[59] !== fnNumFmt || $[60] !== t31) {
257
+ t32 = /* @__PURE__ */ jsx("select", {
258
+ id: t29,
259
+ className: "border-input bg-background text-foreground mb-2 w-full rounded border px-2 py-1 text-[13px] outline-none",
260
+ value: fnNumFmt,
261
+ onChange: t30,
262
+ children: t31
263
+ });
264
+ $[58] = fieldIds.fnNumFmt;
265
+ $[59] = fnNumFmt;
266
+ $[60] = t31;
267
+ $[61] = t32;
268
+ } else t32 = $[61];
269
+ const t33 = fieldIds.fnStartAt;
270
+ let t34;
271
+ if ($[62] !== t) {
272
+ t34 = t("dialogs.footnoteProperties.startAt");
273
+ $[62] = t;
274
+ $[63] = t34;
275
+ } else t34 = $[63];
276
+ let t35;
277
+ if ($[64] !== fieldIds.fnStartAt || $[65] !== t34) {
278
+ t35 = /* @__PURE__ */ jsx("label", {
279
+ htmlFor: t33,
280
+ className: "block text-muted-foreground mb-1 text-xs",
281
+ children: t34
282
+ });
283
+ $[64] = fieldIds.fnStartAt;
284
+ $[65] = t34;
285
+ $[66] = t35;
286
+ } else t35 = $[66];
287
+ let t36;
288
+ if ($[67] === Symbol.for("react.memo_cache_sentinel")) {
289
+ t36 = (e_1) => setFnNumStart(Number.parseInt(e_1.target.value, 10) || 1);
290
+ $[67] = t36;
291
+ } else t36 = $[67];
292
+ let t37;
293
+ if ($[68] !== fieldIds.fnStartAt || $[69] !== fnNumStart) {
294
+ t37 = /* @__PURE__ */ jsx("input", {
295
+ id: fieldIds.fnStartAt,
296
+ type: "number",
297
+ min: 1,
298
+ className: "border-input bg-background text-foreground w-[60px] rounded border px-2 py-1 text-[13px] outline-none",
299
+ value: fnNumStart,
300
+ onChange: t36
301
+ });
302
+ $[68] = fieldIds.fnStartAt;
303
+ $[69] = fnNumStart;
304
+ $[70] = t37;
305
+ } else t37 = $[70];
306
+ let t38;
307
+ if ($[71] !== t35 || $[72] !== t37) {
308
+ t38 = /* @__PURE__ */ jsxs("div", { children: [t35, t37] });
309
+ $[71] = t35;
310
+ $[72] = t37;
311
+ $[73] = t38;
312
+ } else t38 = $[73];
313
+ const t39 = fieldIds.fnNumbering;
314
+ let t40;
315
+ if ($[74] !== t) {
316
+ t40 = t("dialogs.footnoteProperties.numbering");
317
+ $[74] = t;
318
+ $[75] = t40;
319
+ } else t40 = $[75];
320
+ let t41;
321
+ if ($[76] !== fieldIds.fnNumbering || $[77] !== t40) {
322
+ t41 = /* @__PURE__ */ jsx("label", {
323
+ htmlFor: t39,
324
+ className: "block text-muted-foreground mb-1 text-xs",
325
+ children: t40
326
+ });
327
+ $[76] = fieldIds.fnNumbering;
328
+ $[77] = t40;
329
+ $[78] = t41;
330
+ } else t41 = $[78];
331
+ const t42 = fieldIds.fnNumbering;
332
+ let t43;
333
+ if ($[79] === Symbol.for("react.memo_cache_sentinel")) {
334
+ t43 = (e_2) => setFnRestart(e_2.target.value);
335
+ $[79] = t43;
336
+ } else t43 = $[79];
337
+ let t44;
338
+ if ($[80] !== t) {
339
+ t44 = t("dialogs.footnoteProperties.numberingOptions.continuous");
340
+ $[80] = t;
341
+ $[81] = t44;
342
+ } else t44 = $[81];
343
+ let t45;
344
+ if ($[82] !== t44) {
345
+ t45 = /* @__PURE__ */ jsx("option", {
346
+ value: "continuous",
347
+ children: t44
348
+ });
349
+ $[82] = t44;
350
+ $[83] = t45;
351
+ } else t45 = $[83];
352
+ let t46;
353
+ if ($[84] !== t) {
354
+ t46 = t("dialogs.footnoteProperties.numberingOptions.restartSection");
355
+ $[84] = t;
356
+ $[85] = t46;
357
+ } else t46 = $[85];
358
+ let t47;
359
+ if ($[86] !== t46) {
360
+ t47 = /* @__PURE__ */ jsx("option", {
361
+ value: "eachSect",
362
+ children: t46
363
+ });
364
+ $[86] = t46;
365
+ $[87] = t47;
366
+ } else t47 = $[87];
367
+ let t48;
368
+ if ($[88] !== t) {
369
+ t48 = t("dialogs.footnoteProperties.numberingOptions.restartPage");
370
+ $[88] = t;
371
+ $[89] = t48;
372
+ } else t48 = $[89];
373
+ let t49;
374
+ if ($[90] !== t48) {
375
+ t49 = /* @__PURE__ */ jsx("option", {
376
+ value: "eachPage",
377
+ children: t48
378
+ });
379
+ $[90] = t48;
380
+ $[91] = t49;
381
+ } else t49 = $[91];
382
+ let t50;
383
+ if ($[92] !== fieldIds.fnNumbering || $[93] !== fnRestart || $[94] !== t45 || $[95] !== t47 || $[96] !== t49) {
384
+ t50 = /* @__PURE__ */ jsxs("select", {
385
+ id: t42,
386
+ className: "border-input bg-background text-foreground mb-2 w-full rounded border px-2 py-1 text-[13px] outline-none",
387
+ value: fnRestart,
388
+ onChange: t43,
389
+ children: [
390
+ t45,
391
+ t47,
392
+ t49
393
+ ]
394
+ });
395
+ $[92] = fieldIds.fnNumbering;
396
+ $[93] = fnRestart;
397
+ $[94] = t45;
398
+ $[95] = t47;
399
+ $[96] = t49;
400
+ $[97] = t50;
401
+ } else t50 = $[97];
402
+ let t51;
403
+ if ($[98] !== t41 || $[99] !== t50) {
404
+ t51 = /* @__PURE__ */ jsxs("div", {
405
+ className: "flex-1",
406
+ children: [t41, t50]
407
+ });
408
+ $[98] = t41;
409
+ $[99] = t50;
410
+ $[100] = t51;
411
+ } else t51 = $[100];
412
+ let t52;
413
+ if ($[101] !== t38 || $[102] !== t51) {
414
+ t52 = /* @__PURE__ */ jsxs("div", {
415
+ className: "flex items-center gap-3",
416
+ children: [t38, t51]
417
+ });
418
+ $[101] = t38;
419
+ $[102] = t51;
420
+ $[103] = t52;
421
+ } else t52 = $[103];
422
+ let t53;
423
+ if ($[104] !== t15 || $[105] !== t18 || $[106] !== t25 || $[107] !== t28 || $[108] !== t32 || $[109] !== t52) {
424
+ t53 = /* @__PURE__ */ jsxs("div", {
425
+ className: "mb-4 rounded border p-3",
426
+ children: [
427
+ t15,
428
+ t18,
429
+ t25,
430
+ t28,
431
+ t32,
432
+ t52
433
+ ]
434
+ });
435
+ $[104] = t15;
436
+ $[105] = t18;
437
+ $[106] = t25;
438
+ $[107] = t28;
439
+ $[108] = t32;
440
+ $[109] = t52;
441
+ $[110] = t53;
442
+ } else t53 = $[110];
443
+ let t54;
444
+ if ($[111] !== t) {
445
+ t54 = t("dialogs.footnoteProperties.endnotes");
446
+ $[111] = t;
447
+ $[112] = t54;
448
+ } else t54 = $[112];
449
+ let t55;
450
+ if ($[113] !== t54) {
451
+ t55 = /* @__PURE__ */ jsx("h4", {
452
+ className: "mb-2 text-sm font-semibold",
453
+ children: t54
454
+ });
455
+ $[113] = t54;
456
+ $[114] = t55;
457
+ } else t55 = $[114];
458
+ const t56 = fieldIds.enPosition;
459
+ let t57;
460
+ if ($[115] !== t) {
461
+ t57 = t("dialogs.footnoteProperties.position");
462
+ $[115] = t;
463
+ $[116] = t57;
464
+ } else t57 = $[116];
465
+ let t58;
466
+ if ($[117] !== fieldIds.enPosition || $[118] !== t57) {
467
+ t58 = /* @__PURE__ */ jsx("label", {
468
+ htmlFor: t56,
469
+ className: "block text-muted-foreground mb-1 text-xs",
470
+ children: t57
471
+ });
472
+ $[117] = fieldIds.enPosition;
473
+ $[118] = t57;
474
+ $[119] = t58;
475
+ } else t58 = $[119];
476
+ const t59 = fieldIds.enPosition;
477
+ let t60;
478
+ if ($[120] === Symbol.for("react.memo_cache_sentinel")) {
479
+ t60 = (e_3) => setEnPosition(e_3.target.value);
480
+ $[120] = t60;
481
+ } else t60 = $[120];
482
+ let t61;
483
+ if ($[121] !== t) {
484
+ t61 = t("dialogs.footnoteProperties.endnotePositions.endOfDocument");
485
+ $[121] = t;
486
+ $[122] = t61;
487
+ } else t61 = $[122];
488
+ let t62;
489
+ if ($[123] !== t61) {
490
+ t62 = /* @__PURE__ */ jsx("option", {
491
+ value: "docEnd",
492
+ children: t61
493
+ });
494
+ $[123] = t61;
495
+ $[124] = t62;
496
+ } else t62 = $[124];
497
+ let t63;
498
+ if ($[125] !== t) {
499
+ t63 = t("dialogs.footnoteProperties.endnotePositions.endOfSection");
500
+ $[125] = t;
501
+ $[126] = t63;
502
+ } else t63 = $[126];
503
+ let t64;
504
+ if ($[127] !== t63) {
505
+ t64 = /* @__PURE__ */ jsx("option", {
506
+ value: "sectEnd",
507
+ children: t63
508
+ });
509
+ $[127] = t63;
510
+ $[128] = t64;
511
+ } else t64 = $[128];
512
+ let t65;
513
+ if ($[129] !== enPosition || $[130] !== fieldIds.enPosition || $[131] !== t62 || $[132] !== t64) {
514
+ t65 = /* @__PURE__ */ jsxs("select", {
515
+ id: t59,
516
+ className: "border-input bg-background text-foreground mb-2 w-full rounded border px-2 py-1 text-[13px] outline-none",
517
+ value: enPosition,
518
+ onChange: t60,
519
+ children: [t62, t64]
520
+ });
521
+ $[129] = enPosition;
522
+ $[130] = fieldIds.enPosition;
523
+ $[131] = t62;
524
+ $[132] = t64;
525
+ $[133] = t65;
526
+ } else t65 = $[133];
527
+ const t66 = fieldIds.enNumFmt;
528
+ let t67;
529
+ if ($[134] !== t) {
530
+ t67 = t("dialogs.footnoteProperties.numberFormat");
531
+ $[134] = t;
532
+ $[135] = t67;
533
+ } else t67 = $[135];
534
+ let t68;
535
+ if ($[136] !== fieldIds.enNumFmt || $[137] !== t67) {
536
+ t68 = /* @__PURE__ */ jsx("label", {
537
+ htmlFor: t66,
538
+ className: "block text-muted-foreground mb-1 text-xs",
539
+ children: t67
540
+ });
541
+ $[136] = fieldIds.enNumFmt;
542
+ $[137] = t67;
543
+ $[138] = t68;
544
+ } else t68 = $[138];
545
+ const t69 = fieldIds.enNumFmt;
546
+ let t70;
547
+ if ($[139] === Symbol.for("react.memo_cache_sentinel")) {
548
+ t70 = (e_4) => setEnNumFmt(e_4.target.value);
549
+ $[139] = t70;
550
+ } else t70 = $[139];
551
+ let t71;
552
+ if ($[140] !== t) {
553
+ t71 = numberFormatOptions.map((o_0) => /* @__PURE__ */ jsx("option", {
554
+ value: o_0.value,
555
+ children: t(o_0.labelKey)
556
+ }, o_0.value));
557
+ $[140] = t;
558
+ $[141] = t71;
559
+ } else t71 = $[141];
560
+ let t72;
561
+ if ($[142] !== enNumFmt || $[143] !== fieldIds.enNumFmt || $[144] !== t71) {
562
+ t72 = /* @__PURE__ */ jsx("select", {
563
+ id: t69,
564
+ className: "border-input bg-background text-foreground mb-2 w-full rounded border px-2 py-1 text-[13px] outline-none",
565
+ value: enNumFmt,
566
+ onChange: t70,
567
+ children: t71
568
+ });
569
+ $[142] = enNumFmt;
570
+ $[143] = fieldIds.enNumFmt;
571
+ $[144] = t71;
572
+ $[145] = t72;
573
+ } else t72 = $[145];
574
+ const t73 = fieldIds.enStartAt;
575
+ let t74;
576
+ if ($[146] !== t) {
577
+ t74 = t("dialogs.footnoteProperties.startAt");
578
+ $[146] = t;
579
+ $[147] = t74;
580
+ } else t74 = $[147];
581
+ let t75;
582
+ if ($[148] !== fieldIds.enStartAt || $[149] !== t74) {
583
+ t75 = /* @__PURE__ */ jsx("label", {
584
+ htmlFor: t73,
585
+ className: "block text-muted-foreground mb-1 text-xs",
586
+ children: t74
587
+ });
588
+ $[148] = fieldIds.enStartAt;
589
+ $[149] = t74;
590
+ $[150] = t75;
591
+ } else t75 = $[150];
592
+ let t76;
593
+ if ($[151] === Symbol.for("react.memo_cache_sentinel")) {
594
+ t76 = (e_5) => setEnNumStart(Number.parseInt(e_5.target.value, 10) || 1);
595
+ $[151] = t76;
596
+ } else t76 = $[151];
597
+ let t77;
598
+ if ($[152] !== enNumStart || $[153] !== fieldIds.enStartAt) {
599
+ t77 = /* @__PURE__ */ jsx("input", {
600
+ id: fieldIds.enStartAt,
601
+ type: "number",
602
+ min: 1,
603
+ className: "border-input bg-background text-foreground w-[60px] rounded border px-2 py-1 text-[13px] outline-none",
604
+ value: enNumStart,
605
+ onChange: t76
606
+ });
607
+ $[152] = enNumStart;
608
+ $[153] = fieldIds.enStartAt;
609
+ $[154] = t77;
610
+ } else t77 = $[154];
611
+ let t78;
612
+ if ($[155] !== t75 || $[156] !== t77) {
613
+ t78 = /* @__PURE__ */ jsxs("div", { children: [t75, t77] });
614
+ $[155] = t75;
615
+ $[156] = t77;
616
+ $[157] = t78;
617
+ } else t78 = $[157];
618
+ const t79 = fieldIds.enNumbering;
619
+ let t80;
620
+ if ($[158] !== t) {
621
+ t80 = t("dialogs.footnoteProperties.numbering");
622
+ $[158] = t;
623
+ $[159] = t80;
624
+ } else t80 = $[159];
625
+ let t81;
626
+ if ($[160] !== fieldIds.enNumbering || $[161] !== t80) {
627
+ t81 = /* @__PURE__ */ jsx("label", {
628
+ htmlFor: t79,
629
+ className: "block text-muted-foreground mb-1 text-xs",
630
+ children: t80
631
+ });
632
+ $[160] = fieldIds.enNumbering;
633
+ $[161] = t80;
634
+ $[162] = t81;
635
+ } else t81 = $[162];
636
+ const t82 = fieldIds.enNumbering;
637
+ let t83;
638
+ if ($[163] === Symbol.for("react.memo_cache_sentinel")) {
639
+ t83 = (e_6) => setEnRestart(e_6.target.value);
640
+ $[163] = t83;
641
+ } else t83 = $[163];
642
+ let t84;
643
+ if ($[164] !== t) {
644
+ t84 = t("dialogs.footnoteProperties.numberingOptions.continuous");
645
+ $[164] = t;
646
+ $[165] = t84;
647
+ } else t84 = $[165];
648
+ let t85;
649
+ if ($[166] !== t84) {
650
+ t85 = /* @__PURE__ */ jsx("option", {
651
+ value: "continuous",
652
+ children: t84
653
+ });
654
+ $[166] = t84;
655
+ $[167] = t85;
656
+ } else t85 = $[167];
657
+ let t86;
658
+ if ($[168] !== t) {
659
+ t86 = t("dialogs.footnoteProperties.numberingOptions.restartSection");
660
+ $[168] = t;
661
+ $[169] = t86;
662
+ } else t86 = $[169];
663
+ let t87;
664
+ if ($[170] !== t86) {
665
+ t87 = /* @__PURE__ */ jsx("option", {
666
+ value: "eachSect",
667
+ children: t86
668
+ });
669
+ $[170] = t86;
670
+ $[171] = t87;
671
+ } else t87 = $[171];
672
+ let t88;
673
+ if ($[172] !== enRestart || $[173] !== fieldIds.enNumbering || $[174] !== t85 || $[175] !== t87) {
674
+ t88 = /* @__PURE__ */ jsxs("select", {
675
+ id: t82,
676
+ className: "border-input bg-background text-foreground mb-2 w-full rounded border px-2 py-1 text-[13px] outline-none",
677
+ value: enRestart,
678
+ onChange: t83,
679
+ children: [t85, t87]
680
+ });
681
+ $[172] = enRestart;
682
+ $[173] = fieldIds.enNumbering;
683
+ $[174] = t85;
684
+ $[175] = t87;
685
+ $[176] = t88;
686
+ } else t88 = $[176];
687
+ let t89;
688
+ if ($[177] !== t81 || $[178] !== t88) {
689
+ t89 = /* @__PURE__ */ jsxs("div", {
690
+ className: "flex-1",
691
+ children: [t81, t88]
692
+ });
693
+ $[177] = t81;
694
+ $[178] = t88;
695
+ $[179] = t89;
696
+ } else t89 = $[179];
697
+ let t90;
698
+ if ($[180] !== t78 || $[181] !== t89) {
699
+ t90 = /* @__PURE__ */ jsxs("div", {
700
+ className: "flex items-center gap-3",
701
+ children: [t78, t89]
702
+ });
703
+ $[180] = t78;
704
+ $[181] = t89;
705
+ $[182] = t90;
706
+ } else t90 = $[182];
707
+ let t91;
708
+ if ($[183] !== t55 || $[184] !== t58 || $[185] !== t65 || $[186] !== t68 || $[187] !== t72 || $[188] !== t90) {
709
+ t91 = /* @__PURE__ */ jsxs("div", {
710
+ className: "mb-4 rounded border p-3",
711
+ children: [
712
+ t55,
713
+ t58,
714
+ t65,
715
+ t68,
716
+ t72,
717
+ t90
718
+ ]
719
+ });
720
+ $[183] = t55;
721
+ $[184] = t58;
722
+ $[185] = t65;
723
+ $[186] = t68;
724
+ $[187] = t72;
725
+ $[188] = t90;
726
+ $[189] = t91;
727
+ } else t91 = $[189];
728
+ let t92;
729
+ if ($[190] !== t53 || $[191] !== t91) {
730
+ t92 = /* @__PURE__ */ jsxs("div", {
731
+ className: "flex flex-col gap-3 px-5 py-4",
732
+ children: [t53, t91]
733
+ });
734
+ $[190] = t53;
735
+ $[191] = t91;
736
+ $[192] = t92;
737
+ } else t92 = $[192];
738
+ let t93;
739
+ if ($[193] !== t) {
740
+ t93 = t("common.cancel");
741
+ $[193] = t;
742
+ $[194] = t93;
743
+ } else t93 = $[194];
744
+ let t94;
745
+ if ($[195] !== DialogClose || $[196] !== t93) {
746
+ t94 = /* @__PURE__ */ jsx(DialogClose, {
747
+ className: "border-input rounded border px-4 py-1.5 text-[13px]",
748
+ children: t93
749
+ });
750
+ $[195] = DialogClose;
751
+ $[196] = t93;
752
+ $[197] = t94;
753
+ } else t94 = $[197];
754
+ let t95;
755
+ if ($[198] !== t) {
756
+ t95 = t("common.apply");
757
+ $[198] = t;
758
+ $[199] = t95;
759
+ } else t95 = $[199];
760
+ let t96;
761
+ if ($[200] !== handleApply || $[201] !== t95) {
762
+ t96 = /* @__PURE__ */ jsx("button", {
763
+ className: "bg-primary text-primary-foreground rounded px-4 py-1.5 text-[13px] font-medium",
764
+ onClick: handleApply,
765
+ type: "button",
766
+ children: t95
767
+ });
768
+ $[200] = handleApply;
769
+ $[201] = t95;
770
+ $[202] = t96;
771
+ } else t96 = $[202];
772
+ let t97;
773
+ if ($[203] !== t94 || $[204] !== t96) {
774
+ t97 = /* @__PURE__ */ jsxs("div", {
775
+ className: "flex justify-end gap-2 border-t px-5 py-3",
776
+ children: [t94, t96]
777
+ });
778
+ $[203] = t94;
779
+ $[204] = t96;
780
+ $[205] = t97;
781
+ } else t97 = $[205];
782
+ let t98;
783
+ if ($[206] !== DialogPopup || $[207] !== t13 || $[208] !== t92 || $[209] !== t97) {
784
+ t98 = /* @__PURE__ */ jsxs(DialogPopup, {
785
+ className: "bg-popover fixed start-1/2 top-1/2 z-[10001] w-full max-w-[500px] min-w-[400px] -translate-x-1/2 -translate-y-1/2 rounded-lg border shadow-xl",
786
+ children: [
787
+ t13,
788
+ t92,
789
+ t97
790
+ ]
791
+ });
792
+ $[206] = DialogPopup;
793
+ $[207] = t13;
794
+ $[208] = t92;
795
+ $[209] = t97;
796
+ $[210] = t98;
797
+ } else t98 = $[210];
798
+ let t99;
799
+ if ($[211] !== DialogPortal || $[212] !== t11 || $[213] !== t98) {
800
+ t99 = /* @__PURE__ */ jsxs(DialogPortal, { children: [t11, t98] });
801
+ $[211] = DialogPortal;
802
+ $[212] = t11;
803
+ $[213] = t98;
804
+ $[214] = t99;
805
+ } else t99 = $[214];
806
+ let t100;
807
+ if ($[215] !== Dialog || $[216] !== handleOpenChange || $[217] !== isOpen || $[218] !== t99) {
808
+ t100 = /* @__PURE__ */ jsx(Dialog, {
809
+ open: isOpen,
810
+ onOpenChange: handleOpenChange,
811
+ children: t99
812
+ });
813
+ $[215] = Dialog;
814
+ $[216] = handleOpenChange;
815
+ $[217] = isOpen;
816
+ $[218] = t99;
817
+ $[219] = t100;
818
+ } else t100 = $[219];
819
+ return t100;
820
+ }
821
+ //#endregion
822
+ export { FootnotePropertiesDialog_exports as n, FootnotePropertiesDialog as t };