@zag-js/toast 0.2.7 → 0.2.8
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/{chunk-IEPKBUZZ.mjs → chunk-EMY6MMVS.mjs} +1 -1
- package/dist/{chunk-YVNTR4MK.mjs → chunk-KJLVUGML.mjs} +1 -1
- package/dist/{chunk-2E56V7D3.mjs → chunk-LOTG5P4K.mjs} +1 -1
- package/dist/{chunk-6MVNQK7B.mjs → chunk-MCVNSXDU.mjs} +1 -1
- package/dist/{chunk-KHVXQ4ZE.mjs → chunk-SMQXX7JA.mjs} +1 -19
- package/dist/index.js +1 -19
- package/dist/index.mjs +5 -5
- package/dist/toast-group.connect.js +1 -19
- package/dist/toast-group.connect.mjs +2 -2
- package/dist/toast-group.machine.js +1 -19
- package/dist/toast-group.machine.mjs +3 -3
- package/dist/toast.connect.js +1 -19
- package/dist/toast.connect.mjs +2 -2
- package/dist/toast.dom.d.ts +0 -4
- package/dist/toast.dom.js +1 -19
- package/dist/toast.dom.mjs +1 -1
- package/dist/toast.machine.js +1 -19
- package/dist/toast.machine.mjs +2 -2
- package/package.json +4 -4
|
@@ -25,25 +25,7 @@ function defineDomHelpers(helpers) {
|
|
|
25
25
|
return (_a = dom2.getDoc(ctx).defaultView) != null ? _a : window;
|
|
26
26
|
},
|
|
27
27
|
getActiveElement: (ctx) => dom2.getDoc(ctx).activeElement,
|
|
28
|
-
getById: (ctx, id) => dom2.getRootNode(ctx).getElementById(id)
|
|
29
|
-
createEmitter: (ctx, target) => {
|
|
30
|
-
const win = dom2.getWin(ctx);
|
|
31
|
-
return function emit(evt, detail, options) {
|
|
32
|
-
const { bubbles = true, cancelable, composed = true } = options != null ? options : {};
|
|
33
|
-
const eventName = `zag:${evt}`;
|
|
34
|
-
const init = { bubbles, cancelable, composed, detail };
|
|
35
|
-
const event = new win.CustomEvent(eventName, init);
|
|
36
|
-
target.dispatchEvent(event);
|
|
37
|
-
};
|
|
38
|
-
},
|
|
39
|
-
createListener: (target) => {
|
|
40
|
-
return function listen(evt, handler) {
|
|
41
|
-
const eventName = `zag:${evt}`;
|
|
42
|
-
const listener = (e) => handler(e);
|
|
43
|
-
target.addEventListener(eventName, listener);
|
|
44
|
-
return () => target.removeEventListener(eventName, listener);
|
|
45
|
-
};
|
|
46
|
-
}
|
|
28
|
+
getById: (ctx, id) => dom2.getRootNode(ctx).getElementById(id)
|
|
47
29
|
};
|
|
48
30
|
return {
|
|
49
31
|
...dom2,
|
package/dist/index.js
CHANGED
|
@@ -103,25 +103,7 @@ function defineDomHelpers(helpers) {
|
|
|
103
103
|
return (_a = dom2.getDoc(ctx).defaultView) != null ? _a : window;
|
|
104
104
|
},
|
|
105
105
|
getActiveElement: (ctx) => dom2.getDoc(ctx).activeElement,
|
|
106
|
-
getById: (ctx, id) => dom2.getRootNode(ctx).getElementById(id)
|
|
107
|
-
createEmitter: (ctx, target) => {
|
|
108
|
-
const win = dom2.getWin(ctx);
|
|
109
|
-
return function emit(evt, detail, options) {
|
|
110
|
-
const { bubbles = true, cancelable, composed = true } = options != null ? options : {};
|
|
111
|
-
const eventName = `zag:${evt}`;
|
|
112
|
-
const init = { bubbles, cancelable, composed, detail };
|
|
113
|
-
const event = new win.CustomEvent(eventName, init);
|
|
114
|
-
target.dispatchEvent(event);
|
|
115
|
-
};
|
|
116
|
-
},
|
|
117
|
-
createListener: (target) => {
|
|
118
|
-
return function listen(evt, handler) {
|
|
119
|
-
const eventName = `zag:${evt}`;
|
|
120
|
-
const listener = (e) => handler(e);
|
|
121
|
-
target.addEventListener(eventName, listener);
|
|
122
|
-
return () => target.removeEventListener(eventName, listener);
|
|
123
|
-
};
|
|
124
|
-
}
|
|
106
|
+
getById: (ctx, id) => dom2.getRootNode(ctx).getElementById(id)
|
|
125
107
|
};
|
|
126
108
|
return {
|
|
127
109
|
...dom2,
|
package/dist/index.mjs
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
groupConnect,
|
|
3
3
|
toaster
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MCVNSXDU.mjs";
|
|
5
5
|
import {
|
|
6
6
|
groupMachine
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LOTG5P4K.mjs";
|
|
8
8
|
import {
|
|
9
9
|
connect
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-EMY6MMVS.mjs";
|
|
11
11
|
import {
|
|
12
12
|
anatomy
|
|
13
13
|
} from "./chunk-GQHI2OMI.mjs";
|
|
14
14
|
import {
|
|
15
15
|
createToastMachine
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-KJLVUGML.mjs";
|
|
17
17
|
import "./chunk-YVYADWQR.mjs";
|
|
18
18
|
import "./chunk-LOJTIJID.mjs";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-SMQXX7JA.mjs";
|
|
20
20
|
|
|
21
21
|
// ../../utilities/core/src/warning.ts
|
|
22
22
|
function warn(...a) {
|
|
@@ -71,25 +71,7 @@ function defineDomHelpers(helpers) {
|
|
|
71
71
|
return (_a = dom2.getDoc(ctx).defaultView) != null ? _a : window;
|
|
72
72
|
},
|
|
73
73
|
getActiveElement: (ctx) => dom2.getDoc(ctx).activeElement,
|
|
74
|
-
getById: (ctx, id) => dom2.getRootNode(ctx).getElementById(id)
|
|
75
|
-
createEmitter: (ctx, target) => {
|
|
76
|
-
const win = dom2.getWin(ctx);
|
|
77
|
-
return function emit(evt, detail, options) {
|
|
78
|
-
const { bubbles = true, cancelable, composed = true } = options != null ? options : {};
|
|
79
|
-
const eventName = `zag:${evt}`;
|
|
80
|
-
const init = { bubbles, cancelable, composed, detail };
|
|
81
|
-
const event = new win.CustomEvent(eventName, init);
|
|
82
|
-
target.dispatchEvent(event);
|
|
83
|
-
};
|
|
84
|
-
},
|
|
85
|
-
createListener: (target) => {
|
|
86
|
-
return function listen(evt, handler) {
|
|
87
|
-
const eventName = `zag:${evt}`;
|
|
88
|
-
const listener = (e) => handler(e);
|
|
89
|
-
target.addEventListener(eventName, listener);
|
|
90
|
-
return () => target.removeEventListener(eventName, listener);
|
|
91
|
-
};
|
|
92
|
-
}
|
|
74
|
+
getById: (ctx, id) => dom2.getRootNode(ctx).getElementById(id)
|
|
93
75
|
};
|
|
94
76
|
return {
|
|
95
77
|
...dom2,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
groupConnect,
|
|
3
3
|
toaster
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MCVNSXDU.mjs";
|
|
5
5
|
import "./chunk-GQHI2OMI.mjs";
|
|
6
6
|
import "./chunk-YVYADWQR.mjs";
|
|
7
7
|
import "./chunk-LOJTIJID.mjs";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-SMQXX7JA.mjs";
|
|
9
9
|
export {
|
|
10
10
|
groupConnect,
|
|
11
11
|
toaster
|
|
@@ -76,25 +76,7 @@ function defineDomHelpers(helpers) {
|
|
|
76
76
|
return (_a = dom2.getDoc(ctx).defaultView) != null ? _a : window;
|
|
77
77
|
},
|
|
78
78
|
getActiveElement: (ctx) => dom2.getDoc(ctx).activeElement,
|
|
79
|
-
getById: (ctx, id) => dom2.getRootNode(ctx).getElementById(id)
|
|
80
|
-
createEmitter: (ctx, target) => {
|
|
81
|
-
const win = dom2.getWin(ctx);
|
|
82
|
-
return function emit(evt, detail, options) {
|
|
83
|
-
const { bubbles = true, cancelable, composed = true } = options != null ? options : {};
|
|
84
|
-
const eventName = `zag:${evt}`;
|
|
85
|
-
const init = { bubbles, cancelable, composed, detail };
|
|
86
|
-
const event = new win.CustomEvent(eventName, init);
|
|
87
|
-
target.dispatchEvent(event);
|
|
88
|
-
};
|
|
89
|
-
},
|
|
90
|
-
createListener: (target) => {
|
|
91
|
-
return function listen(evt, handler) {
|
|
92
|
-
const eventName = `zag:${evt}`;
|
|
93
|
-
const listener = (e) => handler(e);
|
|
94
|
-
target.addEventListener(eventName, listener);
|
|
95
|
-
return () => target.removeEventListener(eventName, listener);
|
|
96
|
-
};
|
|
97
|
-
}
|
|
79
|
+
getById: (ctx, id) => dom2.getRootNode(ctx).getElementById(id)
|
|
98
80
|
};
|
|
99
81
|
return {
|
|
100
82
|
...dom2,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
groupMachine
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-LOTG5P4K.mjs";
|
|
4
|
+
import "./chunk-KJLVUGML.mjs";
|
|
5
5
|
import "./chunk-YVYADWQR.mjs";
|
|
6
6
|
import "./chunk-LOJTIJID.mjs";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-SMQXX7JA.mjs";
|
|
8
8
|
export {
|
|
9
9
|
groupMachine
|
|
10
10
|
};
|
package/dist/toast.connect.js
CHANGED
|
@@ -56,25 +56,7 @@ function defineDomHelpers(helpers) {
|
|
|
56
56
|
return (_a = dom2.getDoc(ctx).defaultView) != null ? _a : window;
|
|
57
57
|
},
|
|
58
58
|
getActiveElement: (ctx) => dom2.getDoc(ctx).activeElement,
|
|
59
|
-
getById: (ctx, id) => dom2.getRootNode(ctx).getElementById(id)
|
|
60
|
-
createEmitter: (ctx, target) => {
|
|
61
|
-
const win = dom2.getWin(ctx);
|
|
62
|
-
return function emit(evt, detail, options) {
|
|
63
|
-
const { bubbles = true, cancelable, composed = true } = options != null ? options : {};
|
|
64
|
-
const eventName = `zag:${evt}`;
|
|
65
|
-
const init = { bubbles, cancelable, composed, detail };
|
|
66
|
-
const event = new win.CustomEvent(eventName, init);
|
|
67
|
-
target.dispatchEvent(event);
|
|
68
|
-
};
|
|
69
|
-
},
|
|
70
|
-
createListener: (target) => {
|
|
71
|
-
return function listen(evt, handler) {
|
|
72
|
-
const eventName = `zag:${evt}`;
|
|
73
|
-
const listener = (e) => handler(e);
|
|
74
|
-
target.addEventListener(eventName, listener);
|
|
75
|
-
return () => target.removeEventListener(eventName, listener);
|
|
76
|
-
};
|
|
77
|
-
}
|
|
59
|
+
getById: (ctx, id) => dom2.getRootNode(ctx).getElementById(id)
|
|
78
60
|
};
|
|
79
61
|
return {
|
|
80
62
|
...dom2,
|
package/dist/toast.connect.mjs
CHANGED
package/dist/toast.dom.d.ts
CHANGED
|
@@ -18,10 +18,6 @@ declare const dom: {
|
|
|
18
18
|
getById: <T = HTMLElement>(ctx: {
|
|
19
19
|
getRootNode?: (() => Node | Document | ShadowRoot) | undefined;
|
|
20
20
|
}, id: string) => T | null;
|
|
21
|
-
createEmitter: (ctx: {
|
|
22
|
-
getRootNode?: (() => Node | Document | ShadowRoot) | undefined;
|
|
23
|
-
}, target: HTMLElement) => (evt: string, detail: Record<string, any>, options?: EventInit | undefined) => void;
|
|
24
|
-
createListener: (target: HTMLElement) => <T_1 = any>(evt: string, handler: (e: CustomEvent<T_1>) => void) => () => void;
|
|
25
21
|
} & {
|
|
26
22
|
getGroupId: (placement: Placement) => string;
|
|
27
23
|
getRootId: (ctx: MachineContext) => string;
|
package/dist/toast.dom.js
CHANGED
|
@@ -51,25 +51,7 @@ function defineDomHelpers(helpers) {
|
|
|
51
51
|
return (_a = dom2.getDoc(ctx).defaultView) != null ? _a : window;
|
|
52
52
|
},
|
|
53
53
|
getActiveElement: (ctx) => dom2.getDoc(ctx).activeElement,
|
|
54
|
-
getById: (ctx, id) => dom2.getRootNode(ctx).getElementById(id)
|
|
55
|
-
createEmitter: (ctx, target) => {
|
|
56
|
-
const win = dom2.getWin(ctx);
|
|
57
|
-
return function emit(evt, detail, options) {
|
|
58
|
-
const { bubbles = true, cancelable, composed = true } = options != null ? options : {};
|
|
59
|
-
const eventName = `zag:${evt}`;
|
|
60
|
-
const init = { bubbles, cancelable, composed, detail };
|
|
61
|
-
const event = new win.CustomEvent(eventName, init);
|
|
62
|
-
target.dispatchEvent(event);
|
|
63
|
-
};
|
|
64
|
-
},
|
|
65
|
-
createListener: (target) => {
|
|
66
|
-
return function listen(evt, handler) {
|
|
67
|
-
const eventName = `zag:${evt}`;
|
|
68
|
-
const listener = (e) => handler(e);
|
|
69
|
-
target.addEventListener(eventName, listener);
|
|
70
|
-
return () => target.removeEventListener(eventName, listener);
|
|
71
|
-
};
|
|
72
|
-
}
|
|
54
|
+
getById: (ctx, id) => dom2.getRootNode(ctx).getElementById(id)
|
|
73
55
|
};
|
|
74
56
|
return {
|
|
75
57
|
...dom2,
|
package/dist/toast.dom.mjs
CHANGED
package/dist/toast.machine.js
CHANGED
|
@@ -73,25 +73,7 @@ function defineDomHelpers(helpers) {
|
|
|
73
73
|
return (_a = dom2.getDoc(ctx).defaultView) != null ? _a : window;
|
|
74
74
|
},
|
|
75
75
|
getActiveElement: (ctx) => dom2.getDoc(ctx).activeElement,
|
|
76
|
-
getById: (ctx, id) => dom2.getRootNode(ctx).getElementById(id)
|
|
77
|
-
createEmitter: (ctx, target) => {
|
|
78
|
-
const win = dom2.getWin(ctx);
|
|
79
|
-
return function emit(evt, detail, options) {
|
|
80
|
-
const { bubbles = true, cancelable, composed = true } = options != null ? options : {};
|
|
81
|
-
const eventName = `zag:${evt}`;
|
|
82
|
-
const init = { bubbles, cancelable, composed, detail };
|
|
83
|
-
const event = new win.CustomEvent(eventName, init);
|
|
84
|
-
target.dispatchEvent(event);
|
|
85
|
-
};
|
|
86
|
-
},
|
|
87
|
-
createListener: (target) => {
|
|
88
|
-
return function listen(evt, handler) {
|
|
89
|
-
const eventName = `zag:${evt}`;
|
|
90
|
-
const listener = (e) => handler(e);
|
|
91
|
-
target.addEventListener(eventName, listener);
|
|
92
|
-
return () => target.removeEventListener(eventName, listener);
|
|
93
|
-
};
|
|
94
|
-
}
|
|
76
|
+
getById: (ctx, id) => dom2.getRootNode(ctx).getElementById(id)
|
|
95
77
|
};
|
|
96
78
|
return {
|
|
97
79
|
...dom2,
|
package/dist/toast.machine.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createToastMachine
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KJLVUGML.mjs";
|
|
4
4
|
import "./chunk-YVYADWQR.mjs";
|
|
5
5
|
import "./chunk-LOJTIJID.mjs";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-SMQXX7JA.mjs";
|
|
7
7
|
export {
|
|
8
8
|
createToastMachine
|
|
9
9
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/toast",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"description": "Core logic for the toast widget implemented as a state machine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@zag-js/anatomy": "0.1.3",
|
|
30
|
-
"@zag-js/core": "0.2.
|
|
31
|
-
"@zag-js/types": "0.3.
|
|
30
|
+
"@zag-js/core": "0.2.5",
|
|
31
|
+
"@zag-js/types": "0.3.3"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"clean-package": "2.2.0",
|
|
35
|
-
"@zag-js/dom-utils": "0.2.
|
|
35
|
+
"@zag-js/dom-utils": "0.2.3",
|
|
36
36
|
"@zag-js/utils": "0.3.2"
|
|
37
37
|
},
|
|
38
38
|
"clean-package": "../../../clean-package.config.json",
|