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,7 +24,7 @@ function formatSize(bytes: number): string {
</script>
<template>
<div class="w-full max-w-sm flex flex-col gap-4">
<div class="demo-stack max-w-sm">
<div
v-if="!isSupported"
class="rounded-xl border border-amber-500/30 bg-amber-500/10 p-4 text-center text-sm text-amber-700 dark:text-amber-300"
@@ -37,33 +37,33 @@ function formatSize(bytes: number): string {
ref="dropZone"
class="flex flex-col items-center justify-center gap-2 rounded-xl border-2 border-dashed p-8 text-center transition"
:class="isOverDropZone
? 'border-(--accent) bg-(--accent-subtle)'
: 'border-(--border-strong) bg-(--bg-elevated)'"
? 'border-accent bg-accent-subtle'
: 'border-border-strong bg-bg-elevated'"
>
<span class="text-3xl transition" :class="isOverDropZone ? 'scale-110' : ''">
{{ isOverDropZone ? '📥' : '🖼️' }}
</span>
<p class="text-sm font-medium text-(--fg)">
<p class="text-sm font-medium text-fg">
{{ isOverDropZone ? 'Release to drop' : 'Drop image files here' }}
</p>
<p class="text-xs text-(--fg-subtle)">
<p class="text-xs text-fg-subtle">
Only <span class="font-mono">image/*</span> files are accepted
</p>
</div>
<div class="rounded-lg border border-(--border) bg-(--bg-inset) p-3">
<div class="rounded-lg border border-border bg-bg-inset p-3">
<div class="flex items-center justify-between">
<span class="text-xs font-medium uppercase tracking-wide text-(--fg-subtle)">
<span class="demo-label">
Dropped files
</span>
<span class="inline-flex items-center gap-1.5 rounded-md border border-(--border) bg-(--bg-elevated) px-2 py-0.5 text-xs font-medium text-(--fg-muted) tabular-nums">
<span class="inline-flex items-center gap-1.5 rounded-md border border-border bg-bg-elevated px-2 py-0.5 text-xs font-medium text-fg-muted tabular-nums">
{{ fileList.length }}
</span>
</div>
<p
v-if="fileList.length === 0"
class="mt-3 text-center text-sm text-(--fg-subtle)"
class="mt-3 text-center text-sm text-fg-subtle"
>
Nothing dropped yet.
</p>
@@ -72,10 +72,10 @@ function formatSize(bytes: number): string {
<li
v-for="file in fileList"
:key="file.name"
class="flex items-center justify-between gap-3 rounded-md bg-(--bg-elevated) px-2.5 py-1.5"
class="flex items-center justify-between gap-3 rounded-md bg-bg-elevated px-2.5 py-1.5"
>
<span class="truncate text-sm text-(--fg)">{{ file.name }}</span>
<span class="shrink-0 font-mono text-xs tabular-nums text-(--fg-subtle)">
<span class="truncate text-sm text-fg">{{ file.name }}</span>
<span class="shrink-0 font-mono text-xs tabular-nums text-fg-subtle">
{{ formatSize(file.size) }}
</span>
</li>