UNPKG

@selenite/graph-editor

Version:

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

26 lines (25 loc) 998 B
import type { Socket, Input } from '../../socket'; import type { SocketType } from '../../plugins/typed-sockets'; import type { ClassicPreset } from 'rete'; import type { NodeFactory } from '../../editor'; import { AddPinNode, type AddPinNodeState } from '../AddPinNode'; export type MakeArrayNodeState = { type: SocketType; } & AddPinNodeState; export declare class MakeArrayNode extends AddPinNode { state: MakeArrayNodeState; initialValues: Record<string, unknown>; numConnections: number; constructor(params: { factory: NodeFactory; initialValues: Record<string, unknown>; numPins?: number; }); loadInitialValues(): void; changeType(to: SocketType): void; changeInputType(input: ClassicPreset.Input<Socket>, to: SocketType): void; data(inputs?: Record<string, Input<Socket>> | undefined): Record<string, unknown> | Promise<Record<string, unknown>>; onAddPin(index: number): void; addPin(): void; applyState(): void; }