diff --git a/frontend/components.json b/frontend/components.json index f158e77..a0ade95 100644 --- a/frontend/components.json +++ b/frontend/components.json @@ -1,17 +1,17 @@ { - "$schema": "https://next.shadcn-svelte.com/schema.json", - "style": "default", - "tailwind": { - "config": "tailwind.config.mjs", - "css": "src/styles/app.css", - "baseColor": "slate" - }, - "aliases": { - "components": "$lib/components", - "utils": "$lib/utils", - "ui": "$lib/components/ui", - "hooks": "$lib/hooks" - }, - "typescript": true, - "registry": "https://next.shadcn-svelte.com/registry" + "$schema": "https://next.shadcn-svelte.com/schema.json", + "style": "default", + "tailwind": { + "config": "tailwind.config.mjs", + "css": "src/styles/app.css", + "baseColor": "slate" + }, + "aliases": { + "components": "$lib/components", + "utils": "$lib/utils", + "ui": "$lib/components/ui", + "hooks": "$lib/hooks" + }, + "typescript": true, + "registry": "https://next.shadcn-svelte.com/registry" } diff --git a/frontend/package.json b/frontend/package.json index a574c57..3cb9a33 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -21,10 +21,12 @@ "devDependencies": { "bits-ui": "0.22.0", "clsx": "^2.1.1", + "mode-watcher": "^0.5.1", "prettier": "^3.5.3", "prettier-plugin-astro": "^0.14.1", "prettier-plugin-svelte": "^3.3.3", "prettier-plugin-tailwindcss": "^0.6.11", + "svelte-sonner": "^0.3.28", "tailwind-merge": "^3.0.2", "tailwind-variants": "^1.0.0", "tailwindcss-animate": "^1.0.7", diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml index 8161afc..4b7ea0c 100644 --- a/frontend/pnpm-lock.yaml +++ b/frontend/pnpm-lock.yaml @@ -36,6 +36,9 @@ importers: clsx: specifier: ^2.1.1 version: 2.1.1 + mode-watcher: + specifier: ^0.5.1 + version: 0.5.1(svelte@5.22.6) prettier: specifier: ^3.5.3 version: 3.5.3 @@ -48,6 +51,9 @@ importers: prettier-plugin-tailwindcss: specifier: ^0.6.11 version: 0.6.11(prettier-plugin-astro@0.14.1)(prettier-plugin-svelte@3.3.3(prettier@3.5.3)(svelte@5.22.6))(prettier@3.5.3) + svelte-sonner: + specifier: ^0.3.28 + version: 0.3.28(svelte@5.22.6) tailwind-merge: specifier: ^3.0.2 version: 3.0.2 @@ -1395,6 +1401,11 @@ packages: resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} engines: {node: '>=16 || 14 >=14.17'} + mode-watcher@0.5.1: + resolution: {integrity: sha512-adEC6T7TMX/kzQlaO/MtiQOSFekZfQu4MC+lXyoceQG+U5sKpJWZ4yKXqw846ExIuWJgedkOIPqAYYRk/xHm+w==} + peerDependencies: + svelte: ^4.0.0 || ^5.0.0-next.1 + mrmime@2.0.1: resolution: {integrity: sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==} engines: {node: '>=10'} @@ -1860,6 +1871,11 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} + svelte-sonner@0.3.28: + resolution: {integrity: sha512-K3AmlySeFifF/cKgsYNv5uXqMVNln0NBAacOYgmkQStLa/UoU0LhfAACU6Gr+YYC8bOCHdVmFNoKuDbMEsppJg==} + peerDependencies: + svelte: ^3.0.0 || ^4.0.0 || ^5.0.0-next.1 + svelte2tsx@0.7.35: resolution: {integrity: sha512-z2lnOnrfb5nrlRfFQI8Qdz03xQqMHUfPj0j8l/fQuydrH89cCeN+v9jgDwK9GyMtdTRUkE7Neu9Gh+vfXJAfuQ==} peerDependencies: @@ -3921,6 +3937,10 @@ snapshots: minipass@7.1.2: {} + mode-watcher@0.5.1(svelte@5.22.6): + dependencies: + svelte: 5.22.6 + mrmime@2.0.1: {} ms@2.1.3: {} @@ -4400,6 +4420,10 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} + svelte-sonner@0.3.28(svelte@5.22.6): + dependencies: + svelte: 5.22.6 + svelte2tsx@0.7.35(svelte@5.22.6)(typescript@5.8.2): dependencies: dedent-js: 1.0.1 diff --git a/frontend/src/components/Container.svelte b/frontend/src/components/Container.svelte index 2f08b91..9292de2 100644 --- a/frontend/src/components/Container.svelte +++ b/frontend/src/components/Container.svelte @@ -62,7 +62,7 @@ -
+
diff --git a/frontend/src/components/Drag.svelte b/frontend/src/components/Drag.svelte index 0af3b25..8f27350 100644 --- a/frontend/src/components/Drag.svelte +++ b/frontend/src/components/Drag.svelte @@ -1,4 +1,6 @@ -
+
{#if tracker} + import { Toaster as Sonner, type ToasterProps as SonnerProps } from "svelte-sonner"; + import { mode } from "mode-watcher"; + + let restProps: SonnerProps = $props(); + + + diff --git a/frontend/src/pages/index.astro b/frontend/src/pages/index.astro index 08719cb..81cbc23 100644 --- a/frontend/src/pages/index.astro +++ b/frontend/src/pages/index.astro @@ -1,6 +1,7 @@ --- import Container from "../components/Container.svelte"; import "$lib/styles/app.css"; +import { Toaster } from "$lib/components/ui/sonner/index.js"; --- @@ -15,6 +16,7 @@ import "$lib/styles/app.css"; Followspot +