varsel 0.5.0 → 0.5.2
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/VarselItem.svelte +1 -1
- package/dist/core/types.d.ts +1 -1
- package/package.json +6 -4
package/dist/VarselItem.svelte
CHANGED
|
@@ -68,7 +68,7 @@ let id = $derived(toast.id);
|
|
|
68
68
|
let title = $derived(toast.title);
|
|
69
69
|
let description = $derived(toast.description);
|
|
70
70
|
let variant = $derived(toast.variant || "default");
|
|
71
|
-
let duration = $derived(toast.duration
|
|
71
|
+
let duration = $derived(toast.duration ?? defaultDuration);
|
|
72
72
|
let action = $derived(toast.action);
|
|
73
73
|
let isLoading = $derived(toast.isLoading || false);
|
|
74
74
|
let index = $derived(toast.index);
|
package/dist/core/types.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export interface ToastData extends VariantProps<typeof toastContainerVariants> {
|
|
|
17
17
|
className?: string;
|
|
18
18
|
/**
|
|
19
19
|
* Duration in milliseconds before the toast automatically closes.
|
|
20
|
-
* Defaults to 5000ms. Set to `Infinity` to keep open indefinitely.
|
|
20
|
+
* Defaults to 5000ms. Set to `0` or `Infinity` to keep open indefinitely.
|
|
21
21
|
*/
|
|
22
22
|
duration?: number;
|
|
23
23
|
/** Whether the toast is in a loading state. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "varsel",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "Headless yet opinionated toast notifications for Svelte apps.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,11 +36,13 @@
|
|
|
36
36
|
"./package.json": "./package.json"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
|
-
"build:css": "npx @tailwindcss/cli -i ./src/lib/styles.css -o ./dist/styles.css --
|
|
39
|
+
"build:css": "npx @tailwindcss/cli -i ./src/lib/styles.css -o ./dist/styles.css --minify",
|
|
40
|
+
"build:css:watch": "npx @tailwindcss/cli -i ./src/lib/styles.css -o ./dist/styles.css --watch --minify",
|
|
40
41
|
"build": "bun run build:css && svelte-package",
|
|
41
42
|
"check": "svelte-check --tsconfig ./tsconfig.json",
|
|
42
|
-
"dev": "svelte-package --watch",
|
|
43
|
-
"lint": "tsc -p tsconfig.json --noEmit"
|
|
43
|
+
"dev": "bun run build:css:watch & svelte-package --watch",
|
|
44
|
+
"lint": "tsc -p tsconfig.json --noEmit",
|
|
45
|
+
"prepublishOnly": "bun run build"
|
|
44
46
|
},
|
|
45
47
|
"dependencies": {
|
|
46
48
|
"class-variance-authority": "^0.7.1"
|