@zag-js/toast 1.31.1 → 1.33.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.js +3 -1
- package/dist/index.mjs +3 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -376,7 +376,9 @@ var groupMachine = createMachine({
|
|
|
376
376
|
},
|
|
377
377
|
effects: {
|
|
378
378
|
subscribeToStore({ context, prop }) {
|
|
379
|
-
|
|
379
|
+
const store = prop("store");
|
|
380
|
+
context.set("toasts", store.getVisibleToasts());
|
|
381
|
+
return store.subscribe((toast) => {
|
|
380
382
|
if (toast.dismiss) {
|
|
381
383
|
context.set("toasts", (prev) => prev.filter((t) => t.id !== toast.id));
|
|
382
384
|
return;
|
package/dist/index.mjs
CHANGED
|
@@ -374,7 +374,9 @@ var groupMachine = createMachine({
|
|
|
374
374
|
},
|
|
375
375
|
effects: {
|
|
376
376
|
subscribeToStore({ context, prop }) {
|
|
377
|
-
|
|
377
|
+
const store = prop("store");
|
|
378
|
+
context.set("toasts", store.getVisibleToasts());
|
|
379
|
+
return store.subscribe((toast) => {
|
|
378
380
|
if (toast.dismiss) {
|
|
379
381
|
context.set("toasts", (prev) => prev.filter((t) => t.id !== toast.id));
|
|
380
382
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/toast",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.33.0",
|
|
4
4
|
"description": "Core logic for the toast widget implemented as a state machine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"url": "https://github.com/chakra-ui/zag/issues"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@zag-js/anatomy": "1.
|
|
30
|
-
"@zag-js/core": "1.
|
|
31
|
-
"@zag-js/dom-query": "1.
|
|
32
|
-
"@zag-js/dismissable": "1.
|
|
33
|
-
"@zag-js/utils": "1.
|
|
34
|
-
"@zag-js/types": "1.
|
|
29
|
+
"@zag-js/anatomy": "1.33.0",
|
|
30
|
+
"@zag-js/core": "1.33.0",
|
|
31
|
+
"@zag-js/dom-query": "1.33.0",
|
|
32
|
+
"@zag-js/dismissable": "1.33.0",
|
|
33
|
+
"@zag-js/utils": "1.33.0",
|
|
34
|
+
"@zag-js/types": "1.33.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"clean-package": "2.2.0"
|