pub fn delete_node(
root: &mut LayoutNode,
node_id: &str,
) -> Result<(), LayoutError>Expand description
Remove the node with the given id from the tree.
Returns Ok(()) on success, or Err(NodeNotFound) if node_id is not
in the tree. Callers are responsible for clearing focused_node_id if
needed (spec §7.1). Collapses single-child parents.