import type { BaseComponent } from "../base"; import type { Overrides } from "../overrides"; import type { Action } from "./button"; import type { StackProps } from "./stack"; /** * A container component that runs its own timer and dispatches an action on * completion. Its layout, background, border, shadow, and children all live * on `stack`; children read live progress (0–1) via the loader context store * (`$lib/stores/loader`) — they are visual-only consumers. * * `action` reuses Button's `Action` shape; workflow actions dispatch this * component's own `id`, same convention as Button. */ export interface LoaderProps extends BaseComponent { type: "loader"; visible?: boolean | null; loading_duration_ms: number; action: Action; stack: StackProps; overrides?: Overrides; }