react-resizable-panels 4.14.4 → 4.14.6
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.
|
@@ -86,7 +86,7 @@ export declare type CellProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
86
86
|
* Uniquely identifies this cell within the parent grid.
|
|
87
87
|
* Falls back to `useId` when not provided.
|
|
88
88
|
*
|
|
89
|
-
* ℹ️ This value will also be assigned to the `id` and `data-testid` attributes.
|
|
89
|
+
* ℹ️ This value will also be assigned to the `id` and `data-testid` attributes; (an explicit `data-testid` prop will take precedence).
|
|
90
90
|
*/
|
|
91
91
|
id?: string | number | undefined;
|
|
92
92
|
/**
|
|
@@ -357,7 +357,7 @@ export declare type GridProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
357
357
|
* Uniquely identifies this grid within an application.
|
|
358
358
|
* Falls back to `useId` when not provided.
|
|
359
359
|
*
|
|
360
|
-
* ℹ️ This value will also be assigned to the `id` and `data-testid` attributes.
|
|
360
|
+
* ℹ️ This value will also be assigned to the `id` and `data-testid` attributes; (an explicit `data-testid` prop will take precedence).
|
|
361
361
|
*/
|
|
362
362
|
id?: string | number | undefined;
|
|
363
363
|
/**
|
|
@@ -375,7 +375,7 @@ export declare type GridProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
375
375
|
*/
|
|
376
376
|
onLayoutChanged?: ((layout: GridLayout, meta: LayoutChangedMeta<GridLayout>) => void) | undefined;
|
|
377
377
|
/**
|
|
378
|
-
* Minimum size of the resizable hit target area (either a `Gridline` or a `Cell` edge)
|
|
378
|
+
* Minimum size of the resizable hit target area (either a `Gridline` or a `Cell` edge).
|
|
379
379
|
* This threshold ensures targets are large enough to avoid mis-clicks.
|
|
380
380
|
*
|
|
381
381
|
* ℹ️ Refer to the `Group` prop of the same name for more information.
|
|
@@ -543,7 +543,7 @@ export declare type GroupProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
543
543
|
/**
|
|
544
544
|
* Exposes the following imperative API:
|
|
545
545
|
* - `getLayout(): Layout`
|
|
546
|
-
* - `setLayout(layout: Layout):
|
|
546
|
+
* - `setLayout(layout: Layout): Layout`
|
|
547
547
|
*
|
|
548
548
|
* ℹ️ The `useGroupRef` and `useGroupCallbackRef` hooks are exported for convenience use in TypeScript projects.
|
|
549
549
|
*/
|
|
@@ -552,7 +552,7 @@ export declare type GroupProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
552
552
|
* Uniquely identifies this group within an application.
|
|
553
553
|
* Falls back to `useId` when not provided.
|
|
554
554
|
*
|
|
555
|
-
* ℹ️ This value will also be assigned to the `id` and `data-testid` attributes.
|
|
555
|
+
* ℹ️ This value will also be assigned to the `id` and `data-testid` attributes; (an explicit `data-testid` prop will take precedence).
|
|
556
556
|
*/
|
|
557
557
|
id?: string | number | undefined;
|
|
558
558
|
/**
|
|
@@ -563,7 +563,7 @@ export declare type GroupProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
563
563
|
*/
|
|
564
564
|
onLayoutChange?: (layout: Layout) => void | undefined;
|
|
565
565
|
/**
|
|
566
|
-
* Called after the Group's layout has
|
|
566
|
+
* Called after the Group's layout has been changed.
|
|
567
567
|
*
|
|
568
568
|
* ℹ️ For layout changes caused by pointer events, this method is not called until the pointer has been released.
|
|
569
569
|
* This method is recommended when saving layouts to some storage api.
|
|
@@ -577,7 +577,7 @@ export declare type GroupProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
577
577
|
*/
|
|
578
578
|
onLayoutChanged?: (layout: Layout, meta: LayoutChangedMeta) => void;
|
|
579
579
|
/**
|
|
580
|
-
* Controls whether pointer dragging updates `Panel`
|
|
580
|
+
* Controls whether pointer dragging updates `Panel` sizes immediately,
|
|
581
581
|
* or renders overlay separator previews until the pointer is released.
|
|
582
582
|
*
|
|
583
583
|
* Defaults to `"panel"` (immediate resizing); `"separator"` defers resizing until release.
|
|
@@ -586,14 +586,14 @@ export declare type GroupProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
586
586
|
*/
|
|
587
587
|
resizePreviewMode?: ResizePreviewMode | undefined;
|
|
588
588
|
/**
|
|
589
|
-
* Minimum size of the resizable hit target area (either `Separator` or `Panel` edge)
|
|
590
|
-
* This threshold ensures are large enough to avoid mis-clicks.
|
|
589
|
+
* Minimum size of the resizable hit target area (either `Separator` or `Panel` edge).
|
|
590
|
+
* This threshold ensures targets are large enough to avoid mis-clicks.
|
|
591
591
|
*
|
|
592
592
|
* - Coarse inputs (typically a finger on a touchscreen) have reduced accuracy;
|
|
593
593
|
* to ensure accessibility and ease of use, hit targets should be larger to prevent mis-clicks.
|
|
594
594
|
* - Fine inputs (typically a mouse) can be smaller
|
|
595
595
|
*
|
|
596
|
-
* ℹ️ [Apple interface guidelines](https://developer.apple.com/design/human-interface-guidelines/accessibility) suggest `20pt` (`27px`) on desktops and `28pt` (`37px`) for touch devices
|
|
596
|
+
* ℹ️ [Apple interface guidelines](https://developer.apple.com/design/human-interface-guidelines/accessibility) suggest `20pt` (`27px`) on desktops and `28pt` (`37px`) for touch devices.
|
|
597
597
|
* In practice this seems to be much larger than many of their own applications use though.
|
|
598
598
|
*/
|
|
599
599
|
resizeTargetMinimumSize?: {
|
|
@@ -724,7 +724,7 @@ declare type PanelConstraintProps = Pick<PanelProps, "collapsedSize" | "collapse
|
|
|
724
724
|
*/
|
|
725
725
|
export declare interface PanelImperativeHandle {
|
|
726
726
|
/**
|
|
727
|
-
* Collapse the Panel to
|
|
727
|
+
* Collapse the Panel to its `collapsedSize`.
|
|
728
728
|
*
|
|
729
729
|
* ⚠️ This method will do nothing if the Panel is not `collapsible` or if it is already collapsed.
|
|
730
730
|
*/
|
|
@@ -764,7 +764,6 @@ export declare interface PanelImperativeHandle {
|
|
|
764
764
|
* Other units should be specified as strings ending with their CSS property units (e.g. 1rem, 50vh)
|
|
765
765
|
*
|
|
766
766
|
* @param size New panel size
|
|
767
|
-
* @return Applied size (after validation)
|
|
768
767
|
*/
|
|
769
768
|
resize: (size: number | string) => void;
|
|
770
769
|
}
|
|
@@ -786,7 +785,7 @@ export declare type PanelProps = BasePanelAttributes & {
|
|
|
786
785
|
* Defaults to half the distance between `collapsedSize` and `minSize`.
|
|
787
786
|
*
|
|
788
787
|
* For example if a panel declares `collapsedSize="5%"`, `collapsedThreshold="5%"`, and `minSize="25%"`,
|
|
789
|
-
* it will collapse when resized below 20% and
|
|
788
|
+
* it will collapse when resized below 20% and expand when resized above 10%.
|
|
790
789
|
*
|
|
791
790
|
* ℹ️ Interpretation rules:
|
|
792
791
|
* - Numbers are interpreted as pixels (e.g. `minSize={200}` is 200 pixels)
|
|
@@ -797,7 +796,7 @@ export declare type PanelProps = BasePanelAttributes & {
|
|
|
797
796
|
/**
|
|
798
797
|
* This panel can be collapsed.
|
|
799
798
|
*
|
|
800
|
-
* ℹ️ A collapsible panel will collapse when
|
|
799
|
+
* ℹ️ A collapsible panel will collapse when its size is less than the specified `minSize`
|
|
801
800
|
*/
|
|
802
801
|
collapsible?: boolean | undefined;
|
|
803
802
|
/**
|
|
@@ -838,7 +837,7 @@ export declare type PanelProps = BasePanelAttributes & {
|
|
|
838
837
|
*
|
|
839
838
|
* ℹ️ This prop is used to associate persisted group layouts with the original panel.
|
|
840
839
|
*
|
|
841
|
-
* ℹ️ This value will also be assigned to the `id` and `data-testid` attributes.
|
|
840
|
+
* ℹ️ This value will also be assigned to the `id` and `data-testid` attributes; (an explicit `data-testid` prop will take precedence).
|
|
842
841
|
*/
|
|
843
842
|
id?: string | number | undefined;
|
|
844
843
|
/**
|
|
@@ -871,9 +870,9 @@ export declare type PanelProps = BasePanelAttributes & {
|
|
|
871
870
|
* Exposes the following imperative API:
|
|
872
871
|
* - `collapse(): void`
|
|
873
872
|
* - `expand(): void`
|
|
874
|
-
* - `getSize():
|
|
873
|
+
* - `getSize(): PanelSize`
|
|
875
874
|
* - `isCollapsed(): boolean`
|
|
876
|
-
* - `resize(size: number): void`
|
|
875
|
+
* - `resize(size: number | string): void`
|
|
877
876
|
*
|
|
878
877
|
* ℹ️ The `usePanelRef` and `usePanelCallbackRef` hooks are exported for convenience use in TypeScript projects.
|
|
879
878
|
*/
|
|
@@ -959,7 +958,7 @@ export declare type SeparatorProps = BaseSeparatorAttributes & {
|
|
|
959
958
|
* Uniquely identifies the separator within the parent group.
|
|
960
959
|
* Falls back to `useId` when not provided.
|
|
961
960
|
*
|
|
962
|
-
* ℹ️ This value will also be assigned to the `id` and `data-testid` attributes.
|
|
961
|
+
* ℹ️ This value will also be assigned to the `id` and `data-testid` attributes; (an explicit `data-testid` prop will take precedence).
|
|
963
962
|
*/
|
|
964
963
|
id?: string | number | undefined;
|
|
965
964
|
/**
|