import { RenderLink } from './RenderLink'; import { CustomEventTarget } from '../infrastructure/CustomEventTarget'; import { LinkConnectorEventMap } from '../infrastructure/LinkConnectorEventMap'; import { INodeOutputSlot, LinkNetwork, INodeInputSlot, Point } from '../interfaces'; import { LGraphNode, NodeId } from '../LGraphNode'; import { LLink } from '../LLink'; import { Reroute } from '../Reroute'; import { SubgraphInput } from '../subgraph/SubgraphInput'; import { SubgraphOutput } from '../subgraph/SubgraphOutput'; import { LinkDirection } from '../types/globalEnums'; /** * Represents a floating link that is currently being dragged from one slot to another. * * This is a heavier, but short-lived convenience data structure. All refs to FloatingRenderLinks should be discarded on drop. * @remarks * At time of writing, Litegraph is using several different styles and methods to handle link dragging. * * Once the library has undergone more substantial changes to the way links are managed, * many properties of this class will be superfluous and removable. */ export declare class FloatingRenderLink implements RenderLink { readonly network: LinkNetwork; readonly link: LLink; readonly toType: "input" | "output"; readonly fromReroute: Reroute; readonly dragDirection: LinkDirection; readonly node: LGraphNode; readonly fromSlot: INodeOutputSlot | INodeInputSlot; readonly fromPos: Point; readonly fromDirection: LinkDirection; readonly fromSlotIndex: number; readonly outputNodeId: NodeId; readonly outputNode?: LGraphNode; readonly outputSlot?: INodeOutputSlot; readonly outputIndex: number; readonly outputPos?: Point; readonly inputNodeId: NodeId; readonly inputNode?: LGraphNode; readonly inputSlot?: INodeInputSlot; readonly inputIndex: number; readonly inputPos?: Point; constructor(network: LinkNetwork, link: LLink, toType: "input" | "output", fromReroute: Reroute, dragDirection?: LinkDirection); canConnectToInput(): boolean; canConnectToOutput(): boolean; canConnectToReroute(reroute: Reroute): boolean; connectToInput(node: LGraphNode, input: INodeInputSlot, _events?: CustomEventTarget): void; connectToOutput(node: LGraphNode, output: INodeOutputSlot, _events?: CustomEventTarget): void; connectToSubgraphInput(input: SubgraphInput, _events?: CustomEventTarget): void; connectToSubgraphOutput(output: SubgraphOutput, _events?: CustomEventTarget): void; connectToRerouteInput(reroute: Reroute, { node: inputNode, input }: { node: LGraphNode; input: INodeInputSlot; }, events: CustomEventTarget): void; connectToRerouteOutput(reroute: Reroute, outputNode: LGraphNode, output: INodeOutputSlot, events: CustomEventTarget): void; }