Compare commits

..

925 commits

Author SHA1 Message Date
1af30141d0 package: make sure entrypoint.sh is runnable in docker container 2026-11-15 02:10:46 +01:00
d81da1acd3 ci: forgejo docker build 2026-11-15 02:01:00 +01:00
c97416b2c3 package: docker init 2026-11-15 01:16:56 +01:00
jean-emmanuel
c3d993e46a docs: bump version 2026-11-08 01:40:00 +01:00
jean-emmanuel
f1dd12c601 misc: lint 2026-11-08 01:39:12 +01:00
jean-emmanuel
82edcfe282 log: 1.31.2 changes 2026-11-08 01:37:19 +01:00
jean-emmanuel
cd4e3b35bb editor: fix call stack overflow caused by commit c1720b4a 2026-11-08 01:24:26 +01:00
jean-emmanuel
2790b7d86e server: serve dev files for client src debugging 2026-11-08 00:30:32 +01:00
jean-emmanuel
a47050e7ad server: send state open error to appropriate client instead of all 2026-10-21 10:09:40 +02:00
jean-emmanuel
9eab8ce38b server: send session open error to appropriate client instead of all 2026-10-21 10:08:07 +02:00
jean-emmanuel
dd3ca188ab server: ipc: deduplicate packet serialization when sending to multiple clients 2026-10-21 10:06:26 +02:00
jean-emmanuel
aec5ba9d9c canvas: allow onResize to send and trigger widget synchronization and scripts 2026-10-06 09:10:36 +02:00
jean-emmanuel
000714d22b image: ensure default value is a string 2026-09-08 16:36:09 +02:00
jean-emmanuel
3263cf2ff1 server: fix allowed extension regexp, explicitely allow mjs src files 2026-08-30 17:18:27 +02:00
jean-emmanuel
db85c42989 docs: 1.31.1 2026-08-30 16:09:07 +02:00
jean-emmanuel
a73e2755dc clone: regression causing error when some widgets have a non-string id 2026-08-30 16:04:29 +02:00
jean-emmanuel
aee968cba9 package: v1.31.0 2026-08-24 14:21:48 +02:00
jean-emmanuel
dcfde67d71 console: only hint focus when editor is enabled 2026-08-24 10:59:52 +02:00
jean-emmanuel
81d5e84044 console: visually indicate focus and blur with escape key 2026-08-24 10:49:43 +02:00
jean-emmanuel
883fb811e8 client: make console message area focusable and prevent editor kbd shortcuts when focused 2026-08-24 10:40:19 +02:00
jean-emmanuel
54d32c4c3f log: scrollbar init fix 2026-08-14 12:52:42 +02:00
jean-emmanuel
e7baf46890 scrollbar: rm debug log 2026-08-14 12:50:26 +02:00
jean-emmanuel
ce0ae02c8b scrollbar: fix initial value in vertical mode 2026-08-14 12:50:05 +02:00
jean-emmanuel
efe5629396 log: typo 2026-08-14 12:37:43 +02:00
jean-emmanuel
7c38dedcc7 log: latest changes 2026-08-14 09:31:49 +02:00
jean-emmanuel
af6cc4b911 tray: keep alive when closing if the server is running 2026-08-14 09:31:11 +02:00
jean-emmanuel
64642274d8 mac: quit app when last window is destroyed 2026-08-14 09:30:29 +02:00
jean-emmanuel
af1a8a8715 log: fix typo 2026-08-13 19:52:20 +02:00
jean-emmanuel
6605f1d2b3 log: phrasing 2026-08-13 19:50:34 +02:00
jean-emmanuel
4d1b8e924a scope: rename property, and log new feature 2026-08-13 19:29:25 +02:00
jean-emmanuel
d69d3b7f13 scope: tweakedy tweakeda fonk 2026-08-13 19:14:29 +02:00
jean-emmanuel
83090d2e06 scrollbar: typo 2026-08-13 18:09:18 +02:00
jean-emmanuel
83456acbff scopes: fix some issues in clone and adapt scrollbar 2026-08-13 18:08:29 +02:00
jean-emmanuel
08b837ff98 scope: continue implementation, adjust clone target acquire mechanism, add scoped linkId 2026-08-13 17:50:57 +02:00
jean-emmanuel
0e8c77a700 widgets: fix widget removal from linkId table when '<<' or '>>' prefixes are present 2026-08-13 16:55:33 +02:00
jean-emmanuel
a36811954d widgets: amend not_editable clean 2026-08-13 15:17:52 +02:00
jean-emmanuel
39c9d4a46d scoping: first id scoping implementation 2026-08-12 16:10:31 +02:00
jean-emmanuel
593ec4c53d widget: clean not-editable css class 2026-08-12 16:09:43 +02:00
jean-emmanuel
8c22384ddb widgets: better not_editable widget flag implementation 2026-08-09 10:30:11 +02:00
jean-emmanuel
7981b6fdd6 osc: avoid object serialization from custom module to client 2026-08-06 12:43:23 +02:00
jean-emmanuel
27d87f2238 stacktrace: missing indentation 2026-07-09 09:08:11 +02:00
jean-emmanuel
c49a731134 midi: fix unrecognized no_auto_note_off option 2026-07-08 11:38:57 +02:00
jean-emmanuel
ac7b0323e2 package: 1.30.4 2026-07-06 17:50:13 +02:00
jean-emmanuel
fe5bbb4713 AI: update policy 2026-07-06 17:45:35 +02:00
jean-emmanuel
e44cf615b5 clone: fix @{parent} bindings 2026-07-06 17:37:56 +02:00
jean-emmanuel
cdea67809f Merge branch 'master' of framagit.org:jean-emmanuel/open-stage-control 2026-07-04 14:34:09 +02:00
jean-emmanuel
79c04cc69a editor: fix moving/resing widgets inside folders when using percent units 2026-07-04 14:05:32 +02:00
jean-emmanuel
045be39e87 knob: add encoder design (& DRY) 2026-06-22 10:02:20 +02:00
jean-emmanuel
c1d692ffba knob: add encoder design (& DRY) 2026-06-20 23:04:18 +02:00
jean-emmanuel
c40d30aa2b encoder: add horizontal mode 2026-06-20 19:08:43 +02:00
jean-emmanuel
d22f850598 notificaion: support icon transform suffixes (use utils.icons()) 2026-06-07 16:20:37 +02:00
jean-emmanuel
7e7c3f43e7 ai: let's make things clear 2026-05-20 09:50:38 +02:00
jean-emmanuel
614b0c237f docs: remove git bug tracker 2026-05-10 19:09:43 +02:00
jean-emmanuel
b89d254386 docs: fix rpm dl link 2026-04-28 18:53:22 +02:00
jean-emmanuel
26a3d4ce60 docs: bump v 2026-04-28 18:49:00 +02:00
jean-emmanuel
a7708f6cd5 package: v1.30.3 2026-04-28 18:28:58 +02:00
jean-emmanuel
ed722923d9 log: tcp regression 2026-04-28 18:27:40 +02:00
jean-emmanuel
9d7087b6e7 Merge branch 'fix/tcp-server-on-binding' into 'master'
fix: tcp incoming messages being silently dropped

See merge request jean-emmanuel/open-stage-control!886
2026-04-28 16:25:11 +00:00
Xavier
e163308e35 fix: tcp incoming messages being silently dropped 2026-04-28 16:25:10 +00:00
jean-emmanuel
19a86aa31b docs: axisLock in multixy.pointsAttr 2026-04-23 15:21:33 +02:00
jean-emmanuel
c84bbee02e scrollbar: methodize target scroll handler and watch for target resize 2026-04-23 11:14:41 +02:00
jean-emmanuel
7fc5372ca1 scripting: add scrollIntoView() 2026-04-23 10:14:03 +02:00
jean-emmanuel
22068ab47e log: update 2026-04-21 16:43:51 +02:00
jean-emmanuel
6dbbc9318d plot, eq: unclip line on y axis 2026-04-21 16:43:12 +02:00
jean-emmanuel
9d79e857f8 scripting: add fileUpload function 2026-04-09 14:59:03 +02:00
jean-emmanuel
892cbd6886 eq: easy optimisation (don't compute response more than needed) 2026-04-07 12:47:19 +02:00
jean-emmanuel
3407568b5f knob: add horizontal mode 2026-03-30 19:11:10 +02:00
jean-emmanuel
51e33c0230 file: remember last visited directory per widget 2026-03-26 18:44:25 +01:00
jean-emmanuel
dfe45cac01 file: dedupe leading "/" when no root is set 2026-03-26 18:44:20 +01:00
jean-emmanuel
d9c23bc672 eq: doc typo 2026-03-03 09:46:14 +01:00
jean-emmanuel
013b7faf9e fader/range: fix compact mode drawing mistake 2026-03-03 09:10:27 +01:00
jean-emmanuel
8bec0552d4 scrollbar: fix drawing issue 2026-03-03 08:29:24 +01:00
jean-emmanuel
3730aa7199 scrollbar: prevent another error 2026-03-03 08:29:09 +01:00
jean-emmanuel
e4311271e9 misc: detailed comment 2026-03-02 17:28:18 +01:00
jean-emmanuel
43d18647b2 linux: workaround gtk conflict 2026-03-02 16:36:46 +01:00
jean-emmanuel
12508f8994 docs: bump version 2026-03-02 13:57:38 +01:00
jean-emmanuel
e2c48bd6ac script: escape html elements in widget log to avoid cyclic json error 2026-03-02 11:21:18 +01:00
jean-emmanuel
3d12e85e56 scrollbar: prevent error 2026-03-02 10:53:45 +01:00
jean-emmanuel
a0fed34edb misc: space 2026-03-02 10:49:41 +01:00
jean-emmanuel
27e3e6f1b3 client: add noWarning option 2026-03-02 10:48:36 +01:00
jean-emmanuel
91fb688d9d button: amend click doc 2026-03-02 10:41:38 +01:00
jean-emmanuel
99578d3be5 log: update 2026-03-02 10:38:56 +01:00
jean-emmanuel
6b37c4521e button: add click option & add missing move events to onTouch 2026-03-02 10:37:29 +01:00
jean-emmanuel
b016724d04 modal, file: add click option 2026-03-02 10:28:05 +01:00
jean-emmanuel
9961fb73b4 menu: use click event in *toggle modes 2026-03-02 10:27:42 +01:00
jean-emmanuel
270eb77802 log: modal click handler fix 2026-03-01 11:44:56 +01:00
jean-emmanuel
84474499c7 modal: use draginit as click handler (allows preventing touch event from parent container) 2026-03-01 11:23:09 +01:00
jean-emmanuel
bfc1d182be patchbay: interaction and rendering issues + use draginit instead of fast-click 2026-03-01 11:12:40 +01:00
jean-emmanuel
e682455872 log: rgb fix 2026-02-10 13:07:47 +01:00
jean-emmanuel
09aa7e8a63 rgb: don't break pad styling when updating hue (use correct method to update styles) 2026-02-05 13:28:14 +01:00
jean-emmanuel
3da569700a code editor: add content changed hint 2026-01-22 12:04:50 +01:00
jean-emmanuel
daa4fbfecf code editor: keep fullscreen code editor focused and opened upon validation 2026-01-22 11:57:37 +01:00
jean-emmanuel
5bf5ab8754 editor: preserve code editor undo history between consecutive edits of a same widget's property 2026-01-22 10:52:20 +01:00
jean-emmanuel
c59c4a8065 widgets: resolveProp: preserve numbers and booleans as strings in object values 2026-01-20 10:01:22 +01:00
jean-emmanuel
4c008099ca docs: update browser requirements 2026-01-09 18:52:24 +01:00
jean-emmanuel
08d4139844 server: define sendFile as server method once and for all 2026-01-09 09:41:36 +01:00
jean-emmanuel
a425d8156c server: fix @imports from theme (don't serve it from osc_asset dir to let imports load from user locations) 2026-01-09 09:28:32 +01:00
jean-emmanuel
750f89b6ce docs: fix biuld for node 22 2026-01-08 22:56:39 +01:00
jean-emmanuel
bf72d38fcf docs: bump 2026-01-08 22:53:26 +01:00
jean-emmanuel
11af5edc70 package: 1.30.1 2026-01-08 22:42:00 +01:00
jean-emmanuel
0bfbf59f0f custom module: fix nativeRequire resolve path (somehow broke during esm migration) 2026-01-08 22:40:29 +01:00
jean-emmanuel
b8c59db5f3 server: fix user asset loading from folder named "assets" (or "client"). This also makes osc asset urls more clear 2026-01-08 21:24:58 +01:00
jean-emmanuel
c3f526070f log: electron version 2026-01-07 00:49:43 +01:00
jean-emmanuel
d0a76d4ce3 server: don't use path.resove on assets (fails on windows) and fix regexp 2026-01-03 10:07:49 +01:00
jean-emmanuel
665515b626 widget: fix typo 2025-12-30 18:17:43 +01:00
jean-emmanuel
2758a79ff5 widget: last minute regression in updateProps 2025-12-30 18:04:18 +01:00
jean-emmanuel
43ac672d94 docs: new downloads 2025-12-30 17:55:42 +01:00
jean-emmanuel
1aa3fbfef5 script-vm: fix setTimeout/setInterval override 2025-12-30 17:34:05 +01:00
jean-emmanuel
f4af775a98 package: 1.30 2025-12-30 17:08:29 +01:00
jean-emmanuel
8cf854af2e noop: rename internal event for better clarity 2025-12-29 18:38:53 +01:00
jean-emmanuel
4627fa9c02 log: value state/prop change 2025-12-29 14:03:19 +01:00
jean-emmanuel
5b3d3e671c widget: amend c1720b4a52 to keep things as unchanged as possible 2025-12-29 13:56:32 +01:00
jean-emmanuel
c1720b4a52 widget: updateProps: add a special case for value property, when edited (remotely or from the editor), check against the value state instead to decide whether to update the state or not. The regular behavior that works well for other properties is otherwise confusing for the value as it is not ovious to the user that there are two values (the property and the state) 2025-12-29 13:47:13 +01:00
jean-emmanuel
80e5b048ea switch: make values prop dynamic 2025-12-29 12:50:34 +01:00
jean-emmanuel
414195c621 editor: rename changedProps vars and flag to editedProps to disambiguate 2025-12-29 12:40:14 +01:00
jean-emmanuel
c3002b99c3 value events: remove some useless flags 2025-12-29 10:55:51 +01:00
jean-emmanuel
93d3b159ca package: beta10 2025-12-28 12:47:52 +01:00
jean-emmanuel
3613dd9901 log 1.29.9 backport 2025-12-27 11:38:05 +01:00
jean-emmanuel
5ea192d5d4 build: regenerate package lock to fix dependency fetching 2025-12-26 23:36:07 +01:00
jean-emmanuel
9abfb85739 editor: fix regression in code editor making global variables unrecognized 2025-12-23 16:41:56 +01:00
jean-emmanuel
5785a5e026 misc: lint 2025-12-19 12:20:51 +01:00
jean-emmanuel
2a4412e726 client: don't request storage access at all, it's not needed for toplevel site 2025-12-19 09:14:37 +01:00
jean-emmanuel
89b68c8009 client: log full error if storage access is denied 2025-12-19 08:17:08 +01:00
jean-emmanuel
eddcbe5cd2 docs: link typo 2025-12-18 09:47:25 +01:00
jean-emmanuel
5070ec8421 package: update lock file 2025-12-17 12:54:18 +01:00
jean-emmanuel
eff4ddea8a package: move some gh links 2025-12-17 12:53:44 +01:00
jean-emmanuel
1b3ab562da launcher: update download link 2025-12-17 12:13:52 +01:00
jean-emmanuel
4857a20b61 launcher: query new repo instead of gh 2025-12-17 12:12:36 +01:00
jean-emmanuel
6de4b1ac5c repo: rm github files 2025-12-17 11:54:46 +01:00
jean-emmanuel
db5d087425 readme: update link 2025-12-17 11:53:20 +01:00
jean-emmanuel
7ab8bcd78a docs: update contributors list 2025-12-17 11:38:46 +01:00
jean-emmanuel
d93b880330 docs: more links 2025-12-17 11:27:50 +01:00
jean-emmanuel
199b6241aa log: escape double brackets for mkdocs macros 2025-12-17 11:19:48 +01:00
jean-emmanuel
70be6fedfa docs: update bug tracker url 2025-12-17 11:19:31 +01:00
jean-emmanuel
618fb3b01f docs: framagit migration 2025-12-17 11:16:37 +01:00
jean-emmanuel
dc85311b54 deps: ditch osc.js fork 2025-12-17 10:03:34 +01:00
jean-emmanuel
6bd1293959 log: update 2025-12-16 12:36:23 +01:00
jean-emmanuel
422c84d42e package: beta 9 2025-12-16 12:34:09 +01:00
jean-emmanuel
37b305eaea client: delay access storage denial error log 2025-12-16 12:24:32 +01:00
jean-emmanuel
b27d381324 client: better storage access error log 2025-12-16 12:21:52 +01:00
jean-emmanuel
3777b1fcbb client: make app more resilient to storage access denial 2025-12-16 12:16:20 +01:00
jean-emmanuel
8af432933c ipc: fix an old regression preventing uuid from being reused 2025-12-16 10:30:12 +01:00
jean-emmanuel
55d5f440be ipc: dedupe 'connected' response to 'open' request (no functionnal effect) 2025-12-15 13:00:36 +01:00
jean-emmanuel
ce48146bdb launcher: fix regression 2025-12-15 09:41:33 +01:00
jean-emmanuel
e4eae76bdf midi: implement backend restart feature 2025-12-15 09:41:17 +01:00
jean-emmanuel
31f4119442 scripting: calling setFocus() without if now unfocuses active element 2025-12-14 14:41:05 +01:00
jean-emmanuel
42b71ef6fc package: beta 8 2025-12-13 19:27:21 +01:00
jean-emmanuel
d4cd2ec666 imports: use some black magic **** to please safari/ios and fix dynamic imports order 2025-12-13 19:24:10 +01:00
jean-emmanuel
9b58f4e365 server: more reliable url check for client assets requests 2025-12-13 11:44:35 +01:00
jean-emmanuel
b064b8f3a8 button: add onTouch 2025-12-13 11:30:10 +01:00
jean-emmanuel
934550c942 events: make sure event.offsetX/Y works the same for touch & mouse 2025-12-13 11:20:58 +01:00
jean-emmanuel
58c1fc3c32 client: init timeout should not be needed anymore; preload js modules asap if supported 2025-12-12 18:32:31 +01:00
jean-emmanuel
8737385a0e package: rm debug line 2025-12-12 18:31:36 +01:00
jean-emmanuel
7cda8e4670 package: raise min chromium version, to remove some polyfills and speed up loading time 2025-12-12 13:22:28 +01:00
jean-emmanuel
a441bd628b iframe: remove useless error string from the past 2025-12-11 19:56:33 +01:00
jean-emmanuel
fa15187c2c client: extra safe chunk loading before notifying server 2025-12-11 15:04:42 +01:00
jean-emmanuel
45dd19494f package: beta 7 2025-12-10 17:22:59 +01:00
jean-emmanuel
3bba80d2f0 client: ensure html no-cache policy 2025-12-10 17:21:51 +01:00
jean-emmanuel
fab78f98a4 scripting: add getToolbar() and make toolbar() accept string id 2025-12-10 09:50:05 +01:00
jean-emmanuel
67669d4ff2 package-lock: update 2025-12-10 09:49:42 +01:00
jean-emmanuel
6f46a813cc docs: fullscreen and wakelock don't always require user interaction to work 2025-12-10 09:04:56 +01:00
jean-emmanuel
dc023def19 client: update toolbar toggle when user agent releases the wakelock by itself 2025-12-10 08:59:30 +01:00
jean-emmanuel
02cc18395a misc: lint 2025-12-09 22:17:45 +01:00
jean-emmanuel
931827fc72 server: silence not found errors for apple requests 2025-12-09 22:05:40 +01:00
jean-emmanuel
891239658c ios: use 3rd party to better detect iOS versions and mobile devices 2025-12-09 21:59:50 +01:00
jean-emmanuel
972ecdfae3 server: issue a warning when a cached/expired version of the app is requested 2025-12-09 12:31:26 +01:00
jean-emmanuel
92ef3b7ac1 server/client: tidy up cache control, enforce server validation and remove version from build assets file names 2025-12-09 12:17:26 +01:00
jean-emmanuel
71293de694 docs: scription: set() external flag implies send:false, not sync:false 2025-12-05 17:53:50 +01:00
jean-emmanuel
acf5f74ea2 client: ensure a proper init order for server-client communication 2025-12-04 17:56:12 +01:00
jean-emmanuel
dc7ac2bcd3 electron: prevent possible error when stopping server 2025-11-10 23:27:21 +01:00
jean-emmanuel
3451feef24 package: update 2025-11-09 09:52:16 +01:00
jean-emmanuel
0a6dd34575 package: see if electron 36 solves some mac issues 2025-11-09 09:51:19 +01:00
jean-emmanuel
1129fe42cf build: chmod 2025-11-05 09:38:47 +01:00
jean-emmanuel
e18ad7774c package: beta3 2025-11-05 09:37:35 +01:00
jean-emmanuel
e7a864d84e input: numeric: select all content when focused (doesn't work on all browsers though) 2025-11-05 09:13:48 +01:00
jean-emmanuel
2a4c9d96fe xy: add clipX and clipY proprties (allows multixy to set per-pads anges limits) 2025-11-01 13:57:32 +01:00
jean-emmanuel
9e60de7243 misc: all recent node versions are supported 2025-10-24 21:13:51 +02:00
jean-emmanuel
bedca678fb pakcage: beta2 2025-10-19 10:09:02 +02:00
jean-emmanuel
75bbdf59a6 electron: clear browser cache when an update is detected 2025-10-15 08:34:16 +02:00
jean-emmanuel
ad2c87910c events: fix dom 'change' event (typo) 2025-10-13 09:24:36 +02:00
jean-emmanuel
bcf42b178e package lock update 2025-10-12 09:01:23 +02:00
jean-emmanuel
a34192caab package: prepare beta1 2025-10-11 18:19:50 +02:00
jean-emmanuel
1f1b56607b docs: color properties must use css syntax 2025-10-09 21:23:33 +02:00
jean-emmanuel
d3870d74f2 log: typos 2025-09-29 12:04:01 +02:00
jean-emmanuel
0d7c052feb input: add noCanvas option 2025-09-29 11:06:15 +02:00
jean-emmanuel
8d62fe0801 package: update rpm & package-lock 2025-09-27 10:42:38 +02:00
jean-emmanuel
2069311450 packaging: stop using CI, build packages at home 2025-09-27 10:41:34 +02:00
jean-emmanuel
cec0604445 package: used fixed electron-rpm fork until upstream updates 2025-09-27 10:41:03 +02:00
jean-emmanuel
39eb82f73d build: update client shim to fix docs script 2025-09-24 18:10:59 +02:00
jean-emmanuel
4872e3019f build: consistent chunk naming 2025-09-24 08:48:56 +02:00
jean-emmanuel
3fb8dee637 matrix: back to the old value behavior since scrolling isn't related anymore 2025-09-24 08:44:55 +02:00
jean-emmanuel
5dde5a7f9f build: same sourcemaps for all 2025-09-24 08:27:33 +02:00
jean-emmanuel
96f5cd0cf5 client: fix sourcemaps (stacktrace-js doesn't like when sourcecode is included in maps, good news for file size!) 2025-09-24 08:22:27 +02:00
jean-emmanuel
af2a771b7d inspector: restore missing separator label 2025-09-23 22:30:22 +02:00
jean-emmanuel
e8ecb121f5 tree: fix small error 2025-09-23 15:54:36 +02:00
jean-emmanuel
859f583ad1 editor: auto show widget on selection 2025-09-23 09:20:40 +02:00
jean-emmanuel
36c2f90ec1 theme: autoreload got lost during migration 2025-09-23 09:19:04 +02:00
jean-emmanuel
02465d9cdf ui: increase default sidepanel size 2025-09-23 08:44:03 +02:00
jean-emmanuel
361fdccda5 tree: better scrollIntoView on showWidget 2025-09-23 08:36:11 +02:00
jean-emmanuel
4a915659d4 electron: correct background color 2025-09-22 18:29:37 +02:00
jean-emmanuel
f7b42fbfb2 launcher: fix build / avoid editor import 2025-09-22 18:07:06 +02:00
jean-emmanuel
6322d91478 build: revert diff import change 2025-09-22 13:06:19 +02:00
jean-emmanuel
f8b34ed71e client: lint & clean 2025-09-22 12:47:41 +02:00
jean-emmanuel
4acc92a607 build: import issue 2025-09-22 12:46:00 +02:00
jean-emmanuel
9aaa114fdb scrollbar: prevent negative radius error and clean property list 2025-09-22 12:41:45 +02:00
jean-emmanuel
d20030311c scrollbar: revert last commit 2025-09-22 12:10:23 +02:00
jean-emmanuel
fe1ae44e60 scrollbar: simplify thumbsize code 2025-09-22 12:04:18 +02:00
jean-emmanuel
edca21bb99 scrollbar: fix init state when recreating panel 2025-09-22 11:50:34 +02:00
jean-emmanuel
9c5ad33944 scrollbar: roundrect knob when browser supports it 2025-09-22 11:38:11 +02:00
jean-emmanuel
4c754bfaf4 scrollbar: fix locking mechanism 2025-09-22 11:24:34 +02:00
jean-emmanuel
b53af33b09 server/client: prevent client sync request when clientSync option is 0 2025-09-22 10:06:35 +02:00
jean-emmanuel
15002baf6b scrollbar: iron out some sync issues 2025-09-21 22:48:48 +02:00
jean-emmanuel
6bdcef119c panels: remove onScroll, the scrollbar widget should suffice 2025-09-21 18:37:47 +02:00
jean-emmanuel
5eae65a0aa scrollbar: set a min size for the scrollthumb and continue implimentatiob 2025-09-21 18:21:46 +02:00
jean-emmanuel
a95697045a widgets: add scrollbar widget 2025-09-21 13:22:07 +02:00
jean-emmanuel
de62a7ca0e fader: fix touchZone == knob for compact design 2025-09-21 09:46:54 +02:00
jean-emmanuel
3f972838b0 panels: on the way to a clean and consistent scrolling handling 2025-09-20 14:01:02 +02:00
jean-emmanuel
96cb90ed0d zoom: prevent changing editor zoom level when it's disabled 2025-09-20 09:19:32 +02:00
jean-emmanuel
3e14c46c8c client: prevent editor zoom level from affecting drag events when the editor is disabled 2025-09-20 09:17:13 +02:00
jean-emmanuel
12f6253de7 menu: change default layout to vertical 2025-09-20 09:03:55 +02:00
jean-emmanuel
781a1b1d14 package-lock: update 2025-09-19 10:38:28 +02:00
jean-emmanuel
714bdddb96 matrix: if scroll is true, children's values no longer feed the matrix' value and onValue script, it will be used for scrolling state, like with panels 2025-09-19 10:35:38 +02:00
jean-emmanuel
de9b5db120 package: update to electron 32
- ships with node 20
- supports macos  >= catalina (dropped in v33)
- supports standard css scrollbar styling (previous versions that do have an annoying menu color bug)
2025-09-19 09:51:28 +02:00
jean-emmanuel
4b7c11c301 log: system scrollbar 2025-09-19 09:06:29 +02:00
jean-emmanuel
b93f3e57ac client: restore dynamic scrollbar alpha, continue removing old scrollbar styling 2025-09-19 08:53:52 +02:00
jean-emmanuel
c5243126ee electron: prepare electron update 2025-09-19 08:38:48 +02:00
jean-emmanuel
3ca713ecf6 client: remove iOS scrollbar shim 2025-09-19 08:38:44 +02:00
jean-emmanuel
007ff1e7fd electron: fix window icon path 2025-09-18 01:21:03 +02:00
jean-emmanuel
20b81b99f5 electron: fix tray icon path 2025-09-18 01:20:26 +02:00
jean-emmanuel
ed7a562b36 electron: rm useless import 2025-09-18 01:11:45 +02:00
jean-emmanuel
d78d54d062 launcher: fix some changed globals 2025-09-18 01:10:59 +02:00
jean-emmanuel
cfc000a2cd package: fix watch-launcher and dep alpha-order 2025-09-18 00:42:32 +02:00
jean-emmanuel
cddca97378 launcher: fix charset issue 2025-09-18 00:37:25 +02:00
jean-emmanuel
53f941c1e7 packaging: update electron packager, it doesn't require wine anymore to build win pacakge from linux 2025-09-18 00:23:12 +02:00
jean-emmanuel
55ea9f5f0b client: use JSON5 as exported 2025-09-18 00:11:33 +02:00
jean-emmanuel
ca2fce8d05 package: next will be 1.30 2025-09-17 10:59:13 +02:00
jean-emmanuel
22a4236485 package: rm old dependency 2025-09-17 10:57:44 +02:00
jean-emmanuel
85b10cf280 lintrc: rm useless key 2025-09-17 10:46:10 +02:00
jean-emmanuel
27bdcdc023 lint: make things a bit tighter (no cond assign, no implicit switch fall through) 2025-09-17 10:24:06 +02:00
jean-emmanuel
6f563f4492 lint: forbid undef 2025-09-17 10:15:01 +02:00
jean-emmanuel
c71b9fb48e client: stop using window-based globals 2025-09-17 10:14:03 +02:00
jean-emmanuel
b2b3bcb1b6 client: global var assign mistake 2025-09-17 09:36:01 +02:00
jean-emmanuel
f5091b9267 all: catch some undef errors 2025-09-17 09:19:11 +02:00
jean-emmanuel
4dbc572ea1 file: honor server's remote-root option (remove root path from displayed path and returned value) 2025-09-15 09:05:37 +02:00
jean-emmanuel
9ef97ca1c3 server: function scope error 2025-09-15 08:29:42 +02:00
jean-emmanuel
48402e277d midi: add option to disable outgoing note_on,vel=0 to note_off conversion 2025-09-15 08:18:13 +02:00
jean-emmanuel
74faac7baf python: update rtmidi 2025-09-13 17:27:11 +02:00
jean-emmanuel
8d2c5ff171 build: rm option that should have been saved 2025-09-13 16:07:45 +02:00
jean-emmanuel
fb6c2897bb server: file structure fix 2025-09-13 16:02:03 +02:00
jean-emmanuel
51f46b8034 build: safari10 bugfix no longer required 2025-09-13 16:01:48 +02:00
jean-emmanuel
283c340f16 build: ship client script as esm, drop ios 10.3 and lift some protections in user scripts 2025-09-13 15:38:56 +02:00
jean-emmanuel
12bf4db1b6 client: fix some errors 2025-09-13 11:27:20 +02:00
jean-emmanuel
0b52921181 build: put licenses in separate file 2025-09-13 11:07:27 +02:00
jean-emmanuel
563414226a server: consistent import ordering (local files last) 2025-09-13 10:53:37 +02:00
jean-emmanuel
37f3ee0378 server: fix some var regressions 2025-09-13 10:30:52 +02:00
jean-emmanuel
11d2588395 misc: lint 2025-09-12 22:33:38 +02:00
jean-emmanuel
c43f970720 misc: rm test script for now 2025-09-12 22:19:25 +02:00
jean-emmanuel
00a6428b9f client: fix init order for custom events (migration side effect) 2025-09-12 20:10:51 +02:00
jean-emmanuel
7e69d7d9d0 build: faster client build in watch mode (bypass babel and terser) 2025-09-12 20:10:24 +02:00
jean-emmanuel
4c98442fed build: migrate widget doc generation script, ungit widget reference 2025-09-12 16:35:07 +02:00
jean-emmanuel
6b68237f41 migration: explicit extension in relative imports & generic name for js assets 2025-09-12 15:52:46 +02:00
jean-emmanuel
7836db8327 misc mjs lint script 2025-09-12 15:51:35 +02:00
jean-emmanuel
43a7a37ee6 migration: rename js src to mjs 2025-09-12 12:48:48 +02:00
jean-emmanuel
b303485a87 build: only copy py files to python/ dir 2025-09-12 12:19:16 +02:00
jean-emmanuel
b44fe5a086 build: rm app folder in src 2025-09-12 11:48:45 +02:00
jean-emmanuel
34de7420e2 midi: move python src to server folder to be as consistent as possible with the build result 2025-09-12 11:45:21 +02:00
jean-emmanuel
18568d40c6 server: fix var name 2025-09-12 10:48:52 +02:00
jean-emmanuel
45f5ae870b midi: move dist bin to python folder 2025-09-12 10:47:47 +02:00
jean-emmanuel
9d9462685b midi: only freeze python loader and keep python source editable to reduce future need for midi bin rebuild 2025-09-12 10:38:21 +02:00
jean-emmanuel
3a2a186e42 electron: clean 2025-09-12 02:51:41 +02:00
jean-emmanuel
fb3def071f server: use electron as node for server process 2025-09-12 02:49:44 +02:00
jean-emmanuel
3a1a05636b server: migrate to esm, split node and electron code 2025-09-12 02:44:06 +02:00
jean-emmanuel
7ec9e64dc0 launcher: cjs -> esm 2025-09-11 19:57:17 +02:00
jean-emmanuel
034542f5e2 client: lint 2025-09-11 16:18:32 +02:00
jean-emmanuel
7ce651cad0 client: rm debug log 2025-09-11 16:12:52 +02:00
jean-emmanuel
d24c973fff build: restore babel 2025-09-11 16:11:37 +02:00
jean-emmanuel
a638f96455 client: migrate from commonjs to esm 2025-09-11 16:10:05 +02:00
jean-emmanuel
f4fb4e7d2c midi: check if midi should be there without eval 2025-09-10 16:07:06 +02:00
jean-emmanuel
5aed82f366 eslint: remove babel dep 2025-09-10 13:22:21 +02:00
jean-emmanuel
282adab337 build: preserve class & function in client script, disable terser for server script 2025-09-10 12:31:21 +02:00
jean-emmanuel
788f86f83e package-lock: update 2025-09-10 12:18:59 +02:00
jean-emmanuel
803fa2a4e9 build: remove main ace lib from bundle, just copy 2025-09-10 12:15:01 +02:00
jean-emmanuel
63101c965f build: disable treeshaking 2025-09-10 11:38:09 +02:00
jean-emmanuel
d6812f0cbe inputs/textarea/select: only reset appearance in editor 2025-09-10 11:16:21 +02:00
jean-emmanuel
4e4481cf96 widget: unrestrict html property (yes, let users break the app eventually), speeds up build times 2x 2025-09-10 11:06:15 +02:00
jean-emmanuel
4696275047 build: ignore babelrc 2025-09-10 10:54:14 +02:00
jean-emmanuel
ee416e344d build: exclude serialport from build 2025-09-10 02:48:46 +02:00
jean-emmanuel
f4927f67d3 build: rm more old bits 2025-09-10 02:41:26 +02:00
jean-emmanuel
f1b15733f1 build: rm obsolte dependency 2025-09-10 02:39:08 +02:00
jean-emmanuel
4be8911f55 build: cleanup client script 2025-09-10 02:37:47 +02:00
jean-emmanuel
a5934a5555 test: restore missing dep for eslint 2025-09-10 02:22:11 +02:00
jean-emmanuel
8a632e7519 Merge branch 'rollup' 2025-09-10 02:11:34 +02:00
jean-emmanuel
11b362a513 package-lock update 2025-09-10 02:01:14 +02:00
jean-emmanuel
bdfade96a7 build: migrate build system to rollup & rm app/ from repository 2025-09-10 02:00:56 +02:00
jean-emmanuel
5b38c79318 canvas: autoClear is only for 2d mode 2025-09-09 17:03:13 +02:00
jean-emmanuel
291b1a0752 canvas: autoClear is only for 2d mode 2025-09-09 17:02:28 +02:00
jean-emmanuel
93ba5d7397 canvas: add webgl2 context type as an option 2025-09-09 15:04:05 +02:00
jean-emmanuel
4cde746a74 server: fix resolving absolute file urls containing the remote-root path 2025-08-27 22:47:13 +02:00
jean-emmanuel
f2189e29ce firefox: better fix for out of page events 2025-08-14 14:13:33 +02:00
jean-emmanuel
7fd668bdf9 travis: focal fails now 2025-08-14 09:08:00 +02:00
jean-emmanuel
d70df6fb6d docs: update 2025-08-14 09:02:43 +02:00
jean-emmanuel
3b792d2431 rgb: fix long standing (presumably) issue with touchstate, affecting editor' colorpicker as well 2025-08-13 22:21:43 +02:00
jean-emmanuel
c450c6133c editor: fix colorpicker dragend handler (dragend doesn't bubble up anymore, it needs to be caught for all 3 subwidgets) 2025-08-12 14:31:18 +02:00
jean-emmanuel
7d38418a66 dropdown: fix label init, make it dynamic prop, refresh it when values are parsed 2025-08-12 09:20:26 +02:00
jean-emmanuel
5b9bcd63ce firefox: onTouch error when the cursor goes outside the page 2025-08-11 13:52:31 +02:00
jean-emmanuel
f38bcb9ea0 client: add title client option 2025-08-05 15:31:12 +02:00
jean-emmanuel
84bf487169 package: 1.29.7 & doc update 2025-07-23 08:33:30 +02:00
jean-emmanuel
83fd78e322 tray: fix (?) quit menu action 2025-07-23 08:17:09 +02:00
jean-emmanuel
0de9f239c8 docs: tray things 2025-07-22 19:58:29 +02:00
jean-emmanuel
28c0877dc9 launcher: add hide action if using tray 2025-07-22 19:34:30 +02:00
jean-emmanuel
5cf59ea97c tray: make it optional and disabled by default 2025-07-22 19:24:50 +02:00
jean-emmanuel
89b82d3c9b log: tray menu should have wait for 1.30 2025-07-22 19:13:56 +02:00
jean-emmanuel
65ebe938de docs: tray icon menu 2025-07-22 19:11:27 +02:00
jean-emmanuel
015736486c tray: only quit if server is stopped; hide in tray when starting minimzed 2025-07-22 19:02:41 +02:00
jean-emmanuel
374ef68028 log: silicon builds 2025-07-17 10:18:26 +02:00
jean-emmanuel
f119189fe1 package: silicon bins ! 2025-07-16 23:44:09 +02:00
jean-emmanuel
14f8a0bf29 midi: allow arm64/darwin midi 2025-07-16 20:02:30 +02:00
jean-emmanuel
f29be8cc75 docs: update 2025-07-16 16:03:24 +02:00
jean-emmanuel
9176e0caa2 log: border radius update 2025-07-16 14:30:17 +02:00
jean-emmanuel
bf1e4ec2e7 fader: limit radius 2025-07-16 14:23:20 +02:00
jean-emmanuel
63cfcb1b1d fader: compact radius tweaks 2025-07-16 14:20:50 +02:00
jean-emmanuel
1ade3d4392 fader: make compact design honor borderRadius 2025-07-16 14:04:45 +02:00
jean-emmanuel
01e447ac60 menu: make popup menu inherit border radius 2025-07-15 12:36:14 +02:00
jean-emmanuel
687564cb6f switch: fix border radius inheritance 2025-07-15 11:47:43 +02:00
jean-emmanuel
b06b2b8643 $Merge branch 'wicast-TrayIcon' 2025-07-08 17:14:46 +02:00
jean-emmanuel
a5d5586dc3 tray: code lint, retina icon for mac, keep alive launcher and tray when closing if there's a client window 2025-07-08 16:58:02 +02:00
jean-emmanuel
aa2d5029be package-lock: update 2025-07-08 09:45:33 +02:00
jean-emmanuel
bde7039d25 build: use sass instead of node-sass to fix mac builds 2025-07-08 09:45:33 +02:00
jean-emmanuel
55618fe5c3 package: 1.29.6 2025-07-08 09:45:33 +02:00
jean-emmanuel
b23c062e07 docs: update 2025-07-08 09:45:33 +02:00
jean-emmanuel
3b887d7a15 package-lock: update 2025-07-08 09:44:50 +02:00
jean-emmanuel
2532ab6764 build: use sass instead of node-sass to fix mac builds 2025-07-08 09:43:48 +02:00
wicast
a89f24d2f1 fix: macos tray icon size 2025-07-08 11:53:37 +08:00
wicast
0666d4677e feat: add tray icon 2025-07-08 11:00:47 +08:00
jean-emmanuel
5e06f5cf94 package: 1.29.6 2025-06-27 09:55:32 +02:00
jean-emmanuel
379031379e docs: update 2025-06-27 09:55:19 +02:00
jean-emmanuel
802e1780b1 docs: canvas: ctx.clear() is not a thing 2025-06-26 15:30:13 +02:00
jean-emmanuel
dedb82bb86 multixy/xy: add stepsX and stepsY properties 2025-06-23 13:54:27 +02:00
jean-emmanuel
69c52921c4 pads: send value when setting spring to true, but only if there's a value change 2025-06-12 12:42:03 +02:00
jean-emmanuel
faba19e94c matrix: sanitise quantity property (avoid error when NaN or < 0) 2025-06-07 13:57:48 +02:00
jean-emmanuel
aa666f0738 package: v1.29.5 2025-05-24 13:23:33 +02:00
jean-emmanuel
84cba42d86 cli: regression (1.28) preventing from setting options from a terminal on windows 2025-05-24 13:22:29 +02:00
jean-emmanuel
54b7bf7a63 code editor: correctly detect tab-focus to reset scroll / cursor position 2025-05-19 17:19:53 +02:00
jean-emmanuel
e5d5d0aa06 code editor: fix available globals for onResize 2025-05-19 15:28:13 +02:00
jean-emmanuel
e7ffec8c03 keyboard: regression (1.27.5) breaking velocity property 2025-05-16 16:00:05 +02:00
jean-emmanuel
296ba343c4 package: hot patched 1.29.4 on the way 2025-05-16 11:26:59 +02:00
jean-emmanuel
32c3bf2abd widget: regression breaking widget recreation routine (all properties seen as invalid because of wrong default property cache) 2025-05-16 11:23:41 +02:00
jean-emmanuel
f5ee7f5df1 package: 1.29.3 2025-05-13 10:04:28 +02:00
jean-emmanuel
45b8794bf6 docs: update 2025-05-13 10:04:16 +02:00
jean-emmanuel
870d3e3445 patchbay: missing preArgs implementation 2025-05-13 09:44:16 +02:00
jean-emmanuel
460d8718c9 docs: remote control detail 2025-05-13 09:21:40 +02:00
jean-emmanuel
f49fb43ec3 lint: var -> let 2025-05-07 11:26:58 +02:00
jean-emmanuel
b071189c65 matrix: make quantity a dynamic property to avoid losing widget state when it changes 2025-05-07 11:21:40 +02:00
jean-emmanuel
c860bc1959 widget: ignore invalid properties (avoid recreating if matrix/clone child has an override for an invalid property) 2025-05-07 09:42:12 +02:00
jean-emmanuel
6c2e500135 log: mising widget type 2025-05-05 14:41:41 +02:00
jean-emmanuel
6a055c620b frame: add allow property 2025-05-05 14:41:24 +02:00
jean-emmanuel
4fdcfd7f05 log: update 2025-04-20 15:25:02 +02:00
jean-emmanuel
c037064f57 package: v1.29.2 2025-04-20 15:24:35 +02:00
jean-emmanuel
c092951052 canvas: more safe check before drawing 2025-04-20 15:23:48 +02:00
jean-emmanuel
ccba528cbf package: update package-lock 2025-04-20 11:24:18 +02:00
jean-emmanuel
950f862f2c package: bump 2025-04-20 11:24:11 +02:00
jean-emmanuel
c124c3826f fader/range: reuse pips offscreen canvas instead of creating a new one 2025-04-20 10:35:04 +02:00
jean-emmanuel
5abaf7fbb3 fader/range: really check if pips are ready to be drawn before drawing them 2025-04-20 10:34:20 +02:00
jean-emmanuel
4c9eecd0af scripting: setFocus not working on iOS 2025-04-17 09:07:59 +02:00
jean-emmanuel
bc52244c0b package: v1.29.0 2025-04-08 11:10:06 +02:00
jean-emmanuel
4487b6bc4f ranger: missing call for pips drawing 2025-04-08 11:08:42 +02:00
jean-emmanuel
dc9f1435e3 misc: combining --read-only and --fullscreen now disables F11 on built-in client 2025-04-08 10:48:46 +02:00
jean-emmanuel
98e5670011 root: hideMenu not working when --read-only is set 2025-04-08 10:32:34 +02:00
jean-emmanuel
c65d4ed648 package: beta3 2025-04-03 15:40:06 +02:00
jean-emmanuel
36c89648b8 win: fix drive listing 2025-04-03 15:39:33 +02:00
jean-emmanuel
afc7d677e5 win: attempt to use powershell to lst drives 2025-04-03 15:20:19 +02:00
jean-emmanuel
6fa3f9862e panel: expose useful event.firstTarget 2025-04-02 10:27:15 +02:00
jean-emmanuel
bdf3ad1958 misc: on win32 display full error when failing to list disks 2025-04-02 10:20:34 +02:00
jean-emmanuel
1595370be0 docs update 2025-03-26 13:23:27 +01:00
jean-emmanuel
b5e4add855 eq/plot/visualizer/text/led: unhide interaction property (defaults to false) to allow custom container touch handling 2025-03-25 09:09:22 +01:00
jean-emmanuel
c26c5aaed2 widget base class: deeper defaults extend to allow simpler overrides 2025-03-25 09:07:48 +01:00
jean-emmanuel
720799633b lint: indent fix 2025-03-23 12:18:12 +01:00
jean-emmanuel
5c662ed7ae fader: dynamic knobSize 2025-03-23 12:12:30 +01:00
jean-emmanuel
9f006ad42e canvas: consistent onTouch method with Panel 2025-03-23 01:18:23 +01:00
jean-emmanuel
58febaeb9f panel: avoid error in onTouch if event has no target 2025-03-23 01:15:54 +01:00
jean-emmanuel
636b58c39a package: bump beta 2025-03-22 15:05:26 +01:00
jean-emmanuel
bbfe558353 multixy: typo in npoints fix 2025-03-22 15:01:20 +01:00
jean-emmanuel
2408353194 docs: update 2025-03-21 18:54:11 +01:00
jean-emmanuel
e645a98a5e package: cut a beta release 2025-03-21 18:51:37 +01:00
jean-emmanuel
38d6dbbd3d log: latest changes 2025-03-21 15:41:05 +01:00
jean-emmanuel
69fbefdb73 drag: safe user custom inertia and docs 2025-03-21 15:38:58 +01:00
jean-emmanuel
0b3590278c drag: handle 2-fingers / ctrlKey inertia at widget level and allow changing event inertia in containers onTouch 2025-03-21 15:32:33 +01:00
jean-emmanuel
de39b2fbed inspector: hide ace mobile menu 2025-03-21 14:49:53 +01:00
jean-emmanuel
69a8d4b576 drag: let containers see all move events during traversing gestures 2025-03-21 14:46:17 +01:00
jean-emmanuel
a737020492 drag: change tranversering gesture reference container to let traversing containers onTouch see move events (unless captured by a nested traversing container) 2025-03-21 09:47:12 +01:00
jean-emmanuel
4d30880d0f /!\ events: groundwork for containers onTouch scripts:
Drag events are now reverse-bubbling (from parents to child) to allow containers to monitor/control interaction inside them
2025-03-21 09:23:44 +01:00
jean-emmanuel
e001d3be10 package: v1.28.4 2025-03-21 09:20:22 +01:00
jean-emmanuel
5b8047889b events: a few more errors to suppress 2025-03-20 12:11:36 +01:00
jean-emmanuel
be90e02935 multixy: better npoints safe check 2025-03-20 09:14:13 +01:00
jean-emmanuel
fae6614d4e multixy: set npoints to minimum 1 to avoid errors 2025-03-19 22:57:46 +01:00
jean-emmanuel
7d0d368a78 script: let console.log take multiple args and format objects correctly 2025-03-19 17:52:27 +01:00
jean-emmanuel
790d83433d misc: prevent sidepanels from catching events on 1px-wide zone at the left/right of the workspace 2025-03-19 17:50:19 +01:00
jean-emmanuel
aede97cf24 package: 1.28.3 all right 2025-03-19 13:47:09 +01:00
jean-emmanuel
8d76386604 log: update 2025-03-19 13:46:55 +01:00
jean-emmanuel
973654b2d7 multixy: fix touch state vs feedback filtering order (dragend event handler sorting) 2025-03-19 13:35:52 +01:00
jean-emmanuel
c0a331ece6 touchstate: misc cleanup 2025-03-19 13:35:36 +01:00
jean-emmanuel
8912854262 event/drag: prevent error when multi-touching single-touch widget 2025-03-19 13:34:40 +01:00
jean-emmanuel
6dfa97343d package: v1.28.2 2025-03-19 11:24:18 +01:00
jean-emmanuel
9e82075990 log: regression fix 2025-03-19 11:24:00 +01:00
jean-emmanuel
29bcc5fe66 Revert "multixy/range: simultaneous touch releases not working correctly when spring is set and feedback values are received shortly after being sent"
This reverts commit 911c318cc1.
2025-03-19 11:21:48 +01:00
jean-emmanuel
2802b3955a eq: use 1p1z lowpass 2025-03-19 10:13:10 +01:00
jean-emmanuel
662fcf1322 Revert "eq: pointsAttr not updating dynamically" (was already ok)
This reverts commit 0de59ae70e.
2025-03-19 10:00:04 +01:00
jean-emmanuel
0de59ae70e eq: pointsAttr not updating dynamically 2025-03-19 09:55:48 +01:00
jean-emmanuel
1cc3dac24c fader: take user scripts into account when filtering feedback while touched 2025-03-19 09:47:52 +01:00
jean-emmanuel
9343258464 package: v1.28.1 2025-03-19 09:47:32 +01:00
jean-emmanuel
cd4a8fc3a1 lint: semi colons 2025-03-19 09:47:22 +01:00
jean-emmanuel
b5db1fc276 log: missing fix 2025-03-19 09:47:12 +01:00
jean-emmanuel
8a5790f2f5 fader: fix touch state regression 2025-03-19 09:27:50 +01:00
jean-emmanuel
315f1de6c9 fader: apply touchZone to doubleTap & (partially) mousewheel 2025-03-19 09:15:26 +01:00
jean-emmanuel
be7d472414 eq: use 1p1z highpass 2025-03-19 09:05:49 +01:00
jean-emmanuel
926550bac7 docs: update 2025-03-18 16:52:52 +01:00
jean-emmanuel
b73f1b2057 package: next is 1.28.0 2025-03-18 16:52:34 +01:00
jean-emmanuel
7f943aa89c docs: noop 2025-03-18 08:40:18 +01:00
jean-emmanuel
5c631c0a6f console: px fix 2025-03-17 18:27:55 +01:00
jean-emmanuel
d4297dd4ab multixy: methodize handle hit test 2025-03-17 18:27:24 +01:00
jean-emmanuel
911c318cc1 multixy/range: simultaneous touch releases not working correctly when spring is set and feedback values are received shortly after being sent 2025-03-17 18:22:48 +01:00
jean-emmanuel
6310a6171e multixy: restore rm'ed draw call 2025-03-14 17:18:28 +01:00
jean-emmanuel
1002e5a011 ui: console msg line color 2025-03-14 04:33:22 +01:00
jean-emmanuel
58acf3e0a7 editor: change r shortcut to y 2025-03-14 04:27:54 +01:00
jean-emmanuel
2a9ce79ecf lint: quotes and spaces 2025-03-14 04:22:00 +01:00
jean-emmanuel
8e6a3a9f03 ui: console style tweaks 2025-03-14 04:20:09 +01:00
jean-emmanuel
57f169e365 inspector: prevent editing non-editable widgets (e.g matrix items) when clicking on their ids in error logs 2025-03-14 03:53:21 +01:00
jean-emmanuel
a4f7439c5d tree: show sidepanel when focusing search input 2025-03-14 03:32:34 +01:00
jean-emmanuel
df3962ff60 editor: prevent misc error 2025-03-14 03:26:01 +01:00
jean-emmanuel
343a18541c tree: add "r" shortcut for "show widget in session" 2025-03-14 03:22:48 +01:00
jean-emmanuel
03eaab432a client console: rm poor heuristic error message detection 2025-03-14 03:09:06 +01:00
jean-emmanuel
f8e4a3eb1e misc: remaining useless line 2025-03-14 03:08:36 +01:00
jean-emmanuel
00b2dbed4d log: recent changes 2025-03-14 03:08:04 +01:00
jean-emmanuel
89b8daa35a editor: proper tab navigation in inspector + keyboard category fold/unfold with enter/space when focused
editor: add mod + f to focus tree search
code editor: fix nasty bug when focusing field using tab key
editor: f2 focuses "html" property when "label" is not present
2025-03-14 03:00:46 +01:00
jean-emmanuel
1c984a57e0 editor: disable f2 shortcut if selected widget has no label property 2025-03-13 20:13:33 +01:00
jean-emmanuel
8655a2866c advanced syntax/script: print widget id in console.log messages 2025-03-13 11:51:49 +01:00
jean-emmanuel
e84c1d0435 vm: move widget-aware context logic to base vm 2025-03-13 11:49:11 +01:00
jean-emmanuel
fba35f1b84 pads: support percents in `pointSize 2025-03-13 08:04:33 +01:00
jean-emmanuel
8c5eea6bd0 panel: tabsPosition can now be hidden 2025-03-13 07:47:56 +01:00
jean-emmanuel
71fc6c3253 lint: unused var 2025-03-12 18:47:51 +01:00
jean-emmanuel
431b762331 xy: restore optimized clear 2025-03-12 16:50:07 +01:00
jean-emmanuel
848f591930 pads: per-point customization on the way 2025-03-12 15:44:03 +01:00
jean-emmanuel
542c0629fb log: typos 2025-03-12 10:25:33 +01:00
jean-emmanuel
79e0eee721 sliders/pads: doubleTap can now be "script", in which case onTouch will be called with event.type set to doubleTap 2025-03-12 10:13:49 +01:00
jean-emmanuel
c829d87eae eq/plot: smoother curves 2025-03-11 08:16:04 +01:00
jean-emmanuel
f9902e01e0 ui: another non-working key, keyCode was not so bad 2025-03-10 21:40:03 +01:00
jean-emmanuel
395d4786c4 file: extension can now be an array of strings 2025-03-10 19:55:07 +01:00
jean-emmanuel
f31cc2091c button: locals.touchCoords not updated upon release and incorrect when doubleTap is set 2025-03-10 19:34:26 +01:00
jean-emmanuel
1a564f8458 xy/multixy: change axisLock choices order 2025-03-10 09:05:01 +01:00
jean-emmanuel
0f60d212fa xy/multixy: add auto choice to to axisLock (locks on the first moved axis) 2025-03-10 09:00:45 +01:00
jean-emmanuel
a8a49d4e4e eq: fix indent & add poles to db examples 2025-03-09 13:32:03 +01:00
jean-emmanuel
52012d1ed3 eq: add support for n-poles lowpass and highpass filters with the filter's poles property
eq: adapt sampling frequency to the x-axis range
2025-03-09 13:28:37 +01:00
jean-emmanuel
36bf7197c7 eq: hide logScale props 2025-03-08 13:21:17 +01:00
jean-emmanuel
3766767cb1 canvas: never draw if size is 0 2025-03-08 13:20:51 +01:00
jean-emmanuel
0e703d95e3 server: missing coma 2025-03-07 10:51:51 +01:00
jean-emmanuel
ecda3a05cf docs: update ref 2025-03-07 10:47:17 +01:00
jean-emmanuel
1138933aa9 server: fix ELECTRON_RUN_AS_NODE 2025-03-07 10:46:46 +01:00
jean-emmanuel
e65e928f88 server: fix debug log for outgoing rgba messages 2025-02-28 13:58:27 +01:00
jean-emmanuel
da3b7ff2d2 fader: implement touchZone for compact design 2025-02-28 12:48:58 +01:00
jean-emmanuel
9e4d1419e3 fader: touchZone tweaks 2025-02-27 16:27:25 +01:00
jean-emmanuel
70fe736314 fader: touchZone wrong value name 2025-02-27 15:51:04 +01:00
jean-emmanuel
7c2a85f7d8 fader: add touchZone property 2025-02-27 15:44:01 +01:00
jean-emmanuel
9e97e06834 drag events: allow widgets to cancel dragging and let touch scrolling happen 2025-02-27 15:42:22 +01:00
jean-emmanuel
60655dc896 ui: keep some keycodes around for zoom kb ctrls 2025-02-23 18:47:43 +01:00
jean-emmanuel
1286acc2a3 ui: zoom tweaks (limit zoom wheel rate, bypass native browser zoom on ctrl + / - / 0) 2025-02-23 18:40:23 +01:00
jean-emmanuel
b9edeca691 matrix: tabsPosition should be hidden 2025-02-22 23:53:24 +01:00
jean-emmanuel
dd8da47085 script widget: sometimes e.preventDefault is not defined 2025-02-22 10:05:10 +01:00
jean-emmanuel
c554a23c99 ui: use event.key instead of event.keyCode for various keybindings 2025-02-22 10:04:28 +01:00
jean-emmanuel
107ca1d295 package: next is 1.27.5 2025-02-16 17:32:38 +01:00
jean-emmanuel
389badb113 modal/menu: position issues in scrolled containers 2025-02-16 17:32:16 +01:00
jean-emmanuel
a48e0c173f modal: hide unused property 2025-02-16 17:31:57 +01:00
jean-emmanuel
70e242f3ca log: correct fix msg 2025-02-16 15:15:02 +01:00
jean-emmanuel
2a509adfa8 widget: fix css regression 2025-02-16 15:13:57 +01:00
jean-emmanuel
0ab928efc2 pachbay: fix layout 2025-02-13 19:12:42 +01:00
jean-emmanuel
ed23fb4e0f package: rm erroneously included m1 package 2025-02-13 19:08:28 +01:00
jean-emmanuel
8fa4263016 package: v1.27.4 2025-02-12 09:19:17 +01:00
jean-emmanuel
2dce5c4338 widget: remove style node when it's not needed 2025-02-12 09:14:42 +01:00
jean-emmanuel
b81acd87fa package: next is just a patch release actually 2025-02-11 18:42:41 +01:00
jean-emmanuel
432919befa package: postpone electron update 2025-02-11 18:40:57 +01:00
jean-emmanuel
2d19a60854 script: fix setFocus for textarea 2025-02-11 18:39:26 +01:00
jean-emmanuel
e8774c2607 Revert "package: start electron upgrade"
This reverts commit c844f778e3.
2025-02-11 18:39:08 +01:00
jean-emmanuel
9ddd4a9970 Revert "midi: update rtmidi"
This reverts commit f7422f5614.
2025-02-09 22:19:44 +01:00
jean-emmanuel
cbeeef1d67 packaging: new api key 2025-02-08 17:26:44 +01:00
jean-emmanuel
f7422f5614 midi: update rtmidi 2025-02-08 13:45:51 +01:00
jean-emmanuel
f4264c56f2 package: next will be 1.28.0 2025-02-08 12:39:40 +01:00
jean-emmanuel
a001c75570 package: prepare apple m1 packaging 2025-02-08 12:38:41 +01:00
jean-emmanuel
af9c4c5fb0 launcher: fix electron-remote for recent electron 2025-02-08 12:36:06 +01:00
jean-emmanuel
c844f778e3 package: start electron upgrade 2025-02-08 12:35:47 +01:00
jean-emmanuel
16da4bbada fader: draw pips during batched draw call (fixes a glitch and an error) 2025-02-08 10:57:33 +01:00
jean-emmanuel
24629f302d docs: iframe vs cross-origin policy 2025-01-29 16:32:10 +01:00
jean-emmanuel
1ec0d7822d package: v1.27.3 2025-01-22 15:40:53 +01:00
jean-emmanuel
b3b08c3af5 widget: amend 1bfc558f83 & 857e0408be to only affect clones and fix circular loop regression 2025-01-22 15:38:36 +01:00
jean-emmanuel
67bb888a45 log: fix indent 2025-01-21 18:04:04 +01:00
jean-emmanuel
5c65d4d594 fader: glitch with large lineWidth values in default design mode 2025-01-21 18:04:01 +01:00
jean-emmanuel
85c393d184 package: good travis 2025-01-13 13:40:42 +01:00
jean-emmanuel
ac2ff2cc8b package: good to go ? 2025-01-13 13:31:11 +01:00
jean-emmanuel
f9fcb20d91 package: going on fixing 2025-01-13 13:21:06 +01:00
jean-emmanuel
1d16bf7c67 package: fixing deploy 2 2025-01-13 13:06:26 +01:00
jean-emmanuel
b1a7282dc9 package: fixing deploy 2025-01-13 12:56:53 +01:00
jean-emmanuel
030446accd docs: missing fences 2025-01-13 10:53:25 +01:00
jean-emmanuel
697481e43a docs: update custom module example 2025-01-13 10:52:05 +01:00
jean-emmanuel
ebb6478021 package: v1.27.2 & update docs 2025-01-13 10:33:08 +01:00
jean-emmanuel
bdd83657c8 custom module: receive() and send() now accept host and port to be provided as a single string argument joined by a colon 2025-01-11 16:41:07 +01:00
jean-emmanuel
857e0408be editor: rewrite 1bfc558f83 2025-01-11 14:48:17 +01:00
jean-emmanuel
1bfc558f83 editor: force property update to prevent advanced syntax change from being unnoticed by clone widgets
For instance, a VAR{} may be renamed without its return value to change immediately
2025-01-11 14:32:18 +01:00
jean-emmanuel
6ed34736f7 Revert "canvas: further investigation"
This reverts commit 845a93a052.
2024-12-30 21:38:59 +01:00
jean-emmanuel
845a93a052 canvas: further investigation 2024-12-29 19:03:08 +01:00
jean-emmanuel
06e14a57c2 canvas: css: provide a way to bypass resize and css vars checks 2024-12-28 17:00:23 +01:00
jean-emmanuel
4ea2e0b50a widget: remove potential perf-hurting try/catch that is useless now (element.style is readonly) 2024-12-28 14:40:05 +01:00
jean-emmanuel
9d21bdc2b5 clone: fix target prop update check 2024-12-28 14:24:39 +01:00
jean-emmanuel
da4252c6da clone: avoid some unnecessary property checks 2024-12-28 12:10:27 +01:00
jean-emmanuel
e56340fd11 misc: expand prop default value is a boolean 2024-12-28 12:08:35 +01:00
jean-emmanuel
51f2e64968 scrpiting: httpGet: provide error code 2024-12-02 08:34:59 +01:00
jean-emmanuel
20d29f8111 multixy: fix default props when points are named 2024-11-14 13:32:22 +01:00
jean-emmanuel
32803f3f31 lint: quotes 2024-11-12 13:26:43 +01:00
jean-emmanuel
d00987402e matrix: don't implicitely override children's label, do it explicitely in props' default 2024-11-12 13:22:04 +01:00
jean-emmanuel
6eb8b73c77 canvas: attempt to mitigate memory issue on ios (bis) 2024-11-05 16:04:16 +01:00
jean-emmanuel
f3b2b8900c canvas: attempt to mitigate memory issue on ios 2024-11-05 15:31:28 +01:00
jean-emmanuel
e6882ee90a misc: fix build 2024-11-05 15:31:15 +01:00
jean-emmanuel
89c6967961 client: show partially accessible menu in readonly mode; disable console in readonly mode 2024-11-02 11:01:12 +01:00
jean-emmanuel
e239b35a7e package: v1.27.1 2024-10-17 10:37:21 +02:00
jean-emmanuel
df8e4bbcbf file browser: fallback to home directory when last visited directory is not accessible 2024-10-17 10:34:27 +02:00
jean-emmanuel
6f26e53f82 mobile: unnecessary try/catch in theme update routine 2024-10-05 22:40:39 +02:00
jean-emmanuel
2344fc0a81 mobile: wrong fastdom usage in theme color update routine 2024-10-05 22:39:40 +02:00
jean-emmanuel
c945b8decf mobile: fix build for real 2024-10-05 17:50:58 +02:00
jean-emmanuel
8fb4662bd1 mobile: fix build (broken in f891442e28) 2024-10-05 17:30:01 +02:00
jean-emmanuel
f891442e28 mobile: apply root's (or themes) background color the the browser's topbar when possible 2024-10-04 15:46:11 +02:00
jean-emmanuel
4451cffd36 editor: missing position dot in color picker pad (since f93056d21e) 2024-10-04 15:02:25 +02:00
jean-emmanuel
b194519071 patchbay: fix ìgnoreDefaults 2024-09-05 19:38:07 +02:00
jean-emmanuel
98ed962976 doc: patchbay scripting 2024-09-05 19:29:09 +02:00
jean-emmanuel
5d3f770e3b patchbay: address not working properly when set to auto 2024-09-05 19:22:42 +02:00
jean-emmanuel
04b7994e9a led, text: fix client sync 2024-08-29 10:43:17 +02:00
jean-emmanuel
f2b2dbe9f6 server: fix read-only + fullscreen option combo 2024-08-10 10:07:56 +02:00
jean-emmanuel
8878c9283b noop: typo 2024-08-09 12:48:34 +02:00
jean-emmanuel
0bc7848b06 log: fix formatting 2024-07-26 12:45:31 +02:00
jean-emmanuel
adb27b35fb docs: udpate ref 2024-07-26 12:41:43 +02:00
jean-emmanuel
359d467f4d docs: fix build 2024-07-26 12:41:27 +02:00
jean-emmanuel
abf943da5f ui: allow disabling notifications globally 2024-07-26 12:30:58 +02:00
jean-emmanuel
30ee07c52b clean 2024-07-26 12:17:09 +02:00
jean-emmanuel
1510ebb80d ui: allow dismissing notifications with a click 2024-07-26 12:14:36 +02:00
jean-emmanuel
31700de021 package: next is 1.27 2024-07-25 09:20:06 +02:00
jean-emmanuel
3547da8bdf client: file browser now remembers the last displayed directory 2024-07-24 11:59:54 +02:00
jean-emmanuel
8a34f9c81c clean 2024-07-24 11:57:51 +02:00
jean-emmanuel
026230d8e1 custom module: add stop() callback (runs when the server stops 2024-07-15 11:03:07 +02:00
jean-emmanuel
c56a5bfbeb log: latest changes 2024-06-22 12:11:13 +02:00
jean-emmanuel
c06107a07f remote control: ignore unsaved changes on /SESSION/CREATE 2024-06-22 12:08:22 +02:00
jean-emmanuel
ed6489a794 Merge branch 'master' of github.com:jean-emmanuel/open-stage-control 2024-06-22 12:04:58 +02:00
jean-emmanuel
92d71019c6
Merge pull request #852 from matthijskooijman/create-session-osc-command
remote control: Add `/SESSION/CREATE` command
2024-06-22 12:04:53 +02:00
jean-emmanuel
118c064e86 custom module: error message formatting 2024-06-22 12:03:47 +02:00
jean-emmanuel
a21e789437
Merge pull request #851 from matthijskooijman/custom-module-reload-function
custom-module: Call reload() function on auto-reload
2024-06-22 12:00:52 +02:00
jean-emmanuel
f93056d21e pads: expose/clean --point-size css var, make pointSize property dynamic 2024-06-20 14:30:08 +02:00
jean-emmanuel
da6c5d02c7 clean 2024-06-20 13:38:04 +02:00
jean-emmanuel
dad35b6166 package lock update 2024-06-20 13:37:38 +02:00
jean-emmanuel
0e3119226b theme: fix issues with autoreload (correctly detect when stylesheet is reloaded) 2024-06-19 14:03:29 +02:00
jean-emmanuel
0e1ef27eb5 server/launcher: app address / qr code not updating when network changes 2024-06-19 12:53:44 +02:00
jean-emmanuel
33d0b54dad osc/custom module: more error backtraces 2024-06-19 12:51:24 +02:00
Matthijs Kooijman
c02146c9b1 remote control: Add /SESSION/CREATE command
This allows creating a new empty session. This is useful for projects
that want to dynamically create the entire session using a custom module.

Without this, you can also create an empty session json file and load
that with `--load`, but then you would have to manage that file, and if
you accidentaly press control-s, it gets overwritten to contain any
dynamically created widgets.

With this commit, such a custom module can just create a new session on
startup and then populate it. This takes a bit of fiddling to get the
order of events correct, this commit also adds an example showing how to
do this.
2024-06-18 09:41:10 +02:00
Matthijs Kooijman
c5314fe17a custom-module: Call reload() function on auto-reload
This allows modules to re-initialize any state they need whenever the
module is reloaded.

Without this, any such initialization can also be done in the top
level of the custom module, but this has two problems:

 1. Top-level module code runs on load and reload, and for the initial
    load, it runs *before* the connections are set up, so trying to use
    send() would produce an error on load (not reload).

 2. Top-level module code runs for the primary custom module, but also
    for any nested modules, removing control about the process and
    ordering from the primary custom module. In addition, a module that
    can be used both as primary and nested module, there is no clean way
    to distinguish between these cases.

Both of these problems can be solved by doing some bookkeeping in the
global object, but that produces messy code.

This commit allows modules to define a reload() function, which is
called (for the primary module only) after the module is reloaded. This
means that any initialization for the first load can be done in init()
and for reloads in reload(), and in both cases all connections will
already have been set up solving issue 1. In addition, neither of these
functions are called for nested modules, solving issue 2 (and the
primary module can then stil explicitly call a reload function on nested
modules if needed, as shown in the examples).
2024-06-18 09:37:01 +02:00
Matthijs Kooijman
a3194a3bb8 custom-module: Fix example for unload with nested modules
The unload method is actually called on all modules, not just the main
one, so it makes no sense to have the module merger example call it
explicitly on its submodules.
2024-06-18 09:32:35 +02:00
jean-emmanuel
71182cfd2e
Merge pull request #850 from matthijskooijman/udp-backtraces
server: Print backtraces for errors in UDP handler
2024-06-17 09:17:14 +02:00
Matthijs Kooijman
dfeb30a57d server: Print backtraces for errors in UDP handler
This applies to errors in e.g. the oscInFilter defined by a custom
plugin module. Previously, just the exception backtrace was shown,
without any indication of the exception type or where the error
occurred, e.g.:

    (ERROR, UDP) links is not defined

With this commit, the full exception including backtrace is printed,
making debugging a lot easier, e.g.:

    (ERROR, UDP) ReferenceError: links is not defined
	at CustomModule.oscInFilter (/app/custom-module.js:221:83)
	at OscServer.oscInFilter (/open-stage-control/app/server/src/server/osc/index.js:148:1)
	at OscServer.oscInHandler (/open-stage-control/app/server/src/server/osc/index.js:162:1)
	at OscServer.oscInHandlerWrapper (/open-stage-control/app/server/src/server/osc/index.js:174:1)
	at osc.UDPPort.emit (node:events:394:28)
	at Object.osc.firePacketEvents (/open-stage-control/app/server/node_modules/osc/src/osc-transports.js:25:1)
	at osc.UDPPort.p.decodeOSC (/open-stage-control/app/server/node_modules/osc/src/osc-transports.js:85:1)
2024-06-16 22:57:23 +02:00
jean-emmanuel
a8f9c263a2 package: update package.lock 2024-04-12 18:30:34 +02:00
jean-emmanuel
a4f27e32d4 package: fix building with node <= 20 2024-04-12 18:30:06 +02:00
jean-emmanuel
ac995b2dd1 lint 2024-04-03 10:01:05 +02:00
jean-emmanuel
a71df8177f advanced syntaxes: display an error in the console in some unsupported advanced syntaxes use cases 2024-04-03 09:50:28 +02:00
jean-emmanuel
b31b911a15 package: next is 1.26.2 2024-04-03 08:48:25 +02:00
jean-emmanuel
20d5091622 server: fix cookie parsing (user resources not loading when using an external browser) 2024-04-03 08:47:19 +02:00
jean-emmanuel
ededaee55b misc: lint 2024-03-13 18:17:41 +01:00
jean-emmanuel
0e68557b85 advanced syntaxes: restore stupid-simple resolution order, deduping value changes brings more problem than it solves
history: fe682693b1, 0e54c11f13, 182941a22c, 3a5fdf17c7, 8b92400c1e
2024-03-13 18:04:43 +01:00
jean-emmanuel
1a4b971b18 mac: unable to show launcher windows when starting minimized 2024-02-22 09:29:35 +01:00
jean-emmanuel
b63402fce8 docs: update widget ref 2024-02-21 11:06:09 +01:00
jean-emmanuel
fb09616030 package: v1.26 2024-02-21 11:05:30 +01:00
jean-emmanuel
0ecc104f4b lint 2024-02-21 11:02:49 +01:00
jean-emmanuel
e87891cb7c switch: allow resubmitting the same value 2024-02-21 11:01:50 +01:00
jean-emmanuel
3ed11f3894 custom-module: expose tcpServer 2024-02-21 10:52:40 +01:00
jean-emmanuel
fbfa41bd5a launcher: allow dropping files into file fields 2024-02-21 10:31:24 +01:00
jean-emmanuel
f78814ba45 launcher: start hidden on mac is "start minimized" is set 2024-02-21 10:10:55 +01:00
jean-emmanuel
d387397c14 modal: ios 15+ layering issue 2024-02-18 17:03:34 +01:00
jean-emmanuel
dfcf158808 range: colorKnob 2024-02-18 15:35:17 +01:00
jean-emmanuel
476f07ec60 sliders: knob color property ok 2024-02-18 15:29:38 +01:00
jean-emmanuel
ebd14015de docs: client sync dets 2024-02-15 08:34:31 +01:00
jean-emmanuel
f63bb0f24d fader: add colorKnob property 2024-02-14 20:06:28 +01:00
jean-emmanuel
11fc7d2b56 multixy: add axisLock; bypass axisLock with Shift 2024-02-14 19:53:01 +01:00
jean-emmanuel
0f2cb1b0af xy: add axisLock property; allow locking one the axis by holding Shift while dragging 2024-02-14 19:35:17 +01:00
jean-emmanuel
48c78a1d12 plot: missing logScaleX and logScaleY properties 2024-02-14 14:23:55 +01:00
jean-emmanuel
b555169cef dropdown: allow resubmitting the same value 2024-02-14 14:19:37 +01:00
jean-emmanuel
5f4c2c60be ipc: prevent stuck disconnected notif 2024-02-13 21:31:46 +01:00
jean-emmanuel
5184498b9a package: version bump 2024-02-13 21:31:19 +01:00
jean-emmanuel
8b92400c1e widgets: solve multi-value-dependency pattern resolution using a single queue instead of timeouts 2024-02-13 17:38:45 +01:00
jean-emmanuel
e2215b865a docs: python-rtmidi manual install update 2024-02-13 14:31:33 +01:00
jean-emmanuel
87ad29fa23 scripting: getProp() now correctly returns a copy of the property if it is an object 2024-02-13 14:24:26 +01:00
jean-emmanuel
690add4b38 server: fix config file read/write initial check 2024-02-04 09:57:22 +01:00
jean-emmanuel
bf8d9799cc modal: remove debug log 2024-01-22 18:50:59 +01:00
jean-emmanuel
8c77ab7ca6 docs: update ref 2024-01-17 16:43:22 +01:00
jean-emmanuel
bc4e1952e9 package: next is 1.25.7 2024-01-17 16:41:10 +01:00
jean-emmanuel
86e819870c root: add onPreload scripting property 2024-01-17 16:31:27 +01:00
jean-emmanuel
a04c658bb5 input: allow using a number in numeric to specify stepping value for mousewheel interaction 2024-01-17 16:16:09 +01:00
jean-emmanuel
9181c2a3aa remote control: /EDIT* commands sent by a custom module are not affected by the server's read-only option anymore 2024-01-17 16:05:03 +01:00
jean-emmanuel
3a5fdf17c7 widgets: prevent value update event from interfering with a container creating its children 2024-01-17 15:40:57 +01:00
jean-emmanuel
0d66f2b8a8 docs: add tutorial, rm cpu warning for /EDIT (mostly irrelevant today) 2023-11-30 13:21:20 +01:00
jean-emmanuel
4ef3595125 server: print config file read error 2023-11-23 09:42:32 +01:00
jean-emmanuel
e4db027085 sliders: steps error (#835) 2023-11-23 09:38:15 +01:00
jean-emmanuel
a6237a0aac scripting: stateSet: add optional {send: false} flag 2023-11-22 10:15:40 +01:00
jean-emmanuel
2c97ac662c docs: small fix 2023-10-14 11:51:31 +02:00
jean-emmanuel
91507ff3a9 misc: rm old files 2023-09-25 11:30:34 +02:00
jean-emmanuel
e4b45b1a6b sliders: round steps to avoid errors 2023-09-14 08:07:09 +02:00
jean-emmanuel
4d7ef455ce log: phrasing 2023-09-13 21:58:35 +02:00
jean-emmanuel
58540eda0c modal: fix closing when doubleTap is true 2023-09-13 21:54:30 +02:00
jean-emmanuel
07b921d157 button: issue with value init (see previous commit) 2023-09-13 20:25:51 +02:00
jean-emmanuel
cac9fb7abc widget: when possible, init value as soon as possible to avoid undefined when an array is expected. 2023-09-13 08:10:28 +02:00
jean-emmanuel
98a27de0df sliders: prevent error when steps is not a number, add auto mode for using ranges values as steps (it did not work before) 2023-09-11 09:22:11 +02:00
jean-emmanuel
1fd8523885 misc: update package-lock 2023-09-08 18:15:26 +02:00
jean-emmanuel
1e0dc41abc package: next is 1.25.5 2023-09-08 18:15:13 +02:00
jean-emmanuel
7d751c6982 dev: fix hot reload 2023-09-08 18:14:34 +02:00
jean-emmanuel
3e74271e12 code editor: update ace (use upstream), update syntax (es7), do some cleanup, prevent middle clicking (causes issues on linux) 2023-09-08 18:08:54 +02:00
jean-emmanuel
3b1f075fb3 package: 1.25.4 2023-09-06 23:46:50 +02:00
jean-emmanuel
04e4e95c04 ipc: fix --authentication on iOS clients (don't rely on headers to pass credentials)
misc: remove "new Buffer()" deprecation warning
2023-09-06 23:44:21 +02:00
jean-emmanuel
6b96d208c9 editor: display current widget value in the value property's help modal 2023-08-30 13:20:56 +02:00
jean-emmanuel
90b34d7475 custom module: receive() not passing boolean arguments properly 2023-08-30 13:13:29 +02:00
jean-emmanuel
f2f1949053 docs: update 2023-08-22 00:37:12 +02:00
jean-emmanuel
6122b7cabd package: 1.25.3 2023-08-22 00:35:19 +02:00
jean-emmanuel
95097d549e button: hand push+decoupled scripting issue in script-vm directly 2023-08-22 00:12:31 +02:00
jean-emmanuel
6498e0c6f6 button: inconsistent value in push mode with decoupled enabled when setting value from script 2023-08-21 23:44:18 +02:00
jean-emmanuel
c766370db7 scripting: using external: true in set() should prevent affected widget from sending any message 2023-08-21 23:33:22 +02:00
jean-emmanuel
cb009e64e0 docs: remove old button mode description 2023-08-21 23:23:22 +02:00
jean-emmanuel
aa1ee85f62 scripting: scripting functions not working inside browseFile() callback 2023-08-19 07:38:06 +02:00
jean-emmanuel
28d06cc14a docs: typo in syntax example 2023-08-16 10:36:23 +02:00
jean-emmanuel
bd2a4f3bed panel: minor style issue in tab navigation bar 2023-07-24 14:33:04 +02:00
jean-emmanuel
bce4c10acf panel: tab rendering issue when initialized with a non-numeric value 2023-07-16 17:47:15 +02:00
jean-emmanuel
19a4a62a3e docs: minor change 2023-07-05 17:29:49 +02:00
jean-emmanuel
8c0dfb7c4f misc: lint 2023-07-03 16:52:02 +02:00
jean-emmanuel
2ecb510cb1 input: rendering issues with big font sizes 2023-07-03 16:40:59 +02:00
jean-emmanuel
ff5800a814 package: 1.25.2 2023-07-03 12:35:37 +02:00
jean-emmanuel
413c04f244 log: missing changes 2023-07-03 12:34:52 +02:00
jean-emmanuel
86f80b0265 led, text, variable: value not synchronized between different clients 2023-07-03 12:31:41 +02:00
jean-emmanuel
d00b22d35e scripting: setFocus(id) not affecting textarea widgets 2023-07-03 12:30:12 +02:00
jean-emmanuel
f206369ef0 textarea: escape key not restoring previous value 2023-07-03 12:29:28 +02:00
jean-emmanuel
afeb726ddb cli: electron might take a capital E, take it into account when parsing args 2023-07-02 16:09:12 +02:00
jean-emmanuel
60b66c80fd package: 1.25.1 2023-06-05 17:50:08 +02:00
jean-emmanuel
ee98a20068 textarea: display nothing instead of "null" when receing no value, null or an empty string 2023-06-05 17:49:07 +02:00
jean-emmanuel
bb222a11ae log: latest changes 2023-06-05 17:44:17 +02:00
jean-emmanuel
182941a22c widgets: regression in inter-widget sync mechanism 2023-06-03 06:53:38 +02:00
jean-emmanuel
15c38fa78e scripting: don't attempt to deep copy widget object 2023-06-03 06:52:16 +02:00
jean-emmanuel
617cc915bf docs: update 2023-05-13 14:39:05 +02:00
jean-emmanuel
06b1a2243a package: 1.25.0 2023-05-13 14:38:59 +02:00
jean-emmanuel
a11e296921 panel: mitigate client synchronization issue with panel scrollbars 2023-05-13 13:49:17 +02:00
jean-emmanuel
eda9881d22 log: missing colon 2023-05-13 12:22:18 +02:00
jean-emmanuel
d0d73e4d44 remote control: /STATE/SET add optional argument to prevent widgets from sending their value 2023-05-13 12:21:44 +02:00
jean-emmanuel
fe9df9c2d9 menu: merge different interaction modes into a single mode property
menu: add `swipe` mode
2023-05-13 12:14:05 +02:00
jean-emmanuel
3af1d4ad1c menu: add item background 2023-05-13 11:43:45 +02:00
jean-emmanuel
5b981996fd client: keyboard shortcut issues 2023-05-13 11:19:56 +02:00
jean-emmanuel
59689d8f16 advanced syntax: update issue with clones using their own value in their properties 2023-05-13 11:07:13 +02:00
jean-emmanuel
5126125dba doubletap: missing offsetX & offsetY on touch devices 2023-05-09 16:18:05 +02:00
jean-emmanuel
94d791e4cf package: 1.24.2 2023-04-26 19:23:43 +02:00
jean-emmanuel
1797dfb692 misc: client shim update 2023-04-26 19:23:25 +02:00
jean-emmanuel
078fa94408 misc: lint 2023-04-26 15:09:45 +02:00
jean-emmanuel
908a543d8b event: only enable dom observer while touched 2023-04-26 10:55:56 +02:00
jean-emmanuel
dfabf25223 events: misc guard 2023-04-22 19:26:40 +02:00
jean-emmanuel
fae6448a5b touch devices: touchend event not fired on elements removed/detached during touchstart/touchmove callbacks (caused issues when switching tabs using a button inside a tab) 2023-04-22 19:22:08 +02:00
jean-emmanuel
e7dfa453e4 editor: regression breaking widget context menu actions under "Position" submenu 2023-04-22 17:10:38 +02:00
jean-emmanuel
640e30f766 package: 1.24.1 2023-04-17 00:06:32 +02:00
jean-emmanuel
6954727196 server: --client-size and --client-position options not parsed correctly 2023-04-15 13:23:12 +02:00
jean-emmanuel
808b8b3176 docs: new langs 2023-04-15 10:42:52 +02:00
jean-emmanuel
0e54c11f13 widgets: regression incurring a small delay before resolving a property that depends on a widget's own value (see fe682693b1) 2023-04-14 19:40:32 +02:00
jean-emmanuel
22927983b8 advanced syntaxes: support @{} inside IMPORT{} 2023-04-14 07:24:31 +02:00
jean-emmanuel
968af3994b launcher: fix ctrl+m 2023-04-10 15:45:30 +02:00
jean-emmanuel
7f07109bd3 packaging: move deb file before making rpm 2023-04-06 01:28:56 +02:00
jean-emmanuel
2b84e5dd9e docs: fix pretty download names 2023-04-06 01:25:07 +02:00
jean-emmanuel
5251bcd152 log: typo 2023-04-06 01:03:46 +02:00
jean-emmanuel
5f39ae3e9e docs: update refs 2023-04-06 01:00:57 +02:00
jean-emmanuel
645bba0402 docs: fix opening url with anchors to widget properties 2023-04-06 01:00:23 +02:00
jean-emmanuel
68fa054610 package: 1.24.0 2023-04-06 00:36:05 +02:00
jean-emmanuel
a93d27f08e server: print multiple qrcodes if multiple network interfaces are available and prevent printing a qrcode for the localhost address 2023-04-06 00:35:11 +02:00
jean-emmanuel
afcd9787db panel: replace verticalTabs property with tabsPosition (supports 4 directions) 2023-04-06 00:16:49 +02:00
jean-emmanuel
13ce9ebe0d lint: spaces and quotes 2023-04-05 23:56:39 +02:00
jean-emmanuel
0fae72664d mobile: fix noSleep usage and use wakeLock api when available 2023-04-05 23:52:26 +02:00
jean-emmanuel
c0face2e2f patchbay: add in/out/both modes to exclusive property 2023-04-05 23:24:35 +02:00
jean-emmanuel
b480889b70 custom module: add optional errorCallback argument toloadJSON and saveJSON 2023-04-05 22:57:50 +02:00
jean-emmanuel
3d36f3e4d7 editor: ctrl + e not working when hitm multiple times without releasing ctrl 2023-04-05 19:52:42 +02:00
jean-emmanuel
4b4c9f0c5b log: rpm packages 2023-04-05 18:57:22 +02:00
jean-emmanuel
92c1b7ce00 Merge branch 'master' of github.com:jean-emmanuel/open-stage-control 2023-04-05 18:56:44 +02:00
jean-emmanuel
fe682693b1 widgets: circular value feedback issues 2023-04-05 18:56:12 +02:00
jean-emmanuel
380d179ecb
Merge pull request #816 from stefanboca/master
Build rpm packages
2023-03-29 06:56:09 +02:00
Stefan Boca
7d7ec962b9 package: build rpm packages 2023-03-26 09:29:31 -07:00
jean-emmanuel
42088de140 traavis: messing around 2023-03-15 18:10:54 +01:00
jean-emmanuel
cc953f6434 travis: missing mkdocs apparently 2023-03-15 10:25:53 +01:00
jean-emmanuel
9497259322 lint: bad space 2023-03-15 10:20:00 +01:00
jean-emmanuel
bb42439caf docs: update widget ref 2023-03-15 08:42:54 +01:00
jean-emmanuel
abd51a323a package: bump version 2023-03-15 08:42:31 +01:00
jean-emmanuel
9b2fa156ac midi: bump version 2023-03-15 08:42:05 +01:00
jean-emmanuel
8861c3d3a9 docs: midi rpn nrpn 2023-03-15 08:41:30 +01:00
jean-emmanuel
ba07e014ac canvas: onDraw() called twice when calling updateCanvas() 2023-03-11 23:04:23 +01:00
jean-emmanuel
3a9882313c keyboard: incoming values different than the off property are now interpreted as on 2023-03-10 11:18:09 +01:00
jean-emmanuel
8546ce6dee editor: display the id of selected widget in the inspector's header 2023-03-10 10:59:05 +01:00
jean-emmanuel
b337432651 ui: rm extra border on buttons in code editor header 2023-03-10 10:35:48 +01:00
jean-emmanuel
79c67a2bbb editor: preserve scroll position in code editor when validating 2023-03-10 10:33:18 +01:00
jean-emmanuel
e36e4cfdc8 typo 2023-03-10 10:17:36 +01:00
jean-emmanuel
dd58f1849f editor: when focusing the label property with F2, select all text in the text area 2023-03-10 10:11:59 +01:00
jean-emmanuel
23ca4ac9a7 misc: add css classes to some notification popups to allow targetting them with css themes 2023-03-10 10:09:06 +01:00
jean-emmanuel
ccf3613424 state: don't attempt to apply state on value-less widgets 2023-03-05 01:28:36 +01:00
jean-emmanuel
81b6ca0557 custom module:don't restrict file extension in loadJSON() and saveJSON functions 2023-03-05 01:27:12 +01:00
jean-emmanuel
f5b615566a docs: id footnote 2023-02-23 10:39:17 +01:00
jean-emmanuel
28bc7d87b5 docs: relative link 2023-02-20 17:47:25 +01:00
jean-emmanuel
2b207e5762 fader: gradient breakpoints not positioned correctly 2023-02-20 17:35:17 +01:00
jean-emmanuel
bcb8f45505 docs: user-contrib tutorial 2023-02-07 13:10:28 +01:00
jean-emmanuel
e95cad07dd docs: v0 is too old 2023-02-07 12:47:36 +01:00
jean-emmanuel
0ea2c49860 scripting: expose file browser (from the file widget) as a scripting function 2023-02-02 10:56:04 +01:00
jean-emmanuel
ce73b5d374 midi: missing file 2023-01-31 17:50:57 +01:00
jean-emmanuel
885886d0c9 midi: optional nrpn/rpn packing/unpacking 2023-01-31 16:10:20 +01:00
jean-emmanuel
0ac4bd60df docs: restore tabs 2023-01-30 19:40:10 +01:00
jean-emmanuel
b3a45860c5 log: pl locales 2023-01-29 12:07:31 +01:00
jean-emmanuel
b0f09cd547 Merge branch 'master' of github.com:jean-emmanuel/open-stage-control 2023-01-29 12:05:57 +01:00
jean-emmanuel
a6a4941999 encoder: fix linkId 2023-01-29 11:27:20 +01:00
jean-emmanuel
07e98f99d7
Merge pull request #812 from manz4rk/master
misc: pl translation and other translation fixes
2023-01-24 15:22:59 +01:00
Manz4rk
80211951e4 misc: special characters fixes 2023-01-24 13:06:01 +01:00
Manz4rk
e727922a16 misc: pl translation and other translation fixes 2023-01-24 13:02:48 +01:00
jean-emmanuel
d9b1342e1d docs: midi conf disambiguation 2023-01-09 10:08:42 +01:00
jean-emmanuel
403a1d5578 package: fix travis order 2023-01-03 09:17:35 +01:00
jean-emmanuel
1a511edfbc pacage: 1.22 2023-01-03 09:06:59 +01:00
jean-emmanuel
10efd5bd94 docs: update 2023-01-03 09:06:12 +01:00
jean-emmanuel
5f1081a835 docs: dead link 2023-01-03 09:05:59 +01:00
jean-emmanuel
1070ccb812 slider: prevent issues with decimal keys 2023-01-03 09:03:12 +01:00
jean-emmanuel
fe9e988d3e docs: small changes 2023-01-03 09:02:12 +01:00
jean-emmanuel
71af0641ba launcher:mac: change "List MIDI devices" keyboard shortcut to `Ctrl+m 2022-12-31 14:59:21 +01:00
jean-emmanuel
bc6428e553 keyboard: setValue: accept full length array (fixes linkId) 2022-12-27 10:54:40 +01:00
jean-emmanuel
6f16b819c8 doc: frame is not limiter to local network 2022-12-25 18:28:15 +01:00
jean-emmanuel
abcd214114 lint 2022-12-25 17:37:13 +01:00
jean-emmanuel
3fd9c694ce image: add support for special value "qrcode" 2022-12-25 17:33:18 +01:00
jean-emmanuel
cebca61e30 qrcode: optional (cli) and on demand (launcher) 2022-12-25 17:17:08 +01:00
jean-emmanuel
a12593224d package: follow debian naming 2022-12-25 10:52:37 +01:00
jean-emmanuel
a11296e19c locales: enable german locales 2022-12-20 18:22:54 +01:00
jean-emmanuel
b293932921
Merge pull request #807 from MagnusReichel/master
misc: doc update & locales
2022-12-20 18:21:00 +01:00
MagnusReichel
46a3274f68
Add files via upload
misc: doc update & locales
2022-12-20 11:17:33 +01:00
jean-emmanuel
e11e56ce38 console: disable mouseover trap when editor is off 2022-12-03 22:22:22 +01:00
jean-emmanuel
d4d0d18de1 docs: update 2022-11-29 17:00:28 +01:00
jean-emmanuel
454884eb81 custom module: fix autoreload on nested submodules 2022-11-29 16:58:48 +01:00
jean-emmanuel
07beecc9db package: next is 1.21.0 2022-11-29 09:00:52 +01:00
jean-emmanuel
c6b9ef5205 package: add package lock 2022-11-29 09:00:15 +01:00
jean-emmanuel
5230eb2d4b scripting: onCreate: expose value and call onCreate after default value is applied 2022-11-29 08:57:38 +01:00
jean-emmanuel
6ef1d412f9 custom module: expose global object that persists accross module reloads. 2022-11-29 08:36:09 +01:00
jean-emmanuel
9197eea0ac switch/menu/dropdown: add a syntax that supports duplicate labels in values property 2022-11-29 08:24:14 +01:00
jean-emmanuel
e7aa598f8b editor: horizontal scrolling issues with maximized code editor 2022-11-29 08:05:01 +01:00
jean-emmanuel
ddcf186a66 custom module: prevent error when module.exports is not defined 2022-11-29 08:02:11 +01:00
jean-emmanuel
c2e07e6ae0 log: qrcode 2022-11-29 07:50:47 +01:00
jean-emmanuel
d72539c184 package: fixed qrcode dep 2022-11-26 18:38:20 +01:00
jean-emmanuel
738df79708 qrcode pr: refactor for terminal compatibility 2022-11-26 18:34:36 +01:00
jean-emmanuel
924b3c924e misc: rename launcher>->server event 2022-11-26 18:33:53 +01:00
ameisso
b2dced4cda New : adapted colors 2022-11-26 02:39:00 +01:00
ameisso
76aef5cb96 New : print all addresses 2022-11-26 02:27:44 +01:00
ameisso
07c89b1af3 New : QRCode module 2022-11-25 19:22:31 +01:00
ameisso
c78cda3c40 New : print qrCode of the last IP 2022-11-25 19:22:06 +01:00
jean-emmanuel
72d6e2dc49
Merge pull request #803 from erictheise/20221113-typos
A few new typos.
2022-11-14 11:01:09 +01:00
Eric Theise
89da9d5417 Typos. 2022-11-13 09:12:24 -08:00
jean-emmanuel
de10481a9b package: 1.20 2022-11-09 10:27:03 +01:00
jean-emmanuel
c4b8aea5f7 docs: update 2022-11-09 10:23:42 +01:00
jean-emmanuel
56bf3e8471 lint: single quotes 2022-11-09 10:21:45 +01:00
jean-emmanuel
2552dd187e fragment: add fallback property 2022-11-09 10:14:54 +01:00
jean-emmanuel
c7ce398632 terminal: colorize debug messages for in/out messages 2022-11-09 09:22:53 +01:00
jean-emmanuel
aea55d45ca scss: osc icon not found 2022-11-09 08:49:35 +01:00
jean-emmanuel
d6a864fe71 launcher: add Start minimized menu option 2022-11-09 08:45:22 +01:00
jean-emmanuel
37130c22d0 lint: fix var name 2022-11-07 15:06:41 +01:00
jean-emmanuel
865147477f scripting: expose Navigator object with `getNavigator() 2022-11-07 15:01:15 +01:00
jean-emmanuel
a90211223f scripting: soft and hard reload 2022-11-07 13:07:02 +01:00
jean-emmanuel
a77a9c01dd scripting: add reload() function 2022-11-07 13:02:01 +01:00
jean-emmanuel
2164964116 cli: add --client-size & --client-position options 2022-11-07 10:26:05 +01:00
jean-emmanuel
5af6abb06d advanced syntaxes: ignores quotes around file path in IMPORT{} 2022-11-06 12:29:44 +01:00
jean-emmanuel
4de6c33f5a log: typo 2022-11-05 12:06:29 +01:00
jean-emmanuel
da3eecfdd4 scripting: prevent some functions to be marked as undefined 2022-11-04 14:09:41 +01:00
jean-emmanuel
0ec4c9e2fb package: next is v1.19.3 2022-11-03 11:41:00 +01:00
jean-emmanuel
95d8d92bcd log: wrong version 2022-11-02 23:06:20 +01:00
jean-emmanuel
74f6c289e5 builtin client:change noFocus client option behavior: the defalt client window now doesn't take the focus at all, even when a text input is clicked. 2022-11-01 18:11:49 +01:00
jean-emmanuel
dca6d2c889 log: +accurate 2022-10-31 19:06:20 +01:00
jean-emmanuel
dccff415a8 events:regression breaking touch move events 2022-10-31 18:55:29 +01:00
jean-emmanuel
5c0636345a editor zoom: small zoomout issue when root height is not auto 2022-10-30 19:33:43 +01:00
jean-emmanuel
32d0e539c3 package: 1.19.1 2022-10-30 18:56:08 +01:00
jean-emmanuel
99db67dd5d editor zoom: adjust root widget size when zooming out 2022-10-30 18:55:51 +01:00
jean-emmanuel
ed63e2c063 misc: minor css change 2022-10-30 16:04:12 +01:00
jean-emmanuel
88ef6d1cd9 misc: doc update & locales 2022-10-30 15:58:36 +01:00
jean-emmanuel
0d06d49e50 log: update 2022-10-30 14:58:29 +01:00
jean-emmanuel
e52a4c224e ui: clean keyboard code, add unselect btn, tidyup style 2022-10-30 14:56:15 +01:00
jean-emmanuel
63e7a4fa5c keyboard: text selection more or less ok 2022-10-29 23:34:12 +02:00
jean-emmanuel
d607c1f447 keyboard: oups 2022-10-29 20:47:41 +02:00
jean-emmanuel
2e43f9086d misc: disable input spellcheck globally 2022-10-29 20:34:28 +02:00
jean-emmanuel
3f2828ab65 docs: update 2022-10-29 20:22:53 +02:00
jean-emmanuel
fa07be621f ui keyboard: disable for code editors 2022-10-29 20:20:59 +02:00
jean-emmanuel
f427f2ecaf ui: take localZoom into account for all drag events 2022-10-29 19:02:05 +02:00
jean-emmanuel
94ffd52215 keyboard: working on it 2022-10-29 12:37:04 +02:00
jean-emmanuel
3defca2a7c keyboard: wip cursor attempt 2022-10-29 11:05:07 +02:00
jean-emmanuel
6ebed6a6ce ui: minor fix 2022-10-29 11:04:58 +02:00
jean-emmanuel
ba4360e028 uikeyboard: don't scroll input into view 2022-10-29 00:59:28 +02:00
jean-emmanuel
08bcf902d4 editor: fix drag resize + local zoom 2022-10-29 00:45:07 +02:00
jean-emmanuel
8bb2813a49 editor: ui tweaks and inspector toolbar 2022-10-29 00:34:16 +02:00
jean-emmanuel
e43c6fea22 script: prevent infinite loop issue 2022-10-28 21:56:27 +02:00
jean-emmanuel
c916f5dd6a ui: local zoom only in editor mode 2022-10-28 08:04:06 +02:00
jean-emmanuel
fe6a8f7af2 ui: allow local zoom under 1 2022-10-27 19:16:41 +02:00
jean-emmanuel
f64f344a76 uikeyboard: key repeat issue 2022-10-27 15:05:45 +02:00
jean-emmanuel
2de1f99ab3 ui keyboard: add key repeat 2022-10-27 12:59:46 +02:00
jean-emmanuel
9da39ef4eb package: beta1 2022-10-27 12:35:01 +02:00
jean-emmanuel
de4dcd16ef ui keyboard: arrow navigation 2022-10-27 12:33:15 +02:00
jean-emmanuel
0a147189d4 ui-keyboard: horsin around 2022-10-27 11:48:55 +02:00
jean-emmanuel
327d461aab multixy: allow setting its own value from onValue script while touched 2022-10-27 09:54:05 +02:00
jean-emmanuel
f478e463fc keyboard: tweaks an fixes 2022-10-27 01:38:11 +02:00
jean-emmanuel
0c6d6cc12c next is v1.19 2022-10-26 10:54:46 +02:00
jean-emmanuel
75bfc99758 misc: lint and log update 2022-10-26 10:53:59 +02:00
jean-emmanuel
d7bdb092c2 docs: new local zoom behavior 2022-10-26 10:46:28 +02:00
jean-emmanuel
757dd23063 folder: proper description 2022-10-26 10:38:09 +02:00
jean-emmanuel
55afba8178 log:update 2022-10-26 10:36:24 +02:00
jean-emmanuel
5ba7de9861 file widget: avoid error with non-string values 2022-10-26 10:35:55 +02:00
jean-emmanuel
d68c0f6c0a widgets: folder container 2022-10-26 10:31:45 +02:00
jean-emmanuel
4868ef77d9 misc: clean unused dep 2022-10-25 18:44:48 +02:00
jean-emmanuel
13a2d125cf wip: lint 2022-10-25 18:26:23 +02:00
jean-emmanuel
4b24c9ba8d misc: dedupe keys 2022-10-25 18:19:29 +02:00
jean-emmanuel
0716eae53c wip: static, widget-only local zoom 2022-10-25 18:18:49 +02:00
jean-emmanuel
903eb82324 log update 2022-10-25 18:14:14 +02:00
jean-emmanuel
a19a6ac22d editor: add keyboard shortcut "h" to hide selection and widget drag / resize handles while pressed 2022-10-25 18:12:19 +02:00
jean-emmanuel
3022ee4703 ui: flat keyboard; disabled except on desktop 2022-10-25 16:58:23 +02:00
jean-emmanuel
3f30ec32d3 ui: add virtual keyboard for keyboard-less desktop clients 2022-10-25 14:04:14 +02:00
jean-emmanuel
7b06f7e1a8 input: add maxLength property 2022-10-24 11:59:27 +02:00
jean-emmanuel
0bb3652898 package: v1.18.3 2022-10-23 10:29:50 +02:00
jean-emmanuel
bf97ebceb5 button: decoupled push mode returning wrong value when activated from a widget script 2022-10-23 10:29:29 +02:00
jean-emmanuel
6cbddbd2b6 button: regression in push mode (on value not passed to onValue script when triggered from another widget 2022-10-23 10:09:02 +02:00
jean-emmanuel
74198c07d7 theme: avoid server-side parsing error with --color-background 2022-10-22 21:31:09 +02:00
jean-emmanuel
7ffe125623 ios: attempt to fix rendering glitch when waking up after sleep 2022-10-22 18:58:13 +02:00
jean-emmanuel
782491282c switch: interaction issue when value labels contain icons 2022-10-22 18:31:19 +02:00
jean-emmanuel
33e1d0a16b docs: small fix 2022-10-21 16:15:05 +02:00
jean-emmanuel
edb014e1da canvas: ios: different touch.force implementation 2022-10-21 13:07:56 +02:00
jean-emmanuel
4984777dd8 button: tweak pulse in decoupled mode 2022-10-21 11:13:25 +02:00
jean-emmanuel
65120d54ad package: beta 2 2022-10-21 09:25:37 +02:00
jean-emmanuel
06132d2005 canvas: ios: still fiddling 2022-10-21 09:24:07 +02:00
jean-emmanuel
47694ee6c5 package: more beta 2022-10-19 23:09:11 +02:00
jean-emmanuel
38588f2cca canvas: io touch data polling tweak 2022-10-19 23:08:41 +02:00
jean-emmanuel
4887aed82a canvas: still working on ios data polling 2022-10-19 17:48:04 +02:00
jean-emmanuel
428e5d7d12 canvas: reduce ios data polling frequency 2022-10-19 16:31:56 +02:00
jean-emmanuel
86e86378e6 canvas: attempt to fix ios data polling 2022-10-19 16:24:23 +02:00
jean-emmanuel
e3b7edd895 docs: update 2022-10-19 16:24:17 +02:00
jean-emmanuel
1e36e6ae7c button: refactor decoupled mode 2022-10-19 12:46:33 +02:00
jean-emmanuel
35e593be37 docs: updateref 2022-10-19 11:09:02 +02:00
jean-emmanuel
919678fea9 button: expose locals.external 2022-10-19 11:08:34 +02:00
jean-emmanuel
9f00ec6efc misc: missing coma 2022-10-19 10:49:27 +02:00
jean-emmanuel
da026001df button: decoupled mode 2022-10-19 10:46:06 +02:00
jean-emmanuel
0481691c7e Revert "button: decoupled: fix toggle mode so that it always send requested value"
This reverts commit 2f3aab546d.
2022-10-19 09:30:14 +02:00
jean-emmanuel
2f3aab546d button: decoupled: fix toggle mode so that it always send requested value 2022-10-19 09:11:56 +02:00
jean-emmanuel
8a9c05cf83 misc: bool conversion 2022-10-19 08:40:33 +02:00
jean-emmanuel
ad27753b69 docs: update widget ref 2022-10-18 15:18:52 +02:00
jean-emmanuel
744c791a08 log: missing space 2022-10-18 15:18:18 +02:00
jean-emmanuel
018ce8481d log: oneway traversing 2022-10-18 15:16:18 +02:00
jean-emmanuel
60a2997365 package: next is 1.18.0 2022-10-18 15:07:22 +02:00
jean-emmanuel
48ad73911d server: fix loading client script source map 2022-10-18 15:07:01 +02:00
jean-emmanuel
c0a3953a0a editor: add F2 keyboard shortcut to bring label property input into viewif selected widget has one 2022-10-18 15:05:05 +02:00
jean-emmanuel
6a0471c8fd misc: client_sync global as bool 2022-10-18 10:20:50 +02:00
jean-emmanuel
e07322a520 button: add client option altTraversing to allow one-way response to traversing gestures 2022-10-18 10:18:50 +02:00
jean-emmanuel
d962c1efe0 canvas: ios: disable touch data polling unless data is used in onTouch 2022-10-18 09:03:17 +02:00
jean-emmanuel
582c29027a doc: link to client sync option 2022-10-18 08:41:01 +02:00
jean-emmanuel
1eec9833f0 client-options: add client-sync option to allow disabling client synchronization 2022-10-17 20:18:28 +02:00
jean-emmanuel
5df9c436b2 widgets: add borderRadius property 2022-10-17 20:01:15 +02:00
jean-emmanuel
f2b1f42d51 package: missing version update 2022-10-16 15:24:17 +02:00
jean-emmanuel
3c0c2dd74d ios: proper getter for ios touch event data 2022-10-16 14:58:36 +02:00
jean-emmanuel
61a8968923 knob: add snap-alt mode (snap mode that allows jumping between range.min and range.max) 2022-10-16 10:33:23 +02:00
jean-emmanuel
cd70fd60dc
Merge pull request #792 from erictheise/typos-src
src: typos and grammatical (English) cleanups.
2022-10-15 23:09:00 +02:00
jean-emmanuel
f2ea5ebf74 log :update 2022-10-15 23:05:28 +02:00
jean-emmanuel
f4b6a226dc Merge branch 'master' of github.com:jean-emmanuel/open-stage-control 2022-10-15 21:12:24 +02:00
jean-emmanuel
7765fb066a canvas: attempt to poll touch azimuth, altitude and force on iOS that otherwise don't trigger onTouch as expected 2022-10-15 16:27:11 +02:00
Eric Theise
e5d3ccf7b5 Change occurrences of 'catched' to 'caught'. 2022-10-13 06:12:39 -07:00
Eric Theise
ca777f3274 A few typos fixed, fewer grammatical (English) cleanups. 2022-10-13 06:12:39 -07:00
jean-emmanuel
e21a252eb8
Merge pull request #791 from erictheise/typos-docs
docs: a few typos fixed, fewer grammatical (English) cleanups.
2022-10-13 08:30:10 +02:00
Eric Theise
5301e2507a Typos and grammatical (English) cleanups. Changes made to comments and text output, not css classes or variable names. 2022-10-12 13:01:18 -07:00
Eric Theise
bc1234cbd2 A few typos fixed, fewer grammatical (English) cleanups. 2022-10-12 11:56:06 -07:00
jean-emmanuel
796ee2fdc6 editor: prevent edge case error 2022-10-05 20:40:20 +02:00
jean-emmanuel
3b695509e9 lint 2022-10-04 12:50:21 +02:00
jean-emmanuel
7cc67e6b59 button: add decoupled mode
script: add external option for set()
2022-10-04 12:15:42 +02:00
jean-emmanuel
d208644e39 midi: on Mac, name virtual ports after the device name to avoid confusion 2022-10-04 11:38:29 +02:00
bordun
1751f721e8 log: next is 1.17.1 2022-08-29 16:14:00 +02:00
bordun
0b2fb7ea4a scripting: add updateCanvas() function (forces a canvas widget to redraw 2022-08-29 15:51:28 +02:00
bordun
2ab69d29fb remote control: /NOTIFY: if multiple arguments are provided, interpret the first one as the icon's name for the client notification 2022-08-29 15:40:46 +02:00
bordun
7789e5322d travis: still not good 2022-07-04 13:48:39 +02:00
bordun
c685074667 travis: python v 2022-07-04 13:46:36 +02:00
bordun
5f1e6c5a29 travis: wine package 2022-07-04 13:42:03 +02:00
bordun
4c604ee989 travis: python version 2022-07-04 13:39:57 +02:00
bordun
290164ea21 travis: update dist 2022-07-04 13:36:43 +02:00
bordun
92cb9cbb07 log: could not fix old osx midi build 2022-07-04 13:33:26 +02:00
bordun
6fa547f92c docs: copyleft 2022 2022-07-04 13:16:50 +02:00
bordun
b70300246a docs: update 2022-07-04 12:08:34 +02:00
bordun
257d8121c6 package: make it 1.17.0 2022-07-04 12:08:12 +02:00
bordun
4cc2abe2a0 midi: update rtmidi 2022-07-04 11:54:41 +02:00
bordun
262e1861a9 midi: bump version 2022-07-04 11:38:14 +02:00
bordun
2ca83ccf29 patchbay: add exclusive option and remove some seamingly wrong code 2022-07-04 11:28:31 +02:00
bordun
a5c1725028 range: multitouch interaction issue 2022-07-04 11:05:43 +02:00
bordun
1b10dc7ca0 editor: allow interacting with a widget without selecting it by using the middle mouse button or by holding shift+win (shift+cmd on mac). 2022-07-04 10:55:25 +02:00
bordun
aa2b9fea08 encoder: apply knob sensibility change 2022-07-04 10:39:23 +02:00
bordun
fb621a6f9c knob: sensitivity and ctrl+drag preserve circular mode behavior
knob: `snap` mode now works like `circular` mode except for the touch start event (value can't jump from start to end anymore)
2022-07-04 10:35:34 +02:00
bordun
99a2652d09 editor: error when ctrl+clicking on a root's child 2022-07-04 10:23:25 +02:00
bordun
ad6916b609 package: v1.16.6 2022-06-08 09:52:12 +02:00
bordun
437db2eada widget: use computed visibility instead of the property value to determine style 2022-06-08 09:48:08 +02:00
bordun
ccf44e7ff6 package: v1.16.5 with font loading hot fix 2022-06-01 16:39:25 +02:00
bordun
73e4dadf26 docs: update 2022-06-01 15:02:24 +02:00
bordun
6321e99a11 lint: indent 2022-06-01 15:00:44 +02:00
bordun
b7e7530c12 main: hide no gui message when running osc server process 2022-06-01 14:59:36 +02:00
bordun
b5e7a3d43f launcher: woops 2022-06-01 14:59:26 +02:00
bordun
3884188df9 server: solve file resolving issue (osc assets vs user assets) 2022-06-01 14:56:50 +02:00
bordun
3bd7492591 patchbay: outputs property not handling object value properly 2022-06-01 14:33:29 +02:00
bordun
60877f86ae patchbay: trigger onValue script when a connection changes 2022-06-01 14:28:52 +02:00
bordun
34602bc45e modal: display issue when a modal receives the same value mutliple times 2022-06-01 11:59:02 +02:00
bordun
275ea3c14b windows: allow accessing other drives than the default one (list drives when the file browser reaches the filesystem's root) 2022-05-31 15:16:17 +02:00
bordun
37ee994dab package: revert sanitize html update 2022-05-30 16:02:18 +02:00
bordun
976c2c2040 server: yargs update breaking things again 2022-05-30 15:40:11 +02:00
bordun
5228444b59 package: no package-lock after all 2022-05-30 15:07:00 +02:00
bordun
8bb9be157a package: node 16 2022-05-30 14:48:44 +02:00
jean-emmanuel
f61560d4cf lint: no return outside function 2022-05-22 18:28:04 +02:00
jean-emmanuel
dd8166f2ab lint: use babel parser 2022-05-22 18:27:55 +02:00
jean-emmanuel
37c3559100 docs: node v16 2022-05-22 18:23:00 +02:00
jean-emmanuel
395876443e packaging: node v16 2022-05-22 18:22:14 +02:00
jean-emmanuel
15361f67b7 package: upate most dependencies 2022-05-22 16:44:32 +02:00
jean-emmanuel
ad78141b11 package: 1.16.3 2022-05-22 15:28:09 +02:00
jean-emmanuel
a628663ae1 docs: update 2022-05-22 15:21:05 +02:00
jean-emmanuel
23dadaaf7d scripting: expose Image()
canvas: typo
2022-05-22 12:58:49 +02:00
jean-emmanuel
c84067c456 canvas: add onResize script property 2022-05-22 12:43:26 +02:00
jean-emmanuel
c2bc99b2b3 log: misc 2022-05-22 12:36:07 +02:00
jean-emmanuel
1368a109c2 server: put app assets in a private folder to let users use "client" and "assets" as folder names 2022-05-22 12:32:10 +02:00
jean-emmanuel
534b6e90fc server: typo 2022-05-22 12:30:29 +02:00
jean-emmanuel
4d8a4a37b0 server: comment 2022-05-22 12:25:39 +02:00
jean-emmanuel
f896aa8d0c custom-module: clean 2022-05-22 12:24:46 +02:00
jean-emmanuel
020bda16ba server: harmless error message when importing css files from the main theme file 2022-05-22 12:24:09 +02:00
jean-emmanuel
0bdebc1357 custom module: proper submodule and circular require resolution 2022-05-22 12:13:53 +02:00
jean-emmanuel
c1061071bb Merge branch 'master' of github.com:jean-emmanuel/open-stage-control 2022-05-22 12:12:55 +02:00
jean-emmanuel
56a88e0d98 log: missing words 2022-04-22 07:40:54 +02:00
281 changed files with 21735 additions and 7299 deletions

View file

@ -1,13 +0,0 @@
{
"presets": [
["@babel/env", {
"targets": {
"ios": "10.3",
"chrome": "60"
},
"useBuiltIns": "usage",
"corejs": 3
}]
],
"plugins": ["@babel/plugin-proposal-object-rest-spread"]
}

3
.dockerignore Normal file
View file

@ -0,0 +1,3 @@
node_modules
app
sessions

View file

@ -1 +0,0 @@
jquery.*.js

View file

@ -1,25 +1,18 @@
{
"parser": "babel-eslint",
"env": {
"es6": true,
"es2021": true,
"browser": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "module",
"ecmaFeatures": {
"experimentalObjectRestSpread": true
}
"sourceType": "module"
},
"rules": {
"no-prototype-builtins": "off",
"no-console": "off",
"no-undef": "off",
"no-cond-assign": "off",
"no-useless-escape": "off",
"no-self-assign": "off",
"no-fallthrough": "off",
"no-empty": [
"error",
{
@ -53,14 +46,12 @@
],
"quotes": [
"error",
"single"
"single",
{ "allowTemplateLiterals": true }
],
"semi": [
"error",
"never"
]
},
"globals": {
"module": true
}
}

View file

@ -0,0 +1,24 @@
name: Build
on: [workflow_dispatch]
jobs:
Deploy:
runs-on: docker
container:
image: ghcr.io/catthehacker/ubuntu:act-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: 'true'
- name: Docker Login
run: |
docker login -u riksolo -p ${{secrets.CONTAINER_REGISTRY_TOKEN}} git.riksolo.com
- name: Build and push
run: |
docker build -t git.riksolo.com/riksolo/open-stage-control:latest -t git.riksolo.com/riksolo/open-stage-control:${{github.sha}} .
docker push git.riksolo.com/riksolo/open-stage-control:latest
docker push git.riksolo.com/riksolo/open-stage-control:${{github.sha}}

3
.github/FUNDING.yml vendored
View file

@ -1,3 +0,0 @@
# These are supported funding model platforms
patreon: openstagecontrol

View file

@ -1,23 +0,0 @@
---
name: Bug report
about: Report a bug in Open Stage Control
title: '[Bug]'
---
<!--
/!\ Don't forget to add a title /!\
Please provide as much contextual informations as possible:
- Open Stage Control version (or commit if built from sources)
- Operating system
- Open Stage Control options
- Client type (built-in or external browser) and version
- Session file (can be uploaded after adding the .txt extension)
- Custom module
- Server logs (from the terminal or the launcher's console)
- Client logs (hit F12 in chromium/chrome to open the console)
- Screenshot
-->

View file

@ -1,5 +0,0 @@
---
name: Feature request
about: Suggest an idea for Open Stage Control
title: '[Feature] '
---

5
.github/SUPPORT.md vendored
View file

@ -1,5 +0,0 @@
## How do I get help ?
- If you found a bug, open a bug report
- If you have a suggestion, open a feature request
- If you have a question or want to share your experience with other users, please use the dedicated forum at https://openstagecontrol.discourse.group/

32
.gitignore vendored
View file

@ -1,15 +1,17 @@
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
package-lock.json
*.pyc
# npmg
node_modules/
# build
/app/
# python/midi build
src/server/python/*
!src/server/python/*.py
# docs build
src/docs/widgets-reference.js
properties-reference.md
# packaging
dist/
sessions/

View file

@ -1,46 +0,0 @@
anHsudo: required
dist: focal
language: node_js
node_js:
- "12"
before_install:
- sudo dpkg --add-architecture i386
- sudo apt-get update -qq
- sudo apt-get install -qq wine-stable fakeroot xvfb python3.8 python3-pip python3-setuptools
- sudo python3 -m pip install mkdocs-material
install: npm install
before_deploy:
deploy:
provider: releases
api-key:
secure: Nb4qJlmLEE2/ETHEYe8V8eGI08d4GuE5kdQef5ZnB4PrstppLlAjShv5E4DNTsyalMOMDjpw9v+9aQNzxGiGv+lCVVL5oFvqvDpcYusRuF9Qua7oJtFh+5FvjgC1DDjauk5Z7WQWMvzWwfNmqbY/lxPbA4zVy4kdYkGV/8WnzA9AL5fU0ZU8gDsFjcr9Pz81XDsDXtPH/+iMuclMsEl8V/ZuswWlZaFn1Jnb1tcGC5WUCsuNQo/+gGfSK6Qcf9AKsIrOjdzi55s4jqH1N7P/kKi4a2tWUTwmSLrOxdUmSYjXVOxMu0cAEnHSeYREv/5o6J0MbfQrDoxh2y5roPZzqE+FAuFLl+b/+bYlW0mrfYfSuP/VX9LYh5JSvrhN7rZuUfMqS1iM7c9Dx8sZadMnvYEAAJhH8IV/9SkuRa/8QoIpXf7YB9v1jERxs4gk5CPT5Aml6nY/CvMWiEQ/wJhC7iZd/QRHshgfNLfAGlbbNU2KP6ZsVAGD601fyST/8neoQqLqS9mteOr1QME3c5EFw+XaauIQNYZSl+wJr8Y1YMcKY+fbJqqR0TXkbsoxFgV9PRf/4ZCjIJYtmelQVlM7j20XavOHM/Ko6/y7a3pohFz+ql3YR9jGF5XW2foXb4+e6DwTGL91/f75hYcsvXxoKbeaBjWpaSK8532UTeVkhPM=
file_glob: true
file: dist/packages/*
skip_cleanup: true
on:
tags: true
before_deploy:
- export VERSION=$(sed -nE 's/^\s*"version":\ "(.*?)",$/\1/p' package.json)
- npm run build-docs
- npm run package -- --all
- 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
- cd $TRAVIS_BUILD_DIR/dist/open-stage-control-win32-x64/resources/app/server/
- 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
- npm run deb64
- cd dist
- mkdir packages
- mv open-stage-control-linux-x64/*.deb packages/open-stage-control-${VERSION}-amd64.deb
- mv open-stage-control-node open-stage-control-${VERSION}-node
- mv open-stage-control-win32-x64 open-stage-control-${VERSION}-win32-x64
- mv open-stage-control-linux-x64 open-stage-control-${VERSION}-linux-x64
- zip -q -r --symlinks packages/open-stage-control-${VERSION}-osx.zip open-stage-control-darwin-x64/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
- ls packages
- cd ..

7
AI_POLICY.md Normal file
View file

@ -0,0 +1,7 @@
Anything AI-related is strictly prohibited from this project.
If you think this project could benefit from a smart use of AI, think harder.
Think harder about the (hundreds of) millions of data workers that make your AI "smart", not to mention the monumental ecological waste it represents.
If you still think this way, don't tell me.

View file

@ -1,5 +1,708 @@
# Changelog
## 1.31.2
- bug fixes
- editor: fix regression (1.30.0) causing errors when editing the value property
- widgets
- canvas: allow `onResize` to send and trigger widget synchronization and scripts
## 1.31.1
- bug fixes
- clone: regression causing error when some widgets have a non-string id
## 1.31.0
- widgets
- clone, fragment: add `scoped` property. This allows making the widget self-contained (independent from its original) by prefixing all widget ids automatically (and transparently resolving unprefixed ids in advanced syntaxes and scripts within the scope)
- bug fixes
- midi: unrecognized `no_auto_note_off` option
- MacOs: the app now quits when all windows are closed
- launcher: if the Tray icon is enabled, closing the launcher window won't quit the app if the server is running
- scrollbar widget: fix initial value in vertical mode
- console: fix copying using CmdOrCtrl+C when the editor is enabled
- custom module
- objects transmitted using `receive()` will be received as objects by the client app (instead of a json string)
## 1.30.4
- bug fixes
- remote control: add support for icon transform suffixes
- editor: fix moving/resing widgets inside folders when using percent units
- clone: `@{parent.propertyName}` blocks in target widget now update when clone's parent property updates
- widgets
- encoder: add `horizontal` mode
- knob: add `encoder` design
## 1.30.3
- bug fixes
- scrollbar: missing update upon target container resize
- server: regression breaking reception of osc message over tcp
- widgets
- file: remember last visited directy per widget if `directory` property is not set
- knob: add `horizontal` mode
- eq: filter responses are now only computed when needed; the widget's value is no longer exposed / sync'ed.
- plot, eq: unclip line drawing on y-axis
- scripting
- add `uploadFile` function for reading client-side files
- add `scrollIntoView` function
## 1.30.2
- bug fixes
- when using objects in properties, numbers-as-strings and booleans-as-strings values are now preserved instead of being converted to their litteral counterparts
- rgb: fix rendering issue
- patchbay: interaction and rendering issues
- `event.preventDefault` in `onTouch` now affect modal buttons
- menu: use click event instead of tap in `toggle` and `doubleTap-toggle` modes
- button: missing `move` events in `onTouch`
- error when logging `event` object in `onTouch`
- widgets
- modal/button/file: add `click` property
- editor
- preserve code editor undo history between consecutive edits of a same widget's property
- preserve fullscreen code editor focus when saving / submitting
- client
- add `noWarning` client option
## 1.30.1
- bug fixes
- regression breaking user asset loading from a root directory named "assets"
- regression breaking custom module's `nativeRequire()` for locally installed modules
## 1.30.0
- bug fixes
- server: fix resolving absolute file urls containing the remote-root path
- prevent editor zoom level from affecting drag events when the editor is disabled
- prevent changing editor zoom level when it's disabled
- fader: fix touchZone == knob for compact design
- separator labels missing in inspector
- make the client app more robust to restrictive browser settings (cookie must still be enabled for the app to fully work)
- widgets
- the html property is no longer restricted / sanitized
- input/textarea/select no longer have their appearance property reset in custom html
- canvas: added `contextType` property
- file: honor server's `remote-root` option (remove root path from displayed path and returned value)
- menu: changed default `layout` to `vertical`
- root/panel/modal/tab: support setting `scroll` to `hidden` (hides scrollbars and allows scrolling)
- add new `scrollbar` widget that connects to a scrolling container widget and acts as it scrollbar
- input: add `noCanvas` option to avoid blurry text under some circumstances
- xy: add `clipX` and `clipY` proprties (allows multixy to set per-pads anges limits)
- button: add `onTouch` script
- switch: make `values` property dynamic
- editor
- selecting a widget automatically shows it in the widget tree if it's not minimized
- submitting an unchanged value for the `value` property will now affect the value state of the widget even if the property content itself did not change
- scripting
- user scripts are longer protected against infinite loop and the main window object may be reached (it's not supported to break out of scripting context, but resources are no longer wasted to prevent it)
- `toolbar()` can now target menu actions by id instead of index
- `getToolbar()` function added (returns the state of a menu entry toggle)
- calling `setFocus()` without argument now unfocuses current active element
- midi
- add `no_auto_note_off` option
- add `Restart backend` action to the launcher's menu
- add `restartMidiBackend()` function to custom module context
- breaking change
- dropped support for iOS 10.3
- minimum chromium version requirement raised to 70
- macOS 11 (Big Sur) or above is now required (the node package will work on older system)
- scrollbars are no longer emulated on iOS
- scrollbar styling is now done using only the standard css scrollbar-* properties) to be more in line with system scrollbars in general
- panels no longer use their value to set/get their scrolling state, nor do they sync scrolling automatically. Instead there's now a dedicated scrollbar widget that can be used for this.
- misc
- now using electron v36.9.5
## 1.29.9
- build
- fix building from sources now that open stage control is not hosted on github
- scripting
- user scripts are longer protected against infinite loop
## 1.29.8
- 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
- editor: color picker interaction issue in near #000000
- rgb: incoming values were not queued when during user interaction
- client
- add `title` client option
## 1.29.7
- launcher
- 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
- 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
- misc
- native silicon buids (osx-arm64)
## 1.29.5
- 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
- bug fixes
- regression (1.29.3) breaking some widget recreation routines
## 1.29.3
- 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
- bug fixes
- scripting: `setFocus` not working on iOS
- fader/range: drawing error with `pips` enabled
## 1.29.0
- bug fixes
- file browser: drive listing failing on recent windows
- root: `hideMenu` not working when `--read-only` is set
- combining `--read-only` and `--fullscreen` now disables `F11` on built-in client
- regression breaking `pips` for range widget
- widgets
- add `onTouch` to all container widgets
- allow starting a traversing gesture outside a touchable widget
- fader: make `knobSize` dynamic
## 1.28.5
- bug fixes
- multixy: error when `points` is `0` (or empty array) (again)
## 1.28.4
- bug fixes
- multixy: error when `points` is `0` (or empty array)
## 1.28.3
- bug fixes
- multixy: correclty handle incoming feedback values and simultaneous touch releases
## 1.28.2
- bug fixes
- regression in feedback handling (unfixes multixy simultaneous spring issue temporarily)
## 1.28.1
- bug fixes
- eq: `highpass` filter not working as expected with `poles` set
- fader: `touchZone` not applied to `doubleTap` events
- fader: `touchZone` not affecting mousewheel interactions
- fader: regression causing issues with `onTouch` scripts
## 1.28.0
- bug fixes
- ui: global zoom (CmdOrCtrl + scroll / + / - / 0) issues and conflits with native browser zoom;
- ui: limit ctrl + scroll zoom speed
- broken cli when `ELECTRON_RUN_AS_NODE` is set
- inspector: input bug when a code editor was focused using the tab key
- inspector: prevent editing non-editable widgets (e.g matrix items) when clicking on their ids in error logs
- multixy: simultaneous touch releases not working correctly when `spring` is set and feedback values are received shortly after being sent
- widgets
- fader: add `touchZone` property to allow restricting interaction to a part of the widget
- eq: add support for n-poles lowpass and highpass filters with the filter's `poles` property
- eq: adapt sampling frequency to the x-axis range
- xy/multixy: add `auto` choice to `axisLock` (locks on the first moved axis)
- file: `extension` can now be an array of strings
- plot/eq: smoother curves
- sliders/pads: `doubleTap` can now be `"script"`, in which case `onTouch` will be called with `event.type` set to `doubleTap`
- xy: add `label` property
- multixy: add `padsAttr` property for per-pad customization
- panel: `tabsPosition` can now be `hidden`
- pads: support percents in `pointSize`
- scripting
- `console.log` now always print the id of the widget that called it
- editor
- inspector: tab key navigation now works, property categories can be fold/unfold with enter/space when focused
- inspector: `F2` now focuses the `html` property in the inpector if `label` is not present
- tree: add `mod + f` to focus the search input
## 1.27.5
- bug fixes
- patchbay: layout issue
- widget: regression causing error when emptying the css property and leaving only class declarations
- modal: incorrect position in scrolled containers when `relative` is `true`
- menu: incorrect position in scrlled containers depending on menu's alignment
- button: `locals.touchCoords` not updated upon release and incorrect when `doubleTap` is set
## 1.27.4
- bug fixes
- fader: pips drawing issue causing small a position offset or errors with some browsers
- script: setFocus not working with textarea widgets
## 1.27.3
- bug fixes
- regression causing circular loop errors upon certain editions
- fader: glitch with large `lineWidth` values in default design mode
## 1.27.2
- bug fixes
- multixy: `default` not applied when points are named
- clone: avoid some unnecessary property checks
- clone: prevent missing editions in target properties (e.g. VAR{} renamed with the same return value)
- client
- show 3-dots menu in read-only mode with access to allowed items (e.g fullscreen)
- hide console in read-only mode
- widgets
- matrix: don't implicitely override children's `label`, do it explicitely in `props`' default
- custom module
- `receive()` and `send()` now accept `host` and `port` to be provided as a single string argument joined by a colon
## 1.27.1
- bug fixes
- server: `fullscreen` option not working when `read-only` is set
- led and text widgets not client-syncing
- patchbay: `address` not working properly when set to `auto`
- patchbay: `ignoreDefaults` not working properly
- editor: missing position indicator in color picker pad
- file browser: fallback to home directory when last visited directory is not accessible
- mobile
- apply root's (or themes) background color the the browser's topbar when possible
## 1.27.0
- bug fixes
- app address / qr code not updating when network changes
- issue after theme auto reload (broken grid, colors not updated)
- widgets
- pads: expose css variable `--point-size`
- custom module
- provide error backtraces in module.exports functions
- add `reload()` callback to provide finer control over the module's lifecycle
- add `stop()` callback (runs when the server stops)
- remote control
- add /SESSION/CREATE command
- client
- file browser now remembers the last displayed directory
- allow dismissing notifications by clicking on them
- allow toggling notifications globally from main menu
- add `notifications` client option
## 1.26.2
- bug fixes
- user resources not loading when using an external browser
- advanced syntaxes resolution order issue
- advanced syntaxes
- display an error in the console in some unsupported advanced syntaxes use cases
## 1.26.1
- bug fixes
- mac: unable to show launcher windows when starting minimized
## 1.26.0
- bug fixes
- scripting: `getProp()` now correctly returns a copy of the property if it is an object
- prevent infinite loop when loading widgets with complex inter-dependencies
- modal: layout issue on iOS 15+
- widgets
- dropdown: allow resubmitting the same value
- switch: allow resubmitting the same value
- plot: missing `logScaleX` and `logScaleY` properties
- xy/multixy: add `axisLock` property; allow locking one the axis by holding `Shift` while dragging if `axisLock` is not set, bypasses it otherwise.
- knob/fader/range: add `colorKnob` property
- launcher
- on Mac, start hidden if `Start minimized` is set
- allow dropping files into file fields
- custom module
- expose `tcpServer` to allow monitoring the state of tcp connections
## 1.25.7
- bug fixes
- rare issue that made the last widget(s) in a container disappear when other widgets in the same container had a specific property dependency pattern
- remote control
- `/EDIT*` commands sent by a custom module are not affected by the server's `read-only` option anymore
- widgets
- input: allow using a number in `numeric` to specify stepping value for mousewheel interaction
- root: add `onPreload` scripting property
## 1.25.6
- bug fixes
- sliders: error when `steps` is an array
- scripting
- `stateSet`: add optional `{send: false}` flag
## 1.25.5
- bug fixes
- code editor: issue when middle clicking in the editor on linux
- code editor: modern js operators such as `**` not recognized
- sliders: prevent error when `steps` is not a number, add `auto` mode for using ranges values as steps (it did not work before)
- pads, range: value not initialized as an array, causing errors in some cases
- modal: popup not closing when `doubleTap` is true
## 1.25.4
- bug fixes
- custom module: `receive()` not passing boolean arguments properly
- fix `--authentication` on iOS clients
- editor
- display current widget value in the `value` property's help modal
## 1.25.3
- bug fixes
- input: rendering issues with big font sizes
- panel: tab rendering issue when initialized with a non-numeric value
- panel: minor style issue in tab navigation bar
- scripting: scripting functions not working inside `browseFile()` callback
- scripting: using `external: true` in `set()` should prevent affected widget from sending any message
- button: inconsistent value in `push` mode with `decoupled` enabled when setting value from script
## 1.25.2
- bug fixes
- textarea: escape key not restoring previous value
- scripting: `setFocus(id)` not affecting textarea widgets
- led, text, variable: value not synchronized between different clients
- error when running from sources on Mac
## 1.25.1
- bug fixes
- regression in inter-widget sync mechanism
- regression breaking `set()` function in scripts
- textarea: display nothing instead of "null" when receing no value, null or an empty string
## 1.25.0
- bug fixes
- multixy: doubleTap not working on touch devices
- button: `x` and `y` variables not passed to `onValue` when `doubleTap` is true on touch devices
- advanced syntax: update issue with clones using their own value in their properties
- client: minor keyboard shortcut issues
- panel: mitigate client synchronization issue with scrollbars
- widgets
- menu: add a background to menu items to help distinguish them
- menu: merge different interaction modes into a single `mode` property
- menu: add `swipe` mode
- remote control
- `/STATE/SET`: add optional argument to prevent widgets from sending their value
## 1.24.2
- bug fixes
- editor: regression breaking widget context menu actions under "Position" submenu
- touch devices: touchend event not fired on elements removed/detached during touchstart/touchmove callbacks (caused issues when switching tabs using a button inside a tab)
## 1.24.1
- bug fixes
- launcher: `Ctrl+M` keyboard shortcut not working
- widgets: regression incurring a small delay before resolving a property that depends on a widget's own value
- server: `--client-size` and `--client-position` options not parsed correctly
- advanced syntaxes
- support `@{}` inside `IMPORT{}`
## 1.24.0
- bug fixes
- widgets: circular value feedback issues
- editor: `ctrl + e` not working when hit multiple times without releasing `ctrl`
- mobile: "prevent sleep" feature not working
- widgets
- patchbay: add `in`, `out` and `both` modes to `exclusive` property
- panel: replace `verticalTabs` property with `tabsPosition` (supports 4 directions)
- custom module
- add optional `errorCallback` argument to`loadJSON` and `saveJSON`
- server
- print multiple qrcodes if multiple network interfaces are available and prevent printing a qrcode for the localhost address
- misc
- add linux rpm packages
## 1.23.0
- bug fixes
- linkId not working between two encoder widgets
- fader: `gradient` breakpoints not positioned correctly
- canvas: `onDraw()` called twice when calling `updateCanvas()`
- midi
- optional rpn/nrpn parsing as single messages
- widgets
- keyboard: incoming values different than the `off` property are now interpreted as `on`
- editor
- when focusing the label property with `F2`, select all text in the text area
- preserve scroll position in code editor when validating
- display the id of selected widget in the inspector's header
- scripting
- expose file browser (from the file widget) as a scripting function
- custom module
- don't restrict file extension in `loadJSON()` and `saveJSON` functions
- misc
- add polish locales (@ Manz4rk)
- add css classes to some notification popups to allow targetting them with css themes
## 1.22.0
- bug fixes
- keyboard widget: `linkId` not working (unable to link 2 keyboard widgets)
- slides: issues with ranges containing decimal keys
- launcher
- add menu options to show the qr code again
- mac: change "List MIDI devices" keyboard shortcut to `Ctrl+m`
- widgets
- image: add support for special value "qrcode"
- misc
- add german locales (@ Magnus Reichel)
- package file names changed to follow debian's convention
- add a cli option to disable the qr code (`--no-qrcode`)
## 1.21.0
- bug fixes
- custom module: fix autoreload on nested submodules
- launcher
- print a qrcode when the server starts to help connecting mobile devices
- editor
- horizontal scrolling issues with maximized code editor
- widgets
- switch/menu/dropdown: add a syntax that supports duplicate labels in `values` property
- custom module
- expose `global` object that persists accross module reloads.
- scripting
- onCreate: expose `value`
## 1.20.0
- bug fixes
- scripting: prevent some functions to be marked as undefined
- advanced syntaxes: ignores quotes around file path in `IMPORT{}`
- launcher
- add `Start minimized` menu option
- misc
- change noFocus client option behavior: the default client window now doesn't take the focus at all, even when a text input is clicked.
- colorize debug messages for sent and received osc/midi messages
- scripting
- add `setFocusable()` function to change the focusability of the window on the fly (allows reenabling focus temporarily to interact with a text widget using a dedicated toggle button for example)
- add `reload()` function
- expose Navigator object with `getNavigator()`
- widgets
- fragment: add `fallback` property
## 1.19.2
- bug fixes
- regression breaking touch move events on desktop touchscreens
## 1.19.1
- bug fixes
- editor zoom: adjust root widget size when zooming out
## 1.19.0
- editor
- add keyboard shortcut "h" to hide selection and widget drag / resize handles while pressed
- inspector: add some shortcut buttons in the header
- widgets
- add folder widget (flat container that doesn't affect layout)
- input: add `maxLength` property
- multixy: allow setting its own value from onValue script while touched
- ui
- add a virtual onscreen keyboard for desktop clients (can be enabled from the clients main menu)
- change local zoom (alt+scroll) behavior so that it only affect widgets and add scrollbars to navigate while zooming instead of following the mouse
- server
- client-options: add `virtualKeyboard` option to enable virtual keyboard by default (desktop clients only)
## 1.18.3
- bug fixes
- button: regression in push mode (`on` value not passed to `onValue` script when triggered from another widget)
- button: decoupled push mode returning wrong value when activated from a widget script
## 1.18.2
- bug fixes
- canvas: `onTouch` not triggered on iOS when when `event.force`, `event.altitudeAngle` or `event.azimuthAngle` changes
- switch: interaction issue when value labels contain icons
- ios: attempt to fix rendering glitch when waking up after sleep
## 1.18.1
- widgets
- button: add `decoupled` property, compatible with all button modes
- button: remove `decoupled` mode
## 1.18.0
- bug fixes
- client script source map not loading (helps providing useful error messages)
- widgets
- button: add `decoupled` mode (toggle mode that only updates its state when it receives a value from osc/midi messages)
- button: add client option `altTraversing` to allow one-way response to traversing gestures for toggle buttons
- canvas: iOS: trigger `onTouch` when `event.force`, `event.altitudeAngle` or `event.azimuthAngle` updates
- knob: add `snap-alt` mode (snap mode that allows jumping between range.min and range.max)
- all: add `borderRadius` property
- scripting
- add `updateCanvas()` function (forces a canvas widget to redraw)
- remote control
- `/NOTIFY`: if multiple arguments are provided, interpret the first one as the icon's name for the client notification
- midi
- on Mac, name virtual ports after the device name to avoid confusion
- server
- client-options: add `clientSync` option to allow disabling client synchronization
- client-options: add `altTraversing` option
- editor
- add `F2` keyboard shortcut to bring label property input into view if selected widget has one
## 1.17.0
- bug fixes
- editor: error when ctrl+clicking on a root's child
- range: multitouch interaction issue
- widget
- knob / encoder: `sensitivity` and ctrl+drag gesture preserve `circular` mode behavior
- knob / encoder: `snap` mode now works like `circular` mode except for the touch start event (value can't jump from start to end anymore)
- patchbay: add `exclusive` option
- editor
- allow interacting with a widget without selecting it by using the middle mouse button or by holding shift+win (shift+cmd on mac).
## 1.16.6
- bug fixes
- visibility property update issues
## 1.16.4
- bug fixes
- modal: display issue when a modal receives the same value multiple times
- patchbay: `outputs` property not handling object value properly
- server: resolution conflict between app files and user files
- widgets
- patchbay: trigger `onValue` script when a connection changes
- misc
- windows: allow accessing other drives than the default one (list drives when the file browser reaches the filesystem's root)
## 1.16.3
- bug fixes
- custom module: submodules not loading their own submodules with relative paths properly
- custom module: issue with circular submodule requires
- server: harmless error message when importing css files from the main theme file
- server: allow using folder names "client" and "assets" for user files (eg for images used in a session)
- widgets
- canvas: add `onResize` script property
- scripting: expose javascript's `Image` constructor
## 1.16.2
- bug fixes
@ -18,7 +721,7 @@
## 1.16.0
- advanced syntaxes
- `@{}` and `VAR{}` do not return a copy of their value anymore as it may introduce a significant overhead when used extensively. Mutating these objects in `#{}` and `JS{}` scripts will now affect the actual values and should be avoided at all cost.
- `@{}` and `VAR{}` that return objects / arrays do not return a copy of their value anymore as it may introduce a significant overhead when used extensively. Mutating these objects in `#{}` and `JS{}` scripts will now affect the actual values and should be avoided at all cost.
- widgets
- `comments` property flagged as dynamic
- multixy: add `doubleTap` property
@ -50,7 +753,7 @@
## 1.15.5
- bug fixes
- matrix: avanced property issue in`props` property (bis)
- matrix: advanced property issue in `props` property (bis)
- editor
- inspector: add solo mode with `alt+click` for category panels
@ -58,7 +761,7 @@
## 1.15.4
- bug fixes
- matrix: avanced property issue in`props` property
- matrix: advanced property issue in `props` property
## 1.15.3
@ -138,7 +841,7 @@
- button: `locals.touchCoords` not updated since v1.14.0
- widgets
- clone/fragment: remove scripting properties as they are supposed to bo overriden in `props`
- clone/fragment: remove scripting properties as they are supposed to be overridden in `props`
## 1.14.2
@ -151,7 +854,7 @@
- bug fixes
- misc: sending typed arguments (`{type, value}` objects) should override the widget's `typeTags` definition
- multixy: errors when `ephemeral` is `true`
- scripting: `setVar` not affecting all widgets when mutliple widgets match provided id
- scripting: `setVar` not affecting all widgets when multiple widgets match provided id
- widgets
- renamed `script` property to `onValue`, `draw` to `onDraw`, `touch` to `onTouch`
@ -176,7 +879,7 @@
- widgets
- canvas: expose touch pressure (as `event.force`) in the `touch` script.
- canvas: expose touch events for extra elements added with the `html` propery
- canvas: expose touch events for extra elements added with the `html` property
## 1.13.1
@ -189,7 +892,7 @@
- scripting: `storage.getItem()` not returning anything
- editor
- new code editor for `script`, `touch`, `draw` and `props` properties with syntax hilighting, line numbers, etc
- new code editor for `script`, `touch`, `draw` and `props` properties with syntax highlighting, line numbers, etc
- scripting
- `set()`: add an option to prevent target widget's script
@ -204,7 +907,7 @@
- widgets
- new **canvas** widget (under `pads`): allows creating custom widgets
- button: expose normalized touch coordinates in scipts as `locals.touchCoords`
- button: expose normalized touch coordinates in scripts as `locals.touchCoords`
- print a warning in the console when using advanced syntaxes in the script property
## 1.11.1
@ -356,7 +1059,7 @@
- advanced syntaxes
- new syntax for creating and using custom variables in properties: `VAR{name, default}`
- `JS{}` blocks don't require 2 brackets anymore (`JS{{}}` still works)
- `JS{}` blocks don't require 2 brackets anymore (`JS\{\{}}` still works)
- scripting
- add `getVar()` and `setVar()` for reading and modifying custom variables. This allows modifying properties directly from scripts (if they contain `VAR{}` blocks).
@ -427,7 +1130,7 @@
- add option for receiving note off with velocity
- misc
- v0->v1 session conversion: remove `JS{{}}` in script property
- v0->v1 session conversion: remove `JS\{\{}}` in script property
## 1.9.0
@ -1029,14 +1732,14 @@ As of this version, packages except the `node` package are bundled with a midi b
- scripting (general)
- removed MathJS language
- reuse #{} syntax as as shorthand for JS{{}} (one liner, implicit return)
- reuse #{} syntax as as shorthand for JS\{\{}} (one liner, implicit return)
- added `locals` variable, a variable store scoped to the widget
- renamed `global` to `globals`
- expose environment variables in `globals`: `url`, `env` (query parameters), `platform`, `screen` (width/height)
- script widget
- always hidden except in project tree
- `script` property must not be wrapped in a JS{{}} block anymore
- `script` property must not be wrapped in a JS\{\{}} block anymore
- added `stateGet` and `stateSet` functions
- added `storage` object, proxy to the document's localStorage object (allows storing data that persist after refresh/close (cleared with the browser's cache)
- added `setTimeout`, `clearTimeout`, `setInterval`, `clearInterval` function proxies with an extra `id` argument (they clear automatically when called multiple times and upon widget removal. `id` is scoped to the widget)

29
Dockerfile Normal file
View file

@ -0,0 +1,29 @@
FROM node:24-alpine
RUN apk --no-cache add git
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
RUN mkdir /sessions
RUN touch /sessions/session.json
EXPOSE 8080
ENV ELECTRON_RUN_AS_NODE=1
ENV SEND="127.0.0.1:8080"
ENV LOAD="/sessions/main.json"
ENV PORT=8080
ENV OSC_PORT=8080
ENV READ_ONLY=false
RUN chmod +x entrypoint.sh
ENTRYPOINT ["./entrypoint.sh"]

View file

@ -1 +0,0 @@
web: node app/ -n -p $PORT --remote-saving 127.0.0.1 $OPTIONS

View file

@ -11,5 +11,11 @@ Open Stage Control
----
Copyleft © Jean-Emmanuel Doucet @ [AMMD](http://ammd.net) 2014-2021.
This program is a free software released under the [GNU/GPL3](ttps://github.com/jean-emmanuel/open-stage-control/blob/master/LICENSE) license.
Docker additions by Rik Berkelder.
mount `/sessions` directory. default session file is created and loaded there.
---
Copyleft © Jean-Emmanuel Doucet 2014-2025.
This program is a free software released under the [GNU/GPL3](https://framagit.org/jean-emmanuel/open-stage-control/-/blob/master/LICENSE) license.

View file

@ -1,2 +0,0 @@
*
!.gitignore

View file

@ -1,2 +0,0 @@
*
!.gitignore

View file

@ -1 +0,0 @@
ErrorDocument 404 /404.html

View file

@ -1 +0,0 @@
require('./server/open-stage-control-server')

View file

@ -1,2 +0,0 @@
*
!.gitignore

View file

49
basesession.json Normal file
View file

@ -0,0 +1,49 @@
{
"createdWith": "Open Stage Control",
"version": "1.31.2",
"type": "session",
"content": {
"type": "root",
"lock": false,
"id": "root",
"visible": true,
"interaction": true,
"comments": "",
"width": "auto",
"height": "auto",
"colorText": "auto",
"colorWidget": "auto",
"alphaFillOn": "auto",
"borderRadius": "auto",
"padding": "auto",
"html": "",
"css": "",
"colorBg": "auto",
"layout": "default",
"justify": "start",
"gridTemplate": "",
"contain": true,
"scroll": true,
"innerPadding": true,
"tabsPosition": "top",
"hideMenu": false,
"variables": "@{parent.variables}",
"traversing": false,
"value": "",
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"typeTags": "",
"decimals": 2,
"target": "",
"ignoreDefaults": false,
"bypass": false,
"onCreate": "",
"onValue": "",
"onTouch": "",
"onPreload": "",
"widgets": [],
"tabs": []
}
}

8
docker-compose.yml Normal file
View file

@ -0,0 +1,8 @@
services:
app:
build: .
volumes:
- ./sessions:/sessions
ports:
- 8080:8080

10
entrypoint.sh Normal file
View file

@ -0,0 +1,10 @@
#!/bin/sh
test -f "$LOAD" || cp "basesession.json" "$LOAD"
exec node app/index.js \
--port $PORT \
--osc-port $OSC_PORT \
--send $SEND \
--load $LOAD \
--read-only=$READ_ONLY

9718
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -2,7 +2,7 @@
"name": "open-stage-control",
"productName": "Open Stage Control",
"description": "Libre and modular OSC / MIDI controller",
"version": "1.16.2",
"version": "1.31.2",
"author": {
"name": "Jean-Emmanuel Doucet",
"email": "jean-emmanuel@ammd.net"
@ -15,97 +15,96 @@
],
"repository": {
"type": "git",
"url": "https://github.com/jean-emmanuel/open-stage-control"
"url": "https://framagit.org/jean-emmanuel/open-stage-control"
},
"homepage": "http://openstagecontrol.ammd.net/",
"license": "GPL-3.0",
"dependencies": {
"@babel/core": "7.13.16",
"@babel/plugin-proposal-object-rest-spread": "7.13.8",
"@babel/polyfill": "7.12.1",
"@babel/preset-env": "7.13.15",
"@electron/remote": "2.0.1",
"ansi-html": "0.0.7",
"babel-eslint": "10.1.0",
"@babel/core": "7.18.0",
"@babel/preset-env": "7.18.0",
"@electron/packager": "18.4.4",
"@electron/remote": "2.1.3",
"@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": "1.0.0",
"bonjour": "github:jean-emmanuel/bonjour",
"brace": "0.11.1",
"browserify": "17.0.0",
"chokidar": "3.5.1",
"chroma-js": "2.1.1",
"core-js": "3.11.0",
"balanced-match": "2.0.0",
"bonjour": "git+https://framagit.org/jean-emmanuel/bonjour.git",
"chokidar": "3.5.3",
"chroma-js": "2.4.2",
"core-js": "3.22.5",
"cpr": "3.0.1",
"deep-extend": "0.6.0",
"electron-localshortcut": "3.2.1",
"electron-packager": "15.2.0",
"electron-packager-plugin-non-proprietary-codecs-ffmpeg": "1.0.2",
"env-paths": "2.2.1",
"eslint": "7.24.0",
"exorcist": "2.0.0",
"fastdom": "^1.0.10",
"eslint": "8.16.0",
"fastdom": "1.0.10",
"file-saver": "2.0.5",
"gyronorm": "2.0.6",
"http-auth": "4.1.5",
"json5": "2.2.0",
"http-auth": "4.1.9",
"json5": "2.2.1",
"jsondiffpatch": "0.4.1",
"keyboardjs": "2.6.4",
"licensify": "3.1.3",
"loop-protect": "github:jean-emmanuel/loop-protect#v1.0.1",
"minimatch": "3.0.4",
"nanohtml": "1.9.1",
"nanoid": "3.1.22",
"minimatch": "5.1.0",
"nanohtml": "1.10.0",
"nanoid": "3.3.4",
"nanomorph": "5.4.3",
"node-forge": "0.10.0",
"node-sass": "6.0.1",
"nodemon": "2.0.7",
"node-forge": "1.3.1",
"node-mouse": "0.0.2",
"nodemon": "2.0.16",
"nosleep.js": "0.12.0",
"open": "8.0.6",
"osc": "github:jean-emmanuel/osc.js",
"python-shell": "3.0.0",
"open": "8.4.0",
"osc": "2.4.5",
"python-shell": "3.0.1",
"qrcode": "1.5.1",
"replacestream": "4.0.3",
"sanitize-html": "1.27.5",
"rollup": "4.50.1",
"rollup-plugin-copy": "3.5.0",
"rollup-plugin-license": "^3.6.0",
"rollup-plugin-node-externals": "^8.1.1",
"sass": "1.89.2",
"scope-css": "1.2.1",
"screenfull": "5.1.0",
"semver": "7.3.5",
"send": "0.17.1",
"sortablejs": "1.13.0",
"source-map-support": "0.5.19",
"screenfull": "5.2.0",
"semver": "7.3.7",
"send": "0.18.0",
"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": "7.4.5",
"yargs": "16.2.0"
"ua-parser-js": "2.0.7",
"ws": "8.6.0",
"yargs": "17.5.1"
},
"optionalDependencies": {
"electron": "15.1.0",
"electron-installer-debian": "3.1.0"
"electron": "36.9.5",
"electron-installer-debian": "3.1.0",
"electron-installer-redhat": "git+https://framagit.org/jean-emmanuel/electron-installer-redhat.git"
},
"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",
"deb64": "electron-installer-debian --src dist/open-stage-control-linux-x64/ --arch amd64 --dest dist/ --icon resources/images/logo.png",
"rpm64": "electron-installer-redhat --src dist/open-stage-control-linux-x64/ --arch x86_64 --dest dist/ --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-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"
"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-launcher-js -- --watch",
"build-docs": "rollup -c scripts/docs.rollup.config.js && node src/docs/widgets-reference.js > resources/docs/docs/widgets/properties-reference.md && cd resources && python3 -m mkdocs build",
"lint": "eslint src --ext mjs",
"test": "npm run lint && npm run build"
},
"engines": {
"node": ">=12"
},
"devDependencies": {
"watchify": "4.0.0"
"node": ">=16"
}
}

View file

@ -9,12 +9,17 @@ Client options can be set either with the server's `--client-options` option, or
| zoom | number | 1 | sets the initial zoom |
| framerate | number | 60 | limit canvas drawing framerate |
| desyncCanvas | number | 0 | set to 1 to enable desynchronized canvas (may improve rendering performances) |
| lang | string | *system_default* | use a different language than the default if available (available languages: en, fr) |
| lang | string | *system_default* | use a different language than the default if available (available languages: en, fr, de, pl) |
| consoleLength | number | 300 | sets the maximum number of log messages in the client's console |
| id | string | *random_id* | client's unique id (use with caution: two clients should never have the same id) |
| usePercents | 1 / 0 | 0 | sets the editor's "relative units" option |
| noFocus | 1 / 0 | 0 | (built-in client only) prevent the client window from taking focus unless a text input or a dropdown is clicked |
| noFocus | 1 / 0 | 0 | (built-in client only) prevent the client window from taking focus |
| clientSync | 1 / 0 | 1 | set to 0 to prevent the client from syncing with other clients |
| 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 |
| noWarning | 1 / 0 | 0 | set to 0 to disable unsaved session warnings |
Example:

View file

@ -1,19 +1,17 @@
## License
Copyleft © Jean-Emmanuel Doucet @ [AMMD](http://ammd.net) 2014-2021.
This program is a free software released under the [GNU/GPL3](https://github.com/jean-emmanuel/open-stage-control/blob/master/LICENSE) license.
Copyleft © Jean-Emmanuel Doucet 2014-2025.
This program is a free software released under the [GNU/GPL3](https://framagit.org/jean-emmanuel/open-stage-control/-/blob/master/LICENSE) license.
## Dependencies
Open Stage Control relies on several other free softwares:
Open Stage Control relies on several other free softwares listed in [package.json](https://framagit.org/jean-emmanuel/open-stage-control/-/blob/master/package.json).
https://github.com/jean-emmanuel/open-stage-control/network/dependencies
The default theme is based on [Nord](https://www.nordtheme.com/), some UI components are inspired by the [Atom](https://atom.io/) text editor.
The default theme was based on [Nord](https://www.nordtheme.com/), some UI components were inspired by the text editor formerly known as Atom (now [Pulsar](https://pulsar-edit.dev/)).
## Contributors
https://github.com/jean-emmanuel/open-stage-control/graphs/contributors
[Jean-Emmanuel](https://framagit.org/jean-emmanuel), [MartinHN](https://github.com/MartinHN), [Eric Theise](https://github.com/erictheise), [danielappelt](https://github.com/erictheise), [ritschwumm](https://github.com/ritschwumm), [matthijskooijman](https://github.com/matthijskooijman), [WillyKaze](https://github.com/WillyKaze), [stefanboca](https://github.com/stefanboca), [pixelnerve](https://github.com/pixelnerve), [AdamAdamsMusic](https://github.com/AdamAdamsMusic), [wicast](https://github.com/wicast), [kdallafior](https://github.com/kdallafior), [brunetton](https://github.com/brunetton), [cyberic99](https://github.com/cyberic99), [kdejaeger](https://github.com/kdejaeger), [trebmuh](https://github.com/trebmuh), [MagnusReichel](https://github.com/MagnusReichel), [jpcima](https://github.com/jpcima), [t1st3](https://github.com/t1st3")
## Infrastructure supports

View file

@ -10,13 +10,26 @@ Using the server's `custom-module` option, users can load a custom javascript mo
// Do whatever you want
// initialize variables
// declare functions
// listen to app events
// load modules
// etc
module.exports = {
init: function(){
// this will be executed once when the osc server starts
// this will be executed once when the osc server starts after
// connections are set up
// it is called for the main module only
},
stop: function(){
// this will be executed once when the osc server stops
// it is called for the main module only
},
reload: function(){
// this will be executed after the custom module is reloaded
// it is called for the main module only
},
oscInFilter:function(data){
@ -48,7 +61,8 @@ module.exports = {
},
unload: function(){
// this will be executed when the custom module is reloaded
// this will be executed before the custom module is reloaded
// it is called for all modules, including other loaded modules
},
}
@ -62,7 +76,7 @@ The module is executed in a restricted context, only a few globals are available
----
#### `app`
[`Event Emitter`](https://nodejs.org/api/events.html#events_class_eventemitter), useful for monitoring the events sent by the different clients. Event names can be found in [callbacks.js](https://github.com/jean-emmanuel/open-stage-control/blob/master/src/server/callbacks.js), callbacks are called with 2 arguments: `data` (object) and `client` (object: `{address, id}`)
[`Event Emitter`](https://nodejs.org/api/events.html#events_class_eventemitter), useful for monitoring the events sent by the different clients. Event names can be found in [callbacks.js](https://framagit.org/jean-emmanuel/open-stage-control/-/blob/master/src/server/node/ipc/callbacks.mjs), callbacks are called with 2 arguments: `data` (object) and `client` (object: `{address, id}`)
----
@ -76,6 +90,8 @@ Send osc/midi message to connected clients. `host` and `port` can be specified t
- `args`: value or `{type: "OSC_TYPE_LETTER", value: VALUE}` `object` (objects that don't match this format will simply be turned to a JSON string).
- `options` (optional): set to `{clientId: id}` to define which client receives the message (where `id` is the client's id as retrieved from `app` events or `oscOutFilter`)
For convenience, `host` and `port` can be provided both as single string argument joined with a colon.
----
#### `send(host, port, address, ...args)`
@ -96,16 +112,24 @@ Returns the server's http addresses.
----
#### `loadJSON(path)`
#### `loadJSON(path, errorCallback)`
Loads a json file (path is relative to the custom module location)
- `path`: `string`, path to file (any extension allowed, but the content must be valid JSON)
- `errorCallback` (optional): `function`, called with the error as argument if the file can't be loaded
----
#### `saveJSON(path, object)`
#### `saveJSON(path, data, errorCallback)`
Saves an object/array to a json file (path is relative to the custom module location)
- `path`: `string`, path to file (any extension allowed)
- `data`: `object`, `array` or any value that can be encoded to JSON
- `errorCallback` (optional): `function`, called with the error as argument if the file can't be loaded
----
#### `require(path)`
@ -127,6 +151,26 @@ This function can be used to load native node modules or locally installed modul
----
#### `tcpServer`
Raw access to the server's [TCP backend](https://framagit.org/jean-emmanuel/open-stage-control/-/blob/master/src/server/node/osc/tcp.mjs). Can be used to monitor the state of TCP connections:
```js
for (var ip in tcpServer.clients) {
tcpServer.clients[ip].port.on('ready', ()=>{
console.log(`TCP connection established with ${ip}:${tcpServer.clients[ip].remotePort}`)
})
tcpServer.clients[ip].port.on('close', ()=>{
console.log(`TCP connection lost with ${ip}:${tcpServer.clients[ip].remotePort}`)
})
}
```
#### `restartMidiBackend()`
This function can be used to restart the midi backend (if already running) without restarting the server
#### Other javascript globals
- `console`
@ -137,13 +181,16 @@ This function can be used to load native node modules or locally installed modul
- `__dirname`
- `__filename`
- `process`
- `global`
----
## Autoreload
Custom modules (including submodules loaded with `require()`) are reloaded automatically when they are modified. Upon reload, timers (`setTimeout` and `setInterval`) and event listeners (added to the  `app` object) are reset.
Custom modules (including submodules loaded with `require()`) are reloaded automatically when they are modified. Upon reload, timers (`setTimeout` and `setInterval`) and event listeners (added to the  `app` object) are reset. After each reload the `module.exports.reload()` function (if any) is called.
The `global` object persists accross reloads.
??? "Reloading native modules"

View file

@ -378,9 +378,9 @@ module.exports = {
if (m.init) m.init()
}
},
unload: function(){
reload: function(){
for (var m of submodules) {
if (m.unload) m.unload()
if (m.reload) m.reload()
}
},
oscInFilter: function(data){
@ -404,3 +404,68 @@ module.exports = {
}
}
```
## Dynamic widget creation
```js
function create_widgets() {
receive('', '', '/EDIT', 'root', {
widgets: [{
type: 'panel',
id: 'my_panel',
layout: 'vertical',
width: '100%',
height: '200%',
widgets: [
{
type: 'text',
id: 'notice',
value: 'Hello, world!',
width: '100%',
},
{
type: 'button',
id: 'button',
address: '/foo',
preArgs: [1],
},
]
}]
})
}
module.exports = {
reload: function(){
// Create widgets whenever the custom modules is edited
create_widgets()
},
}
// Create widgets whenever an existing session is loaded
app.on('sessionOpened', ()=>{
create_widgets()
})
// And when a new session is created
app.on('sessionSetPath', (e)=>{
if (e.path === '') {
create_widgets()
}
})
```
## Simple bridge
```js
module.exports = {
oscInFilter: function(data) {
// pass through incoming messages directly to another application
send('127.0.0.1', 12345, data.address, ...args)
return data // let original message reach clients / widgets
}
}
```

View file

@ -27,12 +27,12 @@ CSS selectors can be used to apply styles to specific elements:
*/
}
.label {
/* style for the .label elements */
label {
/* style for the label elements */
}
> .label {
/* style for the direct child .label element */
> label {
/* style for the direct child label element */
}
```

View file

@ -1,8 +1,5 @@
Welcome to Open Stage Control documentation. Along these pages you'll learn how to setup OSC on your system and everything you need to start building your own control interface.
!!! info "Still using v0 ?"
The documentation for this version is available [here](https://v0.openstagecontrol.ammd.net).
## Overview
Open Stage Control consists of 3 modules: the server, the launcher and the client.
@ -20,15 +17,15 @@ The **server** can run on all [platforms supported by Electron](https://www.elec
The **client** is compatible with the following browsers:
- Firefox: version `75`
- Chromium / Chrome: version `60`
- Firefox: version `75` and higher
- Chromium / Chrome: version `75` and higher
iOS devices must be of version `10.3` or higher.
iOS devices must be of version `11` or higher.
## Installation
??? example "Linux 64bit"
=== "Linux 64bit"
**Ubuntu / Debian**
@ -44,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`

View file

@ -2,7 +2,7 @@ Running the app from the sources slightly differs from using prebuilt binaries:
## Requirements
- [Node.js](https://nodejs.org/en/#download) (v12 to v16)
- [Node.js](https://nodejs.org/en/#download)
- [git](https://git-scm.com/downloads)
@ -12,7 +12,7 @@ Running the app from the sources slightly differs from using prebuilt binaries:
**Download**
```bash
git clone https://github.com/jean-emmanuel/open-stage-control
git clone https://framagit.org/jean-emmanuel/open-stage-control.git
cd open-stage-control/
# uncomment next line if you want the latest release
# instead of the current development version
@ -47,7 +47,7 @@ npm start [ -- options]
!!! warning "MIDI support"
When running from sources, MIDI support won't be enabled unless the [MIDI configuration procedure](../midi/midi-configuration/) for "other systems" is followed.
When running from sources, MIDI support won't be enabled unless the [MIDI configuration procedure](../../midi/midi-configuration/) for "other systems" is followed.
## Build documentation
@ -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

View file

@ -170,6 +170,25 @@ The following options can only be set from a terminal.
Override default config file location (contains session history and launcher config). Defaults to `cache-dir/config.json`.
!!! quote ""
#### `client-position`
Define the built-in client window position, must be a pair of integers separated by a comma (`x,y`).
!!! quote ""
#### `client-size`
Define the built-in client window size, must be a pair of integers separated by a comma (`width,height`).
!!! quote ""
#### `no-qrcode`
Disable qrcode when the server starts.
!!! quote ""
#### `help`

View file

@ -3,10 +3,10 @@
=== "Linux / Windows / OSX"
Since version `1.7.0`, Open Stage Control comes bundled with built-in MIDI support if you're using the 64bit package for Linux, OSX or Windows.
Open Stage Control comes bundled with built-in MIDI support if you're using the official package for Linux, OSX or Windows.
=== "Other systems"
=== "Other systems / Node"
Enabling MIDI support on other systems or when building Open Stage Control from sources requires additional softwares to be installed on the server's system:
@ -16,8 +16,10 @@
??? example "Linux"
Install `python3-rtmidi` from your distribution's package repository, or if it's not available:
- Install `python3` and `python3-pip` from your distribution's package repository
- Install `python-rtmidi` from a terminal by executing this command
- Run this command in a terminal
```bash
python3 -m pip install python-rtmidi --upgrade
```
@ -77,6 +79,11 @@ Enable parsing of system exclusive messages (disabled by default).
Enable parsing of midi time code messages (disabled by default).
**`rpn`**
Enable sending and receiving [RPN/NRPN](https://en.wikipedia.org/wiki/NRPN) controls on as single `/rpn` / `/nrpn` messages instead of 3 or 4 control changes that constitute them.
**`active_sensing`**
Enable parsing of midi active sensing messages (disabled by default). Active sensing messages will be received as sysex.
@ -87,7 +94,11 @@ Send program changes with a `-1` offset to match some software/hardware implemen
**`note_off_velocity`**
Enable receiving noteOff messages with a velocity and on a different address than noteOn messages.
Use `/note_on` for noteOn messages and `/note_off` for noteOff messages instead of the defaut `/note` and velocity 0 for note off.
**`auto_note_off`**
Prevent converting outgoing noteOn messages with velocity 0 to noteOff messages.
**`device_name:virtual`** (*Linux / Mac only*): creates a virtual midi device with one input port and one output port

View file

@ -107,3 +107,24 @@ Polyphonic key pressure event.
- `pressure`: integer between 0 and 127
----
#### `/rpn channel rpn value`
Registered Parameter Number event.
- `channel`: integer between 1 and 16
- `rpn`: integer between 0 and 16383
- `value`: integer between 0 and 16383
----
#### `/nrpn channel nrpn value`
Non-Registered Parameter Number event.
- `channel`: integer between 1 and 16
- `nrpn`: integer between 0 and 16383
- `value`: integer between 0 and 16383
----

View file

@ -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.
@ -11,8 +11,7 @@ When osc messages are received, the default behavior is to update the value of a
#### `/EDIT id properties options`
Apply a set of options to an existing widget by replacing the old ones with the new ones. This ignores the widget's `lock` property.
Apply a set of options to an existing widget by replacing the old ones with the new ones. This ignores the widget's `lock` property. If sent by a custom module using `receive()`, this command will not be prevented by the server's `read-only` option.
- `id`: `string`, widget's `id`
- `properties`: `string`, [JSON5](https://github.com/json5/json5) stringified object defining the new properties to merge
@ -20,10 +19,6 @@ Apply a set of options to an existing widget by replacing the old ones with the
- `options` (optional): `string`, [JSON5](https://github.com/json5/json5) stringified object defining extra option flags:
- `noWarning`: set to `true` to prevent further warning when exiting.
!!! danger "Warning"
Editing widgets is cpu expensive; for small and recurrent changes, consider using [osc listeners](./widgets/advanced-syntaxes.md) instead.
----
#### `/EDIT/MERGE id properties options`
@ -117,10 +112,14 @@ Same as `/GET` but uses the widget's address instead of `/GET` to reply.
----
#### `/NOTIFY message`
#### `/NOTIFY icon message`
Sends a notification message to the client.
- `icon`: icon for the notification, for example : `^play`, `^pause`, etc (see https://fontawesome.com/icons?d=gallery&s=solid&m=free)
- `message`: message content
----
#### `/LOG message`
@ -160,11 +159,12 @@ Sends back the app's state to specified target
----
#### `/STATE/SET state`
#### `/STATE/SET state send`
Set widgets' state
- `state`: `string`, json stringified object (`"widget_id": value` pairs)
- `send` (optional): `boolean`, set to `false` to prevent widgets from sending their values when the state is applied
@ -198,10 +198,15 @@ Open state file `path.state`.
#### `/STATE/SAVE path.state`
Save state session to `path.state`. If `path.state` is omitted, current session's path is used.
Save state session to `path.state`.
----
#### `/SESSION/CREATE`
Create a new empty session. Unsaved changes will be lost.
----
#### `/SESSION/OPEN path.json`
Open session file `path.json`.

View file

@ -0,0 +1,149 @@
# Change a widget property with an osc message
By default, widgets only expose their value to incoming messages, but there are multiple ways to allow changing any widget property using osc messages as well. In this tutorial we'll explore the different possibilities for exposing the `visible` property of a widget to incoming messages, but it applies to any other property.
## 1. Using a variable widget
Create a variable widget and set up its `address` (and `preArgs` if needed) so that it receives the messages you want to use, and then in your other widget's `visible` property, use the [inheritance syntax](../widgets/advanced-syntaxes.md#inheritance-idproperty) to retrieve the variable's value:
=== "Inheritance syntax"
```
@{variable_id}
```
=== "Inheritance syntax + Javascript"
```js
JS{
// bonus, in case you don't want to use the variable's value as-is
if (@{variable_id} > 0.5) {
return true
} else {
return false
}
}
```
Now the variable's value will determine the visibility of the widget. The `visible` property expects a boolean value (`true` for visible, `false` for invisible) but any [truthy](https://developer.mozilla.org/en-US/docs/Glossary/truthy) / [falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy) will do (e.g. `1` for visible, `0` for invisible is a sensible choice).
## 2. Using the OSC listener syntax
The [OSC listener syntax](../widgets/advanced-syntaxes.md#osc-listeners-oscaddress-default-usepreargs) might be a more straightforward solution for simple use cases. Writing this in a widget's `visible` property:
=== "Relative address"
```
OSC{show}
```
will listen for messages on address `/widget_address/show` and return the last received value.
If we write this instead:
=== "Absolute address"
```
OSC{/show}
```
the address will be `/show` and won't be prefixed with the widget's address as before.
It is often needed to specify the initial state of the listener (before it receives any message), this is done via the second argument of the listener syntax:
=== "Default value (true)"
```
OSC{show, true}
```
=== "Default value (truthy)"
```
OSC{show, 1}
```
=== "Default value (false)"
```
OSC{show, false}
```
=== "Default value (falsy)"
```
OSC{show, 0}
```
If the widget has any preArgs set, the osc listener will inherit them by default, this means that for a message to change the listener's value it will not only have to match its address but also the widget's `preArgs`, this can be prevented using the third argument of the listener syntax:
=== "Ignore preArgs"
```
OSC{show, 1, false}
```
## 3. Using custom variables
The [custom variable syntax](../widgets/advanced-syntaxes.md#custom-variables-varvariablename-default) connects regular properties and scripting properties (`onCreate`, `onValue`, etc), writing this in the `visible` property:
```
VAR{show}
```
will create a custom variable named `show` scoped to the widget (custom variables do not use a global namespace and multiple widgets may use the same names for their custom variables without conflict). This custom variable can be read and set from any widget scripting property using the [`getVar()` / `setVar()`](../widgets/scripting.md#getvarid-name) functions.
For instance, we could use a variable widget as osc receiver like in the first example of this tutorial and use it's `onValue` script to change the custom variable's value (instead of using the inheritance syntax):
```js
// variable widget onValue
// simply pass received value to the custom variable
setVar('widget_id', 'show', value)
```
The custom variable's initial state can be specified:
```
VAR{show, 1}
```
## 4. Using /EDIT commands
The [`/EDIT`](../remote-control.md) remote control command can be used to modify any widget property in the session, for instance:
```
/EDIT widget_id '{visible: false}'
```
Will hide the widget with id `widget_id`. Note that this is different from the 3 techniques described above in that it actually modifies the session and changes the property value in a destructive way (the property is rewritten, not just its state). When quitting the session after using it a warning indicating the session has unsaved changes will be shown, this can be prevented by appending a extra argument to the message:
```
/EDIT widget_id '{visible: false}' '{noWarning: true}'
```
Note that the arguments after `widget_id` are sent as strings ([JSON5](https://github.com/json5/json5)-encoded objects), this is because sending plain javascript object over osc is not possible.
## Bonus: custom module
Any of these techniques can be used in conjunction with a [custom module](../custom-module/custom-module.md). Using the `receive()` function allows simulating incoming osc messages and can be used to trigger property changes:
=== "Variable widget"
```js
var visible = true
receive('/variable_id', visible)
// or if variable widgets has preArgs
receive('/variable_id', preArg1, preArg2, visible)
```
=== "OSC listener"
```js
var visible = true
receive('/widget_address/show', visible)
// or if listener has preArgs
receive('/widget_address/show', preArg1, preArg2, visible)
```
=== "Custom variable"
```js
var visible = true
receive('/SCRIPT', `setVar('widget_id', 'show', ${visible})`)
```
=== "/EDIT command"
```js
var visible = true
// what's really cool here is that you don't need to stringify objects arguments
// receive() will take care of that for you
receive('/EDIT', 'widget_id', {visible: visible}}, {noWarning: true})
```

View file

@ -0,0 +1,252 @@
# First Steps with Open Stage Control
*Contributed by H. James Harkins, Feb. 2023*
Let's walk through the basic steps to build a simple interface in Open Stage Control, send information to another app, and deploy the interface to remote (even mobile) devices.
Before beginning, you should already have installed Open Stage Control -- see the [Introduction](../getting-started/introduction.md).
Also: This document provides sample patches for SuperCollider, Pure Data and Max/MSP, to receive control data from the Open Stage Control interface. If you do not have any of these tools, I suggest to install [Pure Data](https://puredata.info/downloads/pure-data) because it has the smallest footprint.
## The Launcher
Use your system's application launcher, open the Open Stage Control app. Here, you can configure options for the interface server.
For now, go to the first box ("send") and type in `127.0.0.1:57120`. This will tell the server to send Open Sound Control messages to the same machine where the server is running, on port 57120.
NOTE: For your own applications, you can use any port that is not in use. For this example, I chose 57120 because it is SuperCollider's default UDP port (and I set the Pure Data and Max patches to use the same port, to simplify.)
You don't need to set any other options at this time.
### Addresses and ports
Many users approaching Open Sound Control for the first time get confused about ports. You need to be aware of the FROM and TO addresses. The "send" field in the Launcher should reference the address TO which messages should be sent. In this demo, we are assuming that Open Stage Control and the target app are running on the same machine. So the TO address is localhost: `127.0.0.1`. The "send" box should use the port *on which the target app is receiving messages*. This is typically under control of the target app: 1/ SuperCollider opens 57120 by default; 2/ Pd's [netreceive] object, and Max's [udpreceive], both require the TO port as an argument. So the TO port is your choice, as long as they match.
Open Stage Control sends messages FROM the IP address of the machine where Open Stage Control is running, and from port 8080 (or localhost = `127.0.0.1` if on the same machine). Thus, if the receiving app will filter incoming messages based on address, the filtering address should be the FROM address, port 8080. The target app can also update Open Stage Control's display by sending messages back to exactly this address. So you will see later, in the demo patches, that messages are sent to `127.0.0.1:8080` so that the user's interaction with the target app appears in Open Stage Control as well.
## Starting the server
Click the "play" button near the top left of the window. You should see status messages in the launcher window such as:
```
(INFO) Server started, app available at
http://127.0.0.1:8080
http://your.ip.ad.dress:8080
```
And a new, mostly empty, window will open. This new, larger window is the *client*.
## The client
The client allows you to edit and perform your interface.
The interface design is called a *session*. To create a new session, go to the "three-dots" menu at the top left, and choose Session > New session.
Two new panels are displayed: a project browser, and an object inspector (to set properties). The empty space in the middle is the editor, where you will build the interface.
Let's start with a toggle button. Right-click in the empty editor panel in the middle, and navigate to Add widget > Basics > button. For this demo, we don't need to change anything else: the button defaults to toggle behavior, and the display text is not important for now (although you can change it in the inspector, if you want).
And let's add one more control, to the right of this: Right-click, Add widget > Sliders > fader.
![](./first-steps/two-widgets.png)
When a widget is selected, you can move it by dragging the top-left handle, and resize it by dragging the bottom-right handle. Let's use these handles to position the fader to the right of the button, and stretch it to be horizontal instead of vertical.
![](./first-steps/resized-fader.png)
Notice, however, that the fader's value handle is still vertical. To fix this, look in the Inspector at the right, expand "Fader style," and check the "horizontal" checkbox.
![](./first-steps/fader-style.png)
![](./first-steps/horizontal-fader.png)
By the way: I suggest to keep the widgets closer to the top left, so that they are still visible on a phone screen (later).
When designing an interface for production, you would change other object properties as well. In particular, the Open Sound Control addresses `/button_1` and `/fader_1` are not very descriptive. You would probably want to assign different command paths, in the "osc" tab. As this is just an introduction, we won't do that now.
## Receiving the data
At this time, the interface can already be used: three-dots menu > Editor > "Enabled" (click to disable the editor). (The controls will respond also when the editor is enabled, but you have to click an extra time to select the widget before changing its value.)
To see the effect, launch one of the following apps and open the given patch. The Open Stage Control button should open and close the envelope, and the fader should control frequency. The patches also send control data from their own GUIs back to Open Stage Control, so all of the controls should be synced in both directions.
NOTE: In Pure Data and Max, the default slider/fader range is 0-127, integers. Open Stage Control uses the range 0.0 - 1.0 by default. If you just create a slider and connect it, you won't see much action. In the example patches, the slider's properties have been modified to take a 0.0 - 1.0 floating-point range, matching the data from Open Stage Control.
NOTE: Because all of the patches bind to the same UDP port, you can open only one at a time. You could, if you like, change the port number in one patch, and add that port by specifying multiple "send" targets in the Launcher, e.g. `127.0.0.1:57120 127.0.0.1:7374`.
NOTE: These patches are provided as a courtesy to get you started more quickly. Maintaining, extending or developing them is outside the scope of the Open Stage Control community.
!!! Example "Choose your app"
=== "Pure Data"
Copy the code below, and save it into a text file `osc-first-steps.pd`. Then open it in Pure Data.
```
#N canvas 436 127 562 502 12;
#X obj 86 51 loadbang;
#X msg 86 76 \; pd dsp 1;
#X obj 253 51 netreceive -u -b 57120;
#X obj 253 76 oscparse;
#X obj 253 101 list trim;
#X obj 253 126 route fader_1 button_1;
#X msg 253 190 4 \$1;
#X obj 253 215 pow;
#X obj 253 240 * 200;
#X obj 253 265 lop~ 3;
#X msg 328 265 \$1 100;
#X obj 328 304 line~;
#X obj 279 356 *~;
#X obj 279 381 *~ 0.1;
#X obj 266 424 dac~;
#X text 38 139 Open Stage Control \; "First Steps" tutorial \; hjh
2023;
#X obj 253 304 osc~ 200;
#X obj 328 159 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000
#000000 0 1;
#X obj 256 159 hsl 60 15 0 1 0 0 empty empty empty -2 -8 0 10 #fcfcfc
#000000 #000000 0 1;
#X obj 70 251 unpack f s;
#X obj 70 325 oscformat;
#X msg 137 283 set \$1;
#X obj 70 424 netsend -u -b;
#X obj 93 356 loadbang;
#X msg 93 381 connect 127.0.0.1 8080;
#X obj 70 226 r sendback;
#X msg 379 200 \; sendback \$1 button_1;
#X msg 379 233 \; sendback \$1 fader_1;
#X connect 0 0 1 0;
#X connect 2 0 3 0;
#X connect 3 0 4 0;
#X connect 4 0 5 0;
#X connect 5 0 18 0;
#X connect 5 1 17 0;
#X connect 6 0 7 0;
#X connect 7 0 8 0;
#X connect 8 0 9 0;
#X connect 9 0 16 0;
#X connect 10 0 11 0;
#X connect 11 0 12 1;
#X connect 12 0 13 0;
#X connect 13 0 14 0;
#X connect 13 0 14 1;
#X connect 16 0 12 0;
#X connect 17 0 10 0;
#X connect 17 0 26 0;
#X connect 18 0 6 0;
#X connect 18 0 27 0;
#X connect 19 0 20 0;
#X connect 19 1 21 0;
#X connect 20 0 22 0;
#X connect 21 0 20 0;
#X connect 23 0 24 0;
#X connect 24 0 22 0;
#X connect 25 0 19 0;
```
=== "Max/MSP"
Copy the text below. In Max, choose File > New from clipboard.
```
----------begin_max5_patcher----------
949.3oc0XkraaCCD8rCP9GHDxo.GWRJpEWzaEnW6gdrInfVlwgoxjBRTYEMe
6khTx0HgVlwP1MFAwBZnjl2algyBe9zSFELS9.qJ.7YvOAiF8rVxHirFIi5D
LJXI8grbZk4ACVxppnKXAiaWTwdPYV3SWSmyJ+EBbFZ0h74lkjyt8BDdkzBp
J6FtXwuJYYJq1wwjIvw.LJt4RRh4F7DH3ptWRTujKxYJCJvqIUVq5Di5Dako
drfY+7AAfqLK8mSOo4p9x3AfwypUJoXiTNtWFSBaHIJB1bIM5iDiEr603+sD
tddQESLGfvZGj9ODHElBc5s8f5gnTqEHdKbG4l6vcleYxkKYB0aI32KXBvOT
ZuM3qRgpTlCtL3a7xJkVJqn5x.fpVIK4zbvEfat8F.FhCW8cx4BVlrVX9XgN
LK3DerKv0BLHoGNyRUNWuC1k6DG0GtsHEAM9wXCGvvsC6qykTkF3E0pdnC5e
JtjtjozoXXB5rbSbNruv+t0p3OYjhlr6lFkbwhblSSCoOSCBkLIZksAS5988
4R2Qa.uIP7pgeWxWt3BPVNO62.kDXABfVOmKcZe5MuOJzj3iDEYLSsUAfGtX
d1SyoYu3D3vdi4mNIQiXhcKKIp622W5a3fmh97W.57xNSIOsO9jfab.gSmZH
xfW+shuPPy2G0jN2oyCk5AYiwFZNs4liCx1TfwMeS7HKTaAWBb27t3sQ3wff
YTwh8RuVmgzIQc2pQrGTGaqQEAOFZyJ6wr7M3lIauNbqWd3o5+ivZz14KNM7
XNpNxcPMzCh21gX3wPL845p5vItnZpGL0NVHYvGRxzB5dwyR1vLgIdzHc693
ihQBKj26hl9LufceaX3GNm5l3ZoVULvpy4X03+tL.djn11rKJhrECPnaCP3l
8yia+e+bD.Zdv32w.QIHryjWgdTjxFBfR1sQ+eOw31uroFyqOpKC7ZV3UVhJ
YcYV2Wr6vq.qgw4rJEWPUboX8mx9Pa1l6s9Zl21C88JTIKaFeu+wJ7GBDefP
7dDAwGVadpWpCNX5KwG8EMXpyqHpzAScdE8fiFT8g1p9HCl9B8gejCbBgjMr
aDcvxGfh2iPn4DL7HnB9w.Bn8TZQjeIplNXwdHuxTYfEZXTneY9SFNFR7lgC
jBQdovgK+AB5kBcWMssCJZQwcrxp1WwpKcSi2JMg1ois2yE16ssnETxti28J
1SpNfVp6IToaHrtz.wfGha6VNXoTuQQTy61t1v1FUa5KUP0SaUPs7xz+5omn
ef+B9C+QQC
-----------end_max5_patcher-----------
```
=== "SuperCollider"
Copy/paste the code below into a new code document. Run the entire block to start. It will clean up when you close the GUI window.
```
// OSC response part
(
var addr = NetAddr("127.0.0.1", 8080); // FROM address
var freqRange = ControlSpec(200.0, 800.0, \exp);
var button, slider;
OSCdef(\button, { |msg|
defer { button.value = msg[1] };
if(x.notNil) { x.set(\gate, msg[1]) };
}, '/button_1', addr);
OSCdef(\slider, { |msg|
defer { slider.value = msg[1] };
if(x.notNil) { x.set(\freq, freqRange.map(msg[1])) };
}, '/fader_1', addr);
w = Window("Open Stage Control", Rect(800, 200, 400, 100)).front;
w.layout = HLayout(
button = Button(),
slider = Slider().orientation_(\horizontal)
);
w.alwaysOnTop = true; // may not take effect in all window managers
button.states = [["off"], ["playing", Color.black, Color(0.7, 1, 0.7)]];
button.action = { |view|
if(x.notNil) { x.set(\gate, view.value) };
addr.sendMsg('/button_1', view.value);
};
slider.action = { |view|
if(x.notNil) { x.set(\freq, freqRange.map(view.value)) };
addr.sendMsg('/fader_1', view.value);
};
w.onClose = {
if(x.notNil) { x.free };
OSCdef(\button).free;
OSCdef(\slider).free;
};
// audio part
// if this fails (if you have an issue with audio devices),
// you won't hear anything but the onscreen GUIs
// will reflect changes from Open Stage Control
s.waitForBoot {
x = { |freq = 200, amp = 0.1, gate = 0|
var eg = EnvGen.kr(Env.asr(0.1, 1, 0.1), gate);
(SinOsc.ar(Lag.kr(freq, 0.1)) * amp * eg).dup
}.play;
};
)
```
## Deploying the interface
The whole point of Open Stage Control is to make the interface available on other devices, especially mobile devices.
The interface will not be visible to other clients, however, until you save it to disk: three-dots menu > Session > Save, and give the file a name such as `open-stage-demo` (you don't need to type the `.json` extension).
Now -- remember those status messages in the launcher window? On another device (computer, phone or tablet), go to the `http://192.168.xxx.yyy:8080` address. The device should be on the same (W)LAN. (If there is another remote address, it may or may not work, depending on your network.) Supported browsers are Firefox v. 75 and higher, or Chromium/Chrome v. 60 and higher.
This should open an empty client window, similar to the one you saw before.
From here, you can open the session that you just saved: three-dots menu *in the webpage* > Session > Open Recent (yes, this is synced from the server!). This should display the controls created in that session, and the controls should function the same as in the other client window.
And that is... it! Basic usage is as simple as that.
For convenience, if there is a session you know that you will use often, and you don't want to load it in the webpage by hand every time, you can choose the file under "load" in the initial Launcher window. This is also useful for public deployments with audience participation, where you don't want audience members to have to load manually.
When not using Open Stage Control, you can also stop the server from the launcher window (stop button, top-left).

Binary file not shown.

After

Width:  |  Height:  |  Size: 6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

View file

@ -28,7 +28,9 @@
- Console
- Enable: toggle console's state
- Clear console: remove logged messages from the console
- Virtual keyboard: (desktop only) toggle virtual keyboard (displayed only when a text input is in focus, except for code editors in the inspector)
- Fullscreen: toggle fullscreen
- Notifications: toggle visibility of notifications
- Prevent sleep (mobile only): attempt to prevent device from going to sleep when idle
## 2. Sidepanels
@ -41,7 +43,7 @@ It is the main component, it contains all the widgets and takes all the availabl
## 4. Notifications
Notifications appear in the lower right corner, they are usually used to convey server status information.
Notifications appear in the lower right corner, they are usually used to convey server status information and can be dismissed with a single click.
## 5. Modals
@ -55,8 +57,8 @@ Modals are virtual popup windows that may contain various content: file browser,
| Shortcut | Description |
|---|---|
| ++ctrl+"Mousewheel"++ | change zoom (dpi scaling) |
| ++alt+"Mousewheel"++ | change zoom (local zoom centered on the cursor) |
| ++ctrl+"Mousewheel"++ | change global zoom (pixel scaling) |
| ++ctrl+0++ | reset global zoom |
| ++ctrl+e++ | enable/disable editor |
| ++ctrl+k++ | show/hide console |
| ++ctrl+l++ | clear console |
@ -69,8 +71,8 @@ Modals are virtual popup windows that may contain various content: file browser,
| Shortcut | Description |
|---|---|
| ++ctrl+"Mousewheel"++ | change zoom (global pixel scaling) |
| ++alt+"Mousewheel"++ | change zoom (local zoom centered on the cursor
| ++ctrl+"Mousewheel"++ | change global zoom (pixel scaling) |
| ++ctrl+0++ | reset global zoom |
| ++ctrl+e++ | enable/disable editor |
| ++ctrl+k++ | show/hide console |
| ++ctrl+l++ | clear console |
@ -83,8 +85,8 @@ Modals are virtual popup windows that may contain various content: file browser,
| Shortcut | Description |
|---|---|
| ++cmd+"Mousewheel"++ | change zoom (global pixel scaling) |
| ++alt+"Mousewheel"++ | change zoom (local zoom centered on the cursor
| ++cmd+"Mousewheel"++ | change global zoom (pixel scaling) |
| ++cmd+0++ | reset zoom |
| ++cmd+e++ | enable/disable editor |
| ++cmd+k++ | show/hide console |
| ++cmd+l++ | clear console |

View file

@ -9,6 +9,7 @@ Clicking on a widget, on a tab label or on an item in the project tree selects t
![](../../img/screenshots/editor.png)
To interact with a widget directly without selecting it, either use the middle mouse button or hold ++shift+win++ (++shift+cmd++ on Mac).
## Menu
@ -39,9 +40,9 @@ Selected widget's properties are displayed and can be modified in the inspector.
- Property fields are all multiline (press `shift + enter` for new line).
- Properties are written in JSON, with some flexibility brought by the [JSON5](https://github.com/json5/json5) format. For example, double quotes around object keys are not mandatory.
- Clicking on a property name spawns a help modal window
- Properties are divided into multiple categories that can be toggled with a click. ++alt+"Click"++ on a category closes the other categories before toggling selected category.
- Properties are divided into multiple categories that can be toggled with a click. ++alt+"Click"++ on a category closes the other categories before toggling selected category.
Some properties (for example `onValue`) have a special code editor with syntax hilighting and many keyboard shortcuts (available by clicking on the "Help" button). In this properties, pressing `enter` will not submit pending changes and instead insert a new line at the cursor position (as you would expect in a regular editor). To submit pending changes, press ++ctrl+enter++ (or ++cmd+enter== on Mac) or click outside the editor.
Some properties (for example `onValue`) have a special code editor with syntax highlighting and many keyboard shortcuts (available by clicking on the "Help" button). In these properties, pressing `enter` will not submit pending changes but instead insert a new line at the cursor position (as you would expect in a regular editor). To submit pending changes, press ++ctrl+enter++ (or ++cmd+enter== on Mac) or click outside the editor.
Widgets can be locked for edition by enabling their `lock` property. When locked, a widget can't be modified by the editor but it remains possible to delete it or to move it from a container to another in the project tree.
@ -100,11 +101,17 @@ Multiple widgets can be edited at once.
| ++down++ | Select current widget's next sibling |
| ++left++ | Select current widget's parent |
| ++right++ | Select current widget's first child |
| ++t++ | Show selected widget in the project tree |
| ++t++ | Show selected widget(s) in the project tree |
| ++y++ | Show selected widget(s) in the session |
| ++ctrl+f++ | Focus search input in project tree |
| ++"Home"++ | Send selected widget to back |
| ++"Page Up"++ | Send selected widget farther |
| ++"Page Down"++ | Bring selected widget closer |
| ++"End"++ | Bring selected widget to front |
| ++"F2"++ | Bring "label" property input into view if selected widget has one |
| ++h++ | Hide selection area and widget resize / drag handles while pressed |
| ++alt+"Mousewheel"++ | change editor zoom |
| ++ctrl+0++ | reset zoom |
=== "Mac"
@ -137,7 +144,13 @@ Multiple widgets can be edited at once.
| ++left++ | Select current widget's parent |
| ++right++ | Select current widget's first child |
| ++t++ | Show selected widget in the project tree |
| ++y++ | Show selected widget(s) in the session |
| ++cmd+f++ | Focus search input in project tree |
| ++"Home"++ | Send selected widget to back |
| ++"Page Up"++ | Send selected widget farther |
| ++"Page Down"++ | Bring selected widget closer |
| ++"End"++ | Bring selected widget to front |
| ++"F2"++ | Bring "label" property input into view if selected widget has one |
| ++h++ | Hide selection area and widget resize / drag handles while pressed |
| ++alt+"Mousewheel"++ | change editor zoom |
| ++cmd+0++ | reset zoom |

View file

@ -7,17 +7,22 @@
- New window: open a new client window (hidden when stopped)
- Load: load server configuration from file
- Save / Save as: save server configuration to file
- List MIDI devices: list available MIDI devices in the console
- MIDI
- List devices: list available MIDI devices in the console
- Restart backend: restart midi backend without restarting the server
- Console:
- 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
- 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.
@ -25,6 +30,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
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
=== "Linux"

View file

@ -54,7 +54,7 @@ Options can contain `@{}` blocks.
JS{
return OSC{address} || {
"key a": 1,
"key b", 2
"key b": 2
}
}
```
@ -68,6 +68,7 @@ This syntax creates a custom variable in the widget that can be read and modifie
This allows loading the content of an external file in a property. If used in a `JS{}` of `#{}` block, it will be seen as a string variable containing the raw content of the file. Changes made to the file be applied automatically.
File paths are resolved in this order:
- in the session's directory
- in theme's directory
- in the server's `remote-root` directory if the option is set

View file

@ -2,7 +2,7 @@
The canvas widget allows creating custom widgets with user-defined drawings and touch reactions.
It has two special properties, `touch` and `draw`, that work like the `script` property : they are used to defined scripts that will be executed when specific events occurs.
It has dedicated scripting properties (`onTouch`, `onDraw` and `onResize`) that work like the `onValue` property : they are used to defined scripts that will be executed when specific events occurs.
This widget requires a good understanding of the javascript [Canvas API](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API) and of the javascript programming language in general.
@ -30,7 +30,7 @@ If this property is enabled, the widget will be redrawn at a fixed rate even if
This script is executed when the widget is touched, when it is released, and during the movement of the pointer while the widget is touched.
This script has access to the same variables and functions as the `script` property (except the event-specific ones), plus the following:
This script has access to the same variables and functions as the `onValue` property (except the event-specific ones), plus the following:
- `value`: widget value
- `width`: canvas width in pixels
@ -42,7 +42,8 @@ This script has access to the same variables and functions as the `script` prope
- `targetTagName`: tag name of the html element under the pointer
- `offsetX`, `offsetY`: touch coordinates in pixels, relative to the html element under the pointer
- `movementX`, `movementY`: movement of the pointer in pixels since the last event
- `pointerId`: unique identifier used to differenciate fingers in multitouch situation
- `pageX`, `pageY`: touch coordinates in pixels, relative to the page
- `pointerId`: unique identifier used to differentiate fingers in multitouch situation
- `altKey`, `ctrlKey`, `shiftKey`: keyboard modifier states
- `force`: amount of pressure applied to the touch surface between `0` and `1` (see [Touch.force](https://developer.mozilla.org/en-US/docs/Web/API/Touch/force)). Equals `0` if the API is not supported or if no pressure information is found.
- `radiusX`, `radiusY`, `rotationAngle`: see [Touch.rotationAngle](https://developer.mozilla.org/en-US/docs/Web/API/Touch/rotationAngle)
@ -58,7 +59,7 @@ This script has access to the same variables and functions as the `script` prope
This script is executed when the widget should be redrawn, which is when it's touched and when it receives a value.
This script has access to the same variables and functions as the `script` property (except the event-specific ones), plus the following:
This script has access to the same variables and functions as the `onValue` property (except the event-specific ones), plus the following:
- `value`: widget value
- `width`: canvas width in pixels
@ -66,6 +67,19 @@ This script has access to the same variables and functions as the `script` prope
- `ctx`: [canvas rendering context](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D) of the widget
- `cssVars`: object containing the computed value of some of the widget's style properties such as `colorWidget`, `alphaFill`, `padding`, etc
In this script, all osc messages emissions are prevented and changing the value of a widget won't trigger widget synchronisation / scripts / advanced syntaxes updates.
### `onResize`
This script is executed when the widget has resized, before it is redrawn.
This script has access to the same variables and functions as the `onValue` property (except the event-specific ones), plus the following:
- `value`: widget value
- `width`: canvas width in pixels
- `height`: canvas height in pixels
- `cssVars`: object containing the computed value of some of the widget's style properties such as `colorWidget`, `alphaFill`, `padding`, etc
## Example: XY pad
Let's create a simple xy pad, with a value made of two numbers between 0 and 1. We set `valueLength` to `2` to make sure the widget only accepts incoming messages with two values (x and y).

View file

@ -58,3 +58,5 @@ From a client to another, widgets are automatically synchronized if they share t
- `address`
- `preArgs`
- `targets`
Client synchronization can be disabled globally with the `clientSync` [client option](../client-options.md). Widgets with `bypass` set to `true` will not send synchronization messages to other clients.

View file

@ -1,926 +0,0 @@
<!-- This file is generated automatically from the widget class declarations. See scripts/build-widget-reference.js -->
## Common
??? api "<div id="generic_properties">Generic properties<a class="headerlink" href="#generic_properties" title="Permanent link">#</a></div>"
Properties shared by all widgets
=== "widget"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="lock">lock<a class="headerlink" href="#lock" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to prevent modifying this widget with the editor. This will not prevent deleting the widget or moving it from a container to another. |
| <h6 id="type">type<a class="headerlink" href="#type" title="Permanent link">#</a></h6> | `string` | <code>"auto"</code> | Widget type |
| <h6 id="id">id<a class="headerlink" href="#id" title="Permanent link">#</a></h6> | `string` | <code>"auto"</code> | Widgets sharing the same `id` will act as clones and update each other's value(s) without sending extra osc messages. |
| <h6 id="visible">visible<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#visible" title="Permanent link">#</a></h6> | `boolean` | <code>true</code> | Set to `false` to hide the widget. |
| <h6 id="interaction">interaction<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#interaction" title="Permanent link">#</a></h6> | `boolean` | <code>true</code> | Set to `false` to disable pointer interactions. |
| <h6 id="comments">comments<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#comments" title="Permanent link">#</a></h6> | `string` | <code>""</code> | User comments. |
=== "geometry"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="left">left<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#left" title="Permanent link">#</a></h6> | `number`&vert;<br/>`string` | <code>"auto"</code> | When both top and left are set to auto, the widget is positioned according to the normal flow of the page (from left to right, by order of creation).<br/><br/>Otherwise, the widget will be positioned at absolute coordinates |
| <h6 id="top">top<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#top" title="Permanent link">#</a></h6> | `number`&vert;<br/>`percentage` | <code>"auto"</code> | When both top and left are set to auto, the widget is positioned according to the normal flow of the page (from left to right, by order of creation).<br/><br/>Otherwise, the widget will be positioned at absolute coordinates |
| <h6 id="width">width<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#width" title="Permanent link">#</a></h6> | `number`&vert;<br/>`percentage` | <code>"auto"</code> | Widget width |
| <h6 id="height">height<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#height" title="Permanent link">#</a></h6> | `number`&vert;<br/>`percentage` | <code>"auto"</code> | Widget height |
| <h6 id="expand">expand<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#expand" title="Permanent link">#</a></h6> | `boolean`&vert;<br/>`number` | <code>"false"</code> | If parent's layout is `vertical` or `horizontal`, set this to `true` to stretch the widget to use available space automatically. |
=== "style"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="colorText">colorText<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#colorText" title="Permanent link">#</a></h6> | `string` | <code>"auto"</code> | Text color. Set to "auto" to inherit from parent widget. |
| <h6 id="colorWidget">colorWidget<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#colorWidget" title="Permanent link">#</a></h6> | `string` | <code>"auto"</code> | Widget's default accent color. Set to "auto" to inherit from parent widget. |
| <h6 id="colorStroke">colorStroke<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#colorStroke" title="Permanent link">#</a></h6> | `string` | <code>"auto"</code> | Stroke color. Set to "auto" to use `colorWidget`. |
| <h6 id="colorFill">colorFill<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#colorFill" title="Permanent link">#</a></h6> | `string` | <code>"auto"</code> | Fill color. Set to "auto" to use `colorWidget`. |
| <h6 id="alphaStroke">alphaStroke<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#alphaStroke" title="Permanent link">#</a></h6> | `number` | <code>"auto"</code> | Stroke color opacity. |
| <h6 id="alphaFillOff">alphaFillOff<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#alphaFillOff" title="Permanent link">#</a></h6> | `number` | <code>"auto"</code> | Fill color opacity (off). |
| <h6 id="alphaFillOn">alphaFillOn<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#alphaFillOn" title="Permanent link">#</a></h6> | `number` | <code>"auto"</code> | Fill color opacity (on). |
| <h6 id="lineWidth">lineWidth<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#lineWidth" title="Permanent link">#</a></h6> | `number` | <code>"auto"</code> | Stroke width. |
| <h6 id="padding">padding<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#padding" title="Permanent link">#</a></h6> | `number` | <code>"auto"</code> | Inner spacing. |
| <h6 id="html">html<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#html" title="Permanent link">#</a></h6> | `string` | <code>""</code> | Custom html content to be inserted in the widget (before the widget's content). Elements are all unstyled by default, `css` should be used to customize their appearance.<br/><br/>The code is automatically wrapped in &lt;div class="html">&lt;/div><br/><br/>Allowed HTML tags:<br/><br/>&nbsp;&nbsp;h1-6, blockquote, p, a, ul, ol, nl, li,<br/><br/>&nbsp;&nbsp;b, i, strong, em, strike, code, hr, br, div,<br/><br/>&nbsp;&nbsp;table, thead, img, caption, tbody, tr, th, td, pre<br/><br/>Allowed attributes:<br/><br/>&nbsp;&nbsp;&lt;*>: class, style, title, name<br/><br/>&nbsp;&nbsp;&lt;img>: src, width, height |
| <h6 id="css">css<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#css" title="Permanent link">#</a></h6> | `string` | <code>""</code> | CSS rules. See <a href="https://openstagecontrol.ammd.net/docs/customization/css-tips/">documentation</a>.<br/><br/>Some style-related properties can be set or read from css using css variables:<br/>- `--color-background`: `colorBg`<br/>- `--color-widget`: `colorWidget`<br/>- `--color-fill`: `colorFill`<br/>- `--color-stroke`: `colorStroke`<br/>- `--color-text`: `colorText`<br/>- `--widget-padding`: `padding`<br/>- `--line-width`: `lineWidth`<br/>- `--alpha-fill-on`: `alphaFillOn`<br/>- `--alpha-fill-off`: `alphaFillOff`<br/>- `--alpha-stroke`: `alphaStroke` |
=== "value"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="value">value<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#value" title="Permanent link">#</a></h6> | `*` | <code>""</code> | Define the widget's value depending on other widget's values / properties using the advanced property syntax |
| <h6 id="default">default<a class="headerlink" href="#default" title="Permanent link">#</a></h6> | `*` | <code>""</code> | If set, the widget will be initialized with this value when the session is loaded. |
| <h6 id="linkId">linkId<a class="headerlink" href="#linkId" title="Permanent link">#</a></h6> | `string`&vert;<br/>`array` | <code>""</code> | Widgets sharing the same `linkId` update each other's value(s) AND send their respective osc messages.<br/><br/>When prefixed with >>, the `linkId` will make the widget act as a master (sending but not receiving)<br/><br/>When prefixed with <<, the `linkId` will make the widget act as a slave (receiving but not sending) |
=== "osc"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="address">address<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#address" title="Permanent link">#</a></h6> | `string` | <code>"auto"</code> | OSC address for sending / receiving messages, it must start with a slash (`/`)<br/><br/>By default ("auto"), the widget's id is used: `/widget_id` |
| <h6 id="preArgs">preArgs<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#preArgs" title="Permanent link">#</a></h6> | `*`&vert;<br/>`array` | <code>""</code> | A value or array of values that will be prepended to the widget's value in the OSC messages it sends.<br/><br/>Incoming messages must match these to affect by the widget. |
| <h6 id="typeTags">typeTags<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#typeTags" title="Permanent link">#</a></h6> | `string` | <code>""</code> | Defines the osc argument types, one letter per argument (including preArgs)<br/>- If empty, the types are infered automatically from the values (with numbers casted to floats by default)<br/>- If there are more arguments than type letters, the last type is used for the extra arguments<br/><br/>See <a href="http://opensoundcontrol.org/">OSC 1.0 specification</a> for existing typetags |
| <h6 id="decimals">decimals<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#decimals" title="Permanent link">#</a></h6> | `integer` | <code>2</code> | Defines the number of decimals to send. |
| <h6 id="target">target<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#target" title="Permanent link">#</a></h6> | `string`&vert;<br/>`array`&vert;<br/>`null` | <code>""</code> | This defines the targets of the widget's OSC messages<br/>- A `string` or `array` of strings formatted as follow: `ip:port` or `["ip:portA", "ip:portB"]`<br/>- If midi is enabled, targets can be `midi:device_name`<br/>- If no target is set, messages can still be sent if the server has default targets |
| <h6 id="ignoreDefaults">ignoreDefaults<a class="headerlink" href="#ignoreDefaults" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to ignore the server's default targets |
| <h6 id="bypass">bypass<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#bypass" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to prevent the widget from sending any osc message |
=== "scripting"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="onCreate">onCreate<a class="headerlink" href="#onCreate" title="Permanent link">#</a></h6> | `script` | <code>""</code> | Script executed when the widget is created. See <a href="https://openstagecontrol.ammd.net/docs/widgets/scripting/">documentation</a>. |
| <h6 id="onValue">onValue<a class="headerlink" href="#onValue" title="Permanent link">#</a></h6> | `script` | <code>""</code> | Script executed when the widget's value updates. See <a href="https://openstagecontrol.ammd.net/docs/widgets/scripting/">documentation</a>. |
## Basics
??? api "<div id="button">button<a class="headerlink" href="#button" title="Permanent link">#</a></div>"
On / off button.
=== "style"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="button_css">css<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#button_css" title="Permanent link">#</a></h6> | `string` | <code>""</code> | CSS rules. See <a href="https://openstagecontrol.ammd.net/docs/customization/css-tips/">documentation</a>.<br/><br/>Some style-related properties can be set or read from css using css variables:<br/>- `--color-background`: `colorBg`<br/>- `--color-widget`: `colorWidget`<br/>- `--color-fill`: `colorFill`<br/>- `--color-stroke`: `colorStroke`<br/>- `--color-text`: `colorText`<br/>- `--widget-padding`: `padding`<br/>- `--line-width`: `lineWidth`<br/>- `--alpha-fill-on`: `alphaFillOn`<br/>- `--alpha-fill-off`: `alphaFillOff`<br/>- `--alpha-stroke`: `alphaStroke`<br/>- `--color-text-on`: `colorTextOn` |
| <h6 id="button_colorTextOn">colorTextOn<a class="headerlink" href="#button_colorTextOn" title="Permanent link">#</a></h6> | `string` | <code>"auto"</code> | Defines the widget's text color when active. |
| <h6 id="button_label">label<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#button_label" title="Permanent link">#</a></h6> | `string`&vert;<br/>`boolean` | <code>"auto"</code> | Set to `false` to hide completely<br/>- Insert icons using the prefix ^ followed by the icon's name : `^play`, `^pause`, etc (see https://fontawesome.com/icons?d=gallery&s=solid&m=free)<br/>- Icons can be transformed with the following suffixes: `.flip-[horizontal|vertical|both]`, `.rotate-[90|180|270]`, `.spin`, `.pulse`. Example: `^play.flip-horizontal` |
| <h6 id="button_vertical">vertical<a class="headerlink" href="#button_vertical" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to display the text vertically |
| <h6 id="button_wrap">wrap<a class="headerlink" href="#button_wrap" title="Permanent link">#</a></h6> | `boolean`&vert;<br/>`string` | <code>false</code> | Set to `true` to wrap long lines automatically. Set to `soft` to avoid breaking words.<br/><br/>Choices: `false`, `true`, `soft` |
=== "button"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="button_on">on<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#button_on" title="Permanent link">#</a></h6> | `*` | <code>1</code> | Set to `null` to send send no argument in the osc message. Ignored if `mode` is `momentary`. |
| <h6 id="button_off">off<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#button_off" title="Permanent link">#</a></h6> | `*` | <code>0</code> | Set to `null` to send send no argument in the osc message. Must be different from `on`. Ignored if `mode` is `momentary` or `tap`. |
| <h6 id="button_mode">mode<a class="headerlink" href="#button_mode" title="Permanent link">#</a></h6> | `string` | <code>"toggle"</code> | Interraction mode:<br/>- `toggle` (classic on/off switch)<br/>- `push` (press & release)<br/>- `momentary` (no release, no value sent)<br/>- `tap` (no release, sends `on` as value)<br/><br/>Choices: `toggle`, `push`, `momentary`, `tap` |
| <h6 id="button_doubleTap">doubleTap<a class="headerlink" href="#button_doubleTap" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to make the button require a double tap to be pushed instead of a single tap |
=== "scripting"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="button_onValue">onValue<a class="headerlink" href="#button_onValue" title="Permanent link">#</a></h6> | `script` | <code>""</code> | Script executed when the widget's value updates. See <a href="https://openstagecontrol.ammd.net/docs/widgets/scripting/">documentation</a>.<br/><br/>Additionnal variables:<br/>- `locals.touchCoords`: `[x, y]` array representing the touch coordinates, normalized between 0 and 1. |
??? api "<div id="switch">switch<a class="headerlink" href="#switch" title="Permanent link">#</a></div>"
Value selector button.
=== "style"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="switch_css">css<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#switch_css" title="Permanent link">#</a></h6> | `string` | <code>""</code> | CSS rules. See <a href="https://openstagecontrol.ammd.net/docs/customization/css-tips/">documentation</a>.<br/><br/>Some style-related properties can be set or read from css using css variables:<br/>- `--color-background`: `colorBg`<br/>- `--color-widget`: `colorWidget`<br/>- `--color-fill`: `colorFill`<br/>- `--color-stroke`: `colorStroke`<br/>- `--color-text`: `colorText`<br/>- `--widget-padding`: `padding`<br/>- `--line-width`: `lineWidth`<br/>- `--alpha-fill-on`: `alphaFillOn`<br/>- `--alpha-fill-off`: `alphaFillOff`<br/>- `--alpha-stroke`: `alphaStroke`<br/>- `--color-text-on`: `colorTextOn` |
| <h6 id="switch_colorTextOn">colorTextOn<a class="headerlink" href="#switch_colorTextOn" title="Permanent link">#</a></h6> | `string` | <code>"auto"</code> | Defines the widget's text color when active. |
| <h6 id="switch_layout">layout<a class="headerlink" href="#switch_layout" title="Permanent link">#</a></h6> | `string` | <code>"vertical"</code> | Defines how items should be laid out<br/><br/>Choices: `vertical`, `horizontal`, `grid` |
| <h6 id="switch_gridTemplate">gridTemplate<a class="headerlink" href="#switch_gridTemplate" title="Permanent link">#</a></h6> | `string`&vert;<br/>`number` | <code>""</code> | If `layout` is `grid`, can be either a number of columns or a valid value for the css property "grid-template". |
| <h6 id="switch_wrap">wrap<a class="headerlink" href="#switch_wrap" title="Permanent link">#</a></h6> | `boolean`&vert;<br/>`string` | <code>false</code> | Set to `true` to wrap long lines automatically. Set to `soft` to avoid breaking words.<br/><br/>Choices: `false`, `true`, `soft` |
=== "switch"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="switch_values">values<a class="headerlink" href="#switch_values" title="Permanent link">#</a></h6> | `array`&vert;<br/>`object` | <code>\{<br/>&nbsp;"Value 1": 1,<br/>&nbsp;"Value 2": 2<br/>}</code> | `Array` of possible values to switch between : `[1,2,3]`<br/><br/>`Object` of `"label":value` pairs. Numeric labels must be prepended or appended with a white space (or any other non-numeric character) otherwise the order of the values won't be kept |
| <h6 id="switch_mode">mode<a class="headerlink" href="#switch_mode" title="Permanent link">#</a></h6> | `string` | <code>"tap"</code> | Interraction mode:<br/>- `tap`: activates when the pointer is down but prevents further scrolling<br/>- `slide`: same as `tap` but allows sliding between values<br/>- `click`: activates upon click only and allows further scrolling<br/>- `flip`: selects the next value upon click regardless of where the widget is touched<br/><br/>Choices: `tap`, `slide`, `click`, `flip` |
??? api "<div id="dropdown">dropdown<a class="headerlink" href="#dropdown" title="Permanent link">#</a></div>"
Native dropdown menu.
=== "style"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="dropdown_label">label<a class="headerlink" href="#dropdown_label" title="Permanent link">#</a></h6> | `string`&vert;<br/>`boolean` | <code>"auto"</code> | Displayed text (defaults to current value). Keywords `%key` and `%value` will be replaced by the widget's selected key/value. |
| <h6 id="dropdown_icon">icon<a class="headerlink" href="#dropdown_icon" title="Permanent link">#</a></h6> | `boolean` | <code>"true"</code> | Set to `false` to hide the dropdown icon |
| <h6 id="dropdown_align">align<a class="headerlink" href="#dropdown_align" title="Permanent link">#</a></h6> | `string` | <code>"center"</code> | Set to `left` or `right` to change text alignment (otherwise center)<br/><br/>Choices: `center`, `left`, `right` |
=== "dropdown"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="dropdown_values">values<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#dropdown_values" title="Permanent link">#</a></h6> | `array`&vert;<br/>`object` | <code>\{<br/>&nbsp;"Value 1": 1,<br/>&nbsp;"Value 2": 2<br/>}</code> | `Array` of possible values to switch between : `[1,2,3]`<br/><br/>`Object` of label:value pairs. Numeric labels must be prepended or appended with a white space (or any other non-numeric character) otherwise the order of the values won't be kept |
??? api "<div id="menu">menu<a class="headerlink" href="#menu" title="Permanent link">#</a></div>"
Drag and drop menu with a circular or grid layout.
=== "geometry"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="menu_size">size<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#menu_size" title="Permanent link">#</a></h6> | `number`&vert;<br/>`array` | <code>200</code> | - If `layout` is `circular`: diameter (in px)<br/>- Else: square size or `[width, height]` array |
| <h6 id="menu_ignoreTabs">ignoreTabs<a class="headerlink" href="#menu_ignoreTabs" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to allow the menu overflowing its tab ancestors. |
=== "style"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="menu_label">label<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#menu_label" title="Permanent link">#</a></h6> | `string`&vert;<br/>`boolean` | <code>"auto"</code> | Displayed text (defaults to current value). Keywords `%key` and `%value` will be replaced by the widget's selected key/value. |
| <h6 id="menu_icon">icon<a class="headerlink" href="#menu_icon" title="Permanent link">#</a></h6> | `boolean` | <code>"true"</code> | Set to `false` to hide the dropdown icon |
| <h6 id="menu_textAlign">textAlign<a class="headerlink" href="#menu_textAlign" title="Permanent link">#</a></h6> | `string` | <code>"center"</code> | Set to `left` or `right` to change text alignment (otherwise center)<br/><br/>Choices: `center`, `left`, `right` |
| <h6 id="menu_menuAlignV">menuAlignV<a class="headerlink" href="#menu_menuAlignV" title="Permanent link">#</a></h6> | `string` | <code>"center"</code> | Set to `top` or `bottom` to change menu alignment (otherwise center)<br/><br/>Choices: `center`, `top`, `bottom` |
| <h6 id="menu_menuAlignH">menuAlignH<a class="headerlink" href="#menu_menuAlignH" title="Permanent link">#</a></h6> | `string` | <code>"center"</code> | Set to `left` or `right` to change menu alignment (otherwise center)<br/><br/>Choices: `center`, `left`, `right` |
| <h6 id="menu_layout">layout<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#menu_layout" title="Permanent link">#</a></h6> | `string` | <code>"circular"</code> | Defines whether the menu's layout should be rendered in a circle or in a box<br/><br/>Choices: `circular`, `horizontal`, `vertical`, `grid` |
| <h6 id="menu_gridTemplate">gridTemplate<a class="headerlink" href="#menu_gridTemplate" title="Permanent link">#</a></h6> | `string`&vert;<br/>`number` | <code>""</code> | If `layout` is `grid`, can be either a number of columns or a valid value for the css property "grid-template". |
=== "menu"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="menu_toggle">toggle<a class="headerlink" href="#menu_toggle" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to make the menu stay opened after mouse/touch release |
| <h6 id="menu_doubleTap">doubleTap<a class="headerlink" href="#menu_doubleTap" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to make the menu require a double tap to be opened instead of a single tap |
| <h6 id="menu_values">values<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#menu_values" title="Permanent link">#</a></h6> | `array`&vert;<br/>`object` | <code>[<br/>&nbsp;1,<br/>&nbsp;2,<br/>&nbsp;3<br/>]</code> | `Array` of possible values to switch between : `[1,2,3]`<br/><br/>`Object` of label:value pairs. Numeric labels must be prepended or appended with a white space (or any other non-numeric character) otherwise the order of the values won't be kept |
| <h6 id="menu_weights">weights<a class="headerlink" href="#menu_weights" title="Permanent link">#</a></h6> | `array` | <code>""</code> | `Array` of `number` defining the weights of each value in `values`<br/><br/>Ignored when `mode` is `grid` |
??? api "<div id="input">input<a class="headerlink" href="#input" title="Permanent link">#</a></div>"
Text input.
=== "style"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="input_css">css<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#input_css" title="Permanent link">#</a></h6> | `string` | <code>""</code> | CSS rules. See <a href="https://openstagecontrol.ammd.net/docs/customization/css-tips/">documentation</a>.<br/><br/>Some style-related properties can be set or read from css using css variables:<br/>- `--color-background`: `colorBg`<br/>- `--color-widget`: `colorWidget`<br/>- `--color-fill`: `colorFill`<br/>- `--color-stroke`: `colorStroke`<br/>- `--color-text`: `colorText`<br/>- `--widget-padding`: `padding`<br/>- `--line-width`: `lineWidth`<br/>- `--alpha-fill-on`: `alphaFillOn`<br/>- `--alpha-fill-off`: `alphaFillOff`<br/>- `--alpha-stroke`: `alphaStroke`<br/>- `--alpha-pips`: `alphaPips`<br/>- `--alpha-pips-text`: `alphaPipsText`<br/><br/>Canvas-based widget have their computed width and height available as css variables (read-only):<br/>- `--widget-width`<br/>- `--widget-height` |
| <h6 id="input_align">align<a class="headerlink" href="#input_align" title="Permanent link">#</a></h6> | `string` | <code>"center"</code> | Set to `left` or `right` to change text alignment (otherwise center)<br/><br/>Choices: `center`, `left`, `right` |
| <h6 id="input_unit">unit<a class="headerlink" href="#input_unit" title="Permanent link">#</a></h6> | `string` | <code>""</code> | Unit will be appended to the displayed widget's value (it doesn't affect osc messages) |
=== "input"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="input_asYouType">asYouType<a class="headerlink" href="#input_asYouType" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to make the input send its value at each keystroke |
| <h6 id="input_numeric">numeric<a class="headerlink" href="#input_numeric" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to allow numeric values only and display a numeric keyboard on mobile devices |
| <h6 id="input_validation">validation<a class="headerlink" href="#input_validation" title="Permanent link">#</a></h6> | `string` | <code>""</code> | Regular expression: if the submitted value doesn't match the regular expression, it will be reset to the last valid value.<br/><br/>If leading and trailing slashes are omitted, they will be added automatically and the flag will be set to "gm"<br/><br/>Examples:<br/>- `^[0-9]*$` accepts digits only, any number of them<br/>- `/^[a-zs]{0,10}$/i` accept between 0 and 10 alphabetic characters and spaces (case insensitive) |
=== "scripting"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="input_onValue">onValue<a class="headerlink" href="#input_onValue" title="Permanent link">#</a></h6> | `script` | <code>""</code> | Script executed when the widget's value updates. See <a href="https://openstagecontrol.ammd.net/docs/widgets/scripting/">documentation</a>.<br/><br/>Canvas-based widget have their computed width and height available as local variables:<br/>- `locals.width`<br/>- `locals.height` |
??? api "<div id="textarea">textarea<a class="headerlink" href="#textarea" title="Permanent link">#</a></div>"
Text area (multi line input). Tip: hit shift + enter for new lines.
??? api "<div id="file">file<a class="headerlink" href="#file" title="Permanent link">#</a></div>"
File/Folder selector (server-side).
=== "style"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="file_align">align<a class="headerlink" href="#file_align" title="Permanent link">#</a></h6> | `string` | <code>"center"</code> | Set to `left` or `right` to change text alignment (otherwise center)<br/><br/>Choices: `center`, `left`, `right` |
| <h6 id="file_hidePath">hidePath<a class="headerlink" href="#file_hidePath" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to only display the filename (the whole path will still be used as value) |
| <h6 id="file_mode">mode<a class="headerlink" href="#file_mode" title="Permanent link">#</a></h6> | `string` | <code>"open"</code> | File browser mode<br/><br/>Choices: `open`, `save` |
=== "file"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="file_directory">directory<a class="headerlink" href="#file_directory" title="Permanent link">#</a></h6> | `string` | <code>"auto"</code> | Default browsing directory |
| <h6 id="file_extension">extension<a class="headerlink" href="#file_extension" title="Permanent link">#</a></h6> | `string` | <code>"*"</code> | Only display files with this extension |
| <h6 id="file_allowDir">allowDir<a class="headerlink" href="#file_allowDir" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Allow selecting a folder (by pressing "open" when no file is selected) |
## Containers
??? api "<div id="panel">panel<a class="headerlink" href="#panel" title="Permanent link">#</a></div>"
Widgets or Tabs container.
=== "style"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="panel_colorBg">colorBg<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#panel_colorBg" title="Permanent link">#</a></h6> | `string` | <code>"auto"</code> | Panel background color. Set to "auto" to inherit from parent widget. |
| <h6 id="panel_layout">layout<a class="headerlink" href="#panel_layout" title="Permanent link">#</a></h6> | `string` | <code>"default"</code> | Defines how children are laid out.<br/><br/>Choices: `default`, `vertical`, `horizontal`, `grid` |
| <h6 id="panel_justify">justify<a class="headerlink" href="#panel_justify" title="Permanent link">#</a></h6> | `string` | <code>"start"</code> | If `layout` is `vertical` or `horizontal`, defines how widgets should be justified.<br/><br/>Choices: `start`, `end`, `center`, `space-around`, `space-between` |
| <h6 id="panel_gridTemplate">gridTemplate<a class="headerlink" href="#panel_gridTemplate" title="Permanent link">#</a></h6> | `string`&vert;<br/>`number` | <code>""</code> | If `layout` is `grid`, can be either a number of columns or a valid value for the css property "grid-template". |
| <h6 id="panel_contain">contain<a class="headerlink" href="#panel_contain" title="Permanent link">#</a></h6> | `boolean` | <code>true</code> | If `layout` is `vertical` or `horizontal`, prevents children from overflowing the panel. |
| <h6 id="panel_scroll">scroll<a class="headerlink" href="#panel_scroll" title="Permanent link">#</a></h6> | `boolean` | <code>true</code> | Set to `false` to disable scrollbars |
| <h6 id="panel_innerPadding">innerPadding<a class="headerlink" href="#panel_innerPadding" title="Permanent link">#</a></h6> | `boolean` | <code>true</code> | Set to `false` to make the `padding` property apply only between children and not at the container's inner boundaries. |
| <h6 id="panel_verticalTabs">verticalTabs<a class="headerlink" href="#panel_verticalTabs" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to display for vertical tab layout |
=== "panel"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="panel_variables">variables<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#panel_variables" title="Permanent link">#</a></h6> | `*` | <code>"@\{parent.variables}"</code> | Defines one or more arbitrary variables that can be inherited by children widgets |
| <h6 id="panel_traversing">traversing<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#panel_traversing" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | 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<br/><br/>Choices: `false`, `true`, `smart` |
=== "value"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="panel_value">value<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#panel_value" title="Permanent link">#</a></h6> | `integer`&vert;<br/>`array` | <code>""</code> | If the panel contains tabs, its value defines which tab is selected selected (by index, starting with 0).<br/><br/>If the panel contains widgets and `scroll` is `true`, its value is an array that contains the scrolling state between 0 and 1 for the x and y axis. |
=== "children"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="panel_widgets">widgets<a class="headerlink" href="#panel_widgets" title="Permanent link">#</a></h6> | `array` | <code>[]</code> | Each element of the array must be a widget object. A panel cannot contain widgets and tabs simultaneously. |
| <h6 id="panel_tabs">tabs<a class="headerlink" href="#panel_tabs" title="Permanent link">#</a></h6> | `array` | <code>[]</code> | Each element of the array must be a tab object. A panel cannot contain widgets and tabs simultaneously |
??? api "<div id="modal">modal<a class="headerlink" href="#modal" title="Permanent link">#</a></div>"
A toggle button that opens a popup panel. Cannot contain tabs directly.
=== "geometry"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="modal_popupWidth">popupWidth<a class="headerlink" href="#modal_popupWidth" title="Permanent link">#</a></h6> | `number`&vert;<br/>`percentage` | <code>"80%"</code> | Modal popup's size |
| <h6 id="modal_popupHeight">popupHeight<a class="headerlink" href="#modal_popupHeight" title="Permanent link">#</a></h6> | `number`&vert;<br/>`percentage` | <code>"80%"</code> | Modal popup's size |
| <h6 id="modal_popupLeft">popupLeft<a class="headerlink" href="#modal_popupLeft" title="Permanent link">#</a></h6> | `number`&vert;<br/>`percentage` | <code>"auto"</code> | Modal popup's position |
| <h6 id="modal_popupTop">popupTop<a class="headerlink" href="#modal_popupTop" title="Permanent link">#</a></h6> | `number`&vert;<br/>`percentage` | <code>"auto"</code> | Modal popup's position |
| <h6 id="modal_relative">relative<a class="headerlink" href="#modal_relative" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to make the modal's position relative to the button's position. |
| <h6 id="modal_ignoreTabs">ignoreTabs<a class="headerlink" href="#modal_ignoreTabs" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to allow the modal overflowing its tab ancestors. |
=== "style"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="modal_colorBg">colorBg<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#modal_colorBg" title="Permanent link">#</a></h6> | `string` | <code>"auto"</code> | Panel background color. Set to "auto" to inherit from parent widget. |
| <h6 id="modal_layout">layout<a class="headerlink" href="#modal_layout" title="Permanent link">#</a></h6> | `string` | <code>"default"</code> | Defines how children are laid out.<br/><br/>Choices: `default`, `vertical`, `horizontal`, `grid` |
| <h6 id="modal_justify">justify<a class="headerlink" href="#modal_justify" title="Permanent link">#</a></h6> | `string` | <code>"start"</code> | If `layout` is `vertical` or `horizontal`, defines how widgets should be justified.<br/><br/>Choices: `start`, `end`, `center`, `space-around`, `space-between` |
| <h6 id="modal_gridTemplate">gridTemplate<a class="headerlink" href="#modal_gridTemplate" title="Permanent link">#</a></h6> | `string`&vert;<br/>`number` | <code>""</code> | If `layout` is `grid`, can be either a number of columns or a valid value for the css property "grid-template". |
| <h6 id="modal_contain">contain<a class="headerlink" href="#modal_contain" title="Permanent link">#</a></h6> | `boolean` | <code>true</code> | If `layout` is `vertical` or `horizontal`, prevents children from overflowing the panel. |
| <h6 id="modal_scroll">scroll<a class="headerlink" href="#modal_scroll" title="Permanent link">#</a></h6> | `boolean` | <code>true</code> | Set to `false` to disable scrollbars |
| <h6 id="modal_innerPadding">innerPadding<a class="headerlink" href="#modal_innerPadding" title="Permanent link">#</a></h6> | `boolean` | <code>true</code> | Set to `false` to make the `padding` property apply only between children and not at the container's inner boundaries. |
| <h6 id="modal_label">label<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#modal_label" title="Permanent link">#</a></h6> | `string`&vert;<br/>`boolean` | <code>"auto"</code> | Set to `false` to hide completely<br/>- Insert icons using the prefix ^ followed by the icon's name : `^play`, `^pause`, etc (see https://fontawesome.com/icons?d=gallery&s=solid&m=free)<br/>- Icons can be transformed with the following suffixes: `.flip-[horizontal|vertical|both]`, `.rotate-[90|180|270]`, `.spin`, `.pulse`. Example: `^play.flip-horizontal` |
| <h6 id="modal_popupLabel">popupLabel<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#modal_popupLabel" title="Permanent link">#</a></h6> | `string`&vert;<br/>`boolean` | <code>"auto"</code> | Alternative label for the modal popup |
| <h6 id="modal_popupPadding">popupPadding<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#modal_popupPadding" title="Permanent link">#</a></h6> | `number` | <code>"auto"</code> | Modal's inner spacing. |
=== "modal"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="modal_variables">variables<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#modal_variables" title="Permanent link">#</a></h6> | `*` | <code>"@\{parent.variables}"</code> | Defines one or more arbitrary variables that can be inherited by children widgets |
| <h6 id="modal_traversing">traversing<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#modal_traversing" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | 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<br/><br/>Choices: `false`, `true`, `smart` |
| <h6 id="modal_doubleTap">doubleTap<a class="headerlink" href="#modal_doubleTap" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to make the modal require a double tap to open instead of a single tap |
=== "value"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="modal_value">value<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#modal_value" title="Permanent link">#</a></h6> | `integer` | <code>""</code> | Defines the modal's state:`0` for closed, `1` for opened |
=== "children"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="modal_widgets">widgets<a class="headerlink" href="#modal_widgets" title="Permanent link">#</a></h6> | `array` | <code>[]</code> | Each element of the array must be a widget object. A panel cannot contain widgets and tabs simultaneously. |
| <h6 id="modal_tabs">tabs<a class="headerlink" href="#modal_tabs" title="Permanent link">#</a></h6> | `array` | <code>[]</code> | Each element of the array must be a tab object. A panel cannot contain widgets and tabs simultaneously |
??? api "<div id="clone">clone<a class="headerlink" href="#clone" title="Permanent link">#</a></div>"
Widget replication with overridable properties.
=== "clone"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="clone_widgetId">widgetId<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#clone_widgetId" title="Permanent link">#</a></h6> | `string` | <code>""</code> | `id` of the widget to clone |
| <h6 id="clone_props">props<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#clone_props" title="Permanent link">#</a></h6> | `object` | <code>\{}</code> | Cloned widget's properties to override |
??? api "<div id="fragment">fragment<a class="headerlink" href="#fragment" title="Permanent link">#</a></div>"
Embedded session or fragment file with overridable properties.
=== "fragment"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="fragment_file">file<a class="headerlink" href="#fragment_file" title="Permanent link">#</a></h6> | `string` | <code>""</code> | Fragment file path (relative to the session or theme file location by default, falling back to absolute path) |
| <h6 id="fragment_props">props<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#fragment_props" title="Permanent link">#</a></h6> | `object` | <code>\{}</code> | Fragment widget's properties to override |
??? api "<div id="matrix">matrix<a class="headerlink" href="#matrix" title="Permanent link">#</a></div>"
Generic matrix for creating rows/columns of widgets.
=== "style"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="matrix_colorBg">colorBg<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#matrix_colorBg" title="Permanent link">#</a></h6> | `string` | <code>"auto"</code> | Panel background color. Set to "auto" to inherit from parent widget. |
| <h6 id="matrix_layout">layout<a class="headerlink" href="#matrix_layout" title="Permanent link">#</a></h6> | `string` | <code>"horizontal"</code> | Defines how children are laid out.<br/><br/>Choices: `horizontal`, `vertical`, `grid` |
| <h6 id="matrix_justify">justify<a class="headerlink" href="#matrix_justify" title="Permanent link">#</a></h6> | `string` | <code>"start"</code> | If `layout` is `vertical` or `horizontal`, defines how widgets should be justified.<br/><br/>Choices: `start`, `end`, `center`, `space-around`, `space-between` |
| <h6 id="matrix_gridTemplate">gridTemplate<a class="headerlink" href="#matrix_gridTemplate" title="Permanent link">#</a></h6> | `string`&vert;<br/>`number` | <code>""</code> | If `layout` is `grid`, can be either a number of columns or a valid value for the css property "grid-template". |
| <h6 id="matrix_contain">contain<a class="headerlink" href="#matrix_contain" title="Permanent link">#</a></h6> | `boolean` | <code>true</code> | If `layout` is `vertical` or `horizontal`, prevents children from overflowing the panel. |
| <h6 id="matrix_scroll">scroll<a class="headerlink" href="#matrix_scroll" title="Permanent link">#</a></h6> | `boolean` | <code>true</code> | Set to `false` to disable scrollbars |
| <h6 id="matrix_innerPadding">innerPadding<a class="headerlink" href="#matrix_innerPadding" title="Permanent link">#</a></h6> | `boolean` | <code>true</code> | Set to `false` to make the `padding` property apply only between children and not at the container's inner boundaries. |
=== "matrix"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="matrix_variables">variables<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#matrix_variables" title="Permanent link">#</a></h6> | `*` | <code>"@\{parent.variables}"</code> | Defines one or more arbitrary variables that can be inherited by children widgets |
| <h6 id="matrix_traversing">traversing<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#matrix_traversing" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | 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<br/><br/>Choices: `false`, `true`, `smart` |
| <h6 id="matrix_widgetType">widgetType<a class="headerlink" href="#matrix_widgetType" title="Permanent link">#</a></h6> | `string` | <code>"button"</code> | Defines the type of the widgets in the matrix |
| <h6 id="matrix_quantity">quantity<a class="headerlink" href="#matrix_quantity" title="Permanent link">#</a></h6> | `number` | <code>4</code> | Defines the number of widgets in the matrix |
| <h6 id="matrix_props">props<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#matrix_props" title="Permanent link">#</a></h6> | `object` | <code>\{}</code> | Defines a set of property to override the widgets' defaults.<br/><br/>JS{} and #{} blocks in this field are resolved with an extra variable representing each widget's index: `$` (e.g. `#{$}`)<br/><br/>Advanced syntax blocks (@{}, OSC{}, JS{}, VAR{} and #{}) are resolved at the matrix' scope (ie @{this.variables} returns the matrix' variables property)<br/><br/>Advanced syntax blocks can be passed to children without being resolved at the matrix' scope by adding an underscore before the opening bracket.<br/><br/>Note: unless overridden, children inherit from the matrix' `id` and osc properties (`id` and `address` are appended with `/$`) |
=== "value"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="matrix_value">value<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#matrix_value" title="Permanent link">#</a></h6> | `integer`&vert;<br/>`array` | <code>""</code> | If the panel contains tabs, its value defines which tab is selected selected (by index, starting with 0).<br/><br/>If the panel contains widgets and `scroll` is `true`, its value is an array that contains the scrolling state between 0 and 1 for the x and y axis. |
=== "children"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="matrix_widgets">widgets<a class="headerlink" href="#matrix_widgets" title="Permanent link">#</a></h6> | `array` | <code>[]</code> | Each element of the array must be a widget object. A panel cannot contain widgets and tabs simultaneously. |
| <h6 id="matrix_tabs">tabs<a class="headerlink" href="#matrix_tabs" title="Permanent link">#</a></h6> | `array` | <code>[]</code> | Each element of the array must be a tab object. A panel cannot contain widgets and tabs simultaneously |
??? api "<div id="keyboard">keyboard<a class="headerlink" href="#keyboard" title="Permanent link">#</a></div>"
Piano keyboard.
=== "style"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="keyboard_colorWhite">colorWhite<a class="headerlink" href="#keyboard_colorWhite" title="Permanent link">#</a></h6> | `string` | <code>"auto"</code> | White keys color. |
| <h6 id="keyboard_colorBlack">colorBlack<a class="headerlink" href="#keyboard_colorBlack" title="Permanent link">#</a></h6> | `string` | <code>"auto"</code> | Black keys color. |
=== "keyboard"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="keyboard_keys">keys<a class="headerlink" href="#keyboard_keys" title="Permanent link">#</a></h6> | `number` | <code>25</code> | Defines the number keys |
| <h6 id="keyboard_start">start<a class="headerlink" href="#keyboard_start" title="Permanent link">#</a></h6> | `number` | <code>48</code> | MIDI note number to start with (default is C4)<br/><br/>Standard keyboards settings are: `[25, 48]`, `[49, 36]`, `[61, 36]`, `[88, 21]` |
| <h6 id="keyboard_traversing">traversing<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#keyboard_traversing" title="Permanent link">#</a></h6> | `boolean` | <code>true</code> | Set to `false` to disable traversing gestures |
| <h6 id="keyboard_on">on<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#keyboard_on" title="Permanent link">#</a></h6> | `*` | <code>1</code> | Set to `null` to send send no argument in the osc message |
| <h6 id="keyboard_off">off<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#keyboard_off" title="Permanent link">#</a></h6> | `*` | <code>0</code> | Set to `null` to send send no argument in the osc message |
| <h6 id="keyboard_velocity">velocity<a class="headerlink" href="#keyboard_velocity" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to map the touch coordinates between `off` (top) and `on` (bottom). Requires `on` and `off` to be numbers |
| <h6 id="keyboard_mode">mode<a class="headerlink" href="#keyboard_mode" title="Permanent link">#</a></h6> | `string` | <code>"push"</code> | Interraction mode:<br/>- `push` (press & release)<br/>- `toggle` (on/off switches)<br/>- `tap` (no release)<br/><br/>Choices: `push`, `toggle`, `tap` |
??? api "<div id="patchbay">patchbay<a class="headerlink" href="#patchbay" title="Permanent link">#</a></div>"
Connect inputs to outputs.
=== "style"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="patchbay_css">css<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#patchbay_css" title="Permanent link">#</a></h6> | `string` | <code>""</code> | CSS rules. See <a href="https://openstagecontrol.ammd.net/docs/customization/css-tips/">documentation</a>.<br/><br/>Some style-related properties can be set or read from css using css variables:<br/>- `--color-background`: `colorBg`<br/>- `--color-widget`: `colorWidget`<br/>- `--color-fill`: `colorFill`<br/>- `--color-stroke`: `colorStroke`<br/>- `--color-text`: `colorText`<br/>- `--widget-padding`: `padding`<br/>- `--line-width`: `lineWidth`<br/>- `--alpha-fill-on`: `alphaFillOn`<br/>- `--alpha-fill-off`: `alphaFillOff`<br/>- `--alpha-stroke`: `alphaStroke`<br/>- `--alpha-pips`: `alphaPips`<br/>- `--alpha-pips-text`: `alphaPipsText`<br/><br/>Canvas-based widget have their computed width and height available as css variables (read-only):<br/>- `--widget-width`<br/>- `--widget-height` |
=== "patchbay"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="patchbay_inputs">inputs<a class="headerlink" href="#patchbay_inputs" title="Permanent link">#</a></h6> | `array`&vert;<br/>`object` | <code>[<br/>&nbsp;"input_1",<br/>&nbsp;"input_2"<br/>]</code> | - `Array` of input names : `['input_1', 'input_2']`<br/>- `Object` of `"label_1": "input_1"` pairs. Numeric labels must be prepended or appended with a white space (or any other non-numeric character) otherwise the order of the values won't be kept<br/><br/><br/><br/>Patchbay inputs can be connected to one or more outputs and will send messages of the following form when they are connected/disconnected: <br/><br/>`/patchbay_address input_x output_x output_y etc`<br/><br/>If no output is connected to the input, the message will be `/patchbay_address input_x`<br/><br/>The inputs values can be consumed with the property inheritance syntax: `@{patchbay_id/input_1}` returns an array of output names connected to `input_1` |
| <h6 id="patchbay_outputs">outputs<a class="headerlink" href="#patchbay_outputs" title="Permanent link">#</a></h6> | `array`&vert;<br/>`object` | <code>[<br/>&nbsp;"output_1",<br/>&nbsp;"output_2"<br/>]</code> | List of output values the inputs can connect to (see `inputs`). |
=== "scripting"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="patchbay_onValue">onValue<a class="headerlink" href="#patchbay_onValue" title="Permanent link">#</a></h6> | `script` | <code>""</code> | Script executed when the widget's value updates. See <a href="https://openstagecontrol.ammd.net/docs/widgets/scripting/">documentation</a>.<br/><br/>Canvas-based widget have their computed width and height available as local variables:<br/>- `locals.width`<br/>- `locals.height` |
??? api "<div id="root">root<a class="headerlink" href="#root" title="Permanent link">#</a></div>"
Main (unique) container
=== "style"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="root_colorBg">colorBg<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#root_colorBg" title="Permanent link">#</a></h6> | `string` | <code>"auto"</code> | Panel background color. Set to "auto" to inherit from parent widget. |
| <h6 id="root_layout">layout<a class="headerlink" href="#root_layout" title="Permanent link">#</a></h6> | `string` | <code>"default"</code> | Defines how children are laid out.<br/><br/>Choices: `default`, `vertical`, `horizontal`, `grid` |
| <h6 id="root_justify">justify<a class="headerlink" href="#root_justify" title="Permanent link">#</a></h6> | `string` | <code>"start"</code> | If `layout` is `vertical` or `horizontal`, defines how widgets should be justified.<br/><br/>Choices: `start`, `end`, `center`, `space-around`, `space-between` |
| <h6 id="root_gridTemplate">gridTemplate<a class="headerlink" href="#root_gridTemplate" title="Permanent link">#</a></h6> | `string`&vert;<br/>`number` | <code>""</code> | If `layout` is `grid`, can be either a number of columns or a valid value for the css property "grid-template". |
| <h6 id="root_contain">contain<a class="headerlink" href="#root_contain" title="Permanent link">#</a></h6> | `boolean` | <code>true</code> | If `layout` is `vertical` or `horizontal`, prevents children from overflowing the panel. |
| <h6 id="root_scroll">scroll<a class="headerlink" href="#root_scroll" title="Permanent link">#</a></h6> | `boolean` | <code>true</code> | Set to `false` to disable scrollbars |
| <h6 id="root_innerPadding">innerPadding<a class="headerlink" href="#root_innerPadding" title="Permanent link">#</a></h6> | `boolean` | <code>true</code> | Set to `false` to make the `padding` property apply only between children and not at the container's inner boundaries. |
| <h6 id="root_verticalTabs">verticalTabs<a class="headerlink" href="#root_verticalTabs" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to display for vertical tab layout |
| <h6 id="root_hideMenu">hideMenu<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#root_hideMenu" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to hide the main menu button. |
=== "root"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="root_variables">variables<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#root_variables" title="Permanent link">#</a></h6> | `*` | <code>"@\{parent.variables}"</code> | Defines one or more arbitrary variables that can be inherited by children widgets |
| <h6 id="root_traversing">traversing<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#root_traversing" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | 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<br/><br/>Choices: `false`, `true`, `smart` |
=== "value"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="root_value">value<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#root_value" title="Permanent link">#</a></h6> | `integer`&vert;<br/>`array` | <code>""</code> | If the panel contains tabs, its value defines which tab is selected selected (by index, starting with 0).<br/><br/>If the panel contains widgets and `scroll` is `true`, its value is an array that contains the scrolling state between 0 and 1 for the x and y axis. |
=== "children"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="root_widgets">widgets<a class="headerlink" href="#root_widgets" title="Permanent link">#</a></h6> | `array` | <code>[]</code> | Each element of the array must be a widget object. A panel cannot contain widgets and tabs simultaneously. |
| <h6 id="root_tabs">tabs<a class="headerlink" href="#root_tabs" title="Permanent link">#</a></h6> | `array` | <code>[]</code> | Each element of the array must be a tab object. A panel cannot contain widgets and tabs simultaneously |
??? api "<div id="tab">tab<a class="headerlink" href="#tab" title="Permanent link">#</a></div>"
Tabbed panel widget
=== "style"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="tab_colorBg">colorBg<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#tab_colorBg" title="Permanent link">#</a></h6> | `string` | <code>"auto"</code> | Panel background color. Set to "auto" to inherit from parent widget. |
| <h6 id="tab_layout">layout<a class="headerlink" href="#tab_layout" title="Permanent link">#</a></h6> | `string` | <code>"default"</code> | Defines how children are laid out.<br/><br/>Choices: `default`, `vertical`, `horizontal`, `grid` |
| <h6 id="tab_justify">justify<a class="headerlink" href="#tab_justify" title="Permanent link">#</a></h6> | `string` | <code>"start"</code> | If `layout` is `vertical` or `horizontal`, defines how widgets should be justified.<br/><br/>Choices: `start`, `end`, `center`, `space-around`, `space-between` |
| <h6 id="tab_gridTemplate">gridTemplate<a class="headerlink" href="#tab_gridTemplate" title="Permanent link">#</a></h6> | `string`&vert;<br/>`number` | <code>""</code> | If `layout` is `grid`, can be either a number of columns or a valid value for the css property "grid-template". |
| <h6 id="tab_contain">contain<a class="headerlink" href="#tab_contain" title="Permanent link">#</a></h6> | `boolean` | <code>true</code> | If `layout` is `vertical` or `horizontal`, prevents children from overflowing the panel. |
| <h6 id="tab_scroll">scroll<a class="headerlink" href="#tab_scroll" title="Permanent link">#</a></h6> | `boolean` | <code>true</code> | Set to `false` to disable scrollbars |
| <h6 id="tab_innerPadding">innerPadding<a class="headerlink" href="#tab_innerPadding" title="Permanent link">#</a></h6> | `boolean` | <code>true</code> | Set to `false` to make the `padding` property apply only between children and not at the container's inner boundaries. |
| <h6 id="tab_verticalTabs">verticalTabs<a class="headerlink" href="#tab_verticalTabs" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to display for vertical tab layout |
| <h6 id="tab_label">label<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#tab_label" title="Permanent link">#</a></h6> | `string`&vert;<br/>`boolean` | <code>"auto"</code> | Set to `false` to hide completely<br/>- Insert icons using the prefix ^ followed by the icon's name : `^play`, `^pause`, etc (see https://fontawesome.com/icons?d=gallery&s=solid&m=free)<br/>- Icons can be transformed with the following suffixes: `.flip-[horizontal|vertical|both]`, `.rotate-[90|180|270]`, `.spin`, `.pulse`. Example: `^play.flip-horizontal` |
=== "tab"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="tab_variables">variables<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#tab_variables" title="Permanent link">#</a></h6> | `*` | <code>"@\{parent.variables}"</code> | Defines one or more arbitrary variables that can be inherited by children widgets |
| <h6 id="tab_traversing">traversing<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#tab_traversing" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | 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<br/><br/>Choices: `false`, `true`, `smart` |
=== "value"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="tab_value">value<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#tab_value" title="Permanent link">#</a></h6> | `integer`&vert;<br/>`array` | <code>""</code> | If the panel contains tabs, its value defines which tab is selected selected (by index, starting with 0).<br/><br/>If the panel contains widgets and `scroll` is `true`, its value is an array that contains the scrolling state between 0 and 1 for the x and y axis. |
=== "children"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="tab_widgets">widgets<a class="headerlink" href="#tab_widgets" title="Permanent link">#</a></h6> | `array` | <code>[]</code> | Each element of the array must be a widget object. A panel cannot contain widgets and tabs simultaneously. |
| <h6 id="tab_tabs">tabs<a class="headerlink" href="#tab_tabs" title="Permanent link">#</a></h6> | `array` | <code>[]</code> | Each element of the array must be a tab object. A panel cannot contain widgets and tabs simultaneously |
## Frames
??? api "<div id="frame">frame<a class="headerlink" href="#frame" title="Permanent link">#</a></div>"
Embed a page in a frame (local network only).
=== "value"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="frame_value">value<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#frame_value" title="Permanent link">#</a></h6> | `string` | <code>""</code> | External web page URL. |
??? api "<div id="svg">svg<a class="headerlink" href="#svg" title="Permanent link">#</a></div>"
Svg parser.
=== "svg"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="svg_svg">svg<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#svg_svg" title="Permanent link">#</a></h6> | `string` | <code>""</code> | Svg xml definition (will be wrapped in a `< svg />` element) |
??? api "<div id="html">html<a class="headerlink" href="#html" title="Permanent link">#</a></div>"
Simple HTML parser.
??? api "<div id="image">image<a class="headerlink" href="#image" title="Permanent link">#</a></div>"
Load a image (url or base64-encoded).
=== "style"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="image_size">size<a class="headerlink" href="#image_size" title="Permanent link">#</a></h6> | `string` | <code>"cover"</code> | CSS background-size<br/><br/>Choices: `cover`, `contain`, `auto` |
| <h6 id="image_position">position<a class="headerlink" href="#image_position" title="Permanent link">#</a></h6> | `string` | <code>"center"</code> | CSS background-position<br/><br/>Choices: `center`, `left`, `right`, `top`, `bottom`, `left top`, `left bottom`, `right top`, `right bottom` |
| <h6 id="image_repeat">repeat<a class="headerlink" href="#image_repeat" title="Permanent link">#</a></h6> | `string` | <code>"no-repeat"</code> | CSS background-repeat<br/><br/>Choices: `no-repeat`, `repeat`, `repeat-x`, `repeat-y`, `space`, `round` |
=== "image"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="image_cache">cache<a class="headerlink" href="#image_cache" title="Permanent link">#</a></h6> | `boolean` | <code>true</code> | Set to false to disable image caching (forces file reload when updating or editing the widget).<br/><br/>When true, sending `reload` to the widget reloads its image without changing its value |
=== "value"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="image_value">value<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#image_value" title="Permanent link">#</a></h6> | `string` | <code>""</code> | - File `url` or `path` (relative to the session or theme file location by default, falling back to absolute path)<br/>- Base64 encoded image : `data:image/...` |
## Graphs
??? api "<div id="plot">plot<a class="headerlink" href="#plot" title="Permanent link">#</a></div>"
XY coordinates plot.
=== "style"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="plot_css">css<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#plot_css" title="Permanent link">#</a></h6> | `string` | <code>""</code> | CSS rules. See <a href="https://openstagecontrol.ammd.net/docs/customization/css-tips/">documentation</a>.<br/><br/>Some style-related properties can be set or read from css using css variables:<br/>- `--color-background`: `colorBg`<br/>- `--color-widget`: `colorWidget`<br/>- `--color-fill`: `colorFill`<br/>- `--color-stroke`: `colorStroke`<br/>- `--color-text`: `colorText`<br/>- `--widget-padding`: `padding`<br/>- `--line-width`: `lineWidth`<br/>- `--alpha-fill-on`: `alphaFillOn`<br/>- `--alpha-fill-off`: `alphaFillOff`<br/>- `--alpha-stroke`: `alphaStroke`<br/>- `--alpha-pips`: `alphaPips`<br/>- `--alpha-pips-text`: `alphaPipsText`<br/><br/>Canvas-based widget have their computed width and height available as css variables (read-only):<br/>- `--widget-width`<br/>- `--widget-height` |
| <h6 id="plot_dots">dots<a class="headerlink" href="#plot_dots" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Draw dots on the line |
| <h6 id="plot_bars">bars<a class="headerlink" href="#plot_bars" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to use draw bars instead (disables `logScaleX` and forces `x axis` even spacing) |
| <h6 id="plot_pips">pips<a class="headerlink" href="#plot_pips" title="Permanent link">#</a></h6> | `boolean` | <code>true</code> | Set to `false` to hide the scale |
=== "plot"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="plot_rangeX">rangeX<a class="headerlink" href="#plot_rangeX" title="Permanent link">#</a></h6> | `object` | <code>\{<br/>&nbsp;"min": 0,<br/>&nbsp;"max": 1<br/>}</code> | Defines the min and max values for the x axis |
| <h6 id="plot_rangeY">rangeY<a class="headerlink" href="#plot_rangeY" title="Permanent link">#</a></h6> | `object` | <code>\{<br/>&nbsp;"min": 0,<br/>&nbsp;"max": 1<br/>}</code> | Defines the min and max values for the y axis |
| <h6 id="plot_origin">origin<a class="headerlink" href="#plot_origin" title="Permanent link">#</a></h6> | `number`&vert;<br/>`boolean` | <code>"auto"</code> | Defines the y axis origin. Set to `false` to disable it |
=== "value"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="plot_value">value<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#plot_value" title="Permanent link">#</a></h6> | `array`&vert;<br/>`string` | <code>""</code> | - `Array` of `y` values: `[y1, y2, ...]`<br/>- `Array` of `[x, y]` `array` values: `[[x1 , y1], [x2, y2], ...]`<br/>- `String` `array`: `"[y1, y2, ...]"` or `"[[x1 , y1], [x2, y2], ...]"`<br/>- `String` `object` to update specific coordinates only: `"{0: y1, 1: y2}"` or `"{0: [x1, y1], 1: [x2, y2]}"` |
=== "scripting"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="plot_onValue">onValue<a class="headerlink" href="#plot_onValue" title="Permanent link">#</a></h6> | `script` | <code>""</code> | Script executed when the widget's value updates. See <a href="https://openstagecontrol.ammd.net/docs/widgets/scripting/">documentation</a>.<br/><br/>Canvas-based widget have their computed width and height available as local variables:<br/>- `locals.width`<br/>- `locals.height` |
??? api "<div id="eq">eq<a class="headerlink" href="#eq" title="Permanent link">#</a></div>"
Draws logarithmic frequency response from an array of filter objects.
=== "style"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="eq_css">css<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#eq_css" title="Permanent link">#</a></h6> | `string` | <code>""</code> | CSS rules. See <a href="https://openstagecontrol.ammd.net/docs/customization/css-tips/">documentation</a>.<br/><br/>Some style-related properties can be set or read from css using css variables:<br/>- `--color-background`: `colorBg`<br/>- `--color-widget`: `colorWidget`<br/>- `--color-fill`: `colorFill`<br/>- `--color-stroke`: `colorStroke`<br/>- `--color-text`: `colorText`<br/>- `--widget-padding`: `padding`<br/>- `--line-width`: `lineWidth`<br/>- `--alpha-fill-on`: `alphaFillOn`<br/>- `--alpha-fill-off`: `alphaFillOff`<br/>- `--alpha-stroke`: `alphaStroke`<br/>- `--alpha-pips`: `alphaPips`<br/>- `--alpha-pips-text`: `alphaPipsText`<br/><br/>Canvas-based widget have their computed width and height available as css variables (read-only):<br/>- `--widget-width`<br/>- `--widget-height` |
| <h6 id="eq_dots">dots<a class="headerlink" href="#eq_dots" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Draw dots on the line |
| <h6 id="eq_bars">bars<a class="headerlink" href="#eq_bars" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to use draw bars instead (disables `logScaleX` and forces `x axis` even spacing) |
| <h6 id="eq_pips">pips<a class="headerlink" href="#eq_pips" title="Permanent link">#</a></h6> | `boolean` | <code>true</code> | Set to `false` to hide the scale |
=== "eq"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="eq_rangeX">rangeX<a class="headerlink" href="#eq_rangeX" title="Permanent link">#</a></h6> | `object` | <code>\{<br/>&nbsp;"min": 20,<br/>&nbsp;"max": 22000<br/>}</code> | Defines the min and max values for the x axis (in Hz, logarithmic scale) |
| <h6 id="eq_rangeY">rangeY<a class="headerlink" href="#eq_rangeY" title="Permanent link">#</a></h6> | `object` | <code>\{<br/>&nbsp;"min": -6,<br/>&nbsp;"max": 6<br/>}</code> | Defines the min and max values for the y axis (in dB) |
| <h6 id="eq_origin">origin<a class="headerlink" href="#eq_origin" title="Permanent link">#</a></h6> | `number`&vert;<br/>`boolean` | <code>"auto"</code> | Defines the y axis origin. Set to `false` to disable it |
| <h6 id="eq_filters">filters<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#eq_filters" title="Permanent link">#</a></h6> | `array` | <code>""</code> | Each item must be an object with the following properties<br/>- `type`: string ("highpass", "highshelf", "lowpass", "lowshelf", "peak", "bandpass" or "notch", default: "peak")<br/>- `freq`: number (filter's resonant frequency, default: 1000)<br/>- `q`: number (Q factor, default: 1)<br/>- `gain`: number (default: 0)<br/>- `on`: boolean (default: true)<br/><br/>See https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode |
| <h6 id="eq_pips">pips<a class="headerlink" href="#eq_pips" title="Permanent link">#</a></h6> | `boolean` | <code>true</code> | Set to false to hide the scale |
=== "value"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="eq_value">value<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#eq_value" title="Permanent link">#</a></h6> | `array`&vert;<br/>`string` | <code>""</code> | - `Array` of `y` values: `[y1, y2, ...]`<br/>- `Array` of `[x, y]` `array` values: `[[x1 , y1], [x2, y2], ...]`<br/>- `String` `array`: `"[y1, y2, ...]"` or `"[[x1 , y1], [x2, y2], ...]"`<br/>- `String` `object` to update specific coordinates only: `"{0: y1, 1: y2}"` or `"{0: [x1, y1], 1: [x2, y2]}"` |
=== "scripting"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="eq_onValue">onValue<a class="headerlink" href="#eq_onValue" title="Permanent link">#</a></h6> | `script` | <code>""</code> | Script executed when the widget's value updates. See <a href="https://openstagecontrol.ammd.net/docs/widgets/scripting/">documentation</a>.<br/><br/>Canvas-based widget have their computed width and height available as local variables:<br/>- `locals.width`<br/>- `locals.height` |
??? api "<div id="visualizer">visualizer<a class="headerlink" href="#visualizer" title="Permanent link">#</a></div>"
Display its value over time.
=== "style"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="visualizer_css">css<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#visualizer_css" title="Permanent link">#</a></h6> | `string` | <code>""</code> | CSS rules. See <a href="https://openstagecontrol.ammd.net/docs/customization/css-tips/">documentation</a>.<br/><br/>Some style-related properties can be set or read from css using css variables:<br/>- `--color-background`: `colorBg`<br/>- `--color-widget`: `colorWidget`<br/>- `--color-fill`: `colorFill`<br/>- `--color-stroke`: `colorStroke`<br/>- `--color-text`: `colorText`<br/>- `--widget-padding`: `padding`<br/>- `--line-width`: `lineWidth`<br/>- `--alpha-fill-on`: `alphaFillOn`<br/>- `--alpha-fill-off`: `alphaFillOff`<br/>- `--alpha-stroke`: `alphaStroke`<br/>- `--alpha-pips`: `alphaPips`<br/>- `--alpha-pips-text`: `alphaPipsText`<br/><br/>Canvas-based widget have their computed width and height available as css variables (read-only):<br/>- `--widget-width`<br/>- `--widget-height` |
| <h6 id="visualizer_pips">pips<a class="headerlink" href="#visualizer_pips" title="Permanent link">#</a></h6> | `boolean` | <code>true</code> | Set to `false` to hide the scale |
=== "visualizer"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="visualizer_rangeX">rangeX<a class="headerlink" href="#visualizer_rangeX" title="Permanent link">#</a></h6> | `object` | <code>\{<br/>&nbsp;"min": 0,<br/>&nbsp;"max": 1<br/>}</code> | Defines the min and max values for the x axis |
| <h6 id="visualizer_rangeY">rangeY<a class="headerlink" href="#visualizer_rangeY" title="Permanent link">#</a></h6> | `object` | <code>\{<br/>&nbsp;"min": 0,<br/>&nbsp;"max": 1<br/>}</code> | Defines the min and max values for the y axis |
| <h6 id="visualizer_origin">origin<a class="headerlink" href="#visualizer_origin" title="Permanent link">#</a></h6> | `number` | <code>"auto"</code> | Defines the y axis origin. Set to `false` to disable it |
| <h6 id="visualizer_duration">duration<a class="headerlink" href="#visualizer_duration" title="Permanent link">#</a></h6> | `number` | <code>1</code> | Defines visualization duration in seconds |
| <h6 id="visualizer_framerate">framerate<a class="headerlink" href="#visualizer_framerate" title="Permanent link">#</a></h6> | `number` | <code>30</code> | Defines visualization framerate |
| <h6 id="visualizer_logScaleY">logScaleY<a class="headerlink" href="#visualizer_logScaleY" title="Permanent link">#</a></h6> | `boolean`&vert;<br/>`number` | <code>false</code> | Set to `true` to use logarithmic scale for the y axis (base 10). Set to a `number` to define the logarithm's base. |
| <h6 id="visualizer_freeze">freeze<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#visualizer_freeze" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to freeze current view and ignore incoming values |
=== "value"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="visualizer_value">value<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#visualizer_value" title="Permanent link">#</a></h6> | `array`&vert;<br/>`string` | <code>""</code> | - `Array` of `y` values: `[y1, y2, ...]`<br/>- `Array` of `[x, y]` `array` values: `[[x1 , y1], [x2, y2], ...]`<br/>- `String` `array`: `"[y1, y2, ...]"` or `"[[x1 , y1], [x2, y2], ...]"`<br/>- `String` `object` to update specific coordinates only: `"{0: y1, 1: y2}"` or `"{0: [x1, y1], 1: [x2, y2]}"` |
=== "scripting"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="visualizer_onValue">onValue<a class="headerlink" href="#visualizer_onValue" title="Permanent link">#</a></h6> | `script` | <code>""</code> | Script executed when the widget's value updates. See <a href="https://openstagecontrol.ammd.net/docs/widgets/scripting/">documentation</a>.<br/><br/>Canvas-based widget have their computed width and height available as local variables:<br/>- `locals.width`<br/>- `locals.height` |
## Indicators
??? api "<div id="led">led<a class="headerlink" href="#led" title="Permanent link">#</a></div>"
Intensity display.
=== "style"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="led_borderRadius">borderRadius<a class="headerlink" href="#led_borderRadius" title="Permanent link">#</a></h6> | `string` | <code>""</code> | Css border-radius property. |
=== "led"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="led_mode">mode<a class="headerlink" href="#led_mode" title="Permanent link">#</a></h6> | `string` | <code>"intensity"</code> | Defines how value is interpreted (see `value`)<br/><br/>Choices: `intensity`, `color` |
| <h6 id="led_range">range<a class="headerlink" href="#led_range" title="Permanent link">#</a></h6> | `object` | <code>\{<br/>&nbsp;"min": 0,<br/>&nbsp;"max": 1<br/>}</code> | Value range |
| <h6 id="led_alphaRange">alphaRange<a class="headerlink" href="#led_alphaRange" title="Permanent link">#</a></h6> | `object` | <code>\{<br/>&nbsp;"min": 0,<br/>&nbsp;"max": 1<br/>}</code> | Alpha range (if `mode` is `color`) |
| <h6 id="led_logScale">logScale<a class="headerlink" href="#led_logScale" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | If `mode` is `intensity`, set to `true` to use logarithmic scale. |
=== "value"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="led_value">value<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#led_value" title="Permanent link">#</a></h6> | `number`&vert;<br/>`array`&vert;<br/>`string` | <code>""</code> | If `mode` is `intensity`:<br/>- `Number`: `intensity` between `range.min` and `range.max`<br/><br/>If `mode` is `color`:<br/>- `Array`: `[r, g, b]` (`r`, `g` and `b` between `range.min` and `range.max`)<br/>- `Array`: `[r, g, b, alpha]` (`alpha` between `alphaRange.min` and `alphaRange.max`)<br/>- `String`: CSS color |
??? api "<div id="text">text<a class="headerlink" href="#text" title="Permanent link">#</a></div>"
Display text.
=== "style"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="text_vertical">vertical<a class="headerlink" href="#text_vertical" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to display the text vertically |
| <h6 id="text_wrap">wrap<a class="headerlink" href="#text_wrap" title="Permanent link">#</a></h6> | `boolean`&vert;<br/>`string` | <code>false</code> | Set to `true` to wrap long lines automatically. Set to `soft` to avoid breaking words.<br/><br/>Choices: `false`, `true`, `soft` |
| <h6 id="text_align">align<a class="headerlink" href="#text_align" title="Permanent link">#</a></h6> | `string` | <code>"center"</code> | Text alignment.<br/><br/>Choices: `center`, `left`, `right`, `top`, `bottom`, `left top`, `left bottom`, `right top`, `right bottom` |
## Pads
??? api "<div id="xy">xy<a class="headerlink" href="#xy" title="Permanent link">#</a></div>"
Two-dimensional slider.
=== "style"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="xy_css">css<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#xy_css" title="Permanent link">#</a></h6> | `string` | <code>""</code> | CSS rules. See <a href="https://openstagecontrol.ammd.net/docs/customization/css-tips/">documentation</a>.<br/><br/>Some style-related properties can be set or read from css using css variables:<br/>- `--color-background`: `colorBg`<br/>- `--color-widget`: `colorWidget`<br/>- `--color-fill`: `colorFill`<br/>- `--color-stroke`: `colorStroke`<br/>- `--color-text`: `colorText`<br/>- `--widget-padding`: `padding`<br/>- `--line-width`: `lineWidth`<br/>- `--alpha-fill-on`: `alphaFillOn`<br/>- `--alpha-fill-off`: `alphaFillOff`<br/>- `--alpha-stroke`: `alphaStroke`<br/>- `--alpha-pips`: `alphaPips`<br/>- `--alpha-pips-text`: `alphaPipsText`<br/><br/>Canvas-based widget have their computed width and height available as css variables (read-only):<br/>- `--widget-width`<br/>- `--widget-height` |
| <h6 id="xy_pointSize">pointSize<a class="headerlink" href="#xy_pointSize" title="Permanent link">#</a></h6> | `integer` | <code>20</code> | Defines the points' size |
| <h6 id="xy_ephemeral">ephemeral<a class="headerlink" href="#xy_ephemeral" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | When set to `true`, the point will be drawn only while touched. |
| <h6 id="xy_pips">pips<a class="headerlink" href="#xy_pips" title="Permanent link">#</a></h6> | `boolean` | <code>true</code> | Set to `false` to hide the scale |
=== "xy"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="xy_snap">snap<a class="headerlink" href="#xy_snap" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | By default, the points are dragged from their initial position.<br/><br/>If set to `true`, touching anywhere on the widget's surface will make them snap to the touching coordinates |
| <h6 id="xy_spring">spring<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#xy_spring" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | When set to `true`, the widget will go back to its default value when released |
| <h6 id="xy_rangeX">rangeX<a class="headerlink" href="#xy_rangeX" title="Permanent link">#</a></h6> | `object` | <code>\{<br/>&nbsp;"min": 0,<br/>&nbsp;"max": 1<br/>}</code> | Defines the min and max values for the x axis |
| <h6 id="xy_rangeY">rangeY<a class="headerlink" href="#xy_rangeY" title="Permanent link">#</a></h6> | `object` | <code>\{<br/>&nbsp;"min": 0,<br/>&nbsp;"max": 1<br/>}</code> | Defines the min and max values for the y axis |
| <h6 id="xy_logScaleX">logScaleX<a class="headerlink" href="#xy_logScaleX" title="Permanent link">#</a></h6> | `boolean`&vert;<br/>`number` | <code>false</code> | Set to `true` to use logarithmic scale for the x axis. Set to `-1` for exponential scale. |
| <h6 id="xy_logScaleY">logScaleY<a class="headerlink" href="#xy_logScaleY" title="Permanent link">#</a></h6> | `boolean`&vert;<br/>`number` | <code>false</code> | Set to `true` to use logarithmic scale for the y axis. Set to `-1` for exponential scale. |
| <h6 id="xy_doubleTap">doubleTap<a class="headerlink" href="#xy_doubleTap" title="Permanent link">#</a></h6> | `boolean`&vert;<br/>`string` | <code>false</code> | Set to `true` to make the fader reset to its default value when receiving a double tap.<br/><br/>Can also be an osc address, which case the widget will just send an osc message: `/<doubleTap> <preArgs>` |
| <h6 id="xy_sensitivity">sensitivity<a class="headerlink" href="#xy_sensitivity" title="Permanent link">#</a></h6> | `number` | <code>1</code> | Defines the pad's sensitivity when `snap` is `false` |
=== "scripting"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="xy_onValue">onValue<a class="headerlink" href="#xy_onValue" title="Permanent link">#</a></h6> | `script` | <code>""</code> | Script executed when the widget's value updates. See <a href="https://openstagecontrol.ammd.net/docs/widgets/scripting/">documentation</a>.<br/><br/>Canvas-based widget have their computed width and height available as local variables:<br/>- `locals.width`<br/>- `locals.height` |
| <h6 id="xy_onTouch">onTouch<a class="headerlink" href="#xy_onTouch" title="Permanent link">#</a></h6> | `script` | <code>""</code> | Script executed when the widget is touched and released. See <a href="https://openstagecontrol.ammd.net/docs/widgets/scripting/">documentation</a>. |
??? api "<div id="rgb">rgb<a class="headerlink" href="#rgb" title="Permanent link">#</a></div>"
Color picker with optional alpha slider.
=== "rgb"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="rgb_snap">snap<a class="headerlink" href="#rgb_snap" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | By default, the points are dragged from their initial position.<br/><br/>If set to `true`, touching anywhere on the widget's surface will make them snap to the touching coordinates |
| <h6 id="rgb_spring">spring<a class="headerlink" href="#rgb_spring" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | When set to `true`, the widget will go back to its default value when released |
| <h6 id="rgb_range">range<a class="headerlink" href="#rgb_range" title="Permanent link">#</a></h6> | `object` | <code>\{<br/>&nbsp;"min": 0,<br/>&nbsp;"max": 255<br/>}</code> | Defines the widget's output scale. |
| <h6 id="rgb_alpha">alpha<a class="headerlink" href="#rgb_alpha" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to enable alpha channel |
| <h6 id="rgb_rangeAlpha">rangeAlpha<a class="headerlink" href="#rgb_rangeAlpha" title="Permanent link">#</a></h6> | `object` | <code>\{<br/>&nbsp;"min": 0,<br/>&nbsp;"max": 1<br/>}</code> | Defines the widget's output scale for the alpha channel. |
=== "scripting"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="rgb_onTouch">onTouch<a class="headerlink" href="#rgb_onTouch" title="Permanent link">#</a></h6> | `script` | <code>""</code> | Script executed when the widget is touched and released. See <a href="https://openstagecontrol.ammd.net/docs/widgets/scripting/">documentation</a>. |
??? api "<div id="multixy">multixy<a class="headerlink" href="#multixy" title="Permanent link">#</a></div>"
Multi-point XY pad.
=== "style"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="multixy_css">css<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#multixy_css" title="Permanent link">#</a></h6> | `string` | <code>""</code> | CSS rules. See <a href="https://openstagecontrol.ammd.net/docs/customization/css-tips/">documentation</a>.<br/><br/>Some style-related properties can be set or read from css using css variables:<br/>- `--color-background`: `colorBg`<br/>- `--color-widget`: `colorWidget`<br/>- `--color-fill`: `colorFill`<br/>- `--color-stroke`: `colorStroke`<br/>- `--color-text`: `colorText`<br/>- `--widget-padding`: `padding`<br/>- `--line-width`: `lineWidth`<br/>- `--alpha-fill-on`: `alphaFillOn`<br/>- `--alpha-fill-off`: `alphaFillOff`<br/>- `--alpha-stroke`: `alphaStroke`<br/>- `--alpha-pips`: `alphaPips`<br/>- `--alpha-pips-text`: `alphaPipsText`<br/><br/>Canvas-based widget have their computed width and height available as css variables (read-only):<br/>- `--widget-width`<br/>- `--widget-height` |
| <h6 id="multixy_pointSize">pointSize<a class="headerlink" href="#multixy_pointSize" title="Permanent link">#</a></h6> | `integer` | <code>20</code> | Defines the points' size |
| <h6 id="multixy_ephemeral">ephemeral<a class="headerlink" href="#multixy_ephemeral" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | When set to `true`, the points will be drawn only while touched. |
| <h6 id="multixy_pips">pips<a class="headerlink" href="#multixy_pips" title="Permanent link">#</a></h6> | `boolean` | <code>true</code> | Set to `false` to hide the scale |
=== "multixy"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="multixy_points">points<a class="headerlink" href="#multixy_points" title="Permanent link">#</a></h6> | `integer`&vert;<br/>`array` | <code>2</code> | Defines the number of points on the pad<br/><br/>Can be an array of strings that will be used as labels for the points (ex: `['A', 'B']`) |
| <h6 id="multixy_snap">snap<a class="headerlink" href="#multixy_snap" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | By default, the points are dragged from their initial position.<br/><br/>If set to `true`, touching anywhere on the widget's surface will make them snap to the touching coordinates |
| <h6 id="multixy_spring">spring<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#multixy_spring" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | When set to `true`, the widget will go back to its default value when released |
| <h6 id="multixy_rangeX">rangeX<a class="headerlink" href="#multixy_rangeX" title="Permanent link">#</a></h6> | `object` | <code>\{<br/>&nbsp;"min": 0,<br/>&nbsp;"max": 1<br/>}</code> | Defines the min and max values for the x axis |
| <h6 id="multixy_rangeY">rangeY<a class="headerlink" href="#multixy_rangeY" title="Permanent link">#</a></h6> | `object` | <code>\{<br/>&nbsp;"min": 0,<br/>&nbsp;"max": 1<br/>}</code> | Defines the min and max values for the y axis |
| <h6 id="multixy_logScaleX">logScaleX<a class="headerlink" href="#multixy_logScaleX" title="Permanent link">#</a></h6> | `boolean`&vert;<br/>`number` | <code>false</code> | Set to `true` to use logarithmic scale for the x axis. Set to `-1` for exponential scale. |
| <h6 id="multixy_logScaleY">logScaleY<a class="headerlink" href="#multixy_logScaleY" title="Permanent link">#</a></h6> | `boolean`&vert;<br/>`number` | <code>false</code> | Set to `true` to use logarithmic scale for the y axis. Set to `-1` for exponential scale. |
| <h6 id="multixy_doubleTap">doubleTap<a class="headerlink" href="#multixy_doubleTap" title="Permanent link">#</a></h6> | `boolean`&vert;<br/>`string` | <code>false</code> | Set to `true` to make the fader reset to its default value when receiving a double tap.<br/><br/>Can also be an osc address, which case the widget will just send an osc message: `/<doubleTap> <preArgs>` |
| <h6 id="multixy_sensitivity">sensitivity<a class="headerlink" href="#multixy_sensitivity" title="Permanent link">#</a></h6> | `number` | <code>1</code> | Defines the pad's sensitivity when `snap` is `false` |
=== "scripting"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="multixy_onValue">onValue<a class="headerlink" href="#multixy_onValue" title="Permanent link">#</a></h6> | `script` | <code>""</code> | Script executed when the widget's value updates. See <a href="https://openstagecontrol.ammd.net/docs/widgets/scripting/">documentation</a>.<br/><br/>Canvas-based widget have their computed width and height available as local variables:<br/>- `locals.width`<br/>- `locals.height` |
| <h6 id="multixy_onTouch">onTouch<a class="headerlink" href="#multixy_onTouch" title="Permanent link">#</a></h6> | `script` | <code>""</code> | Script executed when the widget is touched and released. See <a href="https://openstagecontrol.ammd.net/docs/widgets/scripting/">documentation</a>. |
??? api "<div id="canvas">canvas<a class="headerlink" href="#canvas" title="Permanent link">#</a></div>"
Multitouch canvas widget with user-defined drawing functions and touch reactions.
=== "style"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="canvas_css">css<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#canvas_css" title="Permanent link">#</a></h6> | `string` | <code>""</code> | CSS rules. See <a href="https://openstagecontrol.ammd.net/docs/customization/css-tips/">documentation</a>.<br/><br/>Some style-related properties can be set or read from css using css variables:<br/>- `--color-background`: `colorBg`<br/>- `--color-widget`: `colorWidget`<br/>- `--color-fill`: `colorFill`<br/>- `--color-stroke`: `colorStroke`<br/>- `--color-text`: `colorText`<br/>- `--widget-padding`: `padding`<br/>- `--line-width`: `lineWidth`<br/>- `--alpha-fill-on`: `alphaFillOn`<br/>- `--alpha-fill-off`: `alphaFillOff`<br/>- `--alpha-stroke`: `alphaStroke`<br/>- `--alpha-pips`: `alphaPips`<br/>- `--alpha-pips-text`: `alphaPipsText`<br/><br/>Canvas-based widget have their computed width and height available as css variables (read-only):<br/>- `--widget-width`<br/>- `--widget-height` |
=== "canvas"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="canvas_valueLength">valueLength<a class="headerlink" href="#canvas_valueLength" title="Permanent link">#</a></h6> | `number` | <code>1</code> | Defines the number of values accepted by the widget (minimum 1). Incoming messages that don't comply will be ignored<br/><br/>When calling `set()` from a script, submitted value should be an array only if `valueLength` is greater than 1. |
| <h6 id="canvas_autoClear">autoClear<a class="headerlink" href="#canvas_autoClear" title="Permanent link">#</a></h6> | `boolean` | <code>true</code> | If set to `false`, the canvas context won't be cleared automatically and `ctx.clear` will need to be called in `draw`. |
| <h6 id="canvas_continuous">continuous<a class="headerlink" href="#canvas_continuous" title="Permanent link">#</a></h6> | `boolean`&vert;<br/>`number` | <code>false</code> | If set to `true`, `draw` will be called at each frame, otherwise it will be called only when the widget is touched and when it receives a value.<br/><br/>Can be a number between 1 and 60 to specify the framerate (default: 30 fps). |
=== "scripting"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="canvas_onValue">onValue<a class="headerlink" href="#canvas_onValue" title="Permanent link">#</a></h6> | `script` | <code>""</code> | Script executed whenever the widget's value updates. See <a href="https://openstagecontrol.ammd.net/docs/widgets/scripting/">documentation</a>. |
| <h6 id="canvas_onTouch">onTouch<a class="headerlink" href="#canvas_onTouch" title="Permanent link">#</a></h6> | `script` | <code>""</code> | Script executed when the widget is touched and released, and when the pointer moves when the widget is touched. See <a href="https://openstagecontrol.ammd.net/docs/widgets/canvas/">documentation</a>. |
| <h6 id="canvas_onDraw">onDraw<a class="headerlink" href="#canvas_onDraw" title="Permanent link">#</a></h6> | `script` | <code>""</code> | Script executed when the widget is redrawn. See <a href="https://openstagecontrol.ammd.net/docs/widgets/canvas/">documentation</a>. |
## Sliders
??? api "<div id="fader">fader<a class="headerlink" href="#fader" title="Permanent link">#</a></div>"
Vertical / horizontal slider.
=== "style"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="fader_css">css<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#fader_css" title="Permanent link">#</a></h6> | `string` | <code>""</code> | CSS rules. See <a href="https://openstagecontrol.ammd.net/docs/customization/css-tips/">documentation</a>.<br/><br/>Some style-related properties can be set or read from css using css variables:<br/>- `--color-background`: `colorBg`<br/>- `--color-widget`: `colorWidget`<br/>- `--color-fill`: `colorFill`<br/>- `--color-stroke`: `colorStroke`<br/>- `--color-text`: `colorText`<br/>- `--widget-padding`: `padding`<br/>- `--line-width`: `lineWidth`<br/>- `--alpha-fill-on`: `alphaFillOn`<br/>- `--alpha-fill-off`: `alphaFillOff`<br/>- `--alpha-stroke`: `alphaStroke`<br/>- `--alpha-pips`: `alphaPips`<br/>- `--alpha-pips-text`: `alphaPipsText`<br/><br/>Canvas-based widget have their computed width and height available as css variables (read-only):<br/>- `--widget-width`<br/>- `--widget-height` |
| <h6 id="fader_design">design<a class="headerlink" href="#fader_design" title="Permanent link">#</a></h6> | `string` | <code>"default"</code> | Design style<br/><br/>Choices: `default`, `round`, `compact` |
| <h6 id="fader_knobSize">knobSize<a class="headerlink" href="#fader_knobSize" title="Permanent link">#</a></h6> | `number` | <code>"auto"</code> | Fader knob size |
| <h6 id="fader_horizontal">horizontal<a class="headerlink" href="#fader_horizontal" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to display the fader horizontally |
| <h6 id="fader_pips">pips<a class="headerlink" href="#fader_pips" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to show range breakpoints (ignored if `design` is `compact`) |
| <h6 id="fader_dashed">dashed<a class="headerlink" href="#fader_dashed" title="Permanent link">#</a></h6> | `boolean`&vert;<br/>`array` | <code>false</code> | Set to `true` to display a dashed gauge. Can be set as an `array` of two numbers : `[dash_size, gap_size]` |
| <h6 id="fader_gradient">gradient<a class="headerlink" href="#fader_gradient" title="Permanent link">#</a></h6> | `array`&vert;<br/>`object` | <code>[]</code> | When set, the meter's gauge will be filled with a linear color gradient<br/>- each item must be a CSS color string.<br/>- as an `object`: each key must be a number between 0 and 1<br/>- each item must be a CSS color string.<br/><br/>Examples: `['blue', 'red']`, {'0': 'blue', '0.9': 'blue', '1': 'red'} |
=== "fader"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="fader_snap">snap<a class="headerlink" href="#fader_snap" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | By default, dragging the widget will modify it's value starting from its last value. Setting this to `true` will make it snap directly to the mouse/touch position |
| <h6 id="fader_spring">spring<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#fader_spring" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | When set to `true`, the widget will go back to its `default` value when released |
| <h6 id="fader_doubleTap">doubleTap<a class="headerlink" href="#fader_doubleTap" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to make the fader reset to its `default` value when receiving a double tap.<br/><br/>Can also be an osc address, in which case the widget will just send an osc message (`/<doubleTap> <preArgs>`) |
| <h6 id="fader_range">range<a class="headerlink" href="#fader_range" title="Permanent link">#</a></h6> | `object` | <code>\{<br/>&nbsp;"min": 0,<br/>&nbsp;"max": 1<br/>}</code> | Defines the breakpoints of the fader's scale:<br/>- keys can be percentages and/or `min` / `max`<br/>- values can be `number` or `object` if a custom label is needed<br/><br/>Example: (`{min:{"-inf": 0}, "50%": 0.25, max: {"+inf": 1}}`) |
| <h6 id="fader_logScale">logScale<a class="headerlink" href="#fader_logScale" title="Permanent link">#</a></h6> | `boolean`&vert;<br/>`number` | <code>false</code> | Set to `true` to use logarithmic scale. Set to `-1` for exponential scale. |
| <h6 id="fader_sensitivity">sensitivity<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#fader_sensitivity" title="Permanent link">#</a></h6> | `number` | <code>1</code> | Defines the fader's sensitivity when `snap` is `false` |
| <h6 id="fader_steps">steps<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#fader_steps" title="Permanent link">#</a></h6> | `string`&vert;<br/>`number`&vert;<br/>`array` | <code>""</code> | Restricts the widget's value:<br/>- `empty` or `0`: use values defined in `range`<br/>- `number`: define a number of evenly spaced steps<br/>- `array`: use arbitrary values |
| <h6 id="fader_origin">origin<a class="headerlink" href="#fader_origin" title="Permanent link">#</a></h6> | `number` | <code>"auto"</code> | Defines the starting point's value of the fader's gauge |
=== "scripting"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="fader_onValue">onValue<a class="headerlink" href="#fader_onValue" title="Permanent link">#</a></h6> | `script` | <code>""</code> | Script executed when the widget's value updates. See <a href="https://openstagecontrol.ammd.net/docs/widgets/scripting/">documentation</a>.<br/><br/>Canvas-based widget have their computed width and height available as local variables:<br/>- `locals.width`<br/>- `locals.height` |
| <h6 id="fader_onTouch">onTouch<a class="headerlink" href="#fader_onTouch" title="Permanent link">#</a></h6> | `script` | <code>""</code> | Script executed when the widget is touched and released. See <a href="https://openstagecontrol.ammd.net/docs/widgets/scripting/">documentation</a>. |
??? api "<div id="knob">knob<a class="headerlink" href="#knob" title="Permanent link">#</a></div>"
Rotative knob slider.
=== "style"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="knob_css">css<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#knob_css" title="Permanent link">#</a></h6> | `string` | <code>""</code> | CSS rules. See <a href="https://openstagecontrol.ammd.net/docs/customization/css-tips/">documentation</a>.<br/><br/>Some style-related properties can be set or read from css using css variables:<br/>- `--color-background`: `colorBg`<br/>- `--color-widget`: `colorWidget`<br/>- `--color-fill`: `colorFill`<br/>- `--color-stroke`: `colorStroke`<br/>- `--color-text`: `colorText`<br/>- `--widget-padding`: `padding`<br/>- `--line-width`: `lineWidth`<br/>- `--alpha-fill-on`: `alphaFillOn`<br/>- `--alpha-fill-off`: `alphaFillOff`<br/>- `--alpha-stroke`: `alphaStroke`<br/>- `--alpha-pips`: `alphaPips`<br/>- `--alpha-pips-text`: `alphaPipsText`<br/><br/>Canvas-based widget have their computed width and height available as css variables (read-only):<br/>- `--widget-width`<br/>- `--widget-height` |
| <h6 id="knob_design">design<a class="headerlink" href="#knob_design" title="Permanent link">#</a></h6> | `string` | <code>"default"</code> | Design style<br/><br/>Note: "solid" design uses "colorStroke" for the central knob color.<br/><br/>Choices: `default`, `solid`, `line` |
| <h6 id="knob_pips">pips<a class="headerlink" href="#knob_pips" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to show the scale's breakpoints |
| <h6 id="knob_dashed">dashed<a class="headerlink" href="#knob_dashed" title="Permanent link">#</a></h6> | `boolean`&vert;<br/>`array` | <code>false</code> | Set to `true` to display a dashed gauge. Can be set as an `array` of two numbers : `[dash_size, gap_size]` |
| <h6 id="knob_angle">angle<a class="headerlink" href="#knob_angle" title="Permanent link">#</a></h6> | `number` | <code>270</code> | Defines the angle's width of the knob, in degrees |
=== "knob"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="knob_mode">mode<a class="headerlink" href="#knob_mode" title="Permanent link">#</a></h6> | `string` | <code>"vertical"</code> | - `circular`: relative move in circular motion<br/>- `snap`: snap to touch position and move in vertical motion<br/>- `vertical`: relative move in vertical motion<br/><br/>Choices: `vertical`, `circular`, `snap` |
| <h6 id="knob_spring">spring<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#knob_spring" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | When set to `true`, the widget will go back to its `default` value when released |
| <h6 id="knob_doubleTap">doubleTap<a class="headerlink" href="#knob_doubleTap" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to make the knob reset to its `default` value when receiving a double tap.<br/><br/>Can also be an osc address, in which case the widget will just send an osc message (`/<doubleTap> <preArgs>`) |
| <h6 id="knob_range">range<a class="headerlink" href="#knob_range" title="Permanent link">#</a></h6> | `object` | <code>\{<br/>&nbsp;"min": 0,<br/>&nbsp;"max": 1<br/>}</code> | Defines the breakpoints of the fader's scale:<br/>- keys can be percentages and/or `min` / `max`<br/>- values can be `number` or `object` if a custom label is needed<br/><br/>Example: (`{min:{"-inf": 0}, "50%": 0.25, max: {"+inf": 1}}`) |
| <h6 id="knob_logScale">logScale<a class="headerlink" href="#knob_logScale" title="Permanent link">#</a></h6> | `boolean`&vert;<br/>`number` | <code>false</code> | Set to `true` to use logarithmic scale. Set to `-1` for exponential scale. |
| <h6 id="knob_sensitivity">sensitivity<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#knob_sensitivity" title="Permanent link">#</a></h6> | `number` | <code>1</code> | Defines the knob's sensitivity when `mode` is not `snap` |
| <h6 id="knob_steps">steps<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#knob_steps" title="Permanent link">#</a></h6> | `string`&vert;<br/>`number`&vert;<br/>`array` | <code>""</code> | Restricts the widget's value:<br/>- `empty` or `0`: use values defined in `range`<br/>- `number`: define a number of evenly spaced steps<br/>- `array`: use arbitrary values |
| <h6 id="knob_origin">origin<a class="headerlink" href="#knob_origin" title="Permanent link">#</a></h6> | `number` | <code>"auto"</code> | Defines the starting point's value of the knob's gauge |
=== "scripting"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="knob_onValue">onValue<a class="headerlink" href="#knob_onValue" title="Permanent link">#</a></h6> | `script` | <code>""</code> | Script executed when the widget's value updates. See <a href="https://openstagecontrol.ammd.net/docs/widgets/scripting/">documentation</a>.<br/><br/>Canvas-based widget have their computed width and height available as local variables:<br/>- `locals.width`<br/>- `locals.height` |
| <h6 id="knob_onTouch">onTouch<a class="headerlink" href="#knob_onTouch" title="Permanent link">#</a></h6> | `script` | <code>""</code> | Script executed when the widget is touched and released. See <a href="https://openstagecontrol.ammd.net/docs/widgets/scripting/">documentation</a>. |
??? api "<div id="encoder">encoder<a class="headerlink" href="#encoder" title="Permanent link">#</a></div>"
A knob that sends a relative direction infomation instead of an absolute value.
=== "style"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="encoder_css">css<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#encoder_css" title="Permanent link">#</a></h6> | `string` | <code>""</code> | CSS rules. See <a href="https://openstagecontrol.ammd.net/docs/customization/css-tips/">documentation</a>.<br/><br/>Some style-related properties can be set or read from css using css variables:<br/>- `--color-background`: `colorBg`<br/>- `--color-widget`: `colorWidget`<br/>- `--color-fill`: `colorFill`<br/>- `--color-stroke`: `colorStroke`<br/>- `--color-text`: `colorText`<br/>- `--widget-padding`: `padding`<br/>- `--line-width`: `lineWidth`<br/>- `--alpha-fill-on`: `alphaFillOn`<br/>- `--alpha-fill-off`: `alphaFillOff`<br/>- `--alpha-stroke`: `alphaStroke`<br/>- `--alpha-pips`: `alphaPips`<br/>- `--alpha-pips-text`: `alphaPipsText`<br/><br/>Canvas-based widget have their computed width and height available as css variables (read-only):<br/>- `--widget-width`<br/>- `--widget-height` |
=== "encoder"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="encoder_mode">mode<a class="headerlink" href="#encoder_mode" title="Permanent link">#</a></h6> | `string` | <code>"circular"</code> | - `circular`: relative move in circular motion<br/>- `snap`: snap to touch position and move in vertical motion<br/>- `vertical`: relative move in vertical motion<br/><br/>Choices: `circular`, `snap`, `vertical` |
| <h6 id="encoder_doubleTap">doubleTap<a class="headerlink" href="#encoder_doubleTap" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to make the fader reset to its `default` value when receiving a double tap.<br/><br/>Can also be an osc address, in which case the widget will just send an osc message (`/<doubleTap> <preArgs>`) |
| <h6 id="encoder_range">range<a class="headerlink" href="#encoder_range" title="Permanent link">#</a></h6> | `object` | <code>\{<br/>&nbsp;"min": 0,<br/>&nbsp;"max": 1<br/>}</code> | Defines the breakpoints of the fader's scale:<br/>- keys can be percentages and/or `min` / `max`<br/>- values can be `number` or `object` if a custom label is needed<br/><br/>Example: (`{min:{"-inf": 0}, "50%": 0.25, max: {"+inf": 1}}`) |
| <h6 id="encoder_logScale">logScale<a class="headerlink" href="#encoder_logScale" title="Permanent link">#</a></h6> | `boolean`&vert;<br/>`number` | <code>false</code> | Set to `true` to use logarithmic scale. Set to `-1` for exponential scale. |
| <h6 id="encoder_sensitivity">sensitivity<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#encoder_sensitivity" title="Permanent link">#</a></h6> | `number` | <code>1</code> | When set between 0 and 1, reduces the encoder's verbosity |
| <h6 id="encoder_ticks">ticks<a class="headerlink" href="#encoder_ticks" title="Permanent link">#</a></h6> | `number` | <code>""</code> | Defines the granularity / verbosity of the encoder (number of step for a 360° arc) |
| <h6 id="encoder_back">back<a class="headerlink" href="#encoder_back" title="Permanent link">#</a></h6> | `*` | <code>-1</code> | Defines which value is sent when rotating the encoder anticlockwise |
| <h6 id="encoder_forth">forth<a class="headerlink" href="#encoder_forth" title="Permanent link">#</a></h6> | `*` | <code>1</code> | Defines which value is sent when rotating the encoder clockwise |
| <h6 id="encoder_release">release<a class="headerlink" href="#encoder_release" title="Permanent link">#</a></h6> | `number` | <code>""</code> | Defines which value is sent when releasing the encoder:<br/>- Set to `null` to send send no argument in the osc message<br/>- Can be an `object` if the type needs to be specified |
=== "scripting"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="encoder_onValue">onValue<a class="headerlink" href="#encoder_onValue" title="Permanent link">#</a></h6> | `script` | <code>""</code> | Script executed when the widget's value updates. See <a href="https://openstagecontrol.ammd.net/docs/widgets/scripting/">documentation</a>.<br/><br/>Canvas-based widget have their computed width and height available as local variables:<br/>- `locals.width`<br/>- `locals.height`<br/><br/>Additionnal variables:<br/>- `locals.speed`: encoder's speed (reduce `sensitivity` to increase averaging)<br/>- `locals.angle`: encoder's angle in degrees |
| <h6 id="encoder_onTouch">onTouch<a class="headerlink" href="#encoder_onTouch" title="Permanent link">#</a></h6> | `script` | <code>""</code> | Script executed when the widget is touched and released. See <a href="https://openstagecontrol.ammd.net/docs/widgets/scripting/">documentation</a>. |
??? api "<div id="range">range<a class="headerlink" href="#range" title="Permanent link">#</a></div>"
A fader with two heads for setting a range.
=== "style"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="range_css">css<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#range_css" title="Permanent link">#</a></h6> | `string` | <code>""</code> | CSS rules. See <a href="https://openstagecontrol.ammd.net/docs/customization/css-tips/">documentation</a>.<br/><br/>Some style-related properties can be set or read from css using css variables:<br/>- `--color-background`: `colorBg`<br/>- `--color-widget`: `colorWidget`<br/>- `--color-fill`: `colorFill`<br/>- `--color-stroke`: `colorStroke`<br/>- `--color-text`: `colorText`<br/>- `--widget-padding`: `padding`<br/>- `--line-width`: `lineWidth`<br/>- `--alpha-fill-on`: `alphaFillOn`<br/>- `--alpha-fill-off`: `alphaFillOff`<br/>- `--alpha-stroke`: `alphaStroke`<br/>- `--alpha-pips`: `alphaPips`<br/>- `--alpha-pips-text`: `alphaPipsText`<br/><br/>Canvas-based widget have their computed width and height available as css variables (read-only):<br/>- `--widget-width`<br/>- `--widget-height` |
| <h6 id="range_design">design<a class="headerlink" href="#range_design" title="Permanent link">#</a></h6> | `string` | <code>"default"</code> | Design style<br/><br/>Choices: `default`, `round`, `compact` |
| <h6 id="range_knobSize">knobSize<a class="headerlink" href="#range_knobSize" title="Permanent link">#</a></h6> | `number` | <code>"auto"</code> | Fader knob size |
| <h6 id="range_horizontal">horizontal<a class="headerlink" href="#range_horizontal" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to display the fader horizontally |
| <h6 id="range_pips">pips<a class="headerlink" href="#range_pips" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to show range breakpoints (ignored if `design` is `compact`) |
| <h6 id="range_dashed">dashed<a class="headerlink" href="#range_dashed" title="Permanent link">#</a></h6> | `boolean`&vert;<br/>`array` | <code>false</code> | Set to `true` to display a dashed gauge. Can be set as an `array` of two numbers : `[dash_size, gap_size]` |
| <h6 id="range_gradient">gradient<a class="headerlink" href="#range_gradient" title="Permanent link">#</a></h6> | `array`&vert;<br/>`object` | <code>[]</code> | When set, the meter's gauge will be filled with a linear color gradient<br/>- each item must be a CSS color string.<br/>- as an `object`: each key must be a number between 0 and 1<br/>- each item must be a CSS color string.<br/><br/>Examples: `['blue', 'red']`, {'0': 'blue', '0.9': 'blue', '1': 'red'} |
=== "range"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="range_snap">snap<a class="headerlink" href="#range_snap" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | By default, dragging the widget will modify it's value starting from its last value. Setting this to `true` will make it snap directly to the mouse/touch position |
| <h6 id="range_spring">spring<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#range_spring" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | When set to `true`, the widget will go back to its `default` value when released |
| <h6 id="range_doubleTap">doubleTap<a class="headerlink" href="#range_doubleTap" title="Permanent link">#</a></h6> | `boolean` | <code>false</code> | Set to `true` to make the fader reset to its `default` value when receiving a double tap.<br/><br/>Can also be an osc address, in which case the widget will just send an osc message (`/<doubleTap> <preArgs>`) |
| <h6 id="range_range">range<a class="headerlink" href="#range_range" title="Permanent link">#</a></h6> | `object` | <code>\{<br/>&nbsp;"min": 0,<br/>&nbsp;"max": 1<br/>}</code> | Defines the breakpoints of the fader's scale:<br/>- keys can be percentages and/or `min` / `max`<br/>- values can be `number` or `object` if a custom label is needed<br/><br/>Example: (`{min:{"-inf": 0}, "50%": 0.25, max: {"+inf": 1}}`) |
| <h6 id="range_logScale">logScale<a class="headerlink" href="#range_logScale" title="Permanent link">#</a></h6> | `boolean`&vert;<br/>`number` | <code>false</code> | Set to `true` to use logarithmic scale. Set to `-1` for exponential scale. |
| <h6 id="range_sensitivity">sensitivity<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#range_sensitivity" title="Permanent link">#</a></h6> | `number` | <code>1</code> | Defines the fader's sensitivity when `snap` is `false` |
| <h6 id="range_steps">steps<sup><i class="fas fa-bolt" title="dynamic"></i></sup><a class="headerlink" href="#range_steps" title="Permanent link">#</a></h6> | `string`&vert;<br/>`number`&vert;<br/>`array` | <code>""</code> | Restricts the widget's value:<br/>- `empty` or `0`: use values defined in `range`<br/>- `number`: define a number of evenly spaced steps<br/>- `array`: use arbitrary values |
=== "scripting"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="range_onValue">onValue<a class="headerlink" href="#range_onValue" title="Permanent link">#</a></h6> | `script` | <code>""</code> | Script executed when the widget's value updates. See <a href="https://openstagecontrol.ammd.net/docs/widgets/scripting/">documentation</a>.<br/><br/>Canvas-based widget have their computed width and height available as local variables:<br/>- `locals.width`<br/>- `locals.height` |
| <h6 id="range_onTouch">onTouch<a class="headerlink" href="#range_onTouch" title="Permanent link">#</a></h6> | `script` | <code>""</code> | Script executed when the widget is touched and released. See <a href="https://openstagecontrol.ammd.net/docs/widgets/scripting/">documentation</a>. |
## Scripts
??? api "<div id="script">script<a class="headerlink" href="#script" title="Permanent link">#</a></div>"
Scripting widget utility with keyboard bindings
=== "scripting"
| property | type |default | description |
| --- | --- | --- | --- |
| <h6 id="script_onKeyboard">onKeyboard<a class="headerlink" href="#script_onKeyboard" title="Permanent link">#</a></h6> | `script` | <code>""</code> | Script executed whenever the widget receives a keyboard event if `keyBinding` is set). See <a href="https://openstagecontrol.ammd.net/docs/widgets/scripting/">documentation</a>. |
| <h6 id="script_keyBinding">keyBinding<a class="headerlink" href="#script_keyBinding" title="Permanent link">#</a></h6> | `string`&vert;<br/>`array` | <code>""</code> | Key combo `string` or `array` of strings (see <a href="https://github.com/RobertWHurst/KeyboardJS">KeyboardJS</a> documentation).<br/><br/>If the editor is enabled, some keys / combos will not work.<br/><br/>To process all keystroke events, write `['']` |
| <h6 id="script_keyRepeat">keyRepeat<a class="headerlink" href="#script_keyRepeat" title="Permanent link">#</a></h6> | `boolean` | <code>true</code> | Set to `false` to prevent keydown repeats when holding the key combo pressed |
| <h6 id="script_keyType">keyType<a class="headerlink" href="#script_keyType" title="Permanent link">#</a></h6> | `string` | <code>"keydown"</code> | Determines which key event trigger the script's execution<br/><br/>Choices: `keydown`, `keyup`, `both` |
??? api "<div id="variable">variable<a class="headerlink" href="#variable" title="Permanent link">#</a></div>"
Receives / stores a value, to be used in scripts (using the get function) or in properties (using the @{} syntax).

View file

@ -21,13 +21,17 @@ This script is called when the widget is created. If the widget has children, it
!!! warning "Modifying parent container"
Modifying a non-dynamic property on a parent container from this script **will not work**.
The following variables are available in this context:
- `value`: widget's value
### `onValue`
This script is called when the widget's value updates and when it receives a value.
The following variables are available in this context:
- `id` (`string`): id of the widget that's reponsible for the value update
- `id` (`string`): id of the widget that's responsible for the value update
- `value`: widget's value
- `touch`: see [Touch state](#touch-state)
@ -74,7 +78,23 @@ This script has access to the same variables and functions as the `script` prope
- `type`: `"start"` or `"stop"`
- `handle`: `undefined` if the event concerns the widget, `integer` if it concerns one of it's handles (`multixy` and `range` widgets only)
Note: the [canvas](../canvas/) widgets exposes more informations in its `onTouch` script.
[Canvas](../canvas/) and containers expose more informations in their `onTouch` script.
??? infos "Containers onTouch"
Containers (root, panel, etc) can monitor touch events happening inside them, it works like with [Canvas](../canvas/#ontouch), with a few differences:
- `event.firstTarget` will return the id of the first touched widget
- setting `event.preventDefault` to `true` will prevent the event from reaching widgets in the container ('start' and 'move' events only)
- setting `event.allowScroll` to `true` will allow touch scrolling where it would normally be prevented ('start' event only)
- setting `event.inertia` will affect 'move' events (works like widget `sensitivity` in reverse (1 = normal, 10 = slow move))
- `width` and `height` are undefined
Containers with `traversing` enabled change how touch events are emitted:
- a new 'stop' event is emitted whenever the pointer exits a touchable widget while pressed.
- a new 'start' event is emitted whenever the pointer enters a touchable widget while pressed.
### `onDraw`
@ -99,6 +119,12 @@ The following variables are available in this context:
- `meta` (`boolean`): `true` if meta key is pressed
### `onPreload`
This script is specific to the root widget, it's called before any other widget is created and can be used to create global variables / functions accessible in other scripts.
In this script, all osc messages emissions are prevented and changing the value of a widget won't trigger widget synchronisation / scripts / advanced syntaxes updates.
## Available variables
The following variables and functions are accessible in this context.
@ -114,6 +140,8 @@ The following variables and functions are accessible in this context.
- `platform`: operating system as seen by the client
- `session`: session file path
- `clipboard`: instance of navigator [Clipboard](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard)
- `Image`: javascript's [Image](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/Image) constructor
!!! note "this"
Unlike in most javascript contexts, the special keyword `this` doesn't point to an object but instead returns the string `"this"`.
@ -135,6 +163,7 @@ Returns the value of the first matching widget. If the returned value is an obje
- `sync: false`: prevents widgets from triggering synchronization and scripts
- `script: false`: prevents scripts but not synchronization
- `send: false`: prevents widgets from sending osc messages
- `external: true`: simulates a value coming from an osc/midi message (implies `send: false` automatically)
Sets the value of the first matching widget. If `ìd` contains wildcards, affects all matching widgets **except** the emitting widget.
@ -205,6 +234,13 @@ Forces a widget to check if one of its properties has changed and update itself
----
#### `updateCanvas(id)`
- `id`: widget `id` as a string. Can be `"this"` to target the host widget.
Forces a canvas widget redraw.
----
#### `httpGet(url, callback)`
- `url`: url of the resource to fetch (local url only)
@ -219,10 +255,13 @@ Returns a state object (`id:value`) for matching widget and all their children.
----
#### `stateSet(state)`
#### `stateSet(state, options)`
Loads a state object. If the event that triggered the script's execution was initiated by a user interaction, this will make the updated widgets send their value as well.
- `options` (optional): `object`, accepts the following items:
- `send: false`: prevents widgets from sending osc messages
----
#### `storage`
@ -266,7 +305,7 @@ Reference:
- `id` (optional): widget `id` as a string
Gives focus to a widget (ie input widget).
Gives focus to a widget (ie input widget). If `id` is omitted or falsy, currently focused element will be unfocused.
*Built-in client only*: tells the operating system to give the focus to the client window
@ -278,15 +317,19 @@ Gives focus to a widget (ie input widget).
----
#### `setFocusable(focusable)`
- `focusable`: `0` or `1`
*Built-in client only*: define whether the client window can be focused or not. Text inputs cannot be interacted with when the window is not focusable.
----
#### `getScroll(id)`
- `id`: widget `id` as a string.
Returns the scroll position of a container as a `[x, y]` array.
**Deprecated**
Scrollable panels expose their scroll position normalized between 0 and 1 with their value.
----
#### `setScroll(id, x, y)`
@ -296,26 +339,50 @@ Scrollable panels expose their scroll position normalized between 0 and 1 with t
Sets the scroll state of a container.
**Deprecated**
----
#### `scrollIntoView(id, option)`
- `id`: widget `id` as a string. Can be `"this"` to target the host widget, or `"parent"` to target the parent widget.
- `option`: `alignToTop` or `options` argument as defined in https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView
Scroll containers to make widget(s) visible.
Scrollable panels expose their scroll position normalized between 0 and 1 with their value.
----
#### `toolbar(i1, i2, ...)`
- `iX`: menu entry index
#### `toolbar(id)`
- `id` menu entry id (string)
Triggers toolbar action at specified index.
Triggers toobar action if currently available (ie accessible from the menu). `id` can be one of the following:
!!! example "Examples"
- `session-new`,`session-open`, `session-save`, `session-save-as`, `session-fragment`, `session-backup`, `session-import`, `session-export`
- `state-store`, `state-recall`, `state-send`, `state-open`, `state-save`, `state-save-as`, `state-import`, `state-export`
- `editor-enabled`, `editor-grid`, `editor-tree`, `editor-inspector`, `editor-percents`
- `console-enabled`, `console-clear`
- `fullscreen`, `notifictions`, `prevent-sleep`, `virtual-keyboard`
Some actions will only be triggered if initiated with a physical user interaction, check the console for errors if it doesn't work as expected.
=== "Legacy syntax: `toolbar(i1, i2, ...)`"
- `iX`: menu entry index
Triggers toolbar action at specified index.
!!! example "Examples"
- `toolbar(0, 0)` -> Open a new session
- `toolbar(4)` -> Toggle full screen
Actions will only be triggered if initiated with a user interaction. Fullscreen cannot be toggled with a simulated interaction (i.e. using `/SET`)
----
#### `getToolbar(id)`
- `id` menu entry id (string)
Returns `true` if the toolbar entry exists and is currently activated.
#### `openUrl(url)`
- `url`: http(s) url
@ -331,3 +398,40 @@ If the event that triggered the script's execution was not initiated by a user i
- `callback`: function to be executed
Run `callback` function as if executed by another that widget matches specified id. This will not change the value of any local variable but `"this"` and `"parent"` arguments (accepted by functions such as `set()`) will be interpreted differently. Timeouts and intervals will be created and cleared in the target widget's scope.
----
#### `reload(keepState)`
- `keepState` (optional): `true` by default, set to false to discard the client's state.
Reload the client application. Cannot be called from the `onCreate` property.
If the event that triggered the script's execution was not initiated by a user interaction, this function will have no effect.
----
#### `getNavigator()`
Returns the instance of [Navigator](https://developer.mozilla.org/en-US/docs/Web/API/Navigator).
----
#### `browseFile(options, callback)`
Opens the server file browser and pass selected file to a callback function (does not create nor read files by itself).
- `options`: object with the following keys:
- `extension`: allowed extension (default: "*")
- `directory`: starting directory for browser (default: user's home)
- `allowDir`: allow choosing a directory instead of a file (default: false)
- `mode`: "save" or "open"
- `callback`: function called with 1 argument (file path)
#### `uploadFile(options, callback)`
Opens the client file upload prompt and pass the raw content of selected file to a callback function.
- `options`: object with the following keys:
- `types`: equivalent of HTML attribute [`accept`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/accept)
- `callback`: function called with 1 argument (file content)

View file

@ -3,64 +3,20 @@
!!! tip ""
[*Click here*](/docs/getting-started/introduction/#installation) to read the installation guide.
<a href="https://github.com/jean-emmanuel/open-stage-control/releases/latest"> Open Stage Control <span id="osc-version"span></a>
<a href="https://framagit.org/jean-emmanuel/open-stage-control/-/releases/v{{config.latest_release}}">
Open Stage Control v{{config.latest_release}}
</a>
<div id="osc-assets">Loading assets...</div>
<ul>
<li><a href="/packages/open-stage-control-{{config.latest_release}}-1.x86_64.rpm"><i class="fa fa-download"></i>GNU/Linux RPM (64-bit)</a></li>
<li><a href="/packages/open-stage-control_{{config.latest_release}}_amd64.deb"><i class="fa fa-download"></i>GNU/Linux Debian (64-bit)</a></li>
<li><a href="/packages/open-stage-control_{{config.latest_release}}_linux-x64.zip"><i class="fa fa-download"></i>GNU/Linux (64-bit)</a></li>
<li><a href="/packages/open-stage-control_{{config.latest_release}}_node.zip"><i class="fa fa-download"></i>Node.js</a></li>
<li><a href="/packages/open-stage-control_{{config.latest_release}}_osx-x64.zip"><i class="fa fa-download"></i>MacOS x64</a></li>
<li><a href="/packages/open-stage-control_{{config.latest_release}}_osx-arm64.zip"><i class="fa fa-download"></i>MacOS arm64</a></li>
<li><a href="/packages/open-stage-control_{{config.latest_release}}_win32-x64.zip"><i class="fa fa-download"></i>Windows (64-bit)</a></li>
<script>
var oReq = new XMLHttpRequest();
oReq.addEventListener('load', reqListener);
oReq.open('GET', 'https://api.github.com/repos/jean-emmanuel/open-stage-control/releases/latest')
oReq.send()
function text(id, str) {
var el = typeof id === 'string' ? document.getElementById(id) : id
el.textContent = str
}
var names = {
'amd64': 'GNU/Linux Debian (64-bit)',
'linux-x64': 'GNU/Linux (64-bit)',
'node': 'Node.js',
'osx': 'MacOS',
'win32-x64': 'Windows (64-bit)'
}
function reqListener () {
var data = JSON.parse(this.responseText)
var date = new Date(data.published_at)
text('osc-version', data.tag_name + ' (' + date.toLocaleDateString() + ')')
var list = document.createElement('ul')
for (var i in data.assets) {
var item = document.createElement('li'),
link = document.createElement('a'),
name = data.assets[i].name
try {
name = names[name.match(/[0-9]+\.[0-9]+\.[0-9]+\-([^\.]+)/)[1]]
} catch(e) {
console.log(e)
}
link.innerHTML = '<i class="fa fa-download"></i> ' + name + ' <span class="download-size">(' + (data.assets[i].size / 1024 / 1024).toFixed(0) + 'M)</span>'
link.href = data.assets[i].browser_download_url
item.appendChild(link)
list.appendChild(item)
}
var assets = document.getElementById('osc-assets')
assets.innerHTML = ''
assets.appendChild(list)
}
</script>
</ul>
<style>
@ -96,7 +52,7 @@ li i {
<div>
<a
href="https://openstagecontrol.ammd.net/docs/changelog/"
href="/docs/changelog/"
class="md-button md-button-small"
>
Read the Changelog

View file

@ -3,9 +3,19 @@ document.addEventListener('DOMContentLoaded', ()=>{
if (window.location.hash && window.location.href.includes('properties-reference')) {
// show target in tabs/details
document.querySelectorAll('[id='+window.location.hash.split("#")[1]+']').forEach(function(item){
var tab = item.closest('.tabbed-content'),
details = item.closest('details')
if (tab) tab.previousSibling.click()
var tab = item.closest('.tabbed-block'),
container= item.closest('.tabbed-set'),
details = item.closest('details'),
index = 0
while (tab.previousElementSibling) {
index++
tab = tab.previousElementSibling
}
console.log(index)
container.querySelectorAll('.tabbed-labels label:nth-child('+(index+1)+')').forEach(function(item,i){
item.click()
})
if (item) {
item.scrollIntoView()
document.documentElement.scrollTop -= 70

View file

@ -2,14 +2,14 @@
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
src: url('Roboto-Bold.woff2') format('woff2');
src: url('./Roboto-Bold.woff2') format('woff2');
}
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
src: url('Roboto-Medium.woff2') format('woff2');
src: url('./Roboto-Medium.woff2') format('woff2');
}
@ -17,19 +17,19 @@
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: url('Roboto-Regular.woff2') format('woff2');
src: url('./Roboto-Regular.woff2') format('woff2');
}
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 100;
src: url('Roboto-Light.woff2') format('woff2');
src: url('./Roboto-Light.woff2') format('woff2');
}
@font-face {
font-family: 'Roboto Mono';
font-style: normal;
font-weight: 500;
src: url('roboto-mono.woff') format('woff');
src: url('./roboto-mono.woff') format('woff');
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 931 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -1,10 +1,11 @@
site_name: Open Stage Control
repo_name: open-stage-control
repo_url: https://github.com/jean-emmanuel/open-stage-control
repo_url: https://framagit.org/jean-emmanuel/open-stage-control
edit_uri: tree/master/resources/docs/
copyright: "Copyleft © Jean-Emmanuel Doucet @ <a href='http://ammd.net'>AMMD</a> (<a href='https://github.com/jean-emmanuel/open-stage-control/blob/master/LICENSE'>GNU/GPLv3</a>)"
copyright: "Copyleft © Jean-Emmanuel Doucet @ <a href='http://ammd.net'>AMMD</a> (<a href='https://framagit.org/jean-emmanuel/open-stage-control/-/blob/master/LICENSE'>GNU/GPLv3</a>)"
site_description: "Libre and modular OSC / MIDI controller"
site_dir: '../app/docs/'
latest_release: 1.31.2
theme:
name: 'material'
@ -35,6 +36,9 @@ nav:
- docs/getting-started/server-configuration.md
- docs/getting-started/running-from-sources.md
- docs/getting-started/running-with-node.md
- Tutorials:
- docs/tutorials/first-steps.md
- docs/tutorials/change-property-with-osc.md
- User interface:
- docs/user-interface/launcher.md
- docs/user-interface/client.md
@ -60,9 +64,6 @@ nav:
- Remote control: docs/remote-control.md
- Credits: docs/credits.md
- Changelog: docs/changelog.md
- Bug Tracker:
- 'Bug Tracker': 'https://github.com/jean-emmanuel/open-stage-control/issues'
- Community:
- 'Community forums': 'https://openstagecontrol.discourse.group'
@ -90,5 +91,10 @@ markdown_extensions:
custom_checkbox: true
- pymdownx.tilde
- pymdownx.keys
- pymdownx.tabbed
- pymdownx.tabbed:
alternate_style: true
- pymdownx.details
plugins:
- macros

View file

@ -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').Minimatch
var ignores = ['**/*.min.js', '**/jquery.ui.js', 'gyronorm.complete.min.js'],
transformWrapper = function(transform){
return function(file, opts){
if (ignores.some(pattern => minimatch(pattern).match(file))) {
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 <style> is allowed; somehow fails at object spread syntax transpilation
]
})
if (watch) {
var ansiHTML = require('ansi-html'),
WS = require('../node_modules/ws')
function send(msg, data){
var ipc = new WS('ws://127.0.0.1:8080/dev')
ipc.on('error', ()=>{})
ipc.on('open', ()=>{
ipc.send(JSON.stringify([msg, data]))
ipc.close()
})
}
bundle.b.on('update', hotBundle)
bundle.b.on('log', function(msg) {console.warn('\x1b[36m%s\x1b[0m', msg)})
function hotBundle() {
var output = bundle()
output.on('end', (err)=> {
console.log('Build successful reloading...')
send('reload')
})
output.on('error', (err)=> {
console.error(err.stack)
send('errorPopup',
'<div class="error-stack">' +
ansiHTML(
err.stack
.replace(/^ at .*/gm, '') // remove useless stack
.replace(new RegExp(path.resolve(__dirname + '/..'), 'g'),'.') // shorten file path
.trim()
.replace('\n','\n\n') // add 1 new line after 1st line
) +
'</div>'
)
})
}
hotBundle()
} else {
bundle()
}

View file

@ -1,16 +1,19 @@
var sass = require('node-sass'),
var sass = require('sass'),
path = require('path'),
fs = require('fs')
var indir = path.resolve(__dirname + '/../src/scss/'),
outdir= path.resolve(__dirname + '/../app/assets/')
fs.mkdirSync(outdir + '/themes/', {recursive: true})
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 +25,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)
@ -33,7 +37,7 @@ if (process.argv.includes('--reload')) {
var WS = require('../node_modules/ws')
var ipc = new WS('ws://127.0.0.1:8080/dev')
var ipc = new WS('ws://127.0.0.1:8080/dev/')
ipc.on('error', ()=>{})
ipc.on('open', ()=>{

View file

@ -1,16 +0,0 @@
var build = require('./build')
build({
input: '../src/launcher/index.js',
output: '../app/launcher/open-stage-control-launcher.js',
options: {
debug: true,
ignoreMissing: false,
detectGlobals: false,
bare: true,
noParse: ['**/mathjs/dist/math.min.js']
},
exclude: [
'electron',
]
})()

View file

@ -1,27 +0,0 @@
var build = require('./build'),
babelify = require('babelify')
build({
input: '../src/server/index.js',
output: '../app/server/open-stage-control-server.js',
options: {
commonDir: false,
ignoreMissing: true,
debug: true,
builtins: false,
commondir: false,
insertGlobalVars: {
__filename: true,
__dirname: true,
process: true,
electron: true,
global: true
},
browserField: false,
},
ignore: 'serialport',
exclude: [
'electron',
'./fsevents.node' // osx binary module, to be copied as is
]
})()

View file

@ -1,49 +0,0 @@
var browserify = require('browserify'),
exorcist = require('exorcist'),
licensify = require('licensify'),
fs = require('fs'),
path = require('path')
module.exports = (opt) => {
var {input, output, options, ignore, exclude, transforms, plugins} = opt,
inputPath = path.resolve(__dirname + '/' + input),
outputPath = path.resolve(__dirname + '/' + output),
b
if (!plugins) plugins = []
if (!plugins.includes(licensify)) plugins.push(licensify)
b = browserify(inputPath, options)
if (ignore) b.ignore(ignore)
if (exclude) b.exclude(exclude)
for (var plugin of plugins) {
b.plugin(plugin)
}
if (transforms) {
for (var transform of transforms) {
var [t, opts] = transform
b.transform(t, opts)
}
}
function bundle() {
var output = b.bundle()
var toWrite = output.pipe(exorcist(outputPath + '.map'))
toWrite.pipe(fs.createWriteStream(outputPath))
return output
}
bundle.b = b
return bundle
}

View file

@ -0,0 +1,40 @@
var ansiHTML = require('ansi-html'),
WS = require('../node_modules/ws'),
path = require('path')
function send(msg, data){
var ipc = new WS('ws://127.0.0.1:8080/dev/')
ipc.on('error', ()=>{})
ipc.on('open', ()=>{
ipc.send(JSON.stringify([msg, data]))
ipc.close()
})
}
module.exports = function watchChangePlugin() {
var reloadClient = false
return {
buildEnd(error) {
if (error) {
var msg = `<div class="error-stack">
${error.message.replace(path.resolve(__dirname + '/..'),'')} at line ${error.loc.line}\n${error.frame}
</div>`
send('errorPopup', msg.trim())
reloadClient = false
} else {
reloadClient = true
}
},
writeBundle() {
if (reloadClient) {
send('reload')
}
}
}
}

View file

@ -0,0 +1,98 @@
var commonjs = require('@rollup/plugin-commonjs'),
nodeResolve = require('@rollup/plugin-node-resolve'),
json = require('@rollup/plugin-json'),
babel = require('@rollup/plugin-babel'),
terser = require('@rollup/plugin-terser'),
copy = require('rollup-plugin-copy'),
license = require('rollup-plugin-license'),
watchChange = require('./client.plugin-watch'),
package = require('../package.json'),
path = require('path'),
watch = process.argv.includes('--watch')
module.exports = {
input: 'src/client/index.mjs',
output: [
{
dir: 'app/client/',
chunkFileNames: `[name].js`,
entryFileNames: `[name].js`,
format: 'es',
sourcemap: true,
sourcemapExcludeSources: true
},
],
treeshake: false,
watch: {
clearScreen: false
},
plugins: [
json(),
nodeResolve({
browser: true
}),
commonjs(),
watch ? {} : babel({
babelHelpers: 'bundled',
babelrc: false,
exclude: [
/node_modules\/core-js/,
/node_modules\/ace-builds/
],
presets: [[
'@babel/preset-env',
{
targets: {
ios: '11',
chrome: '70'
},
useBuiltIns: 'usage',
corejs: 3,
modules:false
}
]]
}),
watch ? {} : terser({
sourceMap: true,
keep_classnames: true,
keep_fnames: true,
output: {
comments: false,
},
}),
{
name: 'remove-node-modules-from-source-map',
enforce: 'post',
transform(code, id) {
if (id.includes('node_modules')) {
return { code, map: { mappings: '' } }
}
}
},
watch ? {} :license({
thirdParty: {
includeSelf: true,
output: 'app/client/LICENSES',
},
}),
watch ? {} : copy({
targets: [
{src: 'resources/images/logo_nobadge.png', dest: 'app/assets/', rename: 'favicon.png'},
{src: 'resources/images/logo.png', dest: 'app/assets/'},
{src: 'resources/images/logo_tray.png', dest: 'app/assets/'},
{src: 'resources/images/logo_tray@x2.png', dest: 'app/assets/'},
{src: 'resources/images/logo_16x16.png', dest: 'app/assets/'},
{src: 'resources/fonts/*', dest: 'app/assets/fonts/'},
{src: 'node_modules/ace-builds/src-min/worker-css.js', dest: 'app/client/ace/'},
{src: 'node_modules/ace-builds/src-min/worker-html.js', dest: 'app/client/ace/'},
{src: 'node_modules/ace-builds/src-min/worker-javascript.js', dest: 'app/client/ace/'},
{src: 'node_modules/ace-builds/src-min/ace.js', dest: 'app/client/ace/'},
{src: 'src/html/client.html', dest: 'app/client/', rename: 'index.html', transform: (contents)=>{
return contents.toString().replace(/\$\{([^\}]+)\}/g, (m, p1)=>{return package[p1]})
}},
]
}),
watchChange()
]
};

View file

@ -1,56 +0,0 @@
var cpr = require('cpr'),
fs = require('fs'),
path = require('path'),
files = [
['../resources/images/logo_nobadge.png', '../app/assets/favicon.png'],
['../resources/images/logo.png', '../app/assets/logo.png'],
['../LICENSE', '../app/LICENSE'],
['../src/python/', '../app/server/python/'],
['../resources/fonts/', '../app/assets/fonts/'],
['../src/html/launcher.html', '../app/launcher/index.html'],
['../node_modules/fsevents/fsevents.node', '../app/server/fsevents.node'],
]
for (var i in files) {
cpr(...files[i].map(f => path.resolve(__dirname + '/' + f)), {
overwrite: true
})
}
var packageJson = require('../package.json'),
appJson = {},
copiedProps = [
"name",
"productName",
"description",
"version",
"author",
"repository",
"homepage",
"license",
"yargs",
"engines"
]
for (var k of copiedProps) {
appJson[k] = packageJson[k]
}
appJson.main = appJson.bin = "index.js"
appJson.scripts = {
"start": "electron index.js",
"start-node": "node index.js"
}
appJson.optionalDependencies = {
electron: packageJson.optionalDependencies.electron
}
fs.writeFileSync(path.resolve(__dirname + '/../app/package.json'), JSON.stringify(appJson, null, ' '))
var clientHtml = fs.readFileSync(path.resolve(__dirname + '/../src/html/client.html'))
.toString()
.replace(/\$\{([^\}]+)\}/g, (m, p1)=>{return appJson[p1]})
fs.writeFileSync(path.resolve(__dirname + '/../app/client/index.html'), clientHtml)

45
scripts/dist_packages.sh Executable file
View file

@ -0,0 +1,45 @@
#!/bin/bash
# clean
rm -rf dist app
# buid
npm run build
npm run build-docs
npm run package -- --all
PLATFORM=darwin ARCH=arm64 npm run package
npm run package-node
# get current version
VERSION=$(sed -nE 's/^\s*"version":\ "(.*?)",$/\1/p' package.json)
cd dist
# fetch & copy midi bins
mkdir tmp && cd tmp
cp ../../bin/osc-midi-* ./
chmod +x *
touch .expect-midi-bin
cp {.expect-midi-bin,osc-midi-linux} ../open-stage-control-linux-x64/resources/app/server/python/
cp {.expect-midi-bin,osc-midi-windows.exe} ../open-stage-control-win32-x64/resources/app/server/python/
cp {.expect-midi-bin,osc-midi-osx} ../open-stage-control-darwin-x64/open-stage-control.app/Contents/Resources/app/server/python/
cp {.expect-midi-bin,osc-midi-osx} ../open-stage-control-darwin-arm64/open-stage-control.app/Contents/Resources/app/server/python/
cd ..
rm -rf tmp
# make packages
mkdir packages
npm run deb64
npm run rpm64
mv *.{deb,rpm} packages/
mv open-stage-control-node open-stage-control_${VERSION}_node
mv open-stage-control-win32-x64 open-stage-control_${VERSION}_win32-x64
mv open-stage-control-linux-x64 open-stage-control_${VERSION}_linux-x64
echo "Creating zip packages..."
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 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

View file

@ -0,0 +1,25 @@
var commonjs = require('@rollup/plugin-commonjs'),
nodeResolve = require('@rollup/plugin-node-resolve'),
json = require('@rollup/plugin-json')
module.exports = {
input: 'src/docs/widgets-reference.mjs',
output: [
{
file: 'src/docs/widgets-reference.js',
inlineDynamicImports: true,
format: 'commonjs',
sourcemap: false,
strict: false,
indent: false,
name: '_'
},
],
plugins: [
json(),
nodeResolve({
browser: true
}),
commonjs()
]
};

View file

@ -0,0 +1,48 @@
var commonjs = require('@rollup/plugin-commonjs'),
nodeResolve = require('@rollup/plugin-node-resolve'),
json = require('@rollup/plugin-json'),
babel = require('@rollup/plugin-babel'),
terser = require('@rollup/plugin-terser'),
copy = require('rollup-plugin-copy'),
license = require('rollup-plugin-license'),
package = require('../package.json'),
path = require('path')
module.exports = {
input: 'src/launcher/index.mjs',
output: [
{
dir: 'app/launcher/',
chunkFileNames: `[name].js`,
format: 'commonjs',
sourcemap: true,
sourcemapExcludeSources: true,
strict: false
},
],
treeshake: false,
external: ['electron'],
watch: {
clearScreen: false
},
plugins: [
json(),
commonjs({
ignoreGlobal: true,
ignoreDynamicRequires: true
}),
nodeResolve(),
terser(),
license({
thirdParty: {
includeSelf: true,
output: 'app/launcher/LICENSES',
},
}),
copy({
targets: [
{src: 'src/html/launcher.html', dest: 'app/launcher/', rename: 'index.html'},
]
})
]
};

View file

@ -1,8 +1,4 @@
var browserify = require('browserify'),
exorcist = require('exorcist'),
licensify = require('licensify'),
fs = require('fs'),
cpr = require('cpr'),
var cpr = require('cpr'),
path = require('path'),
files = ['../app', '../dist/open-stage-control-node']

View file

@ -1,4 +1,4 @@
const packager = require('electron-packager'),
const packager = require('@electron/packager'),
path = require('path'),
appData = require('../app/package.json'),
safeFFMPEG = require('electron-packager-plugin-non-proprietary-codecs-ffmpeg').default,
@ -12,7 +12,7 @@ packager({
name: appData.name,
platform: all ? ['linux', 'win32', 'darwin'] : process.env.PLATFORM,
arch: process.env.ARCH || 'x64',
electronVersion: process.env.ARCH === 'armv7l' ? '1.7.11' : require('../package.json').optionalDependencies.electron,
electronVersion: process.env.ELECTRON_VERSION || require('../package.json').optionalDependencies.electron,
overwrite: true,
out: path.resolve(__dirname + '/../dist'),
icon: path.resolve(__dirname + '/../resources/images/logo'),

View file

@ -0,0 +1,65 @@
var commonjs = require('@rollup/plugin-commonjs'),
nodeResolve = require('@rollup/plugin-node-resolve'),
json = require('@rollup/plugin-json'),
babel = require('@rollup/plugin-babel'),
terser = require('@rollup/plugin-terser'),
copy = require('rollup-plugin-copy'),
license = require('rollup-plugin-license'),
package = require('../package.json'),
path = require('path')
module.exports = {
input: {
'node/index': 'src/server/node/index.mjs',
'electron/index': 'src/server/electron/index.mjs'
},
output: [
{
dir: 'app/server/',
chunkFileNames: `[name].js`,
format: 'commonjs',
sourcemap: true,
sourcemapExcludeSources: true,
strict: false
},
],
treeshake: false,
external: ['electron', '@serialport'],
watch: {
clearScreen: false
},
plugins: [
json(),
commonjs({
ignoreGlobal: true,
ignoreDynamicRequires: true
}),
nodeResolve({
preferBuiltins: true
}),
license({
thirdParty: {
includeSelf: true,
output: 'app/server/LICENSES',
},
}),
terser({
sourceMap: true,
keep_classnames: true,
keep_fnames: true,
output: {
comments: false,
},
}),
copy({
targets: [
{src: 'src/index.js', dest: 'app/'},
{src: 'src/server/index.js', dest: 'app/server/'},
{src: 'src/server/python/*.py', dest: 'app/server/python/'},
{src: 'node_modules/fsevents/fsevents.node', dest: 'app/server/'},
{src: 'LICENSE', dest: 'app/'},
{src: 'package.json', dest: 'app/'},
]
})
]
};

View file

@ -1,65 +0,0 @@
var cache = require('./managers/cache'),
localBackup = cache.get('backup', false)
module.exports = {
exists: localBackup !== null,
save: ()=>{
var session = require('./managers/session/'),
state = require('./managers/state'),
editor = require('./editor/')
if (session.session) {
cache.set('backup', {
session: session.session.data,
saveMode: session.saveMode,
sessionPath: session.sessionPath,
fragments: session.fragments,
state: state.get(),
history: editor.history,
historyState: editor.historyState,
editorEnabled: editor.enabled,
}, false)
}
},
load: ()=>{
var session = require('./managers/session/'),
state = require('./managers/state'),
editor = require('./editor/'),
ipc = require('./ipc/')
if (localBackup) {
var data = localBackup
cache.remove('backup', false)
for (let k in data.fragments) {
session.setFragment({path: k, fileContent: JSON.parse(data.fragments[k])})
}
session.load(data.session, ()=>{
session.setSaveMode(data.saveMode)
state.set(data.state, false)
editor.clearHistory()
editor.history = data.history
editor.historyState = data.historyState
if (data.editorEnabled) editor.enable()
ipc.send('sessionSetPath', {path: data.sessionPath})
session.setSessionPath(data.sessionPath)
})
}
}
}

62
src/client/backup.mjs Normal file
View file

@ -0,0 +1,62 @@
import cache from './managers/cache.mjs'
var session, state, editor, ipc
;(async()=>{
session = (await import('./managers/session/index.mjs')).default
state = (await import('./managers/state.mjs')).default
editor = (await import('./editor/index.mjs')).default
ipc = (await import('./ipc/index.mjs')).default
})()
var localBackup = cache.get('backup', false)
export const exists = localBackup !== null
export function save() {
if (session.session) {
cache.set('backup', {
session: session.session.data,
saveMode: session.saveMode,
sessionPath: session.sessionPath,
fragments: session.fragments,
state: state.get(),
history: editor.history,
historyState: editor.historyState,
editorEnabled: editor.enabled,
}, false)
}
}
export function load() {
if (localBackup) {
var data = localBackup
cache.remove('backup', false)
for (let k in data.fragments) {
session.setFragment({path: k, fileContent: data.fragments[k]})
}
session.load(data.session, ()=>{
session.setSaveMode(data.saveMode)
state.set(data.state, false)
editor.clearHistory()
editor.history = data.history
editor.historyState = data.historyState
if (data.editorEnabled) editor.enable()
ipc.send('sessionSetPath', {path: data.sessionPath})
session.setSessionPath(data.sessionPath)
})
}
}

View file

@ -1,107 +0,0 @@
var readyCallbacks = [],
initState = false
module.exports = {
init: function() {
for (var i in readyCallbacks) {
readyCallbacks[i]()
}
initState = true
},
ready: function(callback) {
if (initState) {
callback()
} else {
readyCallbacks.push(callback)
}
},
dispatchEvent: function(element, name, data) {
var event = new CustomEvent(name, {
detail: data,
bubbles: true,
cancelable: true
})
element.dispatchEvent(event)
},
addEventListener: function(element, events, listener, capture) {
var eventsAsObject = typeof events == 'string' ? events.split(' ') : events
for (var i in eventsAsObject) {
element.addEventListener(eventsAsObject[i], listener, capture)
}
},
get: function(a, b) {
var context = b ? a : document,
selector = b || a,
nodes
if (selector.indexOf('>') === 0) selector = ':scope ' + selector
if (selector.indexOf(' ') === -1 && selector.indexOf(',') === -1) {
if (selector.indexOf('#') === 0 && context === document) {
nodes = [document.getElementById(selector.substr(1, selector.length - 1))]
} else if (selector.lastIndexOf('.') === 0) {
nodes = context.getElementsByClassName(selector.substr(1, selector.length - 1))
}
}
if (!nodes) nodes = context.querySelectorAll(selector)
return [...nodes]
},
each: function(context, selector, callback) {
var nodes = module.exports.get(context, selector)
nodes.forEach(callback)
return nodes
},
index: function(element) {
var parent = element.parentNode
return parent ? Array.prototype.indexOf.call(parent.children, element) : -1
},
offset: function(element, container) {
var offsetLeft = 0,
offsetTop = 0
if (element) {
do {
if (!isNaN(element.offsetLeft)) {
offsetLeft += element.offsetLeft - element.scrollLeft
}
if (!isNaN(element.offsetTop)) {
offsetTop += element.offsetTop - element.scrollTop
}
} while ((element = element.offsetParent) && element !== container)
}
return {
left: offsetLeft,
top: offsetTop
}
}
}

82
src/client/dom.mjs Normal file
View file

@ -0,0 +1,82 @@
export function dispatchEvent(element, name, data) {
var event = new CustomEvent(name, {
detail: data,
bubbles: true,
cancelable: true
})
element.dispatchEvent(event)
}
export function addEventListener(element, events, listener, capture) {
var eventsAsObject = typeof events == 'string' ? events.split(' ') : events
for (var i in eventsAsObject) {
element.addEventListener(eventsAsObject[i], listener, capture)
}
}
export function get(a, b) {
var context = b ? a : document,
selector = b || a,
nodes
if (selector.indexOf('>') === 0) selector = ':scope ' + selector
if (selector.indexOf(' ') === -1 && selector.indexOf(',') === -1 && selector.indexOf('[') === -1) {
if (selector.indexOf('#') === 0 && context === document) {
nodes = [document.getElementById(selector.substr(1, selector.length - 1))]
} else if (selector.lastIndexOf('.') === 0) {
nodes = context.getElementsByClassName(selector.substr(1, selector.length - 1))
}
}
if (!nodes) nodes = context.querySelectorAll(selector)
return [...nodes]
}
export function each(context, selector, callback) {
var nodes = get(context, selector)
nodes.forEach(callback)
return nodes
}
export function index(element) {
var parent = element.parentNode
return parent ? Array.prototype.indexOf.call(parent.children, element) : -1
}
export function offset(element, container) {
var offsetLeft = 0,
offsetTop = 0
if (element) {
do {
if (!isNaN(element.offsetLeft)) {
offsetLeft += element.offsetLeft - element.scrollLeft
}
if (!isNaN(element.offsetTop)) {
offsetTop += element.offsetTop - element.scrollTop
}
} while ((element = element.offsetParent) && element !== container)
}
return {
left: offsetLeft,
top: offsetTop
}
}

View file

@ -1,20 +1,29 @@
var {updateWidget} = require('./data-workers'),
{categories} = require('../widgets/'),
widgetManager = require('../managers/widgets'),
{icon} = require('../ui/utils'),
editor = require('./'),
locales = require('../locales'),
ContextMenu = require('../ui/context-menu'),
contextMenu = new ContextMenu(),
sessionManager
import {updateWidget} from './data-workers.mjs'
import {categories} from '../widgets/index.mjs'
import widgetManager from '../managers/widgets.mjs'
import {icon} from '../ui/utils.mjs'
import editor from './index.mjs'
import locales from '../locales/index.mjs'
import ContextMenu from '../ui/context-menu.mjs'
import {GRIDWIDTH, PXSCALE} from '../globals.mjs'
var sessionManager
;(async()=>{
sessionManager = (await import('../managers/session/index.mjs')).default
})()
var contextMenu = new ContextMenu()
var multiSelectKey = (navigator.platform || '').match('Mac') ? 'metaKey' : 'ctrlKey'
var handleClick = function(event) {
if (!editor.enabled) return
if (
!editor.enabled ||
event.detail.button === 1 ||
(event.detail.metaKey && event.detail.shiftKey)
) return
if (!event.detail[multiSelectKey] && event.type !== 'fast-right-click' && (
event.target.classList.contains('no-widget-select') ||
@ -26,6 +35,10 @@ var handleClick = function(event) {
if (!targetWidget) return
while (targetWidget.meta.not_editable && targetWidget.parent) {
targetWidget = targetWidget.parent
}
// if the widget is not already selected
if (!targetWidget.container.classList.contains('editing') || event.detail.ctrlKey || event.detail.shiftKey) {
// add a flag to the original event to prevent draginit
@ -101,20 +114,10 @@ var handleClick = function(event) {
label: icon('eye') + ' ' + locales('editor_show_in_session'),
action: ()=>{
for (let w of editor.selectedWidgets) {
var parent = w
while (parent !== widgetManager) {
if (parent.getProp('type') === 'tab') parent.parent.setValue(parent.parent.children.indexOf(parent), {sync: true, send: true})
else if (parent.getProp('type') === 'modal') parent.setValue(1, {sync: true, send: true})
parent = parent.parent
}
w.container.classList.add('editor-blink')
w.container.scrollIntoView({block: 'center'})
setTimeout(()=>{
w.container.classList.remove('editor-blink')
}, 800)
editor.widgetTree.showWidgetInSession(w)
}
}
},
shortcut: 'y'
})
}
@ -198,28 +201,28 @@ var handleClick = function(event) {
{
label: locales('editor_back'),
action: ()=>{
editor.handleKeyboard('home')
editor.handleKeydown('home')
},
shortcut: 'Home'
},
{
label: locales('editor_farther'),
action: ()=>{
editor.handleKeyboard('pageup')
editor.handleKeydown('pageup')
},
shortcut: 'Page Up'
},
{
label: locales('editor_closer'),
action: ()=>{
editor.handleKeyboard('pagedown')
editor.handleKeydown('pagedown')
},
shortcut: 'Page Down'
},
{
label: locales('editor_front'),
action: ()=>{
editor.handleKeyboard('end')
editor.handleKeydown('end')
},
shortcut: 'End'
}
@ -334,7 +337,6 @@ var handleClick = function(event) {
actions.push({
label: icon('file-download') + ' ' + locales('editor_fragment_export'),
action: ()=>{
sessionManager = sessionManager || require('../managers/session')
sessionManager.saveFragment(editor.selectedWidgets[0].props)
}
})

View file

@ -1,29 +1,28 @@
var widgetManager = require('../managers/widgets'),
resize = require('../events/resize'),
stateManager = require('../managers/state'),
parser = require('../parser'),
Panel, Matrix,
editor,
scrollState = {}
import widgetManager from '../managers/widgets.mjs'
import stateManager from '../managers/state.mjs'
import parser from '../parser.mjs'
import * as resize from '../events/resize.mjs'
setTimeout(()=>{
editor = require('./')
Panel = require('../widgets/containers/panel')
Matrix = require('../widgets/containers/matrix')
})
var Panel, Matrix, editor
;(async()=>{
Panel = (await import('../widgets/containers/panel.mjs')).default
Matrix = (await import('../widgets/containers/matrix.mjs')).default
editor = (await import('./index.mjs')).default
})()
var scrollState = {}
function updateWidget(widget, options={}) {
if (options.changedProps) {
if (options.editedProps) {
// alternate routine for small edits
var propNames = options.changedProps
var propNames = options.editedProps
if (
// if non dynamic props have changed, skip this and use rebuild routine
!propNames.some(n => !widget.isDynamicProp(n))
) {
var edited = widget.updateProps(options.changedProps, null, {fromEditor: true}) || widget
var edited = widget.updateProps(options.editedProps, null, {fromEditor: true}) || widget
editor.widgetTree.updateTree(editor.selectedWidgets)
@ -77,7 +76,7 @@ function updateWidget(widget, options={}) {
// save state
if (stateManager.queueCounter === 0) {
scrollState = {} // scrollbale modals don't store their scroll state in their value
scrollState = {} // scrollable modals don't store their scroll state in their value
}
stateManager.incrementQueue()
for (let w of removedWidgets) {
@ -110,7 +109,8 @@ function updateWidget(widget, options={}) {
variables: widget.variables,
hash: widget.hash,
children: children,
index: index
index: index,
meta: widget.meta
})
newWidget.container.parentNode.replaceChild(newWidget.container, widget.container)
@ -235,7 +235,7 @@ var incrementWidget = function(data, root){
}
module.exports = {
updateWidget:updateWidget,
incrementWidget:incrementWidget
export {
updateWidget,
incrementWidget
}

View file

@ -1,32 +0,0 @@
module.exports = {
diff: require('jsondiffpatch'),
diffToWidget: function(widget, diff) {
// traverse a diff patch and the associated widget
// to return the first node (widget and sub-patch) with actual changes
var children = diff.tabs || diff.widgets
if (children) {
var childrenKeys = Object.keys(children),
deletedChildren = childrenKeys.filter(x => typeof x === 'string' && x.match(/_[0-9]+/)),
changedChildren = childrenKeys.filter(x => !isNaN(x))
}
if (
!children ||
Array.isArray(children) || // 'tabs' or 'widgets' property created
deletedChildren.length || // 'tabs' or 'widgets' property created
changedChildren.length !== 1 || // children reordered (or same property edited in multiple widgets, but case ignored)
Array.isArray(children[changedChildren[0]]) // child item created
) {
return [widget, diff]
}
return module.exports.diffToWidget(widget.children[changedChildren[0]], children[changedChildren[0]])
}
}

View file

@ -0,0 +1,29 @@
import diff from 'jsondiffpatch'
export {diff}
export function diffToWidget(widget, diff) {
// traverse a diff patch and the associated widget
// to return the first node (widget and sub-patch) with actual changes
var children = diff.tabs || diff.widgets
if (children) {
var childrenKeys = Object.keys(children),
deletedChildren = childrenKeys.filter(x => typeof x === 'string' && x.match(/_[0-9]+/)),
changedChildren = childrenKeys.filter(x => !isNaN(x))
}
if (
!children ||
Array.isArray(children) || // 'tabs' or 'widgets' property created
deletedChildren.length || // 'tabs' or 'widgets' property created
changedChildren.length !== 1 || // children reordered (or same property edited in multiple widgets, but case ignored)
Array.isArray(children[changedChildren[0]]) // child item created
) {
return [widget, diff]
}
return diffToWidget(widget.children[changedChildren[0]], children[changedChildren[0]])
}

View file

@ -1,31 +1,36 @@
var {updateWidget, incrementWidget} = require('./data-workers'),
keyboardJS = require('keyboardjs/dist/keyboard.min.js'),
{diff, diffToWidget} = require('./diff'),
widgetManager = require('../managers/widgets'),
{deepCopy} = require('../utils'),
{defaults} = require('../widgets/'),
macOs = (navigator.platform || '').match('Mac'),
UiSelectArea = require('../ui/ui-selectarea'),
UiInspector = require('../ui/ui-inspector'),
UiTree = require('../ui/ui-tree'),
UiDragResize = require('../ui/ui-dragresize'),
uiConsole = require('../ui/ui-console'),
notifications = require('../ui/notifications'),
locales = require('../locales'),
{leftUiSidePanel, rightUiSidePanel} = require('../ui/'),
ipc = require('../ipc'),
sessionManager
import keyboardJS from 'keyboardjs/dist/keyboard.min.js'
import {updateWidget, incrementWidget} from './data-workers.mjs'
import {diff, diffToWidget} from './diff.mjs'
import widgetManager from '../managers/widgets.mjs'
import {deepCopy} from '../utils.mjs'
import {defaults, widgets} from '../widgets/index.mjs'
import UiSelectArea from '../ui/ui-selectarea.mjs'
import UiInspector from '../ui/ui-inspector.mjs'
import UiTree from '../ui/ui-tree.mjs'
import UiDragResize from '../ui/ui-dragresize.mjs'
import uiConsole from '../ui/ui-console.mjs'
import notifications from '../ui/notifications.mjs'
import locales from '../locales/index.mjs'
import {leftUiSidePanel, rightUiSidePanel} from '../ui/index.mjs'
import ipc from '../ipc/index.mjs'
import {DOM, GRIDWIDTH, GRIDWIDTH_CSS, ENV, PXSCALE, setGRIDWIDTH, READ_ONLY} from '../globals.mjs'
import zoom from '../ui/zoom.mjs'
setTimeout(()=>{
sessionManager = require('../managers/session/')
})
var sessionManager
;(async()=>{
sessionManager = (await import('../managers/session/index.mjs')).default
await import('./context-menu.mjs')
})()
const macOs = (navigator.platform || '').match('Mac')
const HISTORY_SIZE = 50
class Editor {
constructor() {
zoom.editor = this
this.inspector = new UiInspector({selector: '#osc-inspector'})
this.inspector.on('update', (event)=>{
@ -50,12 +55,12 @@ class Editor {
try {
newWidgets.push(updateWidget(w, {changedProps: [propName], preventSelect: this.selectedWidgets.length > 1}))
newWidgets.push(updateWidget(w, {editedProps: [propName], preventSelect: this.selectedWidgets.length > 1}))
} catch (e) {
w.props[propName] = previousValue
updateWidget(w, {changedProps: [propName], preventSelect: this.selectedWidgets.length > 1})
updateWidget(w, {editedProps: [propName], preventSelect: this.selectedWidgets.length > 1})
if (uiConsole.minimized) notifications.add({
class: 'error',
@ -64,7 +69,7 @@ class Editor {
})
console.error(
`Error while setting ${propName} to: ${JSON.stringify(value)}.\n` +
'It\'s probably a bug, please open a new bug ticket with the followigin informations at' +
'It\'s probably a bug, please open a new bug ticket with the following informations at' +
'https://github.com/jean-emmanuel/open-stage-control/issues'
)
throw e
@ -209,13 +214,20 @@ class Editor {
'pagedown',
'home',
'end',
't'
't',
'y',
'f2',
'h',
'mod + f'
]
for (let c of combos) {
keyboardJS.bind(c, (e)=>{
e.catchedByEditor = true
this.handleKeyboard(c, e)
this.handleKeydown(c, e)
}, (e)=>{
e.catchedByEditor = true
this.handleKeyup(c, e)
})
}
@ -266,11 +278,11 @@ class Editor {
}
handleKeyboard(combo, e){
handleKeydown(combo, e){
if (
this.inspector.helpModalOpened ||
e && e.target && e.target.tagName.match(/INPUT|TEXTAREA|SELECT/)
e && e.target && e.target.tagName.match(/INPUT|TEXTAREA|SELECT|OSC-CONSOLE/)
) return
if (e) e.preventDefault()
@ -389,7 +401,7 @@ class Editor {
} else if (e.key === 'ArrowRight') {
if (!curWidget.children[0]._not_editable) {
if (curWidget.children[0] && !curWidget.children[0].meta.not_editable) {
toSelect = curWidget.children[0]
}
@ -446,20 +458,72 @@ class Editor {
if (!this.selectedWidgets.length) return
this.widgetTree.showWidget(editor.selectedWidgets[0])
this.widgetTree.blinkSelected()
break
case 'y':
if (!this.selectedWidgets.length) return
for (let w of editor.selectedWidgets) {
this.widgetTree.showWidgetInSession(w)
}
this.widgetTree.showWidget(editor.selectedWidgets[0])
break
case 'f2':
if (!this.selectedWidgets.length) return
if (this.selectedWidgets[0].props.label === undefined && this.selectedWidgets[0].props.html === undefined) return
if (!this.inspector.expandedCategories.includes('style')) {
var header = DOM.get(this.inspector.container, '.category-header[data-name="style"]')[0]
if (header) {
header.parentNode.classList.add('expanded')
this.inspector.expandedCategories.push('style')
}
}
var labelProp = this.selectedWidgets[0].props.label === undefined ? 'html' : 'label'
var input = DOM.get(this.inspector.container, `textarea[name="${labelProp}"]`)[0]
if (input) {
if (input._ace_input) {
input._ace_input.focus()
} else {
input.focus()
input.setSelectionRange(0, input.value.length)
input.scrollIntoView({block: 'center'})
}
}
break
case 'h':
document.body.classList.add('editor-hide-selection')
break
case 'mod + f':
if (this.widgetTree.parent.minimized) this.widgetTree.parent.restore()
this.widgetTree.filter.focus()
break
}
}
handleKeyup(combo, e){
if (
this.inspector.helpModalOpened ||
(e && e.target && e.target.tagName && e.target.tagName.match(/INPUT|TEXTAREA|SELECT/))
) return
if (e) e.preventDefault()
switch (combo) {
case 'h':
document.body.classList.remove('editor-hide-selection')
break
}
}
toggleGrid() {
this.grid = !this.grid
GRIDWIDTH = this.grid ? GRIDWIDTH_CSS : 1
setGRIDWIDTH(this.grid ? GRIDWIDTH_CSS : 1)
document.body.style.setProperty('--grid-width', GRIDWIDTH)
document.body.classList.toggle('no-grid', GRIDWIDTH == 1)
@ -480,7 +544,12 @@ class Editor {
leftUiSidePanel.enable()
rightUiSidePanel.enable()
// keyboardJS hack: prevent releaseAllKeys when switching context
var locale = keyboardJS._locale
keyboardJS._locale = null
keyboardJS.setContext('editing')
keyboardJS._locale = locale
this.oscContainer.addEventListener('mousemove', this.mouveMoveHandler)
this.oscContainer.addEventListener('mouseleave', this.mouveLeaveHandler)
@ -497,7 +566,11 @@ class Editor {
document.body.classList.add('editor-disabled')
document.body.classList.remove('editor-enabled')
// keyboardJS hack: prevent releaseAllKeys when switching context
var locale = keyboardJS._locale
keyboardJS._locale = null
keyboardJS.setContext('global')
keyboardJS._locale = locale
this.oscContainer.removeEventListener('mousemove', this.mouveMoveHandler)
this.oscContainer.removeEventListener('mouseleave', this.mouveLeaveHandler)
@ -562,12 +635,14 @@ class Editor {
}
var parent = this.selectedWidgets[0].parent
while (parent !== widgetManager) {
if (parent.getProp('lock')) {
this.selectedWidgets = [parent]
if (this.selectedWidgets.length) {
var parent = this.selectedWidgets[0].parent
while (parent !== widgetManager) {
if (parent.getProp('lock')) {
this.selectedWidgets = [parent]
}
parent = parent.parent
}
parent = parent.parent
}
if (options.fromLasso && !options.lassoEnd) return
@ -597,6 +672,9 @@ class Editor {
}
this.widgetTree.select(this.selectedWidgets)
this.widgetDragResize.create(this.selectedWidgets)
if (!this.widgetTree.parent.minimized) {
this.widgetTree.showWidget(editor.selectedWidgets[editor.selectedWidgets.length-1])
}
}
@ -827,6 +905,17 @@ class Editor {
}
/* Utility function to retrieve the first sizable node */
getWidgetParentContainer(widget) {
while (widget.parent instanceof widgets.folder) {
widget = widget.parent
}
return widget.container.parentNode
}
resizeWidget(deltaW, deltaH) {
if (!this.selectedWidgets.length) return
@ -838,7 +927,7 @@ class Editor {
var newWidgets = [],
area = this.widgetDragResize,
changedProps = []
editedProps = []
for (var i = 0; i < this.selectedWidgets.length; i++) {
@ -856,20 +945,20 @@ class Editor {
if (deltaW !== 0 && w.props.width !== undefined && w.parent.getProp('layout') !== 'vertical') {
var newWidth = Math.max(nW, GRIDWIDTH) / PXSCALE
if (typeof w.props.width === 'string' && w.props.width.indexOf('%') > -1) {
w.props.width = (100 * PXSCALE * newWidth / w.container.parentNode.offsetWidth).toFixed(2).replace(/\.?0+$/, '') + '%'
w.props.width = (100 * PXSCALE * newWidth / this.getWidgetParentContainer(w).offsetWidth).toFixed(2).replace(/\.?0+$/, '') + '%'
} else {
w.props.width = newWidth
}
changedProps.push('width')
editedProps.push('width')
if (this.selectedWidgets.length > 1) {
var newLeft = Math.max(nL, GRIDWIDTH) / PXSCALE
if (typeof w.props.left === 'string' && w.props.left.indexOf('%') > -1) {
w.props.left = (100 * PXSCALE * newLeft / w.container.parentNode.offsetWidth).toFixed(2).replace(/\.?0+$/, '') + '%'
w.props.left = (100 * PXSCALE * newLeft / this.getWidgetParentContainer(w).offsetWidth).toFixed(2).replace(/\.?0+$/, '') + '%'
} else if (w.props.left !== 'auto'){
w.props.left = newLeft
}
changedProps.push('left')
editedProps.push('left')
}
}
@ -877,24 +966,24 @@ class Editor {
if (deltaH !== 0 && w.props.height !== undefined && w.parent.getProp('layout') !== 'horizontal') {
var newHeight = Math.max(nH, GRIDWIDTH) / PXSCALE
if (typeof w.props.height === 'string' && w.props.height.indexOf('%') > -1) {
w.props.height = (100 * PXSCALE * newHeight / w.container.parentNode.offsetHeight).toFixed(2).replace(/\.?0+$/, '') + '%'
w.props.height = (100 * PXSCALE * newHeight / this.getWidgetParentContainer(w).offsetHeight).toFixed(2).replace(/\.?0+$/, '') + '%'
} else {
w.props.height = newHeight
}
changedProps.push('height')
editedProps.push('height')
if (this.selectedWidgets.length > 1) {
var newTop = Math.max(nT, GRIDWIDTH) / PXSCALE
if (typeof w.props.top === 'string' && w.props.top.indexOf('%') > -1) {
w.props.top = (100 * PXSCALE * newTop / w.container.parentNode.offsetHeight).toFixed(2).replace(/\.?0+$/, '') + '%'
w.props.top = (100 * PXSCALE * newTop / this.getWidgetParentContainer(w).offsetHeight).toFixed(2).replace(/\.?0+$/, '') + '%'
} else if (w.props.top !== 'auto'){
w.props.top = newTop
}
changedProps.push('top')
editedProps.push('top')
}
}
if (w.props.width !== undefined || w.props.height !== undefined) newWidgets.push(updateWidget(w, {changedProps: changedProps, preventSelect: this.selectedWidgets.length > 1}))
if (w.props.width !== undefined || w.props.height !== undefined) newWidgets.push(updateWidget(w, {editedProps: editedProps, preventSelect: this.selectedWidgets.length > 1}))
}
@ -920,18 +1009,18 @@ class Editor {
var newTop = Math.max(parseInt(w.container.offsetTop) / PXSCALE + deltaY, 0)
if (typeof w.props.top === 'string' && w.props.top.indexOf('%') > -1) {
w.props.top = (100 * PXSCALE * newTop / w.container.parentNode.offsetHeight).toFixed(2).replace(/\.?0+$/, '') + '%'
w.props.top = (100 * PXSCALE * newTop / this.getWidgetParentContainer(w).offsetHeight).toFixed(2).replace(/\.?0+$/, '') + '%'
} else {
w.props.top = newTop
}
var newLeft = Math.max(parseInt(w.container.offsetLeft) / PXSCALE + deltaX, 0)
if (typeof w.props.left === 'string' && w.props.left.indexOf('%') > -1) {
w.props.left = (100 * PXSCALE * newLeft / w.container.parentNode.offsetWidth).toFixed(2).replace(/\.?0+$/, '') + '%'
w.props.left = (100 * PXSCALE * newLeft / this.getWidgetParentContainer(w).offsetWidth).toFixed(2).replace(/\.?0+$/, '') + '%'
} else {
w.props.left = newLeft
}
newWidgets.push(updateWidget(w, {changedProps: ['top', 'left'], preventSelect: this.selectedWidgets.length > 1}))
newWidgets.push(updateWidget(w, {editedProps: ['top', 'left'], preventSelect: this.selectedWidgets.length > 1}))
}
@ -946,7 +1035,9 @@ class Editor {
pushHistory(indexes) {
this.unsavedSession = true
if (!ENV.noWarning) {
this.unsavedSession = true
}
if (this.historyState > -1) {
this.history.splice(0, this.historyState + 1)
@ -1019,7 +1110,7 @@ class Editor {
if (indexes) {
options = {...indexes}
} else {
options.changedProps = Object.keys(subpatch)
options.editedProps = Object.keys(subpatch)
options.reuseChildren = false
}
@ -1042,6 +1133,4 @@ class Editor {
var editor = new Editor()
module.exports = editor
require('./context-menu')
export default editor

View file

@ -1,5 +1,7 @@
const iOS = require('../ui/ios')
const editor = require('../editor')
import iOS from '../ui/ios.mjs'
import editor from '../editor/index.mjs'
import {DOM, FOCUSABLE, ENV} from '../globals.mjs'
const macOs = (navigator.platform || '').match('Mac')
var longTouchTimer = false,
@ -38,7 +40,7 @@ function mouseToFastClick(event) {
DOM.dispatchEvent(e.target, name, e)
if (ENV.nofocus && !editor.enabled && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA' && e.target.tagName !== 'SELECT') {
if (!FOCUSABLE && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA' && e.target.tagName !== 'SELECT') {
console.debug('ELECTRON.BLUR()')
}

View file

@ -1,4 +1,4 @@
module.exports = function(eventName, options={}){
export default function(eventName, options={}){
var widget_storage_key = '_' + eventName + '_widget'
@ -19,13 +19,9 @@ module.exports = function(eventName, options={}){
if (container) container[widget_storage_key].trigger(eventName, event)
}
DOM.ready(()=>{
document.addEventListener(eventName, (event)=>{
triggerWidgetEvent(event.target, event)
}, {passive: !!options.passive, capture: !!options.capture})
})
document.addEventListener(eventName, (event)=>{
triggerWidgetEvent(event.target, event)
}, {passive: !!options.passive, capture: !!options.capture})
return {

View file

@ -1,4 +1,6 @@
module.exports = (element, callback, options={})=>{
import {DOUBLE_TAP_TIME} from '../globals.mjs'
export default (element, callback, options={})=>{
var lastTapTime = 0,
lastTapX,

View file

@ -1,324 +0,0 @@
const {normalizeDragEvent, resetEventOffset, TRAVERSING_SAMEWIDGET} = require('./utils')
const iOS = require('../ui/ios')
var targets = {},
previousPointers = {}
function pointerDownHandler(event) {
if (event.capturedByEditor || event.touchPunch) return
if (!event.target._drag_multitouch) {
for (var i in targets) {
if (targets[i] == event.target) return
}
}
event = normalizeDragEvent(event)
var target = closestDragContainer(event.target)
if (!target) return
if (event.traversingStack) {
var widget = target._drag_widget,
local = event.traversingStack.stack[event.traversingStack.stack.length - 1]
if (widget.getProp) event.traversingStack.firstType = widget.getProp('type')
if (local.mode === TRAVERSING_SAMEWIDGET) {
if (local.type === '') {
local.type = event.traversingStack.firstType
}
event.traversing = local.type === event.traversingStack.firstType
} else {
event.traversing = true
}
}
targets[event.pointerId] = target
previousPointers[event.pointerId] = event
triggerWidgetEvent(targets[event.pointerId], 'draginit', event)
}
function pointerMoveHandler(event) {
event = normalizeDragEvent(event, previousPointers[event.pointerId])
event.stopPropagation = true
if (event.traversing) {
var previousTarget = targets[event.pointerId],
target = event.isTouch ?
document.elementFromPoint(event.clientX, event.clientY)
: event.target
if (target) target = closestDragContainer(target)
var local = null
if (target && event.traversingStack) {
for (var i = event.traversingStack.stack.length - 1; i > -1; i--) {
if (event.traversingStack.stack[i].container.contains(target)) {
local = event.traversingStack.stack[i]
break
}
}
if (!local) {
target = null
} else if (local.mode === TRAVERSING_SAMEWIDGET && local.type) {
var widget = target._drag_widget
if (widget.getProp && local.type !== widget.getProp('type')) target = null
}
}
if (target && event.isTouch) {
resetEventOffset(event, target)
}
if (previousTarget !== target) {
triggerWidgetEvent(previousTarget, 'dragend', event)
}
if (target && event.traversing) {
triggerWidgetEvent(target, previousTarget !== target ? 'draginit' : 'drag', event)
}
targets[event.pointerId] = target
} else {
triggerWidgetEvent(targets[event.pointerId], 'drag', event)
}
previousPointers[event.pointerId] = event
}
function pointerUpHandler(event) {
event = normalizeDragEvent(event, previousPointers[event.pointerId])
triggerWidgetEvent(targets[event.pointerId], 'dragend', event)
delete targets[event.pointerId]
delete previousPointers[event.pointerId]
}
// Move / Up Filter
function pointerMoveFilter(event) {
if (targets[event.pointerId] !== undefined) {
pointerMoveHandler.call(targets[event.pointerId], event)
}
}
function pointerUpFilter(event) {
if (targets[event.pointerId] !== undefined) {
pointerUpHandler.call(targets[event.pointerId], event)
delete targets[event.pointerId]
}
}
// Mouse events wrappers
function mouseDownCapture(event) {
if (event.pointerType === 'touch') return
// event.pointerId = 'mouse'
pointerDownHandler(event)
}
function mouseMoveCapture(event) {
if (event.pointerType === 'touch') return
// event.pointerId = 'mouse'
event.inertia = event.ctrlKey ? 10 : 1
pointerMoveFilter(event)
}
function mouseUpCapture(event){
if (event.pointerType === 'touch') return
// event.pointerId = 'mouse'
pointerUpFilter(event)
}
// Touch events wrappers
function touchDownCapture(event) {
event.preventDefault()
for (var i in event.changedTouches) {
if (isNaN(i) || !event.changedTouches[i]) continue
var touchEvent = event.changedTouches[i]
if (event.traversingStack) {
touchEvent.traversingStack = event.traversingStack
}
touchEvent.pointerId = touchEvent.identifier
pointerDownHandler(touchEvent)
}
}
function touchMoveCapture(event) {
for (var i in event.changedTouches) {
if (isNaN(i) || !event.changedTouches[i]) continue
var touchEvent = event.changedTouches[i]
var fingers = 0
for (var j in event.touches) {
if (event.touches[j].target && event.touches[j].target.isSameNode(touchEvent.target)) {
fingers += 1
if (fingers == 2) {
touchEvent.inertia = 10
break
}
}
}
touchEvent.pointerId = touchEvent.identifier
pointerMoveFilter(touchEvent)
}
}
function touchUpCapture(event) {
for (var i in event.changedTouches) {
if (isNaN(i) || !event.changedTouches[i]) continue
var touchEvent = event.changedTouches[i]
touchEvent.pointerId = touchEvent.identifier
pointerUpFilter(touchEvent)
}
}
function closestDragContainer(target) {
var container = target
while (container !== null) {
if (container._drag_widget) {
return container
} else {
container = container.parentNode
}
}
return null
}
// Callback trigger
function triggerWidgetEvent(target, name, event) {
var container = closestDragContainer(target)
if (container) container._drag_widget.trigger(name, event)
}
// init
DOM.ready(()=>{
if (!iOS) document.addEventListener('pointermove', mouseMoveCapture, true)
if (!iOS) document.addEventListener('pointerup', mouseUpCapture, true)
document.addEventListener('touchmove', touchMoveCapture, true)
DOM.addEventListener(document, 'touchend touchcancel', touchUpCapture, true)
if (!iOS) document.addEventListener('pointerdown', mouseDownCapture)
})
module.exports = {
setup: function(options) {
if (
this._customBindings['drag'] !== 0 ||
this._customBindings['draginit'] !== 0 ||
this._customBindings['dragend'] !== 0 ||
!options || options.ignoreCustomBindings
) {
return
}
var {element, multitouch} = options
element.style.touchAction = 'none'
element.addEventListener('touchstart', touchDownCapture, false)
element._drag_widget = this
element._drag_multitouch = multitouch
},
teardown: function(options) {
if (
this._customBindings['drag'] !== 0 ||
this._customBindings['draginit'] !== 0 ||
this._customBindings['dragend'] !== 0 ||
!options || options.ignoreCustomBindings
) {
return
}
var {element} = options
element.style.touchAction = ''
element.removeEventListener('touchstart', touchDownCapture, false)
delete element._drag_widget
delete element._drag_multitouch
},
enableTraversingGestures: function(element, options={}) {
if (element._traversing) return
var traversing = options.type ? TRAVERSING_SAMEWIDGET : true,
traversingType = options.type === 'smart' || options.type === 'auto' ? '' : options.type
element._traversing = traversing
function makeEventTraversing(event) {
if (event.ctrlKey) return
if (!event.traversingStack) event.traversingStack = {firstType: '', stack: []}
event.traversingStack.stack.push({
container: element,
mode: traversing,
type: traversingType
})
}
if (!iOS) element.addEventListener('pointerdown', makeEventTraversing, true)
element.addEventListener('touchstart', makeEventTraversing, true)
element.addEventListener('disableTraversingGestures', (e)=>{
e.stopPropagation()
if (!iOS) element.removeEventListener('pointerdown', makeEventTraversing, true)
element.removeEventListener('touchstart', makeEventTraversing, true)
})
},
disableTraversingGestures: function(element) {
if (!element._traversing) return
delete element._traversing
DOM.dispatchEvent(element, 'disableTraversingGestures')
}
}

426
src/client/events/drag.mjs Normal file
View file

@ -0,0 +1,426 @@
import {normalizeDragEvent, resetEventOffset, TRAVERSING_SAMEWIDGET} from './utils.mjs'
import iOS from '../ui/ios.mjs'
import {DOM} from '../globals.mjs'
var targets = {},
previousPointers = {}
function pointerDownHandler(event) {
if (event.capturedByEditor || event.touchPunch) return event
if (!event.target._drag_multitouch) {
for (var i in targets) {
if (targets[i] == event.target) return event
}
}
event = normalizeDragEvent(event)
event.stopPropagation = true
var target = closestDragContainer(event.target)
if (!target) return event
if (event.traversingStack) {
var widget = target._drag_widget,
local = event.traversingStack.stack[event.traversingStack.stack.length - 1]
if (widget.getProp) {
// if first touched widget is a container, wait until another widget is touched while moving
event.traversingStack.firstType = widget.isContainer ? '?' : widget.getProp('type')
}
if (local.mode === TRAVERSING_SAMEWIDGET) {
if (local.type === '') {
local.type = event.traversingStack.firstType
}
event.traversing = local.type === event.traversingStack.firstType || event.traversingStack.firstType === '?'
} else {
event.traversing = true
}
}
targets[event.pointerId] = target
previousPointers[event.pointerId] = event
if (event.pointerType !== 'mouse') domObserver.activate()
triggerWidgetEvent(targets[event.pointerId], 'draginit', event)
if (event.cancelDragEvent) clearPointer(event)
return event
}
function pointerMoveHandler(event) {
event = normalizeDragEvent(event, previousPointers[event.pointerId])
event.stopPropagation = true
if (event.traversing) {
var previousTarget = targets[event.pointerId],
target = event.isTouch ?
document.elementFromPoint(event.clientX, event.clientY)
: event.target
if (target) target = closestDragContainer(target)
var local = null,
containersOnly = false,
backupTarget = target
if (target && event.traversingStack) {
for (var i = event.traversingStack.stack.length - 1; i > -1; i--) {
if (event.traversingStack.stack[i].container.contains(target)) {
local = event.traversingStack.stack[i]
break
}
}
if (!local) {
target = null
} else if (local.mode === TRAVERSING_SAMEWIDGET) {
var widget = target._drag_widget
if (local.type === '?' && widget.getProp && !widget.isContainer) local.type = widget.getProp('type')
if (widget.getProp && local.type !== widget.getProp('type')) target = null
}
}
if (target && event.isTouch) {
resetEventOffset(event, target)
}
if (previousTarget !== target && !containersOnly) {
triggerWidgetEvent(previousTarget, 'dragend', event)
}
if (target) {
if (previousTarget === target) {
triggerWidgetEvent(target, 'drag', event)
} else {
triggerWidgetEvent(target, 'draginit', event)
}
} else {
// notify container of move events if no draggable widget is under the pointer
triggerWidgetEvent(backupTarget, 'drag', event, true)
}
targets[event.pointerId] = target
} else {
triggerWidgetEvent(targets[event.pointerId], 'drag', event)
}
previousPointers[event.pointerId] = event
}
function pointerUpHandler(event) {
event = normalizeDragEvent(event, previousPointers[event.pointerId])
event.stopPropagation = true
triggerWidgetEvent(targets[event.pointerId], 'dragend', event)
clearPointer(event)
}
function clearPointer(event) {
delete targets[event.pointerId]
delete previousPointers[event.pointerId]
if (domObserver.active) {
var t
for (var k in targets) {t=targets[k]}
if (t === undefined) domObserver.deactivate()
}
}
// Move / Up Filter
function pointerMoveFilter(event) {
if (targets[event.pointerId] !== undefined) {
pointerMoveHandler.call(targets[event.pointerId], event)
}
}
function pointerUpFilter(event) {
if (targets[event.pointerId] !== undefined) {
pointerUpHandler.call(targets[event.pointerId], event)
delete targets[event.pointerId]
}
}
// Mouse events wrappers
function mouseDownCapture(event) {
if (event.pointerType === 'touch') return
event.stopPropagation()
// event.pointerId = 'mouse'
pointerDownHandler(event)
}
function mouseMoveCapture(event) {
if (event.pointerType === 'touch') return
// event.pointerId = 'mouse'
event.inertia = event.ctrlKey ? 10 : 1
pointerMoveFilter(event)
}
function mouseUpCapture(event){
if (event.pointerType === 'touch') return
// event.pointerId = 'mouse'
pointerUpFilter(event)
}
// Touch events wrappers
// Touchend event is not emitted when target element is removed/detached
// Watch for DOM mutations and simulate pointerUp if a registered
// target is removed/detached
const domObserver = new MutationObserver(function(mutations) {
for (var id in targets) {
var event = previousPointers[id],
target = targets[id]
if (!event || event.pointerType === 'mouse') continue
for (var mutation of mutations) {
for (var node of mutation.removedNodes) {
if (node == target || node.contains(target)){
pointerUpHandler(event)
}
}
}
}
})
domObserver.active = false
domObserver.activate = ()=>{
if (!domObserver.active) {
domObserver.observe(DOM.get('#osc-container')[0], {subtree: true, childList: true})
domObserver.active = true
}
}
domObserver.deactivate = ()=>{
if (domObserver.active) {
domObserver.disconnect()
domObserver.active = false
}
}
function touchDownCapture(event) {
var preventDefault = true
event.stopPropagation()
for (var i in event.changedTouches) {
if (isNaN(i) || !event.changedTouches[i]) continue
var touchEvent = event.changedTouches[i]
if (event.traversingStack) {
touchEvent.traversingStack = event.traversingStack
}
touchEvent.pointerId = touchEvent.identifier
touchEvent = pointerDownHandler(touchEvent)
// allow scroll if drag is cancelled or widget is a container
if (touchEvent.cancelDragEvent || touchEvent.allowScroll) preventDefault = false
}
if (preventDefault) event.preventDefault()
}
function touchMoveCapture(event) {
for (var i in event.changedTouches) {
if (isNaN(i) || !event.changedTouches[i]) continue
var touchEvent = event.changedTouches[i]
touchEvent.fingers = 0
for (var j in event.touches) {
if (event.touches[j].target && event.touches[j].target.isSameNode(touchEvent.target)) {
touchEvent.fingers += 1
}
}
touchEvent.pointerId = touchEvent.identifier
pointerMoveFilter(touchEvent)
}
}
function touchUpCapture(event) {
for (var i in event.changedTouches) {
if (isNaN(i) || !event.changedTouches[i]) continue
var touchEvent = event.changedTouches[i]
touchEvent.pointerId = touchEvent.identifier
pointerUpFilter(touchEvent)
}
}
function ancestorDragContainers(target) {
var containers = [],
container = target
while (container !== null) {
if (container._drag_widget) {
containers.splice(0, 0, container._drag_widget)
if (container._drag_widget.root) break
}
container = container.parentNode
}
return containers
}
function closestDragContainer(target) {
var container = target
while (container !== null) {
if (container._drag_widget) {
return container
} else {
container = container.parentNode
}
}
return null
}
// Callback trigger
function triggerWidgetEvent(target, name, event, containersOnly) {
// trigger drag events from parent to child
var widgets = ancestorDragContainers(target),
widget
for (widget of widgets) {
if (containersOnly && !widget.isContainer) continue
widget.trigger(name, event)
if (event.preventDefault) break
}
// if child is a container, let it scroll
if (widget && widget.scroll) event.allowScroll = true
}
// init
if (!iOS) {
document.addEventListener('pointermove', mouseMoveCapture, true)
if ('onwebkitmouseforcechanged' in document) document.addEventListener('webkitmouseforcechanged', mouseMoveCapture, true)
}
if (!iOS) document.addEventListener('pointerup', mouseUpCapture, true)
document.addEventListener('touchmove', touchMoveCapture, true)
if ('ontouchforcechange' in document) document.addEventListener('touchforcechange', touchMoveCapture, true)
DOM.addEventListener(document, 'touchend touchcancel', touchUpCapture, true)
if (!iOS) document.addEventListener('pointerdown', mouseDownCapture)
export function setup(options) {
if (
this._customBindings['drag'] !== 0 ||
this._customBindings['draginit'] !== 0 ||
this._customBindings['dragend'] !== 0 ||
!options || options.ignoreCustomBindings
) {
return
}
var {element, multitouch} = options
element.addEventListener('touchstart', touchDownCapture, false)
element._drag_widget = this
element._drag_multitouch = multitouch
}
export function teardown(options) {
if (
this._customBindings['drag'] !== 0 ||
this._customBindings['draginit'] !== 0 ||
this._customBindings['dragend'] !== 0 ||
!options || options.ignoreCustomBindings
) {
return
}
var {element} = options
element.style.touchAction = ''
element.removeEventListener('touchstart', touchDownCapture, false)
delete element._drag_widget
delete element._drag_multitouch
}
export function enableTraversingGestures(element, options={}) {
if (element._traversing) return
var traversing = options.type ? TRAVERSING_SAMEWIDGET : true,
traversingType = options.type === 'smart' || options.type === 'auto' ? '' : options.type
element._traversing = traversing
function makeEventTraversing(event) {
if (event.ctrlKey) return
if (!event.traversingStack) event.traversingStack = {firstType: '', stack: []}
event.traversingStack.stack.push({
container: element.parentNode,
mode: traversing,
type: traversingType
})
}
if (!iOS) element.addEventListener('pointerdown', makeEventTraversing, true)
element.addEventListener('touchstart', makeEventTraversing, true)
element.addEventListener('disableTraversingGestures', (e)=>{
e.stopPropagation()
if (!iOS) element.removeEventListener('pointerdown', makeEventTraversing, true)
element.removeEventListener('touchstart', makeEventTraversing, true)
})
}
export function disableTraversingGestures(element) {
if (!element._traversing) return
delete element._traversing
DOM.dispatchEvent(element, 'disableTraversingGestures')
}

View file

@ -1,20 +1,25 @@
var customEvents = {}
setTimeout(()=>{
customEvents['draginit'] = customEvents['drag'] = customEvents['dragend'] = require('./drag')
customEvents['resize'] = require('./resize')
customEvents['wheel'] = require('./dom-event')('wheel')
customEvents['scroll'] = require('./dom-event')('scroll', {capture: true})
customEvents['click'] = require('./dom-event')('click')
customEvents['fast-click'] = require('./dom-event')('fast-click')
customEvents['focus'] = require('./dom-event')('focus', {capture: true})
customEvents['blur'] = require('./dom-event')('blur', {capture: true})
customEvents['change'] = require('./dom-event')('change')
})
import domEvent from './dom-event.mjs'
import * as drag from './drag.mjs'
import * as resize from './resize.mjs'
var customEvents = {
'draginit': drag,
'drag': drag,
'dragend': drag,
'resize': resize,
'wheel': domEvent('wheel'),
'scroll': domEvent('scroll', {capture: true}),
'click': domEvent('click'),
'fast-click': domEvent('fast-click'),
'focus': domEvent('focus', {capture: true}),
'blur': domEvent('blur', {capture: true}),
'change': domEvent('change')
}
// micro optimisation from eventemitter3
var has = Object.prototype.hasOwnProperty
module.exports = class EventEmitter {
export default class EventEmitter {
constructor() {
@ -38,7 +43,7 @@ module.exports = class EventEmitter {
}
// Event bubbling
// DOM events won't buttle
// DOM events won't bubble
// Virtual events will unless data.stopPropagation is set
if (!data || !data.stopPropagation) {
if (this.parent) this.parent.trigger(evt, data)

View file

@ -1,7 +1,8 @@
var fastdom = require('fastdom')
import fastdom from 'fastdom'
var elements = []
function checkResizes(context, force){
export function check(context, force){
fastdom.measure(()=>{
// Iterate over all elements to which the 'resize' event is bound.
let resizedElems = [],
@ -38,30 +39,25 @@ function checkResizes(context, force){
}
window.addEventListener('resize', ()=>{checkResizes(document)})
window.addEventListener('resize', ()=>{check(document)})
module.exports = {
export function setup(options) {
setup: function(options) {
if (!options) return
if (elements.indexOf(options.element) == -1) {
elements.push(options.element)
options.element._resize_widget = this
}
},
teardown: function(options) {
if (!options) return
if (elements.indexOf(options.element) != -1) {
elements.splice(elements.indexOf(options.element), 1)
delete options.element._resize_widget
}
},
check: checkResizes
if (!options) return
if (elements.indexOf(options.element) == -1) {
elements.push(options.element)
options.element._resize_widget = this
}
}
export function teardown(options) {
if (!options) return
if (elements.indexOf(options.element) != -1) {
elements.splice(elements.indexOf(options.element), 1)
delete options.element._resize_widget
}
}

View file

@ -4,9 +4,12 @@
Disabled for now
*/
/* global WebKitCSSMatrix */
var I = new WebKitCSSMatrix()
function Point(x, y, z) {
@ -45,7 +48,7 @@ function getTransformationMatrix(w) {
}
module.exports = function cssTransformCoords(node, x, y) {
export default function cssTransformCoords(node, x, y) {
return new Point(x, y, 0).transformBy(getTransformationMatrix(node).inverse())

View file

@ -1,115 +0,0 @@
const Touch = window.Touch || class Touch {}
// const cssTransformCoords = require('./transform-coords')
module.exports = {
fix: function(e) {
return {
target: e.target,
firstTarget: null,
offsetX: e.offsetX,
offsetY: e.offsetY,
pageX: e.pageX,
pageY: e.pageY,
clientX: e.clientX,
clientY: e.clientY,
movementX: e.movementX,
movementY: e.movementY,
pointerId: e.pointerId,
pointerType: e.pointerType,
button: e.button,
altKey: e.altKey,
ctrlKey: e.ctrlKey,
shiftKey: e.shiftKey,
inertia: e.multitouch ? 1 : e.inertia,
traversing: e.traversing,
traversingStack: e.traversingStack,
multitouch: e.multitouch,
isTouch: e instanceof Touch,
force: e.webkitForce || e.force || 0,
radiusX: e.radiusX,
radiusY: e.radiusY,
rotationAngle: e.rotationAngle,
// iOS only
altitudeAngle: e.altitudeAngle,
azimuthAngle: e.azimuthAngle,
touchType: e.touchType
}
},
normalizeDragEvent: function(event, previousEvent) {
event = module.exports.fix(event)
event.firstTarget = previousEvent ? previousEvent.firstTarget : event.target
if (event.movementX === undefined) {
event.movementX = previousEvent ? event.pageX - previousEvent.pageX : 0
event.movementY = previousEvent ? event.pageY - previousEvent.pageY : 0
}
if (event.isTouch && !previousEvent) {
module.exports.resetEventOffset(event, event.target)
} else if (event.isTouch && previousEvent) {
event.offsetX = previousEvent.offsetX + event.movementX
event.offsetY = previousEvent.offsetY + event.movementY
}
if (event.inertia === undefined) {
event.inertia = 1
}
if (previousEvent) {
if (previousEvent.traversing) event.traversing = previousEvent.traversing
if (previousEvent.traversingStack) event.traversingStack = previousEvent.traversingStack
if (previousEvent.multitouch) {
event.multitouch = previousEvent.multitouch
event.inertia = 1
}
}
// if (!event.traversing) {
// // css transfom fix (doesn't work well with traversing gestures)
// var transformedCoords = cssTransformCoords(event.firstTarget, event.movementX, event.movementY)
// event.movementX = transformedCoords.x
// event.movementY = transformedCoords.y
// }
return event
},
resetEventOffset: function(event, target) {
var off = DOM.offset(target)
event.offsetX = event.pageX - off.left
event.offsetY = event.pageY - off.top
// if (!event.traversing) {
// // css transfom fix (doesn't work well with traversing gestures)
// var transformedCoords = cssTransformCoords(event.firstTarget, event.offsetX, event.offsetY)
// event.offsetX = transformedCoords.x
// event.offsetY = transformedCoords.y
// }
},
TRAVERSING_SAMEWIDGET: 1
}

123
src/client/events/utils.mjs Normal file
View file

@ -0,0 +1,123 @@
import {DOM} from '../globals.mjs'
var zoom
setTimeout(async()=>{
// use setTimeout to fix init order in safari...
zoom = (await import('../ui/zoom.mjs')).default
})
// impot cssTransformCoords from './transform-coords.mjs'
const Touch = window.Touch || class Touch {}
export function fix(e) {
var localZoom = zoom.editor && zoom.editor.enabled ? zoom.localZoom : 1
return {
target: e.target === document ? null : e.target, // firefox passes document when outside the page
firstTarget: null,
offsetX: e.offsetX,
offsetY: e.offsetY,
pageX: e.pageX,
pageY: e.pageY,
clientX: e.clientX,
clientY: e.clientY,
movementX: e.movementX === undefined ? undefined : e.movementX / localZoom,
movementY: e.movementY === undefined ? undefined : e.movementY / localZoom,
pointerId: e.pointerId,
pointerType: e.pointerType,
button: e.button,
altKey: e.altKey,
ctrlKey: e.ctrlKey,
shiftKey: e.shiftKey,
inertia: e.multitouch ? 1 : e.inertia,
traversing: e.traversing,
traversingStack: e.traversingStack,
multitouch: e.multitouch,
isTouch: e instanceof Touch,
force: e.webkitForce || e.force || 0,
radiusX: e.radiusX,
radiusY: e.radiusY,
rotationAngle: e.rotationAngle,
// iOS only
altitudeAngle: e.altitudeAngle,
azimuthAngle: e.azimuthAngle,
touchType: e.touchType
}
}
export function normalizeDragEvent(event, previousEvent) {
event = fix(event)
event.firstTarget = previousEvent ? previousEvent.firstTarget : event.target
if (event.movementX === undefined) {
event.movementX = previousEvent ? event.pageX - previousEvent.pageX : 0
event.movementY = previousEvent ? event.pageY - previousEvent.pageY : 0
}
if (event.isTouch && !previousEvent) {
resetEventOffset(event, event.target)
} else if (previousEvent) {
event.offsetX = previousEvent.offsetX + event.movementX
event.offsetY = previousEvent.offsetY + event.movementY
}
if (event.inertia === undefined) {
event.inertia = 1
}
if (previousEvent) {
if (previousEvent.traversing) event.traversing = previousEvent.traversing
if (previousEvent.traversingStack) event.traversingStack = previousEvent.traversingStack
if (previousEvent.multitouch) {
event.multitouch = previousEvent.multitouch
event.inertia = 1
}
}
// if (!event.traversing) {
// // css transform fix (doesn't work well with traversing gestures)
// var transformedCoords = cssTransformCoords(event.firstTarget, event.movementX, event.movementY)
// event.movementX = transformedCoords.x
// event.movementY = transformedCoords.y
// }
return event
}
export function resetEventOffset(event, target) {
var off = DOM.offset(target)
event.offsetX = event.pageX - off.left
event.offsetY = event.pageY - off.top
// if (!event.traversing) {
// // css transform fix (doesn't work well with traversing gestures)
// var transformedCoords = cssTransformCoords(event.firstTarget, event.offsetX, event.offsetY)
// event.offsetX = transformedCoords.x
// event.offsetY = transformedCoords.y
// }
}
export const TRAVERSING_SAMEWIDGET = 1

View file

@ -1,36 +0,0 @@
window.IP = window.IP || ''
window.ENV = window.ENV || {}
location.search.replace(/[?&]+([^=&]+)=([^&]*)/gi, (s,k,v)=>{
ENV[k]=v
})
for (var k in ENV) {
ENV[k.toLowerCase()] = ENV[k]
}
window.LANG = ENV.lang === 'debug' ? 'debug' : (ENV.lang || navigator.language || '').substr(0, 2).toLowerCase()
window.PACKAGE = require('../../package.json')
window.LOADING = null
window.READ_ONLY = window.READ_ONLY || false
window.GRIDWIDTH_CSS = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--grid-width'))
window.GRIDWIDTH = GRIDWIDTH_CSS
window.ELECTRON_NOGPU = false
window.CANVAS_FRAMERATE = parseFloat(ENV.framerate || 60)
window.CANVAS_SCALING = parseFloat(ENV.forcehdpi) || ( ENV.hdpi ? window.devicePixelRatio : 1 )
window.INITIALZOOM = ENV.zoom ? parseFloat(ENV.zoom) : 1
window.PXSCALE = INITIALZOOM
document.documentElement.style.setProperty('font-size', PXSCALE + 'px')
window.DOUBLE_TAP_TIME = ENV.doubletap ? parseInt(ENV.doubletap) : 375
window.JSON.parseFlex = require('json5').parse
window.DOM = require('./dom')
window.TITLE = PACKAGE.productName + ' v' + PACKAGE.version

61
src/client/globals.mjs Normal file
View file

@ -0,0 +1,61 @@
import json5 from 'json5'
import pkg from '../../package.json'
import * as dom from './dom.mjs'
export var IP = window.IP || ''
export var ENV = window.ENV || {}
location.search.replace(/[?&]+([^=&j]+)=([^&]*)/gi, (s,k,v)=>{
ENV[k]=v
})
for (var k in ENV) {
ENV[k.toLowerCase()] = ENV[k]
}
export var LANG = ENV.lang === 'debug' ? 'debug' : (ENV.lang || navigator.language || '').substr(0, 2).toLowerCase()
export var PACKAGE = pkg
export var LOADING = null
export var READ_ONLY = window.READ_ONLY || false
export var KIOSK = window.KIOSK || false
export var GRIDWIDTH_CSS = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--grid-width'))
export function setGRIDWIDTH_CSS(x) {GRIDWIDTH_CSS = x}
export var GRIDWIDTH = GRIDWIDTH_CSS
export function setGRIDWIDTH(x) {GRIDWIDTH = x}
export var ELECTRON_NOGPU = false
export var CANVAS_FRAMERATE = parseFloat(ENV.framerate || 60)
export var CANVAS_SCALING = parseFloat(ENV.forcehdpi) || ( ENV.hdpi ? window.devicePixelRatio : 1 )
export var INITIALZOOM = ENV.zoom ? parseFloat(ENV.zoom) : 1
export var PXSCALE = INITIALZOOM
export function setPXSCALE(x) {PXSCALE = x}
document.documentElement.style.setProperty('font-size', PXSCALE + 'px')
export var DOUBLE_TAP_TIME = ENV.doubletap ? parseInt(ENV.doubletap) : 375
export var CLIENT_SYNC = parseInt(ENV.clientSync) !== 0
export var TOGGLE_ALT_TRAVERSING = !!ENV.altTraversing
export var VIRTUAL_KEYBOARD = !!ENV.virtualKeyboard
export function setVIRTUAL_KEYBOARD(x) {
VIRTUAL_KEYBOARD = x
}
export var FOCUSABLE = !ENV.noFocus
if (!FOCUSABLE) console.debug('ELECTRON.SETFOCUSABLE(0)')
else console.debug('ELECTRON.SETFOCUSABLE(1)')
export function setFOCUSABLE(x) {FOCUSABLE = x}
export var JSON5 = json5
export var DOM = dom
export var TITLE = ENV.title || (PACKAGE.productName + ' v' + PACKAGE.version)

View file

@ -1,46 +0,0 @@
document.addEventListener('DOMContentLoaded', function(event) {
require('./globals')
require('./stacktrace')
var locales = require('./locales')
DOM.init()
var uiLoading = require('./ui/ui-loading')
uiLoading(locales('loading_server'))
function init() {
setTimeout(()=>{
var ipc = require('./ipc/'),
backup = require('./backup')
ipc.init()
require('./ui/init')
document.title = TITLE
ipc.send('open', {hotReload: backup.exists})
window.onunload = ()=>{
ipc.send('close')
}
backup.load()
}, 100)
}
if (document.requestStorageAccess) {
document.requestStorageAccess().then(init, init)
} else {
init()
}
})

25
src/client/index.mjs Normal file
View file

@ -0,0 +1,25 @@
import {TITLE} from './globals.mjs'
import './stacktrace.mjs'
import './ui/init.mjs'
import locales from './locales/index.mjs'
import uiLoading from './ui/ui-loading.mjs'
import ipc from './ipc/index.mjs'
import * as backup from './backup.mjs'
uiLoading(locales('loading_server'))
ipc.init(()=>{
document.title = TITLE
ipc.send('open', {hotReload: backup.exists})
window.onunload = ()=>{
ipc.send('close')
}
backup.load()
})

View file

@ -1,143 +0,0 @@
var utils = require('../ui/utils'),
osc = require('../osc'),
session = require('../managers/session/'),
widgetManager = require('../managers/widgets'),
state = require('../managers/state'),
editor = require('../editor/'),
locales = require('../locales'),
UiModal = require('../ui/ui-modal'),
uiLoading = require('../ui/ui-loading'),
notifications = require('../ui/notifications'),
raw = require('nanohtml/raw'),
backup = require('../backup')
module.exports = {
bundle: function(data) {
for (let i in data) {
osc.receive(data[i])
}
},
receiveOsc: function(data){
osc.receive(data)
},
connected:function(){
uiLoading(false)
},
sessionOpen: function(data){
session.open(data)
},
sessionNew: function(){
session.create()
},
sessionSaved: function(data){
editor.unsavedSession = false
},
fragmentLoad: function(data){
session.setFragment(data)
},
stateLoad: function(data){
state.load(data.state, data.send, data.path)
},
stateSend:function(){
notifications.add({
icon: 'wifi',
message: locales('loading_newclient')
})
setTimeout(function(){
osc.syncOnly = true
state.send()
osc.syncOnly = false
},200)
},
editorDisable: function(data){
editor.disable(data.permanent)
},
error: function(data){
new UiModal({title: raw(utils.icon('exclamation-triangle') + '&nbsp; ' + locales('error')), content: raw(data), closable:true})
},
errorLog: function(data) {
console.error(data)
},
reloadCss: function(){
var queryString = '?reload=' + Date.now()
DOM.each(document, 'link[rel="stylesheet"][hot-reload]', (el)=>{
el.href = el.href.replace(/\?.*|$/, queryString)
})
setTimeout(()=>{
var root = widgetManager.getWidgetById('root')[0]
if (root) root.onPropChanged('color')
GRIDWIDTH_CSS = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--grid-width'))
editor.toggleGrid()
editor.toggleGrid()
},200)
},
reload: function(){
backup.save()
editor.unsavedSession = false
window.location.href = window.location.href
},
notify: function(data) {
var message = data.message || ''
if (data.locale) message = locales(data.locale) + message
notifications.add({
icon: data.icon,
class: data.class,
message: message
})
},
setTitle: function(data) {
document.title = TITLE + (data ? ' (' + data + ')' : '')
},
serverTargets: function(data) {
if (data) osc.serverTargets = data
}
}

View file

@ -0,0 +1,171 @@
import raw from 'nanohtml/raw'
import fastdom from 'fastdom'
import osc from '../osc.mjs'
import session from '../managers/session/index.mjs'
import widgetManager from '../managers/widgets.mjs'
import state from '../managers/state.mjs'
import editor from '../editor/index.mjs'
import locales from '../locales/index.mjs'
import UiModal from '../ui/ui-modal.mjs'
import uiLoading from '../ui/ui-loading.mjs'
import notifications from '../ui/notifications'
import * as backup from '../backup.mjs'
import {updateMobileThemeColor, icon} from '../ui/utils.mjs'
import {CLIENT_SYNC, DOM, ENV, TITLE, setGRIDWIDTH_CSS} from '../globals.mjs'
export default {
bundle: function(data) {
for (let i in data) {
osc.receive(data[i])
}
},
receiveOsc: function(data){
osc.receive(data)
},
connected:function(){
uiLoading(false)
},
sessionOpen: function(data){
session.open(data)
},
sessionNew: function(){
session.create()
},
sessionSaved: function(data){
editor.unsavedSession = false
},
fragmentLoad: function(data){
session.setFragment(data)
},
stateLoad: function(data){
state.load(data.state, data.send, data.path)
},
stateSend:function(){
if (!CLIENT_SYNC) return
notifications.add({
icon: 'wifi',
class: 'client-connected',
message: locales('loading_newclient')
})
setTimeout(function(){
osc.syncOnly = true
state.send()
osc.syncOnly = false
},200)
},
editorDisable: function(data){
editor.disable(data.permanent)
},
error: function(data){
new UiModal({title: raw(icon('exclamation-triangle') + '&nbsp; ' + locales('error')), content: raw(data), closable:true})
},
errorLog: function(data) {
console.error(data)
},
reloadCss: function(){
var queryString = '?__OSC_ASSET__=1&reload=' + Date.now()
var sheets = DOM.get(document, 'link[rel="stylesheet"][hot-reload]')
var loaded = 0
for (let stylesheet of sheets) {
stylesheet.href = stylesheet.href.replace(/\?.*|$/, queryString)
// use image hack to catch stylesheet load event
let img = document.createElement('img')
document.body.appendChild(img)
img.onerror = img.onload = ()=>{
img.onerror = img.onload = null
document.body.removeChild(img)
if (++loaded === sheets.length) {
var root = widgetManager.getWidgetById('root')[0]
if (root) root.onPropChanged('colorWidget')
fastdom.measure(()=>{
setGRIDWIDTH_CSS(parseInt(getComputedStyle(document.documentElement).getPropertyValue('--grid-width')))
fastdom.mutate(()=>{
editor.toggleGrid()
editor.toggleGrid()
})
})
updateMobileThemeColor(root)
}
}
img.src = stylesheet.href
}
},
reload: function(){
backup.save()
editor.unsavedSession = false
window.location.href = window.location.href
},
notify: function(data) {
var message = data.message || ''
if (data.locale) message = locales(data.locale) + message
notifications.add({
icon: data.icon,
class: data.class,
message: message
})
},
setTitle: function(data) {
if (ENV.title) return
document.title = TITLE + (data ? ' (' + data + ')' : '')
},
serverTargets: function(data) {
if (data) osc.serverTargets = data
}
}

View file

@ -1,10 +1,22 @@
var EventEmitter = require('../events/event-emitter'),
cache = require('../managers/cache'),
{nanoid} = require('nanoid'), uuid,
notifications,
locales
import {nanoid} from 'nanoid'
import EventEmitter from '../events/event-emitter.mjs'
import cache from '../managers/cache.mjs'
import {ENV} from '../globals.mjs'
var localUuid = ENV.id || cache.get('osc.uuid', false)
var notifications, locales, callbacks
var loadDeps = (async()=>{
notifications = (await import('../ui/notifications.mjs')).default
locales = (await import('../locales/index.mjs')).default
callbacks = (await import('./callbacks.mjs')).default
// wait for other js chunks too since we'll connect to the server once this provise resolves
await import('../editor/context-menu.mjs')
await import('../remote-control.mjs')
await import('../ui/ui-keyboard.mjs')
})()
var uuid, localUuid = ENV.id || cache.get('uuid', false)
if (localUuid) {
uuid = localUuid
} else {
@ -12,11 +24,6 @@ if (localUuid) {
cache.set('uuid', uuid, false)
}
setTimeout(()=>{
notifications = require('../ui/notifications')
locales = require('../locales')
})
var reconnectTimeout = 500,
hearbeatInterval = 5000,
hearbeatTimeout = 3000,
@ -48,32 +55,36 @@ class Ipc extends EventEmitter {
document.cookie = 'client_id=' + uuid + ';samesite=strict'
try {
this.open()
} catch(e) {
console.warn('Could not open a WebSocket connection')
console.log(e)
}
}
init() {
init(callback) {
var callbacks = require('./callbacks')
loadDeps.then(()=>{
for (let i in callbacks) {
let callback = callbacks[i]
this.on(i, (data)=>{
callback(data)
})
}
for (let i in callbacks) {
let callback = callbacks[i]
this.on(i, (data)=>{
callback(data)
})
}
try {
this.open()
} catch(e) {
console.warn('Could not open a WebSocket connection')
console.log(e)
}
callback()
})
}
open() {
this.socket = new WebSocket(protocol + window.location.host + '/' + uuid)
this.socket = new WebSocket(protocol + window.location.host + '/' + uuid + '/' + window.AUTH)
this.socket.onclose = this.socket.onerror = ()=>{
if (!this.connected()) this.close()
@ -91,6 +102,7 @@ class Ipc extends EventEmitter {
if (notifications && this.disconnected) notifications.add({
icon: 'wifi',
class: 'server-connected',
message: locales('server_connected'),
id: 'ipc_state'
})
@ -122,16 +134,17 @@ class Ipc extends EventEmitter {
clearTimeout(this.disconnectTimeout)
this.disconnectTimeout = setTimeout(()=>{
// delay notification in case reconnection succeeds quickly
if (notifications && this.disconnected) notifications.add({
if (notifications && !this.connected()) notifications.add({
icon: 'wifi',
class: 'error',
message: locales('server_disconnected'),
id: 'ipc_state',
duration: Infinity
})
this.disconnected = true
}, reconnectTimeout * 2)
this.disconnected = true
clearTimeout(this.reconnectTimeout)
this.reconnectTimeout = setTimeout(()=>{
@ -190,4 +203,4 @@ class Ipc extends EventEmitter {
var ipc = new Ipc()
module.exports = ipc
export default ipc

141
src/client/locales/de.mjs Normal file
View file

@ -0,0 +1,141 @@
export default {
// console
console: 'Konsole',
console_enabled: 'Aktiv',
console_clear: 'Konsole leeren',
// editor
editor: 'Editor',
editor_enabled: 'Aktiv',
editor_grid: 'Raster',
editor_tree: 'Projektbaum',
editor_inspector: 'Inspektor',
editor_percents: 'Relative Einheiten (%)',
// editor context-menu
editor_show_in_tree: 'Zeige in Baum',
editor_show_in_session: 'Zeige in Sitzung',
editor_front: 'In den Vordergrund',
editor_closer: 'Eine Ebene nach vorne',
editor_back: 'In den Hintergrund',
editor_farther: 'Eine Ebene nach hinten',
editor_copy: 'Kopieren',
editor_cut: 'Ausschneiden',
editor_paste: 'Einfügen',
editor_pasteindent: 'ID + 1',
editor_clone: 'Duplizieren',
editor_addwidget: 'Widget hinzufügen',
editor_addtab: 'Tab hinzufügen',
editor_delete: 'Löschen',
editor_fragment: 'Fragment',
editor_fragment_export: 'Export',
editor_fragment_import: 'Import',
editor_ace_help: 'Hilfe',
editor_ace_help_title: 'Tastenkombinationen für den Code-Editor',
// loadings
loading_upload: 'Datei wird hochgeladen…',
loading_newclient: 'Neuer Client verbindet sich…',
loading_server: 'Server verbinden…',
loading_session: 'Sitzung laden…',
// file
file_open: 'Öffnen',
file_open_recent: 'Kürzlich geöffnet',
file_open_recent_wait: 'Liste noch nicht geladen, bitte schließen Sie das Menü und öffnen Sie es erneut',
file_save: 'Speichern',
file_save_as: 'Speichern unter…',
file_backup: 'Backup speichern',
file_import: 'Importieren',
file_export: 'Exportieren',
// keyboard
keyboard: 'Virtuelle Tastatur',
keyboard_layout: {
default: [
'{esc} ` 1 2 3 4 5 6 7 8 9 0 - = {zrck}',
'{tab} q w e r t z u i o p [ ] \\',
'{lock} a s d f g h j k l ; \' {enter}',
'{shift} z x c v b n m , . / {shift}',
'{leer}'
],
shift: [
'{esc} ~ ! @ # $ % ^ & * ( ) _ + {zrck}',
'{tab} Q W E R T Y U I O P { } |',
'{lock} A S D F G H J K L : " {enter}',
'{shift} Z X C V B N M < > ? {shift}',
'{leer}'
]
},
keyboard_escape: 'Esc',
// fragment mode
fragment_mode: 'Fragment Modus',
fragment_mode_warning: 'Fragment Modus aktiviert',
fragment_mode_explanation: 'Die Sitzung wird als Fragment gespeichert: nur das erste untergeordnete Element von root wird gespeichert.',
// fullscreen
fullscreen: 'Vollbild',
fullscreen_unnavailable: 'Vollbild nicht verfügbar',
fullscreen_addtohome: 'Sie müssen diese Seite zu Ihrem Startbildschirm hinzufügen, um sie im Vollbildmodus zu starten',
// inspector
inspector_error: 'Es ist ein Fehler aufgetreten. Öffne die Konsole, um mehr zu lesen.',
inspector_zoom_in: 'Vergrößern',
inspector_zoom_reset: 'Zoom zurücksetzen',
inspector_zoom_ou: 'Verkleinern',
inspector_reset_selection: 'Widget(s) abwählen',
inspector_toggle_grid: 'Raster ein-/ausblenden',
// nosleep
nosleep: 'Prevent sleep',
// notifications
notifications: 'Benachrichtigungen',
// remote save
remotesave_open: 'Öffnen (auf dem Server)',
remotesave_save: 'Speichern (auf dem Server)',
remotesave_overwrite: 'Diese Datei existiert bereits, möchtest du sie überschreiben?',
remotesave_fail: 'Die Datei konnte nicht auf dem Server gespeichert werden, verwende stattdessen "export".',
remotesave_success: 'Datei erfolgreich gespeichert',
remotesave_forbidden: 'Speichern auf dem Server nicht möglich, verwende stattdessen "exportieren".',
// server
server_disconnected: 'Die Verbindung zum Server ist unterbrochen worden',
server_connected: 'Die Verbindung zum Server wurde wiederhergestellt',
// session
session: 'Sitzung',
session_new: 'Neue Sitzung',
session_malformed: 'Fehlerhafte Sitzungsdatei.',
session_parsingerror: 'Fehler beim Parsing.',
session_uploaderror: 'Hochladen der Sitzungsdatei fehlgeschlagen.',
session_unsaved: 'Die Änderungen gehen verloren, wenn du diese Sitzung schließt, ohne zu speichern. Fortfahren?',
session_oldversion_title: 'Warnung',
session_oldversion: 'Diese Sitzung wurde mit einer älteren Version dieser Software erstellt - eine automatische Konvertierung wurde durchgeführt. Nach dem Speichern wird diese Sitzung wahrscheinlich nicht korrekt mit älteren Versionen geladen, es wird empfohlen, eine Sicherungskopie davon zu erstellen.',
// state
state: 'Status',
state_store: 'Laden',
state_recall: 'Abrufen',
state_send: 'Alle senden',
state_import: 'Import',
state_export: 'Export',
state_uploaderror: 'Hochladen der Statusdatei fehlgeschlagen.',
state_storesuccess: 'Status gespeichert',
state_recallsuccess: 'Status abgerufen',
state_sendsuccess: 'Status gesendet',
// tree
tree_filter: 'Filter',
// misc
error: 'Error'
}

View file

@ -1,4 +1,4 @@
module.exports = {
export default {
// console
console: 'Console',
@ -38,21 +38,41 @@ module.exports = {
editor_ace_help_title: 'Code editor keyboard shortcuts',
// loadings
loading_upload: 'Uploading file...',
loading_newclient: 'New client connecting...',
loading_server: 'Connecting server...',
loading_session: 'Loading session...',
loading_upload: 'Uploading file…',
loading_newclient: 'New client connecting…',
loading_server: 'Connecting server…',
loading_session: 'Loading session…',
// file
file_open: 'Open',
file_open_recent: 'Open recent',
file_open_recent_wait: 'List not loaded yet, please close and reopen the menu',
file_save: 'Save',
file_save_as: 'Save as...',
file_save_as: 'Save as…',
file_backup: 'Save backup',
file_import: 'Import',
file_export: 'Export',
// keyboard
keyboard: 'Virtual keyboard',
keyboard_layout: {
default: [
'{esc} ` 1 2 3 4 5 6 7 8 9 0 - = {bksp}',
'{tab} q w e r t y u i o p [ ] \\',
'{lock} a s d f g h j k l ; \' {enter}',
'{shift} z x c v b n m , . / {shift}',
'{space}'
],
shift: [
'{esc} ~ ! @ # $ % ^ & * ( ) _ + {bksp}',
'{tab} Q W E R T Y U I O P { } |',
'{lock} A S D F G H J K L : " {enter}',
'{shift} Z X C V B N M < > ? {shift}',
'{space}'
]
},
keyboard_escape: 'Esc',
// fragment mode
fragment_mode: 'Fragment mode',
fragment_mode_warning: 'Fragment mode enabled',
@ -64,18 +84,26 @@ module.exports = {
fullscreen_addtohome: 'You must add this page to your home screen to launch it in fullscreen',
// inspector
inspector_error: 'An error just occured, open the console to read more.',
inspector_error: 'An error just occurred, open the console to read more.',
inspector_zoom_in: 'Zoom in',
inspector_zoom_reset: 'Reset zoom',
inspector_zoom_ou: 'Zoom out',
inspector_reset_selection: 'Unselect widget(s)',
inspector_toggle_grid: 'Show/hide the grid',
// nosleep
nosleep: 'Prevent sleep',
// notifications
notifications: 'Notifications',
// remote save
remotesave_open: 'Open (on the server)',
remotesave_save: 'Save (on the server)',
remotesave_overwrite: 'This file already exists, do you want to overwrite it ?',
remotesave_overwrite: 'This file already exists, do you want to overwrite it?',
remotesave_fail: 'The file could not be saved on the server, use "export" instead',
remotesave_success: 'File saved successfully',
remotesave_forbidden: 'You\'re note allowed to save on server, use "export instead"',
remotesave_forbidden: 'You\'re note allowed to save on server, use "export" instead',
// server
server_disconnected: 'The connection to the server has been interrupted',
@ -87,7 +115,7 @@ module.exports = {
session_malformed: 'Malformed session file.',
session_parsingerror: 'Parsing error.',
session_uploaderror: 'Failed to upload session file.',
session_unsaved: 'Your changes will be lost if you close this session without saving, continue ?',
session_unsaved: 'Your changes will be lost if you close this session without saving, continue?',
session_oldversion_title: 'Warning',
session_oldversion: 'This session was created with an older version of this software, an automatic conversion has been done. Once saved, this session will probably not load correctly with older versions, it is recommended to make a backup copy of it.',

Some files were not shown because too many files have changed in this diff Show more