fix: update field spec types

This commit is contained in:
2026-10-10 10:49:42 +05:00
parent 4eb657dd50
commit 8b2172c39a
19 changed files with 112 additions and 94 deletions
@@ -42,7 +42,6 @@
applySourceDefaults,
clampSourceAwareMaxes,
sanitizeSchemaParams,
type ToolSchema,
} from "$lib/registry-schema";
import { onMount } from "svelte";
import { SvelteSet } from "svelte/reactivity";
@@ -65,9 +64,7 @@
}
let { page, tool, chainId = undefined }: Props = $props();
const schema = $derived(
tool.schema as ToolSchema<Record<string, unknown>> | undefined,
);
const schema = $derived(tool.schema);
const inputMode = $derived(tool.input);
@@ -471,14 +468,17 @@
onadd={(id) => replaceStepTool(i, id)}
/>
{/snippet}
<SchemaFields
schema={toolSchemaOf(step)}
values={step.params}
toolId={step.id}
sourceDims={i === 0 ? (source ?? undefined) : stepDims[i - 1]}
onchange={(id, v, axis) => setStepValue(i, id, v, axis)}
onreset={() => resetStep(i)}
/>
{@const stepSchema = toolSchemaOf(step)}
{#if stepSchema}
<SchemaFields
schema={stepSchema}
values={step.params}
toolId={step.id}
sourceDims={i === 0 ? (source ?? undefined) : stepDims[i - 1]}
onchange={(id, v, axis) => setStepValue(i, id, v, axis)}
onreset={() => resetStep(i)}
/>
{/if}
</StepCard>
{/snippet}