The canonical, framework-agnostic tree controller — instance #6 of the
BIMETAL component family. Built on @bimetal/headless-core, so it shares the
identity-stable getSnapshot/subscribe contract and the errors-as-state
surface; the framework packages are pure bindings.
createTreeController owns every hierarchy interaction: expand/collapse,
selection, keyboard navigation, keyboard and drag move/reparent (cycle-free by
construction), tri-state checkboxes, the rename dialog and undo. Ships the real
role="tree"/treeitem a11y contract, not a list wearing tree classes.
The cut line is the family's: DOM measurement and listener registration belong
to the framework; every if belongs here.