@zag-js/toast 1.48.0 → 1.49.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/toast-group.connect.d.mts +1 -1
- package/dist/toast-group.connect.d.ts +2 -2
- package/dist/toast-group.connect.js +1 -1
- package/dist/toast-group.connect.mjs +1 -1
- package/dist/toast-group.machine.js +3 -3
- package/dist/toast-group.machine.mjs +3 -3
- package/dist/toast.connect.d.mts +1 -1
- package/dist/toast.connect.d.ts +2 -2
- package/dist/toast.connect.js +2 -2
- package/dist/toast.connect.mjs +2 -2
- package/dist/toast.dom.d.mts +1 -1
- package/dist/toast.dom.d.ts +1 -1
- package/dist/toast.machine.js +3 -3
- package/dist/toast.machine.mjs +3 -3
- package/dist/toast.types.d.mts +2 -2
- package/dist/toast.utils.d.mts +1 -1
- package/dist/toast.utils.d.ts +2 -2
- package/package.json +7 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ToastGroupApi, ToastGroupSchema } from "./toast.types.mjs";
|
|
2
1
|
import { Service } from "@zag-js/core";
|
|
3
2
|
import { NormalizeProps, PropTypes } from "@zag-js/types";
|
|
3
|
+
import { ToastGroupApi, ToastGroupSchema } from "./toast.types.mjs";
|
|
4
4
|
export declare function groupConnect<T extends PropTypes, O = any>(service: Service<ToastGroupSchema>, normalize: NormalizeProps<T>): ToastGroupApi<T, O>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ToastGroupApi, ToastGroupSchema } from "./toast.types.js";
|
|
2
|
-
import { NormalizeProps, PropTypes } from "@zag-js/types";
|
|
3
1
|
import { Service } from "@zag-js/core";
|
|
2
|
+
import { NormalizeProps, PropTypes } from "@zag-js/types";
|
|
3
|
+
import { ToastGroupApi, ToastGroupSchema } from "./toast.types.js";
|
|
4
4
|
export declare function groupConnect<T extends PropTypes, O = any>(service: Service<ToastGroupSchema>, normalize: NormalizeProps<T>): ToastGroupApi<T, O>;
|
|
@@ -2,10 +2,10 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
+
let _zag_js_dom_query = require("@zag-js/dom-query");
|
|
5
6
|
const require_toast_anatomy = require("./toast.anatomy.js");
|
|
6
7
|
const require_toast_dom = require("./toast.dom.js");
|
|
7
8
|
const require_toast_utils = require("./toast.utils.js");
|
|
8
|
-
let _zag_js_dom_query = require("@zag-js/dom-query");
|
|
9
9
|
// src/toast-group.connect.ts
|
|
10
10
|
function groupConnect(service, normalize) {
|
|
11
11
|
const { context, prop, send, refs, computed } = service;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { contains } from "@zag-js/dom-query";
|
|
1
2
|
import { parts } from "./toast.anatomy.mjs";
|
|
2
3
|
import { getRegionId } from "./toast.dom.mjs";
|
|
3
4
|
import { getGroupPlacementStyle } from "./toast.utils.mjs";
|
|
4
|
-
import { contains } from "@zag-js/dom-query";
|
|
5
5
|
// src/toast-group.connect.ts
|
|
6
6
|
function groupConnect(service, normalize) {
|
|
7
7
|
const { context, prop, send, refs, computed } = service;
|
|
@@ -2,11 +2,11 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_toast_dom = require("./toast.dom.js");
|
|
6
|
-
let _zag_js_dom_query = require("@zag-js/dom-query");
|
|
7
|
-
let _zag_js_utils = require("@zag-js/utils");
|
|
8
5
|
let _zag_js_core = require("@zag-js/core");
|
|
9
6
|
let _zag_js_dismissable = require("@zag-js/dismissable");
|
|
7
|
+
let _zag_js_dom_query = require("@zag-js/dom-query");
|
|
8
|
+
let _zag_js_utils = require("@zag-js/utils");
|
|
9
|
+
const require_toast_dom = require("./toast.dom.js");
|
|
10
10
|
// src/toast-group.machine.ts
|
|
11
11
|
const { guards, createMachine } = (0, _zag_js_core.setup)();
|
|
12
12
|
const { and } = guards;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { getRegionEl, getToastEls } from "./toast.dom.mjs";
|
|
2
|
-
import { AnimationFrame, addDomEvent, contains, getEventTarget } from "@zag-js/dom-query";
|
|
3
|
-
import { uuid } from "@zag-js/utils";
|
|
4
1
|
import { setup } from "@zag-js/core";
|
|
5
2
|
import { trackDismissableBranch } from "@zag-js/dismissable";
|
|
3
|
+
import { AnimationFrame, addDomEvent, contains, getEventTarget } from "@zag-js/dom-query";
|
|
4
|
+
import { uuid } from "@zag-js/utils";
|
|
5
|
+
import { getRegionEl, getToastEls } from "./toast.dom.mjs";
|
|
6
6
|
// src/toast-group.machine.ts
|
|
7
7
|
const { guards, createMachine } = setup();
|
|
8
8
|
const { and } = guards;
|
package/dist/toast.connect.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ToastApi, ToastSchema } from "./toast.types.mjs";
|
|
2
1
|
import { Service } from "@zag-js/core";
|
|
3
2
|
import { NormalizeProps, PropTypes } from "@zag-js/types";
|
|
3
|
+
import { ToastApi, ToastSchema } from "./toast.types.mjs";
|
|
4
4
|
export declare function connect<T extends PropTypes, O>(service: Service<ToastSchema<O>>, normalize: NormalizeProps<T>): ToastApi<T, O>;
|
package/dist/toast.connect.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ToastApi, ToastSchema } from "./toast.types.js";
|
|
2
|
-
import { NormalizeProps, PropTypes } from "@zag-js/types";
|
|
3
1
|
import { Service } from "@zag-js/core";
|
|
2
|
+
import { NormalizeProps, PropTypes } from "@zag-js/types";
|
|
3
|
+
import { ToastApi, ToastSchema } from "./toast.types.js";
|
|
4
4
|
export declare function connect<T extends PropTypes, O>(service: Service<ToastSchema<O>>, normalize: NormalizeProps<T>): ToastApi<T, O>;
|
package/dist/toast.connect.js
CHANGED
|
@@ -2,11 +2,11 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
+
let _zag_js_dom_query = require("@zag-js/dom-query");
|
|
6
|
+
let _zag_js_utils = require("@zag-js/utils");
|
|
5
7
|
const require_toast_anatomy = require("./toast.anatomy.js");
|
|
6
8
|
const require_toast_dom = require("./toast.dom.js");
|
|
7
9
|
const require_toast_utils = require("./toast.utils.js");
|
|
8
|
-
let _zag_js_dom_query = require("@zag-js/dom-query");
|
|
9
|
-
let _zag_js_utils = require("@zag-js/utils");
|
|
10
10
|
// src/toast.connect.ts
|
|
11
11
|
const defaultTranslations = { closeTriggerLabel: "Dismiss notification" };
|
|
12
12
|
function connect(service, normalize) {
|
package/dist/toast.connect.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { dataAttr } from "@zag-js/dom-query";
|
|
2
|
+
import { mergeWithDefault } from "@zag-js/utils";
|
|
1
3
|
import { parts } from "./toast.anatomy.mjs";
|
|
2
4
|
import { getCloseTriggerId, getDescriptionId, getRootId, getTitleId } from "./toast.dom.mjs";
|
|
3
5
|
import { getGhostAfterStyle, getGhostBeforeStyle, getPlacementStyle } from "./toast.utils.mjs";
|
|
4
|
-
import { dataAttr } from "@zag-js/dom-query";
|
|
5
|
-
import { mergeWithDefault } from "@zag-js/utils";
|
|
6
6
|
// src/toast.connect.ts
|
|
7
7
|
const defaultTranslations = { closeTriggerLabel: "Dismiss notification" };
|
|
8
8
|
function connect(service, normalize) {
|
package/dist/toast.dom.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Placement } from "./toast.types.mjs";
|
|
2
1
|
import { Scope } from "@zag-js/core";
|
|
2
|
+
import { Placement } from "./toast.types.mjs";
|
|
3
3
|
export declare const getRegionId: (placement: Placement) => string;
|
|
4
4
|
export declare const getRegionEl: (ctx: Scope, placement: Placement) => HTMLElement | null;
|
|
5
5
|
export declare const getToastEls: (ctx: Scope, placement: Placement) => HTMLElement[];
|
package/dist/toast.dom.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Placement } from "./toast.types.js";
|
|
2
1
|
import { Scope } from "@zag-js/core";
|
|
2
|
+
import { Placement } from "./toast.types.js";
|
|
3
3
|
export declare const getRegionId: (placement: Placement) => string;
|
|
4
4
|
export declare const getRegionEl: (ctx: Scope, placement: Placement) => HTMLElement | null;
|
|
5
5
|
export declare const getToastEls: (ctx: Scope, placement: Placement) => HTMLElement[];
|
package/dist/toast.machine.js
CHANGED
|
@@ -2,11 +2,11 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
|
|
6
|
-
const require_toast_utils = require("./toast.utils.js");
|
|
5
|
+
let _zag_js_core = require("@zag-js/core");
|
|
7
6
|
let _zag_js_dom_query = require("@zag-js/dom-query");
|
|
8
7
|
let _zag_js_utils = require("@zag-js/utils");
|
|
9
|
-
|
|
8
|
+
const require_toast_dom = require("./toast.dom.js");
|
|
9
|
+
const require_toast_utils = require("./toast.utils.js");
|
|
10
10
|
// src/toast.machine.ts
|
|
11
11
|
const { not, and } = (0, _zag_js_core.createGuards)();
|
|
12
12
|
const machine = (0, _zag_js_core.createMachine)({
|
package/dist/toast.machine.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { getToastDuration, setHeight } from "./toast.utils.mjs";
|
|
1
|
+
import { createGuards, createMachine } from "@zag-js/core";
|
|
3
2
|
import { contains, raf } from "@zag-js/dom-query";
|
|
4
3
|
import { ensureProps, setRafTimeout } from "@zag-js/utils";
|
|
5
|
-
import {
|
|
4
|
+
import { getDescriptionEl, getRootEl, getTitleEl, observeContent } from "./toast.dom.mjs";
|
|
5
|
+
import { getToastDuration, setHeight } from "./toast.utils.mjs";
|
|
6
6
|
// src/toast.machine.ts
|
|
7
7
|
const { not, and } = createGuards();
|
|
8
8
|
const machine = createMachine({
|
package/dist/toast.types.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AnimationFrame } from "@zag-js/dom-query";
|
|
2
|
-
import { EventObject, Machine, Service } from "@zag-js/core";
|
|
3
1
|
import { CommonProperties, Direction, DirectionProperty, PropTypes, Required, RequiredBy } from "@zag-js/types";
|
|
2
|
+
import { EventObject, Machine, Service } from "@zag-js/core";
|
|
3
|
+
import { AnimationFrame } from "@zag-js/dom-query";
|
|
4
4
|
export type Type = "success" | "error" | "loading" | "info" | "warning" | (string & {});
|
|
5
5
|
export type ToastQueuePriority = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
|
|
6
6
|
export type Placement = "top-start" | "top" | "top-end" | "bottom-start" | "bottom" | "bottom-end";
|
package/dist/toast.utils.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Placement, ToastGroupSchema, ToastGroupService, ToastHeight, ToastSchema, Type } from "./toast.types.mjs";
|
|
2
1
|
import { Service } from "@zag-js/core";
|
|
3
2
|
import { Style } from "@zag-js/types";
|
|
3
|
+
import { Placement, ToastGroupSchema, ToastGroupService, ToastHeight, ToastSchema, Type } from "./toast.types.mjs";
|
|
4
4
|
export declare const defaultTimeouts: Record<Type, number>;
|
|
5
5
|
export declare function getToastDuration(duration: number | undefined, type: Type): number;
|
|
6
6
|
export declare function getGroupPlacementStyle(service: ToastGroupService, placement: Placement): Style;
|
package/dist/toast.utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Placement, ToastGroupSchema, ToastGroupService, ToastHeight, ToastSchema, Type } from "./toast.types.js";
|
|
2
|
-
import { Style } from "@zag-js/types";
|
|
3
1
|
import { Service } from "@zag-js/core";
|
|
2
|
+
import { Style } from "@zag-js/types";
|
|
3
|
+
import { Placement, ToastGroupSchema, ToastGroupService, ToastHeight, ToastSchema, Type } from "./toast.types.js";
|
|
4
4
|
export declare const defaultTimeouts: Record<Type, number>;
|
|
5
5
|
export declare function getToastDuration(duration: number | undefined, type: Type): number;
|
|
6
6
|
export declare function getGroupPlacementStyle(service: ToastGroupService, placement: Placement): Style;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/toast",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.49.0",
|
|
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.
|
|
33
|
-
"@zag-js/core": "1.
|
|
34
|
-
"@zag-js/dom-query": "1.
|
|
35
|
-
"@zag-js/dismissable": "1.
|
|
36
|
-
"@zag-js/utils": "1.
|
|
37
|
-
"@zag-js/types": "1.
|
|
32
|
+
"@zag-js/anatomy": "1.49.0",
|
|
33
|
+
"@zag-js/core": "1.49.0",
|
|
34
|
+
"@zag-js/dom-query": "1.49.0",
|
|
35
|
+
"@zag-js/dismissable": "1.49.0",
|
|
36
|
+
"@zag-js/utils": "1.49.0",
|
|
37
|
+
"@zag-js/types": "1.49.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"clean-package": "2.2.0"
|