From 3c5991f73b243c46ed70db1247bd74fd6ad3f7b1 Mon Sep 17 00:00:00 2001 From: Benjamin Lu Date: Thu, 14 Aug 2025 21:39:27 -0400 Subject: [PATCH] Revert "Remove slots from layoutTypes" This reverts commit 18f78ff786411f640bb22dd52d917501fad53b04. --- src/types/layoutTypes.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/types/layoutTypes.ts b/src/types/layoutTypes.ts index a4e2ee36ee..541874bb9a 100644 --- a/src/types/layoutTypes.ts +++ b/src/types/layoutTypes.ts @@ -28,6 +28,7 @@ export interface Bounds { // ID types for type safety export type NodeId = string +export type SlotId = string export type ConnectionId = string // Layout data structures @@ -41,12 +42,18 @@ export interface NodeLayout { bounds: Bounds } +export interface SlotLayout { + id: SlotId + nodeId: NodeId + position: Point // Relative to node + type: 'input' | 'output' + index: number +} + export interface ConnectionLayout { id: ConnectionId - sourceNodeId: NodeId - sourceSlotIndex: number - targetNodeId: NodeId - targetSlotIndex: number + sourceSlot: SlotId + targetSlot: SlotId // Control points for curved connections controlPoints?: Point[] }