react-resizable-panels 4.3.2 → 4.4.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.
|
@@ -23,7 +23,7 @@ declare type BaseSeparatorAttributes = Omit<HTMLAttributes<HTMLDivElement>, "rol
|
|
|
23
23
|
*
|
|
24
24
|
* ℹ️ [Test id](https://testing-library.com/docs/queries/bytestid/) can be used to narrow selection when unit testing.
|
|
25
25
|
*/
|
|
26
|
-
export declare function Group({ children, className, defaultLayout, disableCursor, disabled, elementRef: elementRefProp, groupRef, id: idProp, onLayoutChange: onLayoutChangeUnstable, orientation, style, ...rest }: GroupProps): JSX.Element;
|
|
26
|
+
export declare function Group({ children, className, defaultLayout, disableCursor, disabled, elementRef: elementRefProp, groupRef, id: idProp, onLayoutChange: onLayoutChangeUnstable, onLayoutChanged: onLayoutChangedUnstable, orientation, style, ...rest }: GroupProps): JSX.Element;
|
|
27
27
|
|
|
28
28
|
export declare namespace Group {
|
|
29
29
|
var displayName: string;
|
|
@@ -100,9 +100,19 @@ export declare type GroupProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
100
100
|
*/
|
|
101
101
|
id?: string | number | undefined;
|
|
102
102
|
/**
|
|
103
|
-
* Called when
|
|
103
|
+
* Called when the Group's layout is changing.
|
|
104
|
+
*
|
|
105
|
+
* ⚠️ For layout changes caused by pointer events, this method is called each time the pointer is moved.
|
|
106
|
+
* For most cases, it is recommended to use the `onLayoutChanged` callback instead.
|
|
104
107
|
*/
|
|
105
108
|
onLayoutChange?: (layout: Layout) => void | undefined;
|
|
109
|
+
/**
|
|
110
|
+
* Called after the Group's layout has been changed.
|
|
111
|
+
*
|
|
112
|
+
* ℹ️ For layout changes caused by pointer events, this method is not called until the pointer has been released.
|
|
113
|
+
* This method is recommended when saving layouts to some storage api.
|
|
114
|
+
*/
|
|
115
|
+
onLayoutChanged?: (layout: Layout) => void | undefined;
|
|
106
116
|
/**
|
|
107
117
|
* Specifies the resizable orientation ("horizontal" or "vertical"); defaults to "horizontal"
|
|
108
118
|
*/
|
|
@@ -351,6 +361,8 @@ export declare type SizeUnit = "px" | "%" | "em" | "rem" | "vh" | "vw";
|
|
|
351
361
|
export declare function useDefaultLayout({ debounceSaveMs, panelIds, storage, ...rest }: {
|
|
352
362
|
/**
|
|
353
363
|
* Debounce save operation by the specified number of milliseconds; defaults to 100ms
|
|
364
|
+
*
|
|
365
|
+
* @deprecated Use the {@link onLayoutChanged} callback instead; it does not require debouncing
|
|
354
366
|
*/
|
|
355
367
|
debounceSaveMs?: number;
|
|
356
368
|
/**
|
|
@@ -379,8 +391,20 @@ export declare function useDefaultLayout({ debounceSaveMs, panelIds, storage, ..
|
|
|
379
391
|
*/
|
|
380
392
|
id: string;
|
|
381
393
|
})): {
|
|
394
|
+
/**
|
|
395
|
+
* Pass this value to `Group` as the `defaultLayout` prop.
|
|
396
|
+
*/
|
|
382
397
|
defaultLayout: Layout | undefined;
|
|
398
|
+
/**
|
|
399
|
+
* Attach this callback on the `Group` as the `onLayoutChange` prop.
|
|
400
|
+
*
|
|
401
|
+
* @deprecated Use the {@link onLayoutChanged} prop instead.
|
|
402
|
+
*/
|
|
383
403
|
onLayoutChange: (layout: Layout) => void | undefined;
|
|
404
|
+
/**
|
|
405
|
+
* Attach this callback on the `Group` as the `onLayoutChanged` prop.
|
|
406
|
+
*/
|
|
407
|
+
onLayoutChanged: (layout: Layout) => void | undefined;
|
|
384
408
|
};
|
|
385
409
|
|
|
386
410
|
/**
|