chore: setup linting

This commit is contained in:
Max Richter
2026-02-02 16:22:14 +01:00
parent 137425b31b
commit 30e897468a
174 changed files with 6043 additions and 5107 deletions

View File

@@ -1,25 +1,30 @@
<script lang="ts">
import type { NodeInput } from '@nodarium/types';
import type { NodeInput } from '@nodarium/types';
import { Checkbox, Number, Select, Vec3 } from './index.js';
import { Checkbox, Float, Select, Vec3 } from './index.js';
interface Props {
input: NodeInput;
value: any;
id?: string;
}
interface Props {
input: NodeInput;
value: unknown;
id?: string;
}
let { input, value = $bindable(), id }: Props = $props();
let { input, value = $bindable(), id }: Props = $props();
</script>
{#if input.type === 'float'}
<Number bind:value min={input?.min} max={input?.max} step={input?.step} />
<Float
bind:value={value as number}
min={input?.min}
max={input?.max}
step={input?.step}
/>
{:else if input.type === 'integer'}
<Number bind:value min={input?.min} max={input?.max} />
<Float bind:value={value as number} min={input?.min} max={input?.max} />
{:else if input.type === 'boolean'}
<Checkbox bind:value {id} />
<Checkbox bind:value={value as boolean} {id} />
{:else if input.type === 'select'}
<Select bind:value options={input.options} {id} />
<Select bind:value={value as number} options={input.options} {id} />
{:else if input.type === 'vec3'}
<Vec3 bind:value {id} />
<Vec3 bind:value={value as [number, number, number]} {id} />
{/if}