react-resizable-panels 0.0.59 → 0.0.61
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/CHANGELOG.md +10 -0
- package/dist/declarations/src/PanelGroup.d.ts +2 -2
- package/dist/react-resizable-panels.browser.cjs.js +226 -166
- package/dist/react-resizable-panels.browser.development.cjs.js +229 -169
- package/dist/react-resizable-panels.browser.development.esm.js +229 -169
- package/dist/react-resizable-panels.browser.esm.js +226 -166
- package/dist/react-resizable-panels.cjs.js +226 -166
- package/dist/react-resizable-panels.cjs.js.map +1 -1
- package/dist/react-resizable-panels.development.cjs.js +229 -169
- package/dist/react-resizable-panels.development.esm.js +229 -169
- package/dist/react-resizable-panels.development.node.cjs.js +273 -87
- package/dist/react-resizable-panels.development.node.esm.js +273 -87
- package/dist/react-resizable-panels.esm.js +226 -166
- package/dist/react-resizable-panels.esm.js.map +1 -1
- package/dist/react-resizable-panels.node.cjs.js +270 -84
- package/dist/react-resizable-panels.node.esm.js +270 -84
- package/package.json +1 -1
- package/src/Panel.ts +2 -0
- package/src/PanelGroup.ts +242 -208
- package/src/hooks/useWindowSplitterPanelGroupBehavior.ts +12 -2
- package/src/utils/dom/getPanelElementsForGroup.ts +5 -0
|
@@ -19,6 +19,7 @@ import useIsomorphicLayoutEffect from "./useIsomorphicEffect";
|
|
|
19
19
|
|
|
20
20
|
export function useWindowSplitterPanelGroupBehavior({
|
|
21
21
|
committedValuesRef,
|
|
22
|
+
eagerValuesRef,
|
|
22
23
|
groupId,
|
|
23
24
|
layout,
|
|
24
25
|
panelDataArray,
|
|
@@ -26,6 +27,8 @@ export function useWindowSplitterPanelGroupBehavior({
|
|
|
26
27
|
}: {
|
|
27
28
|
committedValuesRef: RefObject<{
|
|
28
29
|
direction: Direction;
|
|
30
|
+
}>;
|
|
31
|
+
eagerValuesRef: RefObject<{
|
|
29
32
|
panelDataArray: PanelData[];
|
|
30
33
|
}>;
|
|
31
34
|
groupId: string;
|
|
@@ -95,7 +98,7 @@ export function useWindowSplitterPanelGroupBehavior({
|
|
|
95
98
|
}, [groupId, layout, panelDataArray]);
|
|
96
99
|
|
|
97
100
|
useEffect(() => {
|
|
98
|
-
const { panelDataArray } =
|
|
101
|
+
const { panelDataArray } = eagerValuesRef.current!;
|
|
99
102
|
|
|
100
103
|
const groupElement = getPanelGroupElement(groupId);
|
|
101
104
|
assert(groupElement != null, `No group found for id "${groupId}"`);
|
|
@@ -181,5 +184,12 @@ export function useWindowSplitterPanelGroupBehavior({
|
|
|
181
184
|
return () => {
|
|
182
185
|
cleanupFunctions.forEach((cleanupFunction) => cleanupFunction());
|
|
183
186
|
};
|
|
184
|
-
}, [
|
|
187
|
+
}, [
|
|
188
|
+
committedValuesRef,
|
|
189
|
+
eagerValuesRef,
|
|
190
|
+
groupId,
|
|
191
|
+
layout,
|
|
192
|
+
panelDataArray,
|
|
193
|
+
setLayout,
|
|
194
|
+
]);
|
|
185
195
|
}
|