import { RenderLink } from './RenderLink'; import { CustomEventTarget } from '../infrastructure/CustomEventTarget'; import { LinkConnectorEventMap } from '../infrastructure/LinkConnectorEventMap'; import { INodeInputSlot, INodeOutputSlot, LinkNetwork, 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 an existing link that is currently being dragged by the user from one slot to another. * * This is a heavier, but short-lived convenience data structure. * All refs to {@link MovingInputLink} and {@link MovingOutputLink} 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 abstract class MovingLinkBase implements RenderLink { readonly network: LinkNetwork; readonly link: LLink; readonly toType: "input" | "output"; readonly fromReroute?: Reroute | undefined; readonly dragDirection: LinkDirection; abstract readonly node: LGraphNode; abstract readonly fromSlot: INodeOutputSlot | INodeInputSlot; abstract readonly fromPos: Point; abstract readonly fromDirection: LinkDirection; abstract 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 | undefined, dragDirection?: LinkDirection); abstract connectToInput(node: LGraphNode, input: INodeInputSlot, events?: CustomEventTarget): void; abstract connectToOutput(node: LGraphNode, output: INodeOutputSlot, events?: CustomEventTarget): void; abstract connectToSubgraphInput(input: SubgraphInput, events?: CustomEventTarget): void; abstract connectToSubgraphOutput(output: SubgraphOutput, events?: CustomEventTarget): void; abstract connectToRerouteInput(reroute: Reroute, { node, input, link }: { node: LGraphNode; input: INodeInputSlot; link: LLink; }, events: CustomEventTarget, originalReroutes: Reroute[]): void; abstract connectToRerouteOutput(reroute: Reroute, outputNode: LGraphNode, output: INodeOutputSlot, events: CustomEventTarget): void; abstract disconnect(): boolean; }