Revert "Remove slots from layoutTypes"

This reverts commit 18f78ff786.
This commit is contained in:
Benjamin Lu
2025-08-14 21:39:27 -04:00
parent 027f0e6437
commit 3c5991f73b

View File

@@ -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[]
}