/** * Ephemeral toast queue (UI chrome, not transcript history). * * Lifecycle (host animates enter/exit): * enter (~200ms) → hold (default 5000ms) → exit (~200ms) → dismiss * * Same-key shows update that toast in place, preserving its id, stack position and enter animation. */ export type ToastLevel = "info" | "success" | "warn" | "error"; export interface ToastItem { readonly id: string; readonly message: string; readonly level: ToastLevel; readonly createdAt: number; /** Hold time at rest (ms) — enter/exit animation are extra. */ readonly durationMs: number; /** Optional replace key — new shows with the same key dismiss the old one. */ readonly key?: string | undefined; /** Sticky toasts never auto-dismiss; the caller dismisses them by id. */ readonly sticky?: boolean | undefined; } export interface ShowToastOptions { readonly level?: ToastLevel | undefined; /** Visible hold at rest; default 5000ms (enter/exit are added on top). */ readonly durationMs?: number | undefined; /** * Replace any existing toast with this key (e.g. "thinking", "scroll"). * Prevents spam when the user hammers a toggle. */ readonly key?: string | undefined; /** Keep the toast on screen until explicitly dismissed (no auto-dismiss timer). */ readonly sticky?: boolean | undefined; } export type ToastListener = () => void; /** Time at rest in the final on-screen position. */ export declare const DEFAULT_TOAST_DURATION_MS = 5000; /** Slide-in from top. */ export declare const TOAST_ENTER_MS = 200; /** Slide-out back to top. */ export declare const TOAST_EXIT_MS = 200; /** * Safety cap only (pathological multi-KB dumps). Normal status lines are not * truncated for display — host sizes the chip to the full message. */ export declare const MAX_TOAST_MESSAGE_CHARS = 400; export declare function toastTotalLifetimeMs(holdMs: number): number; export declare class ToastController { private items; private readonly timers; private readonly listeners; private seq; private disposed; getToasts(): readonly ToastItem[]; subscribe(listener: ToastListener): () => void; show(message: string, options?: ShowToastOptions): string; private resetTimer; info(message: string, options?: Omit): string; success(message: string, options?: Omit): string; warn(message: string, options?: Omit): string; error(message: string, options?: Omit): string; dismiss(id: string): void; clear(): void; dispose(): void; private emit; }