@zag-js/toast 0.10.3 → 0.10.4

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.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Toaster } from './toast.types';
1
+ import { Toaster } from './toast.types';
2
2
  import { groupConnect } from "./toast-group.connect";
3
3
  import { groupMachine } from "./toast-group.machine";
4
4
  import { createToastMachine as createMachine } from "./toast.machine";
@@ -1,5 +1,5 @@
1
1
  import type { NormalizeProps, PropTypes } from "@zag-js/types";
2
- import type { Service, GroupMachineContext, GroupProps, GroupSend, GroupState, Placement, PromiseOptions, Toaster, Options } from './toast.types';
2
+ import { Service, GroupMachineContext, GroupProps, GroupSend, GroupState, Placement, PromiseOptions, Toaster, Options } from './toast.types';
3
3
  export declare let toaster: Toaster;
4
4
  export declare function groupConnect<T extends PropTypes>(state: GroupState, send: GroupSend, normalize: NormalizeProps<T>): {
5
5
  /**
@@ -1,3 +1,3 @@
1
- import type { Machine, StateMachine } from '@zag-js/core';
1
+ import { Machine, StateMachine } from '@zag-js/core';
2
2
  import type { GroupMachineContext, UserDefinedGroupContext } from "./toast.types";
3
3
  export declare function groupMachine(userContext: UserDefinedGroupContext): Machine<GroupMachineContext, StateMachine.StateSchema, StateMachine.AnyEventObject>;
@@ -1,3 +1,3 @@
1
- import type { AnatomyInstance, AnatomyPart } from '@zag-js/anatomy';
2
- export declare const anatomy: AnatomyInstance<"group" | "title" | "description" | "root" | "closeTrigger">;
3
- export declare const parts: Record<"group" | "title" | "description" | "root" | "closeTrigger", AnatomyPart>;
1
+ import { AnatomyInstance, AnatomyPart } from '@zag-js/anatomy';
2
+ export declare const anatomy: AnatomyInstance<"title" | "group" | "root" | "description" | "closeTrigger">;
3
+ export declare const parts: Record<"title" | "group" | "root" | "description" | "closeTrigger", AnatomyPart>;
@@ -1,5 +1,5 @@
1
1
  import type { NormalizeProps, PropTypes } from "@zag-js/types";
2
- import type { Type, Placement, Send, State } from './toast.types';
2
+ import { Type, Placement, Send, State } from './toast.types';
3
3
  export declare function connect<T extends PropTypes>(state: State, send: Send, normalize: NormalizeProps<T>): {
4
4
  /**
5
5
  * The type of the toast.
@@ -1,22 +1,22 @@
1
1
  import type { GroupMachineContext as GroupCtx, MachineContext as Ctx, Placement } from "./toast.types";
2
2
  export declare const dom: {
3
3
  getRootNode: (ctx: {
4
- getRootNode?: (() => Node | ShadowRoot | Document) | undefined;
5
- }) => ShadowRoot | Document;
4
+ getRootNode?: (() => Node | Document | ShadowRoot) | undefined;
5
+ }) => Document | ShadowRoot;
6
6
  getDoc: (ctx: {
7
- getRootNode?: (() => Node | ShadowRoot | Document) | undefined;
7
+ getRootNode?: (() => Node | Document | ShadowRoot) | undefined;
8
8
  }) => Document;
9
9
  getWin: (ctx: {
10
- getRootNode?: (() => Node | ShadowRoot | Document) | undefined;
10
+ getRootNode?: (() => Node | Document | ShadowRoot) | undefined;
11
11
  }) => Window & typeof globalThis;
12
12
  getActiveElement: (ctx: {
13
- getRootNode?: (() => Node | ShadowRoot | Document) | undefined;
13
+ getRootNode?: (() => Node | Document | ShadowRoot) | undefined;
14
14
  }) => HTMLElement | null;
15
15
  getById: <T extends HTMLElement = HTMLElement>(ctx: {
16
- getRootNode?: (() => Node | ShadowRoot | Document) | undefined;
16
+ getRootNode?: (() => Node | Document | ShadowRoot) | undefined;
17
17
  }, id: string) => T | null;
18
18
  queryById: <T_1 extends HTMLElement = HTMLElement>(ctx: {
19
- getRootNode?: (() => Node | ShadowRoot | Document) | undefined;
19
+ getRootNode?: (() => Node | Document | ShadowRoot) | undefined;
20
20
  }, id: string) => T_1;
21
21
  } & {
22
22
  getGroupId: (placement: Placement) => string;
@@ -1,3 +1,3 @@
1
- import type { Machine, StateMachine } from '@zag-js/core';
1
+ import { Machine, StateMachine } from '@zag-js/core';
2
2
  import type { MachineContext, MachineState, Options } from "./toast.types";
3
3
  export declare function createToastMachine(options?: Options): Machine<MachineContext, MachineState, StateMachine.AnyEventObject>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/toast",
3
- "version": "0.10.3",
3
+ "version": "0.10.4",
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.10.3",
31
- "@zag-js/core": "0.10.3",
32
- "@zag-js/dom-query": "0.10.3",
33
- "@zag-js/dom-event": "0.10.3",
34
- "@zag-js/utils": "0.10.3",
35
- "@zag-js/types": "0.10.3"
30
+ "@zag-js/anatomy": "0.10.4",
31
+ "@zag-js/core": "0.10.4",
32
+ "@zag-js/dom-query": "0.10.4",
33
+ "@zag-js/dom-event": "0.10.4",
34
+ "@zag-js/utils": "0.10.4",
35
+ "@zag-js/types": "0.10.4"
36
36
  },
37
37
  "devDependencies": {
38
38
  "clean-package": "2.2.0"