@tatamicks/core 0.1.6 → 0.1.7
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/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +509 -493
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './index.css';var On = Object.defineProperty;
|
|
2
2
|
var Sn = (t, e, n) => e in t ? On(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
3
|
var ae = (t, e, n) => Sn(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
-
import kn, { useCallback as $, useRef as dt, useEffect as mt, useState as st, createContext as Gn, useContext as _e, memo as F, useMemo as
|
|
4
|
+
import kn, { useCallback as $, useRef as dt, useEffect as mt, useState as st, createContext as Gn, useContext as _e, memo as F, useMemo as L, forwardRef as te, useImperativeHandle as ye } from "react";
|
|
5
5
|
var Xt = { exports: {} }, Lt = {};
|
|
6
6
|
/**
|
|
7
7
|
* @license React
|
|
@@ -59,7 +59,7 @@ function Vn() {
|
|
|
59
59
|
return "Profiler";
|
|
60
60
|
case m:
|
|
61
61
|
return "StrictMode";
|
|
62
|
-
case
|
|
62
|
+
case P:
|
|
63
63
|
return "Suspense";
|
|
64
64
|
case D:
|
|
65
65
|
return "SuspenseList";
|
|
@@ -72,14 +72,14 @@ function Vn() {
|
|
|
72
72
|
), b.$$typeof) {
|
|
73
73
|
case _:
|
|
74
74
|
return "Portal";
|
|
75
|
-
case
|
|
75
|
+
case N:
|
|
76
76
|
return b.displayName || "Context";
|
|
77
|
-
case
|
|
77
|
+
case g:
|
|
78
78
|
return (b._context.displayName || "Context") + ".Consumer";
|
|
79
|
-
case
|
|
79
|
+
case y:
|
|
80
80
|
var R = b.render;
|
|
81
81
|
return b = b.displayName, b || (b = R.displayName || R.name || "", b = b !== "" ? "ForwardRef(" + b + ")" : "ForwardRef"), b;
|
|
82
|
-
case
|
|
82
|
+
case w:
|
|
83
83
|
return R = b.displayName || null, R !== null ? R : t(b.type) || "Memo";
|
|
84
84
|
case T:
|
|
85
85
|
R = b._payload, b = b._init;
|
|
@@ -102,8 +102,8 @@ function Vn() {
|
|
|
102
102
|
}
|
|
103
103
|
if (R) {
|
|
104
104
|
R = console;
|
|
105
|
-
var
|
|
106
|
-
return
|
|
105
|
+
var O = R.error, z = typeof Symbol == "function" && Symbol.toStringTag && b[Symbol.toStringTag] || b.constructor.name || "Object";
|
|
106
|
+
return O.call(
|
|
107
107
|
R,
|
|
108
108
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
109
109
|
z
|
|
@@ -136,14 +136,14 @@ function Vn() {
|
|
|
136
136
|
return b.key !== void 0;
|
|
137
137
|
}
|
|
138
138
|
function a(b, R) {
|
|
139
|
-
function
|
|
140
|
-
|
|
139
|
+
function O() {
|
|
140
|
+
C || (C = !0, console.error(
|
|
141
141
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
142
142
|
R
|
|
143
143
|
));
|
|
144
144
|
}
|
|
145
|
-
|
|
146
|
-
get:
|
|
145
|
+
O.isReactWarning = !0, Object.defineProperty(b, "key", {
|
|
146
|
+
get: O,
|
|
147
147
|
configurable: !0
|
|
148
148
|
});
|
|
149
149
|
}
|
|
@@ -153,13 +153,13 @@ function Vn() {
|
|
|
153
153
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
154
154
|
)), b = this.props.ref, b !== void 0 ? b : null;
|
|
155
155
|
}
|
|
156
|
-
function u(b, R,
|
|
157
|
-
var J =
|
|
156
|
+
function u(b, R, O, z, bt, Pt) {
|
|
157
|
+
var J = O.ref;
|
|
158
158
|
return b = {
|
|
159
|
-
$$typeof:
|
|
159
|
+
$$typeof: E,
|
|
160
160
|
type: b,
|
|
161
161
|
key: R,
|
|
162
|
-
props:
|
|
162
|
+
props: O,
|
|
163
163
|
_owner: z
|
|
164
164
|
}, (J !== void 0 ? J : null) !== null ? Object.defineProperty(b, "ref", {
|
|
165
165
|
enumerable: !1,
|
|
@@ -186,11 +186,11 @@ function Vn() {
|
|
|
186
186
|
value: Pt
|
|
187
187
|
}), Object.freeze && (Object.freeze(b.props), Object.freeze(b)), b;
|
|
188
188
|
}
|
|
189
|
-
function f(b, R,
|
|
189
|
+
function f(b, R, O, z, bt, Pt) {
|
|
190
190
|
var J = R.children;
|
|
191
191
|
if (J !== void 0)
|
|
192
192
|
if (z)
|
|
193
|
-
if (
|
|
193
|
+
if (j(J)) {
|
|
194
194
|
for (z = 0; z < J.length; z++)
|
|
195
195
|
p(J[z]);
|
|
196
196
|
Object.freeze && Object.freeze(J);
|
|
@@ -217,18 +217,18 @@ React keys must be passed directly to JSX without using spread:
|
|
|
217
217
|
J
|
|
218
218
|
), q[J + z] = !0);
|
|
219
219
|
}
|
|
220
|
-
if (J = null,
|
|
221
|
-
|
|
220
|
+
if (J = null, O !== void 0 && (n(O), J = "" + O), i(R) && (n(R.key), J = "" + R.key), "key" in R) {
|
|
221
|
+
O = {};
|
|
222
222
|
for (var wt in R)
|
|
223
|
-
wt !== "key" && (
|
|
224
|
-
} else
|
|
223
|
+
wt !== "key" && (O[wt] = R[wt]);
|
|
224
|
+
} else O = R;
|
|
225
225
|
return J && a(
|
|
226
|
-
|
|
226
|
+
O,
|
|
227
227
|
typeof b == "function" ? b.displayName || b.name || "Unknown" : b
|
|
228
228
|
), u(
|
|
229
229
|
b,
|
|
230
230
|
J,
|
|
231
|
-
|
|
231
|
+
O,
|
|
232
232
|
o(),
|
|
233
233
|
bt,
|
|
234
234
|
Pt
|
|
@@ -238,9 +238,9 @@ React keys must be passed directly to JSX without using spread:
|
|
|
238
238
|
x(b) ? b._store && (b._store.validated = 1) : typeof b == "object" && b !== null && b.$$typeof === T && (b._payload.status === "fulfilled" ? x(b._payload.value) && b._payload.value._store && (b._payload.value._store.validated = 1) : b._store && (b._store.validated = 1));
|
|
239
239
|
}
|
|
240
240
|
function x(b) {
|
|
241
|
-
return typeof b == "object" && b !== null && b.$$typeof ===
|
|
241
|
+
return typeof b == "object" && b !== null && b.$$typeof === E;
|
|
242
242
|
}
|
|
243
|
-
var v = kn,
|
|
243
|
+
var v = kn, E = Symbol.for("react.transitional.element"), _ = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), h = Symbol.for("react.profiler"), g = Symbol.for("react.consumer"), N = Symbol.for("react.context"), y = Symbol.for("react.forward_ref"), P = Symbol.for("react.suspense"), D = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), T = Symbol.for("react.lazy"), M = Symbol.for("react.activity"), G = Symbol.for("react.client.reference"), A = v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, k = Object.prototype.hasOwnProperty, j = Array.isArray, I = console.createTask ? console.createTask : function() {
|
|
244
244
|
return null;
|
|
245
245
|
};
|
|
246
246
|
v = {
|
|
@@ -248,26 +248,26 @@ React keys must be passed directly to JSX without using spread:
|
|
|
248
248
|
return b();
|
|
249
249
|
}
|
|
250
250
|
};
|
|
251
|
-
var
|
|
251
|
+
var C, S = {}, Y = v.react_stack_bottom_frame.bind(
|
|
252
252
|
v,
|
|
253
253
|
l
|
|
254
254
|
)(), X = I(s(l)), q = {};
|
|
255
|
-
Ct.Fragment = d, Ct.jsx = function(b, R,
|
|
255
|
+
Ct.Fragment = d, Ct.jsx = function(b, R, O) {
|
|
256
256
|
var z = 1e4 > A.recentlyCreatedOwnerStacks++;
|
|
257
257
|
return f(
|
|
258
258
|
b,
|
|
259
259
|
R,
|
|
260
|
-
|
|
260
|
+
O,
|
|
261
261
|
!1,
|
|
262
262
|
z ? Error("react-stack-top-frame") : Y,
|
|
263
263
|
z ? I(s(b)) : X
|
|
264
264
|
);
|
|
265
|
-
}, Ct.jsxs = function(b, R,
|
|
265
|
+
}, Ct.jsxs = function(b, R, O) {
|
|
266
266
|
var z = 1e4 > A.recentlyCreatedOwnerStacks++;
|
|
267
267
|
return f(
|
|
268
268
|
b,
|
|
269
269
|
R,
|
|
270
|
-
|
|
270
|
+
O,
|
|
271
271
|
!0,
|
|
272
272
|
z ? Error("react-stack-top-frame") : Y,
|
|
273
273
|
z ? I(s(b)) : X
|
|
@@ -286,8 +286,8 @@ const Un = "_container_1mr3i_5", Wn = "_select_1mr3i_11", Yn = "_placeholderOver
|
|
|
286
286
|
placeholderOverlay: Yn
|
|
287
287
|
}, It = (t) => {
|
|
288
288
|
const { value: e, onChange: n, readOnly: s = !1, config: o } = t, l = t.options ?? (o == null ? void 0 : o.options) ?? [], i = t.placeholder ?? (o == null ? void 0 : o.placeholder) ?? "選択してください", a = t.width ?? (o == null ? void 0 : o.width), c = t.height ?? (o == null ? void 0 : o.height), u = $(
|
|
289
|
-
(
|
|
290
|
-
const _ =
|
|
289
|
+
(E) => {
|
|
290
|
+
const _ = E.target.value;
|
|
291
291
|
if (_ === "")
|
|
292
292
|
n(void 0);
|
|
293
293
|
else {
|
|
@@ -322,7 +322,7 @@ const Un = "_container_1mr3i_5", Wn = "_select_1mr3i_11", Yn = "_placeholderOver
|
|
|
322
322
|
value: f,
|
|
323
323
|
onChange: u,
|
|
324
324
|
disabled: s,
|
|
325
|
-
children: l.map((
|
|
325
|
+
children: l.map((E) => /* @__PURE__ */ r.jsx("option", { value: String(E.value), children: E.label }, String(E.value)))
|
|
326
326
|
}
|
|
327
327
|
)
|
|
328
328
|
] });
|
|
@@ -508,31 +508,31 @@ const dr = "_input_14n56_5", hr = {
|
|
|
508
508
|
config: f,
|
|
509
509
|
onBlur: p
|
|
510
510
|
}) => {
|
|
511
|
-
const x = s ?? (f == null ? void 0 : f.min) ?? 1, v = o ?? (f == null ? void 0 : f.max),
|
|
512
|
-
(
|
|
513
|
-
const
|
|
514
|
-
if (
|
|
511
|
+
const x = s ?? (f == null ? void 0 : f.min) ?? 1, v = o ?? (f == null ? void 0 : f.max), E = l ?? (f == null ? void 0 : f.step) ?? 1, _ = i ?? (f == null ? void 0 : f.integer) ?? !1, d = a ?? (f == null ? void 0 : f.placeholder), m = c ?? (f == null ? void 0 : f.width), h = u ?? (f == null ? void 0 : f.height), g = $(
|
|
512
|
+
(y) => {
|
|
513
|
+
const P = y.target.value;
|
|
514
|
+
if (P === "") {
|
|
515
515
|
e(void 0);
|
|
516
516
|
return;
|
|
517
517
|
}
|
|
518
|
-
let D = Number.parseFloat(
|
|
518
|
+
let D = Number.parseFloat(P);
|
|
519
519
|
Number.isNaN(D) || (_ && (D = Math.round(D)), x !== void 0 && D < x && (D = x), v !== void 0 && D > v && (D = v), e(D));
|
|
520
520
|
},
|
|
521
521
|
[e, x, v, _]
|
|
522
|
-
),
|
|
523
|
-
return m !== void 0 && (
|
|
522
|
+
), N = {};
|
|
523
|
+
return m !== void 0 && (N.width = `${m}px`), h !== void 0 && (N.height = `${h}px`, N.paddingTop = 0, N.paddingBottom = 0), /* @__PURE__ */ r.jsx(
|
|
524
524
|
"input",
|
|
525
525
|
{
|
|
526
526
|
type: "number",
|
|
527
527
|
className: hr.input,
|
|
528
|
-
style:
|
|
528
|
+
style: N,
|
|
529
529
|
value: t ?? "",
|
|
530
|
-
onChange:
|
|
530
|
+
onChange: g,
|
|
531
531
|
onBlur: p,
|
|
532
532
|
disabled: n,
|
|
533
533
|
min: x,
|
|
534
534
|
max: v,
|
|
535
|
-
step:
|
|
535
|
+
step: E,
|
|
536
536
|
placeholder: d
|
|
537
537
|
}
|
|
538
538
|
);
|
|
@@ -729,54 +729,54 @@ const ee = ({
|
|
|
729
729
|
height: a,
|
|
730
730
|
config: c
|
|
731
731
|
}) => {
|
|
732
|
-
const u = o ?? (c == null ? void 0 : c.allowUndefined) ?? !0, f = l ?? (u ? "未設定" : "#000000"), p = i ?? (c == null ? void 0 : c.width), x = a ?? (c == null ? void 0 : c.height), [v,
|
|
732
|
+
const u = o ?? (c == null ? void 0 : c.allowUndefined) ?? !0, f = l ?? (u ? "未設定" : "#000000"), p = i ?? (c == null ? void 0 : c.width), x = a ?? (c == null ? void 0 : c.height), [v, E] = st(!1), _ = dt(null), [d, m] = st(() => Le(t) ?? { r: 0, g: 0, b: 0, a: 1 });
|
|
733
733
|
mt(() => {
|
|
734
|
-
const
|
|
735
|
-
|
|
734
|
+
const j = Le(t);
|
|
735
|
+
j && m(j);
|
|
736
736
|
}, [t]);
|
|
737
737
|
const h = $(() => {
|
|
738
|
-
n ||
|
|
739
|
-
}, [n]), [
|
|
738
|
+
n || E((j) => !j);
|
|
739
|
+
}, [n]), [g, N] = st(
|
|
740
740
|
t ? t.replace(/^#/, "") : ""
|
|
741
741
|
);
|
|
742
742
|
mt(() => {
|
|
743
|
-
|
|
743
|
+
N(t ? t.replace(/^#/, "") : "");
|
|
744
744
|
}, [t]);
|
|
745
|
-
const
|
|
746
|
-
(
|
|
747
|
-
const I =
|
|
748
|
-
/^[0-9A-Fa-f]*$/.test(I) &&
|
|
745
|
+
const y = $(
|
|
746
|
+
(j) => {
|
|
747
|
+
const I = j.target.value;
|
|
748
|
+
/^[0-9A-Fa-f]*$/.test(I) && N(I);
|
|
749
749
|
},
|
|
750
750
|
[]
|
|
751
|
-
),
|
|
752
|
-
(
|
|
753
|
-
if (
|
|
751
|
+
), P = $(
|
|
752
|
+
(j) => {
|
|
753
|
+
if (j === "" && u) {
|
|
754
754
|
e(void 0);
|
|
755
755
|
return;
|
|
756
756
|
}
|
|
757
|
-
/^[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?$/.test(
|
|
757
|
+
/^[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?$/.test(j) ? e(`#${j}`) : N(t ? t.replace(/^#/, "") : "");
|
|
758
758
|
},
|
|
759
759
|
[e, u, t]
|
|
760
760
|
), D = $(
|
|
761
|
-
(
|
|
762
|
-
|
|
761
|
+
(j) => {
|
|
762
|
+
P(j.target.value);
|
|
763
763
|
},
|
|
764
|
-
[
|
|
765
|
-
),
|
|
766
|
-
(
|
|
767
|
-
|
|
764
|
+
[P]
|
|
765
|
+
), w = $(
|
|
766
|
+
(j) => {
|
|
767
|
+
j.key === "Enter" && (j.preventDefault(), P(j.currentTarget.value), j.currentTarget.blur());
|
|
768
768
|
},
|
|
769
|
-
[
|
|
769
|
+
[P]
|
|
770
770
|
), T = $(
|
|
771
|
-
(
|
|
772
|
-
e(
|
|
771
|
+
(j) => {
|
|
772
|
+
e(j);
|
|
773
773
|
},
|
|
774
774
|
[e]
|
|
775
775
|
), M = $(
|
|
776
|
-
(
|
|
776
|
+
(j, I) => {
|
|
777
777
|
if (I === void 0) return;
|
|
778
|
-
const
|
|
779
|
-
m(
|
|
778
|
+
const C = { ...d, [j]: I };
|
|
779
|
+
m(C), e(cr(C));
|
|
780
780
|
},
|
|
781
781
|
[d, e]
|
|
782
782
|
), G = t ?? "未設定", A = {};
|
|
@@ -802,9 +802,9 @@ const ee = ({
|
|
|
802
802
|
{
|
|
803
803
|
type: "text",
|
|
804
804
|
className: nt.textInput,
|
|
805
|
-
value:
|
|
806
|
-
onChange:
|
|
807
|
-
onKeyDown:
|
|
805
|
+
value: g,
|
|
806
|
+
onChange: y,
|
|
807
|
+
onKeyDown: w,
|
|
808
808
|
onBlur: D,
|
|
809
809
|
disabled: n,
|
|
810
810
|
placeholder: f,
|
|
@@ -816,7 +816,7 @@ const ee = ({
|
|
|
816
816
|
qe,
|
|
817
817
|
{
|
|
818
818
|
isOpen: v,
|
|
819
|
-
onClose: () =>
|
|
819
|
+
onClose: () => E(!1),
|
|
820
820
|
rgba: d,
|
|
821
821
|
onRgbaChange: M,
|
|
822
822
|
onColorSelect: T,
|
|
@@ -833,38 +833,54 @@ const fr = "_container_1n9lj_5", mr = "_valueInput_1n9lj_23", pr = "_unitSelect_
|
|
|
833
833
|
unitSelect: pr
|
|
834
834
|
}, at = (t) => {
|
|
835
835
|
const { value: e, onChange: n, readOnly: s = !1, config: o } = t, l = t.allowedUnits ?? (o == null ? void 0 : o.allowedUnits), i = t.min ?? (o == null ? void 0 : o.min), a = t.max ?? (o == null ? void 0 : o.max), c = t.step ?? (o == null ? void 0 : o.step) ?? 1, u = t.placeholder ?? (o == null ? void 0 : o.placeholder), f = t.width ?? (o == null ? void 0 : o.width), p = t.height ?? (o == null ? void 0 : o.height), x = (e == null ? void 0 : e.unit) ?? (l == null ? void 0 : l[0]), v = $(
|
|
836
|
-
(
|
|
837
|
-
const
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
value: j,
|
|
836
|
+
(g) => {
|
|
837
|
+
const N = g.target.value;
|
|
838
|
+
let y = Number.parseFloat(N);
|
|
839
|
+
if (Number.isNaN(y)) return;
|
|
840
|
+
const P = i ?? 1;
|
|
841
|
+
y < P && (y = P), a !== void 0 && y > a && (y = a), n({
|
|
842
|
+
value: y,
|
|
844
843
|
// 単位が未定ならデフォルト単位(または最初の許可単位)を強制
|
|
845
844
|
unit: (e == null ? void 0 : e.unit) ?? x
|
|
846
845
|
});
|
|
847
846
|
},
|
|
848
847
|
[e, n, x, i, a]
|
|
849
|
-
),
|
|
850
|
-
(
|
|
851
|
-
const
|
|
848
|
+
), E = $(
|
|
849
|
+
(g) => {
|
|
850
|
+
const N = g.target.value;
|
|
851
|
+
if (N === "") return;
|
|
852
|
+
let y = Number.parseFloat(N);
|
|
853
|
+
if (Number.isNaN(y)) return;
|
|
854
|
+
const P = i ?? 1;
|
|
855
|
+
y < P && (y = P, n({
|
|
856
|
+
value: y,
|
|
857
|
+
unit: (e == null ? void 0 : e.unit) ?? x
|
|
858
|
+
})), a !== void 0 && y > a && (y = a, n({
|
|
859
|
+
value: y,
|
|
860
|
+
unit: (e == null ? void 0 : e.unit) ?? x
|
|
861
|
+
}));
|
|
862
|
+
},
|
|
863
|
+
[e, n, x, i, a]
|
|
864
|
+
), _ = $(
|
|
865
|
+
(g) => {
|
|
866
|
+
const N = g.target.value;
|
|
852
867
|
n({
|
|
853
868
|
// 値が未設定ならデフォルト値(例: 1)を入れてオブジェクトを作成
|
|
854
869
|
value: (e == null ? void 0 : e.value) ?? 1,
|
|
855
|
-
unit:
|
|
870
|
+
unit: N
|
|
856
871
|
});
|
|
857
872
|
},
|
|
858
873
|
[e, n]
|
|
859
|
-
),
|
|
860
|
-
return f !== void 0 ?
|
|
874
|
+
), d = (e == null ? void 0 : e.value) ?? "", m = (e == null ? void 0 : e.unit) ?? x ?? "", h = {};
|
|
875
|
+
return f !== void 0 ? h.width = `${f}px` : h.width = "100%", p !== void 0 && (h.height = `${p}px`), /* @__PURE__ */ r.jsxs("div", { className: de.container, style: h, children: [
|
|
861
876
|
/* @__PURE__ */ r.jsx(
|
|
862
877
|
"input",
|
|
863
878
|
{
|
|
864
879
|
type: "number",
|
|
865
880
|
className: de.valueInput,
|
|
866
|
-
value:
|
|
881
|
+
value: d,
|
|
867
882
|
onChange: v,
|
|
883
|
+
onBlur: E,
|
|
868
884
|
placeholder: u,
|
|
869
885
|
min: i ?? 1,
|
|
870
886
|
max: a,
|
|
@@ -877,12 +893,12 @@ const fr = "_container_1n9lj_5", mr = "_valueInput_1n9lj_23", pr = "_unitSelect_
|
|
|
877
893
|
"select",
|
|
878
894
|
{
|
|
879
895
|
className: de.unitSelect,
|
|
880
|
-
value:
|
|
881
|
-
onChange:
|
|
896
|
+
value: m,
|
|
897
|
+
onChange: _,
|
|
882
898
|
disabled: s || !l || l.length <= 1,
|
|
883
|
-
children: l ? l.map((
|
|
899
|
+
children: l ? l.map((g) => /* @__PURE__ */ r.jsx("option", { value: g, children: g }, g)) : (
|
|
884
900
|
// 単位リストがない場合は現在の値を表示
|
|
885
|
-
/* @__PURE__ */ r.jsx("option", { value:
|
|
901
|
+
/* @__PURE__ */ r.jsx("option", { value: m, children: m })
|
|
886
902
|
)
|
|
887
903
|
}
|
|
888
904
|
)
|
|
@@ -984,10 +1000,10 @@ const fr = "_container_1n9lj_5", mr = "_valueInput_1n9lj_23", pr = "_unitSelect_
|
|
|
984
1000
|
config: u,
|
|
985
1001
|
onBlur: f
|
|
986
1002
|
}) => {
|
|
987
|
-
const p = s ?? (u == null ? void 0 : u.placeholder), x = o ?? (u == null ? void 0 : u.maxLength), v = l ?? (u == null ? void 0 : u.multiline) ?? !1,
|
|
1003
|
+
const p = s ?? (u == null ? void 0 : u.placeholder), x = o ?? (u == null ? void 0 : u.maxLength), v = l ?? (u == null ? void 0 : u.multiline) ?? !1, E = i ?? (u == null ? void 0 : u.rows) ?? 3, _ = $(
|
|
988
1004
|
(h) => {
|
|
989
|
-
const
|
|
990
|
-
e(
|
|
1005
|
+
const g = h.target.value;
|
|
1006
|
+
e(g);
|
|
991
1007
|
},
|
|
992
1008
|
[e]
|
|
993
1009
|
), d = {};
|
|
@@ -1002,7 +1018,7 @@ const fr = "_container_1n9lj_5", mr = "_valueInput_1n9lj_23", pr = "_unitSelect_
|
|
|
1002
1018
|
placeholder: p,
|
|
1003
1019
|
maxLength: x
|
|
1004
1020
|
};
|
|
1005
|
-
return v ? /* @__PURE__ */ r.jsx("textarea", { ...m, rows:
|
|
1021
|
+
return v ? /* @__PURE__ */ r.jsx("textarea", { ...m, rows: E }) : /* @__PURE__ */ r.jsx("input", { ...m, type: "text", onBlur: f });
|
|
1006
1022
|
};
|
|
1007
1023
|
Yt.displayName = "TextInput";
|
|
1008
1024
|
const Ai = ["mm", "cm", "fr", "inch", "pt", "px", "%"], Mi = ["mm", "cm", "pt", "inch", "px"], Pi = ["mm", "cm", "inch"], Li = ["mm", "cm", "fr", "inch", "pt", "px"], Nr = ["px", "pt", "mm"], Ir = ["px", "pt", "mm"], Ot = ["mm", "pt", "px", "%"], Ce = ["mm", "cm", "inch", "pt", "px", "%"], $r = {
|
|
@@ -1642,7 +1658,7 @@ const Br = F(
|
|
|
1642
1658
|
dpi: l = H,
|
|
1643
1659
|
className: i = ""
|
|
1644
1660
|
}) => {
|
|
1645
|
-
const a =
|
|
1661
|
+
const a = L(() => {
|
|
1646
1662
|
if (e)
|
|
1647
1663
|
return new zt(e);
|
|
1648
1664
|
}, [e]);
|
|
@@ -1719,7 +1735,7 @@ const Br = F(
|
|
|
1719
1735
|
dpi: l = H,
|
|
1720
1736
|
className: i = ""
|
|
1721
1737
|
}) => {
|
|
1722
|
-
const a =
|
|
1738
|
+
const a = L(() => {
|
|
1723
1739
|
if (s)
|
|
1724
1740
|
return new zt(s);
|
|
1725
1741
|
}, [s]);
|
|
@@ -1767,13 +1783,13 @@ const Br = F(
|
|
|
1767
1783
|
validationState: p,
|
|
1768
1784
|
className: x = ""
|
|
1769
1785
|
}, v) => {
|
|
1770
|
-
const
|
|
1786
|
+
const E = dt(null);
|
|
1771
1787
|
ye(
|
|
1772
1788
|
v,
|
|
1773
1789
|
() => ({
|
|
1774
1790
|
focus: () => {
|
|
1775
|
-
var
|
|
1776
|
-
return (
|
|
1791
|
+
var g;
|
|
1792
|
+
return (g = E.current) == null ? void 0 : g.focus();
|
|
1777
1793
|
}
|
|
1778
1794
|
}),
|
|
1779
1795
|
[]
|
|
@@ -1809,7 +1825,7 @@ const Br = F(
|
|
|
1809
1825
|
"data-testid": "block-renderer",
|
|
1810
1826
|
"data-block-id": t,
|
|
1811
1827
|
"data-plugin-kind": e.kind,
|
|
1812
|
-
children: /* @__PURE__ */ r.jsx(h, { ref:
|
|
1828
|
+
children: /* @__PURE__ */ r.jsx(h, { ref: E, ...m })
|
|
1813
1829
|
}
|
|
1814
1830
|
);
|
|
1815
1831
|
}, Yr = te(Wr), se = F(
|
|
@@ -1848,13 +1864,13 @@ const nn = F(
|
|
|
1848
1864
|
defaultGuideBorder: p = Ne,
|
|
1849
1865
|
dpi: x = H,
|
|
1850
1866
|
className: v = "",
|
|
1851
|
-
pointerEvents:
|
|
1867
|
+
pointerEvents: E = "none"
|
|
1852
1868
|
}, _) => {
|
|
1853
|
-
var h,
|
|
1869
|
+
var h, g, N, y;
|
|
1854
1870
|
const d = en(n, {
|
|
1855
1871
|
zIndex: s,
|
|
1856
|
-
pointerEvents:
|
|
1857
|
-
}), m =
|
|
1872
|
+
pointerEvents: E
|
|
1873
|
+
}), m = L(() => ({
|
|
1858
1874
|
width: n.width,
|
|
1859
1875
|
height: n.height
|
|
1860
1876
|
}), [n.width, n.height]);
|
|
@@ -1874,7 +1890,7 @@ const nn = F(
|
|
|
1874
1890
|
subZIndex: f.bg
|
|
1875
1891
|
}
|
|
1876
1892
|
),
|
|
1877
|
-
c && !((
|
|
1893
|
+
c && !((g = t.style) != null && g.border) && /* @__PURE__ */ r.jsx(
|
|
1878
1894
|
Ur,
|
|
1879
1895
|
{
|
|
1880
1896
|
blockSizePx: m,
|
|
@@ -1894,7 +1910,7 @@ const nn = F(
|
|
|
1894
1910
|
value: l,
|
|
1895
1911
|
onChange: i,
|
|
1896
1912
|
onBlur: a,
|
|
1897
|
-
readOnly: o === pt.EDIT ? ((
|
|
1913
|
+
readOnly: o === pt.EDIT ? ((N = t.behavior) == null ? void 0 : N.readOnly) ?? !1 : !0,
|
|
1898
1914
|
mode: o,
|
|
1899
1915
|
blockSizePx: m,
|
|
1900
1916
|
blockZIndex: s,
|
|
@@ -1906,7 +1922,7 @@ const nn = F(
|
|
|
1906
1922
|
{
|
|
1907
1923
|
blockSizePx: m,
|
|
1908
1924
|
blockZIndex: s,
|
|
1909
|
-
borderStyle: (
|
|
1925
|
+
borderStyle: (y = t.style) == null ? void 0 : y.border,
|
|
1910
1926
|
subZIndex: f.border,
|
|
1911
1927
|
visible: u,
|
|
1912
1928
|
dpi: x
|
|
@@ -1941,7 +1957,7 @@ const ie = F(
|
|
|
1941
1957
|
dpi: x = H,
|
|
1942
1958
|
className: v = ""
|
|
1943
1959
|
}) => {
|
|
1944
|
-
const
|
|
1960
|
+
const E = dt(/* @__PURE__ */ new Map()), _ = {
|
|
1945
1961
|
position: "absolute",
|
|
1946
1962
|
inset: 0,
|
|
1947
1963
|
pointerEvents: "none"
|
|
@@ -1949,22 +1965,22 @@ const ie = F(
|
|
|
1949
1965
|
return /* @__PURE__ */ r.jsx("div", { className: v, style: _, "data-testid": "block-layer", children: t.map((d, m) => {
|
|
1950
1966
|
const h = e[d.kind];
|
|
1951
1967
|
if (!h) return null;
|
|
1952
|
-
const
|
|
1953
|
-
let
|
|
1954
|
-
|
|
1955
|
-
const
|
|
1968
|
+
const g = l(d), N = o.includes(d.id);
|
|
1969
|
+
let y = Gr(m);
|
|
1970
|
+
N && (y = V.SELECT_BLOCK);
|
|
1971
|
+
const P = s[d.id] ?? d.initValue;
|
|
1956
1972
|
return /* @__PURE__ */ r.jsx(
|
|
1957
1973
|
nn,
|
|
1958
1974
|
{
|
|
1959
1975
|
ref: (D) => {
|
|
1960
|
-
D ?
|
|
1976
|
+
D ? E.current.set(d.id, D) : E.current.delete(d.id);
|
|
1961
1977
|
},
|
|
1962
1978
|
block: d,
|
|
1963
1979
|
plugin: h,
|
|
1964
|
-
blockRectPx:
|
|
1965
|
-
blockZIndex:
|
|
1980
|
+
blockRectPx: g,
|
|
1981
|
+
blockZIndex: y,
|
|
1966
1982
|
mode: n,
|
|
1967
|
-
value:
|
|
1983
|
+
value: P,
|
|
1968
1984
|
onValueChange: i ? (D) => i(d.id, D) : void 0,
|
|
1969
1985
|
onValueBlur: (D) => a == null ? void 0 : a(d.id, D),
|
|
1970
1986
|
showGuides: c,
|
|
@@ -1991,7 +2007,7 @@ const zr = F(
|
|
|
1991
2007
|
zIndex: i = V.BORDER_OVERLAY,
|
|
1992
2008
|
className: a = ""
|
|
1993
2009
|
}) => {
|
|
1994
|
-
const c =
|
|
2010
|
+
const c = L(() => {
|
|
1995
2011
|
if (s)
|
|
1996
2012
|
return new zt(s);
|
|
1997
2013
|
}, [s]);
|
|
@@ -2157,7 +2173,7 @@ const rn = F(
|
|
|
2157
2173
|
onChange: i,
|
|
2158
2174
|
onCancel: a
|
|
2159
2175
|
}) => {
|
|
2160
|
-
const [c, u] = st(e.value.toString()), [f, p] = st(e.unit), x = dt(null), v = dt(null),
|
|
2176
|
+
const [c, u] = st(e.value.toString()), [f, p] = st(e.unit), x = dt(null), v = dt(null), E = t === "column" ? {
|
|
2161
2177
|
left: `${o + s}px`,
|
|
2162
2178
|
top: `${l + 24}px`,
|
|
2163
2179
|
transform: "translateX(-50%)"
|
|
@@ -2167,11 +2183,11 @@ const rn = F(
|
|
|
2167
2183
|
transform: "translateY(-50%)"
|
|
2168
2184
|
};
|
|
2169
2185
|
mt(() => {
|
|
2170
|
-
var h,
|
|
2171
|
-
(h = x.current) == null || h.focus(), (
|
|
2186
|
+
var h, g;
|
|
2187
|
+
(h = x.current) == null || h.focus(), (g = x.current) == null || g.select();
|
|
2172
2188
|
}, []), mt(() => {
|
|
2173
|
-
const h = (
|
|
2174
|
-
v.current && !v.current.contains(
|
|
2189
|
+
const h = (g) => {
|
|
2190
|
+
v.current && !v.current.contains(g.target) && a();
|
|
2175
2191
|
};
|
|
2176
2192
|
return document.addEventListener("mousedown", h), () => {
|
|
2177
2193
|
document.removeEventListener("mousedown", h);
|
|
@@ -2183,17 +2199,17 @@ const rn = F(
|
|
|
2183
2199
|
}, d = (h) => {
|
|
2184
2200
|
h.key === "Enter" ? (h.preventDefault(), _()) : h.key === "Escape" && (h.preventDefault(), a());
|
|
2185
2201
|
}, m = (h) => {
|
|
2186
|
-
const
|
|
2187
|
-
p(
|
|
2188
|
-
const
|
|
2189
|
-
u(
|
|
2202
|
+
const g = h.target.value;
|
|
2203
|
+
p(g);
|
|
2204
|
+
const N = lo(n, g);
|
|
2205
|
+
u(N.toString());
|
|
2190
2206
|
};
|
|
2191
2207
|
return /* @__PURE__ */ r.jsxs(
|
|
2192
2208
|
"div",
|
|
2193
2209
|
{
|
|
2194
2210
|
ref: v,
|
|
2195
2211
|
className: qt.editor,
|
|
2196
|
-
style:
|
|
2212
|
+
style: E,
|
|
2197
2213
|
"data-testid": `grid-unit-editor-${t}`,
|
|
2198
2214
|
children: [
|
|
2199
2215
|
/* @__PURE__ */ r.jsx(
|
|
@@ -2298,7 +2314,7 @@ const xe = F(
|
|
|
2298
2314
|
writingMode: "vertical-rl"
|
|
2299
2315
|
}, v = () => {
|
|
2300
2316
|
p(!0);
|
|
2301
|
-
},
|
|
2317
|
+
}, E = (h) => {
|
|
2302
2318
|
u == null || u(t, e, h), p(!1);
|
|
2303
2319
|
}, _ = () => {
|
|
2304
2320
|
p(!1);
|
|
@@ -2334,7 +2350,7 @@ const xe = F(
|
|
|
2334
2350
|
position: s,
|
|
2335
2351
|
marginLeftPx: l,
|
|
2336
2352
|
marginTopPx: i,
|
|
2337
|
-
onChange:
|
|
2353
|
+
onChange: E,
|
|
2338
2354
|
onCancel: _
|
|
2339
2355
|
}
|
|
2340
2356
|
)
|
|
@@ -2362,7 +2378,7 @@ const uo = F(
|
|
|
2362
2378
|
dpi: a = H,
|
|
2363
2379
|
className: c = ""
|
|
2364
2380
|
}) => {
|
|
2365
|
-
const u =
|
|
2381
|
+
const u = L(() => co(
|
|
2366
2382
|
t.cols.slice(1, -1),
|
|
2367
2383
|
t.rows.slice(1, -1),
|
|
2368
2384
|
e.width,
|
|
@@ -2430,16 +2446,16 @@ const uo = F(
|
|
|
2430
2446
|
height: `${f}px`,
|
|
2431
2447
|
cursor: "row-resize"
|
|
2432
2448
|
}, v = $(
|
|
2433
|
-
(
|
|
2434
|
-
|
|
2435
|
-
const _ = t === "column" ?
|
|
2449
|
+
(E) => {
|
|
2450
|
+
E.stopPropagation(), E.preventDefault();
|
|
2451
|
+
const _ = t === "column" ? E.clientX : E.clientY;
|
|
2436
2452
|
u(!0), l == null || l(t, e);
|
|
2437
2453
|
const d = (h) => {
|
|
2438
|
-
const
|
|
2439
|
-
i == null || i(t, e,
|
|
2454
|
+
const N = (t === "column" ? h.clientX : h.clientY) - _;
|
|
2455
|
+
i == null || i(t, e, N);
|
|
2440
2456
|
}, m = (h) => {
|
|
2441
|
-
const
|
|
2442
|
-
u(!1), a == null || a(t, e,
|
|
2457
|
+
const N = (t === "column" ? h.clientX : h.clientY) - _;
|
|
2458
|
+
u(!1), a == null || a(t, e, N), window.removeEventListener("pointermove", d), window.removeEventListener("pointerup", m);
|
|
2443
2459
|
};
|
|
2444
2460
|
window.addEventListener("pointermove", d), window.addEventListener("pointerup", m);
|
|
2445
2461
|
},
|
|
@@ -2559,87 +2575,87 @@ const mo = F(
|
|
|
2559
2575
|
showResizeHandles: p = !1,
|
|
2560
2576
|
showDimensionLabels: x = !1,
|
|
2561
2577
|
onGridResize: v,
|
|
2562
|
-
onDimensionChange:
|
|
2578
|
+
onDimensionChange: E,
|
|
2563
2579
|
className: _ = "",
|
|
2564
2580
|
zIndex: d = {}
|
|
2565
2581
|
}) => {
|
|
2566
|
-
const [m, h] = st(null), [
|
|
2582
|
+
const [m, h] = st(null), [g, N] = st(null), [y, P] = st(
|
|
2567
2583
|
null
|
|
2568
2584
|
), D = dt(null);
|
|
2569
2585
|
mt(() => {
|
|
2570
|
-
const
|
|
2586
|
+
const j = (C) => {
|
|
2571
2587
|
if (!D.current) return;
|
|
2572
2588
|
const S = D.current.getBoundingClientRect();
|
|
2573
|
-
|
|
2574
|
-
x:
|
|
2575
|
-
y:
|
|
2589
|
+
P({
|
|
2590
|
+
x: C.clientX - S.left,
|
|
2591
|
+
y: C.clientY - S.top
|
|
2576
2592
|
});
|
|
2577
|
-
}, I = (
|
|
2593
|
+
}, I = (C) => {
|
|
2578
2594
|
if (!D.current) return;
|
|
2579
2595
|
const S = D.current.getBoundingClientRect();
|
|
2580
|
-
(
|
|
2596
|
+
(C.clientX < S.left || C.clientX > S.right || C.clientY < S.top || C.clientY > S.bottom) && P(null);
|
|
2581
2597
|
};
|
|
2582
|
-
return window.addEventListener("mousemove",
|
|
2583
|
-
window.removeEventListener("mousemove",
|
|
2598
|
+
return window.addEventListener("mousemove", j), window.addEventListener("mouseleave", I), () => {
|
|
2599
|
+
window.removeEventListener("mousemove", j), window.removeEventListener("mouseleave", I);
|
|
2584
2600
|
};
|
|
2585
2601
|
}, []);
|
|
2586
|
-
const
|
|
2587
|
-
if (!
|
|
2588
|
-
const
|
|
2589
|
-
return !(
|
|
2590
|
-
}, [
|
|
2591
|
-
(
|
|
2592
|
-
|
|
2602
|
+
const w = L(() => {
|
|
2603
|
+
if (!y) return !1;
|
|
2604
|
+
const j = t.content.width, I = t.content.height, C = t.margin.left, S = t.margin.top;
|
|
2605
|
+
return !(y.x >= C && y.x <= C + j && y.y >= S && y.y <= S + I);
|
|
2606
|
+
}, [y, t]), T = $(
|
|
2607
|
+
(j, I) => {
|
|
2608
|
+
N({ direction: j, index: I });
|
|
2593
2609
|
},
|
|
2594
2610
|
[]
|
|
2595
|
-
), M =
|
|
2596
|
-
if (!m || !
|
|
2597
|
-
const
|
|
2611
|
+
), M = L(() => {
|
|
2612
|
+
if (!m || !g) return null;
|
|
2613
|
+
const j = g.direction === "column" ? e.cols : e.rows, I = g.index, C = j[I - 1], S = m.position, Y = C !== void 0 ? S - C : 0, X = m.position, q = j[I + 1], b = q !== void 0 ? q - X : 0;
|
|
2598
2614
|
return {
|
|
2599
|
-
direction:
|
|
2615
|
+
direction: g.direction,
|
|
2600
2616
|
prevIndex: I - 1,
|
|
2601
2617
|
prevSize: Y,
|
|
2602
2618
|
nextIndex: I,
|
|
2603
2619
|
nextSize: b
|
|
2604
2620
|
};
|
|
2605
|
-
}, [m,
|
|
2606
|
-
(
|
|
2607
|
-
const S =
|
|
2621
|
+
}, [m, g, e]), G = $(
|
|
2622
|
+
(j, I, C) => {
|
|
2623
|
+
const S = j === "column" ? e.cols : e.rows, Y = S[I];
|
|
2608
2624
|
if (Y === void 0) return;
|
|
2609
2625
|
const X = S[I - 1], q = S[I + 1], b = 10;
|
|
2610
|
-
let R =
|
|
2626
|
+
let R = C;
|
|
2611
2627
|
if (X !== void 0) {
|
|
2612
|
-
const
|
|
2613
|
-
R = Math.max(R,
|
|
2628
|
+
const O = X + b - Y;
|
|
2629
|
+
R = Math.max(R, O);
|
|
2614
2630
|
}
|
|
2615
2631
|
if (q !== void 0) {
|
|
2616
|
-
const
|
|
2617
|
-
R = Math.min(R,
|
|
2632
|
+
const O = q - b - Y;
|
|
2633
|
+
R = Math.min(R, O);
|
|
2618
2634
|
}
|
|
2619
2635
|
h({
|
|
2620
|
-
direction:
|
|
2636
|
+
direction: j,
|
|
2621
2637
|
position: Y + R
|
|
2622
2638
|
});
|
|
2623
2639
|
},
|
|
2624
2640
|
[e]
|
|
2625
2641
|
), A = $(
|
|
2626
|
-
(
|
|
2627
|
-
const S =
|
|
2642
|
+
(j, I, C) => {
|
|
2643
|
+
const S = j === "column" ? e.cols : e.rows, Y = S[I];
|
|
2628
2644
|
if (Y === void 0) {
|
|
2629
2645
|
h(null);
|
|
2630
2646
|
return;
|
|
2631
2647
|
}
|
|
2632
2648
|
const X = S[I - 1], q = S[I + 1], b = 10;
|
|
2633
|
-
let R =
|
|
2649
|
+
let R = C;
|
|
2634
2650
|
if (X !== void 0) {
|
|
2635
|
-
const
|
|
2636
|
-
R = Math.max(R,
|
|
2651
|
+
const O = X + b - Y;
|
|
2652
|
+
R = Math.max(R, O);
|
|
2637
2653
|
}
|
|
2638
2654
|
if (q !== void 0) {
|
|
2639
|
-
const
|
|
2640
|
-
R = Math.min(R,
|
|
2655
|
+
const O = q - b - Y;
|
|
2656
|
+
R = Math.min(R, O);
|
|
2641
2657
|
}
|
|
2642
|
-
h(null),
|
|
2658
|
+
h(null), N(null), v == null || v(j, I, R);
|
|
2643
2659
|
},
|
|
2644
2660
|
[e, v]
|
|
2645
2661
|
), k = {
|
|
@@ -2696,87 +2712,87 @@ const mo = F(
|
|
|
2696
2712
|
}
|
|
2697
2713
|
),
|
|
2698
2714
|
p && v && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
2699
|
-
e.cols.map((
|
|
2715
|
+
e.cols.map((j, I) => {
|
|
2700
2716
|
if (I === 0 || I === e.cols.length - 1)
|
|
2701
2717
|
return null;
|
|
2702
|
-
const
|
|
2718
|
+
const C = `col-${I}`;
|
|
2703
2719
|
return /* @__PURE__ */ r.jsx(
|
|
2704
2720
|
ve,
|
|
2705
2721
|
{
|
|
2706
2722
|
direction: "column",
|
|
2707
2723
|
index: I,
|
|
2708
|
-
position:
|
|
2724
|
+
position: j,
|
|
2709
2725
|
marginLeftPx: t.margin.left,
|
|
2710
2726
|
marginTopPx: t.margin.top,
|
|
2711
2727
|
onResizeStart: T,
|
|
2712
2728
|
onResize: G,
|
|
2713
2729
|
onResizeEnd: A
|
|
2714
2730
|
},
|
|
2715
|
-
|
|
2731
|
+
C
|
|
2716
2732
|
);
|
|
2717
2733
|
}),
|
|
2718
|
-
e.rows.map((
|
|
2734
|
+
e.rows.map((j, I) => {
|
|
2719
2735
|
if (I === 0 || I === e.rows.length - 1)
|
|
2720
2736
|
return null;
|
|
2721
|
-
const
|
|
2737
|
+
const C = `row-${I}`;
|
|
2722
2738
|
return /* @__PURE__ */ r.jsx(
|
|
2723
2739
|
ve,
|
|
2724
2740
|
{
|
|
2725
2741
|
direction: "row",
|
|
2726
2742
|
index: I,
|
|
2727
|
-
position:
|
|
2743
|
+
position: j,
|
|
2728
2744
|
marginLeftPx: t.margin.left,
|
|
2729
2745
|
marginTopPx: t.margin.top,
|
|
2730
2746
|
onResizeStart: T,
|
|
2731
2747
|
onResize: G,
|
|
2732
2748
|
onResizeEnd: A
|
|
2733
2749
|
},
|
|
2734
|
-
|
|
2750
|
+
C
|
|
2735
2751
|
);
|
|
2736
2752
|
})
|
|
2737
2753
|
] }),
|
|
2738
2754
|
x && n && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
2739
|
-
n.cols.map((
|
|
2740
|
-
const
|
|
2741
|
-
if (
|
|
2742
|
-
const Y = (
|
|
2755
|
+
n.cols.map((j, I) => {
|
|
2756
|
+
const C = e.cols[I], S = e.cols[I + 1];
|
|
2757
|
+
if (C === void 0 || S === void 0) return null;
|
|
2758
|
+
const Y = (g == null ? void 0 : g.direction) === "column" && (g.index === I || g.index === I + 1);
|
|
2743
2759
|
let X;
|
|
2744
2760
|
M && M.direction === "column" && (M.prevIndex === I ? X = M.prevSize : M.nextIndex === I && (X = M.nextSize));
|
|
2745
|
-
const q = (
|
|
2761
|
+
const q = (C + S) / 2, b = S - C, R = `col-dim-${I}`;
|
|
2746
2762
|
return /* @__PURE__ */ r.jsx(
|
|
2747
2763
|
xe,
|
|
2748
2764
|
{
|
|
2749
2765
|
direction: "column",
|
|
2750
2766
|
index: I,
|
|
2751
|
-
dimension:
|
|
2767
|
+
dimension: j,
|
|
2752
2768
|
position: q,
|
|
2753
2769
|
currentPxSize: b,
|
|
2754
2770
|
marginLeftPx: t.margin.left,
|
|
2755
2771
|
marginTopPx: t.margin.top,
|
|
2756
|
-
isNearCursor:
|
|
2772
|
+
isNearCursor: w || Y,
|
|
2757
2773
|
resizingPxSize: X,
|
|
2758
|
-
onDimensionChange:
|
|
2774
|
+
onDimensionChange: E
|
|
2759
2775
|
},
|
|
2760
2776
|
R
|
|
2761
2777
|
);
|
|
2762
2778
|
}),
|
|
2763
2779
|
" ",
|
|
2764
|
-
n.rows.map((
|
|
2765
|
-
const
|
|
2766
|
-
if (
|
|
2767
|
-
const Y = (
|
|
2780
|
+
n.rows.map((j, I) => {
|
|
2781
|
+
const C = e.rows[I], S = e.rows[I + 1];
|
|
2782
|
+
if (C === void 0 || S === void 0) return null;
|
|
2783
|
+
const Y = (g == null ? void 0 : g.direction) === "row" && (g.index === I || g.index === I + 1), X = (C + S) / 2, q = S - C, b = `row-dim-${I}`;
|
|
2768
2784
|
return /* @__PURE__ */ r.jsx(
|
|
2769
2785
|
xe,
|
|
2770
2786
|
{
|
|
2771
2787
|
direction: "row",
|
|
2772
2788
|
index: I,
|
|
2773
|
-
dimension:
|
|
2789
|
+
dimension: j,
|
|
2774
2790
|
position: X,
|
|
2775
2791
|
currentPxSize: q,
|
|
2776
2792
|
marginLeftPx: t.margin.left,
|
|
2777
2793
|
marginTopPx: t.margin.top,
|
|
2778
|
-
isNearCursor:
|
|
2779
|
-
onDimensionChange:
|
|
2794
|
+
isNearCursor: w || Y,
|
|
2795
|
+
onDimensionChange: E
|
|
2780
2796
|
},
|
|
2781
2797
|
b
|
|
2782
2798
|
);
|
|
@@ -2875,7 +2891,7 @@ function xo(t, e, n, s) {
|
|
|
2875
2891
|
const o = t[e], l = t[e + 1];
|
|
2876
2892
|
if (!o || !l) return t;
|
|
2877
2893
|
const i = t.reduce(
|
|
2878
|
-
(
|
|
2894
|
+
(E, _) => _.unit === "fr" ? E + _.value : E,
|
|
2879
2895
|
0
|
|
2880
2896
|
), a = s / i, c = o.value * a, u = l.value * a, f = Math.max(10, c + n), p = Math.max(10, u - n), x = f / a, v = p / a;
|
|
2881
2897
|
return t[e] = {
|
|
@@ -2911,7 +2927,7 @@ function Se(t, e, n, s, o) {
|
|
|
2911
2927
|
...i,
|
|
2912
2928
|
value: Qt(x, i.unit)
|
|
2913
2929
|
};
|
|
2914
|
-
const v = x - p,
|
|
2930
|
+
const v = x - p, E = u - v, _ = l.value * f, d = Math.max(10, _ + n), m = a > 0 ? d / E * a : 1;
|
|
2915
2931
|
t[e] = {
|
|
2916
2932
|
...l,
|
|
2917
2933
|
value: Math.round(m * 100) / 100
|
|
@@ -2922,7 +2938,7 @@ function Se(t, e, n, s, o) {
|
|
|
2922
2938
|
...l,
|
|
2923
2939
|
value: Qt(x, l.unit)
|
|
2924
2940
|
};
|
|
2925
|
-
const v = x - p,
|
|
2941
|
+
const v = x - p, E = u - v, _ = i.value * f, d = Math.max(10, _ - n), m = a > 0 ? d / E * a : 1;
|
|
2926
2942
|
t[e + 1] = {
|
|
2927
2943
|
...i,
|
|
2928
2944
|
value: Math.round(m * 100) / 100
|
|
@@ -3301,7 +3317,7 @@ const Co = F(
|
|
|
3301
3317
|
zIndex: n = V.BLOCK_SELECT_BORDER,
|
|
3302
3318
|
borderStyle: s = le
|
|
3303
3319
|
}) => {
|
|
3304
|
-
const o =
|
|
3320
|
+
const o = L(() => new zt(s), [s]), l = {
|
|
3305
3321
|
position: "absolute",
|
|
3306
3322
|
inset: 0,
|
|
3307
3323
|
pointerEvents: "none",
|
|
@@ -3395,15 +3411,15 @@ const an = F(
|
|
|
3395
3411
|
height: d.height
|
|
3396
3412
|
};
|
|
3397
3413
|
} else {
|
|
3398
|
-
const _ = e.cols - i.w, d = e.rows - i.h, m = Math.max(0, Math.min(s.col, _)), h = Math.max(0, Math.min(s.row, d)),
|
|
3414
|
+
const _ = e.cols - i.w, d = e.rows - i.h, m = Math.max(0, Math.min(s.col, _)), h = Math.max(0, Math.min(s.row, d)), g = At(x, {
|
|
3399
3415
|
x: m,
|
|
3400
3416
|
y: h,
|
|
3401
3417
|
w: i.w,
|
|
3402
3418
|
h: i.h
|
|
3403
3419
|
});
|
|
3404
|
-
v = n(
|
|
3420
|
+
v = n(g);
|
|
3405
3421
|
}
|
|
3406
|
-
const
|
|
3422
|
+
const E = At(x, {
|
|
3407
3423
|
x: 0,
|
|
3408
3424
|
y: 0,
|
|
3409
3425
|
w: i.w,
|
|
@@ -3435,10 +3451,10 @@ const an = F(
|
|
|
3435
3451
|
children: /* @__PURE__ */ r.jsx(
|
|
3436
3452
|
se,
|
|
3437
3453
|
{
|
|
3438
|
-
id:
|
|
3454
|
+
id: E.id,
|
|
3439
3455
|
plugin: x,
|
|
3440
|
-
props:
|
|
3441
|
-
value:
|
|
3456
|
+
props: E.props,
|
|
3457
|
+
value: E.initValue,
|
|
3442
3458
|
onChange: () => {
|
|
3443
3459
|
},
|
|
3444
3460
|
readOnly: !0,
|
|
@@ -3452,7 +3468,7 @@ const an = F(
|
|
|
3452
3468
|
/* @__PURE__ */ r.jsx(
|
|
3453
3469
|
Ht,
|
|
3454
3470
|
{
|
|
3455
|
-
block:
|
|
3471
|
+
block: E,
|
|
3456
3472
|
rect: v,
|
|
3457
3473
|
selectionStyle: c,
|
|
3458
3474
|
selectBorderZIndex: f,
|
|
@@ -3471,10 +3487,10 @@ function cn(t, e, n, s, o) {
|
|
|
3471
3487
|
if (t.length === 1) {
|
|
3472
3488
|
const m = t[0];
|
|
3473
3489
|
if (!m) return [];
|
|
3474
|
-
const h = s - m.layout.w,
|
|
3475
|
-
return [{ blockId: m.id, x:
|
|
3490
|
+
const h = s - m.layout.w, g = o - m.layout.h, N = Math.max(0, Math.min(m.layout.x + e, h)), y = Math.max(0, Math.min(m.layout.y + n, g));
|
|
3491
|
+
return [{ blockId: m.id, x: N, y }];
|
|
3476
3492
|
}
|
|
3477
|
-
const l = Math.min(...t.map((m) => m.layout.x)), i = Math.min(...t.map((m) => m.layout.y)), a = Math.max(...t.map((m) => m.layout.x + m.layout.w)), c = Math.max(...t.map((m) => m.layout.y + m.layout.h)), u = a - l, f = c - i, p = l + e, x = i + n, v = Math.max(0, Math.min(p, s - u)),
|
|
3493
|
+
const l = Math.min(...t.map((m) => m.layout.x)), i = Math.min(...t.map((m) => m.layout.y)), a = Math.max(...t.map((m) => m.layout.x + m.layout.w)), c = Math.max(...t.map((m) => m.layout.y + m.layout.h)), u = a - l, f = c - i, p = l + e, x = i + n, v = Math.max(0, Math.min(p, s - u)), E = Math.max(0, Math.min(x, o - f)), _ = v - l, d = E - i;
|
|
3478
3494
|
return t.map((m) => ({
|
|
3479
3495
|
blockId: m.id,
|
|
3480
3496
|
x: m.layout.x + _,
|
|
@@ -3497,7 +3513,7 @@ const un = F(
|
|
|
3497
3513
|
selectBorderZIndex: p = rt.select_border,
|
|
3498
3514
|
blockHandlesZIndex: x = rt.block_handles
|
|
3499
3515
|
}) => {
|
|
3500
|
-
const v = o.map((_) => t.find((d) => d.id === _)).filter(Boolean),
|
|
3516
|
+
const v = o.map((_) => t.find((d) => d.id === _)).filter(Boolean), E = cn(
|
|
3501
3517
|
v,
|
|
3502
3518
|
l,
|
|
3503
3519
|
i,
|
|
@@ -3514,35 +3530,35 @@ const un = F(
|
|
|
3514
3530
|
pointerEvents: "none"
|
|
3515
3531
|
},
|
|
3516
3532
|
children: o.map((_) => {
|
|
3517
|
-
const d = t.find((
|
|
3533
|
+
const d = t.find((N) => N.id === _);
|
|
3518
3534
|
if (!d) return null;
|
|
3519
3535
|
const m = e[d.kind];
|
|
3520
3536
|
if (!m) return null;
|
|
3521
3537
|
let h;
|
|
3522
3538
|
if (a && c) {
|
|
3523
|
-
const
|
|
3539
|
+
const N = s(d);
|
|
3524
3540
|
h = {
|
|
3525
|
-
left: c.x -
|
|
3526
|
-
top: c.y -
|
|
3527
|
-
width:
|
|
3528
|
-
height:
|
|
3541
|
+
left: c.x - N.width / 2,
|
|
3542
|
+
top: c.y - N.height / 2,
|
|
3543
|
+
width: N.width,
|
|
3544
|
+
height: N.height
|
|
3529
3545
|
};
|
|
3530
3546
|
} else {
|
|
3531
|
-
const
|
|
3532
|
-
(
|
|
3547
|
+
const N = E.find(
|
|
3548
|
+
(P) => P.blockId === d.id
|
|
3533
3549
|
);
|
|
3534
|
-
if (!
|
|
3535
|
-
const
|
|
3550
|
+
if (!N) return null;
|
|
3551
|
+
const y = {
|
|
3536
3552
|
...d,
|
|
3537
3553
|
layout: {
|
|
3538
3554
|
...d.layout,
|
|
3539
|
-
x:
|
|
3540
|
-
y:
|
|
3555
|
+
x: N.x,
|
|
3556
|
+
y: N.y
|
|
3541
3557
|
}
|
|
3542
3558
|
};
|
|
3543
|
-
h = s(
|
|
3559
|
+
h = s(y);
|
|
3544
3560
|
}
|
|
3545
|
-
const
|
|
3561
|
+
const g = {
|
|
3546
3562
|
...d,
|
|
3547
3563
|
layout: {
|
|
3548
3564
|
...d.layout,
|
|
@@ -3567,10 +3583,10 @@ const un = F(
|
|
|
3567
3583
|
children: /* @__PURE__ */ r.jsx(
|
|
3568
3584
|
se,
|
|
3569
3585
|
{
|
|
3570
|
-
id:
|
|
3586
|
+
id: g.id,
|
|
3571
3587
|
plugin: m,
|
|
3572
|
-
props:
|
|
3573
|
-
value:
|
|
3588
|
+
props: g.props,
|
|
3589
|
+
value: g.initValue,
|
|
3574
3590
|
onChange: () => {
|
|
3575
3591
|
},
|
|
3576
3592
|
readOnly: !0,
|
|
@@ -3585,7 +3601,7 @@ const un = F(
|
|
|
3585
3601
|
/* @__PURE__ */ r.jsx(
|
|
3586
3602
|
Ht,
|
|
3587
3603
|
{
|
|
3588
|
-
block:
|
|
3604
|
+
block: g,
|
|
3589
3605
|
rect: h,
|
|
3590
3606
|
selectionStyle: u,
|
|
3591
3607
|
selectBorderZIndex: p,
|
|
@@ -3640,8 +3656,8 @@ const hn = F(
|
|
|
3640
3656
|
selectBorderZIndex: p = rt.select_border,
|
|
3641
3657
|
blockHandlesZIndex: x = rt.block_handles
|
|
3642
3658
|
}) => {
|
|
3643
|
-
const v = t.find((h) => h.id === o),
|
|
3644
|
-
if (!v || !
|
|
3659
|
+
const v = t.find((h) => h.id === o), E = e[(v == null ? void 0 : v.kind) ?? ""];
|
|
3660
|
+
if (!v || !E) return null;
|
|
3645
3661
|
const _ = dn({
|
|
3646
3662
|
layout: v.layout,
|
|
3647
3663
|
handle: l,
|
|
@@ -3680,7 +3696,7 @@ const hn = F(
|
|
|
3680
3696
|
se,
|
|
3681
3697
|
{
|
|
3682
3698
|
id: d.id,
|
|
3683
|
-
plugin:
|
|
3699
|
+
plugin: E,
|
|
3684
3700
|
props: d.props,
|
|
3685
3701
|
value: d.initValue,
|
|
3686
3702
|
onChange: () => {
|
|
@@ -3823,7 +3839,7 @@ const Oo = ({
|
|
|
3823
3839
|
}), v = {
|
|
3824
3840
|
width: i.width,
|
|
3825
3841
|
height: i.height
|
|
3826
|
-
},
|
|
3842
|
+
}, E = {
|
|
3827
3843
|
id: t,
|
|
3828
3844
|
props: n,
|
|
3829
3845
|
value: s,
|
|
@@ -3847,7 +3863,7 @@ const Oo = ({
|
|
|
3847
3863
|
"data-testid": "editing-block",
|
|
3848
3864
|
"data-block-id": t,
|
|
3849
3865
|
"data-plugin-kind": e.kind,
|
|
3850
|
-
children: /* @__PURE__ */ r.jsx(_, { ref: p, ...
|
|
3866
|
+
children: /* @__PURE__ */ r.jsx(_, { ref: p, ...E })
|
|
3851
3867
|
}
|
|
3852
3868
|
);
|
|
3853
3869
|
}, So = te(Oo), ko = F(
|
|
@@ -4070,19 +4086,19 @@ const pn = F(
|
|
|
4070
4086
|
selectionStyle: p,
|
|
4071
4087
|
handleStyle: x,
|
|
4072
4088
|
editBlockZIndex: v = V.EDIT_BLOCK,
|
|
4073
|
-
selectBorderZIndex:
|
|
4089
|
+
selectBorderZIndex: E = rt.select_border,
|
|
4074
4090
|
blockHandlesZIndex: _ = rt.block_handles,
|
|
4075
4091
|
dragGhostZIndex: d = rt.block_ghost
|
|
4076
4092
|
}) => {
|
|
4077
4093
|
const m = dt(null), h = dt(null);
|
|
4078
4094
|
mt(() => {
|
|
4079
4095
|
i.mode === W.EDITING && i.editingBlockId && setTimeout(() => {
|
|
4080
|
-
var
|
|
4081
|
-
(
|
|
4096
|
+
var w;
|
|
4097
|
+
(w = h.current) == null || w.focus();
|
|
4082
4098
|
}, 0);
|
|
4083
4099
|
}, [i.mode, i.editingBlockId]), mt(() => {
|
|
4084
|
-
const
|
|
4085
|
-
(M) =>
|
|
4100
|
+
const w = new Set(t.map((M) => M.id)), T = i.selectedBlockIds.filter(
|
|
4101
|
+
(M) => w.has(M)
|
|
4086
4102
|
);
|
|
4087
4103
|
T.length !== i.selectedBlockIds.length && a({
|
|
4088
4104
|
type: B.SELECT,
|
|
@@ -4090,25 +4106,25 @@ const pn = F(
|
|
|
4090
4106
|
shiftKey: !1
|
|
4091
4107
|
});
|
|
4092
4108
|
}, [t, i.selectedBlockIds, a]);
|
|
4093
|
-
const
|
|
4094
|
-
(
|
|
4109
|
+
const g = $(
|
|
4110
|
+
(w) => {
|
|
4095
4111
|
var I;
|
|
4096
|
-
if (
|
|
4112
|
+
if (w.button !== 0) return;
|
|
4097
4113
|
const T = (I = m.current) == null ? void 0 : I.getBoundingClientRect();
|
|
4098
4114
|
if (!T) return;
|
|
4099
4115
|
const M = u ?? 1, G = {
|
|
4100
|
-
x: (
|
|
4101
|
-
y: (
|
|
4116
|
+
x: (w.clientX - T.left) / M,
|
|
4117
|
+
y: (w.clientY - T.top) / M
|
|
4102
4118
|
}, A = He(G, t, s);
|
|
4103
4119
|
if (i.mode === W.EDITING) {
|
|
4104
4120
|
A !== i.editingBlockId && (a({ type: B.END_EDIT }), A || a({ type: B.DESELECT }));
|
|
4105
4121
|
return;
|
|
4106
4122
|
}
|
|
4107
|
-
const k = o(G.x),
|
|
4123
|
+
const k = o(G.x), j = l(G.y);
|
|
4108
4124
|
if (A) {
|
|
4109
|
-
|
|
4110
|
-
const
|
|
4111
|
-
if (
|
|
4125
|
+
w.stopPropagation();
|
|
4126
|
+
const C = i.selectedBlockIds.includes(A);
|
|
4127
|
+
if (C && w.shiftKey) {
|
|
4112
4128
|
const S = i.selectedBlockIds.filter(
|
|
4113
4129
|
(Y) => Y !== A
|
|
4114
4130
|
);
|
|
@@ -4118,13 +4134,13 @@ const pn = F(
|
|
|
4118
4134
|
shiftKey: !0
|
|
4119
4135
|
});
|
|
4120
4136
|
return;
|
|
4121
|
-
} else
|
|
4137
|
+
} else C ? (w.currentTarget.setPointerCapture(w.pointerId), a({
|
|
4122
4138
|
type: B.START_PRESS,
|
|
4123
4139
|
blockId: A,
|
|
4124
|
-
startGrid: { col: k, row:
|
|
4140
|
+
startGrid: { col: k, row: j },
|
|
4125
4141
|
// 複数選択時は全選択ブロックを移動対象にする
|
|
4126
4142
|
selectedBlockIds: i.selectedBlockIds
|
|
4127
|
-
})) : (
|
|
4143
|
+
})) : (w.currentTarget.setPointerCapture(w.pointerId), w.shiftKey ? a({
|
|
4128
4144
|
type: B.SELECT,
|
|
4129
4145
|
blockIds: [...i.selectedBlockIds, A],
|
|
4130
4146
|
shiftKey: !0
|
|
@@ -4134,11 +4150,11 @@ const pn = F(
|
|
|
4134
4150
|
}), a({
|
|
4135
4151
|
type: B.START_PRESS,
|
|
4136
4152
|
blockId: A,
|
|
4137
|
-
startGrid: { col: k, row:
|
|
4153
|
+
startGrid: { col: k, row: j },
|
|
4138
4154
|
selectedBlockIds: [A]
|
|
4139
4155
|
})));
|
|
4140
4156
|
} else
|
|
4141
|
-
|
|
4157
|
+
w.stopPropagation(), a({ type: B.DESELECT });
|
|
4142
4158
|
},
|
|
4143
4159
|
[
|
|
4144
4160
|
t,
|
|
@@ -4151,37 +4167,37 @@ const pn = F(
|
|
|
4151
4167
|
u,
|
|
4152
4168
|
i.editingBlockId
|
|
4153
4169
|
]
|
|
4154
|
-
),
|
|
4155
|
-
(
|
|
4170
|
+
), N = $(
|
|
4171
|
+
(w) => {
|
|
4156
4172
|
var q;
|
|
4157
4173
|
if (i.mode !== W.PRESSING && i.mode !== W.DRAGGING || !i.dragging) return;
|
|
4158
4174
|
const T = (q = m.current) == null ? void 0 : q.getBoundingClientRect();
|
|
4159
4175
|
if (!T) return;
|
|
4160
|
-
const M = u ?? 1, G = T.width / M, A = T.height / M, k = (
|
|
4176
|
+
const M = u ?? 1, G = T.width / M, A = T.height / M, k = (w.clientX - T.left) / M, j = (w.clientY - T.top) / M, I = i.dragging.type !== lt.RESIZE && (k < 0 || k > G || j < 0 || j > A), C = Math.max(0, Math.min(k, G)), S = Math.max(0, Math.min(j, A)), Y = o(C), X = l(S);
|
|
4161
4177
|
a({
|
|
4162
4178
|
type: B.UPDATE_DRAG,
|
|
4163
4179
|
currentGrid: { col: Y, row: X },
|
|
4164
|
-
currentMousePx: { x: k, y:
|
|
4180
|
+
currentMousePx: { x: k, y: j },
|
|
4165
4181
|
isOutside: I
|
|
4166
4182
|
});
|
|
4167
4183
|
},
|
|
4168
4184
|
[i.mode, i.dragging, o, l, a, u]
|
|
4169
|
-
),
|
|
4170
|
-
(
|
|
4185
|
+
), y = $(
|
|
4186
|
+
(w) => {
|
|
4171
4187
|
if (i.mode === W.DRAGGING && i.dragging) {
|
|
4172
4188
|
if (i.dragging.isOutside) {
|
|
4173
4189
|
i.dragging.type === lt.MOVE && (c == null || c({
|
|
4174
4190
|
type: ft.DELETE,
|
|
4175
4191
|
blockIds: i.dragging.blockIds
|
|
4176
|
-
}), a({ type: B.DESELECT })), a({ type: B.END_DRAG }),
|
|
4192
|
+
}), a({ type: B.DESELECT })), a({ type: B.END_DRAG }), w.currentTarget.releasePointerCapture(w.pointerId);
|
|
4177
4193
|
return;
|
|
4178
4194
|
}
|
|
4179
4195
|
const T = i.dragging.currentGrid.col - i.dragging.startGrid.col, M = i.dragging.currentGrid.row - i.dragging.startGrid.row;
|
|
4180
4196
|
if (i.dragging.type === lt.MOVE) {
|
|
4181
4197
|
if (T !== 0 || M !== 0) {
|
|
4182
|
-
const G = i.dragging.blockIds.map((
|
|
4198
|
+
const G = i.dragging.blockIds.map((j) => t.find((I) => I.id === j)).filter(Boolean);
|
|
4183
4199
|
if (G.length === 0) {
|
|
4184
|
-
a({ type: B.END_DRAG }),
|
|
4200
|
+
a({ type: B.END_DRAG }), w.currentTarget.releasePointerCapture(w.pointerId);
|
|
4185
4201
|
return;
|
|
4186
4202
|
}
|
|
4187
4203
|
const A = cn(
|
|
@@ -4190,18 +4206,18 @@ const pn = F(
|
|
|
4190
4206
|
M,
|
|
4191
4207
|
n.cols,
|
|
4192
4208
|
n.rows
|
|
4193
|
-
), k = G.map((
|
|
4209
|
+
), k = G.map((j) => {
|
|
4194
4210
|
const I = A.find(
|
|
4195
|
-
(
|
|
4211
|
+
(C) => C.blockId === j.id
|
|
4196
4212
|
);
|
|
4197
4213
|
return I ? {
|
|
4198
|
-
...
|
|
4214
|
+
...j,
|
|
4199
4215
|
layout: {
|
|
4200
|
-
...
|
|
4216
|
+
...j.layout,
|
|
4201
4217
|
x: I.x,
|
|
4202
4218
|
y: I.y
|
|
4203
4219
|
}
|
|
4204
|
-
} :
|
|
4220
|
+
} : j;
|
|
4205
4221
|
});
|
|
4206
4222
|
c == null || c({
|
|
4207
4223
|
type: ft.MOVE,
|
|
@@ -4212,16 +4228,16 @@ const pn = F(
|
|
|
4212
4228
|
} else if (i.dragging.type === lt.INSERT) {
|
|
4213
4229
|
const { pluginKind: G, currentGrid: A, defaultSize: k } = i.dragging;
|
|
4214
4230
|
if (G && k) {
|
|
4215
|
-
const
|
|
4216
|
-
if (
|
|
4217
|
-
const { x: I, y:
|
|
4231
|
+
const j = e[G];
|
|
4232
|
+
if (j) {
|
|
4233
|
+
const { x: I, y: C } = Bo(
|
|
4218
4234
|
{ x: A.col, y: A.row },
|
|
4219
4235
|
{ w: k.w, h: k.h },
|
|
4220
4236
|
n.cols,
|
|
4221
4237
|
n.rows
|
|
4222
|
-
), S = At(
|
|
4238
|
+
), S = At(j, {
|
|
4223
4239
|
x: I,
|
|
4224
|
-
y:
|
|
4240
|
+
y: C,
|
|
4225
4241
|
w: k.w,
|
|
4226
4242
|
h: k.h
|
|
4227
4243
|
});
|
|
@@ -4233,9 +4249,9 @@ const pn = F(
|
|
|
4233
4249
|
}
|
|
4234
4250
|
}
|
|
4235
4251
|
} else if (i.dragging.type === lt.RESIZE) {
|
|
4236
|
-
const G = i.dragging.blockIds[0], A = t.find((
|
|
4252
|
+
const G = i.dragging.blockIds[0], A = t.find((j) => j.id === G), k = i.dragging.handle;
|
|
4237
4253
|
if (A && k && (T !== 0 || M !== 0)) {
|
|
4238
|
-
const
|
|
4254
|
+
const j = dn({
|
|
4239
4255
|
layout: A.layout,
|
|
4240
4256
|
handle: k,
|
|
4241
4257
|
deltaCol: T,
|
|
@@ -4243,10 +4259,10 @@ const pn = F(
|
|
|
4243
4259
|
gridCols: n.cols,
|
|
4244
4260
|
gridRows: n.rows
|
|
4245
4261
|
});
|
|
4246
|
-
(
|
|
4262
|
+
(j.x !== A.layout.x || j.y !== A.layout.y || j.w !== A.layout.w || j.h !== A.layout.h) && (c == null || c({
|
|
4247
4263
|
type: ft.RESIZE,
|
|
4248
4264
|
blockIds: [A.id],
|
|
4249
|
-
blocks: [{ ...A, layout:
|
|
4265
|
+
blocks: [{ ...A, layout: j }]
|
|
4250
4266
|
}));
|
|
4251
4267
|
}
|
|
4252
4268
|
}
|
|
@@ -4255,7 +4271,7 @@ const pn = F(
|
|
|
4255
4271
|
type: ft.DELETE,
|
|
4256
4272
|
blockIds: i.dragging.blockIds
|
|
4257
4273
|
}), a({ type: B.DESELECT })), a({ type: B.CANCEL_DRAG }));
|
|
4258
|
-
|
|
4274
|
+
w.currentTarget.releasePointerCapture(w.pointerId);
|
|
4259
4275
|
},
|
|
4260
4276
|
[
|
|
4261
4277
|
i.mode,
|
|
@@ -4266,14 +4282,14 @@ const pn = F(
|
|
|
4266
4282
|
c,
|
|
4267
4283
|
a
|
|
4268
4284
|
]
|
|
4269
|
-
),
|
|
4270
|
-
(
|
|
4285
|
+
), P = $(
|
|
4286
|
+
(w) => {
|
|
4271
4287
|
var k;
|
|
4272
4288
|
const T = (k = m.current) == null ? void 0 : k.getBoundingClientRect();
|
|
4273
4289
|
if (!T) return;
|
|
4274
4290
|
const M = u ?? 1, G = {
|
|
4275
|
-
x: (
|
|
4276
|
-
y: (
|
|
4291
|
+
x: (w.clientX - T.left) / M,
|
|
4292
|
+
y: (w.clientY - T.top) / M
|
|
4277
4293
|
}, A = He(G, t, s);
|
|
4278
4294
|
A && (i.selectedBlockIds.includes(A) || a({
|
|
4279
4295
|
type: B.SELECT,
|
|
@@ -4282,16 +4298,16 @@ const pn = F(
|
|
|
4282
4298
|
},
|
|
4283
4299
|
[t, s, a, u, i.selectedBlockIds]
|
|
4284
4300
|
), D = $(
|
|
4285
|
-
(
|
|
4301
|
+
(w) => {
|
|
4286
4302
|
var T;
|
|
4287
4303
|
if ((i.mode === W.PRESSING || i.mode === W.DRAGGING) && i.dragging) {
|
|
4288
4304
|
const M = (T = m.current) == null ? void 0 : T.getBoundingClientRect();
|
|
4289
4305
|
if (M) {
|
|
4290
|
-
const G = u ?? 1, A = (
|
|
4306
|
+
const G = u ?? 1, A = (w.clientX - M.left) / G, k = (w.clientY - M.top) / G, j = M.width / G, I = M.height / G, C = Math.max(0, Math.min(A, j)), S = Math.max(0, Math.min(k, I));
|
|
4291
4307
|
a({
|
|
4292
4308
|
type: B.UPDATE_DRAG,
|
|
4293
4309
|
currentGrid: {
|
|
4294
|
-
col: o(
|
|
4310
|
+
col: o(C),
|
|
4295
4311
|
row: l(S)
|
|
4296
4312
|
},
|
|
4297
4313
|
currentMousePx: { x: A, y: k },
|
|
@@ -4317,40 +4333,40 @@ const pn = F(
|
|
|
4317
4333
|
role: "application",
|
|
4318
4334
|
"aria-label": "Interactive canvas layer",
|
|
4319
4335
|
tabIndex: -1,
|
|
4320
|
-
onPointerDown:
|
|
4321
|
-
onPointerMove:
|
|
4322
|
-
onPointerUp:
|
|
4336
|
+
onPointerDown: g,
|
|
4337
|
+
onPointerMove: N,
|
|
4338
|
+
onPointerUp: y,
|
|
4323
4339
|
onPointerLeave: D,
|
|
4324
|
-
onDoubleClick:
|
|
4340
|
+
onDoubleClick: P,
|
|
4325
4341
|
"data-testid": "interaction-layer",
|
|
4326
4342
|
children: [
|
|
4327
4343
|
i.editingBlockId && (() => {
|
|
4328
|
-
const
|
|
4344
|
+
const w = t.find(
|
|
4329
4345
|
(M) => M.id === i.editingBlockId
|
|
4330
|
-
), T =
|
|
4331
|
-
return !
|
|
4346
|
+
), T = w ? e[w.kind] : null;
|
|
4347
|
+
return !w || !T ? null : /* @__PURE__ */ r.jsx(
|
|
4332
4348
|
ko,
|
|
4333
4349
|
{
|
|
4334
4350
|
ref: h,
|
|
4335
|
-
id:
|
|
4351
|
+
id: w.id,
|
|
4336
4352
|
plugin: T,
|
|
4337
|
-
props:
|
|
4338
|
-
value:
|
|
4353
|
+
props: w.props,
|
|
4354
|
+
value: w.initValue,
|
|
4339
4355
|
onChange: (M) => {
|
|
4340
4356
|
c == null || c({
|
|
4341
4357
|
type: ft.UPDATE,
|
|
4342
|
-
blockIds: [
|
|
4343
|
-
blocks: [{ ...
|
|
4358
|
+
blockIds: [w.id],
|
|
4359
|
+
blocks: [{ ...w, initValue: M }]
|
|
4344
4360
|
});
|
|
4345
4361
|
},
|
|
4346
4362
|
onBlur: (M) => {
|
|
4347
4363
|
c == null || c({
|
|
4348
4364
|
type: ft.UPDATE,
|
|
4349
|
-
blockIds: [
|
|
4350
|
-
blocks: [{ ...
|
|
4365
|
+
blockIds: [w.id],
|
|
4366
|
+
blocks: [{ ...w, initValue: M }]
|
|
4351
4367
|
});
|
|
4352
4368
|
},
|
|
4353
|
-
blockRectPx: s(
|
|
4369
|
+
blockRectPx: s(w),
|
|
4354
4370
|
zIndex: v
|
|
4355
4371
|
}
|
|
4356
4372
|
);
|
|
@@ -4363,14 +4379,14 @@ const pn = F(
|
|
|
4363
4379
|
isDragging: i.mode === W.DRAGGING,
|
|
4364
4380
|
draggingState: i.dragging,
|
|
4365
4381
|
getBlockRectPx: s,
|
|
4366
|
-
onResizeStart: (
|
|
4367
|
-
var
|
|
4368
|
-
const G = (
|
|
4382
|
+
onResizeStart: (w, T, M) => {
|
|
4383
|
+
var j;
|
|
4384
|
+
const G = (j = m.current) == null ? void 0 : j.getBoundingClientRect();
|
|
4369
4385
|
if (!G) return;
|
|
4370
|
-
i.mode === W.EDITING && a({ type: B.END_EDIT }),
|
|
4386
|
+
i.mode === W.EDITING && a({ type: B.END_EDIT }), w.currentTarget.setPointerCapture(w.pointerId);
|
|
4371
4387
|
const A = u ?? 1, k = {
|
|
4372
|
-
x: (
|
|
4373
|
-
y: (
|
|
4388
|
+
x: (w.clientX - G.left) / A,
|
|
4389
|
+
y: (w.clientY - G.top) / A
|
|
4374
4390
|
};
|
|
4375
4391
|
a({
|
|
4376
4392
|
type: B.START_RESIZE,
|
|
@@ -4381,7 +4397,7 @@ const pn = F(
|
|
|
4381
4397
|
},
|
|
4382
4398
|
selectionStyle: p,
|
|
4383
4399
|
handleStyle: x,
|
|
4384
|
-
selectBorderZIndex:
|
|
4400
|
+
selectBorderZIndex: E,
|
|
4385
4401
|
blockHandlesZIndex: _
|
|
4386
4402
|
}
|
|
4387
4403
|
),
|
|
@@ -4395,7 +4411,7 @@ const pn = F(
|
|
|
4395
4411
|
getBlockRectPx: s,
|
|
4396
4412
|
selectionStyle: p,
|
|
4397
4413
|
ghostZIndex: d,
|
|
4398
|
-
selectBorderZIndex:
|
|
4414
|
+
selectBorderZIndex: E,
|
|
4399
4415
|
blockHandlesZIndex: _
|
|
4400
4416
|
}
|
|
4401
4417
|
)
|
|
@@ -4406,113 +4422,113 @@ const pn = F(
|
|
|
4406
4422
|
);
|
|
4407
4423
|
pn.displayName = "InteractionLayer";
|
|
4408
4424
|
function De(t, e, n = H) {
|
|
4409
|
-
const s =
|
|
4425
|
+
const s = L(
|
|
4410
4426
|
() => K.fromDim(t.size.width),
|
|
4411
4427
|
[t.size.width]
|
|
4412
|
-
), o =
|
|
4428
|
+
), o = L(
|
|
4413
4429
|
() => K.fromDim(t.size.height),
|
|
4414
4430
|
[t.size.height]
|
|
4415
|
-
), l =
|
|
4431
|
+
), l = L(
|
|
4416
4432
|
() => K.fromDim(t.margin.top),
|
|
4417
4433
|
[t.margin.top]
|
|
4418
|
-
), i =
|
|
4434
|
+
), i = L(
|
|
4419
4435
|
() => K.fromDim(t.margin.bottom),
|
|
4420
4436
|
[t.margin.bottom]
|
|
4421
|
-
), a =
|
|
4437
|
+
), a = L(
|
|
4422
4438
|
() => K.fromDim(t.margin.left),
|
|
4423
4439
|
[t.margin.left]
|
|
4424
|
-
), c =
|
|
4440
|
+
), c = L(
|
|
4425
4441
|
() => K.fromDim(t.margin.right),
|
|
4426
4442
|
[t.margin.right]
|
|
4427
|
-
), u =
|
|
4443
|
+
), u = L(
|
|
4428
4444
|
() => s - a - c,
|
|
4429
4445
|
[s, a, c]
|
|
4430
|
-
), f =
|
|
4446
|
+
), f = L(
|
|
4431
4447
|
() => o - l - i,
|
|
4432
4448
|
[o, l, i]
|
|
4433
|
-
), p =
|
|
4449
|
+
), p = L(
|
|
4434
4450
|
() => be(e.cols, u),
|
|
4435
4451
|
[e.cols, u]
|
|
4436
|
-
), x =
|
|
4452
|
+
), x = L(
|
|
4437
4453
|
() => be(e.rows, f),
|
|
4438
4454
|
[e.rows, f]
|
|
4439
|
-
), v =
|
|
4455
|
+
), v = L(
|
|
4440
4456
|
() => U.fromMm(s, n),
|
|
4441
4457
|
[s, n]
|
|
4442
|
-
),
|
|
4458
|
+
), E = L(
|
|
4443
4459
|
() => U.fromMm(o, n),
|
|
4444
4460
|
[o, n]
|
|
4445
|
-
), _ =
|
|
4461
|
+
), _ = L(
|
|
4446
4462
|
() => U.fromMm(l, n),
|
|
4447
4463
|
[l, n]
|
|
4448
|
-
), d =
|
|
4464
|
+
), d = L(
|
|
4449
4465
|
() => U.fromMm(i, n),
|
|
4450
4466
|
[i, n]
|
|
4451
|
-
), m =
|
|
4467
|
+
), m = L(
|
|
4452
4468
|
() => U.fromMm(a, n),
|
|
4453
4469
|
[a, n]
|
|
4454
|
-
), h =
|
|
4470
|
+
), h = L(
|
|
4455
4471
|
() => U.fromMm(c, n),
|
|
4456
4472
|
[c, n]
|
|
4457
|
-
),
|
|
4473
|
+
), g = L(
|
|
4458
4474
|
() => U.fromMm(u, n),
|
|
4459
4475
|
[u, n]
|
|
4460
|
-
),
|
|
4476
|
+
), N = L(
|
|
4461
4477
|
() => U.fromMm(f, n),
|
|
4462
4478
|
[f, n]
|
|
4463
|
-
),
|
|
4464
|
-
const
|
|
4465
|
-
for (const z of
|
|
4466
|
-
const bt =
|
|
4467
|
-
|
|
4479
|
+
), y = L(() => ge(p, n), [p, n]), P = L(() => ge(x, n), [x, n]), D = L(() => {
|
|
4480
|
+
const O = [0];
|
|
4481
|
+
for (const z of y) {
|
|
4482
|
+
const bt = O[O.length - 1] ?? 0;
|
|
4483
|
+
O.push(bt + z);
|
|
4468
4484
|
}
|
|
4469
|
-
return
|
|
4470
|
-
}, [
|
|
4471
|
-
const
|
|
4472
|
-
for (const z of
|
|
4473
|
-
const bt =
|
|
4474
|
-
|
|
4485
|
+
return O;
|
|
4486
|
+
}, [y]), w = L(() => {
|
|
4487
|
+
const O = [0];
|
|
4488
|
+
for (const z of P) {
|
|
4489
|
+
const bt = O[O.length - 1] ?? 0;
|
|
4490
|
+
O.push(bt + z);
|
|
4475
4491
|
}
|
|
4476
|
-
return
|
|
4477
|
-
}, [
|
|
4492
|
+
return O;
|
|
4493
|
+
}, [P]), { step: T, windowPx: M } = L(
|
|
4478
4494
|
() => Ge(D),
|
|
4479
4495
|
[D]
|
|
4480
|
-
), { step: G, windowPx: A } =
|
|
4481
|
-
() => Ge(
|
|
4482
|
-
[
|
|
4483
|
-
), k =
|
|
4496
|
+
), { step: G, windowPx: A } = L(
|
|
4497
|
+
() => Ge(w),
|
|
4498
|
+
[w]
|
|
4499
|
+
), k = L(
|
|
4484
4500
|
() => Be(D, T, M),
|
|
4485
4501
|
[D, T, M]
|
|
4486
|
-
),
|
|
4487
|
-
() => Be(
|
|
4488
|
-
[
|
|
4502
|
+
), j = L(
|
|
4503
|
+
() => Be(w, G, A),
|
|
4504
|
+
[w, G, A]
|
|
4489
4505
|
), I = $(
|
|
4490
|
-
(
|
|
4506
|
+
(O) => k(O - m),
|
|
4491
4507
|
[k, m]
|
|
4492
|
-
),
|
|
4493
|
-
(
|
|
4494
|
-
[
|
|
4495
|
-
), S =
|
|
4508
|
+
), C = $(
|
|
4509
|
+
(O) => j(O - _),
|
|
4510
|
+
[j, _]
|
|
4511
|
+
), S = L(() => ({
|
|
4496
4512
|
cols: D,
|
|
4497
|
-
rows:
|
|
4498
|
-
}), [D,
|
|
4513
|
+
rows: w
|
|
4514
|
+
}), [D, w]), Y = L(() => ({
|
|
4499
4515
|
width: v,
|
|
4500
|
-
height:
|
|
4501
|
-
}), [v,
|
|
4516
|
+
height: E
|
|
4517
|
+
}), [v, E]), X = L(() => ({
|
|
4502
4518
|
top: _,
|
|
4503
4519
|
bottom: d,
|
|
4504
4520
|
left: m,
|
|
4505
4521
|
right: h
|
|
4506
|
-
}), [_, d, m, h]), q =
|
|
4507
|
-
width:
|
|
4508
|
-
height:
|
|
4509
|
-
}), [
|
|
4522
|
+
}), [_, d, m, h]), q = L(() => ({
|
|
4523
|
+
width: g,
|
|
4524
|
+
height: N
|
|
4525
|
+
}), [g, N]), b = L(() => ({
|
|
4510
4526
|
canvas: Y,
|
|
4511
4527
|
margin: X,
|
|
4512
4528
|
content: q
|
|
4513
4529
|
}), [Y, X, q]), R = $(
|
|
4514
|
-
(
|
|
4515
|
-
const { x: z, y: bt, w: Pt, h: J } =
|
|
4530
|
+
(O) => {
|
|
4531
|
+
const { x: z, y: bt, w: Pt, h: J } = O.layout, ht = S.cols, wt = S.rows;
|
|
4516
4532
|
if (!ht.length || !wt.length)
|
|
4517
4533
|
return { left: 0, top: 0, width: 0, height: 0 };
|
|
4518
4534
|
const Kt = Math.min(Math.max(0, z), ht.length - 1), Rn = Math.min(Math.max(0, z + Pt), ht.length - 1), Re = Math.min(Math.max(0, bt), wt.length - 1), An = Math.min(Math.max(0, bt + J), wt.length - 1), Mn = (ht[Kt] ?? 0) + m, Pn = (wt[Re] ?? 0) + _, Ln = (ht[Rn] ?? 0) - (ht[Kt] ?? 0), Cn = (wt[An] ?? 0) - (wt[Re] ?? 0);
|
|
@@ -4524,7 +4540,7 @@ function De(t, e, n = H) {
|
|
|
4524
4540
|
paperPx: b,
|
|
4525
4541
|
gridPosPx: S,
|
|
4526
4542
|
getColIndex: I,
|
|
4527
|
-
getRowIndex:
|
|
4543
|
+
getRowIndex: C,
|
|
4528
4544
|
getBlockRectPx: R
|
|
4529
4545
|
};
|
|
4530
4546
|
}
|
|
@@ -4600,63 +4616,63 @@ const vn = F(
|
|
|
4600
4616
|
scale: o = 1,
|
|
4601
4617
|
className: l
|
|
4602
4618
|
}) => {
|
|
4603
|
-
const [i, a] = Go(), c = dt(null), { paperPx: u, gridPosPx: f, getBlockRectPx: p, getColIndex: x, getRowIndex: v } = De(t.paper, t.grid, H),
|
|
4604
|
-
(
|
|
4619
|
+
const [i, a] = Go(), c = dt(null), { paperPx: u, gridPosPx: f, getBlockRectPx: p, getColIndex: x, getRowIndex: v } = De(t.paper, t.grid, H), E = $(
|
|
4620
|
+
(y) => {
|
|
4605
4621
|
if (n)
|
|
4606
|
-
switch (
|
|
4622
|
+
switch (y.type) {
|
|
4607
4623
|
case ft.MOVE:
|
|
4608
4624
|
case ft.RESIZE: {
|
|
4609
|
-
if (!
|
|
4610
|
-
const
|
|
4625
|
+
if (!y.blocks) return;
|
|
4626
|
+
const P = t.blocks.map((D) => {
|
|
4611
4627
|
var T;
|
|
4612
|
-
return ((T =
|
|
4628
|
+
return ((T = y.blocks) == null ? void 0 : T.find((M) => M.id === D.id)) || D;
|
|
4613
4629
|
});
|
|
4614
|
-
n({ ...t, blocks:
|
|
4630
|
+
n({ ...t, blocks: P });
|
|
4615
4631
|
break;
|
|
4616
4632
|
}
|
|
4617
4633
|
case ft.ADD: {
|
|
4618
|
-
if (!
|
|
4634
|
+
if (!y.blocks) return;
|
|
4619
4635
|
n({
|
|
4620
4636
|
...t,
|
|
4621
|
-
blocks: [...t.blocks, ...
|
|
4637
|
+
blocks: [...t.blocks, ...y.blocks]
|
|
4622
4638
|
});
|
|
4623
4639
|
break;
|
|
4624
4640
|
}
|
|
4625
4641
|
case ft.DELETE: {
|
|
4626
|
-
const
|
|
4627
|
-
(
|
|
4642
|
+
const P = new Set(y.blockIds), D = t.blocks.filter(
|
|
4643
|
+
(w) => !P.has(w.id)
|
|
4628
4644
|
);
|
|
4629
4645
|
n({ ...t, blocks: D });
|
|
4630
4646
|
break;
|
|
4631
4647
|
}
|
|
4632
4648
|
case ft.UPDATE: {
|
|
4633
|
-
if (!
|
|
4634
|
-
const
|
|
4649
|
+
if (!y.blocks) return;
|
|
4650
|
+
const P = t.blocks.map((D) => {
|
|
4635
4651
|
var G;
|
|
4636
|
-
const
|
|
4637
|
-
if (!
|
|
4638
|
-
const T =
|
|
4639
|
-
|
|
4640
|
-
) :
|
|
4641
|
-
|
|
4642
|
-
) :
|
|
4652
|
+
const w = (G = y.blocks) == null ? void 0 : G.find((A) => A.id === D.id);
|
|
4653
|
+
if (!w) return D;
|
|
4654
|
+
const T = w.style ? we(
|
|
4655
|
+
w.style
|
|
4656
|
+
) : w.style, M = w.props ? we(
|
|
4657
|
+
w.props
|
|
4658
|
+
) : w.props;
|
|
4643
4659
|
return {
|
|
4644
4660
|
...D,
|
|
4645
|
-
...
|
|
4661
|
+
...w,
|
|
4646
4662
|
style: T,
|
|
4647
4663
|
props: M
|
|
4648
4664
|
};
|
|
4649
4665
|
});
|
|
4650
|
-
n({ ...t, blocks:
|
|
4666
|
+
n({ ...t, blocks: P });
|
|
4651
4667
|
break;
|
|
4652
4668
|
}
|
|
4653
4669
|
}
|
|
4654
4670
|
},
|
|
4655
4671
|
[t, n]
|
|
4656
4672
|
), _ = $(
|
|
4657
|
-
(
|
|
4673
|
+
(y, P) => {
|
|
4658
4674
|
if (!n) return;
|
|
4659
|
-
const D = t.blocks.map((
|
|
4675
|
+
const D = t.blocks.map((w) => w.id === y ? { ...w, initValue: P } : w);
|
|
4660
4676
|
n({ ...t, blocks: D });
|
|
4661
4677
|
},
|
|
4662
4678
|
[t, n]
|
|
@@ -4664,38 +4680,38 @@ const vn = F(
|
|
|
4664
4680
|
mt(() => {
|
|
4665
4681
|
s && s(i.selectedBlockIds);
|
|
4666
4682
|
}, [i.selectedBlockIds, s]), mt(() => {
|
|
4667
|
-
const
|
|
4683
|
+
const y = Zt.subscribe((P) => {
|
|
4668
4684
|
var D;
|
|
4669
|
-
!
|
|
4685
|
+
!P && i.mode === W.DRAGGING && ((D = i.dragging) == null ? void 0 : D.type) === lt.INSERT && a({ type: B.CANCEL_INSERT });
|
|
4670
4686
|
});
|
|
4671
|
-
return () =>
|
|
4687
|
+
return () => y();
|
|
4672
4688
|
}, [
|
|
4673
4689
|
i.mode,
|
|
4674
4690
|
i.dragging,
|
|
4675
4691
|
a
|
|
4676
4692
|
]), mt(() => {
|
|
4677
|
-
const
|
|
4678
|
-
var
|
|
4693
|
+
const y = (P) => {
|
|
4694
|
+
var w;
|
|
4679
4695
|
if (i.selectedBlockIds.length === 0) return;
|
|
4680
|
-
const D =
|
|
4696
|
+
const D = P.target;
|
|
4681
4697
|
if (c.current && !c.current.contains(D)) {
|
|
4682
4698
|
const T = D;
|
|
4683
|
-
if ((
|
|
4699
|
+
if ((w = T.closest) == null ? void 0 : w.call(T, '[data-sidebar="true"]')) return;
|
|
4684
4700
|
a({ type: B.DESELECT });
|
|
4685
4701
|
}
|
|
4686
4702
|
};
|
|
4687
|
-
return document.addEventListener("mousedown",
|
|
4688
|
-
document.removeEventListener("mousedown",
|
|
4703
|
+
return document.addEventListener("mousedown", y), () => {
|
|
4704
|
+
document.removeEventListener("mousedown", y);
|
|
4689
4705
|
};
|
|
4690
4706
|
}, [i.selectedBlockIds, a]);
|
|
4691
4707
|
const d = $(
|
|
4692
|
-
(
|
|
4708
|
+
(y, P, D) => {
|
|
4693
4709
|
if (!n) return;
|
|
4694
|
-
const
|
|
4695
|
-
if (
|
|
4710
|
+
const w = P - 1;
|
|
4711
|
+
if (y === "column") {
|
|
4696
4712
|
const T = Oe(
|
|
4697
4713
|
t.grid.cols,
|
|
4698
|
-
|
|
4714
|
+
w,
|
|
4699
4715
|
D,
|
|
4700
4716
|
u.content.width
|
|
4701
4717
|
);
|
|
@@ -4706,7 +4722,7 @@ const vn = F(
|
|
|
4706
4722
|
} else {
|
|
4707
4723
|
const T = Oe(
|
|
4708
4724
|
t.grid.rows,
|
|
4709
|
-
|
|
4725
|
+
w,
|
|
4710
4726
|
D,
|
|
4711
4727
|
u.content.height
|
|
4712
4728
|
);
|
|
@@ -4718,49 +4734,49 @@ const vn = F(
|
|
|
4718
4734
|
},
|
|
4719
4735
|
[t, u, n]
|
|
4720
4736
|
), m = $(
|
|
4721
|
-
(
|
|
4737
|
+
(y, P, D) => {
|
|
4722
4738
|
if (n)
|
|
4723
|
-
if (
|
|
4724
|
-
const
|
|
4725
|
-
|
|
4739
|
+
if (y === "column") {
|
|
4740
|
+
const w = [...t.grid.cols];
|
|
4741
|
+
w[P] = D, n({
|
|
4726
4742
|
...t,
|
|
4727
|
-
grid: { ...t.grid, cols:
|
|
4743
|
+
grid: { ...t.grid, cols: w }
|
|
4728
4744
|
});
|
|
4729
4745
|
} else {
|
|
4730
|
-
const
|
|
4731
|
-
|
|
4746
|
+
const w = [...t.grid.rows];
|
|
4747
|
+
w[P] = D, n({
|
|
4732
4748
|
...t,
|
|
4733
|
-
grid: { ...t.grid, rows:
|
|
4749
|
+
grid: { ...t.grid, rows: w }
|
|
4734
4750
|
});
|
|
4735
4751
|
}
|
|
4736
4752
|
},
|
|
4737
4753
|
[n, t]
|
|
4738
|
-
), h =
|
|
4754
|
+
), h = L(
|
|
4739
4755
|
() => t.blocks.reduce(
|
|
4740
|
-
(
|
|
4756
|
+
(y, P) => (y[P.id] = P.initValue, y),
|
|
4741
4757
|
{}
|
|
4742
4758
|
),
|
|
4743
4759
|
[t.blocks]
|
|
4744
|
-
),
|
|
4745
|
-
const
|
|
4746
|
-
|
|
4760
|
+
), g = $(() => {
|
|
4761
|
+
const y = Zt.get();
|
|
4762
|
+
y && (i.mode === W.DRAGGING || i.dragging || a({
|
|
4747
4763
|
type: B.START_INSERT,
|
|
4748
|
-
pluginKind:
|
|
4749
|
-
defaultSize:
|
|
4764
|
+
pluginKind: y.kind,
|
|
4765
|
+
defaultSize: y.defaultSize
|
|
4750
4766
|
}));
|
|
4751
4767
|
}, [
|
|
4752
4768
|
i.mode,
|
|
4753
4769
|
i.dragging,
|
|
4754
4770
|
a
|
|
4755
|
-
]),
|
|
4771
|
+
]), N = $(() => {
|
|
4756
4772
|
}, []);
|
|
4757
4773
|
return /* @__PURE__ */ r.jsxs(
|
|
4758
4774
|
"div",
|
|
4759
4775
|
{
|
|
4760
4776
|
ref: c,
|
|
4761
4777
|
className: l,
|
|
4762
|
-
onPointerEnter:
|
|
4763
|
-
onPointerLeave:
|
|
4778
|
+
onPointerEnter: g,
|
|
4779
|
+
onPointerLeave: N,
|
|
4764
4780
|
style: {
|
|
4765
4781
|
position: "relative",
|
|
4766
4782
|
width: `${u.canvas.width}px`,
|
|
@@ -4830,7 +4846,7 @@ const vn = F(
|
|
|
4830
4846
|
getRowIndex: v,
|
|
4831
4847
|
state: i,
|
|
4832
4848
|
onChange: a,
|
|
4833
|
-
onBlockChange:
|
|
4849
|
+
onBlockChange: E,
|
|
4834
4850
|
scale: o
|
|
4835
4851
|
}
|
|
4836
4852
|
)
|
|
@@ -4861,10 +4877,10 @@ const bn = ({
|
|
|
4861
4877
|
const v = document.createElement("style");
|
|
4862
4878
|
v.id = "dynamic-print-page-style";
|
|
4863
4879
|
const {
|
|
4864
|
-
paperSize:
|
|
4880
|
+
paperSize: E = "A4",
|
|
4865
4881
|
orientation: _ = "portrait",
|
|
4866
4882
|
margin: d
|
|
4867
|
-
} = i, m = _ === "landscape" ? `${
|
|
4883
|
+
} = i, m = _ === "landscape" ? `${E} landscape` : `${E} portrait`;
|
|
4868
4884
|
return v.textContent = `
|
|
4869
4885
|
@media print {
|
|
4870
4886
|
@page {
|
|
@@ -5067,7 +5083,7 @@ const Ho = ({
|
|
|
5067
5083
|
const n = (i, a, c) => {
|
|
5068
5084
|
const u = {};
|
|
5069
5085
|
t.forEach((f) => {
|
|
5070
|
-
var x, v,
|
|
5086
|
+
var x, v, E;
|
|
5071
5087
|
let p = Nt(
|
|
5072
5088
|
f.style || {},
|
|
5073
5089
|
`border.${i}.${a}`,
|
|
@@ -5096,7 +5112,7 @@ const Ho = ({
|
|
|
5096
5112
|
}));
|
|
5097
5113
|
}
|
|
5098
5114
|
if (a === "width" && c !== void 0 && c !== null) {
|
|
5099
|
-
const _ = (
|
|
5115
|
+
const _ = (E = f.style) == null ? void 0 : E.border, d = _ == null ? void 0 : _[i];
|
|
5100
5116
|
d != null && d.type || (p = Nt(
|
|
5101
5117
|
p,
|
|
5102
5118
|
`border.${i}.type`,
|
|
@@ -5109,7 +5125,7 @@ const Ho = ({
|
|
|
5109
5125
|
}
|
|
5110
5126
|
u[f.id] = { style: p };
|
|
5111
5127
|
}), e(u);
|
|
5112
|
-
}, s =
|
|
5128
|
+
}, s = L(() => {
|
|
5113
5129
|
var f;
|
|
5114
5130
|
if (t.length !== 1) return null;
|
|
5115
5131
|
const i = t[0];
|
|
@@ -5363,9 +5379,9 @@ const Ho = ({
|
|
|
5363
5379
|
...t.map((m) => m.layout.x + m.layout.w)
|
|
5364
5380
|
), x = Math.max(
|
|
5365
5381
|
...t.map((m) => m.layout.y + m.layout.h)
|
|
5366
|
-
), v = p - (o ?? 0),
|
|
5382
|
+
), v = p - (o ?? 0), E = x - (l ?? 0);
|
|
5367
5383
|
let _ = c;
|
|
5368
|
-
a === "x" && n ? _ = Math.max(0, Math.min(c, n.cols - v)) : a === "y" && n ? _ = Math.max(0, Math.min(c, n.rows -
|
|
5384
|
+
a === "x" && n ? _ = Math.max(0, Math.min(c, n.cols - v)) : a === "y" && n ? _ = Math.max(0, Math.min(c, n.rows - E)) : _ = Math.max(0, c);
|
|
5369
5385
|
const d = _ - f;
|
|
5370
5386
|
t.forEach((m) => {
|
|
5371
5387
|
const h = m.layout[a] + d;
|
|
@@ -5565,12 +5581,12 @@ const gn = F(
|
|
|
5565
5581
|
gridSize: s,
|
|
5566
5582
|
className: o = ""
|
|
5567
5583
|
}) => {
|
|
5568
|
-
const l = t[0], i = l ? e[l.kind] : void 0, a =
|
|
5584
|
+
const l = t[0], i = l ? e[l.kind] : void 0, a = L(() => {
|
|
5569
5585
|
var p;
|
|
5570
5586
|
if (t.length === 0) return !1;
|
|
5571
5587
|
const f = (p = t[0]) == null ? void 0 : p.kind;
|
|
5572
5588
|
return t.every((x) => x.kind === f);
|
|
5573
|
-
}, [t]), c =
|
|
5589
|
+
}, [t]), c = L(() => {
|
|
5574
5590
|
if (!l || !i) return {};
|
|
5575
5591
|
const f = {};
|
|
5576
5592
|
let p;
|
|
@@ -5581,8 +5597,8 @@ const gn = F(
|
|
|
5581
5597
|
if (x.length === 0) return {};
|
|
5582
5598
|
const v = x[0];
|
|
5583
5599
|
if (!v) return {};
|
|
5584
|
-
const
|
|
5585
|
-
p = Array.from(
|
|
5600
|
+
const E = new Set(Object.keys(v.properties));
|
|
5601
|
+
p = Array.from(E).filter(
|
|
5586
5602
|
(d) => x.every((m) => d in m.properties)
|
|
5587
5603
|
).map(
|
|
5588
5604
|
(d) => {
|
|
@@ -5596,8 +5612,8 @@ const gn = F(
|
|
|
5596
5612
|
return p.forEach(([x, v]) => {
|
|
5597
5613
|
if (!vs(v) || t.length > 1 && v.disableInMultiSelection || v.condition && !v.condition(l.props))
|
|
5598
5614
|
return;
|
|
5599
|
-
const
|
|
5600
|
-
f[
|
|
5615
|
+
const E = v.group || "基本";
|
|
5616
|
+
f[E] || (f[E] = []), v.Component && f[E].push({
|
|
5601
5617
|
key: x,
|
|
5602
5618
|
definition: v
|
|
5603
5619
|
});
|
|
@@ -5691,7 +5707,7 @@ const qi = ({
|
|
|
5691
5707
|
pluginRegistry: e,
|
|
5692
5708
|
onUpdateBlocks: n
|
|
5693
5709
|
}) => {
|
|
5694
|
-
const s = t[0], o = s ? e[s.kind] : void 0, l =
|
|
5710
|
+
const s = t[0], o = s ? e[s.kind] : void 0, l = L(() => {
|
|
5695
5711
|
if (!s || !o) return {};
|
|
5696
5712
|
const a = {};
|
|
5697
5713
|
return Object.entries(o.properties).forEach(([c, u]) => {
|
|
@@ -5753,42 +5769,42 @@ const qi = ({
|
|
|
5753
5769
|
}) => {
|
|
5754
5770
|
const [n, s] = st(null), [o, l] = st(null), i = [...t].reverse(), a = $(
|
|
5755
5771
|
(d) => {
|
|
5756
|
-
const m = t.findIndex((
|
|
5772
|
+
const m = t.findIndex((N) => N.id === d);
|
|
5757
5773
|
if (m === -1 || m === t.length - 1) return;
|
|
5758
|
-
const h = [...t], [
|
|
5759
|
-
|
|
5774
|
+
const h = [...t], [g] = h.splice(m, 1);
|
|
5775
|
+
g && (h.push(g), e(h));
|
|
5760
5776
|
},
|
|
5761
5777
|
[t, e]
|
|
5762
5778
|
), c = $(
|
|
5763
5779
|
(d) => {
|
|
5764
|
-
const m = t.findIndex((
|
|
5780
|
+
const m = t.findIndex((N) => N.id === d);
|
|
5765
5781
|
if (m === -1 || m === 0) return;
|
|
5766
|
-
const h = [...t], [
|
|
5767
|
-
|
|
5782
|
+
const h = [...t], [g] = h.splice(m, 1);
|
|
5783
|
+
g && (h.unshift(g), e(h));
|
|
5768
5784
|
},
|
|
5769
5785
|
[t, e]
|
|
5770
5786
|
), u = $(
|
|
5771
5787
|
(d) => {
|
|
5772
|
-
const m = t.findIndex((
|
|
5788
|
+
const m = t.findIndex((y) => y.id === d);
|
|
5773
5789
|
if (m === -1 || m === t.length - 1) return;
|
|
5774
|
-
const h = [...t],
|
|
5775
|
-
!
|
|
5790
|
+
const h = [...t], g = h[m], N = h[m + 1];
|
|
5791
|
+
!g || !N || (h[m] = N, h[m + 1] = g, e(h));
|
|
5776
5792
|
},
|
|
5777
5793
|
[t, e]
|
|
5778
5794
|
), f = $(
|
|
5779
5795
|
(d) => {
|
|
5780
|
-
const m = t.findIndex((
|
|
5796
|
+
const m = t.findIndex((y) => y.id === d);
|
|
5781
5797
|
if (m === -1 || m === 0) return;
|
|
5782
|
-
const h = [...t],
|
|
5783
|
-
!
|
|
5798
|
+
const h = [...t], g = h[m], N = h[m - 1];
|
|
5799
|
+
!g || !N || (h[m] = N, h[m - 1] = g, e(h));
|
|
5784
5800
|
},
|
|
5785
5801
|
[t, e]
|
|
5786
5802
|
), p = $(
|
|
5787
5803
|
(d, m) => {
|
|
5788
|
-
var
|
|
5804
|
+
var g;
|
|
5789
5805
|
s(m), d.dataTransfer.effectAllowed = "move";
|
|
5790
5806
|
const h = t.length - 1 - m;
|
|
5791
|
-
d.currentTarget && d.dataTransfer.setData("text/plain", ((
|
|
5807
|
+
d.currentTarget && d.dataTransfer.setData("text/plain", ((g = t[h]) == null ? void 0 : g.id) || "");
|
|
5792
5808
|
},
|
|
5793
5809
|
[t]
|
|
5794
5810
|
), x = $(() => {
|
|
@@ -5798,7 +5814,7 @@ const qi = ({
|
|
|
5798
5814
|
d.preventDefault(), d.dataTransfer.dropEffect = "move", !(n === null || n === m) && l(m);
|
|
5799
5815
|
},
|
|
5800
5816
|
[n]
|
|
5801
|
-
),
|
|
5817
|
+
), E = $(() => {
|
|
5802
5818
|
l(null);
|
|
5803
5819
|
}, []), _ = $(
|
|
5804
5820
|
(d, m) => {
|
|
@@ -5806,8 +5822,8 @@ const qi = ({
|
|
|
5806
5822
|
s(null), l(null);
|
|
5807
5823
|
return;
|
|
5808
5824
|
}
|
|
5809
|
-
const h = t.length - 1 - n,
|
|
5810
|
-
|
|
5825
|
+
const h = t.length - 1 - n, g = t.length - 1 - m, N = [...t], [y] = N.splice(h, 1);
|
|
5826
|
+
y && (N.splice(g, 0, y), e(N), s(null), l(null));
|
|
5811
5827
|
},
|
|
5812
5828
|
[t, n, e]
|
|
5813
5829
|
);
|
|
@@ -5821,9 +5837,9 @@ const qi = ({
|
|
|
5821
5837
|
"li",
|
|
5822
5838
|
{
|
|
5823
5839
|
className: `${tt.item} ${n === m ? tt.dragging : ""} ${o === m ? tt.dragOver : ""}`,
|
|
5824
|
-
onDragOver: (
|
|
5825
|
-
onDragLeave:
|
|
5826
|
-
onDrop: (
|
|
5840
|
+
onDragOver: (g) => v(g, m),
|
|
5841
|
+
onDragLeave: E,
|
|
5842
|
+
onDrop: (g) => _(g, m),
|
|
5827
5843
|
children: [
|
|
5828
5844
|
/* @__PURE__ */ r.jsx(
|
|
5829
5845
|
"button",
|
|
@@ -5832,7 +5848,7 @@ const qi = ({
|
|
|
5832
5848
|
className: tt.dragHandle,
|
|
5833
5849
|
title: "ドラッグして並び替え",
|
|
5834
5850
|
draggable: !0,
|
|
5835
|
-
onDragStart: (
|
|
5851
|
+
onDragStart: (g) => p(g, m),
|
|
5836
5852
|
onDragEnd: x,
|
|
5837
5853
|
children: /* @__PURE__ */ r.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
|
|
5838
5854
|
/* @__PURE__ */ r.jsx("title", { children: "ドラッグハンドル" }),
|
|
@@ -6229,7 +6245,7 @@ const si = "_panel_16d9o_6", ii = "_title_16d9o_10", li = "_content_16d9o_22", a
|
|
|
6229
6245
|
paper: t,
|
|
6230
6246
|
onPaperChange: e
|
|
6231
6247
|
}) => {
|
|
6232
|
-
const n =
|
|
6248
|
+
const n = L(
|
|
6233
6249
|
() => [
|
|
6234
6250
|
{ value: yt.A4, label: "A4 (210 × 297 mm)" },
|
|
6235
6251
|
{ value: yt.A3, label: "A3 (297 × 420 mm)" },
|
|
@@ -6336,8 +6352,8 @@ const hi = "_section_p4xnx_6", fi = "_title_p4xnx_14", mi = "_content_p4xnx_26",
|
|
|
6336
6352
|
}) => {
|
|
6337
6353
|
const [o, l] = st(""), i = dt(null), a = dt(null), c = $(() => {
|
|
6338
6354
|
try {
|
|
6339
|
-
const h = We(t, !0),
|
|
6340
|
-
|
|
6355
|
+
const h = We(t, !0), g = new Blob([h], { type: "application/json" }), N = URL.createObjectURL(g), y = document.createElement("a");
|
|
6356
|
+
y.href = N, y.download = "schema.json", y.click(), URL.revokeObjectURL(N), l("");
|
|
6341
6357
|
} catch (h) {
|
|
6342
6358
|
l(
|
|
6343
6359
|
`エクスポートエラー: ${h instanceof Error ? h.message : String(h)}`
|
|
@@ -6357,27 +6373,27 @@ const hi = "_section_p4xnx_6", fi = "_title_p4xnx_14", mi = "_content_p4xnx_26",
|
|
|
6357
6373
|
(h = i.current) == null || h.click();
|
|
6358
6374
|
}, []), p = $(
|
|
6359
6375
|
(h) => {
|
|
6360
|
-
var
|
|
6361
|
-
const
|
|
6362
|
-
if (!
|
|
6363
|
-
const
|
|
6364
|
-
|
|
6376
|
+
var y;
|
|
6377
|
+
const g = (y = h.target.files) == null ? void 0 : y[0];
|
|
6378
|
+
if (!g) return;
|
|
6379
|
+
const N = new FileReader();
|
|
6380
|
+
N.onload = (P) => {
|
|
6365
6381
|
var D;
|
|
6366
6382
|
try {
|
|
6367
|
-
const
|
|
6383
|
+
const w = (D = P.target) == null ? void 0 : D.result, T = Ue(w);
|
|
6368
6384
|
n(T), l(""), alert("スキーマをインポートしました");
|
|
6369
|
-
} catch (
|
|
6385
|
+
} catch (w) {
|
|
6370
6386
|
l(
|
|
6371
|
-
`インポートエラー: ${
|
|
6387
|
+
`インポートエラー: ${w instanceof Error ? w.message : String(w)}`
|
|
6372
6388
|
);
|
|
6373
6389
|
}
|
|
6374
|
-
},
|
|
6390
|
+
}, N.readAsText(g), h.target.value = "";
|
|
6375
6391
|
},
|
|
6376
6392
|
[n]
|
|
6377
6393
|
), x = $(async () => {
|
|
6378
6394
|
try {
|
|
6379
|
-
const h = await navigator.clipboard.readText(),
|
|
6380
|
-
n(
|
|
6395
|
+
const h = await navigator.clipboard.readText(), g = Ue(h);
|
|
6396
|
+
n(g), l(""), alert("スキーマをインポートしました");
|
|
6381
6397
|
} catch (h) {
|
|
6382
6398
|
l(
|
|
6383
6399
|
`インポートエラー: ${h instanceof Error ? h.message : String(h)}`
|
|
@@ -6385,14 +6401,14 @@ const hi = "_section_p4xnx_6", fi = "_title_p4xnx_14", mi = "_content_p4xnx_26",
|
|
|
6385
6401
|
}
|
|
6386
6402
|
}, [n]), v = $(() => {
|
|
6387
6403
|
try {
|
|
6388
|
-
const h = ze(e, !0),
|
|
6389
|
-
|
|
6404
|
+
const h = ze(e, !0), g = new Blob([h], { type: "application/json" }), N = URL.createObjectURL(g), y = document.createElement("a");
|
|
6405
|
+
y.href = N, y.download = "values.json", y.click(), URL.revokeObjectURL(N), l("");
|
|
6390
6406
|
} catch (h) {
|
|
6391
6407
|
l(
|
|
6392
6408
|
`エクスポートエラー: ${h instanceof Error ? h.message : String(h)}`
|
|
6393
6409
|
);
|
|
6394
6410
|
}
|
|
6395
|
-
}, [e]),
|
|
6411
|
+
}, [e]), E = $(async () => {
|
|
6396
6412
|
try {
|
|
6397
6413
|
const h = ze(e, !0);
|
|
6398
6414
|
await navigator.clipboard.writeText(h), l(""), alert("値をクリップボードにコピーしました");
|
|
@@ -6406,27 +6422,27 @@ const hi = "_section_p4xnx_6", fi = "_title_p4xnx_14", mi = "_content_p4xnx_26",
|
|
|
6406
6422
|
(h = a.current) == null || h.click();
|
|
6407
6423
|
}, []), d = $(
|
|
6408
6424
|
(h) => {
|
|
6409
|
-
var
|
|
6410
|
-
const
|
|
6411
|
-
if (!
|
|
6412
|
-
const
|
|
6413
|
-
|
|
6425
|
+
var y;
|
|
6426
|
+
const g = (y = h.target.files) == null ? void 0 : y[0];
|
|
6427
|
+
if (!g) return;
|
|
6428
|
+
const N = new FileReader();
|
|
6429
|
+
N.onload = (P) => {
|
|
6414
6430
|
var D;
|
|
6415
6431
|
try {
|
|
6416
|
-
const
|
|
6432
|
+
const w = (D = P.target) == null ? void 0 : D.result, T = Ye(w);
|
|
6417
6433
|
s(T), l(""), alert("値をインポートしました");
|
|
6418
|
-
} catch (
|
|
6434
|
+
} catch (w) {
|
|
6419
6435
|
l(
|
|
6420
|
-
`インポートエラー: ${
|
|
6436
|
+
`インポートエラー: ${w instanceof Error ? w.message : String(w)}`
|
|
6421
6437
|
);
|
|
6422
6438
|
}
|
|
6423
|
-
},
|
|
6439
|
+
}, N.readAsText(g), h.target.value = "";
|
|
6424
6440
|
},
|
|
6425
6441
|
[s]
|
|
6426
6442
|
), m = $(async () => {
|
|
6427
6443
|
try {
|
|
6428
|
-
const h = await navigator.clipboard.readText(),
|
|
6429
|
-
s(
|
|
6444
|
+
const h = await navigator.clipboard.readText(), g = Ye(h);
|
|
6445
|
+
s(g), l(""), alert("値をインポートしました");
|
|
6430
6446
|
} catch (h) {
|
|
6431
6447
|
l(
|
|
6432
6448
|
`インポートエラー: ${h instanceof Error ? h.message : String(h)}`
|
|
@@ -6507,7 +6523,7 @@ const hi = "_section_p4xnx_6", fi = "_title_p4xnx_14", mi = "_content_p4xnx_26",
|
|
|
6507
6523
|
{
|
|
6508
6524
|
type: "button",
|
|
6509
6525
|
className: et.button,
|
|
6510
|
-
onClick:
|
|
6526
|
+
onClick: E,
|
|
6511
6527
|
children: "📋 クリップボードにコピー"
|
|
6512
6528
|
}
|
|
6513
6529
|
)
|
|
@@ -6608,7 +6624,7 @@ const bi = "_container_6c3ft_3", gi = "_paletteItems_6c3ft_32", wi = "_item_6c3f
|
|
|
6608
6624
|
};
|
|
6609
6625
|
$n.displayName = "PalettePanel";
|
|
6610
6626
|
const Dn = ({ plugin: t, onDragStart: e }) => {
|
|
6611
|
-
const n =
|
|
6627
|
+
const n = L(() => At(
|
|
6612
6628
|
t,
|
|
6613
6629
|
{
|
|
6614
6630
|
x: 0,
|
|
@@ -6618,7 +6634,7 @@ const Dn = ({ plugin: t, onDragStart: e }) => {
|
|
|
6618
6634
|
},
|
|
6619
6635
|
{}
|
|
6620
6636
|
// overrideProps
|
|
6621
|
-
), [t]), s =
|
|
6637
|
+
), [t]), s = L(() => {
|
|
6622
6638
|
if (t.validateValue)
|
|
6623
6639
|
return t.validateValue(void 0, n.props);
|
|
6624
6640
|
}, [t, n.props]), o = $(
|
|
@@ -6666,7 +6682,7 @@ const Dn = ({ plugin: t, onDragStart: e }) => {
|
|
|
6666
6682
|
};
|
|
6667
6683
|
Dn.displayName = "PaletteItem";
|
|
6668
6684
|
const Tn = ({ plugin: t, mousePos: e }) => {
|
|
6669
|
-
const n =
|
|
6685
|
+
const n = L(() => At(
|
|
6670
6686
|
t,
|
|
6671
6687
|
{
|
|
6672
6688
|
x: 0,
|
|
@@ -6675,7 +6691,7 @@ const Tn = ({ plugin: t, mousePos: e }) => {
|
|
|
6675
6691
|
h: t.meta.defaultSize.h
|
|
6676
6692
|
},
|
|
6677
6693
|
{}
|
|
6678
|
-
), [t]), s =
|
|
6694
|
+
), [t]), s = L(() => {
|
|
6679
6695
|
if (t.validateValue)
|
|
6680
6696
|
return t.validateValue(void 0, n.props);
|
|
6681
6697
|
}, [t, n.props]), o = {
|
|
@@ -6732,10 +6748,10 @@ const Ei = "_container_rt0ql_3", ji = "_tabHeader_rt0ql_14", Ni = "_tabContent_r
|
|
|
6732
6748
|
gridSize: c,
|
|
6733
6749
|
className: u
|
|
6734
6750
|
}) => {
|
|
6735
|
-
const f =
|
|
6751
|
+
const f = L(
|
|
6736
6752
|
() => Object.values(n),
|
|
6737
6753
|
[n]
|
|
6738
|
-
), p =
|
|
6754
|
+
), p = L(
|
|
6739
6755
|
() => t.filter((v) => e.includes(v.id)),
|
|
6740
6756
|
[t, e]
|
|
6741
6757
|
), x = e.length > 0;
|