react-resizable-panels 4.0.0-alpha.0 → 4.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,21 +1,21 @@
1
1
  "use client";
2
2
  import { jsx as F } from "react/jsx-runtime";
3
- import { useId as Re, useLayoutEffect as Pe, useEffect as Ce, useRef as I, useCallback as ce, createContext as Ee, useImperativeHandle as ue, useState as M, useMemo as Me, useContext as Ge } from "react";
4
- function Ie(e, t) {
3
+ import { useId as Pe, useLayoutEffect as Ee, useEffect as Ce, useRef as I, useCallback as fe, createContext as Me, useImperativeHandle as de, useState as M, useMemo as pe, useSyncExternalStore as Ge, useContext as Ie } from "react";
4
+ function Oe(e, t) {
5
5
  const n = getComputedStyle(e), o = parseFloat(n.fontSize);
6
6
  return t * o;
7
7
  }
8
- function Oe(e, t) {
8
+ function ke(e, t) {
9
9
  const n = getComputedStyle(e.ownerDocument.body), o = parseFloat(n.fontSize);
10
10
  return t * o;
11
11
  }
12
- function ke(e) {
12
+ function Ae(e) {
13
13
  return e / 100 * window.innerHeight;
14
14
  }
15
- function Ae(e) {
15
+ function Ne(e) {
16
16
  return e / 100 * window.innerWidth;
17
17
  }
18
- function Ne(e) {
18
+ function $e(e) {
19
19
  switch (typeof e) {
20
20
  case "number":
21
21
  return [e, "px"];
@@ -25,13 +25,13 @@ function Ne(e) {
25
25
  }
26
26
  }
27
27
  }
28
- function H({
28
+ function j({
29
29
  groupSize: e,
30
30
  panelElement: t,
31
31
  styleProp: n
32
32
  }) {
33
33
  let o;
34
- const [s, i] = Ne(n);
34
+ const [s, i] = $e(n);
35
35
  switch (i) {
36
36
  case "%": {
37
37
  o = s / 100 * e;
@@ -42,19 +42,19 @@ function H({
42
42
  break;
43
43
  }
44
44
  case "rem": {
45
- o = Oe(t, s);
45
+ o = ke(t, s);
46
46
  break;
47
47
  }
48
48
  case "em": {
49
- o = Ie(t, s);
49
+ o = Oe(t, s);
50
50
  break;
51
51
  }
52
52
  case "vh": {
53
- o = ke(s);
53
+ o = Ae(s);
54
54
  break;
55
55
  }
56
56
  case "vw": {
57
- o = Ae(s);
57
+ o = Ne(s);
58
58
  break;
59
59
  }
60
60
  }
@@ -63,19 +63,19 @@ function H({
63
63
  function L(e) {
64
64
  return parseFloat(e.toFixed(3));
65
65
  }
66
- function Z({
66
+ function Q({
67
67
  group: e
68
68
  }) {
69
- const { direction: t, panels: n } = e;
69
+ const { orientation: t, panels: n } = e;
70
70
  return n.reduce((o, s) => (o += t === "horizontal" ? s.element.offsetWidth : s.element.offsetHeight, o), 0);
71
71
  }
72
- function ie(e) {
73
- const { panels: t } = e, n = Z({ group: e });
72
+ function ae(e) {
73
+ const { panels: t } = e, n = Q({ group: e });
74
74
  return t.map((o) => {
75
75
  const { element: s, panelConstraints: i } = o;
76
76
  let a = 0;
77
77
  if (i.collapsedSize) {
78
- const u = H({
78
+ const u = j({
79
79
  groupSize: n,
80
80
  panelElement: s,
81
81
  styleProp: i.collapsedSize
@@ -84,7 +84,7 @@ function ie(e) {
84
84
  }
85
85
  let r;
86
86
  if (i.defaultSize) {
87
- const u = H({
87
+ const u = j({
88
88
  groupSize: n,
89
89
  panelElement: s,
90
90
  styleProp: i.defaultSize
@@ -93,7 +93,7 @@ function ie(e) {
93
93
  }
94
94
  let l = 0;
95
95
  if (i.minSize) {
96
- const u = H({
96
+ const u = j({
97
97
  groupSize: n,
98
98
  panelElement: s,
99
99
  styleProp: i.minSize
@@ -102,7 +102,7 @@ function ie(e) {
102
102
  }
103
103
  let c = 100;
104
104
  if (i.maxSize) {
105
- const u = H({
105
+ const u = j({
106
106
  groupSize: n,
107
107
  panelElement: s,
108
108
  styleProp: i.maxSize
@@ -119,7 +119,7 @@ function ie(e) {
119
119
  };
120
120
  });
121
121
  }
122
- class $e {
122
+ class De {
123
123
  #e = {};
124
124
  addListener(t, n) {
125
125
  const o = this.#e[t];
@@ -158,70 +158,83 @@ class $e {
158
158
  }
159
159
  }
160
160
  }
161
- let C = {
161
+ let E = {
162
162
  cursorFlags: 0,
163
163
  interactionState: {
164
164
  state: "inactive"
165
165
  },
166
166
  mountedGroups: /* @__PURE__ */ new Map()
167
167
  };
168
- const _ = new $e();
168
+ const T = new De();
169
169
  function O() {
170
- return C;
170
+ return E;
171
171
  }
172
172
  function G(e) {
173
- const t = typeof e == "function" ? e(C) : e;
174
- return C === t || (C = {
175
- ...C,
173
+ const t = typeof e == "function" ? e(E) : e;
174
+ return E === t || (E = {
175
+ ...E,
176
176
  ...t
177
- }, t.cursorFlags !== void 0 && _.emit("cursorFlagsChange", C.cursorFlags), t.interactionState !== void 0 && _.emit("interactionStateChange", C.interactionState), t.mountedGroups !== void 0 && _.emit("mountedGroupsChange", C.mountedGroups)), C;
177
+ }, t.cursorFlags !== void 0 && T.emit("cursorFlagsChange", E.cursorFlags), t.interactionState !== void 0 && T.emit("interactionStateChange", E.interactionState), t.mountedGroups !== void 0 && T.emit("mountedGroupsChange", E.mountedGroups)), E;
178
178
  }
179
- const Te = (e) => e, K = () => {
180
- }, fe = 1, de = 2, pe = 4, he = 8, re = {
179
+ const Te = (e) => e, V = () => {
180
+ }, he = 1, me = 2, ve = 4, ge = 8, le = {
181
181
  coarse: 10,
182
182
  precise: 5
183
183
  };
184
- function _e(e) {
185
- const { direction: t, element: n, panels: o, separators: s } = e, i = Array.from(n.children).filter((c) => c instanceof HTMLElement).sort((c, u) => {
186
- const f = c.getBoundingClientRect(), p = u.getBoundingClientRect();
187
- return t === "horizontal" ? f.left - p.left : f.top - p.top;
188
- }), a = [];
184
+ function X(e, t) {
185
+ return t.sort(
186
+ e === "horizontal" ? _e : Fe
187
+ );
188
+ }
189
+ function _e(e, t) {
190
+ const n = e.element.offsetLeft - t.element.offsetLeft;
191
+ return n !== 0 ? n : e.element.offsetWidth - t.element.offsetWidth;
192
+ }
193
+ function Fe(e, t) {
194
+ const n = e.element.offsetTop - t.element.offsetTop;
195
+ return n !== 0 ? n : e.element.offsetHeight - t.element.offsetHeight;
196
+ }
197
+ function He(e) {
198
+ const { element: t, orientation: n, panels: o, separators: s } = e, i = X(
199
+ n,
200
+ Array.from(t.children).filter((c) => c instanceof HTMLElement).map((c) => ({ element: c }))
201
+ ).map(({ element: c }) => c), a = [];
189
202
  let r, l;
190
203
  for (const c of i) {
191
204
  const u = o.find(
192
- (f) => f.element === c
205
+ (d) => d.element === c
193
206
  );
194
207
  if (u) {
195
208
  if (r) {
196
- const f = r.element.getBoundingClientRect(), p = c.getBoundingClientRect();
209
+ const d = r.element.getBoundingClientRect(), p = c.getBoundingClientRect();
197
210
  a.push({
198
211
  group: e,
199
212
  panels: [r, u],
200
213
  separator: l,
201
- rect: t === "horizontal" ? new DOMRect(
202
- f.right,
214
+ rect: n === "horizontal" ? new DOMRect(
215
+ d.right,
203
216
  p.top,
204
- p.left - f.right,
217
+ p.left - d.right,
205
218
  p.height
206
219
  ) : new DOMRect(
207
220
  p.left,
208
- f.bottom,
221
+ d.bottom,
209
222
  p.width,
210
- p.top - f.bottom
223
+ p.top - d.bottom
211
224
  )
212
225
  });
213
226
  }
214
- r = u;
227
+ r = u, l = void 0;
215
228
  } else {
216
- const f = s.find(
229
+ const d = s.find(
217
230
  (p) => p.element === c
218
231
  );
219
- f ? l = f : (r = void 0, l = void 0);
232
+ d ? l = d : (r = void 0, l = void 0);
220
233
  }
221
234
  }
222
235
  return a;
223
236
  }
224
- function De(e, t) {
237
+ function je(e, t) {
225
238
  return {
226
239
  x: e.x >= t.left && e.x <= t.right ? 0 : Math.min(
227
240
  Math.abs(e.x - t.left),
@@ -233,13 +246,13 @@ function De(e, t) {
233
246
  )
234
247
  };
235
248
  }
236
- function Fe(e, t, n) {
249
+ function We(e, t, n) {
237
250
  let o, s = {
238
251
  x: 1 / 0,
239
252
  y: 1 / 0
240
253
  };
241
254
  for (const i of t) {
242
- const a = De(n, i.rect);
255
+ const a = je(n, i.rect);
243
256
  switch (e) {
244
257
  case "horizontal": {
245
258
  a.x <= s.x && (o = i, s = a);
@@ -256,26 +269,26 @@ function Fe(e, t, n) {
256
269
  hitRegion: o
257
270
  } : void 0;
258
271
  }
259
- let B;
260
- function je() {
261
- return B === void 0 && (typeof matchMedia == "function" ? B = !!matchMedia("(pointer:coarse)").matches : B = !1), B;
272
+ let W;
273
+ function Ue() {
274
+ return W === void 0 && (typeof matchMedia == "function" ? W = !!matchMedia("(pointer:coarse)").matches : W = !1), W;
262
275
  }
263
- function me(e, t) {
276
+ function ye(e, t) {
264
277
  const n = [];
265
278
  return t.forEach((o, s) => {
266
279
  if (s.disabled)
267
280
  return;
268
- const i = je() ? re.coarse : re.precise, a = _e(s), r = Fe(s.direction, a, {
281
+ const i = Ue() ? le.coarse : le.precise, a = He(s), r = We(s.orientation, a, {
269
282
  x: e.clientX,
270
283
  y: e.clientY
271
284
  });
272
285
  r && r.distance.x <= i && r.distance.y <= i && n.push(r.hitRegion);
273
286
  }), n;
274
287
  }
275
- function se(e) {
288
+ function ce(e) {
276
289
  if (e.defaultPrevented)
277
290
  return;
278
- const { mountedGroups: t } = O(), n = me(e, t), o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Map();
291
+ const { mountedGroups: t } = O(), n = ye(e, t), o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Map();
279
292
  n.forEach((r) => {
280
293
  o.add(r.group), r.panels.forEach((c) => {
281
294
  s.add(c);
@@ -291,7 +304,7 @@ function se(e) {
291
304
  }
292
305
  }), n.length && e.preventDefault();
293
306
  }
294
- function He({
307
+ function Be({
295
308
  cursorFlags: e,
296
309
  groups: t,
297
310
  state: n
@@ -302,7 +315,7 @@ function He({
302
315
  case "hover":
303
316
  t.forEach((i) => {
304
317
  if (!i.disableCursor)
305
- switch (i.direction) {
318
+ switch (i.orientation) {
306
319
  case "horizontal": {
307
320
  o++;
308
321
  break;
@@ -318,7 +331,7 @@ function He({
318
331
  return null;
319
332
  switch (n) {
320
333
  case "active": {
321
- const i = (e & fe) !== 0, a = (e & de) !== 0, r = (e & pe) !== 0, l = (e & he) !== 0;
334
+ const i = (e & he) !== 0, a = (e & me) !== 0, r = (e & ve) !== 0, l = (e & ge) !== 0;
322
335
  if (e) {
323
336
  if (i)
324
337
  return r ? "se-resize" : l ? "ne-resize" : "e-resize";
@@ -334,34 +347,34 @@ function He({
334
347
  }
335
348
  return o > 0 && s > 0 ? "move" : o > 0 ? "ew-resize" : "ns-resize";
336
349
  }
337
- let V = null, P;
338
- function X() {
350
+ let K = null, P;
351
+ function Y() {
339
352
  P === void 0 && (P = new CSSStyleSheet(), document.adoptedStyleSheets = [P]);
340
353
  const { cursorFlags: e, interactionState: t } = O();
341
354
  switch (t.state) {
342
355
  case "active":
343
356
  case "hover": {
344
- const n = He({
357
+ const n = Be({
345
358
  cursorFlags: e,
346
359
  groups: t.hitRegions.map((o) => o.group),
347
360
  state: t.state
348
361
  });
349
- if (V === n)
362
+ if (K === n)
350
363
  return;
351
- V = n, n ? P.cssRules.length === 0 ? P.insertRule(`*{cursor: ${n} !important;}`) : P.replaceSync(`*{cursor: ${n} !important;}`) : P.cssRules.length === 1 && P.deleteRule(0);
364
+ K = n, n ? P.cssRules.length === 0 ? P.insertRule(`*{cursor: ${n} !important;}`) : P.replaceSync(`*{cursor: ${n} !important;}`) : P.cssRules.length === 1 && P.deleteRule(0);
352
365
  break;
353
366
  }
354
367
  case "inactive": {
355
- V = null, P.cssRules.length === 1 && P.deleteRule(0);
368
+ K = null, P.cssRules.length === 1 && P.deleteRule(0);
356
369
  break;
357
370
  }
358
371
  }
359
372
  }
360
- function E(e, t = "Assertion error") {
373
+ function C(e, t = "Assertion error") {
361
374
  if (!e)
362
375
  throw console.error(t), Error(t);
363
376
  }
364
- function Be(e, t) {
377
+ function Ve(e, t) {
365
378
  if (e.length !== t.length)
366
379
  return !1;
367
380
  for (let n = 0; n < e.length; n++)
@@ -369,13 +382,13 @@ function Be(e, t) {
369
382
  return !1;
370
383
  return !0;
371
384
  }
372
- function b(e, t, n = 0) {
385
+ function w(e, t, n = 0) {
373
386
  return Math.abs(L(e) - L(t)) <= n;
374
387
  }
375
- function Y(e, t) {
376
- return b(e, t) ? 0 : e > t ? 1 : -1;
388
+ function Z(e, t) {
389
+ return w(e, t) ? 0 : e > t ? 1 : -1;
377
390
  }
378
- function T({
391
+ function D({
379
392
  panelConstraints: e,
380
393
  size: t
381
394
  }) {
@@ -385,15 +398,15 @@ function T({
385
398
  maxSize: s = 100,
386
399
  minSize: i = 0
387
400
  } = e;
388
- if (Y(t, i) < 0)
401
+ if (Z(t, i) < 0)
389
402
  if (o) {
390
403
  const a = (n + i) / 2;
391
- Y(t, a) < 0 ? t = n : t = i;
404
+ Z(t, a) < 0 ? t = n : t = i;
392
405
  } else
393
406
  t = i;
394
407
  return t = Math.min(s, t), t = L(t), t;
395
408
  }
396
- function We({
409
+ function Ke({
397
410
  delta: e,
398
411
  initialLayout: t,
399
412
  panelConstraints: n,
@@ -401,97 +414,97 @@ function We({
401
414
  prevLayout: s,
402
415
  trigger: i
403
416
  }) {
404
- if (b(e, 0))
417
+ if (w(e, 0))
405
418
  return t;
406
419
  const a = Object.values(t), r = Object.values(s), l = [...a], [c, u] = o;
407
- E(c != null, "Invalid first pivot index"), E(u != null, "Invalid second pivot index");
408
- let f = 0;
420
+ C(c != null, "Invalid first pivot index"), C(u != null, "Invalid second pivot index");
421
+ let d = 0;
409
422
  {
410
- const m = e < 0 ? 1 : -1;
411
- let d = e < 0 ? u : c, v = 0;
423
+ const h = e < 0 ? 1 : -1;
424
+ let f = e < 0 ? u : c, v = 0;
412
425
  for (; ; ) {
413
- const x = a[d];
414
- E(
426
+ const x = a[f];
427
+ C(
415
428
  x != null,
416
- `Previous layout not found for panel index ${d}`
429
+ `Previous layout not found for panel index ${f}`
417
430
  );
418
- const y = T({
419
- panelConstraints: n[d],
431
+ const S = D({
432
+ panelConstraints: n[f],
420
433
  size: 100
421
434
  }) - x;
422
- if (v += y, d += m, d < 0 || d >= n.length)
435
+ if (v += S, f += h, f < 0 || f >= n.length)
423
436
  break;
424
437
  }
425
- const S = Math.min(Math.abs(e), Math.abs(v));
426
- e = e < 0 ? 0 - S : S;
438
+ const g = Math.min(Math.abs(e), Math.abs(v));
439
+ e = e < 0 ? 0 - g : g;
427
440
  }
428
441
  {
429
- let d = e < 0 ? c : u;
430
- for (; d >= 0 && d < n.length; ) {
431
- const v = Math.abs(e) - Math.abs(f), S = a[d];
432
- E(
433
- S != null,
434
- `Previous layout not found for panel index ${d}`
442
+ let f = e < 0 ? c : u;
443
+ for (; f >= 0 && f < n.length; ) {
444
+ const v = Math.abs(e) - Math.abs(d), g = a[f];
445
+ C(
446
+ g != null,
447
+ `Previous layout not found for panel index ${f}`
435
448
  );
436
- const x = S - v, z = T({
437
- panelConstraints: n[d],
449
+ const x = g - v, z = D({
450
+ panelConstraints: n[f],
438
451
  size: x
439
452
  });
440
- if (!b(S, z) && (f += S - z, l[d] = z, f.toFixed(3).localeCompare(Math.abs(e).toFixed(3), void 0, {
453
+ if (!w(g, z) && (d += g - z, l[f] = z, d.toFixed(3).localeCompare(Math.abs(e).toFixed(3), void 0, {
441
454
  numeric: !0
442
455
  }) >= 0))
443
456
  break;
444
- e < 0 ? d-- : d++;
457
+ e < 0 ? f-- : f++;
445
458
  }
446
459
  }
447
- if (Be(r, l))
460
+ if (Ve(r, l))
448
461
  return s;
449
462
  {
450
- const m = e < 0 ? u : c, d = a[m];
451
- E(
452
- d != null,
453
- `Previous layout not found for panel index ${m}`
463
+ const h = e < 0 ? u : c, f = a[h];
464
+ C(
465
+ f != null,
466
+ `Previous layout not found for panel index ${h}`
454
467
  );
455
- const v = d + f, S = T({
456
- panelConstraints: n[m],
468
+ const v = f + d, g = D({
469
+ panelConstraints: n[h],
457
470
  size: v
458
471
  });
459
- if (l[m] = S, !b(S, v)) {
460
- let x = v - S, y = e < 0 ? u : c;
461
- for (; y >= 0 && y < n.length; ) {
462
- const R = l[y];
463
- E(
472
+ if (l[h] = g, !w(g, v)) {
473
+ let x = v - g, S = e < 0 ? u : c;
474
+ for (; S >= 0 && S < n.length; ) {
475
+ const R = l[S];
476
+ C(
464
477
  R != null,
465
- `Previous layout not found for panel index ${y}`
478
+ `Previous layout not found for panel index ${S}`
466
479
  );
467
- const k = R + x, A = T({
468
- panelConstraints: n[y],
480
+ const k = R + x, A = D({
481
+ panelConstraints: n[S],
469
482
  size: k
470
483
  });
471
- if (b(R, A) || (x -= A - R, l[y] = A), b(x, 0))
484
+ if (w(R, A) || (x -= A - R, l[S] = A), w(x, 0))
472
485
  break;
473
- e > 0 ? y-- : y++;
486
+ e > 0 ? S-- : S++;
474
487
  }
475
488
  }
476
489
  }
477
490
  const p = Object.values(l).reduce(
478
- (m, d) => d + m,
491
+ (h, f) => f + h,
479
492
  0
480
493
  );
481
- if (!b(p, 100, 0.1))
494
+ if (!w(p, 100, 0.1))
482
495
  return s;
483
- const h = Object.keys(s);
484
- return l.reduce((m, d, v) => (m[h[v]] = d, m), {});
496
+ const m = Object.keys(s);
497
+ return l.reduce((h, f, v) => (h[m[v]] = f, h), {});
485
498
  }
486
- function q(e, t) {
499
+ function ee(e, t) {
487
500
  if (Object.keys(e).length !== Object.keys(t).length)
488
501
  return !1;
489
502
  for (const n in e)
490
- if (Y(e[n], t[n]) !== 0)
503
+ if (Z(e[n], t[n]) !== 0)
491
504
  return !1;
492
505
  return !0;
493
506
  }
494
- function W(e) {
507
+ function U(e) {
495
508
  if (e.defaultPrevented)
496
509
  return;
497
510
  const { interactionState: t, mountedGroups: n } = O();
@@ -514,50 +527,50 @@ function W(e) {
514
527
  let o = 0;
515
528
  const s = new Map(n);
516
529
  t.hitRegions.forEach((i) => {
517
- const { direction: a, disableCursor: r, element: l, panels: c } = i.group;
530
+ const { disableCursor: a, element: r, orientation: l, panels: c } = i.group;
518
531
  let u = 0;
519
- t.state === "active" && (a === "horizontal" ? u = (e.clientX - t.pointerDownAtPoint.x) / l.offsetWidth * 100 : u = (e.clientY - t.pointerDownAtPoint.y) / l.offsetHeight * 100);
520
- const f = t.initialLayoutMap.get(
532
+ t.state === "active" && (l === "horizontal" ? u = (e.clientX - t.pointerDownAtPoint.x) / r.offsetWidth * 100 : u = (e.clientY - t.pointerDownAtPoint.y) / r.offsetHeight * 100);
533
+ const d = t.initialLayoutMap.get(
521
534
  i.group
522
- ), { derivedPanelConstraints: p, layout: h } = n.get(i.group) ?? {};
523
- if (p && f && h) {
524
- const m = We({
535
+ ), { derivedPanelConstraints: p, layout: m } = n.get(i.group) ?? {};
536
+ if (p && d && m) {
537
+ const h = Ke({
525
538
  delta: u,
526
- initialLayout: f,
539
+ initialLayout: d,
527
540
  panelConstraints: p,
528
- pivotIndices: i.panels.map((d) => c.indexOf(d)),
529
- prevLayout: h,
541
+ pivotIndices: i.panels.map((f) => c.indexOf(f)),
542
+ prevLayout: m,
530
543
  trigger: "mouse-or-touch"
531
544
  });
532
- if (q(m, h)) {
533
- if (u !== 0 && !r)
534
- switch (a) {
545
+ if (ee(h, m)) {
546
+ if (u !== 0 && !a)
547
+ switch (l) {
535
548
  case "horizontal": {
536
- o |= u < 0 ? fe : de;
549
+ o |= u < 0 ? he : me;
537
550
  break;
538
551
  }
539
552
  case "vertical": {
540
- o |= u < 0 ? pe : he;
553
+ o |= u < 0 ? ve : ge;
541
554
  break;
542
555
  }
543
556
  }
544
557
  } else {
545
558
  s.set(i.group, {
546
559
  derivedPanelConstraints: p,
547
- layout: m
560
+ layout: h
548
561
  });
549
- const d = i.group.panels.map(({ id: v }) => v).join(",");
550
- i.group.inMemoryLayouts[d] = m;
562
+ const f = i.group.panels.map(({ id: v }) => v).join(",");
563
+ i.group.inMemoryLayouts[f] = h;
551
564
  }
552
565
  }
553
566
  }), G({
554
567
  cursorFlags: o,
555
568
  mountedGroups: s
556
- }), X();
569
+ }), Y();
557
570
  break;
558
571
  }
559
572
  default: {
560
- const o = me(e, n);
573
+ const o = ye(e, n);
561
574
  o.length === 0 ? t.state !== "inactive" && G({
562
575
  interactionState: { state: "inactive" }
563
576
  }) : G({
@@ -565,12 +578,12 @@ function W(e) {
565
578
  hitRegions: o,
566
579
  state: "hover"
567
580
  }
568
- }), X();
581
+ }), Y();
569
582
  break;
570
583
  }
571
584
  }
572
585
  }
573
- function ae(e) {
586
+ function ue(e) {
574
587
  if (e.defaultPrevented)
575
588
  return;
576
589
  e.preventDefault();
@@ -582,10 +595,10 @@ function ae(e) {
582
595
  interactionState: {
583
596
  state: "inactive"
584
597
  }
585
- }), X();
598
+ }), Y();
586
599
  }
587
600
  }
588
- function Ue(e) {
601
+ function Xe(e) {
589
602
  let t = 0, n = 0;
590
603
  const o = {};
591
604
  for (const i of e)
@@ -603,22 +616,25 @@ function Ue(e) {
603
616
  }
604
617
  return o;
605
618
  }
606
- function Ke(e, t, n) {
619
+ function Ye(e, t, n) {
607
620
  const o = n[0];
608
621
  if (!o)
609
622
  return;
610
623
  const s = e.panels.find((a) => a.element === t);
611
624
  if (!s || !s.onResize)
612
625
  return;
613
- const i = Z({ group: e });
614
- s.onResize({
615
- asPercentage: L(
616
- o.inlineSize / i * 100
617
- ),
618
- inPixels: o.inlineSize
619
- });
626
+ const i = Q({ group: e });
627
+ s.onResize(
628
+ {
629
+ asPercentage: L(
630
+ o.inlineSize / i * 100
631
+ ),
632
+ inPixels: o.inlineSize
633
+ },
634
+ s.id
635
+ );
620
636
  }
621
- function ve({
637
+ function q({
622
638
  layout: e,
623
639
  panelConstraints: t
624
640
  }) {
@@ -630,57 +646,64 @@ function ve({
630
646
  throw Error(
631
647
  `Invalid ${t.length} panel layout: ${o.map((r) => `${r}%`).join(", ")}`
632
648
  );
633
- if (!b(s, 100) && o.length > 0)
649
+ if (!w(s, 100) && o.length > 0)
634
650
  for (let r = 0; r < t.length; r++) {
635
651
  const l = o[r];
636
- E(l != null, `No layout data found for index ${r}`);
652
+ C(l != null, `No layout data found for index ${r}`);
637
653
  const c = 100 / s * l;
638
654
  o[r] = c;
639
655
  }
640
656
  let i = 0;
641
657
  for (let r = 0; r < t.length; r++) {
642
658
  const l = o[r];
643
- E(l != null, `No layout data found for index ${r}`);
644
- const c = T({
659
+ C(l != null, `No layout data found for index ${r}`);
660
+ const c = D({
645
661
  panelConstraints: t[r],
646
662
  size: l
647
663
  });
648
664
  l != c && (i += l - c, o[r] = c);
649
665
  }
650
- if (!b(i, 0))
666
+ if (!w(i, 0))
651
667
  for (let r = 0; r < t.length; r++) {
652
668
  const l = o[r];
653
- E(l != null, `No layout data found for index ${r}`);
654
- const c = l + i, u = T({
669
+ C(l != null, `No layout data found for index ${r}`);
670
+ const c = l + i, u = D({
655
671
  panelConstraints: t[r],
656
672
  size: c
657
673
  });
658
- if (l !== u && (i -= u - l, o[r] = u, b(i, 0)))
674
+ if (l !== u && (i -= u - l, o[r] = u, w(i, 0)))
659
675
  break;
660
676
  }
661
677
  const a = Object.keys(e);
662
678
  return o.reduce((r, l, c) => (r[a[c]] = l, r), {});
663
679
  }
664
- function Ve(e) {
680
+ function Ze(e) {
665
681
  let t = !1;
666
682
  const n = new ResizeObserver((l) => {
667
683
  for (const c of l) {
668
- const { borderBoxSize: u, target: f } = c;
669
- f === e.element ? t && G((p) => {
670
- const h = p.mountedGroups.get(e);
671
- return h ? {
672
- mountedGroups: new Map(p.mountedGroups).set(e, {
673
- derivedPanelConstraints: ie(e),
674
- layout: h.layout
675
- })
676
- } : p;
677
- }) : Ke(e, f, u);
684
+ const { borderBoxSize: u, target: d } = c;
685
+ d === e.element ? t && G((p) => {
686
+ const m = p.mountedGroups.get(e);
687
+ if (m) {
688
+ const h = ae(e), f = m.layout, v = q({
689
+ layout: f,
690
+ panelConstraints: h
691
+ });
692
+ return {
693
+ mountedGroups: new Map(p.mountedGroups).set(e, {
694
+ derivedPanelConstraints: h,
695
+ layout: v
696
+ })
697
+ };
698
+ }
699
+ return p;
700
+ }) : Ye(e, d, u);
678
701
  }
679
702
  });
680
703
  n.observe(e.element), e.panels.forEach((l) => {
681
704
  l.onResize && n.observe(l.element);
682
705
  });
683
- const o = ie(e), s = e.panels.map(({ id: l }) => l).join(","), i = e.inMemoryLayouts[s] ?? e.defaultLayout ?? Ue(o), a = ve({
706
+ const o = ae(e), s = e.panels.map(({ id: l }) => l).join(","), i = e.inMemoryLayouts[s] ?? e.defaultLayout ?? Xe(o), a = q({
684
707
  layout: i,
685
708
  panelConstraints: o
686
709
  }), r = G((l) => ({
@@ -689,27 +712,27 @@ function Ve(e) {
689
712
  layout: a
690
713
  })
691
714
  }));
692
- return t = !0, r.mountedGroups.size === 1 && (window.addEventListener("pointerdown", se), window.addEventListener("pointerleave", W), window.addEventListener("pointermove", W), window.addEventListener("pointerup", ae)), function() {
715
+ return t = !0, r.mountedGroups.size === 1 && (window.addEventListener("pointerdown", ce), window.addEventListener("pointerleave", U), window.addEventListener("pointermove", U), window.addEventListener("pointerup", ue)), function() {
693
716
  const c = G((u) => {
694
- const f = new Map(u.mountedGroups);
695
- return f.delete(e), { mountedGroups: f };
717
+ const d = new Map(u.mountedGroups);
718
+ return d.delete(e), { mountedGroups: d };
696
719
  });
697
- t = !1, c.mountedGroups.size === 0 && (window.removeEventListener("pointerdown", se), window.removeEventListener("pointerleave", W), window.removeEventListener("pointermove", W), window.removeEventListener("pointerup", ae)), n.disconnect();
720
+ t = !1, c.mountedGroups.size === 0 && (window.removeEventListener("pointerdown", ce), window.removeEventListener("pointerleave", U), window.removeEventListener("pointermove", U), window.removeEventListener("pointerup", ue)), n.disconnect();
698
721
  };
699
722
  }
700
- function J(e) {
701
- const t = Re();
723
+ function te(e) {
724
+ const t = Pe();
702
725
  return `${e ?? t}`;
703
726
  }
704
- const D = typeof window < "u" ? Pe : Ce;
705
- function Q(e) {
727
+ const _ = typeof window < "u" ? Ee : Ce;
728
+ function ne(e) {
706
729
  const t = I(e);
707
- return D(() => {
730
+ return _(() => {
708
731
  t.current = e;
709
- }, [e]), ce((n) => t.current?.(n), [t]);
732
+ }, [e]), fe((n) => t.current?.(n), [t]);
710
733
  }
711
- function ee(...e) {
712
- return Q((t) => {
734
+ function oe(...e) {
735
+ return ne((t) => {
713
736
  e.forEach((n) => {
714
737
  if (n)
715
738
  switch (typeof n) {
@@ -725,18 +748,13 @@ function ee(...e) {
725
748
  });
726
749
  });
727
750
  }
728
- const ge = "--react-resizable-panels--panel--pointer-events";
729
- function ye(e, t) {
751
+ const Se = "--react-resizable-panels--panel--pointer-events";
752
+ function xe(e, t) {
730
753
  const n = e.replace(/[^a-zA-Z0-9\-_]/g, ""), o = t.replace(/[^a-zA-Z0-9\-_]/g, "");
731
754
  return `--react-resizable-panels--${n}--${o}`;
732
755
  }
733
- const Se = Ee(null);
734
- function le(e, t) {
735
- return t.sort(
736
- e === "horizontal" ? (n, o) => n.element.offsetLeft - o.element.offsetLeft : (n, o) => n.element.offsetTop - o.element.offsetTop
737
- );
738
- }
739
- function Xe({
756
+ const ze = Me(null);
757
+ function qe({
740
758
  groupId: e
741
759
  }) {
742
760
  const t = () => {
@@ -752,11 +770,11 @@ function Xe({
752
770
  return n;
753
771
  },
754
772
  setLayout(n) {
755
- const { derivedPanelConstraints: o, group: s, layout: i } = t(), a = ve({
773
+ const { derivedPanelConstraints: o, group: s, layout: i } = t(), a = q({
756
774
  layout: n,
757
775
  panelConstraints: o
758
776
  });
759
- return q(i, a) || G((r) => ({
777
+ return ee(i, a) || G((r) => ({
760
778
  mountedGroups: new Map(r.mountedGroups).set(s, {
761
779
  derivedPanelConstraints: o,
762
780
  layout: a
@@ -765,190 +783,182 @@ function Xe({
765
783
  }
766
784
  };
767
785
  }
768
- function Ye(e, t) {
786
+ function Je(e, t) {
769
787
  const n = I({
770
788
  getLayout: () => ({}),
771
789
  setLayout: Te
772
790
  });
773
- ue(t, () => n.current, []), D(() => {
791
+ de(t, () => n.current, []), _(() => {
774
792
  Object.assign(
775
793
  n.current,
776
- Xe({ groupId: e })
794
+ qe({ groupId: e })
777
795
  );
778
796
  });
779
797
  }
780
- function nt({
798
+ function rt({
781
799
  children: e,
782
800
  className: t,
783
801
  defaultLayout: n,
784
- direction: o = "horizontal",
785
- disableCursor: s,
786
- disabled: i,
787
- elementRef: a,
788
- groupRef: r,
789
- id: l,
790
- onLayoutChange: c,
802
+ disableCursor: o,
803
+ disabled: s,
804
+ elementRef: i,
805
+ groupRef: a,
806
+ id: r,
807
+ onLayoutChange: l,
808
+ orientation: c = "horizontal",
791
809
  style: u
792
810
  }) {
793
- const f = I({}), p = Q((g) => {
794
- q(f.current, g) || (f.current = g, c?.(g));
795
- }), h = J(l), [m, d] = M(!1), [v, S] = M(null), x = I({}), [z, y] = M(n ?? {}), [R, k] = M([]), [A, ne] = M([]), ze = ee(S, a);
796
- Ye(h, r);
797
- const we = Me(
811
+ const d = I({}), p = ne((y) => {
812
+ ee(d.current, y) || (d.current = y, l?.(y));
813
+ }), m = te(r), [h, f] = M(!1), [v, g] = M(null), x = I({}), [z, S] = M(n ?? {}), [R, k] = M([]), [A, re] = M([]), be = oe(g, i);
814
+ Je(m, a);
815
+ const we = pe(
798
816
  () => ({
799
- direction: o,
800
- id: h,
801
- registerPanel: (g) => (k((w) => le(o, [...w, g])), () => {
802
- k((w) => w.filter((N) => N !== g));
817
+ id: m,
818
+ orientation: c,
819
+ registerPanel: (y) => (k((b) => X(c, [...b, y])), () => {
820
+ k((b) => b.filter((N) => N !== y));
803
821
  }),
804
- registerSeparator: (g) => (ne(
805
- (w) => le(o, [...w, g])
822
+ registerSeparator: (y) => (re(
823
+ (b) => X(c, [...b, y])
806
824
  ), () => {
807
- ne(
808
- (w) => w.filter((N) => N !== g)
825
+ re(
826
+ (b) => b.filter((N) => N !== y)
809
827
  );
810
828
  })
811
829
  }),
812
- [o, h]
830
+ [m, c]
813
831
  );
814
- D(() => {
832
+ _(() => {
815
833
  if (v !== null && R.length > 0) {
816
- const g = {
834
+ const y = {
817
835
  defaultLayout: n,
818
- direction: o,
819
- disableCursor: !!s,
820
- disabled: !!i,
836
+ disableCursor: !!o,
837
+ disabled: !!s,
821
838
  element: v,
822
- id: h,
839
+ id: m,
823
840
  inMemoryLayouts: x.current,
841
+ orientation: c,
824
842
  panels: R,
825
843
  separators: A
826
- }, w = Ve(g), U = O().mountedGroups.get(g);
827
- U && (y(U.layout), p?.(U.layout));
828
- const be = _.addListener(
844
+ }, b = Ze(y), B = O().mountedGroups.get(y);
845
+ B && (S(B.layout), p?.(B.layout));
846
+ const Le = T.addListener(
829
847
  "interactionStateChange",
830
- (j) => {
831
- switch (j.state) {
848
+ (H) => {
849
+ switch (H.state) {
832
850
  case "active":
833
851
  case "hover": {
834
- d(
835
- j.hitRegions.some(
836
- ($) => $.group === g
852
+ f(
853
+ H.hitRegions.some(
854
+ ($) => $.group === y
837
855
  )
838
856
  );
839
857
  break;
840
858
  }
841
859
  }
842
860
  }
843
- ), Le = _.addListener(
861
+ ), Re = T.addListener(
844
862
  "mountedGroupsChange",
845
- (j) => {
846
- const $ = j.get(g);
847
- $ && $.derivedPanelConstraints.length > 0 && (y($.layout), p?.($.layout));
863
+ (H) => {
864
+ const $ = H.get(y);
865
+ $ && $.derivedPanelConstraints.length > 0 && (S($.layout), p?.($.layout));
848
866
  }
849
867
  );
850
868
  return () => {
851
- w(), be(), Le();
869
+ b(), Le(), Re();
852
870
  };
853
871
  }
854
872
  }, [
855
873
  n,
856
874
  o,
857
875
  s,
858
- i,
859
876
  v,
860
- h,
877
+ m,
861
878
  p,
879
+ c,
862
880
  R,
863
881
  A
864
882
  ]);
865
- const oe = {
866
- [ge]: m ? "none" : void 0
883
+ const se = {
884
+ [Se]: h ? "none" : void 0
867
885
  };
868
- for (const g in z) {
869
- const w = ye(h, g), N = z[g];
870
- oe[w] = N;
886
+ for (const y in z) {
887
+ const b = xe(m, y), N = z[y];
888
+ se[b] = N;
871
889
  }
872
- return /* @__PURE__ */ F(Se.Provider, { value: we, children: /* @__PURE__ */ F(
890
+ return /* @__PURE__ */ F(ze.Provider, { value: we, children: /* @__PURE__ */ F(
873
891
  "div",
874
892
  {
893
+ "aria-orientation": c,
875
894
  className: t,
876
- "data-group": !0,
877
- "data-group-id": h,
878
- "data-group-direction": o,
879
- ref: ze,
895
+ "data-group": m,
896
+ ref: be,
880
897
  style: {
881
898
  ...u,
882
- ...oe,
899
+ ...se,
883
900
  display: "flex",
884
- flexDirection: o === "horizontal" ? "row" : "column",
885
- flexWrap: "nowrap",
886
- overflow: "hidden"
901
+ flexDirection: c === "horizontal" ? "row" : "column",
902
+ flexWrap: "nowrap"
887
903
  },
888
904
  children: e
889
905
  }
890
906
  ) });
891
907
  }
892
- function xe(e) {
908
+ function J(e) {
893
909
  return `react-resizable-panels:${e}`;
894
910
  }
895
- function Ze({
896
- id: e,
897
- storage: t
898
- }) {
899
- try {
900
- const n = xe(e), o = t.getItem(n);
901
- if (o)
902
- return JSON.parse(o);
903
- } catch (n) {
904
- console.error(n);
905
- }
906
- }
907
- function qe({
911
+ function Qe({
908
912
  id: e,
909
913
  layout: t,
910
914
  storage: n
911
915
  }) {
912
916
  try {
913
- const o = xe(e);
917
+ const o = J(e);
914
918
  n.setItem(o, JSON.stringify(t));
915
919
  } catch (o) {
916
920
  console.error(o);
917
921
  }
918
922
  }
919
- function ot({
923
+ function st({
920
924
  groupId: e,
921
- storage: t = localStorage
925
+ storage: t
922
926
  }) {
923
- const n = I(null);
924
- n.current === null && (n.current = Ze({
925
- id: e,
926
- storage: t
927
- }));
928
- const o = ce(
929
- (s) => qe({
927
+ const n = Ge(
928
+ et,
929
+ () => t.getItem(J(e)),
930
+ () => t.getItem(J(e))
931
+ ), o = pe(
932
+ () => n ? JSON.parse(n) : null,
933
+ [n]
934
+ ), s = fe(
935
+ (i) => Qe({
930
936
  id: e,
931
- layout: s,
937
+ layout: i,
932
938
  storage: t
933
939
  }),
934
940
  [e, t]
935
941
  );
936
942
  return {
937
- defaultLayout: n.current,
938
- onLayoutChange: o
943
+ defaultLayout: o,
944
+ onLayoutChange: s
939
945
  };
940
946
  }
941
- function it() {
947
+ function et() {
948
+ return function() {
949
+ };
950
+ }
951
+ function at() {
942
952
  return M(null);
943
953
  }
944
- function rt() {
954
+ function lt() {
945
955
  return I(null);
946
956
  }
947
- function te() {
948
- const e = Ge(Se);
949
- return E(e, "Unexpected"), e;
957
+ function ie() {
958
+ const e = Ie(ze);
959
+ return C(e, "Unexpected"), e;
950
960
  }
951
- function Je({
961
+ function tt({
952
962
  groupId: e,
953
963
  panelId: t
954
964
  }) {
@@ -986,7 +996,7 @@ function Je({
986
996
  i();
987
997
  },
988
998
  getSize: () => {
989
- const { group: a } = n(), r = i(), { element: l } = s(), c = a.direction === "horizontal" ? l.offsetWidth : l.offsetHeight;
999
+ const { group: a } = n(), r = i(), { element: l } = s(), c = a.orientation === "horizontal" ? l.offsetWidth : l.offsetHeight;
990
1000
  return {
991
1001
  asPercentage: r,
992
1002
  inPixels: c
@@ -994,13 +1004,13 @@ function Je({
994
1004
  },
995
1005
  isCollapsed: () => {
996
1006
  const { collapsible: a, collapsedSize: r } = o(), l = i();
997
- return a && b(r, l);
1007
+ return a && w(r, l);
998
1008
  },
999
1009
  resize: (a) => {
1000
1010
  if (i() !== a)
1001
1011
  switch (typeof a) {
1002
1012
  case "number": {
1003
- const { group: l } = n(), c = Z({ group: l });
1013
+ const { group: l } = n(), c = Q({ group: l });
1004
1014
  L(a / c * 100);
1005
1015
  break;
1006
1016
  }
@@ -1008,25 +1018,25 @@ function Je({
1008
1018
  }
1009
1019
  };
1010
1020
  }
1011
- function Qe(e, t) {
1012
- const { id: n } = te(), o = I({
1013
- collapse: K,
1014
- expand: K,
1021
+ function nt(e, t) {
1022
+ const { id: n } = ie(), o = I({
1023
+ collapse: V,
1024
+ expand: V,
1015
1025
  getSize: () => ({
1016
1026
  asPercentage: 0,
1017
1027
  inPixels: 0
1018
1028
  }),
1019
1029
  isCollapsed: () => !1,
1020
- resize: K
1030
+ resize: V
1021
1031
  });
1022
- ue(t, () => o.current, []), D(() => {
1032
+ de(t, () => o.current, []), _(() => {
1023
1033
  Object.assign(
1024
1034
  o.current,
1025
- Je({ groupId: n, panelId: e })
1035
+ tt({ groupId: n, panelId: e })
1026
1036
  );
1027
1037
  });
1028
1038
  }
1029
- function st({
1039
+ function ct({
1030
1040
  children: e,
1031
1041
  className: t,
1032
1042
  collapsedSize: n = 0,
@@ -1038,18 +1048,18 @@ function st({
1038
1048
  minSize: l = "0",
1039
1049
  onResize: c,
1040
1050
  panelRef: u,
1041
- style: f
1051
+ style: d
1042
1052
  }) {
1043
- const p = !!a, h = J(a), [m, d] = M(null), v = ee(d, i), { id: S, registerPanel: x } = te(), z = c !== null, y = Q((k) => {
1044
- c?.(k);
1053
+ const p = !!a, m = te(a), [h, f] = M(null), v = oe(f, i), { id: g, registerPanel: x } = ie(), z = c !== null, S = ne((k) => {
1054
+ c?.(k, a);
1045
1055
  });
1046
- D(() => {
1047
- if (m !== null)
1056
+ _(() => {
1057
+ if (h !== null)
1048
1058
  return x({
1049
- element: m,
1050
- id: h,
1059
+ element: h,
1060
+ id: m,
1051
1061
  idIsStable: p,
1052
- onResize: z ? y : void 0,
1062
+ onResize: z ? S : void 0,
1053
1063
  panelConstraints: {
1054
1064
  collapsedSize: n,
1055
1065
  collapsible: o,
@@ -1062,21 +1072,20 @@ function st({
1062
1072
  n,
1063
1073
  o,
1064
1074
  s,
1065
- m,
1066
- z,
1067
1075
  h,
1076
+ z,
1077
+ m,
1068
1078
  p,
1069
1079
  r,
1070
1080
  l,
1071
- y,
1081
+ S,
1072
1082
  x
1073
- ]), Qe(h, u);
1074
- const R = ye(S, h);
1083
+ ]), nt(m, u);
1084
+ const R = xe(g, m);
1075
1085
  return /* @__PURE__ */ F(
1076
1086
  "div",
1077
1087
  {
1078
- "data-panel": !0,
1079
- "data-panel-id": h,
1088
+ "data-panel": m,
1080
1089
  ref: v,
1081
1090
  style: {
1082
1091
  flexBasis: 0,
@@ -1086,7 +1095,7 @@ function st({
1086
1095
  overflow: "hidden",
1087
1096
  // Disable pointer events inside of a panel during resize
1088
1097
  // This avoid edge cases like nested iframes
1089
- pointerEvents: `var(${ge})`
1098
+ pointerEvents: `var(${Se})`
1090
1099
  },
1091
1100
  children: /* @__PURE__ */ F(
1092
1101
  "div",
@@ -1095,7 +1104,7 @@ function st({
1095
1104
  style: {
1096
1105
  width: "100%",
1097
1106
  height: "100%",
1098
- ...f
1107
+ ...d
1099
1108
  },
1100
1109
  children: e
1101
1110
  }
@@ -1103,65 +1112,67 @@ function st({
1103
1112
  }
1104
1113
  );
1105
1114
  }
1106
- function at() {
1115
+ function ut() {
1107
1116
  return M(null);
1108
1117
  }
1109
- function lt() {
1118
+ function ft() {
1110
1119
  return I(null);
1111
1120
  }
1112
- function ct({
1121
+ function dt({
1113
1122
  children: e,
1114
1123
  className: t,
1115
1124
  elementRef: n,
1116
1125
  id: o,
1117
1126
  style: s
1118
1127
  }) {
1119
- const i = J(o), [a, r] = M(null), [l, c] = M("inactive"), u = ee(r, n), { registerSeparator: f } = te();
1120
- return D(() => {
1128
+ const i = te(o), [a, r] = M(null), [l, c] = M("inactive"), u = oe(r, n), { orientation: d, registerSeparator: p } = ie(), m = d === "horizontal" ? "vertical" : "horizontal";
1129
+ return _(() => {
1121
1130
  if (a !== null) {
1122
- const p = {
1131
+ const h = {
1123
1132
  element: a,
1124
1133
  id: i
1125
- }, h = f(p), m = _.addListener(
1134
+ }, f = p(h), v = T.addListener(
1126
1135
  "interactionStateChange",
1127
- (d) => {
1136
+ (g) => {
1128
1137
  c(
1129
- d.state !== "inactive" && d.hitRegions.some(
1130
- (v) => v.separator === p
1131
- ) ? d.state : "inactive"
1138
+ g.state !== "inactive" && g.hitRegions.some(
1139
+ (x) => x.separator === h
1140
+ ) ? g.state : "inactive"
1132
1141
  );
1133
1142
  }
1134
1143
  );
1135
1144
  return () => {
1136
- h(), m();
1145
+ f(), v();
1137
1146
  };
1138
1147
  }
1139
- }, [a, i, f]), /* @__PURE__ */ F(
1148
+ }, [a, i, p]), /* @__PURE__ */ F(
1140
1149
  "div",
1141
1150
  {
1151
+ "aria-orientation": m,
1142
1152
  children: e,
1143
1153
  className: t,
1144
- "data-separator": !0,
1145
- "data-separator-id": i,
1154
+ "data-separator": i,
1146
1155
  "data-separator-state": l,
1147
1156
  ref: u,
1157
+ role: "separator",
1148
1158
  style: {
1149
1159
  flexBasis: "auto",
1150
1160
  ...s,
1151
1161
  flexGrow: 0,
1152
1162
  flexShrink: 0
1153
- }
1163
+ },
1164
+ tabIndex: 0
1154
1165
  }
1155
1166
  );
1156
1167
  }
1157
1168
  export {
1158
- nt as Group,
1159
- st as Panel,
1160
- ct as Separator,
1161
- ot as useDefaultLayout,
1162
- it as useGroupCallbackRef,
1163
- rt as useGroupRef,
1164
- at as usePanelCallbackRef,
1165
- lt as usePanelRef
1169
+ rt as Group,
1170
+ ct as Panel,
1171
+ dt as Separator,
1172
+ st as useDefaultLayout,
1173
+ at as useGroupCallbackRef,
1174
+ lt as useGroupRef,
1175
+ ut as usePanelCallbackRef,
1176
+ ft as usePanelRef
1166
1177
  };
1167
1178
  //# sourceMappingURL=react-resizable-panels.js.map