Pre-built methods for spreading into an adapter that needs them.
Current selection. Re-renders trigger when this reference changes.
Apply a click to the selection per the configured mode/extend key.
single: replaces selection with [id], regardless of modifiers.multi: with the extend key held, toggles id in/out of the selection;
otherwise replaces with [id].Clear selection.
Imperative read for use inside event callbacks (avoids stale closures).
API returned by useSelection.