import type { GraphStoreContext } from '../store'; import type { Node } from './node'; import type { Edge } from './edge'; import type { Graph } from './graph'; export declare enum StackAction { /** * 变更数据 */ changeData = "changeData", /** * 显示 / 隐藏 */ visible = "visible", /** * 添加节点 */ add = "add", /** * 删除节点 */ delete = "delete" } export declare class Stack { /** * 图 */ graph: Graph; /** * 栈状态 */ state: Array; /** * 游标 */ index: number; get canUndo(): boolean; get canRedo(): boolean; constructor(graph: Graph); /** * 入栈一个状态 * * @param data */ push(data: GraphStoreContext): void; /** * 回退 */ undo: () => void; /** * 前进 */ redo: () => void; } //# sourceMappingURL=stack.d.ts.map