Skip to content

Commit aada57e

Browse files
committed
migrate svelte v5 + shadcn-svelte_next
1 parent 17c5c1b commit aada57e

File tree

5 files changed

+22
-11
lines changed

5 files changed

+22
-11
lines changed

bun.lockb

-3.8 KB
Binary file not shown.

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,17 @@
2929
"lucide-svelte": "^0.469.0",
3030
"lz-string": "^1.5.0",
3131
"mode-watcher": "^0.5.0",
32-
"svelte-codemirror-editor": "^1.4.1",
3332
"svelte-file-dropzone": "^2.0.9",
3433
"svelte-sonner": "^0.3.28",
3534
"tailwind-merge": "^2.5.5",
3635
"tailwind-variants": "^0.3.0"
3736
},
3837
"devDependencies": {
3938
"@biomejs/biome": "1.9.2",
40-
"@svelte-put/shortcut": "^3.2.0",
39+
"@svelte-put/shortcut": "^4.1.0",
4140
"@sveltejs/adapter-static": "^3.0.8",
42-
"@sveltejs/kit": "^2.14.0",
43-
"@sveltejs/vite-plugin-svelte": "^4.0.4",
41+
"@sveltejs/kit": "^2.15.0",
42+
"@sveltejs/vite-plugin-svelte": "^5.0.3",
4443
"@tailwindcss/typography": "^0.5.15",
4544
"@tailwindcss/vite": "^4.0.0-beta.8",
4645
"@types/bun": "latest",

src/lib/components/ui/context-menu/context-menu-radio-group.svelte

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@
33
44
type $$Props = ContextMenuPrimitive.RadioGroupProps;
55
6-
export let value: $$Props["value"] = undefined;
6+
interface Props {
7+
value?: $$Props["value"];
8+
children?: import('svelte').Snippet;
9+
[key: string]: any
10+
}
11+
12+
let { value = $bindable(undefined), children, ...rest }: Props = $props();
713
</script>
814

9-
<ContextMenuPrimitive.RadioGroup {...$$restProps} bind:value>
10-
<slot />
15+
<ContextMenuPrimitive.RadioGroup {...rest} bind:value>
16+
{@render children?.()}
1117
</ContextMenuPrimitive.RadioGroup>
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
<script lang="ts">
22
import { Dialog as DialogPrimitive } from "bits-ui";
3+
interface Props {
4+
children?: import('svelte').Snippet;
5+
[key: string]: any
6+
}
7+
8+
let { children, ...rest }: Props = $props();
39
type $$Props = DialogPrimitive.PortalProps;
410
</script>
511

6-
<DialogPrimitive.Portal {...$$restProps}>
7-
<slot />
12+
<DialogPrimitive.Portal {...rest}>
13+
{@render children?.()}
814
</DialogPrimitive.Portal>

src/routes/+page.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { readTextFileOnTauri } from "./utils/read-text-file-on-tauri";
2323
import { writeTextFileOnTauri } from "./utils/write-text-file-on-tauri";
2424
2525
let inputText = $state("");
26-
let textarea!: Textarea;
26+
let textarea: Textarea;
2727
let open = $state(true);
2828
let fileInput = $state<HTMLInputElement | null>(null);
2929
let textFilePath = $state<string>("");
@@ -122,7 +122,7 @@ if (isTauriApp()) {
122122
/>
123123

124124
<main class="container h-screen">
125-
{#if (inputText === "" || !inputText) && !isTauriApp() }
125+
{#if (inputText === "" || !inputText) && !isTauriApp()}
126126
<Dialog.Root bind:open>
127127
<Dialog.Content>
128128
<Dialog.Header>

0 commit comments

Comments
 (0)