import type { AnimationOptions } from '../../animations/types'; import type { BaseEdgeStyleProps } from '../../elements/edges'; import type { Graph } from '../../runtime/graph'; import type { EdgeData } from '../data'; import type { AnimationStage } from './animation'; import type { PaletteOptions } from './palette'; /** * 边配置项 * * Edge spec */ export interface EdgeOptions { /** * 边类型 * * Edge type */ type?: string | ((this: Graph, datum: EdgeData) => string); /** * 边样式 * * Edge style */ style?: EdgeStyle | ((this: Graph, data: EdgeData) => EdgeStyle) | { [K in keyof EdgeStyle]: EdgeStyle[K] | ((this: Graph, data: EdgeData) => EdgeStyle[K]); }; /** * 边状态样式 * * Edge state style */ state?: Record EdgeStyle) | { [K in keyof EdgeStyle]: EdgeStyle[K] | ((this: Graph, data: EdgeData) => EdgeStyle[K]); }>; /** * 边动画 * * Edge animation */ animation?: false | Record; /** * 色板 * * Palette */ palette?: PaletteOptions; } export interface StaticEdgeOptions { style?: EdgeStyle; state?: Record; animation?: false | Record; palette?: PaletteOptions; } export interface EdgeStyle extends Partial { [key: string]: unknown; }