From 6a055c620bcf010150e18a849556be4df0c9d35e Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Mon, 5 May 2025 14:41:24 +0200 Subject: [PATCH 001/352] frame: add allow property --- CHANGELOG.md | 4 ++++ src/client/widgets/frames/frame.js | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca291536..fca94d3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 1.29.3 + +- widgets + - add `allow` property ## 1.29.1 / 1.29.2 diff --git a/src/client/widgets/frames/frame.js b/src/client/widgets/frames/frame.js index 519d97e9..d3d2f654 100644 --- a/src/client/widgets/frames/frame.js +++ b/src/client/widgets/frames/frame.js @@ -14,6 +14,11 @@ class Frame extends StaticProperties(Widget, {bypass: true}) { static defaults() { return super.defaults().extend({ + class_specific: { + allow: {type: 'string', value: '', help: [ + 'Content for the iframe element\'s allow attribute', + ]}, + }, value: { value: {type: 'string', value: '', help: [ 'External web page URL.', @@ -40,6 +45,9 @@ class Frame extends StaticProperties(Widget, {bypass: true}) { if (!this.getProp('border')) this.container.classList.add('noborder') this.frame = DOM.get(this.widget, '.frame')[0] + + if (this.getProp('allow')) this.frame.setAttribute('allow', this.getProp('allow')) + this.errorText = html`${locales('iframe_unauthorized')}` this.errorTextMounted = false From 6c2e500135a058492667d03d12ffa75dbd0f7665 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Mon, 5 May 2025 14:41:41 +0200 Subject: [PATCH 002/352] log: mising widget type --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fca94d3e..e2a32ac2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## 1.29.3 - widgets - - add `allow` property + - frame: add `allow` property ## 1.29.1 / 1.29.2 From c860bc1959fb7b41b6e0a6fdebd736abed041e06 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Wed, 7 May 2025 09:42:12 +0200 Subject: [PATCH 003/352] widget: ignore invalid properties (avoid recreating if matrix/clone child has an override for an invalid property) --- src/client/widgets/common/widget.js | 7 ++++++- src/client/widgets/index.js | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/client/widgets/common/widget.js b/src/client/widgets/common/widget.js index fdd1e219..1cc8383f 100644 --- a/src/client/widgets/common/widget.js +++ b/src/client/widgets/common/widget.js @@ -939,7 +939,12 @@ class Widget extends EventEmitter { if (!this.isDynamicProp(propName)) { - if (widget && this.contains(widget)) { + if (this.constructor._defaults[propName] === undefined) { + + // ignore invalid properties + continue + + } else if (widget && this.contains(widget)) { this.errorProp(propName, '@{}', `a container can't use its child's properties to define non-dynamic properties.`) continue diff --git a/src/client/widgets/index.js b/src/client/widgets/index.js index 38d3bc28..b0e5ce0c 100644 --- a/src/client/widgets/index.js +++ b/src/client/widgets/index.js @@ -69,5 +69,6 @@ module.exports.categories = { var defaults = {} for (var k in module.exports.widgets) { defaults[k] = module.exports.widgets[k].defaults() + module.exports.widgets[k]._defaults = defaults } module.exports.defaults = defaults From b071189c65e0cce46db0918a3acafd960dd61fc0 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Wed, 7 May 2025 11:21:40 +0200 Subject: [PATCH 004/352] matrix: make `quantity` a dynamic property to avoid losing widget state when it changes --- CHANGELOG.md | 1 + src/client/widgets/containers/matrix.js | 50 ++++++++++++++++++++++++- 2 files changed, 50 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e2a32ac2..f5b7ae1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - widgets - frame: add `allow` property + - matrix: make `quantity` a dynamic property to avoid losing widget state when it changes ## 1.29.1 / 1.29.2 diff --git a/src/client/widgets/containers/matrix.js b/src/client/widgets/containers/matrix.js index fd720879..9d158d01 100644 --- a/src/client/widgets/containers/matrix.js +++ b/src/client/widgets/containers/matrix.js @@ -1,7 +1,9 @@ var Panel = require('./panel'), parser = require('../../parser'), {deepCopy} = require('../../utils'), - Session = require('../../managers/session/session') + Session = require('../../managers/session/session'), + widgetManager = require('../../managers/widgets') + class Matrix extends Panel { @@ -125,6 +127,51 @@ class Matrix extends Panel { switch (propName) { + case 'quantity': + + if (oldPropValue > this.getProp('quantity')) { + + for (var i = oldPropValue - 1; i >= this.getProp('quantity'); i--) { + if (this.widget.contains(this.children[i].container)) { + this.widget.removeChild(this.children[i].container) + } + widgetManager.removeWidgets(this.children[i].getAllChildren().concat(this.children[i])) + } + + } else { + + this.cachedProps.props = this.resolveProp('props', undefined, true) + + for (var i = oldPropValue; i < this.getProp('quantity'); i++) { + + var props = deepCopy(this.getProp('props')[i]) + var data = this.defaultProps(i) + + if (typeof props === 'object' && props !== null) { + Object.assign(data, props) + } + + data = JSON.parse(JSON.stringify(data).replace(/(JS|#|OSC|@|VAR)_\{/g, '$1{')) + + Session.converters['1.13.2'].widget(data) + + var widget = parser.parse({ + data: data, + parentNode: this.widget, + parent: this + }) + + widget._index = i + widget.container.classList.add('not-editable') + widget._not_editable = true + + } + + } + + + return + case 'props': for (let i = this.children.length - 1; i >= 0; i--) { @@ -224,6 +271,7 @@ Matrix.parsersContexts.props = { } Matrix.dynamicProps = Matrix.prototype.constructor.dynamicProps.concat( + 'quantity', 'props' ) From f49fb43ec3a67433fdfc021fe048a771dd595f71 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Wed, 7 May 2025 11:26:58 +0200 Subject: [PATCH 005/352] lint: var -> let --- src/client/widgets/containers/matrix.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/widgets/containers/matrix.js b/src/client/widgets/containers/matrix.js index 9d158d01..d4f83a5b 100644 --- a/src/client/widgets/containers/matrix.js +++ b/src/client/widgets/containers/matrix.js @@ -131,7 +131,7 @@ class Matrix extends Panel { if (oldPropValue > this.getProp('quantity')) { - for (var i = oldPropValue - 1; i >= this.getProp('quantity'); i--) { + for (let i = oldPropValue - 1; i >= this.getProp('quantity'); i--) { if (this.widget.contains(this.children[i].container)) { this.widget.removeChild(this.children[i].container) } @@ -142,7 +142,7 @@ class Matrix extends Panel { this.cachedProps.props = this.resolveProp('props', undefined, true) - for (var i = oldPropValue; i < this.getProp('quantity'); i++) { + for (let i = oldPropValue; i < this.getProp('quantity'); i++) { var props = deepCopy(this.getProp('props')[i]) var data = this.defaultProps(i) From 460d8718c9176aa27df7139301a36ab293f2a323 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 13 May 2025 09:21:40 +0200 Subject: [PATCH 006/352] docs: remote control detail --- resources/docs/docs/remote-control.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/docs/docs/remote-control.md b/resources/docs/docs/remote-control.md index de66127b..a25fb9db 100644 --- a/resources/docs/docs/remote-control.md +++ b/resources/docs/docs/remote-control.md @@ -1,6 +1,6 @@ # Remote control -When osc messages are received, the default behavior is to update the value of all widgets that match the address and preArgs. Additionally, Open Stage Control responds to some general osc commands. +When osc messages are received, the default behavior is to update the value of all widgets that match the address and preArgs. Additionally, Open Stage Control clients respond to some general osc commands. !!! note "Multi-client setup" These commands are interpreted by each client connected to the server so there might be more than one reply. Using a custom module is the only way to send a message to a single client. From 870d3e34457d482e1983bca0e38a76c5f9e74f18 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 13 May 2025 09:44:16 +0200 Subject: [PATCH 007/352] patchbay: missing preArgs implementation --- CHANGELOG.md | 1 + src/client/widgets/containers/patchbay.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f5b7ae1d..9a2dd648 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - widgets - frame: add `allow` property - matrix: make `quantity` a dynamic property to avoid losing widget state when it changes + - patchbay: missing `preArgs` implementation ## 1.29.1 / 1.29.2 diff --git a/src/client/widgets/containers/patchbay.js b/src/client/widgets/containers/patchbay.js index e01dc307..22f789f1 100644 --- a/src/client/widgets/containers/patchbay.js +++ b/src/client/widgets/containers/patchbay.js @@ -167,11 +167,12 @@ class PatchBay extends Container(Canvas) { let w = parser.parse({ data: { type: 'patchbaynode', + comments: this.inputs[k], // TODO: using comment prop to smuggle input identifier, ok but could be more elegant id: this.getProp('id') + '/' + this.inputs[k], address: '#{@{parent.address} == "auto" ? "/" + @{parent.id} : @{parent.address}}', target: '@{parent.target}', ignoreDefaults: '@{parent.ignoreDefaults}', - preArgs: this.inputs[k], + preArgs: '#{@{parent.preArgs} == "" ? @{this.comments} : Array.isArray(@{parent.preArgs}) ? @{parent.preArgs}.concat(@{this.comments}) : [@{parent.preArgs}, @{this.comments}]}', bypass: '@{parent.bypass}', label: k }, From 45b8794bf612270a139e6294e8563ed128d07f68 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 13 May 2025 10:04:16 +0200 Subject: [PATCH 008/352] docs: update --- resources/docs/docs/widgets/properties-reference.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/resources/docs/docs/widgets/properties-reference.md b/resources/docs/docs/widgets/properties-reference.md index 156d4cb1..7f997a2c 100644 --- a/resources/docs/docs/widgets/properties-reference.md +++ b/resources/docs/docs/widgets/properties-reference.md @@ -365,7 +365,7 @@ |
variables#
| `*` | "@\{parent.variables}" | Defines one or more arbitrary variables that can be inherited by children widgets | |
traversing#
| `boolean` | false | Set to `true` to enable traversing gestures in this widget. Set to `smart` to limit affected widgets by the type of the first touched widget

Choices: `false`, `true`, `smart` | |
widgetType#
| `string` | "button" | Defines the type of the widgets in the matrix | - |
quantity#
| `number` | 4 | Defines the number of widgets in the matrix | + |
quantity#
| `number` | 4 | Defines the number of widgets in the matrix | |
props#
| `object` | \{
 "label": "#{$}"
}
| Defines a set of property to override the widgets' defaults.

JS{} and #{} blocks in this field are resolved with an extra variable representing each widget's index: `$` (e.g. `#{$}`)

Advanced syntax blocks (@{}, OSC{}, JS{}, VAR{} and #{}) are resolved at the matrix' scope (ie @{this.variables} returns the matrix' variables property)

Advanced syntax blocks can be passed to children without being resolved at the matrix' scope by adding an underscore before the opening bracket.

Note: unless overridden, children inherit from the matrix' `id` and osc properties (`id` and `address` are appended with `/$`) | === "value" @@ -545,6 +545,12 @@ ??? api "
frame#
" Embed a web page in a frame. Note: some websites do not allow this. + === "frame" + + | property | type |default | description | + | --- | --- | --- | --- | + |
allow#
| `string` | "" | Content for the iframe element's allow attribute | + === "value" | property | type |default | description | From f5ee7f5df1b6eb25532652a216828e1a3f3d37c0 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 13 May 2025 10:04:28 +0200 Subject: [PATCH 009/352] package: 1.29.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cbd7d32a..137236ce 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.29.2", + "version": "1.29.3", "author": { "name": "Jean-Emmanuel Doucet", "email": "jean-emmanuel@ammd.net" From 32c3bf2abd755e5a422d06eabfdcb0248f10b3dc Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Fri, 16 May 2025 11:23:41 +0200 Subject: [PATCH 010/352] widget: regression breaking widget recreation routine (all properties seen as invalid because of wrong default property cache) --- src/client/widgets/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/widgets/index.js b/src/client/widgets/index.js index b0e5ce0c..288eb2c3 100644 --- a/src/client/widgets/index.js +++ b/src/client/widgets/index.js @@ -69,6 +69,6 @@ module.exports.categories = { var defaults = {} for (var k in module.exports.widgets) { defaults[k] = module.exports.widgets[k].defaults() - module.exports.widgets[k]._defaults = defaults + module.exports.widgets[k]._defaults = defaults[k]._props() } module.exports.defaults = defaults From 296ba343c4daad5c9ce3936677c71218698e3927 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Fri, 16 May 2025 11:26:59 +0200 Subject: [PATCH 011/352] package: hot patched 1.29.4 on the way --- CHANGELOG.md | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a2dd648..65cba26a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 1.29.4 + +- bug fixes + - regression (1.29.3) breaking some widget recreation routines + ## 1.29.3 - widgets diff --git a/package.json b/package.json index 137236ce..c4972a38 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.29.3", + "version": "1.29.4", "author": { "name": "Jean-Emmanuel Doucet", "email": "jean-emmanuel@ammd.net" From e7ffec8c031a61adba4357054bc65c6a668ffb68 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Fri, 16 May 2025 16:00:05 +0200 Subject: [PATCH 012/352] keyboard: regression (1.27.5) breaking `velocity` property --- CHANGELOG.md | 8 +++++++- src/client/widgets/basics/button.js | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 65cba26a..0eb2eea7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,15 @@ # Changelog +## 1.29.5 + +- bug fixes + - keyboard: regression (1.27.5) breaking `velocity` property + + ## 1.29.4 - bug fixes - - regression (1.29.3) breaking some widget recreation routines + - regression (1.29.3) breaking some widget recreation routines ## 1.29.3 diff --git a/src/client/widgets/basics/button.js b/src/client/widgets/basics/button.js index 6f116cae..b14aeefc 100644 --- a/src/client/widgets/basics/button.js +++ b/src/client/widgets/basics/button.js @@ -99,7 +99,7 @@ class Button extends Widget { this.parsersLocalScope.touchCoords = [e.offsetX / this.buttonSize[0], 1 - e.offsetY / this.buttonSize[1]] } - this.setValue(this.getProp('on'), {sync: true, send: true, local:true}) + this.setValue(this.getProp('on'), {sync: true, send: true, local:true, y: e.offsetY}) if (tap) this.container.classList.add('active') @@ -117,7 +117,7 @@ class Button extends Widget { this.parsersLocalScope.touchCoords = [e.offsetX / this.buttonSize[0], 1 - e.offsetY / this.buttonSize[1]] } - this.setValue(this.getProp('on'), {sync: true, send: true, local:true}) + this.setValue(this.getProp('on'), {sync: true, send: true, local:true, y: e.offsetY}) if (tap) this.container.classList.add('active') From e5d5d0aa0634222470ba188b206de9fb3ad24e1b Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Mon, 19 May 2025 15:28:13 +0200 Subject: [PATCH 013/352] code editor: fix available globals for onResize --- src/client/ui/ui-code-editor.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/client/ui/ui-code-editor.js b/src/client/ui/ui-code-editor.js index 4c8dcabd..83dc0f5f 100644 --- a/src/client/ui/ui-code-editor.js +++ b/src/client/ui/ui-code-editor.js @@ -207,7 +207,11 @@ class CodeEditor { globals = this.widget.getProp('type') === 'canvas' ? {value: true, height: true, width: true, event: true} : {value: true, event: true, handle: true} + } else if (this.name === 'onResize') { + globals = {value: true, height: true, width: true, cssVars: true} } + + globals.locals = true globals.console = true globals.JS = true From 54b7bf7a630058a3b47785a474d1bc9f82ad6d32 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Mon, 19 May 2025 17:19:53 +0200 Subject: [PATCH 014/352] code editor: correctly detect tab-focus to reset scroll / cursor position --- CHANGELOG.md | 1 + src/client/ui/ui-code-editor.js | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0eb2eea7..e9dcca1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - bug fixes - keyboard: regression (1.27.5) breaking `velocity` property + - editor: retain scroll position in code editors ## 1.29.4 diff --git a/src/client/ui/ui-code-editor.js b/src/client/ui/ui-code-editor.js index 83dc0f5f..087d09ae 100644 --- a/src/client/ui/ui-code-editor.js +++ b/src/client/ui/ui-code-editor.js @@ -153,8 +153,12 @@ class CodeEditor { this.editor.dirty = true }) - var pos = this.editor.getCursorPosition() - if (pos.row === undefined || pos.column === undefined) this.editor.gotoLine(0) + setTimeout(()=>{ + var pos = this.editor.getCursorPosition() + if (pos.row === undefined || pos.column === undefined) { + this.editor.gotoLine(0) + } + }) this.typing = false setCommandEnabled(this.editor, 'indent', false) From 84cba42d866131b45af6dd76eeb949a870f05cc8 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Sat, 24 May 2025 13:22:29 +0200 Subject: [PATCH 015/352] cli: regression (1.28) preventing from setting options from a terminal on windows --- CHANGELOG.md | 1 + src/server/settings.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9dcca1e..becc280f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - bug fixes - keyboard: regression (1.27.5) breaking `velocity` property - editor: retain scroll position in code editors + - cli: regression (1.28) preventing from setting options from a terminal on windows ## 1.29.4 diff --git a/src/server/settings.js b/src/server/settings.js index 89c7c87a..2039d1a3 100644 --- a/src/server/settings.js +++ b/src/server/settings.js @@ -13,7 +13,7 @@ var path = require('path'), // rmeove all args before the first actual cli arg while (argv.length) { - if (argv[0][0] != '-' || argv[0][0] == '--') { + if (argv[0][0] != '-' || argv[0] == '--') { argv.splice(0, 1) } else if (argv[0][0] == '-' ) { break From aa666f0738022ad99302a7fce025a85d69b4395b Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Sat, 24 May 2025 13:23:00 +0200 Subject: [PATCH 016/352] package: v1.29.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c4972a38..fa6a7cf4 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.29.4", + "version": "1.29.5", "author": { "name": "Jean-Emmanuel Doucet", "email": "jean-emmanuel@ammd.net" From faba19e94cad715dac92ee27f5d9f2a96eea51d1 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Sat, 7 Jun 2025 13:56:20 +0200 Subject: [PATCH 017/352] matrix: sanitise quantity property (avoid error when NaN or < 0) --- CHANGELOG.md | 5 +++++ src/client/widgets/containers/matrix.js | 15 ++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index becc280f..d0543d23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 1.29.6 + +- bug fixes + - matrix: prevent error when `quantity` is invalid + ## 1.29.5 - bug fixes diff --git a/src/client/widgets/containers/matrix.js b/src/client/widgets/containers/matrix.js index d4f83a5b..48d35d55 100644 --- a/src/client/widgets/containers/matrix.js +++ b/src/client/widgets/containers/matrix.js @@ -66,7 +66,9 @@ class Matrix extends Panel { if (parser.widgets[this.getProp('widgetType')]) { - for (let i = 0; i < this.getProp('quantity'); i++) { + var quantity = Math.max(parseInt(this.getProp('quantity')) || 0, 0) + + for (let i = 0; i < quantity; i++) { var props = deepCopy(this.getProp('props')[i]) var data = this.defaultProps(i) @@ -129,9 +131,12 @@ class Matrix extends Panel { case 'quantity': - if (oldPropValue > this.getProp('quantity')) { + var quantity = Math.max(parseInt(this.getProp('quantity')) || 0, 0) + oldPropValue = Math.max(parseInt(oldPropValue) || 0, 0) - for (let i = oldPropValue - 1; i >= this.getProp('quantity'); i--) { + if (oldPropValue > quantity) { + + for (let i = oldPropValue - 1; i >= quantity; i--) { if (this.widget.contains(this.children[i].container)) { this.widget.removeChild(this.children[i].container) } @@ -142,7 +147,7 @@ class Matrix extends Panel { this.cachedProps.props = this.resolveProp('props', undefined, true) - for (let i = oldPropValue; i < this.getProp('quantity'); i++) { + for (let i = oldPropValue; i < quantity; i++) { var props = deepCopy(this.getProp('props')[i]) var data = this.defaultProps(i) @@ -227,7 +232,7 @@ class Matrix extends Panel { propValue = propValue !== undefined ? propValue : this.props[propName] var data = [], - quantity = this.resolveProp('quantity', undefined, false, false, false) + quantity = Math.max(parseInt(this.resolveProp('quantity', undefined, false, false, false)) || 0, 0) if (typeof propValue === 'object' && propValue !== null && !Array.isArray(propValue)) { for (let i = 0; i < quantity; i++) { From 69c52921c44c1981c658823e34d1f7a81fc10f30 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Thu, 12 Jun 2025 12:41:09 +0200 Subject: [PATCH 018/352] pads: send value when setting spring to true, but only if there's a value change --- CHANGELOG.md | 1 + src/client/widgets/pads/multixy.js | 2 +- src/client/widgets/pads/xy.js | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0543d23..da34696a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - bug fixes - matrix: prevent error when `quantity` is invalid + - multixy/xy: send value when setting `spring` to `true` (only if current value is different than spring value) ## 1.29.5 diff --git a/src/client/widgets/pads/multixy.js b/src/client/widgets/pads/multixy.js index 011ea99e..185c7cfc 100644 --- a/src/client/widgets/pads/multixy.js +++ b/src/client/widgets/pads/multixy.js @@ -402,7 +402,7 @@ class MultiXy extends Pad { case 'spring': case 'pointSize': case 'axisLock': - this.updatePadsAttr() + this.updatePadsAttr(options) return } diff --git a/src/client/widgets/pads/xy.js b/src/client/widgets/pads/xy.js index 76225f9b..f5b17b51 100644 --- a/src/client/widgets/pads/xy.js +++ b/src/client/widgets/pads/xy.js @@ -281,7 +281,11 @@ module.exports = class Xy extends Pad { this.batchDraw() return case 'spring': - if (this.getProp('spring') && !this.touched) this.setValue([this.faders.x.getSpringValue(),this.faders.y.getSpringValue()], {...options}) + if (this.getProp('spring') && !this.touched) { + var x = this.faders.x.getSpringValue(), + y = this.faders.y.getSpringValue() + if (x !== this.value[0] || y !== this.value[1]) this.setValue([x, y], {...options}) + } return } From dedb82bb864d83b1089b3ed2480be4d78d858ac6 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Mon, 23 Jun 2025 13:54:27 +0200 Subject: [PATCH 019/352] multixy/xy: add `stepsX` and `stepsY` properties --- CHANGELOG.md | 3 +++ src/client/widgets/pads/multixy.js | 8 ++++++-- src/client/widgets/pads/xy.js | 12 ++++++++---- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index da34696a..5b072ee7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ - matrix: prevent error when `quantity` is invalid - multixy/xy: send value when setting `spring` to `true` (only if current value is different than spring value) +- widgets + - multixy/xy: add `stepsX` and `stepsY` properties + ## 1.29.5 - bug fixes diff --git a/src/client/widgets/pads/multixy.js b/src/client/widgets/pads/multixy.js index 185c7cfc..30e5457d 100644 --- a/src/client/widgets/pads/multixy.js +++ b/src/client/widgets/pads/multixy.js @@ -47,10 +47,12 @@ class MultiXy extends Pad { 'If set to `true`, touching anywhere on the widget\'s surface will make them snap to the touching coordinates', ]}, spring: {type: 'boolean', value: false, help: 'When set to `true`, the widget will go back to its default value when released'}, - rangeX: {type: 'object', value: {min:0,max:1}, help: 'Defines the min and max values for the x axis'}, - rangeY: {type: 'object', value: {min:0,max:1}, help: 'Defines the min and max values for the y axis'}, + rangeX: {type: 'object', value: {min:0,max:1}, help: 'Defines the min and max values for the x axis (see fader)'}, + rangeY: {type: 'object', value: {min:0,max:1}, help: 'Defines the min and max values for the y axis (see fader)'}, logScaleX: {type: 'boolean|number', value: false, help: 'Set to `true` to use logarithmic scale for the x axis. Set to `-1` for exponential scale.'}, logScaleY: {type: 'boolean|number', value: false, help: 'Set to `true` to use logarithmic scale for the y axis. Set to `-1` for exponential scale.'}, + stepsX: {type: 'number|array|string', value: false, help: 'Defines `steps` for the x axis (see fader)'}, + stepsY: {type: 'number|array|string', value: false, help: 'Defines `steps` for the x axis (see fader)'}, axisLock: {type: 'string', value: '', choices: ['', 'x', 'y', 'auto'], help: [ 'Restrict movements to one of the axes only.', 'When left empty, holding `Shift` while dragging will lock the pad according the first movement. `auto` will do the opposite.' @@ -93,6 +95,8 @@ class MultiXy extends Pad { decimals:this.getProp('decimals'), logScaleX:this.getProp('logScaleX'), logScaleY:this.getProp('logScaleY'), + stepsX:this.getProp('stepsX'), + stepsY:this.getProp('stepsY'), axisLock:this.getProp('axisLock'), pointSize: 'auto', pips: false, diff --git a/src/client/widgets/pads/xy.js b/src/client/widgets/pads/xy.js index f5b17b51..3826c892 100644 --- a/src/client/widgets/pads/xy.js +++ b/src/client/widgets/pads/xy.js @@ -29,10 +29,12 @@ module.exports = class Xy extends Pad { 'If set to `true`, touching anywhere on the widget\'s surface will make them snap to the touching coordinates', ]}, spring: {type: 'boolean', value: false, help: 'When set to `true`, the widget will go back to its default value when released'}, - rangeX: {type: 'object', value: {min:0,max:1}, help: 'Defines the min and max values for the x axis'}, - rangeY: {type: 'object', value: {min:0,max:1}, help: 'Defines the min and max values for the y axis'}, + rangeX: {type: 'object', value: {min:0,max:1}, help: 'Defines the min and max values for the x axis (see fader)'}, + rangeY: {type: 'object', value: {min:0,max:1}, help: 'Defines the min and max values for the y axis (see fader)'}, logScaleX: {type: 'boolean|number', value: false, help: 'Set to `true` to use logarithmic scale for the x axis. Set to `-1` for exponential scale.'}, logScaleY: {type: 'boolean|number', value: false, help: 'Set to `true` to use logarithmic scale for the y axis. Set to `-1` for exponential scale.'}, + stepsX: {type: 'number|array|string', value: false, help: 'Defines `steps` for the x axis (see fader)'}, + stepsY: {type: 'number|array|string', value: false, help: 'Defines `steps` for the x axis (see fader)'}, axisLock: {type: 'string', value: '', choices: ['', 'x', 'y', 'auto'], help: [ 'Restrict movements to one of the axes only unless `Shift` is held.', 'When left empty, holding `Shift` while dragging will lock the pad according the first movement. `auto` will do the opposite.' @@ -70,6 +72,7 @@ module.exports = class Xy extends Pad { decimals:this.getProp('decimals'), logScale:this.getProp('logScaleX'), sensitivity: this.getProp('sensitivity'), + steps: this.getProp('stepsX'), }, parent: this}), y: new Fader({props:{ ...faderDefaults, @@ -82,6 +85,7 @@ module.exports = class Xy extends Pad { decimals:this.getProp('decimals'), logScale:this.getProp('logScaleY'), sensitivity: this.getProp('sensitivity'), + steps: this.getProp('stepsY'), }, parent: this}), } @@ -223,8 +227,8 @@ module.exports = class Xy extends Pad { if (!this.visible) return var pointSize = this.pointSize, - x = this.faders.x.percentToCoord(this.faders.x.percent), - y = this.faders.y.percentToCoord(this.faders.y.percent), + x = this.faders.x.percentToCoord(this.faders.x.valueToPercent(this.faders.x.value)), + y = this.faders.y.percentToCoord(this.faders.y.valueToPercent(this.faders.y.value)), ephemeral = this.getProp('ephemeral') this.clear() From 802e1780b12dbf6fb2499ea00d8cadd2e6e82b1a Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Thu, 26 Jun 2025 15:30:13 +0200 Subject: [PATCH 020/352] docs: canvas: ctx.clear() is not a thing --- src/client/widgets/pads/canvas.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/widgets/pads/canvas.js b/src/client/widgets/pads/canvas.js index 1b330cae..ce0d96c6 100644 --- a/src/client/widgets/pads/canvas.js +++ b/src/client/widgets/pads/canvas.js @@ -20,7 +20,7 @@ class CanvasWidget extends Canvas { 'When calling `set()` from a script, submitted value should be an array only if `valueLength` is greater than 1.' ]}, autoClear: {type: 'boolean', value: true, help: [ - 'If set to `false`, the canvas context won\'t be cleared automatically and `ctx.clear()` will need to be called in `onDraw`.' + 'If set to `false`, the canvas context won\'t be cleared automatically and `ctx.clearRect()` will need to be called in `onDraw`.' ]}, continuous: {type: 'boolean|number', value: false, help: [ 'If set to `true`, `onDraw` will be called at each frame, otherwise it will be called only when the widget is touched and when it receives a value.', From 379031379e9087158632de222fb74800e5669de9 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Fri, 27 Jun 2025 09:55:19 +0200 Subject: [PATCH 021/352] docs: update --- README.md | 2 +- resources/docs/docs/credits.md | 2 +- .../docs/docs/widgets/properties-reference.md | 14 +++++++++----- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 280b04ee..cecaf628 100644 --- a/README.md +++ b/README.md @@ -11,5 +11,5 @@ Open Stage Control ---- -Copyleft © Jean-Emmanuel Doucet @ [AMMD](http://ammd.net) 2014-2022. +Copyleft © Jean-Emmanuel Doucet 2014-2025. This program is a free software released under the [GNU/GPL3](ttps://github.com/jean-emmanuel/open-stage-control/blob/master/LICENSE) license. diff --git a/resources/docs/docs/credits.md b/resources/docs/docs/credits.md index bbdeb473..73425ad7 100644 --- a/resources/docs/docs/credits.md +++ b/resources/docs/docs/credits.md @@ -1,6 +1,6 @@ ## License -Copyleft © Jean-Emmanuel Doucet @ [AMMD](http://ammd.net) 2014-2022. +Copyleft © Jean-Emmanuel Doucet 2014-2025. This program is a free software released under the [GNU/GPL3](https://github.com/jean-emmanuel/open-stage-control/blob/master/LICENSE) license. ## Dependencies diff --git a/resources/docs/docs/widgets/properties-reference.md b/resources/docs/docs/widgets/properties-reference.md index 7f997a2c..9898b64f 100644 --- a/resources/docs/docs/widgets/properties-reference.md +++ b/resources/docs/docs/widgets/properties-reference.md @@ -776,10 +776,12 @@ | --- | --- | --- | --- | |
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 | |
spring#
| `boolean` | false | When set to `true`, the widget will go back to its default value when released | - |
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 | + |
rangeX#
| `object` | \{
 "min": 0,
 "max": 1
}
| Defines the min and max values for the x axis (see fader) | + |
rangeY#
| `object` | \{
 "min": 0,
 "max": 1
}
| Defines the min and max values for the y axis (see fader) | |
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. | + |
stepsX#
| `number`|
`array`|
`string` | false | Defines `steps` for the x axis (see fader) | + |
stepsY#
| `number`|
`array`|
`string` | false | Defines `steps` for the x axis (see fader) | |
axisLock#
| `string` | "" | Restrict movements to one of the axes only unless `Shift` is held.

When left empty, holding `Shift` while dragging will lock the pad according the first movement. `auto` will do the opposite.

Choices: ``, `x`, `y`, `auto` | |
doubleTap#
| `boolean`|
`string` | false | Set to `true` to make the knob reset to its `default` value when receiving a double tap.

Can be an osc address, in which case the widget will just send an osc message with no value (but `preArgs` included).

If set to "script", `onTouch` will be called with `event.type` set to `doubleTap`.

Choices: `false`, `true`, `script` | |
sensitivity#
| `number` | 1 | Defines the pad's sensitivity when `snap` is `false` | @@ -830,10 +832,12 @@ |
pointsAttr#
| `object` | [] | Defines per-point properties that are otherwise inherited from the multixy. Must be an array of objects (one per point) that may contain the following keys:
- visible (visibility and interactability)
- colorFill (background color)
- colorStroke (outline color)
- colorText (label color)
- color (shorthand for colorFill and colorStroke)
- alphaFillOn (background opacity)
- pointSize
- label | |
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 | |
spring#
| `boolean` | false | When set to `true`, the widget will go back to its default value when released | - |
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 | + |
rangeX#
| `object` | \{
 "min": 0,
 "max": 1
}
| Defines the min and max values for the x axis (see fader) | + |
rangeY#
| `object` | \{
 "min": 0,
 "max": 1
}
| Defines the min and max values for the y axis (see fader) | |
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. | + |
stepsX#
| `number`|
`array`|
`string` | false | Defines `steps` for the x axis (see fader) | + |
stepsY#
| `number`|
`array`|
`string` | false | Defines `steps` for the x axis (see fader) | |
axisLock#
| `string` | "" | Restrict movements to one of the axes only.

When left empty, holding `Shift` while dragging will lock the pad according the first movement. `auto` will do the opposite.

Choices: ``, `x`, `y`, `auto` | |
doubleTap#
| `boolean`|
`string` | false | Set to `true` to make the knob reset to its `default` value when receiving a double tap.

Can be an osc address, in which case the widget will just send an osc message with no value (but `preArgs` included).

If set to "script", `onTouch` will be called with `event.type` set to `doubleTap`.

Choices: `false`, `true`, `script` | |
sensitivity#
| `number` | 1 | Defines the pad's sensitivity when `snap` is `false` | @@ -859,7 +863,7 @@ | property | type |default | description | | --- | --- | --- | --- | |
valueLength#
| `number` | 1 | Defines the number of values accepted by the widget (minimum 1). Incoming messages that don't comply will be ignored

When calling `set()` from a script, submitted value should be an array only if `valueLength` is greater than 1. | - |
autoClear#
| `boolean` | true | If set to `false`, the canvas context won't be cleared automatically and `ctx.clear()` will need to be called in `onDraw`. | + |
autoClear#
| `boolean` | true | If set to `false`, the canvas context won't be cleared automatically and `ctx.clearRect()` will need to be called in `onDraw`. | |
continuous#
| `boolean`|
`number` | false | If set to `true`, `onDraw` will be called at each frame, otherwise it will be called only when the widget is touched and when it receives a value.

Can be a number between 1 and 60 to specify the framerate (default: 30 fps). | === "scripting" From 5e06f5cf947201c22865a1dece5b0949debf0daa Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Fri, 27 Jun 2025 09:55:32 +0200 Subject: [PATCH 022/352] package: 1.29.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fa6a7cf4..b819dbcb 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.29.5", + "version": "1.29.6", "author": { "name": "Jean-Emmanuel Doucet", "email": "jean-emmanuel@ammd.net" From 0666d4677e599bdae084c402ae0170659171528d Mon Sep 17 00:00:00 2001 From: wicast Date: Tue, 8 Jul 2025 11:00:47 +0800 Subject: [PATCH 023/352] feat: add tray icon --- src/server/index.js | 10 +++++++ src/server/tray.js | 69 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 src/server/tray.js diff --git a/src/server/index.js b/src/server/index.js index ed1ef705..50e47f7b 100644 --- a/src/server/index.js +++ b/src/server/index.js @@ -5,6 +5,7 @@ var dev = process.argv[0].includes('node_modules'), docsServer, app = null, launcher = null, + tray = null, clientWindows = [], serverProcess = null, node = false @@ -221,6 +222,15 @@ function startLauncher() { process.stderr.write = stderrWrite if (process.log) process.log = processLog }) + + tray = require('./tray')({ + window: launcher, + openClient: openClient, + app: app, + startServer: startServerProcess, + stopServer: stopServerProcess + }) + }) let processLog = process.log, diff --git a/src/server/tray.js b/src/server/tray.js new file mode 100644 index 00000000..cca4275c --- /dev/null +++ b/src/server/tray.js @@ -0,0 +1,69 @@ +var { Menu, Tray, ipcMain } = require('electron') + +var tray = null, + contextMenu = null, + hideInTray = false, + isServerRunning = false + +module.exports = function (options = {}) { + + ipcMain.on('start', function (e, options) { + isServerRunning = true + resetMenu(isServerRunning) + }) + + ipcMain.on('stop', function (e, options) { + isServerRunning = false + resetMenu(isServerRunning) + }) + + tray = new Tray(__dirname + '/../assets/logo.png') + contextMenu = Menu.buildFromTemplate([ + { + label: 'Open/Hide', click: () => { + if (hideInTray) { + options.window.show() + hideInTray = false + } else { + options.window.hide() + hideInTray = true + } + } + }, + { + label: 'Start/Stop', + click: () => { + console.log(isServerRunning) + if (isServerRunning) { + ipcMain.emit('stop'); + } else { + ipcMain.emit('start'); + } + } + }, + { + label: 'New Window', click: () => { + if (isServerRunning) { + options.openClient() + } + }, + enabled: isServerRunning + }, + { type: 'separator' }, + { label: 'Quit', click: () => { void options.app.quit(); } }, + ]); + tray.setContextMenu(contextMenu) + tray.setToolTip('Open Stage Control') + + return tray + +} + +function resetMenu(isServerRunning) { + contextMenu.items.forEach(item => { + if (item.label === 'New Window') { + item.enabled = isServerRunning + } + }) + tray.setContextMenu(contextMenu) +} \ No newline at end of file From a89f24d2f138c661520688727449f73aa51df9fe Mon Sep 17 00:00:00 2001 From: wicast Date: Tue, 8 Jul 2025 11:53:37 +0800 Subject: [PATCH 024/352] fix: macos tray icon size --- resources/images/logo_16x16.png | Bin 0 -> 931 bytes scripts/copy-assets.js | 4 ++++ src/server/tray.js | 7 +++++-- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 resources/images/logo_16x16.png diff --git a/resources/images/logo_16x16.png b/resources/images/logo_16x16.png new file mode 100644 index 0000000000000000000000000000000000000000..d6670a2ac34cfa2d5830bb546baad96b4dd95e9e GIT binary patch literal 931 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!Lb6AYF9SoB8UsT^3j@P1pisjL z28L1t28LG&3=CE?7#PG0=IjczVPIg?3GfMVRaDhhR0AR%MHMXtC3Sfvbp>S&AgQRT zqoAw_6bEt@R5XFgAf%F-E=UUysc3<;fTXmbNJUG}*3TiK(Ys`xo~^&Sp^aDZ+?2(S z6Xx6u@7|xXk&#nhy)dK=QZLsi$@z%fKYSsi4u zsLzLm>#t$pLB z0MG8Ij4hS^nwe8vxLF-jS;KC9`(N)OJ|q9VP4PTSW`+YBVirc|6zVX~JXMprcH!&Z zuUzrxDhiW}SKrJsy?xs{wDDQx;>&kUeJHJ8;Bot1NvRH#5JNMC9x#cD!C{XNHG{0 z7@6uCnClu?gculG8CY5wT51~@SQ!|kU2U&N(U6;;l9^VCTZ4Fq{b8U64Y&;@nYpRO zC5gEOXnITxt&EHzmYmEfJr2|(3DOgspH@mmtT}V`<;yx PP!WTttDnm{r-UW|_M$kQ literal 0 HcmV?d00001 diff --git a/scripts/copy-assets.js b/scripts/copy-assets.js index 73ad3e70..65c2df23 100644 --- a/scripts/copy-assets.js +++ b/scripts/copy-assets.js @@ -14,6 +14,10 @@ var cpr = require('cpr'), ['../node_modules/ace-builds/src-min/worker-javascript.js', '../app/client/workers/worker-javascript.js'], ] +if (process.platform === 'darwin') { + files.push(['../resources/images/logo_16x16.png', '../app/assets/logo_16x16.png']) +} + for (var i in files) { cpr(...files[i].map(f => path.resolve(__dirname + '/' + f)), { overwrite: true diff --git a/src/server/tray.js b/src/server/tray.js index cca4275c..79e63542 100644 --- a/src/server/tray.js +++ b/src/server/tray.js @@ -17,7 +17,11 @@ module.exports = function (options = {}) { resetMenu(isServerRunning) }) - tray = new Tray(__dirname + '/../assets/logo.png') + var icon = __dirname + '/../assets/logo.png' + if (process.platform === 'darwin') { + var icon = __dirname + '/../assets/logo_16x16.png' + } + tray = new Tray(icon) contextMenu = Menu.buildFromTemplate([ { label: 'Open/Hide', click: () => { @@ -33,7 +37,6 @@ module.exports = function (options = {}) { { label: 'Start/Stop', click: () => { - console.log(isServerRunning) if (isServerRunning) { ipcMain.emit('stop'); } else { From 2532ab67643bf4f5af76a8cc0b2b2e36429ab74f Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 8 Jul 2025 09:43:48 +0200 Subject: [PATCH 025/352] build: use sass instead of node-sass to fix mac builds --- package.json | 2 +- scripts/build-css.js | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index b819dbcb..d60c7d7d 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,6 @@ "nanomorph": "5.4.3", "node-forge": "1.3.1", "node-mouse": "0.0.2", - "node-sass": "9.0.0", "nodemon": "2.0.16", "nosleep.js": "0.12.0", "open": "8.4.0", @@ -67,6 +66,7 @@ "qrcode": "1.5.1", "replacestream": "4.0.3", "sanitize-html": "1.27.5", + "sass": "1.89.2", "scope-css": "1.2.1", "screenfull": "5.2.0", "semver": "7.3.7", diff --git a/scripts/build-css.js b/scripts/build-css.js index 0e697159..c828cdb5 100644 --- a/scripts/build-css.js +++ b/scripts/build-css.js @@ -1,4 +1,4 @@ -var sass = require('node-sass'), +var sass = require('sass'), path = require('path'), fs = require('fs') @@ -10,7 +10,8 @@ fs.readdirSync(indir + '/themes/').forEach(file => { if (file.includes('.scss') && file !== 'default.scss') { let result = sass.renderSync({ file: indir + '/themes/' + file, - outputStyle: 'compressed' + outputStyle: 'compressed', + silenceDeprecations: ['mixed-decls', 'slash-div', 'import', 'legacy-js-api'] }) fs.writeFileSync(outdir + '/themes/' + file.split('/').pop().replace('scss', 'css'), result.css) @@ -22,7 +23,8 @@ var result = sass.renderSync({ file: indir + '/index.scss', outFile: outdir + '/open-stage-control.css', outputStyle: 'compressed', - sourceMap: true + sourceMap: true, + silenceDeprecations: ['mixed-decls', 'slash-div', 'import', 'legacy-js-api'] }) fs.writeFileSync(outdir + '/open-stage-control.css', result.css) From 3b887d7a152463b09de43c1d1b12d428f87d9978 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 8 Jul 2025 09:44:50 +0200 Subject: [PATCH 026/352] package-lock: update --- package-lock.json | 399 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 388 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index f0a6aed4..4a480a40 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "open-stage-control", - "version": "1.29.1", + "version": "1.29.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "open-stage-control", - "version": "1.29.1", + "version": "1.29.6", "hasInstallScript": true, "license": "GPL-3.0", "dependencies": { @@ -57,6 +57,7 @@ "qrcode": "1.5.1", "replacestream": "4.0.3", "sanitize-html": "1.27.5", + "sass": "^1.89.2", "scope-css": "1.2.1", "screenfull": "5.2.0", "semver": "7.3.7", @@ -3011,6 +3012,300 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/@parcel/watcher": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.1.tgz", + "integrity": "sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==", + "hasInstallScript": true, + "optional": true, + "dependencies": { + "detect-libc": "^1.0.3", + "is-glob": "^4.0.3", + "micromatch": "^4.0.5", + "node-addon-api": "^7.0.0" + }, + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "@parcel/watcher-android-arm64": "2.5.1", + "@parcel/watcher-darwin-arm64": "2.5.1", + "@parcel/watcher-darwin-x64": "2.5.1", + "@parcel/watcher-freebsd-x64": "2.5.1", + "@parcel/watcher-linux-arm-glibc": "2.5.1", + "@parcel/watcher-linux-arm-musl": "2.5.1", + "@parcel/watcher-linux-arm64-glibc": "2.5.1", + "@parcel/watcher-linux-arm64-musl": "2.5.1", + "@parcel/watcher-linux-x64-glibc": "2.5.1", + "@parcel/watcher-linux-x64-musl": "2.5.1", + "@parcel/watcher-win32-arm64": "2.5.1", + "@parcel/watcher-win32-ia32": "2.5.1", + "@parcel/watcher-win32-x64": "2.5.1" + } + }, + "node_modules/@parcel/watcher-android-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.1.tgz", + "integrity": "sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.1.tgz", + "integrity": "sha512-eAzPv5osDmZyBhou8PoF4i6RQXAfeKL9tjb3QzYuccXFMQU0ruIc/POh30ePnaOyD1UXdlKguHBmsTs53tVoPw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.1.tgz", + "integrity": "sha512-1ZXDthrnNmwv10A0/3AJNZ9JGlzrF82i3gNQcWOzd7nJ8aj+ILyW1MTxVk35Db0u91oD5Nlk9MBiujMlwmeXZg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-freebsd-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.1.tgz", + "integrity": "sha512-SI4eljM7Flp9yPuKi8W0ird8TI/JK6CSxju3NojVI6BjHsTyK7zxA9urjVjEKJ5MBYC+bLmMcbAWlZ+rFkLpJQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.1.tgz", + "integrity": "sha512-RCdZlEyTs8geyBkkcnPWvtXLY44BCeZKmGYRtSgtwwnHR4dxfHRG3gR99XdMEdQ7KeiDdasJwwvNSF5jKtDwdA==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.1.tgz", + "integrity": "sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.1.tgz", + "integrity": "sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.1.tgz", + "integrity": "sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.1.tgz", + "integrity": "sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.1.tgz", + "integrity": "sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.1.tgz", + "integrity": "sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-ia32": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.1.tgz", + "integrity": "sha512-c2KkcVN+NJmuA7CGlaGD1qJh1cLfDnQsHjE89E60vUEMlqduHGCdCLJCID5geFVM0dOtA3ZiIO8BoEQmzQVfpQ==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.1.tgz", + "integrity": "sha512-9lHBdJITeNR++EvSQVUcaZoWupyHfXe1jZvGZ06O/5MflPcuPLtEphScIBL+AiCWBO46tDSHzWyD0uDmmZqsgA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher/node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "optional": true, + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/@serialport/binding-abstract": { "version": "9.2.4", "license": "MIT", @@ -3907,10 +4202,11 @@ "license": "MIT" }, "node_modules/braces": { - "version": "3.0.2", - "license": "MIT", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -6168,8 +6464,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "license": "MIT", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -6964,6 +7261,11 @@ "version": "1.0.1", "license": "ISC" }, + "node_modules/immutable": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.1.3.tgz", + "integrity": "sha512-+chQdDfvscSF1SJqv2gn4SRO2ZyS3xL3r7IW/wWEEzrzLisnOlKiQu5ytC/BVNcS15C39WT2Hg/bjKjDMcu+zg==" + }, "node_modules/import-fresh": { "version": "3.3.0", "license": "MIT", @@ -7202,7 +7504,8 @@ }, "node_modules/is-number": { "version": "7.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "engines": { "node": ">=0.12.0" } @@ -7867,6 +8170,19 @@ "source-map": "^0.5.6" } }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "optional": true, + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, "node_modules/miller-rabin": { "version": "4.0.1", "license": "MIT", @@ -8259,6 +8575,12 @@ "node": ">=10" } }, + "node_modules/node-addon-api": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", + "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", + "optional": true + }, "node_modules/node-forge": { "version": "1.3.1", "license": "(BSD-3-Clause OR GPL-2.0)", @@ -9219,8 +9541,9 @@ "license": "ISC" }, "node_modules/picomatch": { - "version": "2.2.3", - "license": "MIT", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "engines": { "node": ">=8.6" }, @@ -9919,6 +10242,25 @@ "postcss": "^7.0.27" } }, + "node_modules/sass": { + "version": "1.89.2", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.89.2.tgz", + "integrity": "sha512-xCmtksBKd/jdJ9Bt9p7nPKiuqrlBMBuuGkQlkhZjjQk3Ty48lv93k5Dq6OPkKt4XwxDJ7tvlfrTa1MPA9bf+QA==", + "dependencies": { + "chokidar": "^4.0.0", + "immutable": "^5.0.2", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=14.0.0" + }, + "optionalDependencies": { + "@parcel/watcher": "^2.4.1" + } + }, "node_modules/sass-graph": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-4.0.1.tgz", @@ -9936,6 +10278,32 @@ "node": ">=12" } }, + "node_modules/sass/node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/sass/node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/scope-css": { "version": "1.2.1", "license": "MIT", @@ -10261,6 +10629,14 @@ "node": ">=0.10.0" } }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/source-map-support": { "version": "0.5.21", "license": "MIT", @@ -10782,7 +11158,8 @@ }, "node_modules/to-regex-range": { "version": "5.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dependencies": { "is-number": "^7.0.0" }, From b23c062e07f04a3e7ea0d0af0cd0309429356d48 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Fri, 27 Jun 2025 09:55:19 +0200 Subject: [PATCH 027/352] docs: update --- README.md | 2 +- resources/docs/docs/credits.md | 2 +- .../docs/docs/widgets/properties-reference.md | 14 +++++++++----- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 280b04ee..cecaf628 100644 --- a/README.md +++ b/README.md @@ -11,5 +11,5 @@ Open Stage Control ---- -Copyleft © Jean-Emmanuel Doucet @ [AMMD](http://ammd.net) 2014-2022. +Copyleft © Jean-Emmanuel Doucet 2014-2025. This program is a free software released under the [GNU/GPL3](ttps://github.com/jean-emmanuel/open-stage-control/blob/master/LICENSE) license. diff --git a/resources/docs/docs/credits.md b/resources/docs/docs/credits.md index bbdeb473..73425ad7 100644 --- a/resources/docs/docs/credits.md +++ b/resources/docs/docs/credits.md @@ -1,6 +1,6 @@ ## License -Copyleft © Jean-Emmanuel Doucet @ [AMMD](http://ammd.net) 2014-2022. +Copyleft © Jean-Emmanuel Doucet 2014-2025. This program is a free software released under the [GNU/GPL3](https://github.com/jean-emmanuel/open-stage-control/blob/master/LICENSE) license. ## Dependencies diff --git a/resources/docs/docs/widgets/properties-reference.md b/resources/docs/docs/widgets/properties-reference.md index 7f997a2c..9898b64f 100644 --- a/resources/docs/docs/widgets/properties-reference.md +++ b/resources/docs/docs/widgets/properties-reference.md @@ -776,10 +776,12 @@ | --- | --- | --- | --- | |
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 | |
spring#
| `boolean` | false | When set to `true`, the widget will go back to its default value when released | - |
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 | + |
rangeX#
| `object` | \{
 "min": 0,
 "max": 1
}
| Defines the min and max values for the x axis (see fader) | + |
rangeY#
| `object` | \{
 "min": 0,
 "max": 1
}
| Defines the min and max values for the y axis (see fader) | |
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. | + |
stepsX#
| `number`|
`array`|
`string` | false | Defines `steps` for the x axis (see fader) | + |
stepsY#
| `number`|
`array`|
`string` | false | Defines `steps` for the x axis (see fader) | |
axisLock#
| `string` | "" | Restrict movements to one of the axes only unless `Shift` is held.

When left empty, holding `Shift` while dragging will lock the pad according the first movement. `auto` will do the opposite.

Choices: ``, `x`, `y`, `auto` | |
doubleTap#
| `boolean`|
`string` | false | Set to `true` to make the knob reset to its `default` value when receiving a double tap.

Can be an osc address, in which case the widget will just send an osc message with no value (but `preArgs` included).

If set to "script", `onTouch` will be called with `event.type` set to `doubleTap`.

Choices: `false`, `true`, `script` | |
sensitivity#
| `number` | 1 | Defines the pad's sensitivity when `snap` is `false` | @@ -830,10 +832,12 @@ |
pointsAttr#
| `object` | [] | Defines per-point properties that are otherwise inherited from the multixy. Must be an array of objects (one per point) that may contain the following keys:
- visible (visibility and interactability)
- colorFill (background color)
- colorStroke (outline color)
- colorText (label color)
- color (shorthand for colorFill and colorStroke)
- alphaFillOn (background opacity)
- pointSize
- label | |
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 | |
spring#
| `boolean` | false | When set to `true`, the widget will go back to its default value when released | - |
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 | + |
rangeX#
| `object` | \{
 "min": 0,
 "max": 1
}
| Defines the min and max values for the x axis (see fader) | + |
rangeY#
| `object` | \{
 "min": 0,
 "max": 1
}
| Defines the min and max values for the y axis (see fader) | |
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. | + |
stepsX#
| `number`|
`array`|
`string` | false | Defines `steps` for the x axis (see fader) | + |
stepsY#
| `number`|
`array`|
`string` | false | Defines `steps` for the x axis (see fader) | |
axisLock#
| `string` | "" | Restrict movements to one of the axes only.

When left empty, holding `Shift` while dragging will lock the pad according the first movement. `auto` will do the opposite.

Choices: ``, `x`, `y`, `auto` | |
doubleTap#
| `boolean`|
`string` | false | Set to `true` to make the knob reset to its `default` value when receiving a double tap.

Can be an osc address, in which case the widget will just send an osc message with no value (but `preArgs` included).

If set to "script", `onTouch` will be called with `event.type` set to `doubleTap`.

Choices: `false`, `true`, `script` | |
sensitivity#
| `number` | 1 | Defines the pad's sensitivity when `snap` is `false` | @@ -859,7 +863,7 @@ | property | type |default | description | | --- | --- | --- | --- | |
valueLength#
| `number` | 1 | Defines the number of values accepted by the widget (minimum 1). Incoming messages that don't comply will be ignored

When calling `set()` from a script, submitted value should be an array only if `valueLength` is greater than 1. | - |
autoClear#
| `boolean` | true | If set to `false`, the canvas context won't be cleared automatically and `ctx.clear()` will need to be called in `onDraw`. | + |
autoClear#
| `boolean` | true | If set to `false`, the canvas context won't be cleared automatically and `ctx.clearRect()` will need to be called in `onDraw`. | |
continuous#
| `boolean`|
`number` | false | If set to `true`, `onDraw` will be called at each frame, otherwise it will be called only when the widget is touched and when it receives a value.

Can be a number between 1 and 60 to specify the framerate (default: 30 fps). | === "scripting" From 55618fe5c37e1b75c93ede40e749381ace161045 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Fri, 27 Jun 2025 09:55:32 +0200 Subject: [PATCH 028/352] package: 1.29.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fa6a7cf4..b819dbcb 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.29.5", + "version": "1.29.6", "author": { "name": "Jean-Emmanuel Doucet", "email": "jean-emmanuel@ammd.net" From bde7039d257abef965ceb74720b52c90026dacd1 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 8 Jul 2025 09:43:48 +0200 Subject: [PATCH 029/352] build: use sass instead of node-sass to fix mac builds --- package.json | 2 +- scripts/build-css.js | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index b819dbcb..d60c7d7d 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,6 @@ "nanomorph": "5.4.3", "node-forge": "1.3.1", "node-mouse": "0.0.2", - "node-sass": "9.0.0", "nodemon": "2.0.16", "nosleep.js": "0.12.0", "open": "8.4.0", @@ -67,6 +66,7 @@ "qrcode": "1.5.1", "replacestream": "4.0.3", "sanitize-html": "1.27.5", + "sass": "1.89.2", "scope-css": "1.2.1", "screenfull": "5.2.0", "semver": "7.3.7", diff --git a/scripts/build-css.js b/scripts/build-css.js index 0e697159..c828cdb5 100644 --- a/scripts/build-css.js +++ b/scripts/build-css.js @@ -1,4 +1,4 @@ -var sass = require('node-sass'), +var sass = require('sass'), path = require('path'), fs = require('fs') @@ -10,7 +10,8 @@ fs.readdirSync(indir + '/themes/').forEach(file => { if (file.includes('.scss') && file !== 'default.scss') { let result = sass.renderSync({ file: indir + '/themes/' + file, - outputStyle: 'compressed' + outputStyle: 'compressed', + silenceDeprecations: ['mixed-decls', 'slash-div', 'import', 'legacy-js-api'] }) fs.writeFileSync(outdir + '/themes/' + file.split('/').pop().replace('scss', 'css'), result.css) @@ -22,7 +23,8 @@ var result = sass.renderSync({ file: indir + '/index.scss', outFile: outdir + '/open-stage-control.css', outputStyle: 'compressed', - sourceMap: true + sourceMap: true, + silenceDeprecations: ['mixed-decls', 'slash-div', 'import', 'legacy-js-api'] }) fs.writeFileSync(outdir + '/open-stage-control.css', result.css) From aa2d5029bec0960d8eae3387ad777cd319528ea5 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 8 Jul 2025 09:44:50 +0200 Subject: [PATCH 030/352] package-lock: update --- package-lock.json | 399 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 388 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index f0a6aed4..4a480a40 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "open-stage-control", - "version": "1.29.1", + "version": "1.29.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "open-stage-control", - "version": "1.29.1", + "version": "1.29.6", "hasInstallScript": true, "license": "GPL-3.0", "dependencies": { @@ -57,6 +57,7 @@ "qrcode": "1.5.1", "replacestream": "4.0.3", "sanitize-html": "1.27.5", + "sass": "^1.89.2", "scope-css": "1.2.1", "screenfull": "5.2.0", "semver": "7.3.7", @@ -3011,6 +3012,300 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/@parcel/watcher": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.1.tgz", + "integrity": "sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==", + "hasInstallScript": true, + "optional": true, + "dependencies": { + "detect-libc": "^1.0.3", + "is-glob": "^4.0.3", + "micromatch": "^4.0.5", + "node-addon-api": "^7.0.0" + }, + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "@parcel/watcher-android-arm64": "2.5.1", + "@parcel/watcher-darwin-arm64": "2.5.1", + "@parcel/watcher-darwin-x64": "2.5.1", + "@parcel/watcher-freebsd-x64": "2.5.1", + "@parcel/watcher-linux-arm-glibc": "2.5.1", + "@parcel/watcher-linux-arm-musl": "2.5.1", + "@parcel/watcher-linux-arm64-glibc": "2.5.1", + "@parcel/watcher-linux-arm64-musl": "2.5.1", + "@parcel/watcher-linux-x64-glibc": "2.5.1", + "@parcel/watcher-linux-x64-musl": "2.5.1", + "@parcel/watcher-win32-arm64": "2.5.1", + "@parcel/watcher-win32-ia32": "2.5.1", + "@parcel/watcher-win32-x64": "2.5.1" + } + }, + "node_modules/@parcel/watcher-android-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.1.tgz", + "integrity": "sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.1.tgz", + "integrity": "sha512-eAzPv5osDmZyBhou8PoF4i6RQXAfeKL9tjb3QzYuccXFMQU0ruIc/POh30ePnaOyD1UXdlKguHBmsTs53tVoPw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.1.tgz", + "integrity": "sha512-1ZXDthrnNmwv10A0/3AJNZ9JGlzrF82i3gNQcWOzd7nJ8aj+ILyW1MTxVk35Db0u91oD5Nlk9MBiujMlwmeXZg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-freebsd-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.1.tgz", + "integrity": "sha512-SI4eljM7Flp9yPuKi8W0ird8TI/JK6CSxju3NojVI6BjHsTyK7zxA9urjVjEKJ5MBYC+bLmMcbAWlZ+rFkLpJQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.1.tgz", + "integrity": "sha512-RCdZlEyTs8geyBkkcnPWvtXLY44BCeZKmGYRtSgtwwnHR4dxfHRG3gR99XdMEdQ7KeiDdasJwwvNSF5jKtDwdA==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.1.tgz", + "integrity": "sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.1.tgz", + "integrity": "sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.1.tgz", + "integrity": "sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.1.tgz", + "integrity": "sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.1.tgz", + "integrity": "sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.1.tgz", + "integrity": "sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-ia32": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.1.tgz", + "integrity": "sha512-c2KkcVN+NJmuA7CGlaGD1qJh1cLfDnQsHjE89E60vUEMlqduHGCdCLJCID5geFVM0dOtA3ZiIO8BoEQmzQVfpQ==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.1.tgz", + "integrity": "sha512-9lHBdJITeNR++EvSQVUcaZoWupyHfXe1jZvGZ06O/5MflPcuPLtEphScIBL+AiCWBO46tDSHzWyD0uDmmZqsgA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher/node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "optional": true, + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/@serialport/binding-abstract": { "version": "9.2.4", "license": "MIT", @@ -3907,10 +4202,11 @@ "license": "MIT" }, "node_modules/braces": { - "version": "3.0.2", - "license": "MIT", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -6168,8 +6464,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "license": "MIT", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -6964,6 +7261,11 @@ "version": "1.0.1", "license": "ISC" }, + "node_modules/immutable": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.1.3.tgz", + "integrity": "sha512-+chQdDfvscSF1SJqv2gn4SRO2ZyS3xL3r7IW/wWEEzrzLisnOlKiQu5ytC/BVNcS15C39WT2Hg/bjKjDMcu+zg==" + }, "node_modules/import-fresh": { "version": "3.3.0", "license": "MIT", @@ -7202,7 +7504,8 @@ }, "node_modules/is-number": { "version": "7.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "engines": { "node": ">=0.12.0" } @@ -7867,6 +8170,19 @@ "source-map": "^0.5.6" } }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "optional": true, + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, "node_modules/miller-rabin": { "version": "4.0.1", "license": "MIT", @@ -8259,6 +8575,12 @@ "node": ">=10" } }, + "node_modules/node-addon-api": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", + "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", + "optional": true + }, "node_modules/node-forge": { "version": "1.3.1", "license": "(BSD-3-Clause OR GPL-2.0)", @@ -9219,8 +9541,9 @@ "license": "ISC" }, "node_modules/picomatch": { - "version": "2.2.3", - "license": "MIT", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "engines": { "node": ">=8.6" }, @@ -9919,6 +10242,25 @@ "postcss": "^7.0.27" } }, + "node_modules/sass": { + "version": "1.89.2", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.89.2.tgz", + "integrity": "sha512-xCmtksBKd/jdJ9Bt9p7nPKiuqrlBMBuuGkQlkhZjjQk3Ty48lv93k5Dq6OPkKt4XwxDJ7tvlfrTa1MPA9bf+QA==", + "dependencies": { + "chokidar": "^4.0.0", + "immutable": "^5.0.2", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=14.0.0" + }, + "optionalDependencies": { + "@parcel/watcher": "^2.4.1" + } + }, "node_modules/sass-graph": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-4.0.1.tgz", @@ -9936,6 +10278,32 @@ "node": ">=12" } }, + "node_modules/sass/node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/sass/node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/scope-css": { "version": "1.2.1", "license": "MIT", @@ -10261,6 +10629,14 @@ "node": ">=0.10.0" } }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/source-map-support": { "version": "0.5.21", "license": "MIT", @@ -10782,7 +11158,8 @@ }, "node_modules/to-regex-range": { "version": "5.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dependencies": { "is-number": "^7.0.0" }, From a5d5586dc367f9d8be3b193b392c414c74a43297 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 8 Jul 2025 16:58:02 +0200 Subject: [PATCH 031/352] tray: code lint, retina icon for mac, keep alive launcher and tray when closing if there's a client window --- .../images/{logo_16x16.png => logo_tray.png} | Bin resources/images/logo_tray@x2.png | Bin 0 -> 1688 bytes scripts/copy-assets.js | 2 + src/server/index.js | 24 +++- src/server/tray.js | 111 ++++++++++-------- 5 files changed, 85 insertions(+), 52 deletions(-) rename resources/images/{logo_16x16.png => logo_tray.png} (100%) create mode 100644 resources/images/logo_tray@x2.png diff --git a/resources/images/logo_16x16.png b/resources/images/logo_tray.png similarity index 100% rename from resources/images/logo_16x16.png rename to resources/images/logo_tray.png diff --git a/resources/images/logo_tray@x2.png b/resources/images/logo_tray@x2.png new file mode 100644 index 0000000000000000000000000000000000000000..c3c4f0c64225c3409ebabefe20c365e491489eca GIT binary patch literal 1688 zcmV;J250$+P)b%78FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H11|>;E zK~z|Ut(RSF99I>`fA`Mr&U(Ec_S!D79mny3x z@-VwoyLRGDn*YgzkvoZbzs-q1diqs}RHiP-K8BD9#EY z2Bj(-Pp8vHCHsnv2qY5Sn;l{AQ-W`xsI7=C%%k{CQ7az2df~$KT@mQ*?e$%`Hunth z3{bW9OF>o5rvND2m_;dPy>0Rc@nUOJ{m+MnhKdyvXh|mHev`L=U1gc(53;Fy7mc6Z zMQ!^I0@ZPZlmIBl!CabW{?Zv{&YfUp_yl%w)gKtJ4f)k8S4I{#B+${(l~9^|7w9Z| zx@G5=*w+6v!PtH4Ik5)j;yjmzjxhfIZ&9{g7N@1dp0Tmi*ewZ^JU0?;=tV=D4I5;q1}cn#Yu+>!B}PrdAUe)i~orcND0IS%>E6aboE$6p=wKCxt=PdY;Nl_i_D zyLHDlmYF>H$BK=w3cGR`Ir;)qr;d5+#^QA-RZ2Y^_vBL1CvoWZD3!7{bLl_WRz`YJQxeiGY|a z3%%@wmG%1`LaZy5Kn@_kFyjdW(fWICUi$p*gHkxQm4@wx8LWsfg+lM0q0QiGp zT0j5gdqzNy)I%x9jGObGTq#b-s(=~*G62)3-@{yThnCJqzJ*T@ePZK6N1T9;qi(x7iE3Z53FY8l`A?1I<8d zbHkoBBN;$z>-JhrcRrvrlnTv9v?+nVYDEK4Zey{{yjNZ|UjQu-a*x`IifS!q$xWwG zcIir>xTuQ$of8vhZg`|WK9+ZOCOaL;yJZppdL&M$e#@$f_jYiKCd-*AmUDAn(Lr%h zL+nYX&yBB&+Ikn0QY8KW?DiCe#9tjn56AI`Vn{9Eb~VqaftAl<+?>Z+%6M|=Yh2aK?tPg)_2FYKJs)mmXzYa<*}|`DD~F59d5(R>DI2U zMrmpL5b8-Fep}^_kO6gAS>j+h+i!&p36zmcCId?a`h--wK<)t5N@)zr`H@0000settings.options[x].launcher !== false).length / 2), node:true, color:'#151a24', id: 'launcher'}) require('@electron/remote/main').enable(launcher.webContents) - launcher.on('close', ()=>{ - process.stdout.write = stdoutWrite - process.stderr.write = stderrWrite - if (process.log) process.log = processLog - }) tray = require('./tray')({ window: launcher, @@ -231,6 +226,25 @@ function startLauncher() { stopServer: stopServerProcess }) + launcher.on('will-close', ()=>{ + if (clientWindows.length) { + launcher.hide() + e.preventDefault() + } + }) + + launcher.on('close', (e)=>{ + if (clientWindows.length) { + launcher.hide() + e.preventDefault() + return + } + process.stdout.write = stdoutWrite + process.stderr.write = stderrWrite + if (process.log) process.log = processLog + tray.destroy() + }) + }) let processLog = process.log, diff --git a/src/server/tray.js b/src/server/tray.js index 79e63542..bb49d4a6 100644 --- a/src/server/tray.js +++ b/src/server/tray.js @@ -1,72 +1,89 @@ -var { Menu, Tray, ipcMain } = require('electron') - -var tray = null, +var {Menu, Tray, ipcMain} = require('electron'), + settings = require('./settings'), + tray = null, contextMenu = null, - hideInTray = false, isServerRunning = false -module.exports = function (options = {}) { - - ipcMain.on('start', function (e, options) { - isServerRunning = true - resetMenu(isServerRunning) - }) - - ipcMain.on('stop', function (e, options) { - isServerRunning = false - resetMenu(isServerRunning) - }) +module.exports = function(options = {}) { var icon = __dirname + '/../assets/logo.png' if (process.platform === 'darwin') { - var icon = __dirname + '/../assets/logo_16x16.png' + icon = __dirname + '/../assets/logo_tray.png' } + tray = new Tray(icon) contextMenu = Menu.buildFromTemplate([ { - label: 'Open/Hide', click: () => { - if (hideInTray) { - options.window.show() - hideInTray = false - } else { - options.window.hide() - hideInTray = true - } + label: 'Show launcher', + id: 'show', + click: ()=>{ + options.window.show() } }, { - label: 'Start/Stop', - click: () => { - if (isServerRunning) { - ipcMain.emit('stop'); - } else { - ipcMain.emit('start'); - } + label: 'Hide launcher', + id: 'hide', + click: ()=>{ + options.window.hide() } }, { - label: 'New Window', click: () => { + label: 'Start server', + id: 'start', + click: ()=>{ + ipcMain.emit('start') + } + }, + { + label: 'Stop server', + id: 'stop', + click: ()=>{ + ipcMain.emit('stop') + } + }, + { + label: 'New client window', + id: 'new', + click: ()=> { if (isServerRunning) { options.openClient() } - }, - enabled: isServerRunning + } }, - { type: 'separator' }, - { label: 'Quit', click: () => { void options.app.quit(); } }, - ]); + { + type: 'separator' + }, + { + label: 'Quit', + role: 'Quit' + }, + ]) + tray.setContextMenu(contextMenu) - tray.setToolTip('Open Stage Control') + tray.setToolTip(settings.infos.productName) + + function updateMenu(){ + contextMenu.getMenuItemById('start').visible = !isServerRunning + contextMenu.getMenuItemById('stop').visible = isServerRunning + contextMenu.getMenuItemById('show').visible = !options.window.isVisible() + contextMenu.getMenuItemById('hide').visible = options.window.isVisible() + contextMenu.getMenuItemById('new').visible = isServerRunning + tray.setContextMenu(contextMenu) + } + + ipcMain.on('start', function(e, options) { + isServerRunning = true + updateMenu() + }) + + ipcMain.on('stop', function(e, options) { + isServerRunning = false + updateMenu() + }) + + options.window.on('show', updateMenu) + options.window.on('hide', updateMenu) return tray } - -function resetMenu(isServerRunning) { - contextMenu.items.forEach(item => { - if (item.label === 'New Window') { - item.enabled = isServerRunning - } - }) - tray.setContextMenu(contextMenu) -} \ No newline at end of file From 687564cb6fd6a96368a4afdb443845bc622ae95e Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 15 Jul 2025 11:47:43 +0200 Subject: [PATCH 032/352] switch: fix border radius inheritance --- src/scss/widgets/basics.scss | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/scss/widgets/basics.scss b/src/scss/widgets/basics.scss index 6624b9ae..388a85db 100644 --- a/src/scss/widgets/basics.scss +++ b/src/scss/widgets/basics.scss @@ -164,6 +164,23 @@ } } + &.layout-vertical value:first-child { + border-top-left-radius: var(--border-radius); + border-top-right-radius: var(--border-radius) + } + &.layout-vertical value:last-child { + border-bottom-left-radius: var(--border-radius); + border-bottom-right-radius: var(--border-radius) + } + &.layout-horizontal value:first-child { + border-bottom-left-radius: var(--border-radius); + border-top-left-radius: var(--border-radius) + } + &.layout-horizontal value:last-child { + border-bottom-right-radius: var(--border-radius); + border-top-right-radius: var(--border-radius) + } + &.wrap value { white-space: pre-wrap; word-break: break-all; From 01e447ac60d69b76bea544301ca416505bed1365 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 15 Jul 2025 12:36:14 +0200 Subject: [PATCH 033/352] menu: make popup menu inherit border radius --- src/client/widgets/basics/menu.js | 1 + src/scss/widgets/basics.scss | 42 ++++++++++++++++++++++++------- 2 files changed, 34 insertions(+), 9 deletions(-) diff --git a/src/client/widgets/basics/menu.js b/src/client/widgets/basics/menu.js index c35f5024..8ba4a543 100644 --- a/src/client/widgets/basics/menu.js +++ b/src/client/widgets/basics/menu.js @@ -263,6 +263,7 @@ class Menu extends MenuBase { this.container.classList.toggle('circular', layout === 'circular') this.container.classList.toggle('grid', layout === 'grid') this.container.classList.toggle('vertical', layout === 'vertical') + this.container.classList.toggle('horizontal', layout === 'horizontal') if (layout === 'grid') { var template = this.getProp('gridTemplate') || Math.round(this.values.length / 2) diff --git a/src/scss/widgets/basics.scss b/src/scss/widgets/basics.scss index 388a85db..b872b927 100644 --- a/src/scss/widgets/basics.scss +++ b/src/scss/widgets/basics.scss @@ -165,20 +165,20 @@ } &.layout-vertical value:first-child { - border-top-left-radius: var(--border-radius); - border-top-right-radius: var(--border-radius) + border-top-left-radius: inherit; + border-top-right-radius: inherit; } &.layout-vertical value:last-child { - border-bottom-left-radius: var(--border-radius); - border-bottom-right-radius: var(--border-radius) + border-bottom-left-radius: inherit; + border-bottom-right-radius: inherit; } &.layout-horizontal value:first-child { - border-bottom-left-radius: var(--border-radius); - border-top-left-radius: var(--border-radius) + border-bottom-left-radius: inherit; + border-top-left-radius: inherit; } &.layout-horizontal value:last-child { - border-bottom-right-radius: var(--border-radius); - border-top-right-radius: var(--border-radius) + border-bottom-right-radius: inherit; + border-top-right-radius: inherit; } &.wrap value { @@ -412,7 +412,7 @@ width:var(--size-box-w); height:var(--size-box-h); - + border-radius: inherit; display: flex; flex-direction: row; @@ -460,14 +460,38 @@ display: grid; grid-template-columns: repeat(var(--grid-columns), 1fr); + .item { + border-radius: inherit; + } } &.vertical menu { flex-direction: column; + .item:first-child { + border-top-left-radius: inherit; + border-top-right-radius: inherit; + } + .item:last-child { + border-bottom-left-radius: inherit; + border-bottom-right-radius: inherit; + } + } + &.horizontal menu { + + .item:first-child { + border-bottom-left-radius: inherit; + border-top-left-radius: inherit; + } + .item:last-child { + border-bottom-right-radius: inherit; + border-top-right-radius: inherit; + } + + } } From 1ade3d4392097197608722fd4f7e24311ea8d8b9 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Wed, 16 Jul 2025 14:04:45 +0200 Subject: [PATCH 034/352] fader: make compact design honor borderRadius --- src/client/widgets/common/widget.js | 2 +- src/client/widgets/sliders/fader.js | 79 ++++++++++++++++++++++------- 2 files changed, 62 insertions(+), 19 deletions(-) diff --git a/src/client/widgets/common/widget.js b/src/client/widgets/common/widget.js index 1cc8383f..d2543f7e 100644 --- a/src/client/widgets/common/widget.js +++ b/src/client/widgets/common/widget.js @@ -1368,7 +1368,7 @@ Widget.cssVariables = [ {js: 'colorText', css: '--color-text'}, {js: 'padding', css: '--widget-padding', toCss: x=>parseFloat(x) + 'rem', toJs: x=>parseFloat(x) * PXSCALE}, {js: 'lineWidth', css: '--line-width', toCss: x=>parseFloat(x) + 'rem', toJs: x=>parseFloat(x) * PXSCALE}, - {js: 'borderRadius', css: '--border-radius', toCss: x=>parseFloat(x) == x ? x + 'rem' : x}, + {js: 'borderRadius', css: '--border-radius', toCss: x=>parseFloat(x) == x ? x + 'rem' : x, toJs: x=>parseFloat(x)}, {js: 'alphaFillOn', css: '--alpha-fill-on', toCss: x=>parseFloat(x), toJs: x=>parseFloat(x)}, {js: 'alphaFillOff', css: '--alpha-fill-off', toCss: x=>parseFloat(x), toJs: x=>parseFloat(x)}, {js: 'alphaStroke', css: '--alpha-stroke', toCss: x=>parseFloat(x), toJs: x=>parseFloat(x)}, diff --git a/src/client/widgets/sliders/fader.js b/src/client/widgets/sliders/fader.js index 38d1aa34..96171ff1 100644 --- a/src/client/widgets/sliders/fader.js +++ b/src/client/widgets/sliders/fader.js @@ -298,24 +298,6 @@ class Fader extends Slider { if (compact) { - // stroke - if (this.cssVars.lineWidth) { - - this.ctx.globalAlpha = this.cssVars.alphaStroke - this.ctx.strokeStyle = this.cssVars.colorStroke - - this.ctx.beginPath() - this.ctx.moveTo(0, 0) - this.ctx.lineTo(width, 0) - this.ctx.lineTo(width, height) - this.ctx.lineTo(0, height) - this.ctx.closePath() - this.ctx.lineWidth = 2 * this.cssVars.lineWidth - this.ctx.stroke() - - } - - // flat knob this.ctx.globalAlpha = 1 @@ -326,6 +308,67 @@ class Fader extends Slider { this.ctx.rect(this.gaugePadding, d, width - this.gaugePadding * 2, knobHeight) this.ctx.fill() + + // stroke + if (this.cssVars.lineWidth) { + + this.ctx.globalAlpha = this.cssVars.alphaStroke + this.ctx.strokeStyle = this.cssVars.colorStroke + + let x, y, w, h, + rad = PXSCALE * this.cssVars.borderRadius + + if (rad > 0) { + // bordeRadius: clip gauge & knob + x = this.gaugePadding + y = this.gaugePadding + w = width - this.gaugePadding * 2 + h = height - this.gaugePadding * 2 + this.ctx.beginPath() + this.ctx.moveTo(x + rad, y) + this.ctx.arcTo(x + w, y, x + w, y + h, rad) + this.ctx.arcTo(x + w, y + h, x, y + h, rad) + this.ctx.arcTo(x, y + h, x, y, rad) + this.ctx.arcTo(x, y, x + w, y, rad) + this.ctx.closePath() + + var tmpOp = this.ctx.globalCompositeOperation + this.ctx.globalCompositeOperation = 'destination-in' + this.ctx.globalAlpha = 1 + this.ctx.fill() + this.ctx.globalCompositeOperation = tmpOp + this.ctx.globalAlpha = this.cssVars.alphaStroke + } + + + // draw stroke + x = 0.5 * this.cssVars.lineWidth + y = 0.5 * this.cssVars.lineWidth + w = width - this.cssVars.lineWidth + h = height - this.cssVars.lineWidth + + this.ctx.beginPath() + if (rad > 0) { + this.ctx.moveTo(x + rad, y) + this.ctx.arcTo(x + w, y, x + w, y + h, rad) + this.ctx.arcTo(x + w, y + h, x, y + h, rad) + this.ctx.arcTo(x, y + h, x, y, rad) + this.ctx.arcTo(x, y, x + w, y, rad) + } else { + this.ctx.moveTo(x, y) + this.ctx.lineTo(x + w, y) + this.ctx.lineTo(x + w, y + h) + this.ctx.lineTo(x, y + h) + } + + this.ctx.closePath() + this.ctx.lineWidth = this.cssVars.lineWidth + this.ctx.stroke() + + } + + + this.clearRect = [0, 0, width, height] From 63cfcb1b1d81a5cf509f5617199cb106e714cffd Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Wed, 16 Jul 2025 14:20:50 +0200 Subject: [PATCH 035/352] fader: compact radius tweaks --- src/client/widgets/sliders/fader.js | 50 ++++++++++++++--------------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/src/client/widgets/sliders/fader.js b/src/client/widgets/sliders/fader.js index 96171ff1..aae63baa 100644 --- a/src/client/widgets/sliders/fader.js +++ b/src/client/widgets/sliders/fader.js @@ -308,6 +308,30 @@ class Fader extends Slider { this.ctx.rect(this.gaugePadding, d, width - this.gaugePadding * 2, knobHeight) this.ctx.fill() + let x, y, w, h, + rad = PXSCALE * this.cssVars.borderRadius + + // border radius: clip gauge & knob + if (rad > 0) { + x = this.gaugePadding + y = this.gaugePadding + w = width - this.gaugePadding * 2 + h = height - this.gaugePadding * 2 + this.ctx.beginPath() + this.ctx.moveTo(x + rad, y) + this.ctx.arcTo(x + w, y, x + w, y + h, rad) + this.ctx.arcTo(x + w, y + h, x, y + h, rad) + this.ctx.arcTo(x, y + h, x, y, rad) + this.ctx.arcTo(x, y, x + w, y, rad) + this.ctx.closePath() + + var tmpOp = this.ctx.globalCompositeOperation + this.ctx.globalCompositeOperation = 'destination-in' + this.ctx.fillStyle = '#ffffff' + this.ctx.globalAlpha = 1 + this.ctx.fill() + this.ctx.globalCompositeOperation = tmpOp + } // stroke if (this.cssVars.lineWidth) { @@ -315,32 +339,6 @@ class Fader extends Slider { this.ctx.globalAlpha = this.cssVars.alphaStroke this.ctx.strokeStyle = this.cssVars.colorStroke - let x, y, w, h, - rad = PXSCALE * this.cssVars.borderRadius - - if (rad > 0) { - // bordeRadius: clip gauge & knob - x = this.gaugePadding - y = this.gaugePadding - w = width - this.gaugePadding * 2 - h = height - this.gaugePadding * 2 - this.ctx.beginPath() - this.ctx.moveTo(x + rad, y) - this.ctx.arcTo(x + w, y, x + w, y + h, rad) - this.ctx.arcTo(x + w, y + h, x, y + h, rad) - this.ctx.arcTo(x, y + h, x, y, rad) - this.ctx.arcTo(x, y, x + w, y, rad) - this.ctx.closePath() - - var tmpOp = this.ctx.globalCompositeOperation - this.ctx.globalCompositeOperation = 'destination-in' - this.ctx.globalAlpha = 1 - this.ctx.fill() - this.ctx.globalCompositeOperation = tmpOp - this.ctx.globalAlpha = this.cssVars.alphaStroke - } - - // draw stroke x = 0.5 * this.cssVars.lineWidth y = 0.5 * this.cssVars.lineWidth From bf1e4ec2e75af40f425e8878976ac6d15500e226 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Wed, 16 Jul 2025 14:23:20 +0200 Subject: [PATCH 036/352] fader: limit radius --- src/client/widgets/sliders/fader.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/client/widgets/sliders/fader.js b/src/client/widgets/sliders/fader.js index aae63baa..c8658ab5 100644 --- a/src/client/widgets/sliders/fader.js +++ b/src/client/widgets/sliders/fader.js @@ -313,6 +313,7 @@ class Fader extends Slider { // border radius: clip gauge & knob if (rad > 0) { + rad = Math.min(Math.min(height, width) / 2, rad) x = this.gaugePadding y = this.gaugePadding w = width - this.gaugePadding * 2 From 9176e0caa2afd45012b6b1fe3e086965e1cabfcc Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Wed, 16 Jul 2025 14:30:17 +0200 Subject: [PATCH 037/352] log: border radius update --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b072ee7..108df21c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - bug fixes - matrix: prevent error when `quantity` is invalid - multixy/xy: send value when setting `spring` to `true` (only if current value is different than spring value) + - switch/menu/fader: more consistent rendering when `borderRadius` is set - widgets - multixy/xy: add `stepsX` and `stepsY` properties From f29be8cc75bb73881d4e8f7ff15a2a260dbc9c7a Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Wed, 16 Jul 2025 16:03:24 +0200 Subject: [PATCH 038/352] docs: update --- resources/docs/docs/widgets/properties-reference.md | 2 ++ src/client/widgets/sliders/fader.js | 1 + 2 files changed, 3 insertions(+) diff --git a/resources/docs/docs/widgets/properties-reference.md b/resources/docs/docs/widgets/properties-reference.md index 9898b64f..9abc2a70 100644 --- a/resources/docs/docs/widgets/properties-reference.md +++ b/resources/docs/docs/widgets/properties-reference.md @@ -884,6 +884,7 @@ | property | type |default | description | | --- | --- | --- | --- | + |
borderRadius#
| `number` | "auto" | Border radius expressed as a number (same for all corners, applies only for compact design). | |
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`
- `--border-radius`: `borderRadius`
- `--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 | @@ -985,6 +986,7 @@ | property | type |default | description | | --- | --- | --- | --- | + |
borderRadius#
| `number` | "auto" | Border radius expressed as a number (same for all corners, applies only for compact design). | |
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`
- `--border-radius`: `borderRadius`
- `--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 | diff --git a/src/client/widgets/sliders/fader.js b/src/client/widgets/sliders/fader.js index c8658ab5..ed2cc4af 100644 --- a/src/client/widgets/sliders/fader.js +++ b/src/client/widgets/sliders/fader.js @@ -62,6 +62,7 @@ class Fader extends Slider { }) defaults.scripting.onTouch = {type: 'script', value: '', editor:'javascript', help: ['Script executed when the widget is touched and released. See documentation.',]} + defaults.style.borderRadius= {type: 'number', value: 'auto', help: 'Border radius expressed as a number (same for all corners, applies only for compact design).'} return defaults From 14f8a0bf29e98d5a55fb823c061320b6bf5cbfb5 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Wed, 16 Jul 2025 20:02:30 +0200 Subject: [PATCH 039/352] midi: allow arm64/darwin midi --- src/server/midi.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/server/midi.js b/src/server/midi.js index de2ffd22..8146f7c4 100644 --- a/src/server/midi.js +++ b/src/server/midi.js @@ -13,9 +13,14 @@ var pythonOptions = { } var midiBinaries = { - linux: 'osc-midi-linux', - darwin: 'osc-midi-osx', - win32: 'osc-midi-windows.exe' + x64: { + linux: 'osc-midi-linux', + darwin: 'osc-midi-osx', + win32: 'osc-midi-windows.exe' + }, + arm64:{ + darwin: 'osc-midi-osx', + } } var expectMidiBinaries = false, @@ -25,8 +30,8 @@ try { } catch(e) {} var pythonPathOverride -if (process.arch === 'x64' && midiBinaries[process.platform]) { - var p = path.resolve(__dirname, midiBinaries[process.platform]) +if (midiBinaries[process.arch] && midiBinaries[process.arch][process.platform]) { + var p = path.resolve(__dirname,midiBinaries[process.arch][process.platform]) if (fs.existsSync(p)) { pythonPathOverride = p } else if (expectMidiBinaries) { From f119189fe1d989dd8f3f30767066206c30a48bf0 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Wed, 16 Jul 2025 23:44:09 +0200 Subject: [PATCH 040/352] package: silicon bins ! --- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0e77bad3..2f7c3412 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,6 +28,7 @@ before_deploy: - export VERSION=$(sed -nE 's/^\s*"version":\ "(.*?)",$/\1/p' package.json) - npm run build-docs - npm run package -- --all + - PLATFORM=darwin;ARCH=arm64; npm run package - npm run package-node - cd $TRAVIS_BUILD_DIR/dist/open-stage-control-linux-x64/resources/app/server/ - wget https://github.com/jean-emmanuel/open-stage-control-midi/releases/latest/download/osc-midi-linux && chmod +x osc-midi-linux && echo "true" > osc-midi.json @@ -35,8 +36,8 @@ before_deploy: - wget https://github.com/jean-emmanuel/open-stage-control-midi/releases/latest/download/osc-midi-windows.exe && chmod +x osc-midi-windows.exe && echo "true" > osc-midi.json - cd $TRAVIS_BUILD_DIR/dist/open-stage-control-darwin-x64/open-stage-control.app/Contents/Resources/app/server - wget https://github.com/jean-emmanuel/open-stage-control-midi/releases/latest/download/osc-midi-osx && chmod +x osc-midi-osx && echo "true" > osc-midi.json - # - cd $TRAVIS_BUILD_DIR/dist/open-stage-control-darwin-arm64/open-stage-control.app/Contents/Resources/app/server - # - wget https://github.com/jean-emmanuel/open-stage-control-midi/releases/latest/download/osc-midi-osx && chmod +x osc-midi-osx && echo "true" > osc-midi.json + - cd $TRAVIS_BUILD_DIR/dist/open-stage-control-darwin-arm64/open-stage-control.app/Contents/Resources/app/server + - wget https://github.com/jean-emmanuel/open-stage-control-midi/releases/latest/download/osc-midi-osx && chmod +x osc-midi-osx && echo "true" > osc-midi.json - cd $TRAVIS_BUILD_DIR - mkdir dist/packages - npm run deb64 @@ -48,7 +49,7 @@ before_deploy: - mv open-stage-control-linux-x64/*.rpm packages/ - mv open-stage-control-linux-x64 open-stage-control_${VERSION}_linux-x64 - zip -q -r --symlinks packages/open-stage-control_${VERSION}_osx-x64.zip open-stage-control-darwin-x64/open-stage-control.app - # - zip -q -r --symlinks packages/open-stage-control_${VERSION}_osx-arm64.zip open-stage-control-darwin-arm64/open-stage-control.app + - zip -q -r --symlinks packages/open-stage-control_${VERSION}_osx-arm64.zip open-stage-control-darwin-arm64/open-stage-control.app - zip -q -r packages/open-stage-control_${VERSION}_node.zip open-stage-control_${VERSION}_node - zip -q -r packages/open-stage-control_${VERSION}_win32-x64.zip open-stage-control_${VERSION}_win32-x64 - zip -q -r packages/open-stage-control_${VERSION}_linux-x64.zip open-stage-control_${VERSION}_linux-x64 From 374ef680284d5868a3b6307fb8e86a17acc79a6d Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Thu, 17 Jul 2025 10:18:26 +0200 Subject: [PATCH 041/352] log: silicon builds --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 108df21c..11d9f676 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ - widgets - multixy/xy: add `stepsX` and `stepsY` properties +- misc + - native silicon buids (osx-arm64) + ## 1.29.5 - bug fixes From 015736486c22d1edf6c11e02912ca2be0a076ba1 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 22 Jul 2025 19:02:41 +0200 Subject: [PATCH 042/352] tray: only quit if server is stopped; hide in tray when starting minimzed --- src/launcher/toolbar.js | 2 +- src/server/electron-window.js | 7 +------ src/server/index.js | 27 ++++++++++++++++++++------- 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/launcher/toolbar.js b/src/launcher/toolbar.js index ee623b60..fa3208d4 100644 --- a/src/launcher/toolbar.js +++ b/src/launcher/toolbar.js @@ -116,7 +116,7 @@ menu.append(new MenuItem({type: 'submenu' , label: 'Launcher', submenu: [ } }), new MenuItem({ - label: 'Start minimized', + label: 'Start hidden (in tray)', type: 'checkbox', checked: settings.remote.read('startMinimized'), click: (e)=>{ diff --git a/src/server/electron-window.js b/src/server/electron-window.js index 77786bc0..b0231faa 100644 --- a/src/server/electron-window.js +++ b/src/server/electron-window.js @@ -61,13 +61,8 @@ module.exports = function(options={}) { window.setBounds(geometry) window.once('ready-to-show', ()=>{ - window.show() if (options.id === 'launcher' && settings.read('startMinimized')) { - if (process.platform === 'darwin') { - window.hide() - } else { - window.minimize() - } + window.hide() } }) diff --git a/src/server/index.js b/src/server/index.js index 7c74cca6..c222b065 100644 --- a/src/server/index.js +++ b/src/server/index.js @@ -177,20 +177,27 @@ function stopServerProcess() { if (settings.read('no-gui')) { if (serverProcess) serverProcess.kill('SIGINT') + serverProcess = null return } - var toClose = [...clientWindows].filter(w=>w && !w.isDestroyed()), + var toClose = clientWindows.filter(w=>w && !w.isDestroyed()), closed = 0 - if (toClose.length === 0) serverProcess.kill('SIGINT') + if (toClose.length === 0) { + serverProcess.kill('SIGINT') + serverProcess = null + } for (var w of toClose) { w.on('closed', ()=>{ closed++ if (closed === toClose.length) { clientWindows = [] - if (serverProcess) serverProcess.kill('SIGINT') + if (serverProcess) { + serverProcess.kill('SIGINT') + serverProcess = null + } } }) w.close() @@ -227,14 +234,14 @@ function startLauncher() { }) launcher.on('will-close', ()=>{ - if (clientWindows.length) { + if (clientWindows.some(w=>w && !w.isDestroyed())) { launcher.hide() e.preventDefault() } }) launcher.on('close', (e)=>{ - if (clientWindows.length) { + if (clientWindows.some(w=>w && !w.isDestroyed()) && serverProcess) { launcher.hide() e.preventDefault() return @@ -345,13 +352,19 @@ if (settings.read('docs')) { app.on('ready', ()=>{ process.on('SIGINT', function() { - if (serverProcess) serverProcess.kill('SIGINT') + if (serverProcess) { + serverProcess.kill('SIGINT') + serverProcess = null + } process.exit(0) }) }) app.on('before-quit',()=>{ - if (serverProcess) serverProcess.kill('SIGINT') + if (serverProcess) { + serverProcess.kill('SIGINT') + serverProcess = null + } }) From 65ebe938de99f5aae31c4507cbc91a4d81319bc8 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 22 Jul 2025 19:11:03 +0200 Subject: [PATCH 043/352] docs: tray icon menu --- resources/docs/docs/user-interface/launcher.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/resources/docs/docs/user-interface/launcher.md b/resources/docs/docs/user-interface/launcher.md index 13640d63..c3e356de 100644 --- a/resources/docs/docs/user-interface/launcher.md +++ b/resources/docs/docs/user-interface/launcher.md @@ -12,8 +12,10 @@ - Clear: clear console - Autoscroll: enable/disable console autoscroll - Check for update at startup: enable/disable this feature -- Autostart: start the server automatically when launcher is started -- Always on top: pin the launcher window above other the windows +- Launcher + - Autostart: start the server automatically when launcher is started + - Start hidden: starts the launcher hidden in tray + - Always on top: pin the launcher window above other the windows The "play/stop" icon can be used to start and stop the server without opening the menu. @@ -25,6 +27,10 @@ Each server option is displayed here. When clicking on an option's label, a shor The console displays various information, runtime errors and server debug messages. +## Tray icon + +The launcher comes with a system tray icon that keeps the launcher alive when closed if there is at least one client window opened or if the server is running. Its context menu can be used to toggle the launcher's visibility and access some of the launcher's menu actions. + ## Keyboard shortcuts === "Linux" From 89b82d3c9b869432149bc486219897971c1318bf Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 22 Jul 2025 19:12:49 +0200 Subject: [PATCH 044/352] log: tray menu should have wait for 1.30 --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11d9f676..fc6ca7b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 1.29.7 + +- launcher + - add tray icon and menu (landed in 1.29.6 accidentally) + + ## 1.29.6 - bug fixes From 5cf59ea97ce80abfe64c361b2396f64764946651 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 22 Jul 2025 19:24:50 +0200 Subject: [PATCH 045/352] tray: make it optional and disabled by default --- src/launcher/toolbar.js | 26 +++++++++++++++++--------- src/server/electron-window.js | 6 +++++- src/server/index.js | 35 ++++++++++++++++++++--------------- 3 files changed, 42 insertions(+), 25 deletions(-) diff --git a/src/launcher/toolbar.js b/src/launcher/toolbar.js index fa3208d4..15a2fcd4 100644 --- a/src/launcher/toolbar.js +++ b/src/launcher/toolbar.js @@ -115,14 +115,6 @@ menu.append(new MenuItem({type: 'submenu' , label: 'Launcher', submenu: [ remote.getCurrentWindow().setAlwaysOnTop(e.checked) } }), - new MenuItem({ - label: 'Start hidden (in tray)', - type: 'checkbox', - checked: settings.remote.read('startMinimized'), - click: (e)=>{ - settings.remote.write('startMinimized', e.checked) - } - }), new MenuItem({ label: 'Always on top', type: 'checkbox', @@ -131,7 +123,23 @@ menu.append(new MenuItem({type: 'submenu' , label: 'Launcher', submenu: [ settings.remote.write('alwaysOnTop', e.checked) remote.getCurrentWindow().setAlwaysOnTop(e.checked) } - }) + }), + new MenuItem({ + label: 'Use tray icon', + type: 'checkbox', + checked: settings.remote.read('useTray'), + click: (e)=>{ + settings.remote.write('useTray', e.checked) + } + }), + new MenuItem({ + label: 'Start minimized', + type: 'checkbox', + checked: settings.remote.read('startMinimized'), + click: (e)=>{ + settings.remote.write('startMinimized', e.checked) + } + }), ]})) menu.append(new MenuItem({ type: 'separator' diff --git a/src/server/electron-window.js b/src/server/electron-window.js index b0231faa..3808dedb 100644 --- a/src/server/electron-window.js +++ b/src/server/electron-window.js @@ -62,7 +62,11 @@ module.exports = function(options={}) { window.once('ready-to-show', ()=>{ if (options.id === 'launcher' && settings.read('startMinimized')) { - window.hide() + if (settings.read('useTray') || process.platform === 'darwin') { + window.hide() + } else { + window.minimize() + } } }) diff --git a/src/server/index.js b/src/server/index.js index c222b065..cb530568 100644 --- a/src/server/index.js +++ b/src/server/index.js @@ -225,23 +225,28 @@ function startLauncher() { launcher = require('./electron-window')({address:address, shortcuts:dev, width:680, height:(40 + 200 + 20 + 24 * Object.keys(settings.options).filter(x=>settings.options[x].launcher !== false).length / 2), node:true, color:'#151a24', id: 'launcher'}) require('@electron/remote/main').enable(launcher.webContents) - tray = require('./tray')({ - window: launcher, - openClient: openClient, - app: app, - startServer: startServerProcess, - stopServer: stopServerProcess - }) + if (settings.read('useTray')) { + + tray = require('./tray')({ + window: launcher, + openClient: openClient, + app: app, + startServer: startServerProcess, + stopServer: stopServerProcess + }) + + launcher.on('will-close', ()=>{ + if (clientWindows.some(w=>w && !w.isDestroyed())) { + launcher.hide() + e.preventDefault() + } + }) + + } - launcher.on('will-close', ()=>{ - if (clientWindows.some(w=>w && !w.isDestroyed())) { - launcher.hide() - e.preventDefault() - } - }) launcher.on('close', (e)=>{ - if (clientWindows.some(w=>w && !w.isDestroyed()) && serverProcess) { + if (tray && clientWindows.some(w=>w && !w.isDestroyed()) && serverProcess) { launcher.hide() e.preventDefault() return @@ -249,7 +254,7 @@ function startLauncher() { process.stdout.write = stdoutWrite process.stderr.write = stderrWrite if (process.log) process.log = processLog - tray.destroy() + if (tray) tray.destroy() }) }) From 28c0877dc9d75cb0617403b7e7853d17eb0aedf1 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 22 Jul 2025 19:34:30 +0200 Subject: [PATCH 046/352] launcher: add hide action if using tray --- src/launcher/toolbar.js | 10 ++++++++++ src/server/electron-window.js | 3 +++ src/server/index.js | 7 +++++++ 3 files changed, 20 insertions(+) diff --git a/src/launcher/toolbar.js b/src/launcher/toolbar.js index 15a2fcd4..22a8de25 100644 --- a/src/launcher/toolbar.js +++ b/src/launcher/toolbar.js @@ -157,6 +157,16 @@ menu.append(new MenuItem({ openDocs() } })) + +if (settings.remote.read('useTray')) { + menu.append(new MenuItem({ + label: 'Hide', + click: ()=>{ + ipcRenderer.send('hide') + } + })) +} + menu.append(new MenuItem({ role: 'Quit' })) diff --git a/src/server/electron-window.js b/src/server/electron-window.js index 3808dedb..18a7caad 100644 --- a/src/server/electron-window.js +++ b/src/server/electron-window.js @@ -65,8 +65,11 @@ module.exports = function(options={}) { if (settings.read('useTray') || process.platform === 'darwin') { window.hide() } else { + window.show() window.minimize() } + } else { + window.show() } }) diff --git a/src/server/index.js b/src/server/index.js index cb530568..f15ec7c6 100644 --- a/src/server/index.js +++ b/src/server/index.js @@ -303,6 +303,13 @@ function startLauncher() { showQRCode() }) + + + ipcMain.on('hide',function(e, options){ + + launcher.hide() + + }) } From 0de9f239c8d7c6a874c72ac606398b773f565220 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 22 Jul 2025 19:58:29 +0200 Subject: [PATCH 047/352] docs: tray things --- CHANGELOG.md | 2 +- resources/docs/docs/user-interface/launcher.md | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc6ca7b8..de8395e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## 1.29.7 - launcher - - add tray icon and menu (landed in 1.29.6 accidentally) + - add tray icon and menu (landed in 1.29.6 accidentally), disabled by default (can be enabled from the launcher's menu) ## 1.29.6 diff --git a/resources/docs/docs/user-interface/launcher.md b/resources/docs/docs/user-interface/launcher.md index c3e356de..304aa33b 100644 --- a/resources/docs/docs/user-interface/launcher.md +++ b/resources/docs/docs/user-interface/launcher.md @@ -14,12 +14,13 @@ - Check for update at startup: enable/disable this feature - Launcher - Autostart: start the server automatically when launcher is started - - Start hidden: starts the launcher hidden in tray - Always on top: pin the launcher window above other the windows + - Use tray: enable tray icon and menu + - Start minimized: starts the launcher minimized (or hidden in tray) The "play/stop" icon can be used to start and stop the server without opening the menu. -## 2. Configuration form +## 2. Configuration form Each server option is displayed here. When clicking on an option's label, a short help will be printed in the console. When an option is not correctly set, its label will turn to orange and an error message will be printed in the console. @@ -29,7 +30,7 @@ The console displays various information, runtime errors and server debug messag ## Tray icon -The launcher comes with a system tray icon that keeps the launcher alive when closed if there is at least one client window opened or if the server is running. Its context menu can be used to toggle the launcher's visibility and access some of the launcher's menu actions. +If `Use tray` is set, the launcher comes with a system tray icon that keeps the launcher alive when closed if there is at least one client window opened or if the server is running. Its context menu can be used to toggle the launcher's visibility and access some of the launcher's menu actions. ## Keyboard shortcuts From 83fd78e322881102de82dbabe2ff9a078631a1e3 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Wed, 23 Jul 2025 08:17:09 +0200 Subject: [PATCH 048/352] tray: fix (?) quit menu action --- src/server/tray.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/server/tray.js b/src/server/tray.js index bb49d4a6..1d150eb9 100644 --- a/src/server/tray.js +++ b/src/server/tray.js @@ -55,7 +55,9 @@ module.exports = function(options = {}) { }, { label: 'Quit', - role: 'Quit' + click: ()=>{ + options.app.quit() + } }, ]) From 84bf487169777c812e34bd2bb7f4dffae38f8f8c Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Wed, 23 Jul 2025 08:33:30 +0200 Subject: [PATCH 049/352] package: 1.29.7 & doc update --- package.json | 2 +- .../docs/docs/getting-started/introduction.md | 19 +++++++++++---- .../getting-started/running-from-sources.md | 23 +++++++++++++++---- 3 files changed, 34 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index d60c7d7d..7e352089 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.29.6", + "version": "1.29.7", "author": { "name": "Jean-Emmanuel Doucet", "email": "jean-emmanuel@ammd.net" diff --git a/resources/docs/docs/getting-started/introduction.md b/resources/docs/docs/getting-started/introduction.md index b1a9171d..9c82bfd4 100644 --- a/resources/docs/docs/getting-started/introduction.md +++ b/resources/docs/docs/getting-started/introduction.md @@ -25,7 +25,7 @@ iOS devices must be of version `10.3` or higher. ## Installation -??? example "Linux 64bit" +=== "Linux 64bit" **Ubuntu / Debian** @@ -41,19 +41,28 @@ iOS devices must be of version `10.3` or higher. - Extract it in the location of your choice - The file inside it named `open-stage-control` is the app's main executable -??? example "Mac 64bit" +=== "Mac 64bit" - - [Download](/download) `open-stage-control-VERSION-osx.zip` + - [Download](/download) `open-stage-control-VERSION-osx-x64.zip` - Extract it in the location of your choice - Drag `open-stage-control.app` in your `Application` folder -??? example "Windows 64bit" + +=== "Mac Silicon (arm)" + + - [Download](/download) `open-stage-control-VERSION-osx-arm.zip` + - Extract it in the location of your choice + - Drag `open-stage-control.app` in your `Application` folder + + See [https://disable-gatekeeper.github.io/](https://disable-gatekeeper.github.io/) to workaround the "damaged and can't be opened" error. + +=== "Windows 64bit" - [Download](/download) `open-stage-control-VERSION-win32-x64.zip` - Extract it in the location of your choice - The file inside it named `open-stage-control.exe` is the app's main executable -??? example "Other systems" +=== "Other systems" - Install [Node.js](https://nodejs.org/en/download/package-manager/) - Download `open-stage-control-VERSION-node.zip` diff --git a/resources/docs/docs/getting-started/running-from-sources.md b/resources/docs/docs/getting-started/running-from-sources.md index aab53eba..20951cc3 100644 --- a/resources/docs/docs/getting-started/running-from-sources.md +++ b/resources/docs/docs/getting-started/running-from-sources.md @@ -87,8 +87,23 @@ This will build the app in `dist/open-stage-control-PLATFORM-ARCH`. Building the app for windows from a linux system requires wine to be installed. -## Debian/Ubuntu installer +## Debian / Ubuntu and RPM installers -``` -npm run deb64 -``` +=== "Debian / Ubuntu" + + ``` + npm run deb64 + ``` + +=== "RPM" + + ``` + npm run rpm + ``` + + +## Build script on Mac Silicon + +This user-contributed script can be used to build open stage control on recent Macs: + +https://github.com/rewgs/osc-as From f38bcb9ea05f9de684852ede94a56f4c7726928b Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 5 Aug 2025 15:31:12 +0200 Subject: [PATCH 050/352] client: add title client option --- CHANGELOG.md | 5 +++++ package.json | 2 +- resources/docs/docs/client-options.md | 1 + src/client/globals.js | 2 +- src/client/ipc/callbacks.js | 2 ++ 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de8395e9..6872f2e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 1.29.8 + +- client + - add `title` client option + ## 1.29.7 - launcher diff --git a/package.json b/package.json index 7e352089..53e3d61f 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.29.7", + "version": "1.29.8", "author": { "name": "Jean-Emmanuel Doucet", "email": "jean-emmanuel@ammd.net" diff --git a/resources/docs/docs/client-options.md b/resources/docs/docs/client-options.md index 41b046ae..d653890f 100644 --- a/resources/docs/docs/client-options.md +++ b/resources/docs/docs/client-options.md @@ -18,6 +18,7 @@ Client options can be set either with the server's `--client-options` option, or | altTraversing | 1 / 0 | 0 | set to 1 to enable an alternative traversing behavior for toggle buttons (traversing gestures on toggle buttons will change their values in only one way depending on the first touched button's state) | | virtualKeyboard | 1 / 0 | 0 | (desktop only) set to 1 to enable the virtual keyboard by default | | notifications | 1 / 0 | 1 | set to 0 to hide notifications by default | +| title | string | '' | replace window title | Example: diff --git a/src/client/globals.js b/src/client/globals.js index 4503ceee..c5213fc4 100644 --- a/src/client/globals.js +++ b/src/client/globals.js @@ -43,4 +43,4 @@ window.JSON.parseFlex = require('json5').parse window.DOM = require('./dom') -window.TITLE = PACKAGE.productName + ' v' + PACKAGE.version +window.TITLE = ENV.title || (PACKAGE.productName + ' v' + PACKAGE.version) diff --git a/src/client/ipc/callbacks.js b/src/client/ipc/callbacks.js index b6dff81f..e8134030 100644 --- a/src/client/ipc/callbacks.js +++ b/src/client/ipc/callbacks.js @@ -155,6 +155,8 @@ module.exports = { setTitle: function(data) { + if (ENV.title) return + document.title = TITLE + (data ? ' (' + data + ')' : '') }, From 5b9bcd63ce58c568e9deb8b46d0877eca13a9a74 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Mon, 11 Aug 2025 13:52:31 +0200 Subject: [PATCH 051/352] firefox: `onTouch` error when the cursor goes outside the page --- CHANGELOG.md | 3 +++ src/client/widgets/containers/panel.js | 3 ++- src/client/widgets/pads/canvas.js | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6872f2e1..f634f95c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## 1.29.8 +- bug fixes + - firefox: `onTouch` error when the cursor goes outside the page + - client - add `title` client option diff --git a/src/client/widgets/containers/panel.js b/src/client/widgets/containers/panel.js index f4e51441..fdb8e93d 100644 --- a/src/client/widgets/containers/panel.js +++ b/src/client/widgets/containers/panel.js @@ -362,7 +362,8 @@ class Panel extends Container() { var event = {...e}, w - event.targetName = event.target ? event.target.getAttribute('name') : '' + // NOTE: in firefox target.getAttribute is undefined when the cursor is outside the page + event.targetName = event.target && event.target.getAttribute ? event.target.getAttribute('name') : '' event.targetTagName = event.target ? event.target.tagName : '' w = widgetManager.getWidgetByElement(event.target) diff --git a/src/client/widgets/pads/canvas.js b/src/client/widgets/pads/canvas.js index ce0d96c6..123c913c 100644 --- a/src/client/widgets/pads/canvas.js +++ b/src/client/widgets/pads/canvas.js @@ -114,7 +114,8 @@ class CanvasWidget extends Canvas { var event = {...e} delete event.firstTarget - event.targetName = event.target ? event.target.getAttribute('name') : '' + // NOTE: in firefox target.getAttribute is undefined when the cursor is outside the page + event.targetName = event.target && event.target.getAttribute ? event.target.getAttribute('name') : '' event.targetTagName = event.target ? event.target.tagName : '' var w = widgetManager.getWidgetByElement(event.target) From 7d38418a66083aa2afc69615ed71f330798d8019 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 12 Aug 2025 09:20:26 +0200 Subject: [PATCH 052/352] dropdown: fix label init, make it dynamic prop, refresh it when values are parsed --- CHANGELOG.md | 1 + src/client/widgets/basics/dropdown.js | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f634f95c..483f28bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - bug fixes - firefox: `onTouch` error when the cursor goes outside the page + - dropdown: label not initialized until a value is set - client - add `title` client option diff --git a/src/client/widgets/basics/dropdown.js b/src/client/widgets/basics/dropdown.js index bb1a2769..36a99e66 100644 --- a/src/client/widgets/basics/dropdown.js +++ b/src/client/widgets/basics/dropdown.js @@ -83,6 +83,8 @@ class Dropdown extends MenuBase { `) } + this.setValue(this.value) + } setValue(v,options={}) { @@ -120,7 +122,9 @@ class Dropdown extends MenuBase { this.parseValues() this.setValue(this.value) return - + case 'label': + this.setLabel() + return } return ret @@ -130,7 +134,8 @@ class Dropdown extends MenuBase { } Dropdown.dynamicProps = Dropdown.prototype.constructor.dynamicProps.concat( - 'values' + 'values', + 'label' ) From c450c6133cc272a9871fc783926de9c0e6062d46 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 12 Aug 2025 14:31:18 +0200 Subject: [PATCH 053/352] editor: fix colorpicker dragend handler (dragend doesn't bubble up anymore, it needs to be caught for all 3 subwidgets) --- CHANGELOG.md | 1 + src/client/ui/ui-colorpicker.js | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 483f28bd..a109bdf2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - bug fixes - firefox: `onTouch` error when the cursor goes outside the page - dropdown: label not initialized until a value is set + - editor: regression (1.29.0) preventing color changes made with the color to be undoable unless validaed with the enter key - client - add `title` client option diff --git a/src/client/ui/ui-colorpicker.js b/src/client/ui/ui-colorpicker.js index 43e3cbbd..7e4c851b 100644 --- a/src/client/ui/ui-colorpicker.js +++ b/src/client/ui/ui-colorpicker.js @@ -37,10 +37,13 @@ class ColorPicker extends UiWidget { this.trigger('change', {preventHistory: true}) }) - this.rgb.on('dragend', (e)=>{ + var dragEndCb = (e)=>{ this.value = chroma(this.rgb.value).hex() this.trigger('change') - }) + } + this.rgb.pad.on('dragend', dragEndCb) + this.rgb.hue.on('dragend', dragEndCb) + this.rgb.alpha.on('dragend', dragEndCb) this.opened = 0 From 3b792d24312ed8420bb4878da35b475110348c28 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Wed, 13 Aug 2025 22:21:43 +0200 Subject: [PATCH 054/352] rgb: fix long standing (presumably) issue with touchstate, affecting editor' colorpicker as well --- CHANGELOG.md | 2 ++ src/client/widgets/pads/rgb.js | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a109bdf2..4fb0837c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ - firefox: `onTouch` error when the cursor goes outside the page - dropdown: label not initialized until a value is set - editor: regression (1.29.0) preventing color changes made with the color to be undoable unless validaed with the enter key + - editor: color picker interaction issue in near #000000 + - rgb: incoming values were not queued when during user interaction - client - add `title` client option diff --git a/src/client/widgets/pads/rgb.js b/src/client/widgets/pads/rgb.js index 9576814a..6e5d1369 100644 --- a/src/client/widgets/pads/rgb.js +++ b/src/client/widgets/pads/rgb.js @@ -110,9 +110,6 @@ module.exports = class Rgb extends Widget { initValue[3] = this.getProp('rangeAlpha').min } - - touchstate(this, {element: this.widget, multitouch: true, ignoreCustomBindings: true}) - if (this.getProp('spring')) { this.on('dragend', (e)=>{ @@ -124,6 +121,7 @@ module.exports = class Rgb extends Widget { } + touchstate(this, {element: this.widget, multitouch: true, ignoreCustomBindings: false}) this.hsb = {h:0,s:0,b:0} From d70df6fb6db52f50eee2ef8b00306c9316bb2752 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Thu, 14 Aug 2025 09:02:43 +0200 Subject: [PATCH 055/352] docs: update --- resources/docs/docs/widgets/properties-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/docs/docs/widgets/properties-reference.md b/resources/docs/docs/widgets/properties-reference.md index 9abc2a70..3fb510b9 100644 --- a/resources/docs/docs/widgets/properties-reference.md +++ b/resources/docs/docs/widgets/properties-reference.md @@ -135,7 +135,7 @@ | property | type |default | description | | --- | --- | --- | --- | - | | `string`|
`boolean` | "auto" | Displayed text (defaults to current value). Keywords `%key` and `%value` will be replaced by the widget's selected key/value. | + | | `string`|
`boolean` | "auto" | Displayed text (defaults to current value). Keywords `%key` and `%value` will be replaced by the widget's selected key/value. | | | `boolean` | "true" | Set to `false` to hide the dropdown icon | | | `string` | "center" | Set to `left` or `right` to change text alignment (otherwise center)

Choices: `center`, `left`, `right` | From 7fd668bdf93756ef97b5e00ee2d3d8aecb3470fd Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Thu, 14 Aug 2025 09:08:00 +0200 Subject: [PATCH 056/352] travis: focal fails now --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2f7c3412..c7985b53 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ anHsudo: required language: node_js -dist: focal +dist: jammy node_js: - "16" before_install: From f2189e29ce065cb86dc3bbdb9fd53e621d458dbd Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Thu, 14 Aug 2025 14:13:33 +0200 Subject: [PATCH 057/352] firefox: better fix for out of page events --- src/client/events/utils.js | 2 +- src/client/widgets/containers/panel.js | 3 +-- src/client/widgets/pads/canvas.js | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/client/events/utils.js b/src/client/events/utils.js index e1260bed..f824ebf0 100644 --- a/src/client/events/utils.js +++ b/src/client/events/utils.js @@ -10,7 +10,7 @@ module.exports = { return { - target: e.target, + target: e.target === document ? null : e.target, // firefox passes document when outside the page firstTarget: null, offsetX: e.offsetX, offsetY: e.offsetY, diff --git a/src/client/widgets/containers/panel.js b/src/client/widgets/containers/panel.js index fdb8e93d..f4e51441 100644 --- a/src/client/widgets/containers/panel.js +++ b/src/client/widgets/containers/panel.js @@ -362,8 +362,7 @@ class Panel extends Container() { var event = {...e}, w - // NOTE: in firefox target.getAttribute is undefined when the cursor is outside the page - event.targetName = event.target && event.target.getAttribute ? event.target.getAttribute('name') : '' + event.targetName = event.target ? event.target.getAttribute('name') : '' event.targetTagName = event.target ? event.target.tagName : '' w = widgetManager.getWidgetByElement(event.target) diff --git a/src/client/widgets/pads/canvas.js b/src/client/widgets/pads/canvas.js index 123c913c..ce0d96c6 100644 --- a/src/client/widgets/pads/canvas.js +++ b/src/client/widgets/pads/canvas.js @@ -114,8 +114,7 @@ class CanvasWidget extends Canvas { var event = {...e} delete event.firstTarget - // NOTE: in firefox target.getAttribute is undefined when the cursor is outside the page - event.targetName = event.target && event.target.getAttribute ? event.target.getAttribute('name') : '' + event.targetName = event.target ? event.target.getAttribute('name') : '' event.targetTagName = event.target ? event.target.tagName : '' var w = widgetManager.getWidgetByElement(event.target) From 4cde746a74156dfe570999bb474cce886148d471 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Wed, 27 Aug 2025 22:47:13 +0200 Subject: [PATCH 058/352] server: fix resolving absolute file urls containing the remote-root path --- CHANGELOG.md | 6 ++++++ src/server/server.js | 12 ++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fb0837c..70c2cc19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 1.29.9 + +- bug fixes + - server: fix resolving absolute file urls containing the remote-root path + + ## 1.29.8 - bug fixes diff --git a/src/server/server.js b/src/server/server.js index 604a825b..692f7b33 100644 --- a/src/server/server.js +++ b/src/server/server.js @@ -43,9 +43,11 @@ if (settings.read('client-options')) { } } -var resolveDirs = theme.files.map(x=>path.dirname(x)) +var resolveDirs = theme.files.map(x=>path.dirname(x)), + remoteRoot = settings.read('remote-root') + resolveDirs = resolveDirs.filter((x, index)=>{return resolveDirs.indexOf(x) === index}) -resolveDirs.push(settings.read('remote-root') || '') // remote-root / absolute +resolveDirs.push(remoteRoot || '') // remote-root / absolute function resolvePath(url, clientId) { @@ -60,6 +62,12 @@ function resolvePath(url, clientId) { for (var i = sessionPath ? -1 : 0; i < resolveDirs.length; i++) { var p = i === -1 ? sessionPath : resolveDirs[i] + + if (i == resolveDirs.length - 1 && remoteRoot) { + // strip out remote-root path from request url when resolving against it + url = url.replace(settings.read('remote-root'), '') + } + p = path.resolve(path.join(p, url)) if (fs.existsSync(p)) return p From 93ba5d739711aaf2b697cec10b3e4564bccbe394 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 9 Sep 2025 15:04:05 +0200 Subject: [PATCH 059/352] canvas: add webgl2 context type as an option --- package.json | 2 +- src/client/widgets/common/canvas.js | 2 +- src/client/widgets/pads/canvas.js | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 53e3d61f..ada8292c 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.29.8", + "version": "1.29.9-dev", "author": { "name": "Jean-Emmanuel Doucet", "email": "jean-emmanuel@ammd.net" diff --git a/src/client/widgets/common/canvas.js b/src/client/widgets/common/canvas.js index 614283d8..2f63a62e 100644 --- a/src/client/widgets/common/canvas.js +++ b/src/client/widgets/common/canvas.js @@ -30,7 +30,7 @@ class Canvas extends Widget { this.canvas = DOM.get(this.container, 'canvas')[0] - this.ctx = this.canvas.getContext('2d',{ + this.ctx = this.canvas.getContext(this.getProp('contextType') || '2d',{ desynchronized: !ELECTRON_NOGPU && ENV.desynccanvas ? true : false, alpha: true }) diff --git a/src/client/widgets/pads/canvas.js b/src/client/widgets/pads/canvas.js index ce0d96c6..ff6ee96d 100644 --- a/src/client/widgets/pads/canvas.js +++ b/src/client/widgets/pads/canvas.js @@ -15,6 +15,7 @@ class CanvasWidget extends Canvas { var defaults = super.defaults().extend({ class_specific: { + contextType: {type: 'string', value: '2d', choices: ['2d', 'webgl2'], help: 'Context type for the canvas'}, valueLength: {type: 'number', value: 1, help:[ 'Defines the number of values accepted by the widget (minimum 1). Incoming messages that don\'t comply will be ignored', 'When calling `set()` from a script, submitted value should be an array only if `valueLength` is greater than 1.' From 291b1a07521bccca68a83aab440a07a2a8efb985 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 9 Sep 2025 17:02:28 +0200 Subject: [PATCH 060/352] canvas: autoClear is only for 2d mode --- src/client/widgets/pads/canvas.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/widgets/pads/canvas.js b/src/client/widgets/pads/canvas.js index ff6ee96d..c9c668d6 100644 --- a/src/client/widgets/pads/canvas.js +++ b/src/client/widgets/pads/canvas.js @@ -21,7 +21,7 @@ class CanvasWidget extends Canvas { 'When calling `set()` from a script, submitted value should be an array only if `valueLength` is greater than 1.' ]}, autoClear: {type: 'boolean', value: true, help: [ - 'If set to `false`, the canvas context won\'t be cleared automatically and `ctx.clearRect()` will need to be called in `onDraw`.' + 'If set to `false`, the canvas context won\'t be cleared automatically and `ctx.clearRect()` will need to be called in `onDraw`. Ignored if `contextType` is different from `2d`.' ]}, continuous: {type: 'boolean|number', value: false, help: [ 'If set to `true`, `onDraw` will be called at each frame, otherwise it will be called only when the widget is touched and when it receives a value.', @@ -156,7 +156,7 @@ class CanvasWidget extends Canvas { if (!this.getProp('onDraw')) return - if (this.getProp('autoClear')) { + if (this.getProp('autoClear') && this.getProp('contextType') === '2d') { this.clear() this.ctx.beginPath() } From 5b38c79318ef7d9dc54d06dae1edb58ad497dc37 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 9 Sep 2025 17:02:28 +0200 Subject: [PATCH 061/352] canvas: autoClear is only for 2d mode --- src/client/widgets/pads/canvas.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/widgets/pads/canvas.js b/src/client/widgets/pads/canvas.js index ff6ee96d..c9c668d6 100644 --- a/src/client/widgets/pads/canvas.js +++ b/src/client/widgets/pads/canvas.js @@ -21,7 +21,7 @@ class CanvasWidget extends Canvas { 'When calling `set()` from a script, submitted value should be an array only if `valueLength` is greater than 1.' ]}, autoClear: {type: 'boolean', value: true, help: [ - 'If set to `false`, the canvas context won\'t be cleared automatically and `ctx.clearRect()` will need to be called in `onDraw`.' + 'If set to `false`, the canvas context won\'t be cleared automatically and `ctx.clearRect()` will need to be called in `onDraw`. Ignored if `contextType` is different from `2d`.' ]}, continuous: {type: 'boolean|number', value: false, help: [ 'If set to `true`, `onDraw` will be called at each frame, otherwise it will be called only when the widget is touched and when it receives a value.', @@ -156,7 +156,7 @@ class CanvasWidget extends Canvas { if (!this.getProp('onDraw')) return - if (this.getProp('autoClear')) { + if (this.getProp('autoClear') && this.getProp('contextType') === '2d') { this.clear() this.ctx.beginPath() } From bdfade96a7c264185953727dca35ca7aeb89a783 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Wed, 10 Sep 2025 01:45:54 +0200 Subject: [PATCH 062/352] build: migrate build system to rollup & rm app/ from repository --- .babelrc | 13 --- .gitignore | 16 +--- app/assets/themes/.gitignore | 2 - app/client/.gitignore | 2 - app/docs/.htaccess | 1 - app/launcher/.gitignore | 2 - app/server/.keep | 0 package.json | 33 ++++---- scripts/build-client.js | 98 --------------------- scripts/build-css.js | 2 + scripts/build-launcher.js | 16 ---- scripts/build-server.js | 27 ------ scripts/build.js | 49 ----------- scripts/client.plugin-watch.js | 40 +++++++++ scripts/client.rollup.config.js | 99 ++++++++++++++++++++++ scripts/copy-assets.js | 65 -------------- scripts/launcher.rollup.config.js | 47 ++++++++++ scripts/license-header.txt | 7 ++ scripts/package-node.js | 6 +- scripts/server.rollup.config.js | 58 +++++++++++++ {app => src/app}/index.js | 0 src/client/ui/context-menu.js | 2 +- src/client/ui/notifications.js | 2 +- src/client/ui/ui-code-editor.js | 10 +-- src/client/ui/ui-colorpicker.js | 2 +- src/client/ui/ui-console.js | 12 +-- src/client/ui/ui-dragresize.js | 2 +- src/client/ui/ui-filebrowser.js | 2 +- src/client/ui/ui-fileupload.js | 2 +- src/client/ui/ui-inspector-field.js | 2 +- src/client/ui/ui-inspector.js | 2 +- src/client/ui/ui-keyboard.js | 2 +- src/client/ui/ui-modal.js | 2 +- src/client/ui/ui-selectarea.js | 2 +- src/client/ui/ui-tree.js | 2 +- src/client/widgets/basics/button.js | 2 +- src/client/widgets/basics/dropdown.js | 2 +- src/client/widgets/basics/file.js | 2 +- src/client/widgets/basics/input.js | 2 +- src/client/widgets/basics/menu.js | 2 +- src/client/widgets/basics/switch.js | 2 +- src/client/widgets/basics/textarea.js | 2 +- src/client/widgets/common/canvas.js | 2 +- src/client/widgets/common/widget.js | 2 +- src/client/widgets/containers/clone.js | 2 +- src/client/widgets/containers/fragment.js | 2 +- src/client/widgets/containers/modal.js | 2 +- src/client/widgets/containers/panel.js | 2 +- src/client/widgets/containers/patchbay.js | 2 +- src/client/widgets/frames/frame.js | 2 +- src/client/widgets/frames/html.js | 2 +- src/client/widgets/frames/image.js | 2 +- src/client/widgets/frames/svg.js | 2 +- src/client/widgets/graphs/plot.js | 2 +- src/client/widgets/indicators/led.js | 2 +- src/client/widgets/indicators/text.js | 2 +- src/client/widgets/pads/canvas.js | 2 +- src/client/widgets/pads/pad.js | 2 +- src/client/widgets/pads/rgb.js | 2 +- src/client/widgets/scripts/gyro-archive.js | 2 +- src/client/widgets/sliders/range.js | 2 +- src/client/widgets/sliders/slider.js | 2 +- src/launcher/main.js | 2 +- src/launcher/settings.js | 2 +- src/launcher/terminal.js | 2 +- 65 files changed, 327 insertions(+), 362 deletions(-) delete mode 100644 .babelrc delete mode 100644 app/assets/themes/.gitignore delete mode 100644 app/client/.gitignore delete mode 100644 app/docs/.htaccess delete mode 100644 app/launcher/.gitignore delete mode 100644 app/server/.keep delete mode 100644 scripts/build-client.js delete mode 100644 scripts/build-launcher.js delete mode 100644 scripts/build-server.js delete mode 100644 scripts/build.js create mode 100644 scripts/client.plugin-watch.js create mode 100644 scripts/client.rollup.config.js delete mode 100644 scripts/copy-assets.js create mode 100644 scripts/launcher.rollup.config.js create mode 100644 scripts/license-header.txt create mode 100644 scripts/server.rollup.config.js rename {app => src/app}/index.js (100%) diff --git a/.babelrc b/.babelrc deleted file mode 100644 index c591efcc..00000000 --- a/.babelrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "presets": [ - ["@babel/env", { - "targets": { - "ios": "10.3", - "chrome": "60" - }, - "useBuiltIns": "usage", - "corejs": 3 - }] - ], - "plugins": ["@babel/plugin-proposal-object-rest-spread"] -} diff --git a/.gitignore b/.gitignore index a619f6df..40ce7479 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,4 @@ -node_modules -dist -app/LICENSE -app/assets/fonts/* -app/assets/*.css* -app/assets/*.png -app/client/*.js* -app/launcher/*.js* -app/server/* -app/docs/* -!app/docs/.htaccess -!app/server/.keep -app/package.json +node_modules/ +dist/ +/app/ *.pyc diff --git a/app/assets/themes/.gitignore b/app/assets/themes/.gitignore deleted file mode 100644 index d6b7ef32..00000000 --- a/app/assets/themes/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/app/client/.gitignore b/app/client/.gitignore deleted file mode 100644 index d6b7ef32..00000000 --- a/app/client/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/app/docs/.htaccess b/app/docs/.htaccess deleted file mode 100644 index de377bfe..00000000 --- a/app/docs/.htaccess +++ /dev/null @@ -1 +0,0 @@ -ErrorDocument 404 /404.html diff --git a/app/launcher/.gitignore b/app/launcher/.gitignore deleted file mode 100644 index d6b7ef32..00000000 --- a/app/launcher/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/app/server/.keep b/app/server/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/package.json b/package.json index ada8292c..76033892 100644 --- a/package.json +++ b/package.json @@ -21,17 +21,18 @@ "license": "GPL-3.0", "dependencies": { "@babel/core": "7.18.0", - "@babel/eslint-parser": "7.17.0", - "@babel/plugin-proposal-object-rest-spread": "7.18.0", - "@babel/polyfill": "7.12.1", "@babel/preset-env": "7.18.0", "@electron/remote": "2.0.8", + "@rollup/plugin-babel": "^6.0.4", + "@rollup/plugin-commonjs": "^28.0.6", + "@rollup/plugin-json": "^6.1.0", + "@rollup/plugin-node-resolve": "^16.0.1", + "@rollup/plugin-terser": "^0.4.4", "ace-builds": "1.39.0", "ansi-html": "0.0.9", "babelify": "10.0.0", "balanced-match": "2.0.0", "bonjour": "github:jean-emmanuel/bonjour", - "browserify": "17.0.0", "chokidar": "3.5.3", "chroma-js": "2.4.2", "core-js": "3.22.5", @@ -65,6 +66,10 @@ "python-shell": "3.0.1", "qrcode": "1.5.1", "replacestream": "4.0.3", + "rollup": "4.50.1", + "rollup-plugin-copy": "3.5.0", + "rollup-plugin-license": "^3.6.0", + "rollup-plugin-node-externals": "^8.1.1", "sanitize-html": "1.27.5", "sass": "1.89.2", "scope-css": "1.2.1", @@ -74,9 +79,6 @@ "sortablejs": "1.15.0", "source-map-support": "0.5.21", "stacktrace-js": "2.0.2", - "through": "2.3.8", - "uglifyify": "5.0.2", - "webworkify": "1.5.0", "ws": "8.6.0", "yargs": "17.5.1" }, @@ -88,21 +90,20 @@ "scripts": { "postinstall": "echo '\\033[36m=> Dependencies installed successfully. Run \"npm run build\" to build the assets.\\033[0m\n'", "start": "electron app/", - "build": "npm run build-css && npm run build-js && node scripts/copy-assets.js && echo '\\033[36m=> JS and CSS assets built successfully. Run \"npm run package\" to build an executable or \"npm start\" to run the app.\\033[0m\n'", + "build": "npm run build-css && npm run build-js && echo '\\033[36m=> JS and CSS assets built successfully. Run \"npm run package\" to build an executable or \"npm start\" to run the app.\\033[0m\n'", "package": "node scripts/package.js", "package-node": "node scripts/package-node.js", "deb64": "electron-installer-debian --src dist/open-stage-control-linux-x64/ --arch amd64 --dest dist/open-stage-control-linux-x64/ --icon resources/images/logo.png", "rpm64": "electron-installer-redhat --src dist/open-stage-control-linux-x64/ --arch x86_64 --dest dist/open-stage-control-linux-x64/ --icon resources/images/logo.png", "build-css": "node scripts/build-css.js", - "build-js": "npm run build-launcher-js && npm run build-client-js && npm run build-server-js", - "build-client-js": "node scripts/build-client.js", - "build-launcher-js": "node scripts/build-launcher.js", - "build-server-js": "node scripts/build-server.js", - "watch-client": "npm run build-client-js -- --watch", - "watch-browser": "npm run build-client-js -- --watch", "watch-css": "nodemon --watch src/scss -e scss -x \"npm run build-css -- --reload\"", - "watch-server": "nodemon --watch src/server/ -e js -x \"npm run build-server-js\"", - "watch-launcher": "nodemon --watch src/launcher/ -e js -x \"npm run build-launcher-js\"", + "build-js": "npm run build-launcher-js && npm run build-client-js && npm run build-server-js", + "build-client-js": "rollup -c scripts/client.rollup.config.js", + "watch-client": "npm run build-client-js -- --watch", + "build-server-js": "rollup -c scripts/server.rollup.config.js", + "watch-server": "npm run build-server-js -- --watch", + "build-launcher-js": "rollup -c scripts/launcher.rollup.config.js", + "watch-launcher": "npm run build-launcherr-js -- --watch", "build-docs": "node scripts/build-widgets-reference.js > resources/docs/docs/widgets/properties-reference.md && cd resources && python3 -m mkdocs build", "test": "eslint src && npm run build && node tests/test.js" }, diff --git a/scripts/build-client.js b/scripts/build-client.js deleted file mode 100644 index f6e4b64b..00000000 --- a/scripts/build-client.js +++ /dev/null @@ -1,98 +0,0 @@ -var build = require('./build'), - path = require('path'), - babelify = require('babelify'), - nanohtml = require('nanohtml'), - watch = process.argv.includes('--watch'), - through = require('through'), - minimatch = require('minimatch') - - -var ignores = ['**/*.min.js', '**/jquery.ui.js', 'gyronorm.complete.min.js'], - transformWrapper = function(transform){ - return function(file, opts){ - if (ignores.some(pattern => minimatch(file, pattern))) { - return through() - } else { - return transform(file, opts) - } - } - } - -var transforms = [ - [transformWrapper(nanohtml)], - [transformWrapper(babelify)] -] - -console.warn('\033[36m=> Building compressed client scripts...\033[0m') -transforms.push([transformWrapper(require('uglifyify')), {global: true, safari10: true}]) - -var bundle = build({ - input: '../src/client/index.js', - output: '../app/client/open-stage-control-client.js', - options: { - debug: true, - insertGlobals: false, - noParse: ['**/*.min.js', '**/jquery.ui.js'], - cache: {}, - packageCache: {}, - }, - plugins: watch ? [require('watchify')] : [], - transforms: transforms, - ignore: [ - 'postcss' // only needed by sanitize-html if