import { FlowState } from './flow.js'; import { Node } from './node.js'; export declare class Graph { state: FlowState; nodes: GraphNode[][]; graphNodes: Map; dirtyNodes: Map; constructor(); add(data: Node): void; remove(data: Node): void; connect(sourceNode: Node, destinationNode: Node): void; disconnect(sourceNode: Node, destinationNode: Node): void; updateOrder(root: GraphNode, order: number): void; private _updateOrder; canConnect(sourceNode: Node, destinationNode: Node): boolean; start(): Promise; stop(): void; runAll(graphNodes: GraphNode[]): Promise; setDirty(node: Node | GraphNode): void; clearDirty(node: Node | GraphNode): void; lowestDirty(graphNodes: GraphNode[]): GraphNode[]; propagate(root: Node | GraphNode, callback: (node: Node) => void): void; debugNode(node: GraphNode, indent: string): void; debugGraph(): void; } export interface SerializedGraph { nodes: SerializedGraphNode[][]; nodeToGraphNode: Record; } export declare class GraphNode { flowNode: Node; id: string; childs: GraphNode[]; order: number; constructor(flowNode: Node, order?: number, id?: string); } export interface SerializedGraphNode { id: string; nodeId: string; order: number; childs: string[]; }