@zag-js/toast 1.43.0 → 2.0.0-next.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as _zag_js_core from '@zag-js/core';
2
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';
3
+ export { ActionOptions, ToastApi as Api, ToastGroupApi as GroupApi, ToastGroupMachine as GroupMachine, ToastGroupProps as GroupProps, ToastGroupService as GroupService, GroupState, IntlTranslations, ToastMachine as Machine, Options, Placement, PromiseOptions, ToastProps as Props, RootState, ToastService as Service, Status, StatusChangeDetails, ToastStore as Store, ToastStoreProps as StoreProps, ToastHeight, ToastQueuePriority, Type } from './toast.types.mjs';
4
4
  import { groupConnect } from './toast-group.connect.mjs';
5
5
  export { anatomy } from './toast.anatomy.mjs';
6
6
  export { connect } from './toast.connect.mjs';
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as _zag_js_core from '@zag-js/core';
2
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';
3
+ export { ActionOptions, ToastApi as Api, ToastGroupApi as GroupApi, ToastGroupMachine as GroupMachine, ToastGroupProps as GroupProps, ToastGroupService as GroupService, GroupState, IntlTranslations, ToastMachine as Machine, Options, Placement, PromiseOptions, ToastProps as Props, RootState, ToastService as Service, Status, StatusChangeDetails, ToastStore as Store, ToastStoreProps as StoreProps, ToastHeight, ToastQueuePriority, Type } from './toast.types.js';
4
4
  import { groupConnect } from './toast-group.connect.js';
5
5
  export { anatomy } from './toast.anatomy.js';
6
6
  export { connect } from './toast.connect.js';
@@ -38,7 +38,12 @@ var import_toast = require("./toast.anatomy.js");
38
38
  var dom = __toESM(require("./toast.dom.js"));
39
39
  var import_toast2 = require("./toast.utils.js");
40
40
  function groupConnect(service, normalize) {
41
- const { context, prop, send, refs, computed } = service;
41
+ const { context, prop, send, refs, computed, scope } = service;
42
+ function getGroupState() {
43
+ const placement = computed("placement");
44
+ const [side, align = "center"] = placement.split("-");
45
+ return { placement, side, align };
46
+ }
42
47
  return {
43
48
  getCount() {
44
49
  return context.get("toasts").length;
@@ -46,14 +51,15 @@ function groupConnect(service, normalize) {
46
51
  getToasts() {
47
52
  return context.get("toasts");
48
53
  },
54
+ getGroupState,
49
55
  getGroupProps(options = {}) {
50
56
  const { label = "Notifications" } = options;
51
57
  const { hotkey } = prop("store").attrs;
52
58
  const hotkeyLabel = hotkey.join("+").replace(/Key/g, "").replace(/Digit/g, "");
53
- const placement = computed("placement");
54
- const [side, align = "center"] = placement.split("-");
59
+ const groupState = getGroupState();
60
+ const { placement, side, align } = groupState;
55
61
  return normalize.element({
56
- ...import_toast.parts.group.attrs,
62
+ ...import_toast.parts.group.attrs(scope.id),
57
63
  dir: prop("dir"),
58
64
  tabIndex: -1,
59
65
  role: "region",
@@ -4,7 +4,12 @@ import { parts } from "./toast.anatomy.mjs";
4
4
  import * as dom from "./toast.dom.mjs";
5
5
  import { getGroupPlacementStyle } from "./toast.utils.mjs";
6
6
  function groupConnect(service, normalize) {
7
- const { context, prop, send, refs, computed } = service;
7
+ const { context, prop, send, refs, computed, scope } = service;
8
+ function getGroupState() {
9
+ const placement = computed("placement");
10
+ const [side, align = "center"] = placement.split("-");
11
+ return { placement, side, align };
12
+ }
8
13
  return {
9
14
  getCount() {
10
15
  return context.get("toasts").length;
@@ -12,14 +17,15 @@ function groupConnect(service, normalize) {
12
17
  getToasts() {
13
18
  return context.get("toasts");
14
19
  },
20
+ getGroupState,
15
21
  getGroupProps(options = {}) {
16
22
  const { label = "Notifications" } = options;
17
23
  const { hotkey } = prop("store").attrs;
18
24
  const hotkeyLabel = hotkey.join("+").replace(/Key/g, "").replace(/Digit/g, "");
19
- const placement = computed("placement");
20
- const [side, align = "center"] = placement.split("-");
25
+ const groupState = getGroupState();
26
+ const { placement, side, align } = groupState;
21
27
  return normalize.element({
22
- ...parts.group.attrs,
28
+ ...parts.group.attrs(scope.id),
23
29
  dir: prop("dir"),
24
30
  tabIndex: -1,
25
31
  role: "region",
@@ -51,6 +51,9 @@ function connect(service, normalize) {
51
51
  const description = prop("description");
52
52
  const action = prop("action");
53
53
  const [side, align = "center"] = placement.split("-");
54
+ function getRootState() {
55
+ return { visible, paused, mounted, frontmost, stacked: !!stacked, type, placement, side, align };
56
+ }
54
57
  return {
55
58
  type,
56
59
  title,
@@ -68,22 +71,23 @@ function connect(service, normalize) {
68
71
  dismiss() {
69
72
  send({ type: "DISMISS", src: "programmatic" });
70
73
  },
74
+ getRootState,
71
75
  getRootProps() {
76
+ const rootState = getRootState();
72
77
  return normalize.element({
73
- ...import_toast.parts.root.attrs,
78
+ ...import_toast.parts.root.attrs(scope.id),
74
79
  dir: prop("dir"),
75
- id: dom.getRootId(scope),
76
- "data-state": visible ? "open" : "closed",
77
- "data-type": type,
78
- "data-placement": placement,
79
- "data-align": align,
80
- "data-side": side,
81
- "data-mounted": (0, import_dom_query.dataAttr)(mounted),
82
- "data-paused": (0, import_dom_query.dataAttr)(paused),
83
- "data-first": (0, import_dom_query.dataAttr)(frontmost),
84
- "data-sibling": (0, import_dom_query.dataAttr)(!frontmost),
85
- "data-stack": (0, import_dom_query.dataAttr)(stacked),
86
- "data-overlap": (0, import_dom_query.dataAttr)(!stacked),
80
+ "data-state": rootState.visible ? "open" : "closed",
81
+ "data-type": rootState.type,
82
+ "data-placement": rootState.placement,
83
+ "data-align": rootState.align,
84
+ "data-side": rootState.side,
85
+ "data-mounted": (0, import_dom_query.dataAttr)(rootState.mounted),
86
+ "data-paused": (0, import_dom_query.dataAttr)(rootState.paused),
87
+ "data-first": (0, import_dom_query.dataAttr)(rootState.frontmost),
88
+ "data-sibling": (0, import_dom_query.dataAttr)(!rootState.frontmost),
89
+ "data-stack": (0, import_dom_query.dataAttr)(rootState.stacked),
90
+ "data-overlap": (0, import_dom_query.dataAttr)(!rootState.stacked),
87
91
  role: "status",
88
92
  "aria-atomic": "true",
89
93
  "aria-describedby": description ? dom.getDescriptionId(scope) : void 0,
@@ -115,19 +119,19 @@ function connect(service, normalize) {
115
119
  },
116
120
  getTitleProps() {
117
121
  return normalize.element({
118
- ...import_toast.parts.title.attrs,
122
+ ...import_toast.parts.title.attrs(scope.id),
119
123
  id: dom.getTitleId(scope)
120
124
  });
121
125
  },
122
126
  getDescriptionProps() {
123
127
  return normalize.element({
124
- ...import_toast.parts.description.attrs,
128
+ ...import_toast.parts.description.attrs(scope.id),
125
129
  id: dom.getDescriptionId(scope)
126
130
  });
127
131
  },
128
132
  getActionTriggerProps() {
129
133
  return normalize.button({
130
- ...import_toast.parts.actionTrigger.attrs,
134
+ ...import_toast.parts.actionTrigger.attrs(scope.id),
131
135
  type: "button",
132
136
  onClick(event) {
133
137
  if (event.defaultPrevented) return;
@@ -138,8 +142,7 @@ function connect(service, normalize) {
138
142
  },
139
143
  getCloseTriggerProps() {
140
144
  return normalize.button({
141
- id: dom.getCloseTriggerId(scope),
142
- ...import_toast.parts.closeTrigger.attrs,
145
+ ...import_toast.parts.closeTrigger.attrs(scope.id),
143
146
  type: "button",
144
147
  "aria-label": translations?.closeTriggerLabel,
145
148
  onClick(event) {
@@ -17,6 +17,9 @@ function connect(service, normalize) {
17
17
  const description = prop("description");
18
18
  const action = prop("action");
19
19
  const [side, align = "center"] = placement.split("-");
20
+ function getRootState() {
21
+ return { visible, paused, mounted, frontmost, stacked: !!stacked, type, placement, side, align };
22
+ }
20
23
  return {
21
24
  type,
22
25
  title,
@@ -34,22 +37,23 @@ function connect(service, normalize) {
34
37
  dismiss() {
35
38
  send({ type: "DISMISS", src: "programmatic" });
36
39
  },
40
+ getRootState,
37
41
  getRootProps() {
42
+ const rootState = getRootState();
38
43
  return normalize.element({
39
- ...parts.root.attrs,
44
+ ...parts.root.attrs(scope.id),
40
45
  dir: prop("dir"),
41
- id: dom.getRootId(scope),
42
- "data-state": visible ? "open" : "closed",
43
- "data-type": type,
44
- "data-placement": placement,
45
- "data-align": align,
46
- "data-side": side,
47
- "data-mounted": dataAttr(mounted),
48
- "data-paused": dataAttr(paused),
49
- "data-first": dataAttr(frontmost),
50
- "data-sibling": dataAttr(!frontmost),
51
- "data-stack": dataAttr(stacked),
52
- "data-overlap": dataAttr(!stacked),
46
+ "data-state": rootState.visible ? "open" : "closed",
47
+ "data-type": rootState.type,
48
+ "data-placement": rootState.placement,
49
+ "data-align": rootState.align,
50
+ "data-side": rootState.side,
51
+ "data-mounted": dataAttr(rootState.mounted),
52
+ "data-paused": dataAttr(rootState.paused),
53
+ "data-first": dataAttr(rootState.frontmost),
54
+ "data-sibling": dataAttr(!rootState.frontmost),
55
+ "data-stack": dataAttr(rootState.stacked),
56
+ "data-overlap": dataAttr(!rootState.stacked),
53
57
  role: "status",
54
58
  "aria-atomic": "true",
55
59
  "aria-describedby": description ? dom.getDescriptionId(scope) : void 0,
@@ -81,19 +85,19 @@ function connect(service, normalize) {
81
85
  },
82
86
  getTitleProps() {
83
87
  return normalize.element({
84
- ...parts.title.attrs,
88
+ ...parts.title.attrs(scope.id),
85
89
  id: dom.getTitleId(scope)
86
90
  });
87
91
  },
88
92
  getDescriptionProps() {
89
93
  return normalize.element({
90
- ...parts.description.attrs,
94
+ ...parts.description.attrs(scope.id),
91
95
  id: dom.getDescriptionId(scope)
92
96
  });
93
97
  },
94
98
  getActionTriggerProps() {
95
99
  return normalize.button({
96
- ...parts.actionTrigger.attrs,
100
+ ...parts.actionTrigger.attrs(scope.id),
97
101
  type: "button",
98
102
  onClick(event) {
99
103
  if (event.defaultPrevented) return;
@@ -104,8 +108,7 @@ function connect(service, normalize) {
104
108
  },
105
109
  getCloseTriggerProps() {
106
110
  return normalize.button({
107
- id: dom.getCloseTriggerId(scope),
108
- ...parts.closeTrigger.attrs,
111
+ ...parts.closeTrigger.attrs(scope.id),
109
112
  type: "button",
110
113
  "aria-label": translations?.closeTriggerLabel,
111
114
  onClick(event) {
@@ -4,11 +4,11 @@ import '@zag-js/types';
4
4
  import '@zag-js/dom-query';
5
5
 
6
6
  declare const getRegionId: (placement: Placement) => string;
7
- declare const getRegionEl: (ctx: Scope, placement: Placement) => HTMLElement | null;
8
7
  declare const getRootId: (ctx: Scope) => string;
9
- declare const getRootEl: (ctx: Scope) => HTMLElement | null;
10
8
  declare const getTitleId: (ctx: Scope) => string;
11
9
  declare const getDescriptionId: (ctx: Scope) => string;
12
10
  declare const getCloseTriggerId: (ctx: Scope) => string;
11
+ declare const getRegionEl: (ctx: Scope, placement: Placement) => HTMLElement | null;
12
+ declare const getRootEl: (ctx: Scope) => HTMLElement | null;
13
13
 
14
14
  export { getCloseTriggerId, getDescriptionId, getRegionEl, getRegionId, getRootEl, getRootId, getTitleId };
@@ -4,11 +4,11 @@ import '@zag-js/types';
4
4
  import '@zag-js/dom-query';
5
5
 
6
6
  declare const getRegionId: (placement: Placement) => string;
7
- declare const getRegionEl: (ctx: Scope, placement: Placement) => HTMLElement | null;
8
7
  declare const getRootId: (ctx: Scope) => string;
9
- declare const getRootEl: (ctx: Scope) => HTMLElement | null;
10
8
  declare const getTitleId: (ctx: Scope) => string;
11
9
  declare const getDescriptionId: (ctx: Scope) => string;
12
10
  declare const getCloseTriggerId: (ctx: Scope) => string;
11
+ declare const getRegionEl: (ctx: Scope, placement: Placement) => HTMLElement | null;
12
+ declare const getRootEl: (ctx: Scope) => HTMLElement | null;
13
13
 
14
14
  export { getCloseTriggerId, getDescriptionId, getRegionEl, getRegionId, getRootEl, getRootId, getTitleId };
package/dist/toast.dom.js CHANGED
@@ -29,13 +29,14 @@ __export(toast_dom_exports, {
29
29
  getTitleId: () => getTitleId
30
30
  });
31
31
  module.exports = __toCommonJS(toast_dom_exports);
32
- var getRegionId = (placement) => `toast-group:${placement}`;
33
- var getRegionEl = (ctx, placement) => ctx.getById(`toast-group:${placement}`);
34
- var getRootId = (ctx) => `toast:${ctx.id}`;
35
- var getRootEl = (ctx) => ctx.getById(getRootId(ctx));
36
- var getTitleId = (ctx) => `toast:${ctx.id}:title`;
37
- var getDescriptionId = (ctx) => `toast:${ctx.id}:description`;
38
- var getCloseTriggerId = (ctx) => `toast${ctx.id}:close`;
32
+ var import_toast = require("./toast.anatomy.js");
33
+ var getRegionId = (placement) => `toast-group-${placement}`;
34
+ var getRootId = (ctx) => `${ctx.id}`;
35
+ var getTitleId = (ctx) => `${ctx.id}:title`;
36
+ var getDescriptionId = (ctx) => `${ctx.id}:description`;
37
+ var getCloseTriggerId = (ctx) => `${ctx.id}:close`;
38
+ var getRegionEl = (ctx, placement) => ctx.getById(`toast-group-${placement}`);
39
+ var getRootEl = (ctx) => ctx.query(ctx.selector(import_toast.parts.root));
39
40
  // Annotate the CommonJS export names for ESM import in node:
40
41
  0 && (module.exports = {
41
42
  getCloseTriggerId,
@@ -1,11 +1,12 @@
1
1
  // src/toast.dom.ts
2
- var getRegionId = (placement) => `toast-group:${placement}`;
3
- var getRegionEl = (ctx, placement) => ctx.getById(`toast-group:${placement}`);
4
- var getRootId = (ctx) => `toast:${ctx.id}`;
5
- var getRootEl = (ctx) => ctx.getById(getRootId(ctx));
6
- var getTitleId = (ctx) => `toast:${ctx.id}:title`;
7
- var getDescriptionId = (ctx) => `toast:${ctx.id}:description`;
8
- var getCloseTriggerId = (ctx) => `toast${ctx.id}:close`;
2
+ import { parts } from "./toast.anatomy.mjs";
3
+ var getRegionId = (placement) => `toast-group-${placement}`;
4
+ var getRootId = (ctx) => `${ctx.id}`;
5
+ var getTitleId = (ctx) => `${ctx.id}:title`;
6
+ var getDescriptionId = (ctx) => `${ctx.id}:description`;
7
+ var getCloseTriggerId = (ctx) => `${ctx.id}:close`;
8
+ var getRegionEl = (ctx, placement) => ctx.getById(`toast-group-${placement}`);
9
+ var getRootEl = (ctx) => ctx.query(ctx.selector(parts.root));
9
10
  export {
10
11
  getCloseTriggerId,
11
12
  getDescriptionId,
@@ -26,6 +26,44 @@ interface ToastHeight {
26
26
  */
27
27
  height: number;
28
28
  }
29
+ interface RootState {
30
+ /**
31
+ * Whether the toast is visible
32
+ */
33
+ visible: boolean;
34
+ /**
35
+ * Whether the toast is paused
36
+ */
37
+ paused: boolean;
38
+ /**
39
+ * Whether the toast has mounted into the DOM
40
+ */
41
+ mounted: boolean;
42
+ /**
43
+ * Whether the toast is the frontmost (topmost) toast in the group
44
+ */
45
+ frontmost: boolean;
46
+ /**
47
+ * Whether the toasts in the group are stacked instead of overlapping
48
+ */
49
+ stacked: boolean;
50
+ /**
51
+ * The type of the toast
52
+ */
53
+ type: Type;
54
+ /**
55
+ * The placement of the toast
56
+ */
57
+ placement: Placement;
58
+ /**
59
+ * The side of the toast placement
60
+ */
61
+ side: string;
62
+ /**
63
+ * The horizontal alignment of the toast placement
64
+ */
65
+ align: string;
66
+ }
29
67
  interface ActionOptions {
30
68
  /**
31
69
  * The label of the action
@@ -317,6 +355,20 @@ interface GroupProps {
317
355
  */
318
356
  label?: string | undefined;
319
357
  }
358
+ interface GroupState {
359
+ /**
360
+ * The placement of the toast group
361
+ */
362
+ placement: Placement;
363
+ /**
364
+ * The side of the toast group placement
365
+ */
366
+ side: string;
367
+ /**
368
+ * The horizontal alignment of the toast group placement
369
+ */
370
+ align: string;
371
+ }
320
372
  interface ToastGroupApi<T extends PropTypes = PropTypes, O = any> {
321
373
  /**
322
374
  * The total number of toasts
@@ -330,6 +382,10 @@ interface ToastGroupApi<T extends PropTypes = PropTypes, O = any> {
330
382
  * Subscribe to the toast group
331
383
  */
332
384
  subscribe: (callback: (toasts: Options<O>[]) => void) => VoidFunction;
385
+ /**
386
+ * Returns the state of the group
387
+ */
388
+ getGroupState: () => GroupState;
333
389
  getGroupProps: (options?: GroupProps) => T["element"];
334
390
  }
335
391
  interface ToastApi<T extends PropTypes = PropTypes, O = any> {
@@ -373,6 +429,10 @@ interface ToastApi<T extends PropTypes = PropTypes, O = any> {
373
429
  * Function to instantly dismiss the toast.
374
430
  */
375
431
  dismiss: VoidFunction;
432
+ /**
433
+ * Returns the state of the root
434
+ */
435
+ getRootState: () => RootState;
376
436
  getRootProps: () => T["element"];
377
437
  getTitleProps: () => T["element"];
378
438
  getGhostBeforeProps: () => T["element"];
@@ -382,4 +442,4 @@ interface ToastApi<T extends PropTypes = PropTypes, O = any> {
382
442
  getActionTriggerProps: () => T["button"];
383
443
  }
384
444
 
385
- export type { ActionOptions, GroupProps, IntlTranslations, Options, Placement, PromiseOptions, Status, StatusChangeDetails, ToastApi, ToastGroupApi, ToastGroupMachine, ToastGroupProps, ToastGroupSchema, ToastGroupService, ToastHeight, ToastMachine, ToastProps, ToastQueuePriority, ToastSchema, ToastService, ToastStore, ToastStoreProps, Type };
445
+ export type { ActionOptions, GroupProps, GroupState, IntlTranslations, Options, Placement, PromiseOptions, RootState, Status, StatusChangeDetails, ToastApi, ToastGroupApi, ToastGroupMachine, ToastGroupProps, ToastGroupSchema, ToastGroupService, ToastHeight, ToastMachine, ToastProps, ToastQueuePriority, ToastSchema, ToastService, ToastStore, ToastStoreProps, Type };
@@ -26,6 +26,44 @@ interface ToastHeight {
26
26
  */
27
27
  height: number;
28
28
  }
29
+ interface RootState {
30
+ /**
31
+ * Whether the toast is visible
32
+ */
33
+ visible: boolean;
34
+ /**
35
+ * Whether the toast is paused
36
+ */
37
+ paused: boolean;
38
+ /**
39
+ * Whether the toast has mounted into the DOM
40
+ */
41
+ mounted: boolean;
42
+ /**
43
+ * Whether the toast is the frontmost (topmost) toast in the group
44
+ */
45
+ frontmost: boolean;
46
+ /**
47
+ * Whether the toasts in the group are stacked instead of overlapping
48
+ */
49
+ stacked: boolean;
50
+ /**
51
+ * The type of the toast
52
+ */
53
+ type: Type;
54
+ /**
55
+ * The placement of the toast
56
+ */
57
+ placement: Placement;
58
+ /**
59
+ * The side of the toast placement
60
+ */
61
+ side: string;
62
+ /**
63
+ * The horizontal alignment of the toast placement
64
+ */
65
+ align: string;
66
+ }
29
67
  interface ActionOptions {
30
68
  /**
31
69
  * The label of the action
@@ -317,6 +355,20 @@ interface GroupProps {
317
355
  */
318
356
  label?: string | undefined;
319
357
  }
358
+ interface GroupState {
359
+ /**
360
+ * The placement of the toast group
361
+ */
362
+ placement: Placement;
363
+ /**
364
+ * The side of the toast group placement
365
+ */
366
+ side: string;
367
+ /**
368
+ * The horizontal alignment of the toast group placement
369
+ */
370
+ align: string;
371
+ }
320
372
  interface ToastGroupApi<T extends PropTypes = PropTypes, O = any> {
321
373
  /**
322
374
  * The total number of toasts
@@ -330,6 +382,10 @@ interface ToastGroupApi<T extends PropTypes = PropTypes, O = any> {
330
382
  * Subscribe to the toast group
331
383
  */
332
384
  subscribe: (callback: (toasts: Options<O>[]) => void) => VoidFunction;
385
+ /**
386
+ * Returns the state of the group
387
+ */
388
+ getGroupState: () => GroupState;
333
389
  getGroupProps: (options?: GroupProps) => T["element"];
334
390
  }
335
391
  interface ToastApi<T extends PropTypes = PropTypes, O = any> {
@@ -373,6 +429,10 @@ interface ToastApi<T extends PropTypes = PropTypes, O = any> {
373
429
  * Function to instantly dismiss the toast.
374
430
  */
375
431
  dismiss: VoidFunction;
432
+ /**
433
+ * Returns the state of the root
434
+ */
435
+ getRootState: () => RootState;
376
436
  getRootProps: () => T["element"];
377
437
  getTitleProps: () => T["element"];
378
438
  getGhostBeforeProps: () => T["element"];
@@ -382,4 +442,4 @@ interface ToastApi<T extends PropTypes = PropTypes, O = any> {
382
442
  getActionTriggerProps: () => T["button"];
383
443
  }
384
444
 
385
- export type { ActionOptions, GroupProps, IntlTranslations, Options, Placement, PromiseOptions, Status, StatusChangeDetails, ToastApi, ToastGroupApi, ToastGroupMachine, ToastGroupProps, ToastGroupSchema, ToastGroupService, ToastHeight, ToastMachine, ToastProps, ToastQueuePriority, ToastSchema, ToastService, ToastStore, ToastStoreProps, Type };
445
+ export type { ActionOptions, GroupProps, GroupState, IntlTranslations, Options, Placement, PromiseOptions, RootState, Status, StatusChangeDetails, ToastApi, ToastGroupApi, ToastGroupMachine, ToastGroupProps, ToastGroupSchema, ToastGroupService, ToastHeight, ToastMachine, ToastProps, ToastQueuePriority, ToastSchema, ToastService, ToastStore, ToastStoreProps, Type };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/toast",
3
- "version": "1.43.0",
3
+ "version": "2.0.0-next.1",
4
4
  "description": "Core logic for the toast widget implemented as a state machine",
5
5
  "keywords": [
6
6
  "js",
@@ -29,12 +29,12 @@
29
29
  "url": "https://github.com/chakra-ui/zag/issues"
30
30
  },
31
31
  "dependencies": {
32
- "@zag-js/anatomy": "1.43.0",
33
- "@zag-js/core": "1.43.0",
34
- "@zag-js/dom-query": "1.43.0",
35
- "@zag-js/dismissable": "1.43.0",
36
- "@zag-js/utils": "1.43.0",
37
- "@zag-js/types": "1.43.0"
32
+ "@zag-js/anatomy": "2.0.0-next.1",
33
+ "@zag-js/core": "2.0.0-next.1",
34
+ "@zag-js/dom-query": "2.0.0-next.1",
35
+ "@zag-js/dismissable": "2.0.0-next.1",
36
+ "@zag-js/types": "2.0.0-next.1",
37
+ "@zag-js/utils": "2.0.0-next.1"
38
38
  },
39
39
  "devDependencies": {
40
40
  "clean-package": "2.2.0"