/** * Leaf module shared by `` and ``. * * A submenu makes the two components mutually dependent — the menu drives its items' submenus, * and an item drives the `` assigned to its `submenu` slot. `menu.class.ts` already * imports `menu-item.class.ts`, so the return edge (even as `import type`, which the import-cycle * gate counts) would close a cycle. Everything both sides need therefore lives here instead. */ /** * Where roving focus lands when a menu opens. `'none'` opens without moving DOM focus at all — * what pointer-driven opening needs, so a submenu that appears under the cursor never yanks focus * away from the keyboard's current position (and never strands it on a hidden element when the * pointer moves on again). */ export type MenuFocusTarget='first'|'last'|'none';