import type { GraphNode, GraphEdge } from '../@types'; import type { GraphEditorOptions, BatchUpdateResponse } from '../composables/useGraphEditor'; import type { ToolType } from '../module/g6Graph'; interface EditorProps { /** 批量更新 API(传入后 GraphVisualization 内部接管编辑逻辑) */ api?: GraphEditorOptions['api']; /** 保存时合并进请求(如 file_source、userId、project);用函数以便读取最新筛选条件 */ batchExtra?: GraphEditorOptions['batchExtra']; /** 保存成功回调 */ onSaveSuccess?: (stats: NonNullable) => void; /** 保存失败回调 */ onSaveError?: (error: Error) => void; } interface Props { nodes: GraphNode[]; edges: GraphEdge[]; width?: number; height?: number; layoutType?: 'force' | 'circular'; /** 渲染引擎(g6 / vis) */ renderEngine?: 'g6' | 'vis'; /** 主题(light / dark) */ theme?: 'light' | 'dark'; /** 编辑器配置(传入后组件内部管理编辑状态,工具栏事件自动处理) */ editor?: EditorProps; } declare const _default: import("vue").DefineComponent void; resetLayout: () => void; switchLayout: (type: "force" | "circular") => void; getLayoutType: () => import("..").LayoutType; focusNode: (nodeId: string) => void; getEditData: () => { nodes: GraphNode[]; edges: GraphEdge[]; }; applyEditData: (nodes: GraphNode[], edges: GraphEdge[]) => void; updateNodeLabel: (nodeId: string, newLabel: string) => void; updateEdge: (edgeId: string, updates: { label?: string; source?: string; target?: string; }) => void; deleteNode: (nodeId: string) => void; deleteEdge: (edgeId: string) => void; promptAddNodeAtCenter: () => Promise; hintHowToAddRelation: () => void; setToolType: (type: ToolType) => void; handleToggleEdit: () => void; handleSave: () => void; handleCancel: () => void; handleSwitchToForce: () => void; handleSwitchToCircular: () => void; isEditing: import("vue").ComputedRef; hasChanges: import("vue").ComputedRef; save: ((applyToGraph?: boolean) => Promise<{ nodes: GraphNode[]; edges: GraphEdge[]; } | null>) | null; cancelEdit: ((applyToGraph?: boolean) => { nodes: any; edges: any; }) | null; }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, { cancel: () => any; "update:editMode": (value: boolean) => any; "edit-mode-change": (value: boolean) => any; save: () => any; "graph-updated": (nodes: GraphNode[], edges: GraphEdge[]) => any; }, string, import("vue").PublicProps, Readonly & Readonly<{ onCancel?: (() => any) | undefined; "onUpdate:editMode"?: ((value: boolean) => any) | undefined; "onEdit-mode-change"?: ((value: boolean) => any) | undefined; onSave?: (() => any) | undefined; "onGraph-updated"?: ((nodes: GraphNode[], edges: GraphEdge[]) => any) | undefined; }>, { width: number; height: number; theme: "light" | "dark"; layoutType: "force" | "circular"; renderEngine: "g6" | "vis"; }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>; export default _default;