Document and session state
Why rendered state and exported state can differ during a gesture.
Committed document state contains the records a successful command can persist. Session state contains browser measurements, active interaction, snap guides, clipboard data, and transient geometry.
Document and session state
Effective geometry can move without changing the exported document.
Try this Drag the card slowly. While the pointer is down, compare effective and exported coordinates. Release to commit or press Escape to cancel.
// Rendering reads effective runtime state\nengine.$nodes.subscribe(render)\n\n// Persistence reads committed document state\nconst document = engine.exportDocument()During a drag, $nodes exposes effective geometry: committed nodes plus transient overrides. exportDocument() continues to return committed geometry. Releasing the pointer commits the final position once. Escape or pointer cancellation discards the override.
This distinction prevents every pointer move from becoming a document transaction or history entry. The trade-off is intentional: runtime and exported coordinates may differ while the gesture is active.
Persist exportDocument(), not getState(), Vue refs, or DOM state.