pub fn insert_node(root: &mut LayoutNode, node: LayoutNode)Expand description
Insert node using the TypeScript scoring heuristic (up to
DEFAULT_MAX_CHILDREN per node before descending). If the target location
is a leaf, it is promoted to a group first via ensure_group_node.
Mirrors insertNode / addChildAt in frontend/layout/lib/layoutTree.ts.