feat: update some more components to svelte 5
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 2m48s

This commit is contained in:
Max Richter
2025-11-24 21:11:16 +01:00
parent d64877666b
commit cfcb447784
17 changed files with 130 additions and 80 deletions

View File

@@ -23,7 +23,7 @@
const isSelected = $derived(graphState.selectedNodes.has(node.id));
let strokeColor = $state(colors.selected);
$effect(() => {
appSettings.theme;
appSettings.value.theme;
strokeColor = isSelected
? colors.selected
: isActive

View File

@@ -57,7 +57,7 @@
{#each parameters as [key, value], i}
<NodeParameter
{node}
bind:node
id={key}
input={value}
isLast={i == parameters.length - 1}

View File

@@ -3,7 +3,7 @@
import type { Node, Socket } from "@nodes/types";
import { getContext } from "svelte";
const { node = $bindable<Node>() } = $props();
const { node }: { node: Node } = $props();
const setDownSocket = getContext<(socket: Socket) => void>("setDownSocket");
const getSocketPosition =

View File

@@ -17,7 +17,7 @@
isLast?: boolean;
};
const { node, input, id, isLast }: Props = $props();
let { node = $bindable(), input, id, isLast }: Props = $props();
const inputType = node?.tmp?.type?.inputs?.[id]!;
@@ -87,7 +87,7 @@
<label for={elementId}>{input.label || id}</label>
{/if}
{#if inputType.external !== true}
<NodeInput {elementId} {node} {input} {id} />
<NodeInput {elementId} bind:node {input} {id} />
{/if}
</div>