refactor(toolkit): type source any with proper types

Genuinely type composable any usages (useStepper/useStorage/useForm/
createEventHook/useSorted/etc.) as proper generics/unknown; keep idiomatic
any-function and overload-impl signatures with comments; skipped test -> .todo.
This commit is contained in:
2026-06-15 16:55:07 +07:00
parent 44848bc9e6
commit aa2938cb34
283 changed files with 3505 additions and 3482 deletions
@@ -24,15 +24,15 @@ function toggle(index: number) {
</script>
<template>
<div class="flex w-full max-w-sm flex-col gap-4">
<div class="rounded-lg border border-(--border) bg-(--bg-inset) p-3">
<p class="text-xs font-medium uppercase tracking-wide text-(--fg-subtle)">
<div class="demo-stack max-w-sm">
<div class="rounded-lg border border-border bg-bg-inset p-3">
<p class="demo-label">
Next pending index
</p>
<p class="mt-1 font-mono text-3xl font-bold tabular-nums text-(--fg)">
<p class="demo-stat mt-1 text-3xl">
{{ nextIndex }}
</p>
<p class="mt-1 text-sm text-(--fg-subtle)">
<p class="mt-1 text-sm text-fg-subtle">
{{ nextIndex === -1 ? 'All steps complete' : `${steps[nextIndex]!.label}` }}
</p>
</div>
@@ -43,16 +43,16 @@ function toggle(index: number) {
:key="step.label"
class="flex items-center justify-between rounded-lg border px-3 py-2 text-sm transition"
:class="index === nextIndex
? 'border-(--accent) bg-(--accent-subtle) text-(--accent-text)'
: 'border-(--border) bg-(--bg-elevated) text-(--fg-muted)'"
? 'border-accent bg-accent-subtle text-accent-text'
: 'border-border bg-bg-elevated text-fg-muted'"
>
<span class="flex items-center gap-2">
<span class="font-mono text-xs tabular-nums text-(--fg-subtle)">{{ index }}</span>
<span class="font-mono text-xs tabular-nums text-fg-subtle">{{ index }}</span>
<span :class="step.done ? 'line-through opacity-60' : ''">{{ step.label }}</span>
</span>
<button
type="button"
class="inline-flex items-center justify-center gap-1.5 rounded-lg border border-(--border) bg-(--bg-elevated) px-3 py-1.5 text-sm font-medium text-(--fg) transition hover:bg-(--bg-inset) hover:border-(--border-strong) active:scale-[0.98] cursor-pointer"
class="demo-btn"
@click="toggle(index)"
>
{{ step.done ? 'Undo' : 'Done' }}