UNPKG

trellis

Version:

Agentic State Engine — event-sourced causal graph with branching, decision traces, and realtime sync for AI-native applications

27 lines 1.04 kB
/** * Dialog Vanilla — framework-free bindings (ADR 0034 wedge 2). * * Import from `trellis/dialog/vanilla`: * * const dialogs = createVanillaDialog(); * dialogs.subscribe(() => renderStack(dialogs.state)); * document.addEventListener('keydown', (e) => { * if (e.key === 'Escape' && dialogs.state.top?.a11y.escToDismiss) { * dialogs.actions.dismiss(dialogs.state.top.id); * } * }); * * The core owns the a11y contract; DOM focus management belongs to the * renderer (follow-up wedge). * * @module trellis/dialog/vanilla */ import type { DialogConfig, UseDialogReturn } from '../core/index.js'; /** Accept either a config (fresh core) or an existing core (shared mount). */ export type DialogInput = DialogConfig | UseDialogReturn; /** * Create a framework-free dialog stack from a config or an existing core * (to share one mount across adapters) with the standard core surface. */ export declare function createVanillaDialog(input?: DialogInput): UseDialogReturn; //# sourceMappingURL=index.d.ts.map