Add a colour-wheel widget to the dashboard

A custom hue ring — a conic gradient, not a canvas — with saturation and
brightness sliders beside or under it depending on the tile's shape, sized
for a wall panel and reachable from a keyboard. It publishes [h, s, v] by
default, which is what the reference installation's DMX encoders read, and
`format` switches that to [r, g, b] or "#rrggbb".

`usePublish` moves to its own module so a widget in a file of its own can
reach it without importing `widgets.tsx` back.
This commit is contained in:
2026-08-22 12:50:59 +02:00
parent 3cc2d353cd
commit 9927577cec
13 changed files with 804 additions and 101 deletions
+7
View File
@@ -45,6 +45,13 @@ and dragging is off. Picking a widget and editing its settings still works.
| **Slider** | `float`, `int` | min, max, step |
| **Input** | text or a number | free entry |
| **Dropdown** | one of a list | a mode, a scene, a preset |
| **Colour** | `[h, s, v]`, `[r, g, b]` or `"#rrggbb"` | a hue wheel with saturation and brightness, for an RGB fixture |
The colour wheel sends `[h, s, v]` by default — hue 0-360 degrees, saturation
and value 0-100 percent, which is what a DMX encoder expects — and its
**Sends** setting switches that to `[r, g, b]` (0-255 each) or to a
`"#rrggbb"` string, because fixtures differ. The first two bind a `list`
message, the third a `str`.
A control publishes the message it is bound to, exactly as a node would. On the
flow canvas it is drawn as a labelled endpoint feeding the nodes that read it,