Skip to content

Commit 22aa978

Browse files
authored
chore(next): runed MediaQuery -> svelte MediaQuery (#1569)
1 parent 1ef2cb1 commit 22aa978

9 files changed

+146
-131
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"prettier-plugin-svelte": "^3.2.7",
5151
"prettier-plugin-tailwindcss": "^0.6.8",
5252
"pretty-quick": "^4.0.0",
53-
"svelte": "^5.0.0-next.264",
53+
"svelte": "^5.15.0",
5454
"svelte-eslint-parser": "^0.42.0",
5555
"typescript": "^5.6.3",
5656
"typescript-eslint": "^8.10.0"

pnpm-lock.yaml

+130-114
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sites/docs/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,8 @@
6868
"remark-code-import": "^1.2.0",
6969
"remark-gfm": "^4.0.0",
7070
"rimraf": "^4.4.1",
71-
"runed": "^0.15.2",
7271
"shiki": "^1.2.1",
73-
"svelte": "^5.0.0",
72+
"svelte": "^5.15.0",
7473
"svelte-check": "^4.0.5",
7574
"svelte-local-storage-store": "^0.6.4",
7675
"svelte-persisted-store": "^0.11.0",

sites/docs/src/lib/registry/default/example/breadcrumb-responsive.svelte

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts">
2-
import { MediaQuery } from "runed";
2+
import { MediaQuery } from "svelte/reactivity";
33
import * as Breadcrumb from "$lib/registry/default/ui/breadcrumb/index.js";
44
import * as Drawer from "$lib/registry/default/ui/drawer/index.js";
55
import * as DropdownMenu from "$lib/registry/default/ui/dropdown-menu/index.js";
@@ -30,7 +30,7 @@
3030
<Breadcrumb.Separator />
3131
{#if items.length > ITEMS_TO_DISPLAY}
3232
<Breadcrumb.Item>
33-
{#if isDesktop.matches}
33+
{#if isDesktop.current}
3434
<DropdownMenu.Root bind:open>
3535
<DropdownMenu.Trigger
3636
class="flex items-center gap-1"

sites/docs/src/lib/registry/default/example/drawer-dialog.svelte

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts">
2-
import { MediaQuery } from "runed";
2+
import { MediaQuery } from "svelte/reactivity";
33
import * as Dialog from "$lib/registry/default/ui/dialog/index.js";
44
import * as Drawer from "$lib/registry/default/ui/drawer/index.js";
55
import { Input } from "$lib/registry/default/ui/input/index.js";
@@ -10,7 +10,7 @@
1010
const isDesktop = new MediaQuery("(min-width: 768px)");
1111
</script>
1212

13-
{#if isDesktop.matches}
13+
{#if isDesktop.current}
1414
<Dialog.Root bind:open>
1515
<Dialog.Trigger class={buttonVariants({ variant: "outline" })}>Edit Profile</Dialog.Trigger>
1616
<Dialog.Content class="sm:max-w-[425px]">

sites/docs/src/lib/registry/default/example/pagination-demo.svelte

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<script lang="ts">
22
import ChevronLeft from "lucide-svelte/icons/chevron-left";
33
import ChevronRight from "lucide-svelte/icons/chevron-right";
4-
import { MediaQuery } from "runed";
4+
import { MediaQuery } from "svelte/reactivity";
55
import * as Pagination from "$lib/registry/default/ui/pagination/index.js";
66
77
const isDesktop = new MediaQuery("(min-width: 768px)");
88
99
const count = 20;
1010
11-
const perPage = $derived(isDesktop.matches ? 3 : 8);
12-
const siblingCount = $derived(isDesktop.matches ? 1 : 0);
11+
const perPage = $derived(isDesktop.current ? 3 : 8);
12+
const siblingCount = $derived(isDesktop.current ? 1 : 0);
1313
</script>
1414

1515
<Pagination.Root {count} {perPage} {siblingCount}>

sites/docs/src/lib/registry/new-york/example/breadcrumb-responsive.svelte

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts">
2-
import { MediaQuery } from "runed";
2+
import { MediaQuery } from "svelte/reactivity";
33
import * as Breadcrumb from "$lib/registry/new-york/ui/breadcrumb/index.js";
44
import * as Drawer from "$lib/registry/new-york/ui/drawer/index.js";
55
import * as DropdownMenu from "$lib/registry/new-york/ui/dropdown-menu/index.js";
@@ -30,7 +30,7 @@
3030
<Breadcrumb.Separator />
3131
{#if items.length > ITEMS_TO_DISPLAY}
3232
<Breadcrumb.Item>
33-
{#if isDesktop.matches}
33+
{#if isDesktop.current}
3434
<DropdownMenu.Root bind:open>
3535
<DropdownMenu.Trigger
3636
class="flex items-center gap-1"

sites/docs/src/lib/registry/new-york/example/drawer-dialog.svelte

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts">
2-
import { MediaQuery } from "runed";
2+
import { MediaQuery } from "svelte/reactivity";
33
import * as Dialog from "$lib/registry/new-york/ui/dialog/index.js";
44
import * as Drawer from "$lib/registry/new-york/ui/drawer/index.js";
55
import { Input } from "$lib/registry/new-york/ui/input/index.js";
@@ -10,7 +10,7 @@
1010
const isDesktop = new MediaQuery("(min-width: 768px)");
1111
</script>
1212

13-
{#if isDesktop.matches}
13+
{#if isDesktop.current}
1414
<Dialog.Root bind:open>
1515
<Dialog.Trigger class={buttonVariants({ variant: "outline" })}>Edit Profile</Dialog.Trigger>
1616
<Dialog.Content class="sm:max-w-[425px]">

sites/docs/src/lib/registry/new-york/example/pagination-demo.svelte

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<script lang="ts">
2-
import { MediaQuery } from "runed";
2+
import { MediaQuery } from "svelte/reactivity";
33
import * as Pagination from "$lib/registry/new-york/ui/pagination/index.js";
44
55
const isDesktop = new MediaQuery("(min-width: 768px)");
66
77
const count = 20;
8-
const perPage = $derived(isDesktop.matches ? 3 : 8);
9-
const siblingCount = $derived(isDesktop.matches ? 1 : 0);
8+
const perPage = $derived(isDesktop.current ? 3 : 8);
9+
const siblingCount = $derived(isDesktop.current ? 1 : 0);
1010
</script>
1111

1212
<Pagination.Root {count} {perPage} {siblingCount}>

0 commit comments

Comments
 (0)