@tatamicks/core 1.0.2 → 1.0.4
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/PalettePanel-BTB1LkgU.cjs +9 -0
- package/dist/PalettePanel-BTB1LkgU.cjs.map +1 -0
- package/dist/{PalettePanel-Cigl9i1N.js → PalettePanel-CrA2BGLq.js} +961 -959
- package/dist/PalettePanel-CrA2BGLq.js.map +1 -0
- package/dist/PalettePanel.css +1 -1
- package/dist/canvas.cjs +1 -1
- package/dist/canvas.mjs +4 -4
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.mjs +352 -343
- package/dist/index.mjs.map +1 -1
- package/dist/{paperSettingsWidget-DvtghSA5.js → paperSettingsWidget-CAIw_Ofm.js} +1582 -1535
- package/dist/paperSettingsWidget-CAIw_Ofm.js.map +1 -0
- package/dist/paperSettingsWidget-CIRKgnz4.cjs +2 -0
- package/dist/paperSettingsWidget-CIRKgnz4.cjs.map +1 -0
- package/dist/shell.cjs +1 -1
- package/dist/shell.mjs +2 -2
- package/dist/sidebarPortal-Bigm11qq.js +880 -0
- package/dist/sidebarPortal-Bigm11qq.js.map +1 -0
- package/dist/sidebarPortal-Dit8f3sD.cjs +3 -0
- package/dist/sidebarPortal-Dit8f3sD.cjs.map +1 -0
- package/dist/src/canvas.d.ts +4 -0
- package/dist/src/index.d.ts +5 -3
- package/dist/src/shell.d.ts +3 -1
- package/package.json +1 -1
- package/dist/PalettePanel-BMZ6dfI3.cjs +0 -9
- package/dist/PalettePanel-BMZ6dfI3.cjs.map +0 -1
- package/dist/PalettePanel-Cigl9i1N.js.map +0 -1
- package/dist/paperSettingsWidget-7766a5Fe.cjs +0 -2
- package/dist/paperSettingsWidget-7766a5Fe.cjs.map +0 -1
- package/dist/paperSettingsWidget-DvtghSA5.js.map +0 -1
- package/dist/sidebarPortal-BN6FVwaF.js +0 -870
- package/dist/sidebarPortal-BN6FVwaF.js.map +0 -1
- package/dist/sidebarPortal-Cr-dLvA_.cjs +0 -3
- package/dist/sidebarPortal-Cr-dLvA_.cjs.map +0 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { jsx as t, jsxs as p, Fragment as
|
|
2
|
-
import { useCallback as y, useState as O, useRef as
|
|
3
|
-
import { Z as
|
|
4
|
-
import { createPortal as
|
|
5
|
-
import './PalettePanel.css';const
|
|
6
|
-
container:
|
|
7
|
-
section:
|
|
8
|
-
divider:
|
|
9
|
-
sectionLabel:
|
|
10
|
-
select:
|
|
11
|
-
numberInput:
|
|
12
|
-
heightModeSwitch:
|
|
13
|
-
switchLabel:
|
|
14
|
-
switchLabelActive:
|
|
15
|
-
toggle:
|
|
16
|
-
thumb:
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
const
|
|
1
|
+
import { jsx as t, jsxs as p, Fragment as se } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback as y, useState as O, useRef as ae, useEffect as me, useContext as ze, createContext as _t, useMemo as ne, memo as ge, useId as sn } from "react";
|
|
3
|
+
import { Z as xt, a9 as wt, a6 as Nt, aa as Ct, a7 as St, P as F, e as It, O as K, L as ue, B as rn, ab as cn, y as dn, X as hn, F as un, r as _e, K as pn, w as Oe, H as Ae, V as Me, a as mn, ac as bn, s as ht, f as fn, h as ut, n as vn, u as gn, b as yn, E as _n, N as xn } from "./sidebarPortal-Bigm11qq.js";
|
|
4
|
+
import { createPortal as $t } from "react-dom";
|
|
5
|
+
import './PalettePanel.css';const wn = "_container_zau2f_4", Nn = "_section_zau2f_17", Cn = "_divider_zau2f_24", Sn = "_sectionLabel_zau2f_32", In = "_select_zau2f_39", $n = "_numberInput_zau2f_60", Ln = "_heightModeSwitch_zau2f_88", kn = "_switchLabel_zau2f_94", Tn = "_switchLabelActive_zau2f_102", En = "_toggle_zau2f_106", An = "_thumb_zau2f_123", D = {
|
|
6
|
+
container: wn,
|
|
7
|
+
section: Nn,
|
|
8
|
+
divider: Cn,
|
|
9
|
+
sectionLabel: Sn,
|
|
10
|
+
select: In,
|
|
11
|
+
numberInput: $n,
|
|
12
|
+
heightModeSwitch: Ln,
|
|
13
|
+
switchLabel: kn,
|
|
14
|
+
switchLabelActive: Tn,
|
|
15
|
+
toggle: En,
|
|
16
|
+
thumb: An
|
|
17
|
+
}, Mn = (e) => /* @__PURE__ */ t("div", { className: D.divider, "aria-hidden": "true" });
|
|
18
|
+
Mn.displayName = "ActionBarDivider";
|
|
19
|
+
const Qe = ({ size: e = 16, ...n }) => /* @__PURE__ */ p(
|
|
20
20
|
"svg",
|
|
21
21
|
{
|
|
22
22
|
viewBox: "0 0 16 16",
|
|
@@ -35,8 +35,8 @@ const Xe = ({ size: e = 16, ...n }) => /* @__PURE__ */ p(
|
|
|
35
35
|
]
|
|
36
36
|
}
|
|
37
37
|
);
|
|
38
|
-
|
|
39
|
-
const
|
|
38
|
+
Qe.displayName = "UndoIcon";
|
|
39
|
+
const et = ({ size: e = 16, ...n }) => /* @__PURE__ */ p(
|
|
40
40
|
"svg",
|
|
41
41
|
{
|
|
42
42
|
viewBox: "0 0 16 16",
|
|
@@ -55,8 +55,8 @@ const Qe = ({ size: e = 16, ...n }) => /* @__PURE__ */ p(
|
|
|
55
55
|
]
|
|
56
56
|
}
|
|
57
57
|
);
|
|
58
|
-
|
|
59
|
-
const
|
|
58
|
+
et.displayName = "RedoIcon";
|
|
59
|
+
const tt = ({ size: e = 16, ...n }) => /* @__PURE__ */ p(
|
|
60
60
|
"svg",
|
|
61
61
|
{
|
|
62
62
|
viewBox: "0 0 16 16",
|
|
@@ -78,8 +78,8 @@ const et = ({ size: e = 16, ...n }) => /* @__PURE__ */ p(
|
|
|
78
78
|
]
|
|
79
79
|
}
|
|
80
80
|
);
|
|
81
|
-
|
|
82
|
-
const
|
|
81
|
+
tt.displayName = "TrashIcon";
|
|
82
|
+
const nt = ({ size: e = 16, ...n }) => /* @__PURE__ */ p(
|
|
83
83
|
"svg",
|
|
84
84
|
{
|
|
85
85
|
viewBox: "0 0 16 16",
|
|
@@ -98,7 +98,7 @@ const tt = ({ size: e = 16, ...n }) => /* @__PURE__ */ p(
|
|
|
98
98
|
]
|
|
99
99
|
}
|
|
100
100
|
);
|
|
101
|
-
|
|
101
|
+
nt.displayName = "CopyIcon";
|
|
102
102
|
const Be = ({ size: e = 16, ...n }) => /* @__PURE__ */ p(
|
|
103
103
|
"svg",
|
|
104
104
|
{
|
|
@@ -121,7 +121,7 @@ const Be = ({ size: e = 16, ...n }) => /* @__PURE__ */ p(
|
|
|
121
121
|
}
|
|
122
122
|
);
|
|
123
123
|
Be.displayName = "PasteIcon";
|
|
124
|
-
const
|
|
124
|
+
const lt = ({ size: e = 16, ...n }) => /* @__PURE__ */ p(
|
|
125
125
|
"svg",
|
|
126
126
|
{
|
|
127
127
|
viewBox: "0 0 16 16",
|
|
@@ -140,8 +140,8 @@ const nt = ({ size: e = 16, ...n }) => /* @__PURE__ */ p(
|
|
|
140
140
|
]
|
|
141
141
|
}
|
|
142
142
|
);
|
|
143
|
-
|
|
144
|
-
const
|
|
143
|
+
lt.displayName = "DuplicateIcon";
|
|
144
|
+
const Lt = ({ size: e = 16, ...n }) => /* @__PURE__ */ p(
|
|
145
145
|
"svg",
|
|
146
146
|
{
|
|
147
147
|
viewBox: "0 0 16 16",
|
|
@@ -173,8 +173,8 @@ const It = ({ size: e = 16, ...n }) => /* @__PURE__ */ p(
|
|
|
173
173
|
]
|
|
174
174
|
}
|
|
175
175
|
);
|
|
176
|
-
|
|
177
|
-
const
|
|
176
|
+
Lt.displayName = "PrintIcon";
|
|
177
|
+
const kt = ({ size: e = 16, ...n }) => /* @__PURE__ */ p(
|
|
178
178
|
"svg",
|
|
179
179
|
{
|
|
180
180
|
viewBox: "0 0 16 16",
|
|
@@ -195,8 +195,8 @@ const $t = ({ size: e = 16, ...n }) => /* @__PURE__ */ p(
|
|
|
195
195
|
]
|
|
196
196
|
}
|
|
197
197
|
);
|
|
198
|
-
|
|
199
|
-
const
|
|
198
|
+
kt.displayName = "StyleIcon";
|
|
199
|
+
const Tt = ({ size: e = 16, ...n }) => /* @__PURE__ */ p(
|
|
200
200
|
"svg",
|
|
201
201
|
{
|
|
202
202
|
viewBox: "0 0 16 16",
|
|
@@ -216,8 +216,8 @@ const Lt = ({ size: e = 16, ...n }) => /* @__PURE__ */ p(
|
|
|
216
216
|
]
|
|
217
217
|
}
|
|
218
218
|
);
|
|
219
|
-
|
|
220
|
-
const
|
|
219
|
+
Tt.displayName = "LayoutIcon";
|
|
220
|
+
const Et = ({ size: e = 16, ...n }) => /* @__PURE__ */ p(
|
|
221
221
|
"svg",
|
|
222
222
|
{
|
|
223
223
|
viewBox: "0 0 16 16",
|
|
@@ -240,8 +240,8 @@ const kt = ({ size: e = 16, ...n }) => /* @__PURE__ */ p(
|
|
|
240
240
|
]
|
|
241
241
|
}
|
|
242
242
|
);
|
|
243
|
-
|
|
244
|
-
const
|
|
243
|
+
Et.displayName = "BlockSettingsIcon";
|
|
244
|
+
const Pn = ({ size: e = 16, ...n }) => /* @__PURE__ */ t(
|
|
245
245
|
"svg",
|
|
246
246
|
{
|
|
247
247
|
viewBox: "0 0 24 24",
|
|
@@ -253,8 +253,8 @@ const En = ({ size: e = 16, ...n }) => /* @__PURE__ */ t(
|
|
|
253
253
|
children: /* @__PURE__ */ t("path", { d: "M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z" })
|
|
254
254
|
}
|
|
255
255
|
);
|
|
256
|
-
|
|
257
|
-
const
|
|
256
|
+
Pn.displayName = "ChevronLeftIcon";
|
|
257
|
+
const Dn = ({ size: e = 16, ...n }) => /* @__PURE__ */ t(
|
|
258
258
|
"svg",
|
|
259
259
|
{
|
|
260
260
|
viewBox: "0 0 24 24",
|
|
@@ -266,8 +266,8 @@ const An = ({ size: e = 16, ...n }) => /* @__PURE__ */ t(
|
|
|
266
266
|
children: /* @__PURE__ */ t("path", { d: "M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" })
|
|
267
267
|
}
|
|
268
268
|
);
|
|
269
|
-
|
|
270
|
-
const
|
|
269
|
+
Dn.displayName = "ChevronRightIcon";
|
|
270
|
+
const zn = ({ size: e = 16, ...n }) => /* @__PURE__ */ t(
|
|
271
271
|
"svg",
|
|
272
272
|
{
|
|
273
273
|
viewBox: "0 0 24 24",
|
|
@@ -279,8 +279,8 @@ const Mn = ({ size: e = 16, ...n }) => /* @__PURE__ */ t(
|
|
|
279
279
|
children: /* @__PURE__ */ t("path", { d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" })
|
|
280
280
|
}
|
|
281
281
|
);
|
|
282
|
-
|
|
283
|
-
const
|
|
282
|
+
zn.displayName = "AddPageIcon";
|
|
283
|
+
const Bn = ({ size: e = 16, ...n }) => /* @__PURE__ */ t(
|
|
284
284
|
"svg",
|
|
285
285
|
{
|
|
286
286
|
viewBox: "0 0 24 24",
|
|
@@ -292,8 +292,8 @@ const Dn = ({ size: e = 16, ...n }) => /* @__PURE__ */ t(
|
|
|
292
292
|
children: /* @__PURE__ */ t("path", { d: "M19 13H5v-2h14v2z" })
|
|
293
293
|
}
|
|
294
294
|
);
|
|
295
|
-
|
|
296
|
-
const
|
|
295
|
+
Bn.displayName = "DeletePageIcon";
|
|
296
|
+
const Rn = {
|
|
297
297
|
undo: {
|
|
298
298
|
actionId: "undo",
|
|
299
299
|
message: "元に戻しました",
|
|
@@ -354,11 +354,11 @@ const Pn = {
|
|
|
354
354
|
message: "ページを削除しました",
|
|
355
355
|
shortcut: null
|
|
356
356
|
}
|
|
357
|
-
},
|
|
358
|
-
container:
|
|
359
|
-
input:
|
|
360
|
-
label:
|
|
361
|
-
},
|
|
357
|
+
}, it = (e) => Rn[e], Wn = "_container_1tnp6_5", On = "_input_1tnp6_13", Fn = "_label_1tnp6_29", Fe = {
|
|
358
|
+
container: Wn,
|
|
359
|
+
input: On,
|
|
360
|
+
label: Fn
|
|
361
|
+
}, oe = ({
|
|
362
362
|
value: e,
|
|
363
363
|
onChange: n,
|
|
364
364
|
readOnly: i = !1,
|
|
@@ -371,34 +371,34 @@ const Pn = {
|
|
|
371
371
|
},
|
|
372
372
|
[n]
|
|
373
373
|
);
|
|
374
|
-
return /* @__PURE__ */ p("label", { className:
|
|
374
|
+
return /* @__PURE__ */ p("label", { className: Fe.container, children: [
|
|
375
375
|
/* @__PURE__ */ t(
|
|
376
376
|
"input",
|
|
377
377
|
{
|
|
378
378
|
type: "checkbox",
|
|
379
|
-
className:
|
|
379
|
+
className: Fe.input,
|
|
380
380
|
checked: !!e,
|
|
381
381
|
onChange: c,
|
|
382
382
|
disabled: i
|
|
383
383
|
}
|
|
384
384
|
),
|
|
385
|
-
o && /* @__PURE__ */ t("span", { className:
|
|
385
|
+
o && /* @__PURE__ */ t("span", { className: Fe.label, children: o })
|
|
386
386
|
] });
|
|
387
387
|
};
|
|
388
|
-
|
|
389
|
-
const
|
|
390
|
-
header:
|
|
391
|
-
title:
|
|
392
|
-
actions:
|
|
393
|
-
titleGroup:
|
|
394
|
-
infoIcon:
|
|
395
|
-
chevron:
|
|
396
|
-
chevronOpen:
|
|
397
|
-
statusBadge:
|
|
398
|
-
statusBadgeOn:
|
|
399
|
-
statusBadgeOff:
|
|
400
|
-
content:
|
|
401
|
-
contentNoPadding:
|
|
388
|
+
oe.displayName = "Checkbox";
|
|
389
|
+
const jn = "_header_1c1mq_6", Un = "_title_1c1mq_32", Vn = "_actions_1c1mq_43", qn = "_titleGroup_1c1mq_49", Gn = "_infoIcon_1c1mq_60", Hn = "_chevron_1c1mq_84", Kn = "_chevronOpen_1c1mq_92", Zn = "_statusBadge_1c1mq_98", Yn = "_statusBadgeOn_1c1mq_108", Jn = "_statusBadgeOff_1c1mq_113", Xn = "_content_1c1mq_120", Qn = "_contentNoPadding_1c1mq_127", R = {
|
|
390
|
+
header: jn,
|
|
391
|
+
title: Un,
|
|
392
|
+
actions: Vn,
|
|
393
|
+
titleGroup: qn,
|
|
394
|
+
infoIcon: Gn,
|
|
395
|
+
chevron: Hn,
|
|
396
|
+
chevronOpen: Kn,
|
|
397
|
+
statusBadge: Zn,
|
|
398
|
+
statusBadgeOn: Yn,
|
|
399
|
+
statusBadgeOff: Jn,
|
|
400
|
+
content: Xn,
|
|
401
|
+
contentNoPadding: Qn
|
|
402
402
|
}, V = ({
|
|
403
403
|
title: e,
|
|
404
404
|
children: n,
|
|
@@ -412,27 +412,27 @@ const Rn = "_header_1c1mq_6", On = "_title_1c1mq_32", Fn = "_actions_1c1mq_43",
|
|
|
412
412
|
closeLabel: d,
|
|
413
413
|
noPadding: u = !1
|
|
414
414
|
}) => {
|
|
415
|
-
const [h,
|
|
415
|
+
const [h, v] = O(
|
|
416
416
|
i ? l : !1
|
|
417
|
-
),
|
|
417
|
+
), f = a !== void 0, m = f ? !a : h, g = () => {
|
|
418
418
|
const $ = m;
|
|
419
|
-
|
|
420
|
-
}, _ = !i || !m, w = u ?
|
|
421
|
-
return /* @__PURE__ */ p("div", { className:
|
|
419
|
+
f || v(!$), o == null || o($);
|
|
420
|
+
}, _ = !i || !m, w = u ? R.contentNoPadding : R.content, L = i ? m ? d : s : void 0;
|
|
421
|
+
return /* @__PURE__ */ p("div", { className: R.section, children: [
|
|
422
422
|
i ? /* @__PURE__ */ p(
|
|
423
423
|
"button",
|
|
424
424
|
{
|
|
425
425
|
type: "button",
|
|
426
|
-
className:
|
|
426
|
+
className: R.header,
|
|
427
427
|
onClick: g,
|
|
428
428
|
"aria-expanded": !m,
|
|
429
429
|
children: [
|
|
430
|
-
/* @__PURE__ */ p("span", { className:
|
|
431
|
-
/* @__PURE__ */ t("span", { className:
|
|
430
|
+
/* @__PURE__ */ p("span", { className: R.titleGroup, children: [
|
|
431
|
+
/* @__PURE__ */ t("span", { className: R.title, children: e }),
|
|
432
432
|
c && /* @__PURE__ */ t(
|
|
433
433
|
"span",
|
|
434
434
|
{
|
|
435
|
-
className:
|
|
435
|
+
className: R.infoIcon,
|
|
436
436
|
title: c,
|
|
437
437
|
role: "img",
|
|
438
438
|
"aria-label": c,
|
|
@@ -444,7 +444,7 @@ const Rn = "_header_1c1mq_6", On = "_title_1c1mq_32", Fn = "_actions_1c1mq_43",
|
|
|
444
444
|
"span",
|
|
445
445
|
{
|
|
446
446
|
role: "none",
|
|
447
|
-
className:
|
|
447
|
+
className: R.actions,
|
|
448
448
|
onClick: ($) => $.stopPropagation(),
|
|
449
449
|
children: r
|
|
450
450
|
}
|
|
@@ -452,7 +452,7 @@ const Rn = "_header_1c1mq_6", On = "_title_1c1mq_32", Fn = "_actions_1c1mq_43",
|
|
|
452
452
|
L && /* @__PURE__ */ t(
|
|
453
453
|
"span",
|
|
454
454
|
{
|
|
455
|
-
className: `${
|
|
455
|
+
className: `${R.statusBadge} ${m ? R.statusBadgeOff : R.statusBadgeOn}`,
|
|
456
456
|
"aria-hidden": "true",
|
|
457
457
|
children: L
|
|
458
458
|
}
|
|
@@ -460,20 +460,20 @@ const Rn = "_header_1c1mq_6", On = "_title_1c1mq_32", Fn = "_actions_1c1mq_43",
|
|
|
460
460
|
/* @__PURE__ */ t(
|
|
461
461
|
"span",
|
|
462
462
|
{
|
|
463
|
-
className: `${
|
|
463
|
+
className: `${R.chevron} ${m ? "" : R.chevronOpen}`,
|
|
464
464
|
"aria-hidden": !0,
|
|
465
465
|
children: "▾"
|
|
466
466
|
}
|
|
467
467
|
)
|
|
468
468
|
]
|
|
469
469
|
}
|
|
470
|
-
) : /* @__PURE__ */ p("div", { className:
|
|
471
|
-
/* @__PURE__ */ p("span", { className:
|
|
472
|
-
/* @__PURE__ */ t("span", { className:
|
|
470
|
+
) : /* @__PURE__ */ p("div", { className: R.header, children: [
|
|
471
|
+
/* @__PURE__ */ p("span", { className: R.titleGroup, children: [
|
|
472
|
+
/* @__PURE__ */ t("span", { className: R.title, children: e }),
|
|
473
473
|
c && /* @__PURE__ */ t(
|
|
474
474
|
"span",
|
|
475
475
|
{
|
|
476
|
-
className:
|
|
476
|
+
className: R.infoIcon,
|
|
477
477
|
title: c,
|
|
478
478
|
role: "img",
|
|
479
479
|
"aria-label": c,
|
|
@@ -481,13 +481,13 @@ const Rn = "_header_1c1mq_6", On = "_title_1c1mq_32", Fn = "_actions_1c1mq_43",
|
|
|
481
481
|
}
|
|
482
482
|
)
|
|
483
483
|
] }),
|
|
484
|
-
r && /* @__PURE__ */ t("span", { className:
|
|
484
|
+
r && /* @__PURE__ */ t("span", { className: R.actions, children: r })
|
|
485
485
|
] }),
|
|
486
486
|
_ && /* @__PURE__ */ t("div", { className: w, children: n })
|
|
487
487
|
] });
|
|
488
488
|
};
|
|
489
489
|
V.displayName = "CollapsibleSection";
|
|
490
|
-
function
|
|
490
|
+
function ke(e) {
|
|
491
491
|
if (!e)
|
|
492
492
|
return null;
|
|
493
493
|
const n = e.match(/^#([0-9a-f]{6}|[0-9a-f]{8})$/i);
|
|
@@ -504,7 +504,7 @@ function Le(e) {
|
|
|
504
504
|
}
|
|
505
505
|
return null;
|
|
506
506
|
}
|
|
507
|
-
function
|
|
507
|
+
function el(e) {
|
|
508
508
|
const { r: n, g: i, b: l, a } = e;
|
|
509
509
|
if (a === 0)
|
|
510
510
|
return;
|
|
@@ -515,7 +515,7 @@ function Jn(e) {
|
|
|
515
515
|
}
|
|
516
516
|
return `#${o}${c}${r}`;
|
|
517
517
|
}
|
|
518
|
-
const
|
|
518
|
+
const tl = [
|
|
519
519
|
{ label: "無色", value: void 0 },
|
|
520
520
|
{ label: "白", value: "#ffffff" },
|
|
521
521
|
{ label: "グレー1", value: "#efefef" },
|
|
@@ -546,31 +546,31 @@ const Xn = [
|
|
|
546
546
|
{ label: "青紫", value: "#9FC5E8" },
|
|
547
547
|
{ label: "紫", value: "#B4A7D6" },
|
|
548
548
|
{ label: "赤紫", value: "#D5A6BD" }
|
|
549
|
-
],
|
|
550
|
-
container:
|
|
551
|
-
colorButton:
|
|
552
|
-
textInputWrapper:
|
|
553
|
-
textInputPrefix:
|
|
554
|
-
textInput:
|
|
555
|
-
popover:
|
|
556
|
-
palette:
|
|
557
|
-
paletteButton:
|
|
558
|
-
selected:
|
|
559
|
-
transparentPaletteButton:
|
|
560
|
-
rgbaInputs:
|
|
561
|
-
rgbaInputGroup:
|
|
562
|
-
rgbaLabel:
|
|
563
|
-
},
|
|
549
|
+
], nl = "_container_1cdzu_5", ll = "_colorButton_1cdzu_13", il = "_textInputWrapper_1cdzu_40", al = "_textInputPrefix_1cdzu_62", ol = "_textInput_1cdzu_40", sl = "_popover_1cdzu_96", rl = "_palette_1cdzu_112", cl = "_paletteButton_1cdzu_119", dl = "_selected_1cdzu_142", hl = "_transparentPaletteButton_1cdzu_148", ul = "_rgbaInputs_1cdzu_154", pl = "_rgbaInputGroup_1cdzu_161", ml = "_rgbaLabel_1cdzu_175", B = {
|
|
550
|
+
container: nl,
|
|
551
|
+
colorButton: ll,
|
|
552
|
+
textInputWrapper: il,
|
|
553
|
+
textInputPrefix: al,
|
|
554
|
+
textInput: ol,
|
|
555
|
+
popover: sl,
|
|
556
|
+
palette: rl,
|
|
557
|
+
paletteButton: cl,
|
|
558
|
+
selected: dl,
|
|
559
|
+
transparentPaletteButton: hl,
|
|
560
|
+
rgbaInputs: ul,
|
|
561
|
+
rgbaInputGroup: pl,
|
|
562
|
+
rgbaLabel: ml
|
|
563
|
+
}, At = ({
|
|
564
564
|
onColorSelect: e,
|
|
565
565
|
selectedColor: n,
|
|
566
566
|
readOnly: i = !1
|
|
567
|
-
}) => /* @__PURE__ */ t("div", { className:
|
|
567
|
+
}) => /* @__PURE__ */ t("div", { className: B.palette, children: tl.map((l, a) => {
|
|
568
568
|
const o = l.value === void 0, c = l.value === n, r = o ? {} : { backgroundColor: l.value };
|
|
569
569
|
return /* @__PURE__ */ t(
|
|
570
570
|
"button",
|
|
571
571
|
{
|
|
572
572
|
type: "button",
|
|
573
|
-
className: `${
|
|
573
|
+
className: `${B.paletteButton} ${o ? B.transparentPaletteButton : ""} ${c ? B.selected : ""}`,
|
|
574
574
|
onClick: () => e(l.value),
|
|
575
575
|
disabled: i,
|
|
576
576
|
title: l.label,
|
|
@@ -580,9 +580,9 @@ const Xn = [
|
|
|
580
580
|
l.value ?? `undefined-${a}`
|
|
581
581
|
);
|
|
582
582
|
}) });
|
|
583
|
-
|
|
584
|
-
const
|
|
585
|
-
input:
|
|
583
|
+
At.displayName = "ColorPalette";
|
|
584
|
+
const bl = "_input_14n56_5", fl = {
|
|
585
|
+
input: bl
|
|
586
586
|
}, G = ({
|
|
587
587
|
value: e,
|
|
588
588
|
onChange: n,
|
|
@@ -596,9 +596,9 @@ const ul = "_input_14n56_5", pl = {
|
|
|
596
596
|
height: d,
|
|
597
597
|
ariaLabel: u,
|
|
598
598
|
config: h,
|
|
599
|
-
onBlur:
|
|
599
|
+
onBlur: v
|
|
600
600
|
}) => {
|
|
601
|
-
const
|
|
601
|
+
const f = l ?? (h == null ? void 0 : h.min) ?? 1, m = a ?? (h == null ? void 0 : h.max), g = o ?? (h == null ? void 0 : h.step) ?? 1, _ = c ?? (h == null ? void 0 : h.integer) ?? !1, w = r ?? (h == null ? void 0 : h.placeholder), L = s ?? (h == null ? void 0 : h.width), $ = d ?? (h == null ? void 0 : h.height), k = y(
|
|
602
602
|
(S) => {
|
|
603
603
|
const b = S.target.value;
|
|
604
604
|
if (b === "") {
|
|
@@ -606,21 +606,21 @@ const ul = "_input_14n56_5", pl = {
|
|
|
606
606
|
return;
|
|
607
607
|
}
|
|
608
608
|
let x = Number.parseFloat(b);
|
|
609
|
-
Number.isNaN(x) || (_ && (x = Math.round(x)),
|
|
609
|
+
Number.isNaN(x) || (_ && (x = Math.round(x)), f !== void 0 && x < f && (x = f), m !== void 0 && x > m && (x = m), n(x));
|
|
610
610
|
},
|
|
611
|
-
[n,
|
|
611
|
+
[n, f, m, _]
|
|
612
612
|
), I = {};
|
|
613
613
|
return L !== void 0 && (I.width = `${L}px`), $ !== void 0 && (I.height = `${$}px`, I.paddingTop = 0, I.paddingBottom = 0), /* @__PURE__ */ t(
|
|
614
614
|
"input",
|
|
615
615
|
{
|
|
616
616
|
type: "number",
|
|
617
|
-
className:
|
|
617
|
+
className: fl.input,
|
|
618
618
|
style: I,
|
|
619
619
|
value: e ?? "",
|
|
620
620
|
onChange: k,
|
|
621
|
-
onBlur:
|
|
621
|
+
onBlur: v,
|
|
622
622
|
disabled: i,
|
|
623
|
-
min:
|
|
623
|
+
min: f,
|
|
624
624
|
max: m,
|
|
625
625
|
step: g,
|
|
626
626
|
placeholder: w,
|
|
@@ -629,13 +629,13 @@ const ul = "_input_14n56_5", pl = {
|
|
|
629
629
|
);
|
|
630
630
|
};
|
|
631
631
|
G.displayName = "NumberInput";
|
|
632
|
-
const
|
|
632
|
+
const Mt = ({
|
|
633
633
|
rgba: e,
|
|
634
634
|
onChange: n,
|
|
635
635
|
readOnly: i = !1
|
|
636
|
-
}) => /* @__PURE__ */ p("div", { className:
|
|
637
|
-
/* @__PURE__ */ p("div", { className:
|
|
638
|
-
/* @__PURE__ */ t("span", { className:
|
|
636
|
+
}) => /* @__PURE__ */ p("div", { className: B.rgbaInputs, children: [
|
|
637
|
+
/* @__PURE__ */ p("div", { className: B.rgbaInputGroup, children: [
|
|
638
|
+
/* @__PURE__ */ t("span", { className: B.rgbaLabel, children: "R" }),
|
|
639
639
|
/* @__PURE__ */ t(
|
|
640
640
|
G,
|
|
641
641
|
{
|
|
@@ -650,8 +650,8 @@ const Et = ({
|
|
|
650
650
|
}
|
|
651
651
|
)
|
|
652
652
|
] }),
|
|
653
|
-
/* @__PURE__ */ p("div", { className:
|
|
654
|
-
/* @__PURE__ */ t("span", { className:
|
|
653
|
+
/* @__PURE__ */ p("div", { className: B.rgbaInputGroup, children: [
|
|
654
|
+
/* @__PURE__ */ t("span", { className: B.rgbaLabel, children: "G" }),
|
|
655
655
|
/* @__PURE__ */ t(
|
|
656
656
|
G,
|
|
657
657
|
{
|
|
@@ -666,8 +666,8 @@ const Et = ({
|
|
|
666
666
|
}
|
|
667
667
|
)
|
|
668
668
|
] }),
|
|
669
|
-
/* @__PURE__ */ p("div", { className:
|
|
670
|
-
/* @__PURE__ */ t("span", { className:
|
|
669
|
+
/* @__PURE__ */ p("div", { className: B.rgbaInputGroup, children: [
|
|
670
|
+
/* @__PURE__ */ t("span", { className: B.rgbaLabel, children: "B" }),
|
|
671
671
|
/* @__PURE__ */ t(
|
|
672
672
|
G,
|
|
673
673
|
{
|
|
@@ -682,8 +682,8 @@ const Et = ({
|
|
|
682
682
|
}
|
|
683
683
|
)
|
|
684
684
|
] }),
|
|
685
|
-
/* @__PURE__ */ p("div", { className:
|
|
686
|
-
/* @__PURE__ */ t("span", { className:
|
|
685
|
+
/* @__PURE__ */ p("div", { className: B.rgbaInputGroup, children: [
|
|
686
|
+
/* @__PURE__ */ t("span", { className: B.rgbaLabel, children: "A" }),
|
|
687
687
|
/* @__PURE__ */ t(
|
|
688
688
|
G,
|
|
689
689
|
{
|
|
@@ -699,8 +699,8 @@ const Et = ({
|
|
|
699
699
|
)
|
|
700
700
|
] })
|
|
701
701
|
] });
|
|
702
|
-
|
|
703
|
-
const
|
|
702
|
+
Mt.displayName = "RGBAInputs";
|
|
703
|
+
const Pt = ({
|
|
704
704
|
isOpen: e,
|
|
705
705
|
onClose: n,
|
|
706
706
|
rgba: i,
|
|
@@ -709,8 +709,8 @@ const At = ({
|
|
|
709
709
|
selectedColor: o,
|
|
710
710
|
readOnly: c = !1
|
|
711
711
|
}) => {
|
|
712
|
-
const r =
|
|
713
|
-
return
|
|
712
|
+
const r = ae(null);
|
|
713
|
+
return me(() => {
|
|
714
714
|
if (!e) return;
|
|
715
715
|
const s = (d) => {
|
|
716
716
|
r.current && !r.current.contains(d.target) && n();
|
|
@@ -721,25 +721,25 @@ const At = ({
|
|
|
721
721
|
}, [e, n]), e ? /* @__PURE__ */ p(
|
|
722
722
|
"div",
|
|
723
723
|
{
|
|
724
|
-
className:
|
|
724
|
+
className: B.popover,
|
|
725
725
|
ref: r,
|
|
726
|
-
style: { zIndex:
|
|
726
|
+
style: { zIndex: xt.DROPDOWN },
|
|
727
727
|
children: [
|
|
728
728
|
/* @__PURE__ */ t(
|
|
729
|
-
|
|
729
|
+
At,
|
|
730
730
|
{
|
|
731
731
|
onColorSelect: a,
|
|
732
732
|
selectedColor: o,
|
|
733
733
|
readOnly: c
|
|
734
734
|
}
|
|
735
735
|
),
|
|
736
|
-
/* @__PURE__ */ t(
|
|
736
|
+
/* @__PURE__ */ t(Mt, { rgba: i, onChange: l, readOnly: c })
|
|
737
737
|
]
|
|
738
738
|
}
|
|
739
739
|
) : null;
|
|
740
740
|
};
|
|
741
|
-
|
|
742
|
-
const
|
|
741
|
+
Pt.displayName = "ColorPickerPopover";
|
|
742
|
+
const ie = ({
|
|
743
743
|
value: e,
|
|
744
744
|
onChange: n,
|
|
745
745
|
readOnly: i = !1,
|
|
@@ -750,9 +750,9 @@ const le = ({
|
|
|
750
750
|
height: r,
|
|
751
751
|
config: s
|
|
752
752
|
}) => {
|
|
753
|
-
const d = a ?? (s == null ? void 0 : s.allowUndefined) ?? !0, u = o ?? (d ? "未設定" : "#000000"), h = c ?? (s == null ? void 0 : s.width),
|
|
754
|
-
|
|
755
|
-
const E =
|
|
753
|
+
const d = a ?? (s == null ? void 0 : s.allowUndefined) ?? !0, u = o ?? (d ? "未設定" : "#000000"), h = c ?? (s == null ? void 0 : s.width), v = r ?? (s == null ? void 0 : s.height), [f, m] = O(!1), g = ae(null), [_, w] = O(() => ke(e) ?? { r: 0, g: 0, b: 0, a: 1 });
|
|
754
|
+
me(() => {
|
|
755
|
+
const E = ke(e);
|
|
756
756
|
E && w(E);
|
|
757
757
|
}, [e]);
|
|
758
758
|
const L = y(() => {
|
|
@@ -760,13 +760,13 @@ const le = ({
|
|
|
760
760
|
}, [i]), [$, k] = O(
|
|
761
761
|
e ? e.replace(/^#/, "") : ""
|
|
762
762
|
);
|
|
763
|
-
|
|
763
|
+
me(() => {
|
|
764
764
|
k(e ? e.replace(/^#/, "") : "");
|
|
765
765
|
}, [e]);
|
|
766
766
|
const I = y(
|
|
767
767
|
(E) => {
|
|
768
|
-
const
|
|
769
|
-
/^[0-9A-Fa-f]*$/.test(
|
|
768
|
+
const z = E.target.value;
|
|
769
|
+
/^[0-9A-Fa-f]*$/.test(z) && k(z);
|
|
770
770
|
},
|
|
771
771
|
[]
|
|
772
772
|
), S = y(
|
|
@@ -776,8 +776,8 @@ const le = ({
|
|
|
776
776
|
return;
|
|
777
777
|
}
|
|
778
778
|
if (/^[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?$/.test(E)) {
|
|
779
|
-
const
|
|
780
|
-
J && w(J), n(
|
|
779
|
+
const z = `#${E}`, J = ke(z);
|
|
780
|
+
J && w(J), n(z);
|
|
781
781
|
} else
|
|
782
782
|
k(e ? e.replace(/^#/, "") : "");
|
|
783
783
|
},
|
|
@@ -795,43 +795,43 @@ const le = ({
|
|
|
795
795
|
), N = y(
|
|
796
796
|
(E) => {
|
|
797
797
|
if (E) {
|
|
798
|
-
const
|
|
799
|
-
|
|
798
|
+
const z = ke(E);
|
|
799
|
+
z && (w(z), k(E.replace(/^#/, "")));
|
|
800
800
|
} else
|
|
801
801
|
k("");
|
|
802
802
|
n(E);
|
|
803
803
|
},
|
|
804
804
|
[n]
|
|
805
805
|
), C = y(
|
|
806
|
-
(E,
|
|
807
|
-
if (
|
|
808
|
-
const J = { ..._, [E]:
|
|
809
|
-
w(J), n(
|
|
806
|
+
(E, z) => {
|
|
807
|
+
if (z === void 0) return;
|
|
808
|
+
const J = { ..._, [E]: z };
|
|
809
|
+
w(J), n(el(J));
|
|
810
810
|
},
|
|
811
811
|
[_, n]
|
|
812
|
-
), T = e ?? "未設定",
|
|
813
|
-
e && (
|
|
812
|
+
), T = e ?? "未設定", P = {};
|
|
813
|
+
e && (P.background = e);
|
|
814
814
|
const A = {};
|
|
815
|
-
return h !== void 0 ? A.width = `${h}px` : A.width = "100%",
|
|
815
|
+
return h !== void 0 ? A.width = `${h}px` : A.width = "100%", v !== void 0 && (A.height = `${v}px`), /* @__PURE__ */ p("div", { className: B.container, style: A, ref: g, children: [
|
|
816
816
|
/* @__PURE__ */ t(
|
|
817
817
|
"button",
|
|
818
818
|
{
|
|
819
819
|
type: "button",
|
|
820
|
-
className:
|
|
820
|
+
className: B.colorButton,
|
|
821
821
|
onClick: L,
|
|
822
822
|
disabled: i,
|
|
823
823
|
title: T,
|
|
824
824
|
"aria-label": "カラーピッカーを開く",
|
|
825
|
-
style:
|
|
825
|
+
style: P
|
|
826
826
|
}
|
|
827
827
|
),
|
|
828
|
-
l && /* @__PURE__ */ p("div", { className:
|
|
829
|
-
/* @__PURE__ */ t("span", { className:
|
|
828
|
+
l && /* @__PURE__ */ p("div", { className: B.textInputWrapper, children: [
|
|
829
|
+
/* @__PURE__ */ t("span", { className: B.textInputPrefix, children: "#" }),
|
|
830
830
|
/* @__PURE__ */ t(
|
|
831
831
|
"input",
|
|
832
832
|
{
|
|
833
833
|
type: "text",
|
|
834
|
-
className:
|
|
834
|
+
className: B.textInput,
|
|
835
835
|
value: $,
|
|
836
836
|
onChange: I,
|
|
837
837
|
onKeyDown: x,
|
|
@@ -843,9 +843,9 @@ const le = ({
|
|
|
843
843
|
)
|
|
844
844
|
] }),
|
|
845
845
|
/* @__PURE__ */ t(
|
|
846
|
-
|
|
846
|
+
Pt,
|
|
847
847
|
{
|
|
848
|
-
isOpen:
|
|
848
|
+
isOpen: f,
|
|
849
849
|
onClose: () => m(!1),
|
|
850
850
|
rgba: _,
|
|
851
851
|
onRgbaChange: C,
|
|
@@ -856,47 +856,47 @@ const le = ({
|
|
|
856
856
|
)
|
|
857
857
|
] });
|
|
858
858
|
};
|
|
859
|
-
|
|
860
|
-
const
|
|
861
|
-
container:
|
|
862
|
-
valueInput:
|
|
863
|
-
unitSelect:
|
|
859
|
+
ie.displayName = "ColorPicker";
|
|
860
|
+
const vl = "_container_1n9lj_5", gl = "_valueInput_1n9lj_23", yl = "_unitSelect_1n9lj_45", je = {
|
|
861
|
+
container: vl,
|
|
862
|
+
valueInput: gl,
|
|
863
|
+
unitSelect: yl
|
|
864
864
|
}, j = (e) => {
|
|
865
|
-
const { value: n, onChange: i, readOnly: l = !1, config: a } = e, o = e.allowedUnits ?? (a == null ? void 0 : a.allowedUnits), c = e.min ?? (a == null ? void 0 : a.min), r = e.max ?? (a == null ? void 0 : a.max), s = e.step ?? (a == null ? void 0 : a.step) ?? 1, d = e.placeholder ?? (a == null ? void 0 : a.placeholder), u = e.width ?? (a == null ? void 0 : a.width), h = e.height ?? (a == null ? void 0 : a.height),
|
|
865
|
+
const { value: n, onChange: i, readOnly: l = !1, config: a } = e, o = e.allowedUnits ?? (a == null ? void 0 : a.allowedUnits), c = e.min ?? (a == null ? void 0 : a.min), r = e.max ?? (a == null ? void 0 : a.max), s = e.step ?? (a == null ? void 0 : a.step) ?? 1, d = e.placeholder ?? (a == null ? void 0 : a.placeholder), u = e.width ?? (a == null ? void 0 : a.width), h = e.height ?? (a == null ? void 0 : a.height), v = e.ariaLabel, f = (n == null ? void 0 : n.unit) ?? (o == null ? void 0 : o[0]), m = y(
|
|
866
866
|
(k) => {
|
|
867
|
-
const I = k.target.value, S = (n == null ? void 0 : n.unit) ??
|
|
867
|
+
const I = k.target.value, S = (n == null ? void 0 : n.unit) ?? f;
|
|
868
868
|
if (S === void 0) return;
|
|
869
869
|
let b = Number.parseFloat(I);
|
|
870
870
|
if (Number.isNaN(b)) return;
|
|
871
871
|
const x = c ?? 1;
|
|
872
872
|
b < x && (b = x), r !== void 0 && b > r && (b = r), i({ value: b, unit: S });
|
|
873
873
|
},
|
|
874
|
-
[n, i,
|
|
874
|
+
[n, i, f, c, r]
|
|
875
875
|
), g = y(
|
|
876
876
|
(k) => {
|
|
877
877
|
const I = k.target.value;
|
|
878
878
|
if (I === "") return;
|
|
879
|
-
const S = (n == null ? void 0 : n.unit) ??
|
|
879
|
+
const S = (n == null ? void 0 : n.unit) ?? f;
|
|
880
880
|
if (S === void 0) return;
|
|
881
881
|
let b = Number.parseFloat(I);
|
|
882
882
|
if (Number.isNaN(b)) return;
|
|
883
883
|
const x = c ?? 1;
|
|
884
884
|
b < x && (b = x, i({ value: b, unit: S })), r !== void 0 && b > r && (b = r, i({ value: b, unit: S }));
|
|
885
885
|
},
|
|
886
|
-
[n, i,
|
|
886
|
+
[n, i, f, c, r]
|
|
887
887
|
), _ = y(
|
|
888
888
|
(k) => {
|
|
889
889
|
const I = k.target.value;
|
|
890
890
|
i({ value: (n == null ? void 0 : n.value) ?? 1, unit: I });
|
|
891
891
|
},
|
|
892
892
|
[n, i]
|
|
893
|
-
), w = (n == null ? void 0 : n.value) ?? "", L = (n == null ? void 0 : n.unit) ??
|
|
894
|
-
return u !== void 0 ? $.width = `${u}px` : $.width = "100%", h !== void 0 && ($.height = `${h}px`), /* @__PURE__ */ p("div", { className:
|
|
893
|
+
), w = (n == null ? void 0 : n.value) ?? "", L = (n == null ? void 0 : n.unit) ?? f ?? "", $ = {};
|
|
894
|
+
return u !== void 0 ? $.width = `${u}px` : $.width = "100%", h !== void 0 && ($.height = `${h}px`), /* @__PURE__ */ p("div", { className: je.container, style: $, children: [
|
|
895
895
|
/* @__PURE__ */ t(
|
|
896
896
|
"input",
|
|
897
897
|
{
|
|
898
898
|
type: "number",
|
|
899
|
-
className:
|
|
899
|
+
className: je.valueInput,
|
|
900
900
|
value: w,
|
|
901
901
|
onChange: m,
|
|
902
902
|
onBlur: g,
|
|
@@ -906,13 +906,13 @@ const ml = "_container_1n9lj_5", bl = "_valueInput_1n9lj_23", vl = "_unitSelect_
|
|
|
906
906
|
step: s,
|
|
907
907
|
readOnly: l,
|
|
908
908
|
disabled: l,
|
|
909
|
-
"aria-label":
|
|
909
|
+
"aria-label": v
|
|
910
910
|
}
|
|
911
911
|
),
|
|
912
912
|
/* @__PURE__ */ t(
|
|
913
913
|
"select",
|
|
914
914
|
{
|
|
915
|
-
className:
|
|
915
|
+
className: je.unitSelect,
|
|
916
916
|
value: L,
|
|
917
917
|
onChange: _,
|
|
918
918
|
disabled: l || !o || o.length <= 1,
|
|
@@ -921,11 +921,11 @@ const ml = "_container_1n9lj_5", bl = "_valueInput_1n9lj_23", vl = "_unitSelect_
|
|
|
921
921
|
}
|
|
922
922
|
)
|
|
923
923
|
] });
|
|
924
|
-
},
|
|
925
|
-
container:
|
|
926
|
-
select:
|
|
927
|
-
placeholderOverlay:
|
|
928
|
-
},
|
|
924
|
+
}, _l = "_container_14f2v_5", xl = "_select_14f2v_11", wl = "_placeholderOverlay_14f2v_44", Ue = {
|
|
925
|
+
container: _l,
|
|
926
|
+
select: xl,
|
|
927
|
+
placeholderOverlay: wl
|
|
928
|
+
}, ye = (e) => {
|
|
929
929
|
const { value: n, onChange: i, readOnly: l = !1, config: a } = e, o = e.options ?? (a == null ? void 0 : a.options) ?? [], c = e.placeholder ?? (a == null ? void 0 : a.placeholder) ?? "選択してください", r = e.width ?? (a == null ? void 0 : a.width), s = e.height ?? (a == null ? void 0 : a.height), d = e.allowEmpty ?? (a == null ? void 0 : a.allowEmpty) ?? !0, u = y(
|
|
930
930
|
(g) => {
|
|
931
931
|
const _ = g.target.value;
|
|
@@ -939,18 +939,18 @@ const ml = "_container_1n9lj_5", bl = "_valueInput_1n9lj_23", vl = "_unitSelect_
|
|
|
939
939
|
}
|
|
940
940
|
},
|
|
941
941
|
[i, o]
|
|
942
|
-
), h = n ?? "",
|
|
943
|
-
r !== void 0 ?
|
|
942
|
+
), h = n ?? "", v = n !== void 0 && n !== "", f = {};
|
|
943
|
+
r !== void 0 ? f.width = `${r}px` : f.width = "100%";
|
|
944
944
|
const m = {
|
|
945
945
|
width: "100%",
|
|
946
946
|
height: s ? `${s}px` : void 0
|
|
947
947
|
};
|
|
948
|
-
return /* @__PURE__ */ p("div", { className:
|
|
949
|
-
!
|
|
948
|
+
return /* @__PURE__ */ p("div", { className: Ue.container, style: f, children: [
|
|
949
|
+
!v && /* @__PURE__ */ t("div", { className: Ue.placeholderOverlay, style: m, children: c }),
|
|
950
950
|
/* @__PURE__ */ p(
|
|
951
951
|
"select",
|
|
952
952
|
{
|
|
953
|
-
className:
|
|
953
|
+
className: Ue.select,
|
|
954
954
|
style: m,
|
|
955
955
|
value: h,
|
|
956
956
|
onChange: u,
|
|
@@ -964,9 +964,9 @@ const ml = "_container_1n9lj_5", bl = "_valueInput_1n9lj_23", vl = "_unitSelect_
|
|
|
964
964
|
)
|
|
965
965
|
] });
|
|
966
966
|
};
|
|
967
|
-
|
|
968
|
-
const
|
|
969
|
-
button:
|
|
967
|
+
ye.displayName = "Dropdown";
|
|
968
|
+
const Nl = "_button_16snt_1", Cl = {
|
|
969
|
+
button: Nl
|
|
970
970
|
}, Z = ({
|
|
971
971
|
icon: e,
|
|
972
972
|
label: n,
|
|
@@ -979,7 +979,7 @@ const _l = "_button_16snt_1", xl = {
|
|
|
979
979
|
"button",
|
|
980
980
|
{
|
|
981
981
|
type: "button",
|
|
982
|
-
className:
|
|
982
|
+
className: Cl.button,
|
|
983
983
|
onMouseDown: c ? (r) => r.preventDefault() : void 0,
|
|
984
984
|
onMouseEnter: l,
|
|
985
985
|
onClick: i,
|
|
@@ -990,20 +990,20 @@ const _l = "_button_16snt_1", xl = {
|
|
|
990
990
|
}
|
|
991
991
|
);
|
|
992
992
|
Z.displayName = "IconActionButton";
|
|
993
|
-
const
|
|
994
|
-
container:
|
|
995
|
-
scrollArea:
|
|
996
|
-
emptyState:
|
|
997
|
-
},
|
|
993
|
+
const Sl = "_container_ytzac_4", Il = "_scrollArea_ytzac_21", $l = "_emptyState_ytzac_29", Ve = {
|
|
994
|
+
container: Sl,
|
|
995
|
+
scrollArea: Il,
|
|
996
|
+
emptyState: $l
|
|
997
|
+
}, Dt = ({
|
|
998
998
|
children: e,
|
|
999
999
|
emptyMessage: n,
|
|
1000
1000
|
className: i
|
|
1001
|
-
}) => /* @__PURE__ */ t("div", { className: `${
|
|
1002
|
-
root:
|
|
1003
|
-
list:
|
|
1004
|
-
trigger:
|
|
1005
|
-
content:
|
|
1006
|
-
}, We =
|
|
1001
|
+
}) => /* @__PURE__ */ t("div", { className: `${Ve.container} ${i || ""}`, children: e ? /* @__PURE__ */ t("div", { className: Ve.scrollArea, children: e }) : n && /* @__PURE__ */ t("div", { className: Ve.emptyState, children: n }) }), Ll = "_root_vttth_1", kl = "_list_vttth_9", Tl = "_trigger_vttth_24", El = "_content_vttth_69", Re = {
|
|
1002
|
+
root: Ll,
|
|
1003
|
+
list: kl,
|
|
1004
|
+
trigger: Tl,
|
|
1005
|
+
content: El
|
|
1006
|
+
}, We = _t(void 0), Al = ({
|
|
1007
1007
|
defaultValue: e,
|
|
1008
1008
|
value: n,
|
|
1009
1009
|
onValueChange: i,
|
|
@@ -1014,28 +1014,28 @@ const wl = "_container_ytzac_4", Nl = "_scrollArea_ytzac_21", Cl = "_emptyState_
|
|
|
1014
1014
|
const [c, r] = O(e), s = n ?? c, d = (u) => {
|
|
1015
1015
|
r(u), i == null || i(u);
|
|
1016
1016
|
};
|
|
1017
|
-
return /* @__PURE__ */ t(We.Provider, { value: { value: s, onChange: d, variant: a }, children: /* @__PURE__ */ t("div", { className: `${
|
|
1018
|
-
},
|
|
1017
|
+
return /* @__PURE__ */ t(We.Provider, { value: { value: s, onChange: d, variant: a }, children: /* @__PURE__ */ t("div", { className: `${Re.root} ${o}`, "data-variant": a, children: l }) });
|
|
1018
|
+
}, Ml = ({
|
|
1019
1019
|
children: e,
|
|
1020
1020
|
className: n = "",
|
|
1021
1021
|
width: i,
|
|
1022
1022
|
height: l,
|
|
1023
1023
|
style: a
|
|
1024
1024
|
}) => {
|
|
1025
|
-
const o =
|
|
1025
|
+
const o = ze(We);
|
|
1026
1026
|
if (!o)
|
|
1027
1027
|
throw new Error("TabsList must be used within a Tabs component");
|
|
1028
1028
|
const { variant: c } = o, r = { ...a };
|
|
1029
1029
|
return i !== void 0 && (r.width = `${i}px`), l !== void 0 && (r.height = `${l}px`), /* @__PURE__ */ t(
|
|
1030
1030
|
"div",
|
|
1031
1031
|
{
|
|
1032
|
-
className: `${
|
|
1032
|
+
className: `${Re.list} ${n}`,
|
|
1033
1033
|
"data-variant": c,
|
|
1034
1034
|
style: r,
|
|
1035
1035
|
children: e
|
|
1036
1036
|
}
|
|
1037
1037
|
);
|
|
1038
|
-
},
|
|
1038
|
+
}, xe = ({
|
|
1039
1039
|
value: e,
|
|
1040
1040
|
children: n,
|
|
1041
1041
|
className: i = "",
|
|
@@ -1044,36 +1044,36 @@ const wl = "_container_ytzac_4", Nl = "_scrollArea_ytzac_21", Cl = "_emptyState_
|
|
|
1044
1044
|
height: o,
|
|
1045
1045
|
style: c
|
|
1046
1046
|
}) => {
|
|
1047
|
-
const r =
|
|
1047
|
+
const r = ze(We);
|
|
1048
1048
|
if (!r)
|
|
1049
1049
|
throw new Error("TabsTrigger must be used within a Tabs component");
|
|
1050
|
-
const { value: s, onChange: d, variant: u } = r, h = s === e,
|
|
1051
|
-
return a !== void 0 && (
|
|
1050
|
+
const { value: s, onChange: d, variant: u } = r, h = s === e, v = { ...c };
|
|
1051
|
+
return a !== void 0 && (v.width = `${a}px`), o !== void 0 && (v.height = `${o}px`), /* @__PURE__ */ t(
|
|
1052
1052
|
"button",
|
|
1053
1053
|
{
|
|
1054
|
-
className: `${
|
|
1054
|
+
className: `${Re.trigger} ${i}`,
|
|
1055
1055
|
"data-state": h ? "active" : "inactive",
|
|
1056
1056
|
"data-variant": u,
|
|
1057
1057
|
onClick: () => d(e),
|
|
1058
1058
|
disabled: l,
|
|
1059
1059
|
type: "button",
|
|
1060
|
-
style:
|
|
1060
|
+
style: v,
|
|
1061
1061
|
children: n
|
|
1062
1062
|
}
|
|
1063
1063
|
);
|
|
1064
|
-
},
|
|
1064
|
+
}, we = ({
|
|
1065
1065
|
value: e,
|
|
1066
1066
|
children: n,
|
|
1067
1067
|
className: i = ""
|
|
1068
1068
|
}) => {
|
|
1069
|
-
const l =
|
|
1069
|
+
const l = ze(We);
|
|
1070
1070
|
if (!l)
|
|
1071
1071
|
throw new Error("TabsContent must be used within a Tabs component");
|
|
1072
1072
|
const { value: a } = l;
|
|
1073
|
-
return a !== e ? null : /* @__PURE__ */ t("div", { className: `${
|
|
1074
|
-
},
|
|
1075
|
-
input:
|
|
1076
|
-
},
|
|
1073
|
+
return a !== e ? null : /* @__PURE__ */ t("div", { className: `${Re.content} ${i}`, children: n });
|
|
1074
|
+
}, Pl = "_input_jxjyc_5", Dl = {
|
|
1075
|
+
input: Pl
|
|
1076
|
+
}, Ie = ({
|
|
1077
1077
|
value: e,
|
|
1078
1078
|
onChange: n,
|
|
1079
1079
|
readOnly: i = !1,
|
|
@@ -1087,7 +1087,7 @@ const wl = "_container_ytzac_4", Nl = "_scrollArea_ytzac_21", Cl = "_emptyState_
|
|
|
1087
1087
|
config: u,
|
|
1088
1088
|
onBlur: h
|
|
1089
1089
|
}) => {
|
|
1090
|
-
const
|
|
1090
|
+
const v = l ?? (u == null ? void 0 : u.placeholder), f = a ?? (u == null ? void 0 : u.maxLength), m = o ?? (u == null ? void 0 : u.multiline) ?? !1, g = c ?? (u == null ? void 0 : u.rows) ?? 3, _ = y(
|
|
1091
1091
|
($) => {
|
|
1092
1092
|
n($.target.value);
|
|
1093
1093
|
},
|
|
@@ -1095,19 +1095,19 @@ const wl = "_container_ytzac_4", Nl = "_scrollArea_ytzac_21", Cl = "_emptyState_
|
|
|
1095
1095
|
), w = {};
|
|
1096
1096
|
r !== void 0 ? w.width = `${r}px` : w.width = "100%", s !== void 0 && (w.height = `${s}px`);
|
|
1097
1097
|
const L = {
|
|
1098
|
-
className:
|
|
1098
|
+
className: Dl.input,
|
|
1099
1099
|
style: w,
|
|
1100
1100
|
value: e ?? "",
|
|
1101
1101
|
onChange: _,
|
|
1102
1102
|
disabled: i,
|
|
1103
|
-
placeholder:
|
|
1104
|
-
maxLength:
|
|
1103
|
+
placeholder: v,
|
|
1104
|
+
maxLength: f,
|
|
1105
1105
|
"aria-label": d
|
|
1106
1106
|
};
|
|
1107
1107
|
return m ? /* @__PURE__ */ t("textarea", { ...L, rows: g }) : /* @__PURE__ */ t("input", { ...L, type: "text", onBlur: h });
|
|
1108
1108
|
};
|
|
1109
|
-
|
|
1110
|
-
const
|
|
1109
|
+
Ie.displayName = "TextInput";
|
|
1110
|
+
const zl = ({
|
|
1111
1111
|
actionContext: e,
|
|
1112
1112
|
onActionFeedback: n,
|
|
1113
1113
|
onPrint: i
|
|
@@ -1115,16 +1115,16 @@ const Ml = ({
|
|
|
1115
1115
|
const l = e.isEnabled("undo"), a = e.isEnabled("redo"), o = e.isEnabled("paste"), c = y(
|
|
1116
1116
|
(r) => {
|
|
1117
1117
|
e.execute(r);
|
|
1118
|
-
const s =
|
|
1118
|
+
const s = it(r);
|
|
1119
1119
|
s && (n == null || n(s));
|
|
1120
1120
|
},
|
|
1121
1121
|
[e, n]
|
|
1122
1122
|
);
|
|
1123
|
-
return /* @__PURE__ */ p(
|
|
1123
|
+
return /* @__PURE__ */ p(se, { children: [
|
|
1124
1124
|
/* @__PURE__ */ t(
|
|
1125
1125
|
Z,
|
|
1126
1126
|
{
|
|
1127
|
-
icon: /* @__PURE__ */ t(
|
|
1127
|
+
icon: /* @__PURE__ */ t(Qe, { "aria-hidden": "true" }),
|
|
1128
1128
|
label: "元に戻す",
|
|
1129
1129
|
title: "元に戻す (Ctrl+Z / Cmd+Z)",
|
|
1130
1130
|
onClick: () => c("undo"),
|
|
@@ -1135,7 +1135,7 @@ const Ml = ({
|
|
|
1135
1135
|
/* @__PURE__ */ t(
|
|
1136
1136
|
Z,
|
|
1137
1137
|
{
|
|
1138
|
-
icon: /* @__PURE__ */ t(
|
|
1138
|
+
icon: /* @__PURE__ */ t(et, { "aria-hidden": "true" }),
|
|
1139
1139
|
label: "やり直し",
|
|
1140
1140
|
title: "やり直し (Ctrl+Y / Cmd+Y)",
|
|
1141
1141
|
onClick: () => c("redo"),
|
|
@@ -1157,7 +1157,7 @@ const Ml = ({
|
|
|
1157
1157
|
/* @__PURE__ */ t(
|
|
1158
1158
|
Z,
|
|
1159
1159
|
{
|
|
1160
|
-
icon: /* @__PURE__ */ t(
|
|
1160
|
+
icon: /* @__PURE__ */ t(Lt, { "aria-hidden": "true" }),
|
|
1161
1161
|
label: "印刷",
|
|
1162
1162
|
title: "印刷 (Ctrl+P)",
|
|
1163
1163
|
onClick: () => i ? i() : window.print(),
|
|
@@ -1166,8 +1166,8 @@ const Ml = ({
|
|
|
1166
1166
|
)
|
|
1167
1167
|
] });
|
|
1168
1168
|
};
|
|
1169
|
-
|
|
1170
|
-
const
|
|
1169
|
+
zl.displayName = "CanvasActionSection";
|
|
1170
|
+
const pt = { value: 1, unit: "fr" }, Bl = ({
|
|
1171
1171
|
grid: e,
|
|
1172
1172
|
onGridChange: n
|
|
1173
1173
|
}) => {
|
|
@@ -1175,36 +1175,36 @@ const ut = { value: 1, unit: "fr" }, Dl = ({
|
|
|
1175
1175
|
(a) => {
|
|
1176
1176
|
const o = parseInt(a.target.value, 10);
|
|
1177
1177
|
if (!o || o < 1 || o > 100) return;
|
|
1178
|
-
const c =
|
|
1178
|
+
const c = wt(e), r = e.colCount, s = [...c];
|
|
1179
1179
|
if (o > r)
|
|
1180
1180
|
for (let d = r; d < o; d++)
|
|
1181
|
-
s.push({ ...
|
|
1181
|
+
s.push({ ...pt });
|
|
1182
1182
|
else
|
|
1183
1183
|
s.splice(o);
|
|
1184
|
-
n({ ...e, ...
|
|
1184
|
+
n({ ...e, ...Nt(s) });
|
|
1185
1185
|
},
|
|
1186
1186
|
[e, n]
|
|
1187
1187
|
), l = y(
|
|
1188
1188
|
(a) => {
|
|
1189
1189
|
const o = parseInt(a.target.value, 10);
|
|
1190
1190
|
if (!o || o < 1 || o > 100) return;
|
|
1191
|
-
const c =
|
|
1191
|
+
const c = Ct(e), r = e.rowCount, s = [...c];
|
|
1192
1192
|
if (o > r)
|
|
1193
1193
|
for (let d = r; d < o; d++)
|
|
1194
|
-
s.push({ ...
|
|
1194
|
+
s.push({ ...pt });
|
|
1195
1195
|
else
|
|
1196
1196
|
s.splice(o);
|
|
1197
|
-
n({ ...e, ...
|
|
1197
|
+
n({ ...e, ...St(s) });
|
|
1198
1198
|
},
|
|
1199
1199
|
[e, n]
|
|
1200
1200
|
);
|
|
1201
|
-
return /* @__PURE__ */ p(
|
|
1202
|
-
/* @__PURE__ */ t("span", { className:
|
|
1201
|
+
return /* @__PURE__ */ p(se, { children: [
|
|
1202
|
+
/* @__PURE__ */ t("span", { className: D.sectionLabel, children: "列" }),
|
|
1203
1203
|
/* @__PURE__ */ t(
|
|
1204
1204
|
"input",
|
|
1205
1205
|
{
|
|
1206
1206
|
type: "number",
|
|
1207
|
-
className:
|
|
1207
|
+
className: D.numberInput,
|
|
1208
1208
|
value: e.colCount,
|
|
1209
1209
|
min: 1,
|
|
1210
1210
|
max: 100,
|
|
@@ -1213,12 +1213,12 @@ const ut = { value: 1, unit: "fr" }, Dl = ({
|
|
|
1213
1213
|
title: "列数"
|
|
1214
1214
|
}
|
|
1215
1215
|
),
|
|
1216
|
-
/* @__PURE__ */ t("span", { className:
|
|
1216
|
+
/* @__PURE__ */ t("span", { className: D.sectionLabel, children: "行" }),
|
|
1217
1217
|
/* @__PURE__ */ t(
|
|
1218
1218
|
"input",
|
|
1219
1219
|
{
|
|
1220
1220
|
type: "number",
|
|
1221
|
-
className:
|
|
1221
|
+
className: D.numberInput,
|
|
1222
1222
|
value: e.rowCount,
|
|
1223
1223
|
min: 1,
|
|
1224
1224
|
max: 100,
|
|
@@ -1229,8 +1229,8 @@ const ut = { value: 1, unit: "fr" }, Dl = ({
|
|
|
1229
1229
|
)
|
|
1230
1230
|
] });
|
|
1231
1231
|
};
|
|
1232
|
-
|
|
1233
|
-
function
|
|
1232
|
+
Bl.displayName = "GridSettingsSection";
|
|
1233
|
+
function Te(e, n) {
|
|
1234
1234
|
switch (n) {
|
|
1235
1235
|
case "cm":
|
|
1236
1236
|
return e / 10;
|
|
@@ -1240,60 +1240,60 @@ function ke(e, n) {
|
|
|
1240
1240
|
return e;
|
|
1241
1241
|
}
|
|
1242
1242
|
}
|
|
1243
|
-
const
|
|
1243
|
+
const Rl = [
|
|
1244
1244
|
{ value: F.A4, label: "A4" },
|
|
1245
1245
|
{ value: F.A3, label: "A3" },
|
|
1246
1246
|
{ value: F.B5, label: "B5" },
|
|
1247
1247
|
{ value: F.LETTER, label: "Letter" },
|
|
1248
1248
|
{ value: F.LEGAL, label: "Legal" },
|
|
1249
1249
|
{ value: F.CUSTOM, label: "カスタム" }
|
|
1250
|
-
],
|
|
1250
|
+
], Wl = ({
|
|
1251
1251
|
paper: e,
|
|
1252
1252
|
onPaperChange: n
|
|
1253
1253
|
}) => {
|
|
1254
1254
|
const i = e.size.preset === F.CUSTOM, l = e.autoHeight === !0, a = e.autoWidth === !0, o = y(
|
|
1255
1255
|
(h) => {
|
|
1256
|
-
const
|
|
1257
|
-
|
|
1256
|
+
const v = h.target.value;
|
|
1257
|
+
v && n({
|
|
1258
1258
|
...e,
|
|
1259
|
-
size: { ...
|
|
1259
|
+
size: { ...It[v] }
|
|
1260
1260
|
});
|
|
1261
1261
|
},
|
|
1262
1262
|
[e, n]
|
|
1263
1263
|
), c = y(
|
|
1264
1264
|
({ target: h }) => {
|
|
1265
|
-
const
|
|
1266
|
-
if (!
|
|
1267
|
-
const
|
|
1268
|
-
if (
|
|
1265
|
+
const v = Number(h.value);
|
|
1266
|
+
if (!v || v <= 0) return;
|
|
1267
|
+
const f = K.fromDim(e.margin.left) + K.fromDim(e.margin.right), m = Te(f, e.size.width.unit);
|
|
1268
|
+
if (v < m) return;
|
|
1269
1269
|
const g = {
|
|
1270
1270
|
...e.size,
|
|
1271
|
-
width: { ...e.size.width, value:
|
|
1271
|
+
width: { ...e.size.width, value: v }
|
|
1272
1272
|
};
|
|
1273
1273
|
n({ ...e, size: g });
|
|
1274
1274
|
},
|
|
1275
1275
|
[e, n]
|
|
1276
1276
|
), r = y(
|
|
1277
1277
|
({ target: h }) => {
|
|
1278
|
-
const
|
|
1279
|
-
if (!
|
|
1280
|
-
const
|
|
1281
|
-
if (
|
|
1278
|
+
const v = Number(h.value);
|
|
1279
|
+
if (!v || v <= 0) return;
|
|
1280
|
+
const f = K.fromDim(e.margin.top) + K.fromDim(e.margin.bottom), m = Te(f, e.size.height.unit);
|
|
1281
|
+
if (v < m) return;
|
|
1282
1282
|
const g = {
|
|
1283
1283
|
...e.size,
|
|
1284
|
-
height: { ...e.size.height, value:
|
|
1284
|
+
height: { ...e.size.height, value: v }
|
|
1285
1285
|
};
|
|
1286
1286
|
n({ ...e, size: g });
|
|
1287
1287
|
},
|
|
1288
1288
|
[e, n]
|
|
1289
1289
|
), s = y(
|
|
1290
1290
|
({ target: h }) => {
|
|
1291
|
-
const
|
|
1291
|
+
const v = h.value, f = {
|
|
1292
1292
|
...e.size,
|
|
1293
|
-
width: { ...e.size.width, unit:
|
|
1294
|
-
height: { ...e.size.height, unit:
|
|
1293
|
+
width: { ...e.size.width, unit: v },
|
|
1294
|
+
height: { ...e.size.height, unit: v }
|
|
1295
1295
|
};
|
|
1296
|
-
n({ ...e, size:
|
|
1296
|
+
n({ ...e, size: f });
|
|
1297
1297
|
},
|
|
1298
1298
|
[e, n]
|
|
1299
1299
|
), d = y(() => {
|
|
@@ -1301,24 +1301,24 @@ const Pl = [
|
|
|
1301
1301
|
}, [e, l, n]), u = y(() => {
|
|
1302
1302
|
n({ ...e, autoWidth: a ? void 0 : !0 });
|
|
1303
1303
|
}, [e, a, n]);
|
|
1304
|
-
return /* @__PURE__ */ p(
|
|
1305
|
-
/* @__PURE__ */ t("span", { className:
|
|
1304
|
+
return /* @__PURE__ */ p(se, { children: [
|
|
1305
|
+
/* @__PURE__ */ t("span", { className: D.sectionLabel, children: "用紙" }),
|
|
1306
1306
|
/* @__PURE__ */ t(
|
|
1307
1307
|
"select",
|
|
1308
1308
|
{
|
|
1309
|
-
className:
|
|
1309
|
+
className: D.select,
|
|
1310
1310
|
value: e.size.preset,
|
|
1311
1311
|
onChange: o,
|
|
1312
1312
|
"aria-label": "用紙サイズ",
|
|
1313
1313
|
title: "用紙サイズ",
|
|
1314
|
-
children:
|
|
1314
|
+
children: Rl.map((h) => /* @__PURE__ */ t("option", { value: h.value, children: h.label }, h.value))
|
|
1315
1315
|
}
|
|
1316
1316
|
),
|
|
1317
|
-
/* @__PURE__ */ p("div", { className:
|
|
1317
|
+
/* @__PURE__ */ p("div", { className: D.heightModeSwitch, children: [
|
|
1318
1318
|
/* @__PURE__ */ t(
|
|
1319
1319
|
"span",
|
|
1320
1320
|
{
|
|
1321
|
-
className: `${
|
|
1321
|
+
className: `${D.switchLabel} ${l ? "" : D.switchLabelActive}`,
|
|
1322
1322
|
children: "固定"
|
|
1323
1323
|
}
|
|
1324
1324
|
),
|
|
@@ -1329,24 +1329,24 @@ const Pl = [
|
|
|
1329
1329
|
role: "switch",
|
|
1330
1330
|
"aria-checked": l,
|
|
1331
1331
|
"aria-label": "高さモード",
|
|
1332
|
-
className:
|
|
1332
|
+
className: D.toggle,
|
|
1333
1333
|
onClick: d,
|
|
1334
|
-
children: /* @__PURE__ */ t("span", { className:
|
|
1334
|
+
children: /* @__PURE__ */ t("span", { className: D.thumb })
|
|
1335
1335
|
}
|
|
1336
1336
|
),
|
|
1337
1337
|
/* @__PURE__ */ t(
|
|
1338
1338
|
"span",
|
|
1339
1339
|
{
|
|
1340
|
-
className: `${
|
|
1340
|
+
className: `${D.switchLabel} ${l ? D.switchLabelActive : ""}`,
|
|
1341
1341
|
children: "自動"
|
|
1342
1342
|
}
|
|
1343
1343
|
)
|
|
1344
1344
|
] }),
|
|
1345
|
-
/* @__PURE__ */ p("div", { className:
|
|
1345
|
+
/* @__PURE__ */ p("div", { className: D.heightModeSwitch, children: [
|
|
1346
1346
|
/* @__PURE__ */ t(
|
|
1347
1347
|
"span",
|
|
1348
1348
|
{
|
|
1349
|
-
className: `${
|
|
1349
|
+
className: `${D.switchLabel} ${a ? "" : D.switchLabelActive}`,
|
|
1350
1350
|
children: "幅固定"
|
|
1351
1351
|
}
|
|
1352
1352
|
),
|
|
@@ -1357,27 +1357,27 @@ const Pl = [
|
|
|
1357
1357
|
role: "switch",
|
|
1358
1358
|
"aria-checked": a,
|
|
1359
1359
|
"aria-label": "幅モード",
|
|
1360
|
-
className:
|
|
1360
|
+
className: D.toggle,
|
|
1361
1361
|
onClick: u,
|
|
1362
|
-
children: /* @__PURE__ */ t("span", { className:
|
|
1362
|
+
children: /* @__PURE__ */ t("span", { className: D.thumb })
|
|
1363
1363
|
}
|
|
1364
1364
|
),
|
|
1365
1365
|
/* @__PURE__ */ t(
|
|
1366
1366
|
"span",
|
|
1367
1367
|
{
|
|
1368
|
-
className: `${
|
|
1368
|
+
className: `${D.switchLabel} ${a ? D.switchLabelActive : ""}`,
|
|
1369
1369
|
children: "幅自動"
|
|
1370
1370
|
}
|
|
1371
1371
|
)
|
|
1372
1372
|
] }),
|
|
1373
|
-
i && /* @__PURE__ */ p(
|
|
1373
|
+
i && /* @__PURE__ */ p(se, { children: [
|
|
1374
1374
|
/* @__PURE__ */ t(
|
|
1375
1375
|
"input",
|
|
1376
1376
|
{
|
|
1377
1377
|
type: "number",
|
|
1378
|
-
className:
|
|
1378
|
+
className: D.numberInput,
|
|
1379
1379
|
value: e.size.width.value,
|
|
1380
|
-
min:
|
|
1380
|
+
min: Te(
|
|
1381
1381
|
K.fromDim(e.margin.left) + K.fromDim(e.margin.right),
|
|
1382
1382
|
e.size.width.unit
|
|
1383
1383
|
),
|
|
@@ -1388,14 +1388,14 @@ const Pl = [
|
|
|
1388
1388
|
title: "幅"
|
|
1389
1389
|
}
|
|
1390
1390
|
),
|
|
1391
|
-
/* @__PURE__ */ t("span", { className:
|
|
1391
|
+
/* @__PURE__ */ t("span", { className: D.sectionLabel, children: "×" }),
|
|
1392
1392
|
/* @__PURE__ */ t(
|
|
1393
1393
|
"input",
|
|
1394
1394
|
{
|
|
1395
1395
|
type: "number",
|
|
1396
|
-
className:
|
|
1396
|
+
className: D.numberInput,
|
|
1397
1397
|
value: e.size.height.value,
|
|
1398
|
-
min:
|
|
1398
|
+
min: Te(
|
|
1399
1399
|
K.fromDim(e.margin.top) + K.fromDim(e.margin.bottom),
|
|
1400
1400
|
e.size.height.unit
|
|
1401
1401
|
),
|
|
@@ -1409,7 +1409,7 @@ const Pl = [
|
|
|
1409
1409
|
/* @__PURE__ */ p(
|
|
1410
1410
|
"select",
|
|
1411
1411
|
{
|
|
1412
|
-
className:
|
|
1412
|
+
className: D.select,
|
|
1413
1413
|
value: e.size.width.unit,
|
|
1414
1414
|
onChange: s,
|
|
1415
1415
|
"aria-label": "用紙単位",
|
|
@@ -1424,8 +1424,8 @@ const Pl = [
|
|
|
1424
1424
|
] })
|
|
1425
1425
|
] });
|
|
1426
1426
|
};
|
|
1427
|
-
|
|
1428
|
-
function
|
|
1427
|
+
Wl.displayName = "PaperSettingsSection";
|
|
1428
|
+
function le(e, n, i) {
|
|
1429
1429
|
const l = n.split("."), a = (o, c) => {
|
|
1430
1430
|
const r = l[c];
|
|
1431
1431
|
if (c === l.length - 1) {
|
|
@@ -1459,7 +1459,7 @@ function Y(e, n) {
|
|
|
1459
1459
|
(c) => i(c, l) === a
|
|
1460
1460
|
) ? a : void 0;
|
|
1461
1461
|
}
|
|
1462
|
-
function
|
|
1462
|
+
function Ol(e, n, i) {
|
|
1463
1463
|
var o, c;
|
|
1464
1464
|
if (!e) return [];
|
|
1465
1465
|
const l = [], a = [
|
|
@@ -1475,9 +1475,9 @@ function zl(e, n, i) {
|
|
|
1475
1475
|
},
|
|
1476
1476
|
{ key: "left", style: e.left, x1: 0, y1: 0, x2: 0, y2: i }
|
|
1477
1477
|
];
|
|
1478
|
-
for (const { key: r, style: s, x1: d, y1: u, x2: h, y2:
|
|
1478
|
+
for (const { key: r, style: s, x1: d, y1: u, x2: h, y2: v } of a) {
|
|
1479
1479
|
if (!(s != null && s.type)) continue;
|
|
1480
|
-
const
|
|
1480
|
+
const f = ((o = s.width) == null ? void 0 : o.unit) === "px" ? s.width.value : ((c = s.width) == null ? void 0 : c.value) ?? 1, m = s.type === ue.DASHED ? "8 4" : s.type === ue.DOTTED ? "2 4" : void 0;
|
|
1481
1481
|
l.push(
|
|
1482
1482
|
/* @__PURE__ */ t(
|
|
1483
1483
|
"line",
|
|
@@ -1485,9 +1485,9 @@ function zl(e, n, i) {
|
|
|
1485
1485
|
x1: d,
|
|
1486
1486
|
y1: u,
|
|
1487
1487
|
x2: h,
|
|
1488
|
-
y2:
|
|
1488
|
+
y2: v,
|
|
1489
1489
|
stroke: s.color ?? "#000",
|
|
1490
|
-
strokeWidth:
|
|
1490
|
+
strokeWidth: f,
|
|
1491
1491
|
strokeDasharray: m
|
|
1492
1492
|
},
|
|
1493
1493
|
r
|
|
@@ -1496,82 +1496,67 @@ function zl(e, n, i) {
|
|
|
1496
1496
|
}
|
|
1497
1497
|
return l;
|
|
1498
1498
|
}
|
|
1499
|
-
|
|
1500
|
-
const n = e == null ? void 0 : e.border;
|
|
1501
|
-
if (!n) return;
|
|
1502
|
-
const i = (a) => {
|
|
1503
|
-
const o = n[a] ?? n.all;
|
|
1504
|
-
if (o != null && o.type)
|
|
1505
|
-
return o;
|
|
1506
|
-
}, l = {
|
|
1507
|
-
top: i("top"),
|
|
1508
|
-
right: i("right"),
|
|
1509
|
-
bottom: i("bottom"),
|
|
1510
|
-
left: i("left")
|
|
1511
|
-
};
|
|
1512
|
-
if (!(!l.top && !l.right && !l.bottom && !l.left))
|
|
1513
|
-
return l;
|
|
1514
|
-
}
|
|
1515
|
-
const it = ({
|
|
1499
|
+
const at = ({
|
|
1516
1500
|
selectedBlocks: e,
|
|
1517
1501
|
onUpdateBlocks: n
|
|
1518
1502
|
}) => {
|
|
1519
1503
|
const i = (u) => {
|
|
1520
1504
|
const h = {};
|
|
1521
|
-
for (const
|
|
1522
|
-
h[
|
|
1505
|
+
for (const v of e)
|
|
1506
|
+
h[v.id] = { style: { ...v.style, backgroundColor: u } };
|
|
1523
1507
|
n(h);
|
|
1524
|
-
}, l = (u, h,
|
|
1508
|
+
}, l = (u, h, v) => {
|
|
1525
1509
|
var g, _, w;
|
|
1526
|
-
const
|
|
1510
|
+
const f = {}, m = u === "all" ? ["top", "right", "bottom", "left"] : [u];
|
|
1527
1511
|
for (const L of e) {
|
|
1528
1512
|
let $ = L.style || {};
|
|
1529
1513
|
for (const k of m) {
|
|
1530
|
-
if ($ =
|
|
1514
|
+
if ($ = le($, `border.${k}.${h}`, v), h === "type" && v == null && ($ = le($, `border.${k}.width`, null), $ = le($, `border.${k}.color`, null)), h === "type" && v !== void 0 && v !== null) {
|
|
1531
1515
|
const I = (g = L.style) == null ? void 0 : g.border, S = I == null ? void 0 : I[k];
|
|
1532
|
-
S != null && S.width || ($ =
|
|
1516
|
+
S != null && S.width || ($ = le($, `border.${k}.width`, {
|
|
1533
1517
|
value: 1,
|
|
1534
1518
|
unit: "px"
|
|
1535
|
-
})), S != null && S.color || ($ =
|
|
1519
|
+
})), S != null && S.color || ($ = le($, `border.${k}.color`, "#000000"));
|
|
1536
1520
|
}
|
|
1537
|
-
if (h === "color" &&
|
|
1521
|
+
if (h === "color" && v !== void 0 && v !== null) {
|
|
1538
1522
|
const I = (_ = L.style) == null ? void 0 : _.border, S = I == null ? void 0 : I[k];
|
|
1539
|
-
S != null && S.type || ($ =
|
|
1523
|
+
S != null && S.type || ($ = le(
|
|
1540
1524
|
$,
|
|
1541
1525
|
`border.${k}.type`,
|
|
1542
|
-
|
|
1543
|
-
)), S != null && S.width || ($ =
|
|
1526
|
+
ue.SOLID
|
|
1527
|
+
)), S != null && S.width || ($ = le($, `border.${k}.width`, {
|
|
1544
1528
|
value: 1,
|
|
1545
1529
|
unit: "px"
|
|
1546
1530
|
}));
|
|
1547
1531
|
}
|
|
1548
|
-
if (h === "width" &&
|
|
1532
|
+
if (h === "width" && v !== void 0 && v !== null) {
|
|
1549
1533
|
const I = (w = L.style) == null ? void 0 : w.border, S = I == null ? void 0 : I[k];
|
|
1550
|
-
S != null && S.type || ($ =
|
|
1534
|
+
S != null && S.type || ($ = le(
|
|
1551
1535
|
$,
|
|
1552
1536
|
`border.${k}.type`,
|
|
1553
|
-
|
|
1554
|
-
)), S != null && S.color || ($ =
|
|
1537
|
+
ue.SOLID
|
|
1538
|
+
)), S != null && S.color || ($ = le($, `border.${k}.color`, "#000000"));
|
|
1555
1539
|
}
|
|
1556
1540
|
}
|
|
1557
|
-
|
|
1541
|
+
f[L.id] = { style: $ };
|
|
1558
1542
|
}
|
|
1559
|
-
n(
|
|
1543
|
+
n(f);
|
|
1560
1544
|
}, a = Y(
|
|
1561
1545
|
e,
|
|
1562
1546
|
"style.backgroundColor"
|
|
1563
|
-
), o =
|
|
1547
|
+
), o = ne(() => {
|
|
1548
|
+
var h;
|
|
1564
1549
|
if (e.length !== 1) return;
|
|
1565
1550
|
const u = e[0];
|
|
1566
|
-
return
|
|
1567
|
-
}, [e]), c =
|
|
1568
|
-
() =>
|
|
1551
|
+
return (h = u == null ? void 0 : u.style) == null ? void 0 : h.border;
|
|
1552
|
+
}, [e]), c = ne(
|
|
1553
|
+
() => Ol(o, 80, 80),
|
|
1569
1554
|
[o]
|
|
1570
1555
|
);
|
|
1571
1556
|
if (e.length === 0) return null;
|
|
1572
1557
|
const r = (u) => u === "all" ? "top" : u, s = (u) => /* @__PURE__ */ p("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
1573
1558
|
/* @__PURE__ */ t(
|
|
1574
|
-
|
|
1559
|
+
ye,
|
|
1575
1560
|
{
|
|
1576
1561
|
value: Y(
|
|
1577
1562
|
e,
|
|
@@ -1582,9 +1567,9 @@ const it = ({
|
|
|
1582
1567
|
height: 24,
|
|
1583
1568
|
options: [
|
|
1584
1569
|
{ label: "", value: null },
|
|
1585
|
-
{ label: "実線", value:
|
|
1586
|
-
{ label: "破線", value:
|
|
1587
|
-
{ label: "点線", value:
|
|
1570
|
+
{ label: "実線", value: ue.SOLID },
|
|
1571
|
+
{ label: "破線", value: ue.DASHED },
|
|
1572
|
+
{ label: "点線", value: ue.DOTTED }
|
|
1588
1573
|
]
|
|
1589
1574
|
}
|
|
1590
1575
|
),
|
|
@@ -1598,12 +1583,12 @@ const it = ({
|
|
|
1598
1583
|
onChange: (h) => l(u, "width", h),
|
|
1599
1584
|
placeholder: "太さ",
|
|
1600
1585
|
height: 24,
|
|
1601
|
-
allowedUnits:
|
|
1586
|
+
allowedUnits: rn,
|
|
1602
1587
|
min: 1
|
|
1603
1588
|
}
|
|
1604
1589
|
),
|
|
1605
1590
|
/* @__PURE__ */ t(
|
|
1606
|
-
|
|
1591
|
+
ie,
|
|
1607
1592
|
{
|
|
1608
1593
|
value: Y(
|
|
1609
1594
|
e,
|
|
@@ -1753,7 +1738,7 @@ const it = ({
|
|
|
1753
1738
|
}
|
|
1754
1739
|
),
|
|
1755
1740
|
/* @__PURE__ */ t(
|
|
1756
|
-
|
|
1741
|
+
ie,
|
|
1757
1742
|
{
|
|
1758
1743
|
value: a,
|
|
1759
1744
|
onChange: (u) => i(u),
|
|
@@ -1761,34 +1746,34 @@ const it = ({
|
|
|
1761
1746
|
allowUndefined: !0
|
|
1762
1747
|
}
|
|
1763
1748
|
),
|
|
1764
|
-
/* @__PURE__ */ t("div", { style: { minWidth: 0 }, children: /* @__PURE__ */ p(
|
|
1765
|
-
/* @__PURE__ */ t("div", { style: { width: "100%" }, children: /* @__PURE__ */ p(
|
|
1766
|
-
/* @__PURE__ */ t(
|
|
1767
|
-
/* @__PURE__ */ t(
|
|
1768
|
-
/* @__PURE__ */ t(
|
|
1769
|
-
/* @__PURE__ */ t(
|
|
1770
|
-
/* @__PURE__ */ t(
|
|
1749
|
+
/* @__PURE__ */ t("div", { style: { minWidth: 0 }, children: /* @__PURE__ */ p(Al, { defaultValue: "all", variant: "segmented", children: [
|
|
1750
|
+
/* @__PURE__ */ t("div", { style: { width: "100%" }, children: /* @__PURE__ */ p(Ml, { style: { width: "100%", display: "flex" }, children: [
|
|
1751
|
+
/* @__PURE__ */ t(xe, { value: "all", height: 24, style: d, children: "共通" }),
|
|
1752
|
+
/* @__PURE__ */ t(xe, { value: "top", height: 24, style: d, children: "上" }),
|
|
1753
|
+
/* @__PURE__ */ t(xe, { value: "bottom", height: 24, style: d, children: "下" }),
|
|
1754
|
+
/* @__PURE__ */ t(xe, { value: "left", height: 24, style: d, children: "左" }),
|
|
1755
|
+
/* @__PURE__ */ t(xe, { value: "right", height: 24, style: d, children: "右" })
|
|
1771
1756
|
] }) }),
|
|
1772
1757
|
/* @__PURE__ */ p("div", { style: { marginTop: "4px" }, children: [
|
|
1773
|
-
/* @__PURE__ */ t(
|
|
1774
|
-
/* @__PURE__ */ t(
|
|
1775
|
-
/* @__PURE__ */ t(
|
|
1776
|
-
/* @__PURE__ */ t(
|
|
1777
|
-
/* @__PURE__ */ t(
|
|
1758
|
+
/* @__PURE__ */ t(we, { value: "all", children: s("all") }),
|
|
1759
|
+
/* @__PURE__ */ t(we, { value: "top", children: s("top") }),
|
|
1760
|
+
/* @__PURE__ */ t(we, { value: "bottom", children: s("bottom") }),
|
|
1761
|
+
/* @__PURE__ */ t(we, { value: "left", children: s("left") }),
|
|
1762
|
+
/* @__PURE__ */ t(we, { value: "right", children: s("right") })
|
|
1778
1763
|
] })
|
|
1779
1764
|
] }) })
|
|
1780
1765
|
]
|
|
1781
1766
|
}
|
|
1782
1767
|
);
|
|
1783
1768
|
};
|
|
1784
|
-
|
|
1785
|
-
const
|
|
1786
|
-
container:
|
|
1787
|
-
grid:
|
|
1788
|
-
field:
|
|
1789
|
-
label:
|
|
1790
|
-
inputWrapper:
|
|
1791
|
-
},
|
|
1769
|
+
at.displayName = "BackgroundBorderPanel";
|
|
1770
|
+
const Fl = "_container_1gf2q_1", jl = "_grid_1gf2q_9", Ul = "_field_1gf2q_15", Vl = "_label_1gf2q_22", ql = "_inputWrapper_1gf2q_32", q = {
|
|
1771
|
+
container: Fl,
|
|
1772
|
+
grid: jl,
|
|
1773
|
+
field: Ul,
|
|
1774
|
+
label: Vl,
|
|
1775
|
+
inputWrapper: ql
|
|
1776
|
+
}, ot = ({
|
|
1792
1777
|
selectedBlocks: e,
|
|
1793
1778
|
onUpdateBlocks: n,
|
|
1794
1779
|
gridSize: i
|
|
@@ -1802,11 +1787,11 @@ const Rl = "_container_1gf2q_1", Ol = "_grid_1gf2q_9", Fl = "_field_1gf2q_15", j
|
|
|
1802
1787
|
if (u === void 0) return;
|
|
1803
1788
|
const h = Math.max(
|
|
1804
1789
|
...e.map((w) => w.layout.x + w.layout.w)
|
|
1805
|
-
),
|
|
1790
|
+
), v = Math.max(
|
|
1806
1791
|
...e.map((w) => w.layout.y + w.layout.h)
|
|
1807
|
-
),
|
|
1792
|
+
), f = h - (a ?? 0), m = v - (o ?? 0);
|
|
1808
1793
|
let g = s;
|
|
1809
|
-
r === "x" && i ? g = Math.max(0, Math.min(s, i.cols -
|
|
1794
|
+
r === "x" && i ? g = Math.max(0, Math.min(s, i.cols - f)) : r === "y" && i ? g = Math.max(0, Math.min(s, i.rows - m)) : g = Math.max(0, s);
|
|
1810
1795
|
const _ = g - u;
|
|
1811
1796
|
e.forEach((w) => {
|
|
1812
1797
|
const L = w.layout[r] + _;
|
|
@@ -1820,16 +1805,16 @@ const Rl = "_container_1gf2q_1", Ol = "_grid_1gf2q_9", Fl = "_field_1gf2q_15", j
|
|
|
1820
1805
|
else if (r === "y" && i)
|
|
1821
1806
|
h = Math.max(0, Math.min(s, i.rows - u.layout.h));
|
|
1822
1807
|
else if (r === "w" && i) {
|
|
1823
|
-
const
|
|
1824
|
-
h = Math.max(1, Math.min(s,
|
|
1808
|
+
const v = i.cols - u.layout.x;
|
|
1809
|
+
h = Math.max(1, Math.min(s, v));
|
|
1825
1810
|
} else if (r === "h" && i) {
|
|
1826
|
-
const
|
|
1827
|
-
h = Math.max(1, Math.min(s,
|
|
1811
|
+
const v = i.rows - u.layout.y;
|
|
1812
|
+
h = Math.max(1, Math.min(s, v));
|
|
1828
1813
|
} else r === "w" || r === "h" ? h = Math.max(1, s) : h = Math.max(0, s);
|
|
1829
1814
|
d[u.id] = { layout: { ...u.layout, [r]: h } };
|
|
1830
1815
|
});
|
|
1831
1816
|
n(d, {
|
|
1832
|
-
mergeKey:
|
|
1817
|
+
mergeKey: cn(
|
|
1833
1818
|
r,
|
|
1834
1819
|
e.map((u) => u.id)
|
|
1835
1820
|
)
|
|
@@ -1898,19 +1883,19 @@ const Rl = "_container_1gf2q_1", Ol = "_grid_1gf2q_9", Fl = "_field_1gf2q_15", j
|
|
|
1898
1883
|
] })
|
|
1899
1884
|
] }) });
|
|
1900
1885
|
};
|
|
1901
|
-
|
|
1902
|
-
const
|
|
1903
|
-
group:
|
|
1904
|
-
btn:
|
|
1905
|
-
active:
|
|
1906
|
-
},
|
|
1907
|
-
({ options: e, current: n, onChange: i }) => /* @__PURE__ */ t("fieldset", { className:
|
|
1886
|
+
ot.displayName = "LayoutPanel";
|
|
1887
|
+
const Gl = "_group_xhfvf_1", Hl = "_btn_xhfvf_13", Kl = "_active_xhfvf_46", qe = {
|
|
1888
|
+
group: Gl,
|
|
1889
|
+
btn: Hl,
|
|
1890
|
+
active: Kl
|
|
1891
|
+
}, Ye = ge(
|
|
1892
|
+
({ options: e, current: n, onChange: i }) => /* @__PURE__ */ t("fieldset", { className: qe.group, children: e.map((l) => {
|
|
1908
1893
|
const a = n === l.value;
|
|
1909
1894
|
return /* @__PURE__ */ t(
|
|
1910
1895
|
"button",
|
|
1911
1896
|
{
|
|
1912
1897
|
type: "button",
|
|
1913
|
-
className: [
|
|
1898
|
+
className: [qe.btn, a ? qe.active : ""].filter(Boolean).join(" "),
|
|
1914
1899
|
title: l.label,
|
|
1915
1900
|
"aria-label": l.label,
|
|
1916
1901
|
"aria-pressed": a,
|
|
@@ -1921,31 +1906,31 @@ const Vl = "_group_xhfvf_1", ql = "_btn_xhfvf_13", Gl = "_active_xhfvf_46", Ve =
|
|
|
1921
1906
|
);
|
|
1922
1907
|
}) })
|
|
1923
1908
|
);
|
|
1924
|
-
|
|
1925
|
-
const
|
|
1909
|
+
Ye.displayName = "AlignmentToggle";
|
|
1910
|
+
const re = dn.defaultProps.styleConfig, ce = {
|
|
1926
1911
|
fontSize: 11,
|
|
1927
1912
|
color: "#888",
|
|
1928
1913
|
whiteSpace: "nowrap",
|
|
1929
1914
|
width: 62,
|
|
1930
1915
|
flexShrink: 0
|
|
1931
|
-
},
|
|
1916
|
+
}, de = {
|
|
1932
1917
|
display: "flex",
|
|
1933
1918
|
gap: 4,
|
|
1934
1919
|
alignItems: "center"
|
|
1935
|
-
},
|
|
1920
|
+
}, zt = ({
|
|
1936
1921
|
value: e,
|
|
1937
1922
|
onChange: n,
|
|
1938
1923
|
readOnly: i = !1
|
|
1939
1924
|
}) => {
|
|
1940
|
-
const l =
|
|
1925
|
+
const l = ne(
|
|
1941
1926
|
() => ({
|
|
1942
|
-
checkboxSize: (e == null ? void 0 : e.checkboxSize) ??
|
|
1943
|
-
borderWidth: (e == null ? void 0 : e.borderWidth) ??
|
|
1944
|
-
borderColor: (e == null ? void 0 : e.borderColor) ??
|
|
1945
|
-
checkWidth: (e == null ? void 0 : e.checkWidth) ??
|
|
1946
|
-
checkColor: (e == null ? void 0 : e.checkColor) ??
|
|
1947
|
-
backgroundColor: (e == null ? void 0 : e.backgroundColor) ??
|
|
1948
|
-
checkedBackgroundColor: (e == null ? void 0 : e.checkedBackgroundColor) ??
|
|
1927
|
+
checkboxSize: (e == null ? void 0 : e.checkboxSize) ?? re.checkboxSize,
|
|
1928
|
+
borderWidth: (e == null ? void 0 : e.borderWidth) ?? re.borderWidth,
|
|
1929
|
+
borderColor: (e == null ? void 0 : e.borderColor) ?? re.borderColor,
|
|
1930
|
+
checkWidth: (e == null ? void 0 : e.checkWidth) ?? re.checkWidth,
|
|
1931
|
+
checkColor: (e == null ? void 0 : e.checkColor) ?? re.checkColor,
|
|
1932
|
+
backgroundColor: (e == null ? void 0 : e.backgroundColor) ?? re.backgroundColor,
|
|
1933
|
+
checkedBackgroundColor: (e == null ? void 0 : e.checkedBackgroundColor) ?? re.checkedBackgroundColor
|
|
1949
1934
|
}),
|
|
1950
1935
|
[e]
|
|
1951
1936
|
), a = y(
|
|
@@ -1969,12 +1954,12 @@ const se = rn.defaultProps.styleConfig, re = {
|
|
|
1969
1954
|
},
|
|
1970
1955
|
children: [!1, !0].map((o) => /* @__PURE__ */ p("div", { style: { textAlign: "center" }, children: [
|
|
1971
1956
|
/* @__PURE__ */ t("div", { style: { fontSize: 11, color: "#888", marginBottom: 4 }, children: o ? "チェック" : "未チェック" }),
|
|
1972
|
-
/* @__PURE__ */ t("div", { style: { width: 24, height: 24 }, children: /* @__PURE__ */ t(
|
|
1957
|
+
/* @__PURE__ */ t("div", { style: { width: 24, height: 24 }, children: /* @__PURE__ */ t(hn, { checked: o, styleConfig: l }) })
|
|
1973
1958
|
] }, String(o)))
|
|
1974
1959
|
}
|
|
1975
1960
|
),
|
|
1976
|
-
/* @__PURE__ */ p("div", { style:
|
|
1977
|
-
/* @__PURE__ */ t("span", { style:
|
|
1961
|
+
/* @__PURE__ */ p("div", { style: de, children: [
|
|
1962
|
+
/* @__PURE__ */ t("span", { style: ce, children: "サイズ" }),
|
|
1978
1963
|
/* @__PURE__ */ t("div", { style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ t(
|
|
1979
1964
|
j,
|
|
1980
1965
|
{
|
|
@@ -1986,8 +1971,8 @@ const se = rn.defaultProps.styleConfig, re = {
|
|
|
1986
1971
|
}
|
|
1987
1972
|
) })
|
|
1988
1973
|
] }),
|
|
1989
|
-
/* @__PURE__ */ p("div", { style:
|
|
1990
|
-
/* @__PURE__ */ t("span", { style:
|
|
1974
|
+
/* @__PURE__ */ p("div", { style: de, children: [
|
|
1975
|
+
/* @__PURE__ */ t("span", { style: ce, children: "枠線 幅" }),
|
|
1991
1976
|
/* @__PURE__ */ t("div", { style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ t(
|
|
1992
1977
|
j,
|
|
1993
1978
|
{
|
|
@@ -1999,10 +1984,10 @@ const se = rn.defaultProps.styleConfig, re = {
|
|
|
1999
1984
|
}
|
|
2000
1985
|
) })
|
|
2001
1986
|
] }),
|
|
2002
|
-
/* @__PURE__ */ p("div", { style:
|
|
2003
|
-
/* @__PURE__ */ t("span", { style:
|
|
1987
|
+
/* @__PURE__ */ p("div", { style: de, children: [
|
|
1988
|
+
/* @__PURE__ */ t("span", { style: ce, children: "枠線 色" }),
|
|
2004
1989
|
/* @__PURE__ */ t("div", { style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ t(
|
|
2005
|
-
|
|
1990
|
+
ie,
|
|
2006
1991
|
{
|
|
2007
1992
|
value: l.borderColor,
|
|
2008
1993
|
onChange: (o) => a("borderColor", o),
|
|
@@ -2011,8 +1996,8 @@ const se = rn.defaultProps.styleConfig, re = {
|
|
|
2011
1996
|
}
|
|
2012
1997
|
) })
|
|
2013
1998
|
] }),
|
|
2014
|
-
/* @__PURE__ */ p("div", { style:
|
|
2015
|
-
/* @__PURE__ */ t("span", { style:
|
|
1999
|
+
/* @__PURE__ */ p("div", { style: de, children: [
|
|
2000
|
+
/* @__PURE__ */ t("span", { style: ce, children: "チェック 幅" }),
|
|
2016
2001
|
/* @__PURE__ */ t("div", { style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ t(
|
|
2017
2002
|
j,
|
|
2018
2003
|
{
|
|
@@ -2024,10 +2009,10 @@ const se = rn.defaultProps.styleConfig, re = {
|
|
|
2024
2009
|
}
|
|
2025
2010
|
) })
|
|
2026
2011
|
] }),
|
|
2027
|
-
/* @__PURE__ */ p("div", { style:
|
|
2028
|
-
/* @__PURE__ */ t("span", { style:
|
|
2012
|
+
/* @__PURE__ */ p("div", { style: de, children: [
|
|
2013
|
+
/* @__PURE__ */ t("span", { style: ce, children: "チェック 色" }),
|
|
2029
2014
|
/* @__PURE__ */ t("div", { style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ t(
|
|
2030
|
-
|
|
2015
|
+
ie,
|
|
2031
2016
|
{
|
|
2032
2017
|
value: l.checkColor,
|
|
2033
2018
|
onChange: (o) => a("checkColor", o),
|
|
@@ -2036,10 +2021,10 @@ const se = rn.defaultProps.styleConfig, re = {
|
|
|
2036
2021
|
}
|
|
2037
2022
|
) })
|
|
2038
2023
|
] }),
|
|
2039
|
-
/* @__PURE__ */ p("div", { style:
|
|
2040
|
-
/* @__PURE__ */ t("span", { style:
|
|
2024
|
+
/* @__PURE__ */ p("div", { style: de, children: [
|
|
2025
|
+
/* @__PURE__ */ t("span", { style: ce, children: "背景色" }),
|
|
2041
2026
|
/* @__PURE__ */ t("div", { style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ t(
|
|
2042
|
-
|
|
2027
|
+
ie,
|
|
2043
2028
|
{
|
|
2044
2029
|
value: l.backgroundColor,
|
|
2045
2030
|
onChange: (o) => a("backgroundColor", o),
|
|
@@ -2048,10 +2033,10 @@ const se = rn.defaultProps.styleConfig, re = {
|
|
|
2048
2033
|
}
|
|
2049
2034
|
) })
|
|
2050
2035
|
] }),
|
|
2051
|
-
/* @__PURE__ */ p("div", { style:
|
|
2052
|
-
/* @__PURE__ */ t("span", { style:
|
|
2036
|
+
/* @__PURE__ */ p("div", { style: de, children: [
|
|
2037
|
+
/* @__PURE__ */ t("span", { style: ce, children: "チェック時 背景色" }),
|
|
2053
2038
|
/* @__PURE__ */ t("div", { style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ t(
|
|
2054
|
-
|
|
2039
|
+
ie,
|
|
2055
2040
|
{
|
|
2056
2041
|
value: l.checkedBackgroundColor,
|
|
2057
2042
|
onChange: (o) => a("checkedBackgroundColor", o),
|
|
@@ -2063,37 +2048,37 @@ const se = rn.defaultProps.styleConfig, re = {
|
|
|
2063
2048
|
] })
|
|
2064
2049
|
] });
|
|
2065
2050
|
};
|
|
2066
|
-
|
|
2067
|
-
const
|
|
2068
|
-
group:
|
|
2069
|
-
btn:
|
|
2070
|
-
active:
|
|
2071
|
-
iconBold:
|
|
2072
|
-
iconItalic:
|
|
2073
|
-
iconUnderline:
|
|
2074
|
-
iconLineThrough:
|
|
2075
|
-
},
|
|
2051
|
+
zt.displayName = "CheckboxStyleEditor";
|
|
2052
|
+
const Zl = "_group_1uyid_1", Yl = "_btn_1uyid_13", Jl = "_active_1uyid_46", Xl = "_iconBold_1uyid_52", Ql = "_iconItalic_1uyid_59", ei = "_iconUnderline_1uyid_66", ti = "_iconLineThrough_1uyid_73", pe = {
|
|
2053
|
+
group: Zl,
|
|
2054
|
+
btn: Yl,
|
|
2055
|
+
active: Jl,
|
|
2056
|
+
iconBold: Xl,
|
|
2057
|
+
iconItalic: Ql,
|
|
2058
|
+
iconUnderline: ei,
|
|
2059
|
+
iconLineThrough: ti
|
|
2060
|
+
}, ni = [
|
|
2076
2061
|
{
|
|
2077
2062
|
key: "fontWeight",
|
|
2078
2063
|
label: "太字",
|
|
2079
|
-
icon: /* @__PURE__ */ t("span", { className:
|
|
2064
|
+
icon: /* @__PURE__ */ t("span", { className: pe.iconBold, "aria-hidden": "true", children: "B" })
|
|
2080
2065
|
},
|
|
2081
2066
|
{
|
|
2082
2067
|
key: "italic",
|
|
2083
2068
|
label: "斜体",
|
|
2084
|
-
icon: /* @__PURE__ */ t("span", { className:
|
|
2069
|
+
icon: /* @__PURE__ */ t("span", { className: pe.iconItalic, "aria-hidden": "true", children: "I" })
|
|
2085
2070
|
},
|
|
2086
2071
|
{
|
|
2087
2072
|
key: "underline",
|
|
2088
2073
|
label: "下線",
|
|
2089
|
-
icon: /* @__PURE__ */ t("span", { className:
|
|
2074
|
+
icon: /* @__PURE__ */ t("span", { className: pe.iconUnderline, "aria-hidden": "true", children: "U" })
|
|
2090
2075
|
},
|
|
2091
2076
|
{
|
|
2092
2077
|
key: "lineThrough",
|
|
2093
2078
|
label: "取り消し線",
|
|
2094
|
-
icon: /* @__PURE__ */ t("span", { className:
|
|
2079
|
+
icon: /* @__PURE__ */ t("span", { className: pe.iconLineThrough, "aria-hidden": "true", children: "S" })
|
|
2095
2080
|
}
|
|
2096
|
-
],
|
|
2081
|
+
], Bt = ({
|
|
2097
2082
|
value: e,
|
|
2098
2083
|
onChange: n,
|
|
2099
2084
|
readOnly: i = !1
|
|
@@ -2101,13 +2086,13 @@ const Hl = "_group_1uyid_1", Kl = "_btn_1uyid_13", Zl = "_active_1uyid_46", Yl =
|
|
|
2101
2086
|
const l = e ?? {}, a = (o) => {
|
|
2102
2087
|
i || n({ ...l, [o]: !l[o] });
|
|
2103
2088
|
};
|
|
2104
|
-
return /* @__PURE__ */ t("fieldset", { className:
|
|
2089
|
+
return /* @__PURE__ */ t("fieldset", { className: pe.group, children: ni.map(({ key: o, label: c, icon: r }) => {
|
|
2105
2090
|
const s = !!l[o];
|
|
2106
2091
|
return /* @__PURE__ */ t(
|
|
2107
2092
|
"button",
|
|
2108
2093
|
{
|
|
2109
2094
|
type: "button",
|
|
2110
|
-
className: [
|
|
2095
|
+
className: [pe.btn, s ? pe.active : ""].filter(Boolean).join(" "),
|
|
2111
2096
|
title: c,
|
|
2112
2097
|
"aria-label": c,
|
|
2113
2098
|
"aria-pressed": s,
|
|
@@ -2119,19 +2104,19 @@ const Hl = "_group_1uyid_1", Kl = "_btn_1uyid_13", Zl = "_active_1uyid_46", Yl =
|
|
|
2119
2104
|
);
|
|
2120
2105
|
}) });
|
|
2121
2106
|
};
|
|
2122
|
-
|
|
2123
|
-
const
|
|
2124
|
-
root:
|
|
2125
|
-
fontFamilyCell:
|
|
2126
|
-
fontSizeCell:
|
|
2127
|
-
colorCell:
|
|
2128
|
-
},
|
|
2107
|
+
Bt.displayName = "FontDecorationToggle";
|
|
2108
|
+
const li = "_root_12n4v_6", ii = "_fontFamilyCell_12n4v_13", ai = "_fontSizeCell_12n4v_14", oi = "_colorCell_12n4v_15", Ne = {
|
|
2109
|
+
root: li,
|
|
2110
|
+
fontFamilyCell: ii,
|
|
2111
|
+
fontSizeCell: ai,
|
|
2112
|
+
colorCell: oi
|
|
2113
|
+
}, si = [
|
|
2129
2114
|
{ label: "ゴシック体", value: "sans-serif" },
|
|
2130
2115
|
{ label: "明朝体", value: "serif" },
|
|
2131
2116
|
{ label: "等幅", value: "monospace" },
|
|
2132
2117
|
{ label: "Arial", value: "Arial, sans-serif" },
|
|
2133
2118
|
{ label: "Times New Roman", value: "'Times New Roman', serif" }
|
|
2134
|
-
],
|
|
2119
|
+
], Rt = ({
|
|
2135
2120
|
value: e,
|
|
2136
2121
|
onChange: n,
|
|
2137
2122
|
readOnly: i = !1
|
|
@@ -2160,28 +2145,28 @@ const ti = "_root_12n4v_6", ni = "_fontFamilyCell_12n4v_13", li = "_fontSizeCell
|
|
|
2160
2145
|
underline: l.underline,
|
|
2161
2146
|
lineThrough: l.lineThrough
|
|
2162
2147
|
};
|
|
2163
|
-
return /* @__PURE__ */ p("div", { className:
|
|
2164
|
-
/* @__PURE__ */ t("div", { className:
|
|
2165
|
-
|
|
2148
|
+
return /* @__PURE__ */ p("div", { className: Ne.root, children: [
|
|
2149
|
+
/* @__PURE__ */ t("div", { className: Ne.fontFamilyCell, children: /* @__PURE__ */ t(
|
|
2150
|
+
ye,
|
|
2166
2151
|
{
|
|
2167
2152
|
value: l.fontFamily,
|
|
2168
2153
|
onChange: a,
|
|
2169
2154
|
readOnly: i,
|
|
2170
|
-
options:
|
|
2155
|
+
options: si,
|
|
2171
2156
|
placeholder: "フォント"
|
|
2172
2157
|
}
|
|
2173
2158
|
) }),
|
|
2174
|
-
/* @__PURE__ */ t("div", { className:
|
|
2159
|
+
/* @__PURE__ */ t("div", { className: Ne.fontSizeCell, children: /* @__PURE__ */ t(
|
|
2175
2160
|
j,
|
|
2176
2161
|
{
|
|
2177
2162
|
value: l.fontSize,
|
|
2178
2163
|
onChange: o,
|
|
2179
2164
|
readOnly: i,
|
|
2180
|
-
config: { allowedUnits:
|
|
2165
|
+
config: { allowedUnits: un, min: 1, step: 1 }
|
|
2181
2166
|
}
|
|
2182
2167
|
) }),
|
|
2183
|
-
/* @__PURE__ */ t("div", { className:
|
|
2184
|
-
|
|
2168
|
+
/* @__PURE__ */ t("div", { className: Ne.colorCell, children: /* @__PURE__ */ t(
|
|
2169
|
+
ie,
|
|
2185
2170
|
{
|
|
2186
2171
|
value: l.color,
|
|
2187
2172
|
onChange: c,
|
|
@@ -2189,8 +2174,8 @@ const ti = "_root_12n4v_6", ni = "_fontFamilyCell_12n4v_13", li = "_fontSizeCell
|
|
|
2189
2174
|
allowUndefined: !0
|
|
2190
2175
|
}
|
|
2191
2176
|
) }),
|
|
2192
|
-
/* @__PURE__ */ t("div", { className:
|
|
2193
|
-
|
|
2177
|
+
/* @__PURE__ */ t("div", { className: Ne.decorationCell, children: /* @__PURE__ */ t(
|
|
2178
|
+
Bt,
|
|
2194
2179
|
{
|
|
2195
2180
|
value: s,
|
|
2196
2181
|
onChange: r,
|
|
@@ -2199,64 +2184,64 @@ const ti = "_root_12n4v_6", ni = "_fontFamilyCell_12n4v_13", li = "_fontSizeCell
|
|
|
2199
2184
|
) })
|
|
2200
2185
|
] });
|
|
2201
2186
|
};
|
|
2202
|
-
|
|
2203
|
-
const
|
|
2187
|
+
Rt.displayName = "FontStyleEditor";
|
|
2188
|
+
const Wt = ({
|
|
2204
2189
|
value: e,
|
|
2205
2190
|
onChange: n,
|
|
2206
2191
|
readOnly: i = !1
|
|
2207
2192
|
}) => {
|
|
2208
|
-
const l = e.options ?? [], a =
|
|
2209
|
-
const
|
|
2193
|
+
const l = e.options ?? [], a = sn(), o = ne(() => {
|
|
2194
|
+
const f = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Set();
|
|
2210
2195
|
for (const [g, _] of l.entries())
|
|
2211
|
-
|
|
2196
|
+
f.has(_.value) ? (m.add(f.get(_.value)), m.add(g)) : f.set(_.value, g);
|
|
2212
2197
|
return m;
|
|
2213
2198
|
}, [l]), c = y(() => {
|
|
2214
|
-
const
|
|
2199
|
+
const f = {
|
|
2215
2200
|
label: `選択肢${l.length + 1}`,
|
|
2216
2201
|
value: `option${l.length + 1}`
|
|
2217
2202
|
};
|
|
2218
|
-
n({ ...e, options: [...l,
|
|
2203
|
+
n({ ...e, options: [...l, f] });
|
|
2219
2204
|
}, [l, e, n]), r = y(
|
|
2220
|
-
(
|
|
2221
|
-
n({ ...e, options: l.filter((m, g) => g !==
|
|
2205
|
+
(f) => {
|
|
2206
|
+
n({ ...e, options: l.filter((m, g) => g !== f) });
|
|
2222
2207
|
},
|
|
2223
2208
|
[l, e, n]
|
|
2224
2209
|
), s = y(
|
|
2225
|
-
(
|
|
2210
|
+
(f, m) => {
|
|
2226
2211
|
n({
|
|
2227
2212
|
...e,
|
|
2228
2213
|
options: l.map(
|
|
2229
|
-
(g, _) => _ ===
|
|
2214
|
+
(g, _) => _ === f ? { ...g, label: m } : g
|
|
2230
2215
|
)
|
|
2231
2216
|
});
|
|
2232
2217
|
},
|
|
2233
2218
|
[l, e, n]
|
|
2234
2219
|
), d = y(
|
|
2235
|
-
(
|
|
2220
|
+
(f, m) => {
|
|
2236
2221
|
n({
|
|
2237
2222
|
...e,
|
|
2238
2223
|
options: l.map(
|
|
2239
|
-
(g, _) => _ ===
|
|
2224
|
+
(g, _) => _ === f ? { ...g, value: m } : g
|
|
2240
2225
|
)
|
|
2241
2226
|
});
|
|
2242
2227
|
},
|
|
2243
2228
|
[l, e, n]
|
|
2244
2229
|
), u = y(
|
|
2245
|
-
(
|
|
2230
|
+
(f, m) => {
|
|
2246
2231
|
n({
|
|
2247
2232
|
...e,
|
|
2248
2233
|
options: l.map(
|
|
2249
|
-
(g, _) => _ ===
|
|
2234
|
+
(g, _) => _ === f ? { ...g, color: m } : g
|
|
2250
2235
|
)
|
|
2251
2236
|
});
|
|
2252
2237
|
},
|
|
2253
2238
|
[l, e, n]
|
|
2254
2239
|
), h = y(
|
|
2255
|
-
(
|
|
2256
|
-
n({ ...e, allowEmpty:
|
|
2240
|
+
(f) => {
|
|
2241
|
+
n({ ...e, allowEmpty: f });
|
|
2257
2242
|
},
|
|
2258
2243
|
[e, n]
|
|
2259
|
-
),
|
|
2244
|
+
), v = {
|
|
2260
2245
|
padding: "4px 8px",
|
|
2261
2246
|
border: "1px solid #ccc",
|
|
2262
2247
|
borderRadius: 4,
|
|
@@ -2267,10 +2252,10 @@ const zt = ({
|
|
|
2267
2252
|
};
|
|
2268
2253
|
return /* @__PURE__ */ p("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: [
|
|
2269
2254
|
/* @__PURE__ */ t(
|
|
2270
|
-
|
|
2255
|
+
oe,
|
|
2271
2256
|
{
|
|
2272
2257
|
value: e.allowEmpty ?? !0,
|
|
2273
|
-
onChange: (
|
|
2258
|
+
onChange: (f) => h(f ?? !0),
|
|
2274
2259
|
label: "空選択を許可",
|
|
2275
2260
|
readOnly: i
|
|
2276
2261
|
}
|
|
@@ -2285,7 +2270,7 @@ const zt = ({
|
|
|
2285
2270
|
maxHeight: 300,
|
|
2286
2271
|
overflowY: "auto"
|
|
2287
2272
|
},
|
|
2288
|
-
children: l.map((
|
|
2273
|
+
children: l.map((f, m) => /* @__PURE__ */ p(
|
|
2289
2274
|
"div",
|
|
2290
2275
|
{
|
|
2291
2276
|
style: {
|
|
@@ -2348,8 +2333,8 @@ const zt = ({
|
|
|
2348
2333
|
{
|
|
2349
2334
|
type: "text",
|
|
2350
2335
|
id: `${a}-label-${m}`,
|
|
2351
|
-
style:
|
|
2352
|
-
value:
|
|
2336
|
+
style: v,
|
|
2337
|
+
value: f.label,
|
|
2353
2338
|
onChange: (g) => s(m, g.target.value),
|
|
2354
2339
|
disabled: i,
|
|
2355
2340
|
placeholder: "表示名"
|
|
@@ -2377,10 +2362,10 @@ const zt = ({
|
|
|
2377
2362
|
type: "text",
|
|
2378
2363
|
id: `${a}-value-${m}`,
|
|
2379
2364
|
style: {
|
|
2380
|
-
...
|
|
2365
|
+
...v,
|
|
2381
2366
|
borderColor: o.has(m) ? "#e53e3e" : "#ccc"
|
|
2382
2367
|
},
|
|
2383
|
-
value:
|
|
2368
|
+
value: f.value,
|
|
2384
2369
|
onChange: (g) => d(m, g.target.value),
|
|
2385
2370
|
disabled: i,
|
|
2386
2371
|
placeholder: "内部値"
|
|
@@ -2414,9 +2399,9 @@ const zt = ({
|
|
|
2414
2399
|
}
|
|
2415
2400
|
),
|
|
2416
2401
|
/* @__PURE__ */ t(
|
|
2417
|
-
|
|
2402
|
+
ie,
|
|
2418
2403
|
{
|
|
2419
|
-
value:
|
|
2404
|
+
value: f.color,
|
|
2420
2405
|
onChange: (g) => u(m, g),
|
|
2421
2406
|
allowUndefined: !0,
|
|
2422
2407
|
placeholder: "色を選択"
|
|
@@ -2425,7 +2410,7 @@ const zt = ({
|
|
|
2425
2410
|
] })
|
|
2426
2411
|
]
|
|
2427
2412
|
},
|
|
2428
|
-
|
|
2413
|
+
f.value || `option-${m}`
|
|
2429
2414
|
))
|
|
2430
2415
|
}
|
|
2431
2416
|
),
|
|
@@ -2449,16 +2434,16 @@ const zt = ({
|
|
|
2449
2434
|
)
|
|
2450
2435
|
] });
|
|
2451
2436
|
};
|
|
2452
|
-
|
|
2453
|
-
const
|
|
2454
|
-
root:
|
|
2455
|
-
linkLabel:
|
|
2456
|
-
allRow:
|
|
2457
|
-
grid:
|
|
2458
|
-
sideRow:
|
|
2459
|
-
cell:
|
|
2460
|
-
spacer:
|
|
2461
|
-
},
|
|
2437
|
+
Wt.displayName = "OptionsEditor";
|
|
2438
|
+
const ri = "_root_111zo_7", ci = "_linkLabel_111zo_14", di = "_allRow_111zo_31", hi = "_grid_111zo_38", ui = "_sideRow_111zo_45", pi = "_cell_111zo_53", mi = "_spacer_111zo_59", Q = {
|
|
2439
|
+
root: ri,
|
|
2440
|
+
linkLabel: ci,
|
|
2441
|
+
allRow: di,
|
|
2442
|
+
grid: hi,
|
|
2443
|
+
sideRow: ui,
|
|
2444
|
+
cell: pi,
|
|
2445
|
+
spacer: mi
|
|
2446
|
+
}, Ot = ({
|
|
2462
2447
|
bulk: e,
|
|
2463
2448
|
onChange: n,
|
|
2464
2449
|
readOnly: i = !1
|
|
@@ -2474,8 +2459,8 @@ const oi = "_root_111zo_7", si = "_linkLabel_111zo_14", ri = "_allRow_111zo_31",
|
|
|
2474
2459
|
),
|
|
2475
2460
|
"全辺を一括設定"
|
|
2476
2461
|
] });
|
|
2477
|
-
|
|
2478
|
-
const ee = { value: 0, unit: "px" },
|
|
2462
|
+
Ot.displayName = "PaddingLinkCheckbox";
|
|
2463
|
+
const ee = { value: 0, unit: "px" }, Ft = ({
|
|
2479
2464
|
value: e,
|
|
2480
2465
|
onChange: n,
|
|
2481
2466
|
readOnly: i = !1
|
|
@@ -2519,7 +2504,7 @@ const ee = { value: 0, unit: "px" }, Rt = ({
|
|
|
2519
2504
|
);
|
|
2520
2505
|
return /* @__PURE__ */ p("div", { className: Q.root, children: [
|
|
2521
2506
|
/* @__PURE__ */ t(
|
|
2522
|
-
|
|
2507
|
+
Ot,
|
|
2523
2508
|
{
|
|
2524
2509
|
bulk: a,
|
|
2525
2510
|
onChange: o,
|
|
@@ -2533,7 +2518,7 @@ const ee = { value: 0, unit: "px" }, Rt = ({
|
|
|
2533
2518
|
{
|
|
2534
2519
|
value: l.all ?? ee,
|
|
2535
2520
|
onChange: c,
|
|
2536
|
-
config: { allowedUnits:
|
|
2521
|
+
config: { allowedUnits: _e, min: 0 },
|
|
2537
2522
|
readOnly: i
|
|
2538
2523
|
}
|
|
2539
2524
|
) }) })
|
|
@@ -2545,7 +2530,7 @@ const ee = { value: 0, unit: "px" }, Rt = ({
|
|
|
2545
2530
|
{
|
|
2546
2531
|
value: l.top ?? ee,
|
|
2547
2532
|
onChange: r,
|
|
2548
|
-
config: { allowedUnits:
|
|
2533
|
+
config: { allowedUnits: _e, min: 0 },
|
|
2549
2534
|
readOnly: i
|
|
2550
2535
|
}
|
|
2551
2536
|
) }),
|
|
@@ -2555,7 +2540,7 @@ const ee = { value: 0, unit: "px" }, Rt = ({
|
|
|
2555
2540
|
{
|
|
2556
2541
|
value: l.left ?? ee,
|
|
2557
2542
|
onChange: u,
|
|
2558
|
-
config: { allowedUnits:
|
|
2543
|
+
config: { allowedUnits: _e, min: 0 },
|
|
2559
2544
|
readOnly: i
|
|
2560
2545
|
}
|
|
2561
2546
|
) }),
|
|
@@ -2565,7 +2550,7 @@ const ee = { value: 0, unit: "px" }, Rt = ({
|
|
|
2565
2550
|
{
|
|
2566
2551
|
value: l.right ?? ee,
|
|
2567
2552
|
onChange: s,
|
|
2568
|
-
config: { allowedUnits:
|
|
2553
|
+
config: { allowedUnits: _e, min: 0 },
|
|
2569
2554
|
readOnly: i
|
|
2570
2555
|
}
|
|
2571
2556
|
) })
|
|
@@ -2575,7 +2560,7 @@ const ee = { value: 0, unit: "px" }, Rt = ({
|
|
|
2575
2560
|
{
|
|
2576
2561
|
value: l.bottom ?? ee,
|
|
2577
2562
|
onChange: d,
|
|
2578
|
-
config: { allowedUnits:
|
|
2563
|
+
config: { allowedUnits: _e, min: 0 },
|
|
2579
2564
|
readOnly: i
|
|
2580
2565
|
}
|
|
2581
2566
|
) })
|
|
@@ -2583,47 +2568,47 @@ const ee = { value: 0, unit: "px" }, Rt = ({
|
|
|
2583
2568
|
)
|
|
2584
2569
|
] });
|
|
2585
2570
|
};
|
|
2586
|
-
|
|
2587
|
-
const
|
|
2588
|
-
{ label: "標準", value:
|
|
2589
|
-
{ label: "単語で折り返し", value:
|
|
2590
|
-
{ label: "文字で折り返し", value:
|
|
2591
|
-
],
|
|
2571
|
+
Ft.displayName = "PaddingEditor";
|
|
2572
|
+
const Ce = pn.defaultProps, bi = [
|
|
2573
|
+
{ label: "標準", value: Oe.normal },
|
|
2574
|
+
{ label: "単語で折り返し", value: Oe.breakWord },
|
|
2575
|
+
{ label: "文字で折り返し", value: Oe.breakAll }
|
|
2576
|
+
], Ge = {
|
|
2592
2577
|
display: "flex",
|
|
2593
2578
|
alignItems: "center",
|
|
2594
2579
|
gap: 6,
|
|
2595
2580
|
marginBottom: 4
|
|
2596
|
-
},
|
|
2581
|
+
}, He = {
|
|
2597
2582
|
fontSize: 11,
|
|
2598
2583
|
color: "#666",
|
|
2599
2584
|
minWidth: 72,
|
|
2600
2585
|
flexShrink: 0
|
|
2601
|
-
},
|
|
2586
|
+
}, jt = ({
|
|
2602
2587
|
multiline: e,
|
|
2603
2588
|
lineHeight: n,
|
|
2604
2589
|
wordWrap: i,
|
|
2605
2590
|
onChange: l,
|
|
2606
2591
|
readOnly: a = !1
|
|
2607
2592
|
}) => /* @__PURE__ */ p("div", { style: { display: "flex", flexDirection: "column", gap: 2 }, children: [
|
|
2608
|
-
/* @__PURE__ */ p("div", { style:
|
|
2609
|
-
/* @__PURE__ */ t("span", { style:
|
|
2593
|
+
/* @__PURE__ */ p("div", { style: Ge, children: [
|
|
2594
|
+
/* @__PURE__ */ t("span", { style: He, children: "複数行" }),
|
|
2610
2595
|
/* @__PURE__ */ t(
|
|
2611
|
-
|
|
2596
|
+
oe,
|
|
2612
2597
|
{
|
|
2613
|
-
value: e ??
|
|
2598
|
+
value: e ?? Ce.multiline,
|
|
2614
2599
|
onChange: (o) => l("multiline", o ?? !1),
|
|
2615
2600
|
readOnly: a,
|
|
2616
2601
|
label: "複数行入力を有効にする"
|
|
2617
2602
|
}
|
|
2618
2603
|
)
|
|
2619
2604
|
] }),
|
|
2620
|
-
/* @__PURE__ */ p("div", { style:
|
|
2621
|
-
/* @__PURE__ */ t("span", { style:
|
|
2605
|
+
/* @__PURE__ */ p("div", { style: Ge, children: [
|
|
2606
|
+
/* @__PURE__ */ t("span", { style: He, children: "行間" }),
|
|
2622
2607
|
/* @__PURE__ */ t("div", { style: { flex: 1 }, children: /* @__PURE__ */ t(
|
|
2623
2608
|
G,
|
|
2624
2609
|
{
|
|
2625
|
-
value: n ??
|
|
2626
|
-
onChange: (o) => l("lineHeight", o ??
|
|
2610
|
+
value: n ?? Ce.lineHeight,
|
|
2611
|
+
onChange: (o) => l("lineHeight", o ?? Ce.lineHeight),
|
|
2627
2612
|
readOnly: a,
|
|
2628
2613
|
min: 0.5,
|
|
2629
2614
|
max: 5,
|
|
@@ -2632,22 +2617,38 @@ const Ne = hn.defaultProps, pi = [
|
|
|
2632
2617
|
}
|
|
2633
2618
|
) })
|
|
2634
2619
|
] }),
|
|
2635
|
-
/* @__PURE__ */ p("div", { style:
|
|
2636
|
-
/* @__PURE__ */ t("span", { style:
|
|
2620
|
+
/* @__PURE__ */ p("div", { style: Ge, children: [
|
|
2621
|
+
/* @__PURE__ */ t("span", { style: He, children: "折り返し" }),
|
|
2637
2622
|
/* @__PURE__ */ t("div", { style: { flex: 1 }, children: /* @__PURE__ */ t(
|
|
2638
|
-
|
|
2623
|
+
ye,
|
|
2639
2624
|
{
|
|
2640
|
-
value: i ??
|
|
2641
|
-
onChange: (o) => l("wordWrap", o ??
|
|
2642
|
-
options:
|
|
2625
|
+
value: i ?? Ce.wordWrap,
|
|
2626
|
+
onChange: (o) => l("wordWrap", o ?? Ce.wordWrap),
|
|
2627
|
+
options: bi,
|
|
2643
2628
|
readOnly: a,
|
|
2644
2629
|
height: 24
|
|
2645
2630
|
}
|
|
2646
2631
|
) })
|
|
2647
2632
|
] })
|
|
2648
2633
|
] });
|
|
2649
|
-
|
|
2650
|
-
const
|
|
2634
|
+
jt.displayName = "TextBehaviorEditor";
|
|
2635
|
+
const mt = "data-tatamicks-portal-root";
|
|
2636
|
+
let te = null;
|
|
2637
|
+
function fi() {
|
|
2638
|
+
if (typeof document > "u")
|
|
2639
|
+
throw new Error("getTatamicksPortalRoot requires a DOM environment");
|
|
2640
|
+
if (te && document.body.contains(te))
|
|
2641
|
+
return te;
|
|
2642
|
+
const e = document.querySelector(`[${mt}]`);
|
|
2643
|
+
return e instanceof HTMLElement ? (te = e, te) : (te = document.createElement("div"), te.setAttribute(mt, "true"), Object.assign(te.style, {
|
|
2644
|
+
position: "fixed",
|
|
2645
|
+
inset: "0",
|
|
2646
|
+
pointerEvents: "none",
|
|
2647
|
+
isolation: "isolate",
|
|
2648
|
+
zIndex: "auto"
|
|
2649
|
+
}), document.body.appendChild(te), te);
|
|
2650
|
+
}
|
|
2651
|
+
const Pe = [
|
|
2651
2652
|
{ label: "テキスト", inputType: "text" },
|
|
2652
2653
|
{ label: "数字のみ", inputType: "text", pattern: "[0-9]+" },
|
|
2653
2654
|
{ label: "半角英字のみ", inputType: "text", pattern: "[a-zA-Z]+" },
|
|
@@ -2685,10 +2686,10 @@ const Me = [
|
|
|
2685
2686
|
hideLength: !0
|
|
2686
2687
|
},
|
|
2687
2688
|
{ label: "その他", inputType: "text", isCustom: !0 }
|
|
2688
|
-
],
|
|
2689
|
+
], vi = Pe.map((e) => ({
|
|
2689
2690
|
label: e.label,
|
|
2690
2691
|
value: e.label
|
|
2691
|
-
})),
|
|
2692
|
+
})), gi = `[0-9] 数字のみ
|
|
2692
2693
|
[a-z] 英小文字
|
|
2693
2694
|
[A-Z] 英大文字
|
|
2694
2695
|
[ぁ-ん] ひらがな
|
|
@@ -2696,17 +2697,17 @@ const Me = [
|
|
|
2696
2697
|
* 0回以上繰り返し
|
|
2697
2698
|
{3} 3回繰り返し
|
|
2698
2699
|
{3,5} 3〜5回繰り返し
|
|
2699
|
-
. 任意の1文字`,
|
|
2700
|
+
. 任意の1文字`, Ke = {
|
|
2700
2701
|
display: "flex",
|
|
2701
2702
|
alignItems: "center",
|
|
2702
2703
|
gap: 6,
|
|
2703
2704
|
marginBottom: 4
|
|
2704
|
-
},
|
|
2705
|
+
}, Ze = {
|
|
2705
2706
|
fontSize: 11,
|
|
2706
2707
|
color: "#666",
|
|
2707
2708
|
minWidth: 72,
|
|
2708
2709
|
flexShrink: 0
|
|
2709
|
-
},
|
|
2710
|
+
}, Ut = ({
|
|
2710
2711
|
inputType: e,
|
|
2711
2712
|
minLength: n,
|
|
2712
2713
|
maxLength: i,
|
|
@@ -2715,7 +2716,7 @@ const Me = [
|
|
|
2715
2716
|
onChangeBatch: o,
|
|
2716
2717
|
readOnly: c = !1
|
|
2717
2718
|
}) => {
|
|
2718
|
-
const [r, s] = O(!1), [d, u] = O({}), h =
|
|
2719
|
+
const [r, s] = O(!1), [d, u] = O({}), h = ae(null), v = y(() => {
|
|
2719
2720
|
var S;
|
|
2720
2721
|
const I = (S = h.current) == null ? void 0 : S.getBoundingClientRect();
|
|
2721
2722
|
I && (u({
|
|
@@ -2723,12 +2724,12 @@ const Me = [
|
|
|
2723
2724
|
bottom: window.innerHeight - I.top + 4,
|
|
2724
2725
|
right: window.innerWidth - I.right
|
|
2725
2726
|
}), s(!0));
|
|
2726
|
-
}, []),
|
|
2727
|
-
const I =
|
|
2727
|
+
}, []), f = y(() => s(!1), []), m = e ?? "text", g = l ?? void 0, _ = (() => {
|
|
2728
|
+
const I = Pe.find((S) => S.isCustom || S.inputType !== m ? !1 : S.pattern === g);
|
|
2728
2729
|
return (I == null ? void 0 : I.label) ?? "その他";
|
|
2729
|
-
})(), w = _ === "その他", L =
|
|
2730
|
+
})(), w = _ === "その他", L = Pe.find((I) => I.label === _), $ = !(L != null && L.hideLength), k = y(
|
|
2730
2731
|
(I) => {
|
|
2731
|
-
const S =
|
|
2732
|
+
const S = Pe.find((N) => N.label === I);
|
|
2732
2733
|
if (!S) return;
|
|
2733
2734
|
const b = S.isCustom ? "" : S.pattern ?? null, x = {
|
|
2734
2735
|
inputType: S.inputType,
|
|
@@ -2743,21 +2744,21 @@ const Me = [
|
|
|
2743
2744
|
[a, o]
|
|
2744
2745
|
);
|
|
2745
2746
|
return /* @__PURE__ */ p("div", { style: { display: "flex", flexDirection: "column", gap: 2 }, children: [
|
|
2746
|
-
/* @__PURE__ */ p("div", { style:
|
|
2747
|
-
/* @__PURE__ */ t("span", { style:
|
|
2747
|
+
/* @__PURE__ */ p("div", { style: Ke, children: [
|
|
2748
|
+
/* @__PURE__ */ t("span", { style: Ze, children: "入力タイプ" }),
|
|
2748
2749
|
/* @__PURE__ */ t("div", { style: { flex: 1 }, children: /* @__PURE__ */ t(
|
|
2749
|
-
|
|
2750
|
+
ye,
|
|
2750
2751
|
{
|
|
2751
2752
|
value: _,
|
|
2752
2753
|
onChange: k,
|
|
2753
|
-
options:
|
|
2754
|
+
options: vi,
|
|
2754
2755
|
readOnly: c,
|
|
2755
2756
|
height: 24
|
|
2756
2757
|
}
|
|
2757
2758
|
) })
|
|
2758
2759
|
] }),
|
|
2759
|
-
$ && /* @__PURE__ */ p("div", { style:
|
|
2760
|
-
/* @__PURE__ */ t("span", { style:
|
|
2760
|
+
$ && /* @__PURE__ */ p("div", { style: Ke, children: [
|
|
2761
|
+
/* @__PURE__ */ t("span", { style: Ze, children: "文字数" }),
|
|
2761
2762
|
/* @__PURE__ */ p(
|
|
2762
2763
|
"div",
|
|
2763
2764
|
{
|
|
@@ -2791,12 +2792,12 @@ const Me = [
|
|
|
2791
2792
|
}
|
|
2792
2793
|
)
|
|
2793
2794
|
] }),
|
|
2794
|
-
w && /* @__PURE__ */ p("div", { style:
|
|
2795
|
+
w && /* @__PURE__ */ p("div", { style: Ke, children: [
|
|
2795
2796
|
/* @__PURE__ */ p(
|
|
2796
2797
|
"span",
|
|
2797
2798
|
{
|
|
2798
2799
|
style: {
|
|
2799
|
-
...
|
|
2800
|
+
...Ze,
|
|
2800
2801
|
display: "flex",
|
|
2801
2802
|
alignItems: "center",
|
|
2802
2803
|
gap: 2
|
|
@@ -2825,10 +2826,10 @@ const Me = [
|
|
|
2825
2826
|
outline: "none"
|
|
2826
2827
|
},
|
|
2827
2828
|
"aria-label": "入力パターンの使い方",
|
|
2828
|
-
onMouseEnter:
|
|
2829
|
-
onMouseLeave:
|
|
2830
|
-
onFocus:
|
|
2831
|
-
onBlur:
|
|
2829
|
+
onMouseEnter: v,
|
|
2830
|
+
onMouseLeave: f,
|
|
2831
|
+
onFocus: v,
|
|
2832
|
+
onBlur: f,
|
|
2832
2833
|
children: "i"
|
|
2833
2834
|
}
|
|
2834
2835
|
)
|
|
@@ -2836,7 +2837,7 @@ const Me = [
|
|
|
2836
2837
|
}
|
|
2837
2838
|
),
|
|
2838
2839
|
/* @__PURE__ */ t("div", { style: { flex: 1 }, children: /* @__PURE__ */ t(
|
|
2839
|
-
|
|
2840
|
+
Ie,
|
|
2840
2841
|
{
|
|
2841
2842
|
value: l ?? "",
|
|
2842
2843
|
onChange: (I) => {
|
|
@@ -2847,13 +2848,13 @@ const Me = [
|
|
|
2847
2848
|
}
|
|
2848
2849
|
) })
|
|
2849
2850
|
] }),
|
|
2850
|
-
r &&
|
|
2851
|
+
r && $t(
|
|
2851
2852
|
/* @__PURE__ */ t(
|
|
2852
2853
|
"pre",
|
|
2853
2854
|
{
|
|
2854
2855
|
style: {
|
|
2855
2856
|
...d,
|
|
2856
|
-
zIndex:
|
|
2857
|
+
zIndex: xt.TOOLTIP,
|
|
2857
2858
|
width: "max-content",
|
|
2858
2859
|
margin: 0,
|
|
2859
2860
|
padding: "6px 10px",
|
|
@@ -2867,15 +2868,15 @@ const Me = [
|
|
|
2867
2868
|
whiteSpace: "pre",
|
|
2868
2869
|
pointerEvents: "none"
|
|
2869
2870
|
},
|
|
2870
|
-
children:
|
|
2871
|
+
children: gi
|
|
2871
2872
|
}
|
|
2872
2873
|
),
|
|
2873
|
-
|
|
2874
|
+
fi()
|
|
2874
2875
|
)
|
|
2875
2876
|
] });
|
|
2876
2877
|
};
|
|
2877
|
-
|
|
2878
|
-
const
|
|
2878
|
+
Ut.displayName = "TextValidationEditor";
|
|
2879
|
+
const Vt = {
|
|
2879
2880
|
alignment: "配置",
|
|
2880
2881
|
fontStyle: "フォントスタイル",
|
|
2881
2882
|
padding: "パディング",
|
|
@@ -2885,9 +2886,9 @@ const jt = {
|
|
|
2885
2886
|
textBehavior: "テキスト動作",
|
|
2886
2887
|
selectConfig: "選択肢設定",
|
|
2887
2888
|
checkboxStyle: "チェックボックスデザイン"
|
|
2888
|
-
},
|
|
2889
|
+
}, yi = [
|
|
2889
2890
|
{
|
|
2890
|
-
value:
|
|
2891
|
+
value: Ae.left,
|
|
2891
2892
|
label: "左揃え",
|
|
2892
2893
|
icon: /* @__PURE__ */ p("svg", { viewBox: "0 0 16 16", fill: "currentColor", "aria-hidden": "true", children: [
|
|
2893
2894
|
/* @__PURE__ */ t("rect", { x: "1", y: "2", width: "1.5", height: "12", rx: "0.5" }),
|
|
@@ -2897,7 +2898,7 @@ const jt = {
|
|
|
2897
2898
|
] })
|
|
2898
2899
|
},
|
|
2899
2900
|
{
|
|
2900
|
-
value:
|
|
2901
|
+
value: Ae.center,
|
|
2901
2902
|
label: "中央揃え",
|
|
2902
2903
|
icon: /* @__PURE__ */ p("svg", { viewBox: "0 0 16 16", fill: "currentColor", "aria-hidden": "true", children: [
|
|
2903
2904
|
/* @__PURE__ */ t("rect", { x: "7.25", y: "2", width: "1.5", height: "12", rx: "0.5" }),
|
|
@@ -2907,7 +2908,7 @@ const jt = {
|
|
|
2907
2908
|
] })
|
|
2908
2909
|
},
|
|
2909
2910
|
{
|
|
2910
|
-
value:
|
|
2911
|
+
value: Ae.right,
|
|
2911
2912
|
label: "右揃え",
|
|
2912
2913
|
icon: /* @__PURE__ */ p("svg", { viewBox: "0 0 16 16", fill: "currentColor", "aria-hidden": "true", children: [
|
|
2913
2914
|
/* @__PURE__ */ t("rect", { x: "13.5", y: "2", width: "1.5", height: "12", rx: "0.5" }),
|
|
@@ -2916,9 +2917,9 @@ const jt = {
|
|
|
2916
2917
|
/* @__PURE__ */ t("rect", { x: "5", y: "11", width: "7", height: "2.5", rx: "0.5" })
|
|
2917
2918
|
] })
|
|
2918
2919
|
}
|
|
2919
|
-
],
|
|
2920
|
+
], _i = [
|
|
2920
2921
|
{
|
|
2921
|
-
value:
|
|
2922
|
+
value: Me.top,
|
|
2922
2923
|
label: "上揃え",
|
|
2923
2924
|
icon: /* @__PURE__ */ p("svg", { viewBox: "0 0 16 16", fill: "currentColor", "aria-hidden": "true", children: [
|
|
2924
2925
|
/* @__PURE__ */ t("rect", { x: "1", y: "1", width: "14", height: "1" }),
|
|
@@ -2927,7 +2928,7 @@ const jt = {
|
|
|
2927
2928
|
] })
|
|
2928
2929
|
},
|
|
2929
2930
|
{
|
|
2930
|
-
value:
|
|
2931
|
+
value: Me.center,
|
|
2931
2932
|
label: "中央揃え",
|
|
2932
2933
|
icon: /* @__PURE__ */ p("svg", { viewBox: "0 0 16 16", fill: "currentColor", "aria-hidden": "true", children: [
|
|
2933
2934
|
/* @__PURE__ */ t("rect", { x: "1", y: "7.5", width: "14", height: "1" }),
|
|
@@ -2936,7 +2937,7 @@ const jt = {
|
|
|
2936
2937
|
] })
|
|
2937
2938
|
},
|
|
2938
2939
|
{
|
|
2939
|
-
value:
|
|
2940
|
+
value: Me.bottom,
|
|
2940
2941
|
label: "下揃え",
|
|
2941
2942
|
icon: /* @__PURE__ */ p("svg", { viewBox: "0 0 16 16", fill: "currentColor", "aria-hidden": "true", children: [
|
|
2942
2943
|
/* @__PURE__ */ t("rect", { x: "1", y: "14", width: "14", height: "1" }),
|
|
@@ -2945,13 +2946,13 @@ const jt = {
|
|
|
2945
2946
|
] })
|
|
2946
2947
|
}
|
|
2947
2948
|
];
|
|
2948
|
-
function
|
|
2949
|
+
function be(e) {
|
|
2949
2950
|
return typeof e == "object" && e !== null && typeof e.value == "number" && typeof e.unit == "string";
|
|
2950
2951
|
}
|
|
2951
|
-
function
|
|
2952
|
+
function xi(e) {
|
|
2952
2953
|
return typeof e == "object" && e !== null && Array.isArray(e.options);
|
|
2953
2954
|
}
|
|
2954
|
-
const
|
|
2955
|
+
const st = ge(
|
|
2955
2956
|
({
|
|
2956
2957
|
kind: e,
|
|
2957
2958
|
defaultProps: n,
|
|
@@ -2963,7 +2964,7 @@ const ot = fe(
|
|
|
2963
2964
|
}) => {
|
|
2964
2965
|
switch (e) {
|
|
2965
2966
|
case "alignment": {
|
|
2966
|
-
const r = i("horizontal") ??
|
|
2967
|
+
const r = i("horizontal") ?? Ae.left, s = i("vertical") ?? Me.center;
|
|
2967
2968
|
return /* @__PURE__ */ p(
|
|
2968
2969
|
"div",
|
|
2969
2970
|
{
|
|
@@ -2975,17 +2976,17 @@ const ot = fe(
|
|
|
2975
2976
|
},
|
|
2976
2977
|
children: [
|
|
2977
2978
|
/* @__PURE__ */ t(
|
|
2978
|
-
|
|
2979
|
+
Ye,
|
|
2979
2980
|
{
|
|
2980
|
-
options:
|
|
2981
|
+
options: yi,
|
|
2981
2982
|
current: r,
|
|
2982
2983
|
onChange: (d) => l("horizontal", d)
|
|
2983
2984
|
}
|
|
2984
2985
|
),
|
|
2985
2986
|
/* @__PURE__ */ t(
|
|
2986
|
-
|
|
2987
|
+
Ye,
|
|
2987
2988
|
{
|
|
2988
|
-
options:
|
|
2989
|
+
options: _i,
|
|
2989
2990
|
current: s,
|
|
2990
2991
|
onChange: (d) => l("vertical", d)
|
|
2991
2992
|
}
|
|
@@ -2997,7 +2998,7 @@ const ot = fe(
|
|
|
2997
2998
|
case "fontStyle": {
|
|
2998
2999
|
const r = i("fontSize"), s = {
|
|
2999
3000
|
fontFamily: i("fontFamily"),
|
|
3000
|
-
fontSize:
|
|
3001
|
+
fontSize: be(r) ? r : void 0,
|
|
3001
3002
|
color: i("color"),
|
|
3002
3003
|
fontWeight: i("fontWeight"),
|
|
3003
3004
|
italic: i("italic"),
|
|
@@ -3005,7 +3006,7 @@ const ot = fe(
|
|
|
3005
3006
|
lineThrough: i("lineThrough")
|
|
3006
3007
|
};
|
|
3007
3008
|
return /* @__PURE__ */ t(
|
|
3008
|
-
|
|
3009
|
+
Rt,
|
|
3009
3010
|
{
|
|
3010
3011
|
value: s,
|
|
3011
3012
|
onChange: (d) => {
|
|
@@ -3019,18 +3020,18 @@ const ot = fe(
|
|
|
3019
3020
|
);
|
|
3020
3021
|
}
|
|
3021
3022
|
case "padding": {
|
|
3022
|
-
const r = i("top"), s = i("right"), d = i("bottom"), u = i("left"), h = i("bulk"),
|
|
3023
|
-
top:
|
|
3024
|
-
right:
|
|
3025
|
-
bottom:
|
|
3026
|
-
left:
|
|
3023
|
+
const r = i("top"), s = i("right"), d = i("bottom"), u = i("left"), h = i("bulk"), v = i("all"), f = {
|
|
3024
|
+
top: be(r) ? r : void 0,
|
|
3025
|
+
right: be(s) ? s : void 0,
|
|
3026
|
+
bottom: be(d) ? d : void 0,
|
|
3027
|
+
left: be(u) ? u : void 0,
|
|
3027
3028
|
bulk: typeof h == "boolean" ? h : !1,
|
|
3028
|
-
all:
|
|
3029
|
+
all: be(v) ? v : void 0
|
|
3029
3030
|
};
|
|
3030
3031
|
return /* @__PURE__ */ t(
|
|
3031
|
-
|
|
3032
|
+
Ft,
|
|
3032
3033
|
{
|
|
3033
|
-
value:
|
|
3034
|
+
value: f,
|
|
3034
3035
|
onChange: (m) => {
|
|
3035
3036
|
if (a)
|
|
3036
3037
|
a(m);
|
|
@@ -3044,7 +3045,7 @@ const ot = fe(
|
|
|
3044
3045
|
case "required": {
|
|
3045
3046
|
const r = i("required");
|
|
3046
3047
|
return /* @__PURE__ */ t(
|
|
3047
|
-
|
|
3048
|
+
oe,
|
|
3048
3049
|
{
|
|
3049
3050
|
value: r ?? !1,
|
|
3050
3051
|
onChange: (s) => l("required", s ?? !1),
|
|
@@ -3055,7 +3056,7 @@ const ot = fe(
|
|
|
3055
3056
|
case "placeholder": {
|
|
3056
3057
|
const r = i("placeholder");
|
|
3057
3058
|
return /* @__PURE__ */ t(
|
|
3058
|
-
|
|
3059
|
+
Ie,
|
|
3059
3060
|
{
|
|
3060
3061
|
value: r ?? "",
|
|
3061
3062
|
onChange: (s) => l("placeholder", s ?? "")
|
|
@@ -3064,7 +3065,7 @@ const ot = fe(
|
|
|
3064
3065
|
}
|
|
3065
3066
|
case "textValidation":
|
|
3066
3067
|
return /* @__PURE__ */ t(
|
|
3067
|
-
|
|
3068
|
+
Ut,
|
|
3068
3069
|
{
|
|
3069
3070
|
inputType: i("inputType"),
|
|
3070
3071
|
minLength: i("minLength") ?? void 0,
|
|
@@ -3076,7 +3077,7 @@ const ot = fe(
|
|
|
3076
3077
|
);
|
|
3077
3078
|
case "textBehavior":
|
|
3078
3079
|
return /* @__PURE__ */ t(
|
|
3079
|
-
|
|
3080
|
+
jt,
|
|
3080
3081
|
{
|
|
3081
3082
|
multiline: i("multiline"),
|
|
3082
3083
|
lineHeight: i("lineHeight") ?? void 0,
|
|
@@ -3087,7 +3088,7 @@ const ot = fe(
|
|
|
3087
3088
|
case "checkboxStyle": {
|
|
3088
3089
|
const r = i("styleConfig");
|
|
3089
3090
|
return /* @__PURE__ */ t(
|
|
3090
|
-
|
|
3091
|
+
zt,
|
|
3091
3092
|
{
|
|
3092
3093
|
value: r,
|
|
3093
3094
|
onChange: (s) => l("styleConfig", s)
|
|
@@ -3095,9 +3096,9 @@ const ot = fe(
|
|
|
3095
3096
|
);
|
|
3096
3097
|
}
|
|
3097
3098
|
case "selectConfig": {
|
|
3098
|
-
const r = i("selectConfig"), s =
|
|
3099
|
+
const r = i("selectConfig"), s = xi(r) ? r : { options: [] };
|
|
3099
3100
|
return /* @__PURE__ */ t(
|
|
3100
|
-
|
|
3101
|
+
Wt,
|
|
3101
3102
|
{
|
|
3102
3103
|
value: s,
|
|
3103
3104
|
onChange: (d) => l("selectConfig", d)
|
|
@@ -3106,19 +3107,19 @@ const ot = fe(
|
|
|
3106
3107
|
}
|
|
3107
3108
|
default: {
|
|
3108
3109
|
if (c) {
|
|
3109
|
-
const u = c, h = Object.keys(n)[0] ?? e,
|
|
3110
|
+
const u = c, h = Object.keys(n)[0] ?? e, v = i(h);
|
|
3110
3111
|
return /* @__PURE__ */ t(
|
|
3111
3112
|
u,
|
|
3112
3113
|
{
|
|
3113
|
-
value:
|
|
3114
|
-
onChange: (
|
|
3114
|
+
value: v,
|
|
3115
|
+
onChange: (f) => l(h, f),
|
|
3115
3116
|
readOnly: o
|
|
3116
3117
|
}
|
|
3117
3118
|
);
|
|
3118
3119
|
}
|
|
3119
3120
|
const r = Object.keys(n)[0] ?? e, s = i(r), d = s == null ? "" : typeof s == "object" ? JSON.stringify(s) : String(s);
|
|
3120
3121
|
return /* @__PURE__ */ t(
|
|
3121
|
-
|
|
3122
|
+
Ie,
|
|
3122
3123
|
{
|
|
3123
3124
|
value: d,
|
|
3124
3125
|
onChange: (u) => l(r, u ?? "")
|
|
@@ -3128,8 +3129,8 @@ const ot = fe(
|
|
|
3128
3129
|
}
|
|
3129
3130
|
}
|
|
3130
3131
|
);
|
|
3131
|
-
|
|
3132
|
-
const
|
|
3132
|
+
st.displayName = "PropDefEditor";
|
|
3133
|
+
const qt = ge(
|
|
3133
3134
|
({
|
|
3134
3135
|
propDef: e,
|
|
3135
3136
|
selectedBlocks: n,
|
|
@@ -3143,7 +3144,7 @@ const Ut = fe(
|
|
|
3143
3144
|
var _;
|
|
3144
3145
|
const g = Y(n, `props.${m}`);
|
|
3145
3146
|
return g !== void 0 ? g : ((_ = o == null ? void 0 : o[u]) == null ? void 0 : _[m]) ?? s[m] ?? null;
|
|
3146
|
-
},
|
|
3147
|
+
}, v = d !== void 0 && Object.keys(s).some((m) => m in ((d == null ? void 0 : d.props) ?? {})), f = y(
|
|
3147
3148
|
(m) => {
|
|
3148
3149
|
var g;
|
|
3149
3150
|
if (m) {
|
|
@@ -3170,14 +3171,14 @@ const Ut = fe(
|
|
|
3170
3171
|
return /* @__PURE__ */ t(
|
|
3171
3172
|
V,
|
|
3172
3173
|
{
|
|
3173
|
-
title:
|
|
3174
|
+
title: Vt[r] ?? r,
|
|
3174
3175
|
collapsible: !0,
|
|
3175
|
-
isOpen:
|
|
3176
|
-
onOpenChange:
|
|
3176
|
+
isOpen: v,
|
|
3177
|
+
onOpenChange: f,
|
|
3177
3178
|
openLabel: "カスタム",
|
|
3178
3179
|
closeLabel: "標準",
|
|
3179
3180
|
children: /* @__PURE__ */ t(
|
|
3180
|
-
|
|
3181
|
+
st,
|
|
3181
3182
|
{
|
|
3182
3183
|
kind: r,
|
|
3183
3184
|
defaultProps: s,
|
|
@@ -3192,8 +3193,8 @@ const Ut = fe(
|
|
|
3192
3193
|
);
|
|
3193
3194
|
}
|
|
3194
3195
|
);
|
|
3195
|
-
|
|
3196
|
-
const
|
|
3196
|
+
qt.displayName = "PropertyField";
|
|
3197
|
+
const rt = ({
|
|
3197
3198
|
selectedBlocks: e,
|
|
3198
3199
|
pluginRegistry: n,
|
|
3199
3200
|
onUpdateBlocks: i,
|
|
@@ -3202,30 +3203,30 @@ const st = ({
|
|
|
3202
3203
|
}) => {
|
|
3203
3204
|
const o = e[0], c = o ? n[o.kind] : void 0;
|
|
3204
3205
|
if (!o || !c || e.length === 0) return null;
|
|
3205
|
-
const r = (h,
|
|
3206
|
-
const
|
|
3206
|
+
const r = (h, v) => {
|
|
3207
|
+
const f = {};
|
|
3207
3208
|
e.forEach((m) => {
|
|
3208
|
-
|
|
3209
|
-
props: { ...m.props, [h]:
|
|
3209
|
+
f[m.id] = {
|
|
3210
|
+
props: { ...m.props, [h]: v }
|
|
3210
3211
|
};
|
|
3211
|
-
}), i(
|
|
3212
|
+
}), i(f);
|
|
3212
3213
|
}, s = (h) => {
|
|
3213
|
-
const
|
|
3214
|
-
e.forEach((
|
|
3215
|
-
f
|
|
3216
|
-
props: { ...
|
|
3214
|
+
const v = {};
|
|
3215
|
+
e.forEach((f) => {
|
|
3216
|
+
v[f.id] = {
|
|
3217
|
+
props: { ...f.props, ...h }
|
|
3217
3218
|
};
|
|
3218
|
-
}), i(
|
|
3219
|
+
}), i(v);
|
|
3219
3220
|
}, d = (h) => {
|
|
3220
|
-
const
|
|
3221
|
-
e.forEach((
|
|
3222
|
-
const m = { ...
|
|
3221
|
+
const v = {};
|
|
3222
|
+
e.forEach((f) => {
|
|
3223
|
+
const m = { ...f.props };
|
|
3223
3224
|
for (const g of h)
|
|
3224
3225
|
delete m[g];
|
|
3225
|
-
f
|
|
3226
|
-
}), i(
|
|
3226
|
+
v[f.id] = { props: m };
|
|
3227
|
+
}), i(v);
|
|
3227
3228
|
}, u = c.properties.map((h) => /* @__PURE__ */ t(
|
|
3228
|
-
|
|
3229
|
+
qt,
|
|
3229
3230
|
{
|
|
3230
3231
|
propDef: h,
|
|
3231
3232
|
selectedBlocks: e,
|
|
@@ -3238,12 +3239,12 @@ const st = ({
|
|
|
3238
3239
|
));
|
|
3239
3240
|
return c.properties.length === 0 ? null : a ? /* @__PURE__ */ t(V, { title: c.meta.displayName, children: u }) : /* @__PURE__ */ t("div", { children: u });
|
|
3240
3241
|
};
|
|
3241
|
-
|
|
3242
|
-
const
|
|
3243
|
-
bar:
|
|
3244
|
-
divider:
|
|
3245
|
-
barWrapper:
|
|
3246
|
-
popover:
|
|
3242
|
+
rt.displayName = "PluginPanels";
|
|
3243
|
+
const wi = "_bar_13lr1_4", Ni = "_divider_13lr1_18", Ci = "_barWrapper_13lr1_26", Si = "_popover_13lr1_31", $e = {
|
|
3244
|
+
bar: wi,
|
|
3245
|
+
divider: Ni,
|
|
3246
|
+
barWrapper: Ci,
|
|
3247
|
+
popover: Si
|
|
3247
3248
|
}, ve = ({
|
|
3248
3249
|
icon: e,
|
|
3249
3250
|
label: n,
|
|
@@ -3264,22 +3265,22 @@ const yi = "_bar_13lr1_4", _i = "_divider_13lr1_18", xi = "_barWrapper_13lr1_26"
|
|
|
3264
3265
|
}
|
|
3265
3266
|
);
|
|
3266
3267
|
ve.displayName = "SelectionActionBarButton";
|
|
3267
|
-
const
|
|
3268
|
-
function
|
|
3269
|
-
const e =
|
|
3268
|
+
const Gt = _t(null);
|
|
3269
|
+
function Ii() {
|
|
3270
|
+
const e = ze(Gt);
|
|
3270
3271
|
if (e === null)
|
|
3271
3272
|
throw new Error(
|
|
3272
3273
|
"useSelectionActionBar must be used inside SelectionActionBar"
|
|
3273
3274
|
);
|
|
3274
3275
|
return e;
|
|
3275
3276
|
}
|
|
3276
|
-
const
|
|
3277
|
+
const $i = ({
|
|
3277
3278
|
items: e = [],
|
|
3278
3279
|
className: n,
|
|
3279
3280
|
style: i,
|
|
3280
3281
|
onPointerDown: l
|
|
3281
3282
|
}) => {
|
|
3282
|
-
const [a, o] = O(null), [c, r] = O(null), s =
|
|
3283
|
+
const [a, o] = O(null), [c, r] = O(null), s = ae(null), d = y(() => {
|
|
3283
3284
|
s.current !== null && (window.clearTimeout(s.current), s.current = null);
|
|
3284
3285
|
}, []), u = y(() => {
|
|
3285
3286
|
d();
|
|
@@ -3288,33 +3289,33 @@ const Ci = ({
|
|
|
3288
3289
|
o(null);
|
|
3289
3290
|
}, 120);
|
|
3290
3291
|
}, [d]);
|
|
3291
|
-
|
|
3292
|
+
me(() => {
|
|
3292
3293
|
if (a === null) return;
|
|
3293
3294
|
const m = (g) => {
|
|
3294
3295
|
c && !c.contains(g.target) && o(null);
|
|
3295
3296
|
};
|
|
3296
3297
|
return document.addEventListener("mousedown", m), () => document.removeEventListener("mousedown", m);
|
|
3297
|
-
}, [a, c]),
|
|
3298
|
+
}, [a, c]), me(() => () => {
|
|
3298
3299
|
d();
|
|
3299
3300
|
}, [d]);
|
|
3300
|
-
const
|
|
3301
|
+
const v = y(
|
|
3301
3302
|
(m) => {
|
|
3302
3303
|
d(), o(m);
|
|
3303
3304
|
},
|
|
3304
3305
|
[d]
|
|
3305
|
-
),
|
|
3306
|
+
), f = y(
|
|
3306
3307
|
(m) => {
|
|
3307
3308
|
d(), o(m);
|
|
3308
3309
|
},
|
|
3309
3310
|
[d]
|
|
3310
3311
|
);
|
|
3311
3312
|
return /* @__PURE__ */ t(
|
|
3312
|
-
|
|
3313
|
+
Gt.Provider,
|
|
3313
3314
|
{
|
|
3314
3315
|
value: {
|
|
3315
3316
|
openPanel: a,
|
|
3316
|
-
openPanelByHover:
|
|
3317
|
-
openPanelByClick:
|
|
3317
|
+
openPanelByHover: v,
|
|
3318
|
+
openPanelByClick: f,
|
|
3318
3319
|
onPointerDown: l,
|
|
3319
3320
|
wrapperEl: c
|
|
3320
3321
|
},
|
|
@@ -3322,7 +3323,7 @@ const Ci = ({
|
|
|
3322
3323
|
"div",
|
|
3323
3324
|
{
|
|
3324
3325
|
ref: r,
|
|
3325
|
-
className:
|
|
3326
|
+
className: $e.barWrapper,
|
|
3326
3327
|
style: i,
|
|
3327
3328
|
onMouseEnter: u,
|
|
3328
3329
|
onMouseLeave: h,
|
|
@@ -3333,7 +3334,7 @@ const Ci = ({
|
|
|
3333
3334
|
children: /* @__PURE__ */ t(
|
|
3334
3335
|
"div",
|
|
3335
3336
|
{
|
|
3336
|
-
className: `${
|
|
3337
|
+
className: `${$e.bar}${n ? ` ${n}` : ""}`,
|
|
3337
3338
|
onPointerDown: l,
|
|
3338
3339
|
children: e
|
|
3339
3340
|
}
|
|
@@ -3343,7 +3344,7 @@ const Ci = ({
|
|
|
3343
3344
|
}
|
|
3344
3345
|
);
|
|
3345
3346
|
};
|
|
3346
|
-
|
|
3347
|
+
$i.displayName = "SelectionActionBar";
|
|
3347
3348
|
const De = ({
|
|
3348
3349
|
id: e,
|
|
3349
3350
|
icon: n,
|
|
@@ -3356,8 +3357,8 @@ const De = ({
|
|
|
3356
3357
|
openPanelByClick: c,
|
|
3357
3358
|
onPointerDown: r,
|
|
3358
3359
|
wrapperEl: s
|
|
3359
|
-
} =
|
|
3360
|
-
return /* @__PURE__ */ p(
|
|
3360
|
+
} = Ii();
|
|
3361
|
+
return /* @__PURE__ */ p(se, { children: [
|
|
3361
3362
|
/* @__PURE__ */ t(
|
|
3362
3363
|
ve,
|
|
3363
3364
|
{
|
|
@@ -3367,11 +3368,11 @@ const De = ({
|
|
|
3367
3368
|
onClick: () => c(e)
|
|
3368
3369
|
}
|
|
3369
3370
|
),
|
|
3370
|
-
a === e && s &&
|
|
3371
|
+
a === e && s && $t(
|
|
3371
3372
|
/* @__PURE__ */ t(
|
|
3372
3373
|
"div",
|
|
3373
3374
|
{
|
|
3374
|
-
className:
|
|
3375
|
+
className: $e.popover,
|
|
3375
3376
|
"data-testid": `popover-${e}`,
|
|
3376
3377
|
onPointerDown: r,
|
|
3377
3378
|
children: l
|
|
@@ -3382,7 +3383,7 @@ const De = ({
|
|
|
3382
3383
|
] });
|
|
3383
3384
|
};
|
|
3384
3385
|
De.displayName = "SelectionActionBarPanel";
|
|
3385
|
-
function
|
|
3386
|
+
function Va({
|
|
3386
3387
|
context: e,
|
|
3387
3388
|
gridSize: n,
|
|
3388
3389
|
onActionFeedback: i
|
|
@@ -3390,15 +3391,15 @@ function Fa({
|
|
|
3390
3391
|
var _;
|
|
3391
3392
|
const { actionContext: l, pluginRegistry: a } = e, o = e.editorState, c = o.selectedBlockIds ?? [], r = l.isEnabled("paste"), s = o.pageIdx, d = (((_ = e.book.pages[s]) == null ? void 0 : _.blocks) ?? []).filter(
|
|
3392
3393
|
(w) => c.includes(w.id)
|
|
3393
|
-
), u = c.length > 0, h = d.length > 0,
|
|
3394
|
+
), u = c.length > 0, h = d.length > 0, v = h && Object.keys(a).length > 0, f = (w, L) => l.execute("updateBlocks", { updates: w, options: L }), m = (w, L) => {
|
|
3394
3395
|
L();
|
|
3395
|
-
const $ =
|
|
3396
|
+
const $ = it(w);
|
|
3396
3397
|
$ && (i == null || i($));
|
|
3397
3398
|
}, g = [
|
|
3398
3399
|
/* @__PURE__ */ t(
|
|
3399
3400
|
ve,
|
|
3400
3401
|
{
|
|
3401
|
-
icon: /* @__PURE__ */ t(
|
|
3402
|
+
icon: /* @__PURE__ */ t(tt, { "aria-hidden": "true" }),
|
|
3402
3403
|
label: "選択を削除",
|
|
3403
3404
|
title: "削除 (Delete / Backspace)",
|
|
3404
3405
|
onClick: () => m("delete", () => l.execute("delete")),
|
|
@@ -3409,7 +3410,7 @@ function Fa({
|
|
|
3409
3410
|
/* @__PURE__ */ t(
|
|
3410
3411
|
ve,
|
|
3411
3412
|
{
|
|
3412
|
-
icon: /* @__PURE__ */ t(
|
|
3413
|
+
icon: /* @__PURE__ */ t(nt, { "aria-hidden": "true" }),
|
|
3413
3414
|
label: "選択をコピー",
|
|
3414
3415
|
title: "コピー (Ctrl+C / Cmd+C)",
|
|
3415
3416
|
onClick: () => m("copy", () => l.execute("copy")),
|
|
@@ -3420,7 +3421,7 @@ function Fa({
|
|
|
3420
3421
|
/* @__PURE__ */ t(
|
|
3421
3422
|
ve,
|
|
3422
3423
|
{
|
|
3423
|
-
icon: /* @__PURE__ */ t(
|
|
3424
|
+
icon: /* @__PURE__ */ t(lt, { "aria-hidden": "true" }),
|
|
3424
3425
|
label: "選択を複製",
|
|
3425
3426
|
title: "複製 (Ctrl+D / Cmd+D)",
|
|
3426
3427
|
onClick: () => m("duplicate", () => l.execute("duplicate")),
|
|
@@ -3428,7 +3429,7 @@ function Fa({
|
|
|
3428
3429
|
},
|
|
3429
3430
|
"duplicate"
|
|
3430
3431
|
),
|
|
3431
|
-
/* @__PURE__ */ t("div", { className:
|
|
3432
|
+
/* @__PURE__ */ t("div", { className: $e.divider, "aria-hidden": "true" }, "divider-paste"),
|
|
3432
3433
|
/* @__PURE__ */ t(
|
|
3433
3434
|
ve,
|
|
3434
3435
|
{
|
|
@@ -3441,11 +3442,11 @@ function Fa({
|
|
|
3441
3442
|
"paste"
|
|
3442
3443
|
)
|
|
3443
3444
|
];
|
|
3444
|
-
return (h ||
|
|
3445
|
+
return (h || v) && g.push(
|
|
3445
3446
|
/* @__PURE__ */ t(
|
|
3446
3447
|
"div",
|
|
3447
3448
|
{
|
|
3448
|
-
className:
|
|
3449
|
+
className: $e.divider,
|
|
3449
3450
|
"aria-hidden": "true"
|
|
3450
3451
|
},
|
|
3451
3452
|
"divider-panels"
|
|
@@ -3455,13 +3456,13 @@ function Fa({
|
|
|
3455
3456
|
De,
|
|
3456
3457
|
{
|
|
3457
3458
|
id: "style",
|
|
3458
|
-
icon: /* @__PURE__ */ t(
|
|
3459
|
+
icon: /* @__PURE__ */ t(kt, { "aria-hidden": "true" }),
|
|
3459
3460
|
label: "スタイル設定",
|
|
3460
3461
|
children: /* @__PURE__ */ t(
|
|
3461
|
-
|
|
3462
|
+
at,
|
|
3462
3463
|
{
|
|
3463
3464
|
selectedBlocks: d,
|
|
3464
|
-
onUpdateBlocks:
|
|
3465
|
+
onUpdateBlocks: f
|
|
3465
3466
|
}
|
|
3466
3467
|
)
|
|
3467
3468
|
},
|
|
@@ -3471,32 +3472,32 @@ function Fa({
|
|
|
3471
3472
|
De,
|
|
3472
3473
|
{
|
|
3473
3474
|
id: "layout",
|
|
3474
|
-
icon: /* @__PURE__ */ t(
|
|
3475
|
+
icon: /* @__PURE__ */ t(Tt, { "aria-hidden": "true" }),
|
|
3475
3476
|
label: "レイアウト設定",
|
|
3476
3477
|
children: /* @__PURE__ */ t(
|
|
3477
|
-
|
|
3478
|
+
ot,
|
|
3478
3479
|
{
|
|
3479
3480
|
selectedBlocks: d,
|
|
3480
|
-
onUpdateBlocks:
|
|
3481
|
+
onUpdateBlocks: f,
|
|
3481
3482
|
gridSize: n
|
|
3482
3483
|
}
|
|
3483
3484
|
)
|
|
3484
3485
|
},
|
|
3485
3486
|
"layout"
|
|
3486
3487
|
)
|
|
3487
|
-
),
|
|
3488
|
+
), v && g.push(
|
|
3488
3489
|
/* @__PURE__ */ t(
|
|
3489
3490
|
De,
|
|
3490
3491
|
{
|
|
3491
3492
|
id: "plugin",
|
|
3492
|
-
icon: /* @__PURE__ */ t(
|
|
3493
|
+
icon: /* @__PURE__ */ t(Et, { "aria-hidden": "true" }),
|
|
3493
3494
|
label: "ブロック設定",
|
|
3494
3495
|
children: /* @__PURE__ */ t(
|
|
3495
|
-
|
|
3496
|
+
rt,
|
|
3496
3497
|
{
|
|
3497
3498
|
selectedBlocks: d,
|
|
3498
3499
|
pluginRegistry: a,
|
|
3499
|
-
onUpdateBlocks:
|
|
3500
|
+
onUpdateBlocks: f,
|
|
3500
3501
|
showGroupHeader: !1
|
|
3501
3502
|
}
|
|
3502
3503
|
)
|
|
@@ -3505,19 +3506,20 @@ function Fa({
|
|
|
3505
3506
|
)
|
|
3506
3507
|
), g;
|
|
3507
3508
|
}
|
|
3508
|
-
const
|
|
3509
|
+
const bt = 8, Li = 36, qa = ({
|
|
3509
3510
|
selectionBoundingBox: e,
|
|
3510
3511
|
isDragging: n,
|
|
3511
|
-
zIndex: i =
|
|
3512
|
+
zIndex: i = 1,
|
|
3512
3513
|
children: l
|
|
3513
3514
|
}) => {
|
|
3514
3515
|
if (e == null || n)
|
|
3515
3516
|
return null;
|
|
3516
|
-
const a = e, o = a.top -
|
|
3517
|
+
const a = e, o = a.top - bt - Li, c = o >= 0 ? o : a.bottom + bt, r = {
|
|
3517
3518
|
position: "absolute",
|
|
3518
3519
|
inset: 0,
|
|
3519
3520
|
pointerEvents: "none",
|
|
3520
|
-
zIndex: i
|
|
3521
|
+
zIndex: i,
|
|
3522
|
+
...mn
|
|
3521
3523
|
}, s = {
|
|
3522
3524
|
position: "absolute",
|
|
3523
3525
|
top: `${c}px`,
|
|
@@ -3544,9 +3546,9 @@ const pt = 8, Si = 36, ja = ({
|
|
|
3544
3546
|
}
|
|
3545
3547
|
);
|
|
3546
3548
|
};
|
|
3547
|
-
function
|
|
3549
|
+
function Ga(e, n) {
|
|
3548
3550
|
const [i, l] = O(null);
|
|
3549
|
-
return
|
|
3551
|
+
return me(() => {
|
|
3550
3552
|
if (n.length === 0) {
|
|
3551
3553
|
l(null);
|
|
3552
3554
|
return;
|
|
@@ -3559,10 +3561,10 @@ function Ua(e, n) {
|
|
|
3559
3561
|
}
|
|
3560
3562
|
const c = o.getBoundingClientRect();
|
|
3561
3563
|
let r = 1 / 0, s = 1 / 0, d = -1 / 0, u = -1 / 0, h = !1;
|
|
3562
|
-
for (const
|
|
3563
|
-
const
|
|
3564
|
-
if (!
|
|
3565
|
-
const m =
|
|
3564
|
+
for (const v of n) {
|
|
3565
|
+
const f = o.querySelector(`[data-block-id="${v}"]`);
|
|
3566
|
+
if (!f) continue;
|
|
3567
|
+
const m = f.getBoundingClientRect();
|
|
3566
3568
|
r = Math.min(r, m.left - c.left), s = Math.min(s, m.top - c.top), d = Math.max(d, m.right - c.left), u = Math.max(u, m.bottom - c.top), h = !0;
|
|
3567
3569
|
}
|
|
3568
3570
|
if (!h) {
|
|
@@ -3581,60 +3583,60 @@ function Ua(e, n) {
|
|
|
3581
3583
|
return () => cancelAnimationFrame(a);
|
|
3582
3584
|
}, [e, n]), i;
|
|
3583
3585
|
}
|
|
3584
|
-
const
|
|
3585
|
-
container:
|
|
3586
|
-
row:
|
|
3587
|
-
label:
|
|
3588
|
-
inputWrapper:
|
|
3589
|
-
error:
|
|
3586
|
+
const ki = "_container_3lvww_1", Ti = "_row_3lvww_9", Ei = "_label_3lvww_15", Ai = "_inputWrapper_3lvww_24", Mi = "_error_3lvww_31", X = {
|
|
3587
|
+
container: ki,
|
|
3588
|
+
row: Ti,
|
|
3589
|
+
label: Ei,
|
|
3590
|
+
inputWrapper: Ai,
|
|
3591
|
+
error: Mi
|
|
3590
3592
|
};
|
|
3591
|
-
function
|
|
3593
|
+
function ft(e, n, i) {
|
|
3592
3594
|
const l = e.trim();
|
|
3593
3595
|
return l ? /\s/.test(l) ? "スペースは使用できません" : l !== n && (i != null && i.has(l)) ? "このIDは既に使用されています" : null : "IDを入力してください";
|
|
3594
3596
|
}
|
|
3595
|
-
const
|
|
3597
|
+
const Ht = ({
|
|
3596
3598
|
selectedBlocks: e,
|
|
3597
3599
|
onUpdateBlocks: n,
|
|
3598
3600
|
allBlockIds: i
|
|
3599
3601
|
}) => {
|
|
3600
3602
|
const [l, a] = O(""), [o, c] = O(null), r = e[0];
|
|
3601
|
-
|
|
3603
|
+
me(() => {
|
|
3602
3604
|
e.length === 1 && r && (a(r.id), c(null));
|
|
3603
3605
|
}, [e, r]);
|
|
3604
3606
|
const s = () => {
|
|
3605
3607
|
if (!r) return;
|
|
3606
|
-
const
|
|
3607
|
-
if (m ===
|
|
3608
|
-
a(
|
|
3608
|
+
const f = r.id, m = l.trim();
|
|
3609
|
+
if (m === f || !m) {
|
|
3610
|
+
a(f), c(null);
|
|
3609
3611
|
return;
|
|
3610
3612
|
}
|
|
3611
|
-
if (
|
|
3612
|
-
a(
|
|
3613
|
+
if (ft(m, f, i)) {
|
|
3614
|
+
a(f), c(null);
|
|
3613
3615
|
return;
|
|
3614
3616
|
}
|
|
3615
|
-
n({ [
|
|
3616
|
-
}, d = (
|
|
3617
|
-
const m =
|
|
3618
|
-
a(m), r && c(
|
|
3619
|
-
}, u = (
|
|
3617
|
+
n({ [f]: { id: m } });
|
|
3618
|
+
}, d = (f) => {
|
|
3619
|
+
const m = f ?? "";
|
|
3620
|
+
a(m), r && c(ft(m, r.id, i));
|
|
3621
|
+
}, u = (f) => {
|
|
3620
3622
|
const m = {};
|
|
3621
3623
|
e.forEach((g) => {
|
|
3622
3624
|
m[g.id] = {
|
|
3623
|
-
behavior: { ...g.behavior, readOnly: !!
|
|
3625
|
+
behavior: { ...g.behavior, readOnly: !!f || void 0 }
|
|
3624
3626
|
};
|
|
3625
3627
|
}), n(m);
|
|
3626
|
-
}, h = (
|
|
3628
|
+
}, h = (f) => {
|
|
3627
3629
|
const m = {};
|
|
3628
3630
|
e.forEach((g) => {
|
|
3629
3631
|
m[g.id] = {
|
|
3630
|
-
behavior: { ...g.behavior, heightFit:
|
|
3632
|
+
behavior: { ...g.behavior, heightFit: f || void 0 }
|
|
3631
3633
|
};
|
|
3632
3634
|
}), n(m);
|
|
3633
|
-
},
|
|
3635
|
+
}, v = (f) => {
|
|
3634
3636
|
const m = {};
|
|
3635
3637
|
e.forEach((g) => {
|
|
3636
3638
|
m[g.id] = {
|
|
3637
|
-
behavior: { ...g.behavior, widthFit:
|
|
3639
|
+
behavior: { ...g.behavior, widthFit: f || void 0 }
|
|
3638
3640
|
};
|
|
3639
3641
|
}), n(m);
|
|
3640
3642
|
};
|
|
@@ -3643,7 +3645,7 @@ const qt = ({
|
|
|
3643
3645
|
/* @__PURE__ */ t("span", { className: X.label, children: "ID" }),
|
|
3644
3646
|
/* @__PURE__ */ p("div", { className: X.inputWrapper, children: [
|
|
3645
3647
|
/* @__PURE__ */ t(
|
|
3646
|
-
|
|
3648
|
+
Ie,
|
|
3647
3649
|
{
|
|
3648
3650
|
value: l,
|
|
3649
3651
|
onChange: d,
|
|
@@ -3655,7 +3657,7 @@ const qt = ({
|
|
|
3655
3657
|
] })
|
|
3656
3658
|
] }),
|
|
3657
3659
|
e.length > 0 && /* @__PURE__ */ t("div", { className: X.row, children: /* @__PURE__ */ t("div", { className: X.inputWrapper, children: /* @__PURE__ */ t(
|
|
3658
|
-
|
|
3660
|
+
oe,
|
|
3659
3661
|
{
|
|
3660
3662
|
label: "読み取り専用",
|
|
3661
3663
|
value: !!Y(e, "behavior.readOnly"),
|
|
@@ -3663,7 +3665,7 @@ const qt = ({
|
|
|
3663
3665
|
}
|
|
3664
3666
|
) }) }),
|
|
3665
3667
|
e.length > 0 && /* @__PURE__ */ t("div", { className: X.row, children: /* @__PURE__ */ t("div", { className: X.inputWrapper, children: /* @__PURE__ */ t(
|
|
3666
|
-
|
|
3668
|
+
oe,
|
|
3667
3669
|
{
|
|
3668
3670
|
label: "高さ自動フィット",
|
|
3669
3671
|
value: !!Y(e, "behavior.heightFit"),
|
|
@@ -3671,45 +3673,45 @@ const qt = ({
|
|
|
3671
3673
|
}
|
|
3672
3674
|
) }) }),
|
|
3673
3675
|
e.length > 0 && /* @__PURE__ */ t("div", { className: X.row, children: /* @__PURE__ */ t("div", { className: X.inputWrapper, children: /* @__PURE__ */ t(
|
|
3674
|
-
|
|
3676
|
+
oe,
|
|
3675
3677
|
{
|
|
3676
3678
|
label: "幅自動フィット",
|
|
3677
3679
|
value: !!Y(e, "behavior.widthFit"),
|
|
3678
|
-
onChange:
|
|
3680
|
+
onChange: v
|
|
3679
3681
|
}
|
|
3680
3682
|
) }) })
|
|
3681
3683
|
] });
|
|
3682
3684
|
};
|
|
3683
|
-
|
|
3684
|
-
const
|
|
3685
|
-
container:
|
|
3686
|
-
scrollArea:
|
|
3687
|
-
emptyState:
|
|
3688
|
-
},
|
|
3685
|
+
Ht.displayName = "MetaPanel";
|
|
3686
|
+
const Pi = "_container_2zb6l_1", Di = "_scrollArea_2zb6l_18", zi = "_emptyState_2zb6l_33", Je = {
|
|
3687
|
+
container: Pi,
|
|
3688
|
+
scrollArea: Di,
|
|
3689
|
+
emptyState: zi
|
|
3690
|
+
}, Xe = ({
|
|
3689
3691
|
children: e,
|
|
3690
3692
|
className: n = ""
|
|
3691
|
-
}) => /* @__PURE__ */ t("div", { className: `${
|
|
3692
|
-
|
|
3693
|
-
const
|
|
3693
|
+
}) => /* @__PURE__ */ t("div", { className: `${Je.container}${n ? ` ${n}` : ""}`, children: e });
|
|
3694
|
+
Xe.displayName = "BlockPropertyPanel";
|
|
3695
|
+
const Bi = ge(
|
|
3694
3696
|
({ context: e, gridSize: n, className: i = "" }) => {
|
|
3695
|
-
const { pluginRegistry: l, actionContext: a } = e, o = e.editorState.pageIdx, c = e.book.pages[o], r = e.editorState.selectedBlockIds ?? [], s = (c == null ? void 0 : c.blocks.filter((g) => r.includes(g.id))) ?? [], d = c == null ? void 0 : c.blockDefaults, u = (g, _) => a.execute("updateBlocks", { updates: g, options: _ }), h = new Set((c == null ? void 0 : c.blocks.map((g) => g.id)) ?? []),
|
|
3697
|
+
const { pluginRegistry: l, actionContext: a } = e, o = e.editorState.pageIdx, c = e.book.pages[o], r = e.editorState.selectedBlockIds ?? [], s = (c == null ? void 0 : c.blocks.filter((g) => r.includes(g.id))) ?? [], d = c == null ? void 0 : c.blockDefaults, u = (g, _) => a.execute("updateBlocks", { updates: g, options: _ }), h = new Set((c == null ? void 0 : c.blocks.map((g) => g.id)) ?? []), v = s[0], f = v ? l[v.kind] : void 0, m = ne(() => {
|
|
3696
3698
|
var _;
|
|
3697
3699
|
if (s.length === 0) return !1;
|
|
3698
3700
|
const g = (_ = s[0]) == null ? void 0 : _.kind;
|
|
3699
3701
|
return s.every((w) => w.kind === g);
|
|
3700
3702
|
}, [s]);
|
|
3701
|
-
return s.length === 0 ? /* @__PURE__ */ t(
|
|
3703
|
+
return s.length === 0 ? /* @__PURE__ */ t(Xe, { className: i, children: /* @__PURE__ */ p("div", { className: Je.emptyState, children: [
|
|
3702
3704
|
"ブロックを選択すると",
|
|
3703
3705
|
/* @__PURE__ */ t("br", {}),
|
|
3704
3706
|
"プロパティが表示されます"
|
|
3705
|
-
] }) }) : /* @__PURE__ */ t(
|
|
3707
|
+
] }) }) : /* @__PURE__ */ t(Xe, { className: i, children: /* @__PURE__ */ p("div", { className: Je.scrollArea, children: [
|
|
3706
3708
|
/* @__PURE__ */ t(
|
|
3707
3709
|
V,
|
|
3708
3710
|
{
|
|
3709
3711
|
title: "配置・サイズ",
|
|
3710
3712
|
description: "ブロックの位置(X・Y座標)と大きさ(幅・高さ)をグリッド単位で設定します",
|
|
3711
3713
|
children: /* @__PURE__ */ t(
|
|
3712
|
-
|
|
3714
|
+
ot,
|
|
3713
3715
|
{
|
|
3714
3716
|
selectedBlocks: s,
|
|
3715
3717
|
onUpdateBlocks: u,
|
|
@@ -3724,7 +3726,7 @@ const Di = fe(
|
|
|
3724
3726
|
title: "背景・枠線",
|
|
3725
3727
|
description: "ブロックの背景色と枠線(線の種類・色・太さ)を設定します",
|
|
3726
3728
|
children: /* @__PURE__ */ t(
|
|
3727
|
-
|
|
3729
|
+
at,
|
|
3728
3730
|
{
|
|
3729
3731
|
selectedBlocks: s,
|
|
3730
3732
|
onUpdateBlocks: u
|
|
@@ -3732,8 +3734,8 @@ const Di = fe(
|
|
|
3732
3734
|
)
|
|
3733
3735
|
}
|
|
3734
3736
|
),
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
+
f && m && f.properties.length > 0 && /* @__PURE__ */ t(
|
|
3738
|
+
rt,
|
|
3737
3739
|
{
|
|
3738
3740
|
selectedBlocks: s,
|
|
3739
3741
|
pluginRegistry: l,
|
|
@@ -3747,7 +3749,7 @@ const Di = fe(
|
|
|
3747
3749
|
title: "基本設定",
|
|
3748
3750
|
description: "ブロックのID(識別子)や読み取り専用にするかどうかなど、動作に関わる設定をします",
|
|
3749
3751
|
children: /* @__PURE__ */ t(
|
|
3750
|
-
|
|
3752
|
+
Ht,
|
|
3751
3753
|
{
|
|
3752
3754
|
selectedBlocks: s,
|
|
3753
3755
|
onUpdateBlocks: u,
|
|
@@ -3759,14 +3761,14 @@ const Di = fe(
|
|
|
3759
3761
|
] }) });
|
|
3760
3762
|
}
|
|
3761
3763
|
);
|
|
3762
|
-
|
|
3763
|
-
const
|
|
3764
|
-
kindSelector:
|
|
3765
|
-
kindTab:
|
|
3766
|
-
kindTabActive:
|
|
3767
|
-
propertyList:
|
|
3768
|
-
emptyState:
|
|
3769
|
-
},
|
|
3764
|
+
Bi.displayName = "DefaultBlockPropertyPanel";
|
|
3765
|
+
const Ri = "_kindSelector_qrad9_1", Wi = "_kindTab_qrad9_9", Oi = "_kindTabActive_qrad9_30", Fi = "_propertyList_qrad9_46", ji = "_emptyState_qrad9_131", fe = {
|
|
3766
|
+
kindSelector: Ri,
|
|
3767
|
+
kindTab: Wi,
|
|
3768
|
+
kindTabActive: Oi,
|
|
3769
|
+
propertyList: Fi,
|
|
3770
|
+
emptyState: ji
|
|
3771
|
+
}, Kt = ge(
|
|
3770
3772
|
({
|
|
3771
3773
|
propDef: e,
|
|
3772
3774
|
kindDefaults: n,
|
|
@@ -3775,8 +3777,8 @@ const Pi = "_kindSelector_qrad9_1", Bi = "_kindTab_qrad9_9", zi = "_kindTabActiv
|
|
|
3775
3777
|
const { kind: l, defaultProps: a } = e, o = Object.keys(a).some((d) => d in n), c = (d) => n[d] ?? a[d] ?? null, r = (d, u) => i({ ...n, [d]: u }), s = (d) => {
|
|
3776
3778
|
if (d) {
|
|
3777
3779
|
const u = { ...n };
|
|
3778
|
-
for (const [h,
|
|
3779
|
-
u[h] = n[h] ??
|
|
3780
|
+
for (const [h, v] of Object.entries(a))
|
|
3781
|
+
u[h] = n[h] ?? v;
|
|
3780
3782
|
i(u);
|
|
3781
3783
|
} else {
|
|
3782
3784
|
const u = { ...n };
|
|
@@ -3788,14 +3790,14 @@ const Pi = "_kindSelector_qrad9_1", Bi = "_kindTab_qrad9_9", zi = "_kindTabActiv
|
|
|
3788
3790
|
return /* @__PURE__ */ t(
|
|
3789
3791
|
V,
|
|
3790
3792
|
{
|
|
3791
|
-
title:
|
|
3793
|
+
title: Vt[l] ?? l,
|
|
3792
3794
|
collapsible: !0,
|
|
3793
3795
|
isOpen: o,
|
|
3794
3796
|
onOpenChange: s,
|
|
3795
3797
|
openLabel: "カスタム",
|
|
3796
3798
|
closeLabel: "標準",
|
|
3797
3799
|
children: /* @__PURE__ */ t(
|
|
3798
|
-
|
|
3800
|
+
st,
|
|
3799
3801
|
{
|
|
3800
3802
|
kind: l,
|
|
3801
3803
|
defaultProps: a,
|
|
@@ -3807,8 +3809,8 @@ const Pi = "_kindSelector_qrad9_1", Bi = "_kindTab_qrad9_9", zi = "_kindTabActiv
|
|
|
3807
3809
|
);
|
|
3808
3810
|
}
|
|
3809
3811
|
);
|
|
3810
|
-
|
|
3811
|
-
const
|
|
3812
|
+
Kt.displayName = "DefaultsPropField";
|
|
3813
|
+
const Zt = ge(
|
|
3812
3814
|
({ blockDefaults: e, pluginRegistry: n, onChange: i }) => {
|
|
3813
3815
|
const l = Object.keys(n), [a, o] = O(
|
|
3814
3816
|
l[0] ?? ""
|
|
@@ -3819,7 +3821,7 @@ const Ht = fe(
|
|
|
3819
3821
|
},
|
|
3820
3822
|
[e, a, i]
|
|
3821
3823
|
);
|
|
3822
|
-
return l.length === 0 ? /* @__PURE__ */ t("div", { className:
|
|
3824
|
+
return l.length === 0 ? /* @__PURE__ */ t("div", { className: fe.emptyState, children: "プラグインが登録されていません" }) : /* @__PURE__ */ p(
|
|
3823
3825
|
V,
|
|
3824
3826
|
{
|
|
3825
3827
|
title: "ブロック共通デフォルト",
|
|
@@ -3827,21 +3829,21 @@ const Ht = fe(
|
|
|
3827
3829
|
noPadding: !0,
|
|
3828
3830
|
description: "各ブロック種類に共通して適用されるデフォルト値です",
|
|
3829
3831
|
children: [
|
|
3830
|
-
/* @__PURE__ */ t("div", { className:
|
|
3832
|
+
/* @__PURE__ */ t("div", { className: fe.kindSelector, children: l.map((s) => {
|
|
3831
3833
|
const d = n[s];
|
|
3832
3834
|
return /* @__PURE__ */ t(
|
|
3833
3835
|
"button",
|
|
3834
3836
|
{
|
|
3835
3837
|
type: "button",
|
|
3836
|
-
className: `${
|
|
3838
|
+
className: `${fe.kindTab} ${a === s ? fe.kindTabActive : ""}`,
|
|
3837
3839
|
onClick: () => o(s),
|
|
3838
3840
|
children: (d == null ? void 0 : d.meta.displayName) ?? s
|
|
3839
3841
|
},
|
|
3840
3842
|
s
|
|
3841
3843
|
);
|
|
3842
3844
|
}) }),
|
|
3843
|
-
c && /* @__PURE__ */ t("div", { className:
|
|
3844
|
-
|
|
3845
|
+
c && /* @__PURE__ */ t("div", { className: fe.propertyList, children: c.properties.length === 0 ? /* @__PURE__ */ t("div", { className: fe.emptyState, children: "カスタマイズ可能なプロパティがありません" }) : c.properties.map((s) => /* @__PURE__ */ t(
|
|
3846
|
+
Kt,
|
|
3845
3847
|
{
|
|
3846
3848
|
propDef: s,
|
|
3847
3849
|
kindDefaults: e[a] ?? {},
|
|
@@ -3854,21 +3856,21 @@ const Ht = fe(
|
|
|
3854
3856
|
);
|
|
3855
3857
|
}
|
|
3856
3858
|
);
|
|
3857
|
-
|
|
3858
|
-
const
|
|
3859
|
-
list:
|
|
3860
|
-
item:
|
|
3861
|
-
selected:
|
|
3862
|
-
dragHandle:
|
|
3863
|
-
ghost:
|
|
3864
|
-
itemInfo:
|
|
3865
|
-
itemId:
|
|
3866
|
-
itemMeta:
|
|
3867
|
-
itemKind:
|
|
3868
|
-
itemActions:
|
|
3869
|
-
actionButton:
|
|
3870
|
-
empty:
|
|
3871
|
-
},
|
|
3859
|
+
Zt.displayName = "BlockDefaultsPanel";
|
|
3860
|
+
const Ui = "_list_12dfx_10", Vi = "_item_12dfx_19", qi = "_selected_12dfx_41", Gi = "_dragHandle_12dfx_46", Hi = "_ghost_12dfx_57", Ki = "_itemInfo_12dfx_68", Zi = "_itemId_12dfx_75", Yi = "_itemMeta_12dfx_80", Ji = "_itemKind_12dfx_87", Xi = "_itemActions_12dfx_95", Qi = "_actionButton_12dfx_100", ea = "_empty_12dfx_136", U = {
|
|
3861
|
+
list: Ui,
|
|
3862
|
+
item: Vi,
|
|
3863
|
+
selected: qi,
|
|
3864
|
+
dragHandle: Gi,
|
|
3865
|
+
ghost: Hi,
|
|
3866
|
+
itemInfo: Ki,
|
|
3867
|
+
itemId: Zi,
|
|
3868
|
+
itemMeta: Yi,
|
|
3869
|
+
itemKind: Ji,
|
|
3870
|
+
itemActions: Xi,
|
|
3871
|
+
actionButton: Qi,
|
|
3872
|
+
empty: ea
|
|
3873
|
+
}, Yt = ({
|
|
3872
3874
|
blocks: e,
|
|
3873
3875
|
onBlocksChange: n,
|
|
3874
3876
|
selectedBlockIds: i,
|
|
@@ -3877,21 +3879,21 @@ const Oi = "_list_12dfx_10", Fi = "_item_12dfx_19", ji = "_selected_12dfx_41", U
|
|
|
3877
3879
|
}) => {
|
|
3878
3880
|
const [o, c] = O(null), [r, s] = O(
|
|
3879
3881
|
null
|
|
3880
|
-
), d =
|
|
3882
|
+
), d = ae(null), u = ae(null), h = [...e].reverse(), v = (() => {
|
|
3881
3883
|
if (o === null) return null;
|
|
3882
3884
|
const b = h.findIndex((x) => x.id === o);
|
|
3883
3885
|
return b === -1 ? null : b;
|
|
3884
|
-
})(),
|
|
3885
|
-
if (
|
|
3886
|
+
})(), f = ne(() => {
|
|
3887
|
+
if (v === null || r === null)
|
|
3886
3888
|
return h;
|
|
3887
|
-
const b = h[
|
|
3889
|
+
const b = h[v];
|
|
3888
3890
|
if (!b) return h;
|
|
3889
|
-
const N = [...h.filter((T,
|
|
3891
|
+
const N = [...h.filter((T, P) => P !== v)], C = Math.max(
|
|
3890
3892
|
0,
|
|
3891
3893
|
Math.min(r, N.length)
|
|
3892
3894
|
);
|
|
3893
3895
|
return N.splice(C, 0, b), N;
|
|
3894
|
-
}, [h,
|
|
3896
|
+
}, [h, v, r]), m = y(
|
|
3895
3897
|
(b) => {
|
|
3896
3898
|
const x = e.findIndex((T) => T.id === b);
|
|
3897
3899
|
if (x === -1 || x === e.length - 1) return;
|
|
@@ -3909,7 +3911,7 @@ const Oi = "_list_12dfx_10", Fi = "_item_12dfx_19", ji = "_selected_12dfx_41", U
|
|
|
3909
3911
|
[e, n]
|
|
3910
3912
|
), _ = y(
|
|
3911
3913
|
(b) => {
|
|
3912
|
-
const x = e.findIndex((
|
|
3914
|
+
const x = e.findIndex((P) => P.id === b);
|
|
3913
3915
|
if (x === -1 || x === e.length - 1) return;
|
|
3914
3916
|
const N = [...e], C = N[x], T = N[x + 1];
|
|
3915
3917
|
!C || !T || (N[x] = T, N[x + 1] = C, n(N));
|
|
@@ -3917,7 +3919,7 @@ const Oi = "_list_12dfx_10", Fi = "_item_12dfx_19", ji = "_selected_12dfx_41", U
|
|
|
3917
3919
|
[e, n]
|
|
3918
3920
|
), w = y(
|
|
3919
3921
|
(b) => {
|
|
3920
|
-
const x = e.findIndex((
|
|
3922
|
+
const x = e.findIndex((P) => P.id === b);
|
|
3921
3923
|
if (x === -1 || x === 0) return;
|
|
3922
3924
|
const N = [...e], C = N[x], T = N[x - 1];
|
|
3923
3925
|
!C || !T || (N[x] = T, N[x - 1] = C, n(N));
|
|
@@ -3938,48 +3940,48 @@ const Oi = "_list_12dfx_10", Fi = "_item_12dfx_19", ji = "_selected_12dfx_41", U
|
|
|
3938
3940
|
}, [n, l, a]), k = y(
|
|
3939
3941
|
(b, x, N) => {
|
|
3940
3942
|
if (b.preventDefault(), b.dataTransfer.dropEffect = "move", o === null || N === o) return;
|
|
3941
|
-
const C = r ?? u.current ?? 0, T = x < C ? x : x - 1,
|
|
3943
|
+
const C = r ?? u.current ?? 0, T = x < C ? x : x - 1, P = b.currentTarget.getBoundingClientRect(), A = P.top + P.height / 2, E = b.clientY < A ? T : T + 1;
|
|
3942
3944
|
if (E === r) return;
|
|
3943
3945
|
s(E);
|
|
3944
|
-
const
|
|
3945
|
-
if (
|
|
3946
|
-
const J = [...
|
|
3947
|
-
(
|
|
3946
|
+
const z = d.current;
|
|
3947
|
+
if (z) {
|
|
3948
|
+
const J = [...z].reverse(), ct = J.find(
|
|
3949
|
+
(Le) => Le.id === o
|
|
3948
3950
|
);
|
|
3949
|
-
if (
|
|
3950
|
-
const
|
|
3951
|
-
(
|
|
3952
|
-
),
|
|
3953
|
-
|
|
3951
|
+
if (ct) {
|
|
3952
|
+
const Le = J.filter(
|
|
3953
|
+
(on) => on.id !== o
|
|
3954
|
+
), an = Math.max(0, Math.min(E, Le.length)), dt = [...Le];
|
|
3955
|
+
dt.splice(an, 0, ct), n([...dt].reverse());
|
|
3954
3956
|
}
|
|
3955
3957
|
}
|
|
3956
3958
|
},
|
|
3957
3959
|
[o, r, n]
|
|
3958
3960
|
), I = y(
|
|
3959
3961
|
(b) => {
|
|
3960
|
-
b.currentTarget.contains(b.relatedTarget) || s(
|
|
3962
|
+
b.currentTarget.contains(b.relatedTarget) || s(v);
|
|
3961
3963
|
},
|
|
3962
|
-
[
|
|
3964
|
+
[v]
|
|
3963
3965
|
), S = y(
|
|
3964
3966
|
(b) => {
|
|
3965
|
-
if (b.preventDefault(), d.current = null,
|
|
3966
|
-
const x = h[
|
|
3967
|
+
if (b.preventDefault(), d.current = null, v !== null && r !== null) {
|
|
3968
|
+
const x = h[v];
|
|
3967
3969
|
if (x) {
|
|
3968
|
-
const N = h.filter((E,
|
|
3970
|
+
const N = h.filter((E, z) => z !== v), C = Math.max(
|
|
3969
3971
|
0,
|
|
3970
3972
|
Math.min(r, N.length)
|
|
3971
3973
|
), T = [...N];
|
|
3972
3974
|
T.splice(C, 0, x);
|
|
3973
|
-
const
|
|
3974
|
-
|
|
3975
|
+
const P = [...T].reverse();
|
|
3976
|
+
P.every((E, z) => {
|
|
3975
3977
|
var J;
|
|
3976
|
-
return E.id === ((J = e[
|
|
3977
|
-
}) || n(
|
|
3978
|
+
return E.id === ((J = e[z]) == null ? void 0 : J.id);
|
|
3979
|
+
}) || n(P);
|
|
3978
3980
|
}
|
|
3979
3981
|
}
|
|
3980
3982
|
c(null), s(null);
|
|
3981
3983
|
},
|
|
3982
|
-
[e,
|
|
3984
|
+
[e, v, r, h, n]
|
|
3983
3985
|
);
|
|
3984
3986
|
return /* @__PURE__ */ p(
|
|
3985
3987
|
V,
|
|
@@ -3998,14 +4000,14 @@ const Oi = "_list_12dfx_10", Fi = "_item_12dfx_19", ji = "_selected_12dfx_41", U
|
|
|
3998
4000
|
onDragLeave: I,
|
|
3999
4001
|
onDrop: S,
|
|
4000
4002
|
onDragOver: (b) => b.preventDefault(),
|
|
4001
|
-
children:
|
|
4003
|
+
children: f.map((b, x) => {
|
|
4002
4004
|
const N = h.findIndex(
|
|
4003
4005
|
(A) => A.id === b.id
|
|
4004
|
-
), C = b.id === o, T = e.length - 1 - N,
|
|
4006
|
+
), C = b.id === o, T = e.length - 1 - N, P = (i == null ? void 0 : i.includes(b.id)) ?? !1;
|
|
4005
4007
|
return /* @__PURE__ */ p(
|
|
4006
4008
|
"li",
|
|
4007
4009
|
{
|
|
4008
|
-
className: `${U.item} ${C ? U.ghost : ""} ${
|
|
4010
|
+
className: `${U.item} ${C ? U.ghost : ""} ${P ? U.selected : ""}`,
|
|
4009
4011
|
draggable: !C,
|
|
4010
4012
|
onDragStart: C ? void 0 : (A) => L(A, N),
|
|
4011
4013
|
onDragEnd: $,
|
|
@@ -4103,26 +4105,26 @@ const Oi = "_list_12dfx_10", Fi = "_item_12dfx_19", ji = "_selected_12dfx_41", U
|
|
|
4103
4105
|
}
|
|
4104
4106
|
);
|
|
4105
4107
|
};
|
|
4106
|
-
|
|
4107
|
-
const
|
|
4108
|
-
container:
|
|
4109
|
-
group:
|
|
4110
|
-
divider:
|
|
4111
|
-
},
|
|
4108
|
+
Yt.displayName = "BlockOrderPanel";
|
|
4109
|
+
const ta = "_container_1x0zd_4", na = "_group_1x0zd_16", la = "_divider_1x0zd_22", Ee = {
|
|
4110
|
+
container: ta,
|
|
4111
|
+
group: na,
|
|
4112
|
+
divider: la
|
|
4113
|
+
}, Jt = ({
|
|
4112
4114
|
context: e,
|
|
4113
4115
|
onActionFeedback: n
|
|
4114
4116
|
}) => {
|
|
4115
4117
|
const { actionContext: i } = e, l = e.editorState.selectedBlockIds, a = ((l == null ? void 0 : l.length) ?? 0) > 0, o = i.isEnabled("undo"), c = i.isEnabled("redo"), r = i.isEnabled("paste"), s = (d) => {
|
|
4116
4118
|
i.execute(d);
|
|
4117
|
-
const u =
|
|
4119
|
+
const u = it(d);
|
|
4118
4120
|
u && (n == null || n(u));
|
|
4119
4121
|
};
|
|
4120
|
-
return /* @__PURE__ */ p("div", { className:
|
|
4121
|
-
/* @__PURE__ */ p("div", { className:
|
|
4122
|
+
return /* @__PURE__ */ p("div", { className: Ee.container, "data-testid": "canvas-action-panel", children: [
|
|
4123
|
+
/* @__PURE__ */ p("div", { className: Ee.group, children: [
|
|
4122
4124
|
/* @__PURE__ */ t(
|
|
4123
4125
|
Z,
|
|
4124
4126
|
{
|
|
4125
|
-
icon: /* @__PURE__ */ t(
|
|
4127
|
+
icon: /* @__PURE__ */ t(Qe, { "aria-hidden": "true" }),
|
|
4126
4128
|
label: "元に戻す",
|
|
4127
4129
|
title: "元に戻す (Ctrl+Z / Cmd+Z)",
|
|
4128
4130
|
onClick: () => s("undo"),
|
|
@@ -4132,7 +4134,7 @@ const Xi = "_container_1x0zd_4", Qi = "_group_1x0zd_16", ea = "_divider_1x0zd_22
|
|
|
4132
4134
|
/* @__PURE__ */ t(
|
|
4133
4135
|
Z,
|
|
4134
4136
|
{
|
|
4135
|
-
icon: /* @__PURE__ */ t(
|
|
4137
|
+
icon: /* @__PURE__ */ t(et, { "aria-hidden": "true" }),
|
|
4136
4138
|
label: "やり直し",
|
|
4137
4139
|
title: "やり直し (Ctrl+Y / Cmd+Y)",
|
|
4138
4140
|
onClick: () => s("redo"),
|
|
@@ -4140,12 +4142,12 @@ const Xi = "_container_1x0zd_4", Qi = "_group_1x0zd_16", ea = "_divider_1x0zd_22
|
|
|
4140
4142
|
}
|
|
4141
4143
|
)
|
|
4142
4144
|
] }),
|
|
4143
|
-
/* @__PURE__ */ t("div", { className:
|
|
4144
|
-
/* @__PURE__ */ p("div", { className:
|
|
4145
|
+
/* @__PURE__ */ t("div", { className: Ee.divider, "aria-hidden": "true" }),
|
|
4146
|
+
/* @__PURE__ */ p("div", { className: Ee.group, children: [
|
|
4145
4147
|
/* @__PURE__ */ t(
|
|
4146
4148
|
Z,
|
|
4147
4149
|
{
|
|
4148
|
-
icon: /* @__PURE__ */ t(
|
|
4150
|
+
icon: /* @__PURE__ */ t(tt, { "aria-hidden": "true" }),
|
|
4149
4151
|
label: "選択を削除",
|
|
4150
4152
|
title: "削除 (Delete / Backspace)",
|
|
4151
4153
|
onClick: () => s("delete"),
|
|
@@ -4155,7 +4157,7 @@ const Xi = "_container_1x0zd_4", Qi = "_group_1x0zd_16", ea = "_divider_1x0zd_22
|
|
|
4155
4157
|
/* @__PURE__ */ t(
|
|
4156
4158
|
Z,
|
|
4157
4159
|
{
|
|
4158
|
-
icon: /* @__PURE__ */ t(
|
|
4160
|
+
icon: /* @__PURE__ */ t(nt, { "aria-hidden": "true" }),
|
|
4159
4161
|
label: "選択をコピー",
|
|
4160
4162
|
title: "コピー (Ctrl+C / Cmd+C)",
|
|
4161
4163
|
onClick: () => s("copy"),
|
|
@@ -4175,7 +4177,7 @@ const Xi = "_container_1x0zd_4", Qi = "_group_1x0zd_16", ea = "_divider_1x0zd_22
|
|
|
4175
4177
|
/* @__PURE__ */ t(
|
|
4176
4178
|
Z,
|
|
4177
4179
|
{
|
|
4178
|
-
icon: /* @__PURE__ */ t(
|
|
4180
|
+
icon: /* @__PURE__ */ t(lt, { "aria-hidden": "true" }),
|
|
4179
4181
|
label: "選択を複製",
|
|
4180
4182
|
title: "複製 (Ctrl+D / Cmd+D)",
|
|
4181
4183
|
onClick: () => s("duplicate"),
|
|
@@ -4185,37 +4187,37 @@ const Xi = "_container_1x0zd_4", Qi = "_group_1x0zd_16", ea = "_divider_1x0zd_22
|
|
|
4185
4187
|
] })
|
|
4186
4188
|
] });
|
|
4187
4189
|
};
|
|
4188
|
-
|
|
4189
|
-
const
|
|
4190
|
-
|
|
4191
|
-
const
|
|
4192
|
-
field:
|
|
4193
|
-
horizontal:
|
|
4194
|
-
label:
|
|
4195
|
-
gridSizeRow:
|
|
4196
|
-
},
|
|
4190
|
+
Jt.displayName = "CanvasActionPanel";
|
|
4191
|
+
const Xt = ({ children: e, className: n }) => /* @__PURE__ */ t(Dt, { className: n, children: e });
|
|
4192
|
+
Xt.displayName = "CanvasPanel";
|
|
4193
|
+
const ia = "_field_69k7e_6", aa = "_horizontal_69k7e_12", oa = "_label_69k7e_18", sa = "_gridSizeRow_69k7e_29", he = {
|
|
4194
|
+
field: ia,
|
|
4195
|
+
horizontal: aa,
|
|
4196
|
+
label: oa,
|
|
4197
|
+
gridSizeRow: sa
|
|
4198
|
+
}, vt = { value: 1, unit: "fr" }, Qt = ({ grid: e, onGridChange: n }) => {
|
|
4197
4199
|
const i = y(
|
|
4198
4200
|
(a) => {
|
|
4199
4201
|
if (!a || a < 1 || a > 100) return;
|
|
4200
|
-
const o =
|
|
4202
|
+
const o = wt(e), c = e.colCount, r = [...o];
|
|
4201
4203
|
if (a > c)
|
|
4202
4204
|
for (let s = c; s < a; s++)
|
|
4203
|
-
r.push({ ...
|
|
4205
|
+
r.push({ ...vt });
|
|
4204
4206
|
else
|
|
4205
4207
|
r.splice(a);
|
|
4206
|
-
n({ ...e, ...
|
|
4208
|
+
n({ ...e, ...Nt(r) });
|
|
4207
4209
|
},
|
|
4208
4210
|
[e, n]
|
|
4209
4211
|
), l = y(
|
|
4210
4212
|
(a) => {
|
|
4211
4213
|
if (!a || a < 1 || a > 100) return;
|
|
4212
|
-
const o =
|
|
4214
|
+
const o = Ct(e), c = e.rowCount, r = [...o];
|
|
4213
4215
|
if (a > c)
|
|
4214
4216
|
for (let s = c; s < a; s++)
|
|
4215
|
-
r.push({ ...
|
|
4217
|
+
r.push({ ...vt });
|
|
4216
4218
|
else
|
|
4217
4219
|
r.splice(a);
|
|
4218
|
-
n({ ...e, ...
|
|
4220
|
+
n({ ...e, ...St(r) });
|
|
4219
4221
|
},
|
|
4220
4222
|
[e, n]
|
|
4221
4223
|
);
|
|
@@ -4226,9 +4228,9 @@ const ta = "_field_69k7e_6", na = "_horizontal_69k7e_12", la = "_label_69k7e_18"
|
|
|
4226
4228
|
collapsible: !0,
|
|
4227
4229
|
defaultCollapsed: !1,
|
|
4228
4230
|
description: "ブロックを配置するグリッドの列数と行数を設定します",
|
|
4229
|
-
children: /* @__PURE__ */ p("div", { className:
|
|
4230
|
-
/* @__PURE__ */ p("div", { className: `${
|
|
4231
|
-
/* @__PURE__ */ t("span", { className:
|
|
4231
|
+
children: /* @__PURE__ */ p("div", { className: he.gridSizeRow, children: [
|
|
4232
|
+
/* @__PURE__ */ p("div", { className: `${he.field} ${he.horizontal}`, children: [
|
|
4233
|
+
/* @__PURE__ */ t("span", { className: he.label, children: "列数" }),
|
|
4232
4234
|
/* @__PURE__ */ t(
|
|
4233
4235
|
G,
|
|
4234
4236
|
{
|
|
@@ -4240,8 +4242,8 @@ const ta = "_field_69k7e_6", na = "_horizontal_69k7e_12", la = "_label_69k7e_18"
|
|
|
4240
4242
|
}
|
|
4241
4243
|
)
|
|
4242
4244
|
] }),
|
|
4243
|
-
/* @__PURE__ */ p("div", { className: `${
|
|
4244
|
-
/* @__PURE__ */ t("span", { className:
|
|
4245
|
+
/* @__PURE__ */ p("div", { className: `${he.field} ${he.horizontal}`, children: [
|
|
4246
|
+
/* @__PURE__ */ t("span", { className: he.label, children: "行数" }),
|
|
4245
4247
|
/* @__PURE__ */ t(
|
|
4246
4248
|
G,
|
|
4247
4249
|
{
|
|
@@ -4257,19 +4259,19 @@ const ta = "_field_69k7e_6", na = "_horizontal_69k7e_12", la = "_label_69k7e_18"
|
|
|
4257
4259
|
}
|
|
4258
4260
|
);
|
|
4259
4261
|
};
|
|
4260
|
-
|
|
4261
|
-
const
|
|
4262
|
-
topRow:
|
|
4263
|
-
linkSwitch:
|
|
4264
|
-
switchLabel:
|
|
4265
|
-
switchLabelActive:
|
|
4266
|
-
toggle:
|
|
4267
|
-
thumb:
|
|
4268
|
-
topCell:
|
|
4269
|
-
sideCell:
|
|
4270
|
-
bottomCell:
|
|
4271
|
-
sideMargins:
|
|
4272
|
-
},
|
|
4262
|
+
Qt.displayName = "GridSizePanel";
|
|
4263
|
+
const ra = "_topRow_2ni80_6", ca = "_linkSwitch_2ni80_15", da = "_switchLabel_2ni80_23", ha = "_switchLabelActive_2ni80_31", ua = "_toggle_2ni80_35", pa = "_thumb_2ni80_52", ma = "_topCell_2ni80_70", ba = "_sideCell_2ni80_75", fa = "_bottomCell_2ni80_81", va = "_sideMargins_2ni80_88", H = {
|
|
4264
|
+
topRow: ra,
|
|
4265
|
+
linkSwitch: ca,
|
|
4266
|
+
switchLabel: da,
|
|
4267
|
+
switchLabelActive: ha,
|
|
4268
|
+
toggle: ua,
|
|
4269
|
+
thumb: pa,
|
|
4270
|
+
topCell: ma,
|
|
4271
|
+
sideCell: ba,
|
|
4272
|
+
bottomCell: fa,
|
|
4273
|
+
sideMargins: va
|
|
4274
|
+
}, en = ({ paper: e, onPaperChange: n }) => {
|
|
4273
4275
|
const [i, l] = O(!1), a = y(
|
|
4274
4276
|
(s) => {
|
|
4275
4277
|
if (!s) return;
|
|
@@ -4369,7 +4371,7 @@ const aa = "_topRow_2ni80_6", oa = "_linkSwitch_2ni80_15", sa = "_switchLabel_2n
|
|
|
4369
4371
|
}
|
|
4370
4372
|
) })
|
|
4371
4373
|
] }),
|
|
4372
|
-
!i && /* @__PURE__ */ p(
|
|
4374
|
+
!i && /* @__PURE__ */ p(se, { children: [
|
|
4373
4375
|
/* @__PURE__ */ p("div", { className: H.sideMargins, children: [
|
|
4374
4376
|
/* @__PURE__ */ t("div", { className: H.sideCell, children: /* @__PURE__ */ t(
|
|
4375
4377
|
j,
|
|
@@ -4407,21 +4409,21 @@ const aa = "_topRow_2ni80_6", oa = "_linkSwitch_2ni80_15", sa = "_switchLabel_2n
|
|
|
4407
4409
|
}
|
|
4408
4410
|
);
|
|
4409
4411
|
};
|
|
4410
|
-
|
|
4411
|
-
const
|
|
4412
|
-
grid:
|
|
4413
|
-
colSpan2:
|
|
4414
|
-
colSpan3:
|
|
4415
|
-
label:
|
|
4416
|
-
modeLabel:
|
|
4417
|
-
modeToggle:
|
|
4418
|
-
switchLabel:
|
|
4419
|
-
switchLabelActive:
|
|
4420
|
-
toggle:
|
|
4421
|
-
thumb:
|
|
4422
|
-
checkboxCell:
|
|
4412
|
+
en.displayName = "MarginPanel";
|
|
4413
|
+
const ga = "_grid_ddemj_5", ya = "_colSpan2_ddemj_13", _a = "_colSpan3_ddemj_18", xa = "_label_ddemj_23", wa = "_modeLabel_ddemj_32", Na = "_modeToggle_ddemj_40", Ca = "_switchLabel_ddemj_47", Sa = "_switchLabelActive_ddemj_55", Ia = "_toggle_ddemj_59", $a = "_thumb_ddemj_76", La = "_checkboxCell_ddemj_92", M = {
|
|
4414
|
+
grid: ga,
|
|
4415
|
+
colSpan2: ya,
|
|
4416
|
+
colSpan3: _a,
|
|
4417
|
+
label: xa,
|
|
4418
|
+
modeLabel: wa,
|
|
4419
|
+
modeToggle: Na,
|
|
4420
|
+
switchLabel: Ca,
|
|
4421
|
+
switchLabelActive: Sa,
|
|
4422
|
+
toggle: Ia,
|
|
4423
|
+
thumb: $a,
|
|
4424
|
+
checkboxCell: La
|
|
4423
4425
|
};
|
|
4424
|
-
function
|
|
4426
|
+
function gt(e, n) {
|
|
4425
4427
|
switch (n) {
|
|
4426
4428
|
case "cm":
|
|
4427
4429
|
return e / 10;
|
|
@@ -4431,11 +4433,11 @@ function vt(e, n) {
|
|
|
4431
4433
|
return e;
|
|
4432
4434
|
}
|
|
4433
4435
|
}
|
|
4434
|
-
const
|
|
4436
|
+
const tn = ({
|
|
4435
4437
|
paper: e,
|
|
4436
4438
|
onPaperChange: n
|
|
4437
4439
|
}) => {
|
|
4438
|
-
const i =
|
|
4440
|
+
const i = ne(
|
|
4439
4441
|
() => [
|
|
4440
4442
|
{ value: F.A4, label: "A4 (210 × 297 mm)" },
|
|
4441
4443
|
{ value: F.A3, label: "A3 (297 × 420 mm)" },
|
|
@@ -4452,7 +4454,7 @@ const Qt = ({
|
|
|
4452
4454
|
[e, n]
|
|
4453
4455
|
), a = y(
|
|
4454
4456
|
(_) => {
|
|
4455
|
-
_ && n({ ...e, size:
|
|
4457
|
+
_ && n({ ...e, size: It[_] });
|
|
4456
4458
|
},
|
|
4457
4459
|
[e, n]
|
|
4458
4460
|
), o = y(
|
|
@@ -4481,12 +4483,12 @@ const Qt = ({
|
|
|
4481
4483
|
n({ ...e, autoHeight: s ? void 0 : !0 });
|
|
4482
4484
|
}, [e, s, n]), h = y(() => {
|
|
4483
4485
|
n({ ...e, autoWidth: d ? void 0 : !0 });
|
|
4484
|
-
}, [e, d, n]),
|
|
4486
|
+
}, [e, d, n]), v = s ? "最小高さ" : "高さ", f = d ? "最小幅" : "幅", m = ne(() => {
|
|
4485
4487
|
const _ = K.fromDim(e.margin.left) + K.fromDim(e.margin.right);
|
|
4486
|
-
return
|
|
4487
|
-
}, [e.margin.left, e.margin.right, e.size.width.unit]), g =
|
|
4488
|
+
return gt(_, e.size.width.unit);
|
|
4489
|
+
}, [e.margin.left, e.margin.right, e.size.width.unit]), g = ne(() => {
|
|
4488
4490
|
const _ = K.fromDim(e.margin.top) + K.fromDim(e.margin.bottom);
|
|
4489
|
-
return
|
|
4491
|
+
return gt(_, e.size.height.unit);
|
|
4490
4492
|
}, [e.margin.top, e.margin.bottom, e.size.height.unit]);
|
|
4491
4493
|
return /* @__PURE__ */ t(
|
|
4492
4494
|
V,
|
|
@@ -4498,7 +4500,7 @@ const Qt = ({
|
|
|
4498
4500
|
children: /* @__PURE__ */ p("div", { className: M.grid, children: [
|
|
4499
4501
|
/* @__PURE__ */ t("span", { className: `${M.label} ${M.colSpan2}`, children: "用紙サイズ" }),
|
|
4500
4502
|
/* @__PURE__ */ t("div", { className: M.colSpan3, children: /* @__PURE__ */ t(
|
|
4501
|
-
|
|
4503
|
+
ye,
|
|
4502
4504
|
{
|
|
4503
4505
|
value: e.size.preset,
|
|
4504
4506
|
options: i,
|
|
@@ -4507,7 +4509,7 @@ const Qt = ({
|
|
|
4507
4509
|
) }),
|
|
4508
4510
|
/* @__PURE__ */ t("span", { className: `${M.label} ${M.colSpan2}`, children: "横向き" }),
|
|
4509
4511
|
/* @__PURE__ */ t("div", { className: M.checkboxCell, children: /* @__PURE__ */ t(
|
|
4510
|
-
|
|
4512
|
+
oe,
|
|
4511
4513
|
{
|
|
4512
4514
|
value: e.orientation === !0,
|
|
4513
4515
|
onChange: l
|
|
@@ -4571,8 +4573,8 @@ const Qt = ({
|
|
|
4571
4573
|
}
|
|
4572
4574
|
)
|
|
4573
4575
|
] }),
|
|
4574
|
-
r && /* @__PURE__ */ p(
|
|
4575
|
-
/* @__PURE__ */ t("span", { className: M.label, children:
|
|
4576
|
+
r && /* @__PURE__ */ p(se, { children: [
|
|
4577
|
+
/* @__PURE__ */ t("span", { className: M.label, children: f }),
|
|
4576
4578
|
/* @__PURE__ */ t("div", { className: M.colSpan3, children: /* @__PURE__ */ t(
|
|
4577
4579
|
j,
|
|
4578
4580
|
{
|
|
@@ -4583,7 +4585,7 @@ const Qt = ({
|
|
|
4583
4585
|
max: 500
|
|
4584
4586
|
}
|
|
4585
4587
|
) }),
|
|
4586
|
-
/* @__PURE__ */ t("span", { className: M.label, children:
|
|
4588
|
+
/* @__PURE__ */ t("span", { className: M.label, children: v }),
|
|
4587
4589
|
/* @__PURE__ */ t("div", { className: M.colSpan3, children: /* @__PURE__ */ t(
|
|
4588
4590
|
j,
|
|
4589
4591
|
{
|
|
@@ -4599,8 +4601,8 @@ const Qt = ({
|
|
|
4599
4601
|
}
|
|
4600
4602
|
);
|
|
4601
4603
|
};
|
|
4602
|
-
|
|
4603
|
-
const
|
|
4604
|
+
tn.displayName = "PaperSizePanel";
|
|
4605
|
+
const ka = ({
|
|
4604
4606
|
context: e,
|
|
4605
4607
|
onBlockHover: n,
|
|
4606
4608
|
onBlockDragChange: i,
|
|
@@ -4618,11 +4620,11 @@ const Ia = ({
|
|
|
4618
4620
|
);
|
|
4619
4621
|
o(
|
|
4620
4622
|
{ ...a, pages: g },
|
|
4621
|
-
{ mergeKey:
|
|
4623
|
+
{ mergeKey: bn(r) }
|
|
4622
4624
|
);
|
|
4623
4625
|
},
|
|
4624
4626
|
[a, o, r]
|
|
4625
|
-
),
|
|
4627
|
+
), v = y(
|
|
4626
4628
|
(m) => {
|
|
4627
4629
|
const g = a.pages.map(
|
|
4628
4630
|
(_, w) => w === r ? { ..._, blocks: m } : _
|
|
@@ -4630,7 +4632,7 @@ const Ia = ({
|
|
|
4630
4632
|
o({ ...a, pages: g });
|
|
4631
4633
|
},
|
|
4632
4634
|
[a, o, r]
|
|
4633
|
-
),
|
|
4635
|
+
), f = y(
|
|
4634
4636
|
(m) => {
|
|
4635
4637
|
const g = a.pages.map(
|
|
4636
4638
|
(_, w) => w === r ? { ..._, blockDefaults: m } : _
|
|
@@ -4639,30 +4641,30 @@ const Ia = ({
|
|
|
4639
4641
|
},
|
|
4640
4642
|
[a, o, r]
|
|
4641
4643
|
);
|
|
4642
|
-
return /* @__PURE__ */ p(
|
|
4644
|
+
return /* @__PURE__ */ p(Xt, { children: [
|
|
4643
4645
|
/* @__PURE__ */ t(
|
|
4644
|
-
|
|
4646
|
+
Jt,
|
|
4645
4647
|
{
|
|
4646
4648
|
context: e,
|
|
4647
4649
|
onActionFeedback: l
|
|
4648
4650
|
}
|
|
4649
4651
|
),
|
|
4650
|
-
/* @__PURE__ */ t(
|
|
4651
|
-
/* @__PURE__ */ t(
|
|
4652
|
-
/* @__PURE__ */ t(
|
|
4652
|
+
/* @__PURE__ */ t(tn, { paper: a.paper, onPaperChange: u }),
|
|
4653
|
+
/* @__PURE__ */ t(en, { paper: a.paper, onPaperChange: u }),
|
|
4654
|
+
/* @__PURE__ */ t(Qt, { grid: d.grid, onGridChange: h }),
|
|
4653
4655
|
c && Object.keys(c).length > 0 && /* @__PURE__ */ t(
|
|
4654
|
-
|
|
4656
|
+
Zt,
|
|
4655
4657
|
{
|
|
4656
4658
|
blockDefaults: d.blockDefaults ?? {},
|
|
4657
4659
|
pluginRegistry: c,
|
|
4658
|
-
onChange:
|
|
4660
|
+
onChange: f
|
|
4659
4661
|
}
|
|
4660
4662
|
),
|
|
4661
4663
|
/* @__PURE__ */ t(
|
|
4662
|
-
|
|
4664
|
+
Yt,
|
|
4663
4665
|
{
|
|
4664
4666
|
blocks: d.blocks,
|
|
4665
|
-
onBlocksChange:
|
|
4667
|
+
onBlocksChange: v,
|
|
4666
4668
|
selectedBlockIds: s,
|
|
4667
4669
|
onBlockHover: n,
|
|
4668
4670
|
onBlockDragChange: i
|
|
@@ -4670,27 +4672,27 @@ const Ia = ({
|
|
|
4670
4672
|
)
|
|
4671
4673
|
] });
|
|
4672
4674
|
};
|
|
4673
|
-
|
|
4674
|
-
const
|
|
4675
|
-
buttonGroup:
|
|
4676
|
-
button:
|
|
4677
|
-
error:
|
|
4678
|
-
},
|
|
4675
|
+
ka.displayName = "DefaultCanvasPanel";
|
|
4676
|
+
const Ta = "_buttonGroup_5h1ft_1", Ea = "_button_5h1ft_1", Aa = "_error_5h1ft_33", W = {
|
|
4677
|
+
buttonGroup: Ta,
|
|
4678
|
+
button: Ea,
|
|
4679
|
+
error: Aa
|
|
4680
|
+
}, yt = (e, n) => {
|
|
4679
4681
|
const i = [];
|
|
4680
4682
|
for (const l of Object.keys(e))
|
|
4681
4683
|
l in n || i.push({ id: l, value: void 0 });
|
|
4682
4684
|
for (const [l, a] of Object.entries(n))
|
|
4683
4685
|
i.push({ id: l, value: a });
|
|
4684
4686
|
return i;
|
|
4685
|
-
},
|
|
4687
|
+
}, nn = ({
|
|
4686
4688
|
book: e,
|
|
4687
4689
|
values: n,
|
|
4688
4690
|
onBookChange: i,
|
|
4689
4691
|
onValuesChange: l
|
|
4690
4692
|
}) => {
|
|
4691
|
-
const [a, o] = O(""), c =
|
|
4693
|
+
const [a, o] = O(""), c = ae(null), r = ae(null), s = y(() => {
|
|
4692
4694
|
try {
|
|
4693
|
-
const b =
|
|
4695
|
+
const b = ht(e), x = new Blob([b], { type: "application/json" }), N = URL.createObjectURL(x), C = document.createElement("a");
|
|
4694
4696
|
C.href = N, C.download = "book.json", C.click(), URL.revokeObjectURL(N), o("");
|
|
4695
4697
|
} catch (b) {
|
|
4696
4698
|
o(
|
|
@@ -4699,7 +4701,7 @@ const $a = "_buttonGroup_5h1ft_1", La = "_button_5h1ft_1", ka = "_error_5h1ft_33
|
|
|
4699
4701
|
}
|
|
4700
4702
|
}, [e]), d = y(async () => {
|
|
4701
4703
|
try {
|
|
4702
|
-
const b =
|
|
4704
|
+
const b = ht(e);
|
|
4703
4705
|
await navigator.clipboard.writeText(b), o(""), alert("ブックをクリップボードにコピーしました");
|
|
4704
4706
|
} catch (b) {
|
|
4705
4707
|
o(
|
|
@@ -4708,23 +4710,23 @@ const $a = "_buttonGroup_5h1ft_1", La = "_button_5h1ft_1", ka = "_error_5h1ft_33
|
|
|
4708
4710
|
}
|
|
4709
4711
|
}, [e]), u = y(
|
|
4710
4712
|
(b) => {
|
|
4711
|
-
const x =
|
|
4713
|
+
const x = fn(b);
|
|
4712
4714
|
i(x);
|
|
4713
4715
|
},
|
|
4714
4716
|
[i]
|
|
4715
4717
|
), h = y(() => {
|
|
4716
4718
|
var b;
|
|
4717
4719
|
(b = c.current) == null || b.click();
|
|
4718
|
-
}, []),
|
|
4720
|
+
}, []), v = y(
|
|
4719
4721
|
(b) => {
|
|
4720
4722
|
var C;
|
|
4721
4723
|
const x = (C = b.target.files) == null ? void 0 : C[0];
|
|
4722
4724
|
if (!x) return;
|
|
4723
4725
|
const N = new FileReader();
|
|
4724
4726
|
N.onload = (T) => {
|
|
4725
|
-
var
|
|
4727
|
+
var P;
|
|
4726
4728
|
try {
|
|
4727
|
-
u((
|
|
4729
|
+
u((P = T.target) == null ? void 0 : P.result), o(""), alert("インポートしました");
|
|
4728
4730
|
} catch (A) {
|
|
4729
4731
|
o(
|
|
4730
4732
|
`インポートエラー: ${A instanceof Error ? A.message : String(A)}`
|
|
@@ -4733,7 +4735,7 @@ const $a = "_buttonGroup_5h1ft_1", La = "_button_5h1ft_1", ka = "_error_5h1ft_33
|
|
|
4733
4735
|
}, N.readAsText(x), b.target.value = "";
|
|
4734
4736
|
},
|
|
4735
4737
|
[u]
|
|
4736
|
-
),
|
|
4738
|
+
), f = y(async () => {
|
|
4737
4739
|
try {
|
|
4738
4740
|
const b = await navigator.clipboard.readText();
|
|
4739
4741
|
u(b), o(""), alert("インポートしました");
|
|
@@ -4770,9 +4772,9 @@ const $a = "_buttonGroup_5h1ft_1", La = "_button_5h1ft_1", ka = "_error_5h1ft_33
|
|
|
4770
4772
|
if (!x) return;
|
|
4771
4773
|
const N = new FileReader();
|
|
4772
4774
|
N.onload = (T) => {
|
|
4773
|
-
var
|
|
4775
|
+
var P;
|
|
4774
4776
|
try {
|
|
4775
|
-
const A =
|
|
4777
|
+
const A = ut((P = T.target) == null ? void 0 : P.result), E = yt(n, A);
|
|
4776
4778
|
l(E), o(""), alert("値をインポートしました");
|
|
4777
4779
|
} catch (A) {
|
|
4778
4780
|
o(
|
|
@@ -4784,14 +4786,14 @@ const $a = "_buttonGroup_5h1ft_1", La = "_button_5h1ft_1", ka = "_error_5h1ft_33
|
|
|
4784
4786
|
[l, n]
|
|
4785
4787
|
), L = y(async () => {
|
|
4786
4788
|
try {
|
|
4787
|
-
const b = await navigator.clipboard.readText(), x =
|
|
4789
|
+
const b = await navigator.clipboard.readText(), x = ut(b), N = yt(n, x);
|
|
4788
4790
|
l(N), o(""), alert("値をインポートしました");
|
|
4789
4791
|
} catch (b) {
|
|
4790
4792
|
o(
|
|
4791
4793
|
`クリップボードエラー: ${b instanceof Error ? b.message : String(b)}`
|
|
4792
4794
|
);
|
|
4793
4795
|
}
|
|
4794
|
-
}, [l, n]), $ =
|
|
4796
|
+
}, [l, n]), $ = ae(null), k = y(() => {
|
|
4795
4797
|
try {
|
|
4796
4798
|
const b = e.pages[0], x = JSON.stringify(
|
|
4797
4799
|
{ grid: b.grid, blocks: b.blocks },
|
|
@@ -4814,15 +4816,15 @@ const $a = "_buttonGroup_5h1ft_1", La = "_button_5h1ft_1", ka = "_error_5h1ft_33
|
|
|
4814
4816
|
if (!x) return;
|
|
4815
4817
|
const N = new FileReader();
|
|
4816
4818
|
N.onload = (T) => {
|
|
4817
|
-
var
|
|
4819
|
+
var P;
|
|
4818
4820
|
try {
|
|
4819
|
-
const A = JSON.parse((
|
|
4821
|
+
const A = JSON.parse((P = T.target) == null ? void 0 : P.result), E = vn({
|
|
4820
4822
|
grid: A.grid,
|
|
4821
4823
|
blocks: A.blocks ?? [],
|
|
4822
4824
|
...A.metaData !== void 0 ? { metaData: A.metaData } : {},
|
|
4823
4825
|
...A.blockDefaults !== void 0 ? { blockDefaults: A.blockDefaults } : {}
|
|
4824
|
-
}),
|
|
4825
|
-
|
|
4826
|
+
}), z = [...e.pages];
|
|
4827
|
+
z[0] = E, i({ ...e, pages: z }), o(""), alert("スキーマをインポートしました");
|
|
4826
4828
|
} catch (A) {
|
|
4827
4829
|
o(
|
|
4828
4830
|
`インポートエラー: ${A instanceof Error ? A.message : String(A)}`
|
|
@@ -4832,14 +4834,14 @@ const $a = "_buttonGroup_5h1ft_1", La = "_button_5h1ft_1", ka = "_error_5h1ft_33
|
|
|
4832
4834
|
},
|
|
4833
4835
|
[e, i]
|
|
4834
4836
|
);
|
|
4835
|
-
return /* @__PURE__ */ p(
|
|
4837
|
+
return /* @__PURE__ */ p(se, { children: [
|
|
4836
4838
|
/* @__PURE__ */ p(V, { title: "ブック", children: [
|
|
4837
|
-
/* @__PURE__ */ p("div", { className:
|
|
4839
|
+
/* @__PURE__ */ p("div", { className: W.buttonGroup, children: [
|
|
4838
4840
|
/* @__PURE__ */ t(
|
|
4839
4841
|
"button",
|
|
4840
4842
|
{
|
|
4841
4843
|
type: "button",
|
|
4842
|
-
className:
|
|
4844
|
+
className: W.button,
|
|
4843
4845
|
"data-testid": "export-book-file",
|
|
4844
4846
|
onClick: s,
|
|
4845
4847
|
children: "📥 ファイルにエクスポート"
|
|
@@ -4849,19 +4851,19 @@ const $a = "_buttonGroup_5h1ft_1", La = "_button_5h1ft_1", ka = "_error_5h1ft_33
|
|
|
4849
4851
|
"button",
|
|
4850
4852
|
{
|
|
4851
4853
|
type: "button",
|
|
4852
|
-
className:
|
|
4854
|
+
className: W.button,
|
|
4853
4855
|
"data-testid": "export-book-clipboard",
|
|
4854
4856
|
onClick: d,
|
|
4855
4857
|
children: "📋 クリップボードにコピー"
|
|
4856
4858
|
}
|
|
4857
4859
|
)
|
|
4858
4860
|
] }),
|
|
4859
|
-
/* @__PURE__ */ p("div", { className:
|
|
4861
|
+
/* @__PURE__ */ p("div", { className: W.buttonGroup, children: [
|
|
4860
4862
|
/* @__PURE__ */ t(
|
|
4861
4863
|
"button",
|
|
4862
4864
|
{
|
|
4863
4865
|
type: "button",
|
|
4864
|
-
className:
|
|
4866
|
+
className: W.button,
|
|
4865
4867
|
"data-testid": "import-book-file",
|
|
4866
4868
|
onClick: h,
|
|
4867
4869
|
children: "📤 ファイルからインポート"
|
|
@@ -4871,9 +4873,9 @@ const $a = "_buttonGroup_5h1ft_1", La = "_button_5h1ft_1", ka = "_error_5h1ft_33
|
|
|
4871
4873
|
"button",
|
|
4872
4874
|
{
|
|
4873
4875
|
type: "button",
|
|
4874
|
-
className:
|
|
4876
|
+
className: W.button,
|
|
4875
4877
|
"data-testid": "import-book-clipboard",
|
|
4876
|
-
onClick:
|
|
4878
|
+
onClick: f,
|
|
4877
4879
|
children: "📋 クリップボードからペースト"
|
|
4878
4880
|
}
|
|
4879
4881
|
)
|
|
@@ -4885,17 +4887,17 @@ const $a = "_buttonGroup_5h1ft_1", La = "_button_5h1ft_1", ka = "_error_5h1ft_33
|
|
|
4885
4887
|
type: "file",
|
|
4886
4888
|
accept: ".json",
|
|
4887
4889
|
style: { display: "none" },
|
|
4888
|
-
onChange:
|
|
4890
|
+
onChange: v
|
|
4889
4891
|
}
|
|
4890
4892
|
)
|
|
4891
4893
|
] }),
|
|
4892
4894
|
/* @__PURE__ */ p(V, { title: "値", children: [
|
|
4893
|
-
/* @__PURE__ */ p("div", { className:
|
|
4895
|
+
/* @__PURE__ */ p("div", { className: W.buttonGroup, children: [
|
|
4894
4896
|
/* @__PURE__ */ t(
|
|
4895
4897
|
"button",
|
|
4896
4898
|
{
|
|
4897
4899
|
type: "button",
|
|
4898
|
-
className:
|
|
4900
|
+
className: W.button,
|
|
4899
4901
|
"data-testid": "export-values-file",
|
|
4900
4902
|
onClick: m,
|
|
4901
4903
|
children: "📥 ファイルにエクスポート"
|
|
@@ -4905,19 +4907,19 @@ const $a = "_buttonGroup_5h1ft_1", La = "_button_5h1ft_1", ka = "_error_5h1ft_33
|
|
|
4905
4907
|
"button",
|
|
4906
4908
|
{
|
|
4907
4909
|
type: "button",
|
|
4908
|
-
className:
|
|
4910
|
+
className: W.button,
|
|
4909
4911
|
"data-testid": "export-values-clipboard",
|
|
4910
4912
|
onClick: g,
|
|
4911
4913
|
children: "📋 クリップボードにコピー"
|
|
4912
4914
|
}
|
|
4913
4915
|
)
|
|
4914
4916
|
] }),
|
|
4915
|
-
/* @__PURE__ */ p("div", { className:
|
|
4917
|
+
/* @__PURE__ */ p("div", { className: W.buttonGroup, children: [
|
|
4916
4918
|
/* @__PURE__ */ t(
|
|
4917
4919
|
"button",
|
|
4918
4920
|
{
|
|
4919
4921
|
type: "button",
|
|
4920
|
-
className:
|
|
4922
|
+
className: W.button,
|
|
4921
4923
|
"data-testid": "import-values-file",
|
|
4922
4924
|
onClick: _,
|
|
4923
4925
|
children: "📤 ファイルからインポート"
|
|
@@ -4927,7 +4929,7 @@ const $a = "_buttonGroup_5h1ft_1", La = "_button_5h1ft_1", ka = "_error_5h1ft_33
|
|
|
4927
4929
|
"button",
|
|
4928
4930
|
{
|
|
4929
4931
|
type: "button",
|
|
4930
|
-
className:
|
|
4932
|
+
className: W.button,
|
|
4931
4933
|
"data-testid": "import-values-clipboard",
|
|
4932
4934
|
onClick: L,
|
|
4933
4935
|
children: "📋 クリップボードからペースト"
|
|
@@ -4946,21 +4948,21 @@ const $a = "_buttonGroup_5h1ft_1", La = "_button_5h1ft_1", ka = "_error_5h1ft_33
|
|
|
4946
4948
|
)
|
|
4947
4949
|
] }),
|
|
4948
4950
|
/* @__PURE__ */ p(V, { title: "スキーマ", children: [
|
|
4949
|
-
/* @__PURE__ */ t("div", { className:
|
|
4951
|
+
/* @__PURE__ */ t("div", { className: W.buttonGroup, children: /* @__PURE__ */ t(
|
|
4950
4952
|
"button",
|
|
4951
4953
|
{
|
|
4952
4954
|
type: "button",
|
|
4953
|
-
className:
|
|
4955
|
+
className: W.button,
|
|
4954
4956
|
"data-testid": "export-schema-file",
|
|
4955
4957
|
onClick: k,
|
|
4956
4958
|
children: "📥 スキーマをエクスポート"
|
|
4957
4959
|
}
|
|
4958
4960
|
) }),
|
|
4959
|
-
/* @__PURE__ */ t("div", { className:
|
|
4961
|
+
/* @__PURE__ */ t("div", { className: W.buttonGroup, children: /* @__PURE__ */ t(
|
|
4960
4962
|
"button",
|
|
4961
4963
|
{
|
|
4962
4964
|
type: "button",
|
|
4963
|
-
className:
|
|
4965
|
+
className: W.button,
|
|
4964
4966
|
"data-testid": "import-schema-file",
|
|
4965
4967
|
onClick: I,
|
|
4966
4968
|
children: "📤 スキーマをインポート"
|
|
@@ -4977,17 +4979,17 @@ const $a = "_buttonGroup_5h1ft_1", La = "_button_5h1ft_1", ka = "_error_5h1ft_33
|
|
|
4977
4979
|
}
|
|
4978
4980
|
)
|
|
4979
4981
|
] }),
|
|
4980
|
-
a && /* @__PURE__ */ t("div", { className:
|
|
4982
|
+
a && /* @__PURE__ */ t("div", { className: W.error, role: "alert", children: a })
|
|
4981
4983
|
] });
|
|
4982
4984
|
};
|
|
4983
|
-
|
|
4984
|
-
const
|
|
4985
|
+
nn.displayName = "ImportExportPanel";
|
|
4986
|
+
const Ma = ({
|
|
4985
4987
|
context: e,
|
|
4986
4988
|
sections: n
|
|
4987
4989
|
}) => {
|
|
4988
4990
|
const i = [
|
|
4989
4991
|
/* @__PURE__ */ t(
|
|
4990
|
-
|
|
4992
|
+
nn,
|
|
4991
4993
|
{
|
|
4992
4994
|
book: e.book,
|
|
4993
4995
|
values: e.values,
|
|
@@ -4998,23 +5000,23 @@ const Ta = ({
|
|
|
4998
5000
|
"import-export"
|
|
4999
5001
|
)
|
|
5000
5002
|
];
|
|
5001
|
-
return /* @__PURE__ */ t(
|
|
5003
|
+
return /* @__PURE__ */ t(Dt, { children: n ?? i });
|
|
5002
5004
|
};
|
|
5003
|
-
|
|
5004
|
-
const
|
|
5005
|
-
container:
|
|
5006
|
-
paletteItems:
|
|
5007
|
-
item:
|
|
5008
|
-
itemName:
|
|
5009
|
-
itemPreview:
|
|
5010
|
-
},
|
|
5005
|
+
Ma.displayName = "OtherPanel";
|
|
5006
|
+
const Pa = "_container_16a0l_1", Da = "_paletteItems_16a0l_11", za = "_item_16a0l_23", Ba = "_itemName_16a0l_49", Ra = "_itemPreview_16a0l_77", Se = {
|
|
5007
|
+
container: Pa,
|
|
5008
|
+
paletteItems: Da,
|
|
5009
|
+
item: za,
|
|
5010
|
+
itemName: Ba,
|
|
5011
|
+
itemPreview: Ra
|
|
5012
|
+
}, Wa = ({ context: e, className: n }) => {
|
|
5011
5013
|
const i = Object.values(e.pluginRegistry).filter(
|
|
5012
5014
|
(o) => o !== void 0
|
|
5013
|
-
), l = e.book.pages[e.editorState.pageIdx], { getBlockRectPx: a } =
|
|
5015
|
+
), l = e.book.pages[e.editorState.pageIdx], { getBlockRectPx: a } = gn(
|
|
5014
5016
|
e.book.paper,
|
|
5015
|
-
(l == null ? void 0 : l.grid) ??
|
|
5017
|
+
(l == null ? void 0 : l.grid) ?? yn
|
|
5016
5018
|
);
|
|
5017
|
-
return /* @__PURE__ */ t("div", { className: `${
|
|
5019
|
+
return /* @__PURE__ */ t("div", { className: `${Se.container} ${n || ""}`, children: /* @__PURE__ */ t("div", { className: Se.paletteItems, children: i.map((o) => {
|
|
5018
5020
|
const c = o.meta.defaultSize ?? { w: 1, h: 1 }, r = a({
|
|
5019
5021
|
id: "ghost",
|
|
5020
5022
|
kind: o.kind,
|
|
@@ -5022,7 +5024,7 @@ const Ea = "_container_16a0l_1", Aa = "_paletteItems_16a0l_11", Ma = "_item_16a0
|
|
|
5022
5024
|
props: {}
|
|
5023
5025
|
});
|
|
5024
5026
|
return /* @__PURE__ */ t(
|
|
5025
|
-
|
|
5027
|
+
ln,
|
|
5026
5028
|
{
|
|
5027
5029
|
plugin: o,
|
|
5028
5030
|
ghostWidth: r.width,
|
|
@@ -5032,9 +5034,9 @@ const Ea = "_container_16a0l_1", Aa = "_paletteItems_16a0l_11", Ma = "_item_16a0
|
|
|
5032
5034
|
);
|
|
5033
5035
|
}) }) });
|
|
5034
5036
|
};
|
|
5035
|
-
|
|
5036
|
-
const
|
|
5037
|
-
const l =
|
|
5037
|
+
Wa.displayName = "PalettePanel";
|
|
5038
|
+
const ln = ({ plugin: e, ghostWidth: n, ghostHeight: i }) => {
|
|
5039
|
+
const l = ne(() => {
|
|
5038
5040
|
var c, r;
|
|
5039
5041
|
return {
|
|
5040
5042
|
id: `preview-${e.kind}`,
|
|
@@ -5049,20 +5051,20 @@ const tn = ({ plugin: e, ghostWidth: n, ghostHeight: i }) => {
|
|
|
5049
5051
|
};
|
|
5050
5052
|
}, [e]), a = null, o = y(
|
|
5051
5053
|
(c) => {
|
|
5052
|
-
|
|
5054
|
+
_n(c, e.kind, e.meta.defaultSize ?? { w: 1, h: 1 });
|
|
5053
5055
|
const r = Math.round(n), s = Math.round(i), d = document.createElement("div");
|
|
5054
5056
|
d.style.cssText = `position:fixed;top:-9999px;left:-9999px;width:${r}px;height:${s}px;background:rgba(147,197,253,0.45);border-radius:4px;`, document.body.appendChild(d), c.dataTransfer.setDragImage(d, r / 2, s / 2), requestAnimationFrame(() => document.body.removeChild(d));
|
|
5055
5057
|
},
|
|
5056
5058
|
[e, n, i]
|
|
5057
5059
|
);
|
|
5058
|
-
return /* @__PURE__ */ p("div", { className:
|
|
5060
|
+
return /* @__PURE__ */ p("div", { className: Se.item, "data-testid": `palette-item-${e.kind}`, children: [
|
|
5059
5061
|
/* @__PURE__ */ t(
|
|
5060
5062
|
"button",
|
|
5061
5063
|
{
|
|
5062
5064
|
type: "button",
|
|
5063
5065
|
draggable: !0,
|
|
5064
5066
|
onDragStart: o,
|
|
5065
|
-
className:
|
|
5067
|
+
className: Se.itemName,
|
|
5066
5068
|
"aria-label": `${e.meta.displayName}ブロックを追加`,
|
|
5067
5069
|
children: e.meta.displayName
|
|
5068
5070
|
}
|
|
@@ -5070,7 +5072,7 @@ const tn = ({ plugin: e, ghostWidth: n, ghostHeight: i }) => {
|
|
|
5070
5072
|
/* @__PURE__ */ t(
|
|
5071
5073
|
"div",
|
|
5072
5074
|
{
|
|
5073
|
-
className:
|
|
5075
|
+
className: Se.itemPreview,
|
|
5074
5076
|
draggable: !0,
|
|
5075
5077
|
onDragStart: o,
|
|
5076
5078
|
"aria-hidden": "true",
|
|
@@ -5083,60 +5085,60 @@ const tn = ({ plugin: e, ghostWidth: n, ghostHeight: i }) => {
|
|
|
5083
5085
|
onChange: () => {
|
|
5084
5086
|
},
|
|
5085
5087
|
readOnly: !0,
|
|
5086
|
-
mode:
|
|
5088
|
+
mode: xn.FORM
|
|
5087
5089
|
}
|
|
5088
5090
|
)
|
|
5089
5091
|
}
|
|
5090
5092
|
)
|
|
5091
5093
|
] });
|
|
5092
5094
|
};
|
|
5093
|
-
|
|
5095
|
+
ln.displayName = "PaletteItem";
|
|
5094
5096
|
export {
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
|
|
5097
|
+
Mn as A,
|
|
5098
|
+
at as B,
|
|
5099
|
+
Pn as C,
|
|
5100
|
+
Bn as D,
|
|
5101
|
+
tn as E,
|
|
5102
|
+
rt as F,
|
|
5103
|
+
Bl as G,
|
|
5104
|
+
qt as H,
|
|
5103
5105
|
Z as I,
|
|
5104
5106
|
ve as J,
|
|
5105
5107
|
De as K,
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
+
ot as L,
|
|
5109
|
+
en as M,
|
|
5108
5110
|
G as N,
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5111
|
+
Ma as O,
|
|
5112
|
+
Wl as P,
|
|
5113
|
+
Dt as Q,
|
|
5114
|
+
Ie as R,
|
|
5115
|
+
qa as S,
|
|
5116
|
+
Al as T,
|
|
5117
|
+
Ii as U,
|
|
5118
|
+
Dn as a,
|
|
5119
|
+
zn as b,
|
|
5120
|
+
zl as c,
|
|
5121
|
+
$i as d,
|
|
5122
|
+
Bi as e,
|
|
5123
|
+
Wa as f,
|
|
5124
|
+
Va as g,
|
|
5125
|
+
ka as h,
|
|
5126
|
+
Ml as i,
|
|
5127
|
+
xe as j,
|
|
5128
|
+
we as k,
|
|
5129
|
+
Zt as l,
|
|
5130
|
+
Yt as m,
|
|
5131
|
+
Xe as n,
|
|
5132
|
+
Jt as o,
|
|
5133
|
+
Xt as p,
|
|
5134
|
+
oe as q,
|
|
5133
5135
|
V as r,
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5136
|
+
D as s,
|
|
5137
|
+
ie as t,
|
|
5138
|
+
Ga as u,
|
|
5137
5139
|
j as v,
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
5140
|
+
ye as w,
|
|
5141
|
+
Qt as x,
|
|
5142
|
+
nn as y,
|
|
5143
|
+
Ht as z
|
|
5142
5144
|
};
|