From 682250f4318e4e8ede793e56e8ee15704935948e Mon Sep 17 00:00:00 2001 From: bordun Date: Thu, 19 Sep 2019 12:27:32 +0200 Subject: [PATCH] docs: fix vertical pipe formatting --- resources/docs/docs/widgets-reference.md | 126 +++++++++++++---------- scripts/build-widgets-reference.js | 4 +- 2 files changed, 73 insertions(+), 57 deletions(-) diff --git a/resources/docs/docs/widgets-reference.md b/resources/docs/docs/widgets-reference.md index a88692ac..254ffff8 100644 --- a/resources/docs/docs/widgets-reference.md +++ b/resources/docs/docs/widgets-reference.md @@ -6,24 +6,24 @@ | --- | --- | --- | --- | |

type#

| `string` | "auto" | | |

id#

| `string` | "auto" | Widgets sharing the same `id` will act as clones and update each other's value(s) without sending extra osc messages. | -|

linkId#

| `string`\|
`array` | "" | Widgets sharing the same `linkId` update each other's value(s) AND send their respective osc messages.

When prefixed with >>, the `linkId` will make the widget act as a master (sending but not receiving)

When prefixed with <<, the `linkId` will make the widget act as a slave (receiving but not sending) | +|

linkId#

| `string`|
`array` | "" | Widgets sharing the same `linkId` update each other's value(s) AND send their respective osc messages.

When prefixed with >>, the `linkId` will make the widget act as a master (sending but not receiving)

When prefixed with <<, the `linkId` will make the widget act as a slave (receiving but not sending) | |

geometry#

|||| -|

left#

| `number`\|
`string` | "auto" | When both top and left are set to auto, the widget is positioned according to the normal flow of the page (from left to right, by order of creation).

Otherwise, the widget will be absolutely positioned | -|

top#

| `number`\|
`percentage` | "auto" | When both top and left are set to auto, the widget is positioned according to the normal flow of the page (from left to right, by order of creation).

Otherwise, the widget will be absolutely positioned | -|

width#

| `number`\|
`percentage` | "auto" | | -|

height#

| `number`\|
`percentage` | "auto" | | +|

left#

| `number`|
`string` | "auto" | When both top and left are set to auto, the widget is positioned according to the normal flow of the page (from left to right, by order of creation).

Otherwise, the widget will be absolutely positioned | +|

top#

| `number`|
`percentage` | "auto" | When both top and left are set to auto, the widget is positioned according to the normal flow of the page (from left to right, by order of creation).

Otherwise, the widget will be absolutely positioned | +|

width#

| `number`|
`percentage` | "auto" | | +|

height#

| `number`|
`percentage` | "auto" | | |

style#

|||| -|

label#

| `string`\|
`boolean` | "auto" | Set to `false` to hide completely

Insert icons using the prefix ^ followed by the icon's name : ^play, ^pause, etc | +|

label#

| `string`|
`boolean` | "auto" | Set to `false` to hide completely

Insert icons using the prefix ^ followed by the icon's name : ^play, ^pause, etc | |

color#

| `string` | "auto" | Defines the widget's accent color (css variable `--custom-color`). Must be a valid CSS color. Set to "auto" to inherit from parent widget. | |

css#

| `string` | "" | CSS rules. See documentation. | |

value#

|||| |

default#

| `*` | "" | If set, the widget will be initialized with this value when the session is loaded. | |

value#

| `*` | "" | Define the widget's value depending on other widget's values / properties using property inheritance and property maths | |

osc#

|||| -|

precision#

| `integer`\|
`string` | 2 | Defines the number of decimals to display and to send.

Set to `0` to send integers only.

Data type can be specified by appending a valid osc type tag to the precision value, for example : `3d` will make the widget send double precision numbers rounded to three decimals | +|

precision#

| `integer`|
`string` | 2 | Defines the number of decimals to display and to send.

Set to `0` to send integers only.

Data type can be specified by appending a valid osc type tag to the precision value, for example : `3d` will make the widget send double precision numbers rounded to three decimals | |

address#

| `string` | "auto" | OSC address for sending messages, it must start with a / | -|

preArgs#

| `*`\|
`array` | "" | A value or array of values that will be prepended to the OSC messages.

Values can be defined as objects if the osc type tag needs to be specified: `{type: "i", value: 1}` | -|

target#

| `string`\|
`array`\|
`null` | "" | This defines the targets of the widget's OSC messages
- A `string` or `array` of strings formatted as follow: `ip:port` or `["ip:port"]`
- If midi is enabled, targets can be `midi:device_name`
- The special item `"self"` can be used to refer to the emitting client directly.
- If no target is set, messages can still be sent if the server has default targets
- The server's default targets can be bypassed by setting one of the items to `null` | +|

preArgs#

| `*`|
`array` | "" | A value or array of values that will be prepended to the OSC messages.

Values can be defined as objects if the osc type tag needs to be specified: `{type: "i", value: 1}` | +|

target#

| `string`|
`array`|
`null` | "" | This defines the targets of the widget's OSC messages
- A `string` or `array` of strings formatted as follow: `ip:port` or `["ip:port"]`
- If midi is enabled, targets can be `midi:device_name`
- The special item `"self"` can be used to refer to the emitting client directly.
- If no target is set, messages can still be sent if the server has default targets
- The server's default targets can be bypassed by setting one of the items to `null` | |

bypass#

| `boolean` | false | Set to `true` to prevent the widget from sending any osc message | ## Sliders @@ -48,8 +48,9 @@ |

spring#

| `boolean` | false | When set to `true`, the widget will go back to its `default` value when released | |

doubleTap#

| `boolean` | false | Set to `true` to make the fader reset to its `default` value when receiving a double tap.

Can also be an osc address, in which case the widget will just send an osc message (`/ `) | |

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}}`) | -|

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 | -|

logScale#

| `boolean`\|
`number` | false | Set to `true` to use logarithmic scale (base 10). Set to a `number` to define the logarithm's base. | +|

logScale#

| `boolean`|
`number` | false | Set to `true` to use logarithmic scale (base 10). Set to a `number` to define the logarithm's base. | +|

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 | |

unit#

| `string` | "" | Unit will be appended to the displayed widget's value (it doesn't affect osc messages) | |

origin#

| `number` | "auto" | Defines the starting point's value of the fader's gauge | |

osc#

|||| @@ -74,8 +75,9 @@ |

spring#

| `boolean` | false | When set to `true`, the widget will go back to its `default` value when released | |

doubleTap#

| `boolean` | false | Set to `true` to make the knob reset to its `default` value when receiving a double tap.

Can also be an osc address, in which case the widget will just send an osc message (`/ `) | |

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}}`) | -|

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 | -|

logScale#

| `boolean`\|
`number` | false | Set to `true` to use logarithmic scale (base 10). Set to a `number` to define the logarithm's base. | +|

logScale#

| `boolean`|
`number` | false | Set to `true` to use logarithmic scale (base 10). Set to a `number` to define the logarithm's base. | +|

sensitivity#

| `number` | 1 | Defines the knob'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 | |

unit#

| `string` | "" | Unit will be appended to the displayed widget's value (it doesn't affect osc messages) | |

origin#

| `number` | "auto" | Defines the starting point's value of the knob's gauge | |

osc#

|||| @@ -92,7 +94,7 @@ A knob that sends a relative direction infomation instead of an absolute value. |

ticks#

| `number` | 360 | defines the granularity / verbosity of the encoder (number of step for a 360° arc) | |

back#

| `*` | -1 | Defines which value is sent when rotating the encoder anticlockwise | |

forth#

| `*` | 1 | Defines which value is sent when rotating the encoder clockwise | -|

release#

| `number` | "auto" | Defines which value is sent when releasing the encoder:
- Set to `null` to send send no argument in the osc message
- Can be an `object` if the type needs to be specified | +|

release#

| `number` | "" | Defines which value is sent when releasing the encoder:
- Set to `null` to send send no argument in the osc message
- Can be an `object` if the type needs to be specified | |

snap#

| `boolean` | false | By default, dragging the widget will modify it's value starting from its last value. Setting this to `true` will make it snap directly to the mouse/touch position | |

doubleTap#

| `boolean` | false | Set to `true` to make the fader reset to its `default` value when receiving a double tap.

Can also be an osc address, in which case the widget will just send an osc message (`/ `) | |

osc#

|||| @@ -116,9 +118,10 @@ A fader with two heads for setting a range. |

snap#

| `boolean` | false | See fader's `snap` | |

spring#

| `boolean` | false | See fader's `spring` | |

logScale#

| `boolean` | false | See fader's `logScale` | +|

sensitivity#

| `number` | 1 | See fader's `sensitivity` | |

osc#

|||| |

touchAddress#

| `string` | "" | See fader's `touchAddress` | -|

split#

| `boolean`\|
`object` | false | Set to `true` to send separate osc messages for `low` and `high` handles. The `address` will be the same as the widget's with `/low` or `/high` appended to it

Can be set as an object to specify a different `address` : `['/osc_address_low', '/osc_address_high']`

Note: the widget will only respond to its original osc address, not to the splitted version | +|

split#

| `boolean`|
`object` | false | Set to `true` to send separate osc messages for `low` and `high` handles. The `address` will be the same as the widget's with `/low` or `/high` appended to it

Can be set as an object to specify a different `address` : `['/osc_address_low', '/osc_address_high']`

Note: the widget will only respond to its original osc address, not to the splitted version | ## Buttons @@ -145,7 +148,6 @@ A fader with two heads for setting a range. |

on#

| `*` | 1 | Set to `null` to send send no argument in the osc message

Can be an `object` if the type needs to be specified (see preArgs) | |

off#

| `*` | 0 | Set to `null` to send send no argument in the osc message

Can be an `object` if the type needs to be specified (see preArgs) | |

norelease#

| `boolean` | false | Set to `true` to prevent sending any osc message when releasing the button | -|

afterTouch#

| `string`\|
`object` | "" | Send afterTouch value to this osc address (between 0 and 1) | ### switch @@ -156,7 +158,7 @@ A fader with two heads for setting a range. |

switch#

|||| |

horizontal#

| `boolean` | false | Set to `true` to display values horizontally | |

showValues#

| `boolean` | false | If values is an object, set to `true` to display both values and labels instead of labels only | -|

values#

| `array`\|
`object` | {
 "Value 1": 1,
 "Value 2": 2
}
| `Array` of possible values to switch between : `[1,2,3]`

`Object` of `"label":value` 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 | +|

values#

| `array`|
`object` | {
 "Value 1": 1,
 "Value 2": 2
}
| `Array` of possible values to switch between : `[1,2,3]`

`Object` of `"label":value` 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 | |

traversing#

| `boolean` | true | Set to `false` to disable traversing gestures | ### dropdown @@ -166,7 +168,7 @@ A fader with two heads for setting a range. | property | type |default | description | | --- | --- | --- | --- | | |||| -| | `array`\|
`object` | {
 "Value 1": 1,
 "Value 2": 2
}
| `Array` of possible values to switch between : `[1,2,3]`

`Object` of label:value 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

An empty option will always be prepended to values (sends an osc message without any value); it can be hidden by adding `option:first-child{display:none}` to the widget's `css` | +| | `array`|
`object` | {
 "Value 1": 1,
 "Value 2": 2
}
| `Array` of possible values to switch between : `[1,2,3]`

`Object` of label:value 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

An empty option will always be prepended to values (sends an osc message without any value); it can be hidden by adding `option:first-child{display:none}` to the widget's `css` | ## Pads @@ -185,13 +187,14 @@ Two-dimensional slider. |

pips#

| `boolean` | true | Set to `false` to hide the scale | |

rangeX#

| `object` | {
 "min": 0,
 "max": 1
}
| Defines the min and max values for the x axis | |

rangeY#

| `object` | {
 "min": 0,
 "max": 1
}
| Defines the min and max values for the y axis | -|

logScaleX#

| `boolean`\|
`number` | false | Set to `true` to use logarithmic scale for the x axis (base 10). Set to a `number` to define the logarithm's base. | -|

logScaleY#

| `boolean`\|
`number` | false | Set to `true` to use logarithmic scale for the y axis (base 10). Set to a `number` to define the logarithm's base. | +|

logScaleX#

| `boolean`|
`number` | false | Set to `true` to use logarithmic scale for the x axis (base 10). Set to a `number` to define the logarithm's base. | +|

logScaleY#

| `boolean`|
`number` | false | Set to `true` to use logarithmic scale for the y axis (base 10). Set to a `number` to define the logarithm's base. | |

input#

| `boolean` | true | Set to false to hide the built-in input widget | -|

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: `/ ` | +|

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` | |

osc#

|||| |

touchAddress#

| `string` | "" | OSC address for touched state messages: `/touchAddress [preArgs] 0/1`) | -|

split#

| `boolean`\|
`object` | false | Set to `true` to send separate osc messages for each point's x and y axis. The address will be the same as the widget's with `/x` or `/y` appended to it

Can be set as an `object` to specify a different address : ['/osc_address_x', '/osc_address_y']

Note: the widget will only respond to its original osc address, not to the splitted version | +|

split#

| `boolean`|
`object` | false | Set to `true` to send separate osc messages for each point's x and y axis. The address will be the same as the widget's with `/x` or `/y` appended to it

Can be set as an `object` to specify a different address : ['/osc_address_x', '/osc_address_y']

Note: the widget will only respond to its original osc address, not to the splitted version | ### rgb @@ -206,7 +209,7 @@ Color picker with optional alpha slider. |

input#

| `boolean` | true | Set to `false` to hide the built-in input widget | |

alpha#

| `boolean` | false | Set to `true` to enable alpha channel | |

osc#

|||| -|

split#

| `boolean`\|
`object` | false | Set to `true` to send separate osc messages for for r and g & b. The address will be the same as the widget's with `/r`, `/g` or `/b` appended to it

Can be set as an `object` to specify a different address : `['/r', '/g', 'b']`

Note: the widget will only respond to its original osc address, not to the splitted version | +|

split#

| `boolean`|
`object` | false | Set to `true` to send separate osc messages for for r and g & b. The address will be the same as the widget's with `/r`, `/g` or `/b` appended to it

Can be set as an `object` to specify a different address : `['/r', '/g', 'b']`

Note: the widget will only respond to its original osc address, not to the splitted version | ### multixy @@ -217,7 +220,7 @@ Multi-point XY pad. |

style#

|||| |

css#

| `string` | "" | Available CSS variables:
- `--background: background;`: sets the dragging area's background
- `--pips-color: color;`
- `--pips-opacity: number;`
- `--color-text: point-color;`

Pads can be targetted individually with the .pad-X selector (where X is the pad's index) | |

multi xy#

|||| -|

points#

| `integer`\|
`array` | 2 | Defines the number of points on the pad

Can be an array of strings that will be used as labels for the points (ex: `['A', 'B']`) | +|

points#

| `integer`|
`array` | 2 | Defines the number of points on the pad

Can be an array of strings that will be used as labels for the points (ex: `['A', 'B']`) | |

xy#

|||| |

pointSize#

| `integer` | 20 | Defines the points' size | |

snap#

| `boolean` | false | By default, the points are dragged from their initial position.

If set to `true`, touching anywhere on the widget's surface will make them snap to the touching coordinates | @@ -225,11 +228,12 @@ Multi-point XY pad. |

pips#

| `boolean` | true | Set to `false` to hide the scale | |

rangeX#

| `object` | {
 "min": 0,
 "max": 1
}
| Defines the min and max values for the x axis | |

rangeY#

| `object` | {
 "min": 0,
 "max": 1
}
| Defines the min and max values for the y axis | -|

logScaleX#

| `boolean`\|
`number` | false | Set to `true` to use logarithmic scale for the x axis (base 10). Set to a `number` to define the logarithm's base. | -|

logScaleY#

| `boolean`\|
`number` | false | Set to `true` to use logarithmic scale for the y axis (base 10). Set to a `number` to define the logarithm's base. | +|

logScaleX#

| `boolean`|
`number` | false | Set to `true` to use logarithmic scale for the x axis (base 10). Set to a `number` to define the logarithm's base. | +|

logScaleY#

| `boolean`|
`number` | false | Set to `true` to use logarithmic scale for the y axis (base 10). Set to a `number` to define the logarithm's base. | +|

sensitivity#

| `number` | 1 | Defines the pad's sensitivity when `snap` is `false` | |

osc#

|||| |

touchAddress#

| `string` | "" | OSC address for touched state messages: `/touchAddress [preArgs] 0/1` | -|

split#

| `boolean`\|
`object` | false | Set to `true` to send separate osc messages for each point's x and y axis. The address will be the same as the widget's with `/N/x` or `/N/y` appended to it, where N is the point's id (or the point's label if points is an array)

Can be set as an `object` to specify a different address : `['/0/x', '/0/y', '/1/x', '/2/y']`

Note: the widget will only respond to its original osc address, not to the splitted version | +|

split#

| `boolean`|
`object` | false | Set to `true` to send separate osc messages for each point's x and y axis. The address will be the same as the widget's with `/N/x` or `/N/y` appended to it, where N is the point's id (or the point's label if points is an array)

Can be set as an `object` to specify a different address : `['/0/x', '/0/y', '/1/x', '/2/y']`

Note: the widget will only respond to its original osc address, not to the splitted version | ## Matrices @@ -264,7 +268,7 @@ Piano keyboard. |

off#

| `*` | 0 | Set to `null` to send send no argument in the osc message

Can be an `object` if the type needs to be specified (see preArgs) | |

toggles#

| `boolean` | false | Set to `true` to make keys bahave like toggle buttons | |

osc#

|||| -|

split#

| `boolean`\|
`string` | false | `true`: the widget's index will be appended to the matrice's osc address

`false`: it will be prepended to the widget's preArgs

`string`: will be used to define the widgets' addresses, replacing dollar signs (`$`) with their respective index (to insert the actual dollar sign, it must be escaped with a backslash (`\$`)) | +|

split#

| `boolean`|
`string` | false | `true`: the widget's index will be appended to the matrice's osc address

`false`: it will be prepended to the widget's preArgs

`string`: will be used to define the widgets' addresses, replacing dollar signs (`$`) with their respective index (to insert the actual dollar sign, it must be escaped with a backslash (`\$`)) | ### patchbay @@ -275,8 +279,8 @@ Connect inputs to outputs. |

style#

|||| |

css#

| `string` | "" | The inputs/ouputs width can be adjusted by using the `.nodes` selector:

`.nodes { width: 25% }` | |

patchbay#

|||| -|

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`). | +|

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`). | ## Plots @@ -289,15 +293,15 @@ XY coordinates plot. |

plot#

|||| |

rangeX#

| `object` | {
 "min": 0,
 "max": 1
}
| Defines the min and max values for the x axis | |

rangeY#

| `object` | {
 "min": 0,
 "max": 1
}
| Defines the min and max values for the y axis | -|

logScaleX#

| `boolean`\|
`number` | false | Set to `true` to use logarithmic scale for the x axis (base 10). Set to a `number` to define the logarithm's base. | -|

logScaleY#

| `boolean`\|
`number` | false | Set to `true` to use logarithmic scale for the y axis (base 10). Set to a `number` to define the logarithm's base. | +|

logScaleX#

| `boolean`|
`number` | false | Set to `true` to use logarithmic scale for the x axis (base 10). Set to a `number` to define the logarithm's base. | +|

logScaleY#

| `boolean`|
`number` | false | Set to `true` to use logarithmic scale for the y axis (base 10). Set to a `number` to define the logarithm's base. | |

origin#

| `number` | "auto" | Defines the y axis origin. Set to `false` to disable it. | |

dots#

| `boolean` | true | | |

bars#

| `boolean` | false | Set to `true` to use draw bars instead (disables `logScaleX` and forces `x axis` even spacing) | -|

smooth#

| `boolean`\|
`number` | false | Set to `true` to make the line smooth. Float values are also acceptable (works fine between `0` and `0.5`) | +|

smooth#

| `boolean`|
`number` | false | Set to `true` to make the line smooth. Float values are also acceptable (works fine between `0` and `0.5`) | |

pips#

| `boolean` | true | Set to `false` to hide the scale | |

value#

|||| -|

value#

| `array`\|
`string` | "" | - `Array` of `y` values
- `Array` of `[x, y]` `array` values
- `String` `array`
- `String` `object` to update specific coordinates only: `{0:1, 4:0}` will change the 1st and 5th points' coordinates | +|

value#

| `array`|
`string` | "" | - `Array` of `y` values
- `Array` of `[x, y]` `array` values
- `String` `array`
- `String` `object` to update specific coordinates only: `{0:1, 4:0}` will change the 1st and 5th points' coordinates | ### eq @@ -309,9 +313,9 @@ Draws frequency response between from from an array of filter objects. |

pips#

| `boolean` | true | Set to false to hide the scale | |

resolution#

| `number` | 128 | Defines the number of points used to compute the frequency response | |

rangeY#

| `object` | {
 "min": 0,
 "max": 1
}
| Defines the min and max values for the y axis | -|

origin#

| `number`\|
`boolean` | "auto" | Defines the y axis origin. Set to `false` to disable it | -|

logScaleX#

| `boolean`\|
`number` | false | Set to `true` to use logarithmic scale for the x axis (base 10). Set to a `number` to define the logarithm's base. | -|

smooth#

| `boolean`\|
`number` | false | Set to `true` to make the line smooth. Float values are also acceptable (works fine between `0` and `0.5`) | +|

origin#

| `number`|
`boolean` | "auto" | Defines the y axis origin. Set to `false` to disable it | +|

logScaleX#

| `boolean`|
`number` | false | Set to `true` to use logarithmic scale for the x axis (base 10). Set to a `number` to define the logarithm's base. | +|

smooth#

| `boolean`|
`number` | false | Set to `true` to make the line smooth. Float values are also acceptable (works fine between `0` and `0.5`) | |

value#

|||| |

value#

| `array` | "" | Each item must be an object with the following properties
- `type`: string ("highpass", "highshelf", "lowpass", "lowshelf", "peak" or "notch")
- `freq`: number (filter's resonant frequency)
- `q`: number (Q factor)
- `gain`: number
- `on`: boolean | @@ -325,8 +329,8 @@ Display its value over time. |

duration#

| `number` | 1 | Defines visualization duration in seconds | |

range#

| `object` | {
 "min": 0,
 "max": 1
}
| Defines the min and max values for the y axis | |

origin#

| `number` | "auto" | Defines the y axis origin. Set to `false` to disable it | -|

logScale#

| `boolean`\|
`number` | false | Set to `true` to use logarithmic scale for the y axis (base 10). Set to a `number` to define the logarithm's base. | -|

smooth#

| `boolean`\|
`number` | false | Set to `true` to make the line smooth. Float values are also acceptable (works fine between `0` and `0.5`) | +|

logScale#

| `boolean`|
`number` | false | Set to `true` to use logarithmic scale for the y axis (base 10). Set to a `number` to define the logarithm's base. | +|

smooth#

| `boolean`|
`number` | false | Set to `true` to make the line smooth. Float values are also acceptable (works fine between `0` and `0.5`) | |

pips#

| `boolean` | true | Set to `false` to hide the scale | ### led @@ -337,7 +341,7 @@ Display its value over time. | --- | --- | --- | --- | |

led#

|||| |

range#

| `object` | {
 "min": 0,
 "max": 1
}
| Value to led intensity mapping range | -|

logScale#

| `boolean`\|
`number` | false | Set to `true` to use logarithmic scale (base 10). Set to a `number` to define the logarithm's base. | +|

logScale#

| `boolean`|
`number` | false | Set to `true` to use logarithmic scale (base 10). Set to a `number` to define the logarithm's base. | ### rgbled @@ -346,7 +350,7 @@ Display its value over time. | property | type |default | description | | --- | --- | --- | --- | |

value#

|||| -|

value#

| `array`\|
`string` | "" | - `Array`: `[r, g, b]` (`r`, `g` and `b` between `0` and `255`)
- `Array`: `[r, g, b, alpha]` (`alpha` between `0` and `255`)
- `String`: CSS color | +|

value#

| `array`|
`string` | "" | - `Array`: `[r, g, b]` (`r`, `g` and `b` between `0` and `255`)
- `Array`: `[r, g, b, alpha]` (`alpha` between `0` and `255`)
- `String`: CSS color | ### meter @@ -365,7 +369,7 @@ Non-interactable fader. |

horizontal#

| `boolean` | false | See fader's `horizontal` | |

pips#

| `boolean` | false | See fader's `pips` | |

dashed#

| `boolean` | false | See fader's `dashed` | -|

gradient#

| `array`\|
`object` | [] | When set, the meter's gauge will be filled with a linear color gradient
- each item must be a CSS color string.
- as an `object`: each key must be a number between 0 and 1
- each item must be a CSS color string.

Examples: `['blue', 'red']`, {'0': 'blue', '0.9': 'blue', '1': 'red'} | +|

gradient#

| `array`|
`object` | [] | When set, the meter's gauge will be filled with a linear color gradient
- each item must be a CSS color string.
- as an `object`: each key must be a number between 0 and 1
- each item must be a CSS color string.

Examples: `['blue', 'red']`, {'0': 'blue', '0.9': 'blue', '1': 'red'} | ### text @@ -401,6 +405,17 @@ Load a image (url or base64-encoded). | --- | --- | --- | --- | |

svg#

|||| |

svg#

| `string` | "" | Svg xml definition:
- will be wrapped in a `< svg />` element
- `` commands support a special percent notation (`%x` and `%y`) | +|

border#

| `boolean` | true | Set to `false` to disable the borders and background-color | + +### html + + + +| property | type |default | description | +| --- | --- | --- | --- | +|

html#

|||| +|

html#

| `string` | "" | 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 | +|

border#

| `boolean` | true | Set to `false` to disable the borders and background-color | ### frame @@ -409,7 +424,7 @@ Embed a page in a frame (local network only). | property | type |default | description | | --- | --- | --- | --- | |

style#

|||| -|

label#

| `string`\|
`boolean` | "auto" | Set to `false` to hide completely

Insert icons using the prefix ^ followed by the icon's name : ^play, ^pause, etc

If set to `false`, all pointer-events will be disabled on the frame as long as the editor is enabled to ensure it can be selected | +|

label#

| `string`|
`boolean` | "auto" | Set to `false` to hide completely

Insert icons using the prefix ^ followed by the icon's name : ^play, ^pause, etc

If set to `false`, all pointer-events will be disabled on the frame as long as the editor is enabled to ensure it can be selected | |

frame#

|||| |

border#

| `boolean` | true | Set to `false` to disable the borders and background-color | |

value#

|||| @@ -444,7 +459,7 @@ Widget container that display its children in a single column or row. |

horizontal#

| `boolean` | false | Set to `true` to display widgets horizontally | |

stretch#

| `boolean` | false | Set to `true` to stretch widgets evenly | |

border#

| `boolean` | true | By default, widgets in panels/strip have their border disabled, except for panels and strips. Set to `false` to apply this rule to the panel too | -|

spacing#

| `integer`\|
`percentage` | 0 | Adds space between widgets. Percents are always relative to the strips width | +|

spacing#

| `integer`|
`percentage` | 0 | Adds space between widgets. Percents are always relative to the strips width | |

children#

|||| |

variables#

| `*` | "@{parent.variables}" | Defines one or more arbitrary variables that can be inherited by children widgets | |

widgets#

| `array` | [] | Each element of the array must be a widget object
- By default, children widgets that don't have an explicit `width`/`height` set will be shrinked to respect the sizes specified by others
- Adding `flex:1;` to a children's `css` will give it the ability the fill the remaining space
- Multiple children can have a `flex:x;` css property (`x` will ponderate their expansion) | @@ -457,11 +472,11 @@ A toggle button that opens a popup panel. Cannot contain tabs directly. | --- | --- | --- | --- | | |||| | | `boolean` | false | Set to `true` to make the modal require a double tap to open instead of a single tap | -| | `string` | "" | Alternative label for the modal popup | -| | `number`\|
`percentage` | "80%" | Modal popup's size | -| | `number`\|
`percentage` | "80%" | Modal popup's size | -| | `number`\|
`percentage` | "auto" | Modal popup's position | -| | `number`\|
`percentage` | "auto" | Modal popup's position | +| | `string` | "" | Alternative label for the modal popup | +| | `number`|
`percentage` | "80%" | Modal popup's size | +| | `number`|
`percentage` | "80%" | Modal popup's size | +| | `number`|
`percentage` | "auto" | Modal popup's position | +| | `number`|
`percentage` | "auto" | Modal popup's position | | | `boolean` | true | Set to `false` to disable scrollbars | | |||| | | `integer` | "" | Defines the modal's state:`0` for closed, `1` for opened | @@ -489,12 +504,12 @@ Save and recall the state of other widgets. | property | type |default | description | | --- | --- | --- | --- | |

state#

|||| -|

filter#

| `string`\|
`array` | "" | Only save state from widgets contained in widgets designated by id. If empty, the whole session's state is saved. Switchers are always ignored.
- widget id `string`
- `array` of widget id strings | +|

filter#

| `string`|
`array` | "" | Only save state from widgets contained in widgets designated by id. If empty, the whole session's state is saved. Switchers are always ignored.
- widget id `string`
- `array` of widget id strings | |

saveLabel#

| `string` | "Save" | Label for save button | |

loadLabel#

| `string` | "Load" | Label for load button | |

horizontal#

| `boolean` | false | Set to `true` to display buttons horizontally | |

value#

|||| -|

value#

| `object`\|
`string` | "" | - `object`: `"widget_id": VALUE` pairs
- `string`: `"save"` (trigger save action), `"load"` (trigger load action) or `""` (reset value)



Note: the widget's actual value is never `"save"` or `"load"`, it's either an empty string or an object. | +|

value#

| `object`|
`string` | "" | - `object`: `"widget_id": VALUE` pairs
- `string`: `"save"` (trigger save action), `"load"` (trigger load action) or `""` (reset value)



Note: the widget's actual value is never `"save"` or `"load"`, it's either an empty string or an object. | ### switcher @@ -503,9 +518,9 @@ Store other widgets' values and recall them. | property | type |default | description | | --- | --- | --- | --- | |

switcher#

|||| -|

linkedWidgets#

| `string`\|
`array` | "" | - `String`: a widget's `id` whose state changes will be stored
- `Array`: a list of widget `id` string | +|

linkedWidgets#

| `string`|
`array` | "" | - `String`: a widget's `id` whose state changes will be stored
- `Array`: a list of widget `id` string | |

horizontal#

| `boolean` | false | Set to `true` to display values horizontally | -|

values#

| `array`\|
`object` | {
 "Value 1": 1,
 "Value 2": 2
}
| Each item represents a bank that stores the values from the widgets listed in `linkedWidgets`
- `Array` of possible values to switch between : `[1,2,3]`
- `Object` of `"label":value` 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 | +|

values#

| `array`|
`object` | {
 "Value 1": 1,
 "Value 2": 2
}
| Each item represents a bank that stores the values from the widgets listed in `linkedWidgets`
- `Array` of possible values to switch between : `[1,2,3]`
- `Object` of `"label":value` 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 | ### crossfader @@ -514,7 +529,7 @@ Switcher with linear interpolation slider. | property | type |default | description | | --- | --- | --- | --- | |

crossfader#

|||| -|

linkedWidgets#

| `string`\|
`array` | "" | - `String`: a widget's `id` whose state changes will be stored
- `Array`: a list of widget `id` string | +|

linkedWidgets#

| `string`|
`array` | "" | - `String`: a widget's `id` whose state changes will be stored
- `Array`: a list of widget `id` string | |

horizontal#

| `boolean` | false | Set to `true` to display values horizontally | ## Inputs @@ -530,6 +545,7 @@ Text input. |

align#

| `string` | "" | Set to `left` or `right` to change text alignment (otherwise center) | |

unit#

| `string` | "" | Unit will be appended to the displayed widget's value (it doesn't affect osc messages) | |

editable#

| `boolean` | true | Set to `false` to make the input non-editable | +|

asYouType#

| `boolean` | false | Set to `true` to make the input send its value at each keystroke | ### keys @@ -538,7 +554,7 @@ Keyboard binding. | property | type |default | description | | --- | --- | --- | --- | |

keys#

|||| -|

binding#

| `string`\|
`array` | "" | Key combo `string` or `array` of strings (see KeyboardJS documentation) | +|

binding#

| `string`|
`array` | "" | Key combo `string` or `array` of strings (see KeyboardJS documentation) | |

keydown#

| `string` | "" | This property is evaluated each time the key combo is pressed and defines the widget's own value. Formulas are given extras variables in this context:
- `key`: pressed key name (usefull for handling multiple keys with a single keys widget, lowercased when referencing a character key)
- `code`: pressed key code name (full list)
- `ctrl`: control key state
- `alt`: alt key state
- `shift`: shift key state
- `meta`: command/windows key state | |

keyup#

| `string` | "" | Same as `keydown`, but evaluated when releasing the key combo | |

repeat#

| `boolean` | true | Set to `false` to prevent keydown repeats when holding the key combo pressed | diff --git a/scripts/build-widgets-reference.js b/scripts/build-widgets-reference.js index eb594d88..907b2295 100644 --- a/scripts/build-widgets-reference.js +++ b/scripts/build-widgets-reference.js @@ -34,7 +34,7 @@ for (var propName in base) { doc.push(` - |

${propName}${dynamic}#

| \`${prop.type.replace(/\|/g,'\`\\|
\`')}\` | ${(JSON.stringify(prop.value, null, ' ') || '').replace(/\n/g,'
')}
| ${help} |` + |

${propName}${dynamic}#

| \`${prop.type.replace(/\|/g,'\`|
\`')}\` | ${(JSON.stringify(prop.value, null, ' ') || '').replace(/\n/g,'
')}
| ${help} |` ) } @@ -84,7 +84,7 @@ for (var k in widgets.categories) { dynamic = widgets.widgets[type].dynamicProps.includes(propName) ? '' : '' doc.push(` - |

${propName}${dynamic}#

| \`${prop.type.replace(/\|/g,'\`\\|
\`')}\` | ${(JSON.stringify(prop.value, null, ' ') || '').replace(/\n/g,'
')}
| ${help} |` + |

${propName}${dynamic}#

| \`${prop.type.replace(/\|/g,'\`|
\`')}\` | ${(JSON.stringify(prop.value, null, ' ') || '').replace(/\n/g,'
')}
| ${help} |` ) separator = false }