diff --git a/package.json b/package.json index 2142474d..a44a8abc 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "open-stage-control", "productName": "Open Stage Control", "description": "Libre and modular OSC / MIDI controller", - "version": "1.9.14", + "version": "1.10.0", "author": { "name": "Jean-Emmanuel Doucet", "email": "jean-emmanuel@ammd.net" diff --git a/resources/docs/docs/widgets/properties-reference.md b/resources/docs/docs/widgets/properties-reference.md index 6c5bd384..fc23c61a 100644 --- a/resources/docs/docs/widgets/properties-reference.md +++ b/resources/docs/docs/widgets/properties-reference.md @@ -43,8 +43,8 @@ |
alphaFillOn#
| `number` | "auto" | Fill color opacity (on). | |
lineWidth#
| `number` | "auto" | Stroke width. | |
padding#
| `number` | "auto" | Inner spacing. | - |
html#
| `string` | "" | Custom html content to be inserted in the widget (before the widget's content).

The code is automatically wrapped in <div class="html"></div>

Allowed HTML tags:

  h1-6, blockquote, p, a, ul, ol, nl, li,

  b, i, strong, em, strike, code, hr, br, div,

  table, thead, img, caption, tbody, tr, th, td, pre

Allowed attributes:

  <*>: class, style, title

  <img>: src, width, height | - |
css#
| `string` | "" | CSS rules. See documentation.

Available css variables:
- `--color-background`: `colorBg`
- `--color-widget`: `colorWidget`
- `--color-fill`: `colorFill`
- `--color-stroke`: `colorStroke`
- `--color-text`: `colorText`
- `--widget-padding`: `padding`
- `--line-width`: `lineWidth`
- `--alpha-fill-on`: `alphaFillOn`
- `--alpha-fill-off`: `alphaFillOff`
- `--alpha-stroke`: `alphaStroke` | + |
html#
| `string` | "" | Custom html content to be inserted in the widget (before the widget's content). Elements are all unstyled by default, `css` should be used to customize their appearance.

The code is automatically wrapped in <div class="html"></div>

Allowed HTML tags:

  h1-6, blockquote, p, a, ul, ol, nl, li,

  b, i, strong, em, strike, code, hr, br, div,

  table, thead, img, caption, tbody, tr, th, td, pre

Allowed attributes:

  <*>: class, style, title

  <img>: src, width, height | + |
css#
| `string` | "" | CSS rules. See documentation.

Some style-related properties can be set or read from css using css variables:
- `--color-background`: `colorBg`
- `--color-widget`: `colorWidget`
- `--color-fill`: `colorFill`
- `--color-stroke`: `colorStroke`
- `--color-text`: `colorText`
- `--widget-padding`: `padding`
- `--line-width`: `lineWidth`
- `--alpha-fill-on`: `alphaFillOn`
- `--alpha-fill-off`: `alphaFillOff`
- `--alpha-stroke`: `alphaStroke` | === "value" @@ -83,7 +83,7 @@ | property | type |default | description | | --- | --- | --- | --- | - |
css#
| `string` | "" | CSS rules. See documentation.

Available css variables:
- `--color-background`: `colorBg`
- `--color-widget`: `colorWidget`
- `--color-fill`: `colorFill`
- `--color-stroke`: `colorStroke`
- `--color-text`: `colorText`
- `--widget-padding`: `padding`
- `--line-width`: `lineWidth`
- `--alpha-fill-on`: `alphaFillOn`
- `--alpha-fill-off`: `alphaFillOff`
- `--alpha-stroke`: `alphaStroke`
- `--color-text-on`: `colorTextOn` | + |
css#
| `string` | "" | CSS rules. See documentation.

Some style-related properties can be set or read from css using css variables:
- `--color-background`: `colorBg`
- `--color-widget`: `colorWidget`
- `--color-fill`: `colorFill`
- `--color-stroke`: `colorStroke`
- `--color-text`: `colorText`
- `--widget-padding`: `padding`
- `--line-width`: `lineWidth`
- `--alpha-fill-on`: `alphaFillOn`
- `--alpha-fill-off`: `alphaFillOff`
- `--alpha-stroke`: `alphaStroke`
- `--color-text-on`: `colorTextOn` | |
colorTextOn#
| `string` | "auto" | Defines the widget's text color when active. | |
label#
| `string`|
`boolean` | "auto" | Set to `false` to hide completely
- Insert icons using the prefix ^ followed by the icon's name : `^play`, `^pause`, etc (see https://fontawesome.com/icons?d=gallery&s=solid&m=free)
- Icons can be transformed with the following suffixes: `.flip-[horizontal|vertical|both]`, `.rotate-[90|180|270]`, `.spin`, `.pulse`. Example: `^play.flip-horizontal` | |
vertical#
| `boolean` | false | Set to `true` to display the text vertically | @@ -105,7 +105,7 @@ | property | type |default | description | | --- | --- | --- | --- | - |
css#
| `string` | "" | CSS rules. See documentation.

Available css variables:
- `--color-background`: `colorBg`
- `--color-widget`: `colorWidget`
- `--color-fill`: `colorFill`
- `--color-stroke`: `colorStroke`
- `--color-text`: `colorText`
- `--widget-padding`: `padding`
- `--line-width`: `lineWidth`
- `--alpha-fill-on`: `alphaFillOn`
- `--alpha-fill-off`: `alphaFillOff`
- `--alpha-stroke`: `alphaStroke`
- `--color-text-on`: `colorTextOn` | + |
css#
| `string` | "" | CSS rules. See documentation.

Some style-related properties can be set or read from css using css variables:
- `--color-background`: `colorBg`
- `--color-widget`: `colorWidget`
- `--color-fill`: `colorFill`
- `--color-stroke`: `colorStroke`
- `--color-text`: `colorText`
- `--widget-padding`: `padding`
- `--line-width`: `lineWidth`
- `--alpha-fill-on`: `alphaFillOn`
- `--alpha-fill-off`: `alphaFillOff`
- `--alpha-stroke`: `alphaStroke`
- `--color-text-on`: `colorTextOn` | |
colorTextOn#
| `string` | "auto" | Defines the widget's text color when active. | |
layout#
| `string` | "vertical" | Defines how items should be laid out

Choices: `vertical`, `horizontal`, `grid` | |
gridTemplate#
| `string`|
`number` | "" | If `layout` is `grid`, can be either a number of columns or a valid value for the css property "grid-template". | @@ -173,6 +173,7 @@ | property | type |default | description | | --- | --- | --- | --- | + |
css#
| `string` | "" | CSS rules. See documentation.

Some style-related properties can be set or read from css using css variables:
- `--color-background`: `colorBg`
- `--color-widget`: `colorWidget`
- `--color-fill`: `colorFill`
- `--color-stroke`: `colorStroke`
- `--color-text`: `colorText`
- `--widget-padding`: `padding`
- `--line-width`: `lineWidth`
- `--alpha-fill-on`: `alphaFillOn`
- `--alpha-fill-off`: `alphaFillOff`
- `--alpha-stroke`: `alphaStroke`
- `--alpha-pips`: `alphaPips`
- `--alpha-pips-text`: `alphaPipsText`

Canvas-based widget have their computed width and height available as css variables (read-only):
- `--widget-width`
- `--widget-height` | |
align#
| `string` | "center" | Set to `left` or `right` to change text alignment (otherwise center)

Choices: `center`, `left`, `right` | |
unit#
| `string` | "" | Unit will be appended to the displayed widget's value (it doesn't affect osc messages) | @@ -184,6 +185,15 @@ |
numeric#
| `boolean` | false | Set to `true` to allow numeric values only and display a numeric keyboard on mobile devices | |
validation#
| `string` | "" | Regular expression: if the submitted value doesn't match the regular expression, it will be reset to the last valid value.

If leading and trailing slashes are omitted, they will be added automatically and the flag will be set to "gm"

Examples:
- `^[0-9]*$` accepts digits only, any number of them
- `/^[a-zs]{0,10}$/i` accept between 0 and 10 alphabetic characters and spaces (case insensitive) | + === "scripting" + + | property | type |default | description | + | --- | --- | --- | --- | + |
script#
| `script` | "" | Script executed whenever the widget's value updates. See documentation.

Canvas-based widget have their computed width and height available as local variables:
- `locals.width`
- `locals.height` | + +??? api "
textarea#
" + Text area (multi line input). Tip: hit shift + enter for new lines. + ??? api "
file#
" File/Folder selector (server-side). @@ -386,6 +396,12 @@ |
inputs#
| `array`|
`object` | [
 "input_1",
 "input_2"
]
| - `Array` of input names : `['input_1', 'input_2']`
- `Object` of `"label_1": "input_1"` pairs. Numeric labels must be prepended or appended with a white space (or any other non-numeric character) otherwise the order of the values won't be kept



Patchbay inputs can be connected to one or more outputs and will send messages of the following form when they are connected/disconnected:

`/patchbay_address input_x output_x output_y etc`

If no output is connected to the input, the message will be `/patchbay_address input_x`

The inputs values can be consumed with the property inheritance syntax: `@{patchbay_id/input_1}` returns an array of output names connected to `input_1` | |
outputs#
| `array`|
`object` | [
 "output_1",
 "output_2"
]
| List of output values the inputs can connect to (see `inputs`). | + === "scripting" + + | property | type |default | description | + | --- | --- | --- | --- | + |
script#
| `script` | "" | Script executed whenever the widget's value updates. See documentation.

Canvas-based widget have their computed width and height available as local variables:
- `locals.width`
- `locals.height` | + ??? api "
root#
" Main (unique) container @@ -512,6 +528,7 @@ | property | type |default | description | | --- | --- | --- | --- | + |
css#
| `string` | "" | CSS rules. See documentation.

Some style-related properties can be set or read from css using css variables:
- `--color-background`: `colorBg`
- `--color-widget`: `colorWidget`
- `--color-fill`: `colorFill`
- `--color-stroke`: `colorStroke`
- `--color-text`: `colorText`
- `--widget-padding`: `padding`
- `--line-width`: `lineWidth`
- `--alpha-fill-on`: `alphaFillOn`
- `--alpha-fill-off`: `alphaFillOff`
- `--alpha-stroke`: `alphaStroke`
- `--alpha-pips`: `alphaPips`
- `--alpha-pips-text`: `alphaPipsText`

Canvas-based widget have their computed width and height available as css variables (read-only):
- `--widget-width`
- `--widget-height` | |
dots#
| `boolean` | false | Draw dots on the line | |
bars#
| `boolean` | false | Set to `true` to use draw bars instead (disables `logScaleX` and forces `x axis` even spacing) | |
pips#
| `boolean` | true | Set to `false` to hide the scale | @@ -530,6 +547,12 @@ | --- | --- | --- | --- | |
value#
| `array`|
`string` | "" | - `Array` of `y` values: `[y1, y2, ...]`
- `Array` of `[x, y]` `array` values: `[[x1 , y1], [x2, y2], ...]`
- `String` `array`: `"[y1, y2, ...]"` or `"[[x1 , y1], [x2, y2], ...]"`
- `String` `object` to update specific coordinates only: `"{0: y1, 1: y2}"` or `"{0: [x1, y1], 1: [x2, y2]}"` | + === "scripting" + + | property | type |default | description | + | --- | --- | --- | --- | + |
script#
| `script` | "" | Script executed whenever the widget's value updates. See documentation.

Canvas-based widget have their computed width and height available as local variables:
- `locals.width`
- `locals.height` | + ??? api "
eq#
" Draws logarithmic frequency response from an array of filter objects. @@ -537,6 +560,7 @@ | property | type |default | description | | --- | --- | --- | --- | + |
css#
| `string` | "" | CSS rules. See documentation.

Some style-related properties can be set or read from css using css variables:
- `--color-background`: `colorBg`
- `--color-widget`: `colorWidget`
- `--color-fill`: `colorFill`
- `--color-stroke`: `colorStroke`
- `--color-text`: `colorText`
- `--widget-padding`: `padding`
- `--line-width`: `lineWidth`
- `--alpha-fill-on`: `alphaFillOn`
- `--alpha-fill-off`: `alphaFillOff`
- `--alpha-stroke`: `alphaStroke`
- `--alpha-pips`: `alphaPips`
- `--alpha-pips-text`: `alphaPipsText`

Canvas-based widget have their computed width and height available as css variables (read-only):
- `--widget-width`
- `--widget-height` | |
dots#
| `boolean` | false | Draw dots on the line | |
bars#
| `boolean` | false | Set to `true` to use draw bars instead (disables `logScaleX` and forces `x axis` even spacing) | |
pips#
| `boolean` | true | Set to `false` to hide the scale | @@ -557,6 +581,12 @@ | --- | --- | --- | --- | |
value#
| `array`|
`string` | "" | - `Array` of `y` values: `[y1, y2, ...]`
- `Array` of `[x, y]` `array` values: `[[x1 , y1], [x2, y2], ...]`
- `String` `array`: `"[y1, y2, ...]"` or `"[[x1 , y1], [x2, y2], ...]"`
- `String` `object` to update specific coordinates only: `"{0: y1, 1: y2}"` or `"{0: [x1, y1], 1: [x2, y2]}"` | + === "scripting" + + | property | type |default | description | + | --- | --- | --- | --- | + |
script#
| `script` | "" | Script executed whenever the widget's value updates. See documentation.

Canvas-based widget have their computed width and height available as local variables:
- `locals.width`
- `locals.height` | + ??? api "
visualizer#
" Display its value over time. @@ -564,6 +594,7 @@ | property | type |default | description | | --- | --- | --- | --- | + |
css#
| `string` | "" | CSS rules. See documentation.

Some style-related properties can be set or read from css using css variables:
- `--color-background`: `colorBg`
- `--color-widget`: `colorWidget`
- `--color-fill`: `colorFill`
- `--color-stroke`: `colorStroke`
- `--color-text`: `colorText`
- `--widget-padding`: `padding`
- `--line-width`: `lineWidth`
- `--alpha-fill-on`: `alphaFillOn`
- `--alpha-fill-off`: `alphaFillOff`
- `--alpha-stroke`: `alphaStroke`
- `--alpha-pips`: `alphaPips`
- `--alpha-pips-text`: `alphaPipsText`

Canvas-based widget have their computed width and height available as css variables (read-only):
- `--widget-width`
- `--widget-height` | |
pips#
| `boolean` | true | Set to `false` to hide the scale | === "visualizer" @@ -583,6 +614,12 @@ | property | type |default | description | | --- | --- | --- | --- | |
value#
| `array`|
`string` | "" | - `Array` of `y` values: `[y1, y2, ...]`
- `Array` of `[x, y]` `array` values: `[[x1 , y1], [x2, y2], ...]`
- `String` `array`: `"[y1, y2, ...]"` or `"[[x1 , y1], [x2, y2], ...]"`
- `String` `object` to update specific coordinates only: `"{0: y1, 1: y2}"` or `"{0: [x1, y1], 1: [x2, y2]}"` | + + === "scripting" + + | property | type |default | description | + | --- | --- | --- | --- | + |
script#
| `script` | "" | Script executed whenever the widget's value updates. See documentation.

Canvas-based widget have their computed width and height available as local variables:
- `locals.width`
- `locals.height` | ## Indicators ??? api "
led#
" @@ -628,6 +665,7 @@ | property | type |default | description | | --- | --- | --- | --- | + |
css#
| `string` | "" | CSS rules. See documentation.

Some style-related properties can be set or read from css using css variables:
- `--color-background`: `colorBg`
- `--color-widget`: `colorWidget`
- `--color-fill`: `colorFill`
- `--color-stroke`: `colorStroke`
- `--color-text`: `colorText`
- `--widget-padding`: `padding`
- `--line-width`: `lineWidth`
- `--alpha-fill-on`: `alphaFillOn`
- `--alpha-fill-off`: `alphaFillOff`
- `--alpha-stroke`: `alphaStroke`
- `--alpha-pips`: `alphaPips`
- `--alpha-pips-text`: `alphaPipsText`

Canvas-based widget have their computed width and height available as css variables (read-only):
- `--widget-width`
- `--widget-height` | |
pointSize#
| `integer` | 20 | Defines the points' size | |
ephemeral#
| `boolean` | false | When set to `true`, the point will be drawn only while touched. | |
pips#
| `boolean` | true | Set to `false` to hide the scale | @@ -645,6 +683,12 @@ |
doubleTap#
| `boolean`|
`string` | false | Set to `true` to make the fader reset to its default value when receiving a double tap.

Can also be an osc address, which case the widget will just send an osc message: `/ ` | |
sensitivity#
| `number` | 1 | Defines the pad's sensitivity when `snap` is `false` | + === "scripting" + + | property | type |default | description | + | --- | --- | --- | --- | + |
script#
| `script` | "" | Script executed whenever the widget's value updates. See documentation.

Canvas-based widget have their computed width and height available as local variables:
- `locals.width`
- `locals.height` | + ??? api "
rgb#
" Color picker with optional alpha slider. @@ -665,6 +709,7 @@ | property | type |default | description | | --- | --- | --- | --- | + |
css#
| `string` | "" | CSS rules. See documentation.

Some style-related properties can be set or read from css using css variables:
- `--color-background`: `colorBg`
- `--color-widget`: `colorWidget`
- `--color-fill`: `colorFill`
- `--color-stroke`: `colorStroke`
- `--color-text`: `colorText`
- `--widget-padding`: `padding`
- `--line-width`: `lineWidth`
- `--alpha-fill-on`: `alphaFillOn`
- `--alpha-fill-off`: `alphaFillOff`
- `--alpha-stroke`: `alphaStroke`
- `--alpha-pips`: `alphaPips`
- `--alpha-pips-text`: `alphaPipsText`

Canvas-based widget have their computed width and height available as css variables (read-only):
- `--widget-width`
- `--widget-height` | |
pointSize#
| `integer` | 20 | Defines the points' size | |
ephemeral#
| `boolean` | false | When set to `true`, the points will be drawn only while touched. | |
pips#
| `boolean` | true | Set to `false` to hide the scale | @@ -681,6 +726,12 @@ |
logScaleX#
| `boolean`|
`number` | false | Set to `true` to use logarithmic scale for the x axis. Set to `-1` for exponential scale. | |
logScaleY#
| `boolean`|
`number` | false | Set to `true` to use logarithmic scale for the y axis. Set to `-1` for exponential scale. | |
sensitivity#
| `number` | 1 | Defines the pad's sensitivity when `snap` is `false` | + + === "scripting" + + | property | type |default | description | + | --- | --- | --- | --- | + |
script#
| `script` | "" | Script executed whenever the widget's value updates. See documentation.

Canvas-based widget have their computed width and height available as local variables:
- `locals.width`
- `locals.height` | ## Sliders ??? api "
fader#
" @@ -690,7 +741,7 @@ | property | type |default | description | | --- | --- | --- | --- | - |
css#
| `string` | "" | CSS rules. See documentation.

Available css variables:
- `--color-background`: `colorBg`
- `--color-widget`: `colorWidget`
- `--color-fill`: `colorFill`
- `--color-stroke`: `colorStroke`
- `--color-text`: `colorText`
- `--widget-padding`: `padding`
- `--line-width`: `lineWidth`
- `--alpha-fill-on`: `alphaFillOn`
- `--alpha-fill-off`: `alphaFillOff`
- `--alpha-stroke`: `alphaStroke`
- `--alpha-pips`: `alphaPips`
- `--alpha-pips-text`: `alphaPipsText`
- `--knob-size`: `knobSize` | + |
css#
| `string` | "" | CSS rules. See documentation.

Some style-related properties can be set or read from css using css variables:
- `--color-background`: `colorBg`
- `--color-widget`: `colorWidget`
- `--color-fill`: `colorFill`
- `--color-stroke`: `colorStroke`
- `--color-text`: `colorText`
- `--widget-padding`: `padding`
- `--line-width`: `lineWidth`
- `--alpha-fill-on`: `alphaFillOn`
- `--alpha-fill-off`: `alphaFillOff`
- `--alpha-stroke`: `alphaStroke`
- `--alpha-pips`: `alphaPips`
- `--alpha-pips-text`: `alphaPipsText`

Canvas-based widget have their computed width and height available as css variables (read-only):
- `--widget-width`
- `--widget-height` | |
design#
| `string` | "default" | Design style

Choices: `default`, `round`, `compact` | |
knobSize#
| `number` | "auto" | Fader knob size | |
horizontal#
| `boolean` | false | Set to `true` to display the fader horizontally | @@ -708,9 +759,15 @@ |
range#
| `object` | \{
 "min": 0,
 "max": 1
}
| Defines the breakpoints of the fader's scale:
- keys can be percentages and/or `min` / `max`
- values can be `number` or `object` if a custom label is needed

Example: (`{min:{"-inf": 0}, "50%": 0.25, max: {"+inf": 1}}`) | |
logScale#
| `boolean`|
`number` | false | Set to `true` to use logarithmic scale. Set to `-1` for exponential scale. | |
sensitivity#
| `number` | 1 | Defines the fader's sensitivity when `snap` is `false` | - |
steps#
| `string`|
`number`|
`array` | "" | Restricts the widget's value:
- `auto`: use values defined in `range`
- `number`: define a number of evenly spaced steps
- `array`: use arbitrary values | + |
steps#
| `string`|
`number`|
`array` | "" | Restricts the widget's value:
- `empty` or `0`: use values defined in `range`
- `number`: define a number of evenly spaced steps
- `array`: use arbitrary values | |
origin#
| `number` | "auto" | Defines the starting point's value of the fader's gauge | + === "scripting" + + | property | type |default | description | + | --- | --- | --- | --- | + |
script#
| `script` | "" | Script executed whenever the widget's value updates. See documentation.

Canvas-based widget have their computed width and height available as local variables:
- `locals.width`
- `locals.height` | + ??? api "
knob#
" Rotative knob slider. @@ -718,7 +775,7 @@ | property | type |default | description | | --- | --- | --- | --- | - |
css#
| `string` | "" | CSS rules. See documentation.

Available css variables:
- `--color-background`: `colorBg`
- `--color-widget`: `colorWidget`
- `--color-fill`: `colorFill`
- `--color-stroke`: `colorStroke`
- `--color-text`: `colorText`
- `--widget-padding`: `padding`
- `--line-width`: `lineWidth`
- `--alpha-fill-on`: `alphaFillOn`
- `--alpha-fill-off`: `alphaFillOff`
- `--alpha-stroke`: `alphaStroke`
- `--alpha-pips`: `alphaPips`
- `--alpha-pips-text`: `alphaPipsText` | + |
css#
| `string` | "" | CSS rules. See documentation.

Some style-related properties can be set or read from css using css variables:
- `--color-background`: `colorBg`
- `--color-widget`: `colorWidget`
- `--color-fill`: `colorFill`
- `--color-stroke`: `colorStroke`
- `--color-text`: `colorText`
- `--widget-padding`: `padding`
- `--line-width`: `lineWidth`
- `--alpha-fill-on`: `alphaFillOn`
- `--alpha-fill-off`: `alphaFillOff`
- `--alpha-stroke`: `alphaStroke`
- `--alpha-pips`: `alphaPips`
- `--alpha-pips-text`: `alphaPipsText`

Canvas-based widget have their computed width and height available as css variables (read-only):
- `--widget-width`
- `--widget-height` | |
design#
| `string` | "default" | Design style

Note: "solid" design uses "colorStroke" for the central knob color.

Choices: `default`, `solid`, `line` | |
pips#
| `boolean` | false | Set to `true` to show the scale's breakpoints | |
dashed#
| `boolean`|
`array` | false | Set to `true` to display a dashed gauge. Can be set as an `array` of two numbers : `[dash_size, gap_size]` | @@ -734,9 +791,15 @@ |
range#
| `object` | \{
 "min": 0,
 "max": 1
}
| Defines the breakpoints of the fader's scale:
- keys can be percentages and/or `min` / `max`
- values can be `number` or `object` if a custom label is needed

Example: (`{min:{"-inf": 0}, "50%": 0.25, max: {"+inf": 1}}`) | |
logScale#
| `boolean`|
`number` | false | Set to `true` to use logarithmic scale. Set to `-1` for exponential scale. | |
sensitivity#
| `number` | 1 | Defines the knob's sensitivity when `mode` is not `snap` | - |
steps#
| `string`|
`number`|
`array` | "" | Restricts the widget's value:
- `auto`: use values defined in `range`
- `number`: define a number of evenly spaced steps
- `array`: use arbitrary values | + |
steps#
| `string`|
`number`|
`array` | "" | Restricts the widget's value:
- `empty` or `0`: use values defined in `range`
- `number`: define a number of evenly spaced steps
- `array`: use arbitrary values | |
origin#
| `number` | "auto" | Defines the starting point's value of the knob's gauge | + === "scripting" + + | property | type |default | description | + | --- | --- | --- | --- | + |
script#
| `script` | "" | Script executed whenever the widget's value updates. See documentation.

Canvas-based widget have their computed width and height available as local variables:
- `locals.width`
- `locals.height` | + ??? api "
encoder#
" A knob that sends a relative direction infomation instead of an absolute value. @@ -744,7 +807,7 @@ | property | type |default | description | | --- | --- | --- | --- | - |
css#
| `string` | "" | CSS rules. See documentation.

Available css variables:
- `--color-background`: `colorBg`
- `--color-widget`: `colorWidget`
- `--color-fill`: `colorFill`
- `--color-stroke`: `colorStroke`
- `--color-text`: `colorText`
- `--widget-padding`: `padding`
- `--line-width`: `lineWidth`
- `--alpha-fill-on`: `alphaFillOn`
- `--alpha-fill-off`: `alphaFillOff`
- `--alpha-stroke`: `alphaStroke`
- `--alpha-pips`: `alphaPips`
- `--alpha-pips-text`: `alphaPipsText` | + |
css#
| `string` | "" | CSS rules. See documentation.

Some style-related properties can be set or read from css using css variables:
- `--color-background`: `colorBg`
- `--color-widget`: `colorWidget`
- `--color-fill`: `colorFill`
- `--color-stroke`: `colorStroke`
- `--color-text`: `colorText`
- `--widget-padding`: `padding`
- `--line-width`: `lineWidth`
- `--alpha-fill-on`: `alphaFillOn`
- `--alpha-fill-off`: `alphaFillOff`
- `--alpha-stroke`: `alphaStroke`
- `--alpha-pips`: `alphaPips`
- `--alpha-pips-text`: `alphaPipsText`

Canvas-based widget have their computed width and height available as css variables (read-only):
- `--widget-width`
- `--widget-height` | === "encoder" @@ -764,7 +827,7 @@ | property | type |default | description | | --- | --- | --- | --- | - |
script#
| `script` | "" | Script executed whenever the widget's value updates. See documentation.

Additionnal variables:
- `locals.speed`: encoder's speed (reduce `sensitivity to increase averaging`) | + |
script#
| `script` | "" | Script executed whenever the widget's value updates. See documentation.

Canvas-based widget have their computed width and height available as local variables:
- `locals.width`
- `locals.height`

Additionnal variables:
- `locals.speed`: encoder's speed (reduce `sensitivity` to increase averaging)
- `locals.angle`: encoder's angle in degrees | ??? api "
range#
" A fader with two heads for setting a range. @@ -773,7 +836,7 @@ | property | type |default | description | | --- | --- | --- | --- | - |
css#
| `string` | "" | CSS rules. See documentation.

Available css variables:
- `--color-background`: `colorBg`
- `--color-widget`: `colorWidget`
- `--color-fill`: `colorFill`
- `--color-stroke`: `colorStroke`
- `--color-text`: `colorText`
- `--widget-padding`: `padding`
- `--line-width`: `lineWidth`
- `--alpha-fill-on`: `alphaFillOn`
- `--alpha-fill-off`: `alphaFillOff`
- `--alpha-stroke`: `alphaStroke`
- `--alpha-pips`: `alphaPips`
- `--alpha-pips-text`: `alphaPipsText`
- `--knob-size`: `knobSize` | + |
css#
| `string` | "" | CSS rules. See documentation.

Some style-related properties can be set or read from css using css variables:
- `--color-background`: `colorBg`
- `--color-widget`: `colorWidget`
- `--color-fill`: `colorFill`
- `--color-stroke`: `colorStroke`
- `--color-text`: `colorText`
- `--widget-padding`: `padding`
- `--line-width`: `lineWidth`
- `--alpha-fill-on`: `alphaFillOn`
- `--alpha-fill-off`: `alphaFillOff`
- `--alpha-stroke`: `alphaStroke`
- `--alpha-pips`: `alphaPips`
- `--alpha-pips-text`: `alphaPipsText`

Canvas-based widget have their computed width and height available as css variables (read-only):
- `--widget-width`
- `--widget-height` | |
design#
| `string` | "default" | Design style

Choices: `default`, `round`, `compact` | |
knobSize#
| `number` | "auto" | Fader knob size | |
horizontal#
| `boolean` | false | Set to `true` to display the fader horizontally | @@ -791,7 +854,13 @@ |
range#
| `object` | \{
 "min": 0,
 "max": 1
}
| Defines the breakpoints of the fader's scale:
- keys can be percentages and/or `min` / `max`
- values can be `number` or `object` if a custom label is needed

Example: (`{min:{"-inf": 0}, "50%": 0.25, max: {"+inf": 1}}`) | |
logScale#
| `boolean`|
`number` | false | Set to `true` to use logarithmic scale. Set to `-1` for exponential scale. | |
sensitivity#
| `number` | 1 | Defines the fader's sensitivity when `snap` is `false` | - |
steps#
| `string`|
`number`|
`array` | "" | Restricts the widget's value:
- `auto`: use values defined in `range`
- `number`: define a number of evenly spaced steps
- `array`: use arbitrary values | + |
steps#
| `string`|
`number`|
`array` | "" | Restricts the widget's value:
- `empty` or `0`: use values defined in `range`
- `number`: define a number of evenly spaced steps
- `array`: use arbitrary values | + + === "scripting" + + | property | type |default | description | + | --- | --- | --- | --- | + |
script#
| `script` | "" | Script executed whenever the widget's value updates. See documentation.

Canvas-based widget have their computed width and height available as local variables:
- `locals.width`
- `locals.height` | ## Scripts ??? api "
script#
"