@aiquants/drag-drop-panels 0.4.0 → 0.6.0

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