react-panel-layout 0.6.0 → 0.6.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.
Files changed (216) hide show
  1. package/dist/{FloatingPanelFrame-SgYLc6Ud.js → FloatingPanelFrame-3eU9AwPo.js} +2 -2
  2. package/dist/{FloatingPanelFrame-SgYLc6Ud.js.map → FloatingPanelFrame-3eU9AwPo.js.map} +1 -1
  3. package/dist/FloatingWindow-CUXnEtrb.js +827 -0
  4. package/dist/FloatingWindow-CUXnEtrb.js.map +1 -0
  5. package/dist/FloatingWindow-DMwyK0eK.cjs +2 -0
  6. package/dist/FloatingWindow-DMwyK0eK.cjs.map +1 -0
  7. package/dist/GridLayout-DKTg_N61.cjs +2 -0
  8. package/dist/{GridLayout-B4VRsC0r.cjs.map → GridLayout-DKTg_N61.cjs.map} +1 -1
  9. package/dist/{GridLayout-BltqeCPK.js → GridLayout-UWNxXw77.js} +34 -35
  10. package/dist/{GridLayout-BltqeCPK.js.map → GridLayout-UWNxXw77.js.map} +1 -1
  11. package/dist/{HorizontalDivider-WF1k_qND.js → HorizontalDivider-DdxzfV0l.js} +3 -3
  12. package/dist/{HorizontalDivider-WF1k_qND.js.map → HorizontalDivider-DdxzfV0l.js.map} +1 -1
  13. package/dist/{HorizontalDivider-B5Z-KZLk.cjs → HorizontalDivider-_pgV4Mcv.cjs} +2 -2
  14. package/dist/{HorizontalDivider-B5Z-KZLk.cjs.map → HorizontalDivider-_pgV4Mcv.cjs.map} +1 -1
  15. package/dist/{PanelSystem-Dr1TBhxM.js → PanelSystem-BqUzNtf2.js} +5 -5
  16. package/dist/{PanelSystem-Dr1TBhxM.js.map → PanelSystem-BqUzNtf2.js.map} +1 -1
  17. package/dist/{PanelSystem-Bs8bQwQF.cjs → PanelSystem-D603LKKv.cjs} +2 -2
  18. package/dist/{PanelSystem-Bs8bQwQF.cjs.map → PanelSystem-D603LKKv.cjs.map} +1 -1
  19. package/dist/ResizeHandle-CBcAS918.cjs +2 -0
  20. package/dist/{ResizeHandle-CScipO5l.cjs.map → ResizeHandle-CBcAS918.cjs.map} +1 -1
  21. package/dist/{ResizeHandle-CdA_JYfN.js → ResizeHandle-CXjc1meV.js} +28 -29
  22. package/dist/{ResizeHandle-CdA_JYfN.js.map → ResizeHandle-CXjc1meV.js.map} +1 -1
  23. package/dist/SwipePivotTabBar-DWrCuwEI.js +411 -0
  24. package/dist/SwipePivotTabBar-DWrCuwEI.js.map +1 -0
  25. package/dist/SwipePivotTabBar-fjjXkpj7.cjs +2 -0
  26. package/dist/SwipePivotTabBar-fjjXkpj7.cjs.map +1 -0
  27. package/dist/components/gesture/SwipeSafeZone.d.ts +40 -0
  28. package/dist/components/window/Drawer.d.ts +3 -1
  29. package/dist/components/window/DrawerLayers.d.ts +1 -1
  30. package/dist/components/window/drawerStyles.d.ts +69 -0
  31. package/dist/components/window/drawerSwipeConfig.d.ts +29 -0
  32. package/dist/components/window/useDrawerSwipeTransform.d.ts +23 -0
  33. package/dist/config.cjs +1 -1
  34. package/dist/config.js +3 -3
  35. package/dist/constants/styles.d.ts +17 -0
  36. package/dist/dialog/index.d.ts +69 -0
  37. package/dist/floating.js +1 -1
  38. package/dist/grid.cjs +1 -1
  39. package/dist/grid.js +2 -2
  40. package/dist/hooks/gesture/testing/createGestureSimulator.d.ts +7 -0
  41. package/dist/hooks/gesture/types.d.ts +48 -5
  42. package/dist/hooks/gesture/utils.d.ts +19 -0
  43. package/dist/hooks/useAnimationFrame.d.ts +2 -0
  44. package/dist/hooks/useOperationContinuity.d.ts +64 -0
  45. package/dist/hooks/useResizeObserver.d.ts +33 -1
  46. package/dist/hooks/useSharedElementTransition.d.ts +112 -0
  47. package/dist/hooks/useSwipeContentTransform.d.ts +9 -2
  48. package/dist/index.cjs +1 -1
  49. package/dist/index.js +7 -7
  50. package/dist/modules/dialog/AlertDialog.d.ts +9 -0
  51. package/dist/modules/dialog/DialogContainer.d.ts +37 -0
  52. package/dist/modules/dialog/Modal.d.ts +26 -0
  53. package/dist/modules/dialog/SwipeDialogContainer.d.ts +16 -0
  54. package/dist/modules/dialog/dialogAnimationUtils.d.ts +113 -0
  55. package/dist/modules/dialog/types.d.ts +183 -0
  56. package/dist/modules/dialog/useDialog.d.ts +39 -0
  57. package/dist/modules/dialog/useDialogContainer.d.ts +47 -0
  58. package/dist/modules/dialog/useDialogSwipeInput.d.ts +70 -0
  59. package/dist/modules/dialog/useDialogTransform.d.ts +82 -0
  60. package/dist/modules/drawer/types.d.ts +74 -0
  61. package/dist/modules/drawer/useDrawerSwipeInput.d.ts +24 -0
  62. package/dist/modules/pivot/SwipePivotTabBar.d.ts +3 -0
  63. package/dist/modules/stack/SwipeStackContent.d.ts +6 -3
  64. package/dist/modules/stack/SwipeStackOutlet.d.ts +4 -4
  65. package/dist/modules/stack/computeSwipeStackTransform.d.ts +1 -1
  66. package/dist/panels.cjs +1 -1
  67. package/dist/panels.js +1 -1
  68. package/dist/pivot.cjs +1 -1
  69. package/dist/pivot.js +1 -1
  70. package/dist/resizer.cjs +1 -1
  71. package/dist/resizer.js +2 -2
  72. package/dist/stack.cjs +1 -1
  73. package/dist/stack.cjs.map +1 -1
  74. package/dist/stack.js +503 -762
  75. package/dist/stack.js.map +1 -1
  76. package/dist/sticky-header/calculateStickyMetrics.d.ts +28 -0
  77. package/dist/sticky-header.cjs +1 -1
  78. package/dist/sticky-header.cjs.map +1 -1
  79. package/dist/sticky-header.js +59 -51
  80. package/dist/sticky-header.js.map +1 -1
  81. package/dist/{styles-DPPuJ0sf.js → styles-NkjuMOVS.js} +13 -13
  82. package/dist/{styles-DPPuJ0sf.js.map → styles-NkjuMOVS.js.map} +1 -1
  83. package/dist/styles-qf6ptVLD.cjs.map +1 -1
  84. package/dist/types.d.ts +16 -0
  85. package/dist/useDocumentPointerEvents-DXxw3qWj.js +54 -0
  86. package/dist/useDocumentPointerEvents-DXxw3qWj.js.map +1 -0
  87. package/dist/useDocumentPointerEvents-DxDSOtip.cjs +2 -0
  88. package/dist/useDocumentPointerEvents-DxDSOtip.cjs.map +1 -0
  89. package/dist/useNativeGestureGuard-C7TSqEkr.cjs +2 -0
  90. package/dist/useNativeGestureGuard-C7TSqEkr.cjs.map +1 -0
  91. package/dist/useNativeGestureGuard-CGYo6O0r.js +347 -0
  92. package/dist/useNativeGestureGuard-CGYo6O0r.js.map +1 -0
  93. package/dist/window/index.d.ts +2 -0
  94. package/dist/window.cjs +1 -1
  95. package/dist/window.cjs.map +1 -1
  96. package/dist/window.js +114 -103
  97. package/dist/window.js.map +1 -1
  98. package/package.json +6 -1
  99. package/src/components/gesture/SwipeSafeZone.tsx +69 -0
  100. package/src/components/window/Drawer.tsx +249 -162
  101. package/src/components/window/DrawerLayers.tsx +13 -3
  102. package/src/components/window/drawerStyles.spec.ts +263 -0
  103. package/src/components/window/drawerStyles.ts +228 -0
  104. package/src/components/window/drawerSwipeConfig.spec.ts +131 -0
  105. package/src/components/window/drawerSwipeConfig.ts +112 -0
  106. package/src/components/window/useDrawerSwipeTransform.spec.ts +234 -0
  107. package/src/components/window/useDrawerSwipeTransform.ts +129 -0
  108. package/src/constants/styles.ts +19 -0
  109. package/src/demo/pages/Dialog/alerts/index.tsx +22 -0
  110. package/src/demo/pages/Dialog/card/index.tsx +22 -0
  111. package/src/demo/pages/Dialog/components/AlertDialogDemo.tsx +124 -0
  112. package/src/demo/pages/Dialog/components/CardExpandDemo.module.css +243 -0
  113. package/src/demo/pages/Dialog/components/CardExpandDemo.tsx +204 -0
  114. package/src/demo/pages/Dialog/components/CustomAlertDialogDemo.tsx +219 -0
  115. package/src/demo/pages/Dialog/components/DialogDemos.module.css +77 -0
  116. package/src/demo/pages/Dialog/components/ModalBasics.tsx +45 -0
  117. package/src/demo/pages/Dialog/components/SwipeDialogDemo.module.css +77 -0
  118. package/src/demo/pages/Dialog/components/SwipeDialogDemo.tsx +181 -0
  119. package/src/demo/pages/Dialog/custom-alert/index.tsx +22 -0
  120. package/src/demo/pages/Dialog/modal/index.tsx +17 -0
  121. package/src/demo/pages/Dialog/swipe/index.tsx +22 -0
  122. package/src/demo/pages/Drawer/components/DrawerSwipe.module.css +316 -0
  123. package/src/demo/pages/Drawer/components/DrawerSwipe.tsx +178 -0
  124. package/src/demo/pages/Drawer/swipe/index.tsx +17 -0
  125. package/src/demo/pages/Pivot/components/SwipeTabsPivot.tsx +54 -23
  126. package/src/demo/pages/Pivot/swipe-debug/index.tsx +1 -1
  127. package/src/demo/pages/Stack/components/StackBasics.spec.tsx +152 -0
  128. package/src/demo/pages/Stack/components/StackBasics.tsx +179 -95
  129. package/src/demo/pages/Stack/components/StackTablet.spec.tsx +120 -0
  130. package/src/demo/pages/Stack/components/StackTablet.tsx +42 -21
  131. package/src/demo/routes.tsx +22 -1
  132. package/src/dialog/index.ts +85 -0
  133. package/src/hooks/gesture/testing/createGestureSimulator.spec.ts +68 -64
  134. package/src/hooks/gesture/testing/createGestureSimulator.ts +112 -37
  135. package/src/hooks/gesture/types.ts +83 -6
  136. package/src/hooks/gesture/useEdgeSwipeInput.spec.ts +22 -14
  137. package/src/hooks/gesture/useNativeGestureGuard.spec.ts +91 -31
  138. package/src/hooks/gesture/useNativeGestureGuard.ts +3 -1
  139. package/src/hooks/gesture/utils.ts +91 -0
  140. package/src/hooks/useAnimatedVisibility.spec.ts +44 -24
  141. package/src/hooks/useAnimatedVisibility.ts +28 -2
  142. package/src/hooks/useAnimationFrame.ts +8 -0
  143. package/src/hooks/useOperationContinuity.spec.ts +387 -0
  144. package/src/hooks/useOperationContinuity.ts +135 -0
  145. package/src/hooks/useResizeObserver.spec.tsx +277 -0
  146. package/src/hooks/useResizeObserver.tsx +108 -39
  147. package/src/hooks/useScrollContainer.ts +4 -10
  148. package/src/hooks/useSharedElementTransition.ts +333 -0
  149. package/src/hooks/useSwipeContentTransform.spec.ts +18 -18
  150. package/src/hooks/useSwipeContentTransform.ts +166 -28
  151. package/src/modules/dialog/AlertDialog.spec.tsx +387 -0
  152. package/src/modules/dialog/AlertDialog.tsx +221 -0
  153. package/src/modules/dialog/DialogContainer.spec.tsx +228 -0
  154. package/src/modules/dialog/DialogContainer.tsx +188 -0
  155. package/src/modules/dialog/Modal.spec.tsx +220 -0
  156. package/src/modules/dialog/Modal.tsx +182 -0
  157. package/src/modules/dialog/SwipeDialogContainer.tsx +208 -0
  158. package/src/modules/dialog/dialogAnimationUtils.spec.ts +253 -0
  159. package/src/modules/dialog/dialogAnimationUtils.ts +297 -0
  160. package/src/modules/dialog/types.ts +186 -0
  161. package/src/modules/dialog/useDialog.spec.tsx +447 -0
  162. package/src/modules/dialog/useDialog.ts +214 -0
  163. package/src/modules/dialog/useDialogContainer.spec.ts +331 -0
  164. package/src/modules/dialog/useDialogContainer.ts +150 -0
  165. package/src/modules/dialog/useDialogSwipeInput.spec.ts +157 -0
  166. package/src/modules/dialog/useDialogSwipeInput.ts +319 -0
  167. package/src/modules/dialog/useDialogTransform.spec.ts +370 -0
  168. package/src/modules/dialog/useDialogTransform.ts +407 -0
  169. package/src/modules/drawer/types.ts +102 -0
  170. package/src/modules/drawer/useDrawerSwipeInput.spec.ts +566 -0
  171. package/src/modules/drawer/useDrawerSwipeInput.ts +399 -0
  172. package/src/modules/panels/rendering/ContentRegistry.spec.tsx +21 -14
  173. package/src/modules/pivot/SwipePivotContent.position.spec.tsx +12 -8
  174. package/src/modules/pivot/SwipePivotContent.spec.tsx +55 -25
  175. package/src/modules/pivot/SwipePivotContent.tsx +2 -2
  176. package/src/modules/pivot/SwipePivotTabBar.spec.tsx +85 -68
  177. package/src/modules/pivot/SwipePivotTabBar.tsx +75 -15
  178. package/src/modules/pivot/scaleInputState.spec.ts +11 -2
  179. package/src/modules/pivot/usePivot.spec.ts +17 -3
  180. package/src/modules/pivot/usePivotSwipeInput.spec.ts +182 -123
  181. package/src/modules/stack/SwipeStackContent.spec.tsx +387 -100
  182. package/src/modules/stack/SwipeStackContent.tsx +43 -33
  183. package/src/modules/stack/SwipeStackOutlet.spec.tsx +14 -16
  184. package/src/modules/stack/SwipeStackOutlet.tsx +6 -6
  185. package/src/modules/stack/computeSwipeStackTransform.spec.ts +5 -5
  186. package/src/modules/stack/computeSwipeStackTransform.ts +3 -3
  187. package/src/modules/stack/swipeTransitionContinuity.spec.tsx +1133 -0
  188. package/src/modules/stack/useStackAnimationState.spec.ts +3 -1
  189. package/src/modules/stack/useStackAnimationState.ts +18 -13
  190. package/src/modules/stack/useStackNavigation.spec.ts +198 -3
  191. package/src/modules/stack/useStackNavigation.tsx +113 -56
  192. package/src/modules/stack/useStackSwipeInput.spec.ts +65 -32
  193. package/src/modules/stack/useStackSwipeInput.ts +1 -1
  194. package/src/sticky-header/StickyArea.tsx +29 -57
  195. package/src/sticky-header/calculateStickyMetrics.spec.ts +105 -0
  196. package/src/sticky-header/calculateStickyMetrics.ts +50 -0
  197. package/src/types.ts +18 -0
  198. package/src/window/index.ts +2 -0
  199. package/dist/FloatingWindow-BpdOpg_L.js +0 -400
  200. package/dist/FloatingWindow-BpdOpg_L.js.map +0 -1
  201. package/dist/FloatingWindow-TCDNY5gE.cjs +0 -2
  202. package/dist/FloatingWindow-TCDNY5gE.cjs.map +0 -1
  203. package/dist/GridLayout-B4VRsC0r.cjs +0 -2
  204. package/dist/ResizeHandle-CScipO5l.cjs +0 -2
  205. package/dist/SwipePivotTabBar-BGO9X94m.js +0 -407
  206. package/dist/SwipePivotTabBar-BGO9X94m.js.map +0 -1
  207. package/dist/SwipePivotTabBar-BrQismcZ.cjs +0 -2
  208. package/dist/SwipePivotTabBar-BrQismcZ.cjs.map +0 -1
  209. package/dist/useDocumentPointerEvents-CKdhGXd0.js +0 -46
  210. package/dist/useDocumentPointerEvents-CKdhGXd0.js.map +0 -1
  211. package/dist/useDocumentPointerEvents-ChqrKXDk.cjs +0 -2
  212. package/dist/useDocumentPointerEvents-ChqrKXDk.cjs.map +0 -1
  213. package/dist/useEffectEvent-Dp7HLCf0.js +0 -13
  214. package/dist/useEffectEvent-Dp7HLCf0.js.map +0 -1
  215. package/dist/useEffectEvent-huSsGUnl.cjs +0 -2
  216. package/dist/useEffectEvent-huSsGUnl.cjs.map +0 -1
@@ -1,13 +1,12 @@
1
1
  import { jsx as w, Fragment as Z, jsxs as K } from "react/jsx-runtime";
2
2
  import * as d from "react";
3
- import { e as zt, F as Tt, u as wt, L as Mt, P as Pt, f as xt, G as kt, b as Ht } from "./FloatingWindow-BpdOpg_L.js";
4
- import { G as $, z as L, A as j } from "./styles-DPPuJ0sf.js";
5
- import { u as Nt } from "./SwipePivotTabBar-BGO9X94m.js";
6
- import { R as At } from "./ResizeHandle-CdA_JYfN.js";
3
+ import { e as zt, F as Tt, u as wt, L as Mt, P as Pt, f as xt, G as kt, b as Ht } from "./FloatingWindow-CUXnEtrb.js";
4
+ import { G as $, v as L, w as j } from "./styles-NkjuMOVS.js";
5
+ import { u as Nt } from "./SwipePivotTabBar-DWrCuwEI.js";
6
+ import { R as Dt } from "./ResizeHandle-CXjc1meV.js";
7
7
  import { u as St } from "./useIsomorphicLayoutEffect-DhmEnmZ_.js";
8
- import { a as st } from "./useDocumentPointerEvents-CKdhGXd0.js";
9
- import { u as it } from "./useEffectEvent-Dp7HLCf0.js";
10
- const Dt = () => {
8
+ import { u as st, b as it } from "./useDocumentPointerEvents-DXxw3qWj.js";
9
+ const Gt = () => {
11
10
  const t = /* @__PURE__ */ new Map();
12
11
  return (e) => {
13
12
  if (!e)
@@ -18,8 +17,8 @@ const Dt = () => {
18
17
  const r = t.size;
19
18
  return t.set(e, r), r;
20
19
  };
21
- }, Gt = Dt(), V = /* @__PURE__ */ new Map(), $t = (t) => {
22
- const e = `ovs-threshold:${t.threshold}-rootMargin:${t.rootMargin}-root:${Gt(t.root)}`;
20
+ }, At = Gt(), V = /* @__PURE__ */ new Map(), $t = (t) => {
21
+ const e = `ovs-threshold:${t.threshold}-rootMargin:${t.rootMargin}-root:${At(t.root)}`;
23
22
  if (V.has(e))
24
23
  return V.get(e);
25
24
  const n = new class {
@@ -267,7 +266,7 @@ const Ut = ({ layers: t }) => {
267
266
  ...n === "start" ? { top: -g } : { bottom: -g }
268
267
  };
269
268
  }, [n, t, r]);
270
- return /* @__PURE__ */ w("div", { "data-resizable": "true", style: { ...u, position: "relative", pointerEvents: "none" }, children: /* @__PURE__ */ w("div", { "data-direction": a, "data-align": n, "data-handle": "true", style: p, children: /* @__PURE__ */ w(At, { direction: a, onResize: l }) }) });
269
+ return /* @__PURE__ */ w("div", { "data-resizable": "true", style: { ...u, position: "relative", pointerEvents: "none" }, children: /* @__PURE__ */ w("div", { "data-direction": a, "data-align": n, "data-handle": "true", style: p, children: /* @__PURE__ */ w(Dt, { direction: a, onResize: l }) }) });
271
270
  }, Zt = (t) => {
272
271
  const e = /* @__PURE__ */ new Map();
273
272
  t.forEach((r, o) => {
@@ -355,7 +354,7 @@ const Ut = ({ layers: t }) => {
355
354
  return [];
356
355
  const n = getComputedStyle(t);
357
356
  return (e === "col" ? n.gridTemplateColumns : n.gridTemplateRows).split(/\s+/).map((o) => parseFloat(o)).filter((o) => !Number.isNaN(o));
358
- }, yt = (t, e = Number.NEGATIVE_INFINITY, n = Number.POSITIVE_INFINITY) => Math.min(Math.max(t, e), n), Ve = (t, e) => typeof t != "number" || !Number.isFinite(t) ? e : t, _ = (t, e) => `${t}-${e}`, ee = (t, e, n, r) => {
357
+ }, yt = (t, e = Number.NEGATIVE_INFINITY, n = Number.POSITIVE_INFINITY) => Math.min(Math.max(t, e), n), je = (t, e) => typeof t != "number" || !Number.isFinite(t) ? e : t, _ = (t, e) => `${t}-${e}`, ee = (t, e, n, r) => {
359
358
  const o = _(n, r), s = e[o];
360
359
  return s !== void 0 ? `minmax(${t.minSize ?? 0}px, ${s}px)` : t.size;
361
360
  }, ut = (t, e, n) => t.map((r, o) => ee(r, e, n, o)).join(" "), F = (t, e) => t.reduce((n, r, o) => (r.resizable && r.size.endsWith("px") && (n[_(e, o)] = parseInt(r.size, 10)), n), {}), ne = ({
@@ -492,9 +491,9 @@ const Ut = ({ layers: t }) => {
492
491
  containerRef: n,
493
492
  gapSizes: a
494
493
  }), x = _(g, b);
495
- o((A) => {
494
+ o((D) => {
496
495
  const y = M + v, I = se(y, R.minSize, P);
497
- return { ...A, [x]: I };
496
+ return { ...D, [x]: I };
498
497
  });
499
498
  },
500
499
  [t.columns, t.rows, r, n, a]
@@ -610,9 +609,9 @@ const Ut = ({ layers: t }) => {
610
609
  layerById: e,
611
610
  isRootLevel: n
612
611
  }) => {
613
- const [r, o] = d.useState(null), [s, a] = d.useState(null), [l, u] = d.useState({}), [p, f] = d.useState({}), g = d.useRef(null), b = d.useRef(null), v = it((c, i) => {
612
+ const [r, o] = d.useState(null), [s, a] = d.useState(null), [l, u] = d.useState({}), [p, f] = d.useState({}), g = d.useRef(null), b = d.useRef(null), v = st((c, i) => {
614
613
  e.get(c)?.floating?.onMove?.(i);
615
- }), E = it((c, i) => {
614
+ }), E = st((c, i) => {
616
615
  e.get(c)?.floating?.onResize?.(i);
617
616
  });
618
617
  St(() => {
@@ -704,7 +703,7 @@ const Ut = ({ layers: t }) => {
704
703
  }, a(c);
705
704
  },
706
705
  [e, l, p]
707
- ), A = d.useCallback(
706
+ ), D = d.useCallback(
708
707
  (c) => {
709
708
  const i = g.current;
710
709
  if (!i)
@@ -724,22 +723,22 @@ const Ut = ({ layers: t }) => {
724
723
  const i = b.current;
725
724
  if (!i || i.pointerId !== c.pointerId || !e.get(i.layerId))
726
725
  return;
727
- const m = c.clientX - i.startX, z = c.clientY - i.startY, C = Ee(i.horizontalEdge, i.startWidth, m), S = ye(i.verticalEdge, i.startHeight, z), T = ft(C, i.minWidth, i.maxWidth), k = ft(S, i.minHeight, i.maxHeight), D = i.startWidth - T, B = i.startHeight - k, nt = Ie(
726
+ const m = c.clientX - i.startX, z = c.clientY - i.startY, C = Ee(i.horizontalEdge, i.startWidth, m), S = ye(i.verticalEdge, i.startHeight, z), T = ft(C, i.minWidth, i.maxWidth), k = ft(S, i.minHeight, i.maxHeight), G = i.startWidth - T, B = i.startHeight - k, nt = Ie(
728
727
  i.horizontalEdge,
729
728
  i.startPosition.x,
730
- D
729
+ G
731
730
  ), Lt = Le(i.verticalEdge, i.startPosition.y, B), W = p[i.layerId], rt = { width: T, height: k };
732
731
  (!W || W.width !== T || W.height !== k) && (f((X) => ({
733
732
  ...X,
734
733
  [i.layerId]: rt
735
734
  })), E(i.layerId, rt));
736
- const ot = l[i.layerId] ?? { x: 0, y: 0 }, G = { x: nt, y: Lt };
737
- (ot.x !== G.x || ot.y !== G.y) && (u((X) => ({
735
+ const ot = l[i.layerId] ?? { x: 0, y: 0 }, A = { x: nt, y: Lt };
736
+ (ot.x !== A.x || ot.y !== A.y) && (u((X) => ({
738
737
  ...X,
739
- [i.layerId]: G
738
+ [i.layerId]: A
740
739
  })), v(i.layerId, {
741
- left: i.baseLeft + G.x,
742
- top: i.baseTop + G.y
740
+ left: i.baseLeft + A.x,
741
+ top: i.baseTop + A.y
743
742
  }));
744
743
  },
745
744
  [e, l, p, v, E]
@@ -766,11 +765,11 @@ const Ut = ({ layers: t }) => {
766
765
  }
767
766
  a(null);
768
767
  }, []);
769
- st(r !== null, {
770
- onMove: A,
768
+ it(r !== null, {
769
+ onMove: D,
771
770
  onUp: I,
772
771
  onCancel: I
773
- }), st(s !== null, {
772
+ }), it(s !== null, {
774
773
  onMove: y,
775
774
  onUp: N,
776
775
  onCancel: N
@@ -780,7 +779,7 @@ const Ut = ({ layers: t }) => {
780
779
  const i = ve(c), h = H(c);
781
780
  if (!h || h.draggable !== !0)
782
781
  return i;
783
- const m = l[c.id], z = r === c.id, C = s === c.id, S = m ? { transform: `translate(${m.x}px, ${m.y}px)` } : {}, T = p[c.id], k = O(c) ? Y(c) : null, D = T ?? k, B = D ? { width: `${D.width}px`, height: `${D.height}px` } : {};
782
+ const m = l[c.id], z = r === c.id, C = s === c.id, S = m ? { transform: `translate(${m.x}px, ${m.y}px)` } : {}, T = p[c.id], k = O(c) ? Y(c) : null, G = T ?? k, B = G ? { width: `${G.width}px`, height: `${G.height}px` } : {};
784
783
  return {
785
784
  ...i,
786
785
  ...B,
@@ -860,15 +859,15 @@ const Ut = ({ layers: t }) => {
860
859
  overflow: "visible",
861
860
  height: "auto",
862
861
  minHeight: "100%"
863
- }, Ne = (t) => t ? He : It, Ke = ({ config: t, layers: e, style: n, root: r = !1 }) => {
862
+ }, Ne = (t) => t ? He : It, Ve = ({ config: t, layers: e, style: n, root: r = !1 }) => {
864
863
  const o = d.useRef(null), { isIntersecting: s } = Ft(o, { threshold: 0 });
865
- return /* @__PURE__ */ w(xt, { config: t, layers: e, style: n, children: /* @__PURE__ */ w(Ae, { gridRef: o, isIntersecting: s, isRoot: r }) });
866
- }, Ae = ({ gridRef: t, isIntersecting: e, isRoot: n }) => {
864
+ return /* @__PURE__ */ w(xt, { config: t, layers: e, style: n, children: /* @__PURE__ */ w(De, { gridRef: o, isIntersecting: s, isRoot: r }) });
865
+ }, De = ({ gridRef: t, isIntersecting: e, isRoot: n }) => {
867
866
  const { config: r, style: o, layers: s } = zt(), { normalizedLayers: a, visibleLayers: l, regularLayers: u, layerById: p } = Jt(r, s.defs), { columnHandles: f, rowHandles: g, gapSizes: b, gridStyle: v, handleResize: E } = ue(r, o, t), { providerValue: R, draggingLayerId: M, resizingLayerId: P } = Pe({
868
867
  layers: a,
869
868
  layerById: p,
870
869
  isRootLevel: n
871
- }), x = M ? !0 : !!P, A = d.useMemo(() => ({
870
+ }), x = M ? !0 : !!P, D = d.useMemo(() => ({
872
871
  ...Ne(n),
873
872
  ...v,
874
873
  ...x ? ke : {}
@@ -878,7 +877,7 @@ const Ut = ({ layers: t }) => {
878
877
  "div",
879
878
  {
880
879
  ref: t,
881
- style: A,
880
+ style: D,
882
881
  "data-dragging": !!M,
883
882
  "data-resizing": !!P,
884
883
  "data-visible": e,
@@ -915,13 +914,13 @@ const Ut = ({ layers: t }) => {
915
914
  ] });
916
915
  };
917
916
  export {
918
- Ke as G,
917
+ Ve as G,
919
918
  Ut as a,
920
919
  Xt as b,
921
920
  lt as c,
922
921
  ue as d,
923
922
  yt as e,
924
- Ve as t,
923
+ je as t,
925
924
  Jt as u
926
925
  };
927
- //# sourceMappingURL=GridLayout-BltqeCPK.js.map
926
+ //# sourceMappingURL=GridLayout-UWNxXw77.js.map