import * as React from 'react'; import { Vector2d } from './geometry'; import { Size, Node, Config } from './types'; import { NodeState } from './adjust'; export declare namespace Editor { interface Props { config: Config; nodes: Node[]; style?: React.CSSProperties; additionalClassName?: string; } } declare type ItemType = 'node' | 'connection'; interface WorkItemConnection { type: 'connection'; input: Vector2d; output: Vector2d; } declare type WorkItem = WorkItemConnection; declare type State = { nodesState: Map; connectionState: Map; selection?: { type: ItemType; id: string; }; workingItem?: WorkItem; transformation: { dx: number; dy: number; zoom: number; }; componentSize: Size; }; export interface Endpoint { nodeId: string; port: number; kind: 'input' | 'output'; additionalClassName?: string[]; notes?: string; name?: string; } export declare class Editor extends React.Component { private currentAction?; private endpointCache; private gridSize?; private editorBoundingRect?; constructor(props: Editor.Props); private initialState; private select; private toggleExpandNode; private onDragStarted; private onDragEnded; private onDrag; private onCreateConnectionStarted; private onCreateConnectionEnded; private removeFromArrayOrValue; private removeConnection; private createConnection; private onKeyDown; private onMouseGlobalDown; private onWheel; private setConnectionEndpoint; private updateEditorSize; private connection; private connectionPath; private onEditorUpdate; render(): JSX.Element; createNewNode(name: string, factory: () => Node, pos: Vector2d): void; onStartCreatingNewNode(name: string, factory: () => Node, pos: Vector2d, offset: Vector2d, additionalClassNames?: string[]): void; getPositions(): Map; } export {};