@zag-js/splitter 0.74.1 → 0.75.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.
- package/dist/index.d.mts +12 -12
- package/dist/index.d.ts +12 -12
- package/package.json +8 -8
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _zag_js_anatomy from '@zag-js/anatomy';
|
|
2
|
-
import { RequiredBy, PropTypes, DirectionProperty, CommonProperties, NormalizeProps } from '@zag-js/types';
|
|
2
|
+
import { RequiredBy, PropTypes, DirectionProperty, CommonProperties, Required, NormalizeProps } from '@zag-js/types';
|
|
3
3
|
import * as _zag_js_core from '@zag-js/core';
|
|
4
4
|
import { Machine, StateMachine } from '@zag-js/core';
|
|
5
5
|
|
|
@@ -8,9 +8,9 @@ declare const anatomy: _zag_js_anatomy.AnatomyInstance<"root" | "panel" | "resiz
|
|
|
8
8
|
type PanelId = string | number;
|
|
9
9
|
interface PanelSizeData {
|
|
10
10
|
id: PanelId;
|
|
11
|
-
size?: number;
|
|
12
|
-
minSize?: number;
|
|
13
|
-
maxSize?: number;
|
|
11
|
+
size?: number | undefined;
|
|
12
|
+
minSize?: number | undefined;
|
|
13
|
+
maxSize?: number | undefined;
|
|
14
14
|
}
|
|
15
15
|
interface SizeChangeDetails {
|
|
16
16
|
size: PanelSizeData[];
|
|
@@ -34,15 +34,15 @@ interface PublicContext extends DirectionProperty, CommonProperties {
|
|
|
34
34
|
/**
|
|
35
35
|
* Function called when the splitter is resized.
|
|
36
36
|
*/
|
|
37
|
-
onSizeChange?: (details: SizeChangeDetails) => void;
|
|
37
|
+
onSizeChange?: ((details: SizeChangeDetails) => void) | undefined;
|
|
38
38
|
/**
|
|
39
39
|
* Function called when the splitter resize ends.
|
|
40
40
|
*/
|
|
41
|
-
onSizeChangeEnd?: (details: SizeChangeDetails) => void;
|
|
41
|
+
onSizeChangeEnd?: ((details: SizeChangeDetails) => void) | undefined;
|
|
42
42
|
/**
|
|
43
43
|
* The ids of the elements in the splitter. Useful for composition.
|
|
44
44
|
*/
|
|
45
|
-
ids?: ElementIds;
|
|
45
|
+
ids?: ElementIds | undefined;
|
|
46
46
|
}
|
|
47
47
|
type UserDefinedContext = RequiredBy<PublicContext, "id">;
|
|
48
48
|
type NormalizedPanelData = Array<Required<PanelSizeData> & {
|
|
@@ -58,11 +58,11 @@ type ComputedContext = Readonly<{
|
|
|
58
58
|
activeResizeBounds?: {
|
|
59
59
|
min: number;
|
|
60
60
|
max: number;
|
|
61
|
-
};
|
|
61
|
+
} | undefined;
|
|
62
62
|
activeResizePanels?: {
|
|
63
63
|
before: PanelSizeData;
|
|
64
64
|
after: PanelSizeData;
|
|
65
|
-
};
|
|
65
|
+
} | undefined;
|
|
66
66
|
}>;
|
|
67
67
|
interface PrivateContext {
|
|
68
68
|
activeResizeId: string | null;
|
|
@@ -84,12 +84,12 @@ type Send = StateMachine.Send<StateMachine.AnyEventObject>;
|
|
|
84
84
|
type Service = Machine<MachineContext, MachineState, StateMachine.AnyEventObject>;
|
|
85
85
|
interface PanelProps {
|
|
86
86
|
id: PanelId;
|
|
87
|
-
snapSize?: number;
|
|
87
|
+
snapSize?: number | undefined;
|
|
88
88
|
}
|
|
89
89
|
interface ResizeTriggerProps {
|
|
90
90
|
id: `${PanelId}:${PanelId}`;
|
|
91
|
-
step?: number;
|
|
92
|
-
disabled?: boolean;
|
|
91
|
+
step?: number | undefined;
|
|
92
|
+
disabled?: boolean | undefined;
|
|
93
93
|
}
|
|
94
94
|
interface ResizeTriggerState {
|
|
95
95
|
disabled: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _zag_js_anatomy from '@zag-js/anatomy';
|
|
2
|
-
import { RequiredBy, PropTypes, DirectionProperty, CommonProperties, NormalizeProps } from '@zag-js/types';
|
|
2
|
+
import { RequiredBy, PropTypes, DirectionProperty, CommonProperties, Required, NormalizeProps } from '@zag-js/types';
|
|
3
3
|
import * as _zag_js_core from '@zag-js/core';
|
|
4
4
|
import { Machine, StateMachine } from '@zag-js/core';
|
|
5
5
|
|
|
@@ -8,9 +8,9 @@ declare const anatomy: _zag_js_anatomy.AnatomyInstance<"root" | "panel" | "resiz
|
|
|
8
8
|
type PanelId = string | number;
|
|
9
9
|
interface PanelSizeData {
|
|
10
10
|
id: PanelId;
|
|
11
|
-
size?: number;
|
|
12
|
-
minSize?: number;
|
|
13
|
-
maxSize?: number;
|
|
11
|
+
size?: number | undefined;
|
|
12
|
+
minSize?: number | undefined;
|
|
13
|
+
maxSize?: number | undefined;
|
|
14
14
|
}
|
|
15
15
|
interface SizeChangeDetails {
|
|
16
16
|
size: PanelSizeData[];
|
|
@@ -34,15 +34,15 @@ interface PublicContext extends DirectionProperty, CommonProperties {
|
|
|
34
34
|
/**
|
|
35
35
|
* Function called when the splitter is resized.
|
|
36
36
|
*/
|
|
37
|
-
onSizeChange?: (details: SizeChangeDetails) => void;
|
|
37
|
+
onSizeChange?: ((details: SizeChangeDetails) => void) | undefined;
|
|
38
38
|
/**
|
|
39
39
|
* Function called when the splitter resize ends.
|
|
40
40
|
*/
|
|
41
|
-
onSizeChangeEnd?: (details: SizeChangeDetails) => void;
|
|
41
|
+
onSizeChangeEnd?: ((details: SizeChangeDetails) => void) | undefined;
|
|
42
42
|
/**
|
|
43
43
|
* The ids of the elements in the splitter. Useful for composition.
|
|
44
44
|
*/
|
|
45
|
-
ids?: ElementIds;
|
|
45
|
+
ids?: ElementIds | undefined;
|
|
46
46
|
}
|
|
47
47
|
type UserDefinedContext = RequiredBy<PublicContext, "id">;
|
|
48
48
|
type NormalizedPanelData = Array<Required<PanelSizeData> & {
|
|
@@ -58,11 +58,11 @@ type ComputedContext = Readonly<{
|
|
|
58
58
|
activeResizeBounds?: {
|
|
59
59
|
min: number;
|
|
60
60
|
max: number;
|
|
61
|
-
};
|
|
61
|
+
} | undefined;
|
|
62
62
|
activeResizePanels?: {
|
|
63
63
|
before: PanelSizeData;
|
|
64
64
|
after: PanelSizeData;
|
|
65
|
-
};
|
|
65
|
+
} | undefined;
|
|
66
66
|
}>;
|
|
67
67
|
interface PrivateContext {
|
|
68
68
|
activeResizeId: string | null;
|
|
@@ -84,12 +84,12 @@ type Send = StateMachine.Send<StateMachine.AnyEventObject>;
|
|
|
84
84
|
type Service = Machine<MachineContext, MachineState, StateMachine.AnyEventObject>;
|
|
85
85
|
interface PanelProps {
|
|
86
86
|
id: PanelId;
|
|
87
|
-
snapSize?: number;
|
|
87
|
+
snapSize?: number | undefined;
|
|
88
88
|
}
|
|
89
89
|
interface ResizeTriggerProps {
|
|
90
90
|
id: `${PanelId}:${PanelId}`;
|
|
91
|
-
step?: number;
|
|
92
|
-
disabled?: boolean;
|
|
91
|
+
step?: number | undefined;
|
|
92
|
+
disabled?: boolean | undefined;
|
|
93
93
|
}
|
|
94
94
|
interface ResizeTriggerState {
|
|
95
95
|
disabled: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/splitter",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.75.0",
|
|
4
4
|
"description": "Core logic for the splitter widget implemented as a state machine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
"url": "https://github.com/chakra-ui/zag/issues"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@zag-js/anatomy": "0.
|
|
31
|
-
"@zag-js/core": "0.
|
|
32
|
-
"@zag-js/types": "0.
|
|
33
|
-
"@zag-js/dom-query": "0.
|
|
34
|
-
"@zag-js/dom-event": "0.
|
|
35
|
-
"@zag-js/number-utils": "0.
|
|
36
|
-
"@zag-js/utils": "0.
|
|
30
|
+
"@zag-js/anatomy": "0.75.0",
|
|
31
|
+
"@zag-js/core": "0.75.0",
|
|
32
|
+
"@zag-js/types": "0.75.0",
|
|
33
|
+
"@zag-js/dom-query": "0.75.0",
|
|
34
|
+
"@zag-js/dom-event": "0.75.0",
|
|
35
|
+
"@zag-js/number-utils": "0.75.0",
|
|
36
|
+
"@zag-js/utils": "0.75.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"clean-package": "2.2.0"
|