WorkflowCanvas

@Composable
fun WorkflowCanvas(nodes: List<CanvasNode>, edges: List<CanvasEdge>, modifier: Modifier = Modifier, nodeSize: DpSize = DpSize(200.dp, 64.dp), showControls: Boolean = true, onNodeClick: (CanvasNode) -> Unit? = null, nodeContent: @Composable (CanvasNode) -> Unit? = null, nodeToolbar: @Composable (CanvasNode) -> Unit? = null, panel: @Composable BoxScope.() -> Unit = {})(source)

A pannable, pinch-zoomable node graph (AI Elements <Canvas>): dot-grid background, curved edges with arrowheads and optional labels, and zoom / fit controls (<Controls>). Edges run from a node's bottom to the next node's top.

Extension points: nodeContent replaces the default node card (<Node>), nodeToolbar floats above the selected node (<Toolbar>; tapping a node selects it, tapping it again clears), and panel overlays the canvas (<Panel>; align it with Modifier.align).