Fixing svelte flash message for Svelte 5.

This commit is contained in:
Bradley Shellnut 2025-01-13 13:59:13 -08:00
parent 7ef4bd14f1
commit 1620857949
3 changed files with 277 additions and 228 deletions

View file

@ -43,23 +43,23 @@
"@sveltejs/kit": "^2.15.2", "@sveltejs/kit": "^2.15.2",
"@sveltejs/vite-plugin-svelte": "^5.0.3", "@sveltejs/vite-plugin-svelte": "^5.0.3",
"@types/cookie": "^1.0.0", "@types/cookie": "^1.0.0",
"@types/node": "^22.10.5", "@types/node": "^22.10.6",
"@types/pg": "^8.11.10", "@types/pg": "^8.11.10",
"@types/pg-pool": "^2.0.6", "@types/pg-pool": "^2.0.6",
"@types/qrcode": "^1.5.5", "@types/qrcode": "^1.5.5",
"arctic": "^1.9.2", "arctic": "^1.9.2",
"autoprefixer": "^10.4.20", "autoprefixer": "^10.4.20",
"bits-ui": "1.0.0-next.77", "bits-ui": "1.0.0-next.77",
"bullmq": "^5.34.7", "bullmq": "^5.34.9",
"clsx": "^2.1.1", "clsx": "^2.1.1",
"drizzle-kit": "^0.30.1", "drizzle-kit": "^0.30.1",
"formsnap": "^2.0.0", "formsnap": "^2.0.0",
"lucide-svelte": "^0.469.0", "lucide-svelte": "^0.471.0",
"mode-watcher": "^0.5.0", "mode-watcher": "^0.5.0",
"storybook": "^8.4.7", "storybook": "^8.4.7",
"svelte": "^5.16.6", "svelte": "^5.17.3",
"svelte-check": "^4.0.0", "svelte-check": "^4.1.4",
"svelte-meta-tags": "^4.0.4", "svelte-meta-tags": "^4.1.0",
"svelte-preprocess": "^6.0.3", "svelte-preprocess": "^6.0.3",
"svelte-sequential-preprocessor": "^2.0.2", "svelte-sequential-preprocessor": "^2.0.2",
"svelte-sonner": "^0.3.28", "svelte-sonner": "^0.3.28",
@ -70,7 +70,7 @@
"tailwindcss": "^3.4.9", "tailwindcss": "^3.4.9",
"tailwindcss-animate": "^1.0.7", "tailwindcss-animate": "^1.0.7",
"tsx": "^4.19.2", "tsx": "^4.19.2",
"typescript": "^5.0.0", "typescript": "^5.7.3",
"vite": "^6.0.7", "vite": "^6.0.7",
"vitest": "^2.0.4", "vitest": "^2.0.4",
"zod": "^3.24.1" "zod": "^3.24.1"
@ -80,7 +80,7 @@
"@hono/swagger-ui": "^0.5.0", "@hono/swagger-ui": "^0.5.0",
"@hono/zod-openapi": "^0.18.3", "@hono/zod-openapi": "^0.18.3",
"@hono/zod-validator": "^0.4.2", "@hono/zod-validator": "^0.4.2",
"@inlang/paraglide-sveltekit": "^0.15.4", "@inlang/paraglide-sveltekit": "^0.15.5",
"@internationalized/date": "^3.5.5", "@internationalized/date": "^3.5.5",
"@needle-di/core": "^0.8.4", "@needle-di/core": "^0.8.4",
"@oslojs/binary": "^1.0.0", "@oslojs/binary": "^1.0.0",
@ -94,7 +94,7 @@
"@tailwindcss/container-queries": "^0.1.1", "@tailwindcss/container-queries": "^0.1.1",
"@tailwindcss/forms": "^0.5.10", "@tailwindcss/forms": "^0.5.10",
"@tailwindcss/typography": "^0.5.16", "@tailwindcss/typography": "^0.5.16",
"arctic": "^3.1.0", "arctic": "^3.1.1",
"argon2": "^0.41.1", "argon2": "^0.41.1",
"dayjs": "^1.11.13", "dayjs": "^1.11.13",
"dotenv": "^16.4.7", "dotenv": "^16.4.7",

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
<script> <script>
import '../app.css'; import '../app.css';
import { page as pageStore } from '$app/stores'; import { page } from '$app/state';
import { getFlash } from 'sveltekit-flash-message'; import { getFlash } from 'sveltekit-flash-message';
import { ModeWatcher } from 'mode-watcher'; import { ModeWatcher } from 'mode-watcher';
import { Toaster } from "$lib/components/ui/sonner"; import { Toaster } from "$lib/components/ui/sonner";
@ -12,7 +12,7 @@
const { data, children } = $props(); const { data, children } = $props();
const flash = getFlash(pageStore, { const flash = getFlash(page, {
clearOnNavigate: true, clearOnNavigate: true,
clearAfterMs: 3000, clearAfterMs: 3000,
clearArray: true, clearArray: true,