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
@@ -19,17 +19,17 @@ async function copy() {
</script>
<template>
<div class="flex w-full max-w-sm flex-col gap-4">
<div class="space-y-3 rounded-xl border border-(--border) bg-(--bg-elevated) p-4">
<p class="text-xs font-medium uppercase tracking-wide text-(--fg-subtle)">
<div class="demo-stack max-w-sm">
<div class="demo-card space-y-3 p-4">
<p class="demo-label">
Live value
</p>
<div class="flex items-center justify-between rounded-lg border border-(--border) bg-(--bg-inset) p-3">
<span class="font-mono text-lg font-semibold tabular-nums text-(--fg)">{{ status }}</span>
<div class="flex items-center justify-between rounded-lg border border-border bg-bg-inset p-3">
<span class="font-mono text-lg font-semibold tabular-nums text-fg">{{ status }}</span>
<span
class="inline-flex items-center gap-1.5 rounded-md border px-2 py-0.5 text-xs font-medium transition"
:class="status === 'Idle'
? 'border-(--border) bg-(--bg-elevated) text-(--fg-muted)'
? 'border-border bg-bg-elevated text-fg-muted'
: 'border-emerald-500/30 bg-emerald-500/10 text-emerald-600 dark:text-emerald-400'"
>
{{ status === 'Idle' ? 'reset' : 'active' }}
@@ -39,21 +39,21 @@ async function copy() {
<div class="flex flex-wrap gap-2">
<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="flash('Saved')"
>
Save
</button>
<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="flash('Synced')"
>
Sync
</button>
<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="flash('Uploading…')"
>
Upload
@@ -61,10 +61,10 @@ async function copy() {
</div>
</div>
<label class="flex flex-col gap-1.5 rounded-xl border border-(--border) bg-(--bg-elevated) p-4">
<span class="flex items-center justify-between text-sm text-(--fg)">
<span class="text-xs font-medium uppercase tracking-wide text-(--fg-subtle)">reset delay</span>
<span class="font-mono tabular-nums text-(--fg-muted)">{{ delay }}ms</span>
<label class="demo-card flex flex-col gap-1.5 p-4">
<span class="flex items-center justify-between text-sm text-fg">
<span class="demo-label">reset delay</span>
<span class="font-mono tabular-nums text-fg-muted">{{ delay }}ms</span>
</span>
<input
v-model.number="delay"
@@ -72,15 +72,15 @@ async function copy() {
min="500"
max="4000"
step="250"
class="w-full accent-(--accent) cursor-pointer"
class="w-full accent-accent cursor-pointer"
>
</label>
<div class="flex items-center justify-between rounded-xl border border-(--border) bg-(--bg-elevated) p-4">
<span class="text-sm text-(--fg)">Copy-to-clipboard pattern</span>
<div class="demo-card flex items-center justify-between p-4">
<span class="text-sm text-fg">Copy-to-clipboard pattern</span>
<button
type="button"
class="inline-flex items-center justify-center gap-1.5 rounded-lg border border-transparent bg-(--accent) px-3 py-1.5 text-sm font-medium text-(--accent-fg) transition hover:bg-(--accent-hover) active:scale-[0.98] cursor-pointer"
class="demo-btn-primary"
@click="copy"
>
{{ copied ? 'Copied!' : 'Copy' }}