feat: upgrade app to svelte-5
This commit is contained in:
parent
a87add30ff
commit
fa659ab74e
@ -14,35 +14,34 @@
|
||||
"@nodes/runtime": "link:../packages/runtime",
|
||||
"@nodes/ui": "link:../packages/ui",
|
||||
"@nodes/utils": "link:../packages/utils",
|
||||
"@sveltejs/kit": "^2.5.7",
|
||||
"@threlte/core": "^7.3.0",
|
||||
"@threlte/extras": "^8.11.2",
|
||||
"@types/three": "^0.164.0",
|
||||
"@unocss/reset": "^0.59.4",
|
||||
"@sveltejs/kit": "^2.7.4",
|
||||
"@threlte/core": "8.0.0-next.23",
|
||||
"@threlte/extras": "9.0.0-next.33",
|
||||
"@types/three": "^0.169.0",
|
||||
"@unocss/reset": "^0.63.6",
|
||||
"comlink": "^4.4.1",
|
||||
"file-saver": "^2.0.5",
|
||||
"idb": "^8.0.0",
|
||||
"jsondiffpatch": "^0.6.0",
|
||||
"three": "^0.164.1"
|
||||
"three": "^0.170.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@iconify-json/tabler": "^1.1.110",
|
||||
"@iconify-json/tabler": "^1.2.7",
|
||||
"@nodes/types": "link:../packages/types",
|
||||
"@sveltejs/adapter-static": "^3.0.1",
|
||||
"@sveltejs/vite-plugin-svelte": "^3.1.0",
|
||||
"@sveltejs/adapter-static": "^3.0.6",
|
||||
"@sveltejs/vite-plugin-svelte": "^4.0.0",
|
||||
"@tsconfig/svelte": "^5.0.4",
|
||||
"@types/file-saver": "^2.0.7",
|
||||
"@unocss/preset-icons": "^0.59.4",
|
||||
"svelte": "^4.2.15",
|
||||
"svelte-check": "^3.7.0",
|
||||
"three-inspect": "^0.4.5",
|
||||
"tslib": "^2.6.2",
|
||||
"typescript": "^5.4.5",
|
||||
"unocss": "^0.59.4",
|
||||
"vite": "^5.2.10",
|
||||
"vite-plugin-comlink": "^4.0.3",
|
||||
"@unocss/preset-icons": "^0.63.6",
|
||||
"svelte": "^5.1.9",
|
||||
"svelte-check": "^4.0.5",
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.6.3",
|
||||
"unocss": "^0.63.6",
|
||||
"vite": "^5.4.10",
|
||||
"vite-plugin-comlink": "^5.1.0",
|
||||
"vite-plugin-glsl": "^1.3.0",
|
||||
"vite-plugin-wasm": "^3.3.0",
|
||||
"vitest": "^1.5.3"
|
||||
"vitest": "^2.1.4"
|
||||
}
|
||||
}
|
||||
|
@ -38,9 +38,9 @@
|
||||
updateSettings($settings);
|
||||
}
|
||||
|
||||
manager.on("settings", (settings) => {
|
||||
settingTypes = settings.types;
|
||||
$settings = settings.values;
|
||||
manager.on("settings", (_settings) => {
|
||||
settingTypes = _settings.types;
|
||||
settings.set(_settings.values);
|
||||
});
|
||||
|
||||
manager.on("result", (result) => {
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
<div class="wrapper">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr on:click={() => ($open.runtime = !$open.runtime)}>
|
||||
<td>{$open.runtime ? "-" : "+"} runtime </td>
|
||||
<td>{humanizeDuration(runtime || 1000)}</td>
|
||||
@ -61,6 +62,7 @@
|
||||
<td>faces </td>
|
||||
<td>{humanizeNumber(faces || 0)}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
@ -6,10 +6,10 @@
|
||||
|
||||
type Button = { type: "button"; label?: string; callback: () => void };
|
||||
|
||||
type Input = NodeInput | Button;
|
||||
type InputType = NodeInput | Button;
|
||||
|
||||
interface Nested {
|
||||
[key: string]: (Nested & { __title?: string }) | Input;
|
||||
[key: string]: (Nested & { __title?: string }) | InputType;
|
||||
}
|
||||
|
||||
export let id: string;
|
||||
@ -24,7 +24,7 @@
|
||||
export let depth = 0;
|
||||
|
||||
const keys = Object.keys(settings).filter((key) => key !== "__title");
|
||||
function isNodeInput(v: Input | Nested): v is Input {
|
||||
function isNodeInput(v: InputType | Nested): v is InputType {
|
||||
return v && "type" in v;
|
||||
}
|
||||
</script>
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { sveltekit } from '@sveltejs/kit/vite'
|
||||
import { defineConfig } from 'vite'
|
||||
import { sveltekit } from '@sveltejs/kit/vite';
|
||||
import UnoCSS from 'unocss/vite';
|
||||
import { defineConfig } from 'vite';
|
||||
import comlink from 'vite-plugin-comlink';
|
||||
import glsl from "vite-plugin-glsl";
|
||||
import wasm from "vite-plugin-wasm";
|
||||
import comlink from 'vite-plugin-comlink';
|
||||
import UnoCSS from 'unocss/vite'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
|
@ -16,6 +16,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"comlink": "^4.4.1",
|
||||
"vite-plugin-comlink": "^4.0.3"
|
||||
"vite-plugin-comlink": "^5.1.0"
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
import type { Graph, RuntimeExecutor } from "@nodes/types";
|
||||
|
||||
export class WorkerRuntimeExecutor implements RuntimeExecutor {
|
||||
private worker = new ComlinkWorker<typeof import('./worker-runtime-executor-backend.ts')>(new URL("./worker-runtime-executor-backend.ts", import.meta.url));
|
||||
private worker = new ComlinkWorker<typeof import('./worker-runtime-executor-backend.ts')>(new URL("worker-runtime-executor-backend.ts", import.meta.url));
|
||||
constructor() {
|
||||
}
|
||||
async execute(graph: Graph, settings: Record<string, unknown>) {
|
||||
|
@ -13,6 +13,6 @@
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"zod": "^3.23.5"
|
||||
"zod": "^3.23.8"
|
||||
}
|
||||
}
|
||||
|
@ -31,35 +31,35 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-essentials": "^8.4.1",
|
||||
"@storybook/addon-svelte-csf": "^5.0.0-next.10",
|
||||
"@storybook/addon-svelte-csf": "5.0.0-next.10",
|
||||
"@storybook/addon-themes": "^8.4.1",
|
||||
"@storybook/svelte": "^8.4.1",
|
||||
"@storybook/sveltekit": "^8.4.1",
|
||||
"@sveltejs/adapter-static": "^3.0.1",
|
||||
"@sveltejs/kit": "^2.5.27",
|
||||
"@sveltejs/package": "^2.3.1",
|
||||
"@sveltejs/adapter-static": "^3.0.6",
|
||||
"@sveltejs/kit": "^2.7.4",
|
||||
"@sveltejs/package": "^2.3.7",
|
||||
"@sveltejs/vite-plugin-svelte": "^4.0.0",
|
||||
"@types/eslint": "^8.56.10",
|
||||
"@typescript-eslint/eslint-plugin": "^7.7.1",
|
||||
"@typescript-eslint/parser": "^7.7.1",
|
||||
"eslint": "^9.1.1",
|
||||
"eslint-plugin-storybook": "^0.10.1",
|
||||
"eslint-plugin-svelte": "^2.45.1",
|
||||
"publint": "^0.2.7",
|
||||
"@types/eslint": "^9.6.1",
|
||||
"@typescript-eslint/eslint-plugin": "^8.12.2",
|
||||
"@typescript-eslint/parser": "^8.12.2",
|
||||
"eslint": "^9.14.0",
|
||||
"eslint-plugin-storybook": "^0.10.2",
|
||||
"eslint-plugin-svelte": "^2.46.0",
|
||||
"publint": "^0.2.12",
|
||||
"storybook": "^8.4.1",
|
||||
"svelte": "^5.0.0",
|
||||
"svelte-check": "^4.0.0",
|
||||
"tslib": "^2.6.2",
|
||||
"typescript": "^5.5.0",
|
||||
"vite": "^5.4.4",
|
||||
"vitest": "^1.5.2"
|
||||
"svelte": "^5.1.9",
|
||||
"svelte-check": "^4.0.5",
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.6.3",
|
||||
"vite": "^5.4.10",
|
||||
"vitest": "^2.1.4"
|
||||
},
|
||||
"svelte": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@nodes/types": "link:../types",
|
||||
"@threlte/core": "^7.3.0",
|
||||
"@threlte/extras": "^8.11.2"
|
||||
"@threlte/core": "^7.3.1",
|
||||
"@threlte/extras": "^8.12.0"
|
||||
}
|
||||
}
|
||||
|
@ -1,15 +1,11 @@
|
||||
<script lang="ts">
|
||||
import { run } from 'svelte/legacy';
|
||||
|
||||
|
||||
|
||||
interface Props {
|
||||
value: boolean;
|
||||
id?: string;
|
||||
}
|
||||
|
||||
let { value = $bindable(), id = '' }: Props = $props();
|
||||
run(() => {
|
||||
$effect(() => {
|
||||
if (typeof value === 'string') {
|
||||
value = value === 'true';
|
||||
} else if (typeof value === 'number') {
|
||||
|
@ -13,7 +13,7 @@
|
||||
"@nodes/types": "link:../types"
|
||||
},
|
||||
"devDependencies": {
|
||||
"vite": "^5.2.10",
|
||||
"vitest": "^1.5.3"
|
||||
"vite": "^5.4.10",
|
||||
"vitest": "^2.1.4"
|
||||
}
|
||||
}
|
||||
|
8981
pnpm-lock.yaml
8981
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user