@antimatter-audio/antimatter-ui 10.1.2 → 10.2.0

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.
Files changed (106) hide show
  1. package/dist/advanced/IconButton/IconButton.d.ts +25 -0
  2. package/dist/advanced/IconButton/IconButton.d.ts.map +1 -0
  3. package/dist/advanced/KeyValueDisplayScreen/KeyValueDisplayScreen.d.ts +12 -0
  4. package/dist/advanced/KeyValueDisplayScreen/KeyValueDisplayScreen.d.ts.map +1 -0
  5. package/dist/advanced/ModMatrix/ModMatrix.d.ts +8 -0
  6. package/dist/advanced/ModMatrix/ModMatrix.d.ts.map +1 -0
  7. package/dist/advanced/ModMatrix/ModMatrixCell.d.ts +10 -0
  8. package/dist/advanced/ModMatrix/ModMatrixCell.d.ts.map +1 -0
  9. package/dist/advanced/ModMatrix/ModMatrixComboboxCell.d.ts +10 -0
  10. package/dist/advanced/ModMatrix/ModMatrixComboboxCell.d.ts.map +1 -0
  11. package/dist/advanced/ModMatrix/ModMatrixRow.d.ts +8 -0
  12. package/dist/advanced/ModMatrix/ModMatrixRow.d.ts.map +1 -0
  13. package/dist/advanced/ModMatrix/constants.d.ts +3 -0
  14. package/dist/advanced/ModMatrix/constants.d.ts.map +1 -0
  15. package/dist/advanced/ModuleFooter/ModuleFooter.d.ts +20 -0
  16. package/dist/advanced/ModuleFooter/ModuleFooter.d.ts.map +1 -0
  17. package/dist/advanced/ModuleHeader/ModuleHeader.d.ts.map +1 -1
  18. package/dist/advanced/PresetManager/PresetManager.d.ts.map +1 -1
  19. package/dist/common/types.d.ts +61 -0
  20. package/dist/common/types.d.ts.map +1 -0
  21. package/dist/common/utils.d.ts +39 -0
  22. package/dist/common/utils.d.ts.map +1 -0
  23. package/dist/context/GlobalContextProvider.d.ts +43 -0
  24. package/dist/context/GlobalContextProvider.d.ts.map +1 -0
  25. package/dist/core/Box/Box.d.ts +52 -0
  26. package/dist/core/Box/Box.d.ts.map +1 -0
  27. package/dist/core/Button/Button.d.ts +26 -0
  28. package/dist/core/Button/Button.d.ts.map +1 -0
  29. package/dist/core/DataViz/SingleBarViz.d.ts +16 -0
  30. package/dist/core/DataViz/SingleBarViz.d.ts.map +1 -0
  31. package/dist/core/Heading/Heading.d.ts +20 -0
  32. package/dist/core/Heading/Heading.d.ts.map +1 -0
  33. package/dist/core/Icon/Icon.d.ts +91 -0
  34. package/dist/core/Icon/Icon.d.ts.map +1 -0
  35. package/dist/core/Indicators/IndicatorLight.d.ts +12 -0
  36. package/dist/core/Indicators/IndicatorLight.d.ts.map +1 -0
  37. package/dist/core/Input/Input.d.ts +26 -0
  38. package/dist/core/Input/Input.d.ts.map +1 -0
  39. package/dist/core/Label/Label.d.ts +18 -0
  40. package/dist/core/Label/Label.d.ts.map +1 -0
  41. package/dist/core/Matrix/Matrix.d.ts +14 -0
  42. package/dist/core/Matrix/Matrix.d.ts.map +1 -0
  43. package/dist/core/Slider/BarSlider.d.ts +31 -0
  44. package/dist/core/Slider/BarSlider.d.ts.map +1 -0
  45. package/dist/core/Slider/RotarySlider.d.ts +29 -0
  46. package/dist/core/Slider/RotarySlider.d.ts.map +1 -0
  47. package/dist/core/Slider/SliderValue.d.ts +14 -0
  48. package/dist/core/Slider/SliderValue.d.ts.map +1 -0
  49. package/dist/core/Slider/types.d.ts +33 -0
  50. package/dist/core/Slider/types.d.ts.map +1 -0
  51. package/dist/core/Slider/utils.d.ts +17 -0
  52. package/dist/core/Slider/utils.d.ts.map +1 -0
  53. package/dist/core/Tabs/Tabs.d.ts +21 -0
  54. package/dist/core/Tabs/Tabs.d.ts.map +1 -0
  55. package/dist/hooks/useCombobox.d.ts +18 -0
  56. package/dist/hooks/useCombobox.d.ts.map +1 -0
  57. package/dist/hooks/useSlider.d.ts +22 -0
  58. package/dist/hooks/useSlider.d.ts.map +1 -0
  59. package/dist/index.js +1751 -436
  60. package/dist/index.js.map +1 -1
  61. package/dist/src/advanced/IconButton/IconButton.d.ts +3 -33
  62. package/dist/src/advanced/IconButton/IconButton.d.ts.map +1 -1
  63. package/dist/src/advanced/KeyValueDisplayScreen/KeyValueDisplayScreen.d.ts.map +1 -1
  64. package/dist/src/advanced/ModMatrix/ModMatrix.d.ts +8 -0
  65. package/dist/src/advanced/ModMatrix/ModMatrix.d.ts.map +1 -0
  66. package/dist/src/advanced/ModMatrix/ModMatrixCell.d.ts +10 -0
  67. package/dist/src/advanced/ModMatrix/ModMatrixCell.d.ts.map +1 -0
  68. package/dist/src/advanced/ModMatrix/ModMatrixComboboxCell.d.ts +10 -0
  69. package/dist/src/advanced/ModMatrix/ModMatrixComboboxCell.d.ts.map +1 -0
  70. package/dist/src/advanced/ModMatrix/ModMatrixRow.d.ts +8 -0
  71. package/dist/src/advanced/ModMatrix/ModMatrixRow.d.ts.map +1 -0
  72. package/dist/src/advanced/ModMatrix/constants.d.ts +3 -0
  73. package/dist/src/advanced/ModMatrix/constants.d.ts.map +1 -0
  74. package/dist/src/advanced/ModuleFooter/ModuleFooter.d.ts +13 -0
  75. package/dist/src/advanced/ModuleFooter/ModuleFooter.d.ts.map +1 -1
  76. package/dist/src/advanced/ModuleHeader/ModuleHeader.d.ts.map +1 -1
  77. package/dist/src/advanced/PresetManager/PresetManager.d.ts.map +1 -1
  78. package/dist/src/common/types.d.ts +8 -0
  79. package/dist/src/common/types.d.ts.map +1 -1
  80. package/dist/src/common/utils.d.ts +24 -1
  81. package/dist/src/common/utils.d.ts.map +1 -1
  82. package/dist/src/context/GlobalContextProvider.d.ts +25 -2
  83. package/dist/src/context/GlobalContextProvider.d.ts.map +1 -1
  84. package/dist/src/core/Box/Box.d.ts +1 -1
  85. package/dist/src/core/Box/Box.d.ts.map +1 -1
  86. package/dist/src/core/DataViz/SingleBarViz.d.ts +16 -0
  87. package/dist/src/core/DataViz/SingleBarViz.d.ts.map +1 -0
  88. package/dist/src/core/Icon/Icon.d.ts +91 -0
  89. package/dist/src/core/Icon/Icon.d.ts.map +1 -0
  90. package/dist/src/core/Slider/BarSlider.d.ts +6 -5
  91. package/dist/src/core/Slider/BarSlider.d.ts.map +1 -1
  92. package/dist/src/core/Slider/RotarySlider.d.ts +4 -4
  93. package/dist/src/core/Slider/RotarySlider.d.ts.map +1 -1
  94. package/dist/src/core/Slider/types.d.ts +0 -8
  95. package/dist/src/core/Slider/types.d.ts.map +1 -1
  96. package/dist/src/core/Slider/utils.d.ts +1 -34
  97. package/dist/src/core/Slider/utils.d.ts.map +1 -1
  98. package/dist/src/core/Tabs/Tabs.d.ts +3 -1
  99. package/dist/src/core/Tabs/Tabs.d.ts.map +1 -1
  100. package/dist/src/hooks/useCombobox.d.ts +6 -3
  101. package/dist/src/hooks/useCombobox.d.ts.map +1 -1
  102. package/dist/src/hooks/useSlider.d.ts +6 -5
  103. package/dist/src/hooks/useSlider.d.ts.map +1 -1
  104. package/dist/src/index.d.ts +2 -3
  105. package/dist/src/index.d.ts.map +1 -1
  106. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,10 +1,9 @@
1
1
  import * as React from 'react';
2
- import React__default, { useState, useEffect, useRef, useReducer, useCallback, createContext, useContext } from 'react';
2
+ import React__default, { useState, useEffect, useRef, useReducer, useCallback, createContext, useContext, useMemo } from 'react';
3
3
  import classnames from 'classnames';
4
- import { TabGroup, TabList, Tab, Listbox, ListboxButton, ListboxOptions, ListboxOption } from '@headlessui/react';
4
+ import { TabGroup, TabList, Tab, Listbox, ListboxButton, ListboxOptions, ListboxOption, Combobox, ComboboxInput, ComboboxButton, ComboboxOptions, ComboboxOption } from '@headlessui/react';
5
5
  import * as Juce from 'juce-framework-frontend';
6
6
  import { useDrag } from '@use-gesture/react';
7
- import { v4 } from 'uuid';
8
7
  import * as d3 from 'd3';
9
8
 
10
9
  function styleInject(css, ref) {
@@ -34,8 +33,8 @@ function styleInject(css, ref) {
34
33
  }
35
34
  }
36
35
 
37
- var css_248z$9 = "@import 'tailwindcss';\n@import 'tailwindcss/base';\n@import 'tailwindcss/utilities';\n\n@theme static {\n --color-brand: #bb68d9;\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-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 border: none;\n outline: none;\n}\n\nbutton:disabled,\ninput:disabled {\n cursor: not-allowed;\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";
38
- styleInject(css_248z$9);
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-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 border: none;\n outline: none;\n}\n\nbutton:disabled,\ninput:disabled {\n cursor: not-allowed;\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);
39
38
 
40
39
  var Spacing = /*#__PURE__*/ function(Spacing) {
41
40
  Spacing["none"] = "none";
@@ -83,19 +82,29 @@ var FontSizes = /*#__PURE__*/ function(FontSizes) {
83
82
  FontSizes["title"] = "title";
84
83
  return FontSizes;
85
84
  }({});
85
+ var Polarity = /*#__PURE__*/ function(Polarity) {
86
+ Polarity["linear"] = "linear";
87
+ Polarity["bipolar"] = "bipolar";
88
+ return Polarity;
89
+ }({});
90
+ var Orientation = /*#__PURE__*/ function(Orientation) {
91
+ Orientation["vertical"] = "vertical";
92
+ Orientation["horizontal"] = "horizontal";
93
+ return Orientation;
94
+ }({});
86
95
 
87
- var css_248z$8 = ".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";
88
- styleInject(css_248z$8);
96
+ 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";
97
+ styleInject(css_248z$a);
89
98
 
90
- function _array_like_to_array$9(arr, len) {
99
+ function _array_like_to_array$d(arr, len) {
91
100
  if (len == null || len > arr.length) len = arr.length;
92
101
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
93
102
  return arr2;
94
103
  }
95
- function _array_with_holes$9(arr) {
104
+ function _array_with_holes$d(arr) {
96
105
  if (Array.isArray(arr)) return arr;
97
106
  }
98
- function _iterable_to_array_limit$9(arr, i) {
107
+ function _iterable_to_array_limit$d(arr, i) {
99
108
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
100
109
  if (_i == null) return;
101
110
  var _arr = [];
@@ -119,27 +128,27 @@ function _iterable_to_array_limit$9(arr, i) {
119
128
  }
120
129
  return _arr;
121
130
  }
122
- function _non_iterable_rest$9() {
131
+ function _non_iterable_rest$d() {
123
132
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
124
133
  }
125
- function _sliced_to_array$9(arr, i) {
126
- return _array_with_holes$9(arr) || _iterable_to_array_limit$9(arr, i) || _unsupported_iterable_to_array$9(arr, i) || _non_iterable_rest$9();
134
+ function _sliced_to_array$d(arr, i) {
135
+ return _array_with_holes$d(arr) || _iterable_to_array_limit$d(arr, i) || _unsupported_iterable_to_array$d(arr, i) || _non_iterable_rest$d();
127
136
  }
128
- function _unsupported_iterable_to_array$9(o, minLen) {
137
+ function _unsupported_iterable_to_array$d(o, minLen) {
129
138
  if (!o) return;
130
- if (typeof o === "string") return _array_like_to_array$9(o, minLen);
139
+ if (typeof o === "string") return _array_like_to_array$d(o, minLen);
131
140
  var n = Object.prototype.toString.call(o).slice(8, -1);
132
141
  if (n === "Object" && o.constructor) n = o.constructor.name;
133
142
  if (n === "Map" || n === "Set") return Array.from(n);
134
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$9(o, minLen);
143
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$d(o, minLen);
135
144
  }
136
145
  function Tabs(param) {
137
146
  var items = param.items, className = param.className, _param_padding = param.padding, padding = _param_padding === void 0 ? [
138
147
  Spacing.mediumSmall
139
148
  ] : _param_padding, _param_margin = param.margin, margin = _param_margin === void 0 ? [
140
149
  Spacing.none
141
- ] : _param_margin, onChange = param.onChange, selectedIndex = param.selectedIndex;
142
- var _useState = _sliced_to_array$9(useState(0), 2), selectedItem = _useState[0], setSelectedItem = _useState[1];
150
+ ] : _param_margin, gap = param.gap, width = param.width, onChange = param.onChange, selectedIndex = param.selectedIndex;
151
+ var _useState = _sliced_to_array$d(useState(0), 2), selectedItem = _useState[0], setSelectedItem = _useState[1];
143
152
  var handleChange = function(index) {
144
153
  setSelectedItem(index);
145
154
  onChange(index);
@@ -153,14 +162,18 @@ function Tabs(param) {
153
162
  marginTop: "var(--mt-".concat(margin[0], ")"),
154
163
  marginRight: "var(--mr-".concat((_margin_ = margin[1]) !== null && _margin_ !== void 0 ? _margin_ : margin[0], ")"),
155
164
  marginBottom: "var(--mb-".concat((_margin_1 = margin[2]) !== null && _margin_1 !== void 0 ? _margin_1 : margin[0], ")"),
156
- marginLeft: "var(--ml-".concat((_ref = (_margin_2 = margin[3]) !== null && _margin_2 !== void 0 ? _margin_2 : margin[1]) !== null && _ref !== void 0 ? _ref : margin[0], ")")
165
+ marginLeft: "var(--ml-".concat((_ref = (_margin_2 = margin[3]) !== null && _margin_2 !== void 0 ? _margin_2 : margin[1]) !== null && _ref !== void 0 ? _ref : margin[0], ")"),
166
+ width: width
157
167
  },
158
168
  selectedIndex: selectedIndex,
159
169
  onChange: function(index) {
160
170
  return handleChange(index);
161
171
  }
162
172
  }, /*#__PURE__*/ React__default.createElement(TabList, {
163
- className: classnames('Tabs', className)
173
+ className: classnames('Tabs', className),
174
+ style: {
175
+ gap: gap
176
+ }
164
177
  }, items && items.map(function(item, index) {
165
178
  var _padding_, _padding_1, _padding_2, _ref;
166
179
  return /*#__PURE__*/ React__default.createElement(Tab, {
@@ -182,8 +195,8 @@ function Tabs(param) {
182
195
  Tabs.padding = Spacing;
183
196
  Tabs.margin = Spacing;
184
197
 
185
- var css_248z$7 = ".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";
186
- styleInject(css_248z$7);
198
+ 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";
199
+ styleInject(css_248z$9);
187
200
 
188
201
  var ButtonSize = /*#__PURE__*/ function(ButtonSize) {
189
202
  ButtonSize["xSmall"] = "xSmall";
@@ -197,15 +210,15 @@ var ButtonType = /*#__PURE__*/ function(ButtonType) {
197
210
  return ButtonType;
198
211
  }({});
199
212
 
200
- function _array_like_to_array$8(arr, len) {
213
+ function _array_like_to_array$c(arr, len) {
201
214
  if (len == null || len > arr.length) len = arr.length;
202
215
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
203
216
  return arr2;
204
217
  }
205
- function _array_with_holes$8(arr) {
218
+ function _array_with_holes$c(arr) {
206
219
  if (Array.isArray(arr)) return arr;
207
220
  }
208
- function _define_property$d(obj, key, value) {
221
+ function _define_property$i(obj, key, value) {
209
222
  if (key in obj) {
210
223
  Object.defineProperty(obj, key, {
211
224
  value: value,
@@ -218,7 +231,7 @@ function _define_property$d(obj, key, value) {
218
231
  }
219
232
  return obj;
220
233
  }
221
- function _iterable_to_array_limit$8(arr, i) {
234
+ function _iterable_to_array_limit$c(arr, i) {
222
235
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
223
236
  if (_i == null) return;
224
237
  var _arr = [];
@@ -242,10 +255,10 @@ function _iterable_to_array_limit$8(arr, i) {
242
255
  }
243
256
  return _arr;
244
257
  }
245
- function _non_iterable_rest$8() {
258
+ function _non_iterable_rest$c() {
246
259
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
247
260
  }
248
- function _object_spread$d(target) {
261
+ function _object_spread$i(target) {
249
262
  for(var i = 1; i < arguments.length; i++){
250
263
  var source = arguments[i] != null ? arguments[i] : {};
251
264
  var ownKeys = Object.keys(source);
@@ -255,21 +268,21 @@ function _object_spread$d(target) {
255
268
  }));
256
269
  }
257
270
  ownKeys.forEach(function(key) {
258
- _define_property$d(target, key, source[key]);
271
+ _define_property$i(target, key, source[key]);
259
272
  });
260
273
  }
261
274
  return target;
262
275
  }
263
- function _sliced_to_array$8(arr, i) {
264
- return _array_with_holes$8(arr) || _iterable_to_array_limit$8(arr, i) || _unsupported_iterable_to_array$8(arr, i) || _non_iterable_rest$8();
276
+ function _sliced_to_array$c(arr, i) {
277
+ return _array_with_holes$c(arr) || _iterable_to_array_limit$c(arr, i) || _unsupported_iterable_to_array$c(arr, i) || _non_iterable_rest$c();
265
278
  }
266
- function _unsupported_iterable_to_array$8(o, minLen) {
279
+ function _unsupported_iterable_to_array$c(o, minLen) {
267
280
  if (!o) return;
268
- if (typeof o === "string") return _array_like_to_array$8(o, minLen);
281
+ if (typeof o === "string") return _array_like_to_array$c(o, minLen);
269
282
  var n = Object.prototype.toString.call(o).slice(8, -1);
270
283
  if (n === "Object" && o.constructor) n = o.constructor.name;
271
284
  if (n === "Map" || n === "Set") return Array.from(n);
272
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
285
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$c(o, minLen);
273
286
  }
274
287
  function Button(param) {
275
288
  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 ? [
@@ -277,7 +290,7 @@ function Button(param) {
277
290
  ] : _param_padding, _param_margin = param.margin, margin = _param_margin === void 0 ? [
278
291
  Spacing.none
279
292
  ] : _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;
280
- var _React_useState = _sliced_to_array$8(React__default.useState(false), 2), isSelected = _React_useState[0], setIsSelected = _React_useState[1];
293
+ var _React_useState = _sliced_to_array$c(React__default.useState(false), 2), isSelected = _React_useState[0], setIsSelected = _React_useState[1];
281
294
  var buttonState = Juce.getToggleState(id);
282
295
  var isLocalhost = window.location.hostname === 'localhost';
283
296
  // Update the local state when the ID changes
@@ -334,7 +347,7 @@ function Button(param) {
334
347
  onMouseDown: handleMouseDown,
335
348
  disabled: disabled,
336
349
  onClick: onClick && onClick,
337
- style: _object_spread$d({
350
+ style: _object_spread$i({
338
351
  paddingTop: "var(--p-".concat(padding[0], ")"),
339
352
  paddingRight: "var(--p-".concat((_padding_ = padding[1]) !== null && _padding_ !== void 0 ? _padding_ : padding[0], ")"),
340
353
  paddingBottom: "var(--p-".concat((_padding_1 = padding[2]) !== null && _padding_1 !== void 0 ? _padding_1 : padding[0], ")"),
@@ -352,8 +365,8 @@ Button.margin = Spacing;
352
365
  Button.type = ButtonType;
353
366
  Button.size = ButtonSize;
354
367
 
355
- var css_248z$6 = ".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: 0;\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(--bg-input);\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-item {\n background-color: var(--bg-popover);\n padding: var(--spacing-l);\n cursor: pointer;\n user-select: none;\n -webkit-user-select: none;\n &:hover {\n background-color: var(--bg-highlighted);\n }\n &[data-selected] {\n background-color: var(--bg-selected);\n }\n}\n";
356
- styleInject(css_248z$6);
368
+ 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: 0;\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(--bg-input);\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-item {\n background-color: var(--bg-popover);\n padding: var(--spacing-l);\n cursor: pointer;\n user-select: none;\n -webkit-user-select: none;\n &:hover {\n background-color: var(--bg-highlighted);\n }\n &[data-selected] {\n background-color: var(--bg-selected);\n }\n}\n";
369
+ styleInject(css_248z$8);
357
370
 
358
371
  function useObservable(param) {
359
372
  var onFire = param.onFire;
@@ -395,15 +408,15 @@ function useObservable(param) {
395
408
  };
396
409
  }
397
410
 
398
- function _array_like_to_array$7(arr, len) {
411
+ function _array_like_to_array$b(arr, len) {
399
412
  if (len == null || len > arr.length) len = arr.length;
400
413
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
401
414
  return arr2;
402
415
  }
403
- function _array_with_holes$7(arr) {
416
+ function _array_with_holes$b(arr) {
404
417
  if (Array.isArray(arr)) return arr;
405
418
  }
406
- function _define_property$c(obj, key, value) {
419
+ function _define_property$h(obj, key, value) {
407
420
  if (key in obj) {
408
421
  Object.defineProperty(obj, key, {
409
422
  value: value,
@@ -416,7 +429,7 @@ function _define_property$c(obj, key, value) {
416
429
  }
417
430
  return obj;
418
431
  }
419
- function _iterable_to_array_limit$7(arr, i) {
432
+ function _iterable_to_array_limit$b(arr, i) {
420
433
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
421
434
  if (_i == null) return;
422
435
  var _arr = [];
@@ -440,10 +453,10 @@ function _iterable_to_array_limit$7(arr, i) {
440
453
  }
441
454
  return _arr;
442
455
  }
443
- function _non_iterable_rest$7() {
456
+ function _non_iterable_rest$b() {
444
457
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
445
458
  }
446
- function _object_spread$c(target) {
459
+ function _object_spread$h(target) {
447
460
  for(var i = 1; i < arguments.length; i++){
448
461
  var source = arguments[i] != null ? arguments[i] : {};
449
462
  var ownKeys = Object.keys(source);
@@ -453,12 +466,12 @@ function _object_spread$c(target) {
453
466
  }));
454
467
  }
455
468
  ownKeys.forEach(function(key) {
456
- _define_property$c(target, key, source[key]);
469
+ _define_property$h(target, key, source[key]);
457
470
  });
458
471
  }
459
472
  return target;
460
473
  }
461
- function ownKeys$2(object, enumerableOnly) {
474
+ function ownKeys$3(object, enumerableOnly) {
462
475
  var keys = Object.keys(object);
463
476
  if (Object.getOwnPropertySymbols) {
464
477
  var symbols = Object.getOwnPropertySymbols(object);
@@ -466,42 +479,72 @@ function ownKeys$2(object, enumerableOnly) {
466
479
  }
467
480
  return keys;
468
481
  }
469
- function _object_spread_props$2(target, source) {
482
+ function _object_spread_props$3(target, source) {
470
483
  source = source != null ? source : {};
471
484
  if (Object.getOwnPropertyDescriptors) {
472
485
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
473
486
  } else {
474
- ownKeys$2(Object(source)).forEach(function(key) {
487
+ ownKeys$3(Object(source)).forEach(function(key) {
475
488
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
476
489
  });
477
490
  }
478
491
  return target;
479
492
  }
480
- function _sliced_to_array$7(arr, i) {
481
- return _array_with_holes$7(arr) || _iterable_to_array_limit$7(arr, i) || _unsupported_iterable_to_array$7(arr, i) || _non_iterable_rest$7();
493
+ function _sliced_to_array$b(arr, i) {
494
+ return _array_with_holes$b(arr) || _iterable_to_array_limit$b(arr, i) || _unsupported_iterable_to_array$b(arr, i) || _non_iterable_rest$b();
482
495
  }
483
- function _unsupported_iterable_to_array$7(o, minLen) {
496
+ function _unsupported_iterable_to_array$b(o, minLen) {
484
497
  if (!o) return;
485
- if (typeof o === "string") return _array_like_to_array$7(o, minLen);
498
+ if (typeof o === "string") return _array_like_to_array$b(o, minLen);
486
499
  var n = Object.prototype.toString.call(o).slice(8, -1);
487
500
  if (n === "Object" && o.constructor) n = o.constructor.name;
488
501
  if (n === "Map" || n === "Set") return Array.from(n);
489
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
502
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$b(o, minLen);
490
503
  }
491
504
  // Initial state
492
505
  var defaultGlobalStateValue = {
493
506
  highlightedItem: {
494
507
  label: 'Antimatter Audio',
495
- value: undefined
496
- }
508
+ value: 0
509
+ },
510
+ automatableParams: [],
511
+ automatableParamLabels: [],
512
+ modSlots: [],
513
+ modSlotParams: [],
514
+ modSlotParamLabels: [],
515
+ advancedView: false
497
516
  };
498
517
  // Reducer function to handle state updates
499
518
  var reducer = function(state, action) {
500
519
  switch(action.type){
501
520
  case 'SET_HIGHLIGHTED_ITEM':
502
- return _object_spread_props$2(_object_spread$c({}, state), {
521
+ return _object_spread_props$3(_object_spread$h({}, state), {
503
522
  highlightedItem: action.payload
504
523
  });
524
+ case 'TOGGLE_ADVANCED_VIEW':
525
+ return _object_spread_props$3(_object_spread$h({}, state), {
526
+ advancedView: action.payload
527
+ });
528
+ case 'SET_AUTOMATABLE_PARAMS':
529
+ return _object_spread_props$3(_object_spread$h({}, state), {
530
+ automatableParams: action.payload
531
+ });
532
+ case 'SET_AUTOMATABLE_PARAM_LABELS':
533
+ return _object_spread_props$3(_object_spread$h({}, state), {
534
+ automatableParamLabels: action.payload
535
+ });
536
+ case 'SET_MOD_SLOTS':
537
+ return _object_spread_props$3(_object_spread$h({}, state), {
538
+ modSlots: action.payload
539
+ });
540
+ case 'SET_MOD_SLOT_PARAMS':
541
+ return _object_spread_props$3(_object_spread$h({}, state), {
542
+ modSlotParams: action.payload
543
+ });
544
+ case 'SET_MOD_SLOT_PARAM_LABELS':
545
+ return _object_spread_props$3(_object_spread$h({}, state), {
546
+ modSlotParamLabels: action.payload
547
+ });
505
548
  default:
506
549
  return state;
507
550
  }
@@ -518,13 +561,49 @@ function useGlobalContext(selector) {
518
561
  // Context provider
519
562
  function GlobalContextProvider(param) {
520
563
  var children = param.children;
521
- var _useReducer = _sliced_to_array$7(useReducer(reducer, defaultGlobalStateValue), 2), state = _useReducer[0], dispatch = _useReducer[1];
564
+ var _useReducer = _sliced_to_array$b(useReducer(reducer, defaultGlobalStateValue), 2), state = _useReducer[0], dispatch = _useReducer[1];
522
565
  var setHighlightedItem = useCallback(function(highlightedItem) {
523
566
  dispatch({
524
567
  type: 'SET_HIGHLIGHTED_ITEM',
525
568
  payload: highlightedItem
526
569
  });
527
570
  }, []);
571
+ var setAdvancedView = useCallback(function(advancedView) {
572
+ dispatch({
573
+ type: 'TOGGLE_ADVANCED_VIEW',
574
+ payload: advancedView
575
+ });
576
+ }, []);
577
+ var setAutomatableParams = useCallback(function(automatableParams) {
578
+ dispatch({
579
+ type: 'SET_AUTOMATABLE_PARAMS',
580
+ payload: automatableParams
581
+ });
582
+ }, []);
583
+ var setAutomatableParamLabels = useCallback(function(automatableParamLabels) {
584
+ dispatch({
585
+ type: 'SET_AUTOMATABLE_PARAM_LABELS',
586
+ payload: automatableParamLabels
587
+ });
588
+ }, []);
589
+ var setModSlots = useCallback(function(modSlots) {
590
+ dispatch({
591
+ type: 'SET_MOD_SLOTS',
592
+ payload: modSlots
593
+ });
594
+ }, []);
595
+ var setModSlotParams = useCallback(function(modSlotParams) {
596
+ dispatch({
597
+ type: 'SET_MOD_SLOT_PARAMS',
598
+ payload: modSlotParams
599
+ });
600
+ }, []);
601
+ var setModSlotParamLabels = useCallback(function(modSlotParamLables) {
602
+ dispatch({
603
+ type: 'SET_MOD_SLOT_PARAM_LABELS',
604
+ payload: modSlotParamLables
605
+ });
606
+ }, []);
528
607
  var onFire = function() {
529
608
  //@ts-expect-error
530
609
  window.__JUCE__.backend.emitEvent('setRandom', {});
@@ -535,6 +614,12 @@ function GlobalContextProvider(param) {
535
614
  var value = {
536
615
  globalState: state,
537
616
  setHighlightedItem: setHighlightedItem,
617
+ setAdvancedView: setAdvancedView,
618
+ setAutomatableParams: setAutomatableParams,
619
+ setAutomatableParamLabels: setAutomatableParamLabels,
620
+ setModSlots: setModSlots,
621
+ setModSlotParams: setModSlotParams,
622
+ setModSlotParamLabels: setModSlotParamLabels,
538
623
  useRandom: useRandom
539
624
  };
540
625
  return /*#__PURE__*/ React__default.createElement(GlobalContext.Provider, {
@@ -542,15 +627,15 @@ function GlobalContextProvider(param) {
542
627
  }, children);
543
628
  }
544
629
 
545
- function _array_like_to_array$6(arr, len) {
630
+ function _array_like_to_array$a(arr, len) {
546
631
  if (len == null || len > arr.length) len = arr.length;
547
632
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
548
633
  return arr2;
549
634
  }
550
- function _array_with_holes$6(arr) {
635
+ function _array_with_holes$a(arr) {
551
636
  if (Array.isArray(arr)) return arr;
552
637
  }
553
- function _iterable_to_array_limit$6(arr, i) {
638
+ function _iterable_to_array_limit$a(arr, i) {
554
639
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
555
640
  if (_i == null) return;
556
641
  var _arr = [];
@@ -574,32 +659,39 @@ function _iterable_to_array_limit$6(arr, i) {
574
659
  }
575
660
  return _arr;
576
661
  }
577
- function _non_iterable_rest$6() {
662
+ function _non_iterable_rest$a() {
578
663
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
579
664
  }
580
- function _sliced_to_array$6(arr, i) {
581
- return _array_with_holes$6(arr) || _iterable_to_array_limit$6(arr, i) || _unsupported_iterable_to_array$6(arr, i) || _non_iterable_rest$6();
665
+ function _sliced_to_array$a(arr, i) {
666
+ return _array_with_holes$a(arr) || _iterable_to_array_limit$a(arr, i) || _unsupported_iterable_to_array$a(arr, i) || _non_iterable_rest$a();
582
667
  }
583
- function _unsupported_iterable_to_array$6(o, minLen) {
668
+ function _unsupported_iterable_to_array$a(o, minLen) {
584
669
  if (!o) return;
585
- if (typeof o === "string") return _array_like_to_array$6(o, minLen);
670
+ if (typeof o === "string") return _array_like_to_array$a(o, minLen);
586
671
  var n = Object.prototype.toString.call(o).slice(8, -1);
587
672
  if (n === "Object" && o.constructor) n = o.constructor.name;
588
673
  if (n === "Map" || n === "Set") return Array.from(n);
589
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
674
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$a(o, minLen);
590
675
  }
591
676
  var useCombobox = function(param) {
592
- var id = param.id, label = param.label, _param_items = param.items, items = _param_items === void 0 ? [] : _param_items, onChange = param.onChange, _param_displayValInHeader = param.displayValInHeader, displayValInHeader = _param_displayValInHeader === void 0 ? true : _param_displayValInHeader;
677
+ var id = param.id, label = param.label, _param_items = param.items, items = _param_items === void 0 ? [] : _param_items, filter = param.filter, onChange = param.onChange, _param_displayValInHeader = param.displayValInHeader, displayValInHeader = _param_displayValInHeader === void 0 ? true : _param_displayValInHeader;
678
+ var _properties_choices;
593
679
  var comboBoxState = Juce.getComboBoxState(id);
594
- var _useState = _sliced_to_array$6(useState(comboBoxState.getChoiceIndex()), 2), value = _useState[0], setValue = _useState[1];
595
- var _useState1 = _sliced_to_array$6(useState(comboBoxState.properties), 2), properties = _useState1[0], setProperties = _useState1[1];
680
+ var _useState = _sliced_to_array$a(useState(comboBoxState.getChoiceIndex()), 2), value = _useState[0], setValue = _useState[1];
681
+ var _useState1 = _sliced_to_array$a(useState(comboBoxState.properties), 2), properties = _useState1[0], setProperties = _useState1[1];
596
682
  var setHighlightedItem = useGlobalContext().setHighlightedItem;
597
- var choices = properties.choices.length ? properties.choices : items;
683
+ 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 : [];
684
+ var filteredChoices = filter ? choices === null || choices === void 0 ? void 0 : choices.filter(function(item) {
685
+ var _item_;
686
+ return item === null || item === void 0 ? void 0 : (_item_ = item[1]) === null || _item_ === void 0 ? void 0 : _item_.toLowerCase().includes(filter === null || filter === void 0 ? void 0 : filter.toLowerCase());
687
+ }) : choices;
598
688
  var prevIndex = useRef(null);
599
- var handleChange = function(index) {
689
+ var handleChange = function(value) {
690
+ var index = choices === null || choices === void 0 ? void 0 : choices.indexOf(value);
691
+ // const index = 0;
600
692
  if (index !== prevIndex.current) {
601
693
  comboBoxState.setChoiceIndex(index);
602
- setValue(index);
694
+ setValue(value);
603
695
  onChange && onChange(index);
604
696
  // //@ts-expect-error
605
697
  // window.__JUCE__.backend.emitEvent('undoableActionOccurred', {});
@@ -642,8 +734,10 @@ var useCombobox = function(param) {
642
734
  };
643
735
  return {
644
736
  value: value,
737
+ valueString: choices === null || choices === void 0 ? void 0 : choices[value],
645
738
  setValue: setValue,
646
739
  choices: choices,
740
+ filteredChoices: filteredChoices,
647
741
  onMouseEnter: onMouseEnter,
648
742
  handleChange: handleChange
649
743
  };
@@ -692,8 +786,8 @@ var validate = function(param) {
692
786
  var errorMessages = [];
693
787
  var isIncomplete = false;
694
788
  var length = value.toString().length;
695
- if (length > maxLength && errorMessages.indexOf(InputErrorStates.exceedsMaxLength) === -1) {
696
- errorMessages.push(InputErrorStates.exceedsMaxLength);
789
+ if (length > maxLength && (errorMessages === null || errorMessages === void 0 ? void 0 : errorMessages.indexOf(InputErrorStates === null || InputErrorStates === void 0 ? void 0 : InputErrorStates.exceedsMaxLength)) === -1) {
790
+ errorMessages === null || errorMessages === void 0 ? void 0 : errorMessages.push(InputErrorStates === null || InputErrorStates === void 0 ? void 0 : InputErrorStates.exceedsMaxLength);
697
791
  }
698
792
  if (length < minLength) {
699
793
  isIncomplete = true;
@@ -703,8 +797,8 @@ var validate = function(param) {
703
797
  errorMessages.push(InputErrorStates.invalidCharacter);
704
798
  }
705
799
  if (typeof value === 'number') {
706
- if ((value > max || value < min) && errorMessages.indexOf(InputErrorStates.valueOutOfRange) === -1) {
707
- errorMessages.push(InputErrorStates.valueOutOfRange);
800
+ if ((value > max || value < min) && (errorMessages === null || errorMessages === void 0 ? void 0 : errorMessages.indexOf(InputErrorStates.valueOutOfRange)) === -1) {
801
+ errorMessages === null || errorMessages === void 0 ? void 0 : errorMessages.push(InputErrorStates.valueOutOfRange);
708
802
  }
709
803
  }
710
804
  }
@@ -714,22 +808,62 @@ var validate = function(param) {
714
808
  isValid: !errorMessages.length && !isIncomplete
715
809
  };
716
810
  };
811
+ var getBarTransformStyles = function(param) {
812
+ var polarity = param.polarity, orientation = param.orientation, value = param.value;
813
+ if (polarity === Polarity.linear) {
814
+ return orientation === Orientation.horizontal ? {
815
+ width: value ? "100%" : '1px',
816
+ height: '100%',
817
+ transform: value ? "scale(".concat(Math.ceil(value) * 0.01, ", 1)") : 'none',
818
+ transformOrigin: 'center left',
819
+ top: '0',
820
+ bottom: '0',
821
+ left: '0'
822
+ } : {
823
+ width: "100%",
824
+ height: value ? '100%' : '1px',
825
+ transform: "scale(1, ".concat(Math.ceil(value) * 0.01, ")"),
826
+ transformOrigin: 'bottom center',
827
+ top: '0',
828
+ bottom: '0',
829
+ left: '0'
830
+ };
831
+ } else {
832
+ return orientation === Orientation.horizontal ? {
833
+ width: value ? "100%" : '1px',
834
+ height: '100%',
835
+ transform: value ? "scale(".concat(Math.ceil(value) * 0.01 / 2, ", 1)") : 'none',
836
+ transformOrigin: 'left center',
837
+ top: '0',
838
+ bottom: '0',
839
+ left: '50%'
840
+ } : {
841
+ width: "100%",
842
+ height: value ? '100%' : '1px',
843
+ transform: value ? "scale(1, ".concat(Math.ceil(value) * 0.01 / 2, ")") : 'none',
844
+ transformOrigin: 'bottom center',
845
+ bottom: '50%',
846
+ left: '0',
847
+ right: '0'
848
+ };
849
+ }
850
+ };
717
851
  var randomizeValue = function(min, max) {
718
852
  return Math.random() * (max - min) + min;
719
853
  };
720
854
 
721
- var css_248z$5 = ".TextInput {\n user-select: none;\n -webkit-user-select: none;\n}\n\n.TextInput::-moz-selection {\n background: transparent;\n}\n.TextInput::selection {\n background: transparent;\n}\n";
722
- styleInject(css_248z$5);
855
+ var css_248z$7 = ".TextInput {\n user-select: none;\n -webkit-user-select: none;\n}\n\n.TextInput::-moz-selection {\n background: transparent;\n}\n.TextInput::selection {\n background: transparent;\n}\n";
856
+ styleInject(css_248z$7);
723
857
 
724
- function _array_like_to_array$5(arr, len) {
858
+ function _array_like_to_array$9(arr, len) {
725
859
  if (len == null || len > arr.length) len = arr.length;
726
860
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
727
861
  return arr2;
728
862
  }
729
- function _array_with_holes$5(arr) {
863
+ function _array_with_holes$9(arr) {
730
864
  if (Array.isArray(arr)) return arr;
731
865
  }
732
- function _define_property$b(obj, key, value) {
866
+ function _define_property$g(obj, key, value) {
733
867
  if (key in obj) {
734
868
  Object.defineProperty(obj, key, {
735
869
  value: value,
@@ -742,7 +876,7 @@ function _define_property$b(obj, key, value) {
742
876
  }
743
877
  return obj;
744
878
  }
745
- function _iterable_to_array_limit$5(arr, i) {
879
+ function _iterable_to_array_limit$9(arr, i) {
746
880
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
747
881
  if (_i == null) return;
748
882
  var _arr = [];
@@ -766,10 +900,10 @@ function _iterable_to_array_limit$5(arr, i) {
766
900
  }
767
901
  return _arr;
768
902
  }
769
- function _non_iterable_rest$5() {
903
+ function _non_iterable_rest$9() {
770
904
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
771
905
  }
772
- function _object_spread$b(target) {
906
+ function _object_spread$g(target) {
773
907
  for(var i = 1; i < arguments.length; i++){
774
908
  var source = arguments[i] != null ? arguments[i] : {};
775
909
  var ownKeys = Object.keys(source);
@@ -779,21 +913,21 @@ function _object_spread$b(target) {
779
913
  }));
780
914
  }
781
915
  ownKeys.forEach(function(key) {
782
- _define_property$b(target, key, source[key]);
916
+ _define_property$g(target, key, source[key]);
783
917
  });
784
918
  }
785
919
  return target;
786
920
  }
787
- function _sliced_to_array$5(arr, i) {
788
- return _array_with_holes$5(arr) || _iterable_to_array_limit$5(arr, i) || _unsupported_iterable_to_array$5(arr, i) || _non_iterable_rest$5();
921
+ function _sliced_to_array$9(arr, i) {
922
+ return _array_with_holes$9(arr) || _iterable_to_array_limit$9(arr, i) || _unsupported_iterable_to_array$9(arr, i) || _non_iterable_rest$9();
789
923
  }
790
- function _unsupported_iterable_to_array$5(o, minLen) {
924
+ function _unsupported_iterable_to_array$9(o, minLen) {
791
925
  if (!o) return;
792
- if (typeof o === "string") return _array_like_to_array$5(o, minLen);
926
+ if (typeof o === "string") return _array_like_to_array$9(o, minLen);
793
927
  var n = Object.prototype.toString.call(o).slice(8, -1);
794
928
  if (n === "Object" && o.constructor) n = o.constructor.name;
795
929
  if (n === "Map" || n === "Set") return Array.from(n);
796
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
930
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$9(o, minLen);
797
931
  }
798
932
  // import { decimalToPercent, percentToDecimal } from '../../common/utils';
799
933
  // import debounce from 'lodash.debounce';
@@ -805,9 +939,9 @@ var InputTypes = /*#__PURE__*/ function(InputTypes) {
805
939
  function Input(param) {
806
940
  var onComplete = param.onComplete, value = param.value, min = param.min, max = param.max, _param_type = param.type, type = _param_type === void 0 ? "text" : _param_type, _param_minLength = param.minLength, minLength = _param_minLength === void 0 ? 1 : _param_minLength, _param_maxLength = param.maxLength, maxLength = _param_maxLength === void 0 ? 20 : _param_maxLength, fontSize = param.fontSize, style = param.style, className = param.className, id = param.id, _param_textColor = param.textColor, textColor = _param_textColor === void 0 ? '#999' : _param_textColor;
807
941
  var _inputRef_current;
808
- var _useState = _sliced_to_array$5(useState(value), 2), internalValue = _useState[0], setInternalValue = _useState[1];
809
- var _useState1 = _sliced_to_array$5(useState(false), 2), hasError = _useState1[0], setHasError = _useState1[1];
810
- var _useState2 = _sliced_to_array$5(useState(false), 2), hasIncompleteValue = _useState2[0], setHasIncompleteValue = _useState2[1];
942
+ var _useState = _sliced_to_array$9(useState(value), 2), internalValue = _useState[0], setInternalValue = _useState[1];
943
+ var _useState1 = _sliced_to_array$9(useState(false), 2), hasError = _useState1[0], setHasError = _useState1[1];
944
+ var _useState2 = _sliced_to_array$9(useState(false), 2), hasIncompleteValue = _useState2[0], setHasIncompleteValue = _useState2[1];
811
945
  var valueRef = useRef(null);
812
946
  var timer, timeoutVal = 2000;
813
947
  // (inputValue === '' || /^-?\d+$/.test(inputValue)
@@ -882,7 +1016,7 @@ function Input(param) {
882
1016
  }
883
1017
  // Don't set the internal value if the value exceeds the max length
884
1018
  // Don't set the internal value if the value contains an invalid character
885
- if (errorMessages.indexOf(InputErrorStates.exceedsMaxLength) === -1 && errorMessages.indexOf(InputErrorStates.invalidCharacter) === -1) {
1019
+ if ((errorMessages === null || errorMessages === void 0 ? void 0 : errorMessages.indexOf(InputErrorStates === null || InputErrorStates === void 0 ? void 0 : InputErrorStates.exceedsMaxLength)) === -1 && (errorMessages === null || errorMessages === void 0 ? void 0 : errorMessages.indexOf(InputErrorStates === null || InputErrorStates === void 0 ? void 0 : InputErrorStates.invalidCharacter)) === -1) {
886
1020
  setInternalValue(newValue);
887
1021
  }
888
1022
  }, [
@@ -911,7 +1045,7 @@ function Input(param) {
911
1045
  id: id,
912
1046
  ref: inputRef,
913
1047
  className: classnames('TextInput', hasIncompleteValue || hasError ? 'is-blinking' : '', className),
914
- style: _object_spread$b({
1048
+ style: _object_spread$g({
915
1049
  // TODO
916
1050
  // color: hasError ? 'red' : hasIncompleteValue ? '#999' : textColor
917
1051
  color: hasError ? 'red' : textColor,
@@ -937,11 +1071,6 @@ function Input(param) {
937
1071
  }
938
1072
  Input.type = InputTypes;
939
1073
 
940
- var SliderPolarity = /*#__PURE__*/ function(SliderPolarity) {
941
- SliderPolarity["linear"] = "linear";
942
- SliderPolarity["bipolar"] = "bipolar";
943
- return SliderPolarity;
944
- }({});
945
1074
  var SliderType = /*#__PURE__*/ function(SliderType) {
946
1075
  SliderType["bar"] = "bar";
947
1076
  SliderType["rotary"] = "rotary";
@@ -954,11 +1083,6 @@ var SliderRotationBehavior = /*#__PURE__*/ function(SliderRotationBehavior) {
954
1083
  SliderRotationBehavior["noRotation"] = "noRotation";
955
1084
  return SliderRotationBehavior;
956
1085
  }({});
957
- var SliderOrientation = /*#__PURE__*/ function(SliderOrientation) {
958
- SliderOrientation["horizontal"] = "horizontal";
959
- SliderOrientation["vertical"] = "vertical";
960
- return SliderOrientation;
961
- }({});
962
1086
 
963
1087
  var clamp = function(val) {
964
1088
  var min = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, max = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1;
@@ -986,70 +1110,16 @@ var decimalToPercent = function(decimal) {
986
1110
  var percentToDecimal = function(percent) {
987
1111
  return Math.round(0.01 * (typeof percent === 'string' ? parseFloat(percent) : percent));
988
1112
  };
989
- var getTransformString = function(param) {
990
- var sliderType = param.sliderType, sliderOrientation = param.sliderOrientation, polarity = param.polarity, normalisedValue = param.normalisedValue, scaledValue = param.scaledValue;
991
- if (sliderType === SliderType.bar) {
992
- if (polarity === SliderPolarity.linear) {
993
- return sliderOrientation === SliderOrientation.horizontal ? {
994
- transform: "scale(".concat(normalisedValue, ", 1)"),
995
- transformOrigin: 'center left'
996
- } : {
997
- transform: "scale(1, ".concat(normalisedValue, ")"),
998
- transformOrigin: 'bottom center'
999
- };
1000
- } else {
1001
- return sliderOrientation === SliderOrientation.horizontal ? {
1002
- transform: "scale(".concat(Math.ceil(scaledValue * 100) / 100 / 2, ", 1)"),
1003
- transformOrigin: 'left center'
1004
- } : {
1005
- transform: "scale(1, ".concat(Math.ceil(scaledValue * 100) / 100 / 2, ")"),
1006
- transformOrigin: 'bottom center'
1007
- };
1008
- }
1009
- } else {
1010
- return {
1011
- transform: '0'
1012
- };
1013
- }
1014
- };
1015
- var getPosition = function(param) {
1016
- var sliderType = param.sliderType, sliderOrientation = param.sliderOrientation, polarity = param.polarity;
1017
- if (sliderType === SliderType.bar) {
1018
- if (polarity === SliderPolarity.linear) {
1019
- return sliderOrientation === SliderOrientation.horizontal ? {
1020
- top: '0',
1021
- bottom: '0',
1022
- left: '0'
1023
- } : {
1024
- right: '0',
1025
- bottom: '0',
1026
- left: '0'
1027
- };
1028
- } else {
1029
- return sliderOrientation === SliderOrientation.horizontal ? {
1030
- top: '0',
1031
- bottom: '0',
1032
- left: '50%'
1033
- } : {
1034
- bottom: '50%',
1035
- left: '0',
1036
- right: '0'
1037
- };
1038
- }
1039
- } else {
1040
- return {};
1041
- }
1042
- };
1043
1113
 
1044
- function _array_like_to_array$4(arr, len) {
1114
+ function _array_like_to_array$8(arr, len) {
1045
1115
  if (len == null || len > arr.length) len = arr.length;
1046
1116
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1047
1117
  return arr2;
1048
1118
  }
1049
- function _array_with_holes$4(arr) {
1119
+ function _array_with_holes$8(arr) {
1050
1120
  if (Array.isArray(arr)) return arr;
1051
1121
  }
1052
- function _iterable_to_array_limit$4(arr, i) {
1122
+ function _iterable_to_array_limit$8(arr, i) {
1053
1123
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1054
1124
  if (_i == null) return;
1055
1125
  var _arr = [];
@@ -1073,29 +1143,29 @@ function _iterable_to_array_limit$4(arr, i) {
1073
1143
  }
1074
1144
  return _arr;
1075
1145
  }
1076
- function _non_iterable_rest$4() {
1146
+ function _non_iterable_rest$8() {
1077
1147
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1078
1148
  }
1079
- function _sliced_to_array$4(arr, i) {
1080
- return _array_with_holes$4(arr) || _iterable_to_array_limit$4(arr, i) || _unsupported_iterable_to_array$4(arr, i) || _non_iterable_rest$4();
1149
+ function _sliced_to_array$8(arr, i) {
1150
+ return _array_with_holes$8(arr) || _iterable_to_array_limit$8(arr, i) || _unsupported_iterable_to_array$8(arr, i) || _non_iterable_rest$8();
1081
1151
  }
1082
- function _unsupported_iterable_to_array$4(o, minLen) {
1152
+ function _unsupported_iterable_to_array$8(o, minLen) {
1083
1153
  if (!o) return;
1084
- if (typeof o === "string") return _array_like_to_array$4(o, minLen);
1154
+ if (typeof o === "string") return _array_like_to_array$8(o, minLen);
1085
1155
  var n = Object.prototype.toString.call(o).slice(8, -1);
1086
1156
  if (n === "Object" && o.constructor) n = o.constructor.name;
1087
1157
  if (n === "Map" || n === "Set") return Array.from(n);
1088
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
1158
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
1089
1159
  }
1090
1160
  // 20.0f, 15000.0f, 0.1f, 0.7f),800.0f
1091
1161
  // ValueType rangeStart, ValueType rangeEnd, ValueType intervalValue, ValueType skewFactor, bool useSymmetricSkew=false)
1092
1162
  var useSlider = function(param) {
1093
- var id = param.id, label = param.label, _param_mockProperties = param.mockProperties, mockProperties = _param_mockProperties === void 0 ? {
1163
+ var id = param.id, label = param.label, _param_displayValInHeader = param.displayValInHeader, displayValInHeader = _param_displayValInHeader === void 0 ? true : _param_displayValInHeader, _param_mockProperties = param.mockProperties, mockProperties = _param_mockProperties === void 0 ? {
1094
1164
  start: 20,
1095
1165
  end: 15000,
1096
1166
  interval: 0.1,
1097
1167
  skew: 0.7
1098
- } : _param_mockProperties, _param_isRandomizable = param.isRandomizable, isRandomizable = _param_isRandomizable === void 0 ? false : _param_isRandomizable, _param_mockInitialNormalisedValue = param.mockInitialNormalisedValue, mockInitialNormalisedValue = _param_mockInitialNormalisedValue === void 0 ? 0.0 : _param_mockInitialNormalisedValue, _param_sliderOrientation = param.sliderOrientation; _param_sliderOrientation === void 0 ? SliderOrientation.vertical : _param_sliderOrientation; var onChange = param.onChange;
1168
+ } : _param_mockProperties, _param_isRandomizable = param.isRandomizable, isRandomizable = _param_isRandomizable === void 0 ? false : _param_isRandomizable, _param_mockInitialNormalisedValue = param.mockInitialNormalisedValue, mockInitialNormalisedValue = _param_mockInitialNormalisedValue === void 0 ? 0.0 : _param_mockInitialNormalisedValue, onChange = param.onChange;
1099
1169
  // const sliderState: JuceSlider = Juce.getSliderState(id);
1100
1170
  // if isLocalhost is true, the front end app is running outside of JUCE in a browser.
1101
1171
  var isLocalhost = window.location.hostname === 'localhost';
@@ -1108,9 +1178,9 @@ var useSlider = function(param) {
1108
1178
  * AudioProcessorParameter::getValue() (C++).
1109
1179
  */ // See https://github.com/juce-framework/JUCE/blob/51d11a2be6d5c97ccf12b4e5e827006e19f0555a/modules/juce_gui_extra/native/javascript/index.js#L230C1-L238C6
1110
1180
  // NOTE: We can think of this as a percentage value, in 0 to 1 format
1111
- var _useState = _sliced_to_array$4(useState(0), 2), scaledValue = _useState[0], setScaledValue = _useState[1];
1112
- var _useState1 = _sliced_to_array$4(useState(0), 2), normalisedValue = _useState1[0], setNormalisedValue = _useState1[1];
1113
- var _useState2 = _sliced_to_array$4(useState(), 2), properties = _useState2[0], setProperties = _useState2[1];
1181
+ var _useState = _sliced_to_array$8(useState(0), 2), scaledValue = _useState[0], setScaledValue = _useState[1];
1182
+ // const [normalisedValue, setNormalisedValue] = useState(0);
1183
+ var _useState1 = _sliced_to_array$8(useState(), 2), properties = _useState1[0], setProperties = _useState1[1];
1114
1184
  var scaledValueRef = useRef(null);
1115
1185
  var normalisedValueRef = useRef(null);
1116
1186
  // const randomValueSetCounter = useRef<number>(null);
@@ -1129,7 +1199,7 @@ var useSlider = function(param) {
1129
1199
  setNormalisedState(newValue);
1130
1200
  };
1131
1201
  if (!isLocalhost) {
1132
- setNormalisedValue(normalisedValue);
1202
+ // setNormalisedValue(normalisedValue);
1133
1203
  setProperties(sliderState === null || sliderState === void 0 ? void 0 : sliderState.properties);
1134
1204
  if (isRandomizable) {
1135
1205
  useRandom === null || useRandom === void 0 ? void 0 : useRandom.subscribe(setRandom, id);
@@ -1140,7 +1210,7 @@ var useSlider = function(param) {
1140
1210
  } else {
1141
1211
  // This sets 'mockProperties' as the value for 'properties' if the app is running in a browser.
1142
1212
  setProperties(mockProperties);
1143
- setNormalisedValue(mockInitialNormalisedValue);
1213
+ normalisedValueRef.current = mockInitialNormalisedValue;
1144
1214
  }
1145
1215
  }, []);
1146
1216
  // Update the local state when the ID changes
@@ -1174,10 +1244,10 @@ var useSlider = function(param) {
1174
1244
  var normalisedValueFromState = sliderState === null || sliderState === void 0 ? void 0 : sliderState.getNormalisedValue();
1175
1245
  var scaledValueFromState = sliderState === null || sliderState === void 0 ? void 0 : sliderState.getScaledValue();
1176
1246
  var scaledValue = parseFloat(scaledValueFromState.toFixed(2));
1177
- setNormalisedValue(parseFloat(normalisedValueFromState.toFixed(2)));
1247
+ normalisedValueRef.current = parseFloat(normalisedValueFromState.toFixed(2));
1178
1248
  setScaledValue(scaledValue);
1179
1249
  onChange && onChange(parseFloat(scaledValueFromState.toFixed(2)));
1180
- if ((scaledValueRef === null || scaledValueRef === void 0 ? void 0 : scaledValueRef.current) !== scaledValue) {
1250
+ if (displayValInHeader && (scaledValueRef === null || scaledValueRef === void 0 ? void 0 : scaledValueRef.current) !== scaledValue) {
1181
1251
  setHighlightedItem({
1182
1252
  label: label,
1183
1253
  value: scaledValue
@@ -1187,16 +1257,17 @@ var useSlider = function(param) {
1187
1257
  // Update JUCE state
1188
1258
  var setNormalisedState = function(newValue) {
1189
1259
  var sliderState = Juce.getSliderState(id);
1190
- if ((normalisedValueRef === null || normalisedValueRef === void 0 ? void 0 : normalisedValueRef.current) !== newValue) {
1191
- !isLocalhost && sliderState.setNormalisedValue(clamp(newValue));
1192
- normalisedValueRef.current = newValue;
1260
+ var fixedNewValue = parseFloat(newValue.toFixed(2));
1261
+ if ((normalisedValueRef === null || normalisedValueRef === void 0 ? void 0 : normalisedValueRef.current) !== fixedNewValue) {
1262
+ !isLocalhost && sliderState.setNormalisedValue(clamp(fixedNewValue));
1263
+ normalisedValueRef.current = fixedNewValue;
1193
1264
  }
1194
1265
  };
1195
1266
  var setScaledState = function(newValue) {
1196
1267
  var sliderState = Juce.getSliderState(id);
1197
1268
  if ((scaledValueRef === null || scaledValueRef === void 0 ? void 0 : scaledValueRef.current) !== newValue) {
1198
1269
  !isLocalhost && properties && sliderState.setNormalisedValue(scaledToNormalised({
1199
- scaledValue: clamp(newValue, properties === null || properties === void 0 ? void 0 : properties.start, properties === null || properties === void 0 ? void 0 : properties.end),
1270
+ scaledValue: clamp(parseFloat(newValue.toFixed(2)), properties === null || properties === void 0 ? void 0 : properties.start, properties === null || properties === void 0 ? void 0 : properties.end),
1200
1271
  properties: properties
1201
1272
  }));
1202
1273
  scaledValueRef.current = newValue;
@@ -1212,7 +1283,8 @@ var useSlider = function(param) {
1212
1283
  }
1213
1284
  if (down) {
1214
1285
  var deltaVal = delta[1] * -1;
1215
- var newValue = (normalisedValue !== null && normalisedValue !== void 0 ? normalisedValue : 0) + deltaVal * // (properties?.interval && properties?.interval.toString().length > 4
1286
+ var _normalisedValueRef_current;
1287
+ var newValue = ((_normalisedValueRef_current = normalisedValueRef.current) !== null && _normalisedValueRef_current !== void 0 ? _normalisedValueRef_current : 0) + deltaVal * // (properties?.interval && properties?.interval.toString().length > 4
1216
1288
  // ? 4
1217
1289
  // : 0.4) *
1218
1290
  ((properties === null || properties === void 0 ? void 0 : properties.interval) || 0.01);
@@ -1227,33 +1299,65 @@ var useSlider = function(param) {
1227
1299
  }, {
1228
1300
  preventDefault: true
1229
1301
  });
1230
- var bindBarSliderDrag = useDrag(function(param) {
1231
- var down = param.down, event = param.event, first = param.first, last = param.last;
1232
- var _event_target;
1233
- var rect = event === null || event === void 0 ? void 0 : (_event_target = event.target) === null || _event_target === void 0 ? void 0 : _event_target.getBoundingClientRect();
1234
- var y = (event === null || event === void 0 ? void 0 : event.clientY) - rect.top;
1235
- if (first) {
1236
- //@ts-expect-error
1237
- window.__JUCE__.backend.emitEvent('jsDragStarted', {
1238
- i: "".concat(0)
1239
- });
1240
- }
1241
- if (down) {
1242
- // TODO: Increments?
1243
- var newValue = 1 - y / rect.height;
1244
- setNormalisedState(newValue);
1245
- }
1246
- if (last) {
1247
- //@ts-expect-error
1248
- window.__JUCE__.backend.emitEvent('jsDragEnded', {
1249
- i: "".concat(0)
1250
- });
1251
- }
1252
- }, {
1253
- preventDefault: true
1254
- });
1302
+ var bindBarSliderDrag = function() {
1303
+ var orientation = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Orientation.vertical;
1304
+ var drag = useDrag(function(param) {
1305
+ var down = param.down, event = param.event, first = param.first, last = param.last;
1306
+ var _event_target;
1307
+ var rect = event === null || event === void 0 ? void 0 : (_event_target = event.target) === null || _event_target === void 0 ? void 0 : _event_target.getBoundingClientRect();
1308
+ var y = (event === null || event === void 0 ? void 0 : event.clientY) - rect.top;
1309
+ var x = (event === null || event === void 0 ? void 0 : event.clientX) - rect.left;
1310
+ // 1138 - 1043.1
1311
+ if (first) {
1312
+ //@ts-expect-error
1313
+ window.__JUCE__.backend.emitEvent('jsDragStarted', {
1314
+ i: "".concat(0)
1315
+ });
1316
+ }
1317
+ // START
1318
+ // bottom: 685
1319
+ // height: 40
1320
+ // left: 733.5
1321
+ // right: 884.328125
1322
+ // top: 645
1323
+ // width: 150.828125
1324
+ // x: 733.5
1325
+ // y: 645
1326
+ // clientx 735
1327
+ // 735 - 733.5
1328
+ // END
1329
+ // bottom: 685
1330
+ // height: 40
1331
+ // left: 733.5
1332
+ // right: 884.328125
1333
+ // top: 645
1334
+ // width: 150.828125
1335
+ // x: 733.5
1336
+ // y: 645
1337
+ // clientx: 883
1338
+ if (down) {
1339
+ // TODO: Increments?
1340
+ var newValue;
1341
+ if (orientation === Orientation.vertical) {
1342
+ newValue = 1 - y / rect.height;
1343
+ } else {
1344
+ newValue = x / rect.width;
1345
+ }
1346
+ setNormalisedState(newValue);
1347
+ }
1348
+ if (last) {
1349
+ //@ts-expect-error
1350
+ window.__JUCE__.backend.emitEvent('jsDragEnded', {
1351
+ i: "".concat(0)
1352
+ });
1353
+ }
1354
+ }, {
1355
+ preventDefault: true
1356
+ });
1357
+ return drag();
1358
+ };
1255
1359
  var onMouseEnter = function() {
1256
- if ((scaledValueRef === null || scaledValueRef === void 0 ? void 0 : scaledValueRef.current) !== scaledValue) {
1360
+ if (displayValInHeader && (scaledValueRef === null || scaledValueRef === void 0 ? void 0 : scaledValueRef.current) !== scaledValue) {
1257
1361
  setHighlightedItem({
1258
1362
  label: label,
1259
1363
  value: scaledValue
@@ -1263,6 +1367,12 @@ var useSlider = function(param) {
1263
1367
  // TODO: Refactor
1264
1368
  // const onChangeStarted = () => sliderState.sliderDragStarted();
1265
1369
  // const onChangeCommitted = () => sliderState.sliderDragEnded();
1370
+ // useEffect(() => {
1371
+ // console.log(
1372
+ // normalisedValueRef.current,
1373
+ // 'normalisedValueRef.currentnormalisedValueRef.currentnormalisedValueRef.currentnormalisedValueRef.currentnormalisedValueRef.currentnormalisedValueRef.current',
1374
+ // );
1375
+ // }, [normalisedValueRef.current]);
1266
1376
  return {
1267
1377
  setNormalisedState: setNormalisedState,
1268
1378
  setScaledState: setScaledState,
@@ -1271,7 +1381,7 @@ var useSlider = function(param) {
1271
1381
  onMouseEnter: onMouseEnter,
1272
1382
  bindBarSliderDrag: bindBarSliderDrag,
1273
1383
  bindDrag: bindDrag,
1274
- normalisedValue: normalisedValue,
1384
+ normalisedValue: normalisedValueRef.current || 0,
1275
1385
  scaledValue: scaledValue,
1276
1386
  properties: properties
1277
1387
  };
@@ -1305,7 +1415,7 @@ var LayoutTags = /*#__PURE__*/ function(LayoutTags) {
1305
1415
  return LayoutTags;
1306
1416
  }({});
1307
1417
 
1308
- function _define_property$a(obj, key, value) {
1418
+ function _define_property$f(obj, key, value) {
1309
1419
  if (key in obj) {
1310
1420
  Object.defineProperty(obj, key, {
1311
1421
  value: value,
@@ -1318,7 +1428,7 @@ function _define_property$a(obj, key, value) {
1318
1428
  }
1319
1429
  return obj;
1320
1430
  }
1321
- function _object_spread$a(target) {
1431
+ function _object_spread$f(target) {
1322
1432
  for(var i = 1; i < arguments.length; i++){
1323
1433
  var source = arguments[i] != null ? arguments[i] : {};
1324
1434
  var ownKeys = Object.keys(source);
@@ -1328,31 +1438,96 @@ function _object_spread$a(target) {
1328
1438
  }));
1329
1439
  }
1330
1440
  ownKeys.forEach(function(key) {
1331
- _define_property$a(target, key, source[key]);
1441
+ _define_property$f(target, key, source[key]);
1442
+ });
1443
+ }
1444
+ return target;
1445
+ }
1446
+ function ownKeys$2(object, enumerableOnly) {
1447
+ var keys = Object.keys(object);
1448
+ if (Object.getOwnPropertySymbols) {
1449
+ var symbols = Object.getOwnPropertySymbols(object);
1450
+ keys.push.apply(keys, symbols);
1451
+ }
1452
+ return keys;
1453
+ }
1454
+ function _object_spread_props$2(target, source) {
1455
+ source = source != null ? source : {};
1456
+ if (Object.getOwnPropertyDescriptors) {
1457
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1458
+ } else {
1459
+ ownKeys$2(Object(source)).forEach(function(key) {
1460
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1332
1461
  });
1333
1462
  }
1334
1463
  return target;
1335
1464
  }
1465
+ function _object_without_properties(source, excluded) {
1466
+ if (source == null) return {};
1467
+ var target = _object_without_properties_loose(source, excluded);
1468
+ var key, i;
1469
+ if (Object.getOwnPropertySymbols) {
1470
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
1471
+ for(i = 0; i < sourceSymbolKeys.length; i++){
1472
+ key = sourceSymbolKeys[i];
1473
+ if (excluded.indexOf(key) >= 0) continue;
1474
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
1475
+ target[key] = source[key];
1476
+ }
1477
+ }
1478
+ return target;
1479
+ }
1480
+ function _object_without_properties_loose(source, excluded) {
1481
+ if (source == null) return {};
1482
+ var target = {};
1483
+ var sourceKeys = Object.keys(source);
1484
+ var key, i;
1485
+ for(i = 0; i < sourceKeys.length; i++){
1486
+ key = sourceKeys[i];
1487
+ if (excluded.indexOf(key) >= 0) continue;
1488
+ target[key] = source[key];
1489
+ }
1490
+ return target;
1491
+ }
1336
1492
  var BoxDisplay = /*#__PURE__*/ function(BoxDisplay) {
1337
1493
  BoxDisplay["flex"] = "flex";
1338
1494
  BoxDisplay["block"] = "block";
1339
1495
  return BoxDisplay;
1340
1496
  }(BoxDisplay || {});
1341
- function Box(param) {
1342
- var className = param.className, style = param.style, children = param.children, flex = param.flex, key = param.key, onClick = param.onClick, _param_alignItems = param.alignItems, alignItems = _param_alignItems === void 0 ? AlignItems.center : _param_alignItems, _param_justifyContent = param.justifyContent, justifyContent = _param_justifyContent === void 0 ? JustifyContent.center : _param_justifyContent, _param_display = param.display, display = _param_display === void 0 ? "flex" : _param_display, _param_width = param.width, width = _param_width === void 0 ? Width.auto : _param_width, _param_flexWrap = param.flexWrap, flexWrap = _param_flexWrap === void 0 ? FlexWrap.noWrap : _param_flexWrap, _param_height = param.height, height = _param_height === void 0 ? Height.auto : _param_height, _param_border = param.border, border = _param_border === void 0 ? false : _param_border, _param_flexDirection = param.flexDirection, flexDirection = _param_flexDirection === void 0 ? FlexDirection.row : _param_flexDirection, _param_padding = param.padding, padding = _param_padding === void 0 ? [
1497
+ function Box(_param) {
1498
+ var className = _param.className, style = _param.style, children = _param.children, flex = _param.flex, key = _param.key, onClick = _param.onClick, _param_alignItems = _param.alignItems, alignItems = _param_alignItems === void 0 ? AlignItems.center : _param_alignItems, _param_justifyContent = _param.justifyContent, justifyContent = _param_justifyContent === void 0 ? JustifyContent.center : _param_justifyContent, _param_display = _param.display, display = _param_display === void 0 ? "flex" : _param_display, _param_width = _param.width, width = _param_width === void 0 ? Width.auto : _param_width, _param_flexWrap = _param.flexWrap, flexWrap = _param_flexWrap === void 0 ? FlexWrap.noWrap : _param_flexWrap, _param_height = _param.height, height = _param_height === void 0 ? Height.auto : _param_height, _param_border = _param.border, border = _param_border === void 0 ? false : _param_border, _param_flexDirection = _param.flexDirection, flexDirection = _param_flexDirection === void 0 ? FlexDirection.row : _param_flexDirection, _param_padding = _param.padding, padding = _param_padding === void 0 ? [
1343
1499
  Spacing.none,
1344
1500
  Spacing.none,
1345
1501
  Spacing.none,
1346
1502
  Spacing.none
1347
- ] : _param_padding, _param_gap = param.gap, gap = _param_gap === void 0 ? Spacing.xSmall : _param_gap, _param_tag = param.tag, tag = _param_tag === void 0 ? LayoutTags.div : _param_tag;
1503
+ ] : _param_padding, _param_gap = _param.gap, gap = _param_gap === void 0 ? Spacing.xSmall : _param_gap, _param_tag = _param.tag, tag = _param_tag === void 0 ? LayoutTags.div : _param_tag, rest = _object_without_properties(_param, [
1504
+ "className",
1505
+ "style",
1506
+ "children",
1507
+ "flex",
1508
+ "key",
1509
+ "onClick",
1510
+ "alignItems",
1511
+ "justifyContent",
1512
+ "display",
1513
+ "width",
1514
+ "flexWrap",
1515
+ "height",
1516
+ "border",
1517
+ "flexDirection",
1518
+ "padding",
1519
+ "gap",
1520
+ "tag"
1521
+ ]);
1348
1522
  var Tag = tag;
1349
1523
  var _padding_, _padding_1, _padding_2, _ref;
1350
- return /*#__PURE__*/ React__default.createElement(Tag, {
1524
+ return /*#__PURE__*/ React__default.createElement(Tag, _object_spread_props$2(_object_spread$f({
1351
1525
  // id="globalValues"
1352
1526
  key: key,
1353
1527
  className: className,
1354
- onClick: onClick,
1355
- style: _object_spread$a({
1528
+ onClick: onClick
1529
+ }, rest), {
1530
+ style: _object_spread$f({
1356
1531
  flexWrap: flexWrap,
1357
1532
  display: display,
1358
1533
  gap: "var(--gap-".concat(gap, ")"),
@@ -1369,7 +1544,7 @@ function Box(param) {
1369
1544
  alignItems: "".concat(alignItems),
1370
1545
  flex: flex ? flex : ''
1371
1546
  }, style)
1372
- }, children);
1547
+ }), children);
1373
1548
  }
1374
1549
  // Object.assign(Layout, width, height, ALIGN, JUSTIFY, DIRECTION, SPACING);
1375
1550
  Box.display = BoxDisplay;
@@ -1383,7 +1558,7 @@ Box.padding = Spacing;
1383
1558
  Box.flexWrap = FlexWrap;
1384
1559
  Box.tag = LayoutTags;
1385
1560
 
1386
- function _define_property$9(obj, key, value) {
1561
+ function _define_property$e(obj, key, value) {
1387
1562
  if (key in obj) {
1388
1563
  Object.defineProperty(obj, key, {
1389
1564
  value: value,
@@ -1396,7 +1571,7 @@ function _define_property$9(obj, key, value) {
1396
1571
  }
1397
1572
  return obj;
1398
1573
  }
1399
- function _object_spread$9(target) {
1574
+ function _object_spread$e(target) {
1400
1575
  for(var i = 1; i < arguments.length; i++){
1401
1576
  var source = arguments[i] != null ? arguments[i] : {};
1402
1577
  var ownKeys = Object.keys(source);
@@ -1406,7 +1581,7 @@ function _object_spread$9(target) {
1406
1581
  }));
1407
1582
  }
1408
1583
  ownKeys.forEach(function(key) {
1409
- _define_property$9(target, key, source[key]);
1584
+ _define_property$e(target, key, source[key]);
1410
1585
  });
1411
1586
  }
1412
1587
  return target;
@@ -1419,7 +1594,7 @@ function Label(param) {
1419
1594
  return /*#__PURE__*/ React.createElement("label", {
1420
1595
  id: id,
1421
1596
  htmlFor: htmlFor,
1422
- style: _object_spread$9({
1597
+ style: _object_spread$e({
1423
1598
  fontSize: "var(--text-".concat(fontSize),
1424
1599
  paddingTop: "var(--p-".concat(padding[0], ")"),
1425
1600
  paddingRight: "var(--p-".concat((_padding_ = padding[1]) !== null && _padding_ !== void 0 ? _padding_ : padding[0], ")"),
@@ -1434,10 +1609,10 @@ function Label(param) {
1434
1609
  Label.padding = Spacing;
1435
1610
  Label.fontSize = FontSizes;
1436
1611
 
1437
- var css_248z$4 = ".RotarySlider {\n position: relative;\n height: 50px;\n width: 50px;\n border-radius: 50%;\n aspect-ratio: 1 / 1;\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 border-color: var(--bg-popover) transparent var(--bg-popover) transparent;\n width: 0;\n height: 0;\n border-style: solid;\n border-width: 0 7px 10px 7px;\n transform: rotate(180deg);\n padding-bottom: var(--spacing-sm);\n}\n";
1438
- styleInject(css_248z$4);
1612
+ var css_248z$6 = ".RotarySlider {\n position: relative;\n height: 50px;\n width: 50px;\n border-radius: 50%;\n aspect-ratio: 1 / 1;\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 border-color: var(--bg-popover) transparent var(--bg-popover) transparent;\n width: 0;\n height: 0;\n border-style: solid;\n border-width: 0 7px 10px 7px;\n transform: rotate(180deg);\n padding-bottom: var(--spacing-sm);\n}\n";
1613
+ styleInject(css_248z$6);
1439
1614
 
1440
- function _define_property$8(obj, key, value) {
1615
+ function _define_property$d(obj, key, value) {
1441
1616
  if (key in obj) {
1442
1617
  Object.defineProperty(obj, key, {
1443
1618
  value: value,
@@ -1450,7 +1625,7 @@ function _define_property$8(obj, key, value) {
1450
1625
  }
1451
1626
  return obj;
1452
1627
  }
1453
- function _object_spread$8(target) {
1628
+ function _object_spread$d(target) {
1454
1629
  for(var i = 1; i < arguments.length; i++){
1455
1630
  var source = arguments[i] != null ? arguments[i] : {};
1456
1631
  var ownKeys = Object.keys(source);
@@ -1460,7 +1635,7 @@ function _object_spread$8(target) {
1460
1635
  }));
1461
1636
  }
1462
1637
  ownKeys.forEach(function(key) {
1463
- _define_property$8(target, key, source[key]);
1638
+ _define_property$d(target, key, source[key]);
1464
1639
  });
1465
1640
  }
1466
1641
  return target;
@@ -1485,7 +1660,7 @@ function _object_spread_props$1(target, source) {
1485
1660
  return target;
1486
1661
  }
1487
1662
  function RotarySlider(param) {
1488
- var _param_polarity = param.polarity, polarity = _param_polarity === void 0 ? SliderPolarity.linear : _param_polarity, label = param.label, className = param.className, id = param.id, onChange = param.onChange, _param_rotationBehavior = param.rotationBehavior, rotationBehavior = _param_rotationBehavior === void 0 ? SliderRotationBehavior.rotateIndicator : _param_rotationBehavior, _param_mockInitialNormalisedValue = param.// Mocks the initial scaled value of the slider for web veiws outside of JUCE
1663
+ var _param_polarity = param.polarity, polarity = _param_polarity === void 0 ? Polarity.linear : _param_polarity, label = param.label, className = param.className, id = param.id, onChange = param.onChange, _param_rotationBehavior = param.rotationBehavior, rotationBehavior = _param_rotationBehavior === void 0 ? SliderRotationBehavior.rotateIndicator : _param_rotationBehavior, _param_mockInitialNormalisedValue = param.// Mocks the initial scaled value of the slider for web veiws outside of JUCE
1489
1664
  mockInitialNormalisedValue, mockInitialNormalisedValue = _param_mockInitialNormalisedValue === void 0 ? 0 : _param_mockInitialNormalisedValue, _param_isRandomizable = param.isRandomizable, isRandomizable = _param_isRandomizable === void 0 ? false : _param_isRandomizable, _param_mockProperties = param.mockProperties, mockProperties = _param_mockProperties === void 0 ? {
1490
1665
  start: 20.0,
1491
1666
  end: 15000.0,
@@ -1499,34 +1674,26 @@ function RotarySlider(param) {
1499
1674
  mockInitialNormalisedValue: mockInitialNormalisedValue,
1500
1675
  onChange: onChange,
1501
1676
  isRandomizable: isRandomizable
1502
- }), bindDrag = _useSlider.bindDrag, normalisedValue = _useSlider.normalisedValue, scaledValue = _useSlider.scaledValue, onMouseEnter = _useSlider.onMouseEnter;
1677
+ }), bindDrag = _useSlider.bindDrag, normalisedValue = _useSlider.normalisedValue, onMouseEnter = _useSlider.onMouseEnter;
1503
1678
  return /*#__PURE__*/ React__default.createElement(Box, {
1504
1679
  flexDirection: Box.flexDirection.column
1505
- }, polarity === SliderPolarity.bipolar && /*#__PURE__*/ React__default.createElement("div", {
1680
+ }, polarity === Polarity.bipolar && /*#__PURE__*/ React__default.createElement("div", {
1506
1681
  className: classnames('RotarySlider-center-marker')
1507
- }), /*#__PURE__*/ React__default.createElement("div", _object_spread_props$1(_object_spread$8({
1508
- className: classnames('RotarySlider', polarity === SliderPolarity.linear ? 'Slider-polarity-linear' : 'Slider-polarity-bipolar', className)
1682
+ }), /*#__PURE__*/ React__default.createElement("div", _object_spread_props$1(_object_spread$d({
1683
+ className: classnames('RotarySlider', polarity === Polarity.linear ? 'Slider-polarity-linear' : 'Slider-polarity-bipolar', className)
1509
1684
  }, bindDrag()), {
1510
1685
  onMouseEnter: onMouseEnter,
1511
- style: _object_spread$8({
1686
+ style: _object_spread$d({
1512
1687
  touchAction: 'none'
1513
1688
  }, style)
1514
1689
  }), normalisedValue !== null ? /*#__PURE__*/ React__default.createElement("div", {
1515
1690
  className: classnames('RotarySlider-Inner'),
1516
- style: _object_spread$8({
1517
- rotate: rotationBehavior === SliderRotationBehavior.rotateIndicator ? "".concat(polarity === SliderPolarity.linear ? normalisedValue : normalisedValue + 0.5, "turn") : ''
1518
- }, getTransformString({
1519
- sliderType: SliderType.rotary,
1520
- polarity: polarity,
1521
- normalisedValue: normalisedValue,
1522
- scaledValue: scaledValue
1523
- }), getPosition({
1524
- sliderType: SliderType.rotary,
1525
- polarity: polarity
1526
- }))
1691
+ style: {
1692
+ rotate: rotationBehavior === SliderRotationBehavior.rotateIndicator ? "".concat(polarity === Polarity.linear ? normalisedValue : normalisedValue + 0.5, "turn") : ''
1693
+ }
1527
1694
  }, /*#__PURE__*/ React__default.createElement("div", {
1528
1695
  className: classnames('RotarySlider-Indicator'),
1529
- style: _object_spread$8({
1696
+ style: _object_spread$d({
1530
1697
  backgroundColor: color
1531
1698
  }, style)
1532
1699
  })) : ''), /*#__PURE__*/ React__default.createElement(Label, {
@@ -1537,9 +1704,9 @@ function RotarySlider(param) {
1537
1704
  value: label
1538
1705
  }));
1539
1706
  }
1540
- RotarySlider.sliderPolarity = SliderPolarity;
1707
+ RotarySlider.sliderPolarity = Polarity;
1541
1708
 
1542
- function _define_property$7(obj, key, value) {
1709
+ function _define_property$c(obj, key, value) {
1543
1710
  if (key in obj) {
1544
1711
  Object.defineProperty(obj, key, {
1545
1712
  value: value,
@@ -1552,7 +1719,7 @@ function _define_property$7(obj, key, value) {
1552
1719
  }
1553
1720
  return obj;
1554
1721
  }
1555
- function _object_spread$7(target) {
1722
+ function _object_spread$c(target) {
1556
1723
  for(var i = 1; i < arguments.length; i++){
1557
1724
  var source = arguments[i] != null ? arguments[i] : {};
1558
1725
  var ownKeys = Object.keys(source);
@@ -1562,7 +1729,7 @@ function _object_spread$7(target) {
1562
1729
  }));
1563
1730
  }
1564
1731
  ownKeys.forEach(function(key) {
1565
- _define_property$7(target, key, source[key]);
1732
+ _define_property$c(target, key, source[key]);
1566
1733
  });
1567
1734
  }
1568
1735
  return target;
@@ -1587,7 +1754,7 @@ function _object_spread_props(target, source) {
1587
1754
  return target;
1588
1755
  }
1589
1756
  function Slider(param) {
1590
- var _param_polarity = param.polarity, polarity = _param_polarity === void 0 ? SliderPolarity.linear : _param_polarity, _param_sliderOrientation = param.sliderOrientation, sliderOrientation = _param_sliderOrientation === void 0 ? SliderOrientation.vertical : _param_sliderOrientation, _param_isRandomizable = param.isRandomizable, isRandomizable = _param_isRandomizable === void 0 ? false : _param_isRandomizable, className = param.className, id = param.id, onChange = param.onChange, style = param.style, color = param.color, label = param.label, _param_mockInitialNormalisedValue = param.// Mocks the initial scaled value of the slider for web veiws outside of JUCE
1757
+ var _param_polarity = param.polarity, polarity = _param_polarity === void 0 ? Polarity.linear : _param_polarity, _param_sliderOrientation = param.sliderOrientation, sliderOrientation = _param_sliderOrientation === void 0 ? Orientation.vertical : _param_sliderOrientation, _param_isRandomizable = param.isRandomizable, isRandomizable = _param_isRandomizable === void 0 ? false : _param_isRandomizable, className = param.className, id = param.id, onChange = param.onChange, style = param.style, color = param.color, label = param.label, _param_mockInitialNormalisedValue = param.// Mocks the initial scaled value of the slider for web veiws outside of JUCE
1591
1758
  mockInitialNormalisedValue, mockInitialNormalisedValue = _param_mockInitialNormalisedValue === void 0 ? 0 : _param_mockInitialNormalisedValue, _param_mockProperties = param.mockProperties, mockProperties = _param_mockProperties === void 0 ? {
1592
1759
  start: 20.0,
1593
1760
  end: 15000.0,
@@ -1599,46 +1766,36 @@ function Slider(param) {
1599
1766
  label: label,
1600
1767
  mockProperties: mockProperties,
1601
1768
  mockInitialNormalisedValue: mockInitialNormalisedValue,
1602
- sliderOrientation: sliderOrientation,
1603
1769
  onChange: onChange,
1604
1770
  isRandomizable: isRandomizable
1605
- }), bindBarSliderDrag = _useSlider.bindBarSliderDrag, normalisedValue = _useSlider.normalisedValue, scaledValue = _useSlider.scaledValue, onMouseEnter = _useSlider.onMouseEnter;
1771
+ }), bindBarSliderDrag = _useSlider.bindBarSliderDrag, normalisedValue = _useSlider.normalisedValue, onMouseEnter = _useSlider.onMouseEnter;
1606
1772
  return /*#__PURE__*/ React__default.createElement(Box, {
1607
1773
  flexDirection: Box.flexDirection.column,
1608
1774
  justifyContent: Box.justifyContent.center,
1609
1775
  className: classnames(className)
1610
- }, polarity === SliderPolarity.bipolar && /*#__PURE__*/ React__default.createElement("div", {
1776
+ }, polarity === Polarity.bipolar && /*#__PURE__*/ React__default.createElement("div", {
1611
1777
  className: 'Slider-center-marker'
1612
- }), /*#__PURE__*/ React__default.createElement("div", _object_spread_props(_object_spread$7({
1778
+ }), /*#__PURE__*/ React__default.createElement("div", _object_spread_props(_object_spread$c({
1613
1779
  className: classnames('Slider-bar', 'relative')
1614
1780
  }, bindBarSliderDrag()), {
1615
1781
  onMouseEnter: onMouseEnter,
1616
- style: _object_spread$7({
1782
+ style: _object_spread$c({
1617
1783
  touchAction: 'none',
1618
1784
  backgroundColor: 'var(--bg-input)',
1619
- minWidth: sliderOrientation === SliderOrientation.horizontal ? '100px' : '20px',
1620
- minHeight: sliderOrientation === SliderOrientation.horizontal ? '20px' : '75px'
1785
+ minWidth: sliderOrientation === Orientation.horizontal ? '100px' : '20px',
1786
+ minHeight: sliderOrientation === Orientation.horizontal ? '20px' : '75px'
1621
1787
  }, style)
1622
1788
  }), normalisedValue ? /*#__PURE__*/ React__default.createElement("div", {
1623
1789
  // TODO: Why aren't the Tailwind classes working?
1624
1790
  // className={classnames('h-full', 'w-full', 'absolute', 'bg-input')}
1625
- style: _object_spread$7(_object_spread_props(_object_spread$7({
1626
- height: '100%',
1627
- width: '100%',
1791
+ style: _object_spread$c({
1628
1792
  position: 'absolute',
1629
- backgroundColor: color
1630
- }, getPosition({
1631
- sliderType: SliderType.bar,
1632
- sliderOrientation: sliderOrientation,
1633
- polarity: polarity
1634
- })), {
1793
+ backgroundColor: color,
1635
1794
  pointerEvents: 'none'
1636
- }), getTransformString({
1637
- sliderType: SliderType.bar,
1638
- sliderOrientation: sliderOrientation,
1795
+ }, getBarTransformStyles({
1796
+ orientation: sliderOrientation,
1639
1797
  polarity: polarity,
1640
- normalisedValue: normalisedValue,
1641
- scaledValue: scaledValue
1798
+ value: normalisedValue * 100
1642
1799
  }))
1643
1800
  }) : ''), /*#__PURE__*/ React__default.createElement(Label, {
1644
1801
  padding: [
@@ -1649,8 +1806,8 @@ function Slider(param) {
1649
1806
  }));
1650
1807
  }
1651
1808
  Slider.sliderType = SliderType;
1652
- Slider.sliderPolarity = SliderPolarity;
1653
- Slider.sliderOrientation = SliderOrientation;
1809
+ Slider.sliderPolarity = Polarity;
1810
+ Slider.sliderOrientation = Orientation;
1654
1811
 
1655
1812
  function SliderValue(param) {
1656
1813
  var value = param.value, min = param.min, max = param.max, minLength = param.minLength, maxLength = param.maxLength, isEditable = param.isEditable, onChange = param.onChange, className = param.className, style = param.style;
@@ -1678,7 +1835,7 @@ var HeadingTags = /*#__PURE__*/ function(HeadingTags) {
1678
1835
  return HeadingTags;
1679
1836
  }({});
1680
1837
 
1681
- function _define_property$6(obj, key, value) {
1838
+ function _define_property$b(obj, key, value) {
1682
1839
  if (key in obj) {
1683
1840
  Object.defineProperty(obj, key, {
1684
1841
  value: value,
@@ -1691,7 +1848,7 @@ function _define_property$6(obj, key, value) {
1691
1848
  }
1692
1849
  return obj;
1693
1850
  }
1694
- function _object_spread$6(target) {
1851
+ function _object_spread$b(target) {
1695
1852
  for(var i = 1; i < arguments.length; i++){
1696
1853
  var source = arguments[i] != null ? arguments[i] : {};
1697
1854
  var ownKeys = Object.keys(source);
@@ -1701,7 +1858,7 @@ function _object_spread$6(target) {
1701
1858
  }));
1702
1859
  }
1703
1860
  ownKeys.forEach(function(key) {
1704
- _define_property$6(target, key, source[key]);
1861
+ _define_property$b(target, key, source[key]);
1705
1862
  });
1706
1863
  }
1707
1864
  return target;
@@ -1714,7 +1871,7 @@ function Heading(param) {
1714
1871
  var _padding_, _padding_1, _padding_2, _ref;
1715
1872
  return /*#__PURE__*/ React.createElement(Tag, {
1716
1873
  id: id,
1717
- style: _object_spread$6({
1874
+ style: _object_spread$b({
1718
1875
  fontSize: "var(--text-".concat(fontSize),
1719
1876
  paddingTop: "var(--p-".concat(padding[0], ")"),
1720
1877
  paddingRight: "var(--p-".concat((_padding_ = padding[1]) !== null && _padding_ !== void 0 ? _padding_ : padding[0], ")"),
@@ -1730,51 +1887,15 @@ Heading.fontSize = FontSizes;
1730
1887
  Heading.tag = HeadingTags;
1731
1888
  Heading.padding = Spacing;
1732
1889
 
1733
- var Matrix = function(param) {
1734
- var rows = param.rows, columns = param.columns;
1735
- return /*#__PURE__*/ React__default.createElement(Box, {
1736
- flexDirection: Box.flexDirection.column,
1737
- gap: Box.gap.xSmall
1738
- }, /*#__PURE__*/ React__default.createElement(Box, null, /*#__PURE__*/ React__default.createElement(Box, {
1739
- className: classnames('m-xs', 'flex-1'),
1740
- padding: [
1741
- Spacing.medium
1742
- ]
1743
- }, "Target"), columns.map(function(item) {
1744
- var colKey = v4();
1745
- return /*#__PURE__*/ React__default.createElement(Box, {
1746
- key: colKey,
1747
- className: classnames('m-xs', 'flex-1'),
1748
- padding: [
1749
- Spacing.medium
1750
- ]
1751
- }, item === null || item === void 0 ? void 0 : item.label);
1752
- })), rows.map(function(item) {
1753
- var rowKey = v4();
1754
- return /*#__PURE__*/ React__default.createElement(Box, {
1755
- key: rowKey
1756
- }, Object.values(item).map(function(value, i) {
1757
- var colKey = v4();
1758
- return /*#__PURE__*/ React__default.createElement(Box, {
1759
- key: colKey,
1760
- className: classnames(i === 0 ? 'bg-section' : ''),
1761
- padding: [
1762
- Spacing.medium
1763
- ]
1764
- }, value);
1765
- }));
1766
- }));
1767
- };
1768
-
1769
- function _array_like_to_array$3(arr, len) {
1890
+ function _array_like_to_array$7(arr, len) {
1770
1891
  if (len == null || len > arr.length) len = arr.length;
1771
1892
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1772
1893
  return arr2;
1773
1894
  }
1774
- function _array_with_holes$3(arr) {
1895
+ function _array_with_holes$7(arr) {
1775
1896
  if (Array.isArray(arr)) return arr;
1776
1897
  }
1777
- function _iterable_to_array_limit$3(arr, i) {
1898
+ function _iterable_to_array_limit$7(arr, i) {
1778
1899
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1779
1900
  if (_i == null) return;
1780
1901
  var _arr = [];
@@ -1798,26 +1919,26 @@ function _iterable_to_array_limit$3(arr, i) {
1798
1919
  }
1799
1920
  return _arr;
1800
1921
  }
1801
- function _non_iterable_rest$3() {
1922
+ function _non_iterable_rest$7() {
1802
1923
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1803
1924
  }
1804
- function _sliced_to_array$3(arr, i) {
1805
- return _array_with_holes$3(arr) || _iterable_to_array_limit$3(arr, i) || _unsupported_iterable_to_array$3(arr, i) || _non_iterable_rest$3();
1925
+ function _sliced_to_array$7(arr, i) {
1926
+ return _array_with_holes$7(arr) || _iterable_to_array_limit$7(arr, i) || _unsupported_iterable_to_array$7(arr, i) || _non_iterable_rest$7();
1806
1927
  }
1807
- function _unsupported_iterable_to_array$3(o, minLen) {
1928
+ function _unsupported_iterable_to_array$7(o, minLen) {
1808
1929
  if (!o) return;
1809
- if (typeof o === "string") return _array_like_to_array$3(o, minLen);
1930
+ if (typeof o === "string") return _array_like_to_array$7(o, minLen);
1810
1931
  var n = Object.prototype.toString.call(o).slice(8, -1);
1811
1932
  if (n === "Object" && o.constructor) n = o.constructor.name;
1812
1933
  if (n === "Map" || n === "Set") return Array.from(n);
1813
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
1934
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
1814
1935
  }
1815
1936
  // 20.0f, 15000.0f, 0.1f, 0.7f),800.0f
1816
1937
  // ValueType rangeStart, ValueType rangeEnd, ValueType intervalValue, ValueType skewFactor, bool useSymmetricSkew=false)
1817
1938
  var useIndicator = function(param) {
1818
1939
  var id = param.id;
1819
1940
  var isLocalhost = window.location.hostname === 'localhost';
1820
- var _useState = _sliced_to_array$3(useState(0), 2), isActive = _useState[0], setIsActive = _useState[1];
1941
+ var _useState = _sliced_to_array$7(useState(0), 2), isActive = _useState[0], setIsActive = _useState[1];
1821
1942
  // Set the initial state
1822
1943
  useEffect(function() {
1823
1944
  if (!isLocalhost) {
@@ -1851,7 +1972,7 @@ var useIndicator = function(param) {
1851
1972
  };
1852
1973
  };
1853
1974
 
1854
- function _define_property$5(obj, key, value) {
1975
+ function _define_property$a(obj, key, value) {
1855
1976
  if (key in obj) {
1856
1977
  Object.defineProperty(obj, key, {
1857
1978
  value: value,
@@ -1864,7 +1985,7 @@ function _define_property$5(obj, key, value) {
1864
1985
  }
1865
1986
  return obj;
1866
1987
  }
1867
- function _object_spread$5(target) {
1988
+ function _object_spread$a(target) {
1868
1989
  for(var i = 1; i < arguments.length; i++){
1869
1990
  var source = arguments[i] != null ? arguments[i] : {};
1870
1991
  var ownKeys = Object.keys(source);
@@ -1874,7 +1995,7 @@ function _object_spread$5(target) {
1874
1995
  }));
1875
1996
  }
1876
1997
  ownKeys.forEach(function(key) {
1877
- _define_property$5(target, key, source[key]);
1998
+ _define_property$a(target, key, source[key]);
1878
1999
  });
1879
2000
  }
1880
2001
  return target;
@@ -1891,7 +2012,7 @@ function IndicatorLight(param) {
1891
2012
  }, /*#__PURE__*/ React__default.createElement("div", {
1892
2013
  id: id,
1893
2014
  className: classnames('IndicatorLight', 'bg-input', className),
1894
- style: _object_spread$5({
2015
+ style: _object_spread$a({
1895
2016
  width: '12px',
1896
2017
  height: '12px',
1897
2018
  background: isActive ? color : ''
@@ -1901,10 +2022,10 @@ function IndicatorLight(param) {
1901
2022
  }) : null);
1902
2023
  }
1903
2024
 
1904
- var css_248z$3 = ".IconButton:hover:not(:disabled) {\n filter: brightness(80%);\n}\n\nsvg {\n height: 100%;\n width: 100%;\n}\n";
1905
- styleInject(css_248z$3);
2025
+ var css_248z$5 = ".IconButton:hover:not(:disabled) {\n filter: brightness(80%);\n}\n\nsvg {\n height: 100%;\n width: 100%;\n}\n";
2026
+ styleInject(css_248z$5);
1906
2027
 
1907
- function _define_property$4(obj, key, value) {
2028
+ function _define_property$9(obj, key, value) {
1908
2029
  if (key in obj) {
1909
2030
  Object.defineProperty(obj, key, {
1910
2031
  value: value,
@@ -1917,7 +2038,7 @@ function _define_property$4(obj, key, value) {
1917
2038
  }
1918
2039
  return obj;
1919
2040
  }
1920
- function _object_spread$4(target) {
2041
+ function _object_spread$9(target) {
1921
2042
  for(var i = 1; i < arguments.length; i++){
1922
2043
  var source = arguments[i] != null ? arguments[i] : {};
1923
2044
  var ownKeys = Object.keys(source);
@@ -1927,21 +2048,23 @@ function _object_spread$4(target) {
1927
2048
  }));
1928
2049
  }
1929
2050
  ownKeys.forEach(function(key) {
1930
- _define_property$4(target, key, source[key]);
2051
+ _define_property$9(target, key, source[key]);
1931
2052
  });
1932
2053
  }
1933
2054
  return target;
1934
2055
  }
1935
- var ButtonIcon = /*#__PURE__*/ function(ButtonIcon) {
1936
- ButtonIcon["undo"] = "Undo";
1937
- ButtonIcon["redo"] = "Redo";
1938
- ButtonIcon["random"] = "Random";
1939
- ButtonIcon["favorite"] = "Favorite";
1940
- ButtonIcon["up"] = "Up";
1941
- ButtonIcon["down"] = "Down";
1942
- ButtonIcon["save"] = "Save";
1943
- return ButtonIcon;
1944
- }(ButtonIcon || {});
2056
+ var Icons = /*#__PURE__*/ function(Icons) {
2057
+ Icons["undo"] = "Undo";
2058
+ Icons["redo"] = "Redo";
2059
+ Icons["random"] = "Random";
2060
+ Icons["favorite"] = "Favorite";
2061
+ Icons["up"] = "Up";
2062
+ Icons["down"] = "Down";
2063
+ Icons["save"] = "Save";
2064
+ Icons["add"] = "Add";
2065
+ Icons["delete"] = "Delete";
2066
+ return Icons;
2067
+ }({});
1945
2068
  var Undo = function(param) {
1946
2069
  var color = param.color;
1947
2070
  return /*#__PURE__*/ React__default.createElement("svg", {
@@ -2110,26 +2233,113 @@ var Random = function(param) {
2110
2233
  "stroke-linejoin": "round"
2111
2234
  }));
2112
2235
  };
2113
- var icons = {
2236
+ var Add = function(param) {
2237
+ var color = param.color;
2238
+ return /*#__PURE__*/ React__default.createElement("svg", {
2239
+ width: "24px",
2240
+ height: "24px",
2241
+ "stroke-width": "1.5",
2242
+ viewBox: "0 0 24 24",
2243
+ fill: "none",
2244
+ xmlns: "http://www.w3.org/2000/svg",
2245
+ color: color
2246
+ }, /*#__PURE__*/ React__default.createElement("path", {
2247
+ d: "M6 12H12M18 12H12M12 12V6M12 12V18",
2248
+ stroke: color,
2249
+ "stroke-width": "1.5",
2250
+ "stroke-linecap": "round",
2251
+ "stroke-linejoin": "round"
2252
+ }));
2253
+ };
2254
+ var Delete = function(param) {
2255
+ var color = param.color;
2256
+ return /*#__PURE__*/ React__default.createElement("svg", {
2257
+ width: "24px",
2258
+ height: "24px",
2259
+ viewBox: "0 0 24 24",
2260
+ fill: "none",
2261
+ xmlns: "http://www.w3.org/2000/svg",
2262
+ color: color,
2263
+ "stroke-width": "1.5"
2264
+ }, /*#__PURE__*/ React__default.createElement("path", {
2265
+ "fill-rule": "evenodd",
2266
+ "clip-rule": "evenodd",
2267
+ d: "M12 1.25C6.06294 1.25 1.25 6.06294 1.25 12C1.25 17.9371 6.06294 22.75 12 22.75C17.9371 22.75 22.75 17.9371 22.75 12C22.75 6.06294 17.9371 1.25 12 1.25ZM9.70164 8.64124C9.40875 8.34835 8.93388 8.34835 8.64098 8.64124C8.34809 8.93414 8.34809 9.40901 8.64098 9.7019L10.9391 12L8.64098 14.2981C8.34809 14.591 8.34809 15.0659 8.64098 15.3588C8.93388 15.6517 9.40875 15.6517 9.70164 15.3588L11.9997 13.0607L14.2978 15.3588C14.5907 15.6517 15.0656 15.6517 15.3585 15.3588C15.6514 15.0659 15.6514 14.591 15.3585 14.2981L13.0604 12L15.3585 9.7019C15.6514 9.40901 15.6514 8.93414 15.3585 8.64124C15.0656 8.34835 14.5907 8.34835 14.2978 8.64124L11.9997 10.9393L9.70164 8.64124Z",
2268
+ fill: color
2269
+ }));
2270
+ };
2271
+ var iconList = {
2114
2272
  Undo: Undo,
2115
2273
  Redo: Redo,
2116
2274
  Random: Random,
2117
2275
  Favorite: Favorite,
2118
2276
  Up: Up,
2119
2277
  Down: Down,
2120
- Save: Save
2278
+ Save: Save,
2279
+ Add: Add,
2280
+ Delete: Delete
2121
2281
  };
2122
2282
  // const getViewBoxWidth = (width: string) => {
2123
2283
  // const numericWidth = width.match(/\d+/)?.[0];
2124
2284
  // return numericWidth !== undefined ? parseInt(numericWidth) : 24;
2125
2285
  // };
2286
+ function Icon(param) {
2287
+ var icon = param.icon, onClick = param.onClick, _param_disabled = param.disabled, disabled = _param_disabled === void 0 ? false : _param_disabled, _param_color = param.color, color = _param_color === void 0 ? 'var(--color-text)' : _param_color, _param_padding = param.padding, padding = _param_padding === void 0 ? [
2288
+ Spacing.none
2289
+ ] : _param_padding, _param_width = param.width, width = _param_width === void 0 ? '24px' : _param_width, _param_height = param.height, height = _param_height === void 0 ? '24px' : _param_height, className = param.className, style = param.style;
2290
+ var _$Icon = iconList[icon];
2291
+ return /*#__PURE__*/ React__default.createElement(Box, {
2292
+ className: "Icon ".concat(className),
2293
+ onClick: onClick,
2294
+ padding: padding,
2295
+ style: _object_spread$9({
2296
+ width: width,
2297
+ height: height
2298
+ }, style)
2299
+ }, /*#__PURE__*/ React__default.createElement(_$Icon, {
2300
+ width: width,
2301
+ color: disabled ? 'var(--color-gray-400)' : color
2302
+ }));
2303
+ }
2304
+ Icon.icon = Icons;
2305
+ Icon.padding = Spacing;
2306
+ Icon.margin = Spacing;
2307
+
2308
+ function _define_property$8(obj, key, value) {
2309
+ if (key in obj) {
2310
+ Object.defineProperty(obj, key, {
2311
+ value: value,
2312
+ enumerable: true,
2313
+ configurable: true,
2314
+ writable: true
2315
+ });
2316
+ } else {
2317
+ obj[key] = value;
2318
+ }
2319
+ return obj;
2320
+ }
2321
+ function _object_spread$8(target) {
2322
+ for(var i = 1; i < arguments.length; i++){
2323
+ var source = arguments[i] != null ? arguments[i] : {};
2324
+ var ownKeys = Object.keys(source);
2325
+ if (typeof Object.getOwnPropertySymbols === "function") {
2326
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
2327
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
2328
+ }));
2329
+ }
2330
+ ownKeys.forEach(function(key) {
2331
+ _define_property$8(target, key, source[key]);
2332
+ });
2333
+ }
2334
+ return target;
2335
+ }
2126
2336
  function IconButton(param) {
2127
2337
  var id = param.id, icon = param.icon, onClick = param.onClick, _param_disabled = param.disabled, disabled = _param_disabled === void 0 ? false : _param_disabled, _param_color = param.color, color = _param_color === void 0 ? 'var(--color-text)' : _param_color, _param_backgroundColor = param.backgroundColor, backgroundColor = _param_backgroundColor === void 0 ? 'var(--bg-page)' : _param_backgroundColor, _param_padding = param.padding, padding = _param_padding === void 0 ? [
2128
2338
  Button.padding.none
2129
2339
  ] : _param_padding, _param_margin = param.margin, margin = _param_margin === void 0 ? [
2130
2340
  Button.margin.none
2131
2341
  ] : _param_margin, _param_width = param.width, width = _param_width === void 0 ? '24px' : _param_width, _param_height = param.height, height = _param_height === void 0 ? '24px' : _param_height, className = param.className, style = param.style;
2132
- var Icon = icons[icon];
2342
+ var Icon = iconList[icon];
2133
2343
  return /*#__PURE__*/ React__default.createElement(Button, {
2134
2344
  id: id,
2135
2345
  className: "IconButton ".concat(className),
@@ -2137,7 +2347,7 @@ function IconButton(param) {
2137
2347
  padding: padding,
2138
2348
  margin: margin,
2139
2349
  disabled: disabled,
2140
- style: _object_spread$4({
2350
+ style: _object_spread$8({
2141
2351
  backgroundColor: backgroundColor,
2142
2352
  width: width,
2143
2353
  height: height
@@ -2147,11 +2357,11 @@ function IconButton(param) {
2147
2357
  color: disabled ? 'var(--color-gray-400)' : color
2148
2358
  }));
2149
2359
  }
2150
- IconButton.icon = ButtonIcon;
2360
+ IconButton.icon = Icons;
2151
2361
  IconButton.padding = Spacing;
2152
2362
  IconButton.margin = Spacing;
2153
2363
 
2154
- function _define_property$3(obj, key, value) {
2364
+ function _define_property$7(obj, key, value) {
2155
2365
  if (key in obj) {
2156
2366
  Object.defineProperty(obj, key, {
2157
2367
  value: value,
@@ -2164,7 +2374,7 @@ function _define_property$3(obj, key, value) {
2164
2374
  }
2165
2375
  return obj;
2166
2376
  }
2167
- function _object_spread$3(target) {
2377
+ function _object_spread$7(target) {
2168
2378
  for(var i = 1; i < arguments.length; i++){
2169
2379
  var source = arguments[i] != null ? arguments[i] : {};
2170
2380
  var ownKeys = Object.keys(source);
@@ -2174,7 +2384,7 @@ function _object_spread$3(target) {
2174
2384
  }));
2175
2385
  }
2176
2386
  ownKeys.forEach(function(key) {
2177
- _define_property$3(target, key, source[key]);
2387
+ _define_property$7(target, key, source[key]);
2178
2388
  });
2179
2389
  }
2180
2390
  return target;
@@ -2186,8 +2396,11 @@ function KeyValueDisplayScreen(param) {
2186
2396
  // justifyContent={Box.justifyContent.flexStart}
2187
2397
  alignItems: Box.alignItems.flexStart,
2188
2398
  gap: Box.gap.small,
2189
- style: _object_spread$3({}, style),
2399
+ style: _object_spread$7({}, style),
2190
2400
  padding: [
2401
+ Box.padding.small,
2402
+ Box.padding.none,
2403
+ Box.padding.small,
2191
2404
  Box.padding.small
2192
2405
  ],
2193
2406
  className: className
@@ -2285,18 +2498,18 @@ function LinePlot(param) {
2285
2498
  })));
2286
2499
  }
2287
2500
 
2288
- var css_248z$2 = ".Oscilloscope {\n background: #0EAC8B;\n box-shadow: inset 0 0 20px #086350;\n height: 200px;\n };";
2289
- styleInject(css_248z$2);
2501
+ var css_248z$4 = ".Oscilloscope {\n background: #0EAC8B;\n box-shadow: inset 0 0 20px #086350;\n height: 200px;\n };";
2502
+ styleInject(css_248z$4);
2290
2503
 
2291
- function _array_like_to_array$2(arr, len) {
2504
+ function _array_like_to_array$6(arr, len) {
2292
2505
  if (len == null || len > arr.length) len = arr.length;
2293
2506
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
2294
2507
  return arr2;
2295
2508
  }
2296
- function _array_with_holes$2(arr) {
2509
+ function _array_with_holes$6(arr) {
2297
2510
  if (Array.isArray(arr)) return arr;
2298
2511
  }
2299
- function _define_property$2(obj, key, value) {
2512
+ function _define_property$6(obj, key, value) {
2300
2513
  if (key in obj) {
2301
2514
  Object.defineProperty(obj, key, {
2302
2515
  value: value,
@@ -2309,7 +2522,7 @@ function _define_property$2(obj, key, value) {
2309
2522
  }
2310
2523
  return obj;
2311
2524
  }
2312
- function _iterable_to_array_limit$2(arr, i) {
2525
+ function _iterable_to_array_limit$6(arr, i) {
2313
2526
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
2314
2527
  if (_i == null) return;
2315
2528
  var _arr = [];
@@ -2333,10 +2546,10 @@ function _iterable_to_array_limit$2(arr, i) {
2333
2546
  }
2334
2547
  return _arr;
2335
2548
  }
2336
- function _non_iterable_rest$2() {
2549
+ function _non_iterable_rest$6() {
2337
2550
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2338
2551
  }
2339
- function _object_spread$2(target) {
2552
+ function _object_spread$6(target) {
2340
2553
  for(var i = 1; i < arguments.length; i++){
2341
2554
  var source = arguments[i] != null ? arguments[i] : {};
2342
2555
  var ownKeys = Object.keys(source);
@@ -2346,25 +2559,25 @@ function _object_spread$2(target) {
2346
2559
  }));
2347
2560
  }
2348
2561
  ownKeys.forEach(function(key) {
2349
- _define_property$2(target, key, source[key]);
2562
+ _define_property$6(target, key, source[key]);
2350
2563
  });
2351
2564
  }
2352
2565
  return target;
2353
2566
  }
2354
- function _sliced_to_array$2(arr, i) {
2355
- return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$2(arr, i) || _non_iterable_rest$2();
2567
+ function _sliced_to_array$6(arr, i) {
2568
+ return _array_with_holes$6(arr) || _iterable_to_array_limit$6(arr, i) || _unsupported_iterable_to_array$6(arr, i) || _non_iterable_rest$6();
2356
2569
  }
2357
- function _unsupported_iterable_to_array$2(o, minLen) {
2570
+ function _unsupported_iterable_to_array$6(o, minLen) {
2358
2571
  if (!o) return;
2359
- if (typeof o === "string") return _array_like_to_array$2(o, minLen);
2572
+ if (typeof o === "string") return _array_like_to_array$6(o, minLen);
2360
2573
  var n = Object.prototype.toString.call(o).slice(8, -1);
2361
2574
  if (n === "Object" && o.constructor) n = o.constructor.name;
2362
2575
  if (n === "Map" || n === "Set") return Array.from(n);
2363
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
2576
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
2364
2577
  }
2365
2578
  function Oscilloscope(param) {
2366
2579
  var width = param.width, height = param.height, className = param.className, style = param.style, id = param.id;
2367
- var _useState = _sliced_to_array$2(useState([]), 2), viewData = _useState[0], setViewData = _useState[1];
2580
+ var _useState = _sliced_to_array$6(useState([]), 2), viewData = _useState[0], setViewData = _useState[1];
2368
2581
  useEffect(function() {
2369
2582
  //@ts-expect-error
2370
2583
  var removalToken = window.__JUCE__.backend.addEventListener('oscData', function() {
@@ -2382,7 +2595,7 @@ function Oscilloscope(param) {
2382
2595
  }, []);
2383
2596
  return /*#__PURE__*/ React__default.createElement("div", {
2384
2597
  id: id,
2385
- style: _object_spread$2({
2598
+ style: _object_spread$6({
2386
2599
  height: height
2387
2600
  }, style),
2388
2601
  className: classnames('Oscilloscope', className)
@@ -2393,21 +2606,21 @@ function Oscilloscope(param) {
2393
2606
  }));
2394
2607
  }
2395
2608
 
2396
- var css_248z$1 = "@import '../../styles.css';\n.ModuleHeader {\n background-color: var(--bg-section);\n font-weight: normal;\n}\n\n.ModuleHeader-Name {\n font-size: var(--text-lg);\n letter-spacing: 4px;\n text-transform: uppercase;\n font-weight: lighter;\n height: 1.75rem;\n color: var(--color-brand);\n}\n\n.ModuleHeader-Subheading {\n font-size: var(--text-xs);\n font-weight: lighter;\n letter-spacing: 2.25px;\n text-transform: uppercase;\n color: var(--color-brand);\n}\n";
2397
- styleInject(css_248z$1);
2609
+ var css_248z$3 = "@import '../../styles.css';\n.ModuleHeader {\n background-color: var(--bg-section);\n font-weight: normal;\n font-family: var(--font-leagueSpartan);\n}\n\n.ModuleHeader-Name {\n font-size: var(--text-lg);\n letter-spacing: 4px;\n text-transform: uppercase;\n font-weight: lighter;\n height: 1.75rem;\n color: var(--color-brand);\n}\n\n.ModuleHeader-Subheading {\n font-size: var(--text-xs);\n font-weight: lighter;\n letter-spacing: 2.25px;\n text-transform: uppercase;\n color: var(--color-brand);\n}\n\n/* TODO: Use Tailwind classes */\n#advancedLayoutButton {\n background-color: var(--bg-page);\n color: var(--color-text);\n /* border: 2px solid var(--color-brand); */\n border-radius: 3px;\n height: 30px;\n font-size: var(--text-md);\n &:hover,\n &:active {\n background: var(--color-gray-900);\n color: var(--color-brand);\n }\n}\n\n#advancedLayoutButton.selected {\n color: var(--color-brand);\n}\n\n.advancedLayoutButtonLabel {\n cursor: pointer;\n font-family: var(--font-leagueSpartan);\n /* display: inline-block;\n vertical-align: middle;\n height: 1rem;\n line-height: 1.25; */\n}\n";
2610
+ styleInject(css_248z$3);
2398
2611
 
2399
- var css_248z = ".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";
2400
- styleInject(css_248z);
2612
+ 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";
2613
+ styleInject(css_248z$2);
2401
2614
 
2402
- function _array_like_to_array$1(arr, len) {
2615
+ function _array_like_to_array$5(arr, len) {
2403
2616
  if (len == null || len > arr.length) len = arr.length;
2404
2617
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
2405
2618
  return arr2;
2406
2619
  }
2407
- function _array_with_holes$1(arr) {
2620
+ function _array_with_holes$5(arr) {
2408
2621
  if (Array.isArray(arr)) return arr;
2409
2622
  }
2410
- function asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, key, arg) {
2623
+ function asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, key, arg) {
2411
2624
  try {
2412
2625
  var info = gen[key](arg);
2413
2626
  var value = info.value;
@@ -2421,22 +2634,22 @@ function asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, key, arg) {
2421
2634
  Promise.resolve(value).then(_next, _throw);
2422
2635
  }
2423
2636
  }
2424
- function _async_to_generator$1(fn) {
2637
+ function _async_to_generator$3(fn) {
2425
2638
  return function() {
2426
2639
  var self = this, args = arguments;
2427
2640
  return new Promise(function(resolve, reject) {
2428
2641
  var gen = fn.apply(self, args);
2429
2642
  function _next(value) {
2430
- asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, "next", value);
2643
+ asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, "next", value);
2431
2644
  }
2432
2645
  function _throw(err) {
2433
- asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, "throw", err);
2646
+ asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, "throw", err);
2434
2647
  }
2435
2648
  _next(undefined);
2436
2649
  });
2437
2650
  };
2438
2651
  }
2439
- function _iterable_to_array_limit$1(arr, i) {
2652
+ function _iterable_to_array_limit$5(arr, i) {
2440
2653
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
2441
2654
  if (_i == null) return;
2442
2655
  var _arr = [];
@@ -2460,25 +2673,25 @@ function _iterable_to_array_limit$1(arr, i) {
2460
2673
  }
2461
2674
  return _arr;
2462
2675
  }
2463
- function _non_iterable_rest$1() {
2676
+ function _non_iterable_rest$5() {
2464
2677
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2465
2678
  }
2466
2679
  function _object_destructuring_empty(o) {
2467
2680
  if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o);
2468
2681
  return o;
2469
2682
  }
2470
- function _sliced_to_array$1(arr, i) {
2471
- return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$1(arr, i) || _non_iterable_rest$1();
2683
+ function _sliced_to_array$5(arr, i) {
2684
+ return _array_with_holes$5(arr) || _iterable_to_array_limit$5(arr, i) || _unsupported_iterable_to_array$5(arr, i) || _non_iterable_rest$5();
2472
2685
  }
2473
- function _unsupported_iterable_to_array$1(o, minLen) {
2686
+ function _unsupported_iterable_to_array$5(o, minLen) {
2474
2687
  if (!o) return;
2475
- if (typeof o === "string") return _array_like_to_array$1(o, minLen);
2688
+ if (typeof o === "string") return _array_like_to_array$5(o, minLen);
2476
2689
  var n = Object.prototype.toString.call(o).slice(8, -1);
2477
2690
  if (n === "Object" && o.constructor) n = o.constructor.name;
2478
2691
  if (n === "Map" || n === "Set") return Array.from(n);
2479
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
2692
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
2480
2693
  }
2481
- function _ts_generator$1(thisArg, body) {
2694
+ function _ts_generator$3(thisArg, body) {
2482
2695
  var f, y, t, _ = {
2483
2696
  label: 0,
2484
2697
  sent: function() {
@@ -2571,16 +2784,16 @@ function _ts_generator$1(thisArg, body) {
2571
2784
  }
2572
2785
  function PresetManager(param) {
2573
2786
  _object_destructuring_empty(param);
2574
- var _useState = _sliced_to_array$1(useState([]), 2), presetList = _useState[0], setPresetList = _useState[1];
2575
- var _useState1 = _sliced_to_array$1(useState(false), 2); _useState1[0]; var setIsSaving = _useState1[1];
2787
+ var _useState = _sliced_to_array$5(useState([]), 2), presetList = _useState[0], setPresetList = _useState[1];
2788
+ var _useState1 = _sliced_to_array$5(useState(false), 2); _useState1[0]; var setIsSaving = _useState1[1];
2576
2789
  var savePresetFunc = Juce.getNativeFunction('savePreset');
2577
2790
  var loadPresetFunc = Juce.getNativeFunction('loadPreset');
2578
2791
  var getAllPresetsFunc = Juce.getNativeFunction('getAllPresets');
2579
2792
  var getCurrentPresetFunc = Juce.getNativeFunction('getCurrentPreset');
2580
2793
  var isDirtyFunc = Juce.getNativeFunction('canUndo');
2581
- var _useState2 = _sliced_to_array$1(useState(), 2), selectedPreset = _useState2[0], setSelectedPreset = _useState2[1];
2794
+ var _useState2 = _sliced_to_array$5(useState(), 2), selectedPreset = _useState2[0], setSelectedPreset = _useState2[1];
2582
2795
  var isLocalhost = window.location.hostname === 'localhost';
2583
- var _useState3 = _sliced_to_array$1(useState(false), 2), isDirty = _useState3[0], setIsDirty = _useState3[1];
2796
+ var _useState3 = _sliced_to_array$5(useState(false), 2), isDirty = _useState3[0], setIsDirty = _useState3[1];
2584
2797
  useEffect(function() {
2585
2798
  if (!isLocalhost) {
2586
2799
  var isDirtyListenerId = //@ts-expect-error
@@ -2599,9 +2812,9 @@ function PresetManager(param) {
2599
2812
  ]);
2600
2813
  useEffect(function() {
2601
2814
  var getIsDirtyState = function() {
2602
- return _async_to_generator$1(function() {
2815
+ return _async_to_generator$3(function() {
2603
2816
  var isDirtyState, error;
2604
- return _ts_generator$1(this, function(_state) {
2817
+ return _ts_generator$3(this, function(_state) {
2605
2818
  switch(_state.label){
2606
2819
  case 0:
2607
2820
  _state.trys.push([
@@ -2639,9 +2852,9 @@ function PresetManager(param) {
2639
2852
  getIsDirtyState();
2640
2853
  });
2641
2854
  var loadAllPresets = function(selectedPreset) {
2642
- return _async_to_generator$1(function() {
2855
+ return _async_to_generator$3(function() {
2643
2856
  var allPresets, currentPreset, error;
2644
- return _ts_generator$1(this, function(_state) {
2857
+ return _ts_generator$3(this, function(_state) {
2645
2858
  switch(_state.label){
2646
2859
  case 0:
2647
2860
  _state.trys.push([
@@ -2697,7 +2910,7 @@ function PresetManager(param) {
2697
2910
  loadPresetFunc(value);
2698
2911
  };
2699
2912
  var loadNextPreset = function(currentValue) {
2700
- var nextIndex = presetList.indexOf(currentValue) + 1;
2913
+ var nextIndex = (presetList === null || presetList === void 0 ? void 0 : presetList.indexOf(currentValue)) + 1;
2701
2914
  if (nextIndex < presetList.length) {
2702
2915
  loadPreset(presetList[nextIndex]);
2703
2916
  } else {
@@ -2705,7 +2918,7 @@ function PresetManager(param) {
2705
2918
  }
2706
2919
  };
2707
2920
  var loadPreviousPreset = function(currentValue) {
2708
- var prevIndex = presetList.indexOf(currentValue) - 1;
2921
+ var prevIndex = (presetList === null || presetList === void 0 ? void 0 : presetList.indexOf(currentValue)) - 1;
2709
2922
  if (prevIndex >= 0) {
2710
2923
  loadPreset(presetList[prevIndex]);
2711
2924
  } else {
@@ -2714,9 +2927,9 @@ function PresetManager(param) {
2714
2927
  };
2715
2928
  var savePreset = function(name) {
2716
2929
  var callSavePreset = function(name) {
2717
- return _async_to_generator$1(function() {
2930
+ return _async_to_generator$3(function() {
2718
2931
  var error;
2719
- return _ts_generator$1(this, function(_state) {
2932
+ return _ts_generator$3(this, function(_state) {
2720
2933
  switch(_state.label){
2721
2934
  case 0:
2722
2935
  setIsSaving(true);
@@ -2782,7 +2995,6 @@ function PresetManager(param) {
2782
2995
  }, /*#__PURE__*/ React__default.createElement(IconButton, {
2783
2996
  id: "savePreset",
2784
2997
  onClick: function(e) {
2785
- console.log(selectedPreset, 'selected');
2786
2998
  e.preventDefault();
2787
2999
  selectedPreset && savePreset(selectedPreset);
2788
3000
  },
@@ -2857,15 +3069,15 @@ function PresetManager(param) {
2857
3069
  }))))));
2858
3070
  }
2859
3071
 
2860
- function _array_like_to_array(arr, len) {
3072
+ function _array_like_to_array$4(arr, len) {
2861
3073
  if (len == null || len > arr.length) len = arr.length;
2862
3074
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
2863
3075
  return arr2;
2864
3076
  }
2865
- function _array_with_holes(arr) {
3077
+ function _array_with_holes$4(arr) {
2866
3078
  if (Array.isArray(arr)) return arr;
2867
3079
  }
2868
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
3080
+ function asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, key, arg) {
2869
3081
  try {
2870
3082
  var info = gen[key](arg);
2871
3083
  var value = info.value;
@@ -2879,22 +3091,22 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
2879
3091
  Promise.resolve(value).then(_next, _throw);
2880
3092
  }
2881
3093
  }
2882
- function _async_to_generator(fn) {
3094
+ function _async_to_generator$2(fn) {
2883
3095
  return function() {
2884
3096
  var self = this, args = arguments;
2885
3097
  return new Promise(function(resolve, reject) {
2886
3098
  var gen = fn.apply(self, args);
2887
3099
  function _next(value) {
2888
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
3100
+ asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, "next", value);
2889
3101
  }
2890
3102
  function _throw(err) {
2891
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
3103
+ asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, "throw", err);
2892
3104
  }
2893
3105
  _next(undefined);
2894
3106
  });
2895
3107
  };
2896
3108
  }
2897
- function _define_property$1(obj, key, value) {
3109
+ function _define_property$5(obj, key, value) {
2898
3110
  if (key in obj) {
2899
3111
  Object.defineProperty(obj, key, {
2900
3112
  value: value,
@@ -2907,7 +3119,7 @@ function _define_property$1(obj, key, value) {
2907
3119
  }
2908
3120
  return obj;
2909
3121
  }
2910
- function _iterable_to_array_limit(arr, i) {
3122
+ function _iterable_to_array_limit$4(arr, i) {
2911
3123
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
2912
3124
  if (_i == null) return;
2913
3125
  var _arr = [];
@@ -2931,10 +3143,10 @@ function _iterable_to_array_limit(arr, i) {
2931
3143
  }
2932
3144
  return _arr;
2933
3145
  }
2934
- function _non_iterable_rest() {
3146
+ function _non_iterable_rest$4() {
2935
3147
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2936
3148
  }
2937
- function _object_spread$1(target) {
3149
+ function _object_spread$5(target) {
2938
3150
  for(var i = 1; i < arguments.length; i++){
2939
3151
  var source = arguments[i] != null ? arguments[i] : {};
2940
3152
  var ownKeys = Object.keys(source);
@@ -2944,23 +3156,23 @@ function _object_spread$1(target) {
2944
3156
  }));
2945
3157
  }
2946
3158
  ownKeys.forEach(function(key) {
2947
- _define_property$1(target, key, source[key]);
3159
+ _define_property$5(target, key, source[key]);
2948
3160
  });
2949
3161
  }
2950
3162
  return target;
2951
3163
  }
2952
- function _sliced_to_array(arr, i) {
2953
- return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
3164
+ function _sliced_to_array$4(arr, i) {
3165
+ return _array_with_holes$4(arr) || _iterable_to_array_limit$4(arr, i) || _unsupported_iterable_to_array$4(arr, i) || _non_iterable_rest$4();
2954
3166
  }
2955
- function _unsupported_iterable_to_array(o, minLen) {
3167
+ function _unsupported_iterable_to_array$4(o, minLen) {
2956
3168
  if (!o) return;
2957
- if (typeof o === "string") return _array_like_to_array(o, minLen);
3169
+ if (typeof o === "string") return _array_like_to_array$4(o, minLen);
2958
3170
  var n = Object.prototype.toString.call(o).slice(8, -1);
2959
3171
  if (n === "Object" && o.constructor) n = o.constructor.name;
2960
3172
  if (n === "Map" || n === "Set") return Array.from(n);
2961
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
3173
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
2962
3174
  }
2963
- function _ts_generator(thisArg, body) {
3175
+ function _ts_generator$2(thisArg, body) {
2964
3176
  var f, y, t, _ = {
2965
3177
  label: 0,
2966
3178
  sent: function() {
@@ -3056,18 +3268,62 @@ function ModuleHeader(param) {
3056
3268
  var _globalState_highlightedItem, _globalState_highlightedItem1;
3057
3269
  var canUndoFunc = Juce.getNativeFunction('canUndo');
3058
3270
  var canRedoFunc = Juce.getNativeFunction('canRedo');
3271
+ var setAdvancedViewFunc = Juce.getNativeFunction('setAdvancedView');
3272
+ var getAdvancedViewFunc = Juce.getNativeFunction('getAdvancedView');
3059
3273
  var undo = Juce.getNativeFunction('undo');
3060
3274
  var redo = Juce.getNativeFunction('redo');
3061
3275
  var isLocalhost = window.location.hostname === 'localhost';
3062
- var _useState = _sliced_to_array(useState(false), 2), canUndo = _useState[0], setCanUndo = _useState[1];
3063
- var _useState1 = _sliced_to_array(useState(false), 2), canRedo = _useState1[0], setCanRedo = _useState1[1];
3064
- var globalState = useGlobalContext().globalState;
3276
+ var _useState = _sliced_to_array$4(useState(false), 2), canUndo = _useState[0], setCanUndo = _useState[1];
3277
+ var _useState1 = _sliced_to_array$4(useState(false), 2), canRedo = _useState1[0], setCanRedo = _useState1[1];
3278
+ var _useGlobalContext = useGlobalContext(), globalState = _useGlobalContext.globalState, setAdvancedView = _useGlobalContext.setAdvancedView;
3065
3279
  var handleUndo = function() {
3066
3280
  undo();
3067
3281
  };
3068
3282
  var handleRedo = function() {
3069
3283
  redo();
3070
3284
  };
3285
+ var toggleAdvancedView = function() {
3286
+ var toggleViewState = function() {
3287
+ return _async_to_generator$2(function() {
3288
+ var advancedViewStatus, e;
3289
+ return _ts_generator$2(this, function(_state) {
3290
+ switch(_state.label){
3291
+ case 0:
3292
+ _state.trys.push([
3293
+ 0,
3294
+ 2,
3295
+ ,
3296
+ 3
3297
+ ]);
3298
+ return [
3299
+ 4,
3300
+ getAdvancedViewFunc()
3301
+ ];
3302
+ case 1:
3303
+ advancedViewStatus = _state.sent();
3304
+ setAdvancedViewFunc(!advancedViewStatus);
3305
+ setAdvancedView(!advancedViewStatus);
3306
+ return [
3307
+ 3,
3308
+ 3
3309
+ ];
3310
+ case 2:
3311
+ e = _state.sent();
3312
+ console.log(e);
3313
+ return [
3314
+ 3,
3315
+ 3
3316
+ ];
3317
+ case 3:
3318
+ return [
3319
+ 2
3320
+ ];
3321
+ }
3322
+ });
3323
+ })();
3324
+ };
3325
+ toggleViewState();
3326
+ };
3071
3327
  useEffect(function() {
3072
3328
  if (!isLocalhost) {
3073
3329
  var undoButtonListenerId = //@ts-expect-error
@@ -3078,6 +3334,45 @@ function ModuleHeader(param) {
3078
3334
  window.__JUCE__.backend.addEventListener('updateRedoButton', function(event) {
3079
3335
  setCanRedo(event);
3080
3336
  });
3337
+ var getViewState = function() {
3338
+ return _async_to_generator$2(function() {
3339
+ var advancedViewStatus, e;
3340
+ return _ts_generator$2(this, function(_state) {
3341
+ switch(_state.label){
3342
+ case 0:
3343
+ _state.trys.push([
3344
+ 0,
3345
+ 2,
3346
+ ,
3347
+ 3
3348
+ ]);
3349
+ return [
3350
+ 4,
3351
+ getAdvancedViewFunc()
3352
+ ];
3353
+ case 1:
3354
+ advancedViewStatus = _state.sent();
3355
+ setAdvancedView(advancedViewStatus);
3356
+ return [
3357
+ 3,
3358
+ 3
3359
+ ];
3360
+ case 2:
3361
+ e = _state.sent();
3362
+ console.log(e);
3363
+ return [
3364
+ 3,
3365
+ 3
3366
+ ];
3367
+ case 3:
3368
+ return [
3369
+ 2
3370
+ ];
3371
+ }
3372
+ });
3373
+ })();
3374
+ };
3375
+ getViewState();
3081
3376
  return function cleanup() {
3082
3377
  //@ts-expect-error
3083
3378
  window.__JUCE__.backend.removeEventListener(undoButtonListenerId);
@@ -3092,9 +3387,9 @@ function ModuleHeader(param) {
3092
3387
  ]);
3093
3388
  useEffect(function() {
3094
3389
  var getUndoRedoState = function() {
3095
- return _async_to_generator(function() {
3390
+ return _async_to_generator$2(function() {
3096
3391
  var canUndoState, canRedoState, error;
3097
- return _ts_generator(this, function(_state) {
3392
+ return _ts_generator$2(this, function(_state) {
3098
3393
  switch(_state.label){
3099
3394
  case 0:
3100
3395
  _state.trys.push([
@@ -3146,11 +3441,12 @@ function ModuleHeader(param) {
3146
3441
  Box.padding.large
3147
3442
  ],
3148
3443
  className: classnames('ModuleHeader', className),
3149
- style: _object_spread$1({}, style)
3444
+ style: _object_spread$5({}, style)
3150
3445
  }, /*#__PURE__*/ React__default.createElement(Box, {
3151
3446
  style: {
3152
3447
  width: '1000px'
3153
3448
  },
3449
+ gap: Box.gap.medium,
3154
3450
  justifyContent: Box.justifyContent.flexStart
3155
3451
  }, /*#__PURE__*/ React__default.createElement(Box, {
3156
3452
  flexDirection: Box.flexDirection.column,
@@ -3202,10 +3498,36 @@ function ModuleHeader(param) {
3202
3498
  handleRedo();
3203
3499
  },
3204
3500
  icon: IconButton.icon.redo
3205
- }))));
3501
+ })), /*#__PURE__*/ React__default.createElement(Box, {
3502
+ justifyContent: Box.justifyContent.flexStart
3503
+ }, /*#__PURE__*/ React__default.createElement(Button, {
3504
+ id: "advancedLayoutButton",
3505
+ className: (globalState === null || globalState === void 0 ? void 0 : globalState.advancedView) ? 'selected' : '',
3506
+ padding: [
3507
+ Button.padding.small,
3508
+ Button.padding.large
3509
+ ],
3510
+ onClick: toggleAdvancedView
3511
+ }, /*#__PURE__*/ React__default.createElement("span", {
3512
+ className: "advancedLayoutButtonLabel"
3513
+ }, "Advanced")))));
3206
3514
  }
3207
3515
 
3208
- function _define_property(obj, key, value) {
3516
+ 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.ModMatrixComboboxCell {\n background: #252429;\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}\n\n.ModMatrixComboboxItem:hover,\n.ModMatrixComboboxItem:active {\n background: var(--color-gray-600);\n}\n\n.ModMatrixComboboxItem {\n padding: var(--spacing-md) var(--spacing-lg);\n width: 100%;\n}\n\n.ModMatrixComboboxButton {\n cursor: pointer;\n}\n";
3517
+ styleInject(css_248z$1);
3518
+
3519
+ var targetColors = [
3520
+ 'var(--color-brand)',
3521
+ '#3B7FDF',
3522
+ '#409578',
3523
+ '#ce5847',
3524
+ '#d98368',
3525
+ '#E0859D',
3526
+ '#4DA1CB'
3527
+ ];
3528
+ var ComboboxCellWidth = '217px';
3529
+
3530
+ function _define_property$4(obj, key, value) {
3209
3531
  if (key in obj) {
3210
3532
  Object.defineProperty(obj, key, {
3211
3533
  value: value,
@@ -3218,7 +3540,7 @@ function _define_property(obj, key, value) {
3218
3540
  }
3219
3541
  return obj;
3220
3542
  }
3221
- function _object_spread(target) {
3543
+ function _object_spread$4(target) {
3222
3544
  for(var i = 1; i < arguments.length; i++){
3223
3545
  var source = arguments[i] != null ? arguments[i] : {};
3224
3546
  var ownKeys = Object.keys(source);
@@ -3228,26 +3550,1019 @@ function _object_spread(target) {
3228
3550
  }));
3229
3551
  }
3230
3552
  ownKeys.forEach(function(key) {
3231
- _define_property(target, key, source[key]);
3553
+ _define_property$4(target, key, source[key]);
3232
3554
  });
3233
3555
  }
3234
3556
  return target;
3235
3557
  }
3236
- function ModuleFooter(param) {
3237
- var className = param.className, style = param.style;
3238
- return /*#__PURE__*/ React__default.createElement(Box, {
3558
+ function SingleBarViz(param) {
3559
+ 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.bipolar : _param_polarity, _param_orientation = param.orientation, orientation = _param_orientation === void 0 ? Orientation.horizontal : _param_orientation, value = param.value, className = param.className, style = param.style;
3560
+ return /*#__PURE__*/ React__default.createElement("div", {
3561
+ className: className,
3562
+ style: {
3563
+ width: '100%',
3564
+ height: height,
3565
+ background: 'var(--color-gray-600)',
3566
+ position: 'relative'
3567
+ }
3568
+ }, /*#__PURE__*/ React__default.createElement("div", {
3569
+ style: _object_spread$4({
3570
+ position: 'absolute',
3571
+ background: background
3572
+ }, getBarTransformStyles({
3573
+ polarity: polarity,
3574
+ orientation: orientation,
3575
+ value: value || 0
3576
+ }), style)
3577
+ }));
3578
+ }
3579
+ SingleBarViz.polarity = Polarity;
3580
+
3581
+ function _array_like_to_array$3(arr, len) {
3582
+ if (len == null || len > arr.length) len = arr.length;
3583
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3584
+ return arr2;
3585
+ }
3586
+ function _array_with_holes$3(arr) {
3587
+ if (Array.isArray(arr)) return arr;
3588
+ }
3589
+ function _define_property$3(obj, key, value) {
3590
+ if (key in obj) {
3591
+ Object.defineProperty(obj, key, {
3592
+ value: value,
3593
+ enumerable: true,
3594
+ configurable: true,
3595
+ writable: true
3596
+ });
3597
+ } else {
3598
+ obj[key] = value;
3599
+ }
3600
+ return obj;
3601
+ }
3602
+ function _iterable_to_array_limit$3(arr, i) {
3603
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
3604
+ if (_i == null) return;
3605
+ var _arr = [];
3606
+ var _n = true;
3607
+ var _d = false;
3608
+ var _s, _e;
3609
+ try {
3610
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
3611
+ _arr.push(_s.value);
3612
+ if (i && _arr.length === i) break;
3613
+ }
3614
+ } catch (err) {
3615
+ _d = true;
3616
+ _e = err;
3617
+ } finally{
3618
+ try {
3619
+ if (!_n && _i["return"] != null) _i["return"]();
3620
+ } finally{
3621
+ if (_d) throw _e;
3622
+ }
3623
+ }
3624
+ return _arr;
3625
+ }
3626
+ function _non_iterable_rest$3() {
3627
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3628
+ }
3629
+ function _object_spread$3(target) {
3630
+ for(var i = 1; i < arguments.length; i++){
3631
+ var source = arguments[i] != null ? arguments[i] : {};
3632
+ var ownKeys = Object.keys(source);
3633
+ if (typeof Object.getOwnPropertySymbols === "function") {
3634
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
3635
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
3636
+ }));
3637
+ }
3638
+ ownKeys.forEach(function(key) {
3639
+ _define_property$3(target, key, source[key]);
3640
+ });
3641
+ }
3642
+ return target;
3643
+ }
3644
+ function _sliced_to_array$3(arr, i) {
3645
+ return _array_with_holes$3(arr) || _iterable_to_array_limit$3(arr, i) || _unsupported_iterable_to_array$3(arr, i) || _non_iterable_rest$3();
3646
+ }
3647
+ function _unsupported_iterable_to_array$3(o, minLen) {
3648
+ if (!o) return;
3649
+ if (typeof o === "string") return _array_like_to_array$3(o, minLen);
3650
+ var n = Object.prototype.toString.call(o).slice(8, -1);
3651
+ if (n === "Object" && o.constructor) n = o.constructor.name;
3652
+ if (n === "Map" || n === "Set") return Array.from(n);
3653
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
3654
+ }
3655
+ function ModMatrixComboboxCell(param) {
3656
+ var target = param.target, handleTargetChange = param.handleTargetChange, rowId = param.rowId, color = param.color, style = param.style;
3657
+ var _useState = _sliced_to_array$3(useState(), 2), targetValue = _useState[0], setTargetValue = _useState[1];
3658
+ var _useState1 = _sliced_to_array$3(useState(''), 2), filterString = _useState1[0], setFilterString = _useState1[1];
3659
+ var globalState = useGlobalContext().globalState;
3660
+ var _useCombobox = useCombobox({
3661
+ id: rowId,
3662
+ items: globalState === null || globalState === void 0 ? void 0 : globalState.automatableParams,
3663
+ filter: filterString,
3664
+ displayValInHeader: false,
3665
+ onChange: handleTargetChange
3666
+ }), value = _useCombobox.value, choices = _useCombobox.choices, filteredChoices = _useCombobox.filteredChoices, handleChange = _useCombobox.handleChange;
3667
+ useEffect(function() {
3668
+ if (target) {
3669
+ var sliderState = Juce.getSliderState(target);
3670
+ var normalisedValue = sliderState.getNormalisedValue();
3671
+ setTargetValue(normalisedValue);
3672
+ }
3673
+ }, [
3674
+ target
3675
+ ]);
3676
+ // useEffect(() => {
3677
+ // console.log(
3678
+ // globalState?.automatableParams,
3679
+ // 'globalState?.automatableParams',
3680
+ // );
3681
+ // });
3682
+ return /*#__PURE__*/ React__default.createElement(Box, {
3683
+ className: "ModMatrixCell ModMatrixComboboxCell",
3684
+ justifyContent: Box.justifyContent.flexEnd,
3685
+ flexDirection: Box.flexDirection.column,
3686
+ style: _object_spread$3({
3687
+ color: color
3688
+ }, style),
3689
+ padding: [
3690
+ Box.padding.medium,
3691
+ Box.padding.large
3692
+ ],
3693
+ alignItems: Box.alignItems.flexStart,
3694
+ height: '2.5rem'
3695
+ }, /*#__PURE__*/ React__default.createElement(Combobox, {
3696
+ value: value,
3697
+ onChange: handleChange
3698
+ }, /*#__PURE__*/ React__default.createElement(Box, null, /*#__PURE__*/ React__default.createElement(ComboboxInput, {
3699
+ displayValue: function() {
3700
+ var _globalState_automatableParamLabels;
3701
+ return globalState === null || globalState === void 0 ? void 0 : (_globalState_automatableParamLabels = globalState.automatableParamLabels) === null || _globalState_automatableParamLabels === void 0 ? void 0 : _globalState_automatableParamLabels[value];
3702
+ },
3703
+ onChange: function(e) {
3704
+ return setFilterString(e.target.value);
3705
+ }
3706
+ }), /*#__PURE__*/ React__default.createElement(ComboboxButton, {
3707
+ className: "ModMatrixComboboxButton"
3708
+ }, /*#__PURE__*/ React__default.createElement(Icon, {
3709
+ icon: Icon.icon.down,
3710
+ backgroundColor: "transparent",
3711
+ onClick: function(e) {
3712
+ return e.preventDefault();
3713
+ },
3714
+ color: color,
3715
+ width: "20px",
3716
+ height: "20px"
3717
+ }))), /*#__PURE__*/ React__default.createElement(ComboboxOptions, {
3718
+ className: "ModMatrixComboboxItems",
3719
+ // anchor="bottom"
3720
+ transition: true
3721
+ }, filteredChoices === null || filteredChoices === void 0 ? void 0 : filteredChoices.map(function(item) {
3722
+ var _globalState_automatableParamLabels;
3723
+ return(// <Box
3724
+ // padding={[Box.padding.medium, Box.padding.large]}
3725
+ // justifyContent={Box.justifyContent.flexStart}
3726
+ // className="ModMatrixComboboxItemContainer"
3727
+ // >
3728
+ /*#__PURE__*/ React__default.createElement(ComboboxOption, {
3729
+ className: "ModMatrixComboboxItem",
3730
+ key: item,
3731
+ value: item
3732
+ }, /*#__PURE__*/ React__default.createElement(Label, null, item ? globalState === null || globalState === void 0 ? void 0 : (_globalState_automatableParamLabels = globalState.automatableParamLabels) === null || _globalState_automatableParamLabels === void 0 ? void 0 : _globalState_automatableParamLabels[choices === null || choices === void 0 ? void 0 : choices.indexOf(item)] : '')));
3733
+ }))), /*#__PURE__*/ React__default.createElement(SingleBarViz, {
3734
+ value: targetValue,
3735
+ polarity: SingleBarViz.polarity.linear,
3736
+ background: color,
3737
+ style: {
3738
+ alignSelf: 'flex-end'
3739
+ }
3740
+ }));
3741
+ }
3742
+
3743
+ function _define_property$2(obj, key, value) {
3744
+ if (key in obj) {
3745
+ Object.defineProperty(obj, key, {
3746
+ value: value,
3747
+ enumerable: true,
3748
+ configurable: true,
3749
+ writable: true
3750
+ });
3751
+ } else {
3752
+ obj[key] = value;
3753
+ }
3754
+ return obj;
3755
+ }
3756
+ function _object_spread$2(target) {
3757
+ for(var i = 1; i < arguments.length; i++){
3758
+ var source = arguments[i] != null ? arguments[i] : {};
3759
+ var ownKeys = Object.keys(source);
3760
+ if (typeof Object.getOwnPropertySymbols === "function") {
3761
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
3762
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
3763
+ }));
3764
+ }
3765
+ ownKeys.forEach(function(key) {
3766
+ _define_property$2(target, key, source[key]);
3767
+ });
3768
+ }
3769
+ return target;
3770
+ }
3771
+ function ModMatrixCell(param) {
3772
+ param.target; var modifier = param.modifier; param.value; var color = param.color, style = param.style;
3773
+ var _useSlider = useSlider({
3774
+ id: modifier,
3775
+ displayValInHeader: false
3776
+ }), bindBarSliderDrag = _useSlider.bindBarSliderDrag, normalisedValue = _useSlider.normalisedValue;
3777
+ var scaledNormalisedValue = normalisedValue * 100;
3778
+ return /*#__PURE__*/ React__default.createElement(Box, _object_spread$2({
3779
+ className: "ModMatrixCell",
3780
+ justifyContent: Box.justifyContent.flexEnd,
3781
+ alignItems: Box.alignItems.flexStart,
3782
+ flexDirection: Box.flexDirection.column,
3783
+ style: _object_spread$2({
3784
+ color: color,
3785
+ pointerEvents: 'all'
3786
+ }, style),
3787
+ height: '2.5rem'
3788
+ }, bindBarSliderDrag(Orientation.horizontal)), /*#__PURE__*/ React__default.createElement(Box, {
3789
+ flex: "1",
3790
+ style: {
3791
+ pointerEvents: 'none'
3792
+ }
3793
+ }, /*#__PURE__*/ React__default.createElement(Label, null, parseFloat(scaledNormalisedValue.toFixed(2)) || '0')), /*#__PURE__*/ React__default.createElement(Box, {
3794
+ style: {
3795
+ alignSelf: 'flex-end',
3796
+ pointerEvents: 'none'
3797
+ }
3798
+ }, /*#__PURE__*/ React__default.createElement(SingleBarViz, {
3799
+ value: (modifier === null || modifier === void 0 ? void 0 : modifier.value) || 0,
3800
+ polarity: SingleBarViz.polarity.linear,
3801
+ background: color,
3802
+ style: _object_spread$2({
3803
+ alignSelf: 'flex-end',
3804
+ pointerEvents: 'none'
3805
+ }, getBarTransformStyles({
3806
+ orientation: Orientation.horizontal,
3807
+ polarity: Polarity.linear,
3808
+ value: parseFloat(scaledNormalisedValue.toFixed(2))
3809
+ }))
3810
+ })));
3811
+ }
3812
+
3813
+ function _array_like_to_array$2(arr, len) {
3814
+ if (len == null || len > arr.length) len = arr.length;
3815
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3816
+ return arr2;
3817
+ }
3818
+ function _array_with_holes$2(arr) {
3819
+ if (Array.isArray(arr)) return arr;
3820
+ }
3821
+ function _iterable_to_array_limit$2(arr, i) {
3822
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
3823
+ if (_i == null) return;
3824
+ var _arr = [];
3825
+ var _n = true;
3826
+ var _d = false;
3827
+ var _s, _e;
3828
+ try {
3829
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
3830
+ _arr.push(_s.value);
3831
+ if (i && _arr.length === i) break;
3832
+ }
3833
+ } catch (err) {
3834
+ _d = true;
3835
+ _e = err;
3836
+ } finally{
3837
+ try {
3838
+ if (!_n && _i["return"] != null) _i["return"]();
3839
+ } finally{
3840
+ if (_d) throw _e;
3841
+ }
3842
+ }
3843
+ return _arr;
3844
+ }
3845
+ function _non_iterable_rest$2() {
3846
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3847
+ }
3848
+ function _sliced_to_array$2(arr, i) {
3849
+ return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$2(arr, i) || _non_iterable_rest$2();
3850
+ }
3851
+ function _unsupported_iterable_to_array$2(o, minLen) {
3852
+ if (!o) return;
3853
+ if (typeof o === "string") return _array_like_to_array$2(o, minLen);
3854
+ var n = Object.prototype.toString.call(o).slice(8, -1);
3855
+ if (n === "Object" && o.constructor) n = o.constructor.name;
3856
+ if (n === "Map" || n === "Set") return Array.from(n);
3857
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
3858
+ }
3859
+ function ModMatrixRow(param) {
3860
+ var rowId = param.rowId, rowIndex = param.rowIndex; param.isPreview;
3861
+ var _globalState_modSlotParams_rowIndex;
3862
+ var _useState = _sliced_to_array$2(useState(), 2), rowTarget = _useState[0], setRowTarget = _useState[1];
3863
+ var globalState = useGlobalContext().globalState;
3864
+ return /*#__PURE__*/ React__default.createElement(Box, {
3865
+ className: "ModMatrixBodyRow",
3866
+ gap: Box.gap.medium
3867
+ }, /*#__PURE__*/ React__default.createElement(Box, {
3868
+ className: "ModMatrixBodyCell ModMatrixComboboxCell",
3869
+ justifyContent: Box.justifyContent.flexStart,
3870
+ flexDirection: Box.flexDirection.column,
3871
+ style: {
3872
+ color: targetColors[0]
3873
+ }
3874
+ }, /*#__PURE__*/ React__default.createElement(ModMatrixComboboxCell, {
3875
+ target: rowTarget,
3876
+ handleTargetChange: setRowTarget,
3877
+ rowId: rowId,
3878
+ color: targetColors[0],
3879
+ style: {
3880
+ width: ComboboxCellWidth
3881
+ }
3882
+ })), globalState === null || globalState === void 0 ? void 0 : (_globalState_modSlotParams_rowIndex = globalState.modSlotParams[rowIndex]) === null || _globalState_modSlotParams_rowIndex === void 0 ? void 0 : _globalState_modSlotParams_rowIndex.map(function(item, i) {
3883
+ var _globalState_modSlotParams_rowIndex, _globalState_modSlotParams;
3884
+ return /*#__PURE__*/ React__default.createElement(Box, {
3885
+ className: "ModMatrixBodyCell",
3886
+ flexDirection: Box.flexDirection.column,
3887
+ style: {
3888
+ color: targetColors[i + 1]
3889
+ }
3890
+ }, /*#__PURE__*/ React__default.createElement(ModMatrixCell, {
3891
+ target: rowTarget,
3892
+ modifier: globalState === null || globalState === void 0 ? void 0 : (_globalState_modSlotParams = globalState.modSlotParams) === null || _globalState_modSlotParams === void 0 ? void 0 : (_globalState_modSlotParams_rowIndex = _globalState_modSlotParams[rowIndex]) === null || _globalState_modSlotParams_rowIndex === void 0 ? void 0 : _globalState_modSlotParams_rowIndex[i],
3893
+ color: targetColors[i + 1]
3894
+ }));
3895
+ }));
3896
+ }
3897
+
3898
+ function _array_like_to_array$1(arr, len) {
3899
+ if (len == null || len > arr.length) len = arr.length;
3900
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3901
+ return arr2;
3902
+ }
3903
+ function _array_with_holes$1(arr) {
3904
+ if (Array.isArray(arr)) return arr;
3905
+ }
3906
+ function _array_without_holes(arr) {
3907
+ if (Array.isArray(arr)) return _array_like_to_array$1(arr);
3908
+ }
3909
+ function asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, key, arg) {
3910
+ try {
3911
+ var info = gen[key](arg);
3912
+ var value = info.value;
3913
+ } catch (error) {
3914
+ reject(error);
3915
+ return;
3916
+ }
3917
+ if (info.done) {
3918
+ resolve(value);
3919
+ } else {
3920
+ Promise.resolve(value).then(_next, _throw);
3921
+ }
3922
+ }
3923
+ function _async_to_generator$1(fn) {
3924
+ return function() {
3925
+ var self = this, args = arguments;
3926
+ return new Promise(function(resolve, reject) {
3927
+ var gen = fn.apply(self, args);
3928
+ function _next(value) {
3929
+ asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, "next", value);
3930
+ }
3931
+ function _throw(err) {
3932
+ asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, "throw", err);
3933
+ }
3934
+ _next(undefined);
3935
+ });
3936
+ };
3937
+ }
3938
+ function _define_property$1(obj, key, value) {
3939
+ if (key in obj) {
3940
+ Object.defineProperty(obj, key, {
3941
+ value: value,
3942
+ enumerable: true,
3943
+ configurable: true,
3944
+ writable: true
3945
+ });
3946
+ } else {
3947
+ obj[key] = value;
3948
+ }
3949
+ return obj;
3950
+ }
3951
+ function _iterable_to_array(iter) {
3952
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
3953
+ }
3954
+ function _iterable_to_array_limit$1(arr, i) {
3955
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
3956
+ if (_i == null) return;
3957
+ var _arr = [];
3958
+ var _n = true;
3959
+ var _d = false;
3960
+ var _s, _e;
3961
+ try {
3962
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
3963
+ _arr.push(_s.value);
3964
+ if (i && _arr.length === i) break;
3965
+ }
3966
+ } catch (err) {
3967
+ _d = true;
3968
+ _e = err;
3969
+ } finally{
3970
+ try {
3971
+ if (!_n && _i["return"] != null) _i["return"]();
3972
+ } finally{
3973
+ if (_d) throw _e;
3974
+ }
3975
+ }
3976
+ return _arr;
3977
+ }
3978
+ function _non_iterable_rest$1() {
3979
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3980
+ }
3981
+ function _non_iterable_spread() {
3982
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3983
+ }
3984
+ function _object_spread$1(target) {
3985
+ for(var i = 1; i < arguments.length; i++){
3986
+ var source = arguments[i] != null ? arguments[i] : {};
3987
+ var ownKeys = Object.keys(source);
3988
+ if (typeof Object.getOwnPropertySymbols === "function") {
3989
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
3990
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
3991
+ }));
3992
+ }
3993
+ ownKeys.forEach(function(key) {
3994
+ _define_property$1(target, key, source[key]);
3995
+ });
3996
+ }
3997
+ return target;
3998
+ }
3999
+ function _sliced_to_array$1(arr, i) {
4000
+ return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$1(arr, i) || _non_iterable_rest$1();
4001
+ }
4002
+ function _to_consumable_array(arr) {
4003
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array$1(arr) || _non_iterable_spread();
4004
+ }
4005
+ function _unsupported_iterable_to_array$1(o, minLen) {
4006
+ if (!o) return;
4007
+ if (typeof o === "string") return _array_like_to_array$1(o, minLen);
4008
+ var n = Object.prototype.toString.call(o).slice(8, -1);
4009
+ if (n === "Object" && o.constructor) n = o.constructor.name;
4010
+ if (n === "Map" || n === "Set") return Array.from(n);
4011
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
4012
+ }
4013
+ function _ts_generator$1(thisArg, body) {
4014
+ var f, y, t, _ = {
4015
+ label: 0,
4016
+ sent: function() {
4017
+ if (t[0] & 1) throw t[1];
4018
+ return t[1];
4019
+ },
4020
+ trys: [],
4021
+ ops: []
4022
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
4023
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
4024
+ return this;
4025
+ }), g;
4026
+ function verb(n) {
4027
+ return function(v) {
4028
+ return step([
4029
+ n,
4030
+ v
4031
+ ]);
4032
+ };
4033
+ }
4034
+ function step(op) {
4035
+ if (f) throw new TypeError("Generator is already executing.");
4036
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
4037
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
4038
+ if (y = 0, t) op = [
4039
+ op[0] & 2,
4040
+ t.value
4041
+ ];
4042
+ switch(op[0]){
4043
+ case 0:
4044
+ case 1:
4045
+ t = op;
4046
+ break;
4047
+ case 4:
4048
+ _.label++;
4049
+ return {
4050
+ value: op[1],
4051
+ done: false
4052
+ };
4053
+ case 5:
4054
+ _.label++;
4055
+ y = op[1];
4056
+ op = [
4057
+ 0
4058
+ ];
4059
+ continue;
4060
+ case 7:
4061
+ op = _.ops.pop();
4062
+ _.trys.pop();
4063
+ continue;
4064
+ default:
4065
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
4066
+ _ = 0;
4067
+ continue;
4068
+ }
4069
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
4070
+ _.label = op[1];
4071
+ break;
4072
+ }
4073
+ if (op[0] === 6 && _.label < t[1]) {
4074
+ _.label = t[1];
4075
+ t = op;
4076
+ break;
4077
+ }
4078
+ if (t && _.label < t[2]) {
4079
+ _.label = t[2];
4080
+ _.ops.push(op);
4081
+ break;
4082
+ }
4083
+ if (t[2]) _.ops.pop();
4084
+ _.trys.pop();
4085
+ continue;
4086
+ }
4087
+ op = body.call(thisArg, _);
4088
+ } catch (e) {
4089
+ op = [
4090
+ 6,
4091
+ e
4092
+ ];
4093
+ y = 0;
4094
+ } finally{
4095
+ f = t = 0;
4096
+ }
4097
+ if (op[0] & 5) throw op[1];
4098
+ return {
4099
+ value: op[0] ? op[1] : void 0,
4100
+ done: true
4101
+ };
4102
+ }
4103
+ }
4104
+ function ModuleFooter$1(param) {
4105
+ var className = param.className, style = param.style;
4106
+ var _useState = _sliced_to_array$1(useState(), 2), previewRowId = _useState[0], setPreviewRowId = _useState[1];
4107
+ var getAllAPVTSParamsFunc = Juce.getNativeFunction('getAllAPVTSParams');
4108
+ var _useGlobalContext = useGlobalContext(), setAutomatableParams = _useGlobalContext.setAutomatableParams, setAutomatableParamLabels = _useGlobalContext.setAutomatableParamLabels, setModSlots = _useGlobalContext.setModSlots, setModSlotParams = _useGlobalContext.setModSlotParams, setModSlotParamLabels = _useGlobalContext.setModSlotParamLabels, globalState = _useGlobalContext.globalState;
4109
+ var assignedModSlots = useMemo(function() {
4110
+ var _globalState_modSlots;
4111
+ return globalState === null || globalState === void 0 ? void 0 : (_globalState_modSlots = globalState.modSlots) === null || _globalState_modSlots === void 0 ? void 0 : _globalState_modSlots.filter(function(item) {
4112
+ return (item === null || item === void 0 ? void 0 : item[1]) !== 0;
4113
+ });
4114
+ }, [
4115
+ globalState === null || globalState === void 0 ? void 0 : globalState.modSlots
4116
+ ]);
4117
+ useEffect(function() {
4118
+ var getAPVTSParams = function() {
4119
+ return _async_to_generator$1(function() {
4120
+ var params, e;
4121
+ return _ts_generator$1(this, function(_state) {
4122
+ switch(_state.label){
4123
+ case 0:
4124
+ _state.trys.push([
4125
+ 0,
4126
+ 2,
4127
+ ,
4128
+ 3
4129
+ ]);
4130
+ return [
4131
+ 4,
4132
+ getAllAPVTSParamsFunc()
4133
+ ];
4134
+ case 1:
4135
+ params = _state.sent();
4136
+ setAutomatableParams(params === null || params === void 0 ? void 0 : params[0]);
4137
+ setAutomatableParamLabels(params === null || params === void 0 ? void 0 : params[1]);
4138
+ setModSlots(params === null || params === void 0 ? void 0 : params[2]);
4139
+ setModSlotParams(params === null || params === void 0 ? void 0 : params[3]);
4140
+ setModSlotParamLabels(params === null || params === void 0 ? void 0 : params[4]);
4141
+ return [
4142
+ 3,
4143
+ 3
4144
+ ];
4145
+ case 2:
4146
+ e = _state.sent();
4147
+ console.log(e);
4148
+ return [
4149
+ 3,
4150
+ 3
4151
+ ];
4152
+ case 3:
4153
+ return [
4154
+ 2
4155
+ ];
4156
+ }
4157
+ });
4158
+ })();
4159
+ };
4160
+ getAPVTSParams();
4161
+ }, [
4162
+ window
4163
+ ]);
4164
+ useEffect(function() {
4165
+ if (!assignedModSlots.length) {
4166
+ var _globalState_modSlots_, _globalState_modSlots;
4167
+ setPreviewRowId(globalState === null || globalState === void 0 ? void 0 : (_globalState_modSlots = globalState.modSlots) === null || _globalState_modSlots === void 0 ? void 0 : (_globalState_modSlots_ = _globalState_modSlots[0]) === null || _globalState_modSlots_ === void 0 ? void 0 : _globalState_modSlots_[0]);
4168
+ }
4169
+ }, [
4170
+ globalState === null || globalState === void 0 ? void 0 : globalState.modSlots
4171
+ ]);
4172
+ var headers = [
4173
+ 'Target'
4174
+ ].concat(_to_consumable_array(globalState === null || globalState === void 0 ? void 0 : globalState.modSlotParamLabels));
4175
+ return /*#__PURE__*/ React__default.createElement(Box, {
4176
+ gap: Box.gap.medium,
4177
+ padding: [
4178
+ Box.padding.medium,
4179
+ Box.padding.large
4180
+ ],
4181
+ className: "".concat(className, " ModMatrix"),
4182
+ style: _object_spread$1({
4183
+ backgroundColor: 'var(--bg-section)'
4184
+ }, style),
4185
+ flexDirection: Box.flexDirection.column
4186
+ }, /*#__PURE__*/ React__default.createElement(Box, {
4187
+ className: "ModMatrixHeader",
4188
+ gap: Box.gap.medium
4189
+ }, headers.map(function(item, i) {
4190
+ return /*#__PURE__*/ React__default.createElement(Box, {
4191
+ style: {
4192
+ color: targetColors[i],
4193
+ flex: i === 0 ? "0 0 ".concat(ComboboxCellWidth) : 'initial'
4194
+ },
4195
+ className: "ModMatrixHeaderCell",
4196
+ padding: [
4197
+ Box.padding.medium,
4198
+ Box.padding.large
4199
+ ]
4200
+ }, /*#__PURE__*/ React__default.createElement(Label, null, item));
4201
+ })), /*#__PURE__*/ React__default.createElement(Box, {
4202
+ className: "ModMatrixBody",
4203
+ gap: Box.gap.medium,
4204
+ flexDirection: Box.flexDirection.column
4205
+ }, (assignedModSlots === null || assignedModSlots === void 0 ? void 0 : assignedModSlots.length) ? assignedModSlots === null || assignedModSlots === void 0 ? void 0 : assignedModSlots.map(function(item, i) {
4206
+ return /*#__PURE__*/ React__default.createElement(ModMatrixRow, {
4207
+ rowId: item,
4208
+ rowIndex: i
4209
+ });
4210
+ }) : null, previewRowId ? /*#__PURE__*/ React__default.createElement(ModMatrixRow, {
4211
+ rowId: previewRowId,
4212
+ rowIndex: 0,
4213
+ // onChange={(item: any) =>
4214
+ // setAssignedRowIds([...assignedRowIds, item])
4215
+ // }
4216
+ isPreview: true
4217
+ }) : ''), /*#__PURE__*/ React__default.createElement(Box, {
4218
+ justifyContent: Box.justifyContent.flexStart
4219
+ }, /*#__PURE__*/ React__default.createElement(IconButton, {
4220
+ id: "addModMatrixRow",
4221
+ icon: IconButton.icon.add,
4222
+ margin: [
4223
+ IconButton.margin.small
4224
+ ],
4225
+ padding: [
4226
+ IconButton.padding.small
4227
+ ],
4228
+ // color="var(--color-gray-500)"
4229
+ // backgroundColor="transparent"
4230
+ onClick: function(e) {}
4231
+ })));
4232
+ }
4233
+
4234
+ var css_248z = "/* Tab styles */\n/* TODO: Refactor to use utility classes? */\n/* TODO: Clean up */\n\n.ModuleFooter .Tabs-item {\n background: transparent;\n color: var(--color-text);\n font-family: var(--font-leagueSpartan);\n background: var(--color-gray-600);\n flex: 1 0 auto;\n}\n\n.ModuleFooter .Tabs-item:hover,\n.ModuleFooter .tabs-item:focus,\n.ModuleFooter .tabs-item:focus-visible {\n background: var(--color-gray-700);\n}\n\n.ModuleFooter .Tabs-item[data-headlessui-state='selected'] {\n background: var(--color-gray-700);\n}\n";
4235
+ styleInject(css_248z);
4236
+
4237
+ function _array_like_to_array(arr, len) {
4238
+ if (len == null || len > arr.length) len = arr.length;
4239
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
4240
+ return arr2;
4241
+ }
4242
+ function _array_with_holes(arr) {
4243
+ if (Array.isArray(arr)) return arr;
4244
+ }
4245
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
4246
+ try {
4247
+ var info = gen[key](arg);
4248
+ var value = info.value;
4249
+ } catch (error) {
4250
+ reject(error);
4251
+ return;
4252
+ }
4253
+ if (info.done) {
4254
+ resolve(value);
4255
+ } else {
4256
+ Promise.resolve(value).then(_next, _throw);
4257
+ }
4258
+ }
4259
+ function _async_to_generator(fn) {
4260
+ return function() {
4261
+ var self = this, args = arguments;
4262
+ return new Promise(function(resolve, reject) {
4263
+ var gen = fn.apply(self, args);
4264
+ function _next(value) {
4265
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
4266
+ }
4267
+ function _throw(err) {
4268
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
4269
+ }
4270
+ _next(undefined);
4271
+ });
4272
+ };
4273
+ }
4274
+ function _define_property(obj, key, value) {
4275
+ if (key in obj) {
4276
+ Object.defineProperty(obj, key, {
4277
+ value: value,
4278
+ enumerable: true,
4279
+ configurable: true,
4280
+ writable: true
4281
+ });
4282
+ } else {
4283
+ obj[key] = value;
4284
+ }
4285
+ return obj;
4286
+ }
4287
+ function _iterable_to_array_limit(arr, i) {
4288
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
4289
+ if (_i == null) return;
4290
+ var _arr = [];
4291
+ var _n = true;
4292
+ var _d = false;
4293
+ var _s, _e;
4294
+ try {
4295
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
4296
+ _arr.push(_s.value);
4297
+ if (i && _arr.length === i) break;
4298
+ }
4299
+ } catch (err) {
4300
+ _d = true;
4301
+ _e = err;
4302
+ } finally{
4303
+ try {
4304
+ if (!_n && _i["return"] != null) _i["return"]();
4305
+ } finally{
4306
+ if (_d) throw _e;
4307
+ }
4308
+ }
4309
+ return _arr;
4310
+ }
4311
+ function _non_iterable_rest() {
4312
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
4313
+ }
4314
+ function _object_spread(target) {
4315
+ for(var i = 1; i < arguments.length; i++){
4316
+ var source = arguments[i] != null ? arguments[i] : {};
4317
+ var ownKeys = Object.keys(source);
4318
+ if (typeof Object.getOwnPropertySymbols === "function") {
4319
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
4320
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
4321
+ }));
4322
+ }
4323
+ ownKeys.forEach(function(key) {
4324
+ _define_property(target, key, source[key]);
4325
+ });
4326
+ }
4327
+ return target;
4328
+ }
4329
+ function _sliced_to_array(arr, i) {
4330
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
4331
+ }
4332
+ function _unsupported_iterable_to_array(o, minLen) {
4333
+ if (!o) return;
4334
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
4335
+ var n = Object.prototype.toString.call(o).slice(8, -1);
4336
+ if (n === "Object" && o.constructor) n = o.constructor.name;
4337
+ if (n === "Map" || n === "Set") return Array.from(n);
4338
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
4339
+ }
4340
+ function _ts_generator(thisArg, body) {
4341
+ var f, y, t, _ = {
4342
+ label: 0,
4343
+ sent: function() {
4344
+ if (t[0] & 1) throw t[1];
4345
+ return t[1];
4346
+ },
4347
+ trys: [],
4348
+ ops: []
4349
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
4350
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
4351
+ return this;
4352
+ }), g;
4353
+ function verb(n) {
4354
+ return function(v) {
4355
+ return step([
4356
+ n,
4357
+ v
4358
+ ]);
4359
+ };
4360
+ }
4361
+ function step(op) {
4362
+ if (f) throw new TypeError("Generator is already executing.");
4363
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
4364
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
4365
+ if (y = 0, t) op = [
4366
+ op[0] & 2,
4367
+ t.value
4368
+ ];
4369
+ switch(op[0]){
4370
+ case 0:
4371
+ case 1:
4372
+ t = op;
4373
+ break;
4374
+ case 4:
4375
+ _.label++;
4376
+ return {
4377
+ value: op[1],
4378
+ done: false
4379
+ };
4380
+ case 5:
4381
+ _.label++;
4382
+ y = op[1];
4383
+ op = [
4384
+ 0
4385
+ ];
4386
+ continue;
4387
+ case 7:
4388
+ op = _.ops.pop();
4389
+ _.trys.pop();
4390
+ continue;
4391
+ default:
4392
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
4393
+ _ = 0;
4394
+ continue;
4395
+ }
4396
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
4397
+ _.label = op[1];
4398
+ break;
4399
+ }
4400
+ if (op[0] === 6 && _.label < t[1]) {
4401
+ _.label = t[1];
4402
+ t = op;
4403
+ break;
4404
+ }
4405
+ if (t && _.label < t[2]) {
4406
+ _.label = t[2];
4407
+ _.ops.push(op);
4408
+ break;
4409
+ }
4410
+ if (t[2]) _.ops.pop();
4411
+ _.trys.pop();
4412
+ continue;
4413
+ }
4414
+ op = body.call(thisArg, _);
4415
+ } catch (e) {
4416
+ op = [
4417
+ 6,
4418
+ e
4419
+ ];
4420
+ y = 0;
4421
+ } finally{
4422
+ f = t = 0;
4423
+ }
4424
+ if (op[0] & 5) throw op[1];
4425
+ return {
4426
+ value: op[0] ? op[1] : void 0,
4427
+ done: true
4428
+ };
4429
+ }
4430
+ }
4431
+ var FooterTabs = /*#__PURE__*/ function(FooterTabs) {
4432
+ FooterTabs["ModMatrix"] = "ModMatrix";
4433
+ FooterTabs["InputMod"] = "InputMod";
4434
+ FooterTabs["LFOs"] = "LFOs";
4435
+ FooterTabs["Sequencer"] = "Sequencer";
4436
+ FooterTabs["Settings"] = "Settings";
4437
+ return FooterTabs;
4438
+ }({});
4439
+ var ModMatrixTab = function() {
4440
+ return /*#__PURE__*/ React__default.createElement(ModuleFooter$1, null);
4441
+ };
4442
+ var InputModTab = function() {
4443
+ return /*#__PURE__*/ React__default.createElement(Box, null, "InputModTab");
4444
+ };
4445
+ var LFOsTab = function() {
4446
+ return /*#__PURE__*/ React__default.createElement(Box, null, "LFOsTab");
4447
+ };
4448
+ var SequencerTab = function() {
4449
+ return /*#__PURE__*/ React__default.createElement(Box, null, "SequencerTab");
4450
+ };
4451
+ var SettingsTab = function() {
4452
+ return /*#__PURE__*/ React__default.createElement(Box, null, "SettingsTab");
4453
+ };
4454
+ function ModuleFooter(param) {
4455
+ var className = param.className, style = param.style;
4456
+ var _useState = _sliced_to_array(useState(0), 2), selectedTab = _useState[0], setSelectedTab = _useState[1];
4457
+ var setSelectedFooterTabFunc = Juce.getNativeFunction('setSelectedFooterTab');
4458
+ var getSelectedFooterTabFunc = Juce.getNativeFunction('getSelectedFooterTab');
4459
+ var isTabSelected = function(tabName) {
4460
+ return Object.keys(FooterTabs)[selectedTab] === tabName;
4461
+ };
4462
+ useEffect(function() {
4463
+ var getTabFromBackend = function() {
4464
+ return _async_to_generator(function() {
4465
+ var selectedIndex, e;
4466
+ return _ts_generator(this, function(_state) {
4467
+ switch(_state.label){
4468
+ case 0:
4469
+ _state.trys.push([
4470
+ 0,
4471
+ 2,
4472
+ ,
4473
+ 3
4474
+ ]);
4475
+ return [
4476
+ 4,
4477
+ getSelectedFooterTabFunc()
4478
+ ];
4479
+ case 1:
4480
+ selectedIndex = _state.sent();
4481
+ setSelectedTab(selectedIndex);
4482
+ return [
4483
+ 3,
4484
+ 3
4485
+ ];
4486
+ case 2:
4487
+ e = _state.sent();
4488
+ console.log(e);
4489
+ return [
4490
+ 3,
4491
+ 3
4492
+ ];
4493
+ case 3:
4494
+ return [
4495
+ 2
4496
+ ];
4497
+ }
4498
+ });
4499
+ })();
4500
+ };
4501
+ getTabFromBackend();
4502
+ }, [
4503
+ window
4504
+ ]);
4505
+ var handleTabChange = function(newSelection) {
4506
+ var updateBackend = function() {
4507
+ return _async_to_generator(function() {
4508
+ return _ts_generator(this, function(_state) {
4509
+ try {
4510
+ setSelectedFooterTabFunc(newSelection);
4511
+ setSelectedTab(newSelection);
4512
+ } catch (e) {
4513
+ console.log(e);
4514
+ }
4515
+ return [
4516
+ 2
4517
+ ];
4518
+ });
4519
+ })();
4520
+ };
4521
+ updateBackend();
4522
+ };
4523
+ return /*#__PURE__*/ React__default.createElement(Box, {
3239
4524
  gap: Box.gap.medium,
3240
4525
  tag: Box.tag.footer,
3241
- padding: [
3242
- Box.padding.medium,
3243
- Box.padding.large
3244
- ],
3245
- className: classnames(className),
4526
+ height: "100%",
4527
+ alignItems: Box.alignItems.flexStart,
4528
+ className: "ModuleFooter ".concat(className),
3246
4529
  style: _object_spread({
3247
4530
  backgroundColor: 'var(--bg-section)'
3248
4531
  }, style)
3249
- });
4532
+ }, /*#__PURE__*/ React__default.createElement(Box, {
4533
+ flexDirection: Box.flexDirection.column
4534
+ }, /*#__PURE__*/ React__default.createElement(Box, {
4535
+ style: {
4536
+ backgroundColor: 'var(--color-gray-500)'
4537
+ },
4538
+ padding: [
4539
+ Box.padding.small,
4540
+ Box.padding.small,
4541
+ Box.padding.none,
4542
+ Box.padding.small
4543
+ ]
4544
+ }, /*#__PURE__*/ React__default.createElement(Tabs, {
4545
+ items: [
4546
+ 'Mod Matrix',
4547
+ 'Input mod',
4548
+ 'LFOs',
4549
+ 'Sequencer',
4550
+ 'Settings'
4551
+ ],
4552
+ onChange: handleTabChange,
4553
+ selectedIndex: selectedTab,
4554
+ gap: "2px",
4555
+ padding: [
4556
+ Tabs.padding.medium,
4557
+ Tabs.padding.large
4558
+ ],
4559
+ width: "100%"
4560
+ })), /*#__PURE__*/ React__default.createElement(Box, {
4561
+ padding: [
4562
+ Box.padding.large
4563
+ ]
4564
+ }, isTabSelected("ModMatrix") ? /*#__PURE__*/ React__default.createElement(ModMatrixTab, null) : '', isTabSelected("InputMod") ? /*#__PURE__*/ React__default.createElement(InputModTab, null) : '', isTabSelected("LFOs") ? /*#__PURE__*/ React__default.createElement(LFOsTab, null) : '', isTabSelected("Sequencer") ? /*#__PURE__*/ React__default.createElement(SequencerTab, null) : '', isTabSelected("Settings") ? /*#__PURE__*/ React__default.createElement(SettingsTab, null) : '')));
3250
4565
  }
3251
4566
 
3252
- export { Slider as BarSlider, Box, Button, Dropdown, FontSizes, GlobalContextProvider, Heading, IconButton, IndicatorLight, Input, KeyValueDisplayScreen, Label, Matrix, ModuleFooter, ModuleHeader, Oscilloscope, RotarySlider, SliderValue, Spacing, Tabs, clamp, decimalToPercent, defaultGlobalStateValue as defaultValue, getPosition, getTransformString, normalisedToScaled, percentToDecimal, randomizeValue, scaledToNormalised as scaledTonormalised, useGlobalContext, useObservable, useSlider };
4567
+ export { Slider as BarSlider, Box, Button, Dropdown, FontSizes, GlobalContextProvider, Heading, IconButton, IndicatorLight, Input, KeyValueDisplayScreen, Label, ModuleFooter, ModuleHeader, Oscilloscope, RotarySlider, SliderValue, Spacing, Tabs, clamp, decimalToPercent, defaultGlobalStateValue as defaultValue, normalisedToScaled, percentToDecimal, randomizeValue, scaledToNormalised as scaledTonormalised, useGlobalContext, useObservable, useSlider };
3253
4568
  //# sourceMappingURL=index.js.map