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
@@ -1,16 +1,16 @@
<script lang="ts">
import type { FieldSpec, Offset, OffsetSpec } from "$lib/registry-schema";
import type { Offset, OffsetSpec } from "$lib/registry-schema";
import Control from "./Control.svelte";
interface Props {
label: string;
value: unknown;
spec: FieldSpec;
spec: OffsetSpec;
onchange?: (value: Offset) => void;
}
let { label, value, spec, onchange }: Props = $props();
const sp = $derived(spec as OffsetSpec);
const sp = $derived(spec);
const current = $derived.by(() => {
const v = value as Partial<Offset> | undefined;
return {