Skip to main content

Nodes and hierarchy

The canonical node records, geometry, parent relationships, and z-order.

Nodes are immutable JSON Canvas records. Vue components render them later.

Supported types are text, file, link, and group. Shared fields include ID, position, size, z-index, visibility, lock state, parent ID, and color. Type-specific content lives directly on the record.

createNode() accepts partial input, fills defaults, and selects the result unless select: false is set. Use complete deterministic records in initialNodes for SSR and fixtures.

Hierarchy uses parentId. Core owns reparenting, cycle prevention, group capture, and z-order policy. Deleting or changing a parent cannot leave an observable invalid hierarchy because validation occurs before commit.

Use asNodeId() for stable explicit IDs. Do not store the same domain field in both application state and node content without a defined canonical owner and rebuild path.