Files
hyperframes/packages
Miguel Ángel 3ec26b5e27 feat(studio): shared menu, popover and value-control primitives (#4191)
* feat(studio): shared Menu, ContextMenu and Popover primitives

One menu chrome and one popover chrome, on Base UI, wearing the theme
tokens. Dismissal is plain Base UI with no capture-phase wrapper: its
outside-press listeners are registered on document with capture set, so
the canvas overlay's bubble-phase stopPropagation cannot starve them.

Menu items carry an optional mono shortcut hint, a disabled state and a
danger tone. ContextMenu opens at the pointer. Popover shares the
surface, radius and open motion but owns no item semantics, so a text
field inside it keeps its own keys.

Also adds [role='menuitemradio'] to the playback-shortcut ignore list.
The hand-rolled speed menu spelled its rows as buttons, which that list
already matched; the shared radio item is a div with the same role, and
nothing else in the list matched it, so an open speed menu would have
leaked arrow keys and Space to the player.

* feat(studio): shared Input, NumberField, Select, Slider and Toggle primitives

The five value controls exist once, on Base UI, wearing the theme tokens.
Each is boxed with a visible border and a focus ring so an inspector value
reads as an input rather than as its own label.

Value writes happen at a commit boundary, never per keystroke or per pointer
move: one drag is one onCommit and one telemetry call. Right-click and Escape
abort a drag in flight and put the pre-drag value back.

The switch role joins the typing-target selector list, so a Toggle keeps the
keys the native checkbox it replaces owned.

No consumer moves onto these yet.

* refactor(studio): shorten the primitives' comments and stop a default string reading as a class

Main's comment gate rejects long comment blocks, and the class gate read the
MenuItem tone default as a Tailwind class. The prop is optional instead.

* feat(studio): export the shared primitives from the package entry

A host mounting Studio pieces in its own tree imports them from the package:
cn, Menu family, Popover, Input, NumberField, Select, Slider and Toggle.
2026-09-19 15:33:01 -04:00
..
2026-09-19 08:51:27 -07:00
2026-09-19 08:51:27 -07:00
2026-09-19 08:51:27 -07:00
2026-09-19 08:51:27 -07:00
2026-09-19 08:51:27 -07:00
2026-09-19 08:51:27 -07:00
2026-09-19 08:51:27 -07:00
2026-09-19 08:51:27 -07:00