Arm a tool in a pointer-mode (the rail slot reflects it). Idempotent.
Drop every subscriber (called on UI teardown).
The armed tool for a pointer-mode ('pointer'/null = default).
A copy of the current state (safe to read; mutations don't leak back).
Whether a pointer-mode's tool panel is currently expanded.
Whether the View flyout is open (i.e. View is the active mode).
Expand / collapse a pointer-mode's tool panel. Idempotent.
Subscribe to state changes. Returns an unsubscribe fn (pass to UIComponent.track).
Enter View mode, or leave it back to the last pointer-mode.
A tiny observable holding the mode-rail state. The rail, contextual tool panel and View flyout subscribe to it; clicks / keybindings dispatch to it. Setters are idempotent — they only notify when the value actually changes — and every notification carries a fresh snapshot so a listener can't mutate the store's internal state.
subscribefires on changes only; render initial state from getState first, then subscribe for updates.