| 155 | ]; |
| 156 | |
| 157 | function createNode(step: typeof allSteps[0], visible: boolean, position?: { x: number; y: number }): Node { |
| 158 | return { |
| 159 | id: step.id, |
| 160 | type: 'custom', |
| 161 | position: position || positions[step.id], |
| 162 | data: { |
| 163 | title: step.label, |
| 164 | description: step.description, |
| 165 | phase: step.phase, |
| 166 | }, |
| 167 | style: { |
| 168 | width: nodeWidth, |
| 169 | height: nodeHeight, |
| 170 | opacity: visible ? 1 : 0, |
| 171 | transition: 'opacity 0.5s ease-in-out', |
| 172 | pointerEvents: visible ? 'auto' : 'none', |
| 173 | }, |
| 174 | }; |
| 175 | } |
| 176 | |
| 177 | function createEdge(conn: typeof edgeConnections[0], visible: boolean): Edge { |
| 178 | return { |