Document the icon and colour names a forecast can carry
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013GAeg4Jo6xjZzjwy9QDWMQ
This commit is contained in:
@@ -174,6 +174,28 @@ carry one of them literally is asking for a value this engine reads as a name.
|
|||||||
|
|
||||||
Enforced on the server as well as in the editor.
|
Enforced on the server as well as in the editor.
|
||||||
|
|
||||||
|
## Icon and colour names
|
||||||
|
|
||||||
|
A forecast is a `list` of records, one per column, each shaped
|
||||||
|
`{label, icon, value}` with an optional `color`. The flow decides what a
|
||||||
|
column is called and which glyph it gets; the widget only draws it.
|
||||||
|
|
||||||
|
```json
|
||||||
|
[{"label": "Today", "icon": "cloud-rain", "color": "primary", "value": "14°"}]
|
||||||
|
```
|
||||||
|
|
||||||
|
`icon` and `color` are names from a fixed vocabulary, the same one the icon
|
||||||
|
widget's picker offers:
|
||||||
|
|
||||||
|
| | Names |
|
||||||
|
|---|---|
|
||||||
|
| Icons | `sun`, `moon`, `cloudy`, `cloud-rain`, `cloud-drizzle`, `cloud-snow`, `cloud-lightning`, `cloud-fog`, `wind`, `umbrella`, `snowflake`, `droplets`, `thermometer`, `thermometer-sun`, `flame`, `fan`, `sun-snow`, `door-open`, `house`, `bed`, `lightbulb`, `plug`, `music`, `volume-2`, `volume-x`, `zap`, `battery-charging`, `arrow-up`, `arrow-down`, `triangle-alert`, `check`, `circle-check` |
|
||||||
|
| Colours | `default`, `muted`, `primary`, `success`, `danger` |
|
||||||
|
|
||||||
|
An empty icon draws nothing. An unknown one draws a placeholder glyph and an
|
||||||
|
unknown colour draws as `default`; either warns once in the browser console,
|
||||||
|
listing the names it expected.
|
||||||
|
|
||||||
## Type failures
|
## Type failures
|
||||||
|
|
||||||
A value that does not match its port's declaration raises on the node that
|
A value that does not match its port's declaration raises on the node that
|
||||||
|
|||||||
Reference in New Issue
Block a user