@stll/folio-react 0.7.0 → 0.8.1
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.
- package/dist/{CommentsSidebar-B8X5a8JW.js → CommentsSidebar-Byn5lyrt.js} +2 -2
- package/dist/{FindReplaceDialog-Bx7QaFQ_.js → FindReplaceDialog-CqKK82nE.js} +1 -1
- package/dist/FootnotePropertiesDialog-CixRdIiT.js +822 -0
- package/dist/ImagePositionDialog-DNodkoI2.js +1065 -0
- package/dist/ImagePropertiesDialog-CLsDIUWb.js +613 -0
- package/dist/{InsertSymbolDialog-Df9dyLvn.js → InsertSymbolDialog-DCFLmfzn.js} +1 -1
- package/dist/PageSetupDialog-COkgeOQn.js +820 -0
- package/dist/TablePropertiesDialog-B_AGrPR8.js +434 -0
- package/dist/compat/eigenpal.d.ts +1 -1
- package/dist/compat/eigenpal.js +1 -1
- package/dist/{dialogs-DsHnfN0g.js → dialogs-Bj2PdycR.js} +265 -201
- package/dist/dialogs.js +8 -8
- package/dist/{folio-ui-C-85DSuK.js → folio-ui-BgDDRsUX.js} +5 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -10
- package/dist/{renderAsync-ChQI9UJG.d.ts → renderAsync-BmxQE7iO.d.ts} +3 -2
- package/dist/{renderAsync-evdyE_GW.js → renderAsync-BtWYvQMT.js} +378 -273
- package/package.json +2 -2
- package/dist/FootnotePropertiesDialog-2lmpg9m8.js +0 -646
- package/dist/ImagePositionDialog-D3MileYL.js +0 -842
- package/dist/ImagePropertiesDialog-CzK8HCaW.js +0 -465
- package/dist/PageSetupDialog-PSs9YdPb.js +0 -684
- package/dist/TablePropertiesDialog-PQxKKM0Y.js +0 -344
|
@@ -1,684 +0,0 @@
|
|
|
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 { TWIPS_PER_INCH } from "@stll/folio-core/utils/units";
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
//#region src/components/dialogs/PageSetupDialog.tsx
|
|
9
|
-
/**
|
|
10
|
-
* Page Setup Dialog
|
|
11
|
-
*
|
|
12
|
-
* Modal for editing page layout properties:
|
|
13
|
-
* - Page size (Letter, A4, Legal, etc.)
|
|
14
|
-
* - Orientation (portrait/landscape)
|
|
15
|
-
* - Margins (top, bottom, left, right) in inches
|
|
16
|
-
*/
|
|
17
|
-
var PageSetupDialog_exports = /* @__PURE__ */ __exportAll({ PageSetupDialog: () => PageSetupDialog });
|
|
18
|
-
/** Common page sizes in twips (width x height in portrait orientation) */
|
|
19
|
-
const PAGE_SIZES = [
|
|
20
|
-
{
|
|
21
|
-
label: "Letter (8.5\" × 11\")",
|
|
22
|
-
width: 12240,
|
|
23
|
-
height: 15840
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
label: "A4 (8.27\" × 11.69\")",
|
|
27
|
-
width: 11906,
|
|
28
|
-
height: 16838
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
label: "Legal (8.5\" × 14\")",
|
|
32
|
-
width: 12240,
|
|
33
|
-
height: 20160
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
label: "A3 (11.69\" × 16.54\")",
|
|
37
|
-
width: 16838,
|
|
38
|
-
height: 23811
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
label: "A5 (5.83\" × 8.27\")",
|
|
42
|
-
width: 8391,
|
|
43
|
-
height: 11906
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
label: "B5 (6.93\" × 9.84\")",
|
|
47
|
-
width: 9979,
|
|
48
|
-
height: 14175
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
label: "Executive (7.25\" × 10.5\")",
|
|
52
|
-
width: 10440,
|
|
53
|
-
height: 15120
|
|
54
|
-
}
|
|
55
|
-
];
|
|
56
|
-
function twipsToInches(twips) {
|
|
57
|
-
return Math.round(twips / TWIPS_PER_INCH * 100) / 100;
|
|
58
|
-
}
|
|
59
|
-
function inchesToTwips(inches) {
|
|
60
|
-
return Math.round(inches * TWIPS_PER_INCH);
|
|
61
|
-
}
|
|
62
|
-
/** Find matching page size preset, ignoring orientation */
|
|
63
|
-
function findPageSizeIndex(w, h) {
|
|
64
|
-
const pw = Math.min(w, h);
|
|
65
|
-
const ph = Math.max(w, h);
|
|
66
|
-
return PAGE_SIZES.findIndex((s) => Math.abs(s.width - pw) < 20 && Math.abs(s.height - ph) < 20);
|
|
67
|
-
}
|
|
68
|
-
const DEFAULT_WIDTH = 12240;
|
|
69
|
-
const DEFAULT_HEIGHT = 15840;
|
|
70
|
-
const DEFAULT_MARGIN = 1440;
|
|
71
|
-
function PageSetupDialog(t0) {
|
|
72
|
-
const $ = c(145);
|
|
73
|
-
const { isOpen, onClose, onApply, currentProps } = t0;
|
|
74
|
-
const { Root: Dialog, Portal: DialogPortal, Backdrop: DialogBackdrop, Popup: DialogPopup, Title: DialogTitle, Close: DialogClose } = useFolioUI().Dialog;
|
|
75
|
-
const handleOpenChange = useCloseOnDialogOpenChange(onClose);
|
|
76
|
-
const id = useId();
|
|
77
|
-
const [pageWidth, setPageWidth] = useState(DEFAULT_WIDTH);
|
|
78
|
-
const [pageHeight, setPageHeight] = useState(DEFAULT_HEIGHT);
|
|
79
|
-
const [orientation, setOrientation] = useState("portrait");
|
|
80
|
-
const [marginTop, setMarginTop] = useState(DEFAULT_MARGIN);
|
|
81
|
-
const [marginBottom, setMarginBottom] = useState(DEFAULT_MARGIN);
|
|
82
|
-
const [marginLeft, setMarginLeft] = useState(DEFAULT_MARGIN);
|
|
83
|
-
const [marginRight, setMarginRight] = useState(DEFAULT_MARGIN);
|
|
84
|
-
let t1;
|
|
85
|
-
if ($[0] !== currentProps?.marginBottom || $[1] !== currentProps?.marginLeft || $[2] !== currentProps?.marginRight || $[3] !== currentProps?.marginTop || $[4] !== currentProps?.orientation || $[5] !== currentProps?.pageHeight || $[6] !== currentProps?.pageWidth || $[7] !== isOpen) {
|
|
86
|
-
t1 = () => {
|
|
87
|
-
if (!isOpen) return;
|
|
88
|
-
const w = currentProps?.pageWidth || DEFAULT_WIDTH;
|
|
89
|
-
const h = currentProps?.pageHeight || DEFAULT_HEIGHT;
|
|
90
|
-
const orient = currentProps?.orientation || (w > h ? "landscape" : "portrait");
|
|
91
|
-
setPageWidth(w);
|
|
92
|
-
setPageHeight(h);
|
|
93
|
-
setOrientation(orient);
|
|
94
|
-
setMarginTop(currentProps?.marginTop ?? DEFAULT_MARGIN);
|
|
95
|
-
setMarginBottom(currentProps?.marginBottom ?? DEFAULT_MARGIN);
|
|
96
|
-
setMarginLeft(currentProps?.marginLeft ?? DEFAULT_MARGIN);
|
|
97
|
-
setMarginRight(currentProps?.marginRight ?? DEFAULT_MARGIN);
|
|
98
|
-
};
|
|
99
|
-
$[0] = currentProps?.marginBottom;
|
|
100
|
-
$[1] = currentProps?.marginLeft;
|
|
101
|
-
$[2] = currentProps?.marginRight;
|
|
102
|
-
$[3] = currentProps?.marginTop;
|
|
103
|
-
$[4] = currentProps?.orientation;
|
|
104
|
-
$[5] = currentProps?.pageHeight;
|
|
105
|
-
$[6] = currentProps?.pageWidth;
|
|
106
|
-
$[7] = isOpen;
|
|
107
|
-
$[8] = t1;
|
|
108
|
-
} else t1 = $[8];
|
|
109
|
-
let t2;
|
|
110
|
-
if ($[9] !== currentProps || $[10] !== isOpen) {
|
|
111
|
-
t2 = [isOpen, currentProps];
|
|
112
|
-
$[9] = currentProps;
|
|
113
|
-
$[10] = isOpen;
|
|
114
|
-
$[11] = t2;
|
|
115
|
-
} else t2 = $[11];
|
|
116
|
-
useEffect(t1, t2);
|
|
117
|
-
let t3;
|
|
118
|
-
if ($[12] !== orientation) {
|
|
119
|
-
t3 = (index) => {
|
|
120
|
-
if (index < 0) return;
|
|
121
|
-
const size = PAGE_SIZES[index];
|
|
122
|
-
if (!size) return;
|
|
123
|
-
if (orientation === "landscape") {
|
|
124
|
-
setPageWidth(size.height);
|
|
125
|
-
setPageHeight(size.width);
|
|
126
|
-
} else {
|
|
127
|
-
setPageWidth(size.width);
|
|
128
|
-
setPageHeight(size.height);
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
$[12] = orientation;
|
|
132
|
-
$[13] = t3;
|
|
133
|
-
} else t3 = $[13];
|
|
134
|
-
const handlePageSizeChange = t3;
|
|
135
|
-
let t4;
|
|
136
|
-
if ($[14] !== orientation || $[15] !== pageHeight || $[16] !== pageWidth) {
|
|
137
|
-
t4 = (newOrientation) => {
|
|
138
|
-
if (newOrientation === orientation) return;
|
|
139
|
-
setOrientation(newOrientation);
|
|
140
|
-
setPageWidth(pageHeight);
|
|
141
|
-
setPageHeight(pageWidth);
|
|
142
|
-
};
|
|
143
|
-
$[14] = orientation;
|
|
144
|
-
$[15] = pageHeight;
|
|
145
|
-
$[16] = pageWidth;
|
|
146
|
-
$[17] = t4;
|
|
147
|
-
} else t4 = $[17];
|
|
148
|
-
const handleOrientationChange = t4;
|
|
149
|
-
let t5;
|
|
150
|
-
if ($[18] !== marginBottom || $[19] !== marginLeft || $[20] !== marginRight || $[21] !== marginTop || $[22] !== onApply || $[23] !== onClose || $[24] !== orientation || $[25] !== pageHeight || $[26] !== pageWidth) {
|
|
151
|
-
t5 = () => {
|
|
152
|
-
onApply({
|
|
153
|
-
pageWidth,
|
|
154
|
-
pageHeight,
|
|
155
|
-
orientation,
|
|
156
|
-
marginTop,
|
|
157
|
-
marginBottom,
|
|
158
|
-
marginLeft,
|
|
159
|
-
marginRight
|
|
160
|
-
});
|
|
161
|
-
onClose();
|
|
162
|
-
};
|
|
163
|
-
$[18] = marginBottom;
|
|
164
|
-
$[19] = marginLeft;
|
|
165
|
-
$[20] = marginRight;
|
|
166
|
-
$[21] = marginTop;
|
|
167
|
-
$[22] = onApply;
|
|
168
|
-
$[23] = onClose;
|
|
169
|
-
$[24] = orientation;
|
|
170
|
-
$[25] = pageHeight;
|
|
171
|
-
$[26] = pageWidth;
|
|
172
|
-
$[27] = t5;
|
|
173
|
-
} else t5 = $[27];
|
|
174
|
-
const handleApply = t5;
|
|
175
|
-
const sizeIndex = findPageSizeIndex(pageWidth, pageHeight);
|
|
176
|
-
const t6 = `${id}-ps-size`;
|
|
177
|
-
const t7 = `${id}-ps-orientation`;
|
|
178
|
-
const t8 = `${id}-ps-margin-top`;
|
|
179
|
-
const t9 = `${id}-ps-margin-bottom`;
|
|
180
|
-
const t10 = `${id}-ps-margin-left`;
|
|
181
|
-
const t11 = `${id}-ps-margin-right`;
|
|
182
|
-
let t12;
|
|
183
|
-
if ($[28] !== t10 || $[29] !== t11 || $[30] !== t6 || $[31] !== t7 || $[32] !== t8 || $[33] !== t9) {
|
|
184
|
-
t12 = {
|
|
185
|
-
size: t6,
|
|
186
|
-
orientation: t7,
|
|
187
|
-
marginTop: t8,
|
|
188
|
-
marginBottom: t9,
|
|
189
|
-
marginLeft: t10,
|
|
190
|
-
marginRight: t11
|
|
191
|
-
};
|
|
192
|
-
$[28] = t10;
|
|
193
|
-
$[29] = t11;
|
|
194
|
-
$[30] = t6;
|
|
195
|
-
$[31] = t7;
|
|
196
|
-
$[32] = t8;
|
|
197
|
-
$[33] = t9;
|
|
198
|
-
$[34] = t12;
|
|
199
|
-
} else t12 = $[34];
|
|
200
|
-
const fieldIds = t12;
|
|
201
|
-
let t13;
|
|
202
|
-
if ($[35] !== DialogBackdrop) {
|
|
203
|
-
t13 = /* @__PURE__ */ jsx(DialogBackdrop, { className: "fixed inset-0 z-[10000] bg-black/50" });
|
|
204
|
-
$[35] = DialogBackdrop;
|
|
205
|
-
$[36] = t13;
|
|
206
|
-
} else t13 = $[36];
|
|
207
|
-
let t14;
|
|
208
|
-
if ($[37] !== DialogTitle) {
|
|
209
|
-
t14 = /* @__PURE__ */ jsx(DialogTitle, {
|
|
210
|
-
className: "border-b px-5 py-3 text-base font-semibold",
|
|
211
|
-
children: "Page Setup"
|
|
212
|
-
});
|
|
213
|
-
$[37] = DialogTitle;
|
|
214
|
-
$[38] = t14;
|
|
215
|
-
} else t14 = $[38];
|
|
216
|
-
let t15;
|
|
217
|
-
if ($[39] === Symbol.for("react.memo_cache_sentinel")) {
|
|
218
|
-
t15 = /* @__PURE__ */ jsx("div", {
|
|
219
|
-
className: "text-muted-foreground text-xs font-semibold uppercase tracking-wide",
|
|
220
|
-
children: "Page Size"
|
|
221
|
-
});
|
|
222
|
-
$[39] = t15;
|
|
223
|
-
} else t15 = $[39];
|
|
224
|
-
let t16;
|
|
225
|
-
if ($[40] !== fieldIds.size) {
|
|
226
|
-
t16 = /* @__PURE__ */ jsx("label", {
|
|
227
|
-
htmlFor: fieldIds.size,
|
|
228
|
-
className: "w-20 text-muted-foreground text-[13px]",
|
|
229
|
-
children: "Size"
|
|
230
|
-
});
|
|
231
|
-
$[40] = fieldIds.size;
|
|
232
|
-
$[41] = t16;
|
|
233
|
-
} else t16 = $[41];
|
|
234
|
-
const t17 = fieldIds.size;
|
|
235
|
-
let t18;
|
|
236
|
-
if ($[42] !== handlePageSizeChange) {
|
|
237
|
-
t18 = (e) => handlePageSizeChange(Number(e.target.value));
|
|
238
|
-
$[42] = handlePageSizeChange;
|
|
239
|
-
$[43] = t18;
|
|
240
|
-
} else t18 = $[43];
|
|
241
|
-
let t19;
|
|
242
|
-
if ($[44] === Symbol.for("react.memo_cache_sentinel")) {
|
|
243
|
-
t19 = PAGE_SIZES.map(_temp);
|
|
244
|
-
$[44] = t19;
|
|
245
|
-
} else t19 = $[44];
|
|
246
|
-
let t20;
|
|
247
|
-
if ($[45] !== sizeIndex) {
|
|
248
|
-
t20 = sizeIndex < 0 && /* @__PURE__ */ jsx("option", {
|
|
249
|
-
value: -1,
|
|
250
|
-
children: "Custom"
|
|
251
|
-
});
|
|
252
|
-
$[45] = sizeIndex;
|
|
253
|
-
$[46] = t20;
|
|
254
|
-
} else t20 = $[46];
|
|
255
|
-
let t21;
|
|
256
|
-
if ($[47] !== fieldIds.size || $[48] !== sizeIndex || $[49] !== t18 || $[50] !== t20) {
|
|
257
|
-
t21 = /* @__PURE__ */ jsxs("select", {
|
|
258
|
-
id: t17,
|
|
259
|
-
className: "border-input bg-background text-foreground flex-1 rounded border px-2 py-1.5 text-[13px] outline-none",
|
|
260
|
-
value: sizeIndex,
|
|
261
|
-
onChange: t18,
|
|
262
|
-
children: [t19, t20]
|
|
263
|
-
});
|
|
264
|
-
$[47] = fieldIds.size;
|
|
265
|
-
$[48] = sizeIndex;
|
|
266
|
-
$[49] = t18;
|
|
267
|
-
$[50] = t20;
|
|
268
|
-
$[51] = t21;
|
|
269
|
-
} else t21 = $[51];
|
|
270
|
-
let t22;
|
|
271
|
-
if ($[52] !== t16 || $[53] !== t21) {
|
|
272
|
-
t22 = /* @__PURE__ */ jsxs("div", {
|
|
273
|
-
className: "flex items-center gap-3",
|
|
274
|
-
children: [t16, t21]
|
|
275
|
-
});
|
|
276
|
-
$[52] = t16;
|
|
277
|
-
$[53] = t21;
|
|
278
|
-
$[54] = t22;
|
|
279
|
-
} else t22 = $[54];
|
|
280
|
-
let t23;
|
|
281
|
-
if ($[55] !== fieldIds.orientation) {
|
|
282
|
-
t23 = /* @__PURE__ */ jsx("label", {
|
|
283
|
-
htmlFor: fieldIds.orientation,
|
|
284
|
-
className: "w-20 text-muted-foreground text-[13px]",
|
|
285
|
-
children: "Orientation"
|
|
286
|
-
});
|
|
287
|
-
$[55] = fieldIds.orientation;
|
|
288
|
-
$[56] = t23;
|
|
289
|
-
} else t23 = $[56];
|
|
290
|
-
let t24;
|
|
291
|
-
if ($[57] !== handleOrientationChange) {
|
|
292
|
-
t24 = (e_0) => handleOrientationChange(e_0.target.value);
|
|
293
|
-
$[57] = handleOrientationChange;
|
|
294
|
-
$[58] = t24;
|
|
295
|
-
} else t24 = $[58];
|
|
296
|
-
let t25;
|
|
297
|
-
let t26;
|
|
298
|
-
if ($[59] === Symbol.for("react.memo_cache_sentinel")) {
|
|
299
|
-
t25 = /* @__PURE__ */ jsx("option", {
|
|
300
|
-
value: "portrait",
|
|
301
|
-
children: "Portrait"
|
|
302
|
-
});
|
|
303
|
-
t26 = /* @__PURE__ */ jsx("option", {
|
|
304
|
-
value: "landscape",
|
|
305
|
-
children: "Landscape"
|
|
306
|
-
});
|
|
307
|
-
$[59] = t25;
|
|
308
|
-
$[60] = t26;
|
|
309
|
-
} else {
|
|
310
|
-
t25 = $[59];
|
|
311
|
-
t26 = $[60];
|
|
312
|
-
}
|
|
313
|
-
let t27;
|
|
314
|
-
if ($[61] !== fieldIds.orientation || $[62] !== orientation || $[63] !== t24) {
|
|
315
|
-
t27 = /* @__PURE__ */ jsxs("select", {
|
|
316
|
-
id: fieldIds.orientation,
|
|
317
|
-
className: "border-input bg-background text-foreground flex-1 rounded border px-2 py-1.5 text-[13px] outline-none",
|
|
318
|
-
value: orientation,
|
|
319
|
-
onChange: t24,
|
|
320
|
-
children: [t25, t26]
|
|
321
|
-
});
|
|
322
|
-
$[61] = fieldIds.orientation;
|
|
323
|
-
$[62] = orientation;
|
|
324
|
-
$[63] = t24;
|
|
325
|
-
$[64] = t27;
|
|
326
|
-
} else t27 = $[64];
|
|
327
|
-
let t28;
|
|
328
|
-
if ($[65] !== t23 || $[66] !== t27) {
|
|
329
|
-
t28 = /* @__PURE__ */ jsxs("div", {
|
|
330
|
-
className: "flex items-center gap-3",
|
|
331
|
-
children: [t23, t27]
|
|
332
|
-
});
|
|
333
|
-
$[65] = t23;
|
|
334
|
-
$[66] = t27;
|
|
335
|
-
$[67] = t28;
|
|
336
|
-
} else t28 = $[67];
|
|
337
|
-
let t29;
|
|
338
|
-
if ($[68] === Symbol.for("react.memo_cache_sentinel")) {
|
|
339
|
-
t29 = /* @__PURE__ */ jsx("div", {
|
|
340
|
-
className: "text-muted-foreground text-xs font-semibold uppercase tracking-wide mt-1",
|
|
341
|
-
children: "Margins"
|
|
342
|
-
});
|
|
343
|
-
$[68] = t29;
|
|
344
|
-
} else t29 = $[68];
|
|
345
|
-
let t30;
|
|
346
|
-
if ($[69] !== fieldIds.marginTop) {
|
|
347
|
-
t30 = /* @__PURE__ */ jsx("label", {
|
|
348
|
-
htmlFor: fieldIds.marginTop,
|
|
349
|
-
className: "w-20 text-muted-foreground text-[13px]",
|
|
350
|
-
children: "Top"
|
|
351
|
-
});
|
|
352
|
-
$[69] = fieldIds.marginTop;
|
|
353
|
-
$[70] = t30;
|
|
354
|
-
} else t30 = $[70];
|
|
355
|
-
const t31 = fieldIds.marginTop;
|
|
356
|
-
let t32;
|
|
357
|
-
if ($[71] !== marginTop) {
|
|
358
|
-
t32 = twipsToInches(marginTop);
|
|
359
|
-
$[71] = marginTop;
|
|
360
|
-
$[72] = t32;
|
|
361
|
-
} else t32 = $[72];
|
|
362
|
-
let t33;
|
|
363
|
-
if ($[73] === Symbol.for("react.memo_cache_sentinel")) {
|
|
364
|
-
t33 = (e_1) => setMarginTop(inchesToTwips(Number(e_1.target.value) || 0));
|
|
365
|
-
$[73] = t33;
|
|
366
|
-
} else t33 = $[73];
|
|
367
|
-
let t34;
|
|
368
|
-
if ($[74] !== fieldIds.marginTop || $[75] !== t32) {
|
|
369
|
-
t34 = /* @__PURE__ */ jsx("input", {
|
|
370
|
-
id: t31,
|
|
371
|
-
type: "number",
|
|
372
|
-
className: "border-input bg-background text-foreground flex-1 rounded border px-2 py-1.5 text-[13px] outline-none",
|
|
373
|
-
min: 0,
|
|
374
|
-
max: 10,
|
|
375
|
-
step: .1,
|
|
376
|
-
value: t32,
|
|
377
|
-
onChange: t33
|
|
378
|
-
});
|
|
379
|
-
$[74] = fieldIds.marginTop;
|
|
380
|
-
$[75] = t32;
|
|
381
|
-
$[76] = t34;
|
|
382
|
-
} else t34 = $[76];
|
|
383
|
-
let t35;
|
|
384
|
-
if ($[77] === Symbol.for("react.memo_cache_sentinel")) {
|
|
385
|
-
t35 = /* @__PURE__ */ jsx("span", {
|
|
386
|
-
className: "text-muted-foreground w-4 text-[11px]",
|
|
387
|
-
children: "in"
|
|
388
|
-
});
|
|
389
|
-
$[77] = t35;
|
|
390
|
-
} else t35 = $[77];
|
|
391
|
-
let t36;
|
|
392
|
-
if ($[78] !== t30 || $[79] !== t34) {
|
|
393
|
-
t36 = /* @__PURE__ */ jsxs("div", {
|
|
394
|
-
className: "flex items-center gap-3",
|
|
395
|
-
children: [
|
|
396
|
-
t30,
|
|
397
|
-
t34,
|
|
398
|
-
t35
|
|
399
|
-
]
|
|
400
|
-
});
|
|
401
|
-
$[78] = t30;
|
|
402
|
-
$[79] = t34;
|
|
403
|
-
$[80] = t36;
|
|
404
|
-
} else t36 = $[80];
|
|
405
|
-
let t37;
|
|
406
|
-
if ($[81] !== fieldIds.marginBottom) {
|
|
407
|
-
t37 = /* @__PURE__ */ jsx("label", {
|
|
408
|
-
htmlFor: fieldIds.marginBottom,
|
|
409
|
-
className: "w-20 text-muted-foreground text-[13px]",
|
|
410
|
-
children: "Bottom"
|
|
411
|
-
});
|
|
412
|
-
$[81] = fieldIds.marginBottom;
|
|
413
|
-
$[82] = t37;
|
|
414
|
-
} else t37 = $[82];
|
|
415
|
-
const t38 = fieldIds.marginBottom;
|
|
416
|
-
let t39;
|
|
417
|
-
if ($[83] !== marginBottom) {
|
|
418
|
-
t39 = twipsToInches(marginBottom);
|
|
419
|
-
$[83] = marginBottom;
|
|
420
|
-
$[84] = t39;
|
|
421
|
-
} else t39 = $[84];
|
|
422
|
-
let t40;
|
|
423
|
-
if ($[85] === Symbol.for("react.memo_cache_sentinel")) {
|
|
424
|
-
t40 = (e_2) => setMarginBottom(inchesToTwips(Number(e_2.target.value) || 0));
|
|
425
|
-
$[85] = t40;
|
|
426
|
-
} else t40 = $[85];
|
|
427
|
-
let t41;
|
|
428
|
-
if ($[86] !== fieldIds.marginBottom || $[87] !== t39) {
|
|
429
|
-
t41 = /* @__PURE__ */ jsx("input", {
|
|
430
|
-
id: t38,
|
|
431
|
-
type: "number",
|
|
432
|
-
className: "border-input bg-background text-foreground flex-1 rounded border px-2 py-1.5 text-[13px] outline-none",
|
|
433
|
-
min: 0,
|
|
434
|
-
max: 10,
|
|
435
|
-
step: .1,
|
|
436
|
-
value: t39,
|
|
437
|
-
onChange: t40
|
|
438
|
-
});
|
|
439
|
-
$[86] = fieldIds.marginBottom;
|
|
440
|
-
$[87] = t39;
|
|
441
|
-
$[88] = t41;
|
|
442
|
-
} else t41 = $[88];
|
|
443
|
-
let t42;
|
|
444
|
-
if ($[89] === Symbol.for("react.memo_cache_sentinel")) {
|
|
445
|
-
t42 = /* @__PURE__ */ jsx("span", {
|
|
446
|
-
className: "text-muted-foreground w-4 text-[11px]",
|
|
447
|
-
children: "in"
|
|
448
|
-
});
|
|
449
|
-
$[89] = t42;
|
|
450
|
-
} else t42 = $[89];
|
|
451
|
-
let t43;
|
|
452
|
-
if ($[90] !== t37 || $[91] !== t41) {
|
|
453
|
-
t43 = /* @__PURE__ */ jsxs("div", {
|
|
454
|
-
className: "flex items-center gap-3",
|
|
455
|
-
children: [
|
|
456
|
-
t37,
|
|
457
|
-
t41,
|
|
458
|
-
t42
|
|
459
|
-
]
|
|
460
|
-
});
|
|
461
|
-
$[90] = t37;
|
|
462
|
-
$[91] = t41;
|
|
463
|
-
$[92] = t43;
|
|
464
|
-
} else t43 = $[92];
|
|
465
|
-
let t44;
|
|
466
|
-
if ($[93] !== fieldIds.marginLeft) {
|
|
467
|
-
t44 = /* @__PURE__ */ jsx("label", {
|
|
468
|
-
htmlFor: fieldIds.marginLeft,
|
|
469
|
-
className: "w-20 text-muted-foreground text-[13px]",
|
|
470
|
-
children: "Left"
|
|
471
|
-
});
|
|
472
|
-
$[93] = fieldIds.marginLeft;
|
|
473
|
-
$[94] = t44;
|
|
474
|
-
} else t44 = $[94];
|
|
475
|
-
const t45 = fieldIds.marginLeft;
|
|
476
|
-
let t46;
|
|
477
|
-
if ($[95] !== marginLeft) {
|
|
478
|
-
t46 = twipsToInches(marginLeft);
|
|
479
|
-
$[95] = marginLeft;
|
|
480
|
-
$[96] = t46;
|
|
481
|
-
} else t46 = $[96];
|
|
482
|
-
let t47;
|
|
483
|
-
if ($[97] === Symbol.for("react.memo_cache_sentinel")) {
|
|
484
|
-
t47 = (e_3) => setMarginLeft(inchesToTwips(Number(e_3.target.value) || 0));
|
|
485
|
-
$[97] = t47;
|
|
486
|
-
} else t47 = $[97];
|
|
487
|
-
let t48;
|
|
488
|
-
if ($[98] !== fieldIds.marginLeft || $[99] !== t46) {
|
|
489
|
-
t48 = /* @__PURE__ */ jsx("input", {
|
|
490
|
-
id: t45,
|
|
491
|
-
type: "number",
|
|
492
|
-
className: "border-input bg-background text-foreground flex-1 rounded border px-2 py-1.5 text-[13px] outline-none",
|
|
493
|
-
min: 0,
|
|
494
|
-
max: 10,
|
|
495
|
-
step: .1,
|
|
496
|
-
value: t46,
|
|
497
|
-
onChange: t47
|
|
498
|
-
});
|
|
499
|
-
$[98] = fieldIds.marginLeft;
|
|
500
|
-
$[99] = t46;
|
|
501
|
-
$[100] = t48;
|
|
502
|
-
} else t48 = $[100];
|
|
503
|
-
let t49;
|
|
504
|
-
if ($[101] === Symbol.for("react.memo_cache_sentinel")) {
|
|
505
|
-
t49 = /* @__PURE__ */ jsx("span", {
|
|
506
|
-
className: "text-muted-foreground w-4 text-[11px]",
|
|
507
|
-
children: "in"
|
|
508
|
-
});
|
|
509
|
-
$[101] = t49;
|
|
510
|
-
} else t49 = $[101];
|
|
511
|
-
let t50;
|
|
512
|
-
if ($[102] !== t44 || $[103] !== t48) {
|
|
513
|
-
t50 = /* @__PURE__ */ jsxs("div", {
|
|
514
|
-
className: "flex items-center gap-3",
|
|
515
|
-
children: [
|
|
516
|
-
t44,
|
|
517
|
-
t48,
|
|
518
|
-
t49
|
|
519
|
-
]
|
|
520
|
-
});
|
|
521
|
-
$[102] = t44;
|
|
522
|
-
$[103] = t48;
|
|
523
|
-
$[104] = t50;
|
|
524
|
-
} else t50 = $[104];
|
|
525
|
-
let t51;
|
|
526
|
-
if ($[105] !== fieldIds.marginRight) {
|
|
527
|
-
t51 = /* @__PURE__ */ jsx("label", {
|
|
528
|
-
htmlFor: fieldIds.marginRight,
|
|
529
|
-
className: "w-20 text-muted-foreground text-[13px]",
|
|
530
|
-
children: "Right"
|
|
531
|
-
});
|
|
532
|
-
$[105] = fieldIds.marginRight;
|
|
533
|
-
$[106] = t51;
|
|
534
|
-
} else t51 = $[106];
|
|
535
|
-
const t52 = fieldIds.marginRight;
|
|
536
|
-
let t53;
|
|
537
|
-
if ($[107] !== marginRight) {
|
|
538
|
-
t53 = twipsToInches(marginRight);
|
|
539
|
-
$[107] = marginRight;
|
|
540
|
-
$[108] = t53;
|
|
541
|
-
} else t53 = $[108];
|
|
542
|
-
let t54;
|
|
543
|
-
if ($[109] === Symbol.for("react.memo_cache_sentinel")) {
|
|
544
|
-
t54 = (e_4) => setMarginRight(inchesToTwips(Number(e_4.target.value) || 0));
|
|
545
|
-
$[109] = t54;
|
|
546
|
-
} else t54 = $[109];
|
|
547
|
-
let t55;
|
|
548
|
-
if ($[110] !== fieldIds.marginRight || $[111] !== t53) {
|
|
549
|
-
t55 = /* @__PURE__ */ jsx("input", {
|
|
550
|
-
id: t52,
|
|
551
|
-
type: "number",
|
|
552
|
-
className: "border-input bg-background text-foreground flex-1 rounded border px-2 py-1.5 text-[13px] outline-none",
|
|
553
|
-
min: 0,
|
|
554
|
-
max: 10,
|
|
555
|
-
step: .1,
|
|
556
|
-
value: t53,
|
|
557
|
-
onChange: t54
|
|
558
|
-
});
|
|
559
|
-
$[110] = fieldIds.marginRight;
|
|
560
|
-
$[111] = t53;
|
|
561
|
-
$[112] = t55;
|
|
562
|
-
} else t55 = $[112];
|
|
563
|
-
let t56;
|
|
564
|
-
if ($[113] === Symbol.for("react.memo_cache_sentinel")) {
|
|
565
|
-
t56 = /* @__PURE__ */ jsx("span", {
|
|
566
|
-
className: "text-muted-foreground w-4 text-[11px]",
|
|
567
|
-
children: "in"
|
|
568
|
-
});
|
|
569
|
-
$[113] = t56;
|
|
570
|
-
} else t56 = $[113];
|
|
571
|
-
let t57;
|
|
572
|
-
if ($[114] !== t51 || $[115] !== t55) {
|
|
573
|
-
t57 = /* @__PURE__ */ jsxs("div", {
|
|
574
|
-
className: "flex items-center gap-3",
|
|
575
|
-
children: [
|
|
576
|
-
t51,
|
|
577
|
-
t55,
|
|
578
|
-
t56
|
|
579
|
-
]
|
|
580
|
-
});
|
|
581
|
-
$[114] = t51;
|
|
582
|
-
$[115] = t55;
|
|
583
|
-
$[116] = t57;
|
|
584
|
-
} else t57 = $[116];
|
|
585
|
-
let t58;
|
|
586
|
-
if ($[117] !== t22 || $[118] !== t28 || $[119] !== t36 || $[120] !== t43 || $[121] !== t50 || $[122] !== t57) {
|
|
587
|
-
t58 = /* @__PURE__ */ jsxs("div", {
|
|
588
|
-
className: "flex flex-col gap-3.5 px-5 py-4",
|
|
589
|
-
children: [
|
|
590
|
-
t15,
|
|
591
|
-
t22,
|
|
592
|
-
t28,
|
|
593
|
-
t29,
|
|
594
|
-
t36,
|
|
595
|
-
t43,
|
|
596
|
-
t50,
|
|
597
|
-
t57
|
|
598
|
-
]
|
|
599
|
-
});
|
|
600
|
-
$[117] = t22;
|
|
601
|
-
$[118] = t28;
|
|
602
|
-
$[119] = t36;
|
|
603
|
-
$[120] = t43;
|
|
604
|
-
$[121] = t50;
|
|
605
|
-
$[122] = t57;
|
|
606
|
-
$[123] = t58;
|
|
607
|
-
} else t58 = $[123];
|
|
608
|
-
let t59;
|
|
609
|
-
if ($[124] !== DialogClose) {
|
|
610
|
-
t59 = /* @__PURE__ */ jsx(DialogClose, {
|
|
611
|
-
className: "border-input rounded border px-4 py-1.5 text-[13px]",
|
|
612
|
-
children: "Cancel"
|
|
613
|
-
});
|
|
614
|
-
$[124] = DialogClose;
|
|
615
|
-
$[125] = t59;
|
|
616
|
-
} else t59 = $[125];
|
|
617
|
-
let t60;
|
|
618
|
-
if ($[126] !== handleApply) {
|
|
619
|
-
t60 = /* @__PURE__ */ jsx("button", {
|
|
620
|
-
className: "bg-primary text-primary-foreground rounded px-4 py-1.5 text-[13px] font-medium",
|
|
621
|
-
onClick: handleApply,
|
|
622
|
-
type: "button",
|
|
623
|
-
children: "Apply"
|
|
624
|
-
});
|
|
625
|
-
$[126] = handleApply;
|
|
626
|
-
$[127] = t60;
|
|
627
|
-
} else t60 = $[127];
|
|
628
|
-
let t61;
|
|
629
|
-
if ($[128] !== t59 || $[129] !== t60) {
|
|
630
|
-
t61 = /* @__PURE__ */ jsxs("div", {
|
|
631
|
-
className: "flex justify-end gap-2 border-t px-5 py-3",
|
|
632
|
-
children: [t59, t60]
|
|
633
|
-
});
|
|
634
|
-
$[128] = t59;
|
|
635
|
-
$[129] = t60;
|
|
636
|
-
$[130] = t61;
|
|
637
|
-
} else t61 = $[130];
|
|
638
|
-
let t62;
|
|
639
|
-
if ($[131] !== DialogPopup || $[132] !== t14 || $[133] !== t58 || $[134] !== t61) {
|
|
640
|
-
t62 = /* @__PURE__ */ jsxs(DialogPopup, {
|
|
641
|
-
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",
|
|
642
|
-
children: [
|
|
643
|
-
t14,
|
|
644
|
-
t58,
|
|
645
|
-
t61
|
|
646
|
-
]
|
|
647
|
-
});
|
|
648
|
-
$[131] = DialogPopup;
|
|
649
|
-
$[132] = t14;
|
|
650
|
-
$[133] = t58;
|
|
651
|
-
$[134] = t61;
|
|
652
|
-
$[135] = t62;
|
|
653
|
-
} else t62 = $[135];
|
|
654
|
-
let t63;
|
|
655
|
-
if ($[136] !== DialogPortal || $[137] !== t13 || $[138] !== t62) {
|
|
656
|
-
t63 = /* @__PURE__ */ jsxs(DialogPortal, { children: [t13, t62] });
|
|
657
|
-
$[136] = DialogPortal;
|
|
658
|
-
$[137] = t13;
|
|
659
|
-
$[138] = t62;
|
|
660
|
-
$[139] = t63;
|
|
661
|
-
} else t63 = $[139];
|
|
662
|
-
let t64;
|
|
663
|
-
if ($[140] !== Dialog || $[141] !== handleOpenChange || $[142] !== isOpen || $[143] !== t63) {
|
|
664
|
-
t64 = /* @__PURE__ */ jsx(Dialog, {
|
|
665
|
-
open: isOpen,
|
|
666
|
-
onOpenChange: handleOpenChange,
|
|
667
|
-
children: t63
|
|
668
|
-
});
|
|
669
|
-
$[140] = Dialog;
|
|
670
|
-
$[141] = handleOpenChange;
|
|
671
|
-
$[142] = isOpen;
|
|
672
|
-
$[143] = t63;
|
|
673
|
-
$[144] = t64;
|
|
674
|
-
} else t64 = $[144];
|
|
675
|
-
return t64;
|
|
676
|
-
}
|
|
677
|
-
function _temp(size_0, i) {
|
|
678
|
-
return /* @__PURE__ */ jsx("option", {
|
|
679
|
-
value: i,
|
|
680
|
-
children: size_0.label
|
|
681
|
-
}, size_0.label);
|
|
682
|
-
}
|
|
683
|
-
//#endregion
|
|
684
|
-
export { PageSetupDialog_exports as n, PageSetupDialog as t };
|