feat(dashboard): Show a shared viewer's floating buttons for what it holds, live
A shared viewer has no menu, only floating buttons, and those followed the
device rather than the session: a touch viewer got the touch gamepad toggle
whether or not it held a slot, and never the on-screen keyboard button,
though a collaborator handed keyboard and mouse input had no other way to
type on a touch screen.
Both cores now publish what the page holds (lib/viewer-grants.ts): a
gamepad slot from the role verdict, or from the #playerN keyword without
tokens, and input from MK_ACCESS or mk_access. They mirror it on
window.selkiesViewerGrants and post viewerGrants on every change, so the
buttons follow the controller handing slots and input around. A viewer
shows the touch gamepad toggle while it holds a slot and the keyboard
button while it holds input, both in the bottom right corner side by
side, and both go back to those places whenever what is shown changes, so
a button that arrives never lands on one that was dragged. A slot taken
away hides the touch overlay with it. A page holding a session token
always mounts the dashboard, whose verdict decides what it shows; a
legacy #shared page, which holds no slot, shows nothing.
The touch gamepad toggle steps aside while a physical standard-layout pad
is in use (state/physical-gamepad.ts), unless the overlay is up, and comes
back when the pad goes; the synthetic pad is told apart by its id, now
exported by the touch gamepad. The keyboard button already hides once a
physical keyboard is used; turning it on now pins it against that verdict
until it is turned off again.