@zag-js/toast 1.47.0 → 1.48.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.
Files changed (41) hide show
  1. package/dist/index.d.mts +10 -17
  2. package/dist/index.d.ts +10 -17
  3. package/dist/index.js +18 -45
  4. package/dist/index.mjs +5 -11
  5. package/dist/toast-group.connect.d.mts +4 -8
  6. package/dist/toast-group.connect.d.ts +4 -8
  7. package/dist/toast-group.connect.js +73 -97
  8. package/dist/toast-group.connect.mjs +68 -61
  9. package/dist/toast-group.machine.d.mts +2 -8
  10. package/dist/toast-group.machine.d.ts +2 -8
  11. package/dist/toast-group.machine.js +292 -346
  12. package/dist/toast-group.machine.mjs +287 -310
  13. package/dist/toast.anatomy.d.mts +2 -6
  14. package/dist/toast.anatomy.d.ts +2 -6
  15. package/dist/toast.anatomy.js +8 -40
  16. package/dist/toast.anatomy.mjs +4 -14
  17. package/dist/toast.connect.d.mts +4 -8
  18. package/dist/toast.connect.d.ts +4 -8
  19. package/dist/toast.connect.js +133 -158
  20. package/dist/toast.connect.mjs +128 -122
  21. package/dist/toast.dom.d.mts +19 -23
  22. package/dist/toast.dom.d.ts +19 -23
  23. package/dist/toast.dom.js +54 -83
  24. package/dist/toast.dom.mjs +39 -47
  25. package/dist/toast.machine.d.mts +2 -8
  26. package/dist/toast.machine.d.ts +2 -8
  27. package/dist/toast.machine.js +272 -300
  28. package/dist/toast.machine.mjs +267 -264
  29. package/dist/toast.store.d.mts +2 -8
  30. package/dist/toast.store.d.ts +2 -8
  31. package/dist/toast.store.js +344 -306
  32. package/dist/toast.store.mjs +340 -281
  33. package/dist/toast.types.d.mts +372 -374
  34. package/dist/toast.types.d.ts +372 -374
  35. package/dist/toast.types.js +4 -18
  36. package/dist/toast.types.mjs +1 -0
  37. package/dist/toast.utils.d.mts +10 -14
  38. package/dist/toast.utils.d.ts +10 -14
  39. package/dist/toast.utils.js +167 -217
  40. package/dist/toast.utils.mjs +157 -186
  41. package/package.json +9 -9
package/dist/index.d.mts CHANGED
@@ -1,18 +1,11 @@
1
- import * as _zag_js_core from '@zag-js/core';
2
- import { ToastGroupSchema } from './toast.types.mjs';
3
- export { ActionOptions, ToastApi as Api, ToastGroupApi as GroupApi, ToastGroupMachine as GroupMachine, ToastGroupProps as GroupProps, ToastGroupService as GroupService, IntlTranslations, ToastMachine as Machine, Options, Placement, PromiseOptions, ToastProps as Props, ToastService as Service, Status, StatusChangeDetails, ToastStore as Store, ToastStoreProps as StoreProps, ToastHeight, ToastQueuePriority, Type } from './toast.types.mjs';
4
- import { groupConnect } from './toast-group.connect.mjs';
5
- export { anatomy } from './toast.anatomy.mjs';
6
- export { connect } from './toast.connect.mjs';
7
- export { machine } from './toast.machine.mjs';
8
- export { createToastStore as createStore } from './toast.store.mjs';
9
- import '@zag-js/types';
10
- import '@zag-js/dom-query';
11
- import '@zag-js/anatomy';
12
-
13
- declare const group: {
14
- connect: typeof groupConnect;
15
- machine: _zag_js_core.Machine<ToastGroupSchema>;
1
+ import { ActionOptions, IntlTranslations, Options, Placement, PromiseOptions, Status, StatusChangeDetails, ToastApi, ToastGroupApi, ToastGroupMachine, ToastGroupProps, ToastGroupSchema, ToastGroupService, ToastHeight, ToastMachine, ToastProps, ToastQueuePriority, ToastService, ToastStore, ToastStoreProps, Type } from "./toast.types.mjs";
2
+ import { groupConnect } from "./toast-group.connect.mjs";
3
+ import { anatomy } from "./toast.anatomy.mjs";
4
+ import { connect } from "./toast.connect.mjs";
5
+ import { machine } from "./toast.machine.mjs";
6
+ import { createToastStore } from "./toast.store.mjs";
7
+ export declare const group: {
8
+ connect: typeof groupConnect;
9
+ machine: import("@zag-js/core").Machine<ToastGroupSchema>;
16
10
  };
17
-
18
- export { group };
11
+ export { type ActionOptions, type ToastApi as Api, type ToastGroupApi as GroupApi, type ToastGroupMachine as GroupMachine, type ToastGroupProps as GroupProps, type ToastGroupService as GroupService, type IntlTranslations, type ToastMachine as Machine, type Options, type Placement, type PromiseOptions, type ToastProps as Props, type ToastService as Service, type Status, type StatusChangeDetails, type ToastStore as Store, type ToastStoreProps as StoreProps, type ToastHeight, type ToastQueuePriority, type Type, anatomy, connect, createToastStore as createStore, machine };
package/dist/index.d.ts CHANGED
@@ -1,18 +1,11 @@
1
- import * as _zag_js_core from '@zag-js/core';
2
- import { ToastGroupSchema } from './toast.types.js';
3
- export { ActionOptions, ToastApi as Api, ToastGroupApi as GroupApi, ToastGroupMachine as GroupMachine, ToastGroupProps as GroupProps, ToastGroupService as GroupService, IntlTranslations, ToastMachine as Machine, Options, Placement, PromiseOptions, ToastProps as Props, ToastService as Service, Status, StatusChangeDetails, ToastStore as Store, ToastStoreProps as StoreProps, ToastHeight, ToastQueuePriority, Type } from './toast.types.js';
4
- import { groupConnect } from './toast-group.connect.js';
5
- export { anatomy } from './toast.anatomy.js';
6
- export { connect } from './toast.connect.js';
7
- export { machine } from './toast.machine.js';
8
- export { createToastStore as createStore } from './toast.store.js';
9
- import '@zag-js/types';
10
- import '@zag-js/dom-query';
11
- import '@zag-js/anatomy';
12
-
13
- declare const group: {
14
- connect: typeof groupConnect;
15
- machine: _zag_js_core.Machine<ToastGroupSchema>;
1
+ import { ActionOptions, IntlTranslations, Options, Placement, PromiseOptions, Status, StatusChangeDetails, ToastApi, ToastGroupApi, ToastGroupMachine, ToastGroupProps, ToastGroupSchema, ToastGroupService, ToastHeight, ToastMachine, ToastProps, ToastQueuePriority, ToastService, ToastStore, ToastStoreProps, Type } from "./toast.types.js";
2
+ import { groupConnect } from "./toast-group.connect.js";
3
+ import { anatomy } from "./toast.anatomy.js";
4
+ import { connect } from "./toast.connect.js";
5
+ import { machine } from "./toast.machine.js";
6
+ import { createToastStore } from "./toast.store.js";
7
+ export declare const group: {
8
+ connect: typeof groupConnect;
9
+ machine: import("@zag-js/core").Machine<ToastGroupSchema>;
16
10
  };
17
-
18
- export { group };
11
+ export { type ActionOptions, type ToastApi as Api, type ToastGroupApi as GroupApi, type ToastGroupMachine as GroupMachine, type ToastGroupProps as GroupProps, type ToastGroupService as GroupService, type IntlTranslations, type ToastMachine as Machine, type Options, type Placement, type PromiseOptions, type ToastProps as Props, type ToastService as Service, type Status, type StatusChangeDetails, type ToastStore as Store, type ToastStoreProps as StoreProps, type ToastHeight, type ToastQueuePriority, type Type, anatomy, connect, createToastStore as createStore, machine };
package/dist/index.js CHANGED
@@ -1,47 +1,20 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/index.ts
21
- var index_exports = {};
22
- __export(index_exports, {
23
- anatomy: () => import_toast.anatomy,
24
- connect: () => import_toast2.connect,
25
- createStore: () => import_toast4.createToastStore,
26
- group: () => group,
27
- machine: () => import_toast3.machine
1
+ Object.defineProperties(exports, {
2
+ __esModule: { value: true },
3
+ [Symbol.toStringTag]: { value: "Module" }
28
4
  });
29
- module.exports = __toCommonJS(index_exports);
30
- var import_toast_group = require("./toast-group.connect.js");
31
- var import_toast_group2 = require("./toast-group.machine.js");
32
- var import_toast = require("./toast.anatomy.js");
33
- var import_toast2 = require("./toast.connect.js");
34
- var import_toast3 = require("./toast.machine.js");
35
- var import_toast4 = require("./toast.store.js");
36
- var group = {
37
- connect: import_toast_group.groupConnect,
38
- machine: import_toast_group2.groupMachine
5
+ const require_toast_group_connect = require("./toast-group.connect.js");
6
+ const require_toast_group_machine = require("./toast-group.machine.js");
7
+ const require_toast_anatomy = require("./toast.anatomy.js");
8
+ const require_toast_connect = require("./toast.connect.js");
9
+ const require_toast_machine = require("./toast.machine.js");
10
+ const require_toast_store = require("./toast.store.js");
11
+ // src/index.ts
12
+ const group = {
13
+ connect: require_toast_group_connect.groupConnect,
14
+ machine: require_toast_group_machine.groupMachine
39
15
  };
40
- // Annotate the CommonJS export names for ESM import in node:
41
- 0 && (module.exports = {
42
- anatomy,
43
- connect,
44
- createStore,
45
- group,
46
- machine
47
- });
16
+ exports.anatomy = require_toast_anatomy.anatomy;
17
+ exports.connect = require_toast_connect.connect;
18
+ exports.createStore = require_toast_store.createToastStore;
19
+ exports.group = group;
20
+ exports.machine = require_toast_machine.machine;
package/dist/index.mjs CHANGED
@@ -1,18 +1,12 @@
1
- // src/index.ts
2
1
  import { groupConnect } from "./toast-group.connect.mjs";
3
2
  import { groupMachine } from "./toast-group.machine.mjs";
4
3
  import { anatomy } from "./toast.anatomy.mjs";
5
4
  import { connect } from "./toast.connect.mjs";
6
5
  import { machine } from "./toast.machine.mjs";
7
6
  import { createToastStore } from "./toast.store.mjs";
8
- var group = {
9
- connect: groupConnect,
10
- machine: groupMachine
11
- };
12
- export {
13
- anatomy,
14
- connect,
15
- createToastStore as createStore,
16
- group,
17
- machine
7
+ // src/index.ts
8
+ const group = {
9
+ connect: groupConnect,
10
+ machine: groupMachine
18
11
  };
12
+ export { anatomy, connect, createToastStore as createStore, group, machine };
@@ -1,8 +1,4 @@
1
- import { Service } from '@zag-js/core';
2
- import { PropTypes, NormalizeProps } from '@zag-js/types';
3
- import { ToastGroupSchema, ToastGroupApi } from './toast.types.mjs';
4
- import '@zag-js/dom-query';
5
-
6
- declare function groupConnect<T extends PropTypes, O = any>(service: Service<ToastGroupSchema>, normalize: NormalizeProps<T>): ToastGroupApi<T, O>;
7
-
8
- export { groupConnect };
1
+ import { ToastGroupApi, ToastGroupSchema } from "./toast.types.mjs";
2
+ import { Service } from "@zag-js/core";
3
+ import { NormalizeProps, PropTypes } from "@zag-js/types";
4
+ export declare function groupConnect<T extends PropTypes, O = any>(service: Service<ToastGroupSchema>, normalize: NormalizeProps<T>): ToastGroupApi<T, O>;
@@ -1,8 +1,4 @@
1
- import { Service } from '@zag-js/core';
2
- import { PropTypes, NormalizeProps } from '@zag-js/types';
3
- import { ToastGroupSchema, ToastGroupApi } from './toast.types.js';
4
- import '@zag-js/dom-query';
5
-
6
- declare function groupConnect<T extends PropTypes, O = any>(service: Service<ToastGroupSchema>, normalize: NormalizeProps<T>): ToastGroupApi<T, O>;
7
-
8
- export { groupConnect };
1
+ import { ToastGroupApi, ToastGroupSchema } from "./toast.types.js";
2
+ import { NormalizeProps, PropTypes } from "@zag-js/types";
3
+ import { Service } from "@zag-js/core";
4
+ export declare function groupConnect<T extends PropTypes, O = any>(service: Service<ToastGroupSchema>, normalize: NormalizeProps<T>): ToastGroupApi<T, O>;
@@ -1,100 +1,76 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
-
30
- // src/toast-group.connect.ts
31
- var toast_group_connect_exports = {};
32
- __export(toast_group_connect_exports, {
33
- groupConnect: () => groupConnect
1
+ Object.defineProperties(exports, {
2
+ __esModule: { value: true },
3
+ [Symbol.toStringTag]: { value: "Module" }
34
4
  });
35
- module.exports = __toCommonJS(toast_group_connect_exports);
36
- var import_dom_query = require("@zag-js/dom-query");
37
- var import_toast = require("./toast.anatomy.js");
38
- var dom = __toESM(require("./toast.dom.js"));
39
- var import_toast2 = require("./toast.utils.js");
5
+ const require_toast_anatomy = require("./toast.anatomy.js");
6
+ const require_toast_dom = require("./toast.dom.js");
7
+ const require_toast_utils = require("./toast.utils.js");
8
+ let _zag_js_dom_query = require("@zag-js/dom-query");
9
+ // src/toast-group.connect.ts
40
10
  function groupConnect(service, normalize) {
41
- const { context, prop, send, refs, computed } = service;
42
- return {
43
- getCount() {
44
- return context.get("toasts").length;
45
- },
46
- getToasts() {
47
- return context.get("toasts");
48
- },
49
- getGroupProps(options = {}) {
50
- const { label = "Notifications" } = options;
51
- const { hotkey } = prop("store").attrs;
52
- const hotkeyLabel = hotkey.join("+").replace(/Key/g, "").replace(/Digit/g, "");
53
- const placement = computed("placement");
54
- const [side, align = "center"] = placement.split("-");
55
- return normalize.element({
56
- ...import_toast.parts.group.attrs,
57
- dir: prop("dir"),
58
- tabIndex: -1,
59
- role: "region",
60
- "aria-label": `${label}, ${placement} (${hotkeyLabel})`,
61
- id: dom.getRegionId(placement),
62
- "data-placement": placement,
63
- "data-side": side,
64
- "data-align": align,
65
- "aria-live": "polite",
66
- "aria-relevant": "additions text",
67
- "aria-atomic": "false",
68
- style: (0, import_toast2.getGroupPlacementStyle)(service, placement),
69
- onMouseEnter() {
70
- if (refs.get("ignoreMouseTimer").isActive()) return;
71
- send({ type: "REGION.POINTER_ENTER", placement });
72
- },
73
- onMouseMove() {
74
- if (refs.get("ignoreMouseTimer").isActive()) return;
75
- send({ type: "REGION.POINTER_ENTER", placement });
76
- },
77
- onMouseLeave() {
78
- if (refs.get("ignoreMouseTimer").isActive()) return;
79
- send({ type: "REGION.POINTER_LEAVE", placement });
80
- },
81
- onFocus(event) {
82
- send({ type: "REGION.FOCUS", target: event.relatedTarget });
83
- },
84
- onBlur(event) {
85
- if (refs.get("isFocusWithin") && !(0, import_dom_query.contains)(event.currentTarget, event.relatedTarget)) {
86
- queueMicrotask(() => send({ type: "REGION.BLUR" }));
87
- }
88
- }
89
- });
90
- },
91
- subscribe(fn) {
92
- const store = prop("store");
93
- return store.subscribe(() => fn(context.get("toasts")));
94
- }
95
- };
11
+ const { context, prop, send, refs, computed } = service;
12
+ return {
13
+ getCount() {
14
+ return context.get("toasts").length;
15
+ },
16
+ getToasts() {
17
+ return context.get("toasts");
18
+ },
19
+ getGroupProps(options = {}) {
20
+ const { label = "Notifications" } = options;
21
+ const { hotkey } = prop("store").attrs;
22
+ const hotkeyLabel = hotkey.join("+").replace(/Key/g, "").replace(/Digit/g, "");
23
+ const placement = computed("placement");
24
+ const [side, align = "center"] = placement.split("-");
25
+ return normalize.element({
26
+ ...require_toast_anatomy.parts.group.attrs,
27
+ dir: prop("dir"),
28
+ tabIndex: -1,
29
+ role: "region",
30
+ "aria-label": `${label}, ${placement} (${hotkeyLabel})`,
31
+ id: require_toast_dom.getRegionId(placement),
32
+ "data-placement": placement,
33
+ "data-side": side,
34
+ "data-align": align,
35
+ "aria-live": "polite",
36
+ "aria-relevant": "additions text",
37
+ "aria-atomic": "false",
38
+ style: require_toast_utils.getGroupPlacementStyle(service, placement),
39
+ onMouseEnter() {
40
+ if (refs.get("ignoreMouseTimer").isActive()) return;
41
+ send({
42
+ type: "REGION.POINTER_ENTER",
43
+ placement
44
+ });
45
+ },
46
+ onMouseMove() {
47
+ if (refs.get("ignoreMouseTimer").isActive()) return;
48
+ send({
49
+ type: "REGION.POINTER_ENTER",
50
+ placement
51
+ });
52
+ },
53
+ onMouseLeave() {
54
+ if (refs.get("ignoreMouseTimer").isActive()) return;
55
+ send({
56
+ type: "REGION.POINTER_LEAVE",
57
+ placement
58
+ });
59
+ },
60
+ onFocus(event) {
61
+ send({
62
+ type: "REGION.FOCUS",
63
+ target: event.relatedTarget
64
+ });
65
+ },
66
+ onBlur(event) {
67
+ if (refs.get("isFocusWithin") && !(0, _zag_js_dom_query.contains)(event.currentTarget, event.relatedTarget)) queueMicrotask(() => send({ type: "REGION.BLUR" }));
68
+ }
69
+ });
70
+ },
71
+ subscribe(fn) {
72
+ return prop("store").subscribe(() => fn(context.get("toasts")));
73
+ }
74
+ };
96
75
  }
97
- // Annotate the CommonJS export names for ESM import in node:
98
- 0 && (module.exports = {
99
- groupConnect
100
- });
76
+ exports.groupConnect = groupConnect;
@@ -1,65 +1,72 @@
1
- // src/toast-group.connect.ts
2
- import { contains } from "@zag-js/dom-query";
3
1
  import { parts } from "./toast.anatomy.mjs";
4
- import * as dom from "./toast.dom.mjs";
2
+ import { getRegionId } from "./toast.dom.mjs";
5
3
  import { getGroupPlacementStyle } from "./toast.utils.mjs";
4
+ import { contains } from "@zag-js/dom-query";
5
+ // src/toast-group.connect.ts
6
6
  function groupConnect(service, normalize) {
7
- const { context, prop, send, refs, computed } = service;
8
- return {
9
- getCount() {
10
- return context.get("toasts").length;
11
- },
12
- getToasts() {
13
- return context.get("toasts");
14
- },
15
- getGroupProps(options = {}) {
16
- const { label = "Notifications" } = options;
17
- const { hotkey } = prop("store").attrs;
18
- const hotkeyLabel = hotkey.join("+").replace(/Key/g, "").replace(/Digit/g, "");
19
- const placement = computed("placement");
20
- const [side, align = "center"] = placement.split("-");
21
- return normalize.element({
22
- ...parts.group.attrs,
23
- dir: prop("dir"),
24
- tabIndex: -1,
25
- role: "region",
26
- "aria-label": `${label}, ${placement} (${hotkeyLabel})`,
27
- id: dom.getRegionId(placement),
28
- "data-placement": placement,
29
- "data-side": side,
30
- "data-align": align,
31
- "aria-live": "polite",
32
- "aria-relevant": "additions text",
33
- "aria-atomic": "false",
34
- style: getGroupPlacementStyle(service, placement),
35
- onMouseEnter() {
36
- if (refs.get("ignoreMouseTimer").isActive()) return;
37
- send({ type: "REGION.POINTER_ENTER", placement });
38
- },
39
- onMouseMove() {
40
- if (refs.get("ignoreMouseTimer").isActive()) return;
41
- send({ type: "REGION.POINTER_ENTER", placement });
42
- },
43
- onMouseLeave() {
44
- if (refs.get("ignoreMouseTimer").isActive()) return;
45
- send({ type: "REGION.POINTER_LEAVE", placement });
46
- },
47
- onFocus(event) {
48
- send({ type: "REGION.FOCUS", target: event.relatedTarget });
49
- },
50
- onBlur(event) {
51
- if (refs.get("isFocusWithin") && !contains(event.currentTarget, event.relatedTarget)) {
52
- queueMicrotask(() => send({ type: "REGION.BLUR" }));
53
- }
54
- }
55
- });
56
- },
57
- subscribe(fn) {
58
- const store = prop("store");
59
- return store.subscribe(() => fn(context.get("toasts")));
60
- }
61
- };
7
+ const { context, prop, send, refs, computed } = service;
8
+ return {
9
+ getCount() {
10
+ return context.get("toasts").length;
11
+ },
12
+ getToasts() {
13
+ return context.get("toasts");
14
+ },
15
+ getGroupProps(options = {}) {
16
+ const { label = "Notifications" } = options;
17
+ const { hotkey } = prop("store").attrs;
18
+ const hotkeyLabel = hotkey.join("+").replace(/Key/g, "").replace(/Digit/g, "");
19
+ const placement = computed("placement");
20
+ const [side, align = "center"] = placement.split("-");
21
+ return normalize.element({
22
+ ...parts.group.attrs,
23
+ dir: prop("dir"),
24
+ tabIndex: -1,
25
+ role: "region",
26
+ "aria-label": `${label}, ${placement} (${hotkeyLabel})`,
27
+ id: getRegionId(placement),
28
+ "data-placement": placement,
29
+ "data-side": side,
30
+ "data-align": align,
31
+ "aria-live": "polite",
32
+ "aria-relevant": "additions text",
33
+ "aria-atomic": "false",
34
+ style: getGroupPlacementStyle(service, placement),
35
+ onMouseEnter() {
36
+ if (refs.get("ignoreMouseTimer").isActive()) return;
37
+ send({
38
+ type: "REGION.POINTER_ENTER",
39
+ placement
40
+ });
41
+ },
42
+ onMouseMove() {
43
+ if (refs.get("ignoreMouseTimer").isActive()) return;
44
+ send({
45
+ type: "REGION.POINTER_ENTER",
46
+ placement
47
+ });
48
+ },
49
+ onMouseLeave() {
50
+ if (refs.get("ignoreMouseTimer").isActive()) return;
51
+ send({
52
+ type: "REGION.POINTER_LEAVE",
53
+ placement
54
+ });
55
+ },
56
+ onFocus(event) {
57
+ send({
58
+ type: "REGION.FOCUS",
59
+ target: event.relatedTarget
60
+ });
61
+ },
62
+ onBlur(event) {
63
+ if (refs.get("isFocusWithin") && !contains(event.currentTarget, event.relatedTarget)) queueMicrotask(() => send({ type: "REGION.BLUR" }));
64
+ }
65
+ });
66
+ },
67
+ subscribe(fn) {
68
+ return prop("store").subscribe(() => fn(context.get("toasts")));
69
+ }
70
+ };
62
71
  }
63
- export {
64
- groupConnect
65
- };
72
+ export { groupConnect };
@@ -1,8 +1,2 @@
1
- import * as _zag_js_core from '@zag-js/core';
2
- import { ToastGroupSchema } from './toast.types.mjs';
3
- import '@zag-js/types';
4
- import '@zag-js/dom-query';
5
-
6
- declare const groupMachine: _zag_js_core.Machine<ToastGroupSchema>;
7
-
8
- export { groupMachine };
1
+ import { ToastGroupSchema } from "./toast.types.mjs";
2
+ export declare const groupMachine: import("@zag-js/core").Machine<ToastGroupSchema>;
@@ -1,8 +1,2 @@
1
- import * as _zag_js_core from '@zag-js/core';
2
- import { ToastGroupSchema } from './toast.types.js';
3
- import '@zag-js/types';
4
- import '@zag-js/dom-query';
5
-
6
- declare const groupMachine: _zag_js_core.Machine<ToastGroupSchema>;
7
-
8
- export { groupMachine };
1
+ import { ToastGroupSchema } from "./toast.types.js";
2
+ export declare const groupMachine: import("@zag-js/core").Machine<ToastGroupSchema>;