react-resizable-panels 2.0.11 → 2.0.13

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/src/PanelGroup.ts CHANGED
@@ -355,9 +355,10 @@ function PanelGroupWithForwardedRef({
355
355
 
356
356
  const nextLayout = adjustLayoutByDelta({
357
357
  delta,
358
- layout: prevLayout,
358
+ initialLayout: prevLayout,
359
359
  panelConstraints: panelConstraintsArray,
360
360
  pivotIndices,
361
+ prevLayout,
361
362
  trigger: "imperative-api",
362
363
  });
363
364
 
@@ -415,9 +416,10 @@ function PanelGroupWithForwardedRef({
415
416
 
416
417
  const nextLayout = adjustLayoutByDelta({
417
418
  delta,
418
- layout: prevLayout,
419
+ initialLayout: prevLayout,
419
420
  panelConstraints: panelConstraintsArray,
420
421
  pivotIndices,
422
+ prevLayout,
421
423
  trigger: "imperative-api",
422
424
  });
423
425
 
@@ -636,9 +638,10 @@ function PanelGroupWithForwardedRef({
636
638
 
637
639
  const nextLayout = adjustLayoutByDelta({
638
640
  delta,
639
- layout: initialLayout ?? prevLayout,
641
+ initialLayout: initialLayout ?? prevLayout,
640
642
  panelConstraints,
641
643
  pivotIndices,
644
+ prevLayout,
642
645
  trigger: isKeyDown(event) ? "keyboard" : "mouse-or-touch",
643
646
  });
644
647
 
@@ -722,9 +725,10 @@ function PanelGroupWithForwardedRef({
722
725
 
723
726
  const nextLayout = adjustLayoutByDelta({
724
727
  delta,
725
- layout: prevLayout,
728
+ initialLayout: prevLayout,
726
729
  panelConstraints: panelConstraintsArray,
727
730
  pivotIndices,
731
+ prevLayout,
728
732
  trigger: "imperative-api",
729
733
  });
730
734
 
@@ -157,7 +157,7 @@ export function useWindowSplitterPanelGroupBehavior({
157
157
  delta: fuzzyNumbersEqual(size, collapsedSize)
158
158
  ? minSize - collapsedSize
159
159
  : collapsedSize - size,
160
- layout,
160
+ initialLayout: layout,
161
161
  panelConstraints: panelDataArray.map(
162
162
  (panelData) => panelData.constraints
163
163
  ),
@@ -166,6 +166,7 @@ export function useWindowSplitterPanelGroupBehavior({
166
166
  handleId,
167
167
  panelGroupElement
168
168
  ),
169
+ prevLayout: layout,
169
170
  trigger: "keyboard",
170
171
  });
171
172
  if (layout !== nextLayout) {