@aiquants/resize-panels 1.3.0 → 1.4.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/Panel.d.ts.map +1 -1
- package/dist/index.es.js +274 -276
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import ir, { createContext as or, useContext as sr, useCallback as be, useMemo as ue, useReducer as ar, useState as ke, useRef as
|
|
1
|
+
import ir, { createContext as or, useContext as sr, useCallback as be, useMemo as ue, useReducer as ar, useState as ke, useRef as pe, useEffect as ge, useLayoutEffect as rt, memo as ut, useId as Bt, useSyncExternalStore as Tt } from "react";
|
|
2
2
|
import { createPortal as lr } from "react-dom";
|
|
3
|
-
const Nt = or(null),
|
|
3
|
+
const Nt = or(null), ft = () => {
|
|
4
4
|
const e = sr(Nt);
|
|
5
5
|
if (!e)
|
|
6
6
|
throw new Error("usePanelGroup must be used within a PanelGroup");
|
|
@@ -10,7 +10,7 @@ const Nt = or(null), pt = () => {
|
|
|
10
10
|
return e;
|
|
11
11
|
const i = 10 ** t, o = e * i, n = Math.floor(o), s = o - n, r = Number.EPSILON * Math.max(1, Math.abs(o));
|
|
12
12
|
return s < 0.5 - r ? n / i : s > 0.5 + r ? (n + 1) / i : (n % 2 === 0 ? n : n + 1) / i;
|
|
13
|
-
}, Ot = 12, gt = 8, cr = 8, dr = 8, Lt = 0.05, jt = 10, ur = 0.05,
|
|
13
|
+
}, Ot = 12, gt = 8, cr = 8, dr = 8, Lt = 0.05, jt = 10, ur = 0.05, fr = 20, pr = 0.05, ht = 0, Dt = 6, ve = (e, t) => t <= 0 ? 0 : Ft(e / t * 100, Dt), Ye = (e, t) => !e || t <= 0 ? 0 : e / 100 * t, lt = (e, t = "percentage") => {
|
|
14
14
|
if (e !== void 0)
|
|
15
15
|
return typeof e == "number" ? { value: e, unit: t } : e;
|
|
16
16
|
}, xt = (e, t) => e ? e.unit === "percentage" ? e.value / 100 * t : e.value : 0, ae = (e, t, i) => e ? typeof e == "number" ? e / 100 * i : e.unit === "pixels" ? e.value : e.value / 100 * i : t, Pe = (e, t, i) => Math.min(Math.max(e, t), i), ct = (e) => {
|
|
@@ -29,7 +29,7 @@ const Nt = or(null), pt = () => {
|
|
|
29
29
|
return c === z ? r ? u.index - l.index : l.index - u.index : r ? z - c : c - z;
|
|
30
30
|
});
|
|
31
31
|
let a = t;
|
|
32
|
-
const
|
|
32
|
+
const p = (l) => {
|
|
33
33
|
for (const { index: u } of d) {
|
|
34
34
|
if (Math.abs(a) <= 0)
|
|
35
35
|
break;
|
|
@@ -76,7 +76,7 @@ const Nt = or(null), pt = () => {
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
|
-
return
|
|
79
|
+
return p(!0), (r && a > 0 || !r && a < 0) && p(!1), a;
|
|
80
80
|
}, Je = (e) => {
|
|
81
81
|
if (!e)
|
|
82
82
|
return 0;
|
|
@@ -85,10 +85,10 @@ const Nt = or(null), pt = () => {
|
|
|
85
85
|
}, Le = (e, t) => {
|
|
86
86
|
const i = e.getBoundingClientRect(), o = typeof window < "u" ? window.getComputedStyle(e) : null, n = o ? Je(o.borderLeftWidth) + Je(o.borderRightWidth) : 0, s = o ? Je(o.borderTopWidth) + Je(o.borderBottomWidth) : 0;
|
|
87
87
|
if (t === "horizontal") {
|
|
88
|
-
const
|
|
88
|
+
const p = i.width > 0 ? i.width : e.offsetWidth, l = i.width > 0 ? Math.max(0, i.width - n) : e.clientWidth, u = e.offsetWidth > 0 ? e.offsetWidth : e.clientWidth + n;
|
|
89
89
|
return {
|
|
90
90
|
inner: l > 0 ? l : Math.max(0, e.clientWidth),
|
|
91
|
-
outer:
|
|
91
|
+
outer: p > 0 ? p : Math.max(0, u)
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
const r = i.height > 0 ? i.height : e.offsetHeight, d = i.height > 0 ? Math.max(0, i.height - s) : e.clientHeight, a = e.offsetHeight > 0 ? e.offsetHeight : e.clientHeight + s;
|
|
@@ -128,33 +128,33 @@ const Nt = or(null), pt = () => {
|
|
|
128
128
|
return e;
|
|
129
129
|
const i = e.map((a) => ({ ...a })), o = [];
|
|
130
130
|
for (let a = 0; a < i.length; a += 1) {
|
|
131
|
-
const
|
|
132
|
-
if (
|
|
131
|
+
const p = i[a];
|
|
132
|
+
if (p.collapsed) {
|
|
133
133
|
i[a] = {
|
|
134
|
-
...
|
|
134
|
+
...p,
|
|
135
135
|
size: 0,
|
|
136
136
|
percentageSize: 0
|
|
137
137
|
};
|
|
138
138
|
continue;
|
|
139
139
|
}
|
|
140
|
-
const l = Math.max(0, ae(
|
|
140
|
+
const l = Math.max(0, ae(p.minSize, 0, t)), u = Math.max(0, ae(p.autoMinSize, 0, t)), c = Math.max(l, u), z = Math.max(1e-3, c), w = ae(p.maxSize, t, t), S = Math.max(c, w), y = p.sizeUnit === "pixels" || p.originalPixelSize !== void 0, b = Math.max(0, p.size);
|
|
141
141
|
let k = c;
|
|
142
142
|
if (y) {
|
|
143
|
-
const j =
|
|
143
|
+
const j = p.preferredPixelSize ?? p.size ?? p.originalPixelSize ?? c;
|
|
144
144
|
k = Pe(j, c, S);
|
|
145
145
|
} else {
|
|
146
|
-
const j =
|
|
146
|
+
const j = p.preferredPercentageSize ?? p.percentageSize ?? ve(p.size, t), K = Ye(j, t);
|
|
147
147
|
k = Pe(K, c, S);
|
|
148
148
|
}
|
|
149
|
-
const C = !y && (
|
|
149
|
+
const C = !y && (p.excludeFromAutoGrowth ?? !1) && b <= z;
|
|
150
150
|
o.push({
|
|
151
151
|
index: a,
|
|
152
152
|
isPixelPanel: y,
|
|
153
153
|
minSize: c,
|
|
154
154
|
maxSize: S,
|
|
155
155
|
preferredSize: k,
|
|
156
|
-
priority:
|
|
157
|
-
flexPriority: y ? void 0 :
|
|
156
|
+
priority: p.pixelAdjustPriority ?? a + 1,
|
|
157
|
+
flexPriority: y ? void 0 : p.flexAdjustPriority,
|
|
158
158
|
excludeFromGrowth: C
|
|
159
159
|
});
|
|
160
160
|
}
|
|
@@ -165,13 +165,13 @@ const Nt = or(null), pt = () => {
|
|
|
165
165
|
for (const a of o)
|
|
166
166
|
n.set(a.index, a.minSize), s += a.minSize;
|
|
167
167
|
let r = t - s;
|
|
168
|
-
const d = (a,
|
|
169
|
-
if (
|
|
168
|
+
const d = (a, p) => {
|
|
169
|
+
if (p <= 0)
|
|
170
170
|
return 0;
|
|
171
171
|
const l = n.get(a.index) ?? a.minSize, u = Math.max(0, a.maxSize - l);
|
|
172
172
|
if (u <= 0)
|
|
173
173
|
return 0;
|
|
174
|
-
const c = Math.min(
|
|
174
|
+
const c = Math.min(p, u);
|
|
175
175
|
return n.set(a.index, l + c), c;
|
|
176
176
|
};
|
|
177
177
|
if (r > 0) {
|
|
@@ -203,9 +203,9 @@ const Nt = or(null), pt = () => {
|
|
|
203
203
|
if (w <= 1e-6)
|
|
204
204
|
break;
|
|
205
205
|
}
|
|
206
|
-
},
|
|
207
|
-
|
|
208
|
-
for (const l of
|
|
206
|
+
}, p = o.filter((l) => l.isPixelPanel);
|
|
207
|
+
p.sort((l, u) => u.priority - l.priority);
|
|
208
|
+
for (const l of p) {
|
|
209
209
|
if (r <= 0)
|
|
210
210
|
break;
|
|
211
211
|
const u = n.get(l.index) ?? l.minSize, c = Math.min(l.preferredSize, l.maxSize), z = Math.max(0, c - u);
|
|
@@ -242,15 +242,15 @@ const Nt = or(null), pt = () => {
|
|
|
242
242
|
if (r > 0) {
|
|
243
243
|
let a = r;
|
|
244
244
|
for (; ; ) {
|
|
245
|
-
let
|
|
245
|
+
let p = 0;
|
|
246
246
|
const l = [];
|
|
247
247
|
for (const c of o) {
|
|
248
248
|
if (!c.isPixelPanel && c.excludeFromGrowth)
|
|
249
249
|
continue;
|
|
250
250
|
const z = n.get(c.index) ?? c.minSize, w = c.isPixelPanel ? Math.min(c.maxSize, c.preferredSize) : c.maxSize, S = Math.max(0, w - z);
|
|
251
|
-
S > 0 && (l.push(c),
|
|
251
|
+
S > 0 && (l.push(c), p += S);
|
|
252
252
|
}
|
|
253
|
-
if (
|
|
253
|
+
if (p <= 0)
|
|
254
254
|
break;
|
|
255
255
|
const u = r;
|
|
256
256
|
for (const c of l) {
|
|
@@ -261,7 +261,7 @@ const Nt = or(null), pt = () => {
|
|
|
261
261
|
const z = n.get(c.index) ?? c.minSize, w = c.isPixelPanel ? Math.min(c.maxSize, c.preferredSize) : c.maxSize, S = Math.max(0, w - z);
|
|
262
262
|
if (S <= 0)
|
|
263
263
|
continue;
|
|
264
|
-
const y = u * S /
|
|
264
|
+
const y = u * S / p, b = d(c, Math.min(S, y));
|
|
265
265
|
b > 0 && (r -= b);
|
|
266
266
|
}
|
|
267
267
|
if (r <= 1e-6 || Math.abs(a - r) <= 1e-6)
|
|
@@ -272,10 +272,10 @@ const Nt = or(null), pt = () => {
|
|
|
272
272
|
}
|
|
273
273
|
if (r < 0) {
|
|
274
274
|
let a = r;
|
|
275
|
-
const
|
|
276
|
-
for (
|
|
275
|
+
const p = o.filter((l) => l.isPixelPanel);
|
|
276
|
+
for (p.sort((l, u) => l.priority - u.priority); !(r >= 0); ) {
|
|
277
277
|
let l = !1;
|
|
278
|
-
for (const u of
|
|
278
|
+
for (const u of p) {
|
|
279
279
|
if (r >= 0)
|
|
280
280
|
break;
|
|
281
281
|
const c = n.get(u.index) ?? u.minSize, z = Pe(u.preferredSize, u.minSize, u.maxSize), w = Math.max(0, c - z);
|
|
@@ -296,13 +296,13 @@ const Nt = or(null), pt = () => {
|
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
298
|
for (const a of o) {
|
|
299
|
-
const
|
|
299
|
+
const p = n.get(a.index) ?? a.minSize, l = i[a.index], u = Oe(l), c = u ? p : l.sizeBeforeCollapse, z = u ? l.measuredPixelSizeBeforeCollapse ?? l.measuredPixelSize ?? p : l.measuredPixelSizeBeforeCollapse, w = t > 0 ? ve(p, t) : 0;
|
|
300
300
|
i[a.index] = {
|
|
301
301
|
...l,
|
|
302
|
-
size:
|
|
302
|
+
size: p,
|
|
303
303
|
percentageSize: w,
|
|
304
304
|
preferredPercentageSize: l.preferredPercentageSize,
|
|
305
|
-
preferredPixelSize: a.isPixelPanel ? l.preferredPixelSize ??
|
|
305
|
+
preferredPixelSize: a.isPixelPanel ? l.preferredPixelSize ?? p : l.preferredPixelSize,
|
|
306
306
|
sizeBeforeCollapse: c,
|
|
307
307
|
measuredPixelSizeBeforeCollapse: z,
|
|
308
308
|
measuredPixelSize: void 0,
|
|
@@ -334,7 +334,7 @@ const Nt = or(null), pt = () => {
|
|
|
334
334
|
percentageSize: 0,
|
|
335
335
|
measuredPercentageSize: n.measuredPercentageSize !== void 0 ? 0 : n.measuredPercentageSize
|
|
336
336
|
}) : n;
|
|
337
|
-
const s = ve(n.size, t), r = n.measuredPercentageSize,
|
|
337
|
+
const s = ve(n.size, t), r = n.measuredPercentageSize, p = (r !== void 0 ? Math.abs(r - s) : 1 / 0) < 1e-4 && r !== void 0 ? r : s, l = Ft(p, Dt), c = Math.abs((n.percentageSize ?? 0) - l) > 0 || n.percentageSize === void 0, z = n.sizeBeforeCollapse === void 0 || n.sizeBeforeCollapse !== n.size, w = Oe(n), S = w && z, y = n.measuredPixelSize ?? n.size, b = w && (n.measuredPixelSizeBeforeCollapse === void 0 || n.measuredPixelSizeBeforeCollapse !== y);
|
|
338
338
|
if (!(c || S || b))
|
|
339
339
|
return n;
|
|
340
340
|
i = !0;
|
|
@@ -416,8 +416,8 @@ const Nt = or(null), pt = () => {
|
|
|
416
416
|
d(u.index, -S);
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
|
-
},
|
|
420
|
-
if (
|
|
419
|
+
}, p = i.map((l) => r(l)).filter((l) => l.isFlexible);
|
|
420
|
+
if (p.length > 0 && a(p), Math.abs(n) > 0) {
|
|
421
421
|
const l = n;
|
|
422
422
|
n = Gt(e, n, t, { enforceAutoMinSize: !0 }), Math.abs(n - l) > 0 && (s = !0);
|
|
423
423
|
}
|
|
@@ -483,14 +483,14 @@ const Nt = or(null), pt = () => {
|
|
|
483
483
|
const n = [...e], s = n[i], r = n[o];
|
|
484
484
|
if (s.collapsed || r.collapsed || t.leftSize === s.size && t.rightSize === r.size)
|
|
485
485
|
return e;
|
|
486
|
-
const d = t.containerSize ?? e.reduce((x, E) => x + E.size, 0), a = ae(s.minSize, 0, d),
|
|
486
|
+
const d = t.containerSize ?? e.reduce((x, E) => x + E.size, 0), a = ae(s.minSize, 0, d), p = ae(s.maxSize, d, d), l = ae(r.minSize, 0, d), u = ae(r.maxSize, d, d), c = s.size + r.size, z = e.reduce((x, E) => E.collapsed ? x : x + E.size, 0), w = z - c, S = a + l, y = p + u, b = Pe(t.leftSize + t.rightSize, S, y);
|
|
487
487
|
let k = d > 0 ? d - w : b;
|
|
488
488
|
Number.isFinite(k) || (k = b);
|
|
489
489
|
const C = Pe(Math.max(b, k), S, y), j = (x) => ({
|
|
490
490
|
min: Math.max(a, x - u),
|
|
491
|
-
max: Math.min(
|
|
491
|
+
max: Math.min(p, x - l)
|
|
492
492
|
}), K = (x) => ({
|
|
493
|
-
min: Math.max(l, x -
|
|
493
|
+
min: Math.max(l, x - p),
|
|
494
494
|
max: Math.min(u, x - a)
|
|
495
495
|
}), ee = Math.abs(t.leftSize - s.size), se = Math.abs(t.rightSize - r.size), v = ee >= se;
|
|
496
496
|
let F = s.size, O = r.size;
|
|
@@ -507,17 +507,17 @@ const Nt = or(null), pt = () => {
|
|
|
507
507
|
if (x.min > x.max)
|
|
508
508
|
return e;
|
|
509
509
|
const E = Pe(t.rightSize, x.min, x.max), h = C - E;
|
|
510
|
-
if (h < a || h >
|
|
510
|
+
if (h < a || h > p)
|
|
511
511
|
return e;
|
|
512
512
|
O = E, F = h;
|
|
513
513
|
}
|
|
514
514
|
const oe = F + O;
|
|
515
515
|
if (C !== oe)
|
|
516
516
|
return e;
|
|
517
|
-
const $ = z - s.size - r.size + oe, J = d > 0 ? d : $, q = J > 0 ? ve(F, J) : 0, V = J > 0 ? ve(O, J) : 0, P = s.sizeUnit === "pixels" || s.originalPixelSize !== void 0 ? F : s.preferredPixelSize, H = r.sizeUnit === "pixels" || r.originalPixelSize !== void 0 ? O : r.preferredPixelSize, M = ae(s.autoMinSize, 0, d), de = ae(r.autoMinSize, 0, d),
|
|
518
|
-
let D = s.excludeFromAutoGrowth,
|
|
519
|
-
_ && (F <=
|
|
520
|
-
const Se = Oe(s),
|
|
517
|
+
const $ = z - s.size - r.size + oe, J = d > 0 ? d : $, q = J > 0 ? ve(F, J) : 0, V = J > 0 ? ve(O, J) : 0, P = s.sizeUnit === "pixels" || s.originalPixelSize !== void 0 ? F : s.preferredPixelSize, H = r.sizeUnit === "pixels" || r.originalPixelSize !== void 0 ? O : r.preferredPixelSize, M = ae(s.autoMinSize, 0, d), de = ae(r.autoMinSize, 0, d), me = Math.max(1e-3, M), g = Math.max(1e-3, de), _ = s.sizeUnit === "percentage" && s.originalPixelSize === void 0, N = r.sizeUnit === "percentage" && r.originalPixelSize === void 0;
|
|
518
|
+
let D = s.excludeFromAutoGrowth, fe = r.excludeFromAutoGrowth;
|
|
519
|
+
_ && (F <= me ? D = !0 : F > me && (D = !1)), N && (O <= g ? fe = !0 : O > g && (fe = !1));
|
|
520
|
+
const Se = Oe(s), f = Oe(r);
|
|
521
521
|
return n[i] = {
|
|
522
522
|
...s,
|
|
523
523
|
size: F,
|
|
@@ -534,16 +534,16 @@ const Nt = or(null), pt = () => {
|
|
|
534
534
|
percentageSize: V,
|
|
535
535
|
preferredPercentageSize: V > 0 ? V : r.preferredPercentageSize,
|
|
536
536
|
preferredPixelSize: H,
|
|
537
|
-
sizeBeforeCollapse:
|
|
537
|
+
sizeBeforeCollapse: f ? O : r.sizeBeforeCollapse,
|
|
538
538
|
measuredPixelSize: void 0,
|
|
539
539
|
measuredPercentageSize: void 0,
|
|
540
|
-
excludeFromAutoGrowth:
|
|
540
|
+
excludeFromAutoGrowth: fe
|
|
541
541
|
}, d > 0 && Qe(n, d) ? Fe(n) : n;
|
|
542
542
|
}
|
|
543
543
|
case "SET_PANELS": {
|
|
544
544
|
console.log("SET_PANELS", t.panels);
|
|
545
545
|
const i = t.panels.map((a) => {
|
|
546
|
-
const
|
|
546
|
+
const p = a.sizeUnit === "pixels" || a.originalPixelSize !== void 0, l = a.preferredPercentageSize !== void 0 ? a.preferredPercentageSize : a.percentageSize, u = a.preferredPixelSize !== void 0 ? a.preferredPixelSize : p ? a.size : a.preferredPixelSize;
|
|
547
547
|
return {
|
|
548
548
|
...a,
|
|
549
549
|
preferredPercentageSize: l,
|
|
@@ -553,12 +553,12 @@ const Nt = or(null), pt = () => {
|
|
|
553
553
|
let d = o.length === r.length;
|
|
554
554
|
if (d)
|
|
555
555
|
for (let a = 0; a < r.length; a += 1) {
|
|
556
|
-
const
|
|
556
|
+
const p = r[a], l = o[a];
|
|
557
557
|
if (!l) {
|
|
558
558
|
d = !1;
|
|
559
559
|
break;
|
|
560
560
|
}
|
|
561
|
-
if (!(l.id ===
|
|
561
|
+
if (!(l.id === p.id && l.size === p.size && l.percentageSize === p.percentageSize && l.sizeBeforeCollapse === p.sizeBeforeCollapse && l.measuredPercentageSize === p.measuredPercentageSize && l.collapsed === p.collapsed)) {
|
|
562
562
|
d = !1;
|
|
563
563
|
break;
|
|
564
564
|
}
|
|
@@ -611,7 +611,7 @@ const Nt = or(null), pt = () => {
|
|
|
611
611
|
const o = e[i], n = t.from === "start" ? o.collapseFromStart : o.collapseFromEnd;
|
|
612
612
|
if (!(Oe(o) && n) || o.collapsed)
|
|
613
613
|
return e;
|
|
614
|
-
const r = o.size, d = o.measuredPixelSize ?? r, a = o.percentageSize ?? o.preferredPercentageSize ?? 0,
|
|
614
|
+
const r = o.size, d = o.measuredPixelSize ?? r, a = o.percentageSize ?? o.preferredPercentageSize ?? 0, p = {
|
|
615
615
|
...o,
|
|
616
616
|
collapsed: !0,
|
|
617
617
|
collapsedByDirection: t.from,
|
|
@@ -626,7 +626,7 @@ const Nt = or(null), pt = () => {
|
|
|
626
626
|
measuredPixelSize: o.measuredPixelSize !== void 0 ? 0 : o.measuredPixelSize,
|
|
627
627
|
measuredPercentageSize: o.measuredPercentageSize !== void 0 ? 0 : o.measuredPercentageSize
|
|
628
628
|
}, l = [...e];
|
|
629
|
-
l[i] =
|
|
629
|
+
l[i] = p;
|
|
630
630
|
const u = ot(l, t.containerSize);
|
|
631
631
|
return t.containerSize > 0 && Qe(u, t.containerSize) ? Fe(u) : u;
|
|
632
632
|
}
|
|
@@ -638,7 +638,7 @@ const Nt = or(null), pt = () => {
|
|
|
638
638
|
const o = t.containerSize, n = e[i], s = t.from === "start" ? n.collapseFromStart : n.collapseFromEnd;
|
|
639
639
|
if (!(Oe(n) && s) || !n.collapsed || n.collapsedByDirection && n.collapsedByDirection !== t.from)
|
|
640
640
|
return e;
|
|
641
|
-
const d = [t.targetSize, n.sizeBeforeCollapse, n.measuredPixelSizeBeforeCollapse, n.preferredPixelSizeBeforeCollapse, n.originalPixelSize].find((C) => C !== void 0) ?? 0, a = ae(n.minSize, 0, o),
|
|
641
|
+
const d = [t.targetSize, n.sizeBeforeCollapse, n.measuredPixelSizeBeforeCollapse, n.preferredPixelSizeBeforeCollapse, n.originalPixelSize].find((C) => C !== void 0) ?? 0, a = ae(n.minSize, 0, o), p = ae(n.maxSize, o, o), l = Pe(d, a, p), u = ve(l, o), c = n.measuredPixelSizeBeforeCollapse ?? l, z = ve(c, o), w = n.preferredPercentageSizeBeforeCollapse ?? n.percentageSizeBeforeCollapse ?? u, S = n.preferredPixelSizeBeforeCollapse ?? n.preferredPixelSize ?? l, y = {
|
|
642
642
|
...n,
|
|
643
643
|
collapsed: !1,
|
|
644
644
|
collapsedByDirection: null,
|
|
@@ -662,25 +662,25 @@ const Nt = or(null), pt = () => {
|
|
|
662
662
|
return e;
|
|
663
663
|
}
|
|
664
664
|
}, xr = ({ direction: e, style: t, onLayout: i, autoSaveId: o, showDebugInfo: n = !1 }) => {
|
|
665
|
-
const [s, r] = ar(hr, []), [d, a] = ke({ width: 0, height: 0 }), [
|
|
666
|
-
|
|
665
|
+
const [s, r] = ar(hr, []), [d, a] = ke({ width: 0, height: 0 }), [p, l] = ke(!1), [u, c] = ke(!1), [z, w] = ke(null), [S, y] = ke({}), [b, k] = ke({}), C = pe(null), j = pe(i), K = pe(!1), ee = pe(0), se = pe(d), v = pe(d), F = pe(p), O = pe(z?.reason ?? null), oe = pe({}), $ = pe(null), J = pe(null), q = be((f) => f.map((x) => ({ ...x })), []);
|
|
666
|
+
ge(() => {
|
|
667
667
|
v.current = d;
|
|
668
|
-
}, [d]),
|
|
669
|
-
F.current =
|
|
670
|
-
}, [
|
|
668
|
+
}, [d]), ge(() => {
|
|
669
|
+
F.current = p;
|
|
670
|
+
}, [p]), ge(() => {
|
|
671
671
|
O.current = z?.reason ?? null;
|
|
672
|
-
}, [z?.reason]),
|
|
672
|
+
}, [z?.reason]), ge(() => {
|
|
673
673
|
if (z)
|
|
674
674
|
return;
|
|
675
|
-
const
|
|
676
|
-
!Number.isFinite(
|
|
677
|
-
}, [z, s, e, d.width, d.height, q]),
|
|
678
|
-
const
|
|
675
|
+
const f = e === "horizontal" ? d.width : d.height;
|
|
676
|
+
!Number.isFinite(f) || f <= 4 || s.length !== 0 && ($.current = q(s));
|
|
677
|
+
}, [z, s, e, d.width, d.height, q]), ge(() => {
|
|
678
|
+
const f = J.current;
|
|
679
679
|
if (z) {
|
|
680
680
|
J.current = z;
|
|
681
681
|
return;
|
|
682
682
|
}
|
|
683
|
-
if (
|
|
683
|
+
if (f && !z && $.current) {
|
|
684
684
|
J.current = null;
|
|
685
685
|
const x = q($.current);
|
|
686
686
|
r({ type: "SET_PANELS", panels: x });
|
|
@@ -689,15 +689,15 @@ const Nt = or(null), pt = () => {
|
|
|
689
689
|
J.current = z;
|
|
690
690
|
}, [z, q]), rt(() => {
|
|
691
691
|
if (!C.current) return;
|
|
692
|
-
const
|
|
692
|
+
const f = new ResizeObserver((x) => {
|
|
693
693
|
for (const E of x) {
|
|
694
694
|
const h = E.target, B = h ? Le(h, "horizontal") : null, L = h ? Le(h, "vertical") : null, X = B ? B.inner : 0, re = L ? L.inner : 0, W = E.contentRect.width, U = E.contentRect.height, Z = X > 0 ? X : W, T = re > 0 ? re : U;
|
|
695
|
-
a((Y) => (!
|
|
695
|
+
a((Y) => (!p && Z > 0 && T > 0 && l(!0), Y.width === Z && Y.height === T ? Y : { width: Z, height: T }));
|
|
696
696
|
}
|
|
697
697
|
});
|
|
698
|
-
return
|
|
699
|
-
}, [
|
|
700
|
-
const
|
|
698
|
+
return f.observe(C.current), () => f.disconnect();
|
|
699
|
+
}, [p]), rt(() => {
|
|
700
|
+
const f = se.current, x = d, E = e === "horizontal" ? Math.abs(f.width - x.width) > 0 : Math.abs(f.height - x.height) > 0;
|
|
701
701
|
if (u && E) {
|
|
702
702
|
const h = e === "horizontal" ? x.width : x.height;
|
|
703
703
|
r({ type: "CONTAINER_RESIZED", containerSize: h, direction: e });
|
|
@@ -706,13 +706,13 @@ const Nt = or(null), pt = () => {
|
|
|
706
706
|
}, [d, u, e]);
|
|
707
707
|
const V = be(() => {
|
|
708
708
|
console.log("panels[0]?.id", s[0]?.id);
|
|
709
|
-
const
|
|
709
|
+
const f = s.some((m) => {
|
|
710
710
|
if (m.collapsed || m.sizeUnit !== "percentage")
|
|
711
711
|
return !1;
|
|
712
712
|
const te = m.collapseFromStart || m.collapseFromEnd ? m.sizeBeforeCollapse ?? m.measuredPixelSizeBeforeCollapse ?? m.originalPixelSize ?? m.measuredPixelSize ?? 0 : m.measuredPixelSize ?? m.originalPixelSize ?? m.size, ie = m.percentageSize !== void 0 && m.percentageSize > 0;
|
|
713
713
|
return m.size <= 0 && (te > 0 || ie);
|
|
714
714
|
}), x = e === "horizontal" ? d.width : d.height, E = x > 0;
|
|
715
|
-
if (z || !E || !(s.length > 0 && (s.length !== ee.current || !u ||
|
|
715
|
+
if (z || !E || !(s.length > 0 && (s.length !== ee.current || !u || f)))
|
|
716
716
|
return;
|
|
717
717
|
const L = s.filter((m) => !m.collapsed && (m.originalPixelSize !== void 0 || m.sizeUnit === "pixels")).reduce((m, G) => {
|
|
718
718
|
const te = G.preferredPixelSize ?? G.originalPixelSize ?? G.size;
|
|
@@ -791,36 +791,36 @@ const Nt = or(null), pt = () => {
|
|
|
791
791
|
const ne = he.reduce((m, G) => m + le[G].size, 0), xe = Z - ne;
|
|
792
792
|
Math.abs(xe) > 0 && Gt(le, xe, x, { enforceAutoMinSize: !0 }), r({ type: "SET_PANELS", panels: le }), ee.current = s.length, c(!0);
|
|
793
793
|
}, [s, e, d.width, d.height, u, z]);
|
|
794
|
-
|
|
795
|
-
const
|
|
794
|
+
ge(() => {
|
|
795
|
+
const f = e === "horizontal" ? d.width : d.height, x = f > 0, E = x && s.length > 0, h = E ? s.reduce((U, Z) => {
|
|
796
796
|
if (Z.collapsed)
|
|
797
797
|
return U;
|
|
798
|
-
const T = ae(Z.minSize, 0,
|
|
798
|
+
const T = ae(Z.minSize, 0, f);
|
|
799
799
|
return U + Math.max(0, T);
|
|
800
800
|
}, 0) : null, B = E ? s.reduce((U, Z) => {
|
|
801
801
|
if (Z.collapsed)
|
|
802
802
|
return U;
|
|
803
|
-
const T = ae(Z.maxSize,
|
|
803
|
+
const T = ae(Z.maxSize, f, f);
|
|
804
804
|
return U + Math.max(0, T);
|
|
805
805
|
}, 0) : null, L = h ?? z?.totalMinimumSize ?? null, X = B ?? z?.totalMaximumSize ?? null;
|
|
806
806
|
if (!x) {
|
|
807
|
-
z && w((U) => !U || U.availableContainerSize ===
|
|
807
|
+
z && w((U) => !U || U.availableContainerSize === f ? U : {
|
|
808
808
|
reason: U.reason,
|
|
809
809
|
// totalMinimumSize: previous.totalMinimumSize,
|
|
810
810
|
// totalMaximumSize: previous.totalMaximumSize,
|
|
811
811
|
totalMinimumSize: null,
|
|
812
812
|
totalMaximumSize: null,
|
|
813
|
-
availableContainerSize:
|
|
813
|
+
availableContainerSize: f
|
|
814
814
|
});
|
|
815
815
|
return;
|
|
816
816
|
}
|
|
817
|
-
const re = L !== null && L -
|
|
817
|
+
const re = L !== null && L - f > Number.EPSILON, W = X !== null && f - X > Number.EPSILON;
|
|
818
818
|
if (re || W) {
|
|
819
819
|
const Z = {
|
|
820
820
|
reason: re ? "minimum-exceeded" : "maximum-insufficient",
|
|
821
821
|
totalMinimumSize: L,
|
|
822
822
|
totalMaximumSize: X,
|
|
823
|
-
availableContainerSize:
|
|
823
|
+
availableContainerSize: f
|
|
824
824
|
};
|
|
825
825
|
w((T) => T && T.reason === Z.reason && Math.abs((T.totalMinimumSize ?? 0) - (Z.totalMinimumSize ?? 0)) <= Number.EPSILON && Math.abs((T.totalMaximumSize ?? 0) - (Z.totalMaximumSize ?? 0)) <= Number.EPSILON && Math.abs(T.availableContainerSize - Z.availableContainerSize) <= Number.EPSILON ? T : Z);
|
|
826
826
|
return;
|
|
@@ -829,31 +829,31 @@ const Nt = or(null), pt = () => {
|
|
|
829
829
|
const U = z.reason === "minimum-exceeded", Z = z.reason === "maximum-insufficient";
|
|
830
830
|
(!U || L !== null) && (!Z || X !== null) && !re && !W && w((ne) => ne && null);
|
|
831
831
|
}
|
|
832
|
-
}, [s, e, d.width, d.height, z]),
|
|
832
|
+
}, [s, e, d.width, d.height, z]), ge(() => {
|
|
833
833
|
V();
|
|
834
|
-
}, [V]),
|
|
834
|
+
}, [V]), ge(() => {
|
|
835
835
|
j.current = i;
|
|
836
836
|
}, [i]);
|
|
837
|
-
const P = ue(() => s.map((
|
|
837
|
+
const P = ue(() => s.map((f) => f.size), [s]);
|
|
838
838
|
rt(() => {
|
|
839
839
|
P.length > 0 && j.current && j.current(P);
|
|
840
|
-
}, [P]),
|
|
840
|
+
}, [P]), ge(() => {
|
|
841
841
|
if (o && P.length > 0) {
|
|
842
|
-
const
|
|
842
|
+
const f = setTimeout(() => {
|
|
843
843
|
mr(o, P);
|
|
844
844
|
}, 200);
|
|
845
|
-
return () => clearTimeout(
|
|
845
|
+
return () => clearTimeout(f);
|
|
846
846
|
}
|
|
847
|
-
}, [o, P]),
|
|
847
|
+
}, [o, P]), ge(() => {
|
|
848
848
|
if (!o || s.length === 0 || K.current)
|
|
849
849
|
return;
|
|
850
|
-
const
|
|
851
|
-
if (
|
|
850
|
+
const f = e === "horizontal" ? d.width : d.height;
|
|
851
|
+
if (f <= 0)
|
|
852
852
|
return;
|
|
853
853
|
const x = gr(o);
|
|
854
854
|
if (x && x.length === s.length) {
|
|
855
855
|
const E = s.map((h, B) => {
|
|
856
|
-
const L = ae(h.minSize, 0,
|
|
856
|
+
const L = ae(h.minSize, 0, f), X = ae(h.maxSize, f, f), re = Pe(x[B], L, X), W = ve(re, f), U = h.sizeUnit === "pixels" || h.originalPixelSize !== void 0 ? re : h.preferredPixelSize;
|
|
857
857
|
return {
|
|
858
858
|
...h,
|
|
859
859
|
size: re,
|
|
@@ -865,64 +865,64 @@ const Nt = or(null), pt = () => {
|
|
|
865
865
|
r({ type: "SET_PANELS", panels: E }), K.current = !0;
|
|
866
866
|
}
|
|
867
867
|
}, [o, s, d.width, d.height, e]);
|
|
868
|
-
const H = be((
|
|
868
|
+
const H = be((f) => {
|
|
869
869
|
const x = v.current, E = oe.current, h = JSON.stringify({
|
|
870
|
-
id:
|
|
871
|
-
size:
|
|
872
|
-
percentageSize:
|
|
873
|
-
preferredPercentageSize:
|
|
874
|
-
preferredPixelSize:
|
|
875
|
-
sizeUnit:
|
|
876
|
-
originalPixelSize:
|
|
877
|
-
minSize:
|
|
878
|
-
maxSize:
|
|
879
|
-
collapseFromStart:
|
|
880
|
-
collapseFromEnd:
|
|
881
|
-
collapsed:
|
|
882
|
-
collapsedByDirection:
|
|
883
|
-
sizeBeforeCollapse:
|
|
884
|
-
percentageSizeBeforeCollapse:
|
|
885
|
-
preferredPercentageSizeBeforeCollapse:
|
|
886
|
-
preferredPixelSizeBeforeCollapse:
|
|
887
|
-
pixelAdjustPriority:
|
|
870
|
+
id: f.id,
|
|
871
|
+
size: f.size ?? null,
|
|
872
|
+
percentageSize: f.percentageSize ?? null,
|
|
873
|
+
preferredPercentageSize: f.preferredPercentageSize ?? null,
|
|
874
|
+
preferredPixelSize: f.preferredPixelSize ?? null,
|
|
875
|
+
sizeUnit: f.sizeUnit,
|
|
876
|
+
originalPixelSize: f.originalPixelSize ?? null,
|
|
877
|
+
minSize: f.minSize ?? null,
|
|
878
|
+
maxSize: f.maxSize ?? null,
|
|
879
|
+
collapseFromStart: f.collapseFromStart,
|
|
880
|
+
collapseFromEnd: f.collapseFromEnd,
|
|
881
|
+
collapsed: f.collapsed ?? !1,
|
|
882
|
+
collapsedByDirection: f.collapsedByDirection ?? null,
|
|
883
|
+
sizeBeforeCollapse: f.sizeBeforeCollapse ?? null,
|
|
884
|
+
percentageSizeBeforeCollapse: f.percentageSizeBeforeCollapse ?? null,
|
|
885
|
+
preferredPercentageSizeBeforeCollapse: f.preferredPercentageSizeBeforeCollapse ?? null,
|
|
886
|
+
preferredPixelSizeBeforeCollapse: f.preferredPixelSizeBeforeCollapse ?? null,
|
|
887
|
+
pixelAdjustPriority: f.pixelAdjustPriority ?? null
|
|
888
888
|
});
|
|
889
|
-
if (E[
|
|
889
|
+
if (E[f.id] === h) {
|
|
890
890
|
console.log("[resize-panels] useResizablePanels.registerPanel skipped", {
|
|
891
|
-
panelId:
|
|
891
|
+
panelId: f.id,
|
|
892
892
|
reason: "duplicate-registration"
|
|
893
893
|
});
|
|
894
894
|
return;
|
|
895
895
|
}
|
|
896
|
-
E[
|
|
897
|
-
panelId:
|
|
896
|
+
E[f.id] = h, console.log("[resize-panels] useResizablePanels.registerPanel", {
|
|
897
|
+
panelId: f.id,
|
|
898
898
|
containerReady: F.current,
|
|
899
899
|
violationReason: O.current,
|
|
900
900
|
containerSize: {
|
|
901
901
|
width: x.width,
|
|
902
902
|
height: x.height
|
|
903
903
|
}
|
|
904
|
-
}), r({ type: "REGISTER_PANEL", panel:
|
|
905
|
-
}, []), M = be((
|
|
904
|
+
}), r({ type: "REGISTER_PANEL", panel: f });
|
|
905
|
+
}, []), M = be((f) => {
|
|
906
906
|
const x = v.current;
|
|
907
907
|
console.log("[resize-panels] useResizablePanels.unregisterPanel", {
|
|
908
|
-
panelId:
|
|
908
|
+
panelId: f,
|
|
909
909
|
containerReady: F.current,
|
|
910
910
|
violationReason: O.current,
|
|
911
911
|
containerSize: {
|
|
912
912
|
width: x.width,
|
|
913
913
|
height: x.height
|
|
914
914
|
}
|
|
915
|
-
}), r({ type: "UNREGISTER_PANEL", id:
|
|
916
|
-
if (!(
|
|
915
|
+
}), r({ type: "UNREGISTER_PANEL", id: f }), delete oe.current[f], y((E) => {
|
|
916
|
+
if (!(f in E))
|
|
917
917
|
return E;
|
|
918
918
|
const h = { ...E };
|
|
919
|
-
return delete h[
|
|
919
|
+
return delete h[f], h;
|
|
920
920
|
});
|
|
921
921
|
}, []), de = be(
|
|
922
|
-
(
|
|
923
|
-
const B = e === "horizontal" ? d.width : d.height, L = s.find((ne) => ne.id ===
|
|
922
|
+
(f, x, E, h) => {
|
|
923
|
+
const B = e === "horizontal" ? d.width : d.height, L = s.find((ne) => ne.id === f), X = s.find((ne) => ne.id === x);
|
|
924
924
|
if (!(L && X)) {
|
|
925
|
-
r({ type: "RESIZE_PANELS", leftId:
|
|
925
|
+
r({ type: "RESIZE_PANELS", leftId: f, rightId: x, leftSize: E, rightSize: h, containerSize: B });
|
|
926
926
|
return;
|
|
927
927
|
}
|
|
928
928
|
if (L.collapsed || X.collapsed)
|
|
@@ -946,63 +946,63 @@ const Nt = or(null), pt = () => {
|
|
|
946
946
|
}
|
|
947
947
|
}
|
|
948
948
|
}
|
|
949
|
-
T = Pe(T, re, W), Y = Pe(Y, U, Z), console.assert(T + Y === he, "Total size after constraints should be close to the original total size.", { constrainedLeftSize: T, constrainedRightSize: Y, originalTotalSize: he }), r({ type: "RESIZE_PANELS", leftId:
|
|
949
|
+
T = Pe(T, re, W), Y = Pe(Y, U, Z), console.assert(T + Y === he, "Total size after constraints should be close to the original total size.", { constrainedLeftSize: T, constrainedRightSize: Y, originalTotalSize: he }), r({ type: "RESIZE_PANELS", leftId: f, rightId: x, leftSize: T, rightSize: Y, containerSize: B });
|
|
950
950
|
},
|
|
951
951
|
[e, d.width, d.height, s]
|
|
952
|
-
),
|
|
953
|
-
(
|
|
952
|
+
), me = be(
|
|
953
|
+
(f, x) => {
|
|
954
954
|
const E = e === "horizontal" ? d.width : d.height;
|
|
955
|
-
r({ type: "COLLAPSE_PANEL", id:
|
|
955
|
+
r({ type: "COLLAPSE_PANEL", id: f, from: x, containerSize: E });
|
|
956
956
|
},
|
|
957
957
|
[e, d.width, d.height]
|
|
958
958
|
), g = be(
|
|
959
|
-
(
|
|
959
|
+
(f, x, E) => {
|
|
960
960
|
const h = e === "horizontal" ? d.width : d.height;
|
|
961
|
-
r({ type: "EXPAND_PANEL", id:
|
|
961
|
+
r({ type: "EXPAND_PANEL", id: f, from: x, containerSize: h, targetSize: E });
|
|
962
962
|
},
|
|
963
963
|
[e, d.width, d.height]
|
|
964
964
|
), _ = be(
|
|
965
|
-
(
|
|
965
|
+
(f) => s.find((x) => x.id === f),
|
|
966
966
|
[s]
|
|
967
|
-
), N = be((
|
|
967
|
+
), N = be((f, x) => {
|
|
968
968
|
y((E) => {
|
|
969
969
|
if (x === null) {
|
|
970
|
-
if (!(
|
|
970
|
+
if (!(f in E))
|
|
971
971
|
return E;
|
|
972
972
|
const B = { ...E };
|
|
973
|
-
return delete B[
|
|
973
|
+
return delete B[f], B;
|
|
974
974
|
}
|
|
975
|
-
const h = E[
|
|
975
|
+
const h = E[f];
|
|
976
976
|
return h && h.pixelSize === x.pixelSize && h.percentageSize === x.percentageSize ? E : {
|
|
977
977
|
...E,
|
|
978
|
-
[
|
|
978
|
+
[f]: x
|
|
979
979
|
};
|
|
980
980
|
});
|
|
981
|
-
}, []), D = be((
|
|
981
|
+
}, []), D = be((f, x) => {
|
|
982
982
|
k((E) => {
|
|
983
983
|
if (x === null) {
|
|
984
|
-
if (!(
|
|
984
|
+
if (!(f in E))
|
|
985
985
|
return E;
|
|
986
986
|
const B = { ...E };
|
|
987
|
-
return delete B[
|
|
987
|
+
return delete B[f], B;
|
|
988
988
|
}
|
|
989
|
-
const h = E[
|
|
989
|
+
const h = E[f];
|
|
990
990
|
return h && Math.abs(h.thickness - x.thickness) <= 0.25 && h.visible === x.visible && h.direction === x.direction && h.startPanelId === x.startPanelId && h.endPanelId === x.endPanelId ? E : {
|
|
991
991
|
...E,
|
|
992
|
-
[
|
|
992
|
+
[f]: x
|
|
993
993
|
};
|
|
994
994
|
});
|
|
995
|
-
}, []),
|
|
995
|
+
}, []), fe = ue(
|
|
996
996
|
() => ({
|
|
997
997
|
direction: e,
|
|
998
998
|
panels: s,
|
|
999
999
|
containerSize: d,
|
|
1000
|
-
isContainerReady:
|
|
1000
|
+
isContainerReady: p,
|
|
1001
1001
|
showDebugInfo: n,
|
|
1002
1002
|
registerPanel: H,
|
|
1003
1003
|
unregisterPanel: M,
|
|
1004
1004
|
resizePanels: de,
|
|
1005
|
-
collapsePanel:
|
|
1005
|
+
collapsePanel: me,
|
|
1006
1006
|
expandPanel: g,
|
|
1007
1007
|
getPanel: _,
|
|
1008
1008
|
reportPanelMeasurement: N,
|
|
@@ -1011,7 +1011,7 @@ const Nt = or(null), pt = () => {
|
|
|
1011
1011
|
handleMeasurements: b,
|
|
1012
1012
|
layoutConstraintViolation: z
|
|
1013
1013
|
}),
|
|
1014
|
-
[e, s, d,
|
|
1014
|
+
[e, s, d, p, n, H, M, de, me, g, _, N, S, D, b, z]
|
|
1015
1015
|
), Se = ue(
|
|
1016
1016
|
() => ({
|
|
1017
1017
|
display: "flex",
|
|
@@ -1030,23 +1030,23 @@ const Nt = or(null), pt = () => {
|
|
|
1030
1030
|
);
|
|
1031
1031
|
return {
|
|
1032
1032
|
groupRef: C,
|
|
1033
|
-
contextValue:
|
|
1033
|
+
contextValue: fe,
|
|
1034
1034
|
groupStyle: Se
|
|
1035
1035
|
};
|
|
1036
1036
|
}, Tn = (e) => {
|
|
1037
|
-
const { getPanel: t, collapsePanel: i, expandPanel: o } =
|
|
1037
|
+
const { getPanel: t, collapsePanel: i, expandPanel: o } = ft(), n = t(e), s = be(
|
|
1038
1038
|
(a) => {
|
|
1039
1039
|
i(e, a);
|
|
1040
1040
|
},
|
|
1041
1041
|
[i, e]
|
|
1042
1042
|
), r = be(
|
|
1043
|
-
(a,
|
|
1044
|
-
o(e, a,
|
|
1043
|
+
(a, p) => {
|
|
1044
|
+
o(e, a, p);
|
|
1045
1045
|
},
|
|
1046
1046
|
[o, e]
|
|
1047
1047
|
), d = be(
|
|
1048
|
-
(a,
|
|
1049
|
-
n?.collapsed ? r(a,
|
|
1048
|
+
(a, p) => {
|
|
1049
|
+
n?.collapsed ? r(a, p) : s(a);
|
|
1050
1050
|
},
|
|
1051
1051
|
[n?.collapsed, s, r]
|
|
1052
1052
|
);
|
|
@@ -1196,15 +1196,15 @@ function Sr() {
|
|
|
1196
1196
|
"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."
|
|
1197
1197
|
)), g = this.props.ref, g !== void 0 ? g : null;
|
|
1198
1198
|
}
|
|
1199
|
-
function
|
|
1200
|
-
var
|
|
1199
|
+
function p(g, _, N, D, fe, Se) {
|
|
1200
|
+
var f = N.ref;
|
|
1201
1201
|
return g = {
|
|
1202
1202
|
$$typeof: w,
|
|
1203
1203
|
type: g,
|
|
1204
1204
|
key: _,
|
|
1205
1205
|
props: N,
|
|
1206
1206
|
_owner: D
|
|
1207
|
-
}, (
|
|
1207
|
+
}, (f !== void 0 ? f : null) !== null ? Object.defineProperty(g, "ref", {
|
|
1208
1208
|
enumerable: !1,
|
|
1209
1209
|
get: a
|
|
1210
1210
|
}) : Object.defineProperty(g, "ref", { enumerable: !1, value: null }), g._store = {}, Object.defineProperty(g._store, "validated", {
|
|
@@ -1221,7 +1221,7 @@ function Sr() {
|
|
|
1221
1221
|
configurable: !1,
|
|
1222
1222
|
enumerable: !1,
|
|
1223
1223
|
writable: !0,
|
|
1224
|
-
value:
|
|
1224
|
+
value: fe
|
|
1225
1225
|
}), Object.defineProperty(g, "_debugTask", {
|
|
1226
1226
|
configurable: !1,
|
|
1227
1227
|
enumerable: !1,
|
|
@@ -1229,25 +1229,25 @@ function Sr() {
|
|
|
1229
1229
|
value: Se
|
|
1230
1230
|
}), Object.freeze && (Object.freeze(g.props), Object.freeze(g)), g;
|
|
1231
1231
|
}
|
|
1232
|
-
function l(g, _, N, D,
|
|
1233
|
-
var
|
|
1234
|
-
if (
|
|
1232
|
+
function l(g, _, N, D, fe, Se) {
|
|
1233
|
+
var f = _.children;
|
|
1234
|
+
if (f !== void 0)
|
|
1235
1235
|
if (D)
|
|
1236
|
-
if (q(
|
|
1237
|
-
for (D = 0; D <
|
|
1238
|
-
u(
|
|
1239
|
-
Object.freeze && Object.freeze(
|
|
1236
|
+
if (q(f)) {
|
|
1237
|
+
for (D = 0; D < f.length; D++)
|
|
1238
|
+
u(f[D]);
|
|
1239
|
+
Object.freeze && Object.freeze(f);
|
|
1240
1240
|
} else
|
|
1241
1241
|
console.error(
|
|
1242
1242
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
1243
1243
|
);
|
|
1244
|
-
else u(
|
|
1244
|
+
else u(f);
|
|
1245
1245
|
if (J.call(_, "key")) {
|
|
1246
|
-
|
|
1246
|
+
f = e(g);
|
|
1247
1247
|
var x = Object.keys(_).filter(function(h) {
|
|
1248
1248
|
return h !== "key";
|
|
1249
1249
|
});
|
|
1250
|
-
D = 0 < x.length ? "{key: someKey, " + x.join(": ..., ") + ": ...}" : "{key: someKey}",
|
|
1250
|
+
D = 0 < x.length ? "{key: someKey, " + x.join(": ..., ") + ": ...}" : "{key: someKey}", me[f + D] || (x = 0 < x.length ? "{" + x.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
1251
1251
|
`A props object containing a "key" prop is being spread into JSX:
|
|
1252
1252
|
let props = %s;
|
|
1253
1253
|
<%s {...props} />
|
|
@@ -1255,25 +1255,25 @@ React keys must be passed directly to JSX without using spread:
|
|
|
1255
1255
|
let props = %s;
|
|
1256
1256
|
<%s key={someKey} {...props} />`,
|
|
1257
1257
|
D,
|
|
1258
|
-
|
|
1258
|
+
f,
|
|
1259
1259
|
x,
|
|
1260
|
-
|
|
1261
|
-
),
|
|
1260
|
+
f
|
|
1261
|
+
), me[f + D] = !0);
|
|
1262
1262
|
}
|
|
1263
|
-
if (
|
|
1263
|
+
if (f = null, N !== void 0 && (i(N), f = "" + N), r(_) && (i(_.key), f = "" + _.key), "key" in _) {
|
|
1264
1264
|
N = {};
|
|
1265
1265
|
for (var E in _)
|
|
1266
1266
|
E !== "key" && (N[E] = _[E]);
|
|
1267
1267
|
} else N = _;
|
|
1268
|
-
return
|
|
1268
|
+
return f && d(
|
|
1269
1269
|
N,
|
|
1270
1270
|
typeof g == "function" ? g.displayName || g.name || "Unknown" : g
|
|
1271
|
-
),
|
|
1271
|
+
), p(
|
|
1272
1272
|
g,
|
|
1273
|
-
|
|
1273
|
+
f,
|
|
1274
1274
|
N,
|
|
1275
1275
|
n(),
|
|
1276
|
-
|
|
1276
|
+
fe,
|
|
1277
1277
|
Se
|
|
1278
1278
|
);
|
|
1279
1279
|
}
|
|
@@ -1294,7 +1294,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
1294
1294
|
var P, H = {}, M = z.react_stack_bottom_frame.bind(
|
|
1295
1295
|
z,
|
|
1296
1296
|
s
|
|
1297
|
-
)(), de = V(o(s)),
|
|
1297
|
+
)(), de = V(o(s)), me = {};
|
|
1298
1298
|
$e.Fragment = y, $e.jsx = function(g, _, N) {
|
|
1299
1299
|
var D = 1e4 > $.recentlyCreatedOwnerStacks++;
|
|
1300
1300
|
return l(
|
|
@@ -1351,8 +1351,8 @@ const Pr = (e, t) => {
|
|
|
1351
1351
|
},
|
|
1352
1352
|
getConflictingClassGroupIds: (r, d) => {
|
|
1353
1353
|
if (d) {
|
|
1354
|
-
const a = o[r],
|
|
1355
|
-
return a ?
|
|
1354
|
+
const a = o[r], p = i[r];
|
|
1355
|
+
return a ? p ? Pr(p, a) : a : p || yt;
|
|
1356
1356
|
}
|
|
1357
1357
|
return i[r] || yt;
|
|
1358
1358
|
}
|
|
@@ -1362,15 +1362,15 @@ const Pr = (e, t) => {
|
|
|
1362
1362
|
return i.classGroupId;
|
|
1363
1363
|
const n = e[t], s = i.nextPart.get(n);
|
|
1364
1364
|
if (s) {
|
|
1365
|
-
const
|
|
1366
|
-
if (
|
|
1365
|
+
const p = Wt(e, t + 1, s);
|
|
1366
|
+
if (p) return p;
|
|
1367
1367
|
}
|
|
1368
1368
|
const r = i.validators;
|
|
1369
1369
|
if (r === null)
|
|
1370
1370
|
return;
|
|
1371
1371
|
const d = t === 0 ? e.join(nt) : e.slice(t).join(nt), a = r.length;
|
|
1372
|
-
for (let
|
|
1373
|
-
const l = r[
|
|
1372
|
+
for (let p = 0; p < a; p++) {
|
|
1373
|
+
const l = r[p];
|
|
1374
1374
|
if (l.validator(d))
|
|
1375
1375
|
return l.classGroupId;
|
|
1376
1376
|
}
|
|
@@ -1387,10 +1387,10 @@ const Pr = (e, t) => {
|
|
|
1387
1387
|
const i = Ht();
|
|
1388
1388
|
for (const o in e) {
|
|
1389
1389
|
const n = e[o];
|
|
1390
|
-
|
|
1390
|
+
pt(n, i, o, t);
|
|
1391
1391
|
}
|
|
1392
1392
|
return i;
|
|
1393
|
-
},
|
|
1393
|
+
}, pt = (e, t, i, o) => {
|
|
1394
1394
|
const n = e.length;
|
|
1395
1395
|
for (let s = 0; s < n; s++) {
|
|
1396
1396
|
const r = e[s];
|
|
@@ -1411,7 +1411,7 @@ const Pr = (e, t) => {
|
|
|
1411
1411
|
o.classGroupId = i;
|
|
1412
1412
|
}, Ar = (e, t, i, o) => {
|
|
1413
1413
|
if (Ir(e)) {
|
|
1414
|
-
|
|
1414
|
+
pt(e(o), t, i, o);
|
|
1415
1415
|
return;
|
|
1416
1416
|
}
|
|
1417
1417
|
t.validators === null && (t.validators = []), t.validators.push(yr(i, e));
|
|
@@ -1419,7 +1419,7 @@ const Pr = (e, t) => {
|
|
|
1419
1419
|
const n = Object.entries(e), s = n.length;
|
|
1420
1420
|
for (let r = 0; r < s; r++) {
|
|
1421
1421
|
const [d, a] = n[r];
|
|
1422
|
-
|
|
1422
|
+
pt(a, Ut(t, d), i, o);
|
|
1423
1423
|
}
|
|
1424
1424
|
}, Ut = (e, t) => {
|
|
1425
1425
|
let i = e;
|
|
@@ -1467,7 +1467,7 @@ const Pr = (e, t) => {
|
|
|
1467
1467
|
} = e;
|
|
1468
1468
|
let o = (n) => {
|
|
1469
1469
|
const s = [];
|
|
1470
|
-
let r = 0, d = 0, a = 0,
|
|
1470
|
+
let r = 0, d = 0, a = 0, p;
|
|
1471
1471
|
const l = n.length;
|
|
1472
1472
|
for (let S = 0; S < l; S++) {
|
|
1473
1473
|
const y = n[S];
|
|
@@ -1477,7 +1477,7 @@ const Pr = (e, t) => {
|
|
|
1477
1477
|
continue;
|
|
1478
1478
|
}
|
|
1479
1479
|
if (y === "/") {
|
|
1480
|
-
|
|
1480
|
+
p = S;
|
|
1481
1481
|
continue;
|
|
1482
1482
|
}
|
|
1483
1483
|
}
|
|
@@ -1492,7 +1492,7 @@ const Pr = (e, t) => {
|
|
|
1492
1492
|
*/
|
|
1493
1493
|
u.startsWith(dt) && (c = u.slice(1), z = !0)
|
|
1494
1494
|
);
|
|
1495
|
-
const w =
|
|
1495
|
+
const w = p && p > a ? p - a : void 0;
|
|
1496
1496
|
return wt(s, z, c, w);
|
|
1497
1497
|
};
|
|
1498
1498
|
if (t) {
|
|
@@ -1533,8 +1533,8 @@ const Pr = (e, t) => {
|
|
|
1533
1533
|
sortModifiers: s
|
|
1534
1534
|
} = t, r = [], d = e.trim().split(Lr);
|
|
1535
1535
|
let a = "";
|
|
1536
|
-
for (let
|
|
1537
|
-
const l = d[
|
|
1536
|
+
for (let p = d.length - 1; p >= 0; p -= 1) {
|
|
1537
|
+
const l = d[p], {
|
|
1538
1538
|
isExternal: u,
|
|
1539
1539
|
modifiers: c,
|
|
1540
1540
|
hasImportantModifier: z,
|
|
@@ -1584,12 +1584,12 @@ const Pr = (e, t) => {
|
|
|
1584
1584
|
}, Gr = (e, ...t) => {
|
|
1585
1585
|
let i, o, n, s;
|
|
1586
1586
|
const r = (a) => {
|
|
1587
|
-
const
|
|
1588
|
-
return i = Or(
|
|
1587
|
+
const p = t.reduce((l, u) => u(l), e());
|
|
1588
|
+
return i = Or(p), o = i.cache.get, n = i.cache.set, s = d, d(a);
|
|
1589
1589
|
}, d = (a) => {
|
|
1590
|
-
const
|
|
1591
|
-
if (
|
|
1592
|
-
return
|
|
1590
|
+
const p = o(a);
|
|
1591
|
+
if (p)
|
|
1592
|
+
return p;
|
|
1593
1593
|
const l = jr(a, i);
|
|
1594
1594
|
return n(a, l), l;
|
|
1595
1595
|
};
|
|
@@ -1609,7 +1609,7 @@ const Pr = (e, t) => {
|
|
|
1609
1609
|
const o = Yt.exec(e);
|
|
1610
1610
|
return o ? o[1] ? t(o[1]) : i : !1;
|
|
1611
1611
|
}, Xt = (e) => e === "position" || e === "percentage", Jt = (e) => e === "image" || e === "url", Zt = (e) => e === "length" || e === "size" || e === "bg-size", Qt = (e) => e === "length", sn = (e) => e === "number", an = (e) => e === "family-name", Kt = (e) => e === "shadow", ln = () => {
|
|
1612
|
-
const e = ze("color"), t = ze("font"), i = ze("text"), o = ze("font-weight"), n = ze("tracking"), s = ze("leading"), r = ze("breakpoint"), d = ze("container"), a = ze("spacing"),
|
|
1612
|
+
const e = ze("color"), t = ze("font"), i = ze("text"), o = ze("font-weight"), n = ze("tracking"), s = ze("leading"), r = ze("breakpoint"), d = ze("container"), a = ze("spacing"), p = ze("radius"), l = ze("shadow"), u = ze("inset-shadow"), c = ze("text-shadow"), z = ze("drop-shadow"), w = ze("blur"), S = ze("perspective"), y = ze("aspect"), b = ze("ease"), k = ze("animate"), C = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], j = () => [
|
|
1613
1613
|
"center",
|
|
1614
1614
|
"top",
|
|
1615
1615
|
"bottom",
|
|
@@ -1631,7 +1631,7 @@ const Pr = (e, t) => {
|
|
|
1631
1631
|
span: ["full", Be, A, R]
|
|
1632
1632
|
}, Be, A, R], $ = () => [Be, "auto", A, R], J = () => ["auto", "min", "max", "fr", A, R], q = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], V = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], P = () => ["auto", ...v()], H = () => [je, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...v()], M = () => [e, A, R], de = () => [...j(), kt, Ct, {
|
|
1633
1633
|
position: [A, R]
|
|
1634
|
-
}],
|
|
1634
|
+
}], me = () => ["no-repeat", {
|
|
1635
1635
|
repeat: ["", "x", "y", "space", "round"]
|
|
1636
1636
|
}], g = () => ["auto", "cover", "contain", nn, en, {
|
|
1637
1637
|
size: [A, R]
|
|
@@ -1640,10 +1640,10 @@ const Pr = (e, t) => {
|
|
|
1640
1640
|
"",
|
|
1641
1641
|
"none",
|
|
1642
1642
|
"full",
|
|
1643
|
-
|
|
1643
|
+
p,
|
|
1644
1644
|
A,
|
|
1645
1645
|
R
|
|
1646
|
-
], D = () => ["", Q, Ve, Ne],
|
|
1646
|
+
], D = () => ["", Q, Ve, Ne], fe = () => ["solid", "dashed", "dotted", "double"], Se = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], f = () => [Q, st, kt, Ct], x = () => [
|
|
1647
1647
|
// Deprecated since Tailwind CSS v4.0.0
|
|
1648
1648
|
"",
|
|
1649
1649
|
"none",
|
|
@@ -2484,7 +2484,7 @@ const Pr = (e, t) => {
|
|
|
2484
2484
|
* @see https://tailwindcss.com/docs/text-decoration-style
|
|
2485
2485
|
*/
|
|
2486
2486
|
"text-decoration-style": [{
|
|
2487
|
-
decoration: [...
|
|
2487
|
+
decoration: [...fe(), "wavy"]
|
|
2488
2488
|
}],
|
|
2489
2489
|
/**
|
|
2490
2490
|
* Text Decoration Thickness
|
|
@@ -2609,7 +2609,7 @@ const Pr = (e, t) => {
|
|
|
2609
2609
|
* @see https://tailwindcss.com/docs/background-repeat
|
|
2610
2610
|
*/
|
|
2611
2611
|
"bg-repeat": [{
|
|
2612
|
-
bg:
|
|
2612
|
+
bg: me()
|
|
2613
2613
|
}],
|
|
2614
2614
|
/**
|
|
2615
2615
|
* Background Size
|
|
@@ -2880,14 +2880,14 @@ const Pr = (e, t) => {
|
|
|
2880
2880
|
* @see https://tailwindcss.com/docs/border-style
|
|
2881
2881
|
*/
|
|
2882
2882
|
"border-style": [{
|
|
2883
|
-
border: [...
|
|
2883
|
+
border: [...fe(), "hidden", "none"]
|
|
2884
2884
|
}],
|
|
2885
2885
|
/**
|
|
2886
2886
|
* Divide Style
|
|
2887
2887
|
* @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
|
|
2888
2888
|
*/
|
|
2889
2889
|
"divide-style": [{
|
|
2890
|
-
divide: [...
|
|
2890
|
+
divide: [...fe(), "hidden", "none"]
|
|
2891
2891
|
}],
|
|
2892
2892
|
/**
|
|
2893
2893
|
* Border Color
|
|
@@ -2964,7 +2964,7 @@ const Pr = (e, t) => {
|
|
|
2964
2964
|
* @see https://tailwindcss.com/docs/outline-style
|
|
2965
2965
|
*/
|
|
2966
2966
|
"outline-style": [{
|
|
2967
|
-
outline: [...
|
|
2967
|
+
outline: [...fe(), "none", "hidden"]
|
|
2968
2968
|
}],
|
|
2969
2969
|
/**
|
|
2970
2970
|
* Outline Offset
|
|
@@ -3135,10 +3135,10 @@ const Pr = (e, t) => {
|
|
|
3135
3135
|
"mask-linear": [Q]
|
|
3136
3136
|
}],
|
|
3137
3137
|
"mask-image-linear-from-pos": [{
|
|
3138
|
-
"mask-linear-from":
|
|
3138
|
+
"mask-linear-from": f()
|
|
3139
3139
|
}],
|
|
3140
3140
|
"mask-image-linear-to-pos": [{
|
|
3141
|
-
"mask-linear-to":
|
|
3141
|
+
"mask-linear-to": f()
|
|
3142
3142
|
}],
|
|
3143
3143
|
"mask-image-linear-from-color": [{
|
|
3144
3144
|
"mask-linear-from": M()
|
|
@@ -3147,10 +3147,10 @@ const Pr = (e, t) => {
|
|
|
3147
3147
|
"mask-linear-to": M()
|
|
3148
3148
|
}],
|
|
3149
3149
|
"mask-image-t-from-pos": [{
|
|
3150
|
-
"mask-t-from":
|
|
3150
|
+
"mask-t-from": f()
|
|
3151
3151
|
}],
|
|
3152
3152
|
"mask-image-t-to-pos": [{
|
|
3153
|
-
"mask-t-to":
|
|
3153
|
+
"mask-t-to": f()
|
|
3154
3154
|
}],
|
|
3155
3155
|
"mask-image-t-from-color": [{
|
|
3156
3156
|
"mask-t-from": M()
|
|
@@ -3159,10 +3159,10 @@ const Pr = (e, t) => {
|
|
|
3159
3159
|
"mask-t-to": M()
|
|
3160
3160
|
}],
|
|
3161
3161
|
"mask-image-r-from-pos": [{
|
|
3162
|
-
"mask-r-from":
|
|
3162
|
+
"mask-r-from": f()
|
|
3163
3163
|
}],
|
|
3164
3164
|
"mask-image-r-to-pos": [{
|
|
3165
|
-
"mask-r-to":
|
|
3165
|
+
"mask-r-to": f()
|
|
3166
3166
|
}],
|
|
3167
3167
|
"mask-image-r-from-color": [{
|
|
3168
3168
|
"mask-r-from": M()
|
|
@@ -3171,10 +3171,10 @@ const Pr = (e, t) => {
|
|
|
3171
3171
|
"mask-r-to": M()
|
|
3172
3172
|
}],
|
|
3173
3173
|
"mask-image-b-from-pos": [{
|
|
3174
|
-
"mask-b-from":
|
|
3174
|
+
"mask-b-from": f()
|
|
3175
3175
|
}],
|
|
3176
3176
|
"mask-image-b-to-pos": [{
|
|
3177
|
-
"mask-b-to":
|
|
3177
|
+
"mask-b-to": f()
|
|
3178
3178
|
}],
|
|
3179
3179
|
"mask-image-b-from-color": [{
|
|
3180
3180
|
"mask-b-from": M()
|
|
@@ -3183,10 +3183,10 @@ const Pr = (e, t) => {
|
|
|
3183
3183
|
"mask-b-to": M()
|
|
3184
3184
|
}],
|
|
3185
3185
|
"mask-image-l-from-pos": [{
|
|
3186
|
-
"mask-l-from":
|
|
3186
|
+
"mask-l-from": f()
|
|
3187
3187
|
}],
|
|
3188
3188
|
"mask-image-l-to-pos": [{
|
|
3189
|
-
"mask-l-to":
|
|
3189
|
+
"mask-l-to": f()
|
|
3190
3190
|
}],
|
|
3191
3191
|
"mask-image-l-from-color": [{
|
|
3192
3192
|
"mask-l-from": M()
|
|
@@ -3195,10 +3195,10 @@ const Pr = (e, t) => {
|
|
|
3195
3195
|
"mask-l-to": M()
|
|
3196
3196
|
}],
|
|
3197
3197
|
"mask-image-x-from-pos": [{
|
|
3198
|
-
"mask-x-from":
|
|
3198
|
+
"mask-x-from": f()
|
|
3199
3199
|
}],
|
|
3200
3200
|
"mask-image-x-to-pos": [{
|
|
3201
|
-
"mask-x-to":
|
|
3201
|
+
"mask-x-to": f()
|
|
3202
3202
|
}],
|
|
3203
3203
|
"mask-image-x-from-color": [{
|
|
3204
3204
|
"mask-x-from": M()
|
|
@@ -3207,10 +3207,10 @@ const Pr = (e, t) => {
|
|
|
3207
3207
|
"mask-x-to": M()
|
|
3208
3208
|
}],
|
|
3209
3209
|
"mask-image-y-from-pos": [{
|
|
3210
|
-
"mask-y-from":
|
|
3210
|
+
"mask-y-from": f()
|
|
3211
3211
|
}],
|
|
3212
3212
|
"mask-image-y-to-pos": [{
|
|
3213
|
-
"mask-y-to":
|
|
3213
|
+
"mask-y-to": f()
|
|
3214
3214
|
}],
|
|
3215
3215
|
"mask-image-y-from-color": [{
|
|
3216
3216
|
"mask-y-from": M()
|
|
@@ -3222,10 +3222,10 @@ const Pr = (e, t) => {
|
|
|
3222
3222
|
"mask-radial": [A, R]
|
|
3223
3223
|
}],
|
|
3224
3224
|
"mask-image-radial-from-pos": [{
|
|
3225
|
-
"mask-radial-from":
|
|
3225
|
+
"mask-radial-from": f()
|
|
3226
3226
|
}],
|
|
3227
3227
|
"mask-image-radial-to-pos": [{
|
|
3228
|
-
"mask-radial-to":
|
|
3228
|
+
"mask-radial-to": f()
|
|
3229
3229
|
}],
|
|
3230
3230
|
"mask-image-radial-from-color": [{
|
|
3231
3231
|
"mask-radial-from": M()
|
|
@@ -3249,10 +3249,10 @@ const Pr = (e, t) => {
|
|
|
3249
3249
|
"mask-conic": [Q]
|
|
3250
3250
|
}],
|
|
3251
3251
|
"mask-image-conic-from-pos": [{
|
|
3252
|
-
"mask-conic-from":
|
|
3252
|
+
"mask-conic-from": f()
|
|
3253
3253
|
}],
|
|
3254
3254
|
"mask-image-conic-to-pos": [{
|
|
3255
|
-
"mask-conic-to":
|
|
3255
|
+
"mask-conic-to": f()
|
|
3256
3256
|
}],
|
|
3257
3257
|
"mask-image-conic-from-color": [{
|
|
3258
3258
|
"mask-conic-from": M()
|
|
@@ -3286,7 +3286,7 @@ const Pr = (e, t) => {
|
|
|
3286
3286
|
* @see https://tailwindcss.com/docs/mask-repeat
|
|
3287
3287
|
*/
|
|
3288
3288
|
"mask-repeat": [{
|
|
3289
|
-
mask:
|
|
3289
|
+
mask: me()
|
|
3290
3290
|
}],
|
|
3291
3291
|
/**
|
|
3292
3292
|
* Mask Size
|
|
@@ -4079,7 +4079,7 @@ const Pr = (e, t) => {
|
|
|
4079
4079
|
orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
|
|
4080
4080
|
};
|
|
4081
4081
|
}, qe = /* @__PURE__ */ Gr(ln), cn = ({ panel: e, measuredPixelSize: t, measuredPercentageSize: i, containerAxisSize: o, containerLabel: n }) => {
|
|
4082
|
-
const s = e?.size, r = typeof s == "number" && Number.isFinite(s) ? `${s.toFixed(3)}px` : "-", d = e?.percentageSize !== void 0 ? `${e.percentageSize.toFixed(3)}%` : "-", a = Number.isFinite(t) ? `${t.toFixed(3)}px` : "-",
|
|
4082
|
+
const s = e?.size, r = typeof s == "number" && Number.isFinite(s) ? `${s.toFixed(3)}px` : "-", d = e?.percentageSize !== void 0 ? `${e.percentageSize.toFixed(3)}%` : "-", a = Number.isFinite(t) ? `${t.toFixed(3)}px` : "-", p = Number.isFinite(i) ? `${i.toFixed(3)}%` : "-", l = Number.isFinite(o) ? `${o.toFixed(3)}px` : "-", u = `${r} / ${d}`, c = `${a} / ${p}`, z = e?.sizeUnit === "pixels" ? "Fixed" : "Flexible", w = [z, `${n}: ${l}`, `size (state): ${u}`, `size (measured): ${c}`];
|
|
4083
4083
|
return {
|
|
4084
4084
|
stateValueDisplay: u,
|
|
4085
4085
|
measuredValueDisplay: c,
|
|
@@ -4089,7 +4089,7 @@ const Pr = (e, t) => {
|
|
|
4089
4089
|
`)
|
|
4090
4090
|
};
|
|
4091
4091
|
}, dn = ut(({ panel: e, measuredPixelSize: t, measuredPercentageSize: i, containerAxisSize: o, direction: n }) => {
|
|
4092
|
-
const s = n === "horizontal" ? "container width" : "container height", { stateValueDisplay: r, measuredValueDisplay: d, containerDisplay: a, headlineLabel:
|
|
4092
|
+
const s = n === "horizontal" ? "container width" : "container height", { stateValueDisplay: r, measuredValueDisplay: d, containerDisplay: a, headlineLabel: p, titleText: l } = ue(
|
|
4093
4093
|
() => cn({
|
|
4094
4094
|
panel: e,
|
|
4095
4095
|
measuredPixelSize: t,
|
|
@@ -4150,7 +4150,7 @@ const Pr = (e, t) => {
|
|
|
4150
4150
|
whiteSpace: "nowrap"
|
|
4151
4151
|
};
|
|
4152
4152
|
return /* @__PURE__ */ I.jsx("div", { style: u, title: l, children: /* @__PURE__ */ I.jsxs("div", { style: c, children: [
|
|
4153
|
-
/* @__PURE__ */ I.jsx("div", { style: z, children: /* @__PURE__ */ I.jsx("span", { children:
|
|
4153
|
+
/* @__PURE__ */ I.jsx("div", { style: z, children: /* @__PURE__ */ I.jsx("span", { children: p }) }),
|
|
4154
4154
|
/* @__PURE__ */ I.jsxs("div", { style: w, children: [
|
|
4155
4155
|
/* @__PURE__ */ I.jsx("span", { children: s }),
|
|
4156
4156
|
/* @__PURE__ */ I.jsx("span", { style: S, children: a })
|
|
@@ -4177,7 +4177,7 @@ const Pr = (e, t) => {
|
|
|
4177
4177
|
collapseFromStart: !1,
|
|
4178
4178
|
collapseFromEnd: !0
|
|
4179
4179
|
}
|
|
4180
|
-
},
|
|
4180
|
+
}, fn = (e) => {
|
|
4181
4181
|
if (!e)
|
|
4182
4182
|
return {
|
|
4183
4183
|
collapseFromStart: !1,
|
|
@@ -4196,20 +4196,20 @@ const Pr = (e, t) => {
|
|
|
4196
4196
|
[o]: s
|
|
4197
4197
|
}), t(s));
|
|
4198
4198
|
}, Nn = ut(
|
|
4199
|
-
({ id: e, defaultSize: t = { value: 50, unit: "percentage" }, minSize: i, maxSize: o, autoMinSize: n, className: s, style: r, children: d, order: a = 0, collapsible:
|
|
4200
|
-
const { direction: w, registerPanel: S, unregisterPanel: y, getPanel: b, showDebugInfo: k, isContainerReady: C, reportPanelMeasurement: j, containerSize: K } =
|
|
4199
|
+
({ id: e, defaultSize: t = { value: 50, unit: "percentage" }, minSize: i, maxSize: o, autoMinSize: n, className: s, style: r, children: d, order: a = 0, collapsible: p, defaultCollapsed: l = !1, pixelAdjustPriority: u, flexAdjustPriority: c, contentOverflow: z = "auto" }) => {
|
|
4200
|
+
const { direction: w, registerPanel: S, unregisterPanel: y, getPanel: b, showDebugInfo: k, isContainerReady: C, reportPanelMeasurement: j, containerSize: K } = ft(), ee = pe(null), se = Bt(), v = pe(e || `panel-${se}`), F = ue(() => fn(p), [p]), O = F.collapseFromStart || F.collapseFromEnd, oe = ue(() => O ? F.collapseFromStart ? "start" : F.collapseFromEnd ? "end" : null : null, [O, F.collapseFromStart, F.collapseFromEnd]), $ = O && l, J = ue(() => lt(t), [t]), q = J?.unit === "pixels", V = q ? void 0 : J?.value, P = b(v.current), H = !!P?.collapsed, M = (P?.size ?? 0) <= 0, de = H || M, [me, g] = ke(() => q && J ? J.value : P?.size !== void 0 ? P.size : 0), [_, N] = ke(() => !q && J ? J.value : P?.percentageSize !== void 0 ? P.percentageSize : 0), D = pe(_);
|
|
4201
4201
|
D.current = _;
|
|
4202
|
-
const
|
|
4203
|
-
|
|
4202
|
+
const fe = pe(me);
|
|
4203
|
+
fe.current = me;
|
|
4204
4204
|
const Se = ue(
|
|
4205
4205
|
() => Et({
|
|
4206
|
-
ref:
|
|
4206
|
+
ref: fe,
|
|
4207
4207
|
setState: g,
|
|
4208
4208
|
panelIdRef: v,
|
|
4209
4209
|
label: "pixel"
|
|
4210
4210
|
}),
|
|
4211
4211
|
[]
|
|
4212
|
-
),
|
|
4212
|
+
), f = ue(
|
|
4213
4213
|
() => Et({
|
|
4214
4214
|
ref: D,
|
|
4215
4215
|
setState: N,
|
|
@@ -4218,11 +4218,9 @@ const Pr = (e, t) => {
|
|
|
4218
4218
|
}),
|
|
4219
4219
|
[]
|
|
4220
4220
|
), x = be(() => {
|
|
4221
|
-
|
|
4221
|
+
fe.current !== 0 && (fe.current = 0, g(0)), D.current !== 0 && (D.current = 0, N(0));
|
|
4222
4222
|
}, []);
|
|
4223
|
-
|
|
4224
|
-
e || console.warn("Panel component should have an explicit 'id' prop to avoid hydration issues. Auto-generated ID may cause SSR/client mismatch.");
|
|
4225
|
-
}, [e]), me(() => {
|
|
4223
|
+
ge(() => {
|
|
4226
4224
|
if (!C)
|
|
4227
4225
|
return;
|
|
4228
4226
|
let T = 0;
|
|
@@ -4278,7 +4276,7 @@ const Pr = (e, t) => {
|
|
|
4278
4276
|
y
|
|
4279
4277
|
]);
|
|
4280
4278
|
const E = P?.size ?? 0;
|
|
4281
|
-
|
|
4279
|
+
ge(() => {
|
|
4282
4280
|
const T = ee.current;
|
|
4283
4281
|
if (!T) return;
|
|
4284
4282
|
const Y = () => {
|
|
@@ -4302,10 +4300,10 @@ const Pr = (e, t) => {
|
|
|
4302
4300
|
return;
|
|
4303
4301
|
}
|
|
4304
4302
|
if (ce > 0) {
|
|
4305
|
-
Se(ce), ye > 0 &&
|
|
4303
|
+
Se(ce), ye > 0 && f(ce / ye * 100);
|
|
4306
4304
|
return;
|
|
4307
4305
|
}
|
|
4308
|
-
P.size !== void 0 && Se(P.size), P.percentageSize !== void 0 ?
|
|
4306
|
+
P.size !== void 0 && Se(P.size), P.percentageSize !== void 0 ? f(P.percentageSize) : P.sizeUnit === "pixels" && P.size !== void 0 && ye > 0 && f(P.size / ye * 100);
|
|
4309
4307
|
}, le = new ResizeObserver(() => {
|
|
4310
4308
|
Y();
|
|
4311
4309
|
});
|
|
@@ -4314,7 +4312,7 @@ const Pr = (e, t) => {
|
|
|
4314
4312
|
(() => {
|
|
4315
4313
|
if (!ee.current) return !1;
|
|
4316
4314
|
const G = ee.current.getBoundingClientRect();
|
|
4317
|
-
return (w === "horizontal" ? G.width : G.height) !==
|
|
4315
|
+
return (w === "horizontal" ? G.width : G.height) !== fe.current;
|
|
4318
4316
|
})() && setTimeout(Y, 0);
|
|
4319
4317
|
}), xe = T.parentElement;
|
|
4320
4318
|
return xe && ne.observe(xe, {
|
|
@@ -4327,33 +4325,33 @@ const Pr = (e, t) => {
|
|
|
4327
4325
|
for (const m of he)
|
|
4328
4326
|
clearTimeout(m);
|
|
4329
4327
|
};
|
|
4330
|
-
}, [
|
|
4328
|
+
}, [f, Se, P, w, de, x]);
|
|
4331
4329
|
const h = P?.size, B = P?.percentageSize, L = P?.sizeUnit;
|
|
4332
|
-
|
|
4330
|
+
ge(() => {
|
|
4333
4331
|
if (P) {
|
|
4334
4332
|
if (de) {
|
|
4335
4333
|
x();
|
|
4336
4334
|
return;
|
|
4337
4335
|
}
|
|
4338
4336
|
if (h !== void 0 && Se(h), B !== void 0)
|
|
4339
|
-
|
|
4337
|
+
f(B);
|
|
4340
4338
|
else if (L === "pixels" && h !== void 0) {
|
|
4341
4339
|
const T = ee.current, Y = T?.parentElement;
|
|
4342
4340
|
if (T && Y) {
|
|
4343
4341
|
const { width: le, height: he } = T.getBoundingClientRect(), ne = Y.clientWidth, xe = Y.clientHeight, m = w === "horizontal" ? le : he, G = w === "horizontal" ? ne : xe;
|
|
4344
4342
|
if (m > 0 && G > 0) {
|
|
4345
4343
|
const te = m / G * 100;
|
|
4346
|
-
|
|
4344
|
+
f(te);
|
|
4347
4345
|
}
|
|
4348
4346
|
}
|
|
4349
4347
|
}
|
|
4350
4348
|
}
|
|
4351
|
-
}, [
|
|
4349
|
+
}, [f, Se, P, B, h, L, w, de, x]), ge(() => {
|
|
4352
4350
|
j(v.current, {
|
|
4353
|
-
pixelSize:
|
|
4351
|
+
pixelSize: me,
|
|
4354
4352
|
percentageSize: _
|
|
4355
4353
|
});
|
|
4356
|
-
}, [j,
|
|
4354
|
+
}, [j, me, _]);
|
|
4357
4355
|
const X = () => de ? "0px" : P?.originalPixelSize !== void 0 ? `${E}px` : P?.percentageSize !== void 0 ? `${P.percentageSize}%` : `${E}px`, re = P?.sizeUnit === "percentage" && !P?.collapsed ? 1 : 0, W = {
|
|
4358
4356
|
flexBasis: X(),
|
|
4359
4357
|
flexGrow: 0,
|
|
@@ -4398,12 +4396,12 @@ const Pr = (e, t) => {
|
|
|
4398
4396
|
"aria-hidden": de,
|
|
4399
4397
|
children: [
|
|
4400
4398
|
/* @__PURE__ */ I.jsx("div", { style: Z, children: d }),
|
|
4401
|
-
k && /* @__PURE__ */ I.jsx(dn, { panel: P, measuredPixelSize:
|
|
4399
|
+
k && /* @__PURE__ */ I.jsx(dn, { panel: P, measuredPixelSize: me, measuredPercentageSize: _, containerAxisSize: U, direction: w })
|
|
4402
4400
|
]
|
|
4403
4401
|
}
|
|
4404
4402
|
);
|
|
4405
4403
|
}
|
|
4406
|
-
),
|
|
4404
|
+
), pn = (e) => JSON.stringify(
|
|
4407
4405
|
e.map((t) => ({
|
|
4408
4406
|
id: t.id,
|
|
4409
4407
|
size: t.size,
|
|
@@ -4446,7 +4444,7 @@ const Pr = (e, t) => {
|
|
|
4446
4444
|
const a = () => {
|
|
4447
4445
|
for (const b of e)
|
|
4448
4446
|
b();
|
|
4449
|
-
},
|
|
4447
|
+
}, p = () => {
|
|
4450
4448
|
s = !0, a();
|
|
4451
4449
|
}, l = () => {
|
|
4452
4450
|
const b = o;
|
|
@@ -4467,13 +4465,13 @@ const Pr = (e, t) => {
|
|
|
4467
4465
|
getOwnerId: () => (l() && (s = !0), o),
|
|
4468
4466
|
enableGroup: (b) => {
|
|
4469
4467
|
const k = i.size;
|
|
4470
|
-
i.add(b), i.size !== k && l() &&
|
|
4468
|
+
i.add(b), i.size !== k && l() && p();
|
|
4471
4469
|
},
|
|
4472
4470
|
disableGroup: (b) => {
|
|
4473
|
-
i.delete(b) && l() &&
|
|
4471
|
+
i.delete(b) && l() && p();
|
|
4474
4472
|
},
|
|
4475
4473
|
updateGroup: (b, k) => {
|
|
4476
|
-
const C = t.get(b), j = C?.index ?? n++, K =
|
|
4474
|
+
const C = t.get(b), j = C?.index ?? n++, K = pn(k.panels), ee = mn(k.handles), se = C?.displayName !== k.displayName, v = C?.direction !== k.direction, F = C ? C.containerSize.width !== k.containerSize.width || C.containerSize.height !== k.containerSize.height : !0;
|
|
4477
4475
|
let O = C?.serializedPanels !== K;
|
|
4478
4476
|
if (!O && C)
|
|
4479
4477
|
if (C.panels.length !== k.panels.length)
|
|
@@ -4519,11 +4517,11 @@ const Pr = (e, t) => {
|
|
|
4519
4517
|
index: j,
|
|
4520
4518
|
serializedPanels: K,
|
|
4521
4519
|
serializedHandles: ee
|
|
4522
|
-
}),
|
|
4520
|
+
}), p();
|
|
4523
4521
|
},
|
|
4524
4522
|
removeGroup: (b) => {
|
|
4525
4523
|
const k = t.delete(b), C = i.delete(b), j = l();
|
|
4526
|
-
(k || C || j) &&
|
|
4524
|
+
(k || C || j) && p();
|
|
4527
4525
|
}
|
|
4528
4526
|
};
|
|
4529
4527
|
}, Me = gn(), hn = () => Tt(Me.subscribe, Me.getOwnerId, Me.getOwnerId), xn = () => Tt(Me.subscribe, Me.getSnapshot, Me.getSnapshot), zn = (e) => {
|
|
@@ -4626,7 +4624,7 @@ const bn = () => (At += 1, `panel-group-${At}`), De = (e, t) => typeof e != "num
|
|
|
4626
4624
|
const o = Le(e, "horizontal"), n = Le(e, "vertical"), s = e.getBoundingClientRect(), r = o.inner > 0 ? o.inner : t ?? s.width, d = n.inner > 0 ? n.inner : i ?? s.height;
|
|
4627
4625
|
return { width: r, height: d };
|
|
4628
4626
|
}, Fn = (e) => {
|
|
4629
|
-
const { id: t, className: i, style: o, children: n, direction: s } = e, { groupRef: r, contextValue: d, groupStyle: a } = xr(e), [
|
|
4627
|
+
const { id: t, className: i, style: o, children: n, direction: s } = e, { groupRef: r, contextValue: d, groupStyle: a } = xr(e), [p, l] = ke({ width: 0, height: 0 }), u = d.layoutConstraintViolation, c = !!u, z = ue(() => {
|
|
4630
4628
|
if (!u)
|
|
4631
4629
|
return null;
|
|
4632
4630
|
const { summary: $, detail: J } = Rn(u);
|
|
@@ -4641,12 +4639,12 @@ const bn = () => (At += 1, `panel-group-${At}`), De = (e, t) => typeof e != "num
|
|
|
4641
4639
|
]
|
|
4642
4640
|
}
|
|
4643
4641
|
);
|
|
4644
|
-
}, [u]), S =
|
|
4642
|
+
}, [u]), S = pe(t ?? bn()).current, y = t ?? S, b = d.showDebugInfo && d.panels.length > 0, k = b ? d.panels : [], C = b ? d.panelMeasurements : {}, j = ue(() => {
|
|
4645
4643
|
if (!b)
|
|
4646
4644
|
return [];
|
|
4647
4645
|
const $ = Object.values(d.handleMeasurements);
|
|
4648
4646
|
return $.length <= 1 ? $ : $.slice().sort((J, q) => J.id.localeCompare(q.id));
|
|
4649
|
-
}, [d.handleMeasurements, b]), K = d.containerSize, ee =
|
|
4647
|
+
}, [d.handleMeasurements, b]), K = d.containerSize, ee = p.width > 0 ? p.width : K.width, se = p.height > 0 ? p.height : K.height, v = hn(), F = b && v === S;
|
|
4650
4648
|
rt(() => {
|
|
4651
4649
|
if (!b) {
|
|
4652
4650
|
l({ width: 0, height: 0 });
|
|
@@ -4672,7 +4670,7 @@ const bn = () => (At += 1, `panel-group-${At}`), De = (e, t) => typeof e != "num
|
|
|
4672
4670
|
};
|
|
4673
4671
|
}, [r, b]);
|
|
4674
4672
|
const O = ue(() => An(k, C), [k, C]);
|
|
4675
|
-
|
|
4673
|
+
ge(() => {
|
|
4676
4674
|
if (!b) {
|
|
4677
4675
|
Mt(S), Rt(S);
|
|
4678
4676
|
return;
|
|
@@ -4680,7 +4678,7 @@ const bn = () => (At += 1, `panel-group-${At}`), De = (e, t) => typeof e != "num
|
|
|
4680
4678
|
return zn(S), () => {
|
|
4681
4679
|
Mt(S), Rt(S);
|
|
4682
4680
|
};
|
|
4683
|
-
}, [b, S]),
|
|
4681
|
+
}, [b, S]), ge(() => {
|
|
4684
4682
|
b && Sn(S, {
|
|
4685
4683
|
displayName: y,
|
|
4686
4684
|
direction: s,
|
|
@@ -4727,7 +4725,7 @@ const bn = () => (At += 1, `panel-group-${At}`), De = (e, t) => typeof e != "num
|
|
|
4727
4725
|
const t = xn().groups, [i, o] = ke(!0);
|
|
4728
4726
|
if (t.length === 0 || typeof document > "u")
|
|
4729
4727
|
return null;
|
|
4730
|
-
const n = t.reduce((a,
|
|
4728
|
+
const n = t.reduce((a, p) => a + p.panels.length, 0), s = t.reduce((a, p) => a + (p.handles?.length ?? 0), 0), r = () => o((a) => !a), d = /* @__PURE__ */ I.jsxs(
|
|
4731
4729
|
"div",
|
|
4732
4730
|
{
|
|
4733
4731
|
style: {
|
|
@@ -4793,7 +4791,7 @@ const bn = () => (At += 1, `panel-group-${At}`), De = (e, t) => typeof e != "num
|
|
|
4793
4791
|
overflowY: "auto",
|
|
4794
4792
|
paddingRight: "6px"
|
|
4795
4793
|
},
|
|
4796
|
-
children: t.map((a,
|
|
4794
|
+
children: t.map((a, p) => {
|
|
4797
4795
|
const l = a.direction === "horizontal" ? a.containerSize.width : a.containerSize.height;
|
|
4798
4796
|
return /* @__PURE__ */ I.jsxs("div", { style: Cn, children: [
|
|
4799
4797
|
/* @__PURE__ */ I.jsxs(
|
|
@@ -4817,7 +4815,7 @@ const bn = () => (At += 1, `panel-group-${At}`), De = (e, t) => typeof e != "num
|
|
|
4817
4815
|
},
|
|
4818
4816
|
children: [
|
|
4819
4817
|
"group ",
|
|
4820
|
-
|
|
4818
|
+
p + 1,
|
|
4821
4819
|
": ",
|
|
4822
4820
|
a.displayName
|
|
4823
4821
|
]
|
|
@@ -4894,8 +4892,8 @@ const bn = () => (At += 1, `panel-group-${At}`), De = (e, t) => typeof e != "num
|
|
|
4894
4892
|
);
|
|
4895
4893
|
return lr(d, document.body);
|
|
4896
4894
|
}, On = ut(({ id: e, disabled: t = !1, className: i, style: o, children: n, onDragging: s }) => {
|
|
4897
|
-
const { direction: r, resizePanels: d, getPanel: a, collapsePanel:
|
|
4898
|
-
|
|
4895
|
+
const { direction: r, resizePanels: d, getPanel: a, collapsePanel: p, expandPanel: l, panels: u, reportHandleMeasurement: c, containerSize: z, layoutConstraintViolation: w } = ft(), [S, y] = ke(!1), b = pe(null), k = pe(null), C = pe(""), j = pe(""), [K, ee] = ke({ left: null, right: null }), se = Bt(), v = pe(e ?? `resize-handle-${se}`), F = pe(null), O = e ?? v.current, oe = !!w, $ = t || oe;
|
|
4896
|
+
ge(() => {
|
|
4899
4897
|
if (b.current) {
|
|
4900
4898
|
const h = b.current.parentElement;
|
|
4901
4899
|
if (h) {
|
|
@@ -4924,12 +4922,12 @@ const bn = () => (At += 1, `panel-group-${At}`), De = (e, t) => typeof e != "num
|
|
|
4924
4922
|
}
|
|
4925
4923
|
}
|
|
4926
4924
|
}
|
|
4927
|
-
}, []),
|
|
4925
|
+
}, []), ge(() => {
|
|
4928
4926
|
if (O === v.current)
|
|
4929
4927
|
return;
|
|
4930
4928
|
const h = v.current;
|
|
4931
4929
|
v.current = O, F.current = null, h !== O && c(h, null);
|
|
4932
|
-
}, [c, O]),
|
|
4930
|
+
}, [c, O]), ge(() => {
|
|
4933
4931
|
const h = v.current;
|
|
4934
4932
|
return () => {
|
|
4935
4933
|
c(h, null);
|
|
@@ -4956,14 +4954,14 @@ const bn = () => (At += 1, `panel-group-${At}`), De = (e, t) => typeof e != "num
|
|
|
4956
4954
|
return;
|
|
4957
4955
|
const G = U + m, te = Z - m, ie = a(C.current), ce = a(j.current);
|
|
4958
4956
|
if (ie && ce && C.current && j.current) {
|
|
4959
|
-
const ye = ae(ie.minSize, 0, L), Re = ae(ce.minSize, 0, L), we = ye, Ae = Re, Ie = Math.min(L * Lt, jt), Ee = Math.min(L * ur,
|
|
4957
|
+
const ye = ae(ie.minSize, 0, L), Re = ae(ce.minSize, 0, L), we = ye, Ae = Re, Ie = Math.min(L * Lt, jt), Ee = Math.min(L * ur, fr), Te = ce.collapseFromStart, er = ce.collapsedByDirection ?? "start";
|
|
4960
4958
|
if (Te && !ce.collapsed && te <= Math.max(Re * 0.3, Ie)) {
|
|
4961
|
-
|
|
4959
|
+
p(j.current, "start");
|
|
4962
4960
|
return;
|
|
4963
4961
|
}
|
|
4964
4962
|
const tr = ie.collapseFromEnd, rr = ie.collapsedByDirection ?? "end";
|
|
4965
4963
|
if (tr && !ie.collapsed && G <= Math.max(ye * 0.3, Ie)) {
|
|
4966
|
-
|
|
4964
|
+
p(C.current, "end");
|
|
4967
4965
|
return;
|
|
4968
4966
|
}
|
|
4969
4967
|
if (ce.collapsed && te > Math.max(Re * 0.3, Ee)) {
|
|
@@ -4996,7 +4994,7 @@ const bn = () => (At += 1, `panel-group-${At}`), De = (e, t) => typeof e != "num
|
|
|
4996
4994
|
};
|
|
4997
4995
|
document.addEventListener("pointermove", le), document.addEventListener("pointerup", he);
|
|
4998
4996
|
},
|
|
4999
|
-
[$, r, d, a,
|
|
4997
|
+
[$, r, d, a, p, l, s]
|
|
5000
4998
|
), q = r === "horizontal", P = qe(
|
|
5001
4999
|
"group absolute z-20 flex select-none items-center justify-center border-none bg-transparent transition-colors duration-150 overflow-visible",
|
|
5002
5000
|
q ? "cursor-col-resize" : "cursor-row-resize",
|
|
@@ -5035,14 +5033,14 @@ const bn = () => (At += 1, `panel-group-${At}`), De = (e, t) => typeof e != "num
|
|
|
5035
5033
|
return X;
|
|
5036
5034
|
};
|
|
5037
5035
|
return H.left >= 0 ? h(0, H.left) : H.right > 0 ? h(0, H.right - 1) : 0;
|
|
5038
|
-
}, [H.left, H.right, u]),
|
|
5036
|
+
}, [H.left, H.right, u]), me = ue(() => !Number.isFinite(de) || de < 0 ? 0 : M > 0 && de > M ? M : de, [de, M]), g = ue(() => {
|
|
5039
5037
|
const h = {
|
|
5040
5038
|
position: "absolute",
|
|
5041
5039
|
zIndex: 20,
|
|
5042
5040
|
touchAction: "none"
|
|
5043
5041
|
};
|
|
5044
|
-
return q ? (h.top = 0, h.left = `${
|
|
5045
|
-
}, [
|
|
5042
|
+
return q ? (h.top = 0, h.left = `${me}px`, h.transform = "translateX(-50%)", h.width = `${gt}px`, h.height = "100%") : (h.left = 0, h.top = `${me}px`, h.transform = "translateY(-50%)", h.height = `${gt}px`, h.width = "100%"), h;
|
|
5043
|
+
}, [me, q]), _ = ue(() => {
|
|
5046
5044
|
const h = ct(M), B = (Y) => {
|
|
5047
5045
|
if (Y < 0 || Y >= u.length)
|
|
5048
5046
|
return !1;
|
|
@@ -5075,7 +5073,7 @@ const bn = () => (At += 1, `panel-group-${At}`), De = (e, t) => typeof e != "num
|
|
|
5075
5073
|
return 0;
|
|
5076
5074
|
const B = _.overlapIndex === 0 ? 0 : h - 1, L = (h - 1) / 2;
|
|
5077
5075
|
return (B - L) * cr;
|
|
5078
|
-
}, [_, N]),
|
|
5076
|
+
}, [_, N]), fe = ue(() => {
|
|
5079
5077
|
if (N)
|
|
5080
5078
|
return { display: "none" };
|
|
5081
5079
|
if (D !== 0)
|
|
@@ -5085,7 +5083,7 @@ const bn = () => (At += 1, `panel-group-${At}`), De = (e, t) => typeof e != "num
|
|
|
5085
5083
|
"dark:bg-slate-800/95 dark:text-slate-200 dark:ring-slate-500/60 dark:shadow-[0_0_0_1px_rgba(148,163,184,0.45),0_1px_3px_rgba(2,6,23,0.55)]",
|
|
5086
5084
|
q ? "h-12 w-[6px] px-[2px]" : "h-[6px] w-20 py-[2px]",
|
|
5087
5085
|
S && "bg-blue-200/80 ring-blue-300 shadow-[0_0_0_1px_rgba(191,219,254,0.65),0_1px_4px_rgba(59,130,246,0.45)] dark:bg-blue-900/70 dark:ring-blue-400 dark:shadow-[0_0_0_1px_rgba(147,197,253,0.5),0_1px_4px_rgba(59,130,246,0.55)]"
|
|
5088
|
-
),
|
|
5086
|
+
), f = qe(
|
|
5089
5087
|
"rounded-full bg-slate-600 transition-colors duration-150 shadow-[0_0_0_1px_rgba(255,255,255,0.9)] dark:bg-slate-200 dark:shadow-[0_0_0_1px_rgba(15,23,42,0.55)]",
|
|
5090
5088
|
q ? "h-8 w-[2px]" : "h-[2px] w-16",
|
|
5091
5089
|
S && "bg-blue-500 dark:bg-blue-300",
|
|
@@ -5109,15 +5107,15 @@ const bn = () => (At += 1, `panel-group-${At}`), De = (e, t) => typeof e != "num
|
|
|
5109
5107
|
id: O,
|
|
5110
5108
|
thickness: B,
|
|
5111
5109
|
direction: r,
|
|
5112
|
-
visible: !N && B >
|
|
5110
|
+
visible: !N && B > pr,
|
|
5113
5111
|
startPanelId: K.left,
|
|
5114
5112
|
endPanelId: K.right
|
|
5115
5113
|
}, X = F.current;
|
|
5116
5114
|
X && Math.abs(X.thickness - L.thickness) <= 0.25 && X.visible === L.visible && X.direction === L.direction && X.startPanelId === L.startPanelId && X.endPanelId === L.endPanelId || (F.current = L, c(O, L));
|
|
5117
5115
|
}, [r, K.left, K.right, c, O, N]);
|
|
5118
|
-
|
|
5116
|
+
ge(() => {
|
|
5119
5117
|
x();
|
|
5120
|
-
}, [x]),
|
|
5118
|
+
}, [x]), ge(() => {
|
|
5121
5119
|
const h = b.current;
|
|
5122
5120
|
if (!h)
|
|
5123
5121
|
return;
|
|
@@ -5154,7 +5152,7 @@ const bn = () => (At += 1, `panel-group-${At}`), De = (e, t) => typeof e != "num
|
|
|
5154
5152
|
"aria-label": `Resize ${q ? "columns" : "rows"} - Drag to collapse/expand panels`,
|
|
5155
5153
|
"data-resize-handle-id": O,
|
|
5156
5154
|
title: `ドラッグして${q ? "列" : "行"}をリサイズ、端まで移動して折りたたみ/展開`,
|
|
5157
|
-
children: n || /* @__PURE__ */ I.jsx("div", { className: Se, style:
|
|
5155
|
+
children: n || /* @__PURE__ */ I.jsx("div", { className: Se, style: fe, children: /* @__PURE__ */ I.jsx("span", { className: f }) })
|
|
5158
5156
|
}
|
|
5159
5157
|
);
|
|
5160
5158
|
}), Ln = (e) => document.querySelector(`[data-panel-id="${e}"]`), jn = (e) => document.querySelector(`[data-panel-group-id="${e}"]`), Dn = (e) => document.querySelector(`[data-resize-handle-id="${e}"]`);
|
|
@@ -5173,6 +5171,6 @@ export {
|
|
|
5173
5171
|
lt as normalizeSizeConfig,
|
|
5174
5172
|
mr as saveLayout,
|
|
5175
5173
|
Tn as usePanelControls,
|
|
5176
|
-
|
|
5174
|
+
ft as usePanelGroup,
|
|
5177
5175
|
xr as useResizablePanels
|
|
5178
5176
|
};
|