@aiquants/drag-drop-panels 0.8.1 → 0.8.3

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