import { Node as FlowNode, Edge as FlowEdge, NodeChange, EdgeChange } from '@xyflow/react'; import { FlatLink, FlatNode } from './types.js'; import { OntologyFlowNodeData } from './OntologyNode.js'; import { OntologyFlowEdgeData } from './OntologyEdge.js'; /** * Mutation callbacks the parent renderer injects. In read-only mode the * parent passes no-ops; in editable mode each callback re-derives the * next-ontology and writes it back through `binding.write` via * `useBindingOntology`'s `mutate`. */ export interface OntologyMutations { deleteNodes(ids: Set): void; deleteLinks(ids: Set): void; } export interface UseFlowStateArgs { flatNodes: FlatNode[]; flatLinks: FlatLink[]; mutations: OntologyMutations; } export declare function useFlowState({ flatNodes, flatLinks, mutations }: UseFlowStateArgs): { nodes: FlowNode[]; edges: FlowEdge[]; onNodesChange: (changes: NodeChange[]) => void; onEdgesChange: (changes: EdgeChange[]) => void; screenToFlowPosition: (clientPosition: import('@xyflow/react').XYPosition, options?: { snapToGrid?: boolean; snapGrid?: import('@xyflow/react').SnapGrid; }) => import('@xyflow/react').XYPosition; setNodePosition: (id: string, pos: { x: number; y: number; }) => void; }; //# sourceMappingURL=flow-state.d.ts.map