evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
A utility for broadcasting toasts, confirmations, and dynamic dialogs through the UI library's programmatic overlay services.
All overlay actions must delegate to the dependency's programmatic overlay services (event-bus driven) instead of manually mounting overlay components.
notify with severity, summary, optional detail, and optional life posts a toast matching the payload, optional group, and auto-hides after the specified life (defaults to library default). @testconfirm with message/header resolves to true when the user accepts and false when they reject, honoring provided button labels or icons when supplied. @testopenDialog with header, content string, and optional closable flag opens a dismissible dialog; invoking the returned close handle removes the same dialog instance. @testexport type Severity = 'success' | 'info' | 'warn' | 'error';
export interface ToastRequest {
severity: Severity;
summary: string;
detail?: string;
life?: number;
group?: string;
}
export interface ConfirmRequest {
message: string;
header?: string;
icon?: string;
acceptLabel?: string;
rejectLabel?: string;
}
export interface DialogRequest {
header: string;
content: string;
closable?: boolean;
}
export interface DialogHandle {
close(): void;
}
export interface OverlayController {
notify(request: ToastRequest): void;
confirm(request: ConfirmRequest): Promise<boolean>;
openDialog(request: DialogRequest): DialogHandle;
}
/**
* Creates a controller that routes overlay requests through the UI library's programmatic overlay services and their event buses.
*/
export function createOverlayController(): OverlayController;Programmatic overlay services for toasts, confirmation prompts, and dynamic dialogs delivered over event buses.