@zag-js/toast 0.36.3 → 0.37.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 CHANGED
@@ -1,4 +1,4 @@
1
- import { RootProperties, CommonProperties, Direction, PropTypes, DirectionProperty, Context, RequiredBy, NormalizeProps } from '@zag-js/types';
1
+ import { CommonProperties, Direction, PropTypes, DirectionProperty, RequiredBy, NormalizeProps } from '@zag-js/types';
2
2
  import * as _zag_js_core from '@zag-js/core';
3
3
  import { Machine, StateMachine } from '@zag-js/core';
4
4
  import * as _zag_js_anatomy from '@zag-js/anatomy';
@@ -74,7 +74,7 @@ type ToastOptions<T extends GenericOptions = DefaultGenericOptions> = T & {
74
74
  onUpdate?: VoidFunction;
75
75
  };
76
76
  type Options<T extends GenericOptions> = Partial<ToastOptions<T> & GlobalToastOptions<T>>;
77
- type MachineContext<T extends GenericOptions = DefaultGenericOptions> = GlobalToastOptions<T> & RootProperties & CommonProperties & Omit<ToastOptions<T>, "removeDelay"> & {
77
+ type MachineContext<T extends GenericOptions = DefaultGenericOptions> = GlobalToastOptions<T> & CommonProperties & Omit<ToastOptions<T>, "removeDelay"> & {
78
78
  /**
79
79
  * The duration for the toast to kept alive before it is removed.
80
80
  * Useful for exit transitions.
@@ -126,7 +126,8 @@ type GroupComputedContext = Readonly<{
126
126
  */
127
127
  count: number;
128
128
  }>;
129
- type GroupPrivateContext<T extends GenericOptions> = Context<{}>;
129
+ interface GroupPrivateContext<T extends GenericOptions> {
130
+ }
130
131
  interface GroupMachineContext<T extends GenericOptions = DefaultGenericOptions> extends GroupPublicContext<T>, GroupComputedContext, GroupPrivateContext<T> {
131
132
  }
132
133
  type GroupState<T extends GenericOptions = DefaultGenericOptions> = StateMachine.State<GroupMachineContext<T>>;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { RootProperties, CommonProperties, Direction, PropTypes, DirectionProperty, Context, RequiredBy, NormalizeProps } from '@zag-js/types';
1
+ import { CommonProperties, Direction, PropTypes, DirectionProperty, RequiredBy, NormalizeProps } from '@zag-js/types';
2
2
  import * as _zag_js_core from '@zag-js/core';
3
3
  import { Machine, StateMachine } from '@zag-js/core';
4
4
  import * as _zag_js_anatomy from '@zag-js/anatomy';
@@ -74,7 +74,7 @@ type ToastOptions<T extends GenericOptions = DefaultGenericOptions> = T & {
74
74
  onUpdate?: VoidFunction;
75
75
  };
76
76
  type Options<T extends GenericOptions> = Partial<ToastOptions<T> & GlobalToastOptions<T>>;
77
- type MachineContext<T extends GenericOptions = DefaultGenericOptions> = GlobalToastOptions<T> & RootProperties & CommonProperties & Omit<ToastOptions<T>, "removeDelay"> & {
77
+ type MachineContext<T extends GenericOptions = DefaultGenericOptions> = GlobalToastOptions<T> & CommonProperties & Omit<ToastOptions<T>, "removeDelay"> & {
78
78
  /**
79
79
  * The duration for the toast to kept alive before it is removed.
80
80
  * Useful for exit transitions.
@@ -126,7 +126,8 @@ type GroupComputedContext = Readonly<{
126
126
  */
127
127
  count: number;
128
128
  }>;
129
- type GroupPrivateContext<T extends GenericOptions> = Context<{}>;
129
+ interface GroupPrivateContext<T extends GenericOptions> {
130
+ }
130
131
  interface GroupMachineContext<T extends GenericOptions = DefaultGenericOptions> extends GroupPublicContext<T>, GroupComputedContext, GroupPrivateContext<T> {
131
132
  }
132
133
  type GroupState<T extends GenericOptions = DefaultGenericOptions> = StateMachine.State<GroupMachineContext<T>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/toast",
3
- "version": "0.36.3",
3
+ "version": "0.37.0",
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
  "url": "https://github.com/chakra-ui/zag/issues"
28
28
  },
29
29
  "dependencies": {
30
- "@zag-js/anatomy": "0.36.3",
31
- "@zag-js/core": "0.36.3",
32
- "@zag-js/dom-query": "0.36.3",
33
- "@zag-js/dom-event": "0.36.3",
34
- "@zag-js/utils": "0.36.3",
35
- "@zag-js/types": "0.36.3"
30
+ "@zag-js/anatomy": "0.37.0",
31
+ "@zag-js/core": "0.37.0",
32
+ "@zag-js/dom-query": "0.37.0",
33
+ "@zag-js/dom-event": "0.37.0",
34
+ "@zag-js/utils": "0.37.0",
35
+ "@zag-js/types": "0.37.0"
36
36
  },
37
37
  "devDependencies": {
38
38
  "clean-package": "2.2.0"
@@ -1,13 +1,5 @@
1
1
  import type { Machine, StateMachine as S } from "@zag-js/core"
2
- import type {
3
- CommonProperties,
4
- Context,
5
- Direction,
6
- DirectionProperty,
7
- PropTypes,
8
- RequiredBy,
9
- RootProperties,
10
- } from "@zag-js/types"
2
+ import type { CommonProperties, Direction, DirectionProperty, PropTypes, RequiredBy } from "@zag-js/types"
11
3
 
12
4
  /* -----------------------------------------------------------------------------
13
5
  * Base types
@@ -96,7 +88,6 @@ export type Options<T extends GenericOptions> = Partial<ToastOptions<T> & Global
96
88
  * -----------------------------------------------------------------------------*/
97
89
 
98
90
  export type MachineContext<T extends GenericOptions = DefaultGenericOptions> = GlobalToastOptions<T> &
99
- RootProperties &
100
91
  CommonProperties &
101
92
  Omit<ToastOptions<T>, "removeDelay"> & {
102
93
  /**
@@ -160,13 +151,13 @@ type GroupComputedContext = Readonly<{
160
151
  count: number
161
152
  }>
162
153
 
163
- type GroupPrivateContext<T extends GenericOptions> = Context<{
154
+ interface GroupPrivateContext<T extends GenericOptions> {
164
155
  /**
165
156
  * @internal
166
157
  * The child toast machines (spawned by the toast group)
167
158
  */
168
159
  toasts: Service<T>[]
169
- }>
160
+ }
170
161
 
171
162
  export interface GroupMachineContext<T extends GenericOptions = DefaultGenericOptions>
172
163
  extends GroupPublicContext<T>,