@zag-js/toast 0.80.0 → 0.81.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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -3
- package/dist/index.mjs +1 -2
- package/package.json +7 -8
package/dist/index.d.mts
CHANGED
|
@@ -293,7 +293,7 @@ declare function groupMachine<T = any>(userContext: UserDefinedGroupContext): _z
|
|
|
293
293
|
|
|
294
294
|
declare function createToastMachine<T>(options: Options<T>): _zag_js_core.Machine<MachineContext<T>, MachineState, _zag_js_core.StateMachine.AnyEventObject>;
|
|
295
295
|
|
|
296
|
-
declare const anatomy: _zag_js_anatomy.AnatomyInstance<"
|
|
296
|
+
declare const anatomy: _zag_js_anatomy.AnatomyInstance<"group" | "title" | "root" | "description" | "actionTrigger" | "closeTrigger">;
|
|
297
297
|
|
|
298
298
|
declare function connect<T extends PropTypes, O>(state: State<O>, send: Send, normalize: NormalizeProps<T>): MachineApi<T, O>;
|
|
299
299
|
|
package/dist/index.d.ts
CHANGED
|
@@ -293,7 +293,7 @@ declare function groupMachine<T = any>(userContext: UserDefinedGroupContext): _z
|
|
|
293
293
|
|
|
294
294
|
declare function createToastMachine<T>(options: Options<T>): _zag_js_core.Machine<MachineContext<T>, MachineState, _zag_js_core.StateMachine.AnyEventObject>;
|
|
295
295
|
|
|
296
|
-
declare const anatomy: _zag_js_anatomy.AnatomyInstance<"
|
|
296
|
+
declare const anatomy: _zag_js_anatomy.AnatomyInstance<"group" | "title" | "root" | "description" | "actionTrigger" | "closeTrigger">;
|
|
297
297
|
|
|
298
298
|
declare function connect<T extends PropTypes, O>(state: State<O>, send: Send, normalize: NormalizeProps<T>): MachineApi<T, O>;
|
|
299
299
|
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,6 @@ var domQuery = require('@zag-js/dom-query');
|
|
|
5
5
|
var utils = require('@zag-js/utils');
|
|
6
6
|
var anatomy$1 = require('@zag-js/anatomy');
|
|
7
7
|
var dismissable = require('@zag-js/dismissable');
|
|
8
|
-
var domEvent = require('@zag-js/dom-event');
|
|
9
8
|
|
|
10
9
|
// src/toast-group.connect.ts
|
|
11
10
|
var anatomy = anatomy$1.createAnatomy("toast").parts(
|
|
@@ -640,12 +639,12 @@ function groupMachine(userContext) {
|
|
|
640
639
|
if (!isHotkeyPressed) return;
|
|
641
640
|
send({ type: "DOC.HOTKEY" });
|
|
642
641
|
};
|
|
643
|
-
return
|
|
642
|
+
return domQuery.addDomEvent(document, "keydown", handleKeyDown, { capture: true });
|
|
644
643
|
},
|
|
645
644
|
trackDocumentVisibility(ctx2, _evt, { send }) {
|
|
646
645
|
if (!ctx2.pauseOnPageIdle) return;
|
|
647
646
|
const doc = dom.getDoc(ctx2);
|
|
648
|
-
return
|
|
647
|
+
return domQuery.addDomEvent(doc, "visibilitychange", () => {
|
|
649
648
|
send(doc.visibilityState === "hidden" ? "PAUSE_ALL" : "RESUME_ALL");
|
|
650
649
|
});
|
|
651
650
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { createMachine, subscribe, guards, ref, isMachine } from '@zag-js/core';
|
|
2
|
-
import { createScope, raf, queryAll, dataAttr, contains, MAX_Z_INDEX } from '@zag-js/dom-query';
|
|
2
|
+
import { createScope, raf, queryAll, dataAttr, contains, addDomEvent, MAX_Z_INDEX } from '@zag-js/dom-query';
|
|
3
3
|
import { compact, warn, runIfFn, uuid } from '@zag-js/utils';
|
|
4
4
|
import { createAnatomy } from '@zag-js/anatomy';
|
|
5
5
|
import { trackDismissableBranch } from '@zag-js/dismissable';
|
|
6
|
-
import { addDomEvent } from '@zag-js/dom-event';
|
|
7
6
|
|
|
8
7
|
// src/toast-group.connect.ts
|
|
9
8
|
var anatomy = createAnatomy("toast").parts(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/toast",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.81.0",
|
|
4
4
|
"description": "Core logic for the toast widget implemented as a state machine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -26,13 +26,12 @@
|
|
|
26
26
|
"url": "https://github.com/chakra-ui/zag/issues"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@zag-js/
|
|
30
|
-
"@zag-js/
|
|
31
|
-
"@zag-js/dom-query": "0.
|
|
32
|
-
"@zag-js/dismissable": "0.
|
|
33
|
-
"@zag-js/
|
|
34
|
-
"@zag-js/
|
|
35
|
-
"@zag-js/types": "0.80.0"
|
|
29
|
+
"@zag-js/core": "0.81.0",
|
|
30
|
+
"@zag-js/anatomy": "0.81.0",
|
|
31
|
+
"@zag-js/dom-query": "0.81.0",
|
|
32
|
+
"@zag-js/dismissable": "0.81.0",
|
|
33
|
+
"@zag-js/utils": "0.81.0",
|
|
34
|
+
"@zag-js/types": "0.81.0"
|
|
36
35
|
},
|
|
37
36
|
"devDependencies": {
|
|
38
37
|
"clean-package": "2.2.0"
|