@aiquants/drag-drop-panels 0.8.4 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +60 -0
- package/README.md +240 -59
- package/dist/DragDropLayout.d.ts +7 -2
- package/dist/drag-drop/DebugComponents.d.ts +2 -3
- package/dist/drag-drop/DebugOverlay.d.ts +2 -0
- package/dist/drag-drop/ResizeHandle.d.ts +5 -2
- package/dist/drag-drop/domHooks.d.ts +2 -0
- package/dist/drag-drop/dragImage.d.ts +6 -0
- package/dist/drag-drop/hooks/useDragDropColumns.d.ts +0 -1
- package/dist/drag-drop/hooks/useDragDropState.d.ts +1 -3
- package/dist/drag-drop/hooks/usePanelTouchDrag.d.ts +27 -0
- package/dist/drag-drop/labels.d.ts +44 -0
- package/dist/drag-drop/maximizeEscape.d.ts +9 -0
- package/dist/drag-drop/panelTheme.d.ts +2 -0
- package/dist/drag-drop/touchDragConfig.d.ts +6 -0
- package/dist/drag-drop/types.d.ts +1 -22
- package/dist/drag-drop/utils/dropTarget.d.ts +2 -0
- package/dist/drag-drop/utils/edgeScrollUtils.d.ts +2 -0
- package/dist/drag-drop/utils/panelMoves.d.ts +30 -0
- package/dist/drag-drop-panels.css +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.es.js +2271 -1790
- package/dist/index.umd.js +2 -2
- package/dist/styles/drag-drop-panels.standalone.css +1 -1
- package/package.json +5 -4
package/dist/index.es.js
CHANGED
|
@@ -1,276 +1,276 @@
|
|
|
1
|
-
import
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
function
|
|
5
|
-
if (
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
function
|
|
9
|
-
var
|
|
10
|
-
if (
|
|
11
|
-
|
|
12
|
-
for (var
|
|
13
|
-
|
|
14
|
-
} else
|
|
15
|
-
return
|
|
16
|
-
$$typeof:
|
|
17
|
-
type:
|
|
18
|
-
key:
|
|
19
|
-
ref:
|
|
20
|
-
props:
|
|
1
|
+
import qt, { forwardRef as Wt, createElement as Ge, useRef as W, useState as se, useEffect as ee, useLayoutEffect as we, useCallback as D, memo as hn, useMemo as Re, useId as mn, Fragment as fn } from "react";
|
|
2
|
+
var _e = { exports: {} }, Oe = {};
|
|
3
|
+
var kt;
|
|
4
|
+
function pn() {
|
|
5
|
+
if (kt) return Oe;
|
|
6
|
+
kt = 1;
|
|
7
|
+
var t = /* @__PURE__ */ Symbol.for("react.transitional.element"), n = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
8
|
+
function e(o, r, a) {
|
|
9
|
+
var l = null;
|
|
10
|
+
if (a !== void 0 && (l = "" + a), r.key !== void 0 && (l = "" + r.key), "key" in r) {
|
|
11
|
+
a = {};
|
|
12
|
+
for (var u in r)
|
|
13
|
+
u !== "key" && (a[u] = r[u]);
|
|
14
|
+
} else a = r;
|
|
15
|
+
return r = a.ref, {
|
|
16
|
+
$$typeof: t,
|
|
17
|
+
type: o,
|
|
18
|
+
key: l,
|
|
19
|
+
ref: r !== void 0 ? r : null,
|
|
20
|
+
props: a
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
return
|
|
23
|
+
return Oe.Fragment = n, Oe.jsx = e, Oe.jsxs = e, Oe;
|
|
24
24
|
}
|
|
25
|
-
var
|
|
26
|
-
var
|
|
27
|
-
function
|
|
28
|
-
return
|
|
29
|
-
function
|
|
30
|
-
if (
|
|
31
|
-
if (typeof
|
|
32
|
-
return
|
|
33
|
-
if (typeof
|
|
34
|
-
switch (
|
|
25
|
+
var Ce = {};
|
|
26
|
+
var Nt;
|
|
27
|
+
function gn() {
|
|
28
|
+
return Nt || (Nt = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
29
|
+
function t(h) {
|
|
30
|
+
if (h == null) return null;
|
|
31
|
+
if (typeof h == "function")
|
|
32
|
+
return h.$$typeof === L ? null : h.displayName || h.name || null;
|
|
33
|
+
if (typeof h == "string") return h;
|
|
34
|
+
switch (h) {
|
|
35
35
|
case k:
|
|
36
36
|
return "Fragment";
|
|
37
|
-
case
|
|
37
|
+
case N:
|
|
38
38
|
return "Profiler";
|
|
39
|
-
case
|
|
39
|
+
case S:
|
|
40
40
|
return "StrictMode";
|
|
41
|
-
case
|
|
41
|
+
case T:
|
|
42
42
|
return "Suspense";
|
|
43
|
-
case
|
|
43
|
+
case Y:
|
|
44
44
|
return "SuspenseList";
|
|
45
|
-
case
|
|
45
|
+
case v:
|
|
46
46
|
return "Activity";
|
|
47
47
|
}
|
|
48
|
-
if (typeof
|
|
49
|
-
switch (typeof
|
|
48
|
+
if (typeof h == "object")
|
|
49
|
+
switch (typeof h.tag == "number" && console.error(
|
|
50
50
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
51
|
-
),
|
|
52
|
-
case
|
|
51
|
+
), h.$$typeof) {
|
|
52
|
+
case P:
|
|
53
53
|
return "Portal";
|
|
54
|
-
case
|
|
55
|
-
return
|
|
56
|
-
case
|
|
57
|
-
return (
|
|
58
|
-
case
|
|
59
|
-
var
|
|
60
|
-
return
|
|
61
|
-
case
|
|
62
|
-
return
|
|
63
|
-
case
|
|
64
|
-
|
|
54
|
+
case d:
|
|
55
|
+
return h.displayName || "Context";
|
|
56
|
+
case R:
|
|
57
|
+
return (h._context.displayName || "Context") + ".Consumer";
|
|
58
|
+
case $:
|
|
59
|
+
var x = h.render;
|
|
60
|
+
return h = h.displayName, h || (h = x.displayName || x.name || "", h = h !== "" ? "ForwardRef(" + h + ")" : "ForwardRef"), h;
|
|
61
|
+
case G:
|
|
62
|
+
return x = h.displayName || null, x !== null ? x : t(h.type) || "Memo";
|
|
63
|
+
case g:
|
|
64
|
+
x = h._payload, h = h._init;
|
|
65
65
|
try {
|
|
66
|
-
return
|
|
66
|
+
return t(h(x));
|
|
67
67
|
} catch {
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
return null;
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
return "" +
|
|
72
|
+
function n(h) {
|
|
73
|
+
return "" + h;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function e(h) {
|
|
76
76
|
try {
|
|
77
|
-
|
|
78
|
-
var
|
|
77
|
+
n(h);
|
|
78
|
+
var x = !1;
|
|
79
79
|
} catch {
|
|
80
|
-
|
|
80
|
+
x = !0;
|
|
81
81
|
}
|
|
82
|
-
if (
|
|
83
|
-
|
|
84
|
-
var
|
|
85
|
-
return
|
|
86
|
-
|
|
82
|
+
if (x) {
|
|
83
|
+
x = console;
|
|
84
|
+
var M = x.error, F = typeof Symbol == "function" && Symbol.toStringTag && h[Symbol.toStringTag] || h.constructor.name || "Object";
|
|
85
|
+
return M.call(
|
|
86
|
+
x,
|
|
87
87
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
88
|
-
|
|
89
|
-
),
|
|
88
|
+
F
|
|
89
|
+
), n(h);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
function
|
|
93
|
-
if (
|
|
94
|
-
if (typeof
|
|
92
|
+
function o(h) {
|
|
93
|
+
if (h === k) return "<>";
|
|
94
|
+
if (typeof h == "object" && h !== null && h.$$typeof === g)
|
|
95
95
|
return "<...>";
|
|
96
96
|
try {
|
|
97
|
-
var
|
|
98
|
-
return
|
|
97
|
+
var x = t(h);
|
|
98
|
+
return x ? "<" + x + ">" : "<...>";
|
|
99
99
|
} catch {
|
|
100
100
|
return "<...>";
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
function
|
|
104
|
-
var
|
|
105
|
-
return
|
|
103
|
+
function r() {
|
|
104
|
+
var h = w.A;
|
|
105
|
+
return h === null ? null : h.getOwner();
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function a() {
|
|
108
108
|
return Error("react-stack-top-frame");
|
|
109
109
|
}
|
|
110
|
-
function
|
|
111
|
-
if (
|
|
112
|
-
var
|
|
113
|
-
if (
|
|
110
|
+
function l(h) {
|
|
111
|
+
if (m.call(h, "key")) {
|
|
112
|
+
var x = Object.getOwnPropertyDescriptor(h, "key").get;
|
|
113
|
+
if (x && x.isReactWarning) return !1;
|
|
114
114
|
}
|
|
115
|
-
return
|
|
115
|
+
return h.key !== void 0;
|
|
116
116
|
}
|
|
117
|
-
function
|
|
118
|
-
function
|
|
119
|
-
|
|
117
|
+
function u(h, x) {
|
|
118
|
+
function M() {
|
|
119
|
+
_ || (_ = !0, console.error(
|
|
120
120
|
"%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)",
|
|
121
|
-
|
|
121
|
+
x
|
|
122
122
|
));
|
|
123
123
|
}
|
|
124
|
-
|
|
125
|
-
get:
|
|
124
|
+
M.isReactWarning = !0, Object.defineProperty(h, "key", {
|
|
125
|
+
get: M,
|
|
126
126
|
configurable: !0
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
|
-
function
|
|
130
|
-
var
|
|
131
|
-
return
|
|
129
|
+
function f() {
|
|
130
|
+
var h = t(this.type);
|
|
131
|
+
return I[h] || (I[h] = !0, console.error(
|
|
132
132
|
"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."
|
|
133
|
-
)),
|
|
133
|
+
)), h = this.props.ref, h !== void 0 ? h : null;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
var
|
|
137
|
-
return
|
|
138
|
-
$$typeof:
|
|
139
|
-
type:
|
|
140
|
-
key:
|
|
141
|
-
props:
|
|
142
|
-
_owner:
|
|
143
|
-
}, (
|
|
135
|
+
function b(h, x, M, F, Z, ae) {
|
|
136
|
+
var X = M.ref;
|
|
137
|
+
return h = {
|
|
138
|
+
$$typeof: c,
|
|
139
|
+
type: h,
|
|
140
|
+
key: x,
|
|
141
|
+
props: M,
|
|
142
|
+
_owner: F
|
|
143
|
+
}, (X !== void 0 ? X : null) !== null ? Object.defineProperty(h, "ref", {
|
|
144
144
|
enumerable: !1,
|
|
145
|
-
get:
|
|
146
|
-
}) : Object.defineProperty(
|
|
145
|
+
get: f
|
|
146
|
+
}) : Object.defineProperty(h, "ref", { enumerable: !1, value: null }), h._store = {}, Object.defineProperty(h._store, "validated", {
|
|
147
147
|
configurable: !1,
|
|
148
148
|
enumerable: !1,
|
|
149
149
|
writable: !0,
|
|
150
150
|
value: 0
|
|
151
|
-
}), Object.defineProperty(
|
|
151
|
+
}), Object.defineProperty(h, "_debugInfo", {
|
|
152
152
|
configurable: !1,
|
|
153
153
|
enumerable: !1,
|
|
154
154
|
writable: !0,
|
|
155
155
|
value: null
|
|
156
|
-
}), Object.defineProperty(
|
|
156
|
+
}), Object.defineProperty(h, "_debugStack", {
|
|
157
157
|
configurable: !1,
|
|
158
158
|
enumerable: !1,
|
|
159
159
|
writable: !0,
|
|
160
|
-
value:
|
|
161
|
-
}), Object.defineProperty(
|
|
160
|
+
value: Z
|
|
161
|
+
}), Object.defineProperty(h, "_debugTask", {
|
|
162
162
|
configurable: !1,
|
|
163
163
|
enumerable: !1,
|
|
164
164
|
writable: !0,
|
|
165
|
-
value:
|
|
166
|
-
}), Object.freeze && (Object.freeze(
|
|
165
|
+
value: ae
|
|
166
|
+
}), Object.freeze && (Object.freeze(h.props), Object.freeze(h)), h;
|
|
167
167
|
}
|
|
168
|
-
function
|
|
169
|
-
var
|
|
170
|
-
if (
|
|
171
|
-
if (
|
|
172
|
-
if (
|
|
173
|
-
for (
|
|
174
|
-
|
|
175
|
-
Object.freeze && Object.freeze(
|
|
168
|
+
function y(h, x, M, F, Z, ae) {
|
|
169
|
+
var X = x.children;
|
|
170
|
+
if (X !== void 0)
|
|
171
|
+
if (F)
|
|
172
|
+
if (p(X)) {
|
|
173
|
+
for (F = 0; F < X.length; F++)
|
|
174
|
+
A(X[F]);
|
|
175
|
+
Object.freeze && Object.freeze(X);
|
|
176
176
|
} else
|
|
177
177
|
console.error(
|
|
178
178
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
179
179
|
);
|
|
180
|
-
else
|
|
181
|
-
if (
|
|
182
|
-
|
|
183
|
-
var
|
|
184
|
-
return
|
|
180
|
+
else A(X);
|
|
181
|
+
if (m.call(x, "key")) {
|
|
182
|
+
X = t(h);
|
|
183
|
+
var H = Object.keys(x).filter(function(ue) {
|
|
184
|
+
return ue !== "key";
|
|
185
185
|
});
|
|
186
|
-
|
|
186
|
+
F = 0 < H.length ? "{key: someKey, " + H.join(": ..., ") + ": ...}" : "{key: someKey}", oe[X + F] || (H = 0 < H.length ? "{" + H.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
187
187
|
`A props object containing a "key" prop is being spread into JSX:
|
|
188
188
|
let props = %s;
|
|
189
189
|
<%s {...props} />
|
|
190
190
|
React keys must be passed directly to JSX without using spread:
|
|
191
191
|
let props = %s;
|
|
192
192
|
<%s key={someKey} {...props} />`,
|
|
193
|
+
F,
|
|
193
194
|
X,
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
), H[V + X] = !0);
|
|
195
|
+
H,
|
|
196
|
+
X
|
|
197
|
+
), oe[X + F] = !0);
|
|
198
198
|
}
|
|
199
|
-
if (
|
|
200
|
-
|
|
201
|
-
for (var
|
|
202
|
-
|
|
203
|
-
} else
|
|
204
|
-
return
|
|
205
|
-
|
|
206
|
-
typeof
|
|
207
|
-
),
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
199
|
+
if (X = null, M !== void 0 && (e(M), X = "" + M), l(x) && (e(x.key), X = "" + x.key), "key" in x) {
|
|
200
|
+
M = {};
|
|
201
|
+
for (var ve in x)
|
|
202
|
+
ve !== "key" && (M[ve] = x[ve]);
|
|
203
|
+
} else M = x;
|
|
204
|
+
return X && u(
|
|
205
|
+
M,
|
|
206
|
+
typeof h == "function" ? h.displayName || h.name || "Unknown" : h
|
|
207
|
+
), b(
|
|
208
|
+
h,
|
|
209
|
+
X,
|
|
210
|
+
M,
|
|
211
|
+
r(),
|
|
212
|
+
Z,
|
|
213
|
+
ae
|
|
214
214
|
);
|
|
215
215
|
}
|
|
216
|
-
function
|
|
217
|
-
|
|
216
|
+
function A(h) {
|
|
217
|
+
z(h) ? h._store && (h._store.validated = 1) : typeof h == "object" && h !== null && h.$$typeof === g && (h._payload.status === "fulfilled" ? z(h._payload.value) && h._payload.value._store && (h._payload.value._store.validated = 1) : h._store && (h._store.validated = 1));
|
|
218
218
|
}
|
|
219
|
-
function
|
|
220
|
-
return typeof
|
|
219
|
+
function z(h) {
|
|
220
|
+
return typeof h == "object" && h !== null && h.$$typeof === c;
|
|
221
221
|
}
|
|
222
|
-
var
|
|
222
|
+
var E = qt, c = /* @__PURE__ */ Symbol.for("react.transitional.element"), P = /* @__PURE__ */ Symbol.for("react.portal"), k = /* @__PURE__ */ Symbol.for("react.fragment"), S = /* @__PURE__ */ Symbol.for("react.strict_mode"), N = /* @__PURE__ */ Symbol.for("react.profiler"), R = /* @__PURE__ */ Symbol.for("react.consumer"), d = /* @__PURE__ */ Symbol.for("react.context"), $ = /* @__PURE__ */ Symbol.for("react.forward_ref"), T = /* @__PURE__ */ Symbol.for("react.suspense"), Y = /* @__PURE__ */ Symbol.for("react.suspense_list"), G = /* @__PURE__ */ Symbol.for("react.memo"), g = /* @__PURE__ */ Symbol.for("react.lazy"), v = /* @__PURE__ */ Symbol.for("react.activity"), L = /* @__PURE__ */ Symbol.for("react.client.reference"), w = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, m = Object.prototype.hasOwnProperty, p = Array.isArray, j = console.createTask ? console.createTask : function() {
|
|
223
223
|
return null;
|
|
224
224
|
};
|
|
225
|
-
|
|
226
|
-
react_stack_bottom_frame: function(
|
|
227
|
-
return
|
|
225
|
+
E = {
|
|
226
|
+
react_stack_bottom_frame: function(h) {
|
|
227
|
+
return h();
|
|
228
228
|
}
|
|
229
229
|
};
|
|
230
|
-
var
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
)(),
|
|
234
|
-
|
|
235
|
-
var
|
|
236
|
-
return
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
230
|
+
var _, I = {}, re = E.react_stack_bottom_frame.bind(
|
|
231
|
+
E,
|
|
232
|
+
a
|
|
233
|
+
)(), V = j(o(a)), oe = {};
|
|
234
|
+
Ce.Fragment = k, Ce.jsx = function(h, x, M) {
|
|
235
|
+
var F = 1e4 > w.recentlyCreatedOwnerStacks++;
|
|
236
|
+
return y(
|
|
237
|
+
h,
|
|
238
|
+
x,
|
|
239
|
+
M,
|
|
240
240
|
!1,
|
|
241
|
-
|
|
242
|
-
|
|
241
|
+
F ? Error("react-stack-top-frame") : re,
|
|
242
|
+
F ? j(o(h)) : V
|
|
243
243
|
);
|
|
244
|
-
},
|
|
245
|
-
var
|
|
246
|
-
return
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
244
|
+
}, Ce.jsxs = function(h, x, M) {
|
|
245
|
+
var F = 1e4 > w.recentlyCreatedOwnerStacks++;
|
|
246
|
+
return y(
|
|
247
|
+
h,
|
|
248
|
+
x,
|
|
249
|
+
M,
|
|
250
250
|
!0,
|
|
251
|
-
|
|
252
|
-
|
|
251
|
+
F ? Error("react-stack-top-frame") : re,
|
|
252
|
+
F ? j(o(h)) : V
|
|
253
253
|
);
|
|
254
254
|
};
|
|
255
|
-
})()),
|
|
255
|
+
})()), Ce;
|
|
256
256
|
}
|
|
257
|
-
var
|
|
258
|
-
function
|
|
259
|
-
return
|
|
257
|
+
var Ot;
|
|
258
|
+
function xn() {
|
|
259
|
+
return Ot || (Ot = 1, process.env.NODE_ENV === "production" ? _e.exports = pn() : _e.exports = gn()), _e.exports;
|
|
260
260
|
}
|
|
261
|
-
var
|
|
262
|
-
const
|
|
261
|
+
var s = xn();
|
|
262
|
+
const vn = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), bn = (t) => t.replace(
|
|
263
263
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
264
|
-
(
|
|
265
|
-
),
|
|
266
|
-
const
|
|
267
|
-
return
|
|
268
|
-
},
|
|
269
|
-
for (const
|
|
270
|
-
if (
|
|
264
|
+
(n, e, o) => o ? o.toUpperCase() : e.toLowerCase()
|
|
265
|
+
), Ct = (t) => {
|
|
266
|
+
const n = bn(t);
|
|
267
|
+
return n.charAt(0).toUpperCase() + n.slice(1);
|
|
268
|
+
}, It = (...t) => t.filter((n, e, o) => !!n && n.trim() !== "" && o.indexOf(n) === e).join(" ").trim(), yn = (t) => {
|
|
269
|
+
for (const n in t)
|
|
270
|
+
if (n.startsWith("aria-") || n === "role" || n === "title")
|
|
271
271
|
return !0;
|
|
272
272
|
};
|
|
273
|
-
var
|
|
273
|
+
var wn = {
|
|
274
274
|
xmlns: "http://www.w3.org/2000/svg",
|
|
275
275
|
width: 24,
|
|
276
276
|
height: 24,
|
|
@@ -281,51 +281,67 @@ var ht = {
|
|
|
281
281
|
strokeLinecap: "round",
|
|
282
282
|
strokeLinejoin: "round"
|
|
283
283
|
};
|
|
284
|
-
const
|
|
284
|
+
const jn = Wt(
|
|
285
285
|
({
|
|
286
|
-
color:
|
|
287
|
-
size:
|
|
288
|
-
strokeWidth:
|
|
289
|
-
absoluteStrokeWidth:
|
|
290
|
-
className:
|
|
291
|
-
children:
|
|
292
|
-
iconNode:
|
|
293
|
-
...
|
|
294
|
-
},
|
|
286
|
+
color: t = "currentColor",
|
|
287
|
+
size: n = 24,
|
|
288
|
+
strokeWidth: e = 2,
|
|
289
|
+
absoluteStrokeWidth: o,
|
|
290
|
+
className: r = "",
|
|
291
|
+
children: a,
|
|
292
|
+
iconNode: l,
|
|
293
|
+
...u
|
|
294
|
+
}, f) => Ge(
|
|
295
295
|
"svg",
|
|
296
296
|
{
|
|
297
|
-
ref:
|
|
298
|
-
...
|
|
299
|
-
width:
|
|
300
|
-
height:
|
|
301
|
-
stroke:
|
|
302
|
-
strokeWidth:
|
|
303
|
-
className:
|
|
304
|
-
...!
|
|
305
|
-
...
|
|
297
|
+
ref: f,
|
|
298
|
+
...wn,
|
|
299
|
+
width: n,
|
|
300
|
+
height: n,
|
|
301
|
+
stroke: t,
|
|
302
|
+
strokeWidth: o ? Number(e) * 24 / Number(n) : e,
|
|
303
|
+
className: It("lucide", r),
|
|
304
|
+
...!a && !yn(u) && { "aria-hidden": "true" },
|
|
305
|
+
...u
|
|
306
306
|
},
|
|
307
307
|
[
|
|
308
|
-
...
|
|
309
|
-
...Array.isArray(
|
|
308
|
+
...l.map(([b, y]) => Ge(b, y)),
|
|
309
|
+
...Array.isArray(a) ? a : [a]
|
|
310
310
|
]
|
|
311
311
|
)
|
|
312
312
|
);
|
|
313
|
-
const
|
|
314
|
-
const
|
|
315
|
-
({ className:
|
|
316
|
-
ref:
|
|
317
|
-
iconNode:
|
|
318
|
-
className:
|
|
319
|
-
`lucide-${
|
|
320
|
-
`lucide-${
|
|
321
|
-
|
|
313
|
+
const ie = (t, n) => {
|
|
314
|
+
const e = Wt(
|
|
315
|
+
({ className: o, ...r }, a) => Ge(jn, {
|
|
316
|
+
ref: a,
|
|
317
|
+
iconNode: n,
|
|
318
|
+
className: It(
|
|
319
|
+
`lucide-${vn(Ct(t))}`,
|
|
320
|
+
`lucide-${t}`,
|
|
321
|
+
o
|
|
322
322
|
),
|
|
323
|
-
...
|
|
323
|
+
...r
|
|
324
324
|
})
|
|
325
325
|
);
|
|
326
|
-
return
|
|
326
|
+
return e.displayName = Ct(t), e;
|
|
327
327
|
};
|
|
328
|
-
const
|
|
328
|
+
const Pn = [
|
|
329
|
+
["path", { d: "M12 5v14", key: "s699le" }],
|
|
330
|
+
["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
|
|
331
|
+
], En = ie("arrow-down", Pn);
|
|
332
|
+
const Dn = [
|
|
333
|
+
["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
|
|
334
|
+
["path", { d: "M19 12H5", key: "x3x0zl" }]
|
|
335
|
+
], kn = ie("arrow-left", Dn);
|
|
336
|
+
const Nn = [
|
|
337
|
+
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
338
|
+
["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
|
|
339
|
+
], On = ie("arrow-right", Nn);
|
|
340
|
+
const Cn = [
|
|
341
|
+
["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
|
|
342
|
+
["path", { d: "M12 19V5", key: "x0mq9r" }]
|
|
343
|
+
], Mn = ie("arrow-up", Cn);
|
|
344
|
+
const Sn = [
|
|
329
345
|
[
|
|
330
346
|
"path",
|
|
331
347
|
{
|
|
@@ -334,8 +350,8 @@ const ft = [
|
|
|
334
350
|
}
|
|
335
351
|
],
|
|
336
352
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
337
|
-
],
|
|
338
|
-
const
|
|
353
|
+
], An = ie("eye", Sn);
|
|
354
|
+
const $n = [
|
|
339
355
|
[
|
|
340
356
|
"path",
|
|
341
357
|
{
|
|
@@ -352,20 +368,20 @@ const xt = [
|
|
|
352
368
|
}
|
|
353
369
|
],
|
|
354
370
|
["path", { d: "m2 2 20 20", key: "1ooewy" }]
|
|
355
|
-
],
|
|
356
|
-
const
|
|
371
|
+
], Mt = ie("eye-off", $n);
|
|
372
|
+
const Tn = [
|
|
357
373
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
358
374
|
["path", { d: "m21 3-7 7", key: "1l2asr" }],
|
|
359
375
|
["path", { d: "m3 21 7-7", key: "tjx5ai" }],
|
|
360
376
|
["path", { d: "M9 21H3v-6", key: "wtvkvv" }]
|
|
361
|
-
],
|
|
362
|
-
const
|
|
377
|
+
], Ln = ie("maximize-2", Tn);
|
|
378
|
+
const _n = [
|
|
363
379
|
["path", { d: "m14 10 7-7", key: "oa77jy" }],
|
|
364
380
|
["path", { d: "M20 10h-6V4", key: "mjg0md" }],
|
|
365
381
|
["path", { d: "m3 21 7-7", key: "tjx5ai" }],
|
|
366
382
|
["path", { d: "M4 14h6v6", key: "rmj7iw" }]
|
|
367
|
-
],
|
|
368
|
-
const
|
|
383
|
+
], Rn = ie("minimize-2", _n);
|
|
384
|
+
const zn = [
|
|
369
385
|
["path", { d: "M12.586 12.586 19 19", key: "ea5xo7" }],
|
|
370
386
|
[
|
|
371
387
|
"path",
|
|
@@ -374,8 +390,8 @@ const wt = [
|
|
|
374
390
|
key: "277e5u"
|
|
375
391
|
}
|
|
376
392
|
]
|
|
377
|
-
],
|
|
378
|
-
const
|
|
393
|
+
], qn = ie("mouse-pointer", zn);
|
|
394
|
+
const Wn = [
|
|
379
395
|
["path", { d: "M14 4.1 12 6", key: "ita8i4" }],
|
|
380
396
|
["path", { d: "m5.1 8-2.9-.8", key: "1go3kf" }],
|
|
381
397
|
["path", { d: "m6 12-1.9 2", key: "mnht97" }],
|
|
@@ -387,19 +403,19 @@ const Pt = [
|
|
|
387
403
|
key: "s0h3yz"
|
|
388
404
|
}
|
|
389
405
|
]
|
|
390
|
-
],
|
|
391
|
-
const
|
|
406
|
+
], In = ie("mouse-pointer-click", Wn);
|
|
407
|
+
const Hn = [
|
|
392
408
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
393
409
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
394
|
-
],
|
|
410
|
+
], Ht = ie("x", Hn), me = class me {
|
|
395
411
|
/**
|
|
396
412
|
* @constructor
|
|
397
413
|
* @param {LogLevel} [level=LogLevel.WARN] - The minimum log level to output.
|
|
398
414
|
* @param {string} [prefix="[drag-drop-panels]"] - The prefix to add to all log messages.
|
|
399
415
|
* @param {ILogger} [impl=console] - The implementation to use for logging.
|
|
400
416
|
*/
|
|
401
|
-
constructor(
|
|
402
|
-
this.level =
|
|
417
|
+
constructor(n = 2, e = "[drag-drop-panels]", o = console) {
|
|
418
|
+
this.level = n, this.prefix = e, this.impl = o;
|
|
403
419
|
}
|
|
404
420
|
/**
|
|
405
421
|
* @method setLevel
|
|
@@ -407,8 +423,8 @@ const Nt = [
|
|
|
407
423
|
* @description 静的インスタンスの現在のログレベルを更新します。
|
|
408
424
|
* @param {LogLevel} level - The new log level.
|
|
409
425
|
*/
|
|
410
|
-
static setLevel(
|
|
411
|
-
|
|
426
|
+
static setLevel(n) {
|
|
427
|
+
me.instance.setLevel(n);
|
|
412
428
|
}
|
|
413
429
|
/**
|
|
414
430
|
* @method setLevel
|
|
@@ -416,8 +432,8 @@ const Nt = [
|
|
|
416
432
|
* @description 現在のログレベルを更新します。
|
|
417
433
|
* @param {LogLevel} level - The new log level.
|
|
418
434
|
*/
|
|
419
|
-
setLevel(
|
|
420
|
-
this.level =
|
|
435
|
+
setLevel(n) {
|
|
436
|
+
this.level = n;
|
|
421
437
|
}
|
|
422
438
|
/**
|
|
423
439
|
* @method setImplementation
|
|
@@ -425,8 +441,8 @@ const Nt = [
|
|
|
425
441
|
* @description 静的インスタンスのロガーの実装を更新します。
|
|
426
442
|
* @param {ILogger} impl - The new logger implementation.
|
|
427
443
|
*/
|
|
428
|
-
static setImplementation(
|
|
429
|
-
|
|
444
|
+
static setImplementation(n) {
|
|
445
|
+
me.instance.setImplementation(n);
|
|
430
446
|
}
|
|
431
447
|
/**
|
|
432
448
|
* @method setImplementation
|
|
@@ -434,8 +450,8 @@ const Nt = [
|
|
|
434
450
|
* @description ロガーの実装を更新します。
|
|
435
451
|
* @param {ILogger} impl - The new logger implementation.
|
|
436
452
|
*/
|
|
437
|
-
setImplementation(
|
|
438
|
-
this.impl =
|
|
453
|
+
setImplementation(n) {
|
|
454
|
+
this.impl = n;
|
|
439
455
|
}
|
|
440
456
|
/**
|
|
441
457
|
* @method setPrefix
|
|
@@ -443,8 +459,8 @@ const Nt = [
|
|
|
443
459
|
* @description 静的インスタンスのログのプレフィックスを更新します。
|
|
444
460
|
* @param {string} prefix - The new prefix.
|
|
445
461
|
*/
|
|
446
|
-
static setPrefix(
|
|
447
|
-
|
|
462
|
+
static setPrefix(n) {
|
|
463
|
+
me.instance.setPrefix(n);
|
|
448
464
|
}
|
|
449
465
|
/**
|
|
450
466
|
* @method setPrefix
|
|
@@ -452,462 +468,1038 @@ const Nt = [
|
|
|
452
468
|
* @description ログのプレフィックスを更新します。
|
|
453
469
|
* @param {string} prefix - The new prefix.
|
|
454
470
|
*/
|
|
455
|
-
setPrefix(
|
|
456
|
-
this.prefix =
|
|
471
|
+
setPrefix(n) {
|
|
472
|
+
this.prefix = n;
|
|
457
473
|
}
|
|
458
|
-
formatMessage(
|
|
459
|
-
return typeof
|
|
474
|
+
formatMessage(n) {
|
|
475
|
+
return typeof n == "string" ? [`${this.prefix} ${n}`] : [this.prefix, n];
|
|
460
476
|
}
|
|
461
|
-
static debug(
|
|
462
|
-
|
|
477
|
+
static debug(n, ...e) {
|
|
478
|
+
me.instance.debug(n, ...e);
|
|
463
479
|
}
|
|
464
|
-
debug(
|
|
465
|
-
this.level <= 0 && this.impl.debug(...this.formatMessage(
|
|
480
|
+
debug(n, ...e) {
|
|
481
|
+
this.level <= 0 && this.impl.debug(...this.formatMessage(n), ...e);
|
|
466
482
|
}
|
|
467
|
-
static info(
|
|
468
|
-
|
|
483
|
+
static info(n, ...e) {
|
|
484
|
+
me.instance.info(n, ...e);
|
|
469
485
|
}
|
|
470
|
-
info(
|
|
471
|
-
this.level <= 1 && this.impl.info(...this.formatMessage(
|
|
486
|
+
info(n, ...e) {
|
|
487
|
+
this.level <= 1 && this.impl.info(...this.formatMessage(n), ...e);
|
|
472
488
|
}
|
|
473
|
-
static warn(
|
|
474
|
-
|
|
489
|
+
static warn(n, ...e) {
|
|
490
|
+
me.instance.warn(n, ...e);
|
|
475
491
|
}
|
|
476
|
-
warn(
|
|
477
|
-
this.level <= 2 && this.impl.warn(...this.formatMessage(
|
|
492
|
+
warn(n, ...e) {
|
|
493
|
+
this.level <= 2 && this.impl.warn(...this.formatMessage(n), ...e);
|
|
478
494
|
}
|
|
479
|
-
static error(
|
|
480
|
-
|
|
495
|
+
static error(n, ...e) {
|
|
496
|
+
me.instance.error(n, ...e);
|
|
481
497
|
}
|
|
482
|
-
error(
|
|
483
|
-
this.level <= 3 && this.impl.error(...this.formatMessage(
|
|
498
|
+
error(n, ...e) {
|
|
499
|
+
this.level <= 3 && this.impl.error(...this.formatMessage(n), ...e);
|
|
484
500
|
}
|
|
485
501
|
};
|
|
486
|
-
|
|
487
|
-
let
|
|
488
|
-
const
|
|
502
|
+
me.instance = new me(2, "[drag-drop-panels]");
|
|
503
|
+
let Ke = me;
|
|
504
|
+
const Yn = ({ config: t, panelId: n, sizeInfo: e, onSizeInfoClick: o }) => t.showPanelSizes && e ? (
|
|
489
505
|
// biome-ignore lint/a11y/noStaticElementInteractions: クリックイベントを持つ静的要素。デバッグ目的のため、インタラクティブ性は限定的。
|
|
490
506
|
// biome-ignore lint/a11y/useKeyWithClickEvents: キーボード操作はデバッグ機能では優先度が低い。
|
|
491
|
-
/* @__PURE__ */
|
|
507
|
+
/* @__PURE__ */ s.jsxs(
|
|
492
508
|
"div",
|
|
493
509
|
{
|
|
494
510
|
className: "absolute top-1 right-24 z-10 cursor-default rounded-md bg-red-500/90 px-2 py-1 font-mono text-white text-xs leading-tight shadow-lg",
|
|
495
|
-
onClick:
|
|
496
|
-
onMouseDown:
|
|
497
|
-
onTouchStart: (
|
|
498
|
-
onDragStart:
|
|
511
|
+
onClick: o,
|
|
512
|
+
onMouseDown: o,
|
|
513
|
+
onTouchStart: (r) => r instanceof TouchEvent && o(r),
|
|
514
|
+
onDragStart: o,
|
|
499
515
|
children: [
|
|
500
|
-
/* @__PURE__ */
|
|
516
|
+
/* @__PURE__ */ s.jsxs("div", { className: "text-[10px] opacity-80", children: [
|
|
501
517
|
"ID:",
|
|
502
|
-
|
|
518
|
+
n
|
|
503
519
|
] }),
|
|
504
|
-
/* @__PURE__ */
|
|
505
|
-
|
|
520
|
+
/* @__PURE__ */ s.jsxs("div", { children: [
|
|
521
|
+
e.width,
|
|
506
522
|
"×",
|
|
507
|
-
|
|
523
|
+
e.height
|
|
508
524
|
] }),
|
|
509
|
-
/* @__PURE__ */
|
|
525
|
+
/* @__PURE__ */ s.jsxs("div", { children: [
|
|
510
526
|
"X:",
|
|
511
|
-
|
|
527
|
+
e.x,
|
|
512
528
|
" Y:",
|
|
513
|
-
|
|
529
|
+
e.y
|
|
514
530
|
] }),
|
|
515
|
-
/* @__PURE__ */
|
|
531
|
+
/* @__PURE__ */ s.jsxs("div", { className: "text-[10px] opacity-80", children: [
|
|
516
532
|
"min:",
|
|
517
|
-
|
|
533
|
+
e.minHeight,
|
|
518
534
|
" max:",
|
|
519
|
-
|
|
535
|
+
e.maxHeight
|
|
520
536
|
] })
|
|
521
537
|
]
|
|
522
538
|
}
|
|
523
539
|
)
|
|
524
|
-
) : null,
|
|
525
|
-
(
|
|
526
|
-
},
|
|
527
|
-
const
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
540
|
+
) : null, O = (t, n, ...e) => {
|
|
541
|
+
(t.logLevel ?? 0) >= n && Ke.info(...e);
|
|
542
|
+
}, et = (t, n, e) => t.columnIndex === n && (t.panelIndex === e || t.panelIndex + 1 === e), Yt = (t, n, e, o) => {
|
|
543
|
+
const r = Object.keys(t).find((u) => t[u].includes(n));
|
|
544
|
+
if (r === void 0 || t[e] === void 0) return null;
|
|
545
|
+
const a = { ...t };
|
|
546
|
+
if (r === e) {
|
|
547
|
+
const u = [...t[r]], f = u.indexOf(n);
|
|
548
|
+
return u.splice(f, 1), u.splice(f < o ? o - 1 : o, 0, n), a[e] = u, a;
|
|
549
|
+
}
|
|
550
|
+
a[r] = t[r].filter((u) => u !== n);
|
|
551
|
+
const l = [...t[e]];
|
|
552
|
+
return l.splice(o, 0, n), a[e] = l, a;
|
|
553
|
+
}, De = Object.freeze(["previous-column", "next-column", "up", "down"]), Fn = (t, n) => t.columnPanels[n] ?? [], tt = (t) => t.columnKeys.map((n) => Fn(t, n).filter((e) => t.panelVisibility[e] === !0)), Pe = (t, n) => {
|
|
554
|
+
for (const [e, o] of tt(t).entries()) {
|
|
555
|
+
const r = o.indexOf(n);
|
|
556
|
+
if (r >= 0) return { column: e, index: r };
|
|
557
|
+
}
|
|
558
|
+
return null;
|
|
559
|
+
}, Ft = (t, n, e) => {
|
|
560
|
+
switch (e) {
|
|
561
|
+
case "previous-column":
|
|
562
|
+
case "next-column": {
|
|
563
|
+
const o = n.column + (e === "previous-column" ? -1 : 1), r = t[o];
|
|
564
|
+
return r === void 0 ? null : { column: o, index: Math.min(n.index, r.length) };
|
|
565
|
+
}
|
|
566
|
+
case "up":
|
|
567
|
+
return n.index > 0 ? { column: n.column, index: n.index - 1 } : null;
|
|
568
|
+
case "down":
|
|
569
|
+
return n.index < t[n.column].length - 1 ? { column: n.column, index: n.index + 1 } : null;
|
|
570
|
+
default: {
|
|
571
|
+
const o = e;
|
|
572
|
+
throw new RangeError(`[@aiquants/drag-drop-panels] unknown panel move ${JSON.stringify(o)}; expected one of ${De.join(", ")}`);
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
}, Un = (t, n, e, o) => {
|
|
576
|
+
const r = t.filter(n), a = (f) => [...t.slice(0, f), e, ...t.slice(f)], l = r[o];
|
|
577
|
+
if (l !== void 0) return a(t.indexOf(l));
|
|
578
|
+
const u = r[o - 1];
|
|
579
|
+
return a(u !== void 0 ? t.indexOf(u) + 1 : t.length);
|
|
580
|
+
}, Bn = (t, n) => {
|
|
581
|
+
const e = Pe(t, n);
|
|
582
|
+
if (e === null) return [];
|
|
583
|
+
const o = tt(t);
|
|
584
|
+
return De.filter((r) => Ft(o, e, r) !== null);
|
|
585
|
+
}, Xn = (t, n, e) => {
|
|
586
|
+
if (!De.includes(e)) throw new RangeError(`[@aiquants/drag-drop-panels] unknown panel move ${JSON.stringify(e)}; expected one of ${De.join(", ")}`);
|
|
587
|
+
const o = Pe(t, n);
|
|
588
|
+
if (o === null) return null;
|
|
589
|
+
const r = Ft(tt(t), o, e);
|
|
590
|
+
if (r === null) return null;
|
|
591
|
+
const a = (f) => t.panelVisibility[f] === !0, l = Object.fromEntries(Object.entries(t.columnPanels).map(([f, b]) => [f, b.filter((y) => y !== n)])), u = t.columnKeys[r.column];
|
|
592
|
+
return l[u] = Un(l[u] ?? [], a, n, r.index), { columnPanels: l, from: o, place: r };
|
|
593
|
+
}, Vn = (t, n, e) => {
|
|
594
|
+
const o = (r, a) => (r[a] ?? []).filter((l) => l !== e);
|
|
595
|
+
for (const r of /* @__PURE__ */ new Set([...Object.keys(t), ...Object.keys(n)])) {
|
|
596
|
+
const a = o(t, r), l = o(n, r);
|
|
597
|
+
if (a.length !== l.length || a.some((u, f) => u !== l[f])) return !1;
|
|
598
|
+
}
|
|
599
|
+
return !0;
|
|
600
|
+
}, Ut = Object.freeze({
|
|
601
|
+
"previous-column": Object.freeze({ key: "ArrowLeft", aria: "Alt+Shift+ArrowLeft", text: "Alt+Shift+←" }),
|
|
602
|
+
"next-column": Object.freeze({ key: "ArrowRight", aria: "Alt+Shift+ArrowRight", text: "Alt+Shift+→" }),
|
|
603
|
+
up: Object.freeze({ key: "ArrowUp", aria: "Alt+Shift+ArrowUp", text: "Alt+Shift+↑" }),
|
|
604
|
+
down: Object.freeze({ key: "ArrowDown", aria: "Alt+Shift+ArrowDown", text: "Alt+Shift+↓" })
|
|
605
|
+
}), Zn = (t) => {
|
|
606
|
+
if (!(t.altKey && t.shiftKey) || t.ctrlKey || t.metaKey) return null;
|
|
607
|
+
const n = De.find((e) => Ut[e].key === t.key);
|
|
608
|
+
return n === void 0 ? null : n;
|
|
609
|
+
}, Bt = qt.memo(({ index: t, columnIndex: n, isDragging: e, dragOverPosition: o, originalPosition: r, onDragEnter: a, onDragLeave: l, config: u, customDrag: f, label: b }) => {
|
|
610
|
+
const y = r !== null && et(r, n, t), A = !y && o?.columnIndex === n && o?.insertIndex === t, z = W(null), [E, c] = se(null), P = e || (f?.isActive ?? !1), k = y || !P ? "hidden" : A ? "target" : "shown";
|
|
611
|
+
return ee(() => {
|
|
612
|
+
if (z.current) {
|
|
613
|
+
const S = z.current.getBoundingClientRect(), N = {
|
|
614
|
+
width: Math.round(S.width),
|
|
615
|
+
height: Math.round(S.height),
|
|
616
|
+
x: Math.round(S.left),
|
|
617
|
+
y: Math.round(S.top)
|
|
535
618
|
};
|
|
536
|
-
|
|
537
|
-
size: `${
|
|
538
|
-
position: `(${
|
|
539
|
-
bottomRight: `(${
|
|
540
|
-
center: `(${
|
|
619
|
+
c(N), A && O(u, 1, `🎯 アクティブプレースホルダー ${t}-${n}:`, {
|
|
620
|
+
size: `${N.width}×${N.height}`,
|
|
621
|
+
position: `(${N.x}, ${N.y})`,
|
|
622
|
+
bottomRight: `(${N.x + N.width}, ${N.y + N.height})`,
|
|
623
|
+
center: `(${N.x + N.width / 2}, ${N.y + N.height / 2})`
|
|
541
624
|
});
|
|
542
625
|
}
|
|
543
|
-
}, [
|
|
544
|
-
/* @__PURE__ */
|
|
626
|
+
}, [A, t, n, u]), O(u, 2, `プレースホルダー${t}-${n}: 表示中`, { isHighlighted: A, isDragging: e, dragOverPosition: o, shouldShow: P }), // biome-ignore lint/a11y/noStaticElementInteractions: ドラッグイベントを処理するための対話的な要素。デバッグ目的のため、キーボード操作は必須ではない。
|
|
627
|
+
/* @__PURE__ */ s.jsxs(
|
|
545
628
|
"div",
|
|
546
629
|
{
|
|
547
|
-
ref:
|
|
548
|
-
"data-placeholder-index":
|
|
549
|
-
"data-placeholder-column":
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
630
|
+
ref: z,
|
|
631
|
+
"data-placeholder-index": t,
|
|
632
|
+
"data-placeholder-column": n,
|
|
633
|
+
"data-aqdd-drop-placeholder": k,
|
|
634
|
+
onDragEnter: () => a(n, t),
|
|
635
|
+
onDragLeave: (S) => l(S, n, t),
|
|
636
|
+
className: `relative flex w-full items-center justify-center ${k === "hidden" ? "pointer-events-none h-0 overflow-hidden opacity-0" : k === "target" ? "my-2 scale-[1.02] rounded-xl border-4 border-dashed px-4 py-6 shadow-lg" : "my-2 rounded-xl border-2 border-dashed px-2 py-4"}`,
|
|
553
637
|
children: [
|
|
554
|
-
!
|
|
555
|
-
/* @__PURE__ */
|
|
556
|
-
|
|
638
|
+
!y && P && u.showPlaceholderInfo && E && /* @__PURE__ */ s.jsxs("div", { className: "absolute top-1 right-1 z-10 rounded-md bg-blue-500/90 px-2 py-1 font-mono text-white text-xs leading-tight shadow-lg", children: [
|
|
639
|
+
/* @__PURE__ */ s.jsxs("div", { children: [
|
|
640
|
+
E.width,
|
|
557
641
|
"×",
|
|
558
|
-
|
|
642
|
+
E.height
|
|
559
643
|
] }),
|
|
560
|
-
/* @__PURE__ */
|
|
644
|
+
/* @__PURE__ */ s.jsxs("div", { children: [
|
|
561
645
|
"X:",
|
|
562
|
-
|
|
646
|
+
E.x,
|
|
563
647
|
" Y:",
|
|
564
|
-
|
|
648
|
+
E.y
|
|
565
649
|
] }),
|
|
566
|
-
/* @__PURE__ */
|
|
567
|
-
/* @__PURE__ */
|
|
650
|
+
/* @__PURE__ */ s.jsx("div", { className: "text-[10px] opacity-80", children: "min:200px max:500px" }),
|
|
651
|
+
/* @__PURE__ */ s.jsxs("div", { className: "mt-0.5 text-[10px] opacity-80", children: [
|
|
568
652
|
"PH-",
|
|
569
|
-
|
|
653
|
+
n,
|
|
570
654
|
"-",
|
|
571
|
-
|
|
655
|
+
t,
|
|
572
656
|
" ",
|
|
573
|
-
|
|
657
|
+
A ? "ACTIVE" : "IDLE"
|
|
574
658
|
] })
|
|
575
659
|
] }),
|
|
576
|
-
!
|
|
577
|
-
/* @__PURE__ */
|
|
578
|
-
|
|
579
|
-
/* @__PURE__ */ t.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 6v6m0 0v6m0-6h6m-6 0H6" })
|
|
580
|
-
] }),
|
|
581
|
-
/* @__PURE__ */ t.jsx("span", { className: "font-medium text-sm", children: "パネルをここにドロップ" })
|
|
660
|
+
!y && P && /* @__PURE__ */ s.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
661
|
+
/* @__PURE__ */ s.jsx("svg", { className: "h-6 w-6", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ s.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 6v6m0 0v6m0-6h6m-6 0H6" }) }),
|
|
662
|
+
/* @__PURE__ */ s.jsx("span", { lang: b.lang, className: "font-medium text-sm", children: b.text })
|
|
582
663
|
] })
|
|
583
664
|
]
|
|
584
665
|
}
|
|
585
666
|
);
|
|
586
667
|
});
|
|
587
|
-
|
|
588
|
-
const
|
|
589
|
-
const
|
|
590
|
-
return
|
|
591
|
-
if (
|
|
592
|
-
const
|
|
593
|
-
width: Math.round(
|
|
594
|
-
height: Math.round(
|
|
595
|
-
x: Math.round(
|
|
596
|
-
y: Math.round(
|
|
597
|
-
isActive:
|
|
668
|
+
Bt.displayName = "InsertPlaceholder";
|
|
669
|
+
const Xt = ({ columnIndex: t, isDragging: n, dragOverPosition: e, children: o, config: r }) => {
|
|
670
|
+
const a = W(null), [l, u] = se(null);
|
|
671
|
+
return ee(() => {
|
|
672
|
+
if (a.current && n) {
|
|
673
|
+
const f = a.current.getBoundingClientRect(), b = e?.columnIndex === t, y = {
|
|
674
|
+
width: Math.round(f.width),
|
|
675
|
+
height: Math.round(f.height),
|
|
676
|
+
x: Math.round(f.left),
|
|
677
|
+
y: Math.round(f.top),
|
|
678
|
+
isActive: b
|
|
598
679
|
};
|
|
599
|
-
|
|
600
|
-
size: `${
|
|
601
|
-
position: `(${
|
|
602
|
-
bottomRight: `(${
|
|
603
|
-
center: `(${
|
|
680
|
+
u(y), b && O(r, 1, `🎯 アクティブドロップゾーン ${t}:`, {
|
|
681
|
+
size: `${y.width}×${y.height}`,
|
|
682
|
+
position: `(${y.x}, ${y.y})`,
|
|
683
|
+
bottomRight: `(${y.x + y.width}, ${y.y + y.height})`,
|
|
684
|
+
center: `(${y.x + y.width / 2}, ${y.y + y.height / 2})`
|
|
604
685
|
});
|
|
605
686
|
}
|
|
606
|
-
}, [e,
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
/* @__PURE__ */
|
|
610
|
-
/* @__PURE__ */
|
|
611
|
-
/* @__PURE__ */
|
|
687
|
+
}, [n, e, t, r]), /* @__PURE__ */ s.jsxs("div", { ref: a, className: "relative", children: [
|
|
688
|
+
o,
|
|
689
|
+
n && l && r.showDropZoneOutlines && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
690
|
+
/* @__PURE__ */ s.jsx("div", { className: `pointer-events-none absolute inset-0 rounded-lg border-2 border-dashed transition-all duration-200 ${l.isActive ? "border-red-500 bg-red-100/20 shadow-lg" : "border-gray-400 bg-gray-100/10"}` }),
|
|
691
|
+
/* @__PURE__ */ s.jsxs("div", { className: `absolute top-2 left-2 z-20 rounded-md px-2 py-1 font-mono text-xs leading-tight shadow-lg transition-all duration-200 ${l.isActive ? "bg-red-500/90 text-white" : "bg-gray-500/90 text-white"}`, children: [
|
|
692
|
+
/* @__PURE__ */ s.jsxs("div", { className: "font-bold", children: [
|
|
612
693
|
"DropZone-",
|
|
613
|
-
|
|
694
|
+
t
|
|
614
695
|
] }),
|
|
615
|
-
/* @__PURE__ */
|
|
616
|
-
|
|
696
|
+
/* @__PURE__ */ s.jsxs("div", { children: [
|
|
697
|
+
l.width,
|
|
617
698
|
"×",
|
|
618
|
-
|
|
699
|
+
l.height
|
|
619
700
|
] }),
|
|
620
|
-
/* @__PURE__ */
|
|
701
|
+
/* @__PURE__ */ s.jsxs("div", { children: [
|
|
621
702
|
"X:",
|
|
622
|
-
|
|
703
|
+
l.x,
|
|
623
704
|
" Y:",
|
|
624
|
-
|
|
705
|
+
l.y
|
|
625
706
|
] }),
|
|
626
|
-
/* @__PURE__ */
|
|
707
|
+
/* @__PURE__ */ s.jsx("div", { className: "mt-0.5 text-[10px] opacity-80", children: l.isActive ? "ACTIVE" : "IDLE" })
|
|
627
708
|
] }),
|
|
628
|
-
/* @__PURE__ */
|
|
709
|
+
/* @__PURE__ */ s.jsx(
|
|
629
710
|
"div",
|
|
630
711
|
{
|
|
631
|
-
className: `pointer-events-none absolute transition-all duration-200 ${
|
|
712
|
+
className: `pointer-events-none absolute transition-all duration-200 ${l.isActive ? "opacity-100" : "opacity-50"}`,
|
|
632
713
|
style: {
|
|
633
|
-
left: `${
|
|
634
|
-
top: `${
|
|
714
|
+
left: `${l.width / 2 - 6}px`,
|
|
715
|
+
top: `${l.height / 2 - 6}px`
|
|
635
716
|
},
|
|
636
|
-
children: /* @__PURE__ */
|
|
717
|
+
children: /* @__PURE__ */ s.jsx("div", { className: `h-3 w-3 rounded-full border-2 ${l.isActive ? "border-red-700 bg-red-500" : "border-gray-700 bg-gray-500"}` })
|
|
637
718
|
}
|
|
638
719
|
),
|
|
639
|
-
|
|
640
|
-
/* @__PURE__ */
|
|
641
|
-
/* @__PURE__ */
|
|
642
|
-
/* @__PURE__ */
|
|
643
|
-
/* @__PURE__ */
|
|
720
|
+
l.isActive && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
721
|
+
/* @__PURE__ */ s.jsx("div", { className: "pointer-events-none absolute top-0 left-0 h-2 w-2 rounded-full bg-red-500" }),
|
|
722
|
+
/* @__PURE__ */ s.jsx("div", { className: "pointer-events-none absolute top-0 right-0 h-2 w-2 rounded-full bg-red-500" }),
|
|
723
|
+
/* @__PURE__ */ s.jsx("div", { className: "pointer-events-none absolute bottom-0 left-0 h-2 w-2 rounded-full bg-red-500" }),
|
|
724
|
+
/* @__PURE__ */ s.jsx("div", { className: "pointer-events-none absolute right-0 bottom-0 h-2 w-2 rounded-full bg-red-500" })
|
|
644
725
|
] })
|
|
645
726
|
] })
|
|
646
727
|
] });
|
|
647
728
|
};
|
|
648
|
-
|
|
649
|
-
const
|
|
650
|
-
const
|
|
651
|
-
return
|
|
652
|
-
const
|
|
653
|
-
if (!
|
|
654
|
-
|
|
729
|
+
Xt.displayName = "DropZoneDebugOverlay";
|
|
730
|
+
const Vt = "[data-aqdd-scroll-root]", Ee = "data-aqdd-panel-action", Gn = 0.25, Kn = typeof window < "u" ? we : ee, Jn = (t, n = Gn) => {
|
|
731
|
+
const e = W(null), [o, r] = se(1);
|
|
732
|
+
return Kn(() => {
|
|
733
|
+
const a = e.current;
|
|
734
|
+
if (!a || t <= 0) {
|
|
735
|
+
r(1);
|
|
655
736
|
return;
|
|
656
737
|
}
|
|
657
|
-
const
|
|
658
|
-
const
|
|
659
|
-
if (
|
|
738
|
+
const l = () => {
|
|
739
|
+
const f = a.clientWidth;
|
|
740
|
+
if (f <= 0)
|
|
660
741
|
return;
|
|
661
|
-
const
|
|
662
|
-
|
|
742
|
+
const b = f >= t ? 1 : Math.max(f / t, n);
|
|
743
|
+
r((y) => Math.abs(y - b) < 5e-3 ? y : b);
|
|
663
744
|
};
|
|
664
|
-
|
|
665
|
-
const
|
|
666
|
-
return
|
|
667
|
-
}, [
|
|
668
|
-
},
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
745
|
+
l();
|
|
746
|
+
const u = new ResizeObserver(l);
|
|
747
|
+
return u.observe(a), () => u.disconnect();
|
|
748
|
+
}, [t, n]), { containerRef: e, scale: o };
|
|
749
|
+
}, Qn = Object.freeze([
|
|
750
|
+
"--aqdd-panel-surface",
|
|
751
|
+
"--aqdd-panel-border",
|
|
752
|
+
"--aqdd-panel-title-color",
|
|
753
|
+
"--aqdd-header-button-color",
|
|
754
|
+
"--aqdd-header-button-hover-color",
|
|
755
|
+
"--aqdd-header-button-hover-surface",
|
|
756
|
+
"--aqdd-custom-badge-color",
|
|
757
|
+
"--aqdd-custom-badge-surface",
|
|
758
|
+
"--aqdd-default-panel-surface",
|
|
759
|
+
"--aqdd-default-panel-border",
|
|
760
|
+
"--aqdd-default-panel-title-color",
|
|
761
|
+
"--aqdd-default-header-button-color",
|
|
762
|
+
"--aqdd-default-header-button-hover-color",
|
|
763
|
+
"--aqdd-default-header-button-hover-surface",
|
|
764
|
+
"--aqdd-default-header-close-hover-color",
|
|
765
|
+
"--aqdd-default-custom-badge-color",
|
|
766
|
+
"--aqdd-default-custom-badge-surface"
|
|
767
|
+
]), Zt = (t, n) => {
|
|
768
|
+
const e = window.getComputedStyle(t);
|
|
769
|
+
for (const o of Qn) {
|
|
770
|
+
const r = e.getPropertyValue(o).trim();
|
|
771
|
+
r !== "" && n.style.setProperty(o, r);
|
|
772
|
+
}
|
|
773
|
+
}, Gt = (t, n, e) => {
|
|
774
|
+
const o = t.getBoundingClientRect(), r = t.cloneNode(!0);
|
|
775
|
+
return r.removeAttribute("data-panel-id"), Zt(t, r), r.style.position = "fixed", r.style.top = "0px", r.style.left = "0px", r.style.width = `${t.offsetWidth}px`, r.style.height = `${t.offsetHeight}px`, r.style.pointerEvents = "none", r.style.zIndex = "1000", r.style.opacity = "0.5", r.style.margin = "0", r.style.transition = "none", r.style.boxShadow = "0 8px 32px rgba(0,0,0,0.3)", r.style.transformOrigin = "top left", r.style.transform = `translate(${o.left}px, ${o.top}px) scale(${e})`, r.id = `drag-image-${n}`, document.body.appendChild(r), r;
|
|
776
|
+
}, Kt = (t, n, e, o, r) => {
|
|
777
|
+
t.style.transform = `translate(${n - o.x}px, ${e - o.y}px) scale(${r * 1.05})`;
|
|
778
|
+
}, er = (t, n) => {
|
|
779
|
+
let e = n.closest("[data-drop-zone]");
|
|
780
|
+
for (; e !== null && e.closest("[data-aqdd-layout]") !== t; ) {
|
|
781
|
+
const o = e.parentElement;
|
|
782
|
+
e = o === null ? null : o.closest("[data-drop-zone]");
|
|
783
|
+
}
|
|
784
|
+
return e;
|
|
785
|
+
}, tr = (t, n, e) => {
|
|
786
|
+
const o = document.elementFromPoint(n, e), r = o === null ? null : er(t, o);
|
|
787
|
+
if (r === null) return null;
|
|
788
|
+
let a = null;
|
|
789
|
+
for (const l of r.querySelectorAll("[data-placeholder-index]")) {
|
|
790
|
+
if (l.closest("[data-drop-zone]") !== r) continue;
|
|
791
|
+
const { top: u, bottom: f } = l.getBoundingClientRect(), b = e < u ? u - e : e > f ? e - f : 0;
|
|
792
|
+
(a === null || b < a.distance) && (a = { insertIndex: Number(l.getAttribute("data-placeholder-index")), distance: b });
|
|
793
|
+
}
|
|
794
|
+
return a === null ? null : { columnIndex: Number(r.getAttribute("data-column-index")), insertIndex: a.insertIndex };
|
|
795
|
+
}, Se = {
|
|
796
|
+
triggerDistance: 80,
|
|
797
|
+
scrollSpeed: 5,
|
|
798
|
+
maxScrollSpeed: 20
|
|
799
|
+
}, nt = () => new DOMRect(0, 0, window.innerWidth, window.innerHeight), nr = (t) => {
|
|
800
|
+
const n = t.getBoundingClientRect(), e = nt(), o = Math.max(n.left, e.left), r = Math.max(n.top, e.top), a = Math.min(n.right, e.right), l = Math.min(n.bottom, e.bottom);
|
|
801
|
+
return a > o && l > r ? new DOMRect(o, r, a - o, l - r) : null;
|
|
802
|
+
}, St = (t, n, e = Se, o) => {
|
|
803
|
+
const { triggerDistance: r, scrollSpeed: a, maxScrollSpeed: l } = e, u = o === void 0 ? nt() : nr(o);
|
|
804
|
+
if (u === null) return { x: 0, y: 0 };
|
|
805
|
+
const { left: f, top: b, right: y, bottom: A } = u;
|
|
806
|
+
let z = 0, E = 0;
|
|
807
|
+
if (t >= f && t <= y && n >= b && n <= A) {
|
|
808
|
+
if (t < f + r) {
|
|
809
|
+
const c = Math.max(0, (f + r - t) / r);
|
|
810
|
+
z = -Math.min(l, a + c * (l - a));
|
|
811
|
+
} else if (t > y - r) {
|
|
812
|
+
const c = Math.max(0, (t - (y - r)) / r);
|
|
813
|
+
z = Math.min(l, a + c * (l - a));
|
|
814
|
+
}
|
|
815
|
+
if (n < b + r) {
|
|
816
|
+
const c = Math.max(0, (b + r - n) / r);
|
|
817
|
+
E = -Math.min(l, a + c * (l - a));
|
|
818
|
+
} else if (n > A - r) {
|
|
819
|
+
const c = Math.max(0, (n - (A - r)) / r);
|
|
820
|
+
E = Math.min(l, a + c * (l - a));
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
return { x: z, y: E };
|
|
824
|
+
}, rr = (t, n) => {
|
|
825
|
+
if (t === document.documentElement) return !1;
|
|
826
|
+
if (t === document.body) {
|
|
827
|
+
const r = window.getComputedStyle(document.documentElement);
|
|
828
|
+
if (r.overflowX === "visible" && r.overflowY === "visible") return !1;
|
|
829
|
+
}
|
|
830
|
+
const e = window.getComputedStyle(t), o = n === "x" ? e.overflowX : e.overflowY;
|
|
831
|
+
return o === "auto" || o === "scroll";
|
|
832
|
+
}, or = (t, n, e, o) => e === "x" ? o > 0 ? t.right - n.right : n.left - t.left : o > 0 ? t.bottom - n.bottom : n.top - t.top, Jt = (t, n, e) => {
|
|
833
|
+
const o = n === "x" ? t.scrollLeft : t.scrollTop;
|
|
834
|
+
return t.scrollBy(n === "x" ? { left: e, behavior: "instant" } : { top: e, behavior: "instant" }), (n === "x" ? t.scrollLeft : t.scrollTop) !== o;
|
|
835
|
+
}, At = (t, n, e, o, r) => {
|
|
836
|
+
const a = or(e, n, o, r);
|
|
837
|
+
return a > 0 && Jt(t, o, Math.sign(r) * Math.min(Math.abs(r), a));
|
|
838
|
+
}, $t = (t, n, e) => {
|
|
839
|
+
if (Jt(t, n, e)) return;
|
|
840
|
+
const o = t.getBoundingClientRect();
|
|
841
|
+
for (let a = t.parentElement; a !== null; a = a.parentElement)
|
|
842
|
+
if (rr(a, n) && At(a, a.getBoundingClientRect(), o, n, e)) return;
|
|
843
|
+
const r = document.scrollingElement;
|
|
844
|
+
r instanceof Element && r !== t && At(r, nt(), o, n, e);
|
|
845
|
+
}, sr = (t, n) => {
|
|
846
|
+
if (n === void 0) {
|
|
847
|
+
(t.x !== 0 || t.y !== 0) && window.scrollBy(t.x, t.y);
|
|
848
|
+
return;
|
|
849
|
+
}
|
|
850
|
+
t.x !== 0 && $t(n, "x", t.x), t.y !== 0 && $t(n, "y", t.y);
|
|
851
|
+
};
|
|
852
|
+
class rt {
|
|
853
|
+
/**
|
|
854
|
+
* Creates a manager for an element, or for the window without one.
|
|
855
|
+
* 要素 (無ければウインドウ) の管理役を作る。
|
|
856
|
+
*
|
|
857
|
+
* @param config - The edge bands and speeds. 端の帯と速さ。
|
|
858
|
+
* @param scrollElement - The element to scroll. スクロールする要素。
|
|
859
|
+
*/
|
|
860
|
+
constructor(n = Se, e) {
|
|
861
|
+
this.intervalId = null, this.isActive = !1, this.pointX = 0, this.pointY = 0, this.config = n, this.scrollElement = e;
|
|
862
|
+
}
|
|
863
|
+
/**
|
|
864
|
+
* Sets the element to scroll (the window without one).
|
|
865
|
+
* スクロールする要素を設定する (無ければウインドウ)。
|
|
866
|
+
*
|
|
867
|
+
* @param element - The element. 要素。
|
|
868
|
+
*/
|
|
869
|
+
setScrollElement(n) {
|
|
870
|
+
this.scrollElement = n;
|
|
871
|
+
}
|
|
872
|
+
/**
|
|
873
|
+
* Starts scrolling for a pointer at a point; while it runs, it only moves the point.
|
|
874
|
+
* ある点のポインタのスクロールを始める (動いている間は点だけを移す)。
|
|
875
|
+
*
|
|
876
|
+
* @param clientX - The pointer's viewport x. ポインタのビューポートの x。
|
|
877
|
+
* @param clientY - The pointer's viewport y. ポインタのビューポートの y。
|
|
878
|
+
*/
|
|
879
|
+
start(n, e) {
|
|
880
|
+
this.pointX = n, this.pointY = e, !this.isActive && (this.isActive = !0, this.intervalId = window.setInterval(() => {
|
|
881
|
+
const o = St(this.pointX, this.pointY, this.config, this.scrollElement);
|
|
882
|
+
sr(o, this.scrollElement);
|
|
883
|
+
}, 16));
|
|
884
|
+
}
|
|
885
|
+
/**
|
|
886
|
+
* Follows the pointer to a new point: starts scrolling when it enters an edge band, keeps scrolling toward its latest
|
|
887
|
+
* point while it stays in one, and stops when it leaves them.
|
|
888
|
+
* ポインタを新しい点へ追う処理 (端の帯へ入るとスクロールを始め、帯の中にいる間は最新の点へ向けて続け、帯を出ると止める)。
|
|
889
|
+
*
|
|
890
|
+
* @param clientX - The pointer's viewport x. ポインタのビューポートの x。
|
|
891
|
+
* @param clientY - The pointer's viewport y. ポインタのビューポートの y。
|
|
892
|
+
*/
|
|
893
|
+
update(n, e) {
|
|
894
|
+
this.pointX = n, this.pointY = e;
|
|
895
|
+
const o = St(n, e, this.config, this.scrollElement);
|
|
896
|
+
(o.x !== 0 || o.y !== 0) && !this.isActive ? this.start(n, e) : o.x === 0 && o.y === 0 && this.isActive && this.stop();
|
|
897
|
+
}
|
|
898
|
+
/**
|
|
899
|
+
* Stops scrolling.
|
|
900
|
+
* スクロールを止める。
|
|
901
|
+
*/
|
|
902
|
+
stop() {
|
|
903
|
+
this.intervalId !== null && (clearInterval(this.intervalId), this.intervalId = null), this.isActive = !1;
|
|
904
|
+
}
|
|
905
|
+
/**
|
|
906
|
+
* Whether it is scrolling now.
|
|
907
|
+
* 今スクロールしているか。
|
|
908
|
+
*
|
|
909
|
+
* @returns Whether a scroll runs. スクロールが動いているか。
|
|
910
|
+
*/
|
|
911
|
+
isScrolling() {
|
|
912
|
+
return this.isActive;
|
|
913
|
+
}
|
|
914
|
+
/**
|
|
915
|
+
* Replaces the edge bands and speeds.
|
|
916
|
+
* 端の帯と速さを置き換える。
|
|
917
|
+
*
|
|
918
|
+
* @param newConfig - The edge bands and speeds. 端の帯と速さ。
|
|
919
|
+
*/
|
|
920
|
+
updateConfig(n) {
|
|
921
|
+
this.config = n;
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
const Tt = "custom-dragging", ar = (t, n) => t === null ? n === null : n !== null && t.columnIndex === n.columnIndex && t.insertIndex === n.insertIndex, Lt = (t, n, e) => {
|
|
925
|
+
const { left: o, top: r, right: a, bottom: l } = t.getBoundingClientRect();
|
|
926
|
+
return n < o || n > a || e < r || e > l;
|
|
927
|
+
}, lr = (t, n) => {
|
|
928
|
+
let e = null;
|
|
929
|
+
const o = (d) => {
|
|
930
|
+
const $ = t(), T = $.layoutRef.current;
|
|
931
|
+
if (T === null || Lt(T, d.x, d.y)) return null;
|
|
932
|
+
const Y = tr(T, d.x, d.y), G = $.originOf(d.panelId);
|
|
933
|
+
return Y === null || G === null || et(G, Y.columnIndex, Y.insertIndex) ? null : Y;
|
|
934
|
+
}, r = () => {
|
|
935
|
+
if (e === null || e.phase !== "dragging") return;
|
|
936
|
+
const d = o(e);
|
|
937
|
+
n(($) => $ === null || ar($.over, d) ? $ : { panelId: $.panelId, over: d });
|
|
938
|
+
}, a = (d) => {
|
|
939
|
+
if (e === null || d.pointerId !== e.pointerId) return;
|
|
940
|
+
if (e.x = d.clientX, e.y = d.clientY, e.phase === "pressing") {
|
|
941
|
+
Math.hypot(e.x - e.startX, e.y - e.startY) > t().config.slop && E();
|
|
942
|
+
return;
|
|
943
|
+
}
|
|
944
|
+
const $ = t(), T = $.layoutRef.current;
|
|
945
|
+
if (T === null || Lt(T, e.x, e.y)) {
|
|
946
|
+
c();
|
|
947
|
+
return;
|
|
948
|
+
}
|
|
949
|
+
Kt(e.image, e.x, e.y, e.offset, $.scale), e.edgeScroll.update(e.x, e.y), r();
|
|
950
|
+
}, l = (d) => {
|
|
951
|
+
if (e === null || d.pointerId !== e.pointerId) return;
|
|
952
|
+
if (e.phase === "pressing") {
|
|
953
|
+
E();
|
|
954
|
+
return;
|
|
955
|
+
}
|
|
956
|
+
e.x = d.clientX, e.y = d.clientY;
|
|
957
|
+
const $ = o(e), T = E();
|
|
958
|
+
if (T === null) return;
|
|
959
|
+
const Y = t();
|
|
960
|
+
$ === null ? Y.onCancel(T.panelId) : Y.onDrop(T.panelId, $);
|
|
961
|
+
}, u = (d) => {
|
|
962
|
+
e !== null && d.pointerId === e.pointerId && c();
|
|
963
|
+
}, f = (d) => {
|
|
964
|
+
e !== null && e.phase === "pressing" && d.pointerId !== e.pointerId && E();
|
|
965
|
+
}, b = (d) => {
|
|
966
|
+
e !== null && e.phase === "dragging" && d.pointerId === e.pointerId && d.target === e.header && c();
|
|
967
|
+
}, y = (d) => {
|
|
968
|
+
e === null || e.phase !== "dragging" || d.key !== "Escape" || d.defaultPrevented || d.isComposing || (d.preventDefault(), c());
|
|
969
|
+
}, A = () => {
|
|
970
|
+
document.addEventListener("pointermove", a, !0), document.addEventListener("pointerup", l, !0), document.addEventListener("pointercancel", u, !0), document.addEventListener("pointerdown", f, !0), document.addEventListener("lostpointercapture", b, !0), document.addEventListener("keydown", y, !0);
|
|
971
|
+
}, z = () => {
|
|
972
|
+
document.removeEventListener("pointermove", a, !0), document.removeEventListener("pointerup", l, !0), document.removeEventListener("pointercancel", u, !0), document.removeEventListener("pointerdown", f, !0), document.removeEventListener("lostpointercapture", b, !0), document.removeEventListener("keydown", y, !0);
|
|
973
|
+
}, E = () => {
|
|
974
|
+
const d = e;
|
|
975
|
+
return d === null ? null : (e = null, z(), d.phase === "pressing" ? (window.clearTimeout(d.timer), d) : (document.removeEventListener("scroll", r, !0), d.edgeScroll.stop(), d.image.remove(), document.body.classList.remove(Tt), d.header.hasPointerCapture(d.pointerId) && d.header.releasePointerCapture(d.pointerId), n(null), d));
|
|
976
|
+
}, c = () => {
|
|
977
|
+
const d = E();
|
|
978
|
+
d !== null && d.phase === "dragging" && t().onCancel(d.panelId);
|
|
979
|
+
}, P = () => {
|
|
980
|
+
if (e === null || e.phase !== "pressing") return;
|
|
981
|
+
const d = e, $ = t(), T = $.panelElementOf(d.panelId), Y = $.scrollRootRef.current;
|
|
982
|
+
if (!$.canStart || T === null || Y === null || !d.header.isConnected) {
|
|
983
|
+
E();
|
|
984
|
+
return;
|
|
985
|
+
}
|
|
986
|
+
try {
|
|
987
|
+
d.header.setPointerCapture(d.pointerId);
|
|
988
|
+
} catch (v) {
|
|
989
|
+
if (v instanceof DOMException) {
|
|
990
|
+
E();
|
|
991
|
+
return;
|
|
992
|
+
}
|
|
993
|
+
throw v;
|
|
994
|
+
}
|
|
995
|
+
const { left: G, top: g } = T.getBoundingClientRect();
|
|
996
|
+
e = {
|
|
997
|
+
phase: "dragging",
|
|
998
|
+
pointerId: d.pointerId,
|
|
999
|
+
panelId: d.panelId,
|
|
1000
|
+
header: d.header,
|
|
1001
|
+
image: Gt(T, d.panelId, $.scale),
|
|
1002
|
+
offset: { x: d.x - G, y: d.y - g },
|
|
1003
|
+
edgeScroll: new rt(Se, Y),
|
|
1004
|
+
x: d.x,
|
|
1005
|
+
y: d.y
|
|
1006
|
+
}, document.addEventListener("scroll", r, { capture: !0, passive: !0 }), document.body.classList.add(Tt), n({ panelId: d.panelId, over: null }), $.onLift(d.panelId);
|
|
1007
|
+
};
|
|
1008
|
+
return { pressHeader: (d, $) => {
|
|
1009
|
+
if (e !== null || !d.isPrimary || d.button !== 0 || d.pointerType !== "touch" && d.pointerType !== "pen") return;
|
|
1010
|
+
const T = t();
|
|
1011
|
+
T.canStart && (d.target instanceof Element && d.target.closest(`[${Ee}]`) !== null || (e = {
|
|
1012
|
+
phase: "pressing",
|
|
1013
|
+
pointerId: d.pointerId,
|
|
1014
|
+
panelId: $,
|
|
1015
|
+
header: d.currentTarget,
|
|
1016
|
+
startX: d.clientX,
|
|
1017
|
+
startY: d.clientY,
|
|
1018
|
+
timer: window.setTimeout(P, T.config.longPressDelay),
|
|
1019
|
+
x: d.clientX,
|
|
1020
|
+
y: d.clientY
|
|
1021
|
+
}, A()));
|
|
1022
|
+
}, holdContextMenu: (d) => {
|
|
1023
|
+
e !== null && e.header === d.currentTarget && d.preventDefault();
|
|
1024
|
+
}, bindHeader: (d) => {
|
|
1025
|
+
if (d === null) return;
|
|
1026
|
+
const $ = (T) => {
|
|
1027
|
+
e !== null && e.phase === "dragging" && e.header === d && T.cancelable && T.preventDefault();
|
|
1028
|
+
};
|
|
1029
|
+
return d.addEventListener("touchmove", $, { passive: !1 }), () => d.removeEventListener("touchmove", $);
|
|
1030
|
+
}, cancel: c, dispose: () => {
|
|
1031
|
+
E();
|
|
1032
|
+
} };
|
|
1033
|
+
}, ir = (t) => {
|
|
1034
|
+
const n = W(t);
|
|
1035
|
+
we(() => {
|
|
1036
|
+
n.current = t;
|
|
1037
|
+
});
|
|
1038
|
+
const [e, o] = se(null), [r] = se(() => lr(() => n.current, o));
|
|
1039
|
+
return ee(() => r.dispose, [r]), { touchDrag: e, pressHeader: r.pressHeader, holdContextMenu: r.holdContextMenu, bindHeader: r.bindHeader, cancel: r.cancel };
|
|
1040
|
+
}, qe = Object.freeze({
|
|
1041
|
+
switchToCustomDragMode: { text: "カスタムドラッグモードに切り替え", lang: "ja" },
|
|
1042
|
+
switchToNormalDragMode: { text: "通常ドラッグモードに戻す", lang: "ja" },
|
|
1043
|
+
hidePanel: { text: "パネルを非表示", lang: "ja" },
|
|
1044
|
+
maximizePanel: { text: "パネルを最大化", lang: "ja" },
|
|
1045
|
+
restorePanel: { text: "元のサイズに戻す", lang: "ja" },
|
|
1046
|
+
closePanel: { text: "パネルを閉じる", lang: "ja" },
|
|
1047
|
+
movePanelToPreviousColumn: { text: "前の列へ移動", lang: "ja" },
|
|
1048
|
+
movePanelToNextColumn: { text: "次の列へ移動", lang: "ja" },
|
|
1049
|
+
movePanelUp: { text: "上へ移動", lang: "ja" },
|
|
1050
|
+
movePanelDown: { text: "下へ移動", lang: "ja" },
|
|
1051
|
+
customDragModeBadge: { text: "Custom", lang: "en" },
|
|
1052
|
+
panelMoved: { text: "{title} を {column} 列目の {position} 番目へ移動しました", lang: "ja" },
|
|
1053
|
+
panelMoveUnavailable: { text: "{title} は{move}できません", lang: "ja" },
|
|
1054
|
+
panelDragStarted: { text: "{title} を持ち上げました", lang: "ja" },
|
|
1055
|
+
panelDragCancelled: { text: "{title} の移動を取り消しました", lang: "ja" },
|
|
1056
|
+
hiddenPanels: { text: "非表示のパネル:", lang: "ja" },
|
|
1057
|
+
hiddenPanelBadge: { text: "非表示", lang: "ja" },
|
|
1058
|
+
hiddenPanelNotice: { text: "このパネルは非表示です", lang: "ja" },
|
|
1059
|
+
emptyColumn: { text: "このエリアは空です", lang: "ja" },
|
|
1060
|
+
dropZone: { text: "Drop zone for column {column}", lang: "en" },
|
|
1061
|
+
dropHere: { text: "パネルをここにドロップ", lang: "ja" },
|
|
1062
|
+
resizeColumn: { text: "{column} 列目のカラム幅を調整", lang: "ja" }
|
|
1063
|
+
}), _t = new Set(Object.keys(qe)), cr = Object.freeze({
|
|
1064
|
+
panelMoved: Object.freeze(["title", "column", "position"]),
|
|
1065
|
+
panelMoveUnavailable: Object.freeze(["title", "move"]),
|
|
1066
|
+
panelDragStarted: Object.freeze(["title"]),
|
|
1067
|
+
panelDragCancelled: Object.freeze(["title"]),
|
|
1068
|
+
dropZone: Object.freeze(["column"]),
|
|
1069
|
+
resizeColumn: Object.freeze(["column"])
|
|
1070
|
+
}), Qt = /\{(\w+)\}/g, Hr = Object.freeze(Object.fromEntries(Object.entries(qe).map(([t, n]) => [t, n.text]))), ur = (t) => {
|
|
1071
|
+
if (t !== void 0) {
|
|
1072
|
+
const e = t;
|
|
1073
|
+
if (e === null || typeof e != "object")
|
|
1074
|
+
throw new TypeError(`[@aiquants/drag-drop-panels] labels must be an object; got ${e === null ? "null" : typeof e}`);
|
|
1075
|
+
for (const o of Object.keys(e))
|
|
1076
|
+
if (!_t.has(o))
|
|
1077
|
+
throw new RangeError(`[@aiquants/drag-drop-panels] labels has the unknown key "${o}"; the labels are ${[..._t].join(", ")}`);
|
|
1078
|
+
}
|
|
1079
|
+
const n = {};
|
|
1080
|
+
for (const e of Object.keys(qe)) {
|
|
1081
|
+
const o = t?.[e];
|
|
1082
|
+
if (o === void 0) {
|
|
1083
|
+
n[e] = qe[e];
|
|
1084
|
+
continue;
|
|
1085
|
+
}
|
|
1086
|
+
if (typeof o != "string")
|
|
1087
|
+
throw new TypeError(`[@aiquants/drag-drop-panels] label "${e}" must be a string; got ${o === null ? "null" : typeof o}`);
|
|
1088
|
+
const r = cr[e];
|
|
1089
|
+
if (r !== void 0) {
|
|
1090
|
+
for (const [, a] of o.matchAll(Qt))
|
|
1091
|
+
if (!r.includes(a))
|
|
1092
|
+
throw new RangeError(`[@aiquants/drag-drop-panels] label "${e}" uses the unknown placeholder {${a}}; it accepts ${r.map((l) => `{${l}}`).join(", ")}`);
|
|
1093
|
+
}
|
|
1094
|
+
n[e] = { text: o, lang: void 0 };
|
|
1095
|
+
}
|
|
1096
|
+
return Object.freeze(n);
|
|
1097
|
+
}, ze = (t, n) => {
|
|
1098
|
+
const e = [], o = (r, a) => {
|
|
1099
|
+
if (r === "") return;
|
|
1100
|
+
const l = e[e.length - 1];
|
|
1101
|
+
if (l !== void 0 && l.lang === a) {
|
|
1102
|
+
e[e.length - 1] = { text: `${l.text}${r}`, lang: a };
|
|
1103
|
+
return;
|
|
1104
|
+
}
|
|
1105
|
+
e.push({ text: r, lang: a });
|
|
1106
|
+
};
|
|
1107
|
+
for (const [r, a] of t.text.split(Qt).entries()) {
|
|
1108
|
+
if (r % 2 === 0) {
|
|
1109
|
+
o(a, t.lang);
|
|
1110
|
+
continue;
|
|
1111
|
+
}
|
|
1112
|
+
const l = n[a];
|
|
1113
|
+
if (l === void 0) throw new RangeError(`[@aiquants/drag-drop-panels] no value for the placeholder {${a}} of "${t.text}"`);
|
|
1114
|
+
typeof l == "number" ? o(String(l), t.lang) : o(l.text, l.lang);
|
|
1115
|
+
}
|
|
1116
|
+
return e;
|
|
1117
|
+
}, Rt = (t, n) => ({
|
|
1118
|
+
text: ze(t, n).map((e) => e.text).join(""),
|
|
1119
|
+
lang: t.lang
|
|
1120
|
+
}), dr = 229, hr = /* @__PURE__ */ new Set(["", "auto", "hint"]), mr = (t) => {
|
|
1121
|
+
for (const n of t.querySelectorAll("[popover]")) {
|
|
1122
|
+
const e = n.getAttribute("popover");
|
|
1123
|
+
if (e !== null && hr.has(e.toLowerCase()) && n.matches(":popover-open")) return !0;
|
|
1124
|
+
}
|
|
1125
|
+
return !1;
|
|
1126
|
+
}, fr = (t) => t.key !== "Escape" || t.defaultPrevented || t.isComposing || t.keyCode === dr || t.target instanceof Element && t.target.closest("dialog[open]") !== null ? !1 : !("popover" in HTMLElement.prototype && mr(document)), en = ({ columnId: t, onResizeStart: n, onResize: e, onResizeEnd: o, isResizing: r = !1, position: a = "right", className: l = "", debug: u = {}, label: f }) => {
|
|
1127
|
+
const b = W(!1), y = W(null);
|
|
1128
|
+
ee(() => {
|
|
1129
|
+
!r && b.current && (O(u, 1, "外部からのリサイズ解除を検出、ドラッグ状態を強制解除:", t), b.current = !1, document.body.style.cursor = "", document.body.style.userSelect = "", document.body.classList.remove("resizing-column"));
|
|
1130
|
+
}, [r, t, u]);
|
|
1131
|
+
const A = D(
|
|
1132
|
+
(c) => {
|
|
1133
|
+
c.preventDefault(), c.stopPropagation(), O(u, 2, "リサイズハンドル マウスダウン:", t), b.current = !0, n(t, c.clientX), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.body.classList.add("resizing-column");
|
|
676
1134
|
},
|
|
677
|
-
[
|
|
1135
|
+
[t, n, u]
|
|
678
1136
|
);
|
|
679
|
-
|
|
680
|
-
const
|
|
681
|
-
|
|
682
|
-
},
|
|
683
|
-
|
|
1137
|
+
ee(() => {
|
|
1138
|
+
const c = (k) => {
|
|
1139
|
+
b.current && (k.preventDefault(), e(k.clientX));
|
|
1140
|
+
}, P = () => {
|
|
1141
|
+
b.current && (O(u, 2, "リサイズハンドル マウスアップ:", t), b.current = !1, o(), document.body.style.cursor = "", document.body.style.userSelect = "", document.body.classList.remove("resizing-column"));
|
|
684
1142
|
};
|
|
685
|
-
return document.addEventListener("mousemove",
|
|
686
|
-
document.removeEventListener("mousemove",
|
|
1143
|
+
return document.addEventListener("mousemove", c), document.addEventListener("mouseup", P), () => {
|
|
1144
|
+
document.removeEventListener("mousemove", c), document.removeEventListener("mouseup", P);
|
|
687
1145
|
};
|
|
688
|
-
}, [
|
|
689
|
-
const
|
|
690
|
-
(
|
|
691
|
-
|
|
692
|
-
const
|
|
693
|
-
|
|
1146
|
+
}, [t, e, o, u]);
|
|
1147
|
+
const z = D(
|
|
1148
|
+
(c) => {
|
|
1149
|
+
c.preventDefault(), c.stopPropagation();
|
|
1150
|
+
const P = c.touches[0];
|
|
1151
|
+
O(u, 2, "リサイズハンドル タッチスタート:", t), b.current = !0, n(t, P.clientX), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.body.classList.add("resizing-column");
|
|
694
1152
|
},
|
|
695
|
-
[
|
|
1153
|
+
[t, n, u]
|
|
696
1154
|
);
|
|
697
|
-
|
|
698
|
-
const
|
|
699
|
-
if (!
|
|
700
|
-
|
|
701
|
-
const
|
|
702
|
-
|
|
703
|
-
},
|
|
704
|
-
|
|
1155
|
+
ee(() => {
|
|
1156
|
+
const c = (k) => {
|
|
1157
|
+
if (!b.current) return;
|
|
1158
|
+
k.preventDefault();
|
|
1159
|
+
const S = k.touches[0];
|
|
1160
|
+
e(S.clientX);
|
|
1161
|
+
}, P = () => {
|
|
1162
|
+
b.current && (O(u, 2, "リサイズハンドル タッチエンド:", t), b.current = !1, o(), document.body.style.cursor = "", document.body.style.userSelect = "", document.body.classList.remove("resizing-column"));
|
|
705
1163
|
};
|
|
706
|
-
return document.addEventListener("touchmove",
|
|
707
|
-
document.removeEventListener("touchmove",
|
|
1164
|
+
return document.addEventListener("touchmove", c, { passive: !1 }), document.addEventListener("touchend", P), () => {
|
|
1165
|
+
document.removeEventListener("touchmove", c), document.removeEventListener("touchend", P);
|
|
708
1166
|
};
|
|
709
|
-
}, [
|
|
710
|
-
|
|
711
|
-
}, [
|
|
712
|
-
const
|
|
1167
|
+
}, [t, e, o, u]), ee(() => () => {
|
|
1168
|
+
b.current && (O(u, 1, "リサイズハンドルアンマウント時のクリーンアップ:", t), document.body.style.cursor = "", document.body.style.userSelect = "", document.body.classList.remove("resizing-column"));
|
|
1169
|
+
}, [t, u]);
|
|
1170
|
+
const E = ["resize-handle", a, r ? "resizing" : "", l].filter(Boolean).join(" ");
|
|
713
1171
|
return (
|
|
714
1172
|
// biome-ignore lint/a11y/useFocusableInteractive: リサイズハンドルとして機能するためインタラクティブである必要がある
|
|
715
1173
|
// biome-ignore lint/a11y/useSemanticElements: divを使用するが、aria-roleでセマンティックな意味を提供している
|
|
716
1174
|
// biome-ignore lint/a11y/useAriaPropsForRole: リサイズハンドルのため、値の範囲を指定することが難しい
|
|
717
|
-
/* @__PURE__ */
|
|
718
|
-
/* @__PURE__ */
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
1175
|
+
/* @__PURE__ */ s.jsxs("div", { ref: y, className: E, onMouseDown: A, onTouchStart: z, "data-column-id": t, "data-position": a, "aria-label": f.text, lang: f.lang, role: "separator", "aria-orientation": "vertical", children: [
|
|
1176
|
+
/* @__PURE__ */ s.jsx("div", { className: "resize-handle-bar" }),
|
|
1177
|
+
u.showPanelSizes && /* @__PURE__ */ s.jsxs("div", { className: "resize-handle-debug-info", children: [
|
|
1178
|
+
t,
|
|
1179
|
+
r && " (resizing)"
|
|
722
1180
|
] })
|
|
723
1181
|
] })
|
|
724
1182
|
);
|
|
725
|
-
},
|
|
726
|
-
const
|
|
727
|
-
return
|
|
728
|
-
const
|
|
729
|
-
|
|
730
|
-
}, [
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
1183
|
+
}, Yr = ({ columnId: t, width: n, minWidth: e = 100, maxWidth: o = 800, onResizeStart: r, onResize: a, onResizeEnd: l, isResizing: u = !1, resizable: f = !0, className: b = "", debug: y = {}, resizeHandleLabel: A, children: z }) => {
|
|
1184
|
+
const E = ["resizable-column", u ? "resizing" : "", b].filter(Boolean).join(" ");
|
|
1185
|
+
return ee(() => {
|
|
1186
|
+
const c = document.querySelector(`[data-column-id="${t}"]`);
|
|
1187
|
+
c && (c.style.setProperty("--column-width", `${n}px`), c.style.setProperty("--column-min-width", `${e}px`), c.style.setProperty("--column-max-width", `${o}px`));
|
|
1188
|
+
}, [t, n, e, o]), /* @__PURE__ */ s.jsxs("div", { className: E, "data-column-id": t, "data-width": n, "data-min-width": e, "data-max-width": o, children: [
|
|
1189
|
+
z,
|
|
1190
|
+
f && /* @__PURE__ */ s.jsx(en, { columnId: t, onResizeStart: r, onResize: a, onResizeEnd: l, isResizing: u, position: "right", debug: y, label: A }),
|
|
1191
|
+
y.showPanelSizes && /* @__PURE__ */ s.jsxs("div", { className: "column-debug-size", children: [
|
|
1192
|
+
n,
|
|
735
1193
|
"px",
|
|
736
|
-
|
|
1194
|
+
u && " ↔"
|
|
737
1195
|
] })
|
|
738
1196
|
] });
|
|
739
|
-
},
|
|
1197
|
+
}, pr = Object.freeze({ longPressDelay: 500, slop: 10 }), Ve = Object.freeze(["longPressDelay", "slop"]), gr = (t) => {
|
|
1198
|
+
const n = t;
|
|
1199
|
+
if (n === null || typeof n != "object")
|
|
1200
|
+
throw new TypeError(`[@aiquants/drag-drop-panels] touchDragConfig must be an object; got ${n === null ? "null" : typeof n}`);
|
|
1201
|
+
for (const e of Object.keys(n))
|
|
1202
|
+
if (!Ve.includes(e))
|
|
1203
|
+
throw new RangeError(`[@aiquants/drag-drop-panels] touchDragConfig has the unknown key "${e}"; the keys are ${Ve.join(", ")}`);
|
|
1204
|
+
for (const e of Ve) {
|
|
1205
|
+
const o = t[e];
|
|
1206
|
+
if (typeof o != "number")
|
|
1207
|
+
throw new TypeError(`[@aiquants/drag-drop-panels] touchDragConfig.${e} must be a number; got ${o === null ? "null" : typeof o}`);
|
|
1208
|
+
if (!Number.isFinite(o) || o < 0)
|
|
1209
|
+
throw new RangeError(`[@aiquants/drag-drop-panels] touchDragConfig.${e} must be a finite number of 0 or more; got ${o}`);
|
|
1210
|
+
}
|
|
1211
|
+
}, zt = Object.freeze({
|
|
1212
|
+
"previous-column": "movePanelToPreviousColumn",
|
|
1213
|
+
"next-column": "movePanelToNextColumn",
|
|
1214
|
+
up: "movePanelUp",
|
|
1215
|
+
down: "movePanelDown"
|
|
1216
|
+
}), xr = Object.freeze({ "previous-column": kn, "next-column": On, up: Mn, down: En }), vr = 'input, textarea, select, [contenteditable]:not([contenteditable="false"])', Ze = (t, n) => ({ segments: n, serial: t === null ? 1 : t.serial + 1 }), br = "", yr = "(prefers-reduced-motion: reduce)", wr = () => typeof window.matchMedia == "function" && window.matchMedia(yr).matches, jr = (t) => {
|
|
1217
|
+
t.key === "Enter" && t.repeat && t.preventDefault();
|
|
1218
|
+
}, Me = ({ action: t, label: n, tooltip: e, unavailable: o, keyShortcuts: r, onActivate: a, children: l }) => /* @__PURE__ */ s.jsx(
|
|
1219
|
+
"button",
|
|
1220
|
+
{
|
|
1221
|
+
type: "button",
|
|
1222
|
+
[Ee]: t,
|
|
1223
|
+
"aria-label": n.text,
|
|
1224
|
+
"aria-disabled": o ? !0 : void 0,
|
|
1225
|
+
"aria-keyshortcuts": r,
|
|
1226
|
+
title: e,
|
|
1227
|
+
lang: n.lang,
|
|
1228
|
+
className: "rounded p-1 motion-safe:transition-colors",
|
|
1229
|
+
onClick: (u) => {
|
|
1230
|
+
u.stopPropagation(), a();
|
|
1231
|
+
},
|
|
1232
|
+
children: l
|
|
1233
|
+
}
|
|
1234
|
+
), Je = hn(
|
|
740
1235
|
({
|
|
741
|
-
index:
|
|
742
|
-
columnIndex:
|
|
743
|
-
isDragging:
|
|
744
|
-
dragOverPosition:
|
|
745
|
-
originalPosition:
|
|
746
|
-
onDragEnter:
|
|
747
|
-
onDragLeave:
|
|
748
|
-
debugConfig:
|
|
749
|
-
customDrag:
|
|
750
|
-
|
|
1236
|
+
index: t,
|
|
1237
|
+
columnIndex: n,
|
|
1238
|
+
isDragging: e,
|
|
1239
|
+
dragOverPosition: o,
|
|
1240
|
+
originalPosition: r,
|
|
1241
|
+
onDragEnter: a,
|
|
1242
|
+
onDragLeave: l,
|
|
1243
|
+
debugConfig: u,
|
|
1244
|
+
customDrag: f,
|
|
1245
|
+
label: b
|
|
1246
|
+
}) => /* @__PURE__ */ s.jsx(Bt, { index: t, columnIndex: n, isDragging: e, dragOverPosition: o, originalPosition: r, onDragEnter: a, onDragLeave: l, config: u, customDrag: f, label: b })
|
|
751
1247
|
);
|
|
752
|
-
|
|
753
|
-
const
|
|
754
|
-
columns:
|
|
755
|
-
panels:
|
|
756
|
-
columnPanels:
|
|
757
|
-
|
|
758
|
-
panelVisibility:
|
|
759
|
-
onPanelVisibilityChange:
|
|
760
|
-
dragState:
|
|
1248
|
+
Je.displayName = "LocalInsertPlaceholder";
|
|
1249
|
+
const Fr = ({
|
|
1250
|
+
columns: t,
|
|
1251
|
+
panels: n,
|
|
1252
|
+
columnPanels: e,
|
|
1253
|
+
onColumnPanelsChange: o,
|
|
1254
|
+
panelVisibility: r,
|
|
1255
|
+
onPanelVisibilityChange: a,
|
|
1256
|
+
dragState: l,
|
|
761
1257
|
dragOverPosition: u,
|
|
762
|
-
originalPanelPosition:
|
|
763
|
-
dragModes:
|
|
764
|
-
onDragStart:
|
|
765
|
-
onDragEnd:
|
|
766
|
-
onPlaceholderDragEnter:
|
|
767
|
-
onPlaceholderDragLeave:
|
|
768
|
-
onDragOverWithInsert:
|
|
769
|
-
onDropWithInsert:
|
|
770
|
-
onColumnDragLeave:
|
|
771
|
-
onPanelClick:
|
|
772
|
-
onPanelMouseDown:
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
onTouchEnd: Z,
|
|
776
|
-
debugConfig: Y,
|
|
777
|
-
panelSizes: U,
|
|
1258
|
+
originalPanelPosition: f,
|
|
1259
|
+
dragModes: b,
|
|
1260
|
+
onDragStart: y,
|
|
1261
|
+
onDragEnd: A,
|
|
1262
|
+
onPlaceholderDragEnter: z,
|
|
1263
|
+
onPlaceholderDragLeave: E,
|
|
1264
|
+
onDragOverWithInsert: c,
|
|
1265
|
+
onDropWithInsert: P,
|
|
1266
|
+
onColumnDragLeave: k,
|
|
1267
|
+
onPanelClick: S,
|
|
1268
|
+
onPanelMouseDown: N,
|
|
1269
|
+
debugConfig: R,
|
|
1270
|
+
panelSizes: d,
|
|
778
1271
|
setPanelRef: $,
|
|
779
|
-
enableResize:
|
|
780
|
-
columnWidths:
|
|
1272
|
+
enableResize: T = !1,
|
|
1273
|
+
columnWidths: Y,
|
|
781
1274
|
// onColumnWidthChange,
|
|
782
|
-
onResizeStart:
|
|
783
|
-
onResize:
|
|
784
|
-
onResizeEnd:
|
|
785
|
-
isResizing:
|
|
786
|
-
resizingColumn:
|
|
1275
|
+
onResizeStart: G,
|
|
1276
|
+
onResize: g,
|
|
1277
|
+
onResizeEnd: v,
|
|
1278
|
+
isResizing: L = !1,
|
|
1279
|
+
resizingColumn: w,
|
|
787
1280
|
onPanelSizeInfoClick: m,
|
|
788
|
-
onToggleDragMode:
|
|
789
|
-
onPanelClose:
|
|
790
|
-
onPanelMaximizeChange:
|
|
791
|
-
customDrag:
|
|
792
|
-
dragHandle:
|
|
793
|
-
maximizedPanel:
|
|
794
|
-
panelClassName:
|
|
795
|
-
scale:
|
|
796
|
-
autoScale:
|
|
797
|
-
onScaleChange:
|
|
1281
|
+
onToggleDragMode: p,
|
|
1282
|
+
onPanelClose: j,
|
|
1283
|
+
onPanelMaximizeChange: _,
|
|
1284
|
+
customDrag: I,
|
|
1285
|
+
dragHandle: re = "panel",
|
|
1286
|
+
maximizedPanel: V = null,
|
|
1287
|
+
panelClassName: oe = "",
|
|
1288
|
+
scale: h,
|
|
1289
|
+
autoScale: x,
|
|
1290
|
+
onScaleChange: M,
|
|
1291
|
+
scrollRootElement: F = "div",
|
|
1292
|
+
labels: Z,
|
|
1293
|
+
touchDragConfig: ae = pr
|
|
798
1294
|
}) => {
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
const
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
1295
|
+
if (F !== "div" && F !== "main")
|
|
1296
|
+
throw new RangeError(`[@aiquants/drag-drop-panels] scrollRootElement must be "div" or "main"; got ${JSON.stringify(F)}`);
|
|
1297
|
+
const X = F, H = Re(() => ur(Z), [Z]);
|
|
1298
|
+
gr(ae);
|
|
1299
|
+
const ve = mn(), ue = Re(() => {
|
|
1300
|
+
const i = {};
|
|
1301
|
+
return n.forEach((C) => {
|
|
1302
|
+
i[C.id] = C;
|
|
1303
|
+
}), i;
|
|
1304
|
+
}, [n]), pe = Re(
|
|
1305
|
+
() => ({
|
|
1306
|
+
columnKeys: t.map((i) => i.key),
|
|
1307
|
+
columnPanels: e,
|
|
1308
|
+
panelVisibility: Object.fromEntries(Object.keys(r).map((i) => [i, r[i] === !0 && ue[i] !== void 0]))
|
|
1309
|
+
}),
|
|
1310
|
+
[t, e, r, ue]
|
|
1311
|
+
), ot = V === null ? null : Pe(pe, V), de = ot !== null, be = W(R);
|
|
1312
|
+
ee(() => {
|
|
1313
|
+
be.current = R;
|
|
1314
|
+
}, [R]);
|
|
1315
|
+
const { containerRef: nn, scale: rn } = Jn(x?.requiredWidth ?? 0, x?.minScale), He = de ? 1 : h ?? (x ? rn : 1), ge = Number.isFinite(He) && He > 0 ? He : 1, st = W(ge);
|
|
1316
|
+
st.current = ge, ee(() => {
|
|
1317
|
+
M && M(ge);
|
|
1318
|
+
}, [ge, M]);
|
|
1319
|
+
const on = ge < 1 ? {
|
|
1320
|
+
width: `${100 / ge}%`,
|
|
1321
|
+
height: `${100 / ge}%`,
|
|
1322
|
+
transform: `scale(${ge})`,
|
|
811
1323
|
transformOrigin: "top left"
|
|
812
|
-
} : void 0, he =
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
dragModes:
|
|
1324
|
+
} : void 0, he = W({}), Ye = W(/* @__PURE__ */ new Map());
|
|
1325
|
+
ee(() => {
|
|
1326
|
+
O(be.current, 1, "🎨 DragDropLayout - dragModes props changed:", {
|
|
1327
|
+
dragModes: b,
|
|
816
1328
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
817
|
-
keys: Object.keys(
|
|
818
|
-
values: Object.values(
|
|
1329
|
+
keys: Object.keys(b),
|
|
1330
|
+
values: Object.values(b)
|
|
819
1331
|
});
|
|
820
|
-
}, [
|
|
821
|
-
const
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
1332
|
+
}, [b]);
|
|
1333
|
+
const [Fe, Ue] = se(null), Ae = W(null), at = W({ arrangement: pe, labels: H, panelComponentMap: ue });
|
|
1334
|
+
we(() => {
|
|
1335
|
+
at.current = { arrangement: pe, labels: H, panelComponentMap: ue };
|
|
1336
|
+
});
|
|
1337
|
+
const lt = W(null), it = W(null), sn = D((i) => {
|
|
1338
|
+
it.current = i;
|
|
1339
|
+
}, []), ct = W(null), Be = (i, C) => {
|
|
1340
|
+
const q = ue[C];
|
|
1341
|
+
if (q === void 0) return;
|
|
1342
|
+
const K = ze(i, { title: { text: q.title, lang: void 0 } });
|
|
1343
|
+
Ue((J) => Ze(J, K));
|
|
1344
|
+
}, ut = (i, C, q, K) => {
|
|
1345
|
+
const J = he.current[i], te = document.activeElement, ne = J instanceof HTMLElement && te !== null && J.contains(te) ? te.closest(`[${Ee}]`)?.getAttribute(Ee) ?? K : null;
|
|
1346
|
+
Ae.current = { panelId: i, from: C, columnPanels: pe.columnPanels, focusAction: ne }, o(q);
|
|
1347
|
+
}, dt = (i) => {
|
|
1348
|
+
for (const [C, q] of t.entries()) {
|
|
1349
|
+
const K = (e[q.key] ?? []).indexOf(i);
|
|
1350
|
+
if (K >= 0) return { columnIndex: C, panelIndex: K };
|
|
1351
|
+
}
|
|
1352
|
+
return null;
|
|
1353
|
+
}, an = (i, C) => {
|
|
1354
|
+
const q = Pe(pe, i), K = t[C.columnIndex], J = q === null || K === void 0 ? null : Yt(e, i, K.key, C.insertIndex);
|
|
1355
|
+
if (q === null || J === null) {
|
|
1356
|
+
Be(H.panelDragCancelled, i);
|
|
829
1357
|
return;
|
|
830
|
-
|
|
831
|
-
|
|
1358
|
+
}
|
|
1359
|
+
ut(i, q, J, null);
|
|
1360
|
+
}, ht = !(l.isDragging || I?.isActive === !0 || de), ke = ir({
|
|
1361
|
+
config: ae,
|
|
1362
|
+
layoutRef: lt,
|
|
1363
|
+
scrollRootRef: it,
|
|
1364
|
+
scale: ge,
|
|
1365
|
+
canStart: ht,
|
|
1366
|
+
panelElementOf: (i) => he.current[i] ?? null,
|
|
1367
|
+
originOf: dt,
|
|
1368
|
+
onLift: (i) => Be(H.panelDragStarted, i),
|
|
1369
|
+
onDrop: an,
|
|
1370
|
+
onCancel: (i) => Be(H.panelDragCancelled, i)
|
|
1371
|
+
}), { touchDrag: ye } = ke, mt = ye !== null && (!ht || Pe(pe, ye.panelId) === null), ft = ke.cancel;
|
|
1372
|
+
ee(() => {
|
|
1373
|
+
mt && ft();
|
|
1374
|
+
}, [mt, ft]);
|
|
1375
|
+
const $e = l.isDragging || I?.isActive === !0 || ye !== null;
|
|
1376
|
+
we(() => {
|
|
1377
|
+
$e && (Ae.current = null);
|
|
1378
|
+
}, [$e]), we(() => {
|
|
1379
|
+
const i = Ae.current;
|
|
1380
|
+
if (i === null || (Ae.current = null, !Vn(i.columnPanels, e, i.panelId))) return;
|
|
1381
|
+
const C = at.current, q = Pe({ ...C.arrangement, columnPanels: e }, i.panelId);
|
|
1382
|
+
if (q === null || q.column === i.from.column && q.index === i.from.index) return;
|
|
1383
|
+
const K = ze(C.labels.panelMoved, { title: { text: C.panelComponentMap[i.panelId].title, lang: void 0 }, column: q.column + 1, position: q.index + 1 });
|
|
1384
|
+
Ue((Q) => Ze(Q, K));
|
|
1385
|
+
const J = he.current[i.panelId];
|
|
1386
|
+
if (i.focusAction === null || J === null || J === void 0) return;
|
|
1387
|
+
const { activeElement: te, body: ne } = document;
|
|
1388
|
+
if (te === null || te === ne) {
|
|
1389
|
+
const Q = J.querySelector(`[${Ee}="${i.focusAction}"]`);
|
|
1390
|
+
Q instanceof HTMLElement && Q.focus({ preventScroll: !0 });
|
|
1391
|
+
}
|
|
1392
|
+
const U = document.activeElement;
|
|
1393
|
+
U instanceof HTMLElement && J.contains(U) && U.scrollIntoView({ block: "nearest", inline: "nearest" });
|
|
1394
|
+
}, [e]), ee(() => {
|
|
1395
|
+
if (!(de && _))
|
|
1396
|
+
return;
|
|
1397
|
+
const i = (C) => {
|
|
1398
|
+
fr(C) && (C.preventDefault(), _(null));
|
|
832
1399
|
};
|
|
833
|
-
return document.addEventListener("keydown",
|
|
834
|
-
}, [
|
|
835
|
-
const
|
|
836
|
-
Object.keys(he.current).forEach((
|
|
837
|
-
const
|
|
838
|
-
if (
|
|
839
|
-
const
|
|
840
|
-
|
|
841
|
-
rect:
|
|
842
|
-
height:
|
|
843
|
-
width:
|
|
1400
|
+
return document.addEventListener("keydown", i), () => document.removeEventListener("keydown", i);
|
|
1401
|
+
}, [de, _]), we(() => {
|
|
1402
|
+
const i = /* @__PURE__ */ new Map();
|
|
1403
|
+
Object.keys(he.current).forEach((ne) => {
|
|
1404
|
+
const U = he.current[ne];
|
|
1405
|
+
if (U) {
|
|
1406
|
+
const Q = U.getBoundingClientRect();
|
|
1407
|
+
i.set(ne, {
|
|
1408
|
+
rect: Q,
|
|
1409
|
+
height: U.offsetHeight,
|
|
1410
|
+
width: U.offsetWidth
|
|
844
1411
|
});
|
|
845
1412
|
}
|
|
846
1413
|
});
|
|
847
|
-
const
|
|
848
|
-
Object.values(
|
|
849
|
-
|
|
850
|
-
|
|
1414
|
+
const C = Ye.current, q = 300, K = /* @__PURE__ */ new Set();
|
|
1415
|
+
Object.values(e).forEach((ne) => {
|
|
1416
|
+
ne.forEach((U) => {
|
|
1417
|
+
K.add(U);
|
|
851
1418
|
});
|
|
852
|
-
}), new Set(
|
|
853
|
-
|
|
854
|
-
})
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
1419
|
+
}), new Set(C.keys()).forEach((ne) => {
|
|
1420
|
+
K.has(ne) || (O(be.current, 1, "パネル削除検出 - クリーンアップ:", ne), C.delete(ne), he.current[ne] && delete he.current[ne]);
|
|
1421
|
+
});
|
|
1422
|
+
const te = !wr();
|
|
1423
|
+
i.forEach((ne, U) => {
|
|
1424
|
+
if (!te) return;
|
|
1425
|
+
const Q = C.get(U);
|
|
1426
|
+
if (Q) {
|
|
1427
|
+
const le = Q.rect.left - ne.rect.left, xe = Q.rect.top - ne.rect.top;
|
|
1428
|
+
if (le !== 0 || xe !== 0) {
|
|
1429
|
+
O(be.current, 2, "パネル移動検出 - アニメーション開始:", U, { dx: le, dy: xe });
|
|
1430
|
+
const ce = he.current[U];
|
|
1431
|
+
if (ce) {
|
|
1432
|
+
const Te = st.current || 1;
|
|
1433
|
+
ce.style.transform = `translate(${le / Te}px, ${xe / Te}px)`, ce.style.transition = "none", ce.classList.add("is-moving"), requestAnimationFrame(() => {
|
|
1434
|
+
ce.style.transition = `transform ${q}ms cubic-bezier(0.2, 0, 0.2, 1)`, ce.style.transform = "translate(0, 0)", setTimeout(() => {
|
|
1435
|
+
ce.style.transition = "", ce.style.transform = "", ce.classList.remove("is-moving");
|
|
1436
|
+
}, q);
|
|
867
1437
|
});
|
|
868
1438
|
}
|
|
869
1439
|
}
|
|
870
1440
|
} else {
|
|
871
|
-
|
|
872
|
-
const
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
},
|
|
1441
|
+
O(be.current, 1, "新規パネル検出 - フェードインアニメーション:", U);
|
|
1442
|
+
const le = he.current[U];
|
|
1443
|
+
le && (le.style.opacity = "0", le.style.transition = "none", requestAnimationFrame(() => {
|
|
1444
|
+
le.style.transition = `opacity ${q}ms ease-out`, le.style.opacity = "1", setTimeout(() => {
|
|
1445
|
+
le.style.transition = "", le.style.opacity = "";
|
|
1446
|
+
}, q);
|
|
877
1447
|
}));
|
|
878
1448
|
}
|
|
879
|
-
}),
|
|
880
|
-
}, [
|
|
881
|
-
const
|
|
882
|
-
Object.keys(he.current).forEach((
|
|
883
|
-
const
|
|
884
|
-
|
|
885
|
-
}),
|
|
886
|
-
}, [
|
|
887
|
-
const
|
|
888
|
-
if (
|
|
889
|
-
const
|
|
890
|
-
if (
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
1449
|
+
}), Ye.current = i;
|
|
1450
|
+
}, [e]), we(() => {
|
|
1451
|
+
const i = /* @__PURE__ */ new Map();
|
|
1452
|
+
Object.keys(he.current).forEach((C) => {
|
|
1453
|
+
const q = he.current[C];
|
|
1454
|
+
q && i.set(C, { rect: q.getBoundingClientRect(), height: q.offsetHeight, width: q.offsetWidth });
|
|
1455
|
+
}), Ye.current = i;
|
|
1456
|
+
}, [ge]);
|
|
1457
|
+
const pt = (i, C, q) => {
|
|
1458
|
+
if ($e) return;
|
|
1459
|
+
const K = Xn(pe, i, C);
|
|
1460
|
+
if (K === null) {
|
|
1461
|
+
if (q) {
|
|
1462
|
+
const J = ze(H.panelMoveUnavailable, { title: { text: ue[i].title, lang: void 0 }, move: H[zt[C]] });
|
|
1463
|
+
Ue((te) => Ze(te, J));
|
|
1464
|
+
}
|
|
1465
|
+
return;
|
|
1466
|
+
}
|
|
1467
|
+
ut(i, K.from, K.columnPanels, `move-${C}`);
|
|
1468
|
+
}, ln = (i, C) => {
|
|
1469
|
+
if (i.defaultPrevented || de || !(i.target instanceof Node && i.currentTarget.contains(i.target))) return;
|
|
1470
|
+
const q = Zn(i);
|
|
1471
|
+
q !== null && (i.target instanceof Element && i.target.closest(vr) !== null || (i.preventDefault(), !i.repeat && pt(C, q, !0)));
|
|
1472
|
+
}, gt = (i, C) => {
|
|
1473
|
+
const q = ct.current;
|
|
1474
|
+
if (q === "touch" || q === "pen") {
|
|
1475
|
+
i.preventDefault();
|
|
1476
|
+
return;
|
|
1477
|
+
}
|
|
1478
|
+
y(i, C);
|
|
1479
|
+
}, Xe = ye === null ? u : ye.over, xt = ye === null ? f : dt(ye.panelId), cn = (i) => {
|
|
1480
|
+
if (!r[i]) return null;
|
|
1481
|
+
const C = ue[i];
|
|
1482
|
+
if (!C)
|
|
1483
|
+
return O(be.current, 1, `Panel config not found for panelId: ${i}`), null;
|
|
1484
|
+
const q = C.component, K = C.title, J = l.draggedPanel === i || ye?.panelId === i, te = b[i] || "normal";
|
|
1485
|
+
O(be.current, 2, `🎨 renderPanel - ${i}:`, {
|
|
1486
|
+
panelId: i,
|
|
1487
|
+
dragMode: te,
|
|
896
1488
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
897
1489
|
});
|
|
898
|
-
const ne = (
|
|
899
|
-
he.current[
|
|
900
|
-
const
|
|
901
|
-
|
|
902
|
-
width:
|
|
903
|
-
height:
|
|
904
|
-
x:
|
|
905
|
-
y:
|
|
906
|
-
minHeight:
|
|
907
|
-
maxHeight:
|
|
1490
|
+
const ne = (B) => {
|
|
1491
|
+
he.current[i] = B, $ && $(i, B), B && R.showPanelSizes && requestAnimationFrame(() => {
|
|
1492
|
+
const je = B.getBoundingClientRect(), Ne = window.getComputedStyle(B);
|
|
1493
|
+
O(be.current, 1, `Panel ${i} mounted with size:`, {
|
|
1494
|
+
width: je.width,
|
|
1495
|
+
height: je.height,
|
|
1496
|
+
x: je.left,
|
|
1497
|
+
y: je.top,
|
|
1498
|
+
minHeight: Ne.minHeight,
|
|
1499
|
+
maxHeight: Ne.maxHeight
|
|
908
1500
|
});
|
|
909
1501
|
});
|
|
910
|
-
},
|
|
1502
|
+
}, U = d[i], Q = V === i, le = !!_, xe = () => _?.(Q ? null : i), ce = Q ? null : new Set(Bn(pe, i)), Te = Q ? {
|
|
911
1503
|
position: "fixed",
|
|
912
1504
|
top: "var(--aqdd-maximize-top, 0px)",
|
|
913
1505
|
right: "var(--aqdd-maximize-right, 0px)",
|
|
@@ -917,473 +1509,475 @@ const Jt = ({
|
|
|
917
1509
|
minHeight: 0,
|
|
918
1510
|
maxHeight: "none"
|
|
919
1511
|
} : {
|
|
920
|
-
minHeight:
|
|
921
|
-
maxHeight:
|
|
922
|
-
},
|
|
923
|
-
// 最大化中: 角丸・ホバー演出・grab
|
|
924
|
-
`${
|
|
925
|
-
) : `${
|
|
1512
|
+
minHeight: C.minHeight ?? "200px",
|
|
1513
|
+
maxHeight: C.maxHeight ?? "500px"
|
|
1514
|
+
}, Le = re === "header", bt = te === "normal" && !Le && !Q, yt = te === "normal" && Le && !Q, wt = J ? "cursor-grabbing" : "cursor-grab", jt = `panel-draggable relative flex flex-col overflow-hidden border text-left shadow-lg backdrop-blur-lg ${te === "custom" ? "select-none" : ""}`, dn = Q ? (
|
|
1515
|
+
// 最大化中: 角丸・ホバー演出・grab カーソル無し (下のレイアウトを遮蔽する不透過寄りの面は CSS が data-maximized で描く)
|
|
1516
|
+
`${jt} rounded-none p-4 ${oe}`
|
|
1517
|
+
) : `${jt} rounded-2xl p-4 motion-safe:transition-all motion-safe:duration-300 motion-safe:hover:-translate-y-1 hover:shadow-xl ${Le ? "" : wt} ${oe}`, Pt = te === "custom" ? H.switchToNormalDragMode : H.switchToCustomDragMode, Et = Q ? H.restorePanel : H.maximizePanel;
|
|
926
1518
|
return (
|
|
927
1519
|
// biome-ignore lint/a11y/noStaticElementInteractions: クリックイベントを持つ静的要素
|
|
928
|
-
/* @__PURE__ */
|
|
1520
|
+
/* @__PURE__ */ s.jsxs(
|
|
929
1521
|
"div",
|
|
930
1522
|
{
|
|
931
1523
|
ref: ne,
|
|
932
|
-
"data-panel-id":
|
|
933
|
-
"data-
|
|
934
|
-
"data-
|
|
1524
|
+
"data-panel-id": i,
|
|
1525
|
+
"data-aqdd-panel": !0,
|
|
1526
|
+
"data-aqdd-drag-mode": te,
|
|
1527
|
+
"data-dragging": J,
|
|
1528
|
+
"data-maximized": Q || void 0,
|
|
935
1529
|
role: "presentation",
|
|
936
|
-
draggable:
|
|
937
|
-
onDragStart: (
|
|
938
|
-
onDragEnd:
|
|
939
|
-
onClick: (
|
|
940
|
-
onMouseDown: (
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
style: be,
|
|
945
|
-
className: rt,
|
|
1530
|
+
draggable: bt,
|
|
1531
|
+
onDragStart: (B) => bt && gt(B, i),
|
|
1532
|
+
onDragEnd: A,
|
|
1533
|
+
onClick: (B) => S?.(B, i),
|
|
1534
|
+
onMouseDown: (B) => N?.(B, i),
|
|
1535
|
+
onKeyDown: (B) => ln(B, i),
|
|
1536
|
+
style: Te,
|
|
1537
|
+
className: dn,
|
|
946
1538
|
children: [
|
|
947
|
-
/* @__PURE__ */
|
|
1539
|
+
/* @__PURE__ */ s.jsxs(
|
|
948
1540
|
"div",
|
|
949
1541
|
{
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
1542
|
+
ref: ke.bindHeader,
|
|
1543
|
+
"data-aqdd-panel-header": !0,
|
|
1544
|
+
className: `relative mb-3 ${Le && !Q ? wt : ""}`,
|
|
1545
|
+
draggable: yt,
|
|
1546
|
+
onDragStart: (B) => yt && gt(B, i),
|
|
1547
|
+
onPointerDown: (B) => ke.pressHeader(B, i),
|
|
1548
|
+
onContextMenu: ke.holdContextMenu,
|
|
1549
|
+
onKeyDown: jr,
|
|
1550
|
+
onDoubleClick: le ? (B) => {
|
|
1551
|
+
B.stopPropagation(), !(B.target instanceof Element && B.target.closest(`[${Ee}]`) !== null) && xe();
|
|
955
1552
|
} : void 0,
|
|
956
1553
|
children: [
|
|
957
|
-
/* @__PURE__ */
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
(I.key === "Enter" || I.key === " ") && (I.preventDefault(), I.stopPropagation(), v && v(P));
|
|
971
|
-
},
|
|
972
|
-
tabIndex: 0,
|
|
973
|
-
className: `cursor-pointer rounded p-1 text-xs transition-colors ${q === "custom" ? "bg-orange-100 text-orange-600 hover:bg-orange-200" : "text-slate-400 hover:bg-slate-100 hover:text-slate-600"}`,
|
|
974
|
-
title: q === "custom" ? "通常ドラッグモードに戻す" : "カスタムドラッグモードに切り替え",
|
|
975
|
-
children: q === "custom" ? /* @__PURE__ */ t.jsx(kt, { className: "h-4 w-4" }) : /* @__PURE__ */ t.jsx(jt, { className: "h-4 w-4" })
|
|
976
|
-
}
|
|
977
|
-
),
|
|
978
|
-
!J && /* @__PURE__ */ t.jsx(
|
|
979
|
-
"button",
|
|
980
|
-
{
|
|
981
|
-
type: "button",
|
|
982
|
-
onClick: (I) => {
|
|
983
|
-
I.stopPropagation(), o({
|
|
984
|
-
...s,
|
|
985
|
-
[P]: !1
|
|
986
|
-
});
|
|
987
|
-
},
|
|
988
|
-
className: "rounded p-1 text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-600",
|
|
989
|
-
title: "パネルを非表示",
|
|
990
|
-
children: /* @__PURE__ */ t.jsx(Xe, { className: "h-4 w-4" })
|
|
991
|
-
}
|
|
992
|
-
),
|
|
993
|
-
fe && /* @__PURE__ */ t.jsx(
|
|
994
|
-
"button",
|
|
995
|
-
{
|
|
996
|
-
type: "button",
|
|
997
|
-
onClick: (I) => {
|
|
998
|
-
I.stopPropagation(), ae();
|
|
999
|
-
},
|
|
1000
|
-
className: "rounded p-1 text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-600",
|
|
1001
|
-
title: J ? "元のサイズに戻す" : "パネルを最大化",
|
|
1002
|
-
children: J ? /* @__PURE__ */ t.jsx(yt, { className: "h-4 w-4" }) : /* @__PURE__ */ t.jsx(bt, { className: "h-4 w-4" })
|
|
1003
|
-
}
|
|
1004
|
-
),
|
|
1005
|
-
D && /* @__PURE__ */ t.jsx(
|
|
1006
|
-
"button",
|
|
1007
|
-
{
|
|
1008
|
-
type: "button",
|
|
1009
|
-
onClick: (I) => {
|
|
1010
|
-
I.stopPropagation(), D(P);
|
|
1011
|
-
},
|
|
1012
|
-
className: "rounded p-1 text-slate-400 transition-colors hover:bg-slate-100 hover:text-red-500",
|
|
1013
|
-
title: "パネルを閉じる",
|
|
1014
|
-
children: /* @__PURE__ */ t.jsx(Ve, { className: "h-4 w-4" })
|
|
1015
|
-
}
|
|
1016
|
-
)
|
|
1554
|
+
/* @__PURE__ */ s.jsx("h3", { "data-aqdd-panel-title": !0, className: "font-semibold text-lg", children: K }),
|
|
1555
|
+
/* @__PURE__ */ s.jsxs("div", { "data-aqdd-panel-controls": !0, children: [
|
|
1556
|
+
te === "custom" && /* @__PURE__ */ s.jsx("span", { "data-aqdd-custom-badge": !0, lang: H.customDragModeBadge.lang, className: "rounded-md px-2 py-1 font-medium text-xs", children: H.customDragModeBadge.text }),
|
|
1557
|
+
/* @__PURE__ */ s.jsxs("div", { "data-aqdd-panel-buttons": !0, children: [
|
|
1558
|
+
ce !== null && De.map((B) => {
|
|
1559
|
+
const je = xr[B], Ne = H[zt[B]], Dt = Ut[B];
|
|
1560
|
+
return /* @__PURE__ */ s.jsx(Me, { action: `move-${B}`, label: Ne, tooltip: `${Ne.text} (${Dt.text})`, unavailable: !ce.has(B), keyShortcuts: Dt.aria, onActivate: () => pt(i, B, !1), children: /* @__PURE__ */ s.jsx(je, { className: "h-4 w-4", "aria-hidden": "true" }) }, B);
|
|
1561
|
+
}),
|
|
1562
|
+
/* @__PURE__ */ s.jsx(Me, { action: "drag-mode", label: Pt, tooltip: Pt.text, unavailable: !1, keyShortcuts: void 0, onActivate: () => p?.(i), children: te === "custom" ? /* @__PURE__ */ s.jsx(In, { className: "h-4 w-4", "aria-hidden": "true" }) : /* @__PURE__ */ s.jsx(qn, { className: "h-4 w-4", "aria-hidden": "true" }) }),
|
|
1563
|
+
!Q && /* @__PURE__ */ s.jsx(Me, { action: "hide", label: H.hidePanel, tooltip: H.hidePanel.text, unavailable: !1, keyShortcuts: void 0, onActivate: () => a({ ...r, [i]: !1 }), children: /* @__PURE__ */ s.jsx(Mt, { className: "h-4 w-4", "aria-hidden": "true" }) }),
|
|
1564
|
+
le && /* @__PURE__ */ s.jsx(Me, { action: Q ? "restore" : "maximize", label: Et, tooltip: Et.text, unavailable: !1, keyShortcuts: void 0, onActivate: xe, children: Q ? /* @__PURE__ */ s.jsx(Rn, { className: "h-4 w-4", "aria-hidden": "true" }) : /* @__PURE__ */ s.jsx(Ln, { className: "h-4 w-4", "aria-hidden": "true" }) }),
|
|
1565
|
+
j && /* @__PURE__ */ s.jsx(Me, { action: "close", label: H.closePanel, tooltip: H.closePanel.text, unavailable: !1, keyShortcuts: void 0, onActivate: () => j(i), children: /* @__PURE__ */ s.jsx(Ht, { className: "h-4 w-4", "aria-hidden": "true" }) })
|
|
1566
|
+
] })
|
|
1017
1567
|
] })
|
|
1018
1568
|
]
|
|
1019
1569
|
}
|
|
1020
1570
|
),
|
|
1021
|
-
/* @__PURE__ */
|
|
1022
|
-
/* @__PURE__ */
|
|
1571
|
+
/* @__PURE__ */ s.jsx("div", { "data-aqdd-scroll-area": !0, className: "panel-scroll-area min-h-0 flex-1 overflow-y-auto", children: /* @__PURE__ */ s.jsx(q, { ...C.props || {} }) }),
|
|
1572
|
+
/* @__PURE__ */ s.jsx(Yn, { config: R, panelId: i, sizeInfo: U, onSizeInfoClick: (B) => m?.(B, i) })
|
|
1023
1573
|
]
|
|
1024
1574
|
},
|
|
1025
|
-
|
|
1575
|
+
i
|
|
1026
1576
|
)
|
|
1027
1577
|
);
|
|
1028
|
-
},
|
|
1029
|
-
const
|
|
1030
|
-
let
|
|
1031
|
-
for (const
|
|
1032
|
-
if (
|
|
1033
|
-
|
|
1578
|
+
}, un = (i, C) => {
|
|
1579
|
+
const q = e[i] || [];
|
|
1580
|
+
let K = !1;
|
|
1581
|
+
for (const U of q)
|
|
1582
|
+
if (r[U]) {
|
|
1583
|
+
K = !0;
|
|
1034
1584
|
break;
|
|
1035
1585
|
}
|
|
1036
|
-
const
|
|
1037
|
-
return /* @__PURE__ */
|
|
1586
|
+
const J = $e, te = Rt(H.dropZone, { column: C + 1 }), ne = `${ve}-drop-zone-${C}`;
|
|
1587
|
+
return /* @__PURE__ */ s.jsx(Xt, { columnIndex: C, isDragging: J, dragOverPosition: Xe, config: R, children: /* @__PURE__ */ s.jsxs(
|
|
1038
1588
|
"section",
|
|
1039
1589
|
{
|
|
1040
1590
|
"data-drop-zone": "true",
|
|
1041
|
-
"data-column-key":
|
|
1042
|
-
"data-column-index":
|
|
1043
|
-
"aria-
|
|
1044
|
-
onDragOver: (
|
|
1045
|
-
onDrop: (
|
|
1046
|
-
onDragLeave:
|
|
1047
|
-
className: "relative flex h-full flex-col transition-all duration-200",
|
|
1591
|
+
"data-column-key": i,
|
|
1592
|
+
"data-column-index": C,
|
|
1593
|
+
"aria-labelledby": ne,
|
|
1594
|
+
onDragOver: (U) => c(U, C),
|
|
1595
|
+
onDrop: (U) => P(U, i),
|
|
1596
|
+
onDragLeave: k,
|
|
1597
|
+
className: "relative flex h-full flex-col motion-safe:transition-all motion-safe:duration-200",
|
|
1048
1598
|
children: [
|
|
1049
|
-
/* @__PURE__ */
|
|
1050
|
-
|
|
1599
|
+
/* @__PURE__ */ s.jsx("span", { id: ne, hidden: !0, lang: te.lang, children: te.text }),
|
|
1600
|
+
/* @__PURE__ */ s.jsx("div", { className: "placeholder-container", inert: de, children: /* @__PURE__ */ s.jsx(
|
|
1601
|
+
Je,
|
|
1051
1602
|
{
|
|
1052
1603
|
index: 0,
|
|
1053
|
-
columnIndex:
|
|
1054
|
-
isDragging:
|
|
1055
|
-
dragOverPosition:
|
|
1056
|
-
originalPosition:
|
|
1057
|
-
onDragEnter:
|
|
1058
|
-
onDragLeave:
|
|
1059
|
-
debugConfig:
|
|
1060
|
-
customDrag:
|
|
1604
|
+
columnIndex: C,
|
|
1605
|
+
isDragging: J,
|
|
1606
|
+
dragOverPosition: Xe,
|
|
1607
|
+
originalPosition: xt,
|
|
1608
|
+
onDragEnter: z,
|
|
1609
|
+
onDragLeave: E,
|
|
1610
|
+
debugConfig: R,
|
|
1611
|
+
customDrag: I,
|
|
1612
|
+
label: H.dropHere
|
|
1061
1613
|
}
|
|
1062
1614
|
) }),
|
|
1063
|
-
|
|
1064
|
-
const
|
|
1065
|
-
return /* @__PURE__ */
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
/*
|
|
1075
|
-
/* @__PURE__ */
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1615
|
+
q.map((U, Q) => {
|
|
1616
|
+
const le = r[U], xe = !(le || J), ce = de && U === V;
|
|
1617
|
+
return /* @__PURE__ */ s.jsxs(
|
|
1618
|
+
"div",
|
|
1619
|
+
{
|
|
1620
|
+
className: `panel-with-placeholder ${xe ? "m-0 h-0 overflow-hidden p-0" : ""}`,
|
|
1621
|
+
"data-panel-hidden": xe ? "true" : void 0,
|
|
1622
|
+
"aria-hidden": xe ? "true" : void 0,
|
|
1623
|
+
inert: de && !ce,
|
|
1624
|
+
children: [
|
|
1625
|
+
le ? cn(U) : J ? (
|
|
1626
|
+
/* ドラッグ中のみ隠されたパネルの代わりを出す (面・枠線・文字・印の色は CSS が --aqdd-* の変数から描く) */
|
|
1627
|
+
/* @__PURE__ */ s.jsxs("div", { "data-aqdd-hidden-panel-stand-in": !0, className: "hidden-panel-placeholder relative h-[120px] rounded-2xl border-2 border-dashed p-3 text-left shadow-lg backdrop-blur-lg", children: [
|
|
1628
|
+
/* @__PURE__ */ s.jsxs("div", { className: "mb-2 flex items-center space-x-2", children: [
|
|
1629
|
+
/* @__PURE__ */ s.jsx("h3", { className: "font-semibold text-base", children: ue[U]?.title || U }),
|
|
1630
|
+
/* @__PURE__ */ s.jsx("span", { "data-aqdd-hidden-panel-badge": !0, lang: H.hiddenPanelBadge.lang, className: "rounded-md px-2 py-1 font-medium text-xs", children: H.hiddenPanelBadge.text })
|
|
1631
|
+
] }),
|
|
1632
|
+
/* @__PURE__ */ s.jsx("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ s.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ s.jsxs("div", { className: "text-center", children: [
|
|
1633
|
+
/* @__PURE__ */ s.jsx(Mt, { className: "mx-auto h-6 w-6 opacity-50", "aria-hidden": "true" }),
|
|
1634
|
+
/* @__PURE__ */ s.jsx("p", { lang: H.hiddenPanelNotice.lang, className: "mt-1 text-xs", children: H.hiddenPanelNotice.text })
|
|
1635
|
+
] }) }) })
|
|
1636
|
+
] })
|
|
1637
|
+
) : null,
|
|
1638
|
+
ce ? null : /* @__PURE__ */ s.jsx(
|
|
1639
|
+
Je,
|
|
1640
|
+
{
|
|
1641
|
+
index: Q + 1,
|
|
1642
|
+
columnIndex: C,
|
|
1643
|
+
isDragging: J,
|
|
1644
|
+
dragOverPosition: Xe,
|
|
1645
|
+
originalPosition: xt,
|
|
1646
|
+
onDragEnter: z,
|
|
1647
|
+
onDragLeave: E,
|
|
1648
|
+
debugConfig: R,
|
|
1649
|
+
customDrag: I,
|
|
1650
|
+
label: H.dropHere
|
|
1651
|
+
}
|
|
1652
|
+
)
|
|
1653
|
+
]
|
|
1654
|
+
},
|
|
1655
|
+
`panel-${U}`
|
|
1656
|
+
);
|
|
1094
1657
|
}),
|
|
1095
|
-
!(
|
|
1658
|
+
!(K || J) && /* @__PURE__ */ s.jsx("div", { "data-aqdd-empty-column": !0, className: "flex-shrink-0 rounded-xl border-2 border-dashed p-8 text-center motion-safe:transition-all motion-safe:duration-200", inert: de, children: /* @__PURE__ */ s.jsx("div", { lang: H.emptyColumn.lang, className: "text-sm", children: H.emptyColumn.text }) })
|
|
1096
1659
|
]
|
|
1097
1660
|
}
|
|
1098
1661
|
) });
|
|
1099
|
-
},
|
|
1100
|
-
return /* @__PURE__ */
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
})
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
]
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1662
|
+
}, vt = Object.keys(r).filter((i) => !r[i]);
|
|
1663
|
+
return /* @__PURE__ */ s.jsxs(
|
|
1664
|
+
"div",
|
|
1665
|
+
{
|
|
1666
|
+
ref: lt,
|
|
1667
|
+
"data-aqdd-layout": !0,
|
|
1668
|
+
className: "flex h-full flex-col",
|
|
1669
|
+
onPointerDownCapture: (i) => {
|
|
1670
|
+
ct.current = i.pointerType;
|
|
1671
|
+
},
|
|
1672
|
+
children: [
|
|
1673
|
+
/* @__PURE__ */ s.jsxs("div", { "data-aqdd-announcer": !0, role: "status", "aria-live": "polite", "aria-atomic": "true", inert: de, children: [
|
|
1674
|
+
Fe?.segments.map(
|
|
1675
|
+
(i, C) => i.lang === void 0 ? i.text : /* @__PURE__ */ s.jsx("span", { lang: i.lang, children: i.text }, C)
|
|
1676
|
+
),
|
|
1677
|
+
Fe !== null && Fe.serial % 2 === 0 ? br : null
|
|
1678
|
+
] }),
|
|
1679
|
+
vt.length > 0 && /* @__PURE__ */ s.jsx("div", { "data-aqdd-hidden-panels": !0, className: "border-b px-4 py-2 backdrop-blur-lg", inert: de, children: /* @__PURE__ */ s.jsxs("div", { className: "flex flex-wrap gap-2", children: [
|
|
1680
|
+
/* @__PURE__ */ s.jsx("span", { lang: H.hiddenPanels.lang, className: "mr-2 text-sm", children: H.hiddenPanels.text }),
|
|
1681
|
+
vt.map((i) => {
|
|
1682
|
+
const q = ue[i]?.title || i;
|
|
1683
|
+
return /* @__PURE__ */ s.jsxs(
|
|
1684
|
+
"button",
|
|
1685
|
+
{
|
|
1686
|
+
type: "button",
|
|
1687
|
+
"data-aqdd-restore-panel": i,
|
|
1688
|
+
onClick: () => a({
|
|
1689
|
+
...r,
|
|
1690
|
+
[i]: !0
|
|
1691
|
+
}),
|
|
1692
|
+
className: "flex items-center space-x-1 rounded-lg px-3 py-1 text-sm shadow-md hover:shadow-lg motion-safe:transition-all motion-safe:duration-200",
|
|
1693
|
+
children: [
|
|
1694
|
+
/* @__PURE__ */ s.jsx(An, { className: "h-3 w-3", "aria-hidden": "true" }),
|
|
1695
|
+
/* @__PURE__ */ s.jsx("span", { children: q })
|
|
1696
|
+
]
|
|
1697
|
+
},
|
|
1698
|
+
i
|
|
1699
|
+
);
|
|
1700
|
+
})
|
|
1701
|
+
] }) }),
|
|
1702
|
+
/* @__PURE__ */ s.jsx("div", { ref: nn, className: "relative min-h-0 flex-1 overflow-hidden", children: /* @__PURE__ */ s.jsx("div", { className: "h-full w-full", style: on, children: /* @__PURE__ */ s.jsx(X, { ref: sn, "data-aqdd-scroll-root": !0, className: "no-scrollbar h-full max-w-full flex-1 overflow-auto", children: /* @__PURE__ */ s.jsx("div", { "data-aqdd-columns": !0, className: "relative flex h-full items-start", children: t.map((i, C) => {
|
|
1703
|
+
const q = Y?.[i.id] || i.initialWidth || 350, K = T && (i.resizable ?? !0);
|
|
1704
|
+
return /* @__PURE__ */ s.jsx(fn, { children: /* @__PURE__ */ s.jsxs(
|
|
1705
|
+
"div",
|
|
1706
|
+
{
|
|
1707
|
+
className: `column relative ${i.className || ""} ${T ? "resize-enabled-column" : "auto-width-column"} ${L && w === i.id ? "column-resizing-active" : ""}`,
|
|
1708
|
+
"data-column": C,
|
|
1709
|
+
"data-column-id": i.id,
|
|
1710
|
+
"data-min-width": i.minWidth || 350,
|
|
1711
|
+
"data-max-width": i.maxWidth,
|
|
1712
|
+
"data-column-width": T ? q : void 0,
|
|
1713
|
+
inert: de && C !== ot.column,
|
|
1714
|
+
...T && {
|
|
1715
|
+
style: { "--column-width": `${q}px` }
|
|
1716
|
+
},
|
|
1717
|
+
children: [
|
|
1718
|
+
un(i.key, C),
|
|
1719
|
+
K && !de && G && g && v && /* @__PURE__ */ s.jsx(
|
|
1720
|
+
en,
|
|
1721
|
+
{
|
|
1722
|
+
columnId: i.id,
|
|
1723
|
+
onResizeStart: G,
|
|
1724
|
+
onResize: g,
|
|
1725
|
+
onResizeEnd: v,
|
|
1726
|
+
isResizing: L && w === i.id,
|
|
1727
|
+
position: "right",
|
|
1728
|
+
debug: R,
|
|
1729
|
+
label: Rt(H.resizeColumn, { column: C + 1 })
|
|
1730
|
+
}
|
|
1731
|
+
)
|
|
1732
|
+
]
|
|
1733
|
+
}
|
|
1734
|
+
) }, i.id);
|
|
1735
|
+
}) }) }) }) })
|
|
1736
|
+
]
|
|
1737
|
+
}
|
|
1738
|
+
);
|
|
1145
1739
|
};
|
|
1146
|
-
const
|
|
1740
|
+
const Pr = [
|
|
1147
1741
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
1148
1742
|
["path", { d: "M3 9h18", key: "1pudct" }],
|
|
1149
1743
|
["path", { d: "M3 15h18", key: "5xshup" }],
|
|
1150
1744
|
["path", { d: "M9 3v18", key: "fh3hqa" }],
|
|
1151
1745
|
["path", { d: "M15 3v18", key: "14nvp0" }]
|
|
1152
|
-
],
|
|
1153
|
-
const
|
|
1154
|
-
const
|
|
1746
|
+
], Er = ie("grid-3x3", Pr);
|
|
1747
|
+
const Dr = [["path", { d: "M5 12h14", key: "1ays0h" }]], kr = ie("minus", Dr);
|
|
1748
|
+
const Nr = [
|
|
1155
1749
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
1156
1750
|
["path", { d: "M12 5v14", key: "s699le" }]
|
|
1157
|
-
],
|
|
1158
|
-
const
|
|
1751
|
+
], Qe = ie("plus", Nr);
|
|
1752
|
+
const Or = [
|
|
1159
1753
|
["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
|
|
1160
1754
|
["path", { d: "M3 3v5h5", key: "1xhq8a" }]
|
|
1161
|
-
],
|
|
1162
|
-
const
|
|
1163
|
-
return /* @__PURE__ */
|
|
1164
|
-
/* @__PURE__ */
|
|
1165
|
-
/* @__PURE__ */
|
|
1166
|
-
/* @__PURE__ */
|
|
1755
|
+
], Cr = ie("rotate-ccw", Or), Ur = ({ columnCount: t, onColumnCountChange: n, onAutoBalance: e, onResetWidths: o, minColumns: r = 2, maxColumns: a = 6, isResizing: l = !1, isResponsiveMode: u = !1, responsiveColumnCount: f }) => {
|
|
1756
|
+
const b = t > r && !u, y = t < a && !u;
|
|
1757
|
+
return /* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-3 rounded-lg border border-slate-200 bg-white/80 px-4 py-2 shadow-sm backdrop-blur-lg", children: [
|
|
1758
|
+
/* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1759
|
+
/* @__PURE__ */ s.jsx("span", { className: "font-medium text-slate-700 text-sm", children: "カラム数:" }),
|
|
1760
|
+
/* @__PURE__ */ s.jsx(
|
|
1167
1761
|
"button",
|
|
1168
1762
|
{
|
|
1169
1763
|
type: "button",
|
|
1170
|
-
onClick: () =>
|
|
1171
|
-
disabled: !
|
|
1172
|
-
className: `rounded p-1 text-xs transition-colors ${
|
|
1173
|
-
title:
|
|
1174
|
-
children: /* @__PURE__ */
|
|
1764
|
+
onClick: () => b && n(t - 1),
|
|
1765
|
+
disabled: !b || l,
|
|
1766
|
+
className: `rounded p-1 text-xs transition-colors ${b && !l ? "border border-slate-300 text-slate-600 hover:border-red-300 hover:bg-red-50 hover:text-red-600" : "cursor-not-allowed border border-slate-200 bg-slate-50 text-slate-300"}`,
|
|
1767
|
+
title: u ? "レスポンシブモード中:カラム数は自動調整されます" : `カラムを削除 (最小: ${r}列)`,
|
|
1768
|
+
children: /* @__PURE__ */ s.jsx(kr, { className: "h-3 w-3" })
|
|
1175
1769
|
}
|
|
1176
1770
|
),
|
|
1177
|
-
/* @__PURE__ */
|
|
1178
|
-
|
|
1179
|
-
|
|
1771
|
+
/* @__PURE__ */ s.jsxs("div", { className: `min-w-[2rem] rounded border px-3 py-1 text-center font-mono text-sm ${u ? "border-blue-300 bg-blue-50 text-blue-700" : "border-slate-300 bg-slate-100 text-slate-700"}`, children: [
|
|
1772
|
+
u ? f ?? t : t,
|
|
1773
|
+
u && /* @__PURE__ */ s.jsx("span", { className: "ml-1 text-xs", children: "自動" })
|
|
1180
1774
|
] }),
|
|
1181
|
-
/* @__PURE__ */
|
|
1775
|
+
/* @__PURE__ */ s.jsx(
|
|
1182
1776
|
"button",
|
|
1183
1777
|
{
|
|
1184
1778
|
type: "button",
|
|
1185
|
-
onClick: () =>
|
|
1186
|
-
disabled: !
|
|
1187
|
-
className: `rounded p-1 text-xs transition-colors ${
|
|
1188
|
-
title:
|
|
1189
|
-
children: /* @__PURE__ */
|
|
1779
|
+
onClick: () => y && n(t + 1),
|
|
1780
|
+
disabled: !y || l,
|
|
1781
|
+
className: `rounded p-1 text-xs transition-colors ${y && !l ? "border border-slate-300 text-slate-600 hover:border-blue-300 hover:bg-blue-50 hover:text-blue-600" : "cursor-not-allowed border border-slate-200 bg-slate-50 text-slate-300"}`,
|
|
1782
|
+
title: u ? "レスポンシブモード中:カラム数は自動調整されます" : `カラムを追加 (最大: ${a}列)`,
|
|
1783
|
+
children: /* @__PURE__ */ s.jsx(Qe, { className: "h-3 w-3" })
|
|
1190
1784
|
}
|
|
1191
1785
|
)
|
|
1192
1786
|
] }),
|
|
1193
|
-
/* @__PURE__ */
|
|
1194
|
-
/* @__PURE__ */
|
|
1195
|
-
/* @__PURE__ */
|
|
1787
|
+
/* @__PURE__ */ s.jsx("div", { className: "h-6 w-px bg-slate-300" }),
|
|
1788
|
+
/* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1789
|
+
/* @__PURE__ */ s.jsxs(
|
|
1196
1790
|
"button",
|
|
1197
1791
|
{
|
|
1198
1792
|
type: "button",
|
|
1199
|
-
onClick:
|
|
1200
|
-
disabled:
|
|
1201
|
-
className: `flex items-center gap-1 rounded px-2 py-1 text-xs transition-colors ${
|
|
1793
|
+
onClick: e,
|
|
1794
|
+
disabled: l,
|
|
1795
|
+
className: `flex items-center gap-1 rounded px-2 py-1 text-xs transition-colors ${l ? "cursor-not-allowed border border-slate-200 bg-slate-50 text-slate-300" : "border border-slate-300 text-slate-600 hover:border-green-300 hover:bg-green-50 hover:text-green-600"}`,
|
|
1202
1796
|
title: "パネルを全カラムに均等分散",
|
|
1203
1797
|
children: [
|
|
1204
|
-
/* @__PURE__ */
|
|
1205
|
-
/* @__PURE__ */
|
|
1798
|
+
/* @__PURE__ */ s.jsx(Er, { className: "h-3 w-3" }),
|
|
1799
|
+
/* @__PURE__ */ s.jsx("span", { children: "バランス" })
|
|
1206
1800
|
]
|
|
1207
1801
|
}
|
|
1208
1802
|
),
|
|
1209
|
-
/* @__PURE__ */
|
|
1803
|
+
/* @__PURE__ */ s.jsxs(
|
|
1210
1804
|
"button",
|
|
1211
1805
|
{
|
|
1212
1806
|
type: "button",
|
|
1213
|
-
onClick:
|
|
1214
|
-
disabled:
|
|
1215
|
-
className: `flex items-center gap-1 rounded px-2 py-1 text-xs transition-colors ${
|
|
1807
|
+
onClick: o,
|
|
1808
|
+
disabled: l,
|
|
1809
|
+
className: `flex items-center gap-1 rounded px-2 py-1 text-xs transition-colors ${l ? "cursor-not-allowed border border-slate-200 bg-slate-50 text-slate-300" : "border border-slate-300 text-slate-600 hover:border-orange-300 hover:bg-orange-50 hover:text-orange-600"}`,
|
|
1216
1810
|
title: "カラム幅を初期値にリセット",
|
|
1217
1811
|
children: [
|
|
1218
|
-
/* @__PURE__ */
|
|
1219
|
-
/* @__PURE__ */
|
|
1812
|
+
/* @__PURE__ */ s.jsx(Cr, { className: "h-3 w-3" }),
|
|
1813
|
+
/* @__PURE__ */ s.jsx("span", { children: "幅リセット" })
|
|
1220
1814
|
]
|
|
1221
1815
|
}
|
|
1222
1816
|
)
|
|
1223
1817
|
] }),
|
|
1224
|
-
|
|
1225
|
-
/* @__PURE__ */
|
|
1226
|
-
/* @__PURE__ */
|
|
1818
|
+
l && /* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-1 text-blue-600 text-xs", children: [
|
|
1819
|
+
/* @__PURE__ */ s.jsx("div", { className: "h-2 w-2 animate-pulse rounded-full bg-blue-500" }),
|
|
1820
|
+
/* @__PURE__ */ s.jsx("span", { children: "リサイズ中..." })
|
|
1227
1821
|
] })
|
|
1228
1822
|
] });
|
|
1229
|
-
},
|
|
1230
|
-
const
|
|
1231
|
-
return /* @__PURE__ */
|
|
1232
|
-
|
|
1233
|
-
!
|
|
1234
|
-
/* @__PURE__ */
|
|
1823
|
+
}, Br = ({ columnCount: t, onInsertColumn: n, onDeleteColumn: e, minColumns: o = 1, maxColumns: r = 6, isResizing: a = !1, disabled: l = !1 }) => {
|
|
1824
|
+
const u = t < r && !l, f = t > o && !l;
|
|
1825
|
+
return /* @__PURE__ */ s.jsxs("div", { className: `flex items-center justify-center gap-1 rounded-lg border border-slate-200 px-4 py-2 shadow-sm backdrop-blur-lg ${l ? "bg-slate-100/80 opacity-60" : "bg-white/80"}`, children: [
|
|
1826
|
+
l && /* @__PURE__ */ s.jsx("div", { className: "flex items-center gap-2 text-slate-500 text-xs", children: /* @__PURE__ */ s.jsx("span", { children: "レスポンシブモード有効中:カラム数は自動調整されます" }) }),
|
|
1827
|
+
!l && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1828
|
+
/* @__PURE__ */ s.jsx(
|
|
1235
1829
|
"button",
|
|
1236
1830
|
{
|
|
1237
1831
|
type: "button",
|
|
1238
|
-
onClick: () =>
|
|
1239
|
-
disabled: !
|
|
1240
|
-
className: `flex h-8 w-8 items-center justify-center rounded border-2 border-dashed text-xs transition-colors ${
|
|
1832
|
+
onClick: () => u && n(0),
|
|
1833
|
+
disabled: !u || a,
|
|
1834
|
+
className: `flex h-8 w-8 items-center justify-center rounded border-2 border-dashed text-xs transition-colors ${u && !a ? "border-blue-300 text-blue-600 hover:border-blue-500 hover:bg-blue-50" : "cursor-not-allowed border-slate-200 text-slate-300"}`,
|
|
1241
1835
|
title: "この位置に新しいカラムを挿入",
|
|
1242
|
-
children: /* @__PURE__ */
|
|
1836
|
+
children: /* @__PURE__ */ s.jsx(Qe, { className: "h-4 w-4" })
|
|
1243
1837
|
}
|
|
1244
1838
|
),
|
|
1245
|
-
Array.from({ length:
|
|
1246
|
-
/* @__PURE__ */
|
|
1247
|
-
/* @__PURE__ */
|
|
1248
|
-
|
|
1839
|
+
Array.from({ length: t }, (b, y) => /* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
1840
|
+
/* @__PURE__ */ s.jsxs("div", { className: "relative flex h-8 w-12 items-center justify-center rounded border border-slate-300 bg-slate-100", children: [
|
|
1841
|
+
/* @__PURE__ */ s.jsx("span", { className: "font-medium font-mono text-slate-700 text-xs", children: y + 1 }),
|
|
1842
|
+
f && !a && /* @__PURE__ */ s.jsx(
|
|
1249
1843
|
"button",
|
|
1250
1844
|
{
|
|
1251
1845
|
type: "button",
|
|
1252
|
-
onClick: () =>
|
|
1846
|
+
onClick: () => e(y),
|
|
1253
1847
|
className: "absolute -top-1 -right-1 flex h-4 w-4 items-center justify-center rounded-full border border-red-300 bg-red-100 text-red-600 hover:bg-red-200",
|
|
1254
|
-
title: `カラム ${
|
|
1255
|
-
children: /* @__PURE__ */
|
|
1848
|
+
title: `カラム ${y + 1} を削除`,
|
|
1849
|
+
children: /* @__PURE__ */ s.jsx(Ht, { className: "h-2.5 w-2.5" })
|
|
1256
1850
|
}
|
|
1257
1851
|
)
|
|
1258
1852
|
] }),
|
|
1259
|
-
/* @__PURE__ */
|
|
1853
|
+
/* @__PURE__ */ s.jsx(
|
|
1260
1854
|
"button",
|
|
1261
1855
|
{
|
|
1262
1856
|
type: "button",
|
|
1263
|
-
onClick: () =>
|
|
1264
|
-
disabled: !
|
|
1265
|
-
className: `flex h-8 w-8 items-center justify-center rounded border-2 border-dashed text-xs transition-colors ${
|
|
1857
|
+
onClick: () => u && n(y + 1),
|
|
1858
|
+
disabled: !u || a,
|
|
1859
|
+
className: `flex h-8 w-8 items-center justify-center rounded border-2 border-dashed text-xs transition-colors ${u && !a ? "border-blue-300 text-blue-600 hover:border-blue-500 hover:bg-blue-50" : "cursor-not-allowed border-slate-200 text-slate-300"}`,
|
|
1266
1860
|
title: "この位置に新しいカラムを挿入",
|
|
1267
|
-
children: /* @__PURE__ */
|
|
1861
|
+
children: /* @__PURE__ */ s.jsx(Qe, { className: "h-4 w-4" })
|
|
1268
1862
|
}
|
|
1269
1863
|
)
|
|
1270
|
-
] }, `column-${
|
|
1864
|
+
] }, `column-${y}`))
|
|
1271
1865
|
] })
|
|
1272
1866
|
] });
|
|
1273
|
-
},
|
|
1274
|
-
/* @__PURE__ */
|
|
1275
|
-
/* @__PURE__ */
|
|
1276
|
-
/* @__PURE__ */
|
|
1867
|
+
}, Xr = ({ config: t, onConfigChange: n, isVisible: e, onToggleVisibility: o }) => e ? /* @__PURE__ */ s.jsxs("div", { className: "fixed right-4 bottom-4 z-50 max-w-sm rounded-lg border border-gray-300 bg-white p-4 shadow-xl", children: [
|
|
1868
|
+
/* @__PURE__ */ s.jsxs("div", { className: "mb-3 flex items-center justify-between", children: [
|
|
1869
|
+
/* @__PURE__ */ s.jsx("h3", { className: "font-bold text-gray-800 text-sm", children: "🛠️ デバッグ設定" }),
|
|
1870
|
+
/* @__PURE__ */ s.jsx("button", { type: "button", onClick: o, className: "text-gray-500 text-lg hover:text-gray-700", title: "閉じる", children: "✕" })
|
|
1277
1871
|
] }),
|
|
1278
|
-
/* @__PURE__ */
|
|
1279
|
-
/* @__PURE__ */
|
|
1280
|
-
/* @__PURE__ */
|
|
1872
|
+
/* @__PURE__ */ s.jsxs("div", { className: "space-y-2", children: [
|
|
1873
|
+
/* @__PURE__ */ s.jsxs("label", { className: "flex items-center space-x-2 text-sm", children: [
|
|
1874
|
+
/* @__PURE__ */ s.jsx(
|
|
1281
1875
|
"input",
|
|
1282
1876
|
{
|
|
1283
1877
|
type: "checkbox",
|
|
1284
|
-
checked:
|
|
1285
|
-
onChange: (
|
|
1286
|
-
...
|
|
1287
|
-
showDebugPanel:
|
|
1878
|
+
checked: t.showDebugPanel ?? !1,
|
|
1879
|
+
onChange: (r) => n({
|
|
1880
|
+
...t,
|
|
1881
|
+
showDebugPanel: r.target.checked
|
|
1288
1882
|
}),
|
|
1289
1883
|
className: "rounded"
|
|
1290
1884
|
}
|
|
1291
1885
|
),
|
|
1292
|
-
/* @__PURE__ */
|
|
1886
|
+
/* @__PURE__ */ s.jsx("span", { children: "デバッグパネル表示" })
|
|
1293
1887
|
] }),
|
|
1294
|
-
/* @__PURE__ */
|
|
1295
|
-
/* @__PURE__ */
|
|
1888
|
+
/* @__PURE__ */ s.jsxs("label", { className: "flex items-center space-x-2 text-sm", children: [
|
|
1889
|
+
/* @__PURE__ */ s.jsx(
|
|
1296
1890
|
"input",
|
|
1297
1891
|
{
|
|
1298
1892
|
type: "checkbox",
|
|
1299
|
-
checked:
|
|
1300
|
-
onChange: (
|
|
1301
|
-
...
|
|
1302
|
-
showMousePosition:
|
|
1893
|
+
checked: t.showMousePosition ?? !1,
|
|
1894
|
+
onChange: (r) => n({
|
|
1895
|
+
...t,
|
|
1896
|
+
showMousePosition: r.target.checked
|
|
1303
1897
|
}),
|
|
1304
1898
|
className: "rounded"
|
|
1305
1899
|
}
|
|
1306
1900
|
),
|
|
1307
|
-
/* @__PURE__ */
|
|
1901
|
+
/* @__PURE__ */ s.jsx("span", { children: "マウス位置表示" })
|
|
1308
1902
|
] }),
|
|
1309
|
-
/* @__PURE__ */
|
|
1310
|
-
/* @__PURE__ */
|
|
1903
|
+
/* @__PURE__ */ s.jsxs("label", { className: "flex items-center space-x-2 text-sm", children: [
|
|
1904
|
+
/* @__PURE__ */ s.jsx(
|
|
1311
1905
|
"input",
|
|
1312
1906
|
{
|
|
1313
1907
|
type: "checkbox",
|
|
1314
|
-
checked:
|
|
1315
|
-
onChange: (
|
|
1316
|
-
...
|
|
1317
|
-
showPanelSizes:
|
|
1908
|
+
checked: t.showPanelSizes ?? !1,
|
|
1909
|
+
onChange: (r) => n({
|
|
1910
|
+
...t,
|
|
1911
|
+
showPanelSizes: r.target.checked
|
|
1318
1912
|
}),
|
|
1319
1913
|
className: "rounded"
|
|
1320
1914
|
}
|
|
1321
1915
|
),
|
|
1322
|
-
/* @__PURE__ */
|
|
1916
|
+
/* @__PURE__ */ s.jsx("span", { children: "パネルサイズ情報" })
|
|
1323
1917
|
] }),
|
|
1324
|
-
/* @__PURE__ */
|
|
1325
|
-
/* @__PURE__ */
|
|
1918
|
+
/* @__PURE__ */ s.jsxs("label", { className: "flex items-center space-x-2 text-sm", children: [
|
|
1919
|
+
/* @__PURE__ */ s.jsx(
|
|
1326
1920
|
"input",
|
|
1327
1921
|
{
|
|
1328
1922
|
type: "checkbox",
|
|
1329
|
-
checked:
|
|
1330
|
-
onChange: (
|
|
1331
|
-
...
|
|
1332
|
-
showPlaceholderInfo:
|
|
1923
|
+
checked: t.showPlaceholderInfo ?? !1,
|
|
1924
|
+
onChange: (r) => n({
|
|
1925
|
+
...t,
|
|
1926
|
+
showPlaceholderInfo: r.target.checked
|
|
1333
1927
|
}),
|
|
1334
1928
|
className: "rounded"
|
|
1335
1929
|
}
|
|
1336
1930
|
),
|
|
1337
|
-
/* @__PURE__ */
|
|
1931
|
+
/* @__PURE__ */ s.jsx("span", { children: "プレースホルダー詳細" })
|
|
1338
1932
|
] }),
|
|
1339
|
-
/* @__PURE__ */
|
|
1340
|
-
/* @__PURE__ */
|
|
1933
|
+
/* @__PURE__ */ s.jsxs("label", { className: "flex items-center space-x-2 text-sm", children: [
|
|
1934
|
+
/* @__PURE__ */ s.jsx(
|
|
1341
1935
|
"input",
|
|
1342
1936
|
{
|
|
1343
1937
|
type: "checkbox",
|
|
1344
|
-
checked:
|
|
1345
|
-
onChange: (
|
|
1346
|
-
...
|
|
1347
|
-
showDropZoneOutlines:
|
|
1938
|
+
checked: t.showDropZoneOutlines ?? !1,
|
|
1939
|
+
onChange: (r) => n({
|
|
1940
|
+
...t,
|
|
1941
|
+
showDropZoneOutlines: r.target.checked
|
|
1348
1942
|
}),
|
|
1349
1943
|
className: "rounded"
|
|
1350
1944
|
}
|
|
1351
1945
|
),
|
|
1352
|
-
/* @__PURE__ */
|
|
1946
|
+
/* @__PURE__ */ s.jsx("span", { children: "ドロップゾーン境界" })
|
|
1353
1947
|
] }),
|
|
1354
|
-
/* @__PURE__ */
|
|
1355
|
-
/* @__PURE__ */
|
|
1948
|
+
/* @__PURE__ */ s.jsxs("div", { className: "border-gray-200 border-t pt-2", children: [
|
|
1949
|
+
/* @__PURE__ */ s.jsxs("label", { htmlFor: "log-level-slider", className: "mb-1 block text-sm", children: [
|
|
1356
1950
|
"ログレベル: ",
|
|
1357
|
-
|
|
1951
|
+
t.logLevel ?? 0
|
|
1358
1952
|
] }),
|
|
1359
|
-
/* @__PURE__ */
|
|
1953
|
+
/* @__PURE__ */ s.jsx(
|
|
1360
1954
|
"input",
|
|
1361
1955
|
{
|
|
1362
1956
|
id: "log-level-slider",
|
|
1363
1957
|
type: "range",
|
|
1364
1958
|
min: "0",
|
|
1365
1959
|
max: "2",
|
|
1366
|
-
value:
|
|
1367
|
-
onChange: (
|
|
1368
|
-
...
|
|
1369
|
-
logLevel: parseInt(
|
|
1960
|
+
value: t.logLevel ?? 0,
|
|
1961
|
+
onChange: (r) => n({
|
|
1962
|
+
...t,
|
|
1963
|
+
logLevel: parseInt(r.target.value, 10)
|
|
1370
1964
|
}),
|
|
1371
1965
|
className: "w-full",
|
|
1372
1966
|
"aria-label": "ログレベル設定"
|
|
1373
1967
|
}
|
|
1374
1968
|
),
|
|
1375
|
-
/* @__PURE__ */
|
|
1376
|
-
/* @__PURE__ */
|
|
1377
|
-
/* @__PURE__ */
|
|
1378
|
-
/* @__PURE__ */
|
|
1969
|
+
/* @__PURE__ */ s.jsxs("div", { className: "mt-1 flex justify-between text-gray-500 text-xs", children: [
|
|
1970
|
+
/* @__PURE__ */ s.jsx("span", { children: "無効" }),
|
|
1971
|
+
/* @__PURE__ */ s.jsx("span", { children: "基本" }),
|
|
1972
|
+
/* @__PURE__ */ s.jsx("span", { children: "詳細" })
|
|
1379
1973
|
] })
|
|
1380
1974
|
] }),
|
|
1381
|
-
/* @__PURE__ */
|
|
1382
|
-
/* @__PURE__ */
|
|
1975
|
+
/* @__PURE__ */ s.jsxs("div", { className: "space-y-2 pt-2", children: [
|
|
1976
|
+
/* @__PURE__ */ s.jsx(
|
|
1383
1977
|
"button",
|
|
1384
1978
|
{
|
|
1385
1979
|
type: "button",
|
|
1386
|
-
onClick: () =>
|
|
1980
|
+
onClick: () => n({
|
|
1387
1981
|
showDebugPanel: !0,
|
|
1388
1982
|
showMousePosition: !0,
|
|
1389
1983
|
showPanelSizes: !0,
|
|
@@ -1395,11 +1989,11 @@ const _t = [
|
|
|
1395
1989
|
children: "すべて有効"
|
|
1396
1990
|
}
|
|
1397
1991
|
),
|
|
1398
|
-
/* @__PURE__ */
|
|
1992
|
+
/* @__PURE__ */ s.jsx(
|
|
1399
1993
|
"button",
|
|
1400
1994
|
{
|
|
1401
1995
|
type: "button",
|
|
1402
|
-
onClick: () =>
|
|
1996
|
+
onClick: () => n({
|
|
1403
1997
|
showDebugPanel: !1,
|
|
1404
1998
|
showMousePosition: !1,
|
|
1405
1999
|
showPanelSizes: !1,
|
|
@@ -1413,1104 +2007,979 @@ const _t = [
|
|
|
1413
2007
|
)
|
|
1414
2008
|
] })
|
|
1415
2009
|
] })
|
|
1416
|
-
] }) : /* @__PURE__ */
|
|
2010
|
+
] }) : /* @__PURE__ */ s.jsx("button", { type: "button", onClick: o, className: "fixed right-4 bottom-4 z-50 rounded-lg bg-gray-800 p-2 text-white shadow-lg transition-colors hover:bg-gray-700", title: "デバッグ設定を開く", children: "🛠️" }), fe = {
|
|
1417
2011
|
prefix: "column",
|
|
1418
2012
|
startIndex: 1,
|
|
1419
2013
|
separator: "_"
|
|
1420
|
-
},
|
|
1421
|
-
const { prefix:
|
|
1422
|
-
return `${
|
|
1423
|
-
},
|
|
1424
|
-
const { prefix:
|
|
1425
|
-
if (!
|
|
2014
|
+
}, We = (t, n = fe) => {
|
|
2015
|
+
const { prefix: e, startIndex: o, separator: r } = n, a = t + o;
|
|
2016
|
+
return `${e}${r}${a}`;
|
|
2017
|
+
}, tn = (t, n = fe) => Array.from({ length: t }, (e, o) => We(o, n)), Ie = (t, n = fe) => {
|
|
2018
|
+
const { prefix: e, startIndex: o, separator: r } = n, a = `${e}${r}`;
|
|
2019
|
+
if (!t.startsWith(a))
|
|
1426
2020
|
return null;
|
|
1427
|
-
const
|
|
1428
|
-
return Number.isNaN(
|
|
1429
|
-
},
|
|
1430
|
-
const
|
|
1431
|
-
for (let
|
|
1432
|
-
if (
|
|
1433
|
-
return
|
|
1434
|
-
return
|
|
1435
|
-
},
|
|
1436
|
-
const
|
|
1437
|
-
return
|
|
1438
|
-
}),
|
|
1439
|
-
const
|
|
1440
|
-
return
|
|
1441
|
-
const
|
|
1442
|
-
|
|
1443
|
-
}),
|
|
1444
|
-
},
|
|
1445
|
-
const
|
|
1446
|
-
Object.values(
|
|
1447
|
-
|
|
2021
|
+
const l = t.slice(a.length), u = parseInt(l, 10);
|
|
2022
|
+
return Number.isNaN(u) || u < o ? null : u - o;
|
|
2023
|
+
}, Vr = (t, n = fe) => Ie(t, n) !== null, Zr = (t, n = fe) => {
|
|
2024
|
+
const e = t.map((o) => Ie(o, n)).filter((o) => o !== null).sort((o, r) => o - r);
|
|
2025
|
+
for (let o = 0; o < e.length; o++)
|
|
2026
|
+
if (e[o] !== o)
|
|
2027
|
+
return We(o, n);
|
|
2028
|
+
return We(e.length, n);
|
|
2029
|
+
}, Mr = (t, n = fe) => t.sort((e, o) => {
|
|
2030
|
+
const r = Ie(e, n) ?? -1, a = Ie(o, n) ?? -1;
|
|
2031
|
+
return r - a;
|
|
2032
|
+
}), Gr = (t, n = fe) => {
|
|
2033
|
+
const e = {};
|
|
2034
|
+
return t.forEach((o, r) => {
|
|
2035
|
+
const a = We(r, n);
|
|
2036
|
+
e[o] = a;
|
|
2037
|
+
}), e;
|
|
2038
|
+
}, Sr = (t, n, e = fe) => {
|
|
2039
|
+
const o = [];
|
|
2040
|
+
Object.values(t).forEach((l) => {
|
|
2041
|
+
o.push(...l);
|
|
1448
2042
|
});
|
|
1449
|
-
const
|
|
1450
|
-
return
|
|
1451
|
-
|
|
1452
|
-
}),
|
|
1453
|
-
const
|
|
1454
|
-
|
|
1455
|
-
}),
|
|
1456
|
-
},
|
|
1457
|
-
const [
|
|
1458
|
-
const
|
|
1459
|
-
for (const
|
|
1460
|
-
|
|
2043
|
+
const r = {}, a = tn(n, e);
|
|
2044
|
+
return a.forEach((l) => {
|
|
2045
|
+
r[l] = [];
|
|
2046
|
+
}), o.forEach((l, u) => {
|
|
2047
|
+
const f = u % n, b = a[f];
|
|
2048
|
+
r[b].push(l);
|
|
2049
|
+
}), r;
|
|
2050
|
+
}, Kr = ({ initialColumns: t, initialPanels: n, debug: e = {}, onLayoutChange: o }) => {
|
|
2051
|
+
const [r, a] = se(() => {
|
|
2052
|
+
const g = {};
|
|
2053
|
+
for (const v of t)
|
|
2054
|
+
g[v.id] = v.initialWidth || 400;
|
|
1461
2055
|
return {
|
|
1462
|
-
columns:
|
|
1463
|
-
columnWidths:
|
|
2056
|
+
columns: t,
|
|
2057
|
+
columnWidths: g,
|
|
1464
2058
|
isResizing: !1,
|
|
1465
2059
|
resizingColumn: null,
|
|
1466
|
-
columnPanels:
|
|
2060
|
+
columnPanels: n,
|
|
1467
2061
|
showInsertPlaceholders: !1
|
|
1468
2062
|
};
|
|
1469
|
-
}),
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
}, [
|
|
1473
|
-
const
|
|
1474
|
-
(
|
|
1475
|
-
|
|
1476
|
-
const
|
|
1477
|
-
|
|
1478
|
-
const
|
|
1479
|
-
...
|
|
1480
|
-
[
|
|
1481
|
-
},
|
|
1482
|
-
...
|
|
1483
|
-
[
|
|
2063
|
+
}), l = W(0), u = W(0);
|
|
2064
|
+
ee(() => {
|
|
2065
|
+
o?.(r);
|
|
2066
|
+
}, [r, o]);
|
|
2067
|
+
const f = D(
|
|
2068
|
+
(g, v) => {
|
|
2069
|
+
O(e, 1, "カラム追加:", g.id, "at position:", v), a((L) => {
|
|
2070
|
+
const w = [...L.columns], m = v ?? w.length;
|
|
2071
|
+
w.splice(m, 0, g);
|
|
2072
|
+
const p = {
|
|
2073
|
+
...L.columnWidths,
|
|
2074
|
+
[g.id]: g.initialWidth || 400
|
|
2075
|
+
}, j = {
|
|
2076
|
+
...L.columnPanels,
|
|
2077
|
+
[g.id]: []
|
|
1484
2078
|
};
|
|
1485
2079
|
return {
|
|
1486
|
-
...
|
|
1487
|
-
columns:
|
|
1488
|
-
columnWidths:
|
|
1489
|
-
columnPanels:
|
|
2080
|
+
...L,
|
|
2081
|
+
columns: w,
|
|
2082
|
+
columnWidths: p,
|
|
2083
|
+
columnPanels: j
|
|
1490
2084
|
};
|
|
1491
2085
|
});
|
|
1492
2086
|
},
|
|
1493
|
-
[
|
|
1494
|
-
),
|
|
1495
|
-
(
|
|
1496
|
-
|
|
1497
|
-
const
|
|
1498
|
-
if (
|
|
1499
|
-
return
|
|
1500
|
-
const
|
|
1501
|
-
|
|
1502
|
-
const
|
|
1503
|
-
return delete
|
|
1504
|
-
...
|
|
1505
|
-
columns:
|
|
1506
|
-
columnWidths:
|
|
1507
|
-
columnPanels:
|
|
2087
|
+
[e]
|
|
2088
|
+
), b = D(
|
|
2089
|
+
(g) => {
|
|
2090
|
+
O(e, 1, "カラム削除:", g), a((v) => {
|
|
2091
|
+
const L = v.columnPanels[g] || [], w = v.columns.filter((_) => _.id !== g);
|
|
2092
|
+
if (w.length === 0)
|
|
2093
|
+
return O(e, 1, "警告: 最後のカラムを削除しようとしています"), v;
|
|
2094
|
+
const m = w[0].id, p = { ...v.columnPanels };
|
|
2095
|
+
L.length > 0 && (p[m] = [...p[m], ...L]), delete p[g];
|
|
2096
|
+
const j = { ...v.columnWidths };
|
|
2097
|
+
return delete j[g], {
|
|
2098
|
+
...v,
|
|
2099
|
+
columns: w,
|
|
2100
|
+
columnWidths: j,
|
|
2101
|
+
columnPanels: p
|
|
1508
2102
|
};
|
|
1509
2103
|
});
|
|
1510
2104
|
},
|
|
1511
|
-
[
|
|
1512
|
-
),
|
|
1513
|
-
(
|
|
1514
|
-
|
|
1515
|
-
const
|
|
1516
|
-
return
|
|
1517
|
-
...
|
|
1518
|
-
columns:
|
|
2105
|
+
[e]
|
|
2106
|
+
), y = D(
|
|
2107
|
+
(g, v) => {
|
|
2108
|
+
O(e, 1, "カラム移動:", g, "->", v), a((L) => {
|
|
2109
|
+
const w = [...L.columns], [m] = w.splice(g, 1);
|
|
2110
|
+
return w.splice(v, 0, m), {
|
|
2111
|
+
...L,
|
|
2112
|
+
columns: w
|
|
1519
2113
|
};
|
|
1520
2114
|
});
|
|
1521
2115
|
},
|
|
1522
|
-
[
|
|
1523
|
-
),
|
|
1524
|
-
(
|
|
1525
|
-
|
|
1526
|
-
...
|
|
2116
|
+
[e]
|
|
2117
|
+
), A = D(
|
|
2118
|
+
(g, v) => {
|
|
2119
|
+
O(e, 2, "リサイズ開始:", g, "at X:", v), l.current = v, u.current = r.columnWidths[g] || 300, a((L) => ({
|
|
2120
|
+
...L,
|
|
1527
2121
|
isResizing: !0,
|
|
1528
|
-
resizingColumn:
|
|
2122
|
+
resizingColumn: g
|
|
1529
2123
|
}));
|
|
1530
2124
|
},
|
|
1531
|
-
[
|
|
1532
|
-
),
|
|
1533
|
-
(
|
|
1534
|
-
const { resizingColumn:
|
|
1535
|
-
if (!(
|
|
1536
|
-
const
|
|
1537
|
-
|
|
1538
|
-
...
|
|
2125
|
+
[e, r.columnWidths]
|
|
2126
|
+
), z = D(
|
|
2127
|
+
(g) => {
|
|
2128
|
+
const { resizingColumn: v, isResizing: L } = r;
|
|
2129
|
+
if (!(L && v)) return;
|
|
2130
|
+
const w = g - l.current, m = Math.max(100, Math.min(800, u.current + w));
|
|
2131
|
+
O(e, 2, "リサイズ中:", v, "new width:", m), a((p) => ({
|
|
2132
|
+
...p,
|
|
1539
2133
|
columnWidths: {
|
|
1540
|
-
...
|
|
1541
|
-
[
|
|
2134
|
+
...p.columnWidths,
|
|
2135
|
+
[v]: m
|
|
1542
2136
|
}
|
|
1543
2137
|
}));
|
|
1544
2138
|
},
|
|
1545
|
-
[
|
|
1546
|
-
),
|
|
1547
|
-
|
|
1548
|
-
...
|
|
2139
|
+
[e, r]
|
|
2140
|
+
), E = D(() => {
|
|
2141
|
+
O(e, 2, "リサイズ終了"), a((g) => ({
|
|
2142
|
+
...g,
|
|
1549
2143
|
isResizing: !1,
|
|
1550
2144
|
resizingColumn: null
|
|
1551
2145
|
}));
|
|
1552
|
-
}, [
|
|
1553
|
-
(
|
|
1554
|
-
|
|
1555
|
-
...
|
|
2146
|
+
}, [e]), c = D(
|
|
2147
|
+
(g, v) => {
|
|
2148
|
+
O(e, 2, "カラム幅設定:", g, v), a((L) => ({
|
|
2149
|
+
...L,
|
|
1556
2150
|
columnWidths: {
|
|
1557
|
-
...
|
|
1558
|
-
[
|
|
2151
|
+
...L.columnWidths,
|
|
2152
|
+
[g]: Math.max(100, Math.min(800, v))
|
|
1559
2153
|
}
|
|
1560
2154
|
}));
|
|
1561
2155
|
},
|
|
1562
|
-
[
|
|
1563
|
-
),
|
|
1564
|
-
|
|
1565
|
-
const
|
|
1566
|
-
for (const
|
|
1567
|
-
|
|
2156
|
+
[e]
|
|
2157
|
+
), P = D(() => {
|
|
2158
|
+
O(e, 1, "カラム幅リセット"), a((g) => {
|
|
2159
|
+
const v = {};
|
|
2160
|
+
for (const L of g.columns)
|
|
2161
|
+
v[L.id] = L.initialWidth || 400;
|
|
1568
2162
|
return {
|
|
1569
|
-
...
|
|
1570
|
-
columnWidths:
|
|
2163
|
+
...g,
|
|
2164
|
+
columnWidths: v
|
|
1571
2165
|
};
|
|
1572
2166
|
});
|
|
1573
|
-
}, [
|
|
1574
|
-
(
|
|
1575
|
-
|
|
1576
|
-
const
|
|
1577
|
-
if (
|
|
1578
|
-
const
|
|
1579
|
-
|
|
2167
|
+
}, [e]), k = D(
|
|
2168
|
+
(g, v, L, w) => {
|
|
2169
|
+
O(e, 1, "パネル移動:", g, "from", v, "to", L, "at", w), a((m) => {
|
|
2170
|
+
const p = { ...m.columnPanels };
|
|
2171
|
+
if (v in p && (p[v] = p[v].filter((j) => j !== g)), L in p) {
|
|
2172
|
+
const j = [...p[L]];
|
|
2173
|
+
j.splice(w, 0, g), p[L] = j;
|
|
1580
2174
|
}
|
|
1581
2175
|
return {
|
|
1582
|
-
...
|
|
1583
|
-
columnPanels:
|
|
2176
|
+
...m,
|
|
2177
|
+
columnPanels: p
|
|
1584
2178
|
};
|
|
1585
2179
|
});
|
|
1586
2180
|
},
|
|
1587
|
-
[
|
|
1588
|
-
),
|
|
1589
|
-
(
|
|
1590
|
-
|
|
1591
|
-
const
|
|
1592
|
-
|
|
1593
|
-
const
|
|
1594
|
-
return
|
|
1595
|
-
...
|
|
1596
|
-
columnPanels:
|
|
2181
|
+
[e]
|
|
2182
|
+
), S = D(
|
|
2183
|
+
(g, v, L) => {
|
|
2184
|
+
O(e, 1, "パネル追加:", g, "to column:", v), a((w) => {
|
|
2185
|
+
const m = { ...w.columnPanels };
|
|
2186
|
+
v in m || (m[v] = []);
|
|
2187
|
+
const p = [...m[v]], j = L ?? p.length;
|
|
2188
|
+
return p.splice(j, 0, g), m[v] = p, {
|
|
2189
|
+
...w,
|
|
2190
|
+
columnPanels: m
|
|
1597
2191
|
};
|
|
1598
2192
|
});
|
|
1599
2193
|
},
|
|
1600
|
-
[
|
|
1601
|
-
),
|
|
1602
|
-
(
|
|
1603
|
-
|
|
1604
|
-
const
|
|
1605
|
-
for (const [
|
|
1606
|
-
|
|
2194
|
+
[e]
|
|
2195
|
+
), N = D(
|
|
2196
|
+
(g) => {
|
|
2197
|
+
O(e, 1, "パネル削除:", g), a((v) => {
|
|
2198
|
+
const L = {};
|
|
2199
|
+
for (const [w, m] of Object.entries(v.columnPanels))
|
|
2200
|
+
L[w] = m.filter((p) => p !== g);
|
|
1607
2201
|
return {
|
|
1608
|
-
...
|
|
1609
|
-
columnPanels:
|
|
2202
|
+
...v,
|
|
2203
|
+
columnPanels: L
|
|
1610
2204
|
};
|
|
1611
2205
|
});
|
|
1612
2206
|
},
|
|
1613
|
-
[
|
|
1614
|
-
),
|
|
1615
|
-
(
|
|
1616
|
-
|
|
1617
|
-
const
|
|
1618
|
-
if (
|
|
1619
|
-
const
|
|
1620
|
-
|
|
1621
|
-
const
|
|
1622
|
-
id:
|
|
1623
|
-
title: `カラム ${
|
|
2207
|
+
[e]
|
|
2208
|
+
), R = D(
|
|
2209
|
+
(g) => {
|
|
2210
|
+
O(e, 1, "カラム数更新:", g), a((v) => {
|
|
2211
|
+
const L = v.columns.length;
|
|
2212
|
+
if (g === L) return v;
|
|
2213
|
+
const w = Sr(v.columnPanels, g, fe), m = tn(g, fe), p = v.isResizing && v.resizingColumn && !m.includes(v.resizingColumn);
|
|
2214
|
+
p && O(e, 1, "リサイズ中のカラムが削除されるためリサイズを強制終了:", v.resizingColumn);
|
|
2215
|
+
const j = m.map((V, oe) => ({
|
|
2216
|
+
id: V,
|
|
2217
|
+
title: `カラム ${oe + 1}`,
|
|
1624
2218
|
minWidth: 350,
|
|
1625
2219
|
maxWidth: 800,
|
|
1626
2220
|
initialWidth: 400,
|
|
1627
|
-
resizable: !(
|
|
1628
|
-
})),
|
|
1629
|
-
if (Object.entries(
|
|
1630
|
-
|
|
1631
|
-
const
|
|
1632
|
-
|
|
2221
|
+
resizable: !(oe === 1 && g === 3)
|
|
2222
|
+
})), _ = {};
|
|
2223
|
+
if (Object.entries(v.columnWidths).some(([, V]) => V !== 400))
|
|
2224
|
+
m.forEach((V) => {
|
|
2225
|
+
const oe = v.columnWidths[V];
|
|
2226
|
+
oe && oe !== 400 ? _[V] = oe : _[V] = 400;
|
|
1633
2227
|
});
|
|
1634
2228
|
else {
|
|
1635
|
-
const
|
|
1636
|
-
|
|
1637
|
-
|
|
2229
|
+
const V = L > g ? Object.values(v.columnWidths).reduce((h, x) => h + x, 0) : g * 400, oe = Math.max(V / g, 350);
|
|
2230
|
+
m.forEach((h) => {
|
|
2231
|
+
_[h] = oe;
|
|
1638
2232
|
});
|
|
1639
2233
|
}
|
|
1640
2234
|
return {
|
|
1641
|
-
...
|
|
1642
|
-
columns:
|
|
1643
|
-
columnPanels:
|
|
1644
|
-
columnWidths:
|
|
1645
|
-
isResizing:
|
|
1646
|
-
resizingColumn:
|
|
2235
|
+
...v,
|
|
2236
|
+
columns: j,
|
|
2237
|
+
columnPanels: w,
|
|
2238
|
+
columnWidths: _,
|
|
2239
|
+
isResizing: p ? !1 : v.isResizing,
|
|
2240
|
+
resizingColumn: p ? null : v.resizingColumn
|
|
1647
2241
|
};
|
|
1648
2242
|
});
|
|
1649
2243
|
},
|
|
1650
|
-
[
|
|
1651
|
-
),
|
|
1652
|
-
|
|
1653
|
-
const
|
|
1654
|
-
for (const
|
|
1655
|
-
for (const
|
|
1656
|
-
|
|
1657
|
-
const
|
|
1658
|
-
for (const
|
|
1659
|
-
|
|
1660
|
-
let
|
|
1661
|
-
for (const
|
|
1662
|
-
const
|
|
1663
|
-
|
|
2244
|
+
[e]
|
|
2245
|
+
), d = D(() => {
|
|
2246
|
+
O(e, 1, "カラム自動バランス調整"), a((g) => {
|
|
2247
|
+
const v = [];
|
|
2248
|
+
for (const m of Object.keys(g.columnPanels))
|
|
2249
|
+
for (const p of g.columnPanels[m])
|
|
2250
|
+
v.push(p);
|
|
2251
|
+
const L = {};
|
|
2252
|
+
for (const m of g.columns)
|
|
2253
|
+
L[m.id] = [];
|
|
2254
|
+
let w = 0;
|
|
2255
|
+
for (const m of v) {
|
|
2256
|
+
const p = g.columns[w % g.columns.length].id;
|
|
2257
|
+
L[p].push(m), w += 1;
|
|
1664
2258
|
}
|
|
1665
2259
|
return {
|
|
1666
|
-
...
|
|
1667
|
-
columnPanels:
|
|
2260
|
+
...g,
|
|
2261
|
+
columnPanels: L
|
|
1668
2262
|
};
|
|
1669
2263
|
});
|
|
1670
|
-
}, [
|
|
1671
|
-
(
|
|
1672
|
-
[
|
|
1673
|
-
),
|
|
1674
|
-
let
|
|
1675
|
-
for (const
|
|
1676
|
-
|
|
1677
|
-
return
|
|
1678
|
-
}, [
|
|
1679
|
-
|
|
1680
|
-
...
|
|
1681
|
-
showInsertPlaceholders:
|
|
2264
|
+
}, [e]), $ = D(
|
|
2265
|
+
(g) => r.columns.find((v) => v.id === g),
|
|
2266
|
+
[r.columns]
|
|
2267
|
+
), T = D(() => {
|
|
2268
|
+
let g = 0;
|
|
2269
|
+
for (const v of Object.values(r.columnWidths))
|
|
2270
|
+
g += v;
|
|
2271
|
+
return g;
|
|
2272
|
+
}, [r.columnWidths]), Y = D((g) => document.querySelector(`[data-column-id="${g}"]`), []), G = D((g) => {
|
|
2273
|
+
a((v) => ({
|
|
2274
|
+
...v,
|
|
2275
|
+
showInsertPlaceholders: g
|
|
1682
2276
|
}));
|
|
1683
2277
|
}, []);
|
|
1684
2278
|
return {
|
|
1685
|
-
layoutState:
|
|
1686
|
-
addColumn:
|
|
1687
|
-
removeColumn:
|
|
1688
|
-
moveColumn:
|
|
1689
|
-
startResize:
|
|
1690
|
-
handleResize:
|
|
1691
|
-
endResize:
|
|
1692
|
-
setColumnWidth:
|
|
1693
|
-
resetColumnWidths:
|
|
2279
|
+
layoutState: r,
|
|
2280
|
+
addColumn: f,
|
|
2281
|
+
removeColumn: b,
|
|
2282
|
+
moveColumn: y,
|
|
2283
|
+
startResize: A,
|
|
2284
|
+
handleResize: z,
|
|
2285
|
+
endResize: E,
|
|
2286
|
+
setColumnWidth: c,
|
|
2287
|
+
resetColumnWidths: P,
|
|
1694
2288
|
movePanel: k,
|
|
1695
|
-
addPanel:
|
|
1696
|
-
removePanel:
|
|
1697
|
-
updateColumnCount:
|
|
1698
|
-
autoBalanceColumns:
|
|
1699
|
-
getColumnById:
|
|
1700
|
-
getTotalWidth:
|
|
1701
|
-
getColumnElement:
|
|
1702
|
-
setShowInsertPlaceholders:
|
|
2289
|
+
addPanel: S,
|
|
2290
|
+
removePanel: N,
|
|
2291
|
+
updateColumnCount: R,
|
|
2292
|
+
autoBalanceColumns: d,
|
|
2293
|
+
getColumnById: $,
|
|
2294
|
+
getTotalWidth: T,
|
|
2295
|
+
getColumnElement: Y,
|
|
2296
|
+
setShowInsertPlaceholders: G
|
|
1703
2297
|
};
|
|
1704
|
-
},
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
}
|
|
1722
|
-
if (e < N + o) {
|
|
1723
|
-
const l = Math.max(0, (N + o - e) / o);
|
|
1724
|
-
y = -Math.min(u, i + l * (u - i));
|
|
1725
|
-
} else if (e > M - o) {
|
|
1726
|
-
const l = Math.max(0, (e - (M - o)) / o);
|
|
1727
|
-
y = Math.min(u, i + l * (u - i));
|
|
1728
|
-
}
|
|
1729
|
-
}
|
|
1730
|
-
return { x: T, y };
|
|
1731
|
-
}, zt = (r, e) => {
|
|
1732
|
-
(r.x !== 0 || r.y !== 0) && (e ? e.scrollBy(r.x, r.y) : window.scrollBy(r.x, r.y));
|
|
1733
|
-
};
|
|
1734
|
-
class Ke {
|
|
1735
|
-
constructor(e = ke, n) {
|
|
1736
|
-
this.intervalId = null, this.isActive = !1, this.config = e, this.scrollElement = n;
|
|
1737
|
-
}
|
|
1738
|
-
setScrollElement(e) {
|
|
1739
|
-
this.scrollElement = e;
|
|
1740
|
-
}
|
|
1741
|
-
start(e, n) {
|
|
1742
|
-
this.isActive || (this.isActive = !0, this.intervalId = window.setInterval(() => {
|
|
1743
|
-
const s = He(e, n, this.config, this.scrollElement);
|
|
1744
|
-
zt(s, this.scrollElement);
|
|
1745
|
-
}, 16));
|
|
1746
|
-
}
|
|
1747
|
-
update(e, n) {
|
|
1748
|
-
const s = He(e, n, this.config, this.scrollElement);
|
|
1749
|
-
(s.x !== 0 || s.y !== 0) && !this.isActive ? this.start(e, n) : s.x === 0 && s.y === 0 && this.isActive && this.stop();
|
|
1750
|
-
}
|
|
1751
|
-
stop() {
|
|
1752
|
-
this.intervalId !== null && (clearInterval(this.intervalId), this.intervalId = null), this.isActive = !1;
|
|
1753
|
-
}
|
|
1754
|
-
isScrolling() {
|
|
1755
|
-
return this.isActive;
|
|
1756
|
-
}
|
|
1757
|
-
updateConfig(e) {
|
|
1758
|
-
this.config = e;
|
|
1759
|
-
}
|
|
1760
|
-
}
|
|
1761
|
-
const Yt = ({
|
|
1762
|
-
debugConfig: r,
|
|
1763
|
-
dragState: e,
|
|
1764
|
-
customDrag: n,
|
|
1765
|
-
clickState: s,
|
|
1766
|
-
dragModes: o,
|
|
1767
|
-
isMouseDown: i,
|
|
1768
|
-
dragOverPosition: u,
|
|
1769
|
-
setCustomDrag: c,
|
|
1770
|
-
setDragState: h,
|
|
1771
|
-
setDragOverPosition: N,
|
|
1772
|
-
setOriginalPanelPosition: b,
|
|
1773
|
-
setClickState: M,
|
|
1774
|
-
setIsMouseDown: T,
|
|
1775
|
-
findPanelPosition: y,
|
|
1776
|
-
performPanelMove: l,
|
|
1777
|
-
showMousePosition: j,
|
|
2298
|
+
}, Ar = ({
|
|
2299
|
+
debugConfig: t,
|
|
2300
|
+
dragState: n,
|
|
2301
|
+
customDrag: e,
|
|
2302
|
+
clickState: o,
|
|
2303
|
+
dragModes: r,
|
|
2304
|
+
isMouseDown: a,
|
|
2305
|
+
dragOverPosition: l,
|
|
2306
|
+
setCustomDrag: u,
|
|
2307
|
+
setDragState: f,
|
|
2308
|
+
setDragOverPosition: b,
|
|
2309
|
+
setOriginalPanelPosition: y,
|
|
2310
|
+
setClickState: A,
|
|
2311
|
+
setIsMouseDown: z,
|
|
2312
|
+
findPanelPosition: E,
|
|
2313
|
+
performPanelMove: c,
|
|
2314
|
+
showMousePosition: P,
|
|
1778
2315
|
updateMousePosition: k,
|
|
1779
|
-
recordMouseDown:
|
|
1780
|
-
recordClickPosition:
|
|
1781
|
-
isVirtualClick:
|
|
1782
|
-
calculateMoveDistance:
|
|
1783
|
-
clearMouseTracking:
|
|
1784
|
-
resetDragState:
|
|
1785
|
-
resetClickState:
|
|
1786
|
-
createDragImage:
|
|
1787
|
-
updateDragImagePosition:
|
|
1788
|
-
removeDragImage:
|
|
1789
|
-
handlePlaceholderDragEnter:
|
|
1790
|
-
handlePlaceholderDragLeave:
|
|
2316
|
+
recordMouseDown: S,
|
|
2317
|
+
recordClickPosition: N,
|
|
2318
|
+
isVirtualClick: R,
|
|
2319
|
+
calculateMoveDistance: d,
|
|
2320
|
+
clearMouseTracking: $,
|
|
2321
|
+
resetDragState: T,
|
|
2322
|
+
resetClickState: Y,
|
|
2323
|
+
createDragImage: G,
|
|
2324
|
+
updateDragImagePosition: g,
|
|
2325
|
+
removeDragImage: v,
|
|
2326
|
+
handlePlaceholderDragEnter: L,
|
|
2327
|
+
handlePlaceholderDragLeave: w
|
|
1791
2328
|
}) => {
|
|
1792
|
-
const
|
|
1793
|
-
|
|
1794
|
-
const
|
|
1795
|
-
|
|
1796
|
-
const
|
|
1797
|
-
|
|
2329
|
+
const m = W(t);
|
|
2330
|
+
m.current = t;
|
|
2331
|
+
const p = W(null), j = W(null), _ = W(0), I = W(new rt(Se));
|
|
2332
|
+
ee(() => {
|
|
2333
|
+
const x = document.querySelector(Vt);
|
|
2334
|
+
x && I.current.setScrollElement(x);
|
|
1798
2335
|
}, []);
|
|
1799
|
-
const
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
}, [
|
|
1803
|
-
const
|
|
1804
|
-
(
|
|
1805
|
-
if (
|
|
1806
|
-
|
|
1807
|
-
const
|
|
1808
|
-
|
|
2336
|
+
const re = W(l);
|
|
2337
|
+
ee(() => {
|
|
2338
|
+
re.current = l, O(m.current, 2, "dragOverPositionRef更新:", l);
|
|
2339
|
+
}, [l]);
|
|
2340
|
+
const V = D(
|
|
2341
|
+
(x) => {
|
|
2342
|
+
if (e.isActive || o.isClicked) {
|
|
2343
|
+
x.preventDefault();
|
|
2344
|
+
const M = window.getSelection();
|
|
2345
|
+
M && M.rangeCount > 0 && M.removeAllRanges();
|
|
1809
2346
|
}
|
|
1810
|
-
if (
|
|
1811
|
-
k(
|
|
1812
|
-
const
|
|
1813
|
-
if (
|
|
2347
|
+
if (e.isActive) {
|
|
2348
|
+
k(x.clientX, x.clientY), g(x.clientX, x.clientY), I.current.update(x.clientX, x.clientY);
|
|
2349
|
+
const M = document.elementFromPoint(x.clientX, x.clientY), F = M?.closest("[data-drop-zone]");
|
|
2350
|
+
if (F) {
|
|
1814
2351
|
document.body.classList.add("droppable");
|
|
1815
|
-
const
|
|
1816
|
-
|
|
1817
|
-
const
|
|
1818
|
-
if (
|
|
1819
|
-
const
|
|
1820
|
-
if (
|
|
1821
|
-
const
|
|
1822
|
-
|
|
2352
|
+
const Z = F.getAttribute("data-column-index"), ae = Z ? parseInt(Z, 10) : null;
|
|
2353
|
+
ae !== null && ae !== n.dragOverColumn && f((H) => ({ ...H, dragOverColumn: ae }));
|
|
2354
|
+
const X = M?.closest("[data-placeholder-index]");
|
|
2355
|
+
if (X) {
|
|
2356
|
+
const H = X.getAttribute("data-placeholder-index"), ve = X.getAttribute("data-placeholder-column");
|
|
2357
|
+
if (H && ve) {
|
|
2358
|
+
const ue = parseInt(H, 10), pe = parseInt(ve, 10);
|
|
2359
|
+
L(pe, ue);
|
|
1823
2360
|
}
|
|
1824
2361
|
} else
|
|
1825
|
-
|
|
2362
|
+
w();
|
|
1826
2363
|
} else
|
|
1827
|
-
document.body.classList.remove("droppable"),
|
|
1828
|
-
} else if (
|
|
1829
|
-
if (o
|
|
1830
|
-
|
|
1831
|
-
const
|
|
1832
|
-
if (
|
|
1833
|
-
const
|
|
1834
|
-
|
|
2364
|
+
document.body.classList.remove("droppable"), b(null), f((Z) => ({ ...Z, dragOverColumn: null }));
|
|
2365
|
+
} else if (a && o.isClicked && o.panelId) {
|
|
2366
|
+
if (r[o.panelId] !== "custom" || d(x.clientX, x.clientY) < 10) return;
|
|
2367
|
+
O(m.current, 1, "🚀 カスタムドラッグ開始 -", o.panelId);
|
|
2368
|
+
const F = document.querySelector(`[data-panel-id="${o.panelId}"]`);
|
|
2369
|
+
if (F && j.current) {
|
|
2370
|
+
const Z = F.getBoundingClientRect(), ae = j.current.x - Z.left, X = j.current.y - Z.top;
|
|
2371
|
+
G(o.panelId, ae, X), document.body.classList.add("custom-dragging"), u({
|
|
1835
2372
|
isActive: !0,
|
|
1836
|
-
panelId:
|
|
1837
|
-
startX:
|
|
1838
|
-
startY:
|
|
2373
|
+
panelId: o.panelId,
|
|
2374
|
+
startX: ae,
|
|
2375
|
+
startY: X
|
|
1839
2376
|
});
|
|
1840
2377
|
}
|
|
1841
|
-
|
|
2378
|
+
f({ isDragging: !0, draggedPanel: o.panelId, dragOverColumn: null }), y(E(o.panelId)), P(x.clientX, x.clientY), A({ isClicked: !1, panelId: null }), z(!1), $(), j.current = null, p.current && (clearTimeout(p.current), p.current = null);
|
|
1842
2379
|
}
|
|
1843
2380
|
},
|
|
1844
2381
|
[
|
|
1845
|
-
|
|
1846
|
-
s,
|
|
1847
|
-
e.dragOverColumn,
|
|
2382
|
+
e.isActive,
|
|
1848
2383
|
o,
|
|
1849
|
-
|
|
2384
|
+
n.dragOverColumn,
|
|
2385
|
+
r,
|
|
2386
|
+
a,
|
|
1850
2387
|
k,
|
|
1851
|
-
|
|
1852
|
-
N,
|
|
1853
|
-
Z,
|
|
1854
|
-
y,
|
|
1855
|
-
c,
|
|
2388
|
+
f,
|
|
1856
2389
|
b,
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
2390
|
+
d,
|
|
2391
|
+
E,
|
|
2392
|
+
u,
|
|
2393
|
+
y,
|
|
2394
|
+
P,
|
|
2395
|
+
A,
|
|
2396
|
+
z,
|
|
2397
|
+
$,
|
|
2398
|
+
G,
|
|
2399
|
+
g,
|
|
1861
2400
|
L,
|
|
1862
|
-
|
|
1863
|
-
C,
|
|
1864
|
-
W
|
|
2401
|
+
w
|
|
1865
2402
|
]
|
|
1866
|
-
),
|
|
1867
|
-
(
|
|
1868
|
-
if (
|
|
1869
|
-
isActive:
|
|
1870
|
-
panelId:
|
|
1871
|
-
dragMode:
|
|
1872
|
-
}),
|
|
1873
|
-
|
|
1874
|
-
const
|
|
1875
|
-
if (
|
|
1876
|
-
const
|
|
1877
|
-
if (
|
|
1878
|
-
const
|
|
1879
|
-
|
|
2403
|
+
), oe = D(
|
|
2404
|
+
(x) => {
|
|
2405
|
+
if (O(m.current, 1, "🐭 カスタムドラッグハンドラー - グローバルマウスアップ", {
|
|
2406
|
+
isActive: e.isActive,
|
|
2407
|
+
panelId: e.panelId,
|
|
2408
|
+
dragMode: e.panelId ? r[e.panelId] : "unknown"
|
|
2409
|
+
}), e.isActive) {
|
|
2410
|
+
I.current.stop();
|
|
2411
|
+
const M = re.current;
|
|
2412
|
+
if (M) {
|
|
2413
|
+
const Z = document.elementFromPoint(x.clientX, x.clientY)?.closest("[data-drop-zone]");
|
|
2414
|
+
if (Z) {
|
|
2415
|
+
const ae = Z.getAttribute("data-column-key");
|
|
2416
|
+
ae && r[e.panelId] === "custom" ? (O(m.current, 1, "🔄 カスタムドラッグパネル移動実行:", e.panelId, "→", ae), c(e.panelId, ae, M.insertIndex)) : O(m.current, 1, "🚫 カスタムドラッグパネル移動スキップ:", e.panelId, "モード:", r[e.panelId]);
|
|
1880
2417
|
}
|
|
1881
2418
|
}
|
|
1882
|
-
|
|
1883
|
-
} else if (
|
|
1884
|
-
const
|
|
1885
|
-
if (!(
|
|
1886
|
-
|
|
2419
|
+
v(), document.body.classList.remove("custom-dragging", "droppable"), T(), _.current = 0;
|
|
2420
|
+
} else if (R(x.clientX, x.clientY)) {
|
|
2421
|
+
const F = document.elementFromPoint(x.clientX, x.clientY)?.closest("[data-panel-id]"), Z = F?.getAttribute("data-panel-id") ?? null;
|
|
2422
|
+
if (!(F && Z) || r[Z] !== "custom") {
|
|
2423
|
+
p.current && (clearTimeout(p.current), p.current = null), Y(), j.current = null, _.current = 0;
|
|
1887
2424
|
return;
|
|
1888
2425
|
}
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
}, 2e3)) : (
|
|
1892
|
-
|
|
2426
|
+
_.current += 1, o.isClicked === !1 && _.current === 1 ? (O(m.current, 1, "🖱️ 仮想クリック検出 - ドラッグ待機状態へ:", Z), A({ isClicked: !0, panelId: Z }), p.current = window.setTimeout(() => {
|
|
2427
|
+
O(m.current, 1, "⏳ クリック待機状態を自動解除:", Z), Y(), j.current = null, _.current = 0;
|
|
2428
|
+
}, 2e3)) : (O(m.current, 1, "🚫 クリック待機状態を解除 - 仮想クリック検出停止:", Z), p.current && (clearTimeout(p.current), p.current = null), Y(), j.current = null, _.current = 0, p.current = window.setTimeout(() => {
|
|
2429
|
+
O(m.current, 1, "⏳ 仮想クリック検出再開:", Z);
|
|
1893
2430
|
}, 2e3));
|
|
1894
|
-
} else
|
|
1895
|
-
|
|
2431
|
+
} else o.isClicked && (Y(), j.current = null, _.current = 0);
|
|
2432
|
+
a && z(!1);
|
|
1896
2433
|
},
|
|
1897
|
-
[
|
|
1898
|
-
),
|
|
1899
|
-
(
|
|
1900
|
-
if (
|
|
1901
|
-
|
|
2434
|
+
[e.isActive, e.panelId, o, r, a, c, T, Y, R, A, z, v]
|
|
2435
|
+
), h = D(
|
|
2436
|
+
(x, M) => {
|
|
2437
|
+
if (r[M] !== "custom") {
|
|
2438
|
+
O(m.current, 1, "🚫 カスタムドラッグモードではない - スキップ:", M);
|
|
1902
2439
|
return;
|
|
1903
2440
|
}
|
|
1904
|
-
|
|
2441
|
+
S(x.clientX, x.clientY), o.isClicked && o.panelId === M && (z(!0), p.current !== null && (clearTimeout(p.current), p.current = null), N(x.clientX, x.clientY), j.current = { x: x.clientX, y: x.clientY });
|
|
1905
2442
|
},
|
|
1906
|
-
[
|
|
2443
|
+
[o, r, S, z, N]
|
|
1907
2444
|
);
|
|
1908
|
-
return
|
|
1909
|
-
|
|
2445
|
+
return ee(() => () => {
|
|
2446
|
+
p.current !== null && clearTimeout(p.current), I.current.stop();
|
|
1910
2447
|
}, []), {
|
|
1911
|
-
handleGlobalMouseMove:
|
|
1912
|
-
handleGlobalMouseUp:
|
|
1913
|
-
handleMouseDown:
|
|
2448
|
+
handleGlobalMouseMove: V,
|
|
2449
|
+
handleGlobalMouseUp: oe,
|
|
2450
|
+
handleMouseDown: h
|
|
1914
2451
|
};
|
|
1915
|
-
},
|
|
1916
|
-
const [
|
|
2452
|
+
}, $r = () => {
|
|
2453
|
+
const [t, n] = se({
|
|
1917
2454
|
isDragging: !1,
|
|
1918
2455
|
draggedPanel: null,
|
|
1919
2456
|
dragOverColumn: null
|
|
1920
|
-
}), [
|
|
2457
|
+
}), [e, o] = se(null), [r, a] = se(null), [l, u] = se({
|
|
1921
2458
|
isActive: !1,
|
|
1922
2459
|
panelId: "",
|
|
1923
2460
|
startX: 0,
|
|
1924
2461
|
startY: 0
|
|
1925
|
-
}), [
|
|
2462
|
+
}), [f, b] = se({
|
|
1926
2463
|
isClicked: !1,
|
|
1927
2464
|
panelId: null
|
|
1928
|
-
}), [
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
i($);
|
|
1945
|
-
}, []), z = w(($) => {
|
|
1946
|
-
c($);
|
|
1947
|
-
}, []), Z = w(($) => {
|
|
1948
|
-
N($);
|
|
1949
|
-
}, []), Y = w(($) => {
|
|
1950
|
-
M($);
|
|
1951
|
-
}, []), U = w(($) => {
|
|
1952
|
-
y($);
|
|
2465
|
+
}), [y, A] = se(!1), z = D(() => {
|
|
2466
|
+
u({ isActive: !1, panelId: "", startX: 0, startY: 0 }), n({ isDragging: !1, draggedPanel: null, dragOverColumn: null }), o(null), a(null);
|
|
2467
|
+
}, []), E = D(() => {
|
|
2468
|
+
b({ isClicked: !1, panelId: null }), A(!1);
|
|
2469
|
+
}, []), c = D((d) => {
|
|
2470
|
+
n(d);
|
|
2471
|
+
}, []), P = D((d) => {
|
|
2472
|
+
o(d);
|
|
2473
|
+
}, []), k = D((d) => {
|
|
2474
|
+
a(d);
|
|
2475
|
+
}, []), S = D((d) => {
|
|
2476
|
+
u(d);
|
|
2477
|
+
}, []), N = D((d) => {
|
|
2478
|
+
b(d);
|
|
2479
|
+
}, []), R = D((d) => {
|
|
2480
|
+
A(d);
|
|
1953
2481
|
}, []);
|
|
1954
2482
|
return {
|
|
1955
2483
|
// States / 状態
|
|
1956
|
-
dragState:
|
|
1957
|
-
dragOverPosition:
|
|
1958
|
-
originalPanelPosition:
|
|
1959
|
-
customDrag:
|
|
1960
|
-
clickState:
|
|
1961
|
-
|
|
1962
|
-
isMouseDown: T,
|
|
2484
|
+
dragState: t,
|
|
2485
|
+
dragOverPosition: e,
|
|
2486
|
+
originalPanelPosition: r,
|
|
2487
|
+
customDrag: l,
|
|
2488
|
+
clickState: f,
|
|
2489
|
+
isMouseDown: y,
|
|
1963
2490
|
// Stabilized Setters / 安定化されたセッター
|
|
1964
|
-
setDragState:
|
|
1965
|
-
setDragOverPosition:
|
|
1966
|
-
setOriginalPanelPosition:
|
|
1967
|
-
setCustomDrag:
|
|
1968
|
-
setClickState:
|
|
1969
|
-
|
|
1970
|
-
setIsMouseDown: U,
|
|
2491
|
+
setDragState: c,
|
|
2492
|
+
setDragOverPosition: P,
|
|
2493
|
+
setOriginalPanelPosition: k,
|
|
2494
|
+
setCustomDrag: S,
|
|
2495
|
+
setClickState: N,
|
|
2496
|
+
setIsMouseDown: R,
|
|
1971
2497
|
// Utility Functions / ユーティリティ関数
|
|
1972
|
-
resetDragState:
|
|
1973
|
-
resetClickState:
|
|
2498
|
+
resetDragState: z,
|
|
2499
|
+
resetClickState: E
|
|
1974
2500
|
};
|
|
1975
|
-
},
|
|
1976
|
-
const [
|
|
2501
|
+
}, Tr = () => {
|
|
2502
|
+
const [t, n] = se({
|
|
1977
2503
|
x: 0,
|
|
1978
2504
|
y: 0,
|
|
1979
2505
|
isVisible: !1
|
|
1980
|
-
}),
|
|
1981
|
-
|
|
1982
|
-
}, []),
|
|
1983
|
-
|
|
1984
|
-
}, []),
|
|
1985
|
-
|
|
1986
|
-
x:
|
|
1987
|
-
y:
|
|
1988
|
-
isVisible:
|
|
2506
|
+
}), e = W(null), o = W(0), r = W(null), a = D((E, c) => {
|
|
2507
|
+
n({ x: E, y: c, isVisible: !0 });
|
|
2508
|
+
}, []), l = D(() => {
|
|
2509
|
+
n((E) => ({ ...E, isVisible: !1 }));
|
|
2510
|
+
}, []), u = D((E, c) => {
|
|
2511
|
+
n((P) => P.x === E && P.y === c ? P : {
|
|
2512
|
+
x: E,
|
|
2513
|
+
y: c,
|
|
2514
|
+
isVisible: P.isVisible
|
|
1989
2515
|
});
|
|
1990
|
-
}, []),
|
|
1991
|
-
|
|
1992
|
-
}, []),
|
|
1993
|
-
|
|
1994
|
-
}, []),
|
|
1995
|
-
if (!
|
|
2516
|
+
}, []), f = D((E, c) => {
|
|
2517
|
+
o.current = Date.now(), r.current = { x: E, y: c };
|
|
2518
|
+
}, []), b = D((E, c) => {
|
|
2519
|
+
e.current = { x: E, y: c };
|
|
2520
|
+
}, []), y = D((E, c, P = 500, k = 5) => Date.now() - (o.current || 0) >= P || !r.current ? !1 : Math.sqrt((E - r.current.x) ** 2 + (c - r.current.y) ** 2) < k, []), A = D((E, c) => {
|
|
2521
|
+
if (!e.current)
|
|
1996
2522
|
return 0;
|
|
1997
|
-
const
|
|
1998
|
-
return Math.sqrt(
|
|
1999
|
-
}, []),
|
|
2000
|
-
|
|
2523
|
+
const P = Math.abs(E - e.current.x), k = Math.abs(c - e.current.y);
|
|
2524
|
+
return Math.sqrt(P * P + k * k);
|
|
2525
|
+
}, []), z = D(() => {
|
|
2526
|
+
e.current = null, o.current = 0, r.current = null;
|
|
2001
2527
|
}, []);
|
|
2002
2528
|
return {
|
|
2003
|
-
mousePosition:
|
|
2004
|
-
lastClickPosition:
|
|
2005
|
-
mouseDownTime:
|
|
2006
|
-
mouseDownPosition:
|
|
2007
|
-
showMousePosition:
|
|
2008
|
-
hideMousePosition:
|
|
2009
|
-
updateMousePosition:
|
|
2010
|
-
recordMouseDown:
|
|
2011
|
-
recordClickPosition:
|
|
2012
|
-
isVirtualClick:
|
|
2013
|
-
calculateMoveDistance:
|
|
2014
|
-
clearMouseTracking:
|
|
2529
|
+
mousePosition: t,
|
|
2530
|
+
lastClickPosition: e.current,
|
|
2531
|
+
mouseDownTime: o.current,
|
|
2532
|
+
mouseDownPosition: r.current,
|
|
2533
|
+
showMousePosition: a,
|
|
2534
|
+
hideMousePosition: l,
|
|
2535
|
+
updateMousePosition: u,
|
|
2536
|
+
recordMouseDown: f,
|
|
2537
|
+
recordClickPosition: b,
|
|
2538
|
+
isVirtualClick: y,
|
|
2539
|
+
calculateMoveDistance: A,
|
|
2540
|
+
clearMouseTracking: z
|
|
2015
2541
|
};
|
|
2016
|
-
},
|
|
2017
|
-
debugConfig:
|
|
2018
|
-
dragState:
|
|
2019
|
-
customDrag:
|
|
2020
|
-
dragModes:
|
|
2021
|
-
columnPanels:
|
|
2022
|
-
dragOverPosition:
|
|
2023
|
-
originalPanelPosition:
|
|
2024
|
-
setDragState:
|
|
2025
|
-
setDragOverPosition:
|
|
2026
|
-
setOriginalPanelPosition:
|
|
2027
|
-
performPanelMove:
|
|
2028
|
-
showMousePosition:
|
|
2029
|
-
updateMousePosition:
|
|
2030
|
-
resetDragState:
|
|
2031
|
-
handlePlaceholderDragEnter:
|
|
2032
|
-
handlePlaceholderDragLeave:
|
|
2542
|
+
}, Lr = ({
|
|
2543
|
+
debugConfig: t,
|
|
2544
|
+
dragState: n,
|
|
2545
|
+
customDrag: e,
|
|
2546
|
+
dragModes: o,
|
|
2547
|
+
columnPanels: r,
|
|
2548
|
+
dragOverPosition: a,
|
|
2549
|
+
originalPanelPosition: l,
|
|
2550
|
+
setDragState: u,
|
|
2551
|
+
setDragOverPosition: f,
|
|
2552
|
+
setOriginalPanelPosition: b,
|
|
2553
|
+
performPanelMove: y,
|
|
2554
|
+
showMousePosition: A,
|
|
2555
|
+
updateMousePosition: z,
|
|
2556
|
+
resetDragState: E,
|
|
2557
|
+
handlePlaceholderDragEnter: c,
|
|
2558
|
+
handlePlaceholderDragLeave: P,
|
|
2033
2559
|
scale: k = 1
|
|
2034
2560
|
}) => {
|
|
2035
|
-
const
|
|
2036
|
-
|
|
2037
|
-
const
|
|
2038
|
-
|
|
2039
|
-
const
|
|
2040
|
-
|
|
2041
|
-
const
|
|
2042
|
-
|
|
2043
|
-
const
|
|
2044
|
-
|
|
2045
|
-
const
|
|
2046
|
-
|
|
2047
|
-
const
|
|
2048
|
-
|
|
2049
|
-
const
|
|
2050
|
-
|
|
2561
|
+
const S = W(t);
|
|
2562
|
+
S.current = t;
|
|
2563
|
+
const N = W(r);
|
|
2564
|
+
N.current = r;
|
|
2565
|
+
const R = W(n);
|
|
2566
|
+
R.current = n;
|
|
2567
|
+
const d = W(a);
|
|
2568
|
+
d.current = a;
|
|
2569
|
+
const $ = W(l);
|
|
2570
|
+
$.current = l;
|
|
2571
|
+
const T = W(k);
|
|
2572
|
+
T.current = k;
|
|
2573
|
+
const Y = W(new rt(Se));
|
|
2574
|
+
ee(() => {
|
|
2575
|
+
const m = document.querySelector(Vt);
|
|
2576
|
+
m && Y.current.setScrollElement(m);
|
|
2051
2577
|
}, []);
|
|
2052
|
-
const
|
|
2053
|
-
(
|
|
2054
|
-
if (
|
|
2055
|
-
|
|
2578
|
+
const G = D(
|
|
2579
|
+
(m, p) => {
|
|
2580
|
+
if (e.isActive) {
|
|
2581
|
+
O(S.current, 2, "カスタムドラッグアクティブ中 - 通常ドラッグを無効化:", p), m.preventDefault();
|
|
2056
2582
|
return;
|
|
2057
2583
|
}
|
|
2058
|
-
if (
|
|
2059
|
-
|
|
2584
|
+
if (o[p] === "custom") {
|
|
2585
|
+
O(S.current, 2, "カスタムドラッグモード - 通常ドラッグを無効化:", p), m.preventDefault();
|
|
2060
2586
|
return;
|
|
2061
2587
|
}
|
|
2062
|
-
|
|
2063
|
-
const
|
|
2064
|
-
let
|
|
2065
|
-
for (let
|
|
2066
|
-
const
|
|
2067
|
-
if (
|
|
2068
|
-
|
|
2588
|
+
O(S.current, 1, "ドラッグ開始:", p);
|
|
2589
|
+
const j = Object.keys(N.current);
|
|
2590
|
+
let _ = null;
|
|
2591
|
+
for (let I = 0; I < j.length; I++) {
|
|
2592
|
+
const re = j[I], V = N.current[re].indexOf(p);
|
|
2593
|
+
if (V !== -1) {
|
|
2594
|
+
_ = { columnIndex: I, panelIndex: V };
|
|
2069
2595
|
break;
|
|
2070
2596
|
}
|
|
2071
2597
|
}
|
|
2072
|
-
if (
|
|
2073
|
-
|
|
2074
|
-
const
|
|
2075
|
-
if (
|
|
2076
|
-
const
|
|
2077
|
-
|
|
2078
|
-
const
|
|
2079
|
-
|
|
2598
|
+
if (b(_), m.dataTransfer) {
|
|
2599
|
+
m.dataTransfer.setData("text/plain", p), m.dataTransfer.effectAllowed = "move";
|
|
2600
|
+
const I = T.current;
|
|
2601
|
+
if (I < 1) {
|
|
2602
|
+
const re = m.currentTarget.closest("[data-panel-id]") ?? m.currentTarget, V = re.getBoundingClientRect(), oe = re.offsetWidth, h = re.offsetHeight, x = re.cloneNode(!0);
|
|
2603
|
+
x.removeAttribute("data-panel-id"), x.removeAttribute("id"), Zt(re, x), x.style.margin = "0", x.style.width = `${oe}px`, x.style.height = `${h}px`, x.style.transform = `scale(${I})`, x.style.transformOrigin = "top left";
|
|
2604
|
+
const M = document.createElement("div");
|
|
2605
|
+
M.style.position = "fixed", M.style.top = "0", M.style.left = "-10000px", M.style.width = `${oe * I}px`, M.style.height = `${h * I}px`, M.style.overflow = "hidden", M.style.opacity = "0.8", M.style.pointerEvents = "none", M.appendChild(x), document.body.appendChild(M), m.dataTransfer.setDragImage(M, m.clientX - V.left, m.clientY - V.top), requestAnimationFrame(() => M.remove());
|
|
2080
2606
|
}
|
|
2081
2607
|
}
|
|
2082
|
-
|
|
2083
|
-
|
|
2608
|
+
A(m.clientX, m.clientY), requestAnimationFrame(() => {
|
|
2609
|
+
u({
|
|
2084
2610
|
isDragging: !0,
|
|
2085
|
-
draggedPanel:
|
|
2611
|
+
draggedPanel: p,
|
|
2086
2612
|
dragOverColumn: null
|
|
2087
2613
|
});
|
|
2088
2614
|
});
|
|
2089
2615
|
},
|
|
2090
|
-
[
|
|
2091
|
-
),
|
|
2092
|
-
|
|
2093
|
-
}, [
|
|
2094
|
-
(
|
|
2095
|
-
if (
|
|
2096
|
-
|
|
2097
|
-
const
|
|
2098
|
-
if (
|
|
2099
|
-
const
|
|
2100
|
-
if (
|
|
2101
|
-
const
|
|
2102
|
-
|
|
2616
|
+
[o, e.isActive, b, A, u]
|
|
2617
|
+
), g = D(() => {
|
|
2618
|
+
O(S.current, 1, "ドラッグ終了"), Y.current.stop(), E();
|
|
2619
|
+
}, [E]), v = D(
|
|
2620
|
+
(m, p) => {
|
|
2621
|
+
if (m.preventDefault(), m.dataTransfer.dropEffect = "move", !R.current.isDragging) return;
|
|
2622
|
+
z(m.clientX, m.clientY), p !== R.current.dragOverColumn && u((I) => ({ ...I, dragOverColumn: p }));
|
|
2623
|
+
const j = document.elementFromPoint(m.clientX, m.clientY), _ = j?.closest("[data-placeholder-index]");
|
|
2624
|
+
if (_) {
|
|
2625
|
+
const I = _.getAttribute("data-placeholder-index"), re = _.getAttribute("data-placeholder-column");
|
|
2626
|
+
if (I && re) {
|
|
2627
|
+
const V = parseInt(I, 10), oe = parseInt(re, 10);
|
|
2628
|
+
c(oe, V);
|
|
2103
2629
|
}
|
|
2104
2630
|
} else
|
|
2105
|
-
|
|
2631
|
+
j?.closest("[data-drop-zone]") || P();
|
|
2106
2632
|
},
|
|
2107
|
-
[
|
|
2108
|
-
),
|
|
2109
|
-
(
|
|
2110
|
-
|
|
2111
|
-
const
|
|
2112
|
-
|
|
2113
|
-
draggedPanel:
|
|
2114
|
-
targetColumn:
|
|
2115
|
-
insertPosition: `カラム${
|
|
2116
|
-
}),
|
|
2633
|
+
[z, u, c, P]
|
|
2634
|
+
), L = D(
|
|
2635
|
+
(m, p) => {
|
|
2636
|
+
m.preventDefault();
|
|
2637
|
+
const j = m.dataTransfer.getData("text/plain"), _ = d.current;
|
|
2638
|
+
j && _ && (O(S.current, 1, "🎯 ドロップ完了:", {
|
|
2639
|
+
draggedPanel: j,
|
|
2640
|
+
targetColumn: p,
|
|
2641
|
+
insertPosition: `カラム${_.columnIndex} - 位置${_.insertIndex}`
|
|
2642
|
+
}), y(j, p, _.insertIndex), f(null), g());
|
|
2117
2643
|
},
|
|
2118
|
-
[
|
|
2119
|
-
),
|
|
2120
|
-
(
|
|
2121
|
-
const
|
|
2122
|
-
|
|
2644
|
+
[y, f, g]
|
|
2645
|
+
), w = D(
|
|
2646
|
+
(m) => {
|
|
2647
|
+
const p = m.currentTarget, j = m.relatedTarget;
|
|
2648
|
+
j && p.contains(j) || (f(null), u((_) => ({ ..._, dragOverColumn: null })));
|
|
2123
2649
|
},
|
|
2124
|
-
[
|
|
2650
|
+
[f, u]
|
|
2125
2651
|
);
|
|
2126
|
-
return
|
|
2127
|
-
const
|
|
2128
|
-
|
|
2652
|
+
return ee(() => {
|
|
2653
|
+
const m = (p) => {
|
|
2654
|
+
R.current.isDragging && (z(p.clientX, p.clientY), Y.current.update(p.clientX, p.clientY));
|
|
2129
2655
|
};
|
|
2130
|
-
if (
|
|
2131
|
-
return document.addEventListener("dragover",
|
|
2132
|
-
document.removeEventListener("dragover",
|
|
2656
|
+
if (n.isDragging)
|
|
2657
|
+
return document.addEventListener("dragover", m), () => {
|
|
2658
|
+
document.removeEventListener("dragover", m), Y.current.stop();
|
|
2133
2659
|
};
|
|
2134
|
-
}, [
|
|
2135
|
-
|
|
2660
|
+
}, [n.isDragging, z]), ee(() => () => {
|
|
2661
|
+
Y.current.stop();
|
|
2136
2662
|
}, []), {
|
|
2137
|
-
handleDragStart:
|
|
2138
|
-
handleDragEnd:
|
|
2139
|
-
handleDragOverWithInsert:
|
|
2140
|
-
handleDropWithInsert:
|
|
2141
|
-
handleColumnDragLeave:
|
|
2663
|
+
handleDragStart: G,
|
|
2664
|
+
handleDragEnd: g,
|
|
2665
|
+
handleDragOverWithInsert: v,
|
|
2666
|
+
handleDropWithInsert: L,
|
|
2667
|
+
handleColumnDragLeave: w
|
|
2142
2668
|
};
|
|
2143
|
-
},
|
|
2144
|
-
const [
|
|
2145
|
-
|
|
2146
|
-
const
|
|
2147
|
-
(
|
|
2148
|
-
const
|
|
2149
|
-
width: Math.round(
|
|
2150
|
-
height: Math.round(
|
|
2151
|
-
x: Math.round(
|
|
2152
|
-
y: Math.round(
|
|
2153
|
-
minHeight:
|
|
2154
|
-
maxHeight:
|
|
2155
|
-
},
|
|
2156
|
-
(
|
|
2157
|
-
...
|
|
2158
|
-
[
|
|
2669
|
+
}, _r = (t, n = 1) => {
|
|
2670
|
+
const [e, o] = se(t), [r, a] = se({}), l = W({}), u = W(null), f = W({ x: 0, y: 0 }), b = W(n);
|
|
2671
|
+
b.current = n;
|
|
2672
|
+
const y = D((N) => document.querySelector(`[data-panel-id="${N}"]`), []), A = D(
|
|
2673
|
+
(N, R) => {
|
|
2674
|
+
const d = R.getBoundingClientRect(), $ = window.getComputedStyle(R), T = {
|
|
2675
|
+
width: Math.round(d.width),
|
|
2676
|
+
height: Math.round(d.height),
|
|
2677
|
+
x: Math.round(d.left),
|
|
2678
|
+
y: Math.round(d.top),
|
|
2679
|
+
minHeight: $.minHeight || "auto",
|
|
2680
|
+
maxHeight: $.maxHeight || "none"
|
|
2681
|
+
}, Y = l.current[N];
|
|
2682
|
+
(!Y || Object.keys(T).some((G) => Y[G] !== T[G])) && (l.current[N] = T, a((G) => ({
|
|
2683
|
+
...G,
|
|
2684
|
+
[N]: T
|
|
2159
2685
|
})));
|
|
2160
2686
|
},
|
|
2161
2687
|
[]
|
|
2162
2688
|
// setPanelSizes は React の state セッターなので依存配列に含める必要はありません
|
|
2163
|
-
),
|
|
2164
|
-
(
|
|
2165
|
-
const
|
|
2166
|
-
|
|
2689
|
+
), z = D(
|
|
2690
|
+
(N) => {
|
|
2691
|
+
const R = y(N);
|
|
2692
|
+
R && A(N, R);
|
|
2167
2693
|
},
|
|
2168
|
-
[
|
|
2169
|
-
),
|
|
2170
|
-
(
|
|
2171
|
-
|
|
2694
|
+
[y, A]
|
|
2695
|
+
), E = D(
|
|
2696
|
+
(N, R) => {
|
|
2697
|
+
R && requestAnimationFrame(() => A(N, R));
|
|
2172
2698
|
},
|
|
2173
|
-
[
|
|
2174
|
-
),
|
|
2175
|
-
(
|
|
2176
|
-
const
|
|
2177
|
-
|
|
2178
|
-
const U = N.current, $ = Y.getBoundingClientRect(), L = Y.cloneNode(!0);
|
|
2179
|
-
L.removeAttribute("data-panel-id"), L.style.position = "fixed", L.style.top = "0px", L.style.left = "0px", L.style.width = `${Y.offsetWidth}px`, L.style.height = `${Y.offsetHeight}px`, L.style.pointerEvents = "none", L.style.zIndex = "1000", L.style.opacity = "0.5", L.style.margin = "0", L.style.transition = "none", L.style.boxShadow = "0 8px 32px rgba(0,0,0,0.3)", L.style.transformOrigin = "top left", L.style.transform = `translate(${$.left}px, ${$.top}px) scale(${U})`, L.id = `drag-image-${R}`, document.body.appendChild(L), c.current = L, h.current = { x: z, y: Z };
|
|
2699
|
+
[A]
|
|
2700
|
+
), c = D(
|
|
2701
|
+
(N, R, d) => {
|
|
2702
|
+
const $ = y(N);
|
|
2703
|
+
!$ || u.current || (u.current = Gt($, N, b.current), f.current = { x: R, y: d });
|
|
2180
2704
|
},
|
|
2181
|
-
[
|
|
2182
|
-
),
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
s((z) => ({
|
|
2191
|
-
...z,
|
|
2192
|
-
[R]: !z[R]
|
|
2705
|
+
[y]
|
|
2706
|
+
), P = D((N, R) => {
|
|
2707
|
+
u.current && Kt(u.current, N, R, f.current, b.current);
|
|
2708
|
+
}, []), k = D(() => {
|
|
2709
|
+
u.current && (u.current.remove(), u.current = null);
|
|
2710
|
+
}, []), S = D((N) => {
|
|
2711
|
+
o((R) => ({
|
|
2712
|
+
...R,
|
|
2713
|
+
[N]: !R[N]
|
|
2193
2714
|
}));
|
|
2194
2715
|
}, []);
|
|
2195
2716
|
return {
|
|
2196
2717
|
// State / 状態
|
|
2197
|
-
panelVisibility:
|
|
2198
|
-
panelSizes:
|
|
2718
|
+
panelVisibility: e,
|
|
2719
|
+
panelSizes: r,
|
|
2199
2720
|
// State update functions / 状態更新関数
|
|
2200
|
-
setPanelVisibility:
|
|
2201
|
-
setPanelSizes:
|
|
2202
|
-
setPanelRef:
|
|
2203
|
-
updatePanelSize:
|
|
2204
|
-
togglePanelVisibility:
|
|
2721
|
+
setPanelVisibility: o,
|
|
2722
|
+
setPanelSizes: a,
|
|
2723
|
+
setPanelRef: E,
|
|
2724
|
+
updatePanelSize: z,
|
|
2725
|
+
togglePanelVisibility: S,
|
|
2205
2726
|
// Utility functions / ユーティリティ関数
|
|
2206
|
-
getPanelElement:
|
|
2727
|
+
getPanelElement: y,
|
|
2207
2728
|
// Functions for drag image management / ドラッグイメージ管理用の関数
|
|
2208
|
-
createDragImage:
|
|
2209
|
-
updateDragImagePosition:
|
|
2729
|
+
createDragImage: c,
|
|
2730
|
+
updateDragImagePosition: P,
|
|
2210
2731
|
removeDragImage: k
|
|
2211
2732
|
};
|
|
2212
|
-
},
|
|
2213
|
-
const
|
|
2214
|
-
|
|
2215
|
-
const [
|
|
2216
|
-
|
|
2217
|
-
const
|
|
2733
|
+
}, Jr = ({ initialColumnPanels: t, initialPanelVisibility: n, initialDragModes: e = {}, debugConfig: o, onPanelMove: r, onDragModeChange: a, onColumnPanelsChange: l, scale: u = 1 }) => {
|
|
2734
|
+
const f = W(o);
|
|
2735
|
+
f.current = o;
|
|
2736
|
+
const [b, y] = se(t), [A, z] = se(e), E = W(b);
|
|
2737
|
+
E.current = b;
|
|
2738
|
+
const c = $r(), P = Tr(), k = _r(n, u), S = W({
|
|
2218
2739
|
mousemove: null,
|
|
2219
2740
|
mouseup: null
|
|
2220
|
-
}),
|
|
2221
|
-
const
|
|
2222
|
-
for (let
|
|
2223
|
-
const
|
|
2224
|
-
if (
|
|
2225
|
-
return { columnIndex:
|
|
2741
|
+
}), N = D((w) => {
|
|
2742
|
+
const m = Object.keys(E.current), p = Mr(m, fe);
|
|
2743
|
+
for (let j = 0; j < p.length; j++) {
|
|
2744
|
+
const _ = p[j], I = E.current[_]?.indexOf(w) ?? -1;
|
|
2745
|
+
if (I !== -1)
|
|
2746
|
+
return { columnIndex: j, panelIndex: I };
|
|
2226
2747
|
}
|
|
2227
2748
|
return null;
|
|
2228
|
-
}, []),
|
|
2229
|
-
(
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
if (
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
}
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
}
|
|
2244
|
-
if (E(h.current, 1, "✅ パネル移動完了:", m, "→", v), u && requestAnimationFrame(() => {
|
|
2245
|
-
u(O);
|
|
2246
|
-
}), o) {
|
|
2247
|
-
const a = Object.keys(A).find((d) => A[d].includes(m));
|
|
2248
|
-
a && requestAnimationFrame(() => {
|
|
2249
|
-
o(m, a, v, D);
|
|
2749
|
+
}, []), R = D(
|
|
2750
|
+
(w, m, p) => {
|
|
2751
|
+
O(f.current, 1, "🔄 パネル移動実行:", w, "→", m, "@", p), y((j) => {
|
|
2752
|
+
if (!Object.values(j).some((I) => I.includes(w)))
|
|
2753
|
+
return console.error("Source column not found for panel:", w), j;
|
|
2754
|
+
if (!j[m])
|
|
2755
|
+
return console.error("Target column not found:", m), j;
|
|
2756
|
+
const _ = Yt(j, w, m, p);
|
|
2757
|
+
if (_ === null) return j;
|
|
2758
|
+
if (O(f.current, 1, "✅ パネル移動完了:", w, "→", m), l && requestAnimationFrame(() => {
|
|
2759
|
+
l(_);
|
|
2760
|
+
}), r) {
|
|
2761
|
+
const I = Object.keys(j).find((re) => j[re].includes(w));
|
|
2762
|
+
I && requestAnimationFrame(() => {
|
|
2763
|
+
r(w, I, m, p);
|
|
2250
2764
|
});
|
|
2251
2765
|
}
|
|
2252
|
-
return
|
|
2766
|
+
return _;
|
|
2253
2767
|
});
|
|
2254
2768
|
},
|
|
2255
|
-
[
|
|
2256
|
-
),
|
|
2257
|
-
(
|
|
2258
|
-
if (!(
|
|
2259
|
-
const
|
|
2260
|
-
if (
|
|
2261
|
-
|
|
2769
|
+
[l, r]
|
|
2770
|
+
), d = D(
|
|
2771
|
+
(w, m) => {
|
|
2772
|
+
if (!(c.dragState.isDragging || c.customDrag.isActive)) return;
|
|
2773
|
+
const p = c.originalPanelPosition;
|
|
2774
|
+
if (p !== null && et(p, w, m)) {
|
|
2775
|
+
O(f.current, 1, `元の位置への挿入をスキップ: カラム${w}, 位置${m}`);
|
|
2262
2776
|
return;
|
|
2263
2777
|
}
|
|
2264
|
-
const
|
|
2265
|
-
(!
|
|
2778
|
+
const j = c.dragOverPosition;
|
|
2779
|
+
(!j || j.columnIndex !== w || j.insertIndex !== m) && (O(f.current, 1, `プレースホルダーエンター: カラム${w}, 位置${m}`), c.setDragOverPosition({ columnIndex: w, insertIndex: m }), c.setDragState((_) => ({ ..._, dragOverColumn: w })));
|
|
2266
2780
|
},
|
|
2267
|
-
[
|
|
2268
|
-
),
|
|
2269
|
-
(
|
|
2270
|
-
if (
|
|
2271
|
-
if (
|
|
2272
|
-
|
|
2273
|
-
else if (
|
|
2274
|
-
const
|
|
2275
|
-
if (
|
|
2276
|
-
const
|
|
2277
|
-
|
|
2781
|
+
[c]
|
|
2782
|
+
), $ = D(
|
|
2783
|
+
(w, m, p) => {
|
|
2784
|
+
if (c.dragState.isDragging || c.customDrag.isActive) {
|
|
2785
|
+
if (c.customDrag.isActive)
|
|
2786
|
+
O(f.current, 1, "🚫 カスタムドラッグ - プレースホルダーリーブ: ハイライトを解除します。"), c.setDragOverPosition(null);
|
|
2787
|
+
else if (c.dragState.isDragging && w && m !== void 0 && p !== void 0) {
|
|
2788
|
+
const j = c.dragOverPosition;
|
|
2789
|
+
if (j && j.columnIndex === m && j.insertIndex === p) {
|
|
2790
|
+
const _ = w.currentTarget, I = w.relatedTarget;
|
|
2791
|
+
I && _.contains(I) || (O(f.current, 1, `ノーマルドラッグ - プレースホルダーリーブ: カラム${m}, 位置${p}。ハイライトを解除します。`), c.setDragOverPosition(null));
|
|
2278
2792
|
}
|
|
2279
2793
|
}
|
|
2280
2794
|
}
|
|
2281
2795
|
},
|
|
2282
|
-
[
|
|
2283
|
-
),
|
|
2284
|
-
debugConfig:
|
|
2285
|
-
dragState:
|
|
2286
|
-
customDrag:
|
|
2287
|
-
clickState:
|
|
2288
|
-
dragModes:
|
|
2289
|
-
isMouseDown:
|
|
2290
|
-
originalPanelPosition:
|
|
2291
|
-
dragOverPosition:
|
|
2292
|
-
setCustomDrag:
|
|
2293
|
-
setDragState:
|
|
2294
|
-
setDragOverPosition:
|
|
2295
|
-
setOriginalPanelPosition:
|
|
2296
|
-
setClickState:
|
|
2297
|
-
setIsMouseDown:
|
|
2298
|
-
findPanelPosition:
|
|
2299
|
-
performPanelMove:
|
|
2300
|
-
showMousePosition:
|
|
2301
|
-
updateMousePosition:
|
|
2302
|
-
recordMouseDown:
|
|
2303
|
-
recordClickPosition:
|
|
2304
|
-
isVirtualClick:
|
|
2305
|
-
calculateMoveDistance:
|
|
2306
|
-
clearMouseTracking:
|
|
2307
|
-
resetDragState:
|
|
2308
|
-
resetClickState:
|
|
2796
|
+
[c]
|
|
2797
|
+
), T = Ar({
|
|
2798
|
+
debugConfig: f.current,
|
|
2799
|
+
dragState: c.dragState,
|
|
2800
|
+
customDrag: c.customDrag,
|
|
2801
|
+
clickState: c.clickState,
|
|
2802
|
+
dragModes: A,
|
|
2803
|
+
isMouseDown: c.isMouseDown,
|
|
2804
|
+
originalPanelPosition: c.originalPanelPosition,
|
|
2805
|
+
dragOverPosition: c.dragOverPosition,
|
|
2806
|
+
setCustomDrag: c.setCustomDrag,
|
|
2807
|
+
setDragState: c.setDragState,
|
|
2808
|
+
setDragOverPosition: c.setDragOverPosition,
|
|
2809
|
+
setOriginalPanelPosition: c.setOriginalPanelPosition,
|
|
2810
|
+
setClickState: c.setClickState,
|
|
2811
|
+
setIsMouseDown: c.setIsMouseDown,
|
|
2812
|
+
findPanelPosition: N,
|
|
2813
|
+
performPanelMove: R,
|
|
2814
|
+
showMousePosition: P.showMousePosition,
|
|
2815
|
+
updateMousePosition: P.updateMousePosition,
|
|
2816
|
+
recordMouseDown: P.recordMouseDown,
|
|
2817
|
+
recordClickPosition: P.recordClickPosition,
|
|
2818
|
+
isVirtualClick: P.isVirtualClick,
|
|
2819
|
+
calculateMoveDistance: P.calculateMoveDistance,
|
|
2820
|
+
clearMouseTracking: P.clearMouseTracking,
|
|
2821
|
+
resetDragState: c.resetDragState,
|
|
2822
|
+
resetClickState: c.resetClickState,
|
|
2309
2823
|
createDragImage: k.createDragImage,
|
|
2310
2824
|
updateDragImagePosition: k.updateDragImagePosition,
|
|
2311
2825
|
removeDragImage: k.removeDragImage,
|
|
2312
|
-
handlePlaceholderDragEnter:
|
|
2313
|
-
handlePlaceholderDragLeave:
|
|
2314
|
-
}),
|
|
2315
|
-
debugConfig:
|
|
2316
|
-
dragState:
|
|
2317
|
-
customDrag:
|
|
2318
|
-
dragModes:
|
|
2319
|
-
columnPanels:
|
|
2320
|
-
dragOverPosition:
|
|
2321
|
-
originalPanelPosition:
|
|
2322
|
-
setDragState:
|
|
2323
|
-
setDragOverPosition:
|
|
2324
|
-
setOriginalPanelPosition:
|
|
2325
|
-
performPanelMove:
|
|
2326
|
-
showMousePosition:
|
|
2327
|
-
updateMousePosition:
|
|
2328
|
-
resetDragState:
|
|
2329
|
-
handlePlaceholderDragEnter:
|
|
2330
|
-
handlePlaceholderDragLeave:
|
|
2331
|
-
scale:
|
|
2332
|
-
}),
|
|
2333
|
-
|
|
2334
|
-
}, []),
|
|
2335
|
-
|
|
2826
|
+
handlePlaceholderDragEnter: d,
|
|
2827
|
+
handlePlaceholderDragLeave: $
|
|
2828
|
+
}), Y = Lr({
|
|
2829
|
+
debugConfig: f.current,
|
|
2830
|
+
dragState: c.dragState,
|
|
2831
|
+
customDrag: c.customDrag,
|
|
2832
|
+
dragModes: A,
|
|
2833
|
+
columnPanels: b,
|
|
2834
|
+
dragOverPosition: c.dragOverPosition,
|
|
2835
|
+
originalPanelPosition: c.originalPanelPosition,
|
|
2836
|
+
setDragState: c.setDragState,
|
|
2837
|
+
setDragOverPosition: c.setDragOverPosition,
|
|
2838
|
+
setOriginalPanelPosition: c.setOriginalPanelPosition,
|
|
2839
|
+
performPanelMove: R,
|
|
2840
|
+
showMousePosition: P.showMousePosition,
|
|
2841
|
+
updateMousePosition: P.updateMousePosition,
|
|
2842
|
+
resetDragState: c.resetDragState,
|
|
2843
|
+
handlePlaceholderDragEnter: d,
|
|
2844
|
+
handlePlaceholderDragLeave: $,
|
|
2845
|
+
scale: u
|
|
2846
|
+
}), G = D((w) => {
|
|
2847
|
+
S.current.mousemove && S.current.mousemove(w);
|
|
2848
|
+
}, []), g = D((w) => {
|
|
2849
|
+
S.current.mouseup && S.current.mouseup(w);
|
|
2336
2850
|
}, []);
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
}), [
|
|
2340
|
-
const
|
|
2341
|
-
if (
|
|
2342
|
-
const
|
|
2343
|
-
|
|
2851
|
+
ee(() => (O(f.current, 1, "🔧 グローバルイベントリスナー初期化 - refベース管理開始"), document.addEventListener("mousemove", G), document.addEventListener("mouseup", g), () => {
|
|
2852
|
+
O(f.current, 1, "🔴 グローバルイベントリスナー終了 - refベース管理終了"), document.removeEventListener("mousemove", G), document.removeEventListener("mouseup", g);
|
|
2853
|
+
}), [G, g]), ee(() => {
|
|
2854
|
+
const w = !c.clickState.isClicked && Object.entries(A).some(([, p]) => p === "custom"), m = c.clickState.isClicked && c.clickState.panelId;
|
|
2855
|
+
if (w || m) {
|
|
2856
|
+
const p = w ? "パターン1(仮想クリック検出)" : "パターン2,3(ドラッグ準備)";
|
|
2857
|
+
O(f.current, 1, `🔧 イベントハンドラー設定開始: ${p}`), S.current.mousemove = T.handleGlobalMouseMove, S.current.mouseup = T.handleGlobalMouseUp;
|
|
2344
2858
|
} else
|
|
2345
|
-
|
|
2346
|
-
}, [
|
|
2347
|
-
const
|
|
2348
|
-
(
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
startX: D.clientX,
|
|
2353
|
-
startY: D.clientY,
|
|
2354
|
-
currentX: D.clientX,
|
|
2355
|
-
currentY: D.clientY,
|
|
2356
|
-
draggedElement: A
|
|
2357
|
-
}), l.setDragState({
|
|
2358
|
-
isDragging: !0,
|
|
2359
|
-
draggedPanel: v,
|
|
2360
|
-
dragOverColumn: null
|
|
2361
|
-
});
|
|
2362
|
-
},
|
|
2363
|
-
[l]
|
|
2364
|
-
), C = w(
|
|
2365
|
-
(m) => {
|
|
2366
|
-
if (!l.touchDragState.isTouchDragging) return;
|
|
2367
|
-
m.preventDefault();
|
|
2368
|
-
const v = m.touches[0];
|
|
2369
|
-
l.setTouchDragState((D) => ({
|
|
2370
|
-
...D,
|
|
2371
|
-
currentX: v.clientX,
|
|
2372
|
-
currentY: v.clientY
|
|
2373
|
-
}));
|
|
2374
|
-
},
|
|
2375
|
-
[l.touchDragState.isTouchDragging, l]
|
|
2376
|
-
), W = w(
|
|
2377
|
-
(m) => {
|
|
2378
|
-
l.touchDragState.isTouchDragging && (l.setTouchDragState({
|
|
2379
|
-
isTouchDragging: !1,
|
|
2380
|
-
startX: 0,
|
|
2381
|
-
startY: 0,
|
|
2382
|
-
currentX: 0,
|
|
2383
|
-
currentY: 0,
|
|
2384
|
-
draggedElement: null
|
|
2385
|
-
}), $.handleDragEnd());
|
|
2386
|
-
},
|
|
2387
|
-
[l.touchDragState.isTouchDragging, l, $]
|
|
2388
|
-
), p = w(
|
|
2389
|
-
(m) => {
|
|
2390
|
-
E(h.current, 1, "🔄 toggleDragMode called:", { panelId: m }), T((v) => {
|
|
2391
|
-
const A = (v[m] || "normal") === "normal" ? "custom" : "normal", O = { ...v, [m]: A };
|
|
2392
|
-
if (i)
|
|
2859
|
+
c.customDrag.isActive || c.dragState.isDragging || (S.current.mousemove = null, S.current.mouseup = null);
|
|
2860
|
+
}, [c.clickState.isClicked, c.clickState.panelId, A, c.customDrag.isActive, c.dragState.isDragging, T.handleGlobalMouseMove, T.handleGlobalMouseUp]);
|
|
2861
|
+
const v = D(
|
|
2862
|
+
(w) => {
|
|
2863
|
+
O(f.current, 1, "🔄 toggleDragMode called:", { panelId: w }), z((m) => {
|
|
2864
|
+
const j = (m[w] || "normal") === "normal" ? "custom" : "normal", _ = { ...m, [w]: j };
|
|
2865
|
+
if (a)
|
|
2393
2866
|
try {
|
|
2394
|
-
|
|
2395
|
-
} catch (
|
|
2396
|
-
console.error("🔄 Error in onDragModeChange:",
|
|
2867
|
+
a(w, j);
|
|
2868
|
+
} catch (I) {
|
|
2869
|
+
console.error("🔄 Error in onDragModeChange:", I);
|
|
2397
2870
|
}
|
|
2398
|
-
return
|
|
2871
|
+
return _;
|
|
2399
2872
|
});
|
|
2400
2873
|
},
|
|
2401
|
-
[
|
|
2402
|
-
),
|
|
2403
|
-
|
|
2874
|
+
[a]
|
|
2875
|
+
), L = D((w, m) => {
|
|
2876
|
+
w.stopPropagation(), O(f.current, 2, "パネルサイズ情報クリック:", m);
|
|
2404
2877
|
}, []);
|
|
2405
2878
|
return {
|
|
2406
2879
|
// 状態
|
|
2407
|
-
columnPanels:
|
|
2880
|
+
columnPanels: b,
|
|
2408
2881
|
panelVisibility: k.panelVisibility,
|
|
2409
|
-
dragModes:
|
|
2410
|
-
dragState:
|
|
2411
|
-
dragOverPosition:
|
|
2412
|
-
originalPanelPosition:
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
mousePosition: j.mousePosition,
|
|
2882
|
+
dragModes: A,
|
|
2883
|
+
dragState: c.dragState,
|
|
2884
|
+
dragOverPosition: c.dragOverPosition,
|
|
2885
|
+
originalPanelPosition: c.originalPanelPosition,
|
|
2886
|
+
customDrag: c.customDrag,
|
|
2887
|
+
clickState: c.clickState,
|
|
2888
|
+
mousePosition: P.mousePosition,
|
|
2417
2889
|
panelSizes: k.panelSizes,
|
|
2418
2890
|
// 状態更新関数
|
|
2419
|
-
setColumnPanels:
|
|
2891
|
+
setColumnPanels: y,
|
|
2420
2892
|
setPanelVisibility: k.setPanelVisibility,
|
|
2421
|
-
setDragModes:
|
|
2893
|
+
setDragModes: z,
|
|
2422
2894
|
setPanelRef: k.setPanelRef,
|
|
2423
2895
|
// イベントハンドラー
|
|
2424
|
-
handleDragStart:
|
|
2425
|
-
handleDragEnd:
|
|
2426
|
-
handleMouseDown:
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
handleDropWithInsert: $.handleDropWithInsert,
|
|
2434
|
-
handleColumnDragLeave: $.handleColumnDragLeave,
|
|
2435
|
-
handlePanelSizeInfoClick: g,
|
|
2896
|
+
handleDragStart: Y.handleDragStart,
|
|
2897
|
+
handleDragEnd: Y.handleDragEnd,
|
|
2898
|
+
handleMouseDown: T.handleMouseDown,
|
|
2899
|
+
handlePlaceholderDragEnter: d,
|
|
2900
|
+
handlePlaceholderDragLeave: $,
|
|
2901
|
+
handleDragOverWithInsert: Y.handleDragOverWithInsert,
|
|
2902
|
+
handleDropWithInsert: Y.handleDropWithInsert,
|
|
2903
|
+
handleColumnDragLeave: Y.handleColumnDragLeave,
|
|
2904
|
+
handlePanelSizeInfoClick: L,
|
|
2436
2905
|
// ユーティリティ関数
|
|
2437
|
-
toggleDragMode:
|
|
2438
|
-
findPanelPosition:
|
|
2906
|
+
toggleDragMode: v,
|
|
2907
|
+
findPanelPosition: N
|
|
2439
2908
|
};
|
|
2440
|
-
},
|
|
2441
|
-
const [
|
|
2442
|
-
|
|
2909
|
+
}, Qr = ({ minColumnWidth: t = 350, defaultColumns: n = 3, maxColumns: e = 6, minColumns: o = 1, currentColumnWidths: r = {} } = {}) => {
|
|
2910
|
+
const [a, l] = se(0), u = W(0), f = W(null), [b, y] = se(!1), A = W(n);
|
|
2911
|
+
ee(() => {
|
|
2443
2912
|
if (typeof window > "u")
|
|
2444
2913
|
return;
|
|
2445
|
-
const
|
|
2446
|
-
const k = window.visualViewport?.width ?? 0,
|
|
2447
|
-
return
|
|
2448
|
-
},
|
|
2449
|
-
|
|
2450
|
-
const k =
|
|
2451
|
-
|
|
2914
|
+
const c = () => {
|
|
2915
|
+
const k = window.visualViewport?.width ?? 0, S = document?.documentElement?.clientWidth ?? 0, N = document?.body?.clientWidth ?? 0, R = window.innerWidth ?? 0;
|
|
2916
|
+
return S > 0 ? Math.floor(S) : k > 0 ? Math.floor(k) : N > 0 ? Math.floor(N) : Math.floor(R);
|
|
2917
|
+
}, P = () => {
|
|
2918
|
+
f.current !== null && cancelAnimationFrame(f.current), f.current = requestAnimationFrame(() => {
|
|
2919
|
+
const k = c();
|
|
2920
|
+
f.current = null, k !== 0 && (Math.abs(u.current - k) < 2 || (u.current = k, l(k)));
|
|
2452
2921
|
});
|
|
2453
2922
|
};
|
|
2454
|
-
return
|
|
2455
|
-
|
|
2923
|
+
return P(), window.addEventListener("resize", P), window.addEventListener("orientationchange", P), window.visualViewport?.addEventListener("resize", P), () => {
|
|
2924
|
+
f.current !== null && cancelAnimationFrame(f.current), window.removeEventListener("resize", P), window.removeEventListener("orientationchange", P), window.visualViewport?.removeEventListener("resize", P);
|
|
2456
2925
|
};
|
|
2457
2926
|
}, []);
|
|
2458
|
-
const
|
|
2459
|
-
if (!
|
|
2460
|
-
return
|
|
2461
|
-
const
|
|
2462
|
-
let
|
|
2927
|
+
const z = Re(() => {
|
|
2928
|
+
if (!b || a === 0)
|
|
2929
|
+
return A.current = n, n;
|
|
2930
|
+
const c = Math.max(a - 64, 0), P = 24, k = Object.values(r);
|
|
2931
|
+
let S;
|
|
2463
2932
|
if (k.length > 0) {
|
|
2464
|
-
const
|
|
2465
|
-
|
|
2933
|
+
const N = k.reduce(($, T) => $ + T, 0) / k.length, R = Math.max(t, N);
|
|
2934
|
+
S = Math.floor((c + P) / (R + P)), k.reduce(($, T) => $ + T, 0) + (k.length - 1) * P > c && k.length > o && (S = Math.min(S, k.length - 1));
|
|
2466
2935
|
} else
|
|
2467
|
-
|
|
2468
|
-
return
|
|
2469
|
-
}, [
|
|
2470
|
-
|
|
2936
|
+
S = Math.floor((c + P) / (t + P));
|
|
2937
|
+
return S = Math.max(o, Math.min(e, S)), A.current === S ? A.current : (A.current = S, S);
|
|
2938
|
+
}, [b, a, n, t, e, o, r]), E = D(() => {
|
|
2939
|
+
y((c) => !c);
|
|
2471
2940
|
}, []);
|
|
2472
2941
|
return {
|
|
2473
|
-
responsiveColumnCount:
|
|
2474
|
-
isResponsiveMode:
|
|
2475
|
-
screenWidth:
|
|
2476
|
-
toggleResponsiveMode:
|
|
2942
|
+
responsiveColumnCount: z,
|
|
2943
|
+
isResponsiveMode: b,
|
|
2944
|
+
screenWidth: a,
|
|
2945
|
+
toggleResponsiveMode: E
|
|
2477
2946
|
};
|
|
2478
2947
|
};
|
|
2479
|
-
const
|
|
2948
|
+
const Rr = [
|
|
2480
2949
|
["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
|
|
2481
2950
|
["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
|
|
2482
2951
|
["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
|
|
2483
|
-
],
|
|
2484
|
-
const
|
|
2952
|
+
], zr = ie("monitor", Rr);
|
|
2953
|
+
const qr = [
|
|
2485
2954
|
["rect", { width: "14", height: "20", x: "5", y: "2", rx: "2", ry: "2", key: "1yt0o3" }],
|
|
2486
2955
|
["path", { d: "M12 18h.01", key: "mhygvu" }]
|
|
2487
|
-
],
|
|
2488
|
-
/* @__PURE__ */
|
|
2956
|
+
], Wr = ie("smartphone", qr), eo = ({ isResponsiveMode: t, responsiveColumnCount: n, currentColumnCount: e, screenWidth: o, onToggleResponsive: r }) => /* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-2 rounded-lg border border-slate-300 bg-white/90 px-3 py-1", children: [
|
|
2957
|
+
/* @__PURE__ */ s.jsxs(
|
|
2489
2958
|
"button",
|
|
2490
2959
|
{
|
|
2491
2960
|
type: "button",
|
|
2492
|
-
onClick:
|
|
2493
|
-
className: `flex items-center gap-1 rounded px-2 py-1 text-xs transition-colors ${
|
|
2494
|
-
title:
|
|
2961
|
+
onClick: r,
|
|
2962
|
+
className: `flex items-center gap-1 rounded px-2 py-1 text-xs transition-colors ${t ? "border border-blue-300 bg-blue-100 text-blue-700" : "border border-slate-300 text-slate-600 hover:bg-blue-50 hover:text-blue-600"}`,
|
|
2963
|
+
title: t ? "レスポンシブモードを無効化" : "レスポンシブモードを有効化",
|
|
2495
2964
|
children: [
|
|
2496
|
-
|
|
2497
|
-
/* @__PURE__ */
|
|
2965
|
+
t ? /* @__PURE__ */ s.jsx(Wr, { className: "h-3 w-3" }) : /* @__PURE__ */ s.jsx(zr, { className: "h-3 w-3" }),
|
|
2966
|
+
/* @__PURE__ */ s.jsx("span", { children: t ? "レスポンシブ" : "固定" })
|
|
2498
2967
|
]
|
|
2499
2968
|
}
|
|
2500
2969
|
),
|
|
2501
|
-
|
|
2502
|
-
/* @__PURE__ */
|
|
2503
|
-
|
|
2970
|
+
t && /* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-1 text-slate-600 text-xs", children: [
|
|
2971
|
+
/* @__PURE__ */ s.jsxs("span", { className: "font-mono", children: [
|
|
2972
|
+
o,
|
|
2504
2973
|
"px"
|
|
2505
2974
|
] }),
|
|
2506
|
-
/* @__PURE__ */
|
|
2507
|
-
/* @__PURE__ */
|
|
2508
|
-
|
|
2975
|
+
/* @__PURE__ */ s.jsx("span", { children: "→" }),
|
|
2976
|
+
/* @__PURE__ */ s.jsxs("span", { className: "font-semibold text-blue-600", children: [
|
|
2977
|
+
n,
|
|
2509
2978
|
"列"
|
|
2510
2979
|
] }),
|
|
2511
|
-
|
|
2980
|
+
n !== e && /* @__PURE__ */ s.jsx("span", { className: "text-orange-600", children: "(変更予定)" })
|
|
2512
2981
|
] })
|
|
2513
|
-
] }),
|
|
2982
|
+
] }), to = {
|
|
2514
2983
|
showDebugPanel: !1,
|
|
2515
2984
|
showMousePosition: !1,
|
|
2516
2985
|
showPanelSizes: !1,
|
|
@@ -2519,37 +2988,49 @@ const Bt = [
|
|
|
2519
2988
|
logLevel: 0
|
|
2520
2989
|
};
|
|
2521
2990
|
export {
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2991
|
+
Ur as ColumnControlPanel,
|
|
2992
|
+
Br as ColumnInsertPanel,
|
|
2993
|
+
fe as DEFAULT_COLUMN_ID_CONFIG,
|
|
2994
|
+
to as DEFAULT_DEBUG_CONFIG,
|
|
2995
|
+
Hr as DEFAULT_DRAG_DROP_LAYOUT_LABELS,
|
|
2996
|
+
Se as DEFAULT_EDGE_SCROLL_CONFIG,
|
|
2997
|
+
pr as DEFAULT_TOUCH_DRAG_CONFIG,
|
|
2998
|
+
Xr as DebugControlPanel,
|
|
2999
|
+
Fr as DragDropLayout,
|
|
3000
|
+
Xt as DropZoneDebugOverlay,
|
|
3001
|
+
rt as EdgeScrollManager,
|
|
3002
|
+
Bt as InsertPlaceholder,
|
|
3003
|
+
Ee as PANEL_ACTION_ATTRIBUTE,
|
|
3004
|
+
De as PANEL_MOVES,
|
|
3005
|
+
Ut as PANEL_MOVE_SHORTCUTS,
|
|
3006
|
+
Yn as PanelSizeDisplay,
|
|
3007
|
+
Yr as ResizableColumn,
|
|
3008
|
+
en as ResizeHandle,
|
|
3009
|
+
eo as ResponsiveControl,
|
|
3010
|
+
Vt as SCROLL_ROOT_SELECTOR,
|
|
3011
|
+
cr as TEMPLATE_PLACEHOLDERS,
|
|
3012
|
+
Bn as availablePanelMoves,
|
|
3013
|
+
St as calculateScrollVector,
|
|
3014
|
+
Gr as createColumnIdMapping,
|
|
3015
|
+
O as debugLog,
|
|
3016
|
+
We as generateColumnId,
|
|
3017
|
+
tn as generateColumnIds,
|
|
3018
|
+
Zr as getNextColumnId,
|
|
3019
|
+
Yt as insertPanelAt,
|
|
3020
|
+
Vr as isValidColumnId,
|
|
3021
|
+
Xn as movePanelInColumns,
|
|
3022
|
+
Sr as normalizeColumnPanels,
|
|
3023
|
+
Zn as panelMoveOfKey,
|
|
3024
|
+
Ie as parseColumnId,
|
|
3025
|
+
sr as performScroll,
|
|
3026
|
+
Pe as shownPanelPlace,
|
|
3027
|
+
Mr as sortColumnIds,
|
|
3028
|
+
Kr as useColumnLayout,
|
|
3029
|
+
Ar as useCustomDragHandlers,
|
|
3030
|
+
Jr as useDragDropColumns,
|
|
3031
|
+
$r as useDragDropState,
|
|
3032
|
+
Tr as useMouseTracking,
|
|
3033
|
+
Lr as useNormalDragHandlers,
|
|
3034
|
+
_r as usePanelManagement,
|
|
3035
|
+
Qr as useResponsiveColumns
|
|
2555
3036
|
};
|