@antimatter-audio/antimatter-ui 10.17.0 → 11.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -33,8 +33,8 @@ function styleInject(css, ref) {
33
33
  }
34
34
  }
35
35
 
36
- var css_248z$b = "@import 'tailwindcss';\n@import 'tailwindcss/base';\n@import 'tailwindcss/utilities';\n\n@theme static {\n --color-brand: #bb68d9;\n --color-brand-900: #443342;\n --color-brand-700: #932eb8;\n --color-brand-600: #826993;\n --color-brand-400: #d199e6;\n --color-brand-300: #f3d4f4;\n --color-alert: #8a0101;\n --color-text: #bab6cf;\n --color-gray-100: #c7c3de;\n --color-gray-200: #9a96ab;\n --color-gray-300: #838091;\n --color-gray-400: #595763;\n --color-gray-500: #4c4a54;\n --color-gray-600: #2e2c33;\n --color-gray-700: #1e1d21;\n --color-gray-800: #101012;\n --color-gray-900: #09090a;\n\n --color-VFDBlue-100: #0d3814;\n --color-VFDBlue-200: #234e4a;\n --color-VFDBlue-300: #128073;\n --color-VFDBlue-400: #138c6e;\n --color-VFDBlue-500: #1abe95;\n --color-VFDBlue-600: #23d8a4;\n --color-VFDBlue-700: #4aeea4;\n --color-VFDBlue-1000: #35edb4;\n --spacing-none: 0px;\n --spacing-xs: 2px;\n --spacing-sm: 4px;\n --spacing-ms: 6px;\n --spacing-md: 8px;\n --spacing-ml: 12px;\n --spacing-lg: 16px;\n --spacing-xl: 20px;\n --m-none: 0px;\n --m-xs: 2px;\n --m-sm: 4px;\n --m-ms: 6px;\n --m-md: 8px;\n --m-ml: 12px;\n --m-lg: 16px;\n --m-xl: 20px;\n --mt-none: 0px;\n --mt-xs: 2px;\n --mt-sm: 4px;\n --mt-ms: 6px;\n --mt-md: 8px;\n --mt-ml: 12px;\n --mt-lg: 16px;\n --mt-xl: 20px;\n --mr-none: 0px;\n --mr-xs: 2px;\n --mr-sm: 4px;\n --mr-ms: 6px;\n --mr-md: 8px;\n --mr-ml: 12px;\n --mr-lg: 16px;\n --mr-xl: 20px;\n --mb-none: 0px;\n --mb-xs: 2px;\n --mb-sm: 4px;\n --mb-ms: 6px;\n --mb-md: 8px;\n --mb-ml: 12px;\n --mb-lg: 16px;\n --mb-xl: 20px;\n --ml-none: 0px;\n --ml-xs: 2px;\n --ml-sm: 4px;\n --ml-ms: 6px;\n --ml-md: 8px;\n --ml-ml: 12px;\n --ml-lg: 16px;\n --ml-xl: 20px;\n --p-none: 0px;\n --p-xs: 2px;\n --p-sm: 4px;\n --p-ms: 6px;\n --p-md: 8px;\n --p-ml: 12px;\n --p-lg: 16px;\n --p-xl: 20px;\n --pt-none: 0px;\n --pt-xs: 2px;\n --pt-sm: 4px;\n --pt-ms: 6px;\n --pt-md: 8px;\n --pt-ml: 12px;\n --pt-lg: 16px;\n --pt-xl: 20px;\n --pr-none: 0px;\n --pr-xs: 2px;\n --pr-sm: 4px;\n --pr-ms: 6px;\n --pr-md: 8px;\n --pr-ml: 12px;\n --pr-lg: 16px;\n --pr-xl: 20px;\n --pb-none: 0px;\n --pb-xs: 2px;\n --pb-sm: 4px;\n --pb-ms: 6px;\n --pb-md: 8px;\n --pb-ml: 12px;\n --pb-lg: 16px;\n --pb-xl: 20px;\n --pl-none: 0px;\n --pl-xs: 2px;\n --pl-sm: 4px;\n --pl-ms: 6px;\n --pl-md: 8px;\n --pl-ml: 12px;\n --pl-lg: 16px;\n --pl-xl: 20px;\n --bg-page: #1e1d21;\n --bg-section: #1e1d21;\n --bg-popover: #09090a;\n --bg-highlighted: #838091;\n --bg-muted: #595763;\n --bg-selected: #2e2c33;\n --bg-input: #1e1d21;\n --font-leagueSpartan: 'LeagueSpartan';\n --text-xs: 0.625rem;\n --text-sm: 0.75rem;\n --text-ms: 0.813rem;\n --text-md: 0.875rem;\n --text-lg: 1rem;\n --text-xl: 1.25rem;\n --text-title: 1.75rem;\n --gap-none: 0px;\n --gap-xs: 2px;\n --gap-sm: 4px;\n --gap-ms: 6px;\n --gap-md: 8px;\n --gap-ml: 12px;\n --gap-lg: 16px;\n --gap-xl: 20px;\n}\n\ninput,\ninput:hover,\ninput:focus,\ninput:focus-visible {\n background: transparent;\n border: none;\n outline: none;\n appearance: textfield;\n}\n\nbutton,\nbutton:hover,\nbutton:focus,\nbutton:focus-visible {\n outline: none;\n}\n\nbutton:disabled,\ninput:disabled {\n cursor: not-allowed;\n}\n\ndiv:focus,\ndiv:focus-visible {\n outline: none;\n appearance: textfield;\n}\n\n@font-face {\n font-family: LeagueSpartan;\n /* ascent-override: 70%; */\n src: url('./common/assets/fonts/LeagueSpartan-Regular.ttf');\n}\n\n@font-face {\n font-family: LeagueSpartan;\n /* ascent-override: 70%; */\n src: url('./common/assets/fonts/LeagueSpartan-Thin.ttf');\n font-weight: lighter;\n}\n";
37
- styleInject(css_248z$b);
36
+ var css_248z$c = "@import 'tailwindcss';\n@import 'tailwindcss/base';\n@import 'tailwindcss/utilities';\n\n@theme static {\n --color-brand: #bb68d9;\n --color-brand-900: #443342;\n --color-brand-700: #932eb8;\n --color-brand-600: #826993;\n --color-brand-400: #d199e6;\n --color-brand-300: #f3d4f4;\n --color-alert: #8a0101;\n --color-text: #bab6cf;\n --color-gray-100: #c7c3de;\n --color-gray-200: #9a96ab;\n --color-gray-300: #838091;\n --color-gray-400: #595763;\n --color-gray-500: #4c4a54;\n --color-gray-600: #2e2c33;\n --color-gray-700: #1e1d21;\n --color-gray-800: #101012;\n --color-gray-900: #09090a;\n\n --color-VFDBlue-100: #0d3814;\n --color-VFDBlue-200: #234e4a;\n --color-VFDBlue-300: #128073;\n --color-VFDBlue-400: #138c6e;\n --color-VFDBlue-500: #1abe95;\n --color-VFDBlue-600: #23d8a4;\n --color-VFDBlue-700: #4aeea4;\n --color-VFDBlue-1000: #35edb4;\n --spacing-none: 0px;\n --spacing-xs: 2px;\n --spacing-sm: 4px;\n --spacing-ms: 6px;\n --spacing-md: 8px;\n --spacing-ml: 12px;\n --spacing-lg: 16px;\n --spacing-xl: 20px;\n --m-none: 0px;\n --m-xs: 2px;\n --m-sm: 4px;\n --m-ms: 6px;\n --m-md: 8px;\n --m-ml: 12px;\n --m-lg: 16px;\n --m-xl: 20px;\n --mt-none: 0px;\n --mt-xs: 2px;\n --mt-sm: 4px;\n --mt-ms: 6px;\n --mt-md: 8px;\n --mt-ml: 12px;\n --mt-lg: 16px;\n --mt-xl: 20px;\n --mr-none: 0px;\n --mr-xs: 2px;\n --mr-sm: 4px;\n --mr-ms: 6px;\n --mr-md: 8px;\n --mr-ml: 12px;\n --mr-lg: 16px;\n --mr-xl: 20px;\n --mb-none: 0px;\n --mb-xs: 2px;\n --mb-sm: 4px;\n --mb-ms: 6px;\n --mb-md: 8px;\n --mb-ml: 12px;\n --mb-lg: 16px;\n --mb-xl: 20px;\n --ml-none: 0px;\n --ml-xs: 2px;\n --ml-sm: 4px;\n --ml-ms: 6px;\n --ml-md: 8px;\n --ml-ml: 12px;\n --ml-lg: 16px;\n --ml-xl: 20px;\n --p-none: 0px;\n --p-xs: 2px;\n --p-sm: 4px;\n --p-ms: 6px;\n --p-md: 8px;\n --p-ml: 12px;\n --p-lg: 16px;\n --p-xl: 20px;\n --pt-none: 0px;\n --pt-xs: 2px;\n --pt-sm: 4px;\n --pt-ms: 6px;\n --pt-md: 8px;\n --pt-ml: 12px;\n --pt-lg: 16px;\n --pt-xl: 20px;\n --pr-none: 0px;\n --pr-xs: 2px;\n --pr-sm: 4px;\n --pr-ms: 6px;\n --pr-md: 8px;\n --pr-ml: 12px;\n --pr-lg: 16px;\n --pr-xl: 20px;\n --pb-none: 0px;\n --pb-xs: 2px;\n --pb-sm: 4px;\n --pb-ms: 6px;\n --pb-md: 8px;\n --pb-ml: 12px;\n --pb-lg: 16px;\n --pb-xl: 20px;\n --pl-none: 0px;\n --pl-xs: 2px;\n --pl-sm: 4px;\n --pl-ms: 6px;\n --pl-md: 8px;\n --pl-ml: 12px;\n --pl-lg: 16px;\n --pl-xl: 20px;\n --bg-page: #1e1d21;\n --bg-section: #1e1d21;\n --bg-popover: #09090a;\n --bg-highlighted: #838091;\n --bg-muted: #595763;\n --bg-selected: #2e2c33;\n --bg-input: #1e1d21;\n --font-leagueSpartan: 'LeagueSpartan';\n --text-xs: 0.625rem;\n --text-sm: 0.75rem;\n --text-ms: 0.813rem;\n --text-md: 0.875rem;\n --text-lg: 1rem;\n --text-xl: 1.25rem;\n --text-title: 1.75rem;\n --gap-none: 0px;\n --gap-xs: 2px;\n --gap-sm: 4px;\n --gap-ms: 6px;\n --gap-md: 8px;\n --gap-ml: 12px;\n --gap-lg: 16px;\n --gap-xl: 20px;\n}\n\ninput,\ninput:hover,\ninput:focus,\ninput:focus-visible {\n background: transparent;\n border: none;\n outline: none;\n appearance: textfield;\n}\n\nbutton,\nbutton:hover,\nbutton:focus,\nbutton:focus-visible {\n outline: none;\n}\n\nbutton:disabled,\ninput:disabled {\n cursor: not-allowed;\n}\n\ndiv:focus,\ndiv:focus-visible {\n outline: none;\n appearance: textfield;\n}\n\n@font-face {\n font-family: LeagueSpartan;\n /* ascent-override: 70%; */\n src: url('./common/assets/fonts/LeagueSpartan-Regular.ttf');\n}\n\n@font-face {\n font-family: LeagueSpartan;\n /* ascent-override: 70%; */\n src: url('./common/assets/fonts/LeagueSpartan-Thin.ttf');\n font-weight: lighter;\n}\n";
37
+ styleInject(css_248z$c);
38
38
 
39
39
  var Spacing = /*#__PURE__*/ function(Spacing) {
40
40
  Spacing["none"] = "none";
@@ -87,8 +87,8 @@ var Orientation = /*#__PURE__*/ function(Orientation) {
87
87
  return Orientation;
88
88
  }({});
89
89
 
90
- var css_248z$a = ".Tabs {\n display: flex;\n font-size: 1rem;\n align-items: center;\n justify-content: center;\n vertical-align: middle;\n white-space: nowrap;\n text-decoration: none;\n text-transform: uppercase;\n text-align: center;\n border: 0;\n appearance: none;\n user-select: none;\n -webkit-user-select: none;\n}\n\n.Tabs-item {\n &:disabled {\n cursor: not-allowed;\n }\n}\n\n.Tabs-item::-moz-selection {\n background: transparent;\n}\n.Tabs-item::selection {\n background: transparent;\n}\n";
91
- styleInject(css_248z$a);
90
+ var css_248z$b = ".Tabs {\n display: flex;\n font-size: 1rem;\n align-items: center;\n justify-content: center;\n vertical-align: middle;\n white-space: nowrap;\n text-decoration: none;\n text-transform: uppercase;\n text-align: center;\n border: 0;\n appearance: none;\n user-select: none;\n -webkit-user-select: none;\n}\n\n.Tabs-item {\n &:disabled {\n cursor: not-allowed;\n }\n}\n\n.Tabs-item::-moz-selection {\n background: transparent;\n}\n.Tabs-item::selection {\n background: transparent;\n}\n";
91
+ styleInject(css_248z$b);
92
92
 
93
93
  function Tabs(param) {
94
94
  var items = param.items, className = param.className, _param_padding = param.padding, padding = _param_padding === void 0 ? [
@@ -144,8 +144,8 @@ function Tabs(param) {
144
144
  Tabs.padding = Spacing;
145
145
  Tabs.margin = Spacing;
146
146
 
147
- var css_248z$9 = ".Button {\n font-size: var(--text-xs);\n display: flex;\n align-items: center;\n justify-content: center;\n padding-right: var(--spacing-ms);\n padding-left: var(--spacing-ms);\n cursor: pointer;\n vertical-align: middle;\n white-space: nowrap;\n text-decoration: none;\n text-align: enter;\n border: 0;\n appearance: none;\n user-select: none;\n -webkit-user-select: none;\n &.xSmall {\n width: var(--spacing-ml);\n height: var(--spacing-ml);\n }\n &.small {\n font-size: var(--text-xs);\n min-width: 1rem;\n min-height: var(--spacing-sm);\n }\n &.large {\n border-radius: var(--radius-sm);\n min-width: 1rem;\n min-height: var(--spacing-xl);\n }\n}\n";
148
- styleInject(css_248z$9);
147
+ var css_248z$a = ".Button {\n font-size: var(--text-xs);\n display: flex;\n align-items: center;\n justify-content: center;\n padding-right: var(--spacing-ms);\n padding-left: var(--spacing-ms);\n cursor: pointer;\n vertical-align: middle;\n white-space: nowrap;\n text-decoration: none;\n text-align: enter;\n border: 0;\n appearance: none;\n user-select: none;\n -webkit-user-select: none;\n &.xSmall {\n width: var(--spacing-ml);\n height: var(--spacing-ml);\n }\n &.small {\n font-size: var(--text-xs);\n min-width: 1rem;\n min-height: var(--spacing-sm);\n }\n &.large {\n border-radius: var(--radius-sm);\n min-width: 1rem;\n min-height: var(--spacing-xl);\n }\n}\n";
148
+ styleInject(css_248z$a);
149
149
 
150
150
  var ButtonSize = /*#__PURE__*/ function(ButtonSize) {
151
151
  ButtonSize["xSmall"] = "xSmall";
@@ -199,13 +199,13 @@ function useObservable(param) {
199
199
  };
200
200
  }
201
201
 
202
- function _array_like_to_array$h(arr, len) {
202
+ function _array_like_to_array$j(arr, len) {
203
203
  if (len == null || len > arr.length) len = arr.length;
204
204
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
205
205
  return arr2;
206
206
  }
207
207
  function _array_without_holes$2(arr) {
208
- if (Array.isArray(arr)) return _array_like_to_array$h(arr);
208
+ if (Array.isArray(arr)) return _array_like_to_array$j(arr);
209
209
  }
210
210
  function _iterable_to_array$2(iter) {
211
211
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
@@ -214,15 +214,15 @@ function _non_iterable_spread$2() {
214
214
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
215
215
  }
216
216
  function _to_consumable_array$2(arr) {
217
- return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$h(arr) || _non_iterable_spread$2();
217
+ return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$j(arr) || _non_iterable_spread$2();
218
218
  }
219
- function _unsupported_iterable_to_array$h(o, minLen) {
219
+ function _unsupported_iterable_to_array$j(o, minLen) {
220
220
  if (!o) return;
221
- if (typeof o === "string") return _array_like_to_array$h(o, minLen);
221
+ if (typeof o === "string") return _array_like_to_array$j(o, minLen);
222
222
  var n = Object.prototype.toString.call(o).slice(8, -1);
223
223
  if (n === "Object" && o.constructor) n = o.constructor.name;
224
224
  if (n === "Map" || n === "Set") return Array.from(n);
225
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$h(o, minLen);
225
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$j(o, minLen);
226
226
  }
227
227
  // export const roundUpToTwoDecimals = (val: number) => Math.ceil(val * 100) / 100;
228
228
  // mocks the `normalisedToScaledValue` internal method from JUCE
@@ -336,17 +336,37 @@ var getBarTransformStyles = function(param) {
336
336
  var randomizeValue = function(min, max) {
337
337
  return Math.random() * (max - min) + min;
338
338
  };
339
+ var incrementValue = function(param) {
340
+ var incomingVal = param.incomingVal, prevVal = param.prevVal, interval = param.interval;
341
+ var getNormalisedInterval = function() {
342
+ if (interval) {
343
+ if (interval >= 1) {
344
+ return interval * 0.01;
345
+ } else {
346
+ return interval;
347
+ }
348
+ } else {
349
+ return 0.01;
350
+ }
351
+ };
352
+ var normalisedInterval = getNormalisedInterval();
353
+ var newValue = (prevVal !== null && prevVal !== void 0 ? prevVal : 0) + incomingVal * // (interval && interval.toString().length > 4
354
+ // ? 4
355
+ // : 0.4) *
356
+ normalisedInterval;
357
+ return clamp(newValue);
358
+ };
339
359
 
340
- function _array_like_to_array$g(arr, len) {
360
+ function _array_like_to_array$i(arr, len) {
341
361
  if (len == null || len > arr.length) len = arr.length;
342
362
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
343
363
  return arr2;
344
364
  }
345
- function _array_with_holes$g(arr) {
365
+ function _array_with_holes$i(arr) {
346
366
  if (Array.isArray(arr)) return arr;
347
367
  }
348
368
  function _array_without_holes$1(arr) {
349
- if (Array.isArray(arr)) return _array_like_to_array$g(arr);
369
+ if (Array.isArray(arr)) return _array_like_to_array$i(arr);
350
370
  }
351
371
  function asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, key, arg) {
352
372
  try {
@@ -393,7 +413,7 @@ function _define_property$k(obj, key, value) {
393
413
  function _iterable_to_array$1(iter) {
394
414
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
395
415
  }
396
- function _iterable_to_array_limit$g(arr, i) {
416
+ function _iterable_to_array_limit$i(arr, i) {
397
417
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
398
418
  if (_i == null) return;
399
419
  var _arr = [];
@@ -417,7 +437,7 @@ function _iterable_to_array_limit$g(arr, i) {
417
437
  }
418
438
  return _arr;
419
439
  }
420
- function _non_iterable_rest$g() {
440
+ function _non_iterable_rest$i() {
421
441
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
422
442
  }
423
443
  function _non_iterable_spread$1() {
@@ -457,19 +477,19 @@ function _object_spread_props$4(target, source) {
457
477
  }
458
478
  return target;
459
479
  }
460
- function _sliced_to_array$g(arr, i) {
461
- return _array_with_holes$g(arr) || _iterable_to_array_limit$g(arr, i) || _unsupported_iterable_to_array$g(arr, i) || _non_iterable_rest$g();
480
+ function _sliced_to_array$i(arr, i) {
481
+ return _array_with_holes$i(arr) || _iterable_to_array_limit$i(arr, i) || _unsupported_iterable_to_array$i(arr, i) || _non_iterable_rest$i();
462
482
  }
463
483
  function _to_consumable_array$1(arr) {
464
- return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$g(arr) || _non_iterable_spread$1();
484
+ return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$i(arr) || _non_iterable_spread$1();
465
485
  }
466
- function _unsupported_iterable_to_array$g(o, minLen) {
486
+ function _unsupported_iterable_to_array$i(o, minLen) {
467
487
  if (!o) return;
468
- if (typeof o === "string") return _array_like_to_array$g(o, minLen);
488
+ if (typeof o === "string") return _array_like_to_array$i(o, minLen);
469
489
  var n = Object.prototype.toString.call(o).slice(8, -1);
470
490
  if (n === "Object" && o.constructor) n = o.constructor.name;
471
491
  if (n === "Map" || n === "Set") return Array.from(n);
472
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$g(o, minLen);
492
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$i(o, minLen);
473
493
  }
474
494
  function _ts_generator$4(thisArg, body) {
475
495
  var f, y, t, _ = {
@@ -711,7 +731,7 @@ function useGlobalContext(selector) {
711
731
  // Context provider
712
732
  function GlobalContextProvider(param) {
713
733
  var children = param.children;
714
- var _useReducer = _sliced_to_array$g(useReducer(reducer, defaultGlobalStateValue), 2), state = _useReducer[0], dispatch = _useReducer[1];
734
+ var _useReducer = _sliced_to_array$i(useReducer(reducer, defaultGlobalStateValue), 2), state = _useReducer[0], dispatch = _useReducer[1];
715
735
  var highlightedItemChanged = useCallback(function(highlightedItem) {
716
736
  dispatch({
717
737
  type: 'HIGHLIGHTED_ITEM_CHANGED',
@@ -980,12 +1000,12 @@ function GlobalContextProvider(param) {
980
1000
  }, children);
981
1001
  }
982
1002
 
983
- function _array_like_to_array$f(arr, len) {
1003
+ function _array_like_to_array$h(arr, len) {
984
1004
  if (len == null || len > arr.length) len = arr.length;
985
1005
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
986
1006
  return arr2;
987
1007
  }
988
- function _array_with_holes$f(arr) {
1008
+ function _array_with_holes$h(arr) {
989
1009
  if (Array.isArray(arr)) return arr;
990
1010
  }
991
1011
  function _define_property$j(obj, key, value) {
@@ -1001,7 +1021,7 @@ function _define_property$j(obj, key, value) {
1001
1021
  }
1002
1022
  return obj;
1003
1023
  }
1004
- function _iterable_to_array_limit$f(arr, i) {
1024
+ function _iterable_to_array_limit$h(arr, i) {
1005
1025
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1006
1026
  if (_i == null) return;
1007
1027
  var _arr = [];
@@ -1025,7 +1045,7 @@ function _iterable_to_array_limit$f(arr, i) {
1025
1045
  }
1026
1046
  return _arr;
1027
1047
  }
1028
- function _non_iterable_rest$f() {
1048
+ function _non_iterable_rest$h() {
1029
1049
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1030
1050
  }
1031
1051
  function _object_spread$j(target) {
@@ -1043,16 +1063,16 @@ function _object_spread$j(target) {
1043
1063
  }
1044
1064
  return target;
1045
1065
  }
1046
- function _sliced_to_array$f(arr, i) {
1047
- return _array_with_holes$f(arr) || _iterable_to_array_limit$f(arr, i) || _unsupported_iterable_to_array$f(arr, i) || _non_iterable_rest$f();
1066
+ function _sliced_to_array$h(arr, i) {
1067
+ return _array_with_holes$h(arr) || _iterable_to_array_limit$h(arr, i) || _unsupported_iterable_to_array$h(arr, i) || _non_iterable_rest$h();
1048
1068
  }
1049
- function _unsupported_iterable_to_array$f(o, minLen) {
1069
+ function _unsupported_iterable_to_array$h(o, minLen) {
1050
1070
  if (!o) return;
1051
- if (typeof o === "string") return _array_like_to_array$f(o, minLen);
1071
+ if (typeof o === "string") return _array_like_to_array$h(o, minLen);
1052
1072
  var n = Object.prototype.toString.call(o).slice(8, -1);
1053
1073
  if (n === "Object" && o.constructor) n = o.constructor.name;
1054
1074
  if (n === "Map" || n === "Set") return Array.from(n);
1055
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$f(o, minLen);
1075
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$h(o, minLen);
1056
1076
  }
1057
1077
  function Button(param) {
1058
1078
  var disabled = param.disabled, text = param.text, id = param.id, className = param.className, style = param.style, onClick = param.onClick, children = param.children, _param_padding = param.padding, padding = _param_padding === void 0 ? [
@@ -1060,7 +1080,7 @@ function Button(param) {
1060
1080
  ] : _param_padding, _param_margin = param.margin, margin = _param_margin === void 0 ? [
1061
1081
  Spacing.none
1062
1082
  ] : _param_margin, _param_type = param.type, type = _param_type === void 0 ? ButtonType.latch : _param_type, _param_size = param.size, size = _param_size === void 0 ? ButtonSize.large : _param_size;
1063
- var _React_useState = _sliced_to_array$f(React__default.useState(false), 2), isSelected = _React_useState[0], setIsSelected = _React_useState[1];
1083
+ var _React_useState = _sliced_to_array$h(React__default.useState(false), 2), isSelected = _React_useState[0], setIsSelected = _React_useState[1];
1064
1084
  var buttonState = Juce.getToggleState(id);
1065
1085
  var isLocalhost = window.location.hostname === 'localhost';
1066
1086
  var setModSlotRowTargetAsPreview = useGlobalContext().setModSlotRowTargetAsPreview;
@@ -1140,18 +1160,18 @@ Button.margin = Spacing;
1140
1160
  Button.type = ButtonType;
1141
1161
  Button.size = ButtonSize;
1142
1162
 
1143
- var css_248z$8 = ".Dropdown-button {\n font-size: var(--text-sm);\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--spacing-lg);\n cursor: pointer;\n vertical-align: middle;\n white-space: nowrap;\n text-decoration: none;\n text-transform: uppercase;\n text-align: center;\n border-radius: var(--radius-sm);\n appearance: none;\n user-select: none;\n -webkit-user-select: none;\n height: var(--spacing-xl);\n background: var(--color-gray-800);\n color: var(--color-text);\n &:hover,\n &:focus,\n &:active {\n outline: none;\n background-color: var(--bg-highlighted);\n }\n &:disabled {\n cursor: not-allowed;\n }\n}\n\n.Dropdown-items {\n border: 2px solid;\n}\n\n.Dropdown-item {\n background-color: var(--bg-page);\n font-size: var(--text-sm);\n padding: var(--spacing-md) var(--spacing-xl);\n min-width: 100px;\n color: var(--color-text);\n cursor: pointer;\n text-align: center;\n text-transform: uppercase;\n font-weight: bold;\n}\n\n.Dropdown-item[data-selected] {\n background-color: var(--bg-popover);\n color: var(--color-text);\n}\n\n.Dropdown-item[data-active] {\n background-color: var(--bg-popover);\n color: var(--color-text);\n}\n";
1144
- styleInject(css_248z$8);
1163
+ var css_248z$9 = ".Dropdown-button {\n font-size: var(--text-sm);\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--spacing-lg);\n cursor: pointer;\n vertical-align: middle;\n white-space: nowrap;\n text-decoration: none;\n text-transform: uppercase;\n text-align: center;\n border-radius: var(--radius-sm);\n appearance: none;\n user-select: none;\n -webkit-user-select: none;\n height: var(--spacing-xl);\n background: var(--color-gray-800);\n color: var(--color-text);\n &:hover,\n &:focus,\n &:active {\n outline: none;\n background-color: var(--bg-highlighted);\n }\n &:disabled {\n cursor: not-allowed;\n }\n}\n\n.Dropdown-items {\n border: 2px solid;\n}\n\n.Dropdown-item {\n background-color: var(--bg-page);\n font-size: var(--text-sm);\n padding: var(--spacing-md) var(--spacing-xl);\n min-width: 100px;\n color: var(--color-text);\n cursor: pointer;\n text-align: center;\n text-transform: uppercase;\n font-weight: bold;\n}\n\n.Dropdown-item[data-selected] {\n background-color: var(--bg-popover);\n color: var(--color-text);\n}\n\n.Dropdown-item[data-active] {\n background-color: var(--bg-popover);\n color: var(--color-text);\n}\n";
1164
+ styleInject(css_248z$9);
1145
1165
 
1146
- function _array_like_to_array$e(arr, len) {
1166
+ function _array_like_to_array$g(arr, len) {
1147
1167
  if (len == null || len > arr.length) len = arr.length;
1148
1168
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1149
1169
  return arr2;
1150
1170
  }
1151
- function _array_with_holes$e(arr) {
1171
+ function _array_with_holes$g(arr) {
1152
1172
  if (Array.isArray(arr)) return arr;
1153
1173
  }
1154
- function _iterable_to_array_limit$e(arr, i) {
1174
+ function _iterable_to_array_limit$g(arr, i) {
1155
1175
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1156
1176
  if (_i == null) return;
1157
1177
  var _arr = [];
@@ -1175,27 +1195,27 @@ function _iterable_to_array_limit$e(arr, i) {
1175
1195
  }
1176
1196
  return _arr;
1177
1197
  }
1178
- function _non_iterable_rest$e() {
1198
+ function _non_iterable_rest$g() {
1179
1199
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1180
1200
  }
1181
- function _sliced_to_array$e(arr, i) {
1182
- return _array_with_holes$e(arr) || _iterable_to_array_limit$e(arr, i) || _unsupported_iterable_to_array$e(arr, i) || _non_iterable_rest$e();
1201
+ function _sliced_to_array$g(arr, i) {
1202
+ return _array_with_holes$g(arr) || _iterable_to_array_limit$g(arr, i) || _unsupported_iterable_to_array$g(arr, i) || _non_iterable_rest$g();
1183
1203
  }
1184
- function _unsupported_iterable_to_array$e(o, minLen) {
1204
+ function _unsupported_iterable_to_array$g(o, minLen) {
1185
1205
  if (!o) return;
1186
- if (typeof o === "string") return _array_like_to_array$e(o, minLen);
1206
+ if (typeof o === "string") return _array_like_to_array$g(o, minLen);
1187
1207
  var n = Object.prototype.toString.call(o).slice(8, -1);
1188
1208
  if (n === "Object" && o.constructor) n = o.constructor.name;
1189
1209
  if (n === "Map" || n === "Set") return Array.from(n);
1190
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$e(o, minLen);
1210
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$g(o, minLen);
1191
1211
  }
1192
1212
  var useDropdown = function(param) {
1193
1213
  var id = param.id, // TODO: Is there a better way to handle mod matrix dropdowns?
1194
1214
  rowId = param.rowId, label = param.label, _param_items = param.items, items = _param_items === void 0 ? [] : _param_items, _param_isDisabled = param.isDisabled, isDisabled = _param_isDisabled === void 0 ? false : _param_isDisabled, filter = param.filter, onChange = param.onChange, _param_displayValInHeader = param.displayValInHeader, displayValInHeader = _param_displayValInHeader === void 0 ? true : _param_displayValInHeader;
1195
1215
  var _properties_choices;
1196
1216
  var comboBoxState = Juce.getComboBoxState(id);
1197
- var _useState = _sliced_to_array$e(useState(comboBoxState.getChoiceIndex()), 2), index = _useState[0], setIndex = _useState[1];
1198
- var _useState1 = _sliced_to_array$e(useState(comboBoxState.properties), 2), properties = _useState1[0], setProperties = _useState1[1];
1217
+ var _useState = _sliced_to_array$g(useState(comboBoxState.getChoiceIndex()), 2), index = _useState[0], setIndex = _useState[1];
1218
+ var _useState1 = _sliced_to_array$g(useState(comboBoxState.properties), 2), properties = _useState1[0], setProperties = _useState1[1];
1199
1219
  var _useGlobalContext = useGlobalContext(), highlightedItemChanged = _useGlobalContext.highlightedItemChanged, setModSlotRowTargetAsPreview = _useGlobalContext.setModSlotRowTargetAsPreview;
1200
1220
  var choices = items.length ? items : (properties === null || properties === void 0 ? void 0 : (_properties_choices = properties.choices) === null || _properties_choices === void 0 ? void 0 : _properties_choices.length) ? properties === null || properties === void 0 ? void 0 : properties.choices : [];
1201
1221
  var filteredChoices = filter ? choices === null || choices === void 0 ? void 0 : choices.filter(function(item) {
@@ -1581,15 +1601,15 @@ function Dropdown(param) {
1581
1601
  }));
1582
1602
  }
1583
1603
 
1584
- var css_248z$7 = ".TextInput {\n pointer-events: auto;\n /* font-size: var(--text-xs); */\n}\n\n.TextInput::-moz-selection {\n background: transparent;\n}\n.TextInput::selection {\n background: transparent;\n}\n\n.TextInput.is-highlighted {\n background: var(--color-gray-600);\n border: 1px solid var(--color-gray-500);\n}\n";
1585
- styleInject(css_248z$7);
1604
+ var css_248z$8 = ".TextInput {\n pointer-events: auto;\n /* font-size: var(--text-xs); */\n}\n\n.TextInput::-moz-selection {\n background: transparent;\n}\n.TextInput::selection {\n background: transparent;\n}\n\n.TextInput:disabled {\n -webkit-user-select: none;\n user-select: none;\n}\n";
1605
+ styleInject(css_248z$8);
1586
1606
 
1587
- function _array_like_to_array$d(arr, len) {
1607
+ function _array_like_to_array$f(arr, len) {
1588
1608
  if (len == null || len > arr.length) len = arr.length;
1589
1609
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1590
1610
  return arr2;
1591
1611
  }
1592
- function _array_with_holes$d(arr) {
1612
+ function _array_with_holes$f(arr) {
1593
1613
  if (Array.isArray(arr)) return arr;
1594
1614
  }
1595
1615
  function _define_property$f(obj, key, value) {
@@ -1605,7 +1625,7 @@ function _define_property$f(obj, key, value) {
1605
1625
  }
1606
1626
  return obj;
1607
1627
  }
1608
- function _iterable_to_array_limit$d(arr, i) {
1628
+ function _iterable_to_array_limit$f(arr, i) {
1609
1629
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1610
1630
  if (_i == null) return;
1611
1631
  var _arr = [];
@@ -1629,7 +1649,7 @@ function _iterable_to_array_limit$d(arr, i) {
1629
1649
  }
1630
1650
  return _arr;
1631
1651
  }
1632
- function _non_iterable_rest$d() {
1652
+ function _non_iterable_rest$f() {
1633
1653
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1634
1654
  }
1635
1655
  function _object_spread$f(target) {
@@ -1647,16 +1667,16 @@ function _object_spread$f(target) {
1647
1667
  }
1648
1668
  return target;
1649
1669
  }
1650
- function _sliced_to_array$d(arr, i) {
1651
- return _array_with_holes$d(arr) || _iterable_to_array_limit$d(arr, i) || _unsupported_iterable_to_array$d(arr, i) || _non_iterable_rest$d();
1670
+ function _sliced_to_array$f(arr, i) {
1671
+ return _array_with_holes$f(arr) || _iterable_to_array_limit$f(arr, i) || _unsupported_iterable_to_array$f(arr, i) || _non_iterable_rest$f();
1652
1672
  }
1653
- function _unsupported_iterable_to_array$d(o, minLen) {
1673
+ function _unsupported_iterable_to_array$f(o, minLen) {
1654
1674
  if (!o) return;
1655
- if (typeof o === "string") return _array_like_to_array$d(o, minLen);
1675
+ if (typeof o === "string") return _array_like_to_array$f(o, minLen);
1656
1676
  var n = Object.prototype.toString.call(o).slice(8, -1);
1657
1677
  if (n === "Object" && o.constructor) n = o.constructor.name;
1658
1678
  if (n === "Map" || n === "Set") return Array.from(n);
1659
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$d(o, minLen);
1679
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$f(o, minLen);
1660
1680
  }
1661
1681
  // import { decimalToPercent, percentToDecimal } from '../../common/utils';
1662
1682
  // import debounce from 'lodash.debounce';
@@ -1668,9 +1688,9 @@ var InputTypes = /*#__PURE__*/ function(InputTypes) {
1668
1688
  function Input(param) {
1669
1689
  var onComplete = param.onComplete, value = param.value; param.min; param.max; var _param_fontSize = param.fontSize, fontSize = _param_fontSize === void 0 ? FontSizes.xSmall : _param_fontSize, style = param.style, className = param.className, id = param.id, _param_textColor = param.textColor, textColor = _param_textColor === void 0 ? 'var(--color-text)' : _param_textColor;
1670
1690
  var _inputRef_current;
1671
- var _useState = _sliced_to_array$d(useState(value), 2), internalValue = _useState[0], setInternalValue = _useState[1];
1691
+ var _useState = _sliced_to_array$f(useState(value), 2), internalValue = _useState[0], setInternalValue = _useState[1];
1672
1692
  // const [hasError, setHasError] = useState<boolean>(false);
1673
- var _useState1 = _sliced_to_array$d(useState(false), 2), isHighlighted = _useState1[0], setIsHighlighted = _useState1[1];
1693
+ var _useState1 = _sliced_to_array$f(useState(false), 2), isHighlighted = _useState1[0], setIsHighlighted = _useState1[1];
1674
1694
  var valueRef = useRef(null);
1675
1695
  var isLocalhost = window.location.hostname === 'localhost';
1676
1696
  // Sets up listeners to handle changes on the backend
@@ -1814,15 +1834,15 @@ var SliderType = /*#__PURE__*/ function(SliderType) {
1814
1834
  return SliderType;
1815
1835
  }({});
1816
1836
 
1817
- function _array_like_to_array$c(arr, len) {
1837
+ function _array_like_to_array$e(arr, len) {
1818
1838
  if (len == null || len > arr.length) len = arr.length;
1819
1839
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1820
1840
  return arr2;
1821
1841
  }
1822
- function _array_with_holes$c(arr) {
1842
+ function _array_with_holes$e(arr) {
1823
1843
  if (Array.isArray(arr)) return arr;
1824
1844
  }
1825
- function _iterable_to_array_limit$c(arr, i) {
1845
+ function _iterable_to_array_limit$e(arr, i) {
1826
1846
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1827
1847
  if (_i == null) return;
1828
1848
  var _arr = [];
@@ -1846,19 +1866,19 @@ function _iterable_to_array_limit$c(arr, i) {
1846
1866
  }
1847
1867
  return _arr;
1848
1868
  }
1849
- function _non_iterable_rest$c() {
1869
+ function _non_iterable_rest$e() {
1850
1870
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1851
1871
  }
1852
- function _sliced_to_array$c(arr, i) {
1853
- return _array_with_holes$c(arr) || _iterable_to_array_limit$c(arr, i) || _unsupported_iterable_to_array$c(arr, i) || _non_iterable_rest$c();
1872
+ function _sliced_to_array$e(arr, i) {
1873
+ return _array_with_holes$e(arr) || _iterable_to_array_limit$e(arr, i) || _unsupported_iterable_to_array$e(arr, i) || _non_iterable_rest$e();
1854
1874
  }
1855
- function _unsupported_iterable_to_array$c(o, minLen) {
1875
+ function _unsupported_iterable_to_array$e(o, minLen) {
1856
1876
  if (!o) return;
1857
- if (typeof o === "string") return _array_like_to_array$c(o, minLen);
1877
+ if (typeof o === "string") return _array_like_to_array$e(o, minLen);
1858
1878
  var n = Object.prototype.toString.call(o).slice(8, -1);
1859
1879
  if (n === "Object" && o.constructor) n = o.constructor.name;
1860
1880
  if (n === "Map" || n === "Set") return Array.from(n);
1861
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$c(o, minLen);
1881
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$e(o, minLen);
1862
1882
  }
1863
1883
  // 20.0f, 15000.0f, 0.1f, 0.7f),800.0f
1864
1884
  // ValueType rangeStart, ValueType rangeEnd, ValueType intervalValue, ValueType skewFactor, bool useSymmetricSkew=false)
@@ -1869,34 +1889,6 @@ var useSlider = function(param) {
1869
1889
  interval: 0.1,
1870
1890
  skew: 0.7
1871
1891
  } : _param_mockProperties, _param_isRandomizable = param.isRandomizable, isRandomizable = _param_isRandomizable === void 0 ? false : _param_isRandomizable, _param_orientation = param.orientation, orientation = _param_orientation === void 0 ? Orientation.vertical : _param_orientation, _param_dragOrientation = param.dragOrientation, dragOrientation = _param_dragOrientation === void 0 ? Orientation.vertical : _param_dragOrientation, _param_mockInitialNormalisedValue = param.mockInitialNormalisedValue, mockInitialNormalisedValue = _param_mockInitialNormalisedValue === void 0 ? 0.0 : _param_mockInitialNormalisedValue, onChange = param.onChange; param.sliderElementRef; var _param_isDisabled = param.isDisabled, isDisabled = _param_isDisabled === void 0 ? false : _param_isDisabled;
1872
- var clickListener = function clickListener(event) {
1873
- var _event_target_closest;
1874
- if (((_event_target_closest = event.target.closest('.Slider')) === null || _event_target_closest === void 0 ? void 0 : _event_target_closest.id) === id) {
1875
- var // Update the preview mod slot target selection in the mod matrix.
1876
- // This selection will be saved to the back end when a modifier is set for the target.
1877
- _document_getElementById;
1878
- setIsActive(true);
1879
- (_document_getElementById = document.getElementById(id)) === null || _document_getElementById === void 0 ? void 0 : _document_getElementById.focus();
1880
- event.stopPropagation();
1881
- } else {
1882
- var _document_getElementById1;
1883
- setIsActive(false);
1884
- (_document_getElementById1 = document.getElementById(id)) === null || _document_getElementById1 === void 0 ? void 0 : _document_getElementById1.blur();
1885
- event.stopPropagation();
1886
- }
1887
- };
1888
- var keyDownListener = function keyDownListener(event) {
1889
- if (isActive) {
1890
- if (event.key === 'ArrowLeft') {
1891
- event.preventDefault();
1892
- decrementValue();
1893
- }
1894
- if (event.key === 'ArrowRight') {
1895
- event.preventDefault();
1896
- incrementValue();
1897
- }
1898
- }
1899
- };
1900
1892
  // const sliderState: JuceSlider = Juce.getSliderState(id);
1901
1893
  // if isLocalhost is true, the front end app is running outside of JUCE in a browser.
1902
1894
  var isLocalhost = window.location.hostname === 'localhost';
@@ -1909,30 +1901,16 @@ var useSlider = function(param) {
1909
1901
  * AudioProcessorParameter::getValue() (C++).
1910
1902
  */ // See https://github.com/juce-framework/JUCE/blob/51d11a2be6d5c97ccf12b4e5e827006e19f0555a/modules/juce_gui_extra/native/javascript/index.js#L230C1-L238C6
1911
1903
  // NOTE: We can think of this as a percentage value, in 0 to 1 format
1912
- var _useState = _sliced_to_array$c(useState(0), 2), scaledValue = _useState[0], setScaledValue = _useState[1];
1904
+ var _useState = _sliced_to_array$e(useState(0), 2), scaledValue = _useState[0], setScaledValue = _useState[1];
1913
1905
  // const [normalisedValue, setNormalisedValue] = useState(0);
1914
- var _useState1 = _sliced_to_array$c(useState(), 2), properties = _useState1[0], setProperties = _useState1[1];
1906
+ var _useState1 = _sliced_to_array$e(useState(), 2), properties = _useState1[0], setProperties = _useState1[1];
1915
1907
  var scaledValueRef = useRef(null);
1916
1908
  var normalisedValueRef = useRef(null);
1917
1909
  var sliderState = Juce.getSliderState(id);
1918
1910
  var prevValueRef = useRef(null);
1919
1911
  // const randomValueSetCounter = useRef<number>(null);
1920
- var _useGlobalContext = useGlobalContext(), useRandom = _useGlobalContext.useRandom, highlightedItemChanged = _useGlobalContext.highlightedItemChanged, setDefaultParameter = _useGlobalContext.setDefaultParameter, setModSlotRowTargetAsPreview = _useGlobalContext.setModSlotRowTargetAsPreview, _useGlobalContext_globalState = _useGlobalContext.// setModSlotRowTarget,
1921
- globalState, automatableParamsList = _useGlobalContext_globalState.automatableParamsList, modSlotTargets = _useGlobalContext_globalState.modSlotTargets, modSlotPreview = _useGlobalContext_globalState.modSlotPreview;
1922
- var _useState2 = _sliced_to_array$c(useState(false), 2), isActive = _useState2[0], setIsActive = _useState2[1];
1923
- useEffect(function() {
1924
- document.addEventListener('click', clickListener);
1925
- document.addEventListener('keydown', keyDownListener);
1926
- return function() {
1927
- document.removeEventListener('click', clickListener);
1928
- document.removeEventListener('keydown', keyDownListener);
1929
- };
1930
- }, [
1931
- window,
1932
- isActive,
1933
- automatableParamsList,
1934
- modSlotTargets
1935
- ]);
1912
+ var _useGlobalContext = useGlobalContext(), useRandom = _useGlobalContext.useRandom, highlightedItemChanged = _useGlobalContext.highlightedItemChanged, setDefaultParameter = _useGlobalContext.setDefaultParameter, setModSlotRowTargetAsPreview = _useGlobalContext.setModSlotRowTargetAsPreview, // setModSlotRowTarget,
1913
+ modSlotPreview = _useGlobalContext.globalState.modSlotPreview;
1936
1914
  // Set the initial state
1937
1915
  //@ts-expect-error
1938
1916
  useEffect(function() {
@@ -1945,7 +1923,7 @@ var useSlider = function(param) {
1945
1923
  end: sliderState === null || sliderState === void 0 ? void 0 : (_sliderState_properties5 = sliderState.properties) === null || _sliderState_properties5 === void 0 ? void 0 : _sliderState_properties5.end,
1946
1924
  skew: sliderState === null || sliderState === void 0 ? void 0 : (_sliderState_properties6 = sliderState.properties) === null || _sliderState_properties6 === void 0 ? void 0 : _sliderState_properties6.skew
1947
1925
  });
1948
- setNormalisedState(newValue);
1926
+ setNormalisedState(clamp(newValue));
1949
1927
  };
1950
1928
  if (!isLocalhost) {
1951
1929
  setProperties(sliderState === null || sliderState === void 0 ? void 0 : sliderState.properties);
@@ -1962,11 +1940,15 @@ var useSlider = function(param) {
1962
1940
  }
1963
1941
  }, []);
1964
1942
  // TODO: take out mod slot logic
1965
- var changeHandler = function(scaledValueFromState, sliderId) {
1943
+ var changeHandler = function(normalisedValue, sliderId) {
1944
+ var scaledValue = normalisedToScaled({
1945
+ normalisedValue: normalisedValue,
1946
+ properties: sliderState === null || sliderState === void 0 ? void 0 : sliderState.properties
1947
+ });
1966
1948
  if (rowId === modSlotPreview.targetIndex) {
1967
- onChange && onChange(parseFloat(scaledValueFromState.toFixed(2)), rowId);
1949
+ onChange && onChange(parseFloat(scaledValue.toFixed(2)), rowId);
1968
1950
  } else {
1969
- onChange && onChange(parseFloat(scaledValueFromState.toFixed(2)), sliderId);
1951
+ onChange && onChange(parseFloat(scaledValue.toFixed(2)), sliderId);
1970
1952
  }
1971
1953
  };
1972
1954
  // Update the local state from JUCE
@@ -1977,7 +1959,6 @@ var useSlider = function(param) {
1977
1959
  normalisedValueRef.current = parseFloat(normalisedValueFromState.toFixed(2));
1978
1960
  if (scaledValue !== prevValueRef.current) {
1979
1961
  setScaledValue(scaledValue);
1980
- rowId && changeHandler(scaledValueFromState, rowId);
1981
1962
  if (displayValInHeader && (scaledValueRef === null || scaledValueRef === void 0 ? void 0 : scaledValueRef.current) !== scaledValue) {
1982
1963
  highlightedItemChanged({
1983
1964
  label: label,
@@ -2017,49 +1998,10 @@ var useSlider = function(param) {
2017
1998
  var fixedNewValue = parseFloat(newValue.toFixed(2));
2018
1999
  if ((normalisedValueRef === null || normalisedValueRef === void 0 ? void 0 : normalisedValueRef.current) !== fixedNewValue) {
2019
2000
  !isLocalhost && sliderState.setNormalisedValue(clamp(fixedNewValue));
2001
+ rowId && changeHandler(newValue, rowId);
2020
2002
  normalisedValueRef.current = fixedNewValue;
2021
2003
  }
2022
2004
  };
2023
- var updateValue = function(changeVal) {
2024
- var getNormalisedInterval = function() {
2025
- if (properties === null || properties === void 0 ? void 0 : properties.interval) {
2026
- if ((properties === null || properties === void 0 ? void 0 : properties.interval) >= 1) {
2027
- return (properties === null || properties === void 0 ? void 0 : properties.interval) * 0.01;
2028
- } else {
2029
- return properties === null || properties === void 0 ? void 0 : properties.interval;
2030
- }
2031
- } else {
2032
- return 0.01;
2033
- }
2034
- };
2035
- var normalisedInterval = getNormalisedInterval();
2036
- var _normalisedValueRef_current;
2037
- var newValue = ((_normalisedValueRef_current = normalisedValueRef.current) !== null && _normalisedValueRef_current !== void 0 ? _normalisedValueRef_current : 0) + changeVal * // (properties?.interval && properties?.interval.toString().length > 4
2038
- // ? 4
2039
- // : 0.4) *
2040
- normalisedInterval;
2041
- return clamp(newValue);
2042
- };
2043
- var incrementValue = function() {
2044
- var newValue = updateValue(10);
2045
- setNormalisedState(newValue);
2046
- };
2047
- var decrementValue = function() {
2048
- var newValue = updateValue(-10);
2049
- setNormalisedState(newValue);
2050
- };
2051
- var setScaledState = function(newValue) {
2052
- if ((scaledValueRef === null || scaledValueRef === void 0 ? void 0 : scaledValueRef.current) !== newValue) {
2053
- var _sliderState_properties, _sliderState_properties1, _sliderState_properties2;
2054
- !isLocalhost && properties && sliderState.setNormalisedValue(scaledToNormalised({
2055
- scaledValue: clamp(parseFloat(newValue.toFixed(2)), properties === null || properties === void 0 ? void 0 : properties.start, properties === null || properties === void 0 ? void 0 : properties.end),
2056
- start: sliderState === null || sliderState === void 0 ? void 0 : (_sliderState_properties = sliderState.properties) === null || _sliderState_properties === void 0 ? void 0 : _sliderState_properties.start,
2057
- end: sliderState === null || sliderState === void 0 ? void 0 : (_sliderState_properties1 = sliderState.properties) === null || _sliderState_properties1 === void 0 ? void 0 : _sliderState_properties1.end,
2058
- skew: sliderState === null || sliderState === void 0 ? void 0 : (_sliderState_properties2 = sliderState.properties) === null || _sliderState_properties2 === void 0 ? void 0 : _sliderState_properties2.skew
2059
- }));
2060
- scaledValueRef.current = newValue;
2061
- }
2062
- };
2063
2005
  var bindDrag = useGesture({
2064
2006
  onMouseDown: function(param) {
2065
2007
  param.event;
@@ -2076,7 +2018,11 @@ var useSlider = function(param) {
2076
2018
  onDrag: function(param) {
2077
2019
  param.event; var delta = param.delta;
2078
2020
  var deltaVal = delta[1] * -1;
2079
- var newValue = updateValue(deltaVal);
2021
+ var newValue = incrementValue({
2022
+ incomingVal: deltaVal,
2023
+ prevVal: normalisedValueRef.current || 0,
2024
+ interval: properties === null || properties === void 0 ? void 0 : properties.interval
2025
+ });
2080
2026
  setNormalisedState(newValue);
2081
2027
  },
2082
2028
  onMouseUp: function(param) {
@@ -2173,11 +2119,7 @@ var useSlider = function(param) {
2173
2119
  };
2174
2120
  return {
2175
2121
  setNormalisedState: setNormalisedState,
2176
- setScaledState: setScaledState,
2177
2122
  setToDefaultState: setToDefaultState,
2178
- incrementValue: incrementValue,
2179
- decrementValue: decrementValue,
2180
- isActive: isActive,
2181
2123
  scaledToNormalised: scaledToNormalised,
2182
2124
  bindBarSliderDrag: bindBarSliderDrag,
2183
2125
  bindSequenceBarSliderDrag: bindSequenceBarSliderDrag,
@@ -2188,9 +2130,140 @@ var useSlider = function(param) {
2188
2130
  };
2189
2131
  };
2190
2132
 
2191
- var css_248z$6 = ".RotarySlider {\n /* position: relative; */\n /* border-radius: 50%; */\n display: flex;\n flex-direction: column;\n justify-content: center;\n aspect-ratio: 1 / 1;\n border: 1px solid transparent;\n}\n\n.RotarySlider-Inner {\n height: 100%;\n width: 100%;\n right: 0;\n top: 0;\n bottom: 0;\n left: 0;\n background-color: var(--bg-popover);\n border-radius: 50%;\n}\n\n.RotarySlider-Indicator {\n position: absolute;\n top: 0;\n right: 0;\n left: 50%;\n width: var(--spacing-xs);\n height: 50%;\n transform: translate(-50%, 0) rotate(0) skewX(0) skewY(0) scaleX(1) scaleY(1);\n}\n\n.RotarySlider-center-marker {\n width: 0;\n height: 0;\n border-style: solid;\n border-width: 0 5px 8px 5px;\n transform: rotate(180deg);\n padding-bottom: var(--spacing-sm);\n}\n\n.ProgressCircle-wrapper {\n position: relative;\n}\n.ProgressCircle {\n fill: none;\n pointer-events: none;\n}\n\n.ProgressCircle-value {\n text-align: center;\n margin-top: -3px;\n height: 0.8rem;\n line-height: 0.8rem;\n}\n\n.ProgressCircle-bg {\n stroke-width: 3px;\n transform-origin: center;\n transform: rotate(135deg);\n stroke-linecap: round;\n font-size: var(--text-sm);\n pointer-events: none;\n}\n.ProgressCircle-fg {\n stroke-width: 3px;\n /* stroke-dasharray: 75; */\n /* stroke-dashoffset: calc(880 - (660 * 0) / 100); */\n transform-origin: center;\n stroke-linecap: round;\n pointer-events: none;\n}\n\n.corner-border {\n --b: 1px; /* thickness of the border */\n --c: var(--color-gray-500); /* color of the border */\n --w: 5px; /* width of border */\n\n border: var(--b) solid #0000; /* space for the border */\n --_g: #0000 90deg, var(--c) 0;\n --_p: var(--w) var(--w) border-box no-repeat;\n background:\n conic-gradient(from 90deg at top var(--b) left var(--b), var(--_g)) 0 0 /\n var(--_p),\n conic-gradient(from 180deg at top var(--b) right var(--b), var(--_g)) 100% 0 /\n var(--_p),\n conic-gradient(from 0deg at bottom var(--b) left var(--b), var(--_g)) 0 100% /\n var(--_p),\n conic-gradient(from -90deg at bottom var(--b) right var(--b), var(--_g))\n 100% 100% / var(--_p);\n}\n";
2133
+ var css_248z$7 = ".RotarySlider {\n /* position: relative; */\n /* border-radius: 50%; */\n display: flex;\n flex-direction: column;\n justify-content: center;\n aspect-ratio: 1 / 1;\n border: 1px solid transparent;\n}\n\n.RotarySlider-Inner {\n height: 100%;\n width: 100%;\n right: 0;\n top: 0;\n bottom: 0;\n left: 0;\n background-color: var(--bg-popover);\n border-radius: 50%;\n}\n\n.RotarySlider-Indicator {\n position: absolute;\n top: 0;\n right: 0;\n left: 50%;\n width: var(--spacing-xs);\n height: 50%;\n transform: translate(-50%, 0) rotate(0) skewX(0) skewY(0) scaleX(1) scaleY(1);\n}\n\n.RotarySlider-center-marker {\n width: 0;\n height: 0;\n border-style: solid;\n border-width: 0 5px 8px 5px;\n transform: rotate(180deg);\n padding-bottom: var(--spacing-sm);\n}\n\n.ProgressCircle-wrapper {\n position: relative;\n}\n.ProgressCircle {\n fill: none;\n pointer-events: none;\n}\n\n.ProgressCircle-value {\n text-align: center;\n margin-top: -3px;\n height: 0.8rem;\n line-height: 0.8rem;\n}\n\n.ProgressCircle-bg {\n stroke-width: 3px;\n transform-origin: center;\n transform: rotate(135deg);\n stroke-linecap: round;\n font-size: var(--text-sm);\n pointer-events: none;\n}\n.ProgressCircle-fg {\n stroke-width: 3px;\n /* stroke-dasharray: 75; */\n /* stroke-dashoffset: calc(880 - (660 * 0) / 100); */\n transform-origin: center;\n stroke-linecap: round;\n pointer-events: none;\n}\n\n.corner-border {\n --b: 1px; /* thickness of the border */\n --c: var(--color-gray-500); /* color of the border */\n --w: 5px; /* width of border */\n\n border: var(--b) solid #0000; /* space for the border */\n --_g: #0000 90deg, var(--c) 0;\n --_p: var(--w) var(--w) border-box no-repeat;\n background:\n conic-gradient(from 90deg at top var(--b) left var(--b), var(--_g)) 0 0 /\n var(--_p),\n conic-gradient(from 180deg at top var(--b) right var(--b), var(--_g)) 100% 0 /\n var(--_p),\n conic-gradient(from 0deg at bottom var(--b) left var(--b), var(--_g)) 0 100% /\n var(--_p),\n conic-gradient(from -90deg at bottom var(--b) right var(--b), var(--_g))\n 100% 100% / var(--_p);\n}\n";
2134
+ styleInject(css_248z$7);
2135
+
2136
+ var css_248z$6 = "";
2192
2137
  styleInject(css_248z$6);
2193
2138
 
2139
+ function _array_like_to_array$d(arr, len) {
2140
+ if (len == null || len > arr.length) len = arr.length;
2141
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
2142
+ return arr2;
2143
+ }
2144
+ function _array_with_holes$d(arr) {
2145
+ if (Array.isArray(arr)) return arr;
2146
+ }
2147
+ function _iterable_to_array_limit$d(arr, i) {
2148
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
2149
+ if (_i == null) return;
2150
+ var _arr = [];
2151
+ var _n = true;
2152
+ var _d = false;
2153
+ var _s, _e;
2154
+ try {
2155
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
2156
+ _arr.push(_s.value);
2157
+ if (i && _arr.length === i) break;
2158
+ }
2159
+ } catch (err) {
2160
+ _d = true;
2161
+ _e = err;
2162
+ } finally{
2163
+ try {
2164
+ if (!_n && _i["return"] != null) _i["return"]();
2165
+ } finally{
2166
+ if (_d) throw _e;
2167
+ }
2168
+ }
2169
+ return _arr;
2170
+ }
2171
+ function _non_iterable_rest$d() {
2172
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2173
+ }
2174
+ function _sliced_to_array$d(arr, i) {
2175
+ return _array_with_holes$d(arr) || _iterable_to_array_limit$d(arr, i) || _unsupported_iterable_to_array$d(arr, i) || _non_iterable_rest$d();
2176
+ }
2177
+ function _unsupported_iterable_to_array$d(o, minLen) {
2178
+ if (!o) return;
2179
+ if (typeof o === "string") return _array_like_to_array$d(o, minLen);
2180
+ var n = Object.prototype.toString.call(o).slice(8, -1);
2181
+ if (n === "Object" && o.constructor) n = o.constructor.name;
2182
+ if (n === "Map" || n === "Set") return Array.from(n);
2183
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$d(o, minLen);
2184
+ }
2185
+ function ControlGroup(param) {
2186
+ var id = param.id, isDisabled = param.isDisabled, className = param.className, onChangeActiveState = param.onChangeActiveState, children = param.children;
2187
+ // EXAMPLE CONTROL GROUP STRUCTURE
2188
+ // <ControlGroup id={id-control-group} is-active>
2189
+ // <Slider id={id}></Slider>
2190
+ // <Input id={id-input}></Input>
2191
+ // </ControlGroup>
2192
+ var groupId = "".concat(id, "-control-group");
2193
+ var _useState = _sliced_to_array$d(useState(false), 2), isActive = _useState[0], setIsActive = _useState[1];
2194
+ var sliderState = Juce.getSliderState(id);
2195
+ var clickListener = function(event) {
2196
+ if (!isDisabled) {
2197
+ var _event_target_closest;
2198
+ document.getElementById("".concat(id, "-input")).disabled = false;
2199
+ if (((_event_target_closest = event.target.closest('.controlGroup')) === null || _event_target_closest === void 0 ? void 0 : _event_target_closest.id) === groupId) {
2200
+ var _document_getElementById, _document_getElementById1;
2201
+ setIsActive(true);
2202
+ onChangeActiveState && onChangeActiveState(true);
2203
+ (_document_getElementById = document.getElementById("".concat(id, "-input"))) === null || _document_getElementById === void 0 ? void 0 : _document_getElementById.focus();
2204
+ (_document_getElementById1 = document.getElementById("".concat(id, "-input"))) === null || _document_getElementById1 === void 0 ? void 0 : _document_getElementById1.select();
2205
+ // event.stopPropagation();
2206
+ } else {
2207
+ var _document_getElementById2;
2208
+ setIsActive(false);
2209
+ onChangeActiveState && onChangeActiveState(false);
2210
+ (_document_getElementById2 = document.getElementById("".concat(id, "-input"))) === null || _document_getElementById2 === void 0 ? void 0 : _document_getElementById2.blur();
2211
+ // event.stopPropagation();
2212
+ }
2213
+ } else {
2214
+ document.getElementById("".concat(id, "-input")).disabled = true;
2215
+ }
2216
+ };
2217
+ var increment = function() {
2218
+ var _sliderState_properties;
2219
+ var normalisedVal = sliderState === null || sliderState === void 0 ? void 0 : sliderState.getNormalisedValue();
2220
+ var newValue = incrementValue({
2221
+ incomingVal: 10,
2222
+ prevVal: normalisedVal,
2223
+ interval: sliderState === null || sliderState === void 0 ? void 0 : (_sliderState_properties = sliderState.properties) === null || _sliderState_properties === void 0 ? void 0 : _sliderState_properties.interval
2224
+ });
2225
+ sliderState.setNormalisedValue(newValue);
2226
+ };
2227
+ var decrement = function() {
2228
+ var _sliderState_properties;
2229
+ var normalisedVal = sliderState === null || sliderState === void 0 ? void 0 : sliderState.getNormalisedValue();
2230
+ var newValue = incrementValue({
2231
+ incomingVal: -10,
2232
+ prevVal: normalisedVal,
2233
+ interval: sliderState === null || sliderState === void 0 ? void 0 : (_sliderState_properties = sliderState.properties) === null || _sliderState_properties === void 0 ? void 0 : _sliderState_properties.interval
2234
+ });
2235
+ sliderState === null || sliderState === void 0 ? void 0 : sliderState.setNormalisedValue(newValue);
2236
+ };
2237
+ function keyDownListener(event) {
2238
+ if (isActive && !isDisabled) {
2239
+ if (event.key === 'ArrowLeft') {
2240
+ event.preventDefault();
2241
+ decrement();
2242
+ }
2243
+ if (event.key === 'ArrowRight') {
2244
+ event.preventDefault();
2245
+ increment();
2246
+ }
2247
+ }
2248
+ }
2249
+ useEffect(function() {
2250
+ document.addEventListener('click', clickListener);
2251
+ document.addEventListener('keydown', keyDownListener);
2252
+ return function() {
2253
+ document.removeEventListener('click', clickListener);
2254
+ document.removeEventListener('keydown', keyDownListener);
2255
+ };
2256
+ }, [
2257
+ window,
2258
+ isActive,
2259
+ isDisabled
2260
+ ]);
2261
+ return /*#__PURE__*/ React__default.createElement(Box, {
2262
+ id: groupId,
2263
+ className: "controlGroup ".concat(isActive ? 'isActive' : '', " ").concat(isDisabled ? 'isDisabled' : '', " ").concat(className)
2264
+ }, children);
2265
+ }
2266
+
2194
2267
  function _define_property$e(obj, key, value) {
2195
2268
  if (key in obj) {
2196
2269
  Object.defineProperty(obj, key, {
@@ -2309,7 +2382,9 @@ function RotarySlider(param) {
2309
2382
  }), bindDrag = _useSlider.bindDrag, normalisedValue = _useSlider.normalisedValue, scaledValue = _useSlider.scaledValue, // onMouseEnter,
2310
2383
  setToDefaultState = _useSlider.setToDefaultState, setNormalisedState = _useSlider.setNormalisedState, // isActive,
2311
2384
  properties = _useSlider.properties;
2312
- return /*#__PURE__*/ React__default.createElement(Box, {
2385
+ return /*#__PURE__*/ React__default.createElement(ControlGroup, {
2386
+ id: id
2387
+ }, /*#__PURE__*/ React__default.createElement(Box, {
2313
2388
  className: "RotarySlider-wrapper",
2314
2389
  flexDirection: Box.flexDirection.column,
2315
2390
  gap: Box.gap.none,
@@ -2370,7 +2445,7 @@ function RotarySlider(param) {
2370
2445
  ],
2371
2446
  fontSize: Label.fontSize.xSmall,
2372
2447
  value: label
2373
- }));
2448
+ })));
2374
2449
  }
2375
2450
  RotarySlider.sliderPolarity = Polarity;
2376
2451
 
@@ -2546,15 +2621,15 @@ Heading.fontSize = FontSizes;
2546
2621
  Heading.tag = HeadingTags;
2547
2622
  Heading.padding = Spacing;
2548
2623
 
2549
- function _array_like_to_array$b(arr, len) {
2624
+ function _array_like_to_array$c(arr, len) {
2550
2625
  if (len == null || len > arr.length) len = arr.length;
2551
2626
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
2552
2627
  return arr2;
2553
2628
  }
2554
- function _array_with_holes$b(arr) {
2629
+ function _array_with_holes$c(arr) {
2555
2630
  if (Array.isArray(arr)) return arr;
2556
2631
  }
2557
- function _iterable_to_array_limit$b(arr, i) {
2632
+ function _iterable_to_array_limit$c(arr, i) {
2558
2633
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
2559
2634
  if (_i == null) return;
2560
2635
  var _arr = [];
@@ -2578,26 +2653,26 @@ function _iterable_to_array_limit$b(arr, i) {
2578
2653
  }
2579
2654
  return _arr;
2580
2655
  }
2581
- function _non_iterable_rest$b() {
2656
+ function _non_iterable_rest$c() {
2582
2657
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2583
2658
  }
2584
- function _sliced_to_array$b(arr, i) {
2585
- return _array_with_holes$b(arr) || _iterable_to_array_limit$b(arr, i) || _unsupported_iterable_to_array$b(arr, i) || _non_iterable_rest$b();
2659
+ function _sliced_to_array$c(arr, i) {
2660
+ return _array_with_holes$c(arr) || _iterable_to_array_limit$c(arr, i) || _unsupported_iterable_to_array$c(arr, i) || _non_iterable_rest$c();
2586
2661
  }
2587
- function _unsupported_iterable_to_array$b(o, minLen) {
2662
+ function _unsupported_iterable_to_array$c(o, minLen) {
2588
2663
  if (!o) return;
2589
- if (typeof o === "string") return _array_like_to_array$b(o, minLen);
2664
+ if (typeof o === "string") return _array_like_to_array$c(o, minLen);
2590
2665
  var n = Object.prototype.toString.call(o).slice(8, -1);
2591
2666
  if (n === "Object" && o.constructor) n = o.constructor.name;
2592
2667
  if (n === "Map" || n === "Set") return Array.from(n);
2593
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$b(o, minLen);
2668
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$c(o, minLen);
2594
2669
  }
2595
2670
  // 20.0f, 15000.0f, 0.1f, 0.7f),800.0f
2596
2671
  // ValueType rangeStart, ValueType rangeEnd, ValueType intervalValue, ValueType skewFactor, bool useSymmetricSkew=false)
2597
2672
  var useIndicator = function(param) {
2598
2673
  var id = param.id;
2599
2674
  var isLocalhost = window.location.hostname === 'localhost';
2600
- var _useState = _sliced_to_array$b(useState(0), 2), isActive = _useState[0], setIsActive = _useState[1];
2675
+ var _useState = _sliced_to_array$c(useState(0), 2), isActive = _useState[0], setIsActive = _useState[1];
2601
2676
  // Set the initial state
2602
2677
  useEffect(function() {
2603
2678
  if (!isLocalhost) {
@@ -3180,12 +3255,12 @@ function LinePlot(param) {
3180
3255
  var css_248z$4 = ".Oscilloscope {\n background: #0EAC8B;\n box-shadow: inset 0 0 20px #086350;\n height: 200px;\n };";
3181
3256
  styleInject(css_248z$4);
3182
3257
 
3183
- function _array_like_to_array$a(arr, len) {
3258
+ function _array_like_to_array$b(arr, len) {
3184
3259
  if (len == null || len > arr.length) len = arr.length;
3185
3260
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3186
3261
  return arr2;
3187
3262
  }
3188
- function _array_with_holes$a(arr) {
3263
+ function _array_with_holes$b(arr) {
3189
3264
  if (Array.isArray(arr)) return arr;
3190
3265
  }
3191
3266
  function _define_property$7(obj, key, value) {
@@ -3201,7 +3276,7 @@ function _define_property$7(obj, key, value) {
3201
3276
  }
3202
3277
  return obj;
3203
3278
  }
3204
- function _iterable_to_array_limit$a(arr, i) {
3279
+ function _iterable_to_array_limit$b(arr, i) {
3205
3280
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
3206
3281
  if (_i == null) return;
3207
3282
  var _arr = [];
@@ -3225,7 +3300,7 @@ function _iterable_to_array_limit$a(arr, i) {
3225
3300
  }
3226
3301
  return _arr;
3227
3302
  }
3228
- function _non_iterable_rest$a() {
3303
+ function _non_iterable_rest$b() {
3229
3304
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3230
3305
  }
3231
3306
  function _object_spread$7(target) {
@@ -3243,20 +3318,20 @@ function _object_spread$7(target) {
3243
3318
  }
3244
3319
  return target;
3245
3320
  }
3246
- function _sliced_to_array$a(arr, i) {
3247
- return _array_with_holes$a(arr) || _iterable_to_array_limit$a(arr, i) || _unsupported_iterable_to_array$a(arr, i) || _non_iterable_rest$a();
3321
+ function _sliced_to_array$b(arr, i) {
3322
+ return _array_with_holes$b(arr) || _iterable_to_array_limit$b(arr, i) || _unsupported_iterable_to_array$b(arr, i) || _non_iterable_rest$b();
3248
3323
  }
3249
- function _unsupported_iterable_to_array$a(o, minLen) {
3324
+ function _unsupported_iterable_to_array$b(o, minLen) {
3250
3325
  if (!o) return;
3251
- if (typeof o === "string") return _array_like_to_array$a(o, minLen);
3326
+ if (typeof o === "string") return _array_like_to_array$b(o, minLen);
3252
3327
  var n = Object.prototype.toString.call(o).slice(8, -1);
3253
3328
  if (n === "Object" && o.constructor) n = o.constructor.name;
3254
3329
  if (n === "Map" || n === "Set") return Array.from(n);
3255
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$a(o, minLen);
3330
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$b(o, minLen);
3256
3331
  }
3257
3332
  function Oscilloscope(param) {
3258
3333
  var width = param.width, height = param.height, className = param.className, style = param.style, id = param.id;
3259
- var _useState = _sliced_to_array$a(useState([]), 2), viewData = _useState[0], setViewData = _useState[1];
3334
+ var _useState = _sliced_to_array$b(useState([]), 2), viewData = _useState[0], setViewData = _useState[1];
3260
3335
  var cycleLength = useRef(0);
3261
3336
  useEffect(function() {
3262
3337
  //@ts-expect-error
@@ -3300,12 +3375,12 @@ styleInject(css_248z$3);
3300
3375
  var css_248z$2 = ".PresetManagerContainer {\n width: 100%;\n height: 100%;\n background-color: var(--bg-page);\n color: var(--color-text);\n}\n\n.PresetManagerButton {\n width: 100%;\n height: 100%;\n max-width: 300px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n position: relative;\n cursor: pointer;\n font-family: var(--font-leagueSpartan);\n}\n.PresetManagerButtonLabel {\n cursor: pointer;\n text-align: center;\n font-family: var(--font-leagueSpartan);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 225px;\n display: inline-block;\n vertical-align: middle;\n height: 1rem;\n line-height: 1.25;\n /* position: relative; */\n &:hover,\n &:active {\n background: var(--color-gray-900);\n }\n /* &.isDirty {\n &::after {\n content: '*';\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n }\n } */\n}\n\n.PresetManagerButtonLabelContainer.isDirty::after {\n content: '*';\n position: absolute;\n height: 1rem;\n width: 1rem;\n right: -0.75rem;\n top: 0;\n}\n\n.PresetManagerButtonLabelOuterContainer {\n position: relative;\n width: auto;\n}\n\n[data-headlessui-state='open active'] .PresetManagerButtonLabel {\n background: var(--color-gray-900);\n}\n.PresetManagerPanel {\n position: absolute;\n font-family: var(--font-leagueSpartan);\n right: 0px;\n left: 0px;\n width: 100%;\n max-width: 400px !important;\n color: var(--color-text);\n background: var(--bg-popover);\n}\n\n.PresetManagerPanel:focus,\n.PresetManagerPanel:focus-visible {\n outline: none;\n}\n\n/* .PresetManagerCategoryItem {\n font-family: var(--font-leagueSpartan);\n cursor: pointer;\n background: var(--color-gray-800);\n text-transform: uppercase;\n &:hover,\n &.isSelected {\n background: var(--bg-selected);\n }\n} */\n\n.PresetManagerListItem {\n cursor: pointer;\n background: var(--color-gray-800);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n width: 100%;\n}\n\n.PresetManagerListItem:hover,\n.PresetManagerListItem.isSelected {\n background: var(--bg-selected);\n}\n\n.PresetManagerListItemText {\n display: inline-block;\n vertical-align: middle;\n height: 1.5rem;\n line-height: 1.75;\n}\n";
3301
3376
  styleInject(css_248z$2);
3302
3377
 
3303
- function _array_like_to_array$9(arr, len) {
3378
+ function _array_like_to_array$a(arr, len) {
3304
3379
  if (len == null || len > arr.length) len = arr.length;
3305
3380
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3306
3381
  return arr2;
3307
3382
  }
3308
- function _array_with_holes$9(arr) {
3383
+ function _array_with_holes$a(arr) {
3309
3384
  if (Array.isArray(arr)) return arr;
3310
3385
  }
3311
3386
  function asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, key, arg) {
@@ -3337,7 +3412,7 @@ function _async_to_generator$3(fn) {
3337
3412
  });
3338
3413
  };
3339
3414
  }
3340
- function _iterable_to_array_limit$9(arr, i) {
3415
+ function _iterable_to_array_limit$a(arr, i) {
3341
3416
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
3342
3417
  if (_i == null) return;
3343
3418
  var _arr = [];
@@ -3361,23 +3436,23 @@ function _iterable_to_array_limit$9(arr, i) {
3361
3436
  }
3362
3437
  return _arr;
3363
3438
  }
3364
- function _non_iterable_rest$9() {
3439
+ function _non_iterable_rest$a() {
3365
3440
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3366
3441
  }
3367
3442
  function _object_destructuring_empty(o) {
3368
3443
  if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o);
3369
3444
  return o;
3370
3445
  }
3371
- function _sliced_to_array$9(arr, i) {
3372
- return _array_with_holes$9(arr) || _iterable_to_array_limit$9(arr, i) || _unsupported_iterable_to_array$9(arr, i) || _non_iterable_rest$9();
3446
+ function _sliced_to_array$a(arr, i) {
3447
+ return _array_with_holes$a(arr) || _iterable_to_array_limit$a(arr, i) || _unsupported_iterable_to_array$a(arr, i) || _non_iterable_rest$a();
3373
3448
  }
3374
- function _unsupported_iterable_to_array$9(o, minLen) {
3449
+ function _unsupported_iterable_to_array$a(o, minLen) {
3375
3450
  if (!o) return;
3376
- if (typeof o === "string") return _array_like_to_array$9(o, minLen);
3451
+ if (typeof o === "string") return _array_like_to_array$a(o, minLen);
3377
3452
  var n = Object.prototype.toString.call(o).slice(8, -1);
3378
3453
  if (n === "Object" && o.constructor) n = o.constructor.name;
3379
3454
  if (n === "Map" || n === "Set") return Array.from(n);
3380
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$9(o, minLen);
3455
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$a(o, minLen);
3381
3456
  }
3382
3457
  function _ts_generator$3(thisArg, body) {
3383
3458
  var f, y, t, _ = {
@@ -3472,16 +3547,16 @@ function _ts_generator$3(thisArg, body) {
3472
3547
  }
3473
3548
  function PresetManager(param) {
3474
3549
  _object_destructuring_empty(param);
3475
- var _useState = _sliced_to_array$9(useState([]), 2), presetList = _useState[0], setPresetList = _useState[1];
3476
- var _useState1 = _sliced_to_array$9(useState(false), 2); _useState1[0]; var setIsSaving = _useState1[1];
3550
+ var _useState = _sliced_to_array$a(useState([]), 2), presetList = _useState[0], setPresetList = _useState[1];
3551
+ var _useState1 = _sliced_to_array$a(useState(false), 2); _useState1[0]; var setIsSaving = _useState1[1];
3477
3552
  var savePresetFunc = Juce.getNativeFunction('savePreset');
3478
3553
  var loadPresetFunc = Juce.getNativeFunction('loadPreset');
3479
3554
  var getAllPresetsFunc = Juce.getNativeFunction('getAllPresets');
3480
3555
  var getCurrentPresetFunc = Juce.getNativeFunction('getCurrentPreset');
3481
3556
  var isDirtyFunc = Juce.getNativeFunction('canUndo');
3482
- var _useState2 = _sliced_to_array$9(useState(), 2), selectedPreset = _useState2[0], setSelectedPreset = _useState2[1];
3557
+ var _useState2 = _sliced_to_array$a(useState(), 2), selectedPreset = _useState2[0], setSelectedPreset = _useState2[1];
3483
3558
  var isLocalhost = window.location.hostname === 'localhost';
3484
- var _useState3 = _sliced_to_array$9(useState(false), 2), isDirty = _useState3[0], setIsDirty = _useState3[1];
3559
+ var _useState3 = _sliced_to_array$a(useState(false), 2), isDirty = _useState3[0], setIsDirty = _useState3[1];
3485
3560
  useEffect(function() {
3486
3561
  if (!isLocalhost) {
3487
3562
  var isDirtyListenerId = //@ts-expect-error
@@ -3757,12 +3832,12 @@ function PresetManager(param) {
3757
3832
  }))))));
3758
3833
  }
3759
3834
 
3760
- function _array_like_to_array$8(arr, len) {
3835
+ function _array_like_to_array$9(arr, len) {
3761
3836
  if (len == null || len > arr.length) len = arr.length;
3762
3837
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3763
3838
  return arr2;
3764
3839
  }
3765
- function _array_with_holes$8(arr) {
3840
+ function _array_with_holes$9(arr) {
3766
3841
  if (Array.isArray(arr)) return arr;
3767
3842
  }
3768
3843
  function asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, key, arg) {
@@ -3807,7 +3882,7 @@ function _define_property$6(obj, key, value) {
3807
3882
  }
3808
3883
  return obj;
3809
3884
  }
3810
- function _iterable_to_array_limit$8(arr, i) {
3885
+ function _iterable_to_array_limit$9(arr, i) {
3811
3886
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
3812
3887
  if (_i == null) return;
3813
3888
  var _arr = [];
@@ -3831,7 +3906,7 @@ function _iterable_to_array_limit$8(arr, i) {
3831
3906
  }
3832
3907
  return _arr;
3833
3908
  }
3834
- function _non_iterable_rest$8() {
3909
+ function _non_iterable_rest$9() {
3835
3910
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3836
3911
  }
3837
3912
  function _object_spread$6(target) {
@@ -3849,16 +3924,16 @@ function _object_spread$6(target) {
3849
3924
  }
3850
3925
  return target;
3851
3926
  }
3852
- function _sliced_to_array$8(arr, i) {
3853
- return _array_with_holes$8(arr) || _iterable_to_array_limit$8(arr, i) || _unsupported_iterable_to_array$8(arr, i) || _non_iterable_rest$8();
3927
+ function _sliced_to_array$9(arr, i) {
3928
+ return _array_with_holes$9(arr) || _iterable_to_array_limit$9(arr, i) || _unsupported_iterable_to_array$9(arr, i) || _non_iterable_rest$9();
3854
3929
  }
3855
- function _unsupported_iterable_to_array$8(o, minLen) {
3930
+ function _unsupported_iterable_to_array$9(o, minLen) {
3856
3931
  if (!o) return;
3857
- if (typeof o === "string") return _array_like_to_array$8(o, minLen);
3932
+ if (typeof o === "string") return _array_like_to_array$9(o, minLen);
3858
3933
  var n = Object.prototype.toString.call(o).slice(8, -1);
3859
3934
  if (n === "Object" && o.constructor) n = o.constructor.name;
3860
3935
  if (n === "Map" || n === "Set") return Array.from(n);
3861
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
3936
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$9(o, minLen);
3862
3937
  }
3863
3938
  function _ts_generator$2(thisArg, body) {
3864
3939
  var f, y, t, _ = {
@@ -4041,8 +4116,8 @@ function ModuleHeader(param) {
4041
4116
  }, [
4042
4117
  window
4043
4118
  ]);
4044
- var _useState = _sliced_to_array$8(useState(false), 2), canUndo = _useState[0], setCanUndo = _useState[1];
4045
- var _useState1 = _sliced_to_array$8(useState(false), 2), canRedo = _useState1[0], setCanRedo = _useState1[1];
4119
+ var _useState = _sliced_to_array$9(useState(false), 2), canUndo = _useState[0], setCanUndo = _useState[1];
4120
+ var _useState1 = _sliced_to_array$9(useState(false), 2), canRedo = _useState1[0], setCanRedo = _useState1[1];
4046
4121
  var handleUndo = function() {
4047
4122
  undo();
4048
4123
  };
@@ -4280,7 +4355,7 @@ function ModuleHeader(param) {
4280
4355
  }, "Advanced")))));
4281
4356
  }
4282
4357
 
4283
- var css_248z$1 = ".ModMatrix {\n color: var(--color-text);\n font-size: var(--text-ms);\n}\n\n.ModMatrixCell {\n background: #252429;\n position: relative;\n}\n\n.ModMatrixCell.isDisabled {\n /* background: var(--bg-muted);\n color: var(--color-gray-400); */\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.ModMatrixToggleCell {\n cursor: pointer;\n}\n\n.ModMatrixComboboxCell {\n background: #252429;\n cursor: pointer;\n}\n\n.ModMatrixComboboxItems {\n position: absolute;\n z-index: 50;\n bottom: -151px;\n left: 0px;\n height: 150px;\n width: 100%;\n background: var(--color-gray-500);\n color: var(--color-text);\n font-family: var(--font-leagueSpartan);\n overflow-y: auto;\n overflow-x: hidden;\n cursor: pointer;\n}\n\n.ModMatrixComboboxItem:hover,\n.ModMatrixComboboxItem:active,\n.ModMatrixComboboxItem[data-selected] {\n background: var(--color-gray-600);\n}\n\n.ModMatrixComboboxItem {\n padding: var(--spacing-md) var(--spacing-lg);\n width: 100%;\n}\n.ModMatrixComboboxButton {\n cursor: pointer;\n}\n";
4358
+ var css_248z$1 = ".ModMatrix {\n color: var(--color-text);\n font-size: var(--text-ms);\n}\n\n.ModMatrixCell {\n background: #252429;\n position: relative;\n}\n\n.ModMatrixCell.isDisabled {\n /* background: var(--bg-muted);\n color: var(--color-gray-400); */\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n/* .isActive .ModMatrixCell {\n background: var(--color-gray-600);\n} */\n\n.ModMatrixToggleCell {\n cursor: pointer;\n}\n\n.ModMatrixComboboxCell {\n background: #252429;\n cursor: pointer;\n}\n\n.ModMatrixComboboxItems {\n position: absolute;\n z-index: 50;\n bottom: -151px;\n left: 0px;\n height: 150px;\n width: 100%;\n background: var(--color-gray-500);\n color: var(--color-text);\n font-family: var(--font-leagueSpartan);\n overflow-y: auto;\n overflow-x: hidden;\n cursor: pointer;\n}\n\n.ModMatrixComboboxItem:hover,\n.ModMatrixComboboxItem:active,\n.ModMatrixComboboxItem[data-selected] {\n background: var(--color-gray-600);\n}\n\n.ModMatrixComboboxItem {\n padding: var(--spacing-md) var(--spacing-lg);\n width: 100%;\n}\n.ModMatrixComboboxButton {\n cursor: pointer;\n}\n\n.ModMatrixInput {\n text-align: center;\n height: 0.8rem;\n}\n";
4284
4359
  styleInject(css_248z$1);
4285
4360
 
4286
4361
  var targetColors = [
@@ -4296,15 +4371,15 @@ var targetColors = [
4296
4371
  var ComboboxCellWidth = '217px';
4297
4372
  var DeleteButtonCellWidth = '50px';
4298
4373
 
4299
- function _array_like_to_array$7(arr, len) {
4374
+ function _array_like_to_array$8(arr, len) {
4300
4375
  if (len == null || len > arr.length) len = arr.length;
4301
4376
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
4302
4377
  return arr2;
4303
4378
  }
4304
- function _array_with_holes$7(arr) {
4379
+ function _array_with_holes$8(arr) {
4305
4380
  if (Array.isArray(arr)) return arr;
4306
4381
  }
4307
- function _iterable_to_array_limit$7(arr, i) {
4382
+ function _iterable_to_array_limit$8(arr, i) {
4308
4383
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
4309
4384
  if (_i == null) return;
4310
4385
  var _arr = [];
@@ -4328,26 +4403,26 @@ function _iterable_to_array_limit$7(arr, i) {
4328
4403
  }
4329
4404
  return _arr;
4330
4405
  }
4331
- function _non_iterable_rest$7() {
4406
+ function _non_iterable_rest$8() {
4332
4407
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
4333
4408
  }
4334
- function _sliced_to_array$7(arr, i) {
4335
- return _array_with_holes$7(arr) || _iterable_to_array_limit$7(arr, i) || _unsupported_iterable_to_array$7(arr, i) || _non_iterable_rest$7();
4409
+ function _sliced_to_array$8(arr, i) {
4410
+ return _array_with_holes$8(arr) || _iterable_to_array_limit$8(arr, i) || _unsupported_iterable_to_array$8(arr, i) || _non_iterable_rest$8();
4336
4411
  }
4337
- function _unsupported_iterable_to_array$7(o, minLen) {
4412
+ function _unsupported_iterable_to_array$8(o, minLen) {
4338
4413
  if (!o) return;
4339
- if (typeof o === "string") return _array_like_to_array$7(o, minLen);
4414
+ if (typeof o === "string") return _array_like_to_array$8(o, minLen);
4340
4415
  var n = Object.prototype.toString.call(o).slice(8, -1);
4341
4416
  if (n === "Object" && o.constructor) n = o.constructor.name;
4342
4417
  if (n === "Map" || n === "Set") return Array.from(n);
4343
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
4418
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
4344
4419
  }
4345
4420
  var useCombobox = function(param) {
4346
4421
  var id = param.id, filter = param.filter;
4347
4422
  var _Object_values;
4348
4423
  var comboBoxState = Juce.getComboBoxState(id);
4349
- var _useState = _sliced_to_array$7(useState(0), 2), value = _useState[0], setValue = _useState[1];
4350
- var _useState1 = _sliced_to_array$7(useState(comboBoxState === null || comboBoxState === void 0 ? void 0 : comboBoxState.properties), 2), properties = _useState1[0], setProperties = _useState1[1];
4424
+ var _useState = _sliced_to_array$8(useState(0), 2), value = _useState[0], setValue = _useState[1];
4425
+ var _useState1 = _sliced_to_array$8(useState(comboBoxState === null || comboBoxState === void 0 ? void 0 : comboBoxState.properties), 2), properties = _useState1[0], setProperties = _useState1[1];
4351
4426
  var prevValue = useRef(null);
4352
4427
  var _useGlobalContext = useGlobalContext(); _useGlobalContext.highlightedItemChanged; var setModSlotRowTargetAsPreview = _useGlobalContext.setModSlotRowTargetAsPreview, _useGlobalContext_globalState = _useGlobalContext.globalState, automatableParamLabels = _useGlobalContext_globalState.automatableParamLabels, modSlotTargets = _useGlobalContext_globalState.modSlotTargets, modSlotPreview = _useGlobalContext_globalState.modSlotPreview;
4353
4428
  //TODO: Filter choices for subsequent rows
@@ -4435,12 +4510,12 @@ var useCombobox = function(param) {
4435
4510
  };
4436
4511
  };
4437
4512
 
4438
- function _array_like_to_array$6(arr, len) {
4513
+ function _array_like_to_array$7(arr, len) {
4439
4514
  if (len == null || len > arr.length) len = arr.length;
4440
4515
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
4441
4516
  return arr2;
4442
4517
  }
4443
- function _array_with_holes$6(arr) {
4518
+ function _array_with_holes$7(arr) {
4444
4519
  if (Array.isArray(arr)) return arr;
4445
4520
  }
4446
4521
  function _define_property$5(obj, key, value) {
@@ -4456,7 +4531,7 @@ function _define_property$5(obj, key, value) {
4456
4531
  }
4457
4532
  return obj;
4458
4533
  }
4459
- function _iterable_to_array_limit$6(arr, i) {
4534
+ function _iterable_to_array_limit$7(arr, i) {
4460
4535
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
4461
4536
  if (_i == null) return;
4462
4537
  var _arr = [];
@@ -4480,7 +4555,7 @@ function _iterable_to_array_limit$6(arr, i) {
4480
4555
  }
4481
4556
  return _arr;
4482
4557
  }
4483
- function _non_iterable_rest$6() {
4558
+ function _non_iterable_rest$7() {
4484
4559
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
4485
4560
  }
4486
4561
  function _object_spread$5(target) {
@@ -4498,20 +4573,20 @@ function _object_spread$5(target) {
4498
4573
  }
4499
4574
  return target;
4500
4575
  }
4501
- function _sliced_to_array$6(arr, i) {
4502
- return _array_with_holes$6(arr) || _iterable_to_array_limit$6(arr, i) || _unsupported_iterable_to_array$6(arr, i) || _non_iterable_rest$6();
4576
+ function _sliced_to_array$7(arr, i) {
4577
+ return _array_with_holes$7(arr) || _iterable_to_array_limit$7(arr, i) || _unsupported_iterable_to_array$7(arr, i) || _non_iterable_rest$7();
4503
4578
  }
4504
- function _unsupported_iterable_to_array$6(o, minLen) {
4579
+ function _unsupported_iterable_to_array$7(o, minLen) {
4505
4580
  if (!o) return;
4506
- if (typeof o === "string") return _array_like_to_array$6(o, minLen);
4581
+ if (typeof o === "string") return _array_like_to_array$7(o, minLen);
4507
4582
  var n = Object.prototype.toString.call(o).slice(8, -1);
4508
4583
  if (n === "Object" && o.constructor) n = o.constructor.name;
4509
4584
  if (n === "Map" || n === "Set") return Array.from(n);
4510
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
4585
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
4511
4586
  }
4512
4587
  function ModMatrixComboboxCell(param) {
4513
4588
  var rowId = param.rowId, key = param.key, color = param.color, style = param.style;
4514
- var _useState = _sliced_to_array$6(useState(''), 2), filterString = _useState[0], setFilterString = _useState[1];
4589
+ var _useState = _sliced_to_array$7(useState(''), 2), filterString = _useState[0], setFilterString = _useState[1];
4515
4590
  var _useGlobalContext = useGlobalContext(), updateModSlotRowTarget = _useGlobalContext.updateModSlotRowTarget, setModSlotRowTargetAsPreview = _useGlobalContext.setModSlotRowTargetAsPreview, clearModSlotPreview = _useGlobalContext.clearModSlotPreview, setNewModSlotPreview = _useGlobalContext.setNewModSlotPreview, _useGlobalContext_globalState = _useGlobalContext.globalState, modSlotPreview = _useGlobalContext_globalState.modSlotPreview, automatableParamLabels = _useGlobalContext_globalState.automatableParamLabels;
4516
4591
  var _useCombobox = useCombobox({
4517
4592
  id: rowId,
@@ -4686,19 +4761,20 @@ function _object_spread$3(target) {
4686
4761
  return target;
4687
4762
  }
4688
4763
  function SingleBarViz(param) {
4689
- var _param_background = param.background, background = _param_background === void 0 ? 'var(--color-brand)' : _param_background, _param_height = param.height, height = _param_height === void 0 ? '6px' : _param_height, _param_polarity = param.polarity, polarity = _param_polarity === void 0 ? Polarity.unipolar : _param_polarity, _param_orientation = param.orientation, orientation = _param_orientation === void 0 ? Orientation.horizontal : _param_orientation, value = param.value, className = param.className, style = param.style;
4764
+ var _param_backgroundColor = param.backgroundColor, backgroundColor = _param_backgroundColor === void 0 ? 'var(--color-gray-600)' : _param_backgroundColor, _param_sliderColor = param.sliderColor, sliderColor = _param_sliderColor === void 0 ? 'var(--color-brand)' : _param_sliderColor, _param_height = param.height, height = _param_height === void 0 ? '6px' : _param_height, _param_polarity = param.polarity, polarity = _param_polarity === void 0 ? Polarity.unipolar : _param_polarity, _param_orientation = param.orientation, orientation = _param_orientation === void 0 ? Orientation.horizontal : _param_orientation, value = param.value, className = param.className, style = param.style;
4690
4765
  return /*#__PURE__*/ React__default.createElement("div", {
4691
4766
  className: className,
4692
4767
  style: {
4693
4768
  width: '100%',
4694
4769
  height: height,
4695
- background: 'var(--color-gray-600)',
4696
- position: 'relative'
4770
+ position: 'relative',
4771
+ background: backgroundColor
4697
4772
  }
4698
4773
  }, /*#__PURE__*/ React__default.createElement("div", {
4774
+ className: "SingleBarViz",
4699
4775
  style: _object_spread$3({
4700
4776
  position: 'absolute',
4701
- background: background
4777
+ background: sliderColor
4702
4778
  }, getBarTransformStyles({
4703
4779
  polarity: polarity,
4704
4780
  orientation: orientation,
@@ -4708,6 +4784,14 @@ function SingleBarViz(param) {
4708
4784
  }
4709
4785
  SingleBarViz.polarity = Polarity;
4710
4786
 
4787
+ function _array_like_to_array$6(arr, len) {
4788
+ if (len == null || len > arr.length) len = arr.length;
4789
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
4790
+ return arr2;
4791
+ }
4792
+ function _array_with_holes$6(arr) {
4793
+ if (Array.isArray(arr)) return arr;
4794
+ }
4711
4795
  function _define_property$2(obj, key, value) {
4712
4796
  if (key in obj) {
4713
4797
  Object.defineProperty(obj, key, {
@@ -4721,6 +4805,33 @@ function _define_property$2(obj, key, value) {
4721
4805
  }
4722
4806
  return obj;
4723
4807
  }
4808
+ function _iterable_to_array_limit$6(arr, i) {
4809
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
4810
+ if (_i == null) return;
4811
+ var _arr = [];
4812
+ var _n = true;
4813
+ var _d = false;
4814
+ var _s, _e;
4815
+ try {
4816
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
4817
+ _arr.push(_s.value);
4818
+ if (i && _arr.length === i) break;
4819
+ }
4820
+ } catch (err) {
4821
+ _d = true;
4822
+ _e = err;
4823
+ } finally{
4824
+ try {
4825
+ if (!_n && _i["return"] != null) _i["return"]();
4826
+ } finally{
4827
+ if (_d) throw _e;
4828
+ }
4829
+ }
4830
+ return _arr;
4831
+ }
4832
+ function _non_iterable_rest$6() {
4833
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
4834
+ }
4724
4835
  function _object_spread$2(target) {
4725
4836
  for(var i = 1; i < arguments.length; i++){
4726
4837
  var source = arguments[i] != null ? arguments[i] : {};
@@ -4755,10 +4866,22 @@ function _object_spread_props(target, source) {
4755
4866
  }
4756
4867
  return target;
4757
4868
  }
4869
+ function _sliced_to_array$6(arr, i) {
4870
+ return _array_with_holes$6(arr) || _iterable_to_array_limit$6(arr, i) || _unsupported_iterable_to_array$6(arr, i) || _non_iterable_rest$6();
4871
+ }
4872
+ function _unsupported_iterable_to_array$6(o, minLen) {
4873
+ if (!o) return;
4874
+ if (typeof o === "string") return _array_like_to_array$6(o, minLen);
4875
+ var n = Object.prototype.toString.call(o).slice(8, -1);
4876
+ if (n === "Object" && o.constructor) n = o.constructor.name;
4877
+ if (n === "Map" || n === "Set") return Array.from(n);
4878
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
4879
+ }
4758
4880
  function ModMatrixCell(param) {
4759
4881
  var modifier = param.modifier, rowId = param.rowId, isDisabled = param.isDisabled, color = param.color, style = param.style;
4760
4882
  var _SingleBarViz_polarity;
4761
4883
  var _useGlobalContext = useGlobalContext(), setDefaultParameter = _useGlobalContext.setDefaultParameter, saveModSlotPreviewRowTargetToBackend = _useGlobalContext.saveModSlotPreviewRowTargetToBackend;
4884
+ var _useState = _sliced_to_array$6(useState(false), 2); _useState[0]; var setIsActive = _useState[1];
4762
4885
  var _useSlider = useSlider({
4763
4886
  id: modifier,
4764
4887
  rowId: rowId,
@@ -4767,8 +4890,15 @@ function ModMatrixCell(param) {
4767
4890
  dragOrientation: Orientation.vertical,
4768
4891
  onChange: saveModSlotPreviewRowTargetToBackend,
4769
4892
  isDisabled: isDisabled
4770
- }), bindBarSliderDrag = _useSlider.bindBarSliderDrag, normalisedValue = _useSlider.normalisedValue, scaledValue = _useSlider.scaledValue;
4771
- return /*#__PURE__*/ React__default.createElement(Box, _object_spread_props(_object_spread$2({
4893
+ }), bindBarSliderDrag = _useSlider.bindBarSliderDrag, normalisedValue = _useSlider.normalisedValue, scaledValue = _useSlider.scaledValue, properties = _useSlider.properties, setNormalisedState = _useSlider.setNormalisedState;
4894
+ return /*#__PURE__*/ React__default.createElement(ControlGroup, {
4895
+ id: modifier,
4896
+ className: "ModMatrixCell-Wrapper",
4897
+ isDisabled: isDisabled,
4898
+ onChangeActiveState: function(isActive) {
4899
+ return setIsActive(isActive);
4900
+ }
4901
+ }, /*#__PURE__*/ React__default.createElement(Box, _object_spread_props(_object_spread$2({
4772
4902
  className: "ModMatrixCell ".concat(isDisabled ? 'isDisabled' : ''),
4773
4903
  justifyContent: Box.justifyContent.flexEnd,
4774
4904
  alignItems: Box.alignItems.flexStart,
@@ -4787,7 +4917,29 @@ function ModMatrixCell(param) {
4787
4917
  style: {
4788
4918
  pointerEvents: 'none'
4789
4919
  }
4790
- }, /*#__PURE__*/ React__default.createElement(Label, null, parseFloat(scaledValue.toFixed(2)) || '0')), /*#__PURE__*/ React__default.createElement(Box, {
4920
+ }, /*#__PURE__*/ React__default.createElement(Input, {
4921
+ className: "ModMatrixInput",
4922
+ value: scaledValue,
4923
+ id: modifier,
4924
+ min: (properties === null || properties === void 0 ? void 0 : properties.start) || 0,
4925
+ max: (properties === null || properties === void 0 ? void 0 : properties.end) || 0,
4926
+ type: Input.type.number,
4927
+ style: {
4928
+ fontWeight: 'bold',
4929
+ width: '100%',
4930
+ // maxWidth: `${width}px`,
4931
+ marginBottom: 'var(--spacing-sm)'
4932
+ },
4933
+ onComplete: function(value) {
4934
+ var normalisedVal = properties && scaledToNormalised({
4935
+ scaledValue: value,
4936
+ start: properties === null || properties === void 0 ? void 0 : properties.start,
4937
+ end: properties === null || properties === void 0 ? void 0 : properties.end,
4938
+ skew: properties === null || properties === void 0 ? void 0 : properties.skew
4939
+ });
4940
+ normalisedVal !== undefined && setNormalisedState(normalisedVal);
4941
+ }
4942
+ })), /*#__PURE__*/ React__default.createElement(Box, {
4791
4943
  style: {
4792
4944
  alignSelf: 'flex-end',
4793
4945
  pointerEvents: 'none'
@@ -4795,7 +4947,10 @@ function ModMatrixCell(param) {
4795
4947
  }, /*#__PURE__*/ React__default.createElement(SingleBarViz, {
4796
4948
  value: (modifier === null || modifier === void 0 ? void 0 : modifier.value) || 0,
4797
4949
  polarity: SingleBarViz === null || SingleBarViz === void 0 ? void 0 : (_SingleBarViz_polarity = SingleBarViz.polarity) === null || _SingleBarViz_polarity === void 0 ? void 0 : _SingleBarViz_polarity.bipolar,
4798
- background: color,
4950
+ // backgroundColor={
4951
+ // isActive ? 'var(--color-gray-500)' : 'var(--color-gray-600)'
4952
+ // }
4953
+ sliderColor: color,
4799
4954
  style: _object_spread$2({
4800
4955
  alignSelf: 'flex-end',
4801
4956
  pointerEvents: 'none'
@@ -4804,7 +4959,7 @@ function ModMatrixCell(param) {
4804
4959
  polarity: Polarity === null || Polarity === void 0 ? void 0 : Polarity.bipolar,
4805
4960
  normalisedValue: normalisedValue
4806
4961
  }))
4807
- })));
4962
+ }))));
4808
4963
  }
4809
4964
 
4810
4965
  function ModMatrixRow(param) {