/** * 处理流程的鼠标事件 */ /// import { NodeSchema } from "../../../register/node"; import { Edge, Node, NodeDragHandler } from "reactflow"; import { MagicFlow } from "../../../types/flow"; type UseFlowEventProps = { resetLastLayoutData: () => void; resetCanLayout: () => void; currentZoom: number; setShowParamsComp: React.Dispatch>; }; /** 新增节点的位置 */ export declare enum AddPosition { Edge = "edge", Node = "node", Canvas = "canvas" } export default function useFlowEvents({ resetLastLayoutData, resetCanLayout, currentZoom, setShowParamsComp }: UseFlowEventProps): { onEdgeClick: (this: any, event: any, edge: any) => void; selectedNodeId: string; setSelectedNodeId: (id: string) => void; onNodeDragStop: (this: unknown, event: any, node: Node, dragNodes: Node[]) => void; onDrop: (this: any, event: any) => Promise; onDragOver: (this: any, event: any) => void; reactFlowWrapper: import("react").MutableRefObject; onReactFlowClick: (this: unknown) => void; onNodeDragStart: (this: any, event: any, node: any) => void; isDragging: boolean; onNodesDelete: (this: unknown, _nodes: (Node & Partial)[]) => void; onEdgesDelete: (this: unknown, _edges: Edge[]) => void; reactflowRef: import("react").MutableRefObject; onAddItem: (this: unknown, event: any, nodeData: NodeSchema, extraConfig?: Record) => Promise; onlyRenderVisibleElements: boolean; onNodeDrag: NodeDragHandler; }; export {};