import { SubgraphInputNode } from './SubgraphInputNode'; import { SubgraphOutput } from './SubgraphOutput'; import { SubgraphInputEventMap } from '../infrastructure/SubgraphInputEventMap'; import { INodeInputSlot, INodeOutputSlot, Point, ReadOnlyRect } from '../interfaces'; import { LGraphNode } from '../LGraphNode'; import { RerouteId } from '../Reroute'; import { IBaseWidget } from '../types/widgets'; import { CustomEventTarget } from '../infrastructure/CustomEventTarget'; import { LLink } from '../LLink'; import { SubgraphSlot } from './SubgraphSlotBase'; /** * An input "slot" from a parent graph into a subgraph. * * IMPORTANT: A subgraph "input" is both an input AND an output. It creates an extra link connection point between * a parent graph and a subgraph, so is conceptually similar to a reroute. * * This can be a little confusing, but is easier to visualise when imagining editing a subgraph. * You have "Subgraph Inputs", because they are coming into the subgraph, which then connect to "node inputs". * * Functionally, however, when editing a subgraph, that "subgraph input" is the "origin" or "output side" of a link. */ export declare class SubgraphInput extends SubgraphSlot { #private; parent: SubgraphInputNode; events: CustomEventTarget; get _widget(): IBaseWidget> | undefined; set _widget(widget: IBaseWidget> | undefined); connect(slot: INodeInputSlot, node: LGraphNode, afterRerouteId?: RerouteId): LLink | undefined; get labelPos(): Point; getConnectedWidgets(): IBaseWidget[]; /** * Validates that the connection between the new slot and the existing widget is valid. * Used to prevent connections between widgets that are not of the same type. * @param otherWidget The widget to compare to. * @returns `true` if the connection is valid, otherwise `false`. */ matchesWidget(otherWidget: IBaseWidget): boolean; disconnect(): void; /** For inputs, x is the right edge of the input node. */ arrange(rect: ReadOnlyRect): void; /** * Checks if this slot is a valid target for a connection from the given slot. * For SubgraphInput (which acts as an output inside the subgraph), * the fromSlot should be an input slot. */ isValidTarget(fromSlot: INodeInputSlot | INodeOutputSlot | SubgraphInput | SubgraphOutput): boolean; }