UNPKG

trellis

Version:

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

25 lines 978 B
/** * Undo-history Vue — `useUndoHistoryVue` composable (ADR 0034 wedge 8). * * Import from `trellis/undo-history/vue`: * * const undo = useUndoHistoryVue(); * undo.actions.push(insertChar, { coalesce: true }); * // <button :disabled="!undo.state.canUndo" @click="undo.actions.undo"> * // Undo {{ undo.state.undoLabel }} * // </button> * * State is a Vue `reactive` object mirrored from the core via the shared * `syncFromCore` bridge (same pattern as `trellis/forms/vue`). * * @module trellis/undo-history/vue */ import type { UndoConfig, UseUndoReturn } from '../core/index.js'; /** Accept either a config (fresh core) or an existing core (shared mount). */ export type UndoInput = UndoConfig | UseUndoReturn; /** * Create a reactive Vue undo-history. The core's state is mirrored into a * `reactive()` object on every mutation. */ export declare function useUndoHistoryVue(input?: UndoInput): UseUndoReturn; //# sourceMappingURL=index.d.ts.map