import { Node, Link } from "./force-graph"; export interface IBaseGraphData { nodes: Node[]; links: Link[]; } export interface IGraphData { nodes: Node[]; links: Link[]; } export interface IGraphObj { data: IBaseGraphData; alpha: number; } export interface ITooltip { type: string; trigger?: string; value: HTMLElement; } export interface IBaseGraphOptions { [key: string]: any; } export interface IWindowMsg { type: string; version: string; } export interface IMouseSite { x: number; y: number; } export interface ISelectNode { node: Node | null; position: { x: number; y: number; }; } export declare type DeepPartial = T extends Function ? T : T extends object ? { [P in keyof T]?: DeepPartial; } : T; export declare type IOptions = DeepPartial; export interface IBaseOptions { width: number; height: number; zoomable: boolean; draggable: boolean; hoverable: boolean; lockable: boolean; highlight: boolean; highClick: boolean; forceCenter: boolean; boundaryable: boolean; editable: boolean; type: string; clickable: boolean; dbclickable: boolean; contextmenuable: boolean; onAction: IOnAction; simulation: { strength: number; distanceMin: number; zoomMin: number; zoomMax: number; }; legend: IBaseLegend; link: IBaseLink; node: IBaseNode; tooltip: { left: number; }; background: string; } export interface IOnAction { showLinks: boolean; showNodeLabel: boolean; cancelLight: (type: boolean) => void; onClick: (data: any) => void; } export interface IOnAction { showLinks: boolean; showNodeLabel: boolean; cancelLight: (type: boolean) => void; onClick: (data: any) => void; } export interface IBaseLegendType { color: string; group: number; } export interface IBaseLegend { visible?: boolean; show?: boolean; left?: number; top?: number | string; type?: Array; label: { fillStyle: string; fontSize: number; }; select: { type: string; }; onClick: (item: any) => void; } export interface IBaseLink { strokeStyle: string; distance: number; type: string; width: number; arrow: { show: boolean; aLength: number; aWidth: number; fillStyle: string; }; label: { show: boolean; fontSize: number; fontFamily: string; textAlign: string; textBaseline: string; textFillStyle: string; rectFillStyle: string; textOffset: number; textWidth: number; }; attr: { type: string; }; selected: { borderWidth: number; borderFillStyle: string; }; edited: { strokeStyle: string; width: number; }; onHovered: { callback: (link: any) => void; }; onEdit: (link: any) => void; onHover: (link: any) => void; onClick: (link: any) => void; onContextMenu: (link: any) => void; onClicked: { callback: (link: any) => void; }; } export interface IBaseNode { label: { fontSize: number; fontFamily: string; textAlign: string; textBaseline: string; fillStyle: string; attrName: string; space: string; distance: number; textOffset: string; }; attr: { show: boolean; fontSize: number; fillStyle: string; width: number; radius: number; }; radius: number; fillStyle: string; borderable: boolean; shadowBlur: number; shadowOffsetX: number; shadowOffsetY: number; filling: boolean; onSelected: { borderWidth: number; lineWidth: number; borderFillStyle: string; }; selected: { borderWidth: number; lineWidth: number; siteCenter: boolean; borderFillStyle: string; }; edited: { fillStyle: string; borderFillStyle: string; textColor: string; textWidth: number; radius: number; }; onHotKeyClick: (node: any) => void; onHover: (node: any) => void; onDragStart: (node: any) => void; onDragIng: (node: any) => void; onDragEnd: (node: any) => void; onHovered: { callback: (node: any) => void; }; onClicked: { callback: (node: any) => void; }; onClick: (node: any) => void; onContextMenu: (node: any) => void; onDblClicked: { callback: (node: any) => void; }; onDblClick: (node: any) => void; onEdit: (node: any) => void; }