diff --git a/resources/docs/docs/widgets/properties-reference.md b/resources/docs/docs/widgets/properties-reference.md index e69de29b..9b86959e 100644 --- a/resources/docs/docs/widgets/properties-reference.md +++ b/resources/docs/docs/widgets/properties-reference.md @@ -0,0 +1,795 @@ + + +## Common + +??? api "
"auto" | Widget type |
+ | "auto" | Widgets sharing the same `id` will act as clones and update each other's value(s) without sending extra osc messages. |
+ | true | Set to `false` to hide the widget. |
+ | true | Set to `false` to disable pointer interactions. |
+
+
+=== "geometry"
+
+ | property | type |default | description |
+ | --- | --- | --- | --- |
+ | "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)."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)."auto" | Widget width |
+ | "auto" | Widget height |
+ | "false" | If parent's layout is `vertical` or `horizontal`, set this to `true` to stretch the widget to use available space automatically. |
+
+
+=== "style"
+
+ | property | type |default | description |
+ | --- | --- | --- | --- |
+ | "auto" | Text color. Set to "auto" to inherit from parent widget. |
+ | "auto" | Widget's default accent color. Set to "auto" to inherit from parent widget. |
+ | "auto" | Stroke color. Set to "auto" to use `colorWidget`. |
+ | "auto" | Fill color. Set to "auto" to use `colorWidget`. |
+ | "auto" | Stroke color opacity. |
+ | "auto" | Fill color opacity (off). |
+ | "auto" | Fill color opacity (on). |
+ | "auto" | Stroke width. |
+ | "auto" | Inner spacing. |
+ | "" | CSS rules. See documentation."" | Define the widget's value depending on other widget's values / properties using the advanced property syntax |
+ | "" | If set, the widget will be initialized with this value when the session is loaded. |
+ | "" | Widgets sharing the same `linkId` update each other's value(s) AND send their respective osc messages."" | Script executed whenever the widget's value updates. See documentation. |
+
+
+=== "osc"
+
+ | property | type |default | description |
+ | --- | --- | --- | --- |
+ | "auto" | OSC address for sending / receiving messages, it must start with a slash (`/`)"" | A value or array of values that will be prepended to the OSC messages. |
+ | "" | Defines the osc argument types, one letter per argument (including preArgs)2 | Defines the number of decimals to send. |
+ | "" | This defines the targets of the widget's OSC messagesfalse | Set to `true` to ignore the server's default targets |
+ | false | Set to `true` to prevent the widget from sending any osc message |
+## Basics
+
+??? api ""
+ On / off button.
+
+ === "style"
+
+ | property | type |default | description |
+ | --- | --- | --- | --- |
+ | "" | CSS rules. See documentation."auto" | Defines the widget's text color when active. |
+ | "auto" | Set to `false` to hide completelyfalse | Set to `true` to display the text vertically |
+ | false | Set to `true` to wrap long lines automatically. |
+
+ === "button"
+
+ | property | type |default | description |
+ | --- | --- | --- | --- |
+ | 1 | Set to `null` to send send no argument in the osc message |
+ | 0 | Set to `null` to send send no argument in the osc message. Must be different from `on`. |
+ | "toggle" | Interraction mode:false | Set to `true` to make the button require a double tap to be pushed instead of a single tap |
+
+??? api """ | CSS rules. See documentation."auto" | Defines the widget's text color when active. |
+ | "vertical" | Choices: `vertical`, `horizontal`, `grid` |
+ | "" | If `layout` is `grid`, can be either a number of columns of a value css grid-template definition. |
+
+ === "switch"
+
+ | property | type |default | description |
+ | --- | --- | --- | --- |
+ | \{
"Value 1": 1,
"Value 2": 2
} | `Array` of possible values to switch between : `[1,2,3]`"tap" | Interraction mode:"center" | Set to `left` or `right` to change text alignment (otherwise center)\{
"Value 1": 1,
"Value 2": 2
} | `Array` of possible values to switch between : `[1,2,3]`200 | - If `layout` is `circular`: diameter (in px)"center" | Set to `left` or `right` to change text alignment (otherwise center)"center" | Set to `top` or `bottom` to change menu alignment (otherwise center)"center" | Set to `left` or `right` to change menu alignment (otherwise center)"circular" | Defines whether the menu's layout should be rendered in a circle or in a box"" | If `layout` is `grid`, can be either a number of columns of a value css grid-template definition. |
+
+ === "menu"
+
+ | property | type |default | description |
+ | --- | --- | --- | --- |
+ | false | Set to `true` to make the menu stay opened after mouse/touch release |
+ | false | Set to `true` to make the menu require a double tap to be opened instead of a single tap |
+ | [
1,
2,
3
] | `Array` of possible values to switch between : `[1,2,3]`"" | `Array` of `number` defining the weights of each value in `values`"center" | Set to `left` or `right` to change text alignment (otherwise center)"" | Unit will be appended to the displayed widget's value (it doesn't affect osc messages) |
+
+ === "input"
+
+ | property | type |default | description |
+ | --- | --- | --- | --- |
+ | false | Set to `true` to make the input send its value at each keystroke |
+
+??? api ""center" | Set to `left` or `right` to change text alignment (otherwise center)false | Set to `true` to only display the filename (the whole path will still be used as value) |
+
+ === "file"
+
+ | property | type |default | description |
+ | --- | --- | --- | --- |
+ | "auto" | Default browsing directory |
+ | "*" | Only display files with this extension |
+ | false | Allow selecting a folder (by pressing "open" when no file is selected) |
+## Containers
+
+??? api ""auto" | Panel background color. Set to "auto" to inherit from parent widget. |
+ | "default" | Defines how children are laid out."start" | If `layout` is `vertical` or `horizontal`, defines how widgets should be justified."" | If `layout` is `grid`, can be either a number of columns of a value css grid-template definition. |
+ | true | If `layout` is `vertical` or `horizontal`, prevents children from overflowing the panel. |
+ | true | Set to `false` to disable scrollbars |
+ | true | Set to `false` to make the `padding` property apply only between children and not at the container's inner boundaries. |
+ | false | Set to `true` to display for vertical tab layout |
+
+ === "panel"
+
+ | property | type |default | description |
+ | --- | --- | --- | --- |
+ | "@\{parent.variables}" | Defines one or more arbitrary variables that can be inherited by children widgets |
+ | false | Set to `true` to enable traversing gestures in this widget. Set to `smart` or `auto` to limit affected widgets by the type of the first touched widget |
+
+ === "value"
+
+ | property | type |default | description |
+ | --- | --- | --- | --- |
+ | "" | Defines currently selected tab in the widget[] | Each element of the array must be a widget object. A panel cannot contain widgets and tabs simultaneously. |
+ | [] | Each element of the array must be a tab object. A panel cannot contain widgets and tabs simultaneously |
+
+??? api ""80%" | Modal popup's size |
+ | "80%" | Modal popup's size |
+ | "auto" | Modal popup's position |
+ | "auto" | Modal popup's position |
+
+ === "style"
+
+ | property | type |default | description |
+ | --- | --- | --- | --- |
+ | "auto" | Panel background color. Set to "auto" to inherit from parent widget. |
+ | "default" | Defines how children are laid out."start" | If `layout` is `vertical` or `horizontal`, defines how widgets should be justified."" | If `layout` is `grid`, can be either a number of columns of a value css grid-template definition. |
+ | true | If `layout` is `vertical` or `horizontal`, prevents children from overflowing the panel. |
+ | true | Set to `false` to disable scrollbars |
+ | true | Set to `false` to make the `padding` property apply only between children and not at the container's inner boundaries. |
+ | "auto" | Set to `false` to hide completely"auto" | Alternative label for the modal popup |
+
+ === "modal"
+
+ | property | type |default | description |
+ | --- | --- | --- | --- |
+ | "@\{parent.variables}" | Defines one or more arbitrary variables that can be inherited by children widgets |
+ | false | Set to `true` to enable traversing gestures in this widget. Set to `smart` or `auto` to limit affected widgets by the type of the first touched widget |
+ | false | Set to `true` to make the modal require a double tap to open instead of a single tap |
+
+ === "value"
+
+ | property | type |default | description |
+ | --- | --- | --- | --- |
+ | "" | Defines the modal's state:`0` for closed, `1` for opened |
+
+ === "children"
+
+ | property | type |default | description |
+ | --- | --- | --- | --- |
+ | [] | Each element of the array must be a widget object. A panel cannot contain widgets and tabs simultaneously. |
+ | [] | Each element of the array must be a tab object. A panel cannot contain widgets and tabs simultaneously |
+
+??? api """ | `id` of the widget to clone |
+ | \{} | Cloned widget's properties to override |
+
+??? api ""auto" | Panel background color. Set to "auto" to inherit from parent widget. |
+ | "horizontal" | Defines how children are laid out."start" | If `layout` is `vertical` or `horizontal`, defines how widgets should be justified."" | If `layout` is `grid`, can be either a number of columns of a value css grid-template definition. |
+ | true | If `layout` is `vertical` or `horizontal`, prevents children from overflowing the panel. |
+ | true | Set to `false` to disable scrollbars |
+ | true | Set to `false` to make the `padding` property apply only between children and not at the container's inner boundaries. |
+
+ === "matrix"
+
+ | property | type |default | description |
+ | --- | --- | --- | --- |
+ | "@\{parent.variables}" | Defines one or more arbitrary variables that can be inherited by children widgets |
+ | false | Set to `true` to enable traversing gestures in this widget. Set to `smart` or `auto` to limit affected widgets by the type of the first touched widget |
+ | "button" | Defines the type of the widgets in the matrix |
+ | 4 | Defines the number of widgets in the matrix |
+ | 0 | First widget's index |
+ | \{} | Defines a set of property to override the widgets' defaults."" | Defines currently selected tab in the widget[] | Each element of the array must be a widget object. A panel cannot contain widgets and tabs simultaneously. |
+ | [] | Each element of the array must be a tab object. A panel cannot contain widgets and tabs simultaneously |
+
+??? api ""auto" | White keys color. |
+ | "auto" | Black keys color. |
+
+ === "keyboard"
+
+ | property | type |default | description |
+ | --- | --- | --- | --- |
+ | 25 | Defines the number keys |
+ | 48 | MIDI note number to start with (default is C4)true | Set to `false` to disable traversing gestures |
+ | 1 | Set to `null` to send send no argument in the osc message0 | Set to `null` to send send no argument in the osc message"push" | Interraction mode:"" | The inputs/ouputs width can be adjusted by using the `.nodes` selector:[
"input_1",
"input_2"
] | - `Array` of input names : `['input_1', 'input_2']`[
"output_1",
"output_2"
] | List of output values the inputs can connect to (see `inputs`). |
+
+??? api ""auto" | Panel background color. Set to "auto" to inherit from parent widget. |
+ | "default" | Defines how children are laid out."start" | If `layout` is `vertical` or `horizontal`, defines how widgets should be justified."" | If `layout` is `grid`, can be either a number of columns of a value css grid-template definition. |
+ | true | If `layout` is `vertical` or `horizontal`, prevents children from overflowing the panel. |
+ | true | Set to `false` to disable scrollbars |
+ | true | Set to `false` to make the `padding` property apply only between children and not at the container's inner boundaries. |
+ | false | Set to `true` to display for vertical tab layout |
+
+ === "root"
+
+ | property | type |default | description |
+ | --- | --- | --- | --- |
+ | "@\{parent.variables}" | Defines one or more arbitrary variables that can be inherited by children widgets |
+ | false | Set to `true` to enable traversing gestures in this widget. Set to `smart` or `auto` to limit affected widgets by the type of the first touched widget |
+
+ === "value"
+
+ | property | type |default | description |
+ | --- | --- | --- | --- |
+ | "" | Defines currently selected tab in the widget[] | Each element of the array must be a widget object. A panel cannot contain widgets and tabs simultaneously. |
+ | [] | Each element of the array must be a tab object. A panel cannot contain widgets and tabs simultaneously |
+
+??? api ""auto" | Panel background color. Set to "auto" to inherit from parent widget. |
+ | "default" | Defines how children are laid out."start" | If `layout` is `vertical` or `horizontal`, defines how widgets should be justified."" | If `layout` is `grid`, can be either a number of columns of a value css grid-template definition. |
+ | true | If `layout` is `vertical` or `horizontal`, prevents children from overflowing the panel. |
+ | true | Set to `false` to disable scrollbars |
+ | true | Set to `false` to make the `padding` property apply only between children and not at the container's inner boundaries. |
+ | false | Set to `true` to display for vertical tab layout |
+ | "auto" | Set to `false` to hide completely"@\{parent.variables}" | Defines one or more arbitrary variables that can be inherited by children widgets |
+ | false | Set to `true` to enable traversing gestures in this widget. Set to `smart` or `auto` to limit affected widgets by the type of the first touched widget |
+
+ === "value"
+
+ | property | type |default | description |
+ | --- | --- | --- | --- |
+ | "" | Defines currently selected tab in the widget[] | Each element of the array must be a widget object. A panel cannot contain widgets and tabs simultaneously. |
+ | [] | Each element of the array must be a tab object. A panel cannot contain widgets and tabs simultaneously |
+## Frames
+
+??? api """ | External web page URL. |
+
+??? api """ | Svg xml definition (will be wrapped in a `< svg />` element) |
+
+??? api """ | Allowed HTML tags:"cover" | CSS background-size |
+ | "center" | CSS background-position |
+ | "no-repeat" | CSS background-repeat |
+
+ === "image"
+
+ | property | type |default | description |
+ | --- | --- | --- | --- |
+ | true | Set to false to disable image caching (forces file reload when updating or editing the widget)."" | - File `url` or `path` (relative to the session file location by default, falling back to absolute path)false | Draw dots on the line |
+ | false | Set to `true` to use draw bars instead (disables `logScaleX` and forces `x axis` even spacing) |
+ | true | Set to `false` to hide the scale |
+
+ === "plot"
+
+ | property | type |default | description |
+ | --- | --- | --- | --- |
+ | "" | Each item must be an object with the following propertiestrue | Set to false to hide the scale |
+ | \{
"min": 20,
"max": 22000
} | Defines the min and max values for the x axis (in Hz, logarithmic scale) |
+ | \{
"min": -6,
"max": 6
} | Defines the min and max values for the y axis (in dB) |
+ | "auto" | Defines the y axis origin. Set to `false` to disable it |
+
+ === "value"
+
+ | property | type |default | description |
+ | --- | --- | --- | --- |
+ | "" | - `Array` of `y` valuesfalse | Draw dots on the line |
+ | false | Set to `true` to use draw bars instead (disables `logScaleX` and forces `x axis` even spacing) |
+ | true | Set to `false` to hide the scale |
+
+ === "eq"
+
+ | property | type |default | description |
+ | --- | --- | --- | --- |
+ | "" | Each item must be an object with the following propertiestrue | Set to false to hide the scale |
+ | \{
"min": 20,
"max": 22000
} | Defines the min and max values for the x axis (in Hz, logarithmic scale) |
+ | \{
"min": -6,
"max": 6
} | Defines the min and max values for the y axis (in dB) |
+ | "auto" | Defines the y axis origin. Set to `false` to disable it |
+
+ === "value"
+
+ | property | type |default | description |
+ | --- | --- | --- | --- |
+ | "" | - `Array` of `y` valuesfalse | Draw dots on the line |
+ | false | Set to `true` to use draw bars instead (disables `logScaleX` and forces `x axis` even spacing) |
+ | true | Set to `false` to hide the scale |
+
+ === "visualizer"
+
+ | property | type |default | description |
+ | --- | --- | --- | --- |
+ | "" | Each item must be an object with the following propertiestrue | Set to false to hide the scale |
+ | \{
"min": 20,
"max": 22000
} | Defines the min and max values for the x axis (in Hz, logarithmic scale) |
+ | \{
"min": 0,
"max": 1
} | Defines the min and max values for the y axis |
+ | "auto" | Defines the y axis origin. Set to `false` to disable it |
+ | 1 | Defines visualization duration in seconds |
+ | 30 | Defines visualization framerate |
+ | false | Set to `true` to use logarithmic scale for the y axis (base 10). Set to a `number` to define the logarithm's base. |
+ | false | Set to `true` to freeze current view and ignore incoming values |
+
+ === "value"
+
+ | property | type |default | description |
+ | --- | --- | --- | --- |
+ | "" | - `Array` of `y` values"" | Css border-radius property. |
+
+ === "led"
+
+ | property | type |default | description |
+ | --- | --- | --- | --- |
+ | "intensity" | Defines how value is interpreted (see `value`)\{
"min": 0,
"max": 1
} | Value range |
+ | \{
"min": 0,
"max": 1
} | Alpha range (if `mode` is `color`) |
+ | false | If `mode` is `intensity`, set to `true` to use logarithmic scale. |
+
+ === "value"
+
+ | property | type |default | description |
+ | --- | --- | --- | --- |
+ | "" | If `mode` is `intensity`:false | Set to `true` to display the text vertically |
+ | false | Set to `true` to wrap long lines automatically. |
+ | "center" | Css text-align property.20 | Defines the points' size |
+ | false | When set to `true`, the point will be drawn only while touched. |
+ | true | Set to `false` to hide the scale |
+
+ === "xy"
+
+ | property | type |default | description |
+ | --- | --- | --- | --- |
+ | false | By default, the points are dragged from their initial position.false | When set to `true`, the widget will go back to its default value when released |
+ | \{
"min": 0,
"max": 1
} | Defines the min and max values for the x axis |
+ | \{
"min": 0,
"max": 1
} | Defines the min and max values for the y axis |
+ | false | Set to `true` to use logarithmic scale for the x axis. Set to `-1` for exponential scale. |
+ | false | Set to `true` to use logarithmic scale for the y axis. Set to `-1` for exponential scale. |
+ | false | Set to `true` to make the fader reset to its default value when receiving a double tap.1 | Defines the pad's sensitivity when `snap` is `false` |
+
+??? api "false | By default, the points are dragged from their initial position.false | When set to `true`, the widget will go back to its default value when released |
+ | \{
"min": 0,
"max": 255
} | Defines the widget's output scale. |
+ | false | Set to `true` to enable alpha channel |
+ | \{
"min": 0,
"max": 1
} | Defines the widget's output scale for the alpha channel. |
+
+??? api "20 | Defines the points' size |
+ | false | When set to `true`, the points will be drawn only chile touched. |
+ | true | Set to `false` to hide the scale |
+
+ === "multixy"
+
+ | property | type |default | description |
+ | --- | --- | --- | --- |
+ | 2 | Defines the number of points on the padfalse | By default, the points are dragged from their initial position.false | When set to `true`, the widget will go back to its default value when released |
+ | \{
"min": 0,
"max": 1
} | Defines the min and max values for the x axis |
+ | \{
"min": 0,
"max": 1
} | Defines the min and max values for the y axis |
+ | false | Set to `true` to use logarithmic scale for the x axis. Set to `-1` for exponential scale. |
+ | false | Set to `true` to use logarithmic scale for the y axis. Set to `-1` for exponential scale. |
+ | 1 | Defines the pad's sensitivity when `snap` is `false` |
+## Sliders
+
+??? api """ | CSS rules. See documentation."default" | Design style"auto" | Fader knob size |
+ | false | Set to `true` to display the fader horizontally |
+ | false | Set to `true` to show range breakpoints (ignored if `design` is `compact`) |
+ | false | Set to `true` to display a dashed gauge. Can be set as an `array` of two numbers : `[dash_size, gap_size]` |
+ | [] | When set, the meter's gauge will be filled with a linear color gradientfalse | 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 |
+ | false | When set to `true`, the widget will go back to its `default` value when released |
+ | false | Set to `true` to make the fader reset to its `default` value when receiving a double tap.\{
"min": 0,
"max": 1
} | Defines the breakpoints of the fader's scale:false | Set to `true` to use logarithmic scale. Set to `-1` for exponential scale. |
+ | 1 | Defines the fader's sensitivity when `snap` is `false` |
+ | "" | Restricts the widget's value:"auto" | Defines the starting point's value of the fader's gauge |
+
+??? api """ | CSS rules. See documentation."default" | Design stylefalse | Set to `true` to show the scale's breakpoints |
+ | false | Set to `true` to display a dashed gauge. Can be set as an `array` of two numbers : `[dash_size, gap_size]` |
+ | 270 | Defines the angle's width of the knob, in degrees |
+
+ === "knob"
+
+ | property | type |default | description |
+ | --- | --- | --- | --- |
+ | "vertical" | - `circular`: relative move in circular motionfalse | When set to `true`, the widget will go back to its `default` value when released |
+ | false | Set to `true` to make the knob reset to its `default` value when receiving a double tap.\{
"min": 0,
"max": 1
} | Defines the breakpoints of the fader's scale:false | Set to `true` to use logarithmic scale. Set to `-1` for exponential scale. |
+ | 1 | Defines the knob's sensitivity when `mode` is not `snap` |
+ | "" | Restricts the widget's value:"auto" | Defines the starting point's value of the knob's gauge |
+
+??? api """ | CSS rules. See documentation."default" | Design stylefalse | Set to `true` to show the scale's breakpoints |
+ | false | Set to `true` to display a dashed gauge. Can be set as an `array` of two numbers : `[dash_size, gap_size]` |
+ | 270 | Defines the angle's width of the knob, in degrees |
+
+ === "encoder"
+
+ | property | type |default | description |
+ | --- | --- | --- | --- |
+ | "circular" | - `circular`: relative move in circular motionfalse | When set to `true`, the widget will go back to its `default` value when released |
+ | false | Set to `true` to make the fader reset to its `default` value when receiving a double tap.\{
"min": 0,
"max": 1
} | Defines the breakpoints of the fader's scale:false | Set to `true` to use logarithmic scale. Set to `-1` for exponential scale. |
+ | 1 | Defines the knob's sensitivity when `mode` is not `snap` |
+ | "" | Restricts the widget's value:"auto" | Defines the starting point's value of the knob's gauge |
+ | 360 | defines the granularity / verbosity of the encoder (number of step for a 360° arc) |
+ | -1 | Defines which value is sent when rotating the encoder anticlockwise |
+ | 1 | Defines which value is sent when rotating the encoder clockwise |
+ | "" | Defines which value is sent when releasing the encoder:"" | CSS rules. See documentation."default" | Design style"auto" | Fader knob size |
+ | false | Set to `true` to display the fader horizontally |
+ | false | Set to `true` to show range breakpoints (ignored if `design` is `compact`) |
+ | false | Set to `true` to display a dashed gauge. Can be set as an `array` of two numbers : `[dash_size, gap_size]` |
+ | [] | When set, the meter's gauge will be filled with a linear color gradientfalse | 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 |
+ | false | When set to `true`, the widget will go back to its `default` value when released |
+ | false | Set to `true` to make the fader reset to its `default` value when receiving a double tap.\{
"min": 0,
"max": 1
} | Defines the breakpoints of the fader's scale:false | Set to `true` to use logarithmic scale. Set to `-1` for exponential scale. |
+ | 1 | Defines the fader's sensitivity when `snap` is `false` |
+ | "" | Restricts the widget's value:"auto" | Defines the starting point's value of the fader's gauge |
+## Scripts
+
+??? api ""value" | Define which events trigger the script's execution."" | Script executed whenever the widget's receives the defined event. See documentation. |
+ | "" | Key combo `string` or `array` of strings (see KeyboardJS documentation) |
+ | true | Set to `false` to prevent keydown repeats when holding the key combo pressed |
+ | "keydown" | Determines which key event trigger the script's execution${(JSON.stringify(prop.value, null, ' ') || '').replace(/\n/g,'
').replace('{','\\{')} | ${help} |`
+ | property | type |default | description |
+ | --- | --- | --- | --- |`
)
+ var notEmpty = false
+
+ for (var propName in base[categoryName]) {
+
+ var prop = base[categoryName][propName],
+ permalink = propName
+
+ if (propName === '_props' || propName[0] === '_') continue
+
+ var help = Array.isArray(prop.help) ? prop.help.join('${(JSON.stringify(prop.value, null, ' ') || '').replace(/\n/g,'
').replace('{','\\{')} | ${help} |`
+ )
+ notEmpty = true
+
+ }
+ if (!notEmpty) doc.pop()
}
-
for (var k in widgets.categories) {
var category = widgets.categories[k]
if (k == 'Containers') {
@@ -63,9 +66,7 @@ for (var k in widgets.categories) {
for (var kk in category) {
var type = category[kk],
defaults = widgets.widgets[type].defaults(),
- description = widgets.widgets[type].description(),
- separator = false
-
+ description = widgets.widgets[type].description()
doc.push(`
@@ -74,40 +75,42 @@ for (var k in widgets.categories) {
)
- for (var propName in defaults) {
-
- var prop = defaults[propName],
- permalink = type + '_' + propName
-
- if (propName[0] === '_' && propName !== '_props') {
- if (separator) doc.pop()
- if (doc[doc.length -1].trim()[0] === '=') doc.pop()
- doc.push(`\n
- === "${prop}"
+ for (var categoryName in defaults) {
+ doc.push(`\n
+ === "${categoryName == 'class_specific' ? type : categoryName}"
| property | type |default | description |
| --- | --- | --- | --- |`
- )
- separator = true
- }
-
- if (propName === '_props' || propName[0] === '_' || JSON.stringify(prop) == JSON.stringify(base[propName])) continue
-
- var help = Array.isArray(prop.help) ? prop.help.join('${(JSON.stringify(prop.value, null, ' ') || '').replace(/\n/g,'
').replace('{','\\{')} | ${help} |`
)
- separator = false
+ var notEmpty = false
+
+ for (var propName in defaults[categoryName]) {
+
+ var prop = defaults[categoryName][propName],
+ permalink = type + '_' + propName
+
+
+ if (propName === '_props' || propName[0] === '_' || JSON.stringify(prop) == JSON.stringify((base[categoryName]||{})[propName])) continue
+
+ var help = Array.isArray(prop.help) ? prop.help.join('${(JSON.stringify(prop.value, null, ' ') || '').replace(/\n/g,'
').replace('{','\\{')} | ${help} |`
+ )
+ notEmpty = true
+ }
+
+ if (!notEmpty) doc.pop()
+
+
+
}
- if (separator) doc.pop()
}
}