UNPKG

@selenite/graph-editor

Version:

A graph editor for visual programming, based on rete and svelte.

32 lines (31 loc) 955 B
import type { ClassicPreset } from 'rete'; import type { Socket } from './Socket.svelte'; import type { Control } from '../control'; import { Port, type PortParams } from './port.svelte'; export declare class Input<S extends Socket = Socket> extends Port<S> implements ClassicPreset.Input<S> { readonly isRequired: boolean; /** * Control instance */ control: Control | null; /** * Whether the control is visible. Can be managed dynamically by extensions. Default is `true` */ showControl: boolean; alwaysShowLabel: boolean; hideLabel: boolean; constructor(params: PortParams<S> & { alwaysShowLabel?: boolean; hideLabel?: boolean; isRequired?: boolean; }); /** * Add control to the input port * @param control Control instance */ addControl(control: Control): void; /** * Remove control from the input port */ removeControl(): void; }