@zag-js/toast 0.0.0-dev-20220627213436 → 0.0.0-dev-20220628115342
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.js +2 -12
- package/dist/index.mjs +2 -12
- package/dist/toast-group.connect.d.ts +2 -2
- package/dist/toast.connect.d.ts +2 -2
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -80,16 +80,6 @@ function warn(...a) {
|
|
|
80
80
|
// src/toast-group.connect.ts
|
|
81
81
|
var import_core = require("@zag-js/core");
|
|
82
82
|
|
|
83
|
-
// ../../types/dist/index.mjs
|
|
84
|
-
function createNormalizer(fn) {
|
|
85
|
-
return new Proxy({}, {
|
|
86
|
-
get() {
|
|
87
|
-
return fn;
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
var normalizeProp = createNormalizer((v) => v);
|
|
92
|
-
|
|
93
83
|
// src/toast.dom.ts
|
|
94
84
|
var dom = {
|
|
95
85
|
getDoc: (ctx) => {
|
|
@@ -178,7 +168,7 @@ function getGroupPlacementStyle(ctx, placement) {
|
|
|
178
168
|
|
|
179
169
|
// src/toast-group.connect.ts
|
|
180
170
|
var toaster = {};
|
|
181
|
-
function groupConnect(state, send, normalize
|
|
171
|
+
function groupConnect(state, send, normalize) {
|
|
182
172
|
const group2 = {
|
|
183
173
|
count: state.context.count,
|
|
184
174
|
toasts: state.context.toasts,
|
|
@@ -574,7 +564,7 @@ function groupMachine(ctx = {}) {
|
|
|
574
564
|
}
|
|
575
565
|
|
|
576
566
|
// src/toast.connect.ts
|
|
577
|
-
function connect(state, send, normalize
|
|
567
|
+
function connect(state, send, normalize) {
|
|
578
568
|
const isVisible = state.hasTag("visible");
|
|
579
569
|
const isPaused = state.hasTag("paused");
|
|
580
570
|
const isUpdating = state.hasTag("updating");
|
package/dist/index.mjs
CHANGED
|
@@ -55,16 +55,6 @@ function warn(...a) {
|
|
|
55
55
|
// src/toast-group.connect.ts
|
|
56
56
|
import { subscribe } from "@zag-js/core";
|
|
57
57
|
|
|
58
|
-
// ../../types/dist/index.mjs
|
|
59
|
-
function createNormalizer(fn) {
|
|
60
|
-
return new Proxy({}, {
|
|
61
|
-
get() {
|
|
62
|
-
return fn;
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
var normalizeProp = createNormalizer((v) => v);
|
|
67
|
-
|
|
68
58
|
// src/toast.dom.ts
|
|
69
59
|
var dom = {
|
|
70
60
|
getDoc: (ctx) => {
|
|
@@ -153,7 +143,7 @@ function getGroupPlacementStyle(ctx, placement) {
|
|
|
153
143
|
|
|
154
144
|
// src/toast-group.connect.ts
|
|
155
145
|
var toaster = {};
|
|
156
|
-
function groupConnect(state, send, normalize
|
|
146
|
+
function groupConnect(state, send, normalize) {
|
|
157
147
|
const group2 = {
|
|
158
148
|
count: state.context.count,
|
|
159
149
|
toasts: state.context.toasts,
|
|
@@ -549,7 +539,7 @@ function groupMachine(ctx = {}) {
|
|
|
549
539
|
}
|
|
550
540
|
|
|
551
541
|
// src/toast.connect.ts
|
|
552
|
-
function connect(state, send, normalize
|
|
542
|
+
function connect(state, send, normalize) {
|
|
553
543
|
const isVisible = state.hasTag("visible");
|
|
554
544
|
const isPaused = state.hasTag("paused");
|
|
555
545
|
const isUpdating = state.hasTag("updating");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { NormalizeProps, PropTypes } from "@zag-js/types";
|
|
2
2
|
import { GroupMachineContext, GroupProps, GroupSend, GroupState, Placement, PromiseOptions, Toaster, Options } from "./toast.types";
|
|
3
3
|
export declare let toaster: Toaster;
|
|
4
|
-
export declare function groupConnect<T extends PropTypes
|
|
4
|
+
export declare function groupConnect<T extends PropTypes>(state: GroupState, send: GroupSend, normalize: NormalizeProps<T>): {
|
|
5
5
|
count: number;
|
|
6
6
|
toasts: import("./toast.types").Service[];
|
|
7
7
|
toastsByPlacement: Partial<Record<Placement, import("./toast.types").Service[]>>;
|
package/dist/toast.connect.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { NormalizeProps, PropTypes } from "@zag-js/types";
|
|
2
2
|
import type { Send, State } from "./toast.types";
|
|
3
|
-
export declare function connect<T extends PropTypes
|
|
3
|
+
export declare function connect<T extends PropTypes>(state: State, send: Send, normalize: NormalizeProps<T>): {
|
|
4
4
|
type: import("./toast.types").Type;
|
|
5
5
|
title: string;
|
|
6
6
|
placement: import("./toast.types").Placement;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/toast",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20220628115342",
|
|
4
4
|
"description": "Core logic for the toast widget implemented as a state machine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"url": "https://github.com/chakra-ui/zag/issues"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@zag-js/core": "0.0.0-dev-
|
|
33
|
-
"@zag-js/dom-utils": "0.0.0-dev-
|
|
34
|
-
"@zag-js/types": "0.
|
|
32
|
+
"@zag-js/core": "0.0.0-dev-20220628115342",
|
|
33
|
+
"@zag-js/dom-utils": "0.0.0-dev-20220628115342",
|
|
34
|
+
"@zag-js/types": "0.0.0-dev-20220628115342",
|
|
35
35
|
"@zag-js/utils": "0.1.2"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|