Graph (cangraph)
Primary APIs
| API | Behavior |
|---|---|
createCanvasController(options) | Creates a graph-only controller with shared document and history methods. |
controller.dispatch(command) | Runs a typed cangraph command and records it in shared history. |
GraphCanvas | Renders nodes, edges, handles, controls, and graph overlays. |
useNodesState(initial) | Creates controlled node state plus change handler. |
useEdgesState(initial) | Creates controlled edge state plus change handler. |
addEdge(connection, edges) | Builds an edge from a connection and returns a new edge array. |
applyNodeChanges(changes, nodes) | Applies controlled node updates. |