chore: upgrade dependencies and migrate to Svelte 5

This commit is contained in:
Huakun Shen 2025-01-26 22:17:18 -05:00
parent 9c3c7719b6
commit 863cfff6a9
No known key found for this signature in database
8 changed files with 39 additions and 39 deletions

BIN
bun.lockb

Binary file not shown.

View File

@ -72,39 +72,39 @@
"format": "prettier --write ."
},
"dependencies": {
"@kksh/api": "^0.0.48",
"@kksh/svelte": "0.1.4",
"@kksh/api": "^0.0.53",
"@kksh/svelte5": "0.1.14",
"clsx": "^2.1.1",
"dayjs": "^1.11.11",
"jose": "^5.6.3",
"lucide-svelte": "^0.416.0",
"mode-watcher": "^0.4.0",
"tailwind-merge": "^2.4.0",
"tailwind-variants": "^0.2.1",
"valibot": "^0.36.0"
"dayjs": "^1.11.13",
"jose": "^5.9.6",
"lucide-svelte": "^0.474.0",
"mode-watcher": "^0.5.1",
"tailwind-merge": "^2.6.0",
"tailwind-variants": "^0.3.1",
"valibot": "^1.0.0-beta.14"
},
"devDependencies": {
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/adapter-static": "^3.0.2",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"@tailwindcss/typography": "^0.5.13",
"@types/eslint": "^9.6.0",
"autoprefixer": "^10.4.19",
"eslint": "^9.0.0",
"@sveltejs/adapter-auto": "^3.3.1",
"@sveltejs/kit": "^2.15.2",
"@sveltejs/vite-plugin-svelte": "^5.0.3",
"svelte": "^5.16.6",
"svelte-check": "^4.1.1",
"typescript": "^5.7.2",
"vite": "^6.0.7",
"@sveltejs/adapter-static": "^3.0.8",
"@tailwindcss/typography": "^0.5.16",
"@types/eslint": "^9.6.1",
"autoprefixer": "^10.4.20",
"eslint": "^9.17.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.36.0",
"globals": "^15.0.0",
"postcss": "^8.4.38",
"prettier": "^3.1.1",
"prettier-plugin-svelte": "^3.1.2",
"prettier-plugin-tailwindcss": "^0.6.4",
"svelte": "^4.2.7",
"svelte-check": "^3.6.0",
"tailwindcss": "^3.4.4",
"typescript": "^5.0.0",
"typescript-eslint": "^8.0.0-alpha.20",
"vite": "^5.0.3"
"eslint-plugin-svelte": "^2.46.1",
"globals": "^15.14.0",
"postcss": "^8.4.49",
"prettier": "^3.4.2",
"prettier-plugin-svelte": "^3.3.2",
"prettier-plugin-tailwindcss": "^0.6.9",
"tailwindcss": "^3.4.17",
"typescript-eslint": "^8.19.1"
},
"type": "module",
"packageManager": "pnpm@9.9.0"

View File

@ -1,4 +1,4 @@
@import url("@kksh/svelte/themes");
@import url("@kksh/svelte5/themes");
@tailwind base;
@tailwind components;
@tailwind utilities;

View File

@ -1,5 +1,5 @@
<script lang="ts">
import { ThemeCustomizerButton, type ThemeConfig, updateTheme } from '@kksh/svelte';
import { ThemeCustomizerButton, type ThemeConfig, updateTheme } from '@kksh/svelte5';
import { ui } from '@kksh/api/ui/iframe';
import { onMount } from 'svelte';

View File

@ -2,7 +2,7 @@
import '../app.css';
import { ModeWatcher } from 'mode-watcher';
import { ui } from '@kksh/api/ui/iframe';
import { updateTheme } from '@kksh/svelte';
import { updateTheme } from '@kksh/svelte5';
import { onMount } from 'svelte';
onMount(() => {

View File

@ -1,5 +1,5 @@
<script lang="ts">
import { Button, Resizable, Textarea, Label, Toaster, ThemeWrapper } from '@kksh/svelte';
import { Button, Resizable, Textarea, Label, Toaster, ThemeWrapper } from '@kksh/svelte5';
import { onMount } from 'svelte';
import * as jose from 'jose';
import { JwtToken, jwtIsValid, splitJwt } from '$lib/jwt';
@ -65,7 +65,7 @@
<ModeWatcher />
<ThemeWrapper>
<div class="flex h-screen flex-col border px-1">
<div class="kunkun-drag-region h-8" />
<div class="kunkun-drag-region h-8"></div>
<Resizable.PaneGroup direction="horizontal" class="h-full w-full rounded-lg pb-2">
<Resizable.Pane defaultSize={50}>
<div class="flex h-full w-full flex-col gap-1.5 overflow-y-auto px-3">
@ -83,7 +83,7 @@
>{jwtToken.signature}</span
>
</div>
<Button class="" on:click={pasteJwt}>Paste JWT</Button>
<Button class="" onclick={pasteJwt}>Paste JWT</Button>
</div>
</Resizable.Pane>
<Resizable.Handle />

View File

@ -1,5 +1,5 @@
<script lang="ts">
import { Alert, Button, ThemeWrapper, Command } from '@kksh/svelte';
import { Alert, Button, ThemeWrapper, Command } from '@kksh/svelte5';
import Calendar from 'lucide-svelte/icons/calendar';
import * as jose from 'jose';
import { JwtToken, jwtIsValid, splitJwt, claimsDef } from '$lib/jwt';
@ -89,12 +89,12 @@
<ThemeWrapper>
<Command.Root class="h-screen w-full px-2">
<Command.Input placeholder="Type a command or search..." autofocus on:keydown={onKeyDown} />
<Command.Input placeholder="Type a command or search..." autofocus onkeydown={onKeyDown} />
<Command.List class="h-full">
<Command.Empty>
No JWT found in Clipboard.
<br />
<Button class="mt-5" on:click={pasteJwt}>Load From Clipboard</Button>
<Button class="mt-5" onclick={pasteJwt}>Load From Clipboard</Button>
</Command.Empty>
{#if Object.values(header).length > 0}
<Command.Group heading="HEAD: ALGORITHM & TOKEN TYPE">

View File

@ -5,7 +5,7 @@ const config: Config = {
darkMode: ['class'],
content: [
'./src/**/*.{html,js,svelte,ts}',
'node_modules/@kksh/svelte/dist/**/*.{html,js,svelte,ts}'
'node_modules/@kksh/svelte5/dist/**/*.{html,js,svelte,ts}'
],
safelist: ['dark'],
theme: {