react-resizable-panels 4.0.15 → 4.1.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.
|
@@ -19,7 +19,7 @@ import { SetStateAction } from 'react';
|
|
|
19
19
|
*
|
|
20
20
|
* ℹ️ [Test id](https://testing-library.com/docs/queries/bytestid/) can be used to narrow selection when unit testing.
|
|
21
21
|
*/
|
|
22
|
-
export declare function Group({ children, className, defaultLayout, disableCursor, disabled, elementRef, groupRef, id: idProp, onLayoutChange: onLayoutChangeUnstable, orientation, style, ...rest }: GroupProps): JSX.Element;
|
|
22
|
+
export declare function Group({ children, className, defaultLayout, disableCursor, disabled, elementRef: elementRefProp, groupRef, id: idProp, onLayoutChange: onLayoutChangeUnstable, orientation, style, ...rest }: GroupProps): JSX.Element;
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* Imperative Group API.
|
|
@@ -149,7 +149,7 @@ export declare type Orientation = "horizontal" | "vertical";
|
|
|
149
149
|
*
|
|
150
150
|
* ℹ️ [Test id](https://testing-library.com/docs/queries/bytestid/) can be used to narrow selection when unit testing.
|
|
151
151
|
*/
|
|
152
|
-
export declare function Panel({ children, className, collapsedSize, collapsible, defaultSize, elementRef, id: idProp, maxSize, minSize, onResize: onResizeUnstable, panelRef, style, ...rest }: PanelProps): JSX.Element;
|
|
152
|
+
export declare function Panel({ children, className, collapsedSize, collapsible, defaultSize, elementRef: elementRefProp, id: idProp, maxSize, minSize, onResize: onResizeUnstable, panelRef, style, ...rest }: PanelProps): JSX.Element;
|
|
153
153
|
|
|
154
154
|
/**
|
|
155
155
|
* Imperative Panel API
|
|
@@ -255,7 +255,6 @@ export declare type PanelProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
255
255
|
* - `expand(): void`
|
|
256
256
|
* - `getSize(): number`
|
|
257
257
|
* - `isCollapsed(): boolean`
|
|
258
|
-
* - `isExpanded(): boolean`
|
|
259
258
|
* - `resize(size: number): void`
|
|
260
259
|
*
|
|
261
260
|
* ℹ️ The `usePanelRef` and `usePanelCallbackRef` hooks are exported for convenience use in TypeScript projects.
|
|
@@ -323,11 +322,17 @@ export declare type SeparatorProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
323
322
|
|
|
324
323
|
export declare type SizeUnit = "px" | "%" | "em" | "rem" | "vh" | "vw";
|
|
325
324
|
|
|
326
|
-
export declare function useDefaultLayout({ debounceSaveMs, storage, ...rest }: {
|
|
325
|
+
export declare function useDefaultLayout({ debounceSaveMs, panelIds, storage, ...rest }: {
|
|
327
326
|
/**
|
|
328
327
|
* Debounce save operation by the specified number of milliseconds; defaults to 100ms
|
|
329
328
|
*/
|
|
330
329
|
debounceSaveMs?: number;
|
|
330
|
+
/**
|
|
331
|
+
* For Groups that contain conditionally-rendered Panels, this prop can be used to save and restore multiple layouts.
|
|
332
|
+
*
|
|
333
|
+
* ⚠️ Panel ids must match the Panels rendered within the Group during mount or the initial layout will be incorrect.
|
|
334
|
+
*/
|
|
335
|
+
panelIds?: string[] | undefined;
|
|
331
336
|
/**
|
|
332
337
|
* Storage implementation; supports localStorage, sessionStorage, and custom implementations
|
|
333
338
|
* Refer to documentation site for example integrations.
|