@zag-js/toast 0.1.14 → 0.1.16
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 +1 -1
- package/dist/index.js +1 -15
- package/dist/index.mjs +1 -15
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -181,11 +181,11 @@ declare function connect<T extends PropTypes>(state: State, send: Send, normaliz
|
|
|
181
181
|
placement: Placement;
|
|
182
182
|
isVisible: boolean;
|
|
183
183
|
isPaused: boolean;
|
|
184
|
+
isRtl: boolean;
|
|
184
185
|
pause(): void;
|
|
185
186
|
resume(): void;
|
|
186
187
|
dismiss(): void;
|
|
187
188
|
rootProps: T["element"];
|
|
188
|
-
progressbarProps: T["element"];
|
|
189
189
|
titleProps: T["element"];
|
|
190
190
|
descriptionProps: T["element"];
|
|
191
191
|
closeButtonProps: T["button"];
|
package/dist/index.js
CHANGED
|
@@ -556,9 +556,6 @@ function groupMachine(ctx) {
|
|
|
556
556
|
function connect(state, send, normalize) {
|
|
557
557
|
const isVisible = state.hasTag("visible");
|
|
558
558
|
const isPaused = state.hasTag("paused");
|
|
559
|
-
const isUpdating = state.hasTag("updating");
|
|
560
|
-
const isRtl = state.context.dir === "rtl";
|
|
561
|
-
const type = state.context.type;
|
|
562
559
|
const pauseOnInteraction = state.context.pauseOnInteraction;
|
|
563
560
|
const placement = state.context.placement;
|
|
564
561
|
return {
|
|
@@ -568,6 +565,7 @@ function connect(state, send, normalize) {
|
|
|
568
565
|
placement,
|
|
569
566
|
isVisible,
|
|
570
567
|
isPaused,
|
|
568
|
+
isRtl: state.context.dir === "rtl",
|
|
571
569
|
pause() {
|
|
572
570
|
send("PAUSE");
|
|
573
571
|
},
|
|
@@ -621,18 +619,6 @@ function connect(state, send, normalize) {
|
|
|
621
619
|
}
|
|
622
620
|
}
|
|
623
621
|
}),
|
|
624
|
-
progressbarProps: normalize.element({
|
|
625
|
-
"data-part": "progressbar",
|
|
626
|
-
"data-type": state.context.type,
|
|
627
|
-
style: {
|
|
628
|
-
opacity: isVisible ? 1 : 0,
|
|
629
|
-
transformOrigin: isRtl ? "right" : "left",
|
|
630
|
-
animationName: isUpdating || type === "loading" ? "none" : void 0,
|
|
631
|
-
animationPlayState: isPaused ? "paused" : "running",
|
|
632
|
-
animationDuration: `${state.context.duration}ms`,
|
|
633
|
-
animationFillMode: isUpdating ? void 0 : "forwards"
|
|
634
|
-
}
|
|
635
|
-
}),
|
|
636
622
|
titleProps: normalize.element({
|
|
637
623
|
"data-part": "title",
|
|
638
624
|
id: dom.getTitleId(state.context)
|
package/dist/index.mjs
CHANGED
|
@@ -527,9 +527,6 @@ function groupMachine(ctx) {
|
|
|
527
527
|
function connect(state, send, normalize) {
|
|
528
528
|
const isVisible = state.hasTag("visible");
|
|
529
529
|
const isPaused = state.hasTag("paused");
|
|
530
|
-
const isUpdating = state.hasTag("updating");
|
|
531
|
-
const isRtl = state.context.dir === "rtl";
|
|
532
|
-
const type = state.context.type;
|
|
533
530
|
const pauseOnInteraction = state.context.pauseOnInteraction;
|
|
534
531
|
const placement = state.context.placement;
|
|
535
532
|
return {
|
|
@@ -539,6 +536,7 @@ function connect(state, send, normalize) {
|
|
|
539
536
|
placement,
|
|
540
537
|
isVisible,
|
|
541
538
|
isPaused,
|
|
539
|
+
isRtl: state.context.dir === "rtl",
|
|
542
540
|
pause() {
|
|
543
541
|
send("PAUSE");
|
|
544
542
|
},
|
|
@@ -592,18 +590,6 @@ function connect(state, send, normalize) {
|
|
|
592
590
|
}
|
|
593
591
|
}
|
|
594
592
|
}),
|
|
595
|
-
progressbarProps: normalize.element({
|
|
596
|
-
"data-part": "progressbar",
|
|
597
|
-
"data-type": state.context.type,
|
|
598
|
-
style: {
|
|
599
|
-
opacity: isVisible ? 1 : 0,
|
|
600
|
-
transformOrigin: isRtl ? "right" : "left",
|
|
601
|
-
animationName: isUpdating || type === "loading" ? "none" : void 0,
|
|
602
|
-
animationPlayState: isPaused ? "paused" : "running",
|
|
603
|
-
animationDuration: `${state.context.duration}ms`,
|
|
604
|
-
animationFillMode: isUpdating ? void 0 : "forwards"
|
|
605
|
-
}
|
|
606
|
-
}),
|
|
607
593
|
titleProps: normalize.element({
|
|
608
594
|
"data-part": "title",
|
|
609
595
|
id: dom.getTitleId(state.context)
|
package/package.json
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/toast",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"description": "Core logic for the toast widget implemented as a state machine",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
5
8
|
"keywords": [
|
|
6
9
|
"js",
|
|
7
10
|
"machine",
|
|
@@ -14,9 +17,6 @@
|
|
|
14
17
|
"author": "Segun Adebayo <sage@adebayosegun.com>",
|
|
15
18
|
"homepage": "https://github.com/chakra-ui/zag#readme",
|
|
16
19
|
"license": "MIT",
|
|
17
|
-
"main": "dist/index.js",
|
|
18
|
-
"types": "dist/index.d.ts",
|
|
19
|
-
"module": "dist/index.mjs",
|
|
20
20
|
"repository": "https://github.com/chakra-ui/zag/tree/main/packages/toast",
|
|
21
21
|
"sideEffects": false,
|
|
22
22
|
"files": [
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
"url": "https://github.com/chakra-ui/zag/issues"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@zag-js/core": "0.1.
|
|
33
|
-
"@zag-js/types": "0.2.
|
|
32
|
+
"@zag-js/core": "0.1.12",
|
|
33
|
+
"@zag-js/types": "0.2.7"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@zag-js/dom-utils": "0.1.
|
|
37
|
-
"@zag-js/utils": "0.1.
|
|
36
|
+
"@zag-js/dom-utils": "0.1.13",
|
|
37
|
+
"@zag-js/utils": "0.1.6"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"build-fast": "tsup src/index.ts --format=esm,cjs",
|