import { CanvasColour, DefaultConnectionColors, INodeInputSlot, INodeOutputSlot, INodeSlot, OptionalProps, Point, ReadOnlyPoint } from '../interfaces'; import { LGraphNode } from '../LGraphNode'; import { SubgraphInput } from '../subgraph/SubgraphInput'; import { SubgraphOutput } from '../subgraph/SubgraphOutput'; import { LabelPosition } from '../draw'; import { SlotBase } from './SlotBase'; export interface IDrawOptions { colorContext: DefaultConnectionColors; labelPosition?: LabelPosition; lowQuality?: boolean; doStroke?: boolean; highlight?: boolean; } /** Shared base class for {@link LGraphNode} input and output slots. */ export declare abstract class NodeSlot extends SlotBase implements INodeSlot { #private; pos?: Point; /** The center point of this slot when the node is collapsed. */ abstract get collapsedPos(): ReadOnlyPoint; get node(): LGraphNode; get highlightColor(): CanvasColour; abstract get isWidgetInputSlot(): boolean; constructor(slot: OptionalProps, node: LGraphNode); /** * Whether this slot is a valid target for a dragging link. * @param fromSlot The slot that the link is being connected from. */ abstract isValidTarget(fromSlot: INodeInputSlot | INodeOutputSlot | SubgraphInput | SubgraphOutput): boolean; /** * The label to display in the UI. */ get renderingLabel(): string; draw(ctx: CanvasRenderingContext2D, { colorContext, labelPosition, lowQuality, highlight, doStroke, }: IDrawOptions): void; drawCollapsed(ctx: CanvasRenderingContext2D): void; }