@aiquants/drag-drop-panels 0.3.1 → 0.6.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/dist/DragDropLayout.d.ts +5 -2
- package/dist/DragDropLayout.d.ts.map +1 -1
- package/dist/drag-drop/ColumnControlPanel.d.ts +1 -1
- package/dist/drag-drop/ColumnControlPanel.d.ts.map +1 -1
- package/dist/drag-drop/ColumnInsertPanel.d.ts +1 -1
- package/dist/drag-drop/ColumnInsertPanel.d.ts.map +1 -1
- package/dist/drag-drop/DebugComponents.d.ts +3 -3
- package/dist/drag-drop/DebugComponents.d.ts.map +1 -1
- package/dist/drag-drop/DebugControlPanel.d.ts +1 -1
- package/dist/drag-drop/DebugControlPanel.d.ts.map +1 -1
- package/dist/drag-drop/DebugOverlay.d.ts +1 -1
- package/dist/drag-drop/ResizeHandle.d.ts +2 -2
- package/dist/drag-drop/ResizeHandle.d.ts.map +1 -1
- package/dist/drag-drop/ResponsiveControl.d.ts +1 -1
- package/dist/drag-drop/ResponsiveControl.d.ts.map +1 -1
- package/dist/drag-drop/hooks/useColumnLayout.d.ts.map +1 -1
- package/dist/drag-drop/hooks/useCustomDragHandlers.d.ts.map +1 -1
- package/dist/drag-drop/hooks/useDragDropColumns.d.ts.map +1 -1
- package/dist/drag-drop/types.d.ts +33 -2
- package/dist/drag-drop/types.d.ts.map +1 -1
- package/dist/drag-drop/utils/simple-logger.d.ts +98 -0
- package/dist/drag-drop/utils/simple-logger.d.ts.map +1 -0
- package/dist/index.d.ts +15 -15
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +1264 -1112
- package/dist/index.umd.js +2 -2
- package/package.json +8 -8
package/dist/index.es.js
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Eye as
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
if (
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
function n(l,
|
|
1
|
+
import $e, { useRef as Y, useState as ee, useEffect as J, useCallback as P, memo as He, useMemo as Ae, useLayoutEffect as qe, Fragment as Ue } from "react";
|
|
2
|
+
import { Eye as Ie, EyeOff as ke, MousePointerClick as Ve, MousePointer as Be, Minimize2 as Ze, Maximize2 as Ge, X as Re, Minus as Je, Plus as we, Grid3X3 as Qe, RotateCcw as Ke, Smartphone as et, Monitor as tt } from "lucide-react";
|
|
3
|
+
var ge = { exports: {} }, me = {};
|
|
4
|
+
var Ce;
|
|
5
|
+
function nt() {
|
|
6
|
+
if (Ce) return me;
|
|
7
|
+
Ce = 1;
|
|
8
|
+
var r = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
9
|
+
function n(l, s, u) {
|
|
10
10
|
var d = null;
|
|
11
|
-
if (u !== void 0 && (d = "" + u),
|
|
11
|
+
if (u !== void 0 && (d = "" + u), s.key !== void 0 && (d = "" + s.key), "key" in s) {
|
|
12
12
|
u = {};
|
|
13
|
-
for (var c in
|
|
14
|
-
c !== "key" && (u[c] =
|
|
15
|
-
} else u =
|
|
16
|
-
return
|
|
17
|
-
$$typeof:
|
|
13
|
+
for (var c in s)
|
|
14
|
+
c !== "key" && (u[c] = s[c]);
|
|
15
|
+
} else u = s;
|
|
16
|
+
return s = u.ref, {
|
|
17
|
+
$$typeof: r,
|
|
18
18
|
type: l,
|
|
19
19
|
key: d,
|
|
20
|
-
ref:
|
|
20
|
+
ref: s !== void 0 ? s : null,
|
|
21
21
|
props: u
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
return
|
|
24
|
+
return me.Fragment = t, me.jsx = n, me.jsxs = n, me;
|
|
25
25
|
}
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
function
|
|
29
|
-
return
|
|
30
|
-
function
|
|
26
|
+
var he = {};
|
|
27
|
+
var Oe;
|
|
28
|
+
function rt() {
|
|
29
|
+
return Oe || (Oe = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
30
|
+
function r(a) {
|
|
31
31
|
if (a == null) return null;
|
|
32
32
|
if (typeof a == "function")
|
|
33
|
-
return a.$$typeof ===
|
|
33
|
+
return a.$$typeof === b ? null : a.displayName || a.name || null;
|
|
34
34
|
if (typeof a == "string") return a;
|
|
35
35
|
switch (a) {
|
|
36
36
|
case m:
|
|
37
37
|
return "Fragment";
|
|
38
|
-
case
|
|
38
|
+
case z:
|
|
39
39
|
return "Profiler";
|
|
40
|
-
case
|
|
40
|
+
case T:
|
|
41
41
|
return "StrictMode";
|
|
42
|
-
case
|
|
42
|
+
case q:
|
|
43
43
|
return "Suspense";
|
|
44
|
-
case
|
|
44
|
+
case L:
|
|
45
45
|
return "SuspenseList";
|
|
46
46
|
case f:
|
|
47
47
|
return "Activity";
|
|
@@ -54,40 +54,40 @@ function Le() {
|
|
|
54
54
|
return "Portal";
|
|
55
55
|
case B:
|
|
56
56
|
return a.displayName || "Context";
|
|
57
|
-
case
|
|
57
|
+
case H:
|
|
58
58
|
return (a._context.displayName || "Context") + ".Consumer";
|
|
59
59
|
case k:
|
|
60
|
-
var
|
|
61
|
-
return a = a.displayName, a || (a =
|
|
62
|
-
case
|
|
63
|
-
return
|
|
60
|
+
var x = a.render;
|
|
61
|
+
return a = a.displayName, a || (a = x.displayName || x.name || "", a = a !== "" ? "ForwardRef(" + a + ")" : "ForwardRef"), a;
|
|
62
|
+
case K:
|
|
63
|
+
return x = a.displayName || null, x !== null ? x : r(a.type) || "Memo";
|
|
64
64
|
case h:
|
|
65
|
-
|
|
65
|
+
x = a._payload, a = a._init;
|
|
66
66
|
try {
|
|
67
|
-
return
|
|
67
|
+
return r(a(x));
|
|
68
68
|
} catch {
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
return null;
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function t(a) {
|
|
74
74
|
return "" + a;
|
|
75
75
|
}
|
|
76
76
|
function n(a) {
|
|
77
77
|
try {
|
|
78
|
-
|
|
79
|
-
var
|
|
78
|
+
t(a);
|
|
79
|
+
var x = !1;
|
|
80
80
|
} catch {
|
|
81
|
-
|
|
81
|
+
x = !0;
|
|
82
82
|
}
|
|
83
|
-
if (
|
|
84
|
-
|
|
85
|
-
var
|
|
86
|
-
return
|
|
87
|
-
|
|
83
|
+
if (x) {
|
|
84
|
+
x = console;
|
|
85
|
+
var O = x.error, R = typeof Symbol == "function" && Symbol.toStringTag && a[Symbol.toStringTag] || a.constructor.name || "Object";
|
|
86
|
+
return O.call(
|
|
87
|
+
x,
|
|
88
88
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
89
|
-
|
|
90
|
-
),
|
|
89
|
+
R
|
|
90
|
+
), t(a);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
function l(a) {
|
|
@@ -95,13 +95,13 @@ function Le() {
|
|
|
95
95
|
if (typeof a == "object" && a !== null && a.$$typeof === h)
|
|
96
96
|
return "<...>";
|
|
97
97
|
try {
|
|
98
|
-
var
|
|
99
|
-
return
|
|
98
|
+
var x = r(a);
|
|
99
|
+
return x ? "<" + x + ">" : "<...>";
|
|
100
100
|
} catch {
|
|
101
101
|
return "<...>";
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function s() {
|
|
105
105
|
var a = N.A;
|
|
106
106
|
return a === null ? null : a.getOwner();
|
|
107
107
|
}
|
|
@@ -109,41 +109,41 @@ function Le() {
|
|
|
109
109
|
return Error("react-stack-top-frame");
|
|
110
110
|
}
|
|
111
111
|
function d(a) {
|
|
112
|
-
if (
|
|
113
|
-
var
|
|
114
|
-
if (
|
|
112
|
+
if (y.call(a, "key")) {
|
|
113
|
+
var x = Object.getOwnPropertyDescriptor(a, "key").get;
|
|
114
|
+
if (x && x.isReactWarning) return !1;
|
|
115
115
|
}
|
|
116
116
|
return a.key !== void 0;
|
|
117
117
|
}
|
|
118
|
-
function c(a,
|
|
119
|
-
function
|
|
118
|
+
function c(a, x) {
|
|
119
|
+
function O() {
|
|
120
120
|
E || (E = !0, console.error(
|
|
121
121
|
"%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)",
|
|
122
|
-
|
|
122
|
+
x
|
|
123
123
|
));
|
|
124
124
|
}
|
|
125
|
-
|
|
126
|
-
get:
|
|
125
|
+
O.isReactWarning = !0, Object.defineProperty(a, "key", {
|
|
126
|
+
get: O,
|
|
127
127
|
configurable: !0
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
var a =
|
|
132
|
-
return
|
|
130
|
+
function p() {
|
|
131
|
+
var a = r(this.type);
|
|
132
|
+
return A[a] || (A[a] = !0, console.error(
|
|
133
133
|
"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."
|
|
134
134
|
)), a = this.props.ref, a !== void 0 ? a : null;
|
|
135
135
|
}
|
|
136
|
-
function C(a,
|
|
137
|
-
var
|
|
136
|
+
function C(a, x, O, R, Z, Q) {
|
|
137
|
+
var I = O.ref;
|
|
138
138
|
return a = {
|
|
139
|
-
$$typeof:
|
|
139
|
+
$$typeof: v,
|
|
140
140
|
type: a,
|
|
141
|
-
key:
|
|
142
|
-
props:
|
|
143
|
-
_owner:
|
|
144
|
-
}, (
|
|
141
|
+
key: x,
|
|
142
|
+
props: O,
|
|
143
|
+
_owner: R
|
|
144
|
+
}, (I !== void 0 ? I : null) !== null ? Object.defineProperty(a, "ref", {
|
|
145
145
|
enumerable: !1,
|
|
146
|
-
get:
|
|
146
|
+
get: p
|
|
147
147
|
}) : Object.defineProperty(a, "ref", { enumerable: !1, value: null }), a._store = {}, Object.defineProperty(a._store, "validated", {
|
|
148
148
|
configurable: !1,
|
|
149
149
|
enumerable: !1,
|
|
@@ -158,109 +158,203 @@ function Le() {
|
|
|
158
158
|
configurable: !1,
|
|
159
159
|
enumerable: !1,
|
|
160
160
|
writable: !0,
|
|
161
|
-
value:
|
|
161
|
+
value: Z
|
|
162
162
|
}), Object.defineProperty(a, "_debugTask", {
|
|
163
163
|
configurable: !1,
|
|
164
164
|
enumerable: !1,
|
|
165
165
|
writable: !0,
|
|
166
|
-
value:
|
|
166
|
+
value: Q
|
|
167
167
|
}), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
|
|
168
168
|
}
|
|
169
|
-
function w(a,
|
|
170
|
-
var
|
|
171
|
-
if (
|
|
172
|
-
if (
|
|
173
|
-
if (i(
|
|
174
|
-
for (
|
|
175
|
-
|
|
176
|
-
Object.freeze && Object.freeze(
|
|
169
|
+
function w(a, x, O, R, Z, Q) {
|
|
170
|
+
var I = x.children;
|
|
171
|
+
if (I !== void 0)
|
|
172
|
+
if (R)
|
|
173
|
+
if (i(I)) {
|
|
174
|
+
for (R = 0; R < I.length; R++)
|
|
175
|
+
$(I[R]);
|
|
176
|
+
Object.freeze && Object.freeze(I);
|
|
177
177
|
} else
|
|
178
178
|
console.error(
|
|
179
179
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
180
180
|
);
|
|
181
|
-
else
|
|
182
|
-
if (
|
|
183
|
-
|
|
184
|
-
var
|
|
185
|
-
return
|
|
181
|
+
else $(I);
|
|
182
|
+
if (y.call(x, "key")) {
|
|
183
|
+
I = r(a);
|
|
184
|
+
var re = Object.keys(x).filter(function(j) {
|
|
185
|
+
return j !== "key";
|
|
186
186
|
});
|
|
187
|
-
|
|
187
|
+
R = 0 < re.length ? "{key: someKey, " + re.join(": ..., ") + ": ...}" : "{key: someKey}", U[I + R] || (re = 0 < re.length ? "{" + re.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
188
188
|
`A props object containing a "key" prop is being spread into JSX:
|
|
189
189
|
let props = %s;
|
|
190
190
|
<%s {...props} />
|
|
191
191
|
React keys must be passed directly to JSX without using spread:
|
|
192
192
|
let props = %s;
|
|
193
193
|
<%s key={someKey} {...props} />`,
|
|
194
|
-
q,
|
|
195
194
|
R,
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
195
|
+
I,
|
|
196
|
+
re,
|
|
197
|
+
I
|
|
198
|
+
), U[I + R] = !0);
|
|
199
199
|
}
|
|
200
|
-
if (
|
|
201
|
-
|
|
202
|
-
for (var
|
|
203
|
-
|
|
204
|
-
} else
|
|
205
|
-
return
|
|
206
|
-
|
|
200
|
+
if (I = null, O !== void 0 && (n(O), I = "" + O), d(x) && (n(x.key), I = "" + x.key), "key" in x) {
|
|
201
|
+
O = {};
|
|
202
|
+
for (var ce in x)
|
|
203
|
+
ce !== "key" && (O[ce] = x[ce]);
|
|
204
|
+
} else O = x;
|
|
205
|
+
return I && c(
|
|
206
|
+
O,
|
|
207
207
|
typeof a == "function" ? a.displayName || a.name || "Unknown" : a
|
|
208
208
|
), C(
|
|
209
209
|
a,
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
210
|
+
I,
|
|
211
|
+
O,
|
|
212
|
+
s(),
|
|
213
|
+
Z,
|
|
214
|
+
Q
|
|
215
215
|
);
|
|
216
216
|
}
|
|
217
|
-
function
|
|
218
|
-
|
|
217
|
+
function $(a) {
|
|
218
|
+
M(a) ? a._store && (a._store.validated = 1) : typeof a == "object" && a !== null && a.$$typeof === h && (a._payload.status === "fulfilled" ? M(a._payload.value) && a._payload.value._store && (a._payload.value._store.validated = 1) : a._store && (a._store.validated = 1));
|
|
219
219
|
}
|
|
220
|
-
function
|
|
221
|
-
return typeof a == "object" && a !== null && a.$$typeof ===
|
|
220
|
+
function M(a) {
|
|
221
|
+
return typeof a == "object" && a !== null && a.$$typeof === v;
|
|
222
222
|
}
|
|
223
|
-
var
|
|
223
|
+
var o = $e, v = /* @__PURE__ */ Symbol.for("react.transitional.element"), D = /* @__PURE__ */ Symbol.for("react.portal"), m = /* @__PURE__ */ Symbol.for("react.fragment"), T = /* @__PURE__ */ Symbol.for("react.strict_mode"), z = /* @__PURE__ */ Symbol.for("react.profiler"), H = /* @__PURE__ */ Symbol.for("react.consumer"), B = /* @__PURE__ */ Symbol.for("react.context"), k = /* @__PURE__ */ Symbol.for("react.forward_ref"), q = /* @__PURE__ */ Symbol.for("react.suspense"), L = /* @__PURE__ */ Symbol.for("react.suspense_list"), K = /* @__PURE__ */ Symbol.for("react.memo"), h = /* @__PURE__ */ Symbol.for("react.lazy"), f = /* @__PURE__ */ Symbol.for("react.activity"), b = /* @__PURE__ */ Symbol.for("react.client.reference"), N = o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, y = Object.prototype.hasOwnProperty, i = Array.isArray, g = console.createTask ? console.createTask : function() {
|
|
224
224
|
return null;
|
|
225
225
|
};
|
|
226
|
-
|
|
226
|
+
o = {
|
|
227
227
|
react_stack_bottom_frame: function(a) {
|
|
228
228
|
return a();
|
|
229
229
|
}
|
|
230
230
|
};
|
|
231
|
-
var E,
|
|
232
|
-
|
|
231
|
+
var E, A = {}, _ = o.react_stack_bottom_frame.bind(
|
|
232
|
+
o,
|
|
233
233
|
u
|
|
234
|
-
)(),
|
|
235
|
-
|
|
236
|
-
var
|
|
234
|
+
)(), X = g(l(u)), U = {};
|
|
235
|
+
he.Fragment = m, he.jsx = function(a, x, O) {
|
|
236
|
+
var R = 1e4 > N.recentlyCreatedOwnerStacks++;
|
|
237
237
|
return w(
|
|
238
238
|
a,
|
|
239
|
-
|
|
240
|
-
|
|
239
|
+
x,
|
|
240
|
+
O,
|
|
241
241
|
!1,
|
|
242
|
-
|
|
243
|
-
|
|
242
|
+
R ? Error("react-stack-top-frame") : _,
|
|
243
|
+
R ? g(l(a)) : X
|
|
244
244
|
);
|
|
245
|
-
},
|
|
246
|
-
var
|
|
245
|
+
}, he.jsxs = function(a, x, O) {
|
|
246
|
+
var R = 1e4 > N.recentlyCreatedOwnerStacks++;
|
|
247
247
|
return w(
|
|
248
248
|
a,
|
|
249
|
-
|
|
250
|
-
|
|
249
|
+
x,
|
|
250
|
+
O,
|
|
251
251
|
!0,
|
|
252
|
-
|
|
253
|
-
|
|
252
|
+
R ? Error("react-stack-top-frame") : _,
|
|
253
|
+
R ? g(l(a)) : X
|
|
254
254
|
);
|
|
255
255
|
};
|
|
256
|
-
})()),
|
|
256
|
+
})()), he;
|
|
257
257
|
}
|
|
258
|
-
var
|
|
259
|
-
function
|
|
260
|
-
return
|
|
258
|
+
var Te;
|
|
259
|
+
function st() {
|
|
260
|
+
return Te || (Te = 1, process.env.NODE_ENV === "production" ? ge.exports = nt() : ge.exports = rt()), ge.exports;
|
|
261
261
|
}
|
|
262
|
-
var e =
|
|
263
|
-
const
|
|
262
|
+
var e = st();
|
|
263
|
+
const oe = class oe {
|
|
264
|
+
/**
|
|
265
|
+
* @constructor
|
|
266
|
+
* @param {LogLevel} [level=LogLevel.WARN] - The minimum log level to output.
|
|
267
|
+
* @param {string} [prefix="[drag-drop-panels]"] - The prefix to add to all log messages.
|
|
268
|
+
* @param {ILogger} [impl=console] - The implementation to use for logging.
|
|
269
|
+
*/
|
|
270
|
+
constructor(t = 2, n = "[drag-drop-panels]", l = console) {
|
|
271
|
+
this.level = t, this.prefix = n, this.impl = l;
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* @method setLevel
|
|
275
|
+
* @description Updates the current log level for the static instance.
|
|
276
|
+
* @description 静的インスタンスの現在のログレベルを更新します。
|
|
277
|
+
* @param {LogLevel} level - The new log level.
|
|
278
|
+
*/
|
|
279
|
+
static setLevel(t) {
|
|
280
|
+
oe.instance.setLevel(t);
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* @method setLevel
|
|
284
|
+
* @description Updates the current log level.
|
|
285
|
+
* @description 現在のログレベルを更新します。
|
|
286
|
+
* @param {LogLevel} level - The new log level.
|
|
287
|
+
*/
|
|
288
|
+
setLevel(t) {
|
|
289
|
+
this.level = t;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* @method setImplementation
|
|
293
|
+
* @description Updates the logger implementation for the static instance.
|
|
294
|
+
* @description 静的インスタンスのロガーの実装を更新します。
|
|
295
|
+
* @param {ILogger} impl - The new logger implementation.
|
|
296
|
+
*/
|
|
297
|
+
static setImplementation(t) {
|
|
298
|
+
oe.instance.setImplementation(t);
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* @method setImplementation
|
|
302
|
+
* @description Updates the logger implementation.
|
|
303
|
+
* @description ロガーの実装を更新します。
|
|
304
|
+
* @param {ILogger} impl - The new logger implementation.
|
|
305
|
+
*/
|
|
306
|
+
setImplementation(t) {
|
|
307
|
+
this.impl = t;
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* @method setPrefix
|
|
311
|
+
* @description Updates the log prefix for the static instance.
|
|
312
|
+
* @description 静的インスタンスのログのプレフィックスを更新します。
|
|
313
|
+
* @param {string} prefix - The new prefix.
|
|
314
|
+
*/
|
|
315
|
+
static setPrefix(t) {
|
|
316
|
+
oe.instance.setPrefix(t);
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* @method setPrefix
|
|
320
|
+
* @description Updates the log prefix.
|
|
321
|
+
* @description ログのプレフィックスを更新します。
|
|
322
|
+
* @param {string} prefix - The new prefix.
|
|
323
|
+
*/
|
|
324
|
+
setPrefix(t) {
|
|
325
|
+
this.prefix = t;
|
|
326
|
+
}
|
|
327
|
+
formatMessage(t) {
|
|
328
|
+
return typeof t == "string" ? [`${this.prefix} ${t}`] : [this.prefix, t];
|
|
329
|
+
}
|
|
330
|
+
static debug(t, ...n) {
|
|
331
|
+
oe.instance.debug(t, ...n);
|
|
332
|
+
}
|
|
333
|
+
debug(t, ...n) {
|
|
334
|
+
this.level <= 0 && this.impl.debug(...this.formatMessage(t), ...n);
|
|
335
|
+
}
|
|
336
|
+
static info(t, ...n) {
|
|
337
|
+
oe.instance.info(t, ...n);
|
|
338
|
+
}
|
|
339
|
+
info(t, ...n) {
|
|
340
|
+
this.level <= 1 && this.impl.info(...this.formatMessage(t), ...n);
|
|
341
|
+
}
|
|
342
|
+
static warn(t, ...n) {
|
|
343
|
+
oe.instance.warn(t, ...n);
|
|
344
|
+
}
|
|
345
|
+
warn(t, ...n) {
|
|
346
|
+
this.level <= 2 && this.impl.warn(...this.formatMessage(t), ...n);
|
|
347
|
+
}
|
|
348
|
+
static error(t, ...n) {
|
|
349
|
+
oe.instance.error(t, ...n);
|
|
350
|
+
}
|
|
351
|
+
error(t, ...n) {
|
|
352
|
+
this.level <= 3 && this.impl.error(...this.formatMessage(t), ...n);
|
|
353
|
+
}
|
|
354
|
+
};
|
|
355
|
+
oe.instance = new oe(2, "[drag-drop-panels]");
|
|
356
|
+
let ye = oe;
|
|
357
|
+
const ot = ({ config: r, panelId: t, sizeInfo: n, onSizeInfoClick: l }) => r.showPanelSizes && n ? (
|
|
264
358
|
// biome-ignore lint/a11y/noStaticElementInteractions: クリックイベントを持つ静的要素。デバッグ目的のため、インタラクティブ性は限定的。
|
|
265
359
|
// biome-ignore lint/a11y/useKeyWithClickEvents: キーボード操作はデバッグ機能では優先度が低い。
|
|
266
360
|
/* @__PURE__ */ e.jsxs(
|
|
@@ -269,12 +363,12 @@ const Ye = ({ config: t, panelId: o, sizeInfo: n, onSizeInfoClick: l }) => t.sho
|
|
|
269
363
|
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",
|
|
270
364
|
onClick: l,
|
|
271
365
|
onMouseDown: l,
|
|
272
|
-
onTouchStart: (
|
|
366
|
+
onTouchStart: (s) => s instanceof TouchEvent && l(s),
|
|
273
367
|
onDragStart: l,
|
|
274
368
|
children: [
|
|
275
369
|
/* @__PURE__ */ e.jsxs("div", { className: "text-[10px] opacity-80", children: [
|
|
276
370
|
"ID:",
|
|
277
|
-
|
|
371
|
+
t
|
|
278
372
|
] }),
|
|
279
373
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
280
374
|
n.width,
|
|
@@ -296,59 +390,59 @@ const Ye = ({ config: t, panelId: o, sizeInfo: n, onSizeInfoClick: l }) => t.sho
|
|
|
296
390
|
]
|
|
297
391
|
}
|
|
298
392
|
)
|
|
299
|
-
) : null, S = (
|
|
300
|
-
(
|
|
301
|
-
},
|
|
302
|
-
const C =
|
|
303
|
-
return
|
|
304
|
-
if (
|
|
305
|
-
const D =
|
|
393
|
+
) : null, S = (r, t, ...n) => {
|
|
394
|
+
(r.logLevel ?? 0) >= t && ye.info(...n);
|
|
395
|
+
}, Le = $e.memo(({ index: r, columnIndex: t, isDragging: n, dragOverPosition: l, originalPosition: s, onDragEnter: u, onDragLeave: d, config: c, customDrag: p }) => {
|
|
396
|
+
const C = s && s.columnIndex === t && (s.panelIndex === r || s.panelIndex + 1 === r), w = !C && l?.columnIndex === t && l?.insertIndex === r, $ = Y(null), [M, o] = ee(null), v = n || (p?.isActive ?? !1);
|
|
397
|
+
return J(() => {
|
|
398
|
+
if ($.current) {
|
|
399
|
+
const D = $.current.getBoundingClientRect(), m = {
|
|
306
400
|
width: Math.round(D.width),
|
|
307
401
|
height: Math.round(D.height),
|
|
308
402
|
x: Math.round(D.left),
|
|
309
403
|
y: Math.round(D.top)
|
|
310
404
|
};
|
|
311
|
-
|
|
405
|
+
o(m), w && S(c, 1, `🎯 アクティブプレースホルダー ${r}-${t}:`, {
|
|
312
406
|
size: `${m.width}×${m.height}`,
|
|
313
407
|
position: `(${m.x}, ${m.y})`,
|
|
314
408
|
bottomRight: `(${m.x + m.width}, ${m.y + m.height})`,
|
|
315
409
|
center: `(${m.x + m.width / 2}, ${m.y + m.height / 2})`
|
|
316
410
|
});
|
|
317
411
|
}
|
|
318
|
-
}, [w,
|
|
412
|
+
}, [w, r, t, c]), S(c, 2, `プレースホルダー${r}-${t}: 表示中`, { isHighlighted: w, isDragging: n, dragOverPosition: l, shouldShow: v }), // biome-ignore lint/a11y/noStaticElementInteractions: ドラッグイベントを処理するための対話的な要素。デバッグ目的のため、キーボード操作は必須ではない。
|
|
319
413
|
/* @__PURE__ */ e.jsxs(
|
|
320
414
|
"div",
|
|
321
415
|
{
|
|
322
|
-
ref:
|
|
323
|
-
"data-placeholder-index":
|
|
324
|
-
"data-placeholder-column":
|
|
325
|
-
onDragEnter: () => u(
|
|
326
|
-
onDragLeave: (D) => d(D,
|
|
327
|
-
className: `relative flex w-full items-center justify-center transition-all duration-0 ${C ? "pointer-events-none h-0 overflow-hidden opacity-0" :
|
|
416
|
+
ref: $,
|
|
417
|
+
"data-placeholder-index": r,
|
|
418
|
+
"data-placeholder-column": t,
|
|
419
|
+
onDragEnter: () => u(t, r),
|
|
420
|
+
onDragLeave: (D) => d(D, t, r),
|
|
421
|
+
className: `relative flex w-full items-center justify-center transition-all duration-0 ${C ? "pointer-events-none h-0 overflow-hidden opacity-0" : v ? w ? "my-2 scale-[1.02] rounded-xl border-4 border-sky-500 border-dashed bg-sky-200 px-4 py-6 shadow-lg ring-2 ring-sky-400 ring-opacity-50" : "my-2 rounded-xl border-2 border-sky-300 border-dashed bg-sky-50/70 px-2 py-4 opacity-80" : "pointer-events-none h-0 overflow-hidden opacity-0"}`,
|
|
328
422
|
children: [
|
|
329
|
-
!C &&
|
|
423
|
+
!C && v && c.showPlaceholderInfo && M && /* @__PURE__ */ e.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: [
|
|
330
424
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
331
|
-
|
|
425
|
+
M.width,
|
|
332
426
|
"×",
|
|
333
|
-
|
|
427
|
+
M.height
|
|
334
428
|
] }),
|
|
335
429
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
336
430
|
"X:",
|
|
337
|
-
|
|
431
|
+
M.x,
|
|
338
432
|
" Y:",
|
|
339
|
-
|
|
433
|
+
M.y
|
|
340
434
|
] }),
|
|
341
435
|
/* @__PURE__ */ e.jsx("div", { className: "text-[10px] opacity-80", children: "min:200px max:500px" }),
|
|
342
436
|
/* @__PURE__ */ e.jsxs("div", { className: "mt-0.5 text-[10px] opacity-80", children: [
|
|
343
437
|
"PH-",
|
|
344
|
-
o,
|
|
345
|
-
"-",
|
|
346
438
|
t,
|
|
439
|
+
"-",
|
|
440
|
+
r,
|
|
347
441
|
" ",
|
|
348
442
|
w ? "ACTIVE" : "IDLE"
|
|
349
443
|
] })
|
|
350
444
|
] }),
|
|
351
|
-
!C &&
|
|
445
|
+
!C && v && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2 text-sky-600", children: [
|
|
352
446
|
/* @__PURE__ */ e.jsxs("svg", { className: "h-6 w-6", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: [
|
|
353
447
|
/* @__PURE__ */ e.jsx("title", { children: "パネルをここにドロップ" }),
|
|
354
448
|
/* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 6v6m0 0v6m0-6h6m-6 0H6" })
|
|
@@ -359,33 +453,33 @@ const Ye = ({ config: t, panelId: o, sizeInfo: n, onSizeInfoClick: l }) => t.sho
|
|
|
359
453
|
}
|
|
360
454
|
);
|
|
361
455
|
});
|
|
362
|
-
|
|
363
|
-
const
|
|
364
|
-
const u =
|
|
365
|
-
return
|
|
366
|
-
if (u.current &&
|
|
367
|
-
const
|
|
368
|
-
width: Math.round(
|
|
369
|
-
height: Math.round(
|
|
370
|
-
x: Math.round(
|
|
371
|
-
y: Math.round(
|
|
456
|
+
Le.displayName = "InsertPlaceholder";
|
|
457
|
+
const _e = ({ columnIndex: r, isDragging: t, dragOverPosition: n, children: l, config: s }) => {
|
|
458
|
+
const u = Y(null), [d, c] = ee(null);
|
|
459
|
+
return J(() => {
|
|
460
|
+
if (u.current && t) {
|
|
461
|
+
const p = u.current.getBoundingClientRect(), C = n?.columnIndex === r, w = {
|
|
462
|
+
width: Math.round(p.width),
|
|
463
|
+
height: Math.round(p.height),
|
|
464
|
+
x: Math.round(p.left),
|
|
465
|
+
y: Math.round(p.top),
|
|
372
466
|
isActive: C
|
|
373
467
|
};
|
|
374
|
-
c(w), C && S(
|
|
468
|
+
c(w), C && S(s, 1, `🎯 アクティブドロップゾーン ${r}:`, {
|
|
375
469
|
size: `${w.width}×${w.height}`,
|
|
376
470
|
position: `(${w.x}, ${w.y})`,
|
|
377
471
|
bottomRight: `(${w.x + w.width}, ${w.y + w.height})`,
|
|
378
472
|
center: `(${w.x + w.width / 2}, ${w.y + w.height / 2})`
|
|
379
473
|
});
|
|
380
474
|
}
|
|
381
|
-
}, [
|
|
475
|
+
}, [t, n, r, s]), /* @__PURE__ */ e.jsxs("div", { ref: u, className: "relative", children: [
|
|
382
476
|
l,
|
|
383
|
-
|
|
477
|
+
t && d && s.showDropZoneOutlines && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
384
478
|
/* @__PURE__ */ e.jsx("div", { className: `pointer-events-none absolute inset-0 rounded-lg border-2 border-dashed transition-all duration-200 ${d.isActive ? "border-red-500 bg-red-100/20 shadow-lg" : "border-gray-400 bg-gray-100/10"}` }),
|
|
385
479
|
/* @__PURE__ */ e.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 ${d.isActive ? "bg-red-500/90 text-white" : "bg-gray-500/90 text-white"}`, children: [
|
|
386
480
|
/* @__PURE__ */ e.jsxs("div", { className: "font-bold", children: [
|
|
387
481
|
"DropZone-",
|
|
388
|
-
|
|
482
|
+
r
|
|
389
483
|
] }),
|
|
390
484
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
391
485
|
d.width,
|
|
@@ -420,398 +514,456 @@ const we = ({ columnIndex: t, isDragging: o, dragOverPosition: n, children: l, c
|
|
|
420
514
|
] })
|
|
421
515
|
] });
|
|
422
516
|
};
|
|
423
|
-
|
|
424
|
-
const
|
|
425
|
-
const
|
|
426
|
-
|
|
427
|
-
!
|
|
428
|
-
}, [
|
|
517
|
+
_e.displayName = "DropZoneDebugOverlay";
|
|
518
|
+
const We = ({ columnId: r, onResizeStart: t, onResize: n, onResizeEnd: l, isResizing: s = !1, position: u = "right", className: d = "", debug: c = {} }) => {
|
|
519
|
+
const p = Y(!1), C = Y(null);
|
|
520
|
+
J(() => {
|
|
521
|
+
!s && p.current && (S(c, 1, "外部からのリサイズ解除を検出、ドラッグ状態を強制解除:", r), p.current = !1, document.body.style.cursor = "", document.body.style.userSelect = "", document.body.classList.remove("resizing-column"));
|
|
522
|
+
}, [s, r, c]);
|
|
429
523
|
const w = P(
|
|
430
|
-
(
|
|
431
|
-
|
|
524
|
+
(o) => {
|
|
525
|
+
o.preventDefault(), o.stopPropagation(), S(c, 2, "リサイズハンドル マウスダウン:", r), p.current = !0, t(r, o.clientX), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.body.classList.add("resizing-column");
|
|
432
526
|
},
|
|
433
|
-
[
|
|
527
|
+
[r, t, c]
|
|
434
528
|
);
|
|
435
|
-
|
|
436
|
-
const
|
|
437
|
-
|
|
438
|
-
},
|
|
439
|
-
|
|
529
|
+
J(() => {
|
|
530
|
+
const o = (D) => {
|
|
531
|
+
p.current && (D.preventDefault(), n(D.clientX));
|
|
532
|
+
}, v = () => {
|
|
533
|
+
p.current && (S(c, 2, "リサイズハンドル マウスアップ:", r), p.current = !1, l(), document.body.style.cursor = "", document.body.style.userSelect = "", document.body.classList.remove("resizing-column"));
|
|
440
534
|
};
|
|
441
|
-
return document.addEventListener("mousemove",
|
|
442
|
-
document.removeEventListener("mousemove",
|
|
535
|
+
return document.addEventListener("mousemove", o), document.addEventListener("mouseup", v), () => {
|
|
536
|
+
document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", v);
|
|
443
537
|
};
|
|
444
|
-
}, [
|
|
445
|
-
const
|
|
446
|
-
(
|
|
447
|
-
|
|
448
|
-
const
|
|
449
|
-
S(c, 2, "リサイズハンドル タッチスタート:",
|
|
538
|
+
}, [r, n, l, c]);
|
|
539
|
+
const $ = P(
|
|
540
|
+
(o) => {
|
|
541
|
+
o.preventDefault(), o.stopPropagation();
|
|
542
|
+
const v = o.touches[0];
|
|
543
|
+
S(c, 2, "リサイズハンドル タッチスタート:", r), p.current = !0, t(r, v.clientX), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.body.classList.add("resizing-column");
|
|
450
544
|
},
|
|
451
|
-
[
|
|
545
|
+
[r, t, c]
|
|
452
546
|
);
|
|
453
|
-
|
|
454
|
-
const
|
|
455
|
-
if (!
|
|
547
|
+
J(() => {
|
|
548
|
+
const o = (D) => {
|
|
549
|
+
if (!p.current) return;
|
|
456
550
|
D.preventDefault();
|
|
457
551
|
const m = D.touches[0];
|
|
458
552
|
n(m.clientX);
|
|
459
|
-
},
|
|
460
|
-
|
|
553
|
+
}, v = () => {
|
|
554
|
+
p.current && (S(c, 2, "リサイズハンドル タッチエンド:", r), p.current = !1, l(), document.body.style.cursor = "", document.body.style.userSelect = "", document.body.classList.remove("resizing-column"));
|
|
461
555
|
};
|
|
462
|
-
return document.addEventListener("touchmove",
|
|
463
|
-
document.removeEventListener("touchmove",
|
|
556
|
+
return document.addEventListener("touchmove", o, { passive: !1 }), document.addEventListener("touchend", v), () => {
|
|
557
|
+
document.removeEventListener("touchmove", o), document.removeEventListener("touchend", v);
|
|
464
558
|
};
|
|
465
|
-
}, [
|
|
466
|
-
|
|
467
|
-
}, [
|
|
468
|
-
const
|
|
559
|
+
}, [r, n, l, c]), J(() => () => {
|
|
560
|
+
p.current && (S(c, 1, "リサイズハンドルアンマウント時のクリーンアップ:", r), document.body.style.cursor = "", document.body.style.userSelect = "", document.body.classList.remove("resizing-column"));
|
|
561
|
+
}, [r, c]);
|
|
562
|
+
const M = ["resize-handle", u, s ? "resizing" : "", d].filter(Boolean).join(" ");
|
|
469
563
|
return (
|
|
470
564
|
// biome-ignore lint/a11y/useFocusableInteractive: リサイズハンドルとして機能するためインタラクティブである必要がある
|
|
471
565
|
// biome-ignore lint/a11y/useSemanticElements: divを使用するが、aria-roleでセマンティックな意味を提供している
|
|
472
|
-
|
|
566
|
+
// biome-ignore lint/a11y/useAriaPropsForRole: リサイズハンドルのため、値の範囲を指定することが難しい
|
|
567
|
+
/* @__PURE__ */ e.jsxs("div", { ref: C, className: M, onMouseDown: w, onTouchStart: $, "data-column-id": r, "data-position": u, "aria-label": `${r}のカラム幅を調整`, role: "separator", "aria-orientation": "vertical", children: [
|
|
473
568
|
/* @__PURE__ */ e.jsx("div", { className: "resize-handle-bar" }),
|
|
474
569
|
c.showPanelSizes && /* @__PURE__ */ e.jsxs("div", { className: "resize-handle-debug-info", children: [
|
|
475
|
-
|
|
476
|
-
|
|
570
|
+
r,
|
|
571
|
+
s && " (resizing)"
|
|
477
572
|
] })
|
|
478
573
|
] })
|
|
479
574
|
);
|
|
480
|
-
},
|
|
481
|
-
const
|
|
482
|
-
return
|
|
483
|
-
const
|
|
484
|
-
|
|
485
|
-
}, [
|
|
486
|
-
|
|
487
|
-
|
|
575
|
+
}, gt = ({ columnId: r, width: t, minWidth: n = 100, maxWidth: l = 800, onResizeStart: s, onResize: u, onResizeEnd: d, isResizing: c = !1, resizable: p = !0, className: C = "", debug: w = {}, children: $ }) => {
|
|
576
|
+
const M = ["resizable-column", c ? "resizing" : "", C].filter(Boolean).join(" ");
|
|
577
|
+
return J(() => {
|
|
578
|
+
const o = document.querySelector(`[data-column-id="${r}"]`);
|
|
579
|
+
o && (o.style.setProperty("--column-width", `${t}px`), o.style.setProperty("--column-min-width", `${n}px`), o.style.setProperty("--column-max-width", `${l}px`));
|
|
580
|
+
}, [r, t, n, l]), /* @__PURE__ */ e.jsxs("div", { className: M, "data-column-id": r, "data-width": t, "data-min-width": n, "data-max-width": l, children: [
|
|
581
|
+
$,
|
|
582
|
+
p && /* @__PURE__ */ e.jsx(We, { columnId: r, onResizeStart: s, onResize: u, onResizeEnd: d, isResizing: c, position: "right", debug: w }),
|
|
488
583
|
w.showPanelSizes && /* @__PURE__ */ e.jsxs("div", { className: "column-debug-size", children: [
|
|
489
|
-
|
|
584
|
+
t,
|
|
490
585
|
"px",
|
|
491
586
|
c && " ↔"
|
|
492
587
|
] })
|
|
493
588
|
] });
|
|
494
|
-
},
|
|
589
|
+
}, je = He(
|
|
495
590
|
({
|
|
496
|
-
index:
|
|
497
|
-
columnIndex:
|
|
591
|
+
index: r,
|
|
592
|
+
columnIndex: t,
|
|
498
593
|
isDragging: n,
|
|
499
594
|
dragOverPosition: l,
|
|
500
|
-
originalPosition:
|
|
595
|
+
originalPosition: s,
|
|
501
596
|
onDragEnter: u,
|
|
502
597
|
onDragLeave: d,
|
|
503
598
|
debugConfig: c,
|
|
504
|
-
customDrag:
|
|
505
|
-
}) => /* @__PURE__ */ e.jsx(
|
|
599
|
+
customDrag: p
|
|
600
|
+
}) => /* @__PURE__ */ e.jsx(Le, { index: r, columnIndex: t, isDragging: n, dragOverPosition: l, originalPosition: s, onDragEnter: u, onDragLeave: d, config: c, customDrag: p })
|
|
506
601
|
);
|
|
507
|
-
|
|
508
|
-
const
|
|
509
|
-
columns:
|
|
510
|
-
panels:
|
|
602
|
+
je.displayName = "LocalInsertPlaceholder";
|
|
603
|
+
const pt = ({
|
|
604
|
+
columns: r,
|
|
605
|
+
panels: t,
|
|
511
606
|
columnPanels: n,
|
|
512
607
|
// onColumnPanelsChange,
|
|
513
608
|
panelVisibility: l,
|
|
514
|
-
onPanelVisibilityChange:
|
|
609
|
+
onPanelVisibilityChange: s,
|
|
515
610
|
dragState: u,
|
|
516
611
|
dragOverPosition: d,
|
|
517
612
|
originalPanelPosition: c,
|
|
518
|
-
dragModes:
|
|
613
|
+
dragModes: p,
|
|
519
614
|
onDragStart: C,
|
|
520
615
|
onDragEnd: w,
|
|
521
|
-
onPlaceholderDragEnter:
|
|
522
|
-
onPlaceholderDragLeave:
|
|
523
|
-
onDragOverWithInsert:
|
|
524
|
-
onDropWithInsert:
|
|
616
|
+
onPlaceholderDragEnter: $,
|
|
617
|
+
onPlaceholderDragLeave: M,
|
|
618
|
+
onDragOverWithInsert: o,
|
|
619
|
+
onDropWithInsert: v,
|
|
525
620
|
onColumnDragLeave: D,
|
|
526
621
|
onPanelClick: m,
|
|
527
|
-
onPanelMouseDown:
|
|
528
|
-
onTouchStart:
|
|
529
|
-
onTouchMove:
|
|
622
|
+
onPanelMouseDown: T,
|
|
623
|
+
onTouchStart: z,
|
|
624
|
+
onTouchMove: H,
|
|
530
625
|
onTouchEnd: B,
|
|
531
626
|
debugConfig: k,
|
|
532
|
-
panelSizes:
|
|
533
|
-
setPanelRef:
|
|
534
|
-
enableResize:
|
|
627
|
+
panelSizes: q,
|
|
628
|
+
setPanelRef: L,
|
|
629
|
+
enableResize: K = !1,
|
|
535
630
|
columnWidths: h,
|
|
536
631
|
// onColumnWidthChange,
|
|
537
632
|
onResizeStart: f,
|
|
538
|
-
onResize:
|
|
633
|
+
onResize: b,
|
|
539
634
|
onResizeEnd: N,
|
|
540
|
-
isResizing:
|
|
635
|
+
isResizing: y = !1,
|
|
541
636
|
resizingColumn: i,
|
|
542
637
|
onPanelSizeInfoClick: g,
|
|
543
638
|
onToggleDragMode: E,
|
|
544
|
-
|
|
639
|
+
onPanelClose: A,
|
|
640
|
+
onPanelMaximizeChange: _,
|
|
641
|
+
customDrag: X,
|
|
642
|
+
dragHandle: U = "panel",
|
|
643
|
+
maximizedPanel: a = null,
|
|
644
|
+
panelClassName: x = ""
|
|
545
645
|
}) => {
|
|
546
|
-
const
|
|
547
|
-
|
|
548
|
-
|
|
646
|
+
const O = Y(k);
|
|
647
|
+
J(() => {
|
|
648
|
+
O.current = k;
|
|
549
649
|
}, [k]);
|
|
550
|
-
const
|
|
551
|
-
|
|
552
|
-
S(
|
|
553
|
-
dragModes:
|
|
650
|
+
const R = Y({}), Z = Y(/* @__PURE__ */ new Map());
|
|
651
|
+
J(() => {
|
|
652
|
+
S(O.current, 1, "🎨 DragDropLayout - dragModes props changed:", {
|
|
653
|
+
dragModes: p,
|
|
554
654
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
555
|
-
keys: Object.keys(
|
|
556
|
-
values: Object.values(
|
|
655
|
+
keys: Object.keys(p),
|
|
656
|
+
values: Object.values(p)
|
|
557
657
|
});
|
|
558
|
-
}, [
|
|
559
|
-
const
|
|
560
|
-
const
|
|
561
|
-
return
|
|
562
|
-
|
|
563
|
-
}),
|
|
564
|
-
}, [
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
658
|
+
}, [p]);
|
|
659
|
+
const Q = Ae(() => {
|
|
660
|
+
const j = {};
|
|
661
|
+
return t.forEach((V) => {
|
|
662
|
+
j[V.id] = V;
|
|
663
|
+
}), j;
|
|
664
|
+
}, [t]);
|
|
665
|
+
J(() => {
|
|
666
|
+
if (!(a && _))
|
|
667
|
+
return;
|
|
668
|
+
const j = (V) => {
|
|
669
|
+
V.key === "Escape" && _(null);
|
|
670
|
+
};
|
|
671
|
+
return document.addEventListener("keydown", j), () => document.removeEventListener("keydown", j);
|
|
672
|
+
}, [a, _]), qe(() => {
|
|
673
|
+
const j = /* @__PURE__ */ new Map();
|
|
674
|
+
Object.keys(R.current).forEach((W) => {
|
|
675
|
+
const te = R.current[W];
|
|
676
|
+
if (te) {
|
|
677
|
+
const ie = te.getBoundingClientRect();
|
|
678
|
+
j.set(W, {
|
|
679
|
+
rect: ie,
|
|
680
|
+
height: te.offsetHeight,
|
|
681
|
+
width: te.offsetWidth
|
|
575
682
|
});
|
|
576
683
|
}
|
|
577
684
|
});
|
|
578
|
-
const
|
|
685
|
+
const V = Z.current, ne = 300, ue = /* @__PURE__ */ new Set();
|
|
579
686
|
Object.values(n).forEach((W) => {
|
|
580
|
-
W.forEach((
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
}),
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
},
|
|
687
|
+
W.forEach((te) => {
|
|
688
|
+
ue.add(te);
|
|
689
|
+
});
|
|
690
|
+
}), new Set(V.keys()).forEach((W) => {
|
|
691
|
+
ue.has(W) || (S(O.current, 1, "パネル削除検出 - クリーンアップ:", W), V.delete(W), R.current[W] && delete R.current[W]);
|
|
692
|
+
}), j.forEach((W, te) => {
|
|
693
|
+
const ie = V.get(te);
|
|
694
|
+
if (ie) {
|
|
695
|
+
const G = ie.rect.left - W.rect.left, de = ie.rect.top - W.rect.top;
|
|
696
|
+
if (G !== 0 || de !== 0) {
|
|
697
|
+
S(O.current, 2, "パネル移動検出 - アニメーション開始:", te, { dx: G, dy: de });
|
|
698
|
+
const se = R.current[te];
|
|
699
|
+
se && (se.style.transform = `translate(${G}px, ${de}px)`, se.style.transition = "none", se.classList.add("is-moving"), requestAnimationFrame(() => {
|
|
700
|
+
se.style.transition = `transform ${ne}ms cubic-bezier(0.2, 0, 0.2, 1)`, se.style.transform = "translate(0, 0)", setTimeout(() => {
|
|
701
|
+
se.style.transition = "", se.style.transform = "", se.classList.remove("is-moving");
|
|
702
|
+
}, ne);
|
|
594
703
|
}));
|
|
595
704
|
}
|
|
596
705
|
} else {
|
|
597
|
-
S(
|
|
598
|
-
const
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
},
|
|
706
|
+
S(O.current, 1, "新規パネル検出 - フェードインアニメーション:", te);
|
|
707
|
+
const G = R.current[te];
|
|
708
|
+
G && (G.style.opacity = "0", G.style.transition = "none", requestAnimationFrame(() => {
|
|
709
|
+
G.style.transition = `opacity ${ne}ms ease-out`, G.style.opacity = "1", setTimeout(() => {
|
|
710
|
+
G.style.transition = "", G.style.opacity = "";
|
|
711
|
+
}, ne);
|
|
603
712
|
}));
|
|
604
713
|
}
|
|
605
|
-
}),
|
|
714
|
+
}), Z.current = j;
|
|
606
715
|
}, [n]);
|
|
607
|
-
const
|
|
608
|
-
if (!l[
|
|
609
|
-
const
|
|
610
|
-
if (!
|
|
611
|
-
return S(
|
|
612
|
-
const
|
|
613
|
-
S(
|
|
614
|
-
panelId:
|
|
716
|
+
const I = (j) => {
|
|
717
|
+
if (!l[j]) return null;
|
|
718
|
+
const V = Q[j];
|
|
719
|
+
if (!V)
|
|
720
|
+
return S(O.current, 1, `Panel config not found for panelId: ${j}`), null;
|
|
721
|
+
const ne = V.component, ue = V.title, ae = u.draggedPanel === j, W = p[j] || "normal";
|
|
722
|
+
S(O.current, 2, `🎨 renderPanel - ${j}:`, {
|
|
723
|
+
panelId: j,
|
|
615
724
|
dragMode: W,
|
|
616
725
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
617
726
|
});
|
|
618
|
-
const
|
|
619
|
-
|
|
620
|
-
const
|
|
621
|
-
S(
|
|
622
|
-
width:
|
|
623
|
-
height:
|
|
624
|
-
x:
|
|
625
|
-
y:
|
|
626
|
-
minHeight:
|
|
627
|
-
maxHeight:
|
|
727
|
+
const te = (F) => {
|
|
728
|
+
R.current[j] = F, L && L(j, F), F && k.showPanelSizes && requestAnimationFrame(() => {
|
|
729
|
+
const xe = F.getBoundingClientRect(), Se = window.getComputedStyle(F);
|
|
730
|
+
S(O.current, 1, `Panel ${j} mounted with size:`, {
|
|
731
|
+
width: xe.width,
|
|
732
|
+
height: xe.height,
|
|
733
|
+
x: xe.left,
|
|
734
|
+
y: xe.top,
|
|
735
|
+
minHeight: Se.minHeight,
|
|
736
|
+
maxHeight: Se.maxHeight
|
|
628
737
|
});
|
|
629
738
|
});
|
|
630
|
-
},
|
|
739
|
+
}, ie = q[j], G = a === j, de = !!_, se = () => _?.(G ? null : j), Xe = G ? { position: "fixed", inset: 0, zIndex: 50, minHeight: 0, maxHeight: "none" } : {
|
|
740
|
+
minHeight: V.minHeight ?? "200px",
|
|
741
|
+
maxHeight: V.maxHeight ?? "500px"
|
|
742
|
+
}, fe = U === "header", Pe = W === "normal" && !fe && !G, De = W === "normal" && fe && !G, Ne = ae ? "cursor-grabbing" : "cursor-grab", Ee = `panel-draggable group relative flex flex-col overflow-hidden border border-slate-200 text-left shadow-lg backdrop-blur-lg ${W === "custom" ? "select-none" : ""}`, Fe = G ? (
|
|
743
|
+
// 最大化中: 角丸・ホバー演出・grab カーソル無し、背景は不透過寄りで下のレイアウトを遮蔽
|
|
744
|
+
`${Ee} rounded-none bg-white/95 p-4 ${x}`
|
|
745
|
+
) : `${Ee} rounded-2xl bg-white/80 p-4 transition-all duration-300 hover:-translate-y-1 hover:shadow-xl ${fe ? "" : Ne} ${x}`;
|
|
631
746
|
return (
|
|
632
747
|
// biome-ignore lint/a11y/noStaticElementInteractions: クリックイベントを持つ静的要素
|
|
633
748
|
/* @__PURE__ */ e.jsxs(
|
|
634
749
|
"div",
|
|
635
750
|
{
|
|
636
|
-
ref:
|
|
637
|
-
"data-panel-id":
|
|
638
|
-
"data-dragging":
|
|
751
|
+
ref: te,
|
|
752
|
+
"data-panel-id": j,
|
|
753
|
+
"data-dragging": ae,
|
|
754
|
+
"data-maximized": G || void 0,
|
|
639
755
|
role: "presentation",
|
|
640
|
-
draggable:
|
|
641
|
-
onDragStart: (
|
|
756
|
+
draggable: Pe,
|
|
757
|
+
onDragStart: (F) => Pe && C(F, j),
|
|
642
758
|
onDragEnd: w,
|
|
643
|
-
onClick: (
|
|
644
|
-
onMouseDown: (
|
|
645
|
-
onTouchStart: (
|
|
646
|
-
onTouchMove:
|
|
759
|
+
onClick: (F) => m?.(F, j),
|
|
760
|
+
onMouseDown: (F) => T?.(F, j),
|
|
761
|
+
onTouchStart: (F) => z?.(F, j),
|
|
762
|
+
onTouchMove: H,
|
|
647
763
|
onTouchEnd: B,
|
|
648
|
-
|
|
764
|
+
style: Xe,
|
|
765
|
+
className: Fe,
|
|
649
766
|
children: [
|
|
650
|
-
/* @__PURE__ */ e.jsxs(
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
767
|
+
/* @__PURE__ */ e.jsxs(
|
|
768
|
+
"div",
|
|
769
|
+
{
|
|
770
|
+
className: `group relative mb-3 flex items-center justify-between ${fe && !G ? Ne : ""}`,
|
|
771
|
+
draggable: De,
|
|
772
|
+
onDragStart: (F) => De && C(F, j),
|
|
773
|
+
onDoubleClick: de ? (F) => {
|
|
774
|
+
F.stopPropagation(), se();
|
|
775
|
+
} : void 0,
|
|
776
|
+
children: [
|
|
777
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
778
|
+
/* @__PURE__ */ e.jsx("h3", { className: "font-semibold text-lg text-slate-700 transition-colors group-hover:text-slate-900", children: ue }),
|
|
779
|
+
W === "custom" && /* @__PURE__ */ e.jsx("span", { className: "rounded-md bg-orange-100 px-2 py-1 font-medium text-orange-600 text-xs", children: "Custom" })
|
|
780
|
+
] }),
|
|
781
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-1 opacity-0 transition-opacity group-hover:opacity-100", children: [
|
|
782
|
+
/* @__PURE__ */ e.jsx(
|
|
783
|
+
"button",
|
|
784
|
+
{
|
|
785
|
+
type: "button",
|
|
786
|
+
onClick: (F) => {
|
|
787
|
+
F.stopPropagation(), E && E(j);
|
|
788
|
+
},
|
|
789
|
+
onKeyDown: (F) => {
|
|
790
|
+
(F.key === "Enter" || F.key === " ") && (F.preventDefault(), F.stopPropagation(), E && E(j));
|
|
791
|
+
},
|
|
792
|
+
tabIndex: 0,
|
|
793
|
+
className: `cursor-pointer rounded p-1 text-xs transition-colors ${W === "custom" ? "bg-orange-100 text-orange-600 hover:bg-orange-200" : "text-slate-400 hover:bg-slate-100 hover:text-slate-600"}`,
|
|
794
|
+
title: W === "custom" ? "通常ドラッグモードに戻す" : "カスタムドラッグモードに切り替え",
|
|
795
|
+
children: W === "custom" ? /* @__PURE__ */ e.jsx(Ve, { className: "h-4 w-4" }) : /* @__PURE__ */ e.jsx(Be, { className: "h-4 w-4" })
|
|
796
|
+
}
|
|
797
|
+
),
|
|
798
|
+
!G && /* @__PURE__ */ e.jsx(
|
|
799
|
+
"button",
|
|
800
|
+
{
|
|
801
|
+
type: "button",
|
|
802
|
+
onClick: (F) => {
|
|
803
|
+
F.stopPropagation(), s({
|
|
804
|
+
...l,
|
|
805
|
+
[j]: !1
|
|
806
|
+
});
|
|
807
|
+
},
|
|
808
|
+
className: "rounded p-1 text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-600",
|
|
809
|
+
title: "パネルを非表示",
|
|
810
|
+
children: /* @__PURE__ */ e.jsx(ke, { className: "h-4 w-4" })
|
|
811
|
+
}
|
|
812
|
+
),
|
|
813
|
+
de && /* @__PURE__ */ e.jsx(
|
|
814
|
+
"button",
|
|
815
|
+
{
|
|
816
|
+
type: "button",
|
|
817
|
+
onClick: (F) => {
|
|
818
|
+
F.stopPropagation(), se();
|
|
819
|
+
},
|
|
820
|
+
className: "rounded p-1 text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-600",
|
|
821
|
+
title: G ? "元のサイズに戻す" : "パネルを最大化",
|
|
822
|
+
children: G ? /* @__PURE__ */ e.jsx(Ze, { className: "h-4 w-4" }) : /* @__PURE__ */ e.jsx(Ge, { className: "h-4 w-4" })
|
|
823
|
+
}
|
|
824
|
+
),
|
|
825
|
+
A && /* @__PURE__ */ e.jsx(
|
|
826
|
+
"button",
|
|
827
|
+
{
|
|
828
|
+
type: "button",
|
|
829
|
+
onClick: (F) => {
|
|
830
|
+
F.stopPropagation(), A(j);
|
|
831
|
+
},
|
|
832
|
+
className: "rounded p-1 text-slate-400 transition-colors hover:bg-slate-100 hover:text-red-500",
|
|
833
|
+
title: "パネルを閉じる",
|
|
834
|
+
children: /* @__PURE__ */ e.jsx(Re, { className: "h-4 w-4" })
|
|
835
|
+
}
|
|
836
|
+
)
|
|
837
|
+
] })
|
|
838
|
+
]
|
|
839
|
+
}
|
|
840
|
+
),
|
|
841
|
+
/* @__PURE__ */ e.jsx("div", { className: "panel-scroll-area min-h-0 flex-1 overflow-y-auto", children: /* @__PURE__ */ e.jsx(ne, { ...V.props || {} }) }),
|
|
842
|
+
/* @__PURE__ */ e.jsx(ot, { config: k, panelId: j, sizeInfo: ie, onSizeInfoClick: (F) => g?.(F, j) })
|
|
691
843
|
]
|
|
692
844
|
},
|
|
693
|
-
|
|
845
|
+
j
|
|
694
846
|
)
|
|
695
847
|
);
|
|
696
|
-
},
|
|
697
|
-
const
|
|
698
|
-
let
|
|
699
|
-
for (const W of
|
|
848
|
+
}, re = (j, V) => {
|
|
849
|
+
const ne = n[j] || [];
|
|
850
|
+
let ue = !1;
|
|
851
|
+
for (const W of ne)
|
|
700
852
|
if (l[W]) {
|
|
701
|
-
|
|
853
|
+
ue = !0;
|
|
702
854
|
break;
|
|
703
855
|
}
|
|
704
|
-
const
|
|
705
|
-
return /* @__PURE__ */ e.jsx(
|
|
856
|
+
const ae = u.isDragging || (X?.isActive ?? !1);
|
|
857
|
+
return /* @__PURE__ */ e.jsx(_e, { columnIndex: V, isDragging: ae, dragOverPosition: d, config: k, children: /* @__PURE__ */ e.jsxs(
|
|
706
858
|
"section",
|
|
707
859
|
{
|
|
708
860
|
"data-drop-zone": "true",
|
|
709
|
-
"data-column-key":
|
|
710
|
-
"data-column-index":
|
|
711
|
-
"aria-label": `Drop zone for column ${
|
|
712
|
-
onDragOver: (W) =>
|
|
713
|
-
onDrop: (W) =>
|
|
861
|
+
"data-column-key": j,
|
|
862
|
+
"data-column-index": V,
|
|
863
|
+
"aria-label": `Drop zone for column ${V + 1}`,
|
|
864
|
+
onDragOver: (W) => o(W, V),
|
|
865
|
+
onDrop: (W) => v(W, j),
|
|
714
866
|
onDragLeave: D,
|
|
715
867
|
className: "relative flex h-full flex-col transition-all duration-200",
|
|
716
868
|
children: [
|
|
717
869
|
/* @__PURE__ */ e.jsx("div", { className: "placeholder-container", children: /* @__PURE__ */ e.jsx(
|
|
718
|
-
|
|
870
|
+
je,
|
|
719
871
|
{
|
|
720
872
|
index: 0,
|
|
721
|
-
columnIndex:
|
|
722
|
-
isDragging:
|
|
873
|
+
columnIndex: V,
|
|
874
|
+
isDragging: ae,
|
|
723
875
|
dragOverPosition: d,
|
|
724
876
|
originalPosition: c,
|
|
725
|
-
onDragEnter:
|
|
726
|
-
onDragLeave:
|
|
877
|
+
onDragEnter: $,
|
|
878
|
+
onDragLeave: M,
|
|
727
879
|
debugConfig: k,
|
|
728
|
-
customDrag:
|
|
880
|
+
customDrag: X
|
|
729
881
|
}
|
|
730
882
|
) }),
|
|
731
|
-
|
|
732
|
-
const
|
|
733
|
-
return /* @__PURE__ */ e.jsxs("div", { className: `panel-with-placeholder ${
|
|
734
|
-
|
|
883
|
+
ne.map((W, te) => {
|
|
884
|
+
const ie = l[W], G = !(ie || ae);
|
|
885
|
+
return /* @__PURE__ */ e.jsxs("div", { className: `panel-with-placeholder ${G ? "m-0 h-0 overflow-hidden p-0" : ""}`, "data-panel-hidden": G ? "true" : void 0, "aria-hidden": G ? "true" : void 0, children: [
|
|
886
|
+
ie ? I(W) : ae ? (
|
|
735
887
|
/* ドラッグ中のみ隠されたパネルのダミー表示 */
|
|
736
888
|
/* @__PURE__ */ e.jsxs("div", { className: "hidden-panel-placeholder relative h-[120px] rounded-2xl border-2 border-amber-300 border-dashed bg-gradient-to-br from-amber-50 to-orange-50 p-3 text-left shadow-lg backdrop-blur-lg", children: [
|
|
737
889
|
/* @__PURE__ */ e.jsxs("div", { className: "mb-2 flex items-center space-x-2", children: [
|
|
738
|
-
/* @__PURE__ */ e.jsx("h3", { className: "font-semibold text-
|
|
890
|
+
/* @__PURE__ */ e.jsx("h3", { className: "font-semibold text-amber-700 text-base", children: Q[W]?.title || W }),
|
|
739
891
|
/* @__PURE__ */ e.jsx("span", { className: "rounded-md bg-amber-100 px-2 py-1 font-medium text-amber-600 text-xs", children: "非表示" })
|
|
740
892
|
] }),
|
|
741
893
|
/* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsxs("div", { className: "text-center text-amber-600", children: [
|
|
742
|
-
/* @__PURE__ */ e.jsx(
|
|
743
|
-
/* @__PURE__ */ e.jsx("p", { className: "text-xs
|
|
894
|
+
/* @__PURE__ */ e.jsx(ke, { className: "mx-auto h-6 w-6 opacity-50" }),
|
|
895
|
+
/* @__PURE__ */ e.jsx("p", { className: "mt-1 text-xs", children: "このパネルは非表示です" })
|
|
744
896
|
] }) }) })
|
|
745
897
|
] })
|
|
746
898
|
) : null,
|
|
747
899
|
/* @__PURE__ */ e.jsx(
|
|
748
|
-
|
|
900
|
+
je,
|
|
749
901
|
{
|
|
750
|
-
index:
|
|
751
|
-
columnIndex:
|
|
752
|
-
isDragging:
|
|
902
|
+
index: te + 1,
|
|
903
|
+
columnIndex: V,
|
|
904
|
+
isDragging: ae,
|
|
753
905
|
dragOverPosition: d,
|
|
754
906
|
originalPosition: c,
|
|
755
|
-
onDragEnter:
|
|
756
|
-
onDragLeave:
|
|
907
|
+
onDragEnter: $,
|
|
908
|
+
onDragLeave: M,
|
|
757
909
|
debugConfig: k,
|
|
758
|
-
customDrag:
|
|
910
|
+
customDrag: X
|
|
759
911
|
}
|
|
760
912
|
)
|
|
761
913
|
] }, `panel-${W}`);
|
|
762
914
|
}),
|
|
763
|
-
!
|
|
915
|
+
!(ue || ae) && /* @__PURE__ */ e.jsx("div", { className: "textcenter flex-shrink-0 rounded-xl border-2 border-slate-200 border-dashed bg-white/30 p-8 text-slate-400 transition-all duration-200", children: /* @__PURE__ */ e.jsx("div", { className: "text-sm", children: "このエリアは空です" }) })
|
|
764
916
|
]
|
|
765
917
|
}
|
|
766
918
|
) });
|
|
767
|
-
},
|
|
919
|
+
}, ce = Object.keys(l).filter((j) => !l[j]);
|
|
768
920
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex h-full flex-col", children: [
|
|
769
|
-
|
|
921
|
+
ce.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "border-slate-200 border-b bg-white/70 px-4 py-2 backdrop-blur-lg", children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-wrap gap-2", children: [
|
|
770
922
|
/* @__PURE__ */ e.jsx("span", { className: "mr-2 text-slate-600 text-sm", children: "非表示のパネル:" }),
|
|
771
|
-
|
|
772
|
-
const
|
|
923
|
+
ce.map((j) => {
|
|
924
|
+
const ne = Q[j]?.title || j;
|
|
773
925
|
return /* @__PURE__ */ e.jsxs(
|
|
774
926
|
"button",
|
|
775
927
|
{
|
|
776
928
|
type: "button",
|
|
777
|
-
onClick: () =>
|
|
929
|
+
onClick: () => s({
|
|
778
930
|
...l,
|
|
779
|
-
[
|
|
931
|
+
[j]: !0
|
|
780
932
|
}),
|
|
781
933
|
className: "flex items-center space-x-1 rounded-lg border border-sky-300 bg-gradient-to-r from-sky-500 to-indigo-500 px-3 py-1 text-sm text-white shadow-md transition-all duration-200 hover:from-sky-600 hover:to-indigo-600 hover:shadow-lg",
|
|
782
934
|
children: [
|
|
783
|
-
/* @__PURE__ */ e.jsx(
|
|
784
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
935
|
+
/* @__PURE__ */ e.jsx(Ie, { className: "h-3 w-3" }),
|
|
936
|
+
/* @__PURE__ */ e.jsx("span", { children: ne })
|
|
785
937
|
]
|
|
786
938
|
},
|
|
787
|
-
|
|
939
|
+
j
|
|
788
940
|
);
|
|
789
941
|
})
|
|
790
942
|
] }) }),
|
|
791
|
-
/* @__PURE__ */ e.jsx("main", { className: "max-w-full flex-1 overflow-auto px-4 py-6 sm:px-6
|
|
792
|
-
const
|
|
793
|
-
return /* @__PURE__ */ e.jsx(
|
|
943
|
+
/* @__PURE__ */ e.jsx("main", { className: "no-scrollbar max-w-full flex-1 overflow-auto px-4 py-6 sm:px-6", children: /* @__PURE__ */ e.jsx("div", { className: "relative flex h-full items-start gap-6 pr-4", children: r.map((j, V) => {
|
|
944
|
+
const ne = h?.[j.id] || j.initialWidth || 350, ue = K && (j.resizable ?? !0);
|
|
945
|
+
return /* @__PURE__ */ e.jsx(Ue, { children: /* @__PURE__ */ e.jsxs(
|
|
794
946
|
"div",
|
|
795
947
|
{
|
|
796
|
-
className: `column relative ${
|
|
797
|
-
"data-column":
|
|
798
|
-
"data-column-id":
|
|
799
|
-
"data-min-width":
|
|
800
|
-
"data-max-width":
|
|
801
|
-
"data-column-width":
|
|
802
|
-
...
|
|
803
|
-
style: { "--column-width": `${
|
|
948
|
+
className: `column relative ${j.className || ""} ${K ? "resize-enabled-column" : "auto-width-column"} ${y && i === j.id ? "column-resizing-active" : ""}`,
|
|
949
|
+
"data-column": V,
|
|
950
|
+
"data-column-id": j.id,
|
|
951
|
+
"data-min-width": j.minWidth || 350,
|
|
952
|
+
"data-max-width": j.maxWidth,
|
|
953
|
+
"data-column-width": K ? ne : void 0,
|
|
954
|
+
...K && {
|
|
955
|
+
style: { "--column-width": `${ne}px` }
|
|
804
956
|
},
|
|
805
957
|
children: [
|
|
806
|
-
|
|
807
|
-
|
|
958
|
+
re(j.key, V),
|
|
959
|
+
ue && f && b && N && /* @__PURE__ */ e.jsx(We, { columnId: j.id, onResizeStart: f, onResize: b, onResizeEnd: N, isResizing: y && i === j.id, position: "right", debug: k })
|
|
808
960
|
]
|
|
809
961
|
}
|
|
810
|
-
) },
|
|
962
|
+
) }, j.id);
|
|
811
963
|
}) }) })
|
|
812
964
|
] });
|
|
813
|
-
},
|
|
814
|
-
const C =
|
|
965
|
+
}, bt = ({ columnCount: r, onColumnCountChange: t, onAutoBalance: n, onResetWidths: l, minColumns: s = 2, maxColumns: u = 6, isResizing: d = !1, isResponsiveMode: c = !1, responsiveColumnCount: p }) => {
|
|
966
|
+
const C = r > s && !c, w = r < u && !c;
|
|
815
967
|
return /* @__PURE__ */ e.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: [
|
|
816
968
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
817
969
|
/* @__PURE__ */ e.jsx("span", { className: "font-medium text-slate-700 text-sm", children: "カラム数:" }),
|
|
@@ -819,26 +971,26 @@ const Qe = ({
|
|
|
819
971
|
"button",
|
|
820
972
|
{
|
|
821
973
|
type: "button",
|
|
822
|
-
onClick: () => C &&
|
|
974
|
+
onClick: () => C && t(r - 1),
|
|
823
975
|
disabled: !C || d,
|
|
824
976
|
className: `rounded p-1 text-xs transition-colors ${C && !d ? "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"}`,
|
|
825
|
-
title: c ? "レスポンシブモード中:カラム数は自動調整されます" : `カラムを削除 (最小: ${
|
|
826
|
-
children: /* @__PURE__ */ e.jsx(
|
|
977
|
+
title: c ? "レスポンシブモード中:カラム数は自動調整されます" : `カラムを削除 (最小: ${s}列)`,
|
|
978
|
+
children: /* @__PURE__ */ e.jsx(Je, { className: "h-3 w-3" })
|
|
827
979
|
}
|
|
828
980
|
),
|
|
829
981
|
/* @__PURE__ */ e.jsxs("div", { className: `min-w-[2rem] rounded border px-3 py-1 text-center font-mono text-sm ${c ? "border-blue-300 bg-blue-50 text-blue-700" : "border-slate-300 bg-slate-100 text-slate-700"}`, children: [
|
|
830
|
-
c ?
|
|
982
|
+
c ? p ?? r : r,
|
|
831
983
|
c && /* @__PURE__ */ e.jsx("span", { className: "ml-1 text-xs", children: "自動" })
|
|
832
984
|
] }),
|
|
833
985
|
/* @__PURE__ */ e.jsx(
|
|
834
986
|
"button",
|
|
835
987
|
{
|
|
836
988
|
type: "button",
|
|
837
|
-
onClick: () => w &&
|
|
989
|
+
onClick: () => w && t(r + 1),
|
|
838
990
|
disabled: !w || d,
|
|
839
991
|
className: `rounded p-1 text-xs transition-colors ${w && !d ? "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"}`,
|
|
840
992
|
title: c ? "レスポンシブモード中:カラム数は自動調整されます" : `カラムを追加 (最大: ${u}列)`,
|
|
841
|
-
children: /* @__PURE__ */ e.jsx(
|
|
993
|
+
children: /* @__PURE__ */ e.jsx(we, { className: "h-3 w-3" })
|
|
842
994
|
}
|
|
843
995
|
)
|
|
844
996
|
] }),
|
|
@@ -853,7 +1005,7 @@ const Qe = ({
|
|
|
853
1005
|
className: `flex items-center gap-1 rounded px-2 py-1 text-xs transition-colors ${d ? "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"}`,
|
|
854
1006
|
title: "パネルを全カラムに均等分散",
|
|
855
1007
|
children: [
|
|
856
|
-
/* @__PURE__ */ e.jsx(
|
|
1008
|
+
/* @__PURE__ */ e.jsx(Qe, { className: "h-3 w-3" }),
|
|
857
1009
|
/* @__PURE__ */ e.jsx("span", { children: "バランス" })
|
|
858
1010
|
]
|
|
859
1011
|
}
|
|
@@ -867,7 +1019,7 @@ const Qe = ({
|
|
|
867
1019
|
className: `flex items-center gap-1 rounded px-2 py-1 text-xs transition-colors ${d ? "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"}`,
|
|
868
1020
|
title: "カラム幅を初期値にリセット",
|
|
869
1021
|
children: [
|
|
870
|
-
/* @__PURE__ */ e.jsx(
|
|
1022
|
+
/* @__PURE__ */ e.jsx(Ke, { className: "h-3 w-3" }),
|
|
871
1023
|
/* @__PURE__ */ e.jsx("span", { children: "幅リセット" })
|
|
872
1024
|
]
|
|
873
1025
|
}
|
|
@@ -878,8 +1030,8 @@ const Qe = ({
|
|
|
878
1030
|
/* @__PURE__ */ e.jsx("span", { children: "リサイズ中..." })
|
|
879
1031
|
] })
|
|
880
1032
|
] });
|
|
881
|
-
},
|
|
882
|
-
const c =
|
|
1033
|
+
}, vt = ({ columnCount: r, onInsertColumn: t, onDeleteColumn: n, minColumns: l = 1, maxColumns: s = 6, isResizing: u = !1, disabled: d = !1 }) => {
|
|
1034
|
+
const c = r < s && !d, p = r > l && !d;
|
|
883
1035
|
return /* @__PURE__ */ e.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 ${d ? "bg-slate-100/80 opacity-60" : "bg-white/80"}`, children: [
|
|
884
1036
|
d && /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2 text-slate-500 text-xs", children: /* @__PURE__ */ e.jsx("span", { children: "レスポンシブモード有効中:カラム数は自動調整されます" }) }),
|
|
885
1037
|
!d && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
@@ -887,26 +1039,26 @@ const Qe = ({
|
|
|
887
1039
|
"button",
|
|
888
1040
|
{
|
|
889
1041
|
type: "button",
|
|
890
|
-
onClick: () => c &&
|
|
1042
|
+
onClick: () => c && t(0),
|
|
891
1043
|
disabled: !c || u,
|
|
892
1044
|
className: `flex h-8 w-8 items-center justify-center rounded border-2 border-dashed text-xs transition-colors ${c && !u ? "border-blue-300 text-blue-600 hover:border-blue-500 hover:bg-blue-50" : "cursor-not-allowed border-slate-200 text-slate-300"}`,
|
|
893
1045
|
title: "この位置に新しいカラムを挿入",
|
|
894
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1046
|
+
children: /* @__PURE__ */ e.jsx(we, { className: "h-4 w-4" })
|
|
895
1047
|
}
|
|
896
1048
|
),
|
|
897
|
-
Array.from({ length:
|
|
1049
|
+
Array.from({ length: r }, (C, w) => (
|
|
898
1050
|
// biome-ignore lint/suspicious/noArrayIndexKey: 表示目的の単純なリスト
|
|
899
1051
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
900
1052
|
/* @__PURE__ */ e.jsxs("div", { className: "relative flex h-8 w-12 items-center justify-center rounded border border-slate-300 bg-slate-100", children: [
|
|
901
|
-
/* @__PURE__ */ e.jsx("span", { className: "font-
|
|
902
|
-
|
|
1053
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-medium font-mono text-slate-700 text-xs", children: w + 1 }),
|
|
1054
|
+
p && !u && /* @__PURE__ */ e.jsx(
|
|
903
1055
|
"button",
|
|
904
1056
|
{
|
|
905
1057
|
type: "button",
|
|
906
1058
|
onClick: () => n(w),
|
|
907
|
-
className: "absolute -
|
|
1059
|
+
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",
|
|
908
1060
|
title: `カラム ${w + 1} を削除`,
|
|
909
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1061
|
+
children: /* @__PURE__ */ e.jsx(Re, { className: "h-2.5 w-2.5" })
|
|
910
1062
|
}
|
|
911
1063
|
)
|
|
912
1064
|
] }),
|
|
@@ -914,18 +1066,18 @@ const Qe = ({
|
|
|
914
1066
|
"button",
|
|
915
1067
|
{
|
|
916
1068
|
type: "button",
|
|
917
|
-
onClick: () => c &&
|
|
1069
|
+
onClick: () => c && t(w + 1),
|
|
918
1070
|
disabled: !c || u,
|
|
919
1071
|
className: `flex h-8 w-8 items-center justify-center rounded border-2 border-dashed text-xs transition-colors ${c && !u ? "border-blue-300 text-blue-600 hover:border-blue-500 hover:bg-blue-50" : "cursor-not-allowed border-slate-200 text-slate-300"}`,
|
|
920
1072
|
title: "この位置に新しいカラムを挿入",
|
|
921
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1073
|
+
children: /* @__PURE__ */ e.jsx(we, { className: "h-4 w-4" })
|
|
922
1074
|
}
|
|
923
1075
|
)
|
|
924
1076
|
] }, `column-${w}`)
|
|
925
1077
|
))
|
|
926
1078
|
] })
|
|
927
1079
|
] });
|
|
928
|
-
},
|
|
1080
|
+
}, wt = ({ config: r, onConfigChange: t, isVisible: n, onToggleVisibility: l }) => n ? /* @__PURE__ */ e.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: [
|
|
929
1081
|
/* @__PURE__ */ e.jsxs("div", { className: "mb-3 flex items-center justify-between", children: [
|
|
930
1082
|
/* @__PURE__ */ e.jsx("h3", { className: "font-bold text-gray-800 text-sm", children: "🛠️ デバッグ設定" }),
|
|
931
1083
|
/* @__PURE__ */ e.jsx("button", { type: "button", onClick: l, className: "text-gray-500 text-lg hover:text-gray-700", title: "閉じる", children: "✕" })
|
|
@@ -936,10 +1088,10 @@ const Qe = ({
|
|
|
936
1088
|
"input",
|
|
937
1089
|
{
|
|
938
1090
|
type: "checkbox",
|
|
939
|
-
checked:
|
|
940
|
-
onChange: (
|
|
941
|
-
...
|
|
942
|
-
showDebugPanel:
|
|
1091
|
+
checked: r.showDebugPanel ?? !1,
|
|
1092
|
+
onChange: (s) => t({
|
|
1093
|
+
...r,
|
|
1094
|
+
showDebugPanel: s.target.checked
|
|
943
1095
|
}),
|
|
944
1096
|
className: "rounded"
|
|
945
1097
|
}
|
|
@@ -951,10 +1103,10 @@ const Qe = ({
|
|
|
951
1103
|
"input",
|
|
952
1104
|
{
|
|
953
1105
|
type: "checkbox",
|
|
954
|
-
checked:
|
|
955
|
-
onChange: (
|
|
956
|
-
...
|
|
957
|
-
showMousePosition:
|
|
1106
|
+
checked: r.showMousePosition ?? !1,
|
|
1107
|
+
onChange: (s) => t({
|
|
1108
|
+
...r,
|
|
1109
|
+
showMousePosition: s.target.checked
|
|
958
1110
|
}),
|
|
959
1111
|
className: "rounded"
|
|
960
1112
|
}
|
|
@@ -966,10 +1118,10 @@ const Qe = ({
|
|
|
966
1118
|
"input",
|
|
967
1119
|
{
|
|
968
1120
|
type: "checkbox",
|
|
969
|
-
checked:
|
|
970
|
-
onChange: (
|
|
971
|
-
...
|
|
972
|
-
showPanelSizes:
|
|
1121
|
+
checked: r.showPanelSizes ?? !1,
|
|
1122
|
+
onChange: (s) => t({
|
|
1123
|
+
...r,
|
|
1124
|
+
showPanelSizes: s.target.checked
|
|
973
1125
|
}),
|
|
974
1126
|
className: "rounded"
|
|
975
1127
|
}
|
|
@@ -981,10 +1133,10 @@ const Qe = ({
|
|
|
981
1133
|
"input",
|
|
982
1134
|
{
|
|
983
1135
|
type: "checkbox",
|
|
984
|
-
checked:
|
|
985
|
-
onChange: (
|
|
986
|
-
...
|
|
987
|
-
showPlaceholderInfo:
|
|
1136
|
+
checked: r.showPlaceholderInfo ?? !1,
|
|
1137
|
+
onChange: (s) => t({
|
|
1138
|
+
...r,
|
|
1139
|
+
showPlaceholderInfo: s.target.checked
|
|
988
1140
|
}),
|
|
989
1141
|
className: "rounded"
|
|
990
1142
|
}
|
|
@@ -996,10 +1148,10 @@ const Qe = ({
|
|
|
996
1148
|
"input",
|
|
997
1149
|
{
|
|
998
1150
|
type: "checkbox",
|
|
999
|
-
checked:
|
|
1000
|
-
onChange: (
|
|
1001
|
-
...
|
|
1002
|
-
showDropZoneOutlines:
|
|
1151
|
+
checked: r.showDropZoneOutlines ?? !1,
|
|
1152
|
+
onChange: (s) => t({
|
|
1153
|
+
...r,
|
|
1154
|
+
showDropZoneOutlines: s.target.checked
|
|
1003
1155
|
}),
|
|
1004
1156
|
className: "rounded"
|
|
1005
1157
|
}
|
|
@@ -1009,7 +1161,7 @@ const Qe = ({
|
|
|
1009
1161
|
/* @__PURE__ */ e.jsxs("div", { className: "border-gray-200 border-t pt-2", children: [
|
|
1010
1162
|
/* @__PURE__ */ e.jsxs("label", { htmlFor: "log-level-slider", className: "mb-1 block text-sm", children: [
|
|
1011
1163
|
"ログレベル: ",
|
|
1012
|
-
|
|
1164
|
+
r.logLevel ?? 0
|
|
1013
1165
|
] }),
|
|
1014
1166
|
/* @__PURE__ */ e.jsx(
|
|
1015
1167
|
"input",
|
|
@@ -1018,10 +1170,10 @@ const Qe = ({
|
|
|
1018
1170
|
type: "range",
|
|
1019
1171
|
min: "0",
|
|
1020
1172
|
max: "2",
|
|
1021
|
-
value:
|
|
1022
|
-
onChange: (
|
|
1023
|
-
...
|
|
1024
|
-
logLevel: parseInt(
|
|
1173
|
+
value: r.logLevel ?? 0,
|
|
1174
|
+
onChange: (s) => t({
|
|
1175
|
+
...r,
|
|
1176
|
+
logLevel: parseInt(s.target.value, 10)
|
|
1025
1177
|
}),
|
|
1026
1178
|
className: "w-full",
|
|
1027
1179
|
"aria-label": "ログレベル設定"
|
|
@@ -1038,7 +1190,7 @@ const Qe = ({
|
|
|
1038
1190
|
"button",
|
|
1039
1191
|
{
|
|
1040
1192
|
type: "button",
|
|
1041
|
-
onClick: () =>
|
|
1193
|
+
onClick: () => t({
|
|
1042
1194
|
showDebugPanel: !0,
|
|
1043
1195
|
showMousePosition: !0,
|
|
1044
1196
|
showPanelSizes: !0,
|
|
@@ -1054,7 +1206,7 @@ const Qe = ({
|
|
|
1054
1206
|
"button",
|
|
1055
1207
|
{
|
|
1056
1208
|
type: "button",
|
|
1057
|
-
onClick: () =>
|
|
1209
|
+
onClick: () => t({
|
|
1058
1210
|
showDebugPanel: !1,
|
|
1059
1211
|
showMousePosition: !1,
|
|
1060
1212
|
showPanelSizes: !1,
|
|
@@ -1068,103 +1220,77 @@ const Qe = ({
|
|
|
1068
1220
|
)
|
|
1069
1221
|
] })
|
|
1070
1222
|
] })
|
|
1071
|
-
] }) : /* @__PURE__ */ e.jsx("button", { type: "button", onClick: l, 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: "🛠️" }),
|
|
1072
|
-
/* @__PURE__ */ e.jsxs(
|
|
1073
|
-
"button",
|
|
1074
|
-
{
|
|
1075
|
-
type: "button",
|
|
1076
|
-
onClick: r,
|
|
1077
|
-
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"}`,
|
|
1078
|
-
title: t ? "レスポンシブモードを無効化" : "レスポンシブモードを有効化",
|
|
1079
|
-
children: [
|
|
1080
|
-
t ? /* @__PURE__ */ e.jsx(Re, { className: "h-3 w-3" }) : /* @__PURE__ */ e.jsx(_e, { className: "h-3 w-3" }),
|
|
1081
|
-
/* @__PURE__ */ e.jsx("span", { children: t ? "レスポンシブ" : "固定" })
|
|
1082
|
-
]
|
|
1083
|
-
}
|
|
1084
|
-
),
|
|
1085
|
-
t && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1 text-slate-600 text-xs", children: [
|
|
1086
|
-
/* @__PURE__ */ e.jsxs("span", { className: "font-mono", children: [
|
|
1087
|
-
l,
|
|
1088
|
-
"px"
|
|
1089
|
-
] }),
|
|
1090
|
-
/* @__PURE__ */ e.jsx("span", { children: "→" }),
|
|
1091
|
-
/* @__PURE__ */ e.jsxs("span", { className: "font-semibold text-blue-600", children: [
|
|
1092
|
-
o,
|
|
1093
|
-
"列"
|
|
1094
|
-
] }),
|
|
1095
|
-
o !== n && /* @__PURE__ */ e.jsx("span", { className: "text-orange-600", children: "(変更予定)" })
|
|
1096
|
-
] })
|
|
1097
|
-
] }), ne = {
|
|
1223
|
+
] }) : /* @__PURE__ */ e.jsx("button", { type: "button", onClick: l, 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: "🛠️" }), le = {
|
|
1098
1224
|
prefix: "column",
|
|
1099
1225
|
startIndex: 1,
|
|
1100
1226
|
separator: "_"
|
|
1101
|
-
},
|
|
1102
|
-
const { prefix: n, startIndex: l, separator:
|
|
1103
|
-
return `${n}${
|
|
1104
|
-
},
|
|
1105
|
-
const { prefix: n, startIndex: l, separator:
|
|
1106
|
-
if (!
|
|
1227
|
+
}, pe = (r, t = le) => {
|
|
1228
|
+
const { prefix: n, startIndex: l, separator: s } = t, u = r + l;
|
|
1229
|
+
return `${n}${s}${u}`;
|
|
1230
|
+
}, ze = (r, t = le) => Array.from({ length: r }, (n, l) => pe(l, t)), be = (r, t = le) => {
|
|
1231
|
+
const { prefix: n, startIndex: l, separator: s } = t, u = `${n}${s}`;
|
|
1232
|
+
if (!r.startsWith(u))
|
|
1107
1233
|
return null;
|
|
1108
|
-
const d =
|
|
1234
|
+
const d = r.slice(u.length), c = parseInt(d, 10);
|
|
1109
1235
|
return Number.isNaN(c) || c < l ? null : c - l;
|
|
1110
|
-
},
|
|
1111
|
-
const n =
|
|
1236
|
+
}, yt = (r, t = le) => be(r, t) !== null, jt = (r, t = le) => {
|
|
1237
|
+
const n = r.map((l) => be(l, t)).filter((l) => l !== null).sort((l, s) => l - s);
|
|
1112
1238
|
for (let l = 0; l < n.length; l++)
|
|
1113
1239
|
if (n[l] !== l)
|
|
1114
|
-
return
|
|
1115
|
-
return
|
|
1116
|
-
},
|
|
1117
|
-
const
|
|
1118
|
-
return
|
|
1119
|
-
}),
|
|
1240
|
+
return pe(l, t);
|
|
1241
|
+
return pe(n.length, t);
|
|
1242
|
+
}, lt = (r, t = le) => r.sort((n, l) => {
|
|
1243
|
+
const s = be(n, t) ?? -1, u = be(l, t) ?? -1;
|
|
1244
|
+
return s - u;
|
|
1245
|
+
}), Pt = (r, t = le) => {
|
|
1120
1246
|
const n = {};
|
|
1121
|
-
return
|
|
1122
|
-
const u =
|
|
1247
|
+
return r.forEach((l, s) => {
|
|
1248
|
+
const u = pe(s, t);
|
|
1123
1249
|
n[l] = u;
|
|
1124
1250
|
}), n;
|
|
1125
|
-
},
|
|
1251
|
+
}, at = (r, t, n = le) => {
|
|
1126
1252
|
const l = [];
|
|
1127
|
-
Object.values(
|
|
1253
|
+
Object.values(r).forEach((d) => {
|
|
1128
1254
|
l.push(...d);
|
|
1129
1255
|
});
|
|
1130
|
-
const
|
|
1256
|
+
const s = {}, u = ze(t, n);
|
|
1131
1257
|
return u.forEach((d) => {
|
|
1132
|
-
|
|
1258
|
+
s[d] = [];
|
|
1133
1259
|
}), l.forEach((d, c) => {
|
|
1134
|
-
const
|
|
1135
|
-
|
|
1136
|
-
}),
|
|
1137
|
-
},
|
|
1138
|
-
const [
|
|
1260
|
+
const p = c % t, C = u[p];
|
|
1261
|
+
s[C].push(d);
|
|
1262
|
+
}), s;
|
|
1263
|
+
}, Dt = ({ initialColumns: r, initialPanels: t, debug: n = {}, onLayoutChange: l }) => {
|
|
1264
|
+
const [s, u] = ee(() => {
|
|
1139
1265
|
const h = {};
|
|
1140
|
-
for (const f of
|
|
1266
|
+
for (const f of r)
|
|
1141
1267
|
h[f.id] = f.initialWidth || 400;
|
|
1142
1268
|
return {
|
|
1143
|
-
columns:
|
|
1269
|
+
columns: r,
|
|
1144
1270
|
columnWidths: h,
|
|
1145
1271
|
isResizing: !1,
|
|
1146
1272
|
resizingColumn: null,
|
|
1147
|
-
columnPanels:
|
|
1273
|
+
columnPanels: t,
|
|
1148
1274
|
showInsertPlaceholders: !1
|
|
1149
1275
|
};
|
|
1150
|
-
}), d =
|
|
1151
|
-
|
|
1152
|
-
l?.(
|
|
1153
|
-
}, [
|
|
1154
|
-
const
|
|
1276
|
+
}), d = Y(0), c = Y(0);
|
|
1277
|
+
J(() => {
|
|
1278
|
+
l?.(s);
|
|
1279
|
+
}, [s, l]);
|
|
1280
|
+
const p = P(
|
|
1155
1281
|
(h, f) => {
|
|
1156
|
-
S(n, 1, "カラム追加:", h.id, "at position:", f), u((
|
|
1157
|
-
const N = [...
|
|
1158
|
-
N.splice(
|
|
1282
|
+
S(n, 1, "カラム追加:", h.id, "at position:", f), u((b) => {
|
|
1283
|
+
const N = [...b.columns], y = f ?? N.length;
|
|
1284
|
+
N.splice(y, 0, h);
|
|
1159
1285
|
const i = {
|
|
1160
|
-
...
|
|
1286
|
+
...b.columnWidths,
|
|
1161
1287
|
[h.id]: h.initialWidth || 400
|
|
1162
1288
|
}, g = {
|
|
1163
|
-
...
|
|
1289
|
+
...b.columnPanels,
|
|
1164
1290
|
[h.id]: []
|
|
1165
1291
|
};
|
|
1166
1292
|
return {
|
|
1167
|
-
...
|
|
1293
|
+
...b,
|
|
1168
1294
|
columns: N,
|
|
1169
1295
|
columnWidths: i,
|
|
1170
1296
|
columnPanels: g
|
|
@@ -1175,11 +1301,11 @@ const Qe = ({
|
|
|
1175
1301
|
), C = P(
|
|
1176
1302
|
(h) => {
|
|
1177
1303
|
S(n, 1, "カラム削除:", h), u((f) => {
|
|
1178
|
-
const
|
|
1304
|
+
const b = f.columnPanels[h] || [], N = f.columns.filter((E) => E.id !== h);
|
|
1179
1305
|
if (N.length === 0)
|
|
1180
1306
|
return S(n, 1, "警告: 最後のカラムを削除しようとしています"), f;
|
|
1181
|
-
const
|
|
1182
|
-
|
|
1307
|
+
const y = N[0].id, i = { ...f.columnPanels };
|
|
1308
|
+
b.length > 0 && (i[y] = [...i[y], ...b]), delete i[h];
|
|
1183
1309
|
const g = { ...f.columnWidths };
|
|
1184
1310
|
return delete g[h], {
|
|
1185
1311
|
...f,
|
|
@@ -1192,50 +1318,50 @@ const Qe = ({
|
|
|
1192
1318
|
[n]
|
|
1193
1319
|
), w = P(
|
|
1194
1320
|
(h, f) => {
|
|
1195
|
-
S(n, 1, "カラム移動:", h, "->", f), u((
|
|
1196
|
-
const N = [...
|
|
1197
|
-
return N.splice(f, 0,
|
|
1198
|
-
...
|
|
1321
|
+
S(n, 1, "カラム移動:", h, "->", f), u((b) => {
|
|
1322
|
+
const N = [...b.columns], [y] = N.splice(h, 1);
|
|
1323
|
+
return N.splice(f, 0, y), {
|
|
1324
|
+
...b,
|
|
1199
1325
|
columns: N
|
|
1200
1326
|
};
|
|
1201
1327
|
});
|
|
1202
1328
|
},
|
|
1203
1329
|
[n]
|
|
1204
|
-
),
|
|
1330
|
+
), $ = P(
|
|
1205
1331
|
(h, f) => {
|
|
1206
|
-
S(n, 2, "リサイズ開始:", h, "at X:", f), d.current = f, c.current =
|
|
1207
|
-
...
|
|
1332
|
+
S(n, 2, "リサイズ開始:", h, "at X:", f), d.current = f, c.current = s.columnWidths[h] || 300, u((b) => ({
|
|
1333
|
+
...b,
|
|
1208
1334
|
isResizing: !0,
|
|
1209
1335
|
resizingColumn: h
|
|
1210
1336
|
}));
|
|
1211
1337
|
},
|
|
1212
|
-
[n,
|
|
1213
|
-
),
|
|
1338
|
+
[n, s.columnWidths]
|
|
1339
|
+
), M = P(
|
|
1214
1340
|
(h) => {
|
|
1215
|
-
const { resizingColumn: f, isResizing:
|
|
1216
|
-
if (!(
|
|
1217
|
-
const N = h - d.current,
|
|
1218
|
-
S(n, 2, "リサイズ中:", f, "new width:",
|
|
1341
|
+
const { resizingColumn: f, isResizing: b } = s;
|
|
1342
|
+
if (!(b && f)) return;
|
|
1343
|
+
const N = h - d.current, y = Math.max(100, Math.min(800, c.current + N));
|
|
1344
|
+
S(n, 2, "リサイズ中:", f, "new width:", y), u((i) => ({
|
|
1219
1345
|
...i,
|
|
1220
1346
|
columnWidths: {
|
|
1221
1347
|
...i.columnWidths,
|
|
1222
|
-
[f]:
|
|
1348
|
+
[f]: y
|
|
1223
1349
|
}
|
|
1224
1350
|
}));
|
|
1225
1351
|
},
|
|
1226
|
-
[n,
|
|
1227
|
-
),
|
|
1352
|
+
[n, s]
|
|
1353
|
+
), o = P(() => {
|
|
1228
1354
|
S(n, 2, "リサイズ終了"), u((h) => ({
|
|
1229
1355
|
...h,
|
|
1230
1356
|
isResizing: !1,
|
|
1231
1357
|
resizingColumn: null
|
|
1232
1358
|
}));
|
|
1233
|
-
}, [n]),
|
|
1359
|
+
}, [n]), v = P(
|
|
1234
1360
|
(h, f) => {
|
|
1235
|
-
S(n, 2, "カラム幅設定:", h, f), u((
|
|
1236
|
-
...
|
|
1361
|
+
S(n, 2, "カラム幅設定:", h, f), u((b) => ({
|
|
1362
|
+
...b,
|
|
1237
1363
|
columnWidths: {
|
|
1238
|
-
...
|
|
1364
|
+
...b.columnWidths,
|
|
1239
1365
|
[h]: Math.max(100, Math.min(800, f))
|
|
1240
1366
|
}
|
|
1241
1367
|
}));
|
|
@@ -1244,78 +1370,78 @@ const Qe = ({
|
|
|
1244
1370
|
), D = P(() => {
|
|
1245
1371
|
S(n, 1, "カラム幅リセット"), u((h) => {
|
|
1246
1372
|
const f = {};
|
|
1247
|
-
for (const
|
|
1248
|
-
f[
|
|
1373
|
+
for (const b of h.columns)
|
|
1374
|
+
f[b.id] = b.initialWidth || 400;
|
|
1249
1375
|
return {
|
|
1250
1376
|
...h,
|
|
1251
1377
|
columnWidths: f
|
|
1252
1378
|
};
|
|
1253
1379
|
});
|
|
1254
1380
|
}, [n]), m = P(
|
|
1255
|
-
(h, f,
|
|
1256
|
-
S(n, 1, "パネル移動:", h, "from", f, "to",
|
|
1257
|
-
const i = { ...
|
|
1258
|
-
if (f in i && (i[f] = i[f].filter((g) => g !== h)),
|
|
1259
|
-
const g = [...i[
|
|
1260
|
-
g.splice(N, 0, h), i[
|
|
1381
|
+
(h, f, b, N) => {
|
|
1382
|
+
S(n, 1, "パネル移動:", h, "from", f, "to", b, "at", N), u((y) => {
|
|
1383
|
+
const i = { ...y.columnPanels };
|
|
1384
|
+
if (f in i && (i[f] = i[f].filter((g) => g !== h)), b in i) {
|
|
1385
|
+
const g = [...i[b]];
|
|
1386
|
+
g.splice(N, 0, h), i[b] = g;
|
|
1261
1387
|
}
|
|
1262
1388
|
return {
|
|
1263
|
-
...
|
|
1389
|
+
...y,
|
|
1264
1390
|
columnPanels: i
|
|
1265
1391
|
};
|
|
1266
1392
|
});
|
|
1267
1393
|
},
|
|
1268
1394
|
[n]
|
|
1269
|
-
),
|
|
1270
|
-
(h, f,
|
|
1395
|
+
), T = P(
|
|
1396
|
+
(h, f, b) => {
|
|
1271
1397
|
S(n, 1, "パネル追加:", h, "to column:", f), u((N) => {
|
|
1272
|
-
const
|
|
1273
|
-
f in
|
|
1274
|
-
const i = [...
|
|
1275
|
-
return i.splice(g, 0, h),
|
|
1398
|
+
const y = { ...N.columnPanels };
|
|
1399
|
+
f in y || (y[f] = []);
|
|
1400
|
+
const i = [...y[f]], g = b ?? i.length;
|
|
1401
|
+
return i.splice(g, 0, h), y[f] = i, {
|
|
1276
1402
|
...N,
|
|
1277
|
-
columnPanels:
|
|
1403
|
+
columnPanels: y
|
|
1278
1404
|
};
|
|
1279
1405
|
});
|
|
1280
1406
|
},
|
|
1281
1407
|
[n]
|
|
1282
|
-
),
|
|
1408
|
+
), z = P(
|
|
1283
1409
|
(h) => {
|
|
1284
1410
|
S(n, 1, "パネル削除:", h), u((f) => {
|
|
1285
|
-
const
|
|
1286
|
-
for (const [N,
|
|
1287
|
-
|
|
1411
|
+
const b = {};
|
|
1412
|
+
for (const [N, y] of Object.entries(f.columnPanels))
|
|
1413
|
+
b[N] = y.filter((i) => i !== h);
|
|
1288
1414
|
return {
|
|
1289
1415
|
...f,
|
|
1290
|
-
columnPanels:
|
|
1416
|
+
columnPanels: b
|
|
1291
1417
|
};
|
|
1292
1418
|
});
|
|
1293
1419
|
},
|
|
1294
1420
|
[n]
|
|
1295
|
-
),
|
|
1421
|
+
), H = P(
|
|
1296
1422
|
(h) => {
|
|
1297
1423
|
S(n, 1, "カラム数更新:", h), u((f) => {
|
|
1298
|
-
const
|
|
1299
|
-
if (h ===
|
|
1300
|
-
const N =
|
|
1424
|
+
const b = f.columns.length;
|
|
1425
|
+
if (h === b) return f;
|
|
1426
|
+
const N = at(f.columnPanels, h, le), y = ze(h, le), i = f.isResizing && f.resizingColumn && !y.includes(f.resizingColumn);
|
|
1301
1427
|
i && S(n, 1, "リサイズ中のカラムが削除されるためリサイズを強制終了:", f.resizingColumn);
|
|
1302
|
-
const g =
|
|
1303
|
-
id:
|
|
1304
|
-
title: `カラム ${
|
|
1428
|
+
const g = y.map((X, U) => ({
|
|
1429
|
+
id: X,
|
|
1430
|
+
title: `カラム ${U + 1}`,
|
|
1305
1431
|
minWidth: 350,
|
|
1306
1432
|
maxWidth: 800,
|
|
1307
1433
|
initialWidth: 400,
|
|
1308
|
-
resizable: !(
|
|
1434
|
+
resizable: !(U === 1 && h === 3)
|
|
1309
1435
|
})), E = {};
|
|
1310
|
-
if (Object.entries(f.columnWidths).some(([,
|
|
1311
|
-
|
|
1312
|
-
const
|
|
1313
|
-
|
|
1436
|
+
if (Object.entries(f.columnWidths).some(([, X]) => X !== 400))
|
|
1437
|
+
y.forEach((X) => {
|
|
1438
|
+
const U = f.columnWidths[X];
|
|
1439
|
+
U && U !== 400 ? E[X] = U : E[X] = 400;
|
|
1314
1440
|
});
|
|
1315
1441
|
else {
|
|
1316
|
-
const
|
|
1317
|
-
|
|
1318
|
-
E[a] =
|
|
1442
|
+
const X = b > h ? Object.values(f.columnWidths).reduce((a, x) => a + x, 0) : h * 400, U = Math.max(X / h, 350);
|
|
1443
|
+
y.forEach((a) => {
|
|
1444
|
+
E[a] = U;
|
|
1319
1445
|
});
|
|
1320
1446
|
}
|
|
1321
1447
|
return {
|
|
@@ -1332,102 +1458,102 @@ const Qe = ({
|
|
|
1332
1458
|
), B = P(() => {
|
|
1333
1459
|
S(n, 1, "カラム自動バランス調整"), u((h) => {
|
|
1334
1460
|
const f = [];
|
|
1335
|
-
for (const
|
|
1336
|
-
for (const i of h.columnPanels[
|
|
1461
|
+
for (const y of Object.keys(h.columnPanels))
|
|
1462
|
+
for (const i of h.columnPanels[y])
|
|
1337
1463
|
f.push(i);
|
|
1338
|
-
const
|
|
1339
|
-
for (const
|
|
1340
|
-
|
|
1464
|
+
const b = {};
|
|
1465
|
+
for (const y of h.columns)
|
|
1466
|
+
b[y.id] = [];
|
|
1341
1467
|
let N = 0;
|
|
1342
|
-
for (const
|
|
1468
|
+
for (const y of f) {
|
|
1343
1469
|
const i = h.columns[N % h.columns.length].id;
|
|
1344
|
-
|
|
1470
|
+
b[i].push(y), N += 1;
|
|
1345
1471
|
}
|
|
1346
1472
|
return {
|
|
1347
1473
|
...h,
|
|
1348
|
-
columnPanels:
|
|
1474
|
+
columnPanels: b
|
|
1349
1475
|
};
|
|
1350
1476
|
});
|
|
1351
1477
|
}, [n]), k = P(
|
|
1352
|
-
(h) =>
|
|
1353
|
-
[
|
|
1354
|
-
),
|
|
1478
|
+
(h) => s.columns.find((f) => f.id === h),
|
|
1479
|
+
[s.columns]
|
|
1480
|
+
), q = P(() => {
|
|
1355
1481
|
let h = 0;
|
|
1356
|
-
for (const f of Object.values(
|
|
1482
|
+
for (const f of Object.values(s.columnWidths))
|
|
1357
1483
|
h += f;
|
|
1358
1484
|
return h;
|
|
1359
|
-
}, [
|
|
1485
|
+
}, [s.columnWidths]), L = P((h) => document.querySelector(`[data-column-id="${h}"]`), []), K = P((h) => {
|
|
1360
1486
|
u((f) => ({
|
|
1361
1487
|
...f,
|
|
1362
1488
|
showInsertPlaceholders: h
|
|
1363
1489
|
}));
|
|
1364
1490
|
}, []);
|
|
1365
1491
|
return {
|
|
1366
|
-
layoutState:
|
|
1367
|
-
addColumn:
|
|
1492
|
+
layoutState: s,
|
|
1493
|
+
addColumn: p,
|
|
1368
1494
|
removeColumn: C,
|
|
1369
1495
|
moveColumn: w,
|
|
1370
|
-
startResize:
|
|
1371
|
-
handleResize:
|
|
1372
|
-
endResize:
|
|
1373
|
-
setColumnWidth:
|
|
1496
|
+
startResize: $,
|
|
1497
|
+
handleResize: M,
|
|
1498
|
+
endResize: o,
|
|
1499
|
+
setColumnWidth: v,
|
|
1374
1500
|
resetColumnWidths: D,
|
|
1375
1501
|
movePanel: m,
|
|
1376
|
-
addPanel:
|
|
1377
|
-
removePanel:
|
|
1378
|
-
updateColumnCount:
|
|
1502
|
+
addPanel: T,
|
|
1503
|
+
removePanel: z,
|
|
1504
|
+
updateColumnCount: H,
|
|
1379
1505
|
autoBalanceColumns: B,
|
|
1380
1506
|
getColumnById: k,
|
|
1381
|
-
getTotalWidth:
|
|
1382
|
-
getColumnElement:
|
|
1383
|
-
setShowInsertPlaceholders:
|
|
1507
|
+
getTotalWidth: q,
|
|
1508
|
+
getColumnElement: L,
|
|
1509
|
+
setShowInsertPlaceholders: K
|
|
1384
1510
|
};
|
|
1385
|
-
},
|
|
1511
|
+
}, ve = {
|
|
1386
1512
|
triggerDistance: 80,
|
|
1387
1513
|
scrollSpeed: 5,
|
|
1388
1514
|
maxScrollSpeed: 20
|
|
1389
|
-
},
|
|
1390
|
-
const { triggerDistance:
|
|
1515
|
+
}, Me = (r, t, n = ve, l) => {
|
|
1516
|
+
const { triggerDistance: s, scrollSpeed: u, maxScrollSpeed: d } = n;
|
|
1391
1517
|
let c;
|
|
1392
1518
|
l ? c = l.getBoundingClientRect() : c = new DOMRect(0, 0, window.innerWidth, window.innerHeight);
|
|
1393
|
-
const { left:
|
|
1394
|
-
let
|
|
1395
|
-
if (
|
|
1396
|
-
if (
|
|
1397
|
-
const
|
|
1398
|
-
|
|
1399
|
-
} else if (
|
|
1400
|
-
const
|
|
1401
|
-
|
|
1519
|
+
const { left: p, top: C, right: w, bottom: $ } = c;
|
|
1520
|
+
let M = 0, o = 0;
|
|
1521
|
+
if (r >= p && r <= w && t >= C && t <= $) {
|
|
1522
|
+
if (r < p + s) {
|
|
1523
|
+
const v = Math.max(0, (p + s - r) / s);
|
|
1524
|
+
M = -Math.min(d, u + v * (d - u));
|
|
1525
|
+
} else if (r > w - s) {
|
|
1526
|
+
const v = Math.max(0, (r - (w - s)) / s);
|
|
1527
|
+
M = Math.min(d, u + v * (d - u));
|
|
1402
1528
|
}
|
|
1403
|
-
if (
|
|
1404
|
-
const
|
|
1405
|
-
|
|
1406
|
-
} else if (
|
|
1407
|
-
const
|
|
1408
|
-
|
|
1529
|
+
if (t < C + s) {
|
|
1530
|
+
const v = Math.max(0, (C + s - t) / s);
|
|
1531
|
+
o = -Math.min(d, u + v * (d - u));
|
|
1532
|
+
} else if (t > $ - s) {
|
|
1533
|
+
const v = Math.max(0, (t - ($ - s)) / s);
|
|
1534
|
+
o = Math.min(d, u + v * (d - u));
|
|
1409
1535
|
}
|
|
1410
1536
|
}
|
|
1411
|
-
return { x:
|
|
1412
|
-
},
|
|
1413
|
-
(
|
|
1537
|
+
return { x: M, y: o };
|
|
1538
|
+
}, it = (r, t) => {
|
|
1539
|
+
(r.x !== 0 || r.y !== 0) && (t ? t.scrollBy(r.x, r.y) : window.scrollBy(r.x, r.y));
|
|
1414
1540
|
};
|
|
1415
|
-
class
|
|
1416
|
-
constructor(
|
|
1417
|
-
this.intervalId = null, this.isActive = !1, this.config =
|
|
1541
|
+
class Ye {
|
|
1542
|
+
constructor(t = ve, n) {
|
|
1543
|
+
this.intervalId = null, this.isActive = !1, this.config = t, this.scrollElement = n;
|
|
1418
1544
|
}
|
|
1419
|
-
setScrollElement(
|
|
1420
|
-
this.scrollElement =
|
|
1545
|
+
setScrollElement(t) {
|
|
1546
|
+
this.scrollElement = t;
|
|
1421
1547
|
}
|
|
1422
|
-
start(
|
|
1548
|
+
start(t, n) {
|
|
1423
1549
|
this.isActive || (this.isActive = !0, this.intervalId = window.setInterval(() => {
|
|
1424
|
-
const l =
|
|
1425
|
-
|
|
1550
|
+
const l = Me(t, n, this.config, this.scrollElement);
|
|
1551
|
+
it(l, this.scrollElement);
|
|
1426
1552
|
}, 16));
|
|
1427
1553
|
}
|
|
1428
|
-
update(
|
|
1429
|
-
const l =
|
|
1430
|
-
(l.x !== 0 || l.y !== 0) && !this.isActive ? this.start(
|
|
1554
|
+
update(t, n) {
|
|
1555
|
+
const l = Me(t, n, this.config, this.scrollElement);
|
|
1556
|
+
(l.x !== 0 || l.y !== 0) && !this.isActive ? this.start(t, n) : l.x === 0 && l.y === 0 && this.isActive && this.stop();
|
|
1431
1557
|
}
|
|
1432
1558
|
stop() {
|
|
1433
1559
|
this.intervalId !== null && (clearInterval(this.intervalId), this.intervalId = null), this.isActive = !1;
|
|
@@ -1435,319 +1561,319 @@ class De {
|
|
|
1435
1561
|
isScrolling() {
|
|
1436
1562
|
return this.isActive;
|
|
1437
1563
|
}
|
|
1438
|
-
updateConfig(
|
|
1439
|
-
this.config =
|
|
1564
|
+
updateConfig(t) {
|
|
1565
|
+
this.config = t;
|
|
1440
1566
|
}
|
|
1441
1567
|
}
|
|
1442
|
-
const
|
|
1443
|
-
debugConfig:
|
|
1444
|
-
dragState:
|
|
1568
|
+
const ct = ({
|
|
1569
|
+
debugConfig: r,
|
|
1570
|
+
dragState: t,
|
|
1445
1571
|
customDrag: n,
|
|
1446
1572
|
clickState: l,
|
|
1447
|
-
dragModes:
|
|
1573
|
+
dragModes: s,
|
|
1448
1574
|
isMouseDown: u,
|
|
1449
1575
|
dragOverPosition: d,
|
|
1450
1576
|
setCustomDrag: c,
|
|
1451
|
-
setDragState:
|
|
1577
|
+
setDragState: p,
|
|
1452
1578
|
setDragOverPosition: C,
|
|
1453
1579
|
setOriginalPanelPosition: w,
|
|
1454
|
-
setClickState:
|
|
1455
|
-
setIsMouseDown:
|
|
1456
|
-
findPanelPosition:
|
|
1457
|
-
performPanelMove:
|
|
1580
|
+
setClickState: $,
|
|
1581
|
+
setIsMouseDown: M,
|
|
1582
|
+
findPanelPosition: o,
|
|
1583
|
+
performPanelMove: v,
|
|
1458
1584
|
showMousePosition: D,
|
|
1459
1585
|
updateMousePosition: m,
|
|
1460
|
-
recordMouseDown:
|
|
1461
|
-
recordClickPosition:
|
|
1462
|
-
isVirtualClick:
|
|
1586
|
+
recordMouseDown: T,
|
|
1587
|
+
recordClickPosition: z,
|
|
1588
|
+
isVirtualClick: H,
|
|
1463
1589
|
calculateMoveDistance: B,
|
|
1464
1590
|
clearMouseTracking: k,
|
|
1465
|
-
resetDragState:
|
|
1466
|
-
resetClickState:
|
|
1467
|
-
createDragImage:
|
|
1591
|
+
resetDragState: q,
|
|
1592
|
+
resetClickState: L,
|
|
1593
|
+
createDragImage: K,
|
|
1468
1594
|
updateDragImagePosition: h,
|
|
1469
1595
|
removeDragImage: f,
|
|
1470
|
-
handlePlaceholderDragEnter:
|
|
1596
|
+
handlePlaceholderDragEnter: b,
|
|
1471
1597
|
handlePlaceholderDragLeave: N
|
|
1472
1598
|
}) => {
|
|
1473
|
-
const
|
|
1474
|
-
|
|
1475
|
-
const i =
|
|
1476
|
-
|
|
1477
|
-
const
|
|
1478
|
-
|
|
1599
|
+
const y = Y(r);
|
|
1600
|
+
y.current = r;
|
|
1601
|
+
const i = Y(null), g = Y(null), E = Y(0), A = Y(new Ye(ve));
|
|
1602
|
+
J(() => {
|
|
1603
|
+
const x = document.querySelector("main.max-w-full.flex-1.overflow-auto");
|
|
1604
|
+
x && A.current.setScrollElement(x);
|
|
1479
1605
|
}, []);
|
|
1480
|
-
const
|
|
1481
|
-
|
|
1482
|
-
|
|
1606
|
+
const _ = Y(d);
|
|
1607
|
+
J(() => {
|
|
1608
|
+
_.current = d, S(y.current, 2, "dragOverPositionRef更新:", d);
|
|
1483
1609
|
}, [d]);
|
|
1484
|
-
const
|
|
1485
|
-
(
|
|
1610
|
+
const X = P(
|
|
1611
|
+
(x) => {
|
|
1486
1612
|
if (n.isActive || l.isClicked) {
|
|
1487
|
-
|
|
1488
|
-
const
|
|
1489
|
-
|
|
1613
|
+
x.preventDefault();
|
|
1614
|
+
const O = window.getSelection();
|
|
1615
|
+
O && O.rangeCount > 0 && O.removeAllRanges();
|
|
1490
1616
|
}
|
|
1491
1617
|
if (n.isActive) {
|
|
1492
|
-
m(
|
|
1493
|
-
const
|
|
1494
|
-
if (
|
|
1618
|
+
m(x.clientX, x.clientY), h(x.clientX, x.clientY), A.current.update(x.clientX, x.clientY);
|
|
1619
|
+
const O = document.elementFromPoint(x.clientX, x.clientY), R = O?.closest("[data-drop-zone]");
|
|
1620
|
+
if (R) {
|
|
1495
1621
|
document.body.classList.add("droppable");
|
|
1496
|
-
const
|
|
1497
|
-
|
|
1498
|
-
const
|
|
1499
|
-
if (
|
|
1500
|
-
const
|
|
1501
|
-
if (
|
|
1502
|
-
const
|
|
1503
|
-
|
|
1622
|
+
const Z = R.getAttribute("data-column-index"), Q = Z ? parseInt(Z, 10) : null;
|
|
1623
|
+
Q !== null && Q !== t.dragOverColumn && p((re) => ({ ...re, dragOverColumn: Q }));
|
|
1624
|
+
const I = O?.closest("[data-placeholder-index]");
|
|
1625
|
+
if (I) {
|
|
1626
|
+
const re = I.getAttribute("data-placeholder-index"), ce = I.getAttribute("data-placeholder-column");
|
|
1627
|
+
if (re && ce) {
|
|
1628
|
+
const j = parseInt(re, 10), V = parseInt(ce, 10);
|
|
1629
|
+
b(V, j);
|
|
1504
1630
|
}
|
|
1505
1631
|
} else
|
|
1506
1632
|
N();
|
|
1507
1633
|
} else
|
|
1508
|
-
document.body.classList.remove("droppable"), C(null),
|
|
1634
|
+
document.body.classList.remove("droppable"), C(null), p((Z) => ({ ...Z, dragOverColumn: null }));
|
|
1509
1635
|
} else if (u && l.isClicked && l.panelId) {
|
|
1510
|
-
if (
|
|
1511
|
-
S(
|
|
1512
|
-
const
|
|
1513
|
-
if (
|
|
1514
|
-
const
|
|
1515
|
-
|
|
1636
|
+
if (s[l.panelId] !== "custom" || B(x.clientX, x.clientY) < 10) return;
|
|
1637
|
+
S(y.current, 1, "🚀 カスタムドラッグ開始 -", l.panelId);
|
|
1638
|
+
const R = document.querySelector(`[data-panel-id="${l.panelId}"]`);
|
|
1639
|
+
if (R && g.current) {
|
|
1640
|
+
const Z = R.getBoundingClientRect(), Q = g.current.x - Z.left, I = g.current.y - Z.top;
|
|
1641
|
+
K(l.panelId, Q, I), document.body.classList.add("custom-dragging"), c({
|
|
1516
1642
|
isActive: !0,
|
|
1517
1643
|
panelId: l.panelId,
|
|
1518
|
-
startX:
|
|
1519
|
-
startY:
|
|
1644
|
+
startX: Q,
|
|
1645
|
+
startY: I
|
|
1520
1646
|
});
|
|
1521
1647
|
}
|
|
1522
|
-
|
|
1648
|
+
p({ isDragging: !0, draggedPanel: l.panelId, dragOverColumn: null }), w(o(l.panelId)), D(x.clientX, x.clientY), $({ isClicked: !1, panelId: null }), M(!1), k(), g.current = null, i.current && (clearTimeout(i.current), i.current = null);
|
|
1523
1649
|
}
|
|
1524
1650
|
},
|
|
1525
1651
|
[
|
|
1526
1652
|
n.isActive,
|
|
1527
1653
|
l,
|
|
1528
|
-
|
|
1529
|
-
|
|
1654
|
+
t.dragOverColumn,
|
|
1655
|
+
s,
|
|
1530
1656
|
u,
|
|
1531
1657
|
m,
|
|
1532
|
-
|
|
1658
|
+
p,
|
|
1533
1659
|
C,
|
|
1534
1660
|
B,
|
|
1535
|
-
|
|
1661
|
+
o,
|
|
1536
1662
|
c,
|
|
1537
1663
|
w,
|
|
1538
1664
|
D,
|
|
1665
|
+
$,
|
|
1539
1666
|
M,
|
|
1540
|
-
T,
|
|
1541
1667
|
k,
|
|
1542
|
-
|
|
1668
|
+
K,
|
|
1543
1669
|
h,
|
|
1544
|
-
|
|
1670
|
+
b,
|
|
1545
1671
|
N
|
|
1546
1672
|
]
|
|
1547
|
-
),
|
|
1548
|
-
(
|
|
1549
|
-
if (S(
|
|
1673
|
+
), U = P(
|
|
1674
|
+
(x) => {
|
|
1675
|
+
if (S(y.current, 1, "🐭 カスタムドラッグハンドラー - グローバルマウスアップ", {
|
|
1550
1676
|
isActive: n.isActive,
|
|
1551
1677
|
panelId: n.panelId,
|
|
1552
|
-
dragMode: n.panelId ?
|
|
1678
|
+
dragMode: n.panelId ? s[n.panelId] : "unknown"
|
|
1553
1679
|
}), n.isActive) {
|
|
1554
|
-
|
|
1555
|
-
const
|
|
1556
|
-
if (
|
|
1557
|
-
const
|
|
1558
|
-
if (
|
|
1559
|
-
const
|
|
1560
|
-
|
|
1680
|
+
A.current.stop();
|
|
1681
|
+
const O = _.current;
|
|
1682
|
+
if (O) {
|
|
1683
|
+
const Z = document.elementFromPoint(x.clientX, x.clientY)?.closest("[data-drop-zone]");
|
|
1684
|
+
if (Z) {
|
|
1685
|
+
const Q = Z.getAttribute("data-column-key");
|
|
1686
|
+
Q && s[n.panelId] === "custom" ? (S(y.current, 1, "🔄 カスタムドラッグパネル移動実行:", n.panelId, "→", Q), v(n.panelId, Q, O.insertIndex)) : S(y.current, 1, "🚫 カスタムドラッグパネル移動スキップ:", n.panelId, "モード:", s[n.panelId]);
|
|
1561
1687
|
}
|
|
1562
1688
|
}
|
|
1563
|
-
f(), document.body.classList.remove("custom-dragging", "droppable"),
|
|
1564
|
-
} else if (
|
|
1565
|
-
const
|
|
1566
|
-
if (!
|
|
1567
|
-
i.current && (clearTimeout(i.current), i.current = null),
|
|
1689
|
+
f(), document.body.classList.remove("custom-dragging", "droppable"), q(), E.current = 0;
|
|
1690
|
+
} else if (H(x.clientX, x.clientY)) {
|
|
1691
|
+
const R = document.elementFromPoint(x.clientX, x.clientY)?.closest("[data-panel-id]"), Z = R?.getAttribute("data-panel-id") ?? null;
|
|
1692
|
+
if (!(R && Z) || s[Z] !== "custom") {
|
|
1693
|
+
i.current && (clearTimeout(i.current), i.current = null), L(), g.current = null, E.current = 0;
|
|
1568
1694
|
return;
|
|
1569
1695
|
}
|
|
1570
|
-
E.current += 1, l.isClicked === !1 && E.current === 1 ? (S(
|
|
1571
|
-
S(
|
|
1572
|
-
}, 2e3)) : (S(
|
|
1573
|
-
S(
|
|
1696
|
+
E.current += 1, l.isClicked === !1 && E.current === 1 ? (S(y.current, 1, "🖱️ 仮想クリック検出 - ドラッグ待機状態へ:", Z), $({ isClicked: !0, panelId: Z }), i.current = window.setTimeout(() => {
|
|
1697
|
+
S(y.current, 1, "⏳ クリック待機状態を自動解除:", Z), L(), g.current = null, E.current = 0;
|
|
1698
|
+
}, 2e3)) : (S(y.current, 1, "🚫 クリック待機状態を解除 - 仮想クリック検出停止:", Z), i.current && (clearTimeout(i.current), i.current = null), L(), g.current = null, E.current = 0, i.current = window.setTimeout(() => {
|
|
1699
|
+
S(y.current, 1, "⏳ 仮想クリック検出再開:", Z);
|
|
1574
1700
|
}, 2e3));
|
|
1575
|
-
} else l.isClicked && (
|
|
1576
|
-
u &&
|
|
1701
|
+
} else l.isClicked && (L(), g.current = null, E.current = 0);
|
|
1702
|
+
u && M(!1);
|
|
1577
1703
|
},
|
|
1578
|
-
[n.isActive, n.panelId, l,
|
|
1704
|
+
[n.isActive, n.panelId, l, s, u, v, q, L, H, $, M, f]
|
|
1579
1705
|
), a = P(
|
|
1580
|
-
(
|
|
1581
|
-
if (
|
|
1582
|
-
S(
|
|
1706
|
+
(x, O) => {
|
|
1707
|
+
if (s[O] !== "custom") {
|
|
1708
|
+
S(y.current, 1, "🚫 カスタムドラッグモードではない - スキップ:", O);
|
|
1583
1709
|
return;
|
|
1584
1710
|
}
|
|
1585
|
-
|
|
1711
|
+
T(x.clientX, x.clientY), l.isClicked && l.panelId === O && (M(!0), i.current !== null && (clearTimeout(i.current), i.current = null), z(x.clientX, x.clientY), g.current = { x: x.clientX, y: x.clientY });
|
|
1586
1712
|
},
|
|
1587
|
-
[l,
|
|
1713
|
+
[l, s, T, M, z]
|
|
1588
1714
|
);
|
|
1589
|
-
return
|
|
1590
|
-
i.current !== null && clearTimeout(i.current),
|
|
1715
|
+
return J(() => () => {
|
|
1716
|
+
i.current !== null && clearTimeout(i.current), A.current.stop();
|
|
1591
1717
|
}, []), {
|
|
1592
|
-
handleGlobalMouseMove:
|
|
1593
|
-
handleGlobalMouseUp:
|
|
1718
|
+
handleGlobalMouseMove: X,
|
|
1719
|
+
handleGlobalMouseUp: U,
|
|
1594
1720
|
handleMouseDown: a
|
|
1595
1721
|
};
|
|
1596
|
-
},
|
|
1597
|
-
const [
|
|
1598
|
-
x: 0,
|
|
1599
|
-
y: 0,
|
|
1600
|
-
isVisible: !1
|
|
1601
|
-
}), n = H(null), l = H(0), r = H(null), u = P((s, y) => {
|
|
1602
|
-
o({ x: s, y, isVisible: !0 });
|
|
1603
|
-
}, []), d = P(() => {
|
|
1604
|
-
o((s) => ({ ...s, isVisible: !1 }));
|
|
1605
|
-
}, []), c = P((s, y) => {
|
|
1606
|
-
o((D) => D.x === s && D.y === y ? D : {
|
|
1607
|
-
x: s,
|
|
1608
|
-
y,
|
|
1609
|
-
isVisible: D.isVisible
|
|
1610
|
-
});
|
|
1611
|
-
}, []), b = P((s, y) => {
|
|
1612
|
-
l.current = Date.now(), r.current = { x: s, y };
|
|
1613
|
-
}, []), C = P((s, y) => {
|
|
1614
|
-
n.current = { x: s, y };
|
|
1615
|
-
}, []), w = P((s, y, D = 500, m = 5) => Date.now() - (l.current || 0) >= D || !r.current ? !1 : Math.sqrt((s - r.current.x) ** 2 + (y - r.current.y) ** 2) < m, []), M = P((s, y) => {
|
|
1616
|
-
if (!n.current)
|
|
1617
|
-
return 0;
|
|
1618
|
-
const D = Math.abs(s - n.current.x), m = Math.abs(y - n.current.y);
|
|
1619
|
-
return Math.sqrt(D * D + m * m);
|
|
1620
|
-
}, []), T = P(() => {
|
|
1621
|
-
n.current = null, l.current = 0, r.current = null;
|
|
1622
|
-
}, []);
|
|
1623
|
-
return {
|
|
1624
|
-
mousePosition: t,
|
|
1625
|
-
lastClickPosition: n.current,
|
|
1626
|
-
mouseDownTime: l.current,
|
|
1627
|
-
mouseDownPosition: r.current,
|
|
1628
|
-
showMousePosition: u,
|
|
1629
|
-
hideMousePosition: d,
|
|
1630
|
-
updateMousePosition: c,
|
|
1631
|
-
recordMouseDown: b,
|
|
1632
|
-
recordClickPosition: C,
|
|
1633
|
-
isVirtualClick: w,
|
|
1634
|
-
calculateMoveDistance: M,
|
|
1635
|
-
clearMouseTracking: T
|
|
1636
|
-
};
|
|
1637
|
-
}, Ie = () => {
|
|
1638
|
-
const [t, o] = ee({
|
|
1722
|
+
}, ut = () => {
|
|
1723
|
+
const [r, t] = ee({
|
|
1639
1724
|
isDragging: !1,
|
|
1640
1725
|
draggedPanel: null,
|
|
1641
1726
|
dragOverColumn: null
|
|
1642
|
-
}), [n, l] = ee(null), [
|
|
1727
|
+
}), [n, l] = ee(null), [s, u] = ee(null), [d, c] = ee({
|
|
1643
1728
|
isActive: !1,
|
|
1644
1729
|
panelId: "",
|
|
1645
1730
|
startX: 0,
|
|
1646
1731
|
startY: 0
|
|
1647
|
-
}), [
|
|
1732
|
+
}), [p, C] = ee({
|
|
1648
1733
|
isClicked: !1,
|
|
1649
1734
|
panelId: null
|
|
1650
|
-
}), [w,
|
|
1735
|
+
}), [w, $] = ee({
|
|
1651
1736
|
isTouchDragging: !1,
|
|
1652
1737
|
startX: 0,
|
|
1653
1738
|
startY: 0,
|
|
1654
1739
|
currentX: 0,
|
|
1655
1740
|
currentY: 0,
|
|
1656
1741
|
draggedElement: null
|
|
1657
|
-
}), [
|
|
1658
|
-
c({ isActive: !1, panelId: "", startX: 0, startY: 0 }),
|
|
1742
|
+
}), [M, o] = ee(!1), v = P(() => {
|
|
1743
|
+
c({ isActive: !1, panelId: "", startX: 0, startY: 0 }), t({ isDragging: !1, draggedPanel: null, dragOverColumn: null }), l(null), u(null);
|
|
1659
1744
|
}, []), D = P(() => {
|
|
1660
|
-
C({ isClicked: !1, panelId: null }),
|
|
1661
|
-
}, []), m = P((
|
|
1662
|
-
|
|
1663
|
-
}, []),
|
|
1664
|
-
l(
|
|
1665
|
-
}, []),
|
|
1666
|
-
u(
|
|
1667
|
-
}, []),
|
|
1668
|
-
c(
|
|
1669
|
-
}, []), B = P((
|
|
1670
|
-
C(
|
|
1671
|
-
}, []), k = P((
|
|
1672
|
-
|
|
1673
|
-
}, []),
|
|
1674
|
-
|
|
1745
|
+
C({ isClicked: !1, panelId: null }), o(!1);
|
|
1746
|
+
}, []), m = P((L) => {
|
|
1747
|
+
t(L);
|
|
1748
|
+
}, []), T = P((L) => {
|
|
1749
|
+
l(L);
|
|
1750
|
+
}, []), z = P((L) => {
|
|
1751
|
+
u(L);
|
|
1752
|
+
}, []), H = P((L) => {
|
|
1753
|
+
c(L);
|
|
1754
|
+
}, []), B = P((L) => {
|
|
1755
|
+
C(L);
|
|
1756
|
+
}, []), k = P((L) => {
|
|
1757
|
+
$(L);
|
|
1758
|
+
}, []), q = P((L) => {
|
|
1759
|
+
o(L);
|
|
1675
1760
|
}, []);
|
|
1676
1761
|
return {
|
|
1677
1762
|
// States / 状態
|
|
1678
|
-
dragState:
|
|
1763
|
+
dragState: r,
|
|
1679
1764
|
dragOverPosition: n,
|
|
1680
|
-
originalPanelPosition:
|
|
1765
|
+
originalPanelPosition: s,
|
|
1681
1766
|
customDrag: d,
|
|
1682
|
-
clickState:
|
|
1767
|
+
clickState: p,
|
|
1683
1768
|
touchDragState: w,
|
|
1684
|
-
isMouseDown:
|
|
1769
|
+
isMouseDown: M,
|
|
1685
1770
|
// Stabilized Setters / 安定化されたセッター
|
|
1686
1771
|
setDragState: m,
|
|
1687
|
-
setDragOverPosition:
|
|
1688
|
-
setOriginalPanelPosition:
|
|
1689
|
-
setCustomDrag:
|
|
1772
|
+
setDragOverPosition: T,
|
|
1773
|
+
setOriginalPanelPosition: z,
|
|
1774
|
+
setCustomDrag: H,
|
|
1690
1775
|
setClickState: B,
|
|
1691
1776
|
setTouchDragState: k,
|
|
1692
|
-
setIsMouseDown:
|
|
1777
|
+
setIsMouseDown: q,
|
|
1693
1778
|
// Utility Functions / ユーティリティ関数
|
|
1694
|
-
resetDragState:
|
|
1779
|
+
resetDragState: v,
|
|
1695
1780
|
resetClickState: D
|
|
1696
1781
|
};
|
|
1697
|
-
},
|
|
1698
|
-
|
|
1699
|
-
|
|
1782
|
+
}, dt = () => {
|
|
1783
|
+
const [r, t] = ee({
|
|
1784
|
+
x: 0,
|
|
1785
|
+
y: 0,
|
|
1786
|
+
isVisible: !1
|
|
1787
|
+
}), n = Y(null), l = Y(0), s = Y(null), u = P((o, v) => {
|
|
1788
|
+
t({ x: o, y: v, isVisible: !0 });
|
|
1789
|
+
}, []), d = P(() => {
|
|
1790
|
+
t((o) => ({ ...o, isVisible: !1 }));
|
|
1791
|
+
}, []), c = P((o, v) => {
|
|
1792
|
+
t((D) => D.x === o && D.y === v ? D : {
|
|
1793
|
+
x: o,
|
|
1794
|
+
y: v,
|
|
1795
|
+
isVisible: D.isVisible
|
|
1796
|
+
});
|
|
1797
|
+
}, []), p = P((o, v) => {
|
|
1798
|
+
l.current = Date.now(), s.current = { x: o, y: v };
|
|
1799
|
+
}, []), C = P((o, v) => {
|
|
1800
|
+
n.current = { x: o, y: v };
|
|
1801
|
+
}, []), w = P((o, v, D = 500, m = 5) => Date.now() - (l.current || 0) >= D || !s.current ? !1 : Math.sqrt((o - s.current.x) ** 2 + (v - s.current.y) ** 2) < m, []), $ = P((o, v) => {
|
|
1802
|
+
if (!n.current)
|
|
1803
|
+
return 0;
|
|
1804
|
+
const D = Math.abs(o - n.current.x), m = Math.abs(v - n.current.y);
|
|
1805
|
+
return Math.sqrt(D * D + m * m);
|
|
1806
|
+
}, []), M = P(() => {
|
|
1807
|
+
n.current = null, l.current = 0, s.current = null;
|
|
1808
|
+
}, []);
|
|
1809
|
+
return {
|
|
1810
|
+
mousePosition: r,
|
|
1811
|
+
lastClickPosition: n.current,
|
|
1812
|
+
mouseDownTime: l.current,
|
|
1813
|
+
mouseDownPosition: s.current,
|
|
1814
|
+
showMousePosition: u,
|
|
1815
|
+
hideMousePosition: d,
|
|
1816
|
+
updateMousePosition: c,
|
|
1817
|
+
recordMouseDown: p,
|
|
1818
|
+
recordClickPosition: C,
|
|
1819
|
+
isVirtualClick: w,
|
|
1820
|
+
calculateMoveDistance: $,
|
|
1821
|
+
clearMouseTracking: M
|
|
1822
|
+
};
|
|
1823
|
+
}, mt = ({
|
|
1824
|
+
debugConfig: r,
|
|
1825
|
+
dragState: t,
|
|
1700
1826
|
customDrag: n,
|
|
1701
1827
|
dragModes: l,
|
|
1702
|
-
columnPanels:
|
|
1828
|
+
columnPanels: s,
|
|
1703
1829
|
dragOverPosition: u,
|
|
1704
1830
|
originalPanelPosition: d,
|
|
1705
1831
|
setDragState: c,
|
|
1706
|
-
setDragOverPosition:
|
|
1832
|
+
setDragOverPosition: p,
|
|
1707
1833
|
setOriginalPanelPosition: C,
|
|
1708
1834
|
performPanelMove: w,
|
|
1709
|
-
showMousePosition:
|
|
1710
|
-
updateMousePosition:
|
|
1711
|
-
resetDragState:
|
|
1712
|
-
handlePlaceholderDragEnter:
|
|
1835
|
+
showMousePosition: $,
|
|
1836
|
+
updateMousePosition: M,
|
|
1837
|
+
resetDragState: o,
|
|
1838
|
+
handlePlaceholderDragEnter: v,
|
|
1713
1839
|
handlePlaceholderDragLeave: D
|
|
1714
1840
|
}) => {
|
|
1715
|
-
const m =
|
|
1716
|
-
m.current =
|
|
1717
|
-
const
|
|
1718
|
-
|
|
1719
|
-
const
|
|
1720
|
-
|
|
1721
|
-
const
|
|
1722
|
-
|
|
1723
|
-
const B =
|
|
1841
|
+
const m = Y(r);
|
|
1842
|
+
m.current = r;
|
|
1843
|
+
const T = Y(s);
|
|
1844
|
+
T.current = s;
|
|
1845
|
+
const z = Y(t);
|
|
1846
|
+
z.current = t;
|
|
1847
|
+
const H = Y(u);
|
|
1848
|
+
H.current = u;
|
|
1849
|
+
const B = Y(d);
|
|
1724
1850
|
B.current = d;
|
|
1725
|
-
const k =
|
|
1726
|
-
|
|
1727
|
-
const
|
|
1728
|
-
|
|
1851
|
+
const k = Y(new Ye(ve));
|
|
1852
|
+
J(() => {
|
|
1853
|
+
const b = document.querySelector("main.max-w-full.flex-1.overflow-auto");
|
|
1854
|
+
b && k.current.setScrollElement(b);
|
|
1729
1855
|
}, []);
|
|
1730
|
-
const
|
|
1731
|
-
(
|
|
1856
|
+
const q = P(
|
|
1857
|
+
(b, N) => {
|
|
1732
1858
|
if (n.isActive) {
|
|
1733
|
-
S(m.current, 2, "カスタムドラッグアクティブ中 - 通常ドラッグを無効化:", N),
|
|
1859
|
+
S(m.current, 2, "カスタムドラッグアクティブ中 - 通常ドラッグを無効化:", N), b.preventDefault();
|
|
1734
1860
|
return;
|
|
1735
1861
|
}
|
|
1736
1862
|
if (l[N] === "custom") {
|
|
1737
|
-
S(m.current, 2, "カスタムドラッグモード - 通常ドラッグを無効化:", N),
|
|
1863
|
+
S(m.current, 2, "カスタムドラッグモード - 通常ドラッグを無効化:", N), b.preventDefault();
|
|
1738
1864
|
return;
|
|
1739
1865
|
}
|
|
1740
1866
|
S(m.current, 1, "ドラッグ開始:", N);
|
|
1741
|
-
const
|
|
1867
|
+
const y = Object.keys(T.current);
|
|
1742
1868
|
let i = null;
|
|
1743
|
-
for (let g = 0; g <
|
|
1744
|
-
const E =
|
|
1745
|
-
if (
|
|
1746
|
-
i = { columnIndex: g, panelIndex:
|
|
1869
|
+
for (let g = 0; g < y.length; g++) {
|
|
1870
|
+
const E = y[g], A = T.current[E].indexOf(N);
|
|
1871
|
+
if (A !== -1) {
|
|
1872
|
+
i = { columnIndex: g, panelIndex: A };
|
|
1747
1873
|
break;
|
|
1748
1874
|
}
|
|
1749
1875
|
}
|
|
1750
|
-
C(i),
|
|
1876
|
+
C(i), b.dataTransfer && (b.dataTransfer.setData("text/plain", N), b.dataTransfer.effectAllowed = "move"), $(b.clientX, b.clientY), requestAnimationFrame(() => {
|
|
1751
1877
|
c({
|
|
1752
1878
|
isDragging: !0,
|
|
1753
1879
|
draggedPanel: N,
|
|
@@ -1755,72 +1881,72 @@ const qe = ({
|
|
|
1755
1881
|
});
|
|
1756
1882
|
});
|
|
1757
1883
|
},
|
|
1758
|
-
[l, n.isActive, C,
|
|
1759
|
-
),
|
|
1760
|
-
S(m.current, 1, "ドラッグ終了"), k.current.stop(),
|
|
1761
|
-
}, [
|
|
1762
|
-
(
|
|
1763
|
-
if (
|
|
1764
|
-
|
|
1765
|
-
const
|
|
1884
|
+
[l, n.isActive, C, $, c]
|
|
1885
|
+
), L = P(() => {
|
|
1886
|
+
S(m.current, 1, "ドラッグ終了"), k.current.stop(), o();
|
|
1887
|
+
}, [o]), K = P(
|
|
1888
|
+
(b, N) => {
|
|
1889
|
+
if (b.preventDefault(), b.dataTransfer.dropEffect = "move", !z.current.isDragging) return;
|
|
1890
|
+
M(b.clientX, b.clientY), N !== z.current.dragOverColumn && c((g) => ({ ...g, dragOverColumn: N }));
|
|
1891
|
+
const y = document.elementFromPoint(b.clientX, b.clientY), i = y?.closest("[data-placeholder-index]");
|
|
1766
1892
|
if (i) {
|
|
1767
1893
|
const g = i.getAttribute("data-placeholder-index"), E = i.getAttribute("data-placeholder-column");
|
|
1768
1894
|
if (g && E) {
|
|
1769
|
-
const
|
|
1770
|
-
|
|
1895
|
+
const A = parseInt(g, 10), _ = parseInt(E, 10);
|
|
1896
|
+
v(_, A);
|
|
1771
1897
|
}
|
|
1772
1898
|
} else
|
|
1773
|
-
|
|
1899
|
+
y?.closest("[data-drop-zone]") || D();
|
|
1774
1900
|
},
|
|
1775
|
-
[
|
|
1901
|
+
[M, c, v, D]
|
|
1776
1902
|
), h = P(
|
|
1777
|
-
(
|
|
1778
|
-
|
|
1779
|
-
const
|
|
1780
|
-
|
|
1781
|
-
draggedPanel:
|
|
1903
|
+
(b, N) => {
|
|
1904
|
+
b.preventDefault();
|
|
1905
|
+
const y = b.dataTransfer.getData("text/plain"), i = H.current;
|
|
1906
|
+
y && i && (S(m.current, 1, "🎯 ドロップ完了:", {
|
|
1907
|
+
draggedPanel: y,
|
|
1782
1908
|
targetColumn: N,
|
|
1783
1909
|
insertPosition: `カラム${i.columnIndex} - 位置${i.insertIndex}`
|
|
1784
|
-
}), w(
|
|
1910
|
+
}), w(y, N, i.insertIndex), p(null), L());
|
|
1785
1911
|
},
|
|
1786
|
-
[w,
|
|
1912
|
+
[w, p, L]
|
|
1787
1913
|
), f = P(
|
|
1788
|
-
(
|
|
1789
|
-
const N =
|
|
1790
|
-
|
|
1914
|
+
(b) => {
|
|
1915
|
+
const N = b.currentTarget, y = b.relatedTarget;
|
|
1916
|
+
y && N.contains(y) || (p(null), c((i) => ({ ...i, dragOverColumn: null })));
|
|
1791
1917
|
},
|
|
1792
|
-
[
|
|
1918
|
+
[p, c]
|
|
1793
1919
|
);
|
|
1794
|
-
return
|
|
1795
|
-
const
|
|
1796
|
-
|
|
1920
|
+
return J(() => {
|
|
1921
|
+
const b = (N) => {
|
|
1922
|
+
z.current.isDragging && (M(N.clientX, N.clientY), k.current.update(N.clientX, N.clientY));
|
|
1797
1923
|
};
|
|
1798
|
-
if (
|
|
1799
|
-
return document.addEventListener("dragover",
|
|
1800
|
-
document.removeEventListener("dragover",
|
|
1924
|
+
if (t.isDragging)
|
|
1925
|
+
return document.addEventListener("dragover", b), () => {
|
|
1926
|
+
document.removeEventListener("dragover", b), k.current.stop();
|
|
1801
1927
|
};
|
|
1802
|
-
}, [
|
|
1928
|
+
}, [t.isDragging, M]), J(() => () => {
|
|
1803
1929
|
k.current.stop();
|
|
1804
1930
|
}, []), {
|
|
1805
|
-
handleDragStart:
|
|
1806
|
-
handleDragEnd:
|
|
1807
|
-
handleDragOverWithInsert:
|
|
1931
|
+
handleDragStart: q,
|
|
1932
|
+
handleDragEnd: L,
|
|
1933
|
+
handleDragOverWithInsert: K,
|
|
1808
1934
|
handleDropWithInsert: h,
|
|
1809
1935
|
handleColumnDragLeave: f
|
|
1810
1936
|
};
|
|
1811
|
-
},
|
|
1812
|
-
const [
|
|
1813
|
-
(m,
|
|
1814
|
-
const
|
|
1815
|
-
width: Math.round(
|
|
1816
|
-
height: Math.round(
|
|
1817
|
-
x: Math.round(
|
|
1818
|
-
y: Math.round(
|
|
1819
|
-
minHeight:
|
|
1820
|
-
maxHeight:
|
|
1937
|
+
}, ht = (r) => {
|
|
1938
|
+
const [t, n] = ee(r), [l, s] = ee({}), u = Y({}), d = Y(null), c = Y({ x: 0, y: 0 }), p = P((m) => document.querySelector(`[data-panel-id="${m}"]`), []), C = P(
|
|
1939
|
+
(m, T) => {
|
|
1940
|
+
const z = T.getBoundingClientRect(), H = window.getComputedStyle(T), B = {
|
|
1941
|
+
width: Math.round(z.width),
|
|
1942
|
+
height: Math.round(z.height),
|
|
1943
|
+
x: Math.round(z.left),
|
|
1944
|
+
y: Math.round(z.top),
|
|
1945
|
+
minHeight: H.minHeight || "auto",
|
|
1946
|
+
maxHeight: H.maxHeight || "none"
|
|
1821
1947
|
}, k = u.current[m];
|
|
1822
|
-
(!k || Object.keys(B).some((
|
|
1823
|
-
...
|
|
1948
|
+
(!k || Object.keys(B).some((q) => k[q] !== B[q])) && (u.current[m] = B, s((q) => ({
|
|
1949
|
+
...q,
|
|
1824
1950
|
[m]: B
|
|
1825
1951
|
})));
|
|
1826
1952
|
},
|
|
@@ -1828,319 +1954,345 @@ const qe = ({
|
|
|
1828
1954
|
// setPanelSizes は React の state セッターなので依存配列に含める必要はありません
|
|
1829
1955
|
), w = P(
|
|
1830
1956
|
(m) => {
|
|
1831
|
-
const
|
|
1832
|
-
|
|
1957
|
+
const T = p(m);
|
|
1958
|
+
T && C(m, T);
|
|
1833
1959
|
},
|
|
1834
|
-
[
|
|
1835
|
-
),
|
|
1836
|
-
(m,
|
|
1837
|
-
|
|
1960
|
+
[p, C]
|
|
1961
|
+
), $ = P(
|
|
1962
|
+
(m, T) => {
|
|
1963
|
+
T && requestAnimationFrame(() => C(m, T));
|
|
1838
1964
|
},
|
|
1839
1965
|
[C]
|
|
1840
|
-
),
|
|
1841
|
-
(m,
|
|
1842
|
-
const
|
|
1843
|
-
if (!
|
|
1844
|
-
const B =
|
|
1845
|
-
k.style.position = "fixed", k.style.top = "0px", k.style.left = "0px", k.style.width = `${B.width}px`, k.style.height = `${B.height}px`, k.style.pointerEvents = "none", k.style.zIndex = "1000", k.style.opacity = "0.5", k.style.margin = "0", k.style.transition = "none", k.style.boxShadow = "0 8px 32px rgba(0,0,0,0.3)", k.style.transform = `translate(${B.left}px, ${B.top}px)`, k.id = `drag-image-${m}`, document.body.appendChild(k), d.current = k, c.current = { x:
|
|
1966
|
+
), M = P(
|
|
1967
|
+
(m, T, z) => {
|
|
1968
|
+
const H = p(m);
|
|
1969
|
+
if (!H || d.current) return;
|
|
1970
|
+
const B = H.getBoundingClientRect(), k = H.cloneNode(!0);
|
|
1971
|
+
k.style.position = "fixed", k.style.top = "0px", k.style.left = "0px", k.style.width = `${B.width}px`, k.style.height = `${B.height}px`, k.style.pointerEvents = "none", k.style.zIndex = "1000", k.style.opacity = "0.5", k.style.margin = "0", k.style.transition = "none", k.style.boxShadow = "0 8px 32px rgba(0,0,0,0.3)", k.style.transform = `translate(${B.left}px, ${B.top}px)`, k.id = `drag-image-${m}`, document.body.appendChild(k), d.current = k, c.current = { x: T, y: z };
|
|
1846
1972
|
},
|
|
1847
|
-
[
|
|
1848
|
-
),
|
|
1973
|
+
[p]
|
|
1974
|
+
), o = P((m, T) => {
|
|
1849
1975
|
if (d.current) {
|
|
1850
|
-
const
|
|
1851
|
-
d.current.style.transform = `translate(${
|
|
1976
|
+
const z = m - c.current.x, H = T - c.current.y;
|
|
1977
|
+
d.current.style.transform = `translate(${z}px, ${H}px) scale(1.05)`;
|
|
1852
1978
|
}
|
|
1853
|
-
}, []),
|
|
1979
|
+
}, []), v = P(() => {
|
|
1854
1980
|
d.current && (d.current.remove(), d.current = null);
|
|
1855
1981
|
}, []), D = P((m) => {
|
|
1856
|
-
n((
|
|
1857
|
-
...
|
|
1858
|
-
[m]: !
|
|
1982
|
+
n((T) => ({
|
|
1983
|
+
...T,
|
|
1984
|
+
[m]: !T[m]
|
|
1859
1985
|
}));
|
|
1860
1986
|
}, []);
|
|
1861
1987
|
return {
|
|
1862
1988
|
// State / 状態
|
|
1863
|
-
panelVisibility:
|
|
1989
|
+
panelVisibility: t,
|
|
1864
1990
|
panelSizes: l,
|
|
1865
1991
|
// State update functions / 状態更新関数
|
|
1866
1992
|
setPanelVisibility: n,
|
|
1867
|
-
setPanelSizes:
|
|
1868
|
-
setPanelRef:
|
|
1993
|
+
setPanelSizes: s,
|
|
1994
|
+
setPanelRef: $,
|
|
1869
1995
|
updatePanelSize: w,
|
|
1870
1996
|
togglePanelVisibility: D,
|
|
1871
1997
|
// Utility functions / ユーティリティ関数
|
|
1872
|
-
getPanelElement:
|
|
1998
|
+
getPanelElement: p,
|
|
1873
1999
|
// Functions for drag image management / ドラッグイメージ管理用の関数
|
|
1874
|
-
createDragImage:
|
|
1875
|
-
updateDragImagePosition:
|
|
1876
|
-
removeDragImage:
|
|
2000
|
+
createDragImage: M,
|
|
2001
|
+
updateDragImagePosition: o,
|
|
2002
|
+
removeDragImage: v
|
|
1877
2003
|
};
|
|
1878
|
-
},
|
|
1879
|
-
const
|
|
1880
|
-
G(() => {
|
|
1881
|
-
if (typeof window > "u")
|
|
1882
|
-
return;
|
|
1883
|
-
const y = () => {
|
|
1884
|
-
const m = window.visualViewport?.width ?? 0, O = document?.documentElement?.clientWidth ?? 0, F = document?.body?.clientWidth ?? 0, U = window.innerWidth ?? 0;
|
|
1885
|
-
return O > 0 ? Math.floor(O) : m > 0 ? Math.floor(m) : F > 0 ? Math.floor(F) : Math.floor(U);
|
|
1886
|
-
}, D = () => {
|
|
1887
|
-
b.current !== null && cancelAnimationFrame(b.current), b.current = requestAnimationFrame(() => {
|
|
1888
|
-
const m = y();
|
|
1889
|
-
b.current = null, m !== 0 && (Math.abs(c.current - m) < 2 || (c.current = m, d(m)));
|
|
1890
|
-
});
|
|
1891
|
-
};
|
|
1892
|
-
return D(), window.addEventListener("resize", D), window.addEventListener("orientationchange", D), window.visualViewport?.addEventListener("resize", D), () => {
|
|
1893
|
-
b.current !== null && cancelAnimationFrame(b.current), window.removeEventListener("resize", D), window.removeEventListener("orientationchange", D), window.visualViewport?.removeEventListener("resize", D);
|
|
1894
|
-
};
|
|
1895
|
-
}, []);
|
|
1896
|
-
const T = ve(() => {
|
|
1897
|
-
if (!C || u === 0)
|
|
1898
|
-
return M.current = o, o;
|
|
1899
|
-
const y = Math.max(u - 64, 0), D = 24, m = Object.values(r);
|
|
1900
|
-
let O;
|
|
1901
|
-
if (m.length > 0) {
|
|
1902
|
-
const F = m.reduce((k, I) => k + I, 0) / m.length, U = Math.max(t, F);
|
|
1903
|
-
O = Math.floor((y + D) / (U + D)), m.reduce((k, I) => k + I, 0) + (m.length - 1) * D > y && m.length > l && (O = Math.min(O, m.length - 1));
|
|
1904
|
-
} else
|
|
1905
|
-
O = Math.floor((y + D) / (t + D));
|
|
1906
|
-
return O = Math.max(l, Math.min(n, O)), M.current === O ? M.current : (M.current = O, O);
|
|
1907
|
-
}, [C, u, o, t, n, l, r]), s = P(() => {
|
|
1908
|
-
w((y) => !y);
|
|
1909
|
-
}, []);
|
|
1910
|
-
return {
|
|
1911
|
-
responsiveColumnCount: T,
|
|
1912
|
-
isResponsiveMode: C,
|
|
1913
|
-
screenWidth: u,
|
|
1914
|
-
toggleResponsiveMode: s
|
|
1915
|
-
};
|
|
1916
|
-
}, it = ({ initialColumnPanels: t, initialPanelVisibility: o, initialDragModes: n = {}, debugConfig: l, onPanelMove: r, onDragModeChange: u, onColumnPanelsChange: d }) => {
|
|
1917
|
-
const c = H(l);
|
|
2004
|
+
}, Nt = ({ initialColumnPanels: r, initialPanelVisibility: t, initialDragModes: n = {}, debugConfig: l, onPanelMove: s, onDragModeChange: u, onColumnPanelsChange: d }) => {
|
|
2005
|
+
const c = Y(l);
|
|
1918
2006
|
c.current = l;
|
|
1919
|
-
const [
|
|
1920
|
-
|
|
1921
|
-
const
|
|
2007
|
+
const [p, C] = ee(r), [w, $] = ee(n), M = Y(p);
|
|
2008
|
+
M.current = p;
|
|
2009
|
+
const o = ut(), v = dt(), D = ht(t), m = Y({
|
|
1922
2010
|
mousemove: null,
|
|
1923
2011
|
mouseup: null
|
|
1924
|
-
}),
|
|
1925
|
-
const g = Object.keys(
|
|
1926
|
-
for (let
|
|
1927
|
-
const
|
|
1928
|
-
if (
|
|
1929
|
-
return { columnIndex:
|
|
2012
|
+
}), T = P((i) => {
|
|
2013
|
+
const g = Object.keys(M.current), E = lt(g, le);
|
|
2014
|
+
for (let A = 0; A < E.length; A++) {
|
|
2015
|
+
const _ = E[A], X = M.current[_]?.indexOf(i) ?? -1;
|
|
2016
|
+
if (X !== -1)
|
|
2017
|
+
return { columnIndex: A, panelIndex: X };
|
|
1930
2018
|
}
|
|
1931
2019
|
return null;
|
|
1932
|
-
}, []),
|
|
2020
|
+
}, []), z = P(
|
|
1933
2021
|
(i, g, E) => {
|
|
1934
|
-
S(c.current, 1, "🔄 パネル移動実行:", i, "→", g, "@", E), C((
|
|
1935
|
-
const
|
|
1936
|
-
if (!
|
|
1937
|
-
return console.error("Source column not found for panel:", i),
|
|
1938
|
-
if (!
|
|
1939
|
-
return console.error("Target column not found:", g),
|
|
1940
|
-
if (
|
|
1941
|
-
const
|
|
1942
|
-
|
|
2022
|
+
S(c.current, 1, "🔄 パネル移動実行:", i, "→", g, "@", E), C((A) => {
|
|
2023
|
+
const _ = { ...A }, X = Object.keys(_).find((U) => _[U].includes(i));
|
|
2024
|
+
if (!X)
|
|
2025
|
+
return console.error("Source column not found for panel:", i), A;
|
|
2026
|
+
if (!_[g])
|
|
2027
|
+
return console.error("Target column not found:", g), A;
|
|
2028
|
+
if (X === g) {
|
|
2029
|
+
const U = [..._[X]], a = U.indexOf(i), [x] = U.splice(a, 1), O = a < E ? E - 1 : E;
|
|
2030
|
+
U.splice(O, 0, x), _[g] = U;
|
|
1943
2031
|
} else {
|
|
1944
|
-
|
|
1945
|
-
const
|
|
1946
|
-
|
|
2032
|
+
_[X] = _[X].filter((a) => a !== i);
|
|
2033
|
+
const U = [..._[g]];
|
|
2034
|
+
U.splice(E, 0, i), _[g] = U;
|
|
1947
2035
|
}
|
|
1948
2036
|
if (S(c.current, 1, "✅ パネル移動完了:", i, "→", g), d && requestAnimationFrame(() => {
|
|
1949
|
-
d(
|
|
1950
|
-
}),
|
|
1951
|
-
const
|
|
1952
|
-
|
|
1953
|
-
|
|
2037
|
+
d(_);
|
|
2038
|
+
}), s) {
|
|
2039
|
+
const U = Object.keys(A).find((a) => A[a].includes(i));
|
|
2040
|
+
U && requestAnimationFrame(() => {
|
|
2041
|
+
s(i, U, g, E);
|
|
1954
2042
|
});
|
|
1955
2043
|
}
|
|
1956
|
-
return
|
|
2044
|
+
return _;
|
|
1957
2045
|
});
|
|
1958
2046
|
},
|
|
1959
|
-
[d,
|
|
1960
|
-
),
|
|
2047
|
+
[d, s]
|
|
2048
|
+
), H = P(
|
|
1961
2049
|
(i, g) => {
|
|
1962
|
-
if (!
|
|
1963
|
-
const E =
|
|
2050
|
+
if (!(o.dragState.isDragging || o.customDrag.isActive)) return;
|
|
2051
|
+
const E = o.originalPanelPosition;
|
|
1964
2052
|
if (E && E.columnIndex === i && (E.panelIndex === g || E.panelIndex + 1 === g)) {
|
|
1965
2053
|
S(c.current, 1, `元の位置への挿入をスキップ: カラム${i}, 位置${g}`);
|
|
1966
2054
|
return;
|
|
1967
2055
|
}
|
|
1968
|
-
const
|
|
1969
|
-
(
|
|
2056
|
+
const A = o.dragOverPosition;
|
|
2057
|
+
(!A || A.columnIndex !== i || A.insertIndex !== g) && (S(c.current, 1, `プレースホルダーエンター: カラム${i}, 位置${g}`), o.setDragOverPosition({ columnIndex: i, insertIndex: g }), o.setDragState((_) => ({ ..._, dragOverColumn: i })));
|
|
1970
2058
|
},
|
|
1971
|
-
[
|
|
2059
|
+
[o]
|
|
1972
2060
|
), B = P(
|
|
1973
2061
|
(i, g, E) => {
|
|
1974
|
-
if (
|
|
1975
|
-
if (
|
|
1976
|
-
S(c.current, 1, "🚫 カスタムドラッグ - プレースホルダーリーブ: ハイライトを解除します。"),
|
|
1977
|
-
else if (
|
|
1978
|
-
const
|
|
1979
|
-
if (
|
|
1980
|
-
const
|
|
1981
|
-
|
|
2062
|
+
if (o.dragState.isDragging || o.customDrag.isActive) {
|
|
2063
|
+
if (o.customDrag.isActive)
|
|
2064
|
+
S(c.current, 1, "🚫 カスタムドラッグ - プレースホルダーリーブ: ハイライトを解除します。"), o.setDragOverPosition(null);
|
|
2065
|
+
else if (o.dragState.isDragging && i && g !== void 0 && E !== void 0) {
|
|
2066
|
+
const A = o.dragOverPosition;
|
|
2067
|
+
if (A && A.columnIndex === g && A.insertIndex === E) {
|
|
2068
|
+
const _ = i.currentTarget, X = i.relatedTarget;
|
|
2069
|
+
X && _.contains(X) || (S(c.current, 1, `ノーマルドラッグ - プレースホルダーリーブ: カラム${g}, 位置${E}。ハイライトを解除します。`), o.setDragOverPosition(null));
|
|
1982
2070
|
}
|
|
1983
2071
|
}
|
|
1984
2072
|
}
|
|
1985
2073
|
},
|
|
1986
|
-
[
|
|
1987
|
-
), k =
|
|
2074
|
+
[o]
|
|
2075
|
+
), k = ct({
|
|
1988
2076
|
debugConfig: c.current,
|
|
1989
|
-
dragState:
|
|
1990
|
-
customDrag:
|
|
1991
|
-
clickState:
|
|
2077
|
+
dragState: o.dragState,
|
|
2078
|
+
customDrag: o.customDrag,
|
|
2079
|
+
clickState: o.clickState,
|
|
1992
2080
|
dragModes: w,
|
|
1993
|
-
isMouseDown:
|
|
1994
|
-
originalPanelPosition:
|
|
1995
|
-
dragOverPosition:
|
|
1996
|
-
setCustomDrag:
|
|
1997
|
-
setDragState:
|
|
1998
|
-
setDragOverPosition:
|
|
1999
|
-
setOriginalPanelPosition:
|
|
2000
|
-
setClickState:
|
|
2001
|
-
setIsMouseDown:
|
|
2002
|
-
findPanelPosition:
|
|
2003
|
-
performPanelMove:
|
|
2004
|
-
showMousePosition:
|
|
2005
|
-
updateMousePosition:
|
|
2006
|
-
recordMouseDown:
|
|
2007
|
-
recordClickPosition:
|
|
2008
|
-
isVirtualClick:
|
|
2009
|
-
calculateMoveDistance:
|
|
2010
|
-
clearMouseTracking:
|
|
2011
|
-
resetDragState:
|
|
2012
|
-
resetClickState:
|
|
2081
|
+
isMouseDown: o.isMouseDown,
|
|
2082
|
+
originalPanelPosition: o.originalPanelPosition,
|
|
2083
|
+
dragOverPosition: o.dragOverPosition,
|
|
2084
|
+
setCustomDrag: o.setCustomDrag,
|
|
2085
|
+
setDragState: o.setDragState,
|
|
2086
|
+
setDragOverPosition: o.setDragOverPosition,
|
|
2087
|
+
setOriginalPanelPosition: o.setOriginalPanelPosition,
|
|
2088
|
+
setClickState: o.setClickState,
|
|
2089
|
+
setIsMouseDown: o.setIsMouseDown,
|
|
2090
|
+
findPanelPosition: T,
|
|
2091
|
+
performPanelMove: z,
|
|
2092
|
+
showMousePosition: v.showMousePosition,
|
|
2093
|
+
updateMousePosition: v.updateMousePosition,
|
|
2094
|
+
recordMouseDown: v.recordMouseDown,
|
|
2095
|
+
recordClickPosition: v.recordClickPosition,
|
|
2096
|
+
isVirtualClick: v.isVirtualClick,
|
|
2097
|
+
calculateMoveDistance: v.calculateMoveDistance,
|
|
2098
|
+
clearMouseTracking: v.clearMouseTracking,
|
|
2099
|
+
resetDragState: o.resetDragState,
|
|
2100
|
+
resetClickState: o.resetClickState,
|
|
2013
2101
|
createDragImage: D.createDragImage,
|
|
2014
2102
|
updateDragImagePosition: D.updateDragImagePosition,
|
|
2015
2103
|
removeDragImage: D.removeDragImage,
|
|
2016
|
-
handlePlaceholderDragEnter:
|
|
2104
|
+
handlePlaceholderDragEnter: H,
|
|
2017
2105
|
handlePlaceholderDragLeave: B
|
|
2018
|
-
}),
|
|
2106
|
+
}), q = mt({
|
|
2019
2107
|
debugConfig: c.current,
|
|
2020
|
-
dragState:
|
|
2021
|
-
customDrag:
|
|
2108
|
+
dragState: o.dragState,
|
|
2109
|
+
customDrag: o.customDrag,
|
|
2022
2110
|
dragModes: w,
|
|
2023
|
-
columnPanels:
|
|
2024
|
-
dragOverPosition:
|
|
2025
|
-
originalPanelPosition:
|
|
2026
|
-
setDragState:
|
|
2027
|
-
setDragOverPosition:
|
|
2028
|
-
setOriginalPanelPosition:
|
|
2029
|
-
performPanelMove:
|
|
2030
|
-
showMousePosition:
|
|
2031
|
-
updateMousePosition:
|
|
2032
|
-
resetDragState:
|
|
2033
|
-
handlePlaceholderDragEnter:
|
|
2111
|
+
columnPanels: p,
|
|
2112
|
+
dragOverPosition: o.dragOverPosition,
|
|
2113
|
+
originalPanelPosition: o.originalPanelPosition,
|
|
2114
|
+
setDragState: o.setDragState,
|
|
2115
|
+
setDragOverPosition: o.setDragOverPosition,
|
|
2116
|
+
setOriginalPanelPosition: o.setOriginalPanelPosition,
|
|
2117
|
+
performPanelMove: z,
|
|
2118
|
+
showMousePosition: v.showMousePosition,
|
|
2119
|
+
updateMousePosition: v.updateMousePosition,
|
|
2120
|
+
resetDragState: o.resetDragState,
|
|
2121
|
+
handlePlaceholderDragEnter: H,
|
|
2034
2122
|
handlePlaceholderDragLeave: B
|
|
2035
|
-
}),
|
|
2123
|
+
}), L = P((i) => {
|
|
2036
2124
|
m.current.mousemove && m.current.mousemove(i);
|
|
2037
|
-
}, []),
|
|
2125
|
+
}, []), K = P((i) => {
|
|
2038
2126
|
m.current.mouseup && m.current.mouseup(i);
|
|
2039
2127
|
}, []);
|
|
2040
|
-
|
|
2041
|
-
S(c.current, 1, "🔴 グローバルイベントリスナー終了 - refベース管理終了"), document.removeEventListener("mousemove",
|
|
2042
|
-
}), [
|
|
2043
|
-
const i = !
|
|
2128
|
+
J(() => (S(c.current, 1, "🔧 グローバルイベントリスナー初期化 - refベース管理開始"), document.addEventListener("mousemove", L), document.addEventListener("mouseup", K), () => {
|
|
2129
|
+
S(c.current, 1, "🔴 グローバルイベントリスナー終了 - refベース管理終了"), document.removeEventListener("mousemove", L), document.removeEventListener("mouseup", K);
|
|
2130
|
+
}), [L, K]), J(() => {
|
|
2131
|
+
const i = !o.clickState.isClicked && Object.entries(w).some(([, E]) => E === "custom"), g = o.clickState.isClicked && o.clickState.panelId;
|
|
2044
2132
|
if (i || g) {
|
|
2045
2133
|
const E = i ? "パターン1(仮想クリック検出)" : "パターン2,3(ドラッグ準備)";
|
|
2046
2134
|
S(c.current, 1, `🔧 イベントハンドラー設定開始: ${E}`), m.current.mousemove = k.handleGlobalMouseMove, m.current.mouseup = k.handleGlobalMouseUp;
|
|
2047
2135
|
} else
|
|
2048
|
-
|
|
2049
|
-
}, [
|
|
2136
|
+
o.customDrag.isActive || o.dragState.isDragging || (m.current.mousemove = null, m.current.mouseup = null);
|
|
2137
|
+
}, [o.clickState.isClicked, o.clickState.panelId, w, o.customDrag.isActive, o.dragState.isDragging, k.handleGlobalMouseMove, k.handleGlobalMouseUp]);
|
|
2050
2138
|
const h = P(
|
|
2051
2139
|
(i, g) => {
|
|
2052
|
-
const E = i.touches[0],
|
|
2053
|
-
|
|
2140
|
+
const E = i.touches[0], A = i.currentTarget;
|
|
2141
|
+
o.setTouchDragState({
|
|
2054
2142
|
isTouchDragging: !0,
|
|
2055
2143
|
startX: E.clientX,
|
|
2056
2144
|
startY: E.clientY,
|
|
2057
2145
|
currentX: E.clientX,
|
|
2058
2146
|
currentY: E.clientY,
|
|
2059
|
-
draggedElement:
|
|
2060
|
-
}),
|
|
2147
|
+
draggedElement: A
|
|
2148
|
+
}), o.setDragState({
|
|
2061
2149
|
isDragging: !0,
|
|
2062
2150
|
draggedPanel: g,
|
|
2063
2151
|
dragOverColumn: null
|
|
2064
2152
|
});
|
|
2065
2153
|
},
|
|
2066
|
-
[
|
|
2154
|
+
[o]
|
|
2067
2155
|
), f = P(
|
|
2068
2156
|
(i) => {
|
|
2069
|
-
if (!
|
|
2157
|
+
if (!o.touchDragState.isTouchDragging) return;
|
|
2070
2158
|
i.preventDefault();
|
|
2071
2159
|
const g = i.touches[0];
|
|
2072
|
-
|
|
2160
|
+
o.setTouchDragState((E) => ({
|
|
2073
2161
|
...E,
|
|
2074
2162
|
currentX: g.clientX,
|
|
2075
2163
|
currentY: g.clientY
|
|
2076
2164
|
}));
|
|
2077
2165
|
},
|
|
2078
|
-
[
|
|
2079
|
-
),
|
|
2166
|
+
[o.touchDragState.isTouchDragging, o]
|
|
2167
|
+
), b = P(
|
|
2080
2168
|
(i) => {
|
|
2081
|
-
|
|
2169
|
+
o.touchDragState.isTouchDragging && (o.setTouchDragState({
|
|
2082
2170
|
isTouchDragging: !1,
|
|
2083
2171
|
startX: 0,
|
|
2084
2172
|
startY: 0,
|
|
2085
2173
|
currentX: 0,
|
|
2086
2174
|
currentY: 0,
|
|
2087
2175
|
draggedElement: null
|
|
2088
|
-
}),
|
|
2176
|
+
}), q.handleDragEnd());
|
|
2089
2177
|
},
|
|
2090
|
-
[
|
|
2178
|
+
[o.touchDragState.isTouchDragging, o, q]
|
|
2091
2179
|
), N = P(
|
|
2092
2180
|
(i) => {
|
|
2093
|
-
S(c.current, 1, "🔄 toggleDragMode called:", { panelId: i }),
|
|
2094
|
-
const
|
|
2181
|
+
S(c.current, 1, "🔄 toggleDragMode called:", { panelId: i }), $((g) => {
|
|
2182
|
+
const A = (g[i] || "normal") === "normal" ? "custom" : "normal", _ = { ...g, [i]: A };
|
|
2095
2183
|
if (u)
|
|
2096
2184
|
try {
|
|
2097
|
-
u(i,
|
|
2098
|
-
} catch (
|
|
2099
|
-
console.error("🔄 Error in onDragModeChange:",
|
|
2185
|
+
u(i, A);
|
|
2186
|
+
} catch (X) {
|
|
2187
|
+
console.error("🔄 Error in onDragModeChange:", X);
|
|
2100
2188
|
}
|
|
2101
|
-
return
|
|
2189
|
+
return _;
|
|
2102
2190
|
});
|
|
2103
2191
|
},
|
|
2104
2192
|
[u]
|
|
2105
|
-
),
|
|
2193
|
+
), y = P((i, g) => {
|
|
2106
2194
|
i.stopPropagation(), S(c.current, 2, "パネルサイズ情報クリック:", g);
|
|
2107
2195
|
}, []);
|
|
2108
2196
|
return {
|
|
2109
2197
|
// 状態
|
|
2110
|
-
columnPanels:
|
|
2198
|
+
columnPanels: p,
|
|
2111
2199
|
panelVisibility: D.panelVisibility,
|
|
2112
2200
|
dragModes: w,
|
|
2113
|
-
dragState:
|
|
2114
|
-
dragOverPosition:
|
|
2115
|
-
originalPanelPosition:
|
|
2116
|
-
touchDragState:
|
|
2117
|
-
customDrag:
|
|
2118
|
-
clickState:
|
|
2119
|
-
mousePosition:
|
|
2201
|
+
dragState: o.dragState,
|
|
2202
|
+
dragOverPosition: o.dragOverPosition,
|
|
2203
|
+
originalPanelPosition: o.originalPanelPosition,
|
|
2204
|
+
touchDragState: o.touchDragState,
|
|
2205
|
+
customDrag: o.customDrag,
|
|
2206
|
+
clickState: o.clickState,
|
|
2207
|
+
mousePosition: v.mousePosition,
|
|
2120
2208
|
panelSizes: D.panelSizes,
|
|
2121
2209
|
// 状態更新関数
|
|
2122
2210
|
setColumnPanels: C,
|
|
2123
2211
|
setPanelVisibility: D.setPanelVisibility,
|
|
2124
|
-
setDragModes:
|
|
2212
|
+
setDragModes: $,
|
|
2125
2213
|
setPanelRef: D.setPanelRef,
|
|
2126
2214
|
// イベントハンドラー
|
|
2127
|
-
handleDragStart:
|
|
2128
|
-
handleDragEnd:
|
|
2215
|
+
handleDragStart: q.handleDragStart,
|
|
2216
|
+
handleDragEnd: q.handleDragEnd,
|
|
2129
2217
|
handleMouseDown: k.handleMouseDown,
|
|
2130
2218
|
handleTouchStart: h,
|
|
2131
2219
|
handleTouchMove: f,
|
|
2132
|
-
handleTouchEnd:
|
|
2133
|
-
handlePlaceholderDragEnter:
|
|
2220
|
+
handleTouchEnd: b,
|
|
2221
|
+
handlePlaceholderDragEnter: H,
|
|
2134
2222
|
handlePlaceholderDragLeave: B,
|
|
2135
|
-
handleDragOverWithInsert:
|
|
2136
|
-
handleDropWithInsert:
|
|
2137
|
-
handleColumnDragLeave:
|
|
2138
|
-
handlePanelSizeInfoClick:
|
|
2223
|
+
handleDragOverWithInsert: q.handleDragOverWithInsert,
|
|
2224
|
+
handleDropWithInsert: q.handleDropWithInsert,
|
|
2225
|
+
handleColumnDragLeave: q.handleColumnDragLeave,
|
|
2226
|
+
handlePanelSizeInfoClick: y,
|
|
2139
2227
|
// ユーティリティ関数
|
|
2140
2228
|
toggleDragMode: N,
|
|
2141
|
-
findPanelPosition:
|
|
2229
|
+
findPanelPosition: T
|
|
2230
|
+
};
|
|
2231
|
+
}, Et = ({ minColumnWidth: r = 350, defaultColumns: t = 3, maxColumns: n = 6, minColumns: l = 1, currentColumnWidths: s = {} } = {}) => {
|
|
2232
|
+
const [u, d] = ee(0), c = Y(0), p = Y(null), [C, w] = ee(!1), $ = Y(t);
|
|
2233
|
+
J(() => {
|
|
2234
|
+
if (typeof window > "u")
|
|
2235
|
+
return;
|
|
2236
|
+
const v = () => {
|
|
2237
|
+
const m = window.visualViewport?.width ?? 0, T = document?.documentElement?.clientWidth ?? 0, z = document?.body?.clientWidth ?? 0, H = window.innerWidth ?? 0;
|
|
2238
|
+
return T > 0 ? Math.floor(T) : m > 0 ? Math.floor(m) : z > 0 ? Math.floor(z) : Math.floor(H);
|
|
2239
|
+
}, D = () => {
|
|
2240
|
+
p.current !== null && cancelAnimationFrame(p.current), p.current = requestAnimationFrame(() => {
|
|
2241
|
+
const m = v();
|
|
2242
|
+
p.current = null, m !== 0 && (Math.abs(c.current - m) < 2 || (c.current = m, d(m)));
|
|
2243
|
+
});
|
|
2244
|
+
};
|
|
2245
|
+
return D(), window.addEventListener("resize", D), window.addEventListener("orientationchange", D), window.visualViewport?.addEventListener("resize", D), () => {
|
|
2246
|
+
p.current !== null && cancelAnimationFrame(p.current), window.removeEventListener("resize", D), window.removeEventListener("orientationchange", D), window.visualViewport?.removeEventListener("resize", D);
|
|
2247
|
+
};
|
|
2248
|
+
}, []);
|
|
2249
|
+
const M = Ae(() => {
|
|
2250
|
+
if (!C || u === 0)
|
|
2251
|
+
return $.current = t, t;
|
|
2252
|
+
const v = Math.max(u - 64, 0), D = 24, m = Object.values(s);
|
|
2253
|
+
let T;
|
|
2254
|
+
if (m.length > 0) {
|
|
2255
|
+
const z = m.reduce((k, q) => k + q, 0) / m.length, H = Math.max(r, z);
|
|
2256
|
+
T = Math.floor((v + D) / (H + D)), m.reduce((k, q) => k + q, 0) + (m.length - 1) * D > v && m.length > l && (T = Math.min(T, m.length - 1));
|
|
2257
|
+
} else
|
|
2258
|
+
T = Math.floor((v + D) / (r + D));
|
|
2259
|
+
return T = Math.max(l, Math.min(n, T)), $.current === T ? $.current : ($.current = T, T);
|
|
2260
|
+
}, [C, u, t, r, n, l, s]), o = P(() => {
|
|
2261
|
+
w((v) => !v);
|
|
2262
|
+
}, []);
|
|
2263
|
+
return {
|
|
2264
|
+
responsiveColumnCount: M,
|
|
2265
|
+
isResponsiveMode: C,
|
|
2266
|
+
screenWidth: u,
|
|
2267
|
+
toggleResponsiveMode: o
|
|
2142
2268
|
};
|
|
2143
|
-
},
|
|
2269
|
+
}, St = ({ isResponsiveMode: r, responsiveColumnCount: t, currentColumnCount: n, screenWidth: l, onToggleResponsive: s }) => /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 rounded-lg border border-slate-300 bg-white/90 px-3 py-1", children: [
|
|
2270
|
+
/* @__PURE__ */ e.jsxs(
|
|
2271
|
+
"button",
|
|
2272
|
+
{
|
|
2273
|
+
type: "button",
|
|
2274
|
+
onClick: s,
|
|
2275
|
+
className: `flex items-center gap-1 rounded px-2 py-1 text-xs transition-colors ${r ? "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"}`,
|
|
2276
|
+
title: r ? "レスポンシブモードを無効化" : "レスポンシブモードを有効化",
|
|
2277
|
+
children: [
|
|
2278
|
+
r ? /* @__PURE__ */ e.jsx(et, { className: "h-3 w-3" }) : /* @__PURE__ */ e.jsx(tt, { className: "h-3 w-3" }),
|
|
2279
|
+
/* @__PURE__ */ e.jsx("span", { children: r ? "レスポンシブ" : "固定" })
|
|
2280
|
+
]
|
|
2281
|
+
}
|
|
2282
|
+
),
|
|
2283
|
+
r && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1 text-slate-600 text-xs", children: [
|
|
2284
|
+
/* @__PURE__ */ e.jsxs("span", { className: "font-mono", children: [
|
|
2285
|
+
l,
|
|
2286
|
+
"px"
|
|
2287
|
+
] }),
|
|
2288
|
+
/* @__PURE__ */ e.jsx("span", { children: "→" }),
|
|
2289
|
+
/* @__PURE__ */ e.jsxs("span", { className: "font-semibold text-blue-600", children: [
|
|
2290
|
+
t,
|
|
2291
|
+
"列"
|
|
2292
|
+
] }),
|
|
2293
|
+
t !== n && /* @__PURE__ */ e.jsx("span", { className: "text-orange-600", children: "(変更予定)" })
|
|
2294
|
+
] })
|
|
2295
|
+
] }), kt = {
|
|
2144
2296
|
showDebugPanel: !1,
|
|
2145
2297
|
showMousePosition: !1,
|
|
2146
2298
|
showPanelSizes: !1,
|
|
@@ -2149,37 +2301,37 @@ const qe = ({
|
|
|
2149
2301
|
logLevel: 0
|
|
2150
2302
|
};
|
|
2151
2303
|
export {
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2304
|
+
bt as ColumnControlPanel,
|
|
2305
|
+
vt as ColumnInsertPanel,
|
|
2306
|
+
le as DEFAULT_COLUMN_ID_CONFIG,
|
|
2307
|
+
kt as DEFAULT_DEBUG_CONFIG,
|
|
2308
|
+
ve as DEFAULT_EDGE_SCROLL_CONFIG,
|
|
2309
|
+
wt as DebugControlPanel,
|
|
2310
|
+
pt as DragDropLayout,
|
|
2311
|
+
_e as DropZoneDebugOverlay,
|
|
2312
|
+
Ye as EdgeScrollManager,
|
|
2313
|
+
Le as InsertPlaceholder,
|
|
2314
|
+
ot as PanelSizeDisplay,
|
|
2315
|
+
gt as ResizableColumn,
|
|
2316
|
+
We as ResizeHandle,
|
|
2317
|
+
St as ResponsiveControl,
|
|
2318
|
+
Me as calculateScrollVector,
|
|
2319
|
+
Pt as createColumnIdMapping,
|
|
2168
2320
|
S as debugLog,
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2321
|
+
pe as generateColumnId,
|
|
2322
|
+
ze as generateColumnIds,
|
|
2323
|
+
jt as getNextColumnId,
|
|
2324
|
+
yt as isValidColumnId,
|
|
2325
|
+
at as normalizeColumnPanels,
|
|
2326
|
+
be as parseColumnId,
|
|
2327
|
+
it as performScroll,
|
|
2328
|
+
lt as sortColumnIds,
|
|
2329
|
+
Dt as useColumnLayout,
|
|
2330
|
+
ct as useCustomDragHandlers,
|
|
2331
|
+
Nt as useDragDropColumns,
|
|
2332
|
+
ut as useDragDropState,
|
|
2333
|
+
dt as useMouseTracking,
|
|
2334
|
+
mt as useNormalDragHandlers,
|
|
2335
|
+
ht as usePanelManagement,
|
|
2336
|
+
Et as useResponsiveColumns
|
|
2185
2337
|
};
|