UNPKG

@xrenders/xflow

Version:

一款功能强大、易用灵活的流程编辑器框架,帮助你轻松构建复杂的工作流和流程产品

41 lines (40 loc) 1.65 kB
import { Edge } from '@xyflow/react'; import { FlowNode } from '../models/store'; export declare const useFlow: () => { setNodes: (nodes: FlowNode[]) => void; addNodes: (nodes: FlowNode[]) => void; setEdges: (edges: Edge[]) => void; addEdges: (edges: Edge[]) => void; getFlowData: () => { edges: Edge<Record<string, unknown>, string>[]; nodes: any; }; setFlowData: ({ nodes, edges }: { nodes: any; edges: any; }) => void; getNodes: (_nodes: any) => any; getEdges: () => Edge<Record<string, unknown>, string>[]; toObject: () => { nodes: any; edges: Edge<Record<string, unknown>, string>[]; viewport: import("@xyflow/react").Viewport; }; zoomIn: import("@xyflow/system").ZoomInOut; zoomOut: import("@xyflow/system").ZoomInOut; zoomTo: import("@xyflow/system").ZoomTo; getZoom: import("@xyflow/system").GetZoom; setViewport: import("@xyflow/system").SetViewport; getViewport: import("@xyflow/system").GetViewport; fitView: import("@xyflow/react").FitView; setCenter: import("@xyflow/system").SetCenter; fitBounds: import("@xyflow/system").FitBounds; screenToFlowPosition: (clientPosition: import("@xyflow/react").XYPosition, options?: { snapToGrid: boolean; }) => import("@xyflow/react").XYPosition; flowToScreenPosition: (flowPosition: import("@xyflow/react").XYPosition) => import("@xyflow/react").XYPosition; runAutoLayout: () => void; copyNode: (this: any, nodeId: any) => void; pasteNode: (nodeId: string, data: any) => void; deleteNode: (this: any, nodeId: any) => void; };