UNPKG

trellis

Version:

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

24 lines 1.07 kB
/** * Dialog core — headless stacked-dialog manager (ADR 0034 wedge 2). * * Framework-free and DOM-free: the stack, async resolution, esc/backdrop * policy, and a11y data all live here and are verified in Node. Adapters * (`trellis/dialog/react|vue|svelte|vanilla`) render the stack per framework. * * const dialogs = createDialogCore(); * const result = await dialogs.actions.open({ * kind: 'confirm', * title: 'Delete task?', * buttons: [ * { id: 'delete', label: 'Delete', variant: 'danger', autoFocus: true }, * { id: 'cancel', label: 'Cancel' }, * ], * }); * if (result.status === 'ok' && result.value === 'delete') { /* … *\/ } * * @module trellis/dialog */ import type { DialogConfig, UseDialogReturn } from './types.js'; export type { DialogActions, DialogButton, DialogConfig, DialogInstance, DialogKind, DialogResult, DialogSpec, DialogState, UseDialogReturn, } from './types.js'; export declare function createDialogCore(config?: DialogConfig): UseDialogReturn; //# sourceMappingURL=index.d.ts.map