@zag-js/splitter 1.27.0 → 1.27.1
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/dist/index.d.mts +8 -3
- package/dist/index.d.ts +8 -3
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -5,6 +5,7 @@ import { Service, EventObject, Machine } from '@zag-js/core';
|
|
|
5
5
|
|
|
6
6
|
declare const anatomy: _zag_js_anatomy.AnatomyInstance<"root" | "panel" | "resizeTrigger">;
|
|
7
7
|
|
|
8
|
+
type ResizeEvent = PointerEvent | KeyboardEvent;
|
|
8
9
|
type PanelId = string;
|
|
9
10
|
type ResizeTriggerId = `${PanelId}:${PanelId}`;
|
|
10
11
|
interface PanelData {
|
|
@@ -33,6 +34,10 @@ interface PanelData {
|
|
|
33
34
|
*/
|
|
34
35
|
collapsedSize?: number | undefined;
|
|
35
36
|
}
|
|
37
|
+
interface CursorState {
|
|
38
|
+
isAtMin: boolean;
|
|
39
|
+
isAtMax: boolean;
|
|
40
|
+
}
|
|
36
41
|
interface ResizeDetails {
|
|
37
42
|
size: number[];
|
|
38
43
|
resizeTriggerId: string | null;
|
|
@@ -105,7 +110,7 @@ interface SplitterProps extends DirectionProperty, CommonProperties {
|
|
|
105
110
|
*/
|
|
106
111
|
onExpand?: ((details: ExpandCollapseDetails) => void) | undefined;
|
|
107
112
|
}
|
|
108
|
-
type
|
|
113
|
+
type PropsWithDefault = "orientation" | "panels";
|
|
109
114
|
interface DragState {
|
|
110
115
|
resizeTriggerId: string;
|
|
111
116
|
resizeTriggerRect: DOMRect;
|
|
@@ -128,7 +133,7 @@ interface Refs {
|
|
|
128
133
|
interface SplitterSchema {
|
|
129
134
|
state: "idle" | "hover:temp" | "hover" | "dragging" | "focused";
|
|
130
135
|
tag: "focus";
|
|
131
|
-
props: RequiredBy<SplitterProps,
|
|
136
|
+
props: RequiredBy<SplitterProps, PropsWithDefault>;
|
|
132
137
|
context: Context;
|
|
133
138
|
computed: {
|
|
134
139
|
horizontal: boolean;
|
|
@@ -224,4 +229,4 @@ declare const splitResizeTriggerProps: <Props extends ResizeTriggerProps>(props:
|
|
|
224
229
|
|
|
225
230
|
declare function getPanelLayout(panels: PanelData[]): string;
|
|
226
231
|
|
|
227
|
-
export { type SplitterApi as Api, type ElementIds, type ExpandCollapseDetails, type SplitterItem as Item, type SplitterMachine as Machine, type PanelData, type PanelProps, type SplitterProps as Props, type ResizeDetails, type ResizeEndDetails, type ResizeTriggerProps, type SplitterService as Service, anatomy, connect, getPanelLayout as layout, machine, panelProps, props, resizeTriggerProps, splitPanelProps, splitProps, splitResizeTriggerProps };
|
|
232
|
+
export { type SplitterApi as Api, type CursorState, type DragState, type ElementIds, type ExpandCollapseDetails, type SplitterItem as Item, type KeyboardState, type SplitterMachine as Machine, type PanelData, type PanelId, type PanelItem, type PanelProps, type SplitterProps as Props, type ResizeDetails, type ResizeEndDetails, type ResizeEvent, type ResizeTriggerId, type ResizeTriggerItem, type ResizeTriggerProps, type SplitterService as Service, anatomy, connect, getPanelLayout as layout, machine, panelProps, props, resizeTriggerProps, splitPanelProps, splitProps, splitResizeTriggerProps };
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { Service, EventObject, Machine } from '@zag-js/core';
|
|
|
5
5
|
|
|
6
6
|
declare const anatomy: _zag_js_anatomy.AnatomyInstance<"root" | "panel" | "resizeTrigger">;
|
|
7
7
|
|
|
8
|
+
type ResizeEvent = PointerEvent | KeyboardEvent;
|
|
8
9
|
type PanelId = string;
|
|
9
10
|
type ResizeTriggerId = `${PanelId}:${PanelId}`;
|
|
10
11
|
interface PanelData {
|
|
@@ -33,6 +34,10 @@ interface PanelData {
|
|
|
33
34
|
*/
|
|
34
35
|
collapsedSize?: number | undefined;
|
|
35
36
|
}
|
|
37
|
+
interface CursorState {
|
|
38
|
+
isAtMin: boolean;
|
|
39
|
+
isAtMax: boolean;
|
|
40
|
+
}
|
|
36
41
|
interface ResizeDetails {
|
|
37
42
|
size: number[];
|
|
38
43
|
resizeTriggerId: string | null;
|
|
@@ -105,7 +110,7 @@ interface SplitterProps extends DirectionProperty, CommonProperties {
|
|
|
105
110
|
*/
|
|
106
111
|
onExpand?: ((details: ExpandCollapseDetails) => void) | undefined;
|
|
107
112
|
}
|
|
108
|
-
type
|
|
113
|
+
type PropsWithDefault = "orientation" | "panels";
|
|
109
114
|
interface DragState {
|
|
110
115
|
resizeTriggerId: string;
|
|
111
116
|
resizeTriggerRect: DOMRect;
|
|
@@ -128,7 +133,7 @@ interface Refs {
|
|
|
128
133
|
interface SplitterSchema {
|
|
129
134
|
state: "idle" | "hover:temp" | "hover" | "dragging" | "focused";
|
|
130
135
|
tag: "focus";
|
|
131
|
-
props: RequiredBy<SplitterProps,
|
|
136
|
+
props: RequiredBy<SplitterProps, PropsWithDefault>;
|
|
132
137
|
context: Context;
|
|
133
138
|
computed: {
|
|
134
139
|
horizontal: boolean;
|
|
@@ -224,4 +229,4 @@ declare const splitResizeTriggerProps: <Props extends ResizeTriggerProps>(props:
|
|
|
224
229
|
|
|
225
230
|
declare function getPanelLayout(panels: PanelData[]): string;
|
|
226
231
|
|
|
227
|
-
export { type SplitterApi as Api, type ElementIds, type ExpandCollapseDetails, type SplitterItem as Item, type SplitterMachine as Machine, type PanelData, type PanelProps, type SplitterProps as Props, type ResizeDetails, type ResizeEndDetails, type ResizeTriggerProps, type SplitterService as Service, anatomy, connect, getPanelLayout as layout, machine, panelProps, props, resizeTriggerProps, splitPanelProps, splitProps, splitResizeTriggerProps };
|
|
232
|
+
export { type SplitterApi as Api, type CursorState, type DragState, type ElementIds, type ExpandCollapseDetails, type SplitterItem as Item, type KeyboardState, type SplitterMachine as Machine, type PanelData, type PanelId, type PanelItem, type PanelProps, type SplitterProps as Props, type ResizeDetails, type ResizeEndDetails, type ResizeEvent, type ResizeTriggerId, type ResizeTriggerItem, type ResizeTriggerProps, type SplitterService as Service, anatomy, connect, getPanelLayout as layout, machine, panelProps, props, resizeTriggerProps, splitPanelProps, splitProps, splitResizeTriggerProps };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/splitter",
|
|
3
|
-
"version": "1.27.
|
|
3
|
+
"version": "1.27.1",
|
|
4
4
|
"description": "Core logic for the splitter widget implemented as a state machine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"url": "https://github.com/chakra-ui/zag/issues"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@zag-js/anatomy": "1.27.
|
|
31
|
-
"@zag-js/core": "1.27.
|
|
32
|
-
"@zag-js/types": "1.27.
|
|
33
|
-
"@zag-js/
|
|
34
|
-
"@zag-js/
|
|
30
|
+
"@zag-js/anatomy": "1.27.1",
|
|
31
|
+
"@zag-js/core": "1.27.1",
|
|
32
|
+
"@zag-js/types": "1.27.1",
|
|
33
|
+
"@zag-js/dom-query": "1.27.1",
|
|
34
|
+
"@zag-js/utils": "1.27.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"clean-package": "2.2.0"
|