export type PortSide = 'top' | 'right' | 'bottom' | 'left'; export interface NoodleConnection { /** Unique connection ID (auto-generated via uid if not provided) */ id: string; /** Element ID for the source element */ from: string; /** Element ID for the target element */ to: string; /** Port side on the source element (default: 'right') */ fromPort: PortSide; /** Port side on the target element (default: 'left') */ toPort: PortSide; /** Optional color override for this specific noodle */ color?: string; } export interface NoodleOptions { /** CSS selector for elements that can be connection endpoints (default: '[data-noodle-port]') */ selector?: string; /** Allow interactive creation/deletion of connections (default: false) */ editable?: boolean; /** Noodle stroke color (default: 'var(--n-color-accent-500)') */ color?: string; /** Noodle stroke width in px (default: 2) */ strokeWidth?: number; /** Bezier curve tension — how far control points extend (default: 0.5) */ tension?: number; /** Show port indicator dots on connectable elements (default: true when editable) */ showPorts?: boolean; /** Port indicator dot size in px (default: 10) */ portSize?: number; /** Initial connections (default: []) */ connections?: NoodleConnection[]; /** Noodle curve style (default: 'bezier') */ style?: 'bezier' | 'step' | 'straight'; /** Animate noodles with a flowing dash pattern (default: false) */ animated?: boolean; /** Disable the controller */ disabled?: boolean; } /** Renders SVG noodle connections between DOM elements within a host container. */ export declare class NoodleController { #private; readonly host: HTMLElement; selector: string; editable: boolean; color: string; strokeWidth: number; tension: number; showPorts: boolean; portSize: number; style: 'bezier' | 'step' | 'straight'; animated: boolean; disabled: boolean; constructor(host: HTMLElement, options?: NoodleOptions); attach(): void; detach(): void; destroy(): void; /** Add a connection. Returns the connection ID. */ connect(from: string, to: string, fromPort?: PortSide, toPort?: PortSide): string; /** Remove a connection by ID. */ disconnect(id: string): boolean; /** Remove all connections. */ clear(): void; /** Get all current connections. */ getConnections(): NoodleConnection[]; /** Replace all connections. */ setConnections(connections: NoodleConnection[]): void; /** Force re-render all paths and rebuild port indicators. * Call after programmatic element moves or when the set of port elements changes. */ update(): void; } //# sourceMappingURL=noodle-controller.d.ts.map