/// import { ChangeAction } from './change-api'; import { Vector2d } from './geometry'; export interface Size { width: number; height: number; } export interface Style { 'react-flow-editor'?: string; dot?: string; input?: string; output?: string; left?: string; right?: string; connections?: string; node?: string; collapsed?: string; expander?: string; selected?: string; header?: string; icon?: string; 'arrow-down'?: string; 'arrow-right'?: string; body?: string; 'react-flow-creating-node'?: string; grid?: string; } export interface Config { resolver: (node: Node) => JSX.Element; connectionValidator?: (output: { nodeId: string; port: number; }, input: { nodeId: string; port: number; }) => boolean; onChanged?: (node: ChangeAction, updateProps: () => void) => void; demoMode?: boolean; connectionType?: 'bezier' | 'linear'; grid?: boolean | { size: number; }; connectionAnchorsLength?: number; direction?: 'ew' | 'we'; disableZoom?: boolean; style?: Style; } export interface Node { name: string; type: string; id: string; payload?: any; inputs: InputPort[]; outputs: OutputPort[]; position?: Vector2d; properties?: { display: 'stacked' | 'only-dots'; }; classNames?: string[]; isCollapsed?: boolean; initial?: { isCollapsed?: boolean; }; } export interface Connection { nodeId: string; port: number; classNames?: string[]; notes?: string; } export interface Port { name: string; connection?: Connection | Connection[]; payload?: any; renderer?: (connection: Port) => JSX.Element; } export declare type InputPort = Port & {}; export declare type OutputPort = Port & {};