@zag-js/toast 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 +14 -14
- package/dist/index.d.ts +14 -14
- package/package.json +8 -8
package/dist/index.d.mts
CHANGED
|
@@ -10,11 +10,11 @@ interface GenericOptions<T = string> {
|
|
|
10
10
|
/**
|
|
11
11
|
* The title of the toast.
|
|
12
12
|
*/
|
|
13
|
-
title?: T;
|
|
13
|
+
title?: T | undefined;
|
|
14
14
|
/**
|
|
15
15
|
* The description of the toast.
|
|
16
16
|
*/
|
|
17
|
-
description?: T;
|
|
17
|
+
description?: T | undefined;
|
|
18
18
|
}
|
|
19
19
|
interface StatusChangeDetails {
|
|
20
20
|
status: Status;
|
|
@@ -33,24 +33,24 @@ interface Options<T> extends GenericOptions<T> {
|
|
|
33
33
|
/**
|
|
34
34
|
* The duration the toast will be visible
|
|
35
35
|
*/
|
|
36
|
-
duration?: number;
|
|
36
|
+
duration?: number | undefined;
|
|
37
37
|
/**
|
|
38
38
|
* The duration for the toast to kept alive before it is removed.
|
|
39
39
|
* Useful for exit transitions.
|
|
40
40
|
*/
|
|
41
|
-
removeDelay?: number;
|
|
41
|
+
removeDelay?: number | undefined;
|
|
42
42
|
/**
|
|
43
43
|
* The placement of the toast
|
|
44
44
|
*/
|
|
45
|
-
placement?: Placement;
|
|
45
|
+
placement?: Placement | undefined;
|
|
46
46
|
/**
|
|
47
47
|
* The unique id of the toast
|
|
48
48
|
*/
|
|
49
|
-
id?: string;
|
|
49
|
+
id?: string | undefined;
|
|
50
50
|
/**
|
|
51
51
|
* The type of the toast
|
|
52
52
|
*/
|
|
53
|
-
type?: Type;
|
|
53
|
+
type?: Type | undefined;
|
|
54
54
|
/**
|
|
55
55
|
* Function called when the toast is visible
|
|
56
56
|
*/
|
|
@@ -58,11 +58,11 @@ interface Options<T> extends GenericOptions<T> {
|
|
|
58
58
|
/**
|
|
59
59
|
* The action of the toast
|
|
60
60
|
*/
|
|
61
|
-
action?: ActionOptions;
|
|
61
|
+
action?: ActionOptions | undefined;
|
|
62
62
|
/**
|
|
63
63
|
* The metadata of the toast
|
|
64
64
|
*/
|
|
65
|
-
meta?: Record<string, any
|
|
65
|
+
meta?: Record<string, any> | undefined;
|
|
66
66
|
}
|
|
67
67
|
interface MachineContext<T = any> extends Omit<CommonProperties, "id">, MachinePrivateContext, Omit<Options<T>, "removeDelay"> {
|
|
68
68
|
/**
|
|
@@ -73,7 +73,7 @@ interface MachineContext<T = any> extends Omit<CommonProperties, "id">, MachineP
|
|
|
73
73
|
/**
|
|
74
74
|
* The document's text/writing direction.
|
|
75
75
|
*/
|
|
76
|
-
dir?: Direction;
|
|
76
|
+
dir?: Direction | undefined;
|
|
77
77
|
/**
|
|
78
78
|
* The time the toast was created
|
|
79
79
|
*/
|
|
@@ -121,7 +121,7 @@ interface GroupPublicContext extends DirectionProperty, CommonProperties {
|
|
|
121
121
|
/**
|
|
122
122
|
* Whether the toasts should overlap each other
|
|
123
123
|
*/
|
|
124
|
-
overlap?: boolean;
|
|
124
|
+
overlap?: boolean | undefined;
|
|
125
125
|
/**
|
|
126
126
|
* The placement of the toast
|
|
127
127
|
*/
|
|
@@ -136,7 +136,7 @@ interface GroupPublicContext extends DirectionProperty, CommonProperties {
|
|
|
136
136
|
/**
|
|
137
137
|
* The duration the toast will be visible
|
|
138
138
|
*/
|
|
139
|
-
duration?: number;
|
|
139
|
+
duration?: number | undefined;
|
|
140
140
|
}
|
|
141
141
|
interface UserDefinedGroupContext extends RequiredBy<GroupPublicContext, "id"> {
|
|
142
142
|
}
|
|
@@ -162,7 +162,7 @@ interface PromiseOptions<V, O = any> {
|
|
|
162
162
|
loading: Options<O>;
|
|
163
163
|
success: MaybeFunction<Options<O>, V>;
|
|
164
164
|
error: MaybeFunction<Options<O>, Error>;
|
|
165
|
-
finally?: () => void | Promise<void
|
|
165
|
+
finally?: (() => void | Promise<void>) | undefined;
|
|
166
166
|
}
|
|
167
167
|
interface GroupProps {
|
|
168
168
|
/**
|
|
@@ -172,7 +172,7 @@ interface GroupProps {
|
|
|
172
172
|
/**
|
|
173
173
|
* The human-readable label for the toast region
|
|
174
174
|
*/
|
|
175
|
-
label?: string;
|
|
175
|
+
label?: string | undefined;
|
|
176
176
|
}
|
|
177
177
|
interface GroupMachineApi<T extends PropTypes = PropTypes, O = any> {
|
|
178
178
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -10,11 +10,11 @@ interface GenericOptions<T = string> {
|
|
|
10
10
|
/**
|
|
11
11
|
* The title of the toast.
|
|
12
12
|
*/
|
|
13
|
-
title?: T;
|
|
13
|
+
title?: T | undefined;
|
|
14
14
|
/**
|
|
15
15
|
* The description of the toast.
|
|
16
16
|
*/
|
|
17
|
-
description?: T;
|
|
17
|
+
description?: T | undefined;
|
|
18
18
|
}
|
|
19
19
|
interface StatusChangeDetails {
|
|
20
20
|
status: Status;
|
|
@@ -33,24 +33,24 @@ interface Options<T> extends GenericOptions<T> {
|
|
|
33
33
|
/**
|
|
34
34
|
* The duration the toast will be visible
|
|
35
35
|
*/
|
|
36
|
-
duration?: number;
|
|
36
|
+
duration?: number | undefined;
|
|
37
37
|
/**
|
|
38
38
|
* The duration for the toast to kept alive before it is removed.
|
|
39
39
|
* Useful for exit transitions.
|
|
40
40
|
*/
|
|
41
|
-
removeDelay?: number;
|
|
41
|
+
removeDelay?: number | undefined;
|
|
42
42
|
/**
|
|
43
43
|
* The placement of the toast
|
|
44
44
|
*/
|
|
45
|
-
placement?: Placement;
|
|
45
|
+
placement?: Placement | undefined;
|
|
46
46
|
/**
|
|
47
47
|
* The unique id of the toast
|
|
48
48
|
*/
|
|
49
|
-
id?: string;
|
|
49
|
+
id?: string | undefined;
|
|
50
50
|
/**
|
|
51
51
|
* The type of the toast
|
|
52
52
|
*/
|
|
53
|
-
type?: Type;
|
|
53
|
+
type?: Type | undefined;
|
|
54
54
|
/**
|
|
55
55
|
* Function called when the toast is visible
|
|
56
56
|
*/
|
|
@@ -58,11 +58,11 @@ interface Options<T> extends GenericOptions<T> {
|
|
|
58
58
|
/**
|
|
59
59
|
* The action of the toast
|
|
60
60
|
*/
|
|
61
|
-
action?: ActionOptions;
|
|
61
|
+
action?: ActionOptions | undefined;
|
|
62
62
|
/**
|
|
63
63
|
* The metadata of the toast
|
|
64
64
|
*/
|
|
65
|
-
meta?: Record<string, any
|
|
65
|
+
meta?: Record<string, any> | undefined;
|
|
66
66
|
}
|
|
67
67
|
interface MachineContext<T = any> extends Omit<CommonProperties, "id">, MachinePrivateContext, Omit<Options<T>, "removeDelay"> {
|
|
68
68
|
/**
|
|
@@ -73,7 +73,7 @@ interface MachineContext<T = any> extends Omit<CommonProperties, "id">, MachineP
|
|
|
73
73
|
/**
|
|
74
74
|
* The document's text/writing direction.
|
|
75
75
|
*/
|
|
76
|
-
dir?: Direction;
|
|
76
|
+
dir?: Direction | undefined;
|
|
77
77
|
/**
|
|
78
78
|
* The time the toast was created
|
|
79
79
|
*/
|
|
@@ -121,7 +121,7 @@ interface GroupPublicContext extends DirectionProperty, CommonProperties {
|
|
|
121
121
|
/**
|
|
122
122
|
* Whether the toasts should overlap each other
|
|
123
123
|
*/
|
|
124
|
-
overlap?: boolean;
|
|
124
|
+
overlap?: boolean | undefined;
|
|
125
125
|
/**
|
|
126
126
|
* The placement of the toast
|
|
127
127
|
*/
|
|
@@ -136,7 +136,7 @@ interface GroupPublicContext extends DirectionProperty, CommonProperties {
|
|
|
136
136
|
/**
|
|
137
137
|
* The duration the toast will be visible
|
|
138
138
|
*/
|
|
139
|
-
duration?: number;
|
|
139
|
+
duration?: number | undefined;
|
|
140
140
|
}
|
|
141
141
|
interface UserDefinedGroupContext extends RequiredBy<GroupPublicContext, "id"> {
|
|
142
142
|
}
|
|
@@ -162,7 +162,7 @@ interface PromiseOptions<V, O = any> {
|
|
|
162
162
|
loading: Options<O>;
|
|
163
163
|
success: MaybeFunction<Options<O>, V>;
|
|
164
164
|
error: MaybeFunction<Options<O>, Error>;
|
|
165
|
-
finally?: () => void | Promise<void
|
|
165
|
+
finally?: (() => void | Promise<void>) | undefined;
|
|
166
166
|
}
|
|
167
167
|
interface GroupProps {
|
|
168
168
|
/**
|
|
@@ -172,7 +172,7 @@ interface GroupProps {
|
|
|
172
172
|
/**
|
|
173
173
|
* The human-readable label for the toast region
|
|
174
174
|
*/
|
|
175
|
-
label?: string;
|
|
175
|
+
label?: string | undefined;
|
|
176
176
|
}
|
|
177
177
|
interface GroupMachineApi<T extends PropTypes = PropTypes, O = any> {
|
|
178
178
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/toast",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.75.0",
|
|
4
4
|
"description": "Core logic for the toast widget implemented as a state machine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
"url": "https://github.com/chakra-ui/zag/issues"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@zag-js/anatomy": "0.
|
|
30
|
-
"@zag-js/core": "0.
|
|
31
|
-
"@zag-js/dom-query": "0.
|
|
32
|
-
"@zag-js/dismissable": "0.
|
|
33
|
-
"@zag-js/dom-event": "0.
|
|
34
|
-
"@zag-js/utils": "0.
|
|
35
|
-
"@zag-js/types": "0.
|
|
29
|
+
"@zag-js/anatomy": "0.75.0",
|
|
30
|
+
"@zag-js/core": "0.75.0",
|
|
31
|
+
"@zag-js/dom-query": "0.75.0",
|
|
32
|
+
"@zag-js/dismissable": "0.75.0",
|
|
33
|
+
"@zag-js/dom-event": "0.75.0",
|
|
34
|
+
"@zag-js/utils": "0.75.0",
|
|
35
|
+
"@zag-js/types": "0.75.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"clean-package": "2.2.0"
|