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