From fab181d4b96803e0d1c4724fa01659be8271232c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleksa=20Siri=C5=A1ki?= <31509435+aleksasiriski@users.noreply.github.com> Date: Fri, 12 Apr 2024 10:43:44 +0200 Subject: [PATCH 1/3] fix(darktheme): switch to mode-watcher --- package.json | 1 + pnpm-lock.yaml | 11 ++++++++ src/lib/components/DarkModeToggle.svelte | 35 +++++------------------- src/routes/+layout.svelte | 17 ++---------- 4 files changed, 21 insertions(+), 43 deletions(-) diff --git a/package.json b/package.json index d8f517c0..840e7e92 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "eslint": "^8.57.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-svelte": "^2.36.0", + "mode-watcher": "^0.3.0", "postcss": "^8.4.38", "prettier": "^3.2.5", "prettier-plugin-svelte": "^3.2.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2a3bea0e..35f9da0d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -35,6 +35,9 @@ devDependencies: eslint-plugin-svelte: specifier: ^2.36.0 version: 2.36.0(eslint@8.57.0)(svelte@4.2.13) + mode-watcher: + specifier: ^0.3.0 + version: 0.3.0(svelte@4.2.13) postcss: specifier: ^8.4.38 version: 8.4.38 @@ -2253,6 +2256,14 @@ packages: hasBin: true dev: true + /mode-watcher@0.3.0(svelte@4.2.13): + resolution: {integrity: sha512-k8jjuTx94HaaRKWO6JDf8wL761hFatrTIHJKl+E+3JWcnv+GnMBH062zcLsy0lbCI3n7RZxxHaWi66auFnUO4g==} + peerDependencies: + svelte: ^4.0.0 + dependencies: + svelte: 4.2.13 + dev: true + /mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} diff --git a/src/lib/components/DarkModeToggle.svelte b/src/lib/components/DarkModeToggle.svelte index b671fd33..8ec90f60 100644 --- a/src/lib/components/DarkModeToggle.svelte +++ b/src/lib/components/DarkModeToggle.svelte @@ -1,35 +1,14 @@ -