From f92d9d42352ea97bda505fc1f22c0dd60020808d Mon Sep 17 00:00:00 2001 From: SHYAKA Davis <87414827+shyakadavis@users.noreply.github.com> Date: Tue, 4 Feb 2025 17:21:47 +0200 Subject: [PATCH] chore: update runed dependency to version 0.23.2 and refactor MediaQuery usage (#87) Co-authored-by: Davis SHYAKA <87414827+davis-shyaka@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 14 ++------------ src/lib/components/shared/command/command.svelte | 4 ++-- src/lib/components/ui/modal/index.ts | 2 +- src/lib/components/ui/modal/modal-content.svelte | 2 +- .../components/ui/modal/modal-description.svelte | 2 +- src/lib/components/ui/modal/modal-footer.svelte | 2 +- src/lib/components/ui/modal/modal-header.svelte | 2 +- src/lib/components/ui/modal/modal-title.svelte | 2 +- src/lib/components/ui/modal/modal-trigger.svelte | 2 +- src/lib/components/ui/modal/modal.svelte | 2 +- 11 files changed, 13 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index 047996a..73c01b8 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "prettier": "^3.4.2", "prettier-plugin-svelte": "^3.3.3", "prettier-plugin-tailwindcss": "^0.6.11", - "runed": "^0.15.4", + "runed": "^0.23.2", "shiki": "^2.3.0", "svelte": "5.19.7", "svelte-check": "^4.1.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ae397f0..5b0ab96 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -66,8 +66,8 @@ importers: specifier: ^0.6.11 version: 0.6.11(prettier-plugin-svelte@3.3.3(prettier@3.4.2)(svelte@5.19.7))(prettier@3.4.2) runed: - specifier: ^0.15.4 - version: 0.15.4(svelte@5.19.7) + specifier: ^0.23.2 + version: 0.23.2(svelte@5.19.7) shiki: specifier: ^2.3.0 version: 2.3.0 @@ -1774,11 +1774,6 @@ packages: run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} - runed@0.15.4: - resolution: {integrity: sha512-kmbpstUd7v2FdlBM+MT78IyuOVd38tq/e7MHvVb0fnVCsPSPMD/m2Xh+wUhzg9qCJgxRjBbIKu68DlH/x5VXJA==} - peerDependencies: - svelte: ^5.0.0-next.1 - runed@0.23.2: resolution: {integrity: sha512-AhHCb5/B+YQW6ar1pzhGQOQy+byfjCH63ofuhrexSWwQKhC0EbQ60Z/wMYwETLo3ZubhwlNryxBt0seOMOrVFQ==} peerDependencies: @@ -3957,11 +3952,6 @@ snapshots: dependencies: queue-microtask: 1.2.3 - runed@0.15.4(svelte@5.19.7): - dependencies: - esm-env: 1.2.2 - svelte: 5.19.7 - runed@0.23.2(svelte@5.19.7): dependencies: esm-env: 1.2.2 diff --git a/src/lib/components/shared/command/command.svelte b/src/lib/components/shared/command/command.svelte index 883d3f4..62f8306 100644 --- a/src/lib/components/shared/command/command.svelte +++ b/src/lib/components/shared/command/command.svelte @@ -6,7 +6,7 @@ import * as Drawer from '$lib/components/ui/drawer'; import { aside_items } from '$lib/config/sitemap'; import { command_open_state } from '$lib/stores'; - import { MediaQuery } from 'runed'; + import { MediaQuery } from 'svelte/reactivity'; const is_desktop = new MediaQuery('(min-width: 640px)'); @@ -20,7 +20,7 @@ -{#if is_desktop.matches} +{#if is_desktop.current} diff --git a/src/lib/components/ui/modal/index.ts b/src/lib/components/ui/modal/index.ts index 59b8a5e..b8fa49a 100644 --- a/src/lib/components/ui/modal/index.ts +++ b/src/lib/components/ui/modal/index.ts @@ -1,4 +1,4 @@ -import { MediaQuery } from 'runed'; +import { MediaQuery } from 'svelte/reactivity'; import { writable } from 'svelte/store'; import ModalContent from './modal-content.svelte'; import ModalDescription from './modal-description.svelte'; diff --git a/src/lib/components/ui/modal/modal-content.svelte b/src/lib/components/ui/modal/modal-content.svelte index b6493c8..d7782bd 100644 --- a/src/lib/components/ui/modal/modal-content.svelte +++ b/src/lib/components/ui/modal/modal-content.svelte @@ -25,7 +25,7 @@ }); -{#if is_desktop.matches} +{#if is_desktop.current} -{#if is_desktop.matches} +{#if is_desktop.current} {@render children?.()} diff --git a/src/lib/components/ui/modal/modal-footer.svelte b/src/lib/components/ui/modal/modal-footer.svelte index 19b1e68..f1ad429 100644 --- a/src/lib/components/ui/modal/modal-footer.svelte +++ b/src/lib/components/ui/modal/modal-footer.svelte @@ -24,7 +24,7 @@ }); -{#if is_desktop.matches} +{#if is_desktop.current} diff --git a/src/lib/components/ui/modal/modal-header.svelte b/src/lib/components/ui/modal/modal-header.svelte index e55ba87..72ee27f 100644 --- a/src/lib/components/ui/modal/modal-header.svelte +++ b/src/lib/components/ui/modal/modal-header.svelte @@ -12,7 +12,7 @@ let { children }: Props = $props(); -{#if is_desktop.matches} +{#if is_desktop.current} -{#if is_desktop.matches} +{#if is_desktop.current} {@render children?.()} diff --git a/src/lib/components/ui/modal/modal-trigger.svelte b/src/lib/components/ui/modal/modal-trigger.svelte index a069bbc..4dd7141 100644 --- a/src/lib/components/ui/modal/modal-trigger.svelte +++ b/src/lib/components/ui/modal/modal-trigger.svelte @@ -14,7 +14,7 @@ -{#if is_desktop.matches} +{#if is_desktop.current} {#if child_prop} {#snippet child({ props })} diff --git a/src/lib/components/ui/modal/modal.svelte b/src/lib/components/ui/modal/modal.svelte index c0a5fd1..3d5b070 100644 --- a/src/lib/components/ui/modal/modal.svelte +++ b/src/lib/components/ui/modal/modal.svelte @@ -12,7 +12,7 @@ let { open = $bindable(false), children }: Props = $props(); -{#if is_desktop.matches} +{#if is_desktop.current} {@render children?.()}