@antimatter-audio/antimatter-ui 12.0.5 → 14.0.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 (127) hide show
  1. package/dist/advanced/IconButton/IconButton.d.ts +3 -1
  2. package/dist/advanced/IconButton/IconButton.d.ts.map +1 -1
  3. package/dist/advanced/KeyValueDisplayScreen/KeyValueDisplayScreen.d.ts.map +1 -1
  4. package/dist/advanced/LFOVisualizer/LFOVisualizer.d.ts +1 -0
  5. package/dist/advanced/LFOVisualizer/LFOVisualizer.d.ts.map +1 -1
  6. package/dist/advanced/LFOVisualizer/constants.d.ts +0 -2
  7. package/dist/advanced/LFOVisualizer/constants.d.ts.map +1 -1
  8. package/dist/advanced/ModuleFooter/LFO.d.ts +2 -2
  9. package/dist/advanced/ModuleFooter/LFO.d.ts.map +1 -1
  10. package/dist/advanced/ModuleFooter/LFOBox.d.ts +6 -0
  11. package/dist/advanced/ModuleFooter/LFOBox.d.ts.map +1 -0
  12. package/dist/advanced/ModuleFooter/ModuleFooter.d.ts.map +1 -1
  13. package/dist/advanced/ModuleFooter/SeqPanel.d.ts.map +1 -1
  14. package/dist/advanced/ModuleHeader/ModuleHeader.d.ts.map +1 -1
  15. package/dist/advanced/StepSequencer/StepSequencer.d.ts.map +1 -1
  16. package/dist/common/types.d.ts +24 -1
  17. package/dist/common/types.d.ts.map +1 -1
  18. package/dist/common/utils.d.ts +1 -0
  19. package/dist/common/utils.d.ts.map +1 -1
  20. package/dist/core/Box/Box.d.ts +3 -2
  21. package/dist/core/Box/Box.d.ts.map +1 -1
  22. package/dist/core/Dropdown/Dropdown.d.ts.map +1 -1
  23. package/dist/core/Heading/Heading.d.ts +3 -1
  24. package/dist/core/Heading/Heading.d.ts.map +1 -1
  25. package/dist/core/Icon/Icon.d.ts +37 -21
  26. package/dist/core/Icon/Icon.d.ts.map +1 -1
  27. package/dist/core/Indicators/IndicatorLight.d.ts +13 -3
  28. package/dist/core/Indicators/IndicatorLight.d.ts.map +1 -1
  29. package/dist/core/Indicators/hooks/useIndicator.d.ts +8 -0
  30. package/dist/core/Indicators/hooks/useIndicator.d.ts.map +1 -0
  31. package/dist/core/Input/Input.d.ts +4 -1
  32. package/dist/core/Input/Input.d.ts.map +1 -1
  33. package/dist/core/Label/Label.d.ts +2 -1
  34. package/dist/core/Label/Label.d.ts.map +1 -1
  35. package/dist/core/PositioningWrapper/PositioningWrapper.d.ts +16 -0
  36. package/dist/core/PositioningWrapper/PositioningWrapper.d.ts.map +1 -0
  37. package/dist/core/Slider/BarSlider.d.ts +20 -6
  38. package/dist/core/Slider/BarSlider.d.ts.map +1 -1
  39. package/dist/core/Slider/RotaryCircle.d.ts +35 -0
  40. package/dist/core/Slider/RotaryCircle.d.ts.map +1 -0
  41. package/dist/core/Slider/RotaryCombobox.d.ts +34 -0
  42. package/dist/core/Slider/RotaryCombobox.d.ts.map +1 -0
  43. package/dist/core/Slider/RotarySlider.d.ts +16 -15
  44. package/dist/core/Slider/RotarySlider.d.ts.map +1 -1
  45. package/dist/core/Slider/RotarySliderSVG.d.ts +20 -0
  46. package/dist/core/Slider/RotarySliderSVG.d.ts.map +1 -0
  47. package/dist/core/Slider/Slider.d.ts +75 -0
  48. package/dist/core/Slider/Slider.d.ts.map +1 -0
  49. package/dist/core/Slider/SliderSVG.d.ts +33 -0
  50. package/dist/core/Slider/SliderSVG.d.ts.map +1 -0
  51. package/dist/core/Slider/types.d.ts +22 -0
  52. package/dist/core/Slider/types.d.ts.map +1 -1
  53. package/dist/core/Tabs/Tabs.d.ts +32 -6
  54. package/dist/core/Tabs/Tabs.d.ts.map +1 -1
  55. package/dist/hooks/useCombobox.d.ts +6 -3
  56. package/dist/hooks/useCombobox.d.ts.map +1 -1
  57. package/dist/hooks/useDropdown.d.ts +3 -1
  58. package/dist/hooks/useDropdown.d.ts.map +1 -1
  59. package/dist/hooks/useIndicator.d.ts +14 -0
  60. package/dist/hooks/useIndicator.d.ts.map +1 -0
  61. package/dist/hooks/useSlider.d.ts.map +1 -1
  62. package/dist/index.js +2281 -1155
  63. package/dist/index.js.map +1 -1
  64. package/dist/src/advanced/IconButton/IconButton.d.ts +3 -1
  65. package/dist/src/advanced/IconButton/IconButton.d.ts.map +1 -1
  66. package/dist/src/advanced/KeyValueDisplayScreen/KeyValueDisplayScreen.d.ts.map +1 -1
  67. package/dist/src/advanced/LFOVisualizer/LFOVisualizer.d.ts +1 -0
  68. package/dist/src/advanced/LFOVisualizer/LFOVisualizer.d.ts.map +1 -1
  69. package/dist/src/advanced/LFOVisualizer/constants.d.ts +0 -2
  70. package/dist/src/advanced/LFOVisualizer/constants.d.ts.map +1 -1
  71. package/dist/src/advanced/ModuleFooter/LFO.d.ts.map +1 -1
  72. package/dist/src/advanced/ModuleFooter/LFOBox.d.ts +6 -0
  73. package/dist/src/advanced/ModuleFooter/LFOBox.d.ts.map +1 -0
  74. package/dist/src/advanced/ModuleFooter/ModuleFooter.d.ts.map +1 -1
  75. package/dist/src/advanced/ModuleFooter/SeqPanel.d.ts.map +1 -1
  76. package/dist/src/advanced/ModuleHeader/ModuleHeader.d.ts.map +1 -1
  77. package/dist/src/advanced/StepSequencer/StepSequencer.d.ts.map +1 -1
  78. package/dist/src/common/types.d.ts +24 -1
  79. package/dist/src/common/types.d.ts.map +1 -1
  80. package/dist/src/common/utils.d.ts +1 -0
  81. package/dist/src/common/utils.d.ts.map +1 -1
  82. package/dist/src/core/Box/Box.d.ts +3 -2
  83. package/dist/src/core/Box/Box.d.ts.map +1 -1
  84. package/dist/src/core/Dropdown/Dropdown.d.ts.map +1 -1
  85. package/dist/src/core/Heading/Heading.d.ts +3 -1
  86. package/dist/src/core/Heading/Heading.d.ts.map +1 -1
  87. package/dist/src/core/Icon/Icon.d.ts +37 -21
  88. package/dist/src/core/Icon/Icon.d.ts.map +1 -1
  89. package/dist/src/core/Indicators/IndicatorLight.d.ts +13 -3
  90. package/dist/src/core/Indicators/IndicatorLight.d.ts.map +1 -1
  91. package/dist/src/core/Indicators/hooks/useIndicator.d.ts +4 -2
  92. package/dist/src/core/Indicators/hooks/useIndicator.d.ts.map +1 -1
  93. package/dist/src/core/Input/Input.d.ts +4 -1
  94. package/dist/src/core/Input/Input.d.ts.map +1 -1
  95. package/dist/src/core/Label/Label.d.ts +2 -1
  96. package/dist/src/core/Label/Label.d.ts.map +1 -1
  97. package/dist/src/core/PositioningWrapper/PositioningWrapper.d.ts +16 -0
  98. package/dist/src/core/PositioningWrapper/PositioningWrapper.d.ts.map +1 -0
  99. package/dist/src/core/Slider/BarSlider.d.ts +20 -6
  100. package/dist/src/core/Slider/BarSlider.d.ts.map +1 -1
  101. package/dist/src/core/Slider/RotaryCircle.d.ts +35 -0
  102. package/dist/src/core/Slider/RotaryCircle.d.ts.map +1 -0
  103. package/dist/src/core/Slider/RotaryCombobox.d.ts +34 -0
  104. package/dist/src/core/Slider/RotaryCombobox.d.ts.map +1 -0
  105. package/dist/src/core/Slider/RotarySlider.d.ts +16 -15
  106. package/dist/src/core/Slider/RotarySlider.d.ts.map +1 -1
  107. package/dist/src/core/Slider/RotarySliderSVG.d.ts +20 -0
  108. package/dist/src/core/Slider/RotarySliderSVG.d.ts.map +1 -0
  109. package/dist/src/core/Slider/Slider.d.ts +75 -0
  110. package/dist/src/core/Slider/Slider.d.ts.map +1 -0
  111. package/dist/src/core/Slider/SliderSVG.d.ts +33 -0
  112. package/dist/src/core/Slider/SliderSVG.d.ts.map +1 -0
  113. package/dist/src/core/Slider/types.d.ts +22 -0
  114. package/dist/src/core/Slider/types.d.ts.map +1 -1
  115. package/dist/src/core/Tabs/Tabs.d.ts +32 -6
  116. package/dist/src/core/Tabs/Tabs.d.ts.map +1 -1
  117. package/dist/src/hooks/useCombobox.d.ts +6 -3
  118. package/dist/src/hooks/useCombobox.d.ts.map +1 -1
  119. package/dist/src/hooks/useDropdown.d.ts +3 -1
  120. package/dist/src/hooks/useDropdown.d.ts.map +1 -1
  121. package/dist/src/hooks/useIndicator.d.ts +14 -0
  122. package/dist/src/hooks/useIndicator.d.ts.map +1 -0
  123. package/dist/src/hooks/useSlider.d.ts.map +1 -1
  124. package/dist/src/index.d.ts +2 -1
  125. package/dist/src/index.d.ts.map +1 -1
  126. package/dist/styles.css +16 -6
  127. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -33,8 +33,8 @@ function styleInject(css, ref) {
33
33
  }
34
34
  }
35
35
 
36
- var css_248z$c = "@theme static {\n --color-brand: #bb68d9;\n --color-brand-900: #443342;\n --color-brand-700: #932eb8;\n --color-brand-600: #826993;\n --color-brand-400: #d199e6;\n --color-brand-300: #f3d4f4;\n --color-alert: #8a0101;\n --color-text: #bab6cf;\n --color-gray-100: #c7c3de;\n --color-gray-200: #9a96ab;\n --color-gray-300: #838091;\n --color-gray-400: #595763;\n --color-gray-500: #4c4a54;\n --color-gray-600: #2e2c33;\n --color-gray-700: #1e1d21;\n --color-gray-800: #101012;\n --color-gray-900: #09090a;\n\n --color-VFDBlue-100: #0d3814;\n --color-VFDBlue-200: #234e4a;\n --color-VFDBlue-300: #128073;\n --color-VFDBlue-400: #138c6e;\n --color-VFDBlue-500: #1abe95;\n --color-VFDBlue-600: #23d8a4;\n --color-VFDBlue-700: #4aeea4;\n --color-VFDBlue-1000: #35edb4;\n --spacing-none: 0px;\n --spacing-xs: 2px;\n --spacing-sm: 4px;\n --spacing-ms: 6px;\n --spacing-md: 8px;\n --spacing-ml: 12px;\n --spacing-lg: 16px;\n --spacing-xl: 20px;\n --m-none: 0px;\n --m-xs: 2px;\n --m-sm: 4px;\n --m-ms: 6px;\n --m-md: 8px;\n --m-ml: 12px;\n --m-lg: 16px;\n --m-xl: 20px;\n --mt-none: 0px;\n --mt-xs: 2px;\n --mt-sm: 4px;\n --mt-ms: 6px;\n --mt-md: 8px;\n --mt-ml: 12px;\n --mt-lg: 16px;\n --mt-xl: 20px;\n --mr-none: 0px;\n --mr-xs: 2px;\n --mr-sm: 4px;\n --mr-ms: 6px;\n --mr-md: 8px;\n --mr-ml: 12px;\n --mr-lg: 16px;\n --mr-xl: 20px;\n --mb-none: 0px;\n --mb-xs: 2px;\n --mb-sm: 4px;\n --mb-ms: 6px;\n --mb-md: 8px;\n --mb-ml: 12px;\n --mb-lg: 16px;\n --mb-xl: 20px;\n --ml-none: 0px;\n --ml-xs: 2px;\n --ml-sm: 4px;\n --ml-ms: 6px;\n --ml-md: 8px;\n --ml-ml: 12px;\n --ml-lg: 16px;\n --ml-xl: 20px;\n --p-none: 0px;\n --p-xs: 2px;\n --p-sm: 4px;\n --p-ms: 6px;\n --p-md: 8px;\n --p-ml: 12px;\n --p-lg: 16px;\n --p-xl: 20px;\n --pt-none: 0px;\n --pt-xs: 2px;\n --pt-sm: 4px;\n --pt-ms: 6px;\n --pt-md: 8px;\n --pt-ml: 12px;\n --pt-lg: 16px;\n --pt-xl: 20px;\n --pr-none: 0px;\n --pr-xs: 2px;\n --pr-sm: 4px;\n --pr-ms: 6px;\n --pr-md: 8px;\n --pr-ml: 12px;\n --pr-lg: 16px;\n --pr-xl: 20px;\n --pb-none: 0px;\n --pb-xs: 2px;\n --pb-sm: 4px;\n --pb-ms: 6px;\n --pb-md: 8px;\n --pb-ml: 12px;\n --pb-lg: 16px;\n --pb-xl: 20px;\n --pl-none: 0px;\n --pl-xs: 2px;\n --pl-sm: 4px;\n --pl-ms: 6px;\n --pl-md: 8px;\n --pl-ml: 12px;\n --pl-lg: 16px;\n --pl-xl: 20px;\n --bg-page: #111111;\n --bg-section: #1e1d21;\n --bg-popover: #09090a;\n --bg-highlighted: #838091;\n --bg-muted: #595763;\n --bg-selected: #2e2c33;\n --bg-input: #1e1d21;\n --font-leagueSpartan: 'LeagueSpartan';\n --text-xs: 0.625rem;\n --text-sm: 0.75rem;\n --text-ms: 0.813rem;\n --text-md: 0.875rem;\n --text-lg: 1rem;\n --text-xl: 1.25rem;\n --text-title: 1.75rem;\n --gap-none: 0px;\n --gap-xs: 2px;\n --gap-sm: 4px;\n --gap-ms: 6px;\n --gap-md: 8px;\n --gap-ml: 12px;\n --gap-lg: 16px;\n --gap-xl: 20px;\n}\n\ninput,\ninput:hover,\ninput:focus,\ninput:focus-visible {\n background: transparent;\n border: none;\n outline: none;\n appearance: textfield;\n}\n\nbutton,\nbutton:hover,\nbutton:focus,\nbutton:focus-visible {\n outline: none;\n}\n\nbutton:disabled,\ninput:disabled {\n cursor: not-allowed;\n}\n\ndiv:focus,\ndiv:focus-visible {\n outline: none;\n appearance: textfield;\n}\n\n.cursor-hidden * {\n cursor: none !important;\n}\n::-webkit-scrollbar,\n::-webkit-scrollbar-track {\n background-color: var(--color-gray-600);\n}\n\n::-webkit-scrollbar-thumb {\n background-color: #252429;\n}\n\n* {\n -ms-overflow-style: none;\n}\n\n/* div::-webkit-scrollbar {\n display: none;\n} */\n\n@font-face {\n font-family: LeagueSpartan;\n /* ascent-override: 70%; */\n src: url('./common/assets/fonts/LeagueSpartan-Regular.ttf');\n}\n\n@font-face {\n font-family: LeagueSpartan;\n /* ascent-override: 70%; */\n src: url('./common/assets/fonts/LeagueSpartan-Thin.ttf');\n font-weight: lighter;\n}\n";
37
- styleInject(css_248z$c);
36
+ var css_248z$f = "@theme static {\n --color-brand: #bb68d9;\n --color-brand-900: #443342;\n --color-brand-700: #932eb8;\n --color-brand-600: #826993;\n --color-brand-400: #d199e6;\n --color-brand-300: #f3d4f4;\n --color-brand-secondary: #18d6d6;\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-lv1: #0e0e12;\n --bg-lv2: #121216;\n --bg-lv3: #16171d;\n --bg-lv4: #212128;\n --bg-lv5: #2b2b31;\n --bg-lv6: #34343a;\n --bg-lv7: #3b3b41;\n --bg-lv8: #49494d;\n --bg-lv9: #535357;\n --bg-lv10: #797887;\n --bg-lv11: #9999a7;\n --bg-lv12: #c1c1c1;\n --bg-selected: #2e2c33;\n\n /* --bg-lv3-brightened: #1a1b21; */\n\n --font-leagueSpartan: 'LeagueSpartan';\n --text-xs: 0.625rem;\n --text-sm: 0.75rem;\n --text-ms: 0.813rem;\n --text-md: 0.875rem;\n --text-lg: 1rem;\n --text-xl: 1.25rem;\n --text-title: 1.75rem;\n --gap-none: 0px;\n --gap-xs: 2px;\n --gap-sm: 4px;\n --gap-ms: 6px;\n --gap-md: 8px;\n --gap-ml: 12px;\n --gap-lg: 16px;\n --gap-xl: 20px;\n}\n\ninput,\ninput:hover,\ninput:focus,\ninput:focus-visible {\n background: transparent;\n border: none;\n outline: none;\n appearance: textfield;\n}\n\nbutton,\nbutton:hover,\nbutton:focus,\nbutton:focus-visible {\n outline: none;\n}\n\nbutton:disabled,\ninput:disabled {\n cursor: not-allowed;\n}\n\ndiv:focus,\ndiv:focus-visible {\n outline: none;\n appearance: textfield;\n}\n\n.cursor-hidden * {\n cursor: none !important;\n}\n::-webkit-scrollbar,\n::-webkit-scrollbar-track {\n background-color: var(--color-gray-600);\n}\n\n::-webkit-scrollbar-thumb {\n background-color: #252429;\n}\n\n* {\n -ms-overflow-style: none;\n}\n\n/* div::-webkit-scrollbar {\n display: none;\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$f);
38
38
 
39
39
  var Spacing = /*#__PURE__*/ function(Spacing) {
40
40
  Spacing["none"] = "none";
@@ -52,11 +52,35 @@ var FlexDirection = /*#__PURE__*/ function(FlexDirection) {
52
52
  FlexDirection["column"] = "column";
53
53
  return FlexDirection;
54
54
  }({});
55
+ var TextAlign = /*#__PURE__*/ function(TextAlign) {
56
+ TextAlign["left"] = "left";
57
+ TextAlign["center"] = "center";
58
+ TextAlign["right"] = "right";
59
+ return TextAlign;
60
+ }({});
55
61
  var FlexWrap = /*#__PURE__*/ function(FlexWrap) {
56
62
  FlexWrap["wrap"] = "wrap";
57
63
  FlexWrap["noWrap"] = "nowrap";
58
64
  return FlexWrap;
59
65
  }({});
66
+ var JustifyContent$1 = /*#__PURE__*/ function(JustifyContent) {
67
+ JustifyContent["flexStart"] = "flex-start";
68
+ JustifyContent["flexEnd"] = "flex-end";
69
+ JustifyContent["center"] = "center";
70
+ JustifyContent["spaceBetween"] = "space-between";
71
+ JustifyContent["spaceAround"] = "space-around";
72
+ JustifyContent["spaceEvenly"] = "space-evenly";
73
+ JustifyContent["stretch"] = "stretch";
74
+ return JustifyContent;
75
+ }({});
76
+ var AlignItems$1 = /*#__PURE__*/ function(AlignItems) {
77
+ AlignItems["flexStart"] = "flex-start";
78
+ AlignItems["flexEnd"] = "flex-end";
79
+ AlignItems["center"] = "center";
80
+ AlignItems["stretch"] = "stretch";
81
+ AlignItems["baseline"] = "baseline";
82
+ return AlignItems;
83
+ }({});
60
84
  var Height = /*#__PURE__*/ function(Height) {
61
85
  Height["full"] = "100%";
62
86
  Height["auto"] = "auto";
@@ -87,65 +111,11 @@ var Orientation = /*#__PURE__*/ function(Orientation) {
87
111
  return Orientation;
88
112
  }({});
89
113
 
90
- var css_248z$b = ".Tabs {\n display: flex;\n font-size: 1rem;\n align-items: center;\n justify-content: center;\n vertical-align: middle;\n white-space: nowrap;\n text-decoration: none;\n text-transform: uppercase;\n text-align: center;\n border: 0;\n appearance: none;\n user-select: none;\n -webkit-user-select: none;\n}\n\n.Tabs-item {\n &:disabled {\n cursor: not-allowed;\n }\n}\n\n.Tabs-item::-moz-selection {\n background: transparent;\n}\n.Tabs-item::selection {\n background: transparent;\n}\n";
91
- styleInject(css_248z$b);
92
-
93
- function Tabs(param) {
94
- var items = param.items, className = param.className, _param_padding = param.padding, padding = _param_padding === void 0 ? [
95
- Spacing.mediumSmall
96
- ] : _param_padding, _param_margin = param.margin, margin = _param_margin === void 0 ? [
97
- Spacing.none
98
- ] : _param_margin, gap = param.gap, width = param.width, onChange = param.onChange, selectedIndex = param.selectedIndex;
99
- // const [selectedItem, setSelectedItem] = useState(0);
100
- var handleChange = function(index) {
101
- // setSelectedItem(index);
102
- onChange(index);
103
- };
104
- var _margin_, _margin_1, _margin_2, _ref;
105
- //around
106
- //vertical, horizontal
107
- // top, right, bottom, left
108
- return /*#__PURE__*/ React__default.createElement(TabGroup, {
109
- style: {
110
- marginTop: "var(--mt-".concat(margin[0], ")"),
111
- marginRight: "var(--mr-".concat((_margin_ = margin[1]) !== null && _margin_ !== void 0 ? _margin_ : margin[0], ")"),
112
- marginBottom: "var(--mb-".concat((_margin_1 = margin[2]) !== null && _margin_1 !== void 0 ? _margin_1 : margin[0], ")"),
113
- 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], ")"),
114
- width: width
115
- },
116
- manual: true,
117
- selectedIndex: selectedIndex,
118
- onChange: function(index) {
119
- return handleChange(index);
120
- }
121
- }, /*#__PURE__*/ React__default.createElement(TabList, {
122
- className: classnames('Tabs', className),
123
- style: {
124
- gap: gap
125
- }
126
- }, items && items.map(function(item, index) {
127
- var _padding_, _padding_1, _padding_2, _ref;
128
- return /*#__PURE__*/ React__default.createElement(Tab, {
129
- key: item,
130
- id: item,
131
- style: {
132
- cursor: 'pointer',
133
- fontSize: 'var(--text-md)',
134
- lineHeight: '1.25rem',
135
- paddingTop: "var(--p-".concat(padding[0], ")"),
136
- paddingRight: "var(--p-".concat((_padding_ = padding[1]) !== null && _padding_ !== void 0 ? _padding_ : padding[0], ")"),
137
- paddingBottom: "var(--p-".concat((_padding_1 = padding[2]) !== null && _padding_1 !== void 0 ? _padding_1 : padding[0], ")"),
138
- paddingLeft: "var(--p-".concat((_ref = (_padding_2 = padding[3]) !== null && _padding_2 !== void 0 ? _padding_2 : padding[1]) !== null && _ref !== void 0 ? _ref : padding[0], ")")
139
- },
140
- className: classnames('Tabs-item', 'bg-input', 'color-input-text')
141
- }, item);
142
- })));
143
- }
144
- Tabs.padding = Spacing;
145
- Tabs.margin = Spacing;
114
+ var css_248z$e = ".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\n/* Tab styles */\n/* TODO: Refactor to use utility classes? */\n/* TODO: Clean up */\n/* TODO how do we want to style the scrollbars? */\n\n/* .Tabs-item {\n color: var(--bg-lv11);\n font-family: var(--font-leagueSpartan);\n background: var(--bg-lv2);\n} */\n\n.Tabs-item[data-headlessui-state='hover'],\n.Tabs-item[data-headlessui-state='hover active'],\n.tabs-item:focus,\n.tabs-item:focus-visible {\n filter: brightness(80%);\n}\n/* \n.Tabs-item[data-headlessui-state='selected hover'],\n.Tabs-item[data-headlessui-state='selected hover active'],\n.Tabs-item[data-headlessui-state='selected'],\n.Tabs-item[data-headlessui-state='selected focus'] {\n background: var(--bg-lv3);\n}\n\n.LFOTab .Tabs-item[data-headlessui-state='selected hover'] svg path,\n.LFOTab .Tabs-item[data-headlessui-state='selected hover active'] svg path,\n.LFOTab .Tabs-item[data-headlessui-state='selected'] svg path,\n.LFOTab .Tabs-item[data-headlessui-state='selected focus'] svg path,\n.LFOTab .Tabs-item[data-headlessui-state='selected hover'] svg line,\n.LFOTab .Tabs-item[data-headlessui-state='selected hover active'] svg line,\n.LFOTab .Tabs-item[data-headlessui-state='selected'] svg line,\n.LFOTab .Tabs-item[data-headlessui-state='selected focus'] svg line,\n.LFOTab .Tabs-item[data-headlessui-state='selected hover'] svg polyline,\n.LFOTab .Tabs-item[data-headlessui-state='selected hover active'] svg polyline,\n.LFOTab .Tabs-item[data-headlessui-state='selected'] svg polyline,\n.LFOTab .Tabs-item[data-headlessui-state='selected focus'] svg polyline {\n stroke: var(--color-brand) !important;\n}\n\n.LFOTab .Tabs-item[data-headlessui-state='selected hover'] .Label,\n.LFOTab .Tabs-item[data-headlessui-state='selected hover active'] .Label,\n.LFOTab .Tabs-item[data-headlessui-state='selected'] .Label,\n.LFOTab .Tabs-item[data-headlessui-state='selected focus'] .Label {\n color: var(--color-brand) !important;\n} */\n";
115
+ styleInject(css_248z$e);
146
116
 
147
- var css_248z$a = ".Button {\n font-size: var(--text-xs);\n display: flex;\n align-items: center;\n justify-content: center;\n padding-right: var(--spacing-ms);\n padding-left: var(--spacing-ms);\n cursor: pointer;\n vertical-align: middle;\n white-space: nowrap;\n text-decoration: none;\n text-align: enter;\n border: 0;\n appearance: none;\n user-select: none;\n -webkit-user-select: none;\n &.xSmall {\n width: var(--spacing-ml);\n height: var(--spacing-ml);\n }\n &.small {\n font-size: var(--text-xs);\n min-width: 1rem;\n min-height: var(--spacing-sm);\n }\n &.large {\n border-radius: var(--radius-sm);\n min-width: 1rem;\n min-height: var(--spacing-xl);\n }\n}\n";
148
- styleInject(css_248z$a);
117
+ var css_248z$d = ".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 color: var(--color-text);\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";
118
+ styleInject(css_248z$d);
149
119
 
150
120
  var ButtonSize = /*#__PURE__*/ function(ButtonSize) {
151
121
  ButtonSize["xSmall"] = "xSmall";
@@ -199,13 +169,13 @@ function useObservable(param) {
199
169
  };
200
170
  }
201
171
 
202
- function _array_like_to_array$j(arr, len) {
172
+ function _array_like_to_array$k(arr, len) {
203
173
  if (len == null || len > arr.length) len = arr.length;
204
174
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
205
175
  return arr2;
206
176
  }
207
177
  function _array_without_holes$2(arr) {
208
- if (Array.isArray(arr)) return _array_like_to_array$j(arr);
178
+ if (Array.isArray(arr)) return _array_like_to_array$k(arr);
209
179
  }
210
180
  function _iterable_to_array$2(iter) {
211
181
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
@@ -214,15 +184,15 @@ function _non_iterable_spread$2() {
214
184
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
215
185
  }
216
186
  function _to_consumable_array$2(arr) {
217
- return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$j(arr) || _non_iterable_spread$2();
187
+ return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$k(arr) || _non_iterable_spread$2();
218
188
  }
219
- function _unsupported_iterable_to_array$j(o, minLen) {
189
+ function _unsupported_iterable_to_array$k(o, minLen) {
220
190
  if (!o) return;
221
- if (typeof o === "string") return _array_like_to_array$j(o, minLen);
191
+ if (typeof o === "string") return _array_like_to_array$k(o, minLen);
222
192
  var n = Object.prototype.toString.call(o).slice(8, -1);
223
193
  if (n === "Object" && o.constructor) n = o.constructor.name;
224
194
  if (n === "Map" || n === "Set") return Array.from(n);
225
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$j(o, minLen);
195
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$k(o, minLen);
226
196
  }
227
197
  // export const roundUpToTwoDecimals = (val: number) => Math.ceil(val * 100) / 100;
228
198
  // mocks the `normalisedToScaledValue` internal method from JUCE
@@ -358,17 +328,31 @@ var incrementValue = function(param) {
358
328
  normalisedInterval;
359
329
  return clamp(newValue);
360
330
  };
331
+ var timerFlag = null;
332
+ function throttle(mainFunction, delay) {
333
+ return function() {
334
+ for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
335
+ args[_key] = arguments[_key];
336
+ }
337
+ if (timerFlag === null) {
338
+ mainFunction.apply(void 0, _to_consumable_array$2(args));
339
+ timerFlag = setTimeout(function() {
340
+ timerFlag = null;
341
+ }, delay);
342
+ }
343
+ };
344
+ }
361
345
 
362
- function _array_like_to_array$i(arr, len) {
346
+ function _array_like_to_array$j(arr, len) {
363
347
  if (len == null || len > arr.length) len = arr.length;
364
348
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
365
349
  return arr2;
366
350
  }
367
- function _array_with_holes$i(arr) {
351
+ function _array_with_holes$j(arr) {
368
352
  if (Array.isArray(arr)) return arr;
369
353
  }
370
354
  function _array_without_holes$1(arr) {
371
- if (Array.isArray(arr)) return _array_like_to_array$i(arr);
355
+ if (Array.isArray(arr)) return _array_like_to_array$j(arr);
372
356
  }
373
357
  function asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, key, arg) {
374
358
  try {
@@ -399,7 +383,7 @@ function _async_to_generator$4(fn) {
399
383
  });
400
384
  };
401
385
  }
402
- function _define_property$k(obj, key, value) {
386
+ function _define_property$m(obj, key, value) {
403
387
  if (key in obj) {
404
388
  Object.defineProperty(obj, key, {
405
389
  value: value,
@@ -415,7 +399,7 @@ function _define_property$k(obj, key, value) {
415
399
  function _iterable_to_array$1(iter) {
416
400
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
417
401
  }
418
- function _iterable_to_array_limit$i(arr, i) {
402
+ function _iterable_to_array_limit$j(arr, i) {
419
403
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
420
404
  if (_i == null) return;
421
405
  var _arr = [];
@@ -439,13 +423,13 @@ function _iterable_to_array_limit$i(arr, i) {
439
423
  }
440
424
  return _arr;
441
425
  }
442
- function _non_iterable_rest$i() {
426
+ function _non_iterable_rest$j() {
443
427
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
444
428
  }
445
429
  function _non_iterable_spread$1() {
446
430
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
447
431
  }
448
- function _object_spread$k(target) {
432
+ function _object_spread$l(target) {
449
433
  for(var i = 1; i < arguments.length; i++){
450
434
  var source = arguments[i] != null ? arguments[i] : {};
451
435
  var ownKeys = Object.keys(source);
@@ -455,7 +439,7 @@ function _object_spread$k(target) {
455
439
  }));
456
440
  }
457
441
  ownKeys.forEach(function(key) {
458
- _define_property$k(target, key, source[key]);
442
+ _define_property$m(target, key, source[key]);
459
443
  });
460
444
  }
461
445
  return target;
@@ -479,19 +463,19 @@ function _object_spread_props$4(target, source) {
479
463
  }
480
464
  return target;
481
465
  }
482
- function _sliced_to_array$i(arr, i) {
483
- return _array_with_holes$i(arr) || _iterable_to_array_limit$i(arr, i) || _unsupported_iterable_to_array$i(arr, i) || _non_iterable_rest$i();
466
+ function _sliced_to_array$j(arr, i) {
467
+ return _array_with_holes$j(arr) || _iterable_to_array_limit$j(arr, i) || _unsupported_iterable_to_array$j(arr, i) || _non_iterable_rest$j();
484
468
  }
485
469
  function _to_consumable_array$1(arr) {
486
- return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$i(arr) || _non_iterable_spread$1();
470
+ return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$j(arr) || _non_iterable_spread$1();
487
471
  }
488
- function _unsupported_iterable_to_array$i(o, minLen) {
472
+ function _unsupported_iterable_to_array$j(o, minLen) {
489
473
  if (!o) return;
490
- if (typeof o === "string") return _array_like_to_array$i(o, minLen);
474
+ if (typeof o === "string") return _array_like_to_array$j(o, minLen);
491
475
  var n = Object.prototype.toString.call(o).slice(8, -1);
492
476
  if (n === "Object" && o.constructor) n = o.constructor.name;
493
477
  if (n === "Map" || n === "Set") return Array.from(n);
494
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$i(o, minLen);
478
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$j(o, minLen);
495
479
  }
496
480
  function _ts_generator$4(thisArg, body) {
497
481
  var f, y, t, _ = {
@@ -611,61 +595,61 @@ var defaultGlobalStateValue = {
611
595
  var reducer = function(state, action) {
612
596
  switch(action.type){
613
597
  case 'HIGHLIGHTED_ITEM_CHANGED':
614
- return _object_spread_props$4(_object_spread$k({}, state), {
598
+ return _object_spread_props$4(_object_spread$l({}, state), {
615
599
  highlightedItem: action.payload
616
600
  });
617
601
  // case 'FOCUSED_ITEM_CHANGED':
618
602
  // return { ...state, focusedItem: action.payload };
619
603
  case 'ADVANCED_VIEW_TOGGLED':
620
- return _object_spread_props$4(_object_spread$k({}, state), {
604
+ return _object_spread_props$4(_object_spread$l({}, state), {
621
605
  advancedView: action.payload
622
606
  });
623
607
  case 'AUTOMATABLE_PARAMS_LIST_RECEIVED':
624
- return _object_spread_props$4(_object_spread$k({}, state), {
608
+ return _object_spread_props$4(_object_spread$l({}, state), {
625
609
  automatableParamsList: action.payload
626
610
  });
627
611
  case 'AUTOMATABLE_PARAM_LABELS_RECEIVED':
628
- return _object_spread_props$4(_object_spread$k({}, state), {
612
+ return _object_spread_props$4(_object_spread$l({}, state), {
629
613
  automatableParamLabels: action.payload
630
614
  });
631
615
  case 'PARAMETER_TYPES_RECEIVED':
632
- return _object_spread_props$4(_object_spread$k({}, state), {
616
+ return _object_spread_props$4(_object_spread$l({}, state), {
633
617
  parameterTypes: action.payload
634
618
  });
635
619
  case 'ALL_PARAMETERS_RECEIVED':
636
- return _object_spread_props$4(_object_spread$k({}, state), {
620
+ return _object_spread_props$4(_object_spread$l({}, state), {
637
621
  allParameters: action.payload
638
622
  });
639
623
  case 'MOD_SLOTS_RECEIVED':
640
- return _object_spread_props$4(_object_spread$k({}, state), {
624
+ return _object_spread_props$4(_object_spread$l({}, state), {
641
625
  modSlotIds: action.payload.map(function(val) {
642
626
  return val[0];
643
627
  })
644
628
  });
645
629
  case 'MOD_SLOT_ROW_TARGETS_RECEIVED':
646
630
  var _action_payload;
647
- return _object_spread_props$4(_object_spread$k({}, state), {
631
+ return _object_spread_props$4(_object_spread$l({}, state), {
648
632
  modSlotTargets: action === null || action === void 0 ? void 0 : (_action_payload = action.payload) === null || _action_payload === void 0 ? void 0 : _action_payload.reduce(function(acc, val) {
649
- return _object_spread_props$4(_object_spread$k({}, acc), _define_property$k({}, val[0], val[1]));
633
+ return _object_spread_props$4(_object_spread$l({}, acc), _define_property$m({}, val[0], val[1]));
650
634
  }, {})
651
635
  });
652
636
  case 'MOD_SLOT_ROW_TARGET_UPDATED':
653
637
  var _action_payload1, _action_payload2;
654
- return _object_spread_props$4(_object_spread$k({}, state), {
655
- modSlotTargets: _object_spread_props$4(_object_spread$k({}, state === null || state === void 0 ? void 0 : state.modSlotTargets), _define_property$k({}, (_action_payload1 = action.payload) === null || _action_payload1 === void 0 ? void 0 : _action_payload1.id, action === null || action === void 0 ? void 0 : (_action_payload2 = action.payload) === null || _action_payload2 === void 0 ? void 0 : _action_payload2.value))
638
+ return _object_spread_props$4(_object_spread$l({}, state), {
639
+ modSlotTargets: _object_spread_props$4(_object_spread$l({}, state === null || state === void 0 ? void 0 : state.modSlotTargets), _define_property$m({}, (_action_payload1 = action.payload) === null || _action_payload1 === void 0 ? void 0 : _action_payload1.id, action === null || action === void 0 ? void 0 : (_action_payload2 = action.payload) === null || _action_payload2 === void 0 ? void 0 : _action_payload2.value))
656
640
  });
657
641
  case 'MOD_SLOT_PREVIEW_TARGET_INDEX_UPDATED':
658
642
  {
659
- return _object_spread_props$4(_object_spread$k({}, state), {
660
- modSlotPreview: _object_spread_props$4(_object_spread$k({}, state.modSlotPreview), {
643
+ return _object_spread_props$4(_object_spread$l({}, state), {
644
+ modSlotPreview: _object_spread_props$4(_object_spread$l({}, state.modSlotPreview), {
661
645
  targetIndex: action.payload
662
646
  })
663
647
  });
664
648
  }
665
649
  case 'MOD_SLOT_PREVIEW_SLOT_ID_UPDATED':
666
650
  {
667
- return _object_spread_props$4(_object_spread$k({}, state), {
668
- modSlotPreview: _object_spread_props$4(_object_spread$k({}, state.modSlotPreview), {
651
+ return _object_spread_props$4(_object_spread$l({}, state), {
652
+ modSlotPreview: _object_spread_props$4(_object_spread$l({}, state.modSlotPreview), {
669
653
  slotId: action === null || action === void 0 ? void 0 : action.payload
670
654
  })
671
655
  });
@@ -673,7 +657,7 @@ var reducer = function(state, action) {
673
657
  case 'SET_NEW_MOD_SLOT_PREVIEW':
674
658
  {
675
659
  var _state_modSlotIds_find;
676
- return _object_spread_props$4(_object_spread$k({}, state), {
660
+ return _object_spread_props$4(_object_spread$l({}, state), {
677
661
  modSlotPreview: {
678
662
  slotId: (_state_modSlotIds_find = state.modSlotIds.find(function(item) {
679
663
  return state.modSlotTargets[item] <= 0;
@@ -685,7 +669,7 @@ var reducer = function(state, action) {
685
669
  }
686
670
  case 'CLEAR_MOD_SLOT_PREVIEW':
687
671
  {
688
- return _object_spread_props$4(_object_spread$k({}, state), {
672
+ return _object_spread_props$4(_object_spread$l({}, state), {
689
673
  modSlotPreview: {
690
674
  slotId: '',
691
675
  isEditable: false,
@@ -695,26 +679,26 @@ var reducer = function(state, action) {
695
679
  }
696
680
  case 'MOD_SLOT_PREVIEW_IS_EDITABLE_UPDATED':
697
681
  {
698
- return _object_spread_props$4(_object_spread$k({}, state), {
699
- modSlotPreview: _object_spread_props$4(_object_spread$k({}, state.modSlotPreview), {
682
+ return _object_spread_props$4(_object_spread$l({}, state), {
683
+ modSlotPreview: _object_spread_props$4(_object_spread$l({}, state.modSlotPreview), {
700
684
  isEditable: action === null || action === void 0 ? void 0 : action.payload
701
685
  })
702
686
  });
703
687
  }
704
688
  case 'MOD_SLOT_PARAMS_LIST_RECEIVED':
705
689
  var modSlotNames = Object.keys(state.modSlotTargets);
706
- return _object_spread_props$4(_object_spread$k({}, state), {
690
+ return _object_spread_props$4(_object_spread$l({}, state), {
707
691
  modSlotParams: action === null || action === void 0 ? void 0 : action.payload.reduce(function(acc, item, i) {
708
692
  acc[modSlotNames[i]] = item;
709
693
  return acc;
710
694
  }, {})
711
695
  });
712
696
  case 'DEFAULT_PARAM_VALUES_RECEIVED':
713
- return _object_spread_props$4(_object_spread$k({}, state), {
697
+ return _object_spread_props$4(_object_spread$l({}, state), {
714
698
  defaultParamValues: action === null || action === void 0 ? void 0 : action.payload
715
699
  });
716
700
  case 'MOD_SLOT_PARAM_LABELS_RECIEVED':
717
- return _object_spread_props$4(_object_spread$k({}, state), {
701
+ return _object_spread_props$4(_object_spread$l({}, state), {
718
702
  modSlotParamLabels: action === null || action === void 0 ? void 0 : action.payload
719
703
  });
720
704
  default:
@@ -733,7 +717,7 @@ function useGlobalContext(selector) {
733
717
  // Context provider
734
718
  function GlobalContextProvider(param) {
735
719
  var children = param.children;
736
- var _useReducer = _sliced_to_array$i(useReducer(reducer, defaultGlobalStateValue), 2), state = _useReducer[0], dispatch = _useReducer[1];
720
+ var _useReducer = _sliced_to_array$j(useReducer(reducer, defaultGlobalStateValue), 2), state = _useReducer[0], dispatch = _useReducer[1];
737
721
  var highlightedItemChanged = useCallback(function(highlightedItem) {
738
722
  dispatch({
739
723
  type: 'HIGHLIGHTED_ITEM_CHANGED',
@@ -1001,15 +985,15 @@ function GlobalContextProvider(param) {
1001
985
  }, children);
1002
986
  }
1003
987
 
1004
- function _array_like_to_array$h(arr, len) {
988
+ function _array_like_to_array$i(arr, len) {
1005
989
  if (len == null || len > arr.length) len = arr.length;
1006
990
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1007
991
  return arr2;
1008
992
  }
1009
- function _array_with_holes$h(arr) {
993
+ function _array_with_holes$i(arr) {
1010
994
  if (Array.isArray(arr)) return arr;
1011
995
  }
1012
- function _define_property$j(obj, key, value) {
996
+ function _define_property$l(obj, key, value) {
1013
997
  if (key in obj) {
1014
998
  Object.defineProperty(obj, key, {
1015
999
  value: value,
@@ -1022,7 +1006,7 @@ function _define_property$j(obj, key, value) {
1022
1006
  }
1023
1007
  return obj;
1024
1008
  }
1025
- function _iterable_to_array_limit$h(arr, i) {
1009
+ function _iterable_to_array_limit$i(arr, i) {
1026
1010
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1027
1011
  if (_i == null) return;
1028
1012
  var _arr = [];
@@ -1046,10 +1030,10 @@ function _iterable_to_array_limit$h(arr, i) {
1046
1030
  }
1047
1031
  return _arr;
1048
1032
  }
1049
- function _non_iterable_rest$h() {
1033
+ function _non_iterable_rest$i() {
1050
1034
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1051
1035
  }
1052
- function _object_spread$j(target) {
1036
+ function _object_spread$k(target) {
1053
1037
  for(var i = 1; i < arguments.length; i++){
1054
1038
  var source = arguments[i] != null ? arguments[i] : {};
1055
1039
  var ownKeys = Object.keys(source);
@@ -1059,21 +1043,21 @@ function _object_spread$j(target) {
1059
1043
  }));
1060
1044
  }
1061
1045
  ownKeys.forEach(function(key) {
1062
- _define_property$j(target, key, source[key]);
1046
+ _define_property$l(target, key, source[key]);
1063
1047
  });
1064
1048
  }
1065
1049
  return target;
1066
1050
  }
1067
- function _sliced_to_array$h(arr, i) {
1068
- return _array_with_holes$h(arr) || _iterable_to_array_limit$h(arr, i) || _unsupported_iterable_to_array$h(arr, i) || _non_iterable_rest$h();
1051
+ function _sliced_to_array$i(arr, i) {
1052
+ return _array_with_holes$i(arr) || _iterable_to_array_limit$i(arr, i) || _unsupported_iterable_to_array$i(arr, i) || _non_iterable_rest$i();
1069
1053
  }
1070
- function _unsupported_iterable_to_array$h(o, minLen) {
1054
+ function _unsupported_iterable_to_array$i(o, minLen) {
1071
1055
  if (!o) return;
1072
- if (typeof o === "string") return _array_like_to_array$h(o, minLen);
1056
+ if (typeof o === "string") return _array_like_to_array$i(o, minLen);
1073
1057
  var n = Object.prototype.toString.call(o).slice(8, -1);
1074
1058
  if (n === "Object" && o.constructor) n = o.constructor.name;
1075
1059
  if (n === "Map" || n === "Set") return Array.from(n);
1076
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$h(o, minLen);
1060
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$i(o, minLen);
1077
1061
  }
1078
1062
  function Button(param) {
1079
1063
  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 ? [
@@ -1081,7 +1065,7 @@ function Button(param) {
1081
1065
  ] : _param_padding, _param_margin = param.margin, margin = _param_margin === void 0 ? [
1082
1066
  Spacing.none
1083
1067
  ] : _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;
1084
- var _React_useState = _sliced_to_array$h(React__default.useState(false), 2), isSelected = _React_useState[0], setIsSelected = _React_useState[1];
1068
+ var _React_useState = _sliced_to_array$i(React__default.useState(false), 2), isSelected = _React_useState[0], setIsSelected = _React_useState[1];
1085
1069
  var buttonState = Juce.getToggleState(id);
1086
1070
  var isLocalhost = window.location.hostname === 'localhost';
1087
1071
  var setModSlotRowTargetAsPreview = useGlobalContext().setModSlotRowTargetAsPreview;
@@ -1143,7 +1127,7 @@ function Button(param) {
1143
1127
  onMouseDown: handleMouseDown,
1144
1128
  disabled: disabled,
1145
1129
  onClick: onClick && onClick,
1146
- style: _object_spread$j({
1130
+ style: _object_spread$k({
1147
1131
  paddingTop: "var(--p-".concat(padding[0], ")"),
1148
1132
  paddingRight: "var(--p-".concat((_padding_ = padding[1]) !== null && _padding_ !== void 0 ? _padding_ : padding[0], ")"),
1149
1133
  paddingBottom: "var(--p-".concat((_padding_1 = padding[2]) !== null && _padding_1 !== void 0 ? _padding_1 : padding[0], ")"),
@@ -1161,138 +1145,8 @@ Button.margin = Spacing;
1161
1145
  Button.type = ButtonType;
1162
1146
  Button.size = ButtonSize;
1163
1147
 
1164
- var css_248z$9 = ".Dropdown-button {\n font-size: var(--text-sm);\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--spacing-lg);\n cursor: pointer;\n vertical-align: middle;\n white-space: nowrap;\n text-decoration: none;\n text-transform: uppercase;\n text-align: center;\n border-radius: var(--radius-sm);\n appearance: none;\n user-select: none;\n -webkit-user-select: none;\n height: var(--spacing-xl);\n background: var(--color-gray-800);\n color: var(--color-text);\n &:hover,\n &:focus,\n &:active {\n outline: none;\n background-color: var(--bg-highlighted);\n }\n &:disabled {\n cursor: not-allowed;\n }\n}\n\n.Dropdown-items {\n border: 2px solid;\n}\n\n.Dropdown-item {\n background-color: var(--bg-page);\n font-size: var(--text-sm);\n padding: var(--spacing-md) var(--spacing-xl);\n min-width: 100px;\n color: var(--color-text);\n cursor: pointer;\n text-align: center;\n text-transform: uppercase;\n font-weight: bold;\n}\n\n.Dropdown-item[data-selected] {\n background-color: var(--bg-popover);\n color: var(--color-text);\n}\n\n.Dropdown-item[data-active] {\n background-color: var(--bg-popover);\n color: var(--color-text);\n}\n";
1165
- styleInject(css_248z$9);
1166
-
1167
- function _array_like_to_array$g(arr, len) {
1168
- if (len == null || len > arr.length) len = arr.length;
1169
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1170
- return arr2;
1171
- }
1172
- function _array_with_holes$g(arr) {
1173
- if (Array.isArray(arr)) return arr;
1174
- }
1175
- function _iterable_to_array_limit$g(arr, i) {
1176
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1177
- if (_i == null) return;
1178
- var _arr = [];
1179
- var _n = true;
1180
- var _d = false;
1181
- var _s, _e;
1182
- try {
1183
- for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
1184
- _arr.push(_s.value);
1185
- if (i && _arr.length === i) break;
1186
- }
1187
- } catch (err) {
1188
- _d = true;
1189
- _e = err;
1190
- } finally{
1191
- try {
1192
- if (!_n && _i["return"] != null) _i["return"]();
1193
- } finally{
1194
- if (_d) throw _e;
1195
- }
1196
- }
1197
- return _arr;
1198
- }
1199
- function _non_iterable_rest$g() {
1200
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1201
- }
1202
- function _sliced_to_array$g(arr, i) {
1203
- return _array_with_holes$g(arr) || _iterable_to_array_limit$g(arr, i) || _unsupported_iterable_to_array$g(arr, i) || _non_iterable_rest$g();
1204
- }
1205
- function _unsupported_iterable_to_array$g(o, minLen) {
1206
- if (!o) return;
1207
- if (typeof o === "string") return _array_like_to_array$g(o, minLen);
1208
- var n = Object.prototype.toString.call(o).slice(8, -1);
1209
- if (n === "Object" && o.constructor) n = o.constructor.name;
1210
- if (n === "Map" || n === "Set") return Array.from(n);
1211
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$g(o, minLen);
1212
- }
1213
- var useDropdown = function(param) {
1214
- var id = param.id, // TODO: Is there a better way to handle mod matrix dropdowns?
1215
- rowId = param.rowId, label = param.label, _param_items = param.items, items = _param_items === void 0 ? [] : _param_items, _param_isDisabled = param.isDisabled, isDisabled = _param_isDisabled === void 0 ? false : _param_isDisabled, filter = param.filter, onChange = param.onChange, _param_displayValInHeader = param.displayValInHeader, displayValInHeader = _param_displayValInHeader === void 0 ? true : _param_displayValInHeader;
1216
- var _properties_choices;
1217
- var comboBoxState = Juce.getComboBoxState(id);
1218
- var _useState = _sliced_to_array$g(useState(comboBoxState.getChoiceIndex()), 2), index = _useState[0], setIndex = _useState[1];
1219
- var _useState1 = _sliced_to_array$g(useState(comboBoxState.properties), 2), properties = _useState1[0], setProperties = _useState1[1];
1220
- var _useGlobalContext = useGlobalContext(), highlightedItemChanged = _useGlobalContext.highlightedItemChanged, setModSlotRowTargetAsPreview = _useGlobalContext.setModSlotRowTargetAsPreview;
1221
- 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 : [];
1222
- var filteredChoices = filter ? choices === null || choices === void 0 ? void 0 : choices.filter(function(item) {
1223
- var _item_;
1224
- 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());
1225
- }) : choices;
1226
- var prevIndex = useRef(null);
1227
- var handleChange = function(value) {
1228
- if (!isDisabled) {
1229
- var choiceIndex = choices.indexOf(value);
1230
- if (choiceIndex !== prevIndex.current) {
1231
- comboBoxState.setChoiceIndex(choiceIndex);
1232
- setIndex(choiceIndex);
1233
- // TODO: Is there a better way to do this?
1234
- if (rowId) {
1235
- onChange && onChange(choiceIndex, rowId);
1236
- } else {
1237
- onChange && onChange(choiceIndex, id);
1238
- }
1239
- // //@ts-expect-error
1240
- // window.__JUCE__.backend.emitEvent('undoableActionOccurred', {});
1241
- if (displayValInHeader) {
1242
- highlightedItemChanged && highlightedItemChanged({
1243
- label: label,
1244
- value: value
1245
- });
1246
- }
1247
- prevIndex.current = choiceIndex;
1248
- }
1249
- return choices[choiceIndex];
1250
- }
1251
- };
1252
- useEffect(function() {
1253
- var comboBoxState = Juce.getComboBoxState(id);
1254
- setIndex(comboBoxState.getChoiceIndex());
1255
- }, [
1256
- id
1257
- ]);
1258
- useEffect(function() {
1259
- var valueListenerId = comboBoxState.valueChangedEvent.addListener(function() {
1260
- setIndex(comboBoxState.getChoiceIndex());
1261
- });
1262
- var propertiesListenerId = comboBoxState.propertiesChangedEvent.addListener(function() {
1263
- setProperties(comboBoxState.properties);
1264
- });
1265
- return function cleanup() {
1266
- comboBoxState.valueChangedEvent.removeListener(valueListenerId);
1267
- comboBoxState.propertiesChangedEvent.removeListener(propertiesListenerId);
1268
- };
1269
- }, [
1270
- window
1271
- ]);
1272
- var onMouseEnter = function() {
1273
- if (displayValInHeader && !isDisabled) {
1274
- highlightedItemChanged && (highlightedItemChanged === null || highlightedItemChanged === void 0 ? void 0 : highlightedItemChanged({
1275
- label: label,
1276
- value: choices === null || choices === void 0 ? void 0 : choices[index]
1277
- }));
1278
- }
1279
- };
1280
- var onClick = function() {
1281
- setModSlotRowTargetAsPreview({
1282
- paramId: id
1283
- });
1284
- };
1285
- return {
1286
- value: choices[index],
1287
- index: index,
1288
- setIndex: setIndex,
1289
- choices: choices,
1290
- filteredChoices: filteredChoices,
1291
- onMouseEnter: onMouseEnter,
1292
- onClick: onClick,
1293
- handleChange: handleChange
1294
- };
1295
- };
1148
+ var css_248z$c = ".IconButton {\n cursor: pointer;\n}\n.IconButton:hover:not(:disabled) {\n filter: brightness(80%);\n}\n";
1149
+ styleInject(css_248z$c);
1296
1150
 
1297
1151
  var JustifyContent = /*#__PURE__*/ function(JustifyContent) {
1298
1152
  JustifyContent["flexStart"] = "flex-start";
@@ -1322,7 +1176,7 @@ var LayoutTags = /*#__PURE__*/ function(LayoutTags) {
1322
1176
  return LayoutTags;
1323
1177
  }({});
1324
1178
 
1325
- function _define_property$i(obj, key, value) {
1179
+ function _define_property$k(obj, key, value) {
1326
1180
  if (key in obj) {
1327
1181
  Object.defineProperty(obj, key, {
1328
1182
  value: value,
@@ -1335,7 +1189,7 @@ function _define_property$i(obj, key, value) {
1335
1189
  }
1336
1190
  return obj;
1337
1191
  }
1338
- function _object_spread$i(target) {
1192
+ function _object_spread$j(target) {
1339
1193
  for(var i = 1; i < arguments.length; i++){
1340
1194
  var source = arguments[i] != null ? arguments[i] : {};
1341
1195
  var ownKeys = Object.keys(source);
@@ -1345,7 +1199,7 @@ function _object_spread$i(target) {
1345
1199
  }));
1346
1200
  }
1347
1201
  ownKeys.forEach(function(key) {
1348
- _define_property$i(target, key, source[key]);
1202
+ _define_property$k(target, key, source[key]);
1349
1203
  });
1350
1204
  }
1351
1205
  return target;
@@ -1402,7 +1256,7 @@ var BoxDisplay = /*#__PURE__*/ function(BoxDisplay) {
1402
1256
  return BoxDisplay;
1403
1257
  }(BoxDisplay || {});
1404
1258
  function Box(_param) {
1405
- 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.full : _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 ? [
1259
+ 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.full : _param_width, _param_flexWrap = _param.flexWrap, flexWrap = _param_flexWrap === void 0 ? FlexWrap.noWrap : _param_flexWrap, height = _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_fullHeight = _param.fullHeight, fullHeight = _param_fullHeight === void 0 ? false : _param_fullHeight, _param_padding = _param.padding, padding = _param_padding === void 0 ? [
1406
1260
  Spacing.none,
1407
1261
  Spacing.none,
1408
1262
  Spacing.none,
@@ -1422,19 +1276,20 @@ function Box(_param) {
1422
1276
  "height",
1423
1277
  "border",
1424
1278
  "flexDirection",
1279
+ "fullHeight",
1425
1280
  "padding",
1426
1281
  "gap",
1427
1282
  "tag"
1428
1283
  ]);
1429
1284
  var Tag = tag;
1430
1285
  var _padding_, _padding_1, _padding_2, _ref;
1431
- return /*#__PURE__*/ React__default.createElement(Tag, _object_spread_props$3(_object_spread$i({
1286
+ return /*#__PURE__*/ React__default.createElement(Tag, _object_spread_props$3(_object_spread$j({
1432
1287
  // id="globalValues"
1433
1288
  key: key,
1434
1289
  className: className,
1435
1290
  onClick: onClick
1436
1291
  }, rest), {
1437
- style: _object_spread$i({
1292
+ style: _object_spread$j({
1438
1293
  flexWrap: flexWrap,
1439
1294
  display: display,
1440
1295
  width: width,
@@ -1445,7 +1300,7 @@ function Box(_param) {
1445
1300
  paddingLeft: "var(--p-".concat((_ref = (_padding_2 = padding[3]) !== null && _padding_2 !== void 0 ? _padding_2 : padding[1]) !== null && _ref !== void 0 ? _ref : padding[0], ")"),
1446
1301
  border: border ? '2px solid #999' : '',
1447
1302
  maxWidth: width,
1448
- height: height,
1303
+ height: fullHeight ? '100%' : height,
1449
1304
  flexDirection: flexDirection === FlexDirection.row ? FlexDirection.row : FlexDirection.column,
1450
1305
  justifyContent: "".concat(justifyContent),
1451
1306
  alignItems: "".concat(alignItems),
@@ -1465,7 +1320,10 @@ Box.padding = Spacing;
1465
1320
  Box.flexWrap = FlexWrap;
1466
1321
  Box.tag = LayoutTags;
1467
1322
 
1468
- function _define_property$h(obj, key, value) {
1323
+ var css_248z$b = ".Icon svg {\n width: 100%;\n}\n";
1324
+ styleInject(css_248z$b);
1325
+
1326
+ function _define_property$j(obj, key, value) {
1469
1327
  if (key in obj) {
1470
1328
  Object.defineProperty(obj, key, {
1471
1329
  value: value,
@@ -1478,7 +1336,7 @@ function _define_property$h(obj, key, value) {
1478
1336
  }
1479
1337
  return obj;
1480
1338
  }
1481
- function _object_spread$h(target) {
1339
+ function _object_spread$i(target) {
1482
1340
  for(var i = 1; i < arguments.length; i++){
1483
1341
  var source = arguments[i] != null ? arguments[i] : {};
1484
1342
  var ownKeys = Object.keys(source);
@@ -1488,34 +1346,782 @@ function _object_spread$h(target) {
1488
1346
  }));
1489
1347
  }
1490
1348
  ownKeys.forEach(function(key) {
1491
- _define_property$h(target, key, source[key]);
1349
+ _define_property$j(target, key, source[key]);
1492
1350
  });
1493
1351
  }
1494
1352
  return target;
1495
1353
  }
1496
- function Label(param) {
1497
- var value = param.value, id = param.id, className = param.className, style = param.style, _param_color = param.color, color = _param_color === void 0 ? 'var(--color-text)' : _param_color, _param_padding = param.padding, padding = _param_padding === void 0 ? [
1498
- Spacing.none
1499
- ] : _param_padding, children = param.children, htmlFor = param.htmlFor, _param_fontSize = param.fontSize, fontSize = _param_fontSize === void 0 ? FontSizes.medium : _param_fontSize;
1500
- var _padding_, _padding_1, _padding_2, _ref;
1501
- return /*#__PURE__*/ React.createElement("label", {
1502
- id: id,
1503
- htmlFor: htmlFor,
1504
- style: _object_spread$h({
1505
- fontSize: "var(--text-".concat(fontSize),
1354
+ var Icons = /*#__PURE__*/ function(Icons) {
1355
+ Icons["undo"] = "Undo";
1356
+ Icons["redo"] = "Redo";
1357
+ Icons["random"] = "Random";
1358
+ Icons["favorite"] = "Favorite";
1359
+ Icons["up"] = "Up";
1360
+ Icons["down"] = "Down";
1361
+ Icons["save"] = "Save";
1362
+ Icons["add"] = "Add";
1363
+ Icons["delete"] = "Delete";
1364
+ Icons["negativeSaw"] = "NegativeSaw";
1365
+ Icons["positiveSaw"] = "PositiveSaw";
1366
+ Icons["sine"] = "Sine";
1367
+ Icons["square"] = "Square";
1368
+ Icons["triangle"] = "Triangle";
1369
+ return Icons;
1370
+ }({});
1371
+ var Undo = function(param) {
1372
+ var color = param.color, width = param.width;
1373
+ return /*#__PURE__*/ React__default.createElement("svg", {
1374
+ viewBox: "0 0 25 25",
1375
+ "stroke-width": "1.5",
1376
+ fill: "none",
1377
+ xmlns: "http://www.w3.org/2000/svg",
1378
+ color: color,
1379
+ height: width,
1380
+ width: width
1381
+ }, /*#__PURE__*/ React__default.createElement("path", {
1382
+ d: "M4.5 8C8.5 8 11 8 15 8C15 8 15 8 15 8C15 8 20 8 20 12.7059C20 18 15 18 15 18C11.5714 18 9.71429 18 6.28571 18",
1383
+ stroke: color,
1384
+ "stroke-width": "1.5",
1385
+ "stroke-linecap": "round",
1386
+ "stroke-linejoin": "round"
1387
+ }), /*#__PURE__*/ React__default.createElement("path", {
1388
+ d: "M7.5 11.5C6.13317 10.1332 5.36683 9.36683 4 8C5.36683 6.63317 6.13317 5.86683 7.5 4.5",
1389
+ stroke: color,
1390
+ "stroke-width": "1.5",
1391
+ "stroke-linecap": "round",
1392
+ "stroke-linejoin": "round"
1393
+ }));
1394
+ };
1395
+ var Redo = function(param) {
1396
+ var color = param.color, width = param.width;
1397
+ return /*#__PURE__*/ React__default.createElement("svg", {
1398
+ viewBox: "0 0 25 25",
1399
+ "stroke-width": "1.5",
1400
+ fill: "none",
1401
+ xmlns: "http://www.w3.org/2000/svg",
1402
+ color: color,
1403
+ height: width,
1404
+ width: width
1405
+ }, /*#__PURE__*/ React__default.createElement("path", {
1406
+ d: "M19.5 8C15.5 8 13 8 9 8C9 8 9 8 9 8C9 8 4 8 4 12.7059C4 18 9 18 9 18C12.4286 18 14.2857 18 17.7143 18",
1407
+ stroke: color,
1408
+ "stroke-width": "1.5",
1409
+ "stroke-linecap": "round",
1410
+ "stroke-linejoin": "round"
1411
+ }), /*#__PURE__*/ React__default.createElement("path", {
1412
+ d: "M16.5 11.5C17.8668 10.1332 18.6332 9.36683 20 8C18.6332 6.63317 17.8668 5.86683 16.5 4.5",
1413
+ stroke: color,
1414
+ "stroke-width": "1.5",
1415
+ "stroke-linecap": "round",
1416
+ "stroke-linejoin": "round"
1417
+ }));
1418
+ };
1419
+ var Favorite = function(param) {
1420
+ var color = param.color, width = param.width;
1421
+ return /*#__PURE__*/ React__default.createElement("svg", {
1422
+ "stroke-width": "1.5",
1423
+ viewBox: "-7 -7 40 40",
1424
+ fill: "none",
1425
+ xmlns: "http://www.w3.org/2000/svg",
1426
+ color: color,
1427
+ height: width,
1428
+ width: width
1429
+ }, /*#__PURE__*/ React__default.createElement("path", {
1430
+ d: "M22 8.86222C22 10.4087 21.4062 11.8941 20.3458 12.9929C17.9049 15.523 15.5374 18.1613 13.0053 20.5997C12.4249 21.1505 11.5042 21.1304 10.9488 20.5547L3.65376 12.9929C1.44875 10.7072 1.44875 7.01723 3.65376 4.73157C5.88044 2.42345 9.50794 2.42345 11.7346 4.73157L11.9998 5.00642L12.2648 4.73173C13.3324 3.6245 14.7864 3 16.3053 3C17.8242 3 19.2781 3.62444 20.3458 4.73157C21.4063 5.83045 22 7.31577 22 8.86222Z",
1431
+ stroke: color,
1432
+ "stroke-width": "1.5",
1433
+ "stroke-linejoin": "round"
1434
+ }));
1435
+ };
1436
+ var Up = function(param) {
1437
+ var color = param.color; param.width;
1438
+ return /*#__PURE__*/ React__default.createElement("svg", {
1439
+ // width={width}
1440
+ // height={width}
1441
+ "stroke-width": "1.5",
1442
+ viewBox: "5 8 14 9",
1443
+ fill: "none",
1444
+ xmlns: "http://www.w3.org/2000/svg",
1445
+ color: color,
1446
+ preserveAspectRatio: "xMidYMid meet"
1447
+ }, /*#__PURE__*/ React__default.createElement("path", {
1448
+ d: "M6 15L12 9L18 15",
1449
+ stroke: color,
1450
+ "stroke-width": "1.5",
1451
+ "stroke-linecap": "round",
1452
+ "stroke-linejoin": "round"
1453
+ }));
1454
+ };
1455
+ var Down = function(param) {
1456
+ var color = param.color; param.width;
1457
+ return /*#__PURE__*/ React__default.createElement("svg", {
1458
+ // width={width}
1459
+ // height={width}
1460
+ "stroke-width": "1.5",
1461
+ viewBox: "5 8 14 9",
1462
+ fill: "none",
1463
+ xmlns: "http://www.w3.org/2000/svg",
1464
+ color: color,
1465
+ preserveAspectRatio: "xMidYMid meet"
1466
+ }, /*#__PURE__*/ React__default.createElement("path", {
1467
+ d: "M6 9L12 15L18 9",
1468
+ stroke: color,
1469
+ "stroke-width": "1.5",
1470
+ "stroke-linecap": "round",
1471
+ "stroke-linejoin": "round"
1472
+ }));
1473
+ };
1474
+ var Save = function(param) {
1475
+ var color = param.color, width = param.width;
1476
+ return /*#__PURE__*/ React__default.createElement("svg", {
1477
+ "stroke-width": "1.5",
1478
+ viewBox: "-7 -7 40 40",
1479
+ fill: "none",
1480
+ xmlns: "http://www.w3.org/2000/svg",
1481
+ color: color,
1482
+ height: width,
1483
+ width: width
1484
+ }, /*#__PURE__*/ React__default.createElement("path", {
1485
+ d: "M3 19V5C3 3.89543 3.89543 3 5 3H16.1716C16.702 3 17.2107 3.21071 17.5858 3.58579L20.4142 6.41421C20.7893 6.78929 21 7.29799 21 7.82843V19C21 20.1046 20.1046 21 19 21H5C3.89543 21 3 20.1046 3 19Z",
1486
+ stroke: color,
1487
+ "stroke-width": "1.5"
1488
+ }), /*#__PURE__*/ React__default.createElement("path", {
1489
+ d: "M8.6 9H15.4C15.7314 9 16 8.73137 16 8.4V3.6C16 3.26863 15.7314 3 15.4 3H8.6C8.26863 3 8 3.26863 8 3.6V8.4C8 8.73137 8.26863 9 8.6 9Z",
1490
+ stroke: color,
1491
+ "stroke-width": "1.5"
1492
+ }), /*#__PURE__*/ React__default.createElement("path", {
1493
+ d: "M6 13.6V21H18V13.6C18 13.2686 17.7314 13 17.4 13H6.6C6.26863 13 6 13.2686 6 13.6Z",
1494
+ stroke: color,
1495
+ "stroke-width": "1.5"
1496
+ }));
1497
+ };
1498
+ var Random = function(param) {
1499
+ var color = param.color, width = param.width;
1500
+ return /*#__PURE__*/ React__default.createElement("svg", {
1501
+ viewBox: "0 0 25 25",
1502
+ "stroke-width": "1.5",
1503
+ fill: "none",
1504
+ xmlns: "http://www.w3.org/2000/svg",
1505
+ color: color,
1506
+ height: width,
1507
+ width: width
1508
+ }, /*#__PURE__*/ React__default.createElement("path", {
1509
+ d: "M11.7 1.1732C11.8856 1.06603 12.1144 1.06603 12.3 1.17321L21.2263 6.3268C21.4119 6.43397 21.5263 6.63205 21.5263 6.84641V17.1536C21.5263 17.3679 21.4119 17.566 21.2263 17.6732L12.3 22.8268C12.1144 22.934 11.8856 22.934 11.7 22.8268L2.77372 17.6732C2.58808 17.566 2.47372 17.3679 2.47372 17.1536V6.84641C2.47372 6.63205 2.58808 6.43397 2.77372 6.32679L11.7 1.1732Z",
1510
+ stroke: color,
1511
+ "stroke-width": "1.5",
1512
+ "stroke-linecap": "round",
1513
+ "stroke-linejoin": "round"
1514
+ }), /*#__PURE__*/ React__default.createElement("path", {
1515
+ d: "M17 15L7 15L12 7L17 15Z",
1516
+ stroke: color,
1517
+ "stroke-width": "1.5",
1518
+ "stroke-linecap": "round",
1519
+ "stroke-linejoin": "round"
1520
+ }), /*#__PURE__*/ React__default.createElement("path", {
1521
+ d: "M2.5 6.5L12 7",
1522
+ stroke: color,
1523
+ "stroke-width": "1.5",
1524
+ "stroke-linejoin": "round"
1525
+ }), /*#__PURE__*/ React__default.createElement("path", {
1526
+ d: "M2.5 6.5L7 15",
1527
+ stroke: color,
1528
+ "stroke-width": "1.5",
1529
+ "stroke-linejoin": "round"
1530
+ }), /*#__PURE__*/ React__default.createElement("path", {
1531
+ d: "M21.5 6.5L17 15",
1532
+ stroke: color,
1533
+ "stroke-width": "1.5",
1534
+ "stroke-linejoin": "round"
1535
+ }), /*#__PURE__*/ React__default.createElement("path", {
1536
+ d: "M21.5 6.5L12 6.99995L12 1",
1537
+ stroke: color,
1538
+ "stroke-width": "1.5",
1539
+ "stroke-linejoin": "round"
1540
+ }), /*#__PURE__*/ React__default.createElement("path", {
1541
+ d: "M21.5 17.5L17 15",
1542
+ stroke: color,
1543
+ "stroke-width": "1.5",
1544
+ "stroke-linejoin": "round"
1545
+ }), /*#__PURE__*/ React__default.createElement("path", {
1546
+ d: "M2.5 17.5L7 15",
1547
+ stroke: color,
1548
+ "stroke-width": "1.5",
1549
+ "stroke-linejoin": "round"
1550
+ }), /*#__PURE__*/ React__default.createElement("path", {
1551
+ d: "M7 15L12 23L17 15",
1552
+ stroke: color,
1553
+ "stroke-width": "1.5",
1554
+ "stroke-linejoin": "round"
1555
+ }));
1556
+ };
1557
+ var Add = function(param) {
1558
+ var color = param.color, width = param.width;
1559
+ return /*#__PURE__*/ React__default.createElement("svg", {
1560
+ "stroke-width": "1.5",
1561
+ viewBox: "0 0 24 24",
1562
+ fill: "none",
1563
+ xmlns: "http://www.w3.org/2000/svg",
1564
+ color: color,
1565
+ height: width,
1566
+ width: width
1567
+ }, /*#__PURE__*/ React__default.createElement("path", {
1568
+ d: "M6 12H12M18 12H12M12 12V6M12 12V18",
1569
+ stroke: color,
1570
+ "stroke-width": "1.5",
1571
+ "stroke-linecap": "round",
1572
+ "stroke-linejoin": "round"
1573
+ }));
1574
+ };
1575
+ var Delete = function(param) {
1576
+ var color = param.color, width = param.width;
1577
+ return /*#__PURE__*/ React__default.createElement("svg", {
1578
+ viewBox: "0 0 24 24",
1579
+ fill: "none",
1580
+ xmlns: "http://www.w3.org/2000/svg",
1581
+ color: color,
1582
+ "stroke-width": "1.5",
1583
+ height: width,
1584
+ width: width
1585
+ }, /*#__PURE__*/ React__default.createElement("path", {
1586
+ "fill-rule": "evenodd",
1587
+ "clip-rule": "evenodd",
1588
+ 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",
1589
+ fill: color
1590
+ }));
1591
+ };
1592
+ var NegativeSaw = function(param) {
1593
+ var color = param.color, width = param.width;
1594
+ return /*#__PURE__*/ React__default.createElement("svg", {
1595
+ xmlns: "http://www.w3.org/2000/svg",
1596
+ viewBox: "0 0 67.27 33.41",
1597
+ width: width
1598
+ }, /*#__PURE__*/ React__default.createElement("polyline", {
1599
+ points: "2.5 2.5 2.5 30.91 64.77 2.5 64.77 30.91",
1600
+ fill: "none",
1601
+ stroke: color,
1602
+ "stroke-linecap": "round",
1603
+ "stroke-linejoin": "round",
1604
+ "stroke-width": "4"
1605
+ }));
1606
+ };
1607
+ var PositiveSaw = function(param) {
1608
+ var color = param.color, width = param.width;
1609
+ return /*#__PURE__*/ React__default.createElement("svg", {
1610
+ xmlns: "http://www.w3.org/2000/svg",
1611
+ viewBox: "0 0 67.27 33.41",
1612
+ width: width
1613
+ }, /*#__PURE__*/ React__default.createElement("polyline", {
1614
+ points: "64.77 2.5 64.77 30.91 2.5 2.5 2.5 30.91",
1615
+ fill: "none",
1616
+ stroke: color,
1617
+ "stroke-linecap": "round",
1618
+ "stroke-linejoin": "round",
1619
+ "stroke-width": "4"
1620
+ }));
1621
+ };
1622
+ var Sine = function(param) {
1623
+ var color = param.color, width = param.width;
1624
+ return /*#__PURE__*/ React__default.createElement("svg", {
1625
+ width: width,
1626
+ xmlns: "http://www.w3.org/2000/svg",
1627
+ viewBox: "0 0 65.2 33.19"
1628
+ }, /*#__PURE__*/ React__default.createElement("path", {
1629
+ d: "M4,17.08c3.67-6.45,7.25-13.08,14.58-13.08,14.31,0,14.31,25.19,28.62,25.19,6.94,0,10.52-5.93,13.99-12.03",
1630
+ fill: "none",
1631
+ stroke: color,
1632
+ "stroke-linecap": "round",
1633
+ "stroke-miterlimit": "10",
1634
+ "stroke-width": "4"
1635
+ }));
1636
+ };
1637
+ var Square = function(param) {
1638
+ var color = param.color, width = param.width;
1639
+ return /*#__PURE__*/ React__default.createElement("svg", {
1640
+ width: width,
1641
+ xmlns: "http://www.w3.org/2000/svg",
1642
+ viewBox: "0 0 68.77 33.8"
1643
+ }, /*#__PURE__*/ React__default.createElement("polyline", {
1644
+ points: "2.5 31.3 2.5 2.5 34.38 2.5 34.38 31.3 66.27 31.3 66.27 2.5",
1645
+ fill: "none",
1646
+ stroke: color,
1647
+ "stroke-linecap": "round",
1648
+ "stroke-linejoin": "round",
1649
+ "stroke-width": "4"
1650
+ }));
1651
+ };
1652
+ var Triangle = function(param) {
1653
+ var color = param.color, width = param.width;
1654
+ return /*#__PURE__*/ React__default.createElement("svg", {
1655
+ xmlns: "http://www.w3.org/2000/svg",
1656
+ width: width,
1657
+ viewBox: "0 0 72.68 35.16"
1658
+ }, /*#__PURE__*/ React__default.createElement("polyline", {
1659
+ points: "3 32.16 25.59 3 47.69 31.54 69.68 3.15",
1660
+ fill: "none",
1661
+ stroke: color,
1662
+ "stroke-linecap": "round",
1663
+ "stroke-linejoin": "round",
1664
+ "stroke-width": "4"
1665
+ }));
1666
+ };
1667
+ var iconList = {
1668
+ Undo: Undo,
1669
+ Redo: Redo,
1670
+ Random: Random,
1671
+ Favorite: Favorite,
1672
+ Up: Up,
1673
+ Down: Down,
1674
+ Save: Save,
1675
+ Add: Add,
1676
+ Delete: Delete,
1677
+ NegativeSaw: NegativeSaw,
1678
+ PositiveSaw: PositiveSaw,
1679
+ Sine: Sine,
1680
+ Square: Square,
1681
+ Triangle: Triangle
1682
+ };
1683
+ // const getViewBoxWidth = (width: string) => {
1684
+ // const numericWidth = width.match(/\d+/)?.[0];
1685
+ // return numericWidth !== undefined ? parseInt(numericWidth) : 24;
1686
+ // };
1687
+ function Icon(param) {
1688
+ 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 ? [
1689
+ Spacing.none
1690
+ ] : _param_padding, _param_width = param.width, width = _param_width === void 0 ? '24px' : _param_width, height = param.height, className = param.className, style = param.style;
1691
+ var _$Icon = iconList[icon];
1692
+ var _width_match;
1693
+ var numberWidth = parseInt(((_width_match = width.match(/\d/g)) !== null && _width_match !== void 0 ? _width_match : []).join(''), 10);
1694
+ return /*#__PURE__*/ React__default.createElement(Box, {
1695
+ className: "Icon ".concat(className ? className : ''),
1696
+ onClick: onClick,
1697
+ padding: padding,
1698
+ style: _object_spread$i({
1699
+ width: width,
1700
+ height: height !== null && height !== void 0 ? height : width
1701
+ }, style)
1702
+ }, /*#__PURE__*/ React__default.createElement(_$Icon, {
1703
+ width: numberWidth,
1704
+ color: disabled ? 'var(--color-gray-400)' : color
1705
+ }));
1706
+ }
1707
+ Icon.icon = Icons;
1708
+ Icon.padding = Spacing;
1709
+ Icon.margin = Spacing;
1710
+
1711
+ function _define_property$i(obj, key, value) {
1712
+ if (key in obj) {
1713
+ Object.defineProperty(obj, key, {
1714
+ value: value,
1715
+ enumerable: true,
1716
+ configurable: true,
1717
+ writable: true
1718
+ });
1719
+ } else {
1720
+ obj[key] = value;
1721
+ }
1722
+ return obj;
1723
+ }
1724
+ function _object_spread$h(target) {
1725
+ for(var i = 1; i < arguments.length; i++){
1726
+ var source = arguments[i] != null ? arguments[i] : {};
1727
+ var ownKeys = Object.keys(source);
1728
+ if (typeof Object.getOwnPropertySymbols === "function") {
1729
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
1730
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1731
+ }));
1732
+ }
1733
+ ownKeys.forEach(function(key) {
1734
+ _define_property$i(target, key, source[key]);
1735
+ });
1736
+ }
1737
+ return target;
1738
+ }
1739
+ function Label(param) {
1740
+ var value = param.value, id = param.id, className = param.className, style = param.style, _param_color = param.color, color = _param_color === void 0 ? 'var(--color-text)' : _param_color, _param_padding = param.padding, padding = _param_padding === void 0 ? [
1741
+ Spacing.none
1742
+ ] : _param_padding, uppercase = param.uppercase, children = param.children, htmlFor = param.htmlFor, _param_fontSize = param.fontSize, fontSize = _param_fontSize === void 0 ? FontSizes.medium : _param_fontSize;
1743
+ var _padding_, _padding_1, _padding_2, _ref;
1744
+ return /*#__PURE__*/ React.createElement("label", {
1745
+ id: id,
1746
+ htmlFor: htmlFor,
1747
+ style: _object_spread$h({
1748
+ fontSize: "var(--text-".concat(fontSize, ")"),
1749
+ lineHeight: "var(--text-".concat(fontSize, ")"),
1506
1750
  paddingTop: "var(--p-".concat(padding[0], ")"),
1507
1751
  paddingRight: "var(--p-".concat((_padding_ = padding[1]) !== null && _padding_ !== void 0 ? _padding_ : padding[0], ")"),
1508
1752
  paddingBottom: "var(--p-".concat((_padding_1 = padding[2]) !== null && _padding_1 !== void 0 ? _padding_1 : padding[0], ")"),
1509
1753
  paddingLeft: "var(--p-".concat((_ref = (_padding_2 = padding[3]) !== null && _padding_2 !== void 0 ? _padding_2 : padding[1]) !== null && _ref !== void 0 ? _ref : padding[0], ")"),
1510
1754
  WebkitUserSelect: 'none',
1511
1755
  userSelect: 'none',
1756
+ letterSpacing: '1px',
1757
+ textTransform: uppercase ? 'uppercase' : 'none',
1758
+ cursor: 'inherit',
1759
+ color: color
1760
+ }, style),
1761
+ className: classnames('Label', 'select-none', className)
1762
+ }, value ? value : children);
1763
+ }
1764
+ Label.padding = Spacing;
1765
+ Label.fontSize = FontSizes;
1766
+
1767
+ function _define_property$h(obj, key, value) {
1768
+ if (key in obj) {
1769
+ Object.defineProperty(obj, key, {
1770
+ value: value,
1771
+ enumerable: true,
1772
+ configurable: true,
1773
+ writable: true
1774
+ });
1775
+ } else {
1776
+ obj[key] = value;
1777
+ }
1778
+ return obj;
1779
+ }
1780
+ function _object_spread$g(target) {
1781
+ for(var i = 1; i < arguments.length; i++){
1782
+ var source = arguments[i] != null ? arguments[i] : {};
1783
+ var ownKeys = Object.keys(source);
1784
+ if (typeof Object.getOwnPropertySymbols === "function") {
1785
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
1786
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1787
+ }));
1788
+ }
1789
+ ownKeys.forEach(function(key) {
1790
+ _define_property$h(target, key, source[key]);
1791
+ });
1792
+ }
1793
+ return target;
1794
+ }
1795
+ function IconButton(param) {
1796
+ 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, // backgroundColor = 'var(--bg-lv1)',
1797
+ backgroundColor = param.backgroundColor, _param_padding = param.padding, padding = _param_padding === void 0 ? [
1798
+ Button.padding.none
1799
+ ] : _param_padding, _param_margin = param.margin, margin = _param_margin === void 0 ? [
1800
+ Button.margin.none
1801
+ ] : _param_margin, _param_width = param.width, width = _param_width === void 0 ? '24px' : _param_width, iconWidth = param.iconWidth, label = param.label, height = param.height, className = param.className, style = param.style;
1802
+ var Icon = iconList[icon];
1803
+ var _width_match;
1804
+ var numberWidth = parseInt(((_width_match = width.match(/\d/g)) !== null && _width_match !== void 0 ? _width_match : []).join(''), 10);
1805
+ var _iconWidth_match;
1806
+ var iconNumberWidth = typeof iconWidth === 'string' && parseInt(((_iconWidth_match = iconWidth === null || iconWidth === void 0 ? void 0 : iconWidth.match(/\d/g)) !== null && _iconWidth_match !== void 0 ? _iconWidth_match : []).join(''), 10);
1807
+ return /*#__PURE__*/ React__default.createElement(Button, {
1808
+ id: id,
1809
+ className: "IconButton ".concat(className ? className : ''),
1810
+ onClick: onClick,
1811
+ padding: padding,
1812
+ margin: margin,
1813
+ disabled: disabled,
1814
+ style: _object_spread$g({
1815
+ backgroundColor: backgroundColor,
1816
+ width: width,
1817
+ height: height !== null && height !== void 0 ? height : 'auto'
1818
+ }, style)
1819
+ }, /*#__PURE__*/ React__default.createElement(Box, {
1820
+ flexDirection: Box.flexDirection.column,
1821
+ gap: Box.gap.mediumSmall
1822
+ }, /*#__PURE__*/ React__default.createElement(Icon, {
1823
+ width: iconNumberWidth || numberWidth,
1824
+ color: disabled ? 'var(--color-gray-400)' : color
1825
+ }), label ? /*#__PURE__*/ React__default.createElement(Label, {
1826
+ color: color,
1827
+ fontSize: Label.fontSize.xSmall,
1828
+ value: label
1829
+ }) : null));
1830
+ }
1831
+ IconButton.icon = Icons;
1832
+ IconButton.padding = Spacing;
1833
+ IconButton.margin = Spacing;
1834
+
1835
+ function _array_like_to_array$h(arr, len) {
1836
+ if (len == null || len > arr.length) len = arr.length;
1837
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1838
+ return arr2;
1839
+ }
1840
+ function _array_with_holes$h(arr) {
1841
+ if (Array.isArray(arr)) return arr;
1842
+ }
1843
+ function _iterable_to_array_limit$h(arr, i) {
1844
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1845
+ if (_i == null) return;
1846
+ var _arr = [];
1847
+ var _n = true;
1848
+ var _d = false;
1849
+ var _s, _e;
1850
+ try {
1851
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
1852
+ _arr.push(_s.value);
1853
+ if (i && _arr.length === i) break;
1854
+ }
1855
+ } catch (err) {
1856
+ _d = true;
1857
+ _e = err;
1858
+ } finally{
1859
+ try {
1860
+ if (!_n && _i["return"] != null) _i["return"]();
1861
+ } finally{
1862
+ if (_d) throw _e;
1863
+ }
1864
+ }
1865
+ return _arr;
1866
+ }
1867
+ function _non_iterable_rest$h() {
1868
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1869
+ }
1870
+ function _sliced_to_array$h(arr, i) {
1871
+ return _array_with_holes$h(arr) || _iterable_to_array_limit$h(arr, i) || _unsupported_iterable_to_array$h(arr, i) || _non_iterable_rest$h();
1872
+ }
1873
+ function _unsupported_iterable_to_array$h(o, minLen) {
1874
+ if (!o) return;
1875
+ if (typeof o === "string") return _array_like_to_array$h(o, minLen);
1876
+ var n = Object.prototype.toString.call(o).slice(8, -1);
1877
+ if (n === "Object" && o.constructor) n = o.constructor.name;
1878
+ if (n === "Map" || n === "Set") return Array.from(n);
1879
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$h(o, minLen);
1880
+ }
1881
+ var useDropdown = function(param) {
1882
+ var id = param.id, // TODO: Is there a better way to handle mod matrix dropdowns?
1883
+ rowId = param.rowId, label = param.label, _param_items = param.items, items = _param_items === void 0 ? [] : _param_items, _param_isDisabled = param.isDisabled, isDisabled = _param_isDisabled === void 0 ? false : _param_isDisabled, filter = param.filter, onChange = param.onChange, _param_displayValInHeader = param.displayValInHeader, displayValInHeader = _param_displayValInHeader === void 0 ? true : _param_displayValInHeader;
1884
+ var _properties_choices;
1885
+ var comboBoxState = Juce.getComboBoxState(id);
1886
+ var _useState = _sliced_to_array$h(useState(comboBoxState.getChoiceIndex()), 2), index = _useState[0], setIndex = _useState[1];
1887
+ var _useState1 = _sliced_to_array$h(useState(comboBoxState.properties), 2), properties = _useState1[0], setProperties = _useState1[1];
1888
+ var _useGlobalContext = useGlobalContext(), highlightedItemChanged = _useGlobalContext.highlightedItemChanged, setModSlotRowTargetAsPreview = _useGlobalContext.setModSlotRowTargetAsPreview;
1889
+ 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 : [];
1890
+ var filteredChoices = filter ? choices === null || choices === void 0 ? void 0 : choices.filter(function(item) {
1891
+ var _item_;
1892
+ 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());
1893
+ }) : choices;
1894
+ var prevIndex = useRef(null);
1895
+ var handleChange = function(value) {
1896
+ if (id && !isDisabled) {
1897
+ var choiceIndex = typeof value === 'string' ? choices.indexOf(value) : value;
1898
+ if (choiceIndex !== prevIndex.current) {
1899
+ comboBoxState.setChoiceIndex(choiceIndex);
1900
+ setIndex(choiceIndex);
1901
+ // TODO: Is there a better way to do this?
1902
+ if (rowId) {
1903
+ onChange && onChange(choiceIndex, rowId);
1904
+ } else {
1905
+ onChange && onChange(choiceIndex, id);
1906
+ }
1907
+ // //@ts-expect-error
1908
+ // window.__JUCE__.backend.emitEvent('undoableActionOccurred', {});
1909
+ if (displayValInHeader) {
1910
+ highlightedItemChanged && highlightedItemChanged({
1911
+ label: label,
1912
+ value: value
1913
+ });
1914
+ }
1915
+ prevIndex.current = choiceIndex;
1916
+ }
1917
+ return choices[choiceIndex];
1918
+ }
1919
+ };
1920
+ var incrementValue = function() {
1921
+ if (index < properties.choices.length - 1) {
1922
+ handleChange(index + 1);
1923
+ }
1924
+ };
1925
+ var decrementValue = function() {
1926
+ if (index > 0) {
1927
+ handleChange(index - 1);
1928
+ }
1929
+ };
1930
+ useEffect(function() {
1931
+ if (id) {
1932
+ var comboBoxState = Juce.getComboBoxState(id);
1933
+ setIndex(comboBoxState.getChoiceIndex());
1934
+ }
1935
+ }, [
1936
+ id
1937
+ ]);
1938
+ useEffect(function() {
1939
+ if (id) {
1940
+ var valueListenerId = comboBoxState.valueChangedEvent.addListener(function() {
1941
+ setIndex(comboBoxState.getChoiceIndex());
1942
+ });
1943
+ var propertiesListenerId = comboBoxState.propertiesChangedEvent.addListener(function() {
1944
+ setProperties(comboBoxState.properties);
1945
+ });
1946
+ return function cleanup() {
1947
+ comboBoxState.valueChangedEvent.removeListener(valueListenerId);
1948
+ comboBoxState.propertiesChangedEvent.removeListener(propertiesListenerId);
1949
+ };
1950
+ } else {
1951
+ return;
1952
+ }
1953
+ }, [
1954
+ window
1955
+ ]);
1956
+ var onMouseEnter = function() {
1957
+ if (id && displayValInHeader && !isDisabled) {
1958
+ highlightedItemChanged && (highlightedItemChanged === null || highlightedItemChanged === void 0 ? void 0 : highlightedItemChanged({
1959
+ label: label,
1960
+ value: choices === null || choices === void 0 ? void 0 : choices[index]
1961
+ }));
1962
+ }
1963
+ };
1964
+ var onClick = function() {
1965
+ setModSlotRowTargetAsPreview({
1966
+ paramId: id
1967
+ });
1968
+ };
1969
+ return {
1970
+ value: choices[index],
1971
+ index: index,
1972
+ setIndex: setIndex,
1973
+ choices: choices,
1974
+ filteredChoices: filteredChoices,
1975
+ onMouseEnter: onMouseEnter,
1976
+ onClick: onClick,
1977
+ handleChange: handleChange,
1978
+ incrementValue: incrementValue,
1979
+ decrementValue: decrementValue
1980
+ };
1981
+ };
1982
+
1983
+ function _array_like_to_array$g(arr, len) {
1984
+ if (len == null || len > arr.length) len = arr.length;
1985
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1986
+ return arr2;
1987
+ }
1988
+ function _array_with_holes$g(arr) {
1989
+ if (Array.isArray(arr)) return arr;
1990
+ }
1991
+ function _iterable_to_array_limit$g(arr, i) {
1992
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1993
+ if (_i == null) return;
1994
+ var _arr = [];
1995
+ var _n = true;
1996
+ var _d = false;
1997
+ var _s, _e;
1998
+ try {
1999
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
2000
+ _arr.push(_s.value);
2001
+ if (i && _arr.length === i) break;
2002
+ }
2003
+ } catch (err) {
2004
+ _d = true;
2005
+ _e = err;
2006
+ } finally{
2007
+ try {
2008
+ if (!_n && _i["return"] != null) _i["return"]();
2009
+ } finally{
2010
+ if (_d) throw _e;
2011
+ }
2012
+ }
2013
+ return _arr;
2014
+ }
2015
+ function _non_iterable_rest$g() {
2016
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2017
+ }
2018
+ function _sliced_to_array$g(arr, i) {
2019
+ return _array_with_holes$g(arr) || _iterable_to_array_limit$g(arr, i) || _unsupported_iterable_to_array$g(arr, i) || _non_iterable_rest$g();
2020
+ }
2021
+ function _unsupported_iterable_to_array$g(o, minLen) {
2022
+ if (!o) return;
2023
+ if (typeof o === "string") return _array_like_to_array$g(o, minLen);
2024
+ var n = Object.prototype.toString.call(o).slice(8, -1);
2025
+ if (n === "Object" && o.constructor) n = o.constructor.name;
2026
+ if (n === "Map" || n === "Set") return Array.from(n);
2027
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$g(o, minLen);
2028
+ }
2029
+ function Tabs(param) {
2030
+ var items = param.items, _param_id = param.id, id = _param_id === void 0 ? '' : _param_id, className = param.className, _param_padding = param.padding, padding = _param_padding === void 0 ? [
2031
+ Spacing.none
2032
+ ] : _param_padding, _param_margin = param.margin, margin = _param_margin === void 0 ? [
2033
+ Spacing.none
2034
+ ] : _param_margin, _param_gap = param.gap, gap = _param_gap === void 0 ? Spacing.small : _param_gap, width = param.width, height = param.height, tabWidth = param.tabWidth, tabHeight = param.tabHeight, _param_orientation = param.orientation, orientation = _param_orientation === void 0 ? Orientation.horizontal : _param_orientation, _param_justifyContent = param.justifyContent, justifyContent = _param_justifyContent === void 0 ? JustifyContent$1.stretch : _param_justifyContent, _param_alignItems = param.alignItems, alignItems = _param_alignItems === void 0 ? AlignItems$1.stretch : _param_alignItems, _param_color = param.color, color = _param_color === void 0 ? 'var(--bg-lv11)' : _param_color, _param_selectedColor = param.selectedColor, selectedColor = _param_selectedColor === void 0 ? 'var(--color-brand)' : _param_selectedColor, _param_backgroundColor = param.backgroundColor, backgroundColor = _param_backgroundColor === void 0 ? 'transparent' : _param_backgroundColor, _param_fontSize = param.fontSize, fontSize = _param_fontSize === void 0 ? FontSizes.small : _param_fontSize, selectedBackgroundColor = param.selectedBackgroundColor, icons = param.icons, onChange = param.onChange;
2035
+ var _useState = _sliced_to_array$g(useState(0), 2), selectedIndex = _useState[0], setSelectedIndex = _useState[1];
2036
+ var _useDropdown = useDropdown({
2037
+ id: id,
2038
+ onChange: onChange
2039
+ }), index = _useDropdown.index, choices = _useDropdown.choices, handleChange = _useDropdown.handleChange;
2040
+ var changeHandler = function(index) {
2041
+ if (id) {
2042
+ handleChange(index);
2043
+ } else {
2044
+ setSelectedIndex(index);
2045
+ onChange && onChange(index);
2046
+ }
2047
+ };
2048
+ var currentIndex = id ? index : selectedIndex;
2049
+ // console.log(choices, 'CHOICES');
2050
+ var displayedItems = items !== null && items !== void 0 ? items : choices;
2051
+ var _margin_, _margin_1, _margin_2, _ref;
2052
+ //around
2053
+ //vertical, horizontal
2054
+ // top, right, bottom, left
2055
+ return /*#__PURE__*/ React__default.createElement(TabGroup, {
2056
+ style: {
2057
+ marginTop: "var(--mt-".concat(margin[0], ")"),
2058
+ marginRight: "var(--mr-".concat((_margin_ = margin[1]) !== null && _margin_ !== void 0 ? _margin_ : margin[0], ")"),
2059
+ marginBottom: "var(--mb-".concat((_margin_1 = margin[2]) !== null && _margin_1 !== void 0 ? _margin_1 : margin[0], ")"),
2060
+ 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], ")"),
2061
+ width: width,
2062
+ height: height
2063
+ },
2064
+ manual: true,
2065
+ selectedIndex: currentIndex,
2066
+ onChange: function(index) {
2067
+ return changeHandler(index);
2068
+ }
2069
+ }, /*#__PURE__*/ React__default.createElement(TabList, {
2070
+ className: classnames('Tabs', className),
2071
+ style: {
2072
+ gap: "var(--gap-".concat(gap, ")"),
2073
+ height: height ? height : 'auto',
2074
+ justifyContent: justifyContent,
2075
+ alignItems: alignItems,
2076
+ flexDirection: orientation === Orientation.horizontal ? 'row' : 'column'
2077
+ }
2078
+ }, displayedItems && displayedItems.map(function(item, i) {
2079
+ var _padding_, _padding_1, _padding_2, _ref;
2080
+ return /*#__PURE__*/ React__default.createElement(Tab, {
2081
+ key: item,
2082
+ id: item,
2083
+ style: {
2084
+ cursor: 'pointer',
2085
+ width: tabWidth,
2086
+ height: tabHeight,
2087
+ fontSize: 'var(--text-md)',
2088
+ lineHeight: '1.25rem',
2089
+ backgroundColor: i === currentIndex ? selectedBackgroundColor !== null && selectedBackgroundColor !== void 0 ? selectedBackgroundColor : backgroundColor : backgroundColor,
2090
+ paddingTop: "var(--p-".concat(padding[0], ")"),
2091
+ paddingRight: "var(--p-".concat((_padding_ = padding[1]) !== null && _padding_ !== void 0 ? _padding_ : padding[0], ")"),
2092
+ paddingBottom: "var(--p-".concat((_padding_1 = padding[2]) !== null && _padding_1 !== void 0 ? _padding_1 : padding[0], ")"),
2093
+ paddingLeft: "var(--p-".concat((_ref = (_padding_2 = padding[3]) !== null && _padding_2 !== void 0 ? _padding_2 : padding[1]) !== null && _ref !== void 0 ? _ref : padding[0], ")"),
2094
+ display: 'flex',
2095
+ flex: 1,
2096
+ justifyContent: 'center',
2097
+ alignItems: 'center'
2098
+ },
2099
+ className: classnames('Tabs-item', 'bg-body', 'color-input-text')
2100
+ }, icons && icons[i] ? /*#__PURE__*/ React__default.createElement(IconButton, {
2101
+ icon: icons[i],
2102
+ id: item,
2103
+ iconWidth: "20px",
2104
+ // width={tabWidth}
2105
+ // height={tabHeight}
2106
+ color: i === currentIndex ? selectedColor : color,
2107
+ label: item
2108
+ }) : /*#__PURE__*/ React__default.createElement(Label, {
2109
+ value: item,
2110
+ fontSize: fontSize,
1512
2111
  color: color
1513
- }, style),
1514
- className: classnames('Label', 'select-none', className)
1515
- }, value ? value : children);
2112
+ }));
2113
+ })));
1516
2114
  }
1517
- Label.padding = Spacing;
1518
- Label.fontSize = FontSizes;
2115
+ Tabs.padding = Spacing;
2116
+ Tabs.gap = Spacing;
2117
+ Tabs.margin = Spacing;
2118
+ Tabs.orientation = Orientation;
2119
+ Tabs.justifyContent = JustifyContent$1;
2120
+ Tabs.alignItems = AlignItems$1;
2121
+ Tabs.fontSize = FontSizes;
2122
+
2123
+ var css_248z$a = ".Dropdown-button {\n font-size: var(--text-sm);\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--spacing-ml);\n cursor: pointer;\n vertical-align: middle;\n white-space: nowrap;\n text-decoration: none;\n text-align: center;\n border-radius: 4px;\n appearance: none;\n user-select: none;\n -webkit-user-select: none;\n height: 26px;\n border: 1px solid var(--bg-lv9);\n /* background: var(--color-gray-800); */\n /* color: var(--color-text); */\n}\n\n.Dropdown-button:hover,\n.Dropdown-button[data-open] {\n outline: none;\n cursor: pointer;\n border: 1px solid var(--color-brand-secondary);\n}\n\n.Dropdown-button:hover .Label {\n cursor: pointer;\n}\n\n.Dropdown-button:disabled {\n cursor: not-allowed;\n}\n\n.Dropdown-items {\n border: 1px solid var(--bg-lv9);\n background: var(--bg-lv4);\n box-shadow: rgba(0, 0, 0, 0.25) 0px 0px 5px 3px;\n border-radius: 4px;\n width: 150px;\n z-index: 50;\n}\n\n.Dropdown-item {\n font-size: var(--text-sm);\n padding: var(--spacing-md) var(--spacing-xl);\n min-width: 100px;\n color: var(--color-text);\n cursor: pointer;\n /* text-align: center; */\n}\n\n.Dropdown-item[data-selected] {\n color: var(--color-brand-secondary);\n}\n\n.Dropdown-item:hover {\n background-color: var(--bg-lv7);\n}\n\n.Dropdown-item:hover:not([data-selected]) {\n color: var(--color-text);\n}\n";
2124
+ styleInject(css_248z$a);
1519
2125
 
1520
2126
  function _define_property$g(obj, key, value) {
1521
2127
  if (key in obj) {
@@ -1530,7 +2136,7 @@ function _define_property$g(obj, key, value) {
1530
2136
  }
1531
2137
  return obj;
1532
2138
  }
1533
- function _object_spread$g(target) {
2139
+ function _object_spread$f(target) {
1534
2140
  for(var i = 1; i < arguments.length; i++){
1535
2141
  var source = arguments[i] != null ? arguments[i] : {};
1536
2142
  var ownKeys = Object.keys(source);
@@ -1546,25 +2152,72 @@ function _object_spread$g(target) {
1546
2152
  return target;
1547
2153
  }
1548
2154
  function Dropdown(param) {
1549
- var label = param.label, _param_color = param.color, color = _param_color === void 0 ? 'var(--color-text)' : _param_color, _param_labelColor = param.labelColor, labelColor = _param_labelColor === void 0 ? 'var(--color-text)' : _param_labelColor, className = param.className, onChange = param.onChange, width = param.width, id = param.id, style = param.style;
2155
+ var label = param.label, _param_color = param.color, color = _param_color === void 0 ? 'var(--color-text)' : _param_color, _param_labelColor = param.labelColor, labelColor = _param_labelColor === void 0 ? 'var(--color-text)' : _param_labelColor, className = param.className, onChange = param.onChange, _param_width = param.width, width = _param_width === void 0 ? '6rem' : _param_width, id = param.id, style = param.style;
1550
2156
  var _useDropdown = useDropdown({
1551
2157
  id: id,
1552
2158
  label: label,
1553
2159
  onChange: onChange
1554
- }), value = _useDropdown.value, choices = _useDropdown.choices, onMouseEnter = _useDropdown.onMouseEnter, handleChange = _useDropdown.handleChange, onClick = _useDropdown.onClick;
2160
+ }), value = _useDropdown.value, choices = _useDropdown.choices, onMouseEnter = _useDropdown.onMouseEnter, handleChange = _useDropdown.handleChange, onClick = _useDropdown.onClick, incrementValue = _useDropdown.incrementValue, decrementValue = _useDropdown.decrementValue;
1555
2161
  return /*#__PURE__*/ React__default.createElement(Box, {
1556
2162
  flexDirection: Box.flexDirection.column,
1557
2163
  onMouseEnter: onMouseEnter,
1558
2164
  width: width || 'auto',
1559
2165
  flex: "0 1 auto"
1560
- }, /*#__PURE__*/ React__default.createElement(Listbox, {
2166
+ }, /*#__PURE__*/ React__default.createElement(Label, {
2167
+ padding: [
2168
+ Label.padding.none,
2169
+ Label.padding.none,
2170
+ Label.padding.small,
2171
+ Label.padding.none
2172
+ ],
2173
+ fontSize: Label.fontSize.xSmall,
2174
+ value: label,
2175
+ style: {
2176
+ color: "".concat(labelColor ? labelColor : 'initial')
2177
+ }
2178
+ }), /*#__PURE__*/ React__default.createElement(Listbox, {
1561
2179
  value: value,
1562
2180
  onChange: handleChange
1563
- }, /*#__PURE__*/ React__default.createElement(ListboxButton, {
2181
+ }, /*#__PURE__*/ React__default.createElement("div", {
2182
+ style: {
2183
+ position: 'relative',
2184
+ width: width,
2185
+ height: '26px'
2186
+ }
2187
+ }, /*#__PURE__*/ React__default.createElement(Box, {
2188
+ flexDirection: Box.flexDirection.column,
2189
+ width: "auto",
2190
+ style: {
2191
+ position: 'absolute',
2192
+ right: '8px',
2193
+ top: '0',
2194
+ bottom: '0',
2195
+ zIndex: '2'
2196
+ }
2197
+ }, /*#__PURE__*/ React__default.createElement(IconButton, {
2198
+ id: "Dropdown-up-arrow",
2199
+ className: "Dropdown-arrow",
2200
+ backgroundColor: "transparent",
2201
+ width: "8px",
2202
+ icon: IconButton.icon.up,
2203
+ onClick: decrementValue
2204
+ }), /*#__PURE__*/ React__default.createElement(IconButton, {
2205
+ className: "Dropdown-arrow",
2206
+ id: "Dropdown-down-arrow",
2207
+ backgroundColor: "transparent",
2208
+ width: "8px",
2209
+ icon: IconButton.icon.down,
2210
+ onClick: incrementValue
2211
+ })), /*#__PURE__*/ React__default.createElement(ListboxButton, {
1564
2212
  className: classnames('Combobox Dropdown-button', className),
1565
- style: _object_spread$g({
2213
+ style: _object_spread$f({
1566
2214
  color: "".concat(color ? color : 'initial'),
1567
- width: "".concat(width ? width : '100%')
2215
+ width: "".concat(width ? width : '100%'),
2216
+ position: 'absolute',
2217
+ top: 0,
2218
+ bottom: 0,
2219
+ right: 0,
2220
+ left: 0
1568
2221
  }, style),
1569
2222
  id: id,
1570
2223
  onClick: onClick,
@@ -1572,39 +2225,26 @@ function Dropdown(param) {
1572
2225
  onChange: function(value) {
1573
2226
  return console.log(value);
1574
2227
  }
1575
- }, value), /*#__PURE__*/ React__default.createElement(ListboxOptions, {
2228
+ }, /*#__PURE__*/ React__default.createElement(Box, {
2229
+ gap: Box.gap.none,
2230
+ justifyContent: Box.justifyContent.spaceBetween
2231
+ }, /*#__PURE__*/ React__default.createElement(Label, {
2232
+ fontSize: Label.fontSize.small
2233
+ }, value)))), /*#__PURE__*/ React__default.createElement(ListboxOptions, {
1576
2234
  anchor: "bottom",
1577
2235
  portal: false,
1578
- className: "Dropdown-items z-10",
1579
- style: {
1580
- color: "".concat(color ? color : 'initial')
1581
- }
2236
+ className: "Dropdown-items z-10"
1582
2237
  }, choices === null || choices === void 0 ? void 0 : choices.map(function(item, i) {
1583
2238
  return /*#__PURE__*/ React__default.createElement(ListboxOption, {
1584
2239
  className: classnames('Dropdown-item'),
1585
2240
  key: item,
1586
- value: item,
1587
- style: {
1588
- color: "".concat(color ? color : 'initial')
1589
- }
2241
+ value: item
1590
2242
  }, item);
1591
- }))), /*#__PURE__*/ React__default.createElement(Label, {
1592
- padding: [
1593
- Label.padding.mediumSmall,
1594
- Label.padding.mediumSmall,
1595
- Label.padding.none,
1596
- Label.padding.mediumSmall
1597
- ],
1598
- fontSize: Label.fontSize.xSmall,
1599
- value: label,
1600
- style: {
1601
- color: "".concat(labelColor ? labelColor : 'initial')
1602
- }
1603
- }));
2243
+ }))));
1604
2244
  }
1605
2245
 
1606
- var css_248z$8 = ".TextInput {\n pointer-events: auto;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.TextInput::-moz-selection {\n background: transparent;\n}\n.TextInput::selection {\n background: transparent;\n}\n\n.TextInput:disabled {\n -webkit-user-select: none;\n user-select: none;\n}\n\n.isActive .TextInput {\n -webkit-user-select: auto;\n -moz-user-select: auto;\n -ms-user-select: auto;\n user-select: auto;\n}\n";
1607
- styleInject(css_248z$8);
2246
+ var css_248z$9 = ".TextInput {\n pointer-events: auto;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.TextInput::-moz-selection {\n background: transparent;\n}\n.TextInput::selection {\n background: transparent;\n}\n\n.TextInput:disabled {\n -webkit-user-select: none;\n user-select: none;\n}\n\n.isActive .TextInput {\n -webkit-user-select: auto;\n -moz-user-select: auto;\n -ms-user-select: auto;\n user-select: auto;\n}\n";
2247
+ styleInject(css_248z$9);
1608
2248
 
1609
2249
  function _array_like_to_array$f(arr, len) {
1610
2250
  if (len == null || len > arr.length) len = arr.length;
@@ -1654,7 +2294,7 @@ function _iterable_to_array_limit$f(arr, i) {
1654
2294
  function _non_iterable_rest$f() {
1655
2295
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1656
2296
  }
1657
- function _object_spread$f(target) {
2297
+ function _object_spread$e(target) {
1658
2298
  for(var i = 1; i < arguments.length; i++){
1659
2299
  var source = arguments[i] != null ? arguments[i] : {};
1660
2300
  var ownKeys = Object.keys(source);
@@ -1688,7 +2328,7 @@ var InputTypes = /*#__PURE__*/ function(InputTypes) {
1688
2328
  return InputTypes;
1689
2329
  }({});
1690
2330
  function Input(param) {
1691
- var onComplete = param.onComplete, value = param.value; param.min; param.max; var _param_fontSize = param.fontSize, fontSize = _param_fontSize === void 0 ? FontSizes.xSmall : _param_fontSize, style = param.style, className = param.className, isDisabled = param.isDisabled, id = param.id, _param_textColor = param.textColor, textColor = _param_textColor === void 0 ? 'var(--color-text)' : _param_textColor;
2331
+ var onComplete = param.onComplete, value = param.value; param.min; param.max; var _param_fontSize = param.fontSize, fontSize = _param_fontSize === void 0 ? FontSizes.xSmall : _param_fontSize, style = param.style, className = param.className, isDisabled = param.isDisabled, id = param.id, _param_textColor = param.textColor, textColor = _param_textColor === void 0 ? 'var(--color-text)' : _param_textColor, _param_textAlign = param.textAlign, textAlign = _param_textAlign === void 0 ? TextAlign.center : _param_textAlign;
1692
2332
  var _inputRef_current;
1693
2333
  var _useState = _sliced_to_array$f(useState(value), 2), internalValue = _useState[0], setInternalValue = _useState[1];
1694
2334
  // const [hasError, setHasError] = useState<boolean>(false);
@@ -1810,8 +2450,9 @@ function Input(param) {
1810
2450
  id: "".concat(id, "-input"),
1811
2451
  ref: inputRef,
1812
2452
  className: classnames('TextInput', isHighlighted ? 'is-highlighted' : '', className),
1813
- style: _object_spread$f({
2453
+ style: _object_spread$e({
1814
2454
  fontSize: "var(--text-".concat(fontSize),
2455
+ textAlign: textAlign,
1815
2456
  color: textColor
1816
2457
  }, style),
1817
2458
  value: internalValue,
@@ -1829,13 +2470,50 @@ function Input(param) {
1829
2470
  });
1830
2471
  }
1831
2472
  Input.type = InputTypes;
2473
+ Input.textAlign = TextAlign;
1832
2474
 
2475
+ function _define_property$e(obj, key, value) {
2476
+ if (key in obj) {
2477
+ Object.defineProperty(obj, key, {
2478
+ value: value,
2479
+ enumerable: true,
2480
+ configurable: true,
2481
+ writable: true
2482
+ });
2483
+ } else {
2484
+ obj[key] = value;
2485
+ }
2486
+ return obj;
2487
+ }
1833
2488
  var SliderType = /*#__PURE__*/ function(SliderType) {
1834
2489
  SliderType["bar"] = "bar";
1835
2490
  SliderType["rotary"] = "rotary";
1836
2491
  SliderType["custom"] = "custom";
1837
2492
  return SliderType;
1838
2493
  }({});
2494
+ var RotarySliderMarkerShapes = /*#__PURE__*/ function(RotarySliderMarkerShapes) {
2495
+ RotarySliderMarkerShapes["circle"] = "circle";
2496
+ RotarySliderMarkerShapes["rectangle"] = "rectangle";
2497
+ return RotarySliderMarkerShapes;
2498
+ }({});
2499
+ var RotarySliderSizes = /*#__PURE__*/ function(RotarySliderSizes) {
2500
+ RotarySliderSizes["small"] = "small";
2501
+ RotarySliderSizes["large"] = "large";
2502
+ return RotarySliderSizes;
2503
+ }({});
2504
+ var _obj;
2505
+ var rotarySliderSizeMap = (_obj = {}, _define_property$e(_obj, "small", {
2506
+ width: 40,
2507
+ height: 40
2508
+ }), _define_property$e(_obj, "large", {
2509
+ width: 65,
2510
+ height: 65
2511
+ }), _obj);
2512
+ var GradientStyles = /*#__PURE__*/ function(GradientStyles) {
2513
+ GradientStyles["unicolor"] = "unicolor";
2514
+ GradientStyles["multicolor"] = "multicolor";
2515
+ return GradientStyles;
2516
+ }({});
1839
2517
 
1840
2518
  function _array_like_to_array$e(arr, len) {
1841
2519
  if (len == null || len > arr.length) len = arr.length;
@@ -2062,13 +2740,6 @@ var useSlider = function(param) {
2062
2740
  // console.log(movement, hasMoved, 'movementinelesif');
2063
2741
  newValue = 1 - y / rect.width;
2064
2742
  } else if (hasMoved || ignoreMoveStatus) {
2065
- // console.log(
2066
- // hasMoved,
2067
- // orientation,
2068
- // dragOrientation,
2069
- // movement,
2070
- // '213312312',
2071
- // );
2072
2743
  newValue = x / rect.width;
2073
2744
  }
2074
2745
  newValue && setNormalisedState(clamp(newValue));
@@ -2150,11 +2821,11 @@ var useSlider = function(param) {
2150
2821
  };
2151
2822
  };
2152
2823
 
2153
- var css_248z$7 = ".RotarySlider {\n /* position: relative; */\n /* border-radius: 50%; */\n display: flex;\n flex-direction: column;\n justify-content: center;\n aspect-ratio: 1 / 1;\n border: 1px solid transparent;\n}\n\n.RotarySlider-Inner {\n height: 100%;\n width: 100%;\n right: 0;\n top: 0;\n bottom: 0;\n left: 0;\n background-color: var(--bg-popover);\n border-radius: 50%;\n}\n\n.RotarySlider-Indicator {\n position: absolute;\n top: 0;\n right: 0;\n left: 50%;\n width: var(--spacing-xs);\n height: 50%;\n transform: translate(-50%, 0) rotate(0) skewX(0) skewY(0) scaleX(1) scaleY(1);\n}\n\n.RotarySlider-center-marker {\n width: 0;\n height: 0;\n border-style: solid;\n border-width: 0 5px 8px 5px;\n transform: rotate(180deg);\n padding-bottom: var(--spacing-sm);\n}\n\n.ProgressCircle-wrapper {\n position: relative;\n}\n.ProgressCircle {\n fill: none;\n pointer-events: none;\n}\n\n.ProgressCircle-value {\n text-align: center;\n margin-top: -3px;\n height: 0.8rem;\n line-height: 0.8rem;\n}\n\n.ProgressCircle-bg {\n stroke-width: 3px;\n transform-origin: center;\n transform: rotate(135deg);\n stroke-linecap: round;\n font-size: var(--text-sm);\n pointer-events: none;\n}\n.ProgressCircle-fg {\n stroke-width: 3px;\n /* stroke-dasharray: 75; */\n /* stroke-dashoffset: calc(880 - (660 * 0) / 100); */\n transform-origin: center;\n stroke-linecap: round;\n pointer-events: none;\n}\n\n.corner-border {\n --b: 1px; /* thickness of the border */\n --c: var(--color-gray-500); /* color of the border */\n --w: 5px; /* width of border */\n\n border: var(--b) solid #0000; /* space for the border */\n --_g: #0000 90deg, var(--c) 0;\n --_p: var(--w) var(--w) border-box no-repeat;\n background:\n conic-gradient(from 90deg at top var(--b) left var(--b), var(--_g)) 0 0 /\n var(--_p),\n conic-gradient(from 180deg at top var(--b) right var(--b), var(--_g)) 100% 0 /\n var(--_p),\n conic-gradient(from 0deg at bottom var(--b) left var(--b), var(--_g)) 0 100% /\n var(--_p),\n conic-gradient(from -90deg at bottom var(--b) right var(--b), var(--_g))\n 100% 100% / var(--_p);\n}\n";
2154
- styleInject(css_248z$7);
2824
+ var css_248z$8 = ".RotarySlider {\n position: relative;\n display: flex;\n flex-direction: column;\n justify-content: center;\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}\n\n.RotarySlider-Indicator-marker {\n position: absolute;\n top: 3px;\n right: 0;\n left: 50%;\n width: 3px;\n height: 50%;\n transform: translate(-50%, 0) rotate(0) skewX(0) skewY(0) scaleX(1) scaleY(1);\n}\n\n.RotarySlider-center-marker {\n width: 3px;\n height: 6px;\n}\n\n.RotarySlider-CenterCircle {\n position: relative;\n border-radius: 100%;\n border: 2px solid var(--color-gray-300);\n /* background: var(--color-gray-800); */\n background: radial-gradient(\n circle at center,\n var(--bg-lv4) 50%,\n var(--bg-lv3) 80%\n );\n}\n\n.RotarySlider-CenterCircle:after {\n content: '';\n width: 4px;\n height: 4px;\n background: var(--color-gray-300);\n border-radius: 100%;\n position: absolute;\n left: 8px;\n top: 3px;\n}\n\n.RotarySlider-positioning-wrapper {\n position: absolute;\n height: 100%;\n width: 100%;\n}\n.ProgressCircle {\n fill: none;\n pointer-events: none;\n}\n\n.ProgressCircle-value {\n text-align: center;\n margin-top: -4px;\n height: 0.8rem;\n line-height: 0.8rem;\n}\n\n.ProgressCircle-bg {\n stroke-width: 3px;\n transform-origin: center;\n /* transform: rotate(135deg); */\n font-size: var(--text-sm);\n pointer-events: none;\n}\n.ProgressCircle-fg {\n stroke-width: 3px;\n /* stroke-dasharray: 75; */\n /* stroke-dashoffset: calc(880 - (660 * 0) / 100); */\n transform-origin: center;\n pointer-events: none;\n}\n\n.corner-border {\n --b: 1px; /* thickness of the border */\n --c: var(--color-gray-500); /* color of the border */\n --w: 5px; /* width of border */\n\n border: var(--b) solid #0000; /* space for the border */\n --_g: #0000 90deg, var(--c) 0;\n --_p: var(--w) var(--w) border-box no-repeat;\n background:\n conic-gradient(from 90deg at top var(--b) left var(--b), var(--_g)) 0 0 /\n var(--_p),\n conic-gradient(from 180deg at top var(--b) right var(--b), var(--_g)) 100% 0 /\n var(--_p),\n conic-gradient(from 0deg at bottom var(--b) left var(--b), var(--_g)) 0 100% /\n var(--_p),\n conic-gradient(from -90deg at bottom var(--b) right var(--b), var(--_g))\n 100% 100% / var(--_p);\n}\n";
2825
+ styleInject(css_248z$8);
2155
2826
 
2156
- var css_248z$6 = "";
2157
- styleInject(css_248z$6);
2827
+ var css_248z$7 = "";
2828
+ styleInject(css_248z$7);
2158
2829
 
2159
2830
  function _array_like_to_array$d(arr, len) {
2160
2831
  if (len == null || len > arr.length) len = arr.length;
@@ -2204,7 +2875,7 @@ function _unsupported_iterable_to_array$d(o, minLen) {
2204
2875
  }
2205
2876
  function ControlGroup(param) {
2206
2877
  var id = param.id, _param_isDisabled = param.isDisabled, isDisabled = _param_isDisabled === void 0 ? false : _param_isDisabled, className = param.className, onChangeActiveState = param.onChangeActiveState, children = param.children;
2207
- // EXAMPLE CONTROL GROUP STRUCTURE
2878
+ // EXPECTED CONTROL GROUP STRUCTURE
2208
2879
  // <ControlGroup id={id-control-group} is-active>
2209
2880
  // <Slider id={id}></Slider>
2210
2881
  // <Input id={id-input}></Input>
@@ -2281,7 +2952,234 @@ function ControlGroup(param) {
2281
2952
  }, children);
2282
2953
  }
2283
2954
 
2284
- function _define_property$e(obj, key, value) {
2955
+ var ProgressCircle = function(param) {
2956
+ var width = param.width, height = param.height, _param_polarity = param.polarity, polarity = _param_polarity === void 0 ? Polarity.unipolar : _param_polarity, _param_strokeWidth = param.strokeWidth, strokeWidth = _param_strokeWidth === void 0 ? 5 : _param_strokeWidth; // trackOffset = 0,
2957
+ param.indicatorLineColor; var indicatorLineGradient = param.indicatorLineGradient, trackColor = param.trackColor, radius = param.radius, circ = param.circ, activeZone = param.activeZone, normalisedValue = param.normalisedValue;
2958
+ var cx = '50%';
2959
+ var cy = '50%';
2960
+ var unipolarOffset = circ - activeZone * (normalisedValue * 100) / 100;
2961
+ var bipolarOffset = circ - activeZone * (normalisedValue * 100 - 50) / 100;
2962
+ return /*#__PURE__*/ React__default.createElement("svg", {
2963
+ className: "ProgressCircle",
2964
+ width: width,
2965
+ height: height
2966
+ }, /*#__PURE__*/ React__default.createElement("circle", {
2967
+ id: "circle2",
2968
+ className: "ProgressCircle-bg",
2969
+ cx: cx,
2970
+ cy: cy,
2971
+ r: radius,
2972
+ style: {
2973
+ stroke: trackColor ? trackColor : 'var(--bg-lv2)',
2974
+ strokeWidth: strokeWidth,
2975
+ strokeDasharray: circ,
2976
+ transform: 'rotate(135deg)',
2977
+ strokeDashoffset: circ - activeZone
2978
+ }
2979
+ }), /*#__PURE__*/ React__default.createElement("circle", {
2980
+ id: "circle2",
2981
+ className: "ProgressCircle-fg",
2982
+ cx: cx,
2983
+ cy: cy,
2984
+ r: radius,
2985
+ style: {
2986
+ stroke: indicatorLineGradient === GradientStyles.unicolor ? 'url(#unicolorGradient)' : 'url(#multicolorGradient)',
2987
+ strokeWidth: strokeWidth,
2988
+ strokeDasharray: circ,
2989
+ // transform: `rotate(${polarity === Polarity.unipolar ? '135deg' : '270deg'})`,
2990
+ transform: polarity === Polarity.unipolar ? 'rotate(135deg)' : 'rotate(270deg)',
2991
+ strokeDashoffset: polarity === Polarity.unipolar ? unipolarOffset : bipolarOffset
2992
+ }
2993
+ }), /*#__PURE__*/ React__default.createElement("linearGradient", {
2994
+ id: "unicolorGradient",
2995
+ x1: "0%",
2996
+ y1: "0%",
2997
+ x2: "100%",
2998
+ y2: "0%"
2999
+ }, /*#__PURE__*/ React__default.createElement("stop", {
3000
+ offset: "0%",
3001
+ "stop-color": "var(--color-brand-700)"
3002
+ }), /*#__PURE__*/ React__default.createElement("stop", {
3003
+ offset: "80%",
3004
+ "stop-color": "var(--color-brand)"
3005
+ })), /*#__PURE__*/ React__default.createElement("linearGradient", {
3006
+ id: "multicolorGradient",
3007
+ x1: "0%",
3008
+ y1: "0%",
3009
+ x2: "100%",
3010
+ y2: "0%"
3011
+ }, /*#__PURE__*/ React__default.createElement("stop", {
3012
+ offset: "0%",
3013
+ "stop-color": "var(--color-brand-700)"
3014
+ }), /*#__PURE__*/ React__default.createElement("stop", {
3015
+ offset: "80%",
3016
+ "stop-color": "var(--color-brand-secondary)"
3017
+ })));
3018
+ };
3019
+ var InnerCircle = function(param) {
3020
+ var _param_size = param.size, size = _param_size === void 0 ? RotarySliderSizes.small : _param_size, _param_markerShape = param.markerShape, markerShape = _param_markerShape === void 0 ? RotarySliderMarkerShapes.circle : _param_markerShape, normalisedValue = param.normalisedValue, knobFillColor = param.knobFillColor, _param_knobStrokeColor = param.knobStrokeColor, knobStrokeColor = _param_knobStrokeColor === void 0 ? 'var(--bg-lv10)' : _param_knobStrokeColor;
3021
+ var width = rotarySliderSizeMap[size].width;
3022
+ var height = rotarySliderSizeMap[size].height;
3023
+ var cx = '50%';
3024
+ var cy = '50%';
3025
+ return /*#__PURE__*/ React__default.createElement("svg", {
3026
+ className: "InnerCircle",
3027
+ width: width,
3028
+ height: height,
3029
+ style: {
3030
+ transform: markerShape === RotarySliderMarkerShapes.circle ? "rotate(".concat(-90 + normalisedValue * 270, "deg)") : "rotate(".concat(-225 + normalisedValue * 270, "deg)")
3031
+ }
3032
+ }, /*#__PURE__*/ React__default.createElement("circle", {
3033
+ id: "InnerCircle",
3034
+ className: "InnerCircle",
3035
+ cx: cx,
3036
+ cy: cy,
3037
+ r: size === RotarySliderSizes.small ? 12 : 24,
3038
+ fill: knobFillColor || "url(#radialGradient)",
3039
+ filter: "url(#boxShadow)",
3040
+ style: {
3041
+ stroke: knobStrokeColor,
3042
+ strokeWidth: 2
3043
+ }
3044
+ }), markerShape === RotarySliderMarkerShapes.circle ? /*#__PURE__*/ React__default.createElement("circle", {
3045
+ id: "InnerCircle-marker",
3046
+ className: "InnerCircle-marker",
3047
+ cx: size === RotarySliderSizes.small ? 16 : 20,
3048
+ cy: size === RotarySliderSizes.small ? 16 : 20,
3049
+ r: 2,
3050
+ style: {
3051
+ fill: knobStrokeColor
3052
+ }
3053
+ }) : /*#__PURE__*/ React__default.createElement("rect", {
3054
+ id: "InnerCircle-marker",
3055
+ className: "InnerCircle-marker",
3056
+ x: size === RotarySliderSizes.small ? 19 : 10,
3057
+ y: size === RotarySliderSizes.small ? -31 : 10,
3058
+ width: 2,
3059
+ height: 8,
3060
+ style: {
3061
+ transform: 'rotate(90deg)',
3062
+ fill: knobStrokeColor
3063
+ }
3064
+ }), /*#__PURE__*/ React__default.createElement("defs", null, /*#__PURE__*/ React__default.createElement("filter", {
3065
+ id: "boxShadow",
3066
+ x: "-50%",
3067
+ y: "-50%",
3068
+ width: "200%",
3069
+ height: "200%"
3070
+ }, /*#__PURE__*/ React__default.createElement("feGaussianBlur", {
3071
+ in: "SourceAlpha",
3072
+ stdDeviation: "3",
3073
+ result: "blur"
3074
+ }), /*#__PURE__*/ React__default.createElement("feComposite", {
3075
+ in: "SourceAlpha",
3076
+ operator: "arithmetic",
3077
+ k2: "-1",
3078
+ k3: "1",
3079
+ result: "shadowAlpha"
3080
+ }), /*#__PURE__*/ React__default.createElement("feFlood", {
3081
+ "flood-color": "rgba(0,0,0,0.5)",
3082
+ result: "floodColor"
3083
+ }), /*#__PURE__*/ React__default.createElement("feComposite", {
3084
+ in: "floodColor",
3085
+ in2: "shadowAlpha",
3086
+ operator: "in",
3087
+ result: "boxShadow"
3088
+ }), /*#__PURE__*/ React__default.createElement("feMerge", null, /*#__PURE__*/ React__default.createElement("feMergeNode", {
3089
+ in: "SourceGraphic"
3090
+ }), /*#__PURE__*/ React__default.createElement("feMergeNode", {
3091
+ in: "boxShadow"
3092
+ }))), /*#__PURE__*/ React__default.createElement("radialGradient", {
3093
+ id: "radialGradient",
3094
+ cx: "50%",
3095
+ cy: "50%",
3096
+ r: "50%",
3097
+ fx: "50%",
3098
+ fy: "50%"
3099
+ }, /*#__PURE__*/ React__default.createElement("stop", {
3100
+ offset: "75%",
3101
+ style: {
3102
+ stopColor: 'var(--bg-lv3)',
3103
+ stopOpacity: '0'
3104
+ }
3105
+ }), /*#__PURE__*/ React__default.createElement("stop", {
3106
+ offset: "90%",
3107
+ style: {
3108
+ stopColor: 'var(--bg-lv3)',
3109
+ stopOpacity: '1'
3110
+ }
3111
+ }))));
3112
+ };
3113
+ var BarSliderMarker = function(param) {
3114
+ var _param_markerFillColor = param.markerFillColor, markerFillColor = _param_markerFillColor === void 0 ? 'var(--bg-lv2)' : _param_markerFillColor, _param_markerStrokeColor = param.markerStrokeColor, markerStrokeColor = _param_markerStrokeColor === void 0 ? 'var(--bg-lv12)' : _param_markerStrokeColor, _param_strokeWidth = param.strokeWidth, strokeWidth = _param_strokeWidth === void 0 ? 3 : _param_strokeWidth;
3115
+ return /*#__PURE__*/ React__default.createElement("svg", {
3116
+ className: "BarSliderMarker",
3117
+ width: "18px",
3118
+ height: "18px"
3119
+ }, /*#__PURE__*/ React__default.createElement("circle", {
3120
+ id: "BarSliderMarker",
3121
+ className: "BarSliderMarker",
3122
+ r: "6px",
3123
+ cx: '50%',
3124
+ cy: '50%',
3125
+ fill: "url(#radialGradient)",
3126
+ filter: "url(#boxShadow)",
3127
+ style: {
3128
+ stroke: markerStrokeColor,
3129
+ strokeWidth: strokeWidth,
3130
+ fill: markerFillColor
3131
+ }
3132
+ }), /*#__PURE__*/ React__default.createElement("defs", null, /*#__PURE__*/ React__default.createElement("filter", {
3133
+ id: "boxShadow",
3134
+ x: "-50%",
3135
+ y: "-50%",
3136
+ width: "200%",
3137
+ height: "200%"
3138
+ }, /*#__PURE__*/ React__default.createElement("feGaussianBlur", {
3139
+ in: "SourceAlpha",
3140
+ stdDeviation: "3",
3141
+ result: "blur"
3142
+ }), /*#__PURE__*/ React__default.createElement("feComposite", {
3143
+ in: "SourceAlpha",
3144
+ operator: "arithmetic",
3145
+ k2: "-1",
3146
+ k3: "1",
3147
+ result: "shadowAlpha"
3148
+ }), /*#__PURE__*/ React__default.createElement("feFlood", {
3149
+ "flood-color": "rgba(0,0,0,0.5)",
3150
+ result: "floodColor"
3151
+ }), /*#__PURE__*/ React__default.createElement("feComposite", {
3152
+ in: "floodColor",
3153
+ in2: "shadowAlpha",
3154
+ operator: "in",
3155
+ result: "boxShadow"
3156
+ }), /*#__PURE__*/ React__default.createElement("feMerge", null, /*#__PURE__*/ React__default.createElement("feMergeNode", {
3157
+ in: "SourceGraphic"
3158
+ }), /*#__PURE__*/ React__default.createElement("feMergeNode", {
3159
+ in: "boxShadow"
3160
+ }))), /*#__PURE__*/ React__default.createElement("radialGradient", {
3161
+ id: "radialGradient",
3162
+ cx: "50%",
3163
+ cy: "50%",
3164
+ r: "50%",
3165
+ fx: "50%",
3166
+ fy: "50%"
3167
+ }, /*#__PURE__*/ React__default.createElement("stop", {
3168
+ offset: "75%",
3169
+ style: {
3170
+ stopColor: 'var(--bg-lv3)',
3171
+ stopOpacity: '0'
3172
+ }
3173
+ }), /*#__PURE__*/ React__default.createElement("stop", {
3174
+ offset: "90%",
3175
+ style: {
3176
+ stopColor: 'var(--bg-lv3)',
3177
+ stopOpacity: '1'
3178
+ }
3179
+ }))));
3180
+ };
3181
+
3182
+ function _define_property$d(obj, key, value) {
2285
3183
  if (key in obj) {
2286
3184
  Object.defineProperty(obj, key, {
2287
3185
  value: value,
@@ -2294,7 +3192,7 @@ function _define_property$e(obj, key, value) {
2294
3192
  }
2295
3193
  return obj;
2296
3194
  }
2297
- function _object_spread$e(target) {
3195
+ function _object_spread$d(target) {
2298
3196
  for(var i = 1; i < arguments.length; i++){
2299
3197
  var source = arguments[i] != null ? arguments[i] : {};
2300
3198
  var ownKeys = Object.keys(source);
@@ -2304,7 +3202,7 @@ function _object_spread$e(target) {
2304
3202
  }));
2305
3203
  }
2306
3204
  ownKeys.forEach(function(key) {
2307
- _define_property$e(target, key, source[key]);
3205
+ _define_property$d(target, key, source[key]);
2308
3206
  });
2309
3207
  }
2310
3208
  return target;
@@ -2328,67 +3226,79 @@ function _object_spread_props$2(target, source) {
2328
3226
  }
2329
3227
  return target;
2330
3228
  }
2331
- var ProgressCircle = function(param) {
2332
- var color = param.color, bgColor = param.bgColor, _param_width = param.width, width = _param_width === void 0 ? 40 : _param_width, _param_height = param.height, height = _param_height === void 0 ? 40 : _param_height, _param_strokeWidth = param.strokeWidth, strokeWidth = _param_strokeWidth === void 0 ? 3 : _param_strokeWidth, _param_polarity = param.polarity, polarity = _param_polarity === void 0 ? Polarity.unipolar : _param_polarity, value = param.value;
2333
- var cx = width / 2;
2334
- var cy = height / 2;
2335
- var radius = (width - strokeWidth * 2) / 2;
3229
+ function RotaryCircle(param) {
3230
+ var _param_polarity = param.polarity, polarity = _param_polarity === void 0 ? Polarity.unipolar : _param_polarity, className = param.className, id = param.id, _param_trackWidth = param.trackWidth, trackWidth = _param_trackWidth === void 0 ? 5 : _param_trackWidth; param.trackOffset; var sliderValue = param.sliderValue, bindDrag = param.bindDrag, onDoubleClick = param.onDoubleClick, _param_size = param.size, size = _param_size === void 0 ? RotarySliderSizes.small : _param_size, indicatorLineColor = param.indicatorLineColor, indicatorLineGradient = param.indicatorLineGradient, trackColor = param.trackColor; param.trackStrokeColor; var knobStrokeColor = param.knobStrokeColor, knobFillColor = param.knobFillColor, markerShape = param.markerShape, style = param.style;
3231
+ var width = rotarySliderSizeMap[size].width;
3232
+ var height = rotarySliderSizeMap[size].height;
3233
+ var radius = (width - trackWidth * 2) / 2;
2336
3234
  var circ = 2 * 3.14 * radius;
2337
3235
  var activeZone = circ - circ * 0.25;
2338
- var unipolarOffset = circ - activeZone * (value * 100) / 100;
2339
- var bipolarOffset = circ - activeZone * (value * 100 - 50) / 100;
2340
- return /*#__PURE__*/ React__default.createElement("svg", {
2341
- className: "ProgressCircle",
2342
- width: width,
2343
- height: height
2344
- }, /*#__PURE__*/ React__default.createElement("circle", {
2345
- className: "ProgressCircle-bg",
2346
- cx: cx,
2347
- cy: cy,
2348
- r: radius,
3236
+ return /*#__PURE__*/ React__default.createElement(Box, _object_spread_props$2(_object_spread$d({
3237
+ id: id,
3238
+ tabIndex: 0,
3239
+ className: classnames('Slider', 'RotarySlider', polarity === Polarity.unipolar ? 'Slider-polarity-unipolar' : 'Slider-polarity-bipolar', className)
3240
+ }, bindDrag()), {
3241
+ onDoubleClick: function() {
3242
+ onDoubleClick && onDoubleClick();
3243
+ },
3244
+ style: _object_spread$d({
3245
+ touchAction: 'none',
3246
+ height: "".concat(height !== null && height !== void 0 ? height : width, "px"),
3247
+ width: "".concat(width, "px")
3248
+ }, style)
3249
+ }), sliderValue !== null ? /*#__PURE__*/ React__default.createElement("div", {
2349
3250
  style: {
2350
- stroke: bgColor,
2351
- strokeWidth: strokeWidth,
2352
- strokeDasharray: "".concat(activeZone)
3251
+ position: 'relative',
3252
+ width: width,
3253
+ height: height
2353
3254
  }
2354
- }), polarity === Polarity.bipolar ? /*#__PURE__*/ React__default.createElement("circle", {
2355
- id: "circle2",
2356
- className: "ProgressCircle-fg",
2357
- cx: cx,
2358
- cy: cy,
2359
- r: radius,
3255
+ }, /*#__PURE__*/ React__default.createElement("div", {
3256
+ className: "RotarySlider-positioning-wrapper",
2360
3257
  style: {
2361
- stroke: color,
2362
- strokeWidth: strokeWidth,
2363
- strokeLinecap: 'round',
2364
- strokeDasharray: circ,
2365
- transform: "rotate(270deg)",
2366
- strokeDashoffset: 107.5
3258
+ width: '100%',
3259
+ height: '100%'
2367
3260
  }
2368
- }) : null, /*#__PURE__*/ React__default.createElement("circle", {
2369
- id: "circle2",
2370
- className: "ProgressCircle-fg",
2371
- cx: cx,
2372
- cy: cy,
2373
- r: radius,
3261
+ }, /*#__PURE__*/ React__default.createElement(ProgressCircle, {
3262
+ width: width,
3263
+ height: height,
3264
+ polarity: polarity,
3265
+ radius: radius,
3266
+ circ: circ,
3267
+ strokeWidth: trackWidth,
3268
+ activeZone: activeZone,
3269
+ normalisedValue: sliderValue,
3270
+ indicatorLineColor: indicatorLineColor,
3271
+ indicatorLineGradient: indicatorLineGradient,
3272
+ trackColor: trackColor,
3273
+ gradient: true
3274
+ })), /*#__PURE__*/ React__default.createElement("div", {
3275
+ className: 'RotarySlider-positioning-wrapper',
2374
3276
  style: {
2375
- stroke: color,
2376
- strokeWidth: strokeWidth,
2377
- strokeLinecap: 'round',
2378
- strokeDasharray: circ,
2379
- transform: "rotate(".concat(polarity === Polarity.unipolar ? '135deg' : '270deg', ")"),
2380
- strokeDashoffset: polarity === Polarity.unipolar ? unipolarOffset : bipolarOffset
2381
- }
2382
- }));
2383
- };
3277
+ width: '100%',
3278
+ height: '100%'
3279
+ }
3280
+ }, /*#__PURE__*/ React__default.createElement(InnerCircle, {
3281
+ normalisedValue: sliderValue,
3282
+ size: size,
3283
+ markerShape: markerShape,
3284
+ knobStrokeColor: knobStrokeColor,
3285
+ knobFillColor: knobFillColor
3286
+ }))) : '');
3287
+ }
3288
+ RotaryCircle.polarity = Polarity;
3289
+ RotaryCircle.size = RotarySliderSizes;
3290
+
3291
+ // Rotary Slider UI component.
3292
+ // Connects to Juce's Slider element
2384
3293
  function RotarySlider(param) {
2385
- var _param_polarity = param.polarity, polarity = _param_polarity === void 0 ? Polarity.unipolar : _param_polarity, label = param.label, className = param.className, id = param.id, onChange = param.onChange; param.rotationBehavior; var _param_mockInitialNormalisedValue = param.// Mocks the initial scaled value of the slider for web veiws outside of JUCE
2386
- 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 ? {
3294
+ var _param_polarity = param.polarity, polarity = _param_polarity === void 0 ? Polarity.unipolar : _param_polarity, label = param.label, className = param.className, id = param.id, onChange = param.onChange, trackWidth = param.trackWidth, // trackOffset,
3295
+ indicatorLineColor = param.indicatorLineColor, indicatorLineGradient = param.indicatorLineGradient, trackColor = param.trackColor, trackStrokeColor = param.trackStrokeColor, knobStrokeColor = param.knobStrokeColor, knobFillColor = param.knobFillColor, _param_size = param.size, size = _param_size === void 0 ? RotarySliderSizes.small : _param_size, markerShape = param.markerShape, _param_mockInitialNormalisedValue = param.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 ? {
2387
3296
  start: 20.0,
2388
3297
  end: 15000.0,
2389
3298
  interval: 0.1,
2390
3299
  skew: 0.7
2391
- } : _param_mockProperties; param.labelColor; var _param_color = param.color, color = _param_color === void 0 ? 'var(--color-gray-500)' : _param_color, _param_bgColor = param.bgColor, bgColor = _param_bgColor === void 0 ? 'var(--color-gray-200)' : _param_bgColor, _param_width = param.width, width = _param_width === void 0 ? 40 : _param_width, _param_height = param.height, height = _param_height === void 0 ? 38 : _param_height, style = param.style;
3300
+ } : _param_mockProperties; param.style;
3301
+ var _rotarySliderSizeMap_size;
2392
3302
  var _useSlider = useSlider({
2393
3303
  id: id,
2394
3304
  label: label,
@@ -2396,9 +3306,7 @@ function RotarySlider(param) {
2396
3306
  mockInitialNormalisedValue: mockInitialNormalisedValue,
2397
3307
  onChange: onChange,
2398
3308
  isRandomizable: isRandomizable
2399
- }), bindDrag = _useSlider.bindDrag, normalisedValue = _useSlider.normalisedValue, scaledValue = _useSlider.scaledValue, // onMouseEnter,
2400
- setToDefaultState = _useSlider.setToDefaultState, setNormalisedState = _useSlider.setNormalisedState, // isActive,
2401
- properties = _useSlider.properties;
3309
+ }), bindDrag = _useSlider.bindDrag, normalisedValue = _useSlider.normalisedValue, scaledValue = _useSlider.scaledValue, setToDefaultState = _useSlider.setToDefaultState, setNormalisedState = _useSlider.setNormalisedState, properties = _useSlider.properties;
2402
3310
  return /*#__PURE__*/ React__default.createElement(ControlGroup, {
2403
3311
  id: id
2404
3312
  }, /*#__PURE__*/ React__default.createElement(Box, {
@@ -2406,46 +3314,43 @@ function RotarySlider(param) {
2406
3314
  flexDirection: Box.flexDirection.column,
2407
3315
  gap: Box.gap.none,
2408
3316
  flex: "0 1 auto"
2409
- }, polarity === Polarity.bipolar && /*#__PURE__*/ React__default.createElement("div", {
2410
- style: {
2411
- borderColor: "".concat(color, " transparent ").concat(color, " transparent")
2412
- },
2413
- className: classnames('RotarySlider-center-marker')
2414
- }), /*#__PURE__*/ React__default.createElement(Box, _object_spread_props$2(_object_spread$e({
2415
- id: id,
2416
- tabIndex: 0,
2417
- className: classnames('Slider', 'RotarySlider', // isActive ? 'corner-border' : '',
2418
- polarity === Polarity.unipolar ? 'Slider-polarity-unipolar' : 'Slider-polarity-bipolar', className)
2419
- }, bindDrag()), {
2420
- // onMouseEnter={onMouseEnter}
2421
- onDoubleClick: function() {
2422
- setToDefaultState();
2423
- },
2424
- style: _object_spread$e({
2425
- touchAction: 'none',
2426
- height: "".concat(height, "px"),
2427
- width: "".concat(width + 2, "px")
2428
- }, style)
2429
- }), normalisedValue !== null ? /*#__PURE__*/ React__default.createElement("div", {
2430
- className: "ProgressCircle-wrapper"
2431
- }, /*#__PURE__*/ React__default.createElement(ProgressCircle, {
2432
- value: normalisedValue,
3317
+ }, label ? /*#__PURE__*/ React__default.createElement(Label, {
3318
+ padding: [
3319
+ Label.padding.none,
3320
+ Label.padding.none,
3321
+ Label.padding.mediumSmall,
3322
+ Label.padding.none
3323
+ ],
3324
+ fontSize: Label.fontSize.xSmall,
3325
+ value: label
3326
+ }) : null, /*#__PURE__*/ React__default.createElement(RotaryCircle, {
2433
3327
  polarity: polarity,
2434
- color: bgColor,
2435
- bgColor: color,
2436
- width: width,
2437
- height: height
2438
- })) : ''), /*#__PURE__*/ React__default.createElement(Input, {
3328
+ className: className,
3329
+ id: id,
3330
+ trackWidth: trackWidth,
3331
+ markerShape: markerShape,
3332
+ // trackOffset={trackOffset}
3333
+ sliderValue: normalisedValue,
3334
+ bindDrag: bindDrag,
3335
+ onDoubleClick: setToDefaultState,
3336
+ size: size,
3337
+ indicatorLineColor: indicatorLineColor,
3338
+ indicatorLineGradient: indicatorLineGradient,
3339
+ trackColor: trackColor,
3340
+ trackStrokeColor: trackStrokeColor,
3341
+ knobStrokeColor: knobStrokeColor,
3342
+ knobFillColor: knobFillColor
3343
+ }), /*#__PURE__*/ React__default.createElement(Input, {
2439
3344
  className: "ProgressCircle-value",
2440
3345
  value: scaledValue,
2441
3346
  id: id,
2442
3347
  min: (properties === null || properties === void 0 ? void 0 : properties.start) || 0,
2443
3348
  max: (properties === null || properties === void 0 ? void 0 : properties.end) || 0,
3349
+ textAlign: Input.textAlign.center,
2444
3350
  style: {
2445
3351
  fontWeight: 'bold',
2446
3352
  width: '100%',
2447
- maxWidth: "".concat(width, "px"),
2448
- marginBottom: 'var(--spacing-sm)'
3353
+ maxWidth: "".concat(rotarySliderSizeMap === null || rotarySliderSizeMap === void 0 ? void 0 : (_rotarySliderSizeMap_size = rotarySliderSizeMap[size]) === null || _rotarySliderSizeMap_size === void 0 ? void 0 : _rotarySliderSizeMap_size.width, "px")
2449
3354
  },
2450
3355
  onComplete: function(value) {
2451
3356
  var normalisedVal = properties && scaledToNormalised({
@@ -2456,17 +3361,16 @@ function RotarySlider(param) {
2456
3361
  });
2457
3362
  normalisedVal !== undefined && setNormalisedState(normalisedVal);
2458
3363
  }
2459
- }), /*#__PURE__*/ React__default.createElement(Label, {
2460
- padding: [
2461
- Label.padding.none
2462
- ],
2463
- fontSize: Label.fontSize.xSmall,
2464
- value: label
2465
3364
  })));
2466
3365
  }
2467
- RotarySlider.sliderPolarity = Polarity;
3366
+ RotarySlider.polarity = Polarity;
3367
+ RotarySlider.size = RotarySliderSizes;
3368
+ RotarySlider.markerShape = RotarySliderMarkerShapes;
2468
3369
 
2469
- function _define_property$d(obj, key, value) {
3370
+ var css_248z$6 = ".BarSlider {\n --maxNarrowTrackIndicatorWidth: 6px;\n --maxNarrowTrackWidth: 20px;\n --minHorizontalWidth: 75px;\n --minVerticalHeight: 75px;\n --narrowTrackMargin: 8px;\n --narrowTrackBorderRadius: 20px;\n}\n\n.BarSlider:hover {\n cursor: pointer;\n}\n\n.BarSlider-Track {\n touch-action: none;\n position: relative;\n width: 100%;\n height: 100%;\n max-height: 100%;\n max-width: 100%;\n background-color: var(--bg-lv5);\n}\n\n.BarSlider-Track.isHighlighted {\n background-color: var(--bg-lv6);\n}\n.Barslider-IndicatorLineWrapper,\n.BarSlider-MarkerWrapper {\n width: 100%;\n height: 100%;\n position: absolute;\n pointer-events: none;\n}\n\n.BarSlider-IndicatorLine {\n position: absolute;\n top: 0;\n /* left: 0; */\n right: 0;\n bottom: 0;\n pointer-events: none;\n}\n\n.BarSlider-Marker {\n position: absolute;\n pointer-events: none;\n}\n\n/* Narrow variant */\n.BarSlider--narrowTrack .BarSlider-Track {\n border-radius: var(--narrowTrackBorderRadius);\n background-color: var(--bg-lv3);\n box-shadow: inset 0px 2px 6px rgba(0, 0, 0, 0.25);\n}\n\n/* .BarSlider--narrowTrack .BarSlider-IndicatorLine {\n border-radius: var(--narrowTrackBorderRadius);\n} */\n\n.BarSlider--narrowTrack .BarSlider-Marker {\n border-radius: var(--narrowTrackBorderRadius);\n}\n\n.BarSlider--narrowTrack .Barslider-IndicatorLineWrapper {\n border-radius: var(--narrowTrackBorderRadius);\n overflow: hidden;\n}\n\n.BarSlider--narrowTrack.BarSlider--isVertical .Barslider-IndicatorLineWrapper,\n.BarSlider--narrowTrack.BarSlider--isVertical .BarSlider-MarkerWrapper {\n bottom: var(--maxNarrowTrackIndicatorWidth);\n left: calc(50% - (var(--maxNarrowTrackIndicatorWidth) / 2));\n width: var(--maxNarrowTrackIndicatorWidth);\n height: calc(100% - (var(--narrowTrackMargin) * 2));\n margin-left: var(--narrowTrackMargin);\n}\n\n.BarSlider--narrowTrack.BarSlider--isHorizontal .Barslider-IndicatorLineWrapper,\n.BarSlider--narrowTrack.BarSlider--isHorizontal .BarSlider-MarkerWrapper {\n top: calc(50% - (var(--maxNarrowTrackIndicatorWidth) / 2));\n left: var(--maxNarrowTrackIndicatorWidth);\n height: var(--maxNarrowTrackIndicatorWidth);\n width: calc(100% - (var(--narrowTrackMargin) * 2));\n margin-bottom: var(--narrowTrackMargin);\n}\n\n.BarSlider--narrowTrack.BarSlider--isVertical .BarSlider-Track {\n height: 100%;\n max-height: 100%;\n width: var(--maxNarrowTrackWidth);\n min-height: var(--minVerticalHeight);\n max-width: var(--maxNarrowTrackWidth);\n}\n\n.BarSlider--narrowTrack.BarSlider--isHorizontal .BarSlider-Track {\n width: 100%;\n max-width: 100%;\n height: var(--maxNarrowTrackWidth);\n max-height: var(--maxNarrowTrackWidth);\n min-width: var(--minHorizontalWidth);\n}\n\n.BarSlider--narrowTrack.BarSlider--isVertical .BarSlider-IndicatorLine {\n max-width: var(--maxNarrowTrackIndicatorWidth);\n max-height: 100%;\n left: calc(50% - (var(--maxNarrowTrackIndicatorWidth) / 2));\n}\n\n.BarSlider--narrowTrack.BarSlider--isHorizontal .BarSlider-IndicatorLine {\n width: 100%;\n max-width: 100%;\n max-height: var(--maxNarrowTrackIndicatorWidth);\n top: calc(50% - (var(--maxNarrowTrackIndicatorWidth) / 2));\n /* left: var(--narrowTrackMargin);\n right: calc(100% - var(--narrowTrackMargin)); */\n}\n/* Wide variant */\n\n.BarSlider--wideTrack .BarSlider-Track {\n border-radius: 2px;\n}\n\n.BarSlider--wideTrack.BarSlider--isVertical .BarSlider-Track {\n min-height: var(--minVerticalHeight);\n}\n\n.BarSlider-Input {\n font-weight: bold;\n width: 100%;\n}\n.BarSlider-Input.includeValueInHeightIsTrue {\n}\n\n.BarSlider-Input.includeValueInHeightIsFalse {\n position: absolute;\n bottom: -1.7em;\n left: 0;\n right: 0;\n z-index: 10;\n}\n";
3371
+ styleInject(css_248z$6);
3372
+
3373
+ function _define_property$c(obj, key, value) {
2470
3374
  if (key in obj) {
2471
3375
  Object.defineProperty(obj, key, {
2472
3376
  value: value,
@@ -2479,7 +3383,7 @@ function _define_property$d(obj, key, value) {
2479
3383
  }
2480
3384
  return obj;
2481
3385
  }
2482
- function _object_spread$d(target) {
3386
+ function _object_spread$c(target) {
2483
3387
  for(var i = 1; i < arguments.length; i++){
2484
3388
  var source = arguments[i] != null ? arguments[i] : {};
2485
3389
  var ownKeys = Object.keys(source);
@@ -2489,7 +3393,7 @@ function _object_spread$d(target) {
2489
3393
  }));
2490
3394
  }
2491
3395
  ownKeys.forEach(function(key) {
2492
- _define_property$d(target, key, source[key]);
3396
+ _define_property$c(target, key, source[key]);
2493
3397
  });
2494
3398
  }
2495
3399
  return target;
@@ -2513,8 +3417,15 @@ function _object_spread_props$1(target, source) {
2513
3417
  }
2514
3418
  return target;
2515
3419
  }
2516
- function Slider(param) {
2517
- var _param_polarity = param.polarity, polarity = _param_polarity === void 0 ? Polarity.unipolar : _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, _param_isStandalone = param.isStandalone, isStandalone = _param_isStandalone === void 0 ? true : _param_isStandalone, className = param.className, id = param.id, onChange = param.onChange, style = param.style, _param_color = param.color, color = _param_color === void 0 ? 'var(--color-gray-500)' : _param_color, _param_trackColor = param.trackColor, trackColor = _param_trackColor === void 0 ? 'var(--bg-input)' : _param_trackColor, label = param.label, _param_mockInitialNormalisedValue = param.// Mocks the initial scaled value of the slider for web veiws outside of JUCE
3420
+ // Slider UI component.
3421
+ // Connects to Juce's Slider element.
3422
+ var BarSliderVariants = /*#__PURE__*/ function(BarSliderVariants) {
3423
+ BarSliderVariants["narrowTrack"] = "narrowTrack";
3424
+ BarSliderVariants["wideTrack"] = "wideTrack";
3425
+ return BarSliderVariants;
3426
+ }({});
3427
+ function Slider$1(param) {
3428
+ var _param_polarity = param.polarity, polarity = _param_polarity === void 0 ? Polarity.unipolar : _param_polarity, _param_orientation = param.orientation, orientation = _param_orientation === void 0 ? Orientation.vertical : _param_orientation, _param_dragOrientation = param.dragOrientation, dragOrientation = _param_dragOrientation === void 0 ? Orientation.vertical : _param_dragOrientation, _param_isRandomizable = param.isRandomizable, isRandomizable = _param_isRandomizable === void 0 ? false : _param_isRandomizable, _param_isStandalone = param.isStandalone, isStandalone = _param_isStandalone === void 0 ? true : _param_isStandalone, _param_isHighlighted = param.isHighlighted, isHighlighted = _param_isHighlighted === void 0 ? false : _param_isHighlighted, showValue = param.showValue, className = param.className, id = param.id, onChange = param.onChange, style = param.style, _param_indicatorLineColor = param.indicatorLineColor, indicatorLineColor = _param_indicatorLineColor === void 0 ? 'var(--color-brand)' : _param_indicatorLineColor, indicatorLineGradient = param.indicatorLineGradient, trackColor = param.trackColor, trackStrokeColor = param.trackStrokeColor, markerFillColor = param.markerFillColor, markerStrokeColor = param.markerStrokeColor, _param_barSliderVariant = param.barSliderVariant, barSliderVariant = _param_barSliderVariant === void 0 ? "narrowTrack" : _param_barSliderVariant, label = param.label, _param_includeValueInHeight = param.includeValueInHeight, includeValueInHeight = _param_includeValueInHeight === void 0 ? true : _param_includeValueInHeight, _param_mockInitialNormalisedValue = param.// Mocks the initial scaled value of the slider for web veiws outside of JUCE
2518
3429
  mockInitialNormalisedValue, mockInitialNormalisedValue = _param_mockInitialNormalisedValue === void 0 ? 0 : _param_mockInitialNormalisedValue, _param_mockProperties = param.mockProperties, mockProperties = _param_mockProperties === void 0 ? {
2519
3430
  start: 20.0,
2520
3431
  end: 15000.0,
@@ -2522,6 +3433,16 @@ function Slider(param) {
2522
3433
  skew: 0.7
2523
3434
  } : _param_mockProperties;
2524
3435
  var sliderElementRef = useRef(null);
3436
+ var isNarrowTrack = barSliderVariant === "narrowTrack";
3437
+ var isWideTrack = barSliderVariant === "wideTrack";
3438
+ var isHorizontal = orientation === Orientation.horizontal;
3439
+ var isVertical = orientation === Orientation.vertical;
3440
+ var defaultShowValueState = barSliderVariant === "narrowTrack" ? true : false;
3441
+ dragOrientation = isHorizontal ? Orientation.horizontal : orientation;
3442
+ var multiColorGradient = "linear-gradient(".concat(isHorizontal ? 'to right' : 'to top', ", var(--color-brand) 0%, var(--color-brand-secondary) 100%");
3443
+ var singleColorGradient = "linear-gradient(".concat(isHorizontal ? 'to right' : 'to top', ", var(--color-brand-700) 0%, var(--color-brand) 100%");
3444
+ var _obj;
3445
+ var selectedGradientMap = (_obj = {}, _define_property$c(_obj, GradientStyles.multicolor, multiColorGradient), _define_property$c(_obj, GradientStyles.unicolor, singleColorGradient), _obj);
2525
3446
  var _useSlider = useSlider({
2526
3447
  id: id,
2527
3448
  label: label,
@@ -2529,115 +3450,100 @@ function Slider(param) {
2529
3450
  mockInitialNormalisedValue: mockInitialNormalisedValue,
2530
3451
  onChange: onChange,
2531
3452
  isRandomizable: isRandomizable,
3453
+ orientation: orientation,
3454
+ dragOrientation: dragOrientation,
2532
3455
  sliderElementRef: sliderElementRef
2533
- }), // bindBarSliderDrag,
2534
- bindSequenceBarSliderDrag = _useSlider.bindSequenceBarSliderDrag, bindDrag = _useSlider.bindDrag, normalisedValue = _useSlider.normalisedValue;
2535
- var drag = isStandalone ? bindDrag : bindSequenceBarSliderDrag;
3456
+ }), bindBarSliderDrag = _useSlider.bindBarSliderDrag, bindSequenceBarSliderDrag = _useSlider.bindSequenceBarSliderDrag, // bindDrag,
3457
+ normalisedValue = _useSlider.normalisedValue, setNormalisedState = _useSlider.setNormalisedState, properties = _useSlider.properties;
3458
+ var drag = isStandalone ? bindBarSliderDrag : bindSequenceBarSliderDrag;
2536
3459
  return /*#__PURE__*/ React__default.createElement(Box, {
2537
3460
  flexDirection: Box.flexDirection.column,
2538
3461
  justifyContent: Box.justifyContent.center,
2539
- className: classnames(className),
2540
- flex: '1',
3462
+ className: classnames('BarSlider', isNarrowTrack && 'BarSlider--narrowTrack', isWideTrack && 'BarSlider--wideTrack', isVertical && 'BarSlider--isVertical', isHorizontal && 'BarSlider--isHorizontal', className),
2541
3463
  id: id,
2542
- ref: sliderElementRef
2543
- }, polarity === Polarity.bipolar && /*#__PURE__*/ React__default.createElement("div", {
3464
+ ref: sliderElementRef,
3465
+ gap: Box.gap.small,
3466
+ height: isVertical ? '100%' : 'auto',
3467
+ style: {
3468
+ position: 'relative'
3469
+ }
3470
+ }, ' ', label ? /*#__PURE__*/ React__default.createElement(Label, {
3471
+ fontSize: Label.fontSize.xSmall,
3472
+ value: label,
3473
+ color: "var(--color-text)"
3474
+ }) : null, polarity === Polarity.bipolar && /*#__PURE__*/ React__default.createElement("div", {
2544
3475
  className: 'Slider-center-marker'
2545
- }), /*#__PURE__*/ React__default.createElement("div", _object_spread_props$1(_object_spread$d({
2546
- className: classnames('Slider', 'Slider-bar')
3476
+ }), /*#__PURE__*/ React__default.createElement(Box, {
3477
+ padding: isNarrowTrack ? (showValue !== null && showValue !== void 0 ? showValue : defaultShowValueState) ? [
3478
+ Box.padding.mediumSmall,
3479
+ Box.padding.mediumSmall,
3480
+ Box.padding.none,
3481
+ Box.padding.mediumSmall
3482
+ ] : [
3483
+ Box.padding.mediumSmall
3484
+ ] : [
3485
+ Box.padding.none
3486
+ ],
3487
+ height: "100%"
3488
+ }, /*#__PURE__*/ React__default.createElement("div", _object_spread_props$1(_object_spread$c({
3489
+ className: classnames('BarSlider-Track', isHighlighted && 'isHighlighted')
2547
3490
  }, drag()), {
2548
3491
  // onMouseEnter={onMouseEnter}
2549
3492
  id: id,
2550
- style: _object_spread$d({
2551
- touchAction: 'none',
2552
- backgroundColor: trackColor,
2553
- position: 'relative',
2554
- minWidth: sliderOrientation === Orientation.horizontal ? '100px' : '20px',
2555
- minHeight: sliderOrientation === Orientation.horizontal ? '20px' : '75px'
3493
+ style: _object_spread$c({
3494
+ background: trackColor,
3495
+ stroke: trackStrokeColor ? "1px solid ".concat(trackStrokeColor) : 'none'
2556
3496
  }, style)
2557
- }), normalisedValue ? /*#__PURE__*/ React__default.createElement("div", {
3497
+ }), normalisedValue !== null && normalisedValue !== undefined ? /*#__PURE__*/ React__default.createElement("div", {
3498
+ className: "Barslider-IndicatorLineWrapper"
3499
+ }, /*#__PURE__*/ React__default.createElement("div", {
2558
3500
  // TODO: Why aren't the Tailwind classes working?
2559
- // className={classnames('h-full', 'w-full', 'absolute', 'bg-input')}
2560
- style: _object_spread$d({
2561
- position: 'absolute',
2562
- backgroundColor: color,
2563
- pointerEvents: 'none'
3501
+ // className={classnames('h-full', 'w-full', 'absolute', 'bg-panel')}
3502
+ className: "BarSlider-IndicatorLine",
3503
+ style: _object_spread$c({
3504
+ background: indicatorLineGradient ? selectedGradientMap[indicatorLineGradient] : indicatorLineColor,
3505
+ opacity: isStandalone || isHighlighted ? '100%' : '80%',
3506
+ top: "".concat(isHorizontal && isNarrowTrack && 'calc(50% - 3px)'),
3507
+ left: "".concat(isVertical && isNarrowTrack && 'calc(50% - 3px)')
2564
3508
  }, getBarTransformStyles({
2565
- orientation: sliderOrientation,
3509
+ orientation: orientation,
2566
3510
  polarity: polarity,
2567
3511
  normalisedValue: normalisedValue
2568
3512
  }))
2569
- }) : ''), label ? /*#__PURE__*/ React__default.createElement(Label, {
2570
- padding: [
2571
- Label.padding.mediumSmall
2572
- ],
2573
- fontSize: Label.fontSize.small,
2574
- value: label,
2575
- color: color
2576
- }) : null);
2577
- }
2578
- Slider.sliderType = SliderType;
2579
- Slider.sliderPolarity = Polarity;
2580
- Slider.sliderOrientation = Orientation;
2581
-
2582
- var HeadingTags = /*#__PURE__*/ function(HeadingTags) {
2583
- HeadingTags["h1"] = "h1";
2584
- HeadingTags["h2"] = "h2";
2585
- HeadingTags["h3"] = "h3";
2586
- HeadingTags["h4"] = "h4";
2587
- return HeadingTags;
2588
- }({});
2589
-
2590
- function _define_property$c(obj, key, value) {
2591
- if (key in obj) {
2592
- Object.defineProperty(obj, key, {
2593
- value: value,
2594
- enumerable: true,
2595
- configurable: true,
2596
- writable: true
2597
- });
2598
- } else {
2599
- obj[key] = value;
2600
- }
2601
- return obj;
2602
- }
2603
- function _object_spread$c(target) {
2604
- for(var i = 1; i < arguments.length; i++){
2605
- var source = arguments[i] != null ? arguments[i] : {};
2606
- var ownKeys = Object.keys(source);
2607
- if (typeof Object.getOwnPropertySymbols === "function") {
2608
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
2609
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
2610
- }));
3513
+ })) : '', isNarrowTrack ? /*#__PURE__*/ React__default.createElement("div", {
3514
+ className: "BarSlider-MarkerWrapper",
3515
+ style: {
3516
+ bottom: '2px'
2611
3517
  }
2612
- ownKeys.forEach(function(key) {
2613
- _define_property$c(target, key, source[key]);
2614
- });
2615
- }
2616
- return target;
2617
- }
2618
- function Heading(param) {
2619
- var value = param.value, id = param.id, className = param.className, style = param.style, _param_tag = param.tag, tag = _param_tag === void 0 ? HeadingTags.h1 : _param_tag, _param_padding = param.padding, padding = _param_padding === void 0 ? [
2620
- Spacing.none
2621
- ] : _param_padding, _param_fontSize = param.fontSize, fontSize = _param_fontSize === void 0 ? FontSizes.large : _param_fontSize, children = param.children;
2622
- var Tag = tag;
2623
- var _padding_, _padding_1, _padding_2, _ref;
2624
- return /*#__PURE__*/ React.createElement(Tag, {
3518
+ }, /*#__PURE__*/ React__default.createElement("div", {
3519
+ className: "BarSlider-Marker",
3520
+ style: {
3521
+ bottom: isVertical ? "calc(".concat(normalisedValue * 100, "% - 6px)") : '-6px',
3522
+ left: isHorizontal ? "calc(".concat(normalisedValue * 100, "% - 6px)") : '-6px'
3523
+ }
3524
+ }, /*#__PURE__*/ React__default.createElement(BarSliderMarker, {
3525
+ markerFillColor: markerFillColor,
3526
+ markerStrokeColor: markerStrokeColor,
3527
+ strokeWidth: 5
3528
+ }))) : null)), (showValue !== null && showValue !== void 0 ? showValue : defaultShowValueState) ? /*#__PURE__*/ React__default.createElement(Input, {
3529
+ className: "BarSlider-Input ".concat(includeValueInHeight ? 'includeValueInHeightIsTrue' : 'includeValueInHeightIsFalse'),
3530
+ value: normalisedValue,
2625
3531
  id: id,
2626
- style: _object_spread$c({
2627
- fontSize: "var(--text-".concat(fontSize),
2628
- paddingTop: "var(--p-".concat(padding[0], ")"),
2629
- paddingRight: "var(--p-".concat((_padding_ = padding[1]) !== null && _padding_ !== void 0 ? _padding_ : padding[0], ")"),
2630
- paddingBottom: "var(--p-".concat((_padding_1 = padding[2]) !== null && _padding_1 !== void 0 ? _padding_1 : padding[0], ")"),
2631
- paddingLeft: "var(--p-".concat((_ref = (_padding_2 = padding[3]) !== null && _padding_2 !== void 0 ? _padding_2 : padding[1]) !== null && _ref !== void 0 ? _ref : padding[0], ")"),
2632
- WebkitUserSelect: 'none',
2633
- userSelect: 'none'
2634
- }, style),
2635
- className: classnames('Heading', 'font-bold', 'select-none', "text-".concat(fontSize), className)
2636
- }, value ? value : children);
3532
+ min: (properties === null || properties === void 0 ? void 0 : properties.start) || 0,
3533
+ max: (properties === null || properties === void 0 ? void 0 : properties.end) || 0,
3534
+ type: Input.type.number,
3535
+ textColor: 'var(--bg-lv12)',
3536
+ style: {
3537
+ },
3538
+ textAlign: Input.textAlign.center,
3539
+ onComplete: function(value) {
3540
+ normalisedValue !== undefined && setNormalisedState(normalisedValue);
3541
+ }
3542
+ }) : null);
2637
3543
  }
2638
- Heading.fontSize = FontSizes;
2639
- Heading.tag = HeadingTags;
2640
- Heading.padding = Spacing;
3544
+ Slider$1.sliderType = SliderType;
3545
+ Slider$1.polarity = Polarity;
3546
+ Slider$1.orientation = Orientation;
2641
3547
 
2642
3548
  function _array_like_to_array$c(arr, len) {
2643
3549
  if (len == null || len > arr.length) len = arr.length;
@@ -2685,45 +3591,202 @@ function _unsupported_iterable_to_array$c(o, minLen) {
2685
3591
  if (n === "Map" || n === "Set") return Array.from(n);
2686
3592
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$c(o, minLen);
2687
3593
  }
2688
- // 20.0f, 15000.0f, 0.1f, 0.7f),800.0f
2689
- // ValueType rangeStart, ValueType rangeEnd, ValueType intervalValue, ValueType skewFactor, bool useSymmetricSkew=false)
2690
- var useIndicator = function(param) {
2691
- var id = param.id;
2692
- var isLocalhost = window.location.hostname === 'localhost';
2693
- var _useState = _sliced_to_array$c(useState(0), 2), isActive = _useState[0], setIsActive = _useState[1];
2694
- // Set the initial state
2695
- useEffect(function() {
2696
- if (!isLocalhost) {
2697
- var _Juce_getToggleState;
2698
- var toggleState = (_Juce_getToggleState = Juce.getToggleState(id)) === null || _Juce_getToggleState === void 0 ? void 0 : _Juce_getToggleState.value;
2699
- setIsActive(toggleState);
2700
- }
2701
- }, []);
2702
- // Update the local state when the ID changes
3594
+ var useCombobox = function(param) {
3595
+ var id = param.id, label = param.label, filter = param.filter; param.onChange; var _param_displayValInHeader = param.displayValInHeader, displayValInHeader = _param_displayValInHeader === void 0 ? true : _param_displayValInHeader, isDisabled = param.isDisabled;
3596
+ var _Object_values;
3597
+ var comboBoxState = Juce.getComboBoxState(id);
3598
+ var _useState = _sliced_to_array$c(useState(comboBoxState === null || comboBoxState === void 0 ? void 0 : comboBoxState.properties), 2), properties = _useState[0], setProperties = _useState[1];
3599
+ var _useState1 = _sliced_to_array$c(useState(0), 2), index = _useState1[0], setIndex = _useState1[1];
3600
+ var prevIndex = useRef(null);
3601
+ var nextIndex = useRef(null);
3602
+ var prevDragDirection = useRef(null);
3603
+ var _useGlobalContext = useGlobalContext(), highlightedItemChanged = _useGlobalContext.highlightedItemChanged, setModSlotRowTargetAsPreview = _useGlobalContext.setModSlotRowTargetAsPreview, _useGlobalContext_globalState = _useGlobalContext.globalState, automatableParamLabels = _useGlobalContext_globalState.automatableParamLabels, modSlotTargets = _useGlobalContext_globalState.modSlotTargets, modSlotPreview = _useGlobalContext_globalState.modSlotPreview;
3604
+ //TODO: Filter choices for subsequent rows
3605
+ // const availableChoices = properties?.choices;
2703
3606
  useEffect(function() {
2704
- var _Juce_getToggleState;
2705
- var toggleState = (_Juce_getToggleState = Juce.getToggleState(id)) === null || _Juce_getToggleState === void 0 ? void 0 : _Juce_getToggleState.value;
2706
- setIsActive(toggleState);
3607
+ setIndex(comboBoxState === null || comboBoxState === void 0 ? void 0 : comboBoxState.getChoiceIndex());
2707
3608
  }, [
2708
3609
  id
2709
3610
  ]);
2710
- // Sets up listeners to handle changes on the backend
2711
3611
  useEffect(function() {
2712
- var _toggleState_valueChangedEvent;
2713
- var toggleState = Juce.getToggleState(id);
2714
- var valueListenerId = toggleState === null || toggleState === void 0 ? void 0 : (_toggleState_valueChangedEvent = toggleState.valueChangedEvent) === null || _toggleState_valueChangedEvent === void 0 ? void 0 : _toggleState_valueChangedEvent.addListener(function() {
2715
- setIsActive(toggleState === null || toggleState === void 0 ? void 0 : toggleState.value);
3612
+ setProperties(comboBoxState === null || comboBoxState === void 0 ? void 0 : comboBoxState.properties);
3613
+ });
3614
+ useEffect(function() {
3615
+ if (modSlotPreview.slotId === id) {
3616
+ setIndex(modSlotPreview.targetIndex);
3617
+ }
3618
+ }, [
3619
+ modSlotTargets,
3620
+ modSlotPreview
3621
+ ]);
3622
+ useEffect(function() {
3623
+ var _comboBoxState_valueChangedEvent, _comboBoxState_propertiesChangedEvent;
3624
+ var valueListenerId = comboBoxState === null || comboBoxState === void 0 ? void 0 : (_comboBoxState_valueChangedEvent = comboBoxState.valueChangedEvent) === null || _comboBoxState_valueChangedEvent === void 0 ? void 0 : _comboBoxState_valueChangedEvent.addListener(function() {
3625
+ if ((comboBoxState === null || comboBoxState === void 0 ? void 0 : comboBoxState.getChoiceIndex()) !== prevIndex) {
3626
+ setIndex(comboBoxState === null || comboBoxState === void 0 ? void 0 : comboBoxState.getChoiceIndex());
3627
+ }
3628
+ });
3629
+ var propertiesListenerId = comboBoxState === null || comboBoxState === void 0 ? void 0 : (_comboBoxState_propertiesChangedEvent = comboBoxState.propertiesChangedEvent) === null || _comboBoxState_propertiesChangedEvent === void 0 ? void 0 : _comboBoxState_propertiesChangedEvent.addListener(function() {
3630
+ setProperties(comboBoxState === null || comboBoxState === void 0 ? void 0 : comboBoxState.properties);
2716
3631
  });
2717
3632
  return function cleanup() {
2718
- var _toggleState_valueChangedEvent;
2719
- toggleState === null || toggleState === void 0 ? void 0 : (_toggleState_valueChangedEvent = toggleState.valueChangedEvent) === null || _toggleState_valueChangedEvent === void 0 ? void 0 : _toggleState_valueChangedEvent.removeListener(valueListenerId);
3633
+ var _comboBoxState_valueChangedEvent, _comboBoxState_propertiesChangedEvent;
3634
+ comboBoxState === null || comboBoxState === void 0 ? void 0 : (_comboBoxState_valueChangedEvent = comboBoxState.valueChangedEvent) === null || _comboBoxState_valueChangedEvent === void 0 ? void 0 : _comboBoxState_valueChangedEvent.removeListener(valueListenerId);
3635
+ comboBoxState === null || comboBoxState === void 0 ? void 0 : (_comboBoxState_propertiesChangedEvent = comboBoxState.propertiesChangedEvent) === null || _comboBoxState_propertiesChangedEvent === void 0 ? void 0 : _comboBoxState_propertiesChangedEvent.removeListener(propertiesListenerId);
2720
3636
  };
3637
+ }, [
3638
+ window
3639
+ ]);
3640
+ var selectedChoices = (_Object_values = Object.values(modSlotTargets)) === null || _Object_values === void 0 ? void 0 : _Object_values.filter(function(item) {
3641
+ return item > 0;
3642
+ });
3643
+ var selectedLabels = automatableParamLabels === null || automatableParamLabels === void 0 ? void 0 : automatableParamLabels.filter(function(item, i) {
3644
+ return selectedChoices === null || selectedChoices === void 0 ? void 0 : selectedChoices.includes(i);
3645
+ });
3646
+ var displayedLabels = automatableParamLabels === null || automatableParamLabels === void 0 ? void 0 : automatableParamLabels.filter(function(item) {
3647
+ return !(selectedLabels === null || selectedLabels === void 0 ? void 0 : selectedLabels.includes(item)) || item === automatableParamLabels[index];
3648
+ });
3649
+ var filteredChoices = filter && (filter === null || filter === void 0 ? void 0 : filter.length) > 1 ? displayedLabels === null || displayedLabels === void 0 ? void 0 : displayedLabels.filter(function(item) {
3650
+ var _item_toLowerCase;
3651
+ return item === null || item === void 0 ? void 0 : (_item_toLowerCase = item.toLowerCase()) === null || _item_toLowerCase === void 0 ? void 0 : _item_toLowerCase.includes(filter === null || filter === void 0 ? void 0 : filter.toLowerCase());
3652
+ }) : displayedLabels;
3653
+ // const prevIndex = useRef<string | null>(null);
3654
+ // const handleChange = (newValue: number) => {
3655
+ // if (newValue !== prevIndex.current) {
3656
+ // // const juceIndex = automatableParamLabels?.indexOf(newValue);
3657
+ // // comboBoxState?.setChoiceIndex(newValue);s
3658
+ // setIndex(newValue);
3659
+ // // onChange && onChange(newValue);
3660
+ // // //@ts-expect-error
3661
+ // // window.__JUCE__.backend.emitEvent('undoableActionOccurred', {});
3662
+ // if (displayValInHeader) {
3663
+ // highlightedItemChanged({
3664
+ // label,
3665
+ // value: automatableParamLabels?.[newValue],
3666
+ // });
3667
+ // }
3668
+ // prevIndex.current = newValue;
3669
+ // }
3670
+ // };
3671
+ var incrementIndex = throttle(function() {
3672
+ nextIndex.current = index + 1;
3673
+ }, 100);
3674
+ var decrementIndex = throttle(function() {
3675
+ nextIndex.current = index - 1;
3676
+ }, 100);
3677
+ // Used in RotaryCombobox
3678
+ var bindDrag = useGesture({
3679
+ onDrag: function(param) {
3680
+ var direction = param.direction;
3681
+ //TODO: Move this out of useSlider
3682
+ if (id !== modSlotPreview.rowId) {
3683
+ setModSlotRowTargetAsPreview({
3684
+ paramId: id
3685
+ });
3686
+ }
3687
+ var directionY;
3688
+ if (direction[1] * -1 === 1 && directionY !== prevDragDirection.current) {
3689
+ directionY = 1;
3690
+ } else if (direction[1] * -1 === -1 && directionY !== prevDragDirection.current) {
3691
+ directionY = -1;
3692
+ }
3693
+ if (index < (properties === null || properties === void 0 ? void 0 : properties.choices.length) && directionY && directionY === 1) {
3694
+ incrementIndex();
3695
+ } else if (index > 0 && directionY && directionY === -1) {
3696
+ decrementIndex();
3697
+ }
3698
+ // console.log(nextIndex.current, 'nextIndexnextIndexnextIndex');
3699
+ if (nextIndex.current !== null && nextIndex.current !== undefined && nextIndex.current !== index.current) {
3700
+ comboBoxState === null || comboBoxState === void 0 ? void 0 : comboBoxState.setChoiceIndex(nextIndex.current);
3701
+ }
3702
+ }
3703
+ }, {
3704
+ enabled: !isDisabled
2721
3705
  });
3706
+ var onMouseEnter = function() {
3707
+ if (displayValInHeader) {
3708
+ highlightedItemChanged({
3709
+ label: label,
3710
+ value: automatableParamLabels === null || automatableParamLabels === void 0 ? void 0 : automatableParamLabels[index]
3711
+ });
3712
+ }
3713
+ };
3714
+ var onClick = function() {
3715
+ setModSlotRowTargetAsPreview({
3716
+ paramId: id
3717
+ });
3718
+ };
3719
+ var onDoubleClick = function() {
3720
+ setModSlotRowTargetAsPreview({
3721
+ paramId: id
3722
+ });
3723
+ };
2722
3724
  return {
2723
- isActive: isActive
3725
+ index: index,
3726
+ valueString: automatableParamLabels === null || automatableParamLabels === void 0 ? void 0 : automatableParamLabels[index],
3727
+ setIndex: setIndex,
3728
+ choices: properties === null || properties === void 0 ? void 0 : properties.choices,
3729
+ filteredChoices: filteredChoices,
3730
+ onMouseEnter: onMouseEnter,
3731
+ onClick: onClick,
3732
+ onDoubleClick: onDoubleClick,
3733
+ bindDrag: bindDrag
2724
3734
  };
2725
3735
  };
2726
3736
 
3737
+ // Rotary Slider UI component.
3738
+ // Connects to Juce's Slider element
3739
+ function RotaryCombobox(param) {
3740
+ var _param_polarity = param.polarity, polarity = _param_polarity === void 0 ? Polarity.unipolar : _param_polarity, label = param.label, className = param.className, id = param.id, trackWidth = param.trackWidth, // trackOffset,
3741
+ indicatorLineColor = param.indicatorLineColor, indicatorLineGradient = param.indicatorLineGradient, trackColor = param.trackColor, trackStrokeColor = param.trackStrokeColor, knobStrokeColor = param.knobStrokeColor, knobFillColor = param.knobFillColor, _param_size = param.size, size = _param_size === void 0 ? RotarySliderSizes.small : _param_size, markerShape = param.markerShape;
3742
+ var _useCombobox = useCombobox({
3743
+ id: id
3744
+ }), index = _useCombobox.index, choices = _useCombobox.choices, valueString = _useCombobox.valueString, onDoubleClick = _useCombobox.onDoubleClick, bindDrag = _useCombobox.bindDrag;
3745
+ return /*#__PURE__*/ React__default.createElement(ControlGroup, {
3746
+ id: id
3747
+ }, /*#__PURE__*/ React__default.createElement(Box, {
3748
+ className: "RotarySlider-wrapper",
3749
+ flexDirection: Box.flexDirection.column,
3750
+ gap: Box.gap.none,
3751
+ flex: "0 1 auto"
3752
+ }, label ? /*#__PURE__*/ React__default.createElement(Label, {
3753
+ padding: [
3754
+ Label.padding.none,
3755
+ Label.padding.none,
3756
+ Label.padding.small,
3757
+ Label.padding.none
3758
+ ],
3759
+ fontSize: Label.fontSize.xSmall,
3760
+ value: label
3761
+ }) : null, /*#__PURE__*/ React__default.createElement(RotaryCircle, {
3762
+ polarity: polarity,
3763
+ className: className,
3764
+ id: id,
3765
+ markerShape: markerShape,
3766
+ trackWidth: trackWidth,
3767
+ // trackOffset={trackOffset}
3768
+ sliderValue: scaledToNormalised({
3769
+ scaledValue: index,
3770
+ start: 0,
3771
+ end: choices.length - 1
3772
+ }),
3773
+ bindDrag: bindDrag,
3774
+ onDoubleClick: onDoubleClick,
3775
+ size: size,
3776
+ indicatorLineColor: indicatorLineColor,
3777
+ indicatorLineGradient: indicatorLineGradient,
3778
+ trackColor: trackColor,
3779
+ trackStrokeColor: trackStrokeColor,
3780
+ knobStrokeColor: knobStrokeColor,
3781
+ knobFillColor: knobFillColor
3782
+ }), /*#__PURE__*/ React__default.createElement(Label, {
3783
+ fontSize: Label.fontSize.xSmall
3784
+ }, valueString)));
3785
+ }
3786
+ RotaryCombobox.polarity = Polarity;
3787
+ RotaryCombobox.size = RotarySliderSizes;
3788
+ RotaryCombobox.markerShape = RotarySliderMarkerShapes;
3789
+
2727
3790
  function _define_property$b(obj, key, value) {
2728
3791
  if (key in obj) {
2729
3792
  Object.defineProperty(obj, key, {
@@ -2752,324 +3815,338 @@ function _object_spread$b(target) {
2752
3815
  }
2753
3816
  return target;
2754
3817
  }
2755
- function IndicatorLight(param) {
2756
- var className = param.className, label = param.label, color = param.color, style = param.style, id = param.id;
2757
- var isActive = useIndicator({
2758
- id: id
2759
- }).isActive;
2760
- return /*#__PURE__*/ React__default.createElement(Box, {
2761
- flexDirection: Box.flexDirection.column,
2762
- gap: Box.gap.small,
2763
- alignItems: Box.alignItems.center
2764
- }, /*#__PURE__*/ React__default.createElement("div", {
3818
+ // Rotary Slider UI component.
3819
+ // Connects to Juce's Slider element
3820
+ function PositioningWrapper(param) {
3821
+ var positionedElement = param.positionedElement, _param_top = param.top, top = _param_top === void 0 ? '0px' : _param_top, right = param.right, bottom = param.bottom, _param_left = param.left, left = _param_left === void 0 ? '0px' : _param_left, _param_margin = param.margin, margin = _param_margin === void 0 ? 0 : _param_margin, _param_height = param.height, height = _param_height === void 0 ? '100%' : _param_height, _param_width = param.width, width = _param_width === void 0 ? '100%' : _param_width, id = param.id, className = param.className, style = param.style, children = param.children;
3822
+ return /*#__PURE__*/ React__default.createElement("div", {
2765
3823
  id: id,
2766
- className: classnames('IndicatorLight', 'bg-input', className),
3824
+ className: className,
2767
3825
  style: _object_spread$b({
2768
- width: '12px',
2769
- height: '12px',
2770
- background: isActive ? color : ''
3826
+ position: 'relative',
3827
+ height: height,
3828
+ width: width,
3829
+ margin: margin
2771
3830
  }, style)
2772
- }), label ? /*#__PURE__*/ React__default.createElement(Label, {
2773
- value: label
2774
- }) : null);
3831
+ }, children, /*#__PURE__*/ React__default.createElement("div", {
3832
+ style: {
3833
+ position: 'absolute',
3834
+ top: top,
3835
+ right: right,
3836
+ bottom: bottom,
3837
+ left: left
3838
+ }
3839
+ }, positionedElement ? positionedElement : null));
2775
3840
  }
2776
3841
 
2777
- var css_248z$5 = ".IconButton:hover:not(:disabled) {\n filter: brightness(80%);\n}\n\n.IconButton svg {\n height: 100%;\n width: 100%;\n}\n";
2778
- styleInject(css_248z$5);
2779
-
2780
- function _define_property$a(obj, key, value) {
2781
- if (key in obj) {
2782
- Object.defineProperty(obj, key, {
2783
- value: value,
2784
- enumerable: true,
2785
- configurable: true,
2786
- writable: true
2787
- });
2788
- } else {
2789
- obj[key] = value;
2790
- }
2791
- return obj;
3842
+ function _array_like_to_array$b(arr, len) {
3843
+ if (len == null || len > arr.length) len = arr.length;
3844
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3845
+ return arr2;
3846
+ }
3847
+ function _array_with_holes$b(arr) {
3848
+ if (Array.isArray(arr)) return arr;
2792
3849
  }
2793
- function _object_spread$a(target) {
2794
- for(var i = 1; i < arguments.length; i++){
2795
- var source = arguments[i] != null ? arguments[i] : {};
2796
- var ownKeys = Object.keys(source);
2797
- if (typeof Object.getOwnPropertySymbols === "function") {
2798
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
2799
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
2800
- }));
3850
+ function _iterable_to_array_limit$b(arr, i) {
3851
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
3852
+ if (_i == null) return;
3853
+ var _arr = [];
3854
+ var _n = true;
3855
+ var _d = false;
3856
+ var _s, _e;
3857
+ try {
3858
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
3859
+ _arr.push(_s.value);
3860
+ if (i && _arr.length === i) break;
3861
+ }
3862
+ } catch (err) {
3863
+ _d = true;
3864
+ _e = err;
3865
+ } finally{
3866
+ try {
3867
+ if (!_n && _i["return"] != null) _i["return"]();
3868
+ } finally{
3869
+ if (_d) throw _e;
2801
3870
  }
2802
- ownKeys.forEach(function(key) {
2803
- _define_property$a(target, key, source[key]);
2804
- });
2805
3871
  }
2806
- return target;
3872
+ return _arr;
2807
3873
  }
2808
- var Icons = /*#__PURE__*/ function(Icons) {
2809
- Icons["undo"] = "Undo";
2810
- Icons["redo"] = "Redo";
2811
- Icons["random"] = "Random";
2812
- Icons["favorite"] = "Favorite";
2813
- Icons["up"] = "Up";
2814
- Icons["down"] = "Down";
2815
- Icons["save"] = "Save";
2816
- Icons["add"] = "Add";
2817
- Icons["delete"] = "Delete";
2818
- return Icons;
2819
- }({});
2820
- var Undo = function(param) {
2821
- var color = param.color, height = param.height;
2822
- return /*#__PURE__*/ React__default.createElement("svg", {
2823
- viewBox: "0 0 25 25",
2824
- "stroke-width": "1.5",
2825
- fill: "none",
2826
- xmlns: "http://www.w3.org/2000/svg",
2827
- color: color,
2828
- height: height,
2829
- width: height
2830
- }, /*#__PURE__*/ React__default.createElement("path", {
2831
- d: "M4.5 8C8.5 8 11 8 15 8C15 8 15 8 15 8C15 8 20 8 20 12.7059C20 18 15 18 15 18C11.5714 18 9.71429 18 6.28571 18",
2832
- stroke: color,
2833
- "stroke-width": "1.5",
2834
- "stroke-linecap": "round",
2835
- "stroke-linejoin": "round"
2836
- }), /*#__PURE__*/ React__default.createElement("path", {
2837
- d: "M7.5 11.5C6.13317 10.1332 5.36683 9.36683 4 8C5.36683 6.63317 6.13317 5.86683 7.5 4.5",
2838
- stroke: color,
2839
- "stroke-width": "1.5",
2840
- "stroke-linecap": "round",
2841
- "stroke-linejoin": "round"
2842
- }));
2843
- };
2844
- var Redo = function(param) {
2845
- var color = param.color, height = param.height;
2846
- return /*#__PURE__*/ React__default.createElement("svg", {
2847
- viewBox: "0 0 25 25",
2848
- "stroke-width": "1.5",
2849
- fill: "none",
2850
- xmlns: "http://www.w3.org/2000/svg",
2851
- color: color,
2852
- height: height,
2853
- width: height
2854
- }, /*#__PURE__*/ React__default.createElement("path", {
2855
- d: "M19.5 8C15.5 8 13 8 9 8C9 8 9 8 9 8C9 8 4 8 4 12.7059C4 18 9 18 9 18C12.4286 18 14.2857 18 17.7143 18",
2856
- stroke: color,
2857
- "stroke-width": "1.5",
2858
- "stroke-linecap": "round",
2859
- "stroke-linejoin": "round"
2860
- }), /*#__PURE__*/ React__default.createElement("path", {
2861
- d: "M16.5 11.5C17.8668 10.1332 18.6332 9.36683 20 8C18.6332 6.63317 17.8668 5.86683 16.5 4.5",
2862
- stroke: color,
2863
- "stroke-width": "1.5",
2864
- "stroke-linecap": "round",
2865
- "stroke-linejoin": "round"
2866
- }));
2867
- };
2868
- var Favorite = function(param) {
2869
- var color = param.color, height = param.height;
2870
- return /*#__PURE__*/ React__default.createElement("svg", {
2871
- "stroke-width": "1.5",
2872
- viewBox: "-7 -7 40 40",
2873
- fill: "none",
2874
- xmlns: "http://www.w3.org/2000/svg",
2875
- color: color,
2876
- height: height,
2877
- width: height
2878
- }, /*#__PURE__*/ React__default.createElement("path", {
2879
- d: "M22 8.86222C22 10.4087 21.4062 11.8941 20.3458 12.9929C17.9049 15.523 15.5374 18.1613 13.0053 20.5997C12.4249 21.1505 11.5042 21.1304 10.9488 20.5547L3.65376 12.9929C1.44875 10.7072 1.44875 7.01723 3.65376 4.73157C5.88044 2.42345 9.50794 2.42345 11.7346 4.73157L11.9998 5.00642L12.2648 4.73173C13.3324 3.6245 14.7864 3 16.3053 3C17.8242 3 19.2781 3.62444 20.3458 4.73157C21.4063 5.83045 22 7.31577 22 8.86222Z",
2880
- stroke: color,
2881
- "stroke-width": "1.5",
2882
- "stroke-linejoin": "round"
2883
- }));
2884
- };
2885
- var Up = function(param) {
2886
- var color = param.color, height = param.height;
2887
- return /*#__PURE__*/ React__default.createElement("svg", {
2888
- viewBox: "0 0 25 25",
2889
- "stroke-width": "1.5",
2890
- fill: "none",
2891
- xmlns: "http://www.w3.org/2000/svg",
2892
- color: color,
2893
- height: height,
2894
- width: height
2895
- }, /*#__PURE__*/ React__default.createElement("path", {
2896
- "fill-rule": "evenodd",
2897
- "clip-rule": "evenodd",
2898
- d: "M5.30711 15.287C5.4232 15.5673 5.69668 15.75 6.00002 15.75H18C18.3034 15.75 18.5768 15.5673 18.6929 15.287C18.809 15.0068 18.7449 14.6842 18.5304 14.4697L12.5304 8.46967C12.2375 8.17678 11.7626 8.17678 11.4697 8.46967L5.46969 14.4697C5.25519 14.6842 5.19103 15.0068 5.30711 15.287Z",
2899
- fill: color
2900
- }));
2901
- };
2902
- var Down = function(param) {
2903
- var color = param.color, height = param.height;
2904
- return /*#__PURE__*/ React__default.createElement("svg", {
2905
- viewBox: "0 0 25 25",
2906
- "stroke-width": "1.5",
2907
- fill: "none",
2908
- xmlns: "http://www.w3.org/2000/svg",
2909
- color: color,
2910
- height: height,
2911
- width: height
2912
- }, /*#__PURE__*/ React__default.createElement("path", {
2913
- "fill-rule": "evenodd",
2914
- "clip-rule": "evenodd",
2915
- d: "M5.30711 8.71299C5.4232 8.43273 5.69668 8.25 6.00002 8.25H18C18.3034 8.25 18.5768 8.43273 18.6929 8.71299C18.809 8.99324 18.7449 9.31583 18.5304 9.53033L12.5304 15.5303C12.2375 15.8232 11.7626 15.8232 11.4697 15.5303L5.46969 9.53033C5.25519 9.31583 5.19103 8.99324 5.30711 8.71299Z",
2916
- fill: color
2917
- }));
2918
- };
2919
- var Save = function(param) {
2920
- var color = param.color, height = param.height;
2921
- return /*#__PURE__*/ React__default.createElement("svg", {
2922
- "stroke-width": "1.5",
2923
- viewBox: "-7 -7 40 40",
2924
- fill: "none",
2925
- xmlns: "http://www.w3.org/2000/svg",
2926
- color: color,
2927
- height: height,
2928
- width: height
2929
- }, /*#__PURE__*/ React__default.createElement("path", {
2930
- d: "M3 19V5C3 3.89543 3.89543 3 5 3H16.1716C16.702 3 17.2107 3.21071 17.5858 3.58579L20.4142 6.41421C20.7893 6.78929 21 7.29799 21 7.82843V19C21 20.1046 20.1046 21 19 21H5C3.89543 21 3 20.1046 3 19Z",
2931
- stroke: color,
2932
- "stroke-width": "1.5"
2933
- }), /*#__PURE__*/ React__default.createElement("path", {
2934
- d: "M8.6 9H15.4C15.7314 9 16 8.73137 16 8.4V3.6C16 3.26863 15.7314 3 15.4 3H8.6C8.26863 3 8 3.26863 8 3.6V8.4C8 8.73137 8.26863 9 8.6 9Z",
2935
- stroke: color,
2936
- "stroke-width": "1.5"
2937
- }), /*#__PURE__*/ React__default.createElement("path", {
2938
- d: "M6 13.6V21H18V13.6C18 13.2686 17.7314 13 17.4 13H6.6C6.26863 13 6 13.2686 6 13.6Z",
2939
- stroke: color,
2940
- "stroke-width": "1.5"
2941
- }));
2942
- };
2943
- var Random = function(param) {
2944
- var color = param.color, height = param.height;
2945
- return /*#__PURE__*/ React__default.createElement("svg", {
2946
- viewBox: "0 0 25 25",
2947
- "stroke-width": "1.5",
2948
- fill: "none",
2949
- xmlns: "http://www.w3.org/2000/svg",
2950
- color: color,
2951
- height: height,
2952
- width: height
2953
- }, /*#__PURE__*/ React__default.createElement("path", {
2954
- d: "M11.7 1.1732C11.8856 1.06603 12.1144 1.06603 12.3 1.17321L21.2263 6.3268C21.4119 6.43397 21.5263 6.63205 21.5263 6.84641V17.1536C21.5263 17.3679 21.4119 17.566 21.2263 17.6732L12.3 22.8268C12.1144 22.934 11.8856 22.934 11.7 22.8268L2.77372 17.6732C2.58808 17.566 2.47372 17.3679 2.47372 17.1536V6.84641C2.47372 6.63205 2.58808 6.43397 2.77372 6.32679L11.7 1.1732Z",
2955
- stroke: color,
2956
- "stroke-width": "1.5",
2957
- "stroke-linecap": "round",
2958
- "stroke-linejoin": "round"
2959
- }), /*#__PURE__*/ React__default.createElement("path", {
2960
- d: "M17 15L7 15L12 7L17 15Z",
2961
- stroke: color,
2962
- "stroke-width": "1.5",
2963
- "stroke-linecap": "round",
2964
- "stroke-linejoin": "round"
2965
- }), /*#__PURE__*/ React__default.createElement("path", {
2966
- d: "M2.5 6.5L12 7",
2967
- stroke: color,
2968
- "stroke-width": "1.5",
2969
- "stroke-linejoin": "round"
2970
- }), /*#__PURE__*/ React__default.createElement("path", {
2971
- d: "M2.5 6.5L7 15",
2972
- stroke: color,
2973
- "stroke-width": "1.5",
2974
- "stroke-linejoin": "round"
2975
- }), /*#__PURE__*/ React__default.createElement("path", {
2976
- d: "M21.5 6.5L17 15",
2977
- stroke: color,
2978
- "stroke-width": "1.5",
2979
- "stroke-linejoin": "round"
2980
- }), /*#__PURE__*/ React__default.createElement("path", {
2981
- d: "M21.5 6.5L12 6.99995L12 1",
2982
- stroke: color,
2983
- "stroke-width": "1.5",
2984
- "stroke-linejoin": "round"
2985
- }), /*#__PURE__*/ React__default.createElement("path", {
2986
- d: "M21.5 17.5L17 15",
2987
- stroke: color,
2988
- "stroke-width": "1.5",
2989
- "stroke-linejoin": "round"
2990
- }), /*#__PURE__*/ React__default.createElement("path", {
2991
- d: "M2.5 17.5L7 15",
2992
- stroke: color,
2993
- "stroke-width": "1.5",
2994
- "stroke-linejoin": "round"
2995
- }), /*#__PURE__*/ React__default.createElement("path", {
2996
- d: "M7 15L12 23L17 15",
2997
- stroke: color,
2998
- "stroke-width": "1.5",
2999
- "stroke-linejoin": "round"
3000
- }));
3001
- };
3002
- var Add = function(param) {
3003
- var color = param.color, height = param.height;
3004
- return /*#__PURE__*/ React__default.createElement("svg", {
3005
- "stroke-width": "1.5",
3006
- viewBox: "0 0 24 24",
3007
- fill: "none",
3008
- xmlns: "http://www.w3.org/2000/svg",
3009
- color: color,
3010
- height: height,
3011
- width: height
3012
- }, /*#__PURE__*/ React__default.createElement("path", {
3013
- d: "M6 12H12M18 12H12M12 12V6M12 12V18",
3014
- stroke: color,
3015
- "stroke-width": "1.5",
3016
- "stroke-linecap": "round",
3017
- "stroke-linejoin": "round"
3018
- }));
3019
- };
3020
- var Delete = function(param) {
3021
- var color = param.color, height = param.height;
3022
- return /*#__PURE__*/ React__default.createElement("svg", {
3023
- viewBox: "0 0 24 24",
3024
- fill: "none",
3025
- xmlns: "http://www.w3.org/2000/svg",
3026
- color: color,
3027
- "stroke-width": "1.5",
3028
- height: height,
3029
- width: height
3030
- }, /*#__PURE__*/ React__default.createElement("path", {
3031
- "fill-rule": "evenodd",
3032
- "clip-rule": "evenodd",
3033
- 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",
3034
- fill: color
3035
- }));
3036
- };
3037
- var iconList = {
3038
- Undo: Undo,
3039
- Redo: Redo,
3040
- Random: Random,
3041
- Favorite: Favorite,
3042
- Up: Up,
3043
- Down: Down,
3044
- Save: Save,
3045
- Add: Add,
3046
- Delete: Delete
3874
+ function _non_iterable_rest$b() {
3875
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3876
+ }
3877
+ function _sliced_to_array$b(arr, i) {
3878
+ return _array_with_holes$b(arr) || _iterable_to_array_limit$b(arr, i) || _unsupported_iterable_to_array$b(arr, i) || _non_iterable_rest$b();
3879
+ }
3880
+ function _unsupported_iterable_to_array$b(o, minLen) {
3881
+ if (!o) return;
3882
+ if (typeof o === "string") return _array_like_to_array$b(o, minLen);
3883
+ var n = Object.prototype.toString.call(o).slice(8, -1);
3884
+ if (n === "Object" && o.constructor) n = o.constructor.name;
3885
+ if (n === "Map" || n === "Set") return Array.from(n);
3886
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$b(o, minLen);
3887
+ }
3888
+ // 20.0f, 15000.0f, 0.1f, 0.7f),800.0f
3889
+ // ValueType rangeStart, ValueType rangeEnd, ValueType intervalValue, ValueType skewFactor, bool useSymmetricSkew=false)
3890
+ var DataSource = /*#__PURE__*/ function(DataSource) {
3891
+ DataSource["sliderAttachment"] = "sliderAttachment";
3892
+ DataSource["buttonAttachment"] = "buttonAttachment";
3893
+ DataSource["event"] = "event";
3894
+ return DataSource;
3895
+ }({});
3896
+ var useIndicator = function(param) {
3897
+ var id = param.id, _param_dataSource = param.dataSource, dataSource = _param_dataSource === void 0 ? "buttonAttachment" : _param_dataSource;
3898
+ var isLocalhost = window.location.hostname === 'localhost';
3899
+ // This value should be a range from 0 to 1
3900
+ var _useState = _sliced_to_array$b(useState(0), 2), brightness = _useState[0], setBrightness = _useState[1];
3901
+ var updateState = function() {
3902
+ if (!isLocalhost && dataSource === "buttonAttachment") {
3903
+ var _Juce_getToggleState;
3904
+ var toggleState = (_Juce_getToggleState = Juce.getToggleState(id)) === null || _Juce_getToggleState === void 0 ? void 0 : _Juce_getToggleState.value;
3905
+ setBrightness(toggleState);
3906
+ } else if (!isLocalhost && dataSource === "sliderAttachment") {
3907
+ var sliderState = Juce.getSliderState(id);
3908
+ setBrightness(sliderState === null || sliderState === void 0 ? void 0 : sliderState.normalisedValue);
3909
+ }
3910
+ };
3911
+ // Set the initial state
3912
+ useEffect(function() {
3913
+ updateState();
3914
+ }, []);
3915
+ // Update the local state when the ID changes
3916
+ useEffect(function() {
3917
+ updateState();
3918
+ }, [
3919
+ id
3920
+ ]);
3921
+ // Sets up listeners to handle changes on the backend
3922
+ useEffect(function() {
3923
+ if (!isLocalhost && dataSource === "buttonAttachment") {
3924
+ var _toggleState_valueChangedEvent;
3925
+ var toggleState = Juce.getToggleState(id);
3926
+ var valueListenerId = toggleState === null || toggleState === void 0 ? void 0 : (_toggleState_valueChangedEvent = toggleState.valueChangedEvent) === null || _toggleState_valueChangedEvent === void 0 ? void 0 : _toggleState_valueChangedEvent.addListener(function() {
3927
+ setBrightness(toggleState);
3928
+ });
3929
+ return function cleanup() {
3930
+ var _toggleState_valueChangedEvent;
3931
+ toggleState === null || toggleState === void 0 ? void 0 : (_toggleState_valueChangedEvent = toggleState.valueChangedEvent) === null || _toggleState_valueChangedEvent === void 0 ? void 0 : _toggleState_valueChangedEvent.removeListener(valueListenerId);
3932
+ };
3933
+ } else if (!isLocalhost && dataSource === "sliderAttachment") {
3934
+ var _sliderState_valueChangedEvent;
3935
+ var sliderState = Juce.getSliderState(id);
3936
+ var valueListenerId1 = sliderState === null || sliderState === void 0 ? void 0 : (_sliderState_valueChangedEvent = sliderState.valueChangedEvent) === null || _sliderState_valueChangedEvent === void 0 ? void 0 : _sliderState_valueChangedEvent.addListener(function() {
3937
+ setBrightness(sliderState);
3938
+ });
3939
+ return function cleanup() {
3940
+ var _sliderState_valueChangedEvent;
3941
+ sliderState === null || sliderState === void 0 ? void 0 : (_sliderState_valueChangedEvent = sliderState.valueChangedEvent) === null || _sliderState_valueChangedEvent === void 0 ? void 0 : _sliderState_valueChangedEvent.removeListener(valueListenerId1);
3942
+ };
3943
+ } else if (!isLocalhost && dataSource === "event") {
3944
+ var getLFOOutdata = id && //@ts-expect-error
3945
+ window.__JUCE__.backend.addEventListener("".concat(id), function(event) {
3946
+ setBrightness(event);
3947
+ });
3948
+ return function cleanup() {
3949
+ //@ts-expect-error
3950
+ window.__JUCE__.backend.removeEventListener(getLFOOutdata);
3951
+ };
3952
+ } else {
3953
+ return;
3954
+ }
3955
+ });
3956
+ return {
3957
+ dataSource: dataSource,
3958
+ brightness: brightness
3959
+ };
3047
3960
  };
3048
- // const getViewBoxWidth = (width: string) => {
3049
- // const numericWidth = width.match(/\d+/)?.[0];
3050
- // return numericWidth !== undefined ? parseInt(numericWidth) : 24;
3051
- // };
3052
- function Icon(param) {
3053
- 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 ? [
3054
- Spacing.none
3055
- ] : _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;
3056
- var _$Icon = iconList[icon];
3961
+
3962
+ function _define_property$a(obj, key, value) {
3963
+ if (key in obj) {
3964
+ Object.defineProperty(obj, key, {
3965
+ value: value,
3966
+ enumerable: true,
3967
+ configurable: true,
3968
+ writable: true
3969
+ });
3970
+ } else {
3971
+ obj[key] = value;
3972
+ }
3973
+ return obj;
3974
+ }
3975
+ function _object_spread$a(target) {
3976
+ for(var i = 1; i < arguments.length; i++){
3977
+ var source = arguments[i] != null ? arguments[i] : {};
3978
+ var ownKeys = Object.keys(source);
3979
+ if (typeof Object.getOwnPropertySymbols === "function") {
3980
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
3981
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
3982
+ }));
3983
+ }
3984
+ ownKeys.forEach(function(key) {
3985
+ _define_property$a(target, key, source[key]);
3986
+ });
3987
+ }
3988
+ return target;
3989
+ }
3990
+ function IndicatorLight(param) {
3991
+ var id = param.id, className = param.className, label = param.label, dataSource = param.dataSource, _param_activeColor = param.activeColor, activeColor = _param_activeColor === void 0 ? 'var(--color-brand)' : _param_activeColor, _param_inactiveColor = param.inactiveColor, inactiveColor = _param_inactiveColor === void 0 ? 'var(--bg-lv1)' : _param_inactiveColor, _param_shape = param.shape, shape = _param_shape === void 0 ? "round" : _param_shape, style = param.style;
3992
+ var brightness = useIndicator({
3993
+ id: id,
3994
+ dataSource: dataSource
3995
+ }).brightness;
3057
3996
  return /*#__PURE__*/ React__default.createElement(Box, {
3058
- className: "Icon ".concat(className ? className : ''),
3059
- onClick: onClick,
3060
- padding: padding,
3997
+ flexDirection: Box.flexDirection.column,
3998
+ gap: Box.gap.small,
3999
+ alignItems: Box.alignItems.center,
4000
+ width: "auto"
4001
+ }, /*#__PURE__*/ React__default.createElement("div", {
3061
4002
  style: _object_spread$a({
3062
- width: width,
3063
- height: height
4003
+ position: 'relative',
4004
+ width: '12px',
4005
+ height: '12px',
4006
+ borderRadius: shape === "round" ? '100%' : 'initial',
4007
+ overflow: 'hidden'
3064
4008
  }, style)
3065
- }, /*#__PURE__*/ React__default.createElement(_$Icon, {
3066
- height: width,
3067
- color: disabled ? 'var(--color-gray-400)' : color
3068
- }));
4009
+ }, /*#__PURE__*/ React__default.createElement("div", {
4010
+ className: classnames('IndicatorLight-bg', 'bg-panel', className),
4011
+ style: {
4012
+ width: '12px',
4013
+ height: '12px',
4014
+ position: 'absolute',
4015
+ top: 0,
4016
+ right: 0,
4017
+ bottom: 0,
4018
+ left: 0,
4019
+ background: inactiveColor
4020
+ }
4021
+ }), /*#__PURE__*/ React__default.createElement("div", {
4022
+ className: classnames('IndicatorLight', 'bg-panel', className),
4023
+ style: {
4024
+ opacity: brightness,
4025
+ // transition: `opacity 500ms ease-in`,
4026
+ background: activeColor,
4027
+ position: 'absolute',
4028
+ width: '12px',
4029
+ height: '12px',
4030
+ top: 0,
4031
+ right: 0,
4032
+ bottom: 0,
4033
+ left: 0
4034
+ }
4035
+ })), label ? /*#__PURE__*/ React__default.createElement(Label, {
4036
+ value: label
4037
+ }) : null);
3069
4038
  }
3070
- Icon.icon = Icons;
3071
- Icon.padding = Spacing;
3072
- Icon.margin = Spacing;
4039
+ IndicatorLight.dataSource = DataSource;
4040
+
4041
+ // Rotary Slider UI component.
4042
+ // Connects to Juce's Slider element
4043
+ var SliderVariants = /*#__PURE__*/ function(SliderVariants) {
4044
+ SliderVariants["bar"] = "bar";
4045
+ SliderVariants["rotary"] = "rotary";
4046
+ SliderVariants["rotaryCombobox"] = "rotaryCombobox";
4047
+ return SliderVariants;
4048
+ }({});
4049
+ function Slider(param) {
4050
+ var _param_variant = param.variant, variant = _param_variant === void 0 ? "rotary" : _param_variant, _param_polarity = param.polarity, polarity = _param_polarity === void 0 ? Polarity.unipolar : _param_polarity, label = param.label, labelColor = param.labelColor, indicatorLineColor = param.indicatorLineColor, trackColor = param.trackColor, trackStrokeColor = param.trackStrokeColor, knobStrokeColor = param.knobStrokeColor, knobFillColor = param.knobFillColor, markerFillColor = param.markerFillColor, markerStrokeColor = param.markerStrokeColor, markerShape = param.markerShape, indicatorLineGradient = param.indicatorLineGradient, trackWidth = param.trackWidth, className = param.className, id = param.id, onChange = param.onChange, indicatorId = param.indicatorId, _param_size = param.size, size = _param_size === void 0 ? RotarySliderSizes.small : _param_size, _param_mockInitialNormalisedValue = param.// trackOffset = 0,
4051
+ mockInitialNormalisedValue, mockInitialNormalisedValue = _param_mockInitialNormalisedValue === void 0 ? 0 : _param_mockInitialNormalisedValue, barSliderVariant = param.barSliderVariant, showValue = param.showValue, includeValueInHeight = param.includeValueInHeight, isRandomizable = param.isRandomizable, rotationBehavior = param.rotationBehavior, orientation = param.orientation, dragOrientation = param.dragOrientation, isStandalone = param.isStandalone, isHighlighted = param.isHighlighted; param.mockProperties; param.style;
4052
+ var totalWidth = "".concat(rotarySliderSizeMap[size].width + 35, "px");
4053
+ var totalHeight = "calc(".concat(rotarySliderSizeMap[size].width, " + 1em + ").concat(label ? 1 : 0, "em)");
4054
+ return /*#__PURE__*/ React__default.createElement(React__default.Fragment, null, variant === "rotary" ? /*#__PURE__*/ React__default.createElement(PositioningWrapper, {
4055
+ top: '25%',
4056
+ left: '-8px',
4057
+ width: totalWidth,
4058
+ height: totalHeight,
4059
+ positionedElement: indicatorId ? /*#__PURE__*/ React__default.createElement(IndicatorLight, {
4060
+ id: indicatorId,
4061
+ dataSource: IndicatorLight.dataSource.event
4062
+ }) : null
4063
+ }, /*#__PURE__*/ React__default.createElement(RotarySlider, {
4064
+ polarity: polarity,
4065
+ label: label,
4066
+ labelColor: labelColor,
4067
+ trackWidth: trackWidth,
4068
+ indicatorLineColor: indicatorLineColor,
4069
+ indicatorLineGradient: indicatorLineGradient,
4070
+ // trackOffset={trackOffset}
4071
+ markerShape: markerShape,
4072
+ trackColor: trackColor,
4073
+ trackStrokeColor: trackStrokeColor,
4074
+ knobStrokeColor: knobStrokeColor,
4075
+ knobFillColor: knobFillColor,
4076
+ className: className,
4077
+ id: id,
4078
+ onChange: onChange,
4079
+ size: size,
4080
+ mockInitialNormalisedValue: mockInitialNormalisedValue,
4081
+ isRandomizable: isRandomizable,
4082
+ rotationBehavior: rotationBehavior
4083
+ })) : null, variant === "rotaryCombobox" ? /*#__PURE__*/ React__default.createElement(PositioningWrapper, {
4084
+ top: '25%',
4085
+ left: '-8px',
4086
+ width: totalWidth,
4087
+ height: totalHeight,
4088
+ positionedElement: indicatorId ? /*#__PURE__*/ React__default.createElement(IndicatorLight, {
4089
+ id: indicatorId,
4090
+ dataSource: IndicatorLight.dataSource.event
4091
+ }) : null
4092
+ }, /*#__PURE__*/ React__default.createElement(RotaryCombobox, {
4093
+ polarity: polarity,
4094
+ label: label,
4095
+ labelColor: labelColor,
4096
+ trackWidth: trackWidth,
4097
+ indicatorLineColor: indicatorLineColor,
4098
+ indicatorLineGradient: indicatorLineGradient,
4099
+ // trackOffset={trackOffset}
4100
+ markerShape: markerShape,
4101
+ trackColor: trackColor,
4102
+ trackStrokeColor: trackStrokeColor,
4103
+ knobStrokeColor: knobStrokeColor,
4104
+ knobFillColor: knobFillColor,
4105
+ className: className,
4106
+ id: id,
4107
+ onChange: onChange,
4108
+ size: size,
4109
+ mockInitialNormalisedValue: mockInitialNormalisedValue,
4110
+ isRandomizable: isRandomizable,
4111
+ rotationBehavior: rotationBehavior
4112
+ })) : null, variant === "bar" ? /*#__PURE__*/ React__default.createElement(Slider$1, {
4113
+ polarity: polarity,
4114
+ label: label,
4115
+ indicatorLineColor: indicatorLineColor,
4116
+ indicatorLineGradient: indicatorLineGradient,
4117
+ trackColor: trackColor,
4118
+ trackStrokeColor: trackStrokeColor,
4119
+ markerFillColor: markerFillColor,
4120
+ markerStrokeColor: markerStrokeColor,
4121
+ className: className,
4122
+ barSliderVariant: barSliderVariant,
4123
+ showValue: showValue,
4124
+ id: id,
4125
+ onChange: onChange,
4126
+ mockInitialNormalisedValue: mockInitialNormalisedValue,
4127
+ isRandomizable: isRandomizable,
4128
+ orientation: orientation,
4129
+ dragOrientation: dragOrientation,
4130
+ isStandalone: isStandalone,
4131
+ isHighlighted: isHighlighted,
4132
+ includeValueInHeight: includeValueInHeight
4133
+ }) : null);
4134
+ }
4135
+ Slider.polarity = Polarity;
4136
+ Slider.size = RotarySliderSizes;
4137
+ Slider.variant = SliderVariants;
4138
+ Slider.barSliderVariant = BarSliderVariants;
4139
+ Slider.orientation = Orientation;
4140
+ Slider.markerShape = RotarySliderMarkerShapes;
4141
+ Slider.gradientStyles = GradientStyles;
4142
+
4143
+ var HeadingTags = /*#__PURE__*/ function(HeadingTags) {
4144
+ HeadingTags["h1"] = "h1";
4145
+ HeadingTags["h2"] = "h2";
4146
+ HeadingTags["h3"] = "h3";
4147
+ HeadingTags["h4"] = "h4";
4148
+ return HeadingTags;
4149
+ }({});
3073
4150
 
3074
4151
  function _define_property$9(obj, key, value) {
3075
4152
  if (key in obj) {
@@ -3099,33 +4176,32 @@ function _object_spread$9(target) {
3099
4176
  }
3100
4177
  return target;
3101
4178
  }
3102
- function IconButton(param) {
3103
- 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 ? [
3104
- Button.padding.none
3105
- ] : _param_padding, _param_margin = param.margin, margin = _param_margin === void 0 ? [
3106
- Button.margin.none
3107
- ] : _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;
3108
- var Icon = iconList[icon];
3109
- return /*#__PURE__*/ React__default.createElement(Button, {
4179
+ function Heading(param) {
4180
+ var value = param.value, id = param.id, className = param.className, style = param.style, _param_removeLineHeight = param.removeLineHeight, removeLineHeight = _param_removeLineHeight === void 0 ? false : _param_removeLineHeight, _param_color = param.color, color = _param_color === void 0 ? 'var(--color-text)' : _param_color, _param_tag = param.tag, tag = _param_tag === void 0 ? HeadingTags.h1 : _param_tag, _param_padding = param.padding, padding = _param_padding === void 0 ? [
4181
+ Spacing.none
4182
+ ] : _param_padding, _param_fontSize = param.fontSize, fontSize = _param_fontSize === void 0 ? FontSizes.large : _param_fontSize, children = param.children;
4183
+ var Tag = tag;
4184
+ var _padding_, _padding_1, _padding_2, _ref;
4185
+ return /*#__PURE__*/ React.createElement(Tag, {
3110
4186
  id: id,
3111
- className: "IconButton ".concat(className ? className : ''),
3112
- onClick: onClick,
3113
- padding: padding,
3114
- margin: margin,
3115
- disabled: disabled,
3116
4187
  style: _object_spread$9({
3117
- backgroundColor: backgroundColor,
3118
- width: width,
3119
- height: height
3120
- }, style)
3121
- }, /*#__PURE__*/ React__default.createElement(Icon, {
3122
- height: height,
3123
- color: disabled ? 'var(--color-gray-400)' : color
3124
- }));
4188
+ fontSize: "var(--text-".concat(fontSize),
4189
+ paddingTop: "var(--p-".concat(padding[0], ")"),
4190
+ paddingRight: "var(--p-".concat((_padding_ = padding[1]) !== null && _padding_ !== void 0 ? _padding_ : padding[0], ")"),
4191
+ paddingBottom: "var(--p-".concat((_padding_1 = padding[2]) !== null && _padding_1 !== void 0 ? _padding_1 : padding[0], ")"),
4192
+ paddingLeft: "var(--p-".concat((_ref = (_padding_2 = padding[3]) !== null && _padding_2 !== void 0 ? _padding_2 : padding[1]) !== null && _ref !== void 0 ? _ref : padding[0], ")"),
4193
+ WebkitUserSelect: 'none',
4194
+ userSelect: 'none',
4195
+ letterSpacing: '1px',
4196
+ lineHeight: removeLineHeight ? '.75em' : 'auto',
4197
+ color: color
4198
+ }, style),
4199
+ className: classnames('Heading', 'font-bold', 'select-none', "text-".concat(fontSize), className)
4200
+ }, value ? value : children);
3125
4201
  }
3126
- IconButton.icon = Icons;
3127
- IconButton.padding = Spacing;
3128
- IconButton.margin = Spacing;
4202
+ Heading.fontSize = FontSizes;
4203
+ Heading.tag = HeadingTags;
4204
+ Heading.padding = Spacing;
3129
4205
 
3130
4206
  function _define_property$8(obj, key, value) {
3131
4207
  if (key in obj) {
@@ -3178,10 +4254,11 @@ function KeyValueDisplayScreen(param) {
3178
4254
  Box.padding.xSmall,
3179
4255
  Box.padding.medium
3180
4256
  ],
4257
+ height: "30px",
3181
4258
  className: classnames('KeyValueDisplayScreen', 'uppercase', 'bg-popover', 'rounded-sm'),
3182
4259
  style: {
3183
4260
  maxWidth: '250px',
3184
- backgroundColor: "var(--bg-page)",
4261
+ backgroundColor: "var(--bg-lv1)",
3185
4262
  color: "var(--color-text)"
3186
4263
  }
3187
4264
  }, /*#__PURE__*/ React__default.createElement(Label, {
@@ -3274,15 +4351,15 @@ function LinePlot(param) {
3274
4351
  })) : null);
3275
4352
  }
3276
4353
 
3277
- var css_248z$4 = ".Oscilloscope {\n background: #0EAC8B;\n box-shadow: inset 0 0 20px #086350;\n height: 200px;\n };";
3278
- styleInject(css_248z$4);
4354
+ var css_248z$5 = ".Oscilloscope {\n background: #0EAC8B;\n box-shadow: inset 0 0 20px #086350;\n height: 200px;\n };";
4355
+ styleInject(css_248z$5);
3279
4356
 
3280
- function _array_like_to_array$b(arr, len) {
4357
+ function _array_like_to_array$a(arr, len) {
3281
4358
  if (len == null || len > arr.length) len = arr.length;
3282
4359
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3283
4360
  return arr2;
3284
4361
  }
3285
- function _array_with_holes$b(arr) {
4362
+ function _array_with_holes$a(arr) {
3286
4363
  if (Array.isArray(arr)) return arr;
3287
4364
  }
3288
4365
  function _define_property$7(obj, key, value) {
@@ -3298,7 +4375,7 @@ function _define_property$7(obj, key, value) {
3298
4375
  }
3299
4376
  return obj;
3300
4377
  }
3301
- function _iterable_to_array_limit$b(arr, i) {
4378
+ function _iterable_to_array_limit$a(arr, i) {
3302
4379
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
3303
4380
  if (_i == null) return;
3304
4381
  var _arr = [];
@@ -3322,7 +4399,7 @@ function _iterable_to_array_limit$b(arr, i) {
3322
4399
  }
3323
4400
  return _arr;
3324
4401
  }
3325
- function _non_iterable_rest$b() {
4402
+ function _non_iterable_rest$a() {
3326
4403
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3327
4404
  }
3328
4405
  function _object_spread$7(target) {
@@ -3340,20 +4417,20 @@ function _object_spread$7(target) {
3340
4417
  }
3341
4418
  return target;
3342
4419
  }
3343
- function _sliced_to_array$b(arr, i) {
3344
- return _array_with_holes$b(arr) || _iterable_to_array_limit$b(arr, i) || _unsupported_iterable_to_array$b(arr, i) || _non_iterable_rest$b();
4420
+ function _sliced_to_array$a(arr, i) {
4421
+ return _array_with_holes$a(arr) || _iterable_to_array_limit$a(arr, i) || _unsupported_iterable_to_array$a(arr, i) || _non_iterable_rest$a();
3345
4422
  }
3346
- function _unsupported_iterable_to_array$b(o, minLen) {
4423
+ function _unsupported_iterable_to_array$a(o, minLen) {
3347
4424
  if (!o) return;
3348
- if (typeof o === "string") return _array_like_to_array$b(o, minLen);
4425
+ if (typeof o === "string") return _array_like_to_array$a(o, minLen);
3349
4426
  var n = Object.prototype.toString.call(o).slice(8, -1);
3350
4427
  if (n === "Object" && o.constructor) n = o.constructor.name;
3351
4428
  if (n === "Map" || n === "Set") return Array.from(n);
3352
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$b(o, minLen);
4429
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$a(o, minLen);
3353
4430
  }
3354
4431
  function Oscilloscope(param) {
3355
4432
  var width = param.width, height = param.height, className = param.className, style = param.style, id = param.id;
3356
- var _useState = _sliced_to_array$b(useState([]), 2), viewData = _useState[0], setViewData = _useState[1];
4433
+ var _useState = _sliced_to_array$a(useState([]), 2), viewData = _useState[0], setViewData = _useState[1];
3357
4434
  var cycleLength = useRef(0);
3358
4435
  useEffect(function() {
3359
4436
  //@ts-expect-error
@@ -3391,18 +4468,18 @@ function Oscilloscope(param) {
3391
4468
  }));
3392
4469
  }
3393
4470
 
3394
- 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 max-height: 64px;\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";
3395
- styleInject(css_248z$3);
4471
+ var css_248z$4 = "@import '../../styles.css';\n.ModuleHeader {\n background-color: var(--bg-lv3);\n font-weight: normal;\n font-family: var(--font-leagueSpartan);\n max-height: 64px;\n}\n\n/* TODO: Use Tailwind classes */\n#advancedLayoutButton {\n background-color: var(--bg-lv1);\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";
4472
+ styleInject(css_248z$4);
3396
4473
 
3397
- 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";
3398
- styleInject(css_248z$2);
4474
+ var css_248z$3 = ".PresetManagerContainer {\n width: 100%;\n height: 100%;\n background-color: var(--bg-lv1);\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-lv5);\n}\n\n.PresetManagerPanel:focus,\n.PresetManagerPanel:focus-visible {\n outline: none;\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";
4475
+ styleInject(css_248z$3);
3399
4476
 
3400
- function _array_like_to_array$a(arr, len) {
4477
+ function _array_like_to_array$9(arr, len) {
3401
4478
  if (len == null || len > arr.length) len = arr.length;
3402
4479
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3403
4480
  return arr2;
3404
4481
  }
3405
- function _array_with_holes$a(arr) {
4482
+ function _array_with_holes$9(arr) {
3406
4483
  if (Array.isArray(arr)) return arr;
3407
4484
  }
3408
4485
  function asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, key, arg) {
@@ -3434,7 +4511,7 @@ function _async_to_generator$3(fn) {
3434
4511
  });
3435
4512
  };
3436
4513
  }
3437
- function _iterable_to_array_limit$a(arr, i) {
4514
+ function _iterable_to_array_limit$9(arr, i) {
3438
4515
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
3439
4516
  if (_i == null) return;
3440
4517
  var _arr = [];
@@ -3458,23 +4535,23 @@ function _iterable_to_array_limit$a(arr, i) {
3458
4535
  }
3459
4536
  return _arr;
3460
4537
  }
3461
- function _non_iterable_rest$a() {
4538
+ function _non_iterable_rest$9() {
3462
4539
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3463
4540
  }
3464
4541
  function _object_destructuring_empty(o) {
3465
4542
  if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o);
3466
4543
  return o;
3467
4544
  }
3468
- function _sliced_to_array$a(arr, i) {
3469
- return _array_with_holes$a(arr) || _iterable_to_array_limit$a(arr, i) || _unsupported_iterable_to_array$a(arr, i) || _non_iterable_rest$a();
4545
+ function _sliced_to_array$9(arr, i) {
4546
+ return _array_with_holes$9(arr) || _iterable_to_array_limit$9(arr, i) || _unsupported_iterable_to_array$9(arr, i) || _non_iterable_rest$9();
3470
4547
  }
3471
- function _unsupported_iterable_to_array$a(o, minLen) {
4548
+ function _unsupported_iterable_to_array$9(o, minLen) {
3472
4549
  if (!o) return;
3473
- if (typeof o === "string") return _array_like_to_array$a(o, minLen);
4550
+ if (typeof o === "string") return _array_like_to_array$9(o, minLen);
3474
4551
  var n = Object.prototype.toString.call(o).slice(8, -1);
3475
4552
  if (n === "Object" && o.constructor) n = o.constructor.name;
3476
4553
  if (n === "Map" || n === "Set") return Array.from(n);
3477
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$a(o, minLen);
4554
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$9(o, minLen);
3478
4555
  }
3479
4556
  function _ts_generator$3(thisArg, body) {
3480
4557
  var f, y, t, _ = {
@@ -3569,16 +4646,16 @@ function _ts_generator$3(thisArg, body) {
3569
4646
  }
3570
4647
  function PresetManager(param) {
3571
4648
  _object_destructuring_empty(param);
3572
- var _useState = _sliced_to_array$a(useState([]), 2), presetList = _useState[0], setPresetList = _useState[1];
3573
- var _useState1 = _sliced_to_array$a(useState(false), 2); _useState1[0]; var setIsSaving = _useState1[1];
4649
+ var _useState = _sliced_to_array$9(useState([]), 2), presetList = _useState[0], setPresetList = _useState[1];
4650
+ var _useState1 = _sliced_to_array$9(useState(false), 2); _useState1[0]; var setIsSaving = _useState1[1];
3574
4651
  var savePresetFunc = Juce.getNativeFunction('savePreset');
3575
4652
  var loadPresetFunc = Juce.getNativeFunction('loadPreset');
3576
4653
  var getAllPresetsFunc = Juce.getNativeFunction('getAllPresets');
3577
4654
  var getCurrentPresetFunc = Juce.getNativeFunction('getCurrentPreset');
3578
4655
  var isDirtyFunc = Juce.getNativeFunction('canUndo');
3579
- var _useState2 = _sliced_to_array$a(useState(), 2), selectedPreset = _useState2[0], setSelectedPreset = _useState2[1];
4656
+ var _useState2 = _sliced_to_array$9(useState(), 2), selectedPreset = _useState2[0], setSelectedPreset = _useState2[1];
3580
4657
  var isLocalhost = window.location.hostname === 'localhost';
3581
- var _useState3 = _sliced_to_array$a(useState(false), 2), isDirty = _useState3[0], setIsDirty = _useState3[1];
4658
+ var _useState3 = _sliced_to_array$9(useState(false), 2), isDirty = _useState3[0], setIsDirty = _useState3[1];
3582
4659
  useEffect(function() {
3583
4660
  if (!isLocalhost) {
3584
4661
  var isDirtyListenerId = //@ts-expect-error
@@ -3766,10 +4843,10 @@ function PresetManager(param) {
3766
4843
  Box.padding.medium
3767
4844
  ],
3768
4845
  height: "30px",
3769
- className: "uppercase bg-popover rounded-sm PresetManagerContainer",
4846
+ className: "uppercase bg-panel rounded-sm PresetManagerContainer",
3770
4847
  style: {
3771
4848
  maxWidth: '325px',
3772
- backgroundColor: "var(--bg-page)",
4849
+ backgroundColor: "var(--bg-lv1)",
3773
4850
  color: "var(--color-text)"
3774
4851
  }
3775
4852
  }, /*#__PURE__*/ React__default.createElement(Listbox, null, /*#__PURE__*/ React__default.createElement(Listbox.Button, {
@@ -3804,10 +4881,11 @@ function PresetManager(param) {
3804
4881
  fontSize: Label.fontSize.large,
3805
4882
  className: 'PresetManagerButtonLabel'
3806
4883
  }, selectedPreset)))), /*#__PURE__*/ React__default.createElement(Box, {
3807
- flex: "0"
4884
+ flex: "0",
4885
+ gap: Box.gap.mediumSmall
3808
4886
  }, /*#__PURE__*/ React__default.createElement(IconButton, {
3809
4887
  id: "previousPreset",
3810
- width: "20px",
4888
+ width: "12px",
3811
4889
  icon: IconButton.icon.up,
3812
4890
  onClick: function(e) {
3813
4891
  e.preventDefault();
@@ -3815,7 +4893,7 @@ function PresetManager(param) {
3815
4893
  }
3816
4894
  }), /*#__PURE__*/ React__default.createElement(IconButton, {
3817
4895
  id: "nextPreset",
3818
- width: "20px",
4896
+ width: "12px",
3819
4897
  icon: IconButton.icon.down,
3820
4898
  onClick: function(e) {
3821
4899
  e.preventDefault();
@@ -3855,12 +4933,12 @@ function PresetManager(param) {
3855
4933
  }))))));
3856
4934
  }
3857
4935
 
3858
- function _array_like_to_array$9(arr, len) {
4936
+ function _array_like_to_array$8(arr, len) {
3859
4937
  if (len == null || len > arr.length) len = arr.length;
3860
4938
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3861
4939
  return arr2;
3862
4940
  }
3863
- function _array_with_holes$9(arr) {
4941
+ function _array_with_holes$8(arr) {
3864
4942
  if (Array.isArray(arr)) return arr;
3865
4943
  }
3866
4944
  function asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, key, arg) {
@@ -3905,7 +4983,7 @@ function _define_property$6(obj, key, value) {
3905
4983
  }
3906
4984
  return obj;
3907
4985
  }
3908
- function _iterable_to_array_limit$9(arr, i) {
4986
+ function _iterable_to_array_limit$8(arr, i) {
3909
4987
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
3910
4988
  if (_i == null) return;
3911
4989
  var _arr = [];
@@ -3929,7 +5007,7 @@ function _iterable_to_array_limit$9(arr, i) {
3929
5007
  }
3930
5008
  return _arr;
3931
5009
  }
3932
- function _non_iterable_rest$9() {
5010
+ function _non_iterable_rest$8() {
3933
5011
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3934
5012
  }
3935
5013
  function _object_spread$6(target) {
@@ -3947,16 +5025,16 @@ function _object_spread$6(target) {
3947
5025
  }
3948
5026
  return target;
3949
5027
  }
3950
- function _sliced_to_array$9(arr, i) {
3951
- return _array_with_holes$9(arr) || _iterable_to_array_limit$9(arr, i) || _unsupported_iterable_to_array$9(arr, i) || _non_iterable_rest$9();
3952
- }
3953
- function _unsupported_iterable_to_array$9(o, minLen) {
5028
+ function _sliced_to_array$8(arr, i) {
5029
+ return _array_with_holes$8(arr) || _iterable_to_array_limit$8(arr, i) || _unsupported_iterable_to_array$8(arr, i) || _non_iterable_rest$8();
5030
+ }
5031
+ function _unsupported_iterable_to_array$8(o, minLen) {
3954
5032
  if (!o) return;
3955
- if (typeof o === "string") return _array_like_to_array$9(o, minLen);
5033
+ if (typeof o === "string") return _array_like_to_array$8(o, minLen);
3956
5034
  var n = Object.prototype.toString.call(o).slice(8, -1);
3957
5035
  if (n === "Object" && o.constructor) n = o.constructor.name;
3958
5036
  if (n === "Map" || n === "Set") return Array.from(n);
3959
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$9(o, minLen);
5037
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
3960
5038
  }
3961
5039
  function _ts_generator$2(thisArg, body) {
3962
5040
  var f, y, t, _ = {
@@ -4139,8 +5217,8 @@ function ModuleHeader(param) {
4139
5217
  }, [
4140
5218
  window
4141
5219
  ]);
4142
- var _useState = _sliced_to_array$9(useState(false), 2), canUndo = _useState[0], setCanUndo = _useState[1];
4143
- var _useState1 = _sliced_to_array$9(useState(false), 2), canRedo = _useState1[0], setCanRedo = _useState1[1];
5220
+ var _useState = _sliced_to_array$8(useState(false), 2), canUndo = _useState[0], setCanUndo = _useState[1];
5221
+ var _useState1 = _sliced_to_array$8(useState(false), 2), canRedo = _useState1[0], setCanRedo = _useState1[1];
4144
5222
  var handleUndo = function() {
4145
5223
  undo();
4146
5224
  };
@@ -4306,6 +5384,7 @@ function ModuleHeader(param) {
4306
5384
  Box.padding.large
4307
5385
  ],
4308
5386
  className: classnames('ModuleHeader', className),
5387
+ height: "72px",
4309
5388
  style: _object_spread$6({}, style)
4310
5389
  }, /*#__PURE__*/ React__default.createElement(Box, {
4311
5390
  style: {
@@ -4335,6 +5414,8 @@ function ModuleHeader(param) {
4335
5414
  width: "30px",
4336
5415
  height: "30px",
4337
5416
  icon: IconButton.icon.undo,
5417
+ iconWidth: "20px",
5418
+ backgroundColor: 'var(--bg-lv1)',
4338
5419
  padding: [
4339
5420
  IconButton.padding.none,
4340
5421
  IconButton.padding.small
@@ -4347,11 +5428,13 @@ function ModuleHeader(param) {
4347
5428
  id: "redo",
4348
5429
  width: "30px",
4349
5430
  height: "30px",
5431
+ iconWidth: "20px",
4350
5432
  padding: [
4351
5433
  IconButton.padding.none,
4352
5434
  IconButton.padding.small
4353
5435
  ],
4354
5436
  disabled: !canRedo,
5437
+ backgroundColor: 'var(--bg-lv1)',
4355
5438
  onClick: function() {
4356
5439
  handleRedo();
4357
5440
  },
@@ -4372,8 +5455,8 @@ function ModuleHeader(param) {
4372
5455
  }, "Advanced")))));
4373
5456
  }
4374
5457
 
4375
- var css_248z$1 = ".ModMatrix {\n color: var(--color-text);\n font-size: var(--text-ms);\n}\n\n.ModMatrixCell {\n background: #252429;\n position: relative;\n}\n\n.ModMatrixCell.isDisabled {\n /* background: var(--bg-muted);\n color: var(--color-gray-400); */\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n/* .isActive .ModMatrixCell {\n background: var(--color-gray-600);\n} */\n\n.ModMatrixToggleCell {\n cursor: pointer;\n}\n\n.ModMatrixComboboxCell {\n background: #252429;\n cursor: pointer;\n}\n\n.ModMatrixComboboxItems {\n position: absolute;\n z-index: 50;\n bottom: -151px;\n left: 0px;\n height: 150px;\n width: 100%;\n background: var(--color-gray-500);\n color: var(--color-text);\n font-family: var(--font-leagueSpartan);\n overflow-y: auto;\n overflow-x: hidden;\n cursor: pointer;\n}\n\n.ModMatrixComboboxItem:hover,\n.ModMatrixComboboxItem:active,\n.ModMatrixComboboxItem[data-selected] {\n background: var(--color-gray-600);\n}\n\n.ModMatrixComboboxItem {\n padding: var(--spacing-md) var(--spacing-lg);\n width: 100%;\n}\n.ModMatrixComboboxButton {\n cursor: pointer;\n}\n\n.ModMatrixInput {\n text-align: center;\n margin-top: 3px;\n}\n";
4376
- styleInject(css_248z$1);
5458
+ var css_248z$2 = ".ModMatrix {\n color: var(--color-text);\n font-size: var(--text-ms);\n}\n\n.ModMatrixCell {\n background: #252429;\n position: relative;\n}\n\n.ModMatrixCell.isDisabled {\n color: var(--color-gray-400);\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n/* .isActive .ModMatrixCell {\n background: var(--color-gray-600);\n} */\n\n.ModMatrixToggleCell {\n cursor: pointer;\n}\n\n.ModMatrixComboboxCell {\n background: #252429;\n cursor: pointer;\n}\n\n.ModMatrixComboboxItems {\n position: absolute;\n z-index: 50;\n bottom: -151px;\n left: 0px;\n height: 150px;\n width: 100%;\n background: var(--color-gray-500);\n color: var(--color-text);\n font-family: var(--font-leagueSpartan);\n overflow-y: auto;\n overflow-x: hidden;\n cursor: pointer;\n}\n\n.ModMatrixComboboxItem:hover,\n.ModMatrixComboboxItem:active,\n.ModMatrixComboboxItem[data-selected] {\n background: var(--color-gray-600);\n}\n\n.ModMatrixComboboxItem {\n padding: var(--spacing-md) var(--spacing-lg);\n width: 100%;\n}\n.ModMatrixComboboxButton {\n cursor: pointer;\n}\n\n.ModMatrixInput {\n text-align: center;\n margin-top: 3px;\n}\n";
5459
+ styleInject(css_248z$2);
4377
5460
 
4378
5461
  var targetColors = [
4379
5462
  'var(--color-brand)',
@@ -4388,145 +5471,6 @@ var targetColors = [
4388
5471
  var ComboboxCellWidth = '217px';
4389
5472
  var DeleteButtonCellWidth = '50px';
4390
5473
 
4391
- function _array_like_to_array$8(arr, len) {
4392
- if (len == null || len > arr.length) len = arr.length;
4393
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
4394
- return arr2;
4395
- }
4396
- function _array_with_holes$8(arr) {
4397
- if (Array.isArray(arr)) return arr;
4398
- }
4399
- function _iterable_to_array_limit$8(arr, i) {
4400
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
4401
- if (_i == null) return;
4402
- var _arr = [];
4403
- var _n = true;
4404
- var _d = false;
4405
- var _s, _e;
4406
- try {
4407
- for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
4408
- _arr.push(_s.value);
4409
- if (i && _arr.length === i) break;
4410
- }
4411
- } catch (err) {
4412
- _d = true;
4413
- _e = err;
4414
- } finally{
4415
- try {
4416
- if (!_n && _i["return"] != null) _i["return"]();
4417
- } finally{
4418
- if (_d) throw _e;
4419
- }
4420
- }
4421
- return _arr;
4422
- }
4423
- function _non_iterable_rest$8() {
4424
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
4425
- }
4426
- function _sliced_to_array$8(arr, i) {
4427
- return _array_with_holes$8(arr) || _iterable_to_array_limit$8(arr, i) || _unsupported_iterable_to_array$8(arr, i) || _non_iterable_rest$8();
4428
- }
4429
- function _unsupported_iterable_to_array$8(o, minLen) {
4430
- if (!o) return;
4431
- if (typeof o === "string") return _array_like_to_array$8(o, minLen);
4432
- var n = Object.prototype.toString.call(o).slice(8, -1);
4433
- if (n === "Object" && o.constructor) n = o.constructor.name;
4434
- if (n === "Map" || n === "Set") return Array.from(n);
4435
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
4436
- }
4437
- var useCombobox = function(param) {
4438
- var id = param.id, filter = param.filter;
4439
- var _Object_values;
4440
- var comboBoxState = Juce.getComboBoxState(id);
4441
- var _useState = _sliced_to_array$8(useState(0), 2), value = _useState[0], setValue = _useState[1];
4442
- var _useState1 = _sliced_to_array$8(useState(comboBoxState === null || comboBoxState === void 0 ? void 0 : comboBoxState.properties), 2), properties = _useState1[0], setProperties = _useState1[1];
4443
- var prevValue = useRef(null);
4444
- var _useGlobalContext = useGlobalContext(); _useGlobalContext.highlightedItemChanged; var setModSlotRowTargetAsPreview = _useGlobalContext.setModSlotRowTargetAsPreview, _useGlobalContext_globalState = _useGlobalContext.globalState, automatableParamLabels = _useGlobalContext_globalState.automatableParamLabels, modSlotTargets = _useGlobalContext_globalState.modSlotTargets, modSlotPreview = _useGlobalContext_globalState.modSlotPreview;
4445
- //TODO: Filter choices for subsequent rows
4446
- // const availableChoices = properties?.choices;
4447
- useEffect(function() {
4448
- setValue(comboBoxState === null || comboBoxState === void 0 ? void 0 : comboBoxState.getChoiceIndex());
4449
- }, [
4450
- id
4451
- ]);
4452
- useEffect(function() {
4453
- setProperties(comboBoxState === null || comboBoxState === void 0 ? void 0 : comboBoxState.properties);
4454
- });
4455
- useEffect(function() {
4456
- if (modSlotPreview.slotId === id) {
4457
- setValue(modSlotPreview.targetIndex);
4458
- }
4459
- }, [
4460
- modSlotTargets,
4461
- modSlotPreview
4462
- ]);
4463
- useEffect(function() {
4464
- var _comboBoxState_valueChangedEvent, _comboBoxState_propertiesChangedEvent;
4465
- var valueListenerId = comboBoxState === null || comboBoxState === void 0 ? void 0 : (_comboBoxState_valueChangedEvent = comboBoxState.valueChangedEvent) === null || _comboBoxState_valueChangedEvent === void 0 ? void 0 : _comboBoxState_valueChangedEvent.addListener(function() {
4466
- if ((comboBoxState === null || comboBoxState === void 0 ? void 0 : comboBoxState.getChoiceIndex()) !== prevValue) {
4467
- setValue(comboBoxState === null || comboBoxState === void 0 ? void 0 : comboBoxState.getChoiceIndex());
4468
- }
4469
- });
4470
- var propertiesListenerId = comboBoxState === null || comboBoxState === void 0 ? void 0 : (_comboBoxState_propertiesChangedEvent = comboBoxState.propertiesChangedEvent) === null || _comboBoxState_propertiesChangedEvent === void 0 ? void 0 : _comboBoxState_propertiesChangedEvent.addListener(function() {
4471
- setProperties(comboBoxState === null || comboBoxState === void 0 ? void 0 : comboBoxState.properties);
4472
- });
4473
- return function cleanup() {
4474
- var _comboBoxState_valueChangedEvent, _comboBoxState_propertiesChangedEvent;
4475
- comboBoxState === null || comboBoxState === void 0 ? void 0 : (_comboBoxState_valueChangedEvent = comboBoxState.valueChangedEvent) === null || _comboBoxState_valueChangedEvent === void 0 ? void 0 : _comboBoxState_valueChangedEvent.removeListener(valueListenerId);
4476
- comboBoxState === null || comboBoxState === void 0 ? void 0 : (_comboBoxState_propertiesChangedEvent = comboBoxState.propertiesChangedEvent) === null || _comboBoxState_propertiesChangedEvent === void 0 ? void 0 : _comboBoxState_propertiesChangedEvent.removeListener(propertiesListenerId);
4477
- };
4478
- }, [
4479
- window
4480
- ]);
4481
- var selectedChoices = (_Object_values = Object.values(modSlotTargets)) === null || _Object_values === void 0 ? void 0 : _Object_values.filter(function(item) {
4482
- return item > 0;
4483
- });
4484
- var selectedLabels = automatableParamLabels === null || automatableParamLabels === void 0 ? void 0 : automatableParamLabels.filter(function(item, i) {
4485
- return selectedChoices === null || selectedChoices === void 0 ? void 0 : selectedChoices.includes(i);
4486
- });
4487
- var displayedLabels = automatableParamLabels === null || automatableParamLabels === void 0 ? void 0 : automatableParamLabels.filter(function(item) {
4488
- return !(selectedLabels === null || selectedLabels === void 0 ? void 0 : selectedLabels.includes(item)) || item === automatableParamLabels[value];
4489
- });
4490
- var filteredChoices = filter && (filter === null || filter === void 0 ? void 0 : filter.length) > 1 ? displayedLabels === null || displayedLabels === void 0 ? void 0 : displayedLabels.filter(function(item) {
4491
- var _item_toLowerCase;
4492
- return item === null || item === void 0 ? void 0 : (_item_toLowerCase = item.toLowerCase()) === null || _item_toLowerCase === void 0 ? void 0 : _item_toLowerCase.includes(filter === null || filter === void 0 ? void 0 : filter.toLowerCase());
4493
- }) : displayedLabels;
4494
- // const prevValue = useRef<string | null>(null);
4495
- // const handleChange = (newValue: number) => {
4496
- // if (newValue !== prevValue.current) {
4497
- // // const juceIndex = automatableParamLabels?.indexOf(newValue);
4498
- // // comboBoxState?.setChoiceIndex(newValue);s
4499
- // setValue(newValue);
4500
- // // onChange && onChange(newValue);
4501
- // // //@ts-expect-error
4502
- // // window.__JUCE__.backend.emitEvent('undoableActionOccurred', {});
4503
- // if (displayValInHeader) {
4504
- // highlightedItemChanged({
4505
- // label,
4506
- // value: automatableParamLabels?.[newValue],
4507
- // });
4508
- // }
4509
- // prevValue.current = newValue;
4510
- // }
4511
- // };
4512
- var onMouseEnter = function() {
4513
- };
4514
- var onClick = function() {
4515
- setModSlotRowTargetAsPreview({
4516
- paramId: id
4517
- });
4518
- };
4519
- return {
4520
- value: value,
4521
- valueString: automatableParamLabels === null || automatableParamLabels === void 0 ? void 0 : automatableParamLabels[value],
4522
- setValue: setValue,
4523
- choices: properties === null || properties === void 0 ? void 0 : properties.choices,
4524
- filteredChoices: filteredChoices,
4525
- onMouseEnter: onMouseEnter,
4526
- onClick: onClick
4527
- };
4528
- };
4529
-
4530
5474
  function _array_like_to_array$7(arr, len) {
4531
5475
  if (len == null || len > arr.length) len = arr.length;
4532
5476
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
@@ -4607,7 +5551,9 @@ function ModMatrixComboboxCell(param) {
4607
5551
  var _useGlobalContext = useGlobalContext(), updateModSlotRowTarget = _useGlobalContext.updateModSlotRowTarget, setModSlotRowTargetAsPreview = _useGlobalContext.setModSlotRowTargetAsPreview, clearModSlotPreview = _useGlobalContext.clearModSlotPreview, setNewModSlotPreview = _useGlobalContext.setNewModSlotPreview, _useGlobalContext_globalState = _useGlobalContext.globalState, modSlotPreview = _useGlobalContext_globalState.modSlotPreview, automatableParamLabels = _useGlobalContext_globalState.automatableParamLabels;
4608
5552
  var _useCombobox = useCombobox({
4609
5553
  id: rowId,
4610
- filter: filterString}), value = _useCombobox.value, filteredChoices = _useCombobox.filteredChoices;
5554
+ filter: filterString,
5555
+ displayValInHeader: false
5556
+ }), index = _useCombobox.index, filteredChoices = _useCombobox.filteredChoices;
4611
5557
  var previewValue = modSlotPreview.slotId === rowId ? modSlotPreview.targetIndex : null;
4612
5558
  var onChange = function(newValue) {
4613
5559
  // TODO: 'juceIndex' is needed here because the 'value' from the combobox is the string label.
@@ -4643,11 +5589,11 @@ function ModMatrixComboboxCell(param) {
4643
5589
  alignItems: Box.alignItems.flexStart,
4644
5590
  height: '2.5rem'
4645
5591
  }, /*#__PURE__*/ React__default.createElement(Combobox, {
4646
- value: value || previewValue,
5592
+ value: index || previewValue,
4647
5593
  onChange: onChange
4648
5594
  }, /*#__PURE__*/ React__default.createElement(Box, null, /*#__PURE__*/ React__default.createElement(ComboboxInput, {
4649
5595
  displayValue: function(item) {
4650
- return value ? automatableParamLabels === null || automatableParamLabels === void 0 ? void 0 : automatableParamLabels[value] : '';
5596
+ return index ? automatableParamLabels === null || automatableParamLabels === void 0 ? void 0 : automatableParamLabels[index] : '';
4651
5597
  },
4652
5598
  placeholder: "Select a target...",
4653
5599
  onChange: function(e) {
@@ -4665,8 +5611,8 @@ function ModMatrixComboboxCell(param) {
4665
5611
  return e.preventDefault();
4666
5612
  },
4667
5613
  color: 'var(--color-text)',
4668
- width: "20px",
4669
- height: "20px"
5614
+ width: "10px",
5615
+ height: "10px"
4670
5616
  }))), /*#__PURE__*/ React__default.createElement(ComboboxOptions, {
4671
5617
  className: "ModMatrixComboboxItems",
4672
5618
  // anchor="bottom"
@@ -5372,7 +6318,7 @@ function ModMatrix(param) {
5372
6318
  ],
5373
6319
  className: "ModMatrix ".concat(className ? className : ''),
5374
6320
  style: _object_spread$1({
5375
- backgroundColor: 'var(--bg-section)'
6321
+ backgroundColor: 'var(--bg-lvl2)'
5376
6322
  }, style),
5377
6323
  flexDirection: Box.flexDirection.column
5378
6324
  }, /*#__PURE__*/ React__default.createElement(Box, {
@@ -5411,8 +6357,8 @@ var WaveTypes = /*#__PURE__*/ function(WaveTypes) {
5411
6357
  WaveTypes["Triangle"] = "Triangle";
5412
6358
  WaveTypes["Ramp"] = "Ramp";
5413
6359
  WaveTypes["Saw"] = "Saw";
5414
- WaveTypes["ExpUp"] = "Exp Up";
5415
- WaveTypes["ExpDown"] = "Exp Down";
6360
+ // ExpUp = 'Exp Up',
6361
+ // ExpDown = 'Exp Down',
5416
6362
  WaveTypes["Square"] = "Square";
5417
6363
  return WaveTypes;
5418
6364
  }({});
@@ -5464,17 +6410,19 @@ var getPointArray = function(param) {
5464
6410
  y: adjustedVal * ampValue * (1 - randomNumber)
5465
6411
  });
5466
6412
  break;
5467
- case WaveTypes.ExpUp:
5468
- cycle.push({
5469
- y: (Math.exp(adjustedVal * ampValue) - 1) / 1.7 * (1 - randomNumber)
5470
- });
5471
- break;
5472
- case WaveTypes.ExpDown:
5473
- cycle.push({
5474
- //prettier-ignore
5475
- y: (Math.exp(adjustedVal > 0 ? (1 - adjustedVal) * ampValue : 0) - 1) / 1.7 * (1 - randomNumber)
5476
- });
5477
- break;
6413
+ // case WaveTypes.ExpUp:
6414
+ // cycle.push({
6415
+ // y:
6416
+ // ((Math.exp(adjustedVal * ampValue) - 1) / 1.7) *
6417
+ // (1 - randomNumber),
6418
+ // });
6419
+ // break;
6420
+ // case WaveTypes.ExpDown:
6421
+ // cycle.push({
6422
+ // //prettier-ignore
6423
+ // y: (Math.exp(adjustedVal > 0 ? (1 - adjustedVal) * ampValue : 0) - 1) / 1.7 * (1 - randomNumber),
6424
+ // });
6425
+ // break;
5478
6426
  case WaveTypes.Saw:
5479
6427
  cycle.push({
5480
6428
  y: (adjustedVal > 0 ? 1 - adjustedVal : 0) * (1 - randomNumber) * ampValue
@@ -5536,6 +6484,9 @@ var getPointArray = function(param) {
5536
6484
  return output;
5537
6485
  };
5538
6486
 
6487
+ var css_248z$1 = "/* *[id^='outerglow'] {\n opacity: 0.5;\n} */\n.area {\n fill: url(#area-gradient);\n /* stroke-width: 0px;w */\n}\n";
6488
+ styleInject(css_248z$1);
6489
+
5539
6490
  function _array_like_to_array$4(arr, len) {
5540
6491
  if (len == null || len > arr.length) len = arr.length;
5541
6492
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
@@ -5583,7 +6534,7 @@ function _unsupported_iterable_to_array$4(o, minLen) {
5583
6534
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
5584
6535
  }
5585
6536
  function LFOVisualizer(param) {
5586
- var id = param.id, _param_width = param.width, width = _param_width === void 0 ? 400 : _param_width, _param_height = param.height, height = _param_height === void 0 ? 150 : _param_height;
6537
+ var id = param.id, _param_width = param.width, width = _param_width === void 0 ? 375 : _param_width, _param_height = param.height, height = _param_height === void 0 ? 160 : _param_height;
5587
6538
  var svgRef = useRef(null);
5588
6539
  var isLocalhost = window.location.hostname === 'localhost';
5589
6540
  var _useState = _sliced_to_array$4(useState(0), 2), waveValue = _useState[0], setWaveValue = _useState[1];
@@ -5701,7 +6652,7 @@ function LFOVisualizer(param) {
5701
6652
  // Set up initial graph view
5702
6653
  var svg = d3.select(svgRef.current).attr('width', width * 2).attr('height', height);
5703
6654
  // create center line for graph
5704
- svg.append('line').attr('x1', "".concat(svgInnerMargin)).attr('y1', "".concat(height / 2)).attr('x2', "".concat(width * 2 - svgInnerMargin)).attr('y2', "".concat(height / 2)).attr('fill', 'none').attr('stroke', 'var(--color-gray-600)').attr('stroke-width', 2);
6655
+ svg.append('line').attr('x1', "".concat(svgInnerMargin)).attr('y1', "".concat(height / 2)).attr('x2', "".concat(width * 2 - svgInnerMargin)).attr('y2', "".concat(height / 2)).attr('fill', 'none').attr('stroke', 'var(--color-gray-600)').attr('stroke-width', 1);
5705
6656
  return function() {
5706
6657
  // Remove listeners on unmount
5707
6658
  waveState === null || waveState === void 0 ? void 0 : waveState.valueChangedEvent.removeListener(waveListenerId);
@@ -5731,7 +6682,9 @@ function LFOVisualizer(param) {
5731
6682
  pulseWidth: widthValue,
5732
6683
  maxLength: maxLength
5733
6684
  });
5734
- setPoints(pointArray);
6685
+ setPoints(pointArray.filter(function(item) {
6686
+ return item.y !== undefined;
6687
+ }));
5735
6688
  }, [
5736
6689
  waveValue,
5737
6690
  syncTypeValue,
@@ -5769,14 +6722,51 @@ function LFOVisualizer(param) {
5769
6722
  }).curve(d3.curveBasis);
5770
6723
  d3.select(svgRef.current).selectAll('path').attr('width', width * 2 - svgInnerMargin).attr('height', height).data([
5771
6724
  points
5772
- ]).attr('fill', 'none').attr('stroke', 'var(--color-brand)').attr('stroke-width', 3).attr('shape-rendering', 'geometricPrecision').attr('color-rendering', 'optimizeQuality').attr('filter', 'url(#dropshadow)').join('path').attr('d', line);
6725
+ ]).attr('fill', 'var(--color-brand)').attr('stroke', 'var(--color-brand)').attr('stroke-width', 3).attr('shape-rendering', 'geometricPrecision').attr('color-rendering', 'optimizeQuality').attr('filter', 'url(#dropshadow)').join('path').attr('d', line).attr('d', d3.area()// .x((d) => xScale(0))
6726
+ // .x0(xScale(0))
6727
+ .x(function(d) {
6728
+ //@ts-expect-error
6729
+ return xScale(d.x);
6730
+ }).y0(yScale(-1))//@ts-expect-error
6731
+ .y1(function(d) {
6732
+ return yScale(d.y);
6733
+ })).attr('class', 'area');
5773
6734
  }, [
5774
6735
  points,
5775
6736
  maxLength
5776
6737
  ]);
6738
+ d3.select(svgRef.current).append('linearGradient').attr('id', 'area-gradient')//.attr("gradientUnits", "userSpaceOnUse")
6739
+ .attr('x1', 0).attr('y1', 0).attr('x2', 0).attr('y2', 1).selectAll('stop').data([
6740
+ {
6741
+ offset: '0%',
6742
+ color: 'var(--color-brand)',
6743
+ opacity: 0.2
6744
+ },
6745
+ {
6746
+ offset: '20%',
6747
+ color: 'var(--color-brand)',
6748
+ opacity: 0.15
6749
+ },
6750
+ {
6751
+ offset: '30%',
6752
+ color: 'var(--color-brand)',
6753
+ opacity: 0.1
6754
+ },
6755
+ {
6756
+ offset: '55%',
6757
+ color: 'var(--color-brand)',
6758
+ opacity: 0
6759
+ }
6760
+ ]).enter().append('stop').attr('offset', function(d) {
6761
+ return d.offset;
6762
+ }).attr('stop-color', function(d) {
6763
+ return d.color;
6764
+ }).attr('stop-opacity', function(d) {
6765
+ return d.opacity;
6766
+ });
5777
6767
  return /*#__PURE__*/ React__default.createElement(Box, {
5778
6768
  style: {
5779
- backgroundColor: 'var(--bg-page)'
6769
+ backgroundColor: 'var(--bg-lv2)'
5780
6770
  },
5781
6771
  padding: [
5782
6772
  Box.padding.medium
@@ -5857,7 +6847,7 @@ function _unsupported_iterable_to_array$3(o, minLen) {
5857
6847
  if (n === "Map" || n === "Set") return Array.from(n);
5858
6848
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
5859
6849
  }
5860
- function LFO(param) {
6850
+ function LFOBox(param) {
5861
6851
  var id = param.id;
5862
6852
  var _useState = _sliced_to_array$3(useState(0), 2), syncType = _useState[0], setSyncType = _useState[1];
5863
6853
  useEffect(function() {
@@ -5871,68 +6861,153 @@ function LFO(param) {
5871
6861
  setSyncType(value);
5872
6862
  };
5873
6863
  return /*#__PURE__*/ React__default.createElement(Box, {
5874
- className: "LFOTab",
5875
- flexDirection: Box.flexDirection.column
5876
- }, /*#__PURE__*/ React__default.createElement(LFOVisualizer, {
5877
- id: id
5878
- }), /*#__PURE__*/ React__default.createElement(Box, null, /*#__PURE__*/ React__default.createElement(Dropdown, {
6864
+ className: "LFOBox",
6865
+ gap: Box.gap.medium,
6866
+ style: {
6867
+ background: 'var(--bg-lv4)',
6868
+ borderRadius: '6px'
6869
+ },
6870
+ padding: [
6871
+ Box.padding.large
6872
+ ],
6873
+ fullHeight: true
6874
+ }, /*#__PURE__*/ React__default.createElement(Box, {
6875
+ flexDirection: Box.flexDirection.column,
6876
+ justifyContent: Box.justifyContent.flexStart,
6877
+ alignItems: Box.alignItems.flexStart,
6878
+ // padding={[Box.padding.medium]}
6879
+ fullHeight: true
6880
+ }, /*#__PURE__*/ React__default.createElement(Heading, {
6881
+ padding: [
6882
+ Heading.padding.none,
6883
+ Heading.padding.none,
6884
+ Heading.padding.large,
6885
+ Heading.padding.none
6886
+ ],
6887
+ removeLineHeight: true,
6888
+ color: "var(--color-brand)"
6889
+ }, "LFO ".concat(id)), /*#__PURE__*/ React__default.createElement(Box, {
6890
+ flexDirection: Box.flexDirection.column,
6891
+ flex: "1",
6892
+ gap: Box.gap.mediumLarge,
6893
+ justifyContent: Box.justifyContent.flexStart
6894
+ }, /*#__PURE__*/ React__default.createElement(Box, null, syncType === 0 ? /*#__PURE__*/ React__default.createElement(Slider, {
6895
+ size: Slider.size.large,
6896
+ id: "LFO".concat(id, "_Hz"),
6897
+ label: "LFO".concat(id, " Hz"),
6898
+ indicatorId: "LFO".concat(id, "_Out")
6899
+ }) : null, syncType === 1 ? /*#__PURE__*/ React__default.createElement(Slider, {
6900
+ size: Slider.size.large,
6901
+ id: "LFO".concat(id, "_Hz_Hi"),
6902
+ label: "LFO".concat(id, " Hz Hi"),
6903
+ indicatorId: "LFO".concat(id, "_Out")
6904
+ }) : null, syncType === 2 ? /*#__PURE__*/ React__default.createElement(Slider, {
6905
+ id: "LFO".concat(id, "_SyncRate"),
6906
+ label: "LFO".concat(id, " Sync Rate"),
6907
+ size: Slider.size.large,
6908
+ variant: Slider.variant.rotaryCombobox,
6909
+ indicatorId: "LFO".concat(id, "_Out")
6910
+ }) : null), syncType !== 0 && syncType !== 1 ? /*#__PURE__*/ React__default.createElement(Slider, {
6911
+ variant: Slider.variant.bar,
6912
+ polarity: Slider.polarity.bipolar,
6913
+ orientation: Slider.orientation.horizontal,
6914
+ dragOrientation: Slider.orientation.horizontal,
6915
+ id: "LFO".concat(id, "_Sync_Offset"),
6916
+ label: "LFO".concat(id, " Sync Offset")
6917
+ }) : null, /*#__PURE__*/ React__default.createElement(Dropdown, {
5879
6918
  labelColor: "var(--color-text)",
5880
6919
  color: "var(--color-brand)",
5881
6920
  id: "LFO".concat(id, "_SyncType"),
5882
6921
  label: "LFO".concat(id, " Sync Type"),
5883
6922
  onChange: handleSyncTypeChange,
5884
6923
  width: "6rem"
5885
- }), /*#__PURE__*/ React__default.createElement(React__default.Fragment, null, syncType === 0 ? /*#__PURE__*/ React__default.createElement(RotarySlider, {
5886
- id: "LFO".concat(id, "_Hz"),
5887
- label: "LFO".concat(id, " Hz")
5888
- }) : null, syncType === 1 ? /*#__PURE__*/ React__default.createElement(RotarySlider, {
5889
- id: "LFO".concat(id, "_Hz_Hi"),
5890
- label: "LFO".concat(id, " Hz Hi")
5891
- }) : null, syncType === 2 ? /*#__PURE__*/ React__default.createElement(Dropdown, {
5892
- labelColor: "var(--color-text)",
5893
- color: "var(--color-brand)",
5894
- id: "LFO".concat(id, "_SyncRate"),
5895
- label: "LFO".concat(id, " Sync Rate"),
5896
- width: "8rem"
5897
- }) : null, syncType === 3 ? /*#__PURE__*/ React__default.createElement(RotarySlider, {
6924
+ }))), /*#__PURE__*/ React__default.createElement(Box, {
6925
+ flexDirection: Box.flexDirection.column,
6926
+ // padding={[Box.padding.small]}
6927
+ fullHeight: true,
6928
+ justifyContent: Box.justifyContent.spaceBetween,
6929
+ // gap={Box.gap.large}
6930
+ flex: "1"
6931
+ }, /*#__PURE__*/ React__default.createElement(LFOVisualizer, {
6932
+ id: id
6933
+ }), /*#__PURE__*/ React__default.createElement(Box, {
6934
+ gap: Box.gap.xLarge
6935
+ }, /*#__PURE__*/ React__default.createElement(React__default.Fragment, null, syncType === 3 ? /*#__PURE__*/ React__default.createElement(Slider, {
5898
6936
  id: "LFO".concat(id, "_Thirds"),
5899
6937
  label: "LFO".concat(id, " 1/3rds")
5900
- }) : null, syncType === 4 ? /*#__PURE__*/ React__default.createElement(RotarySlider, {
6938
+ }) : null, syncType === 4 ? /*#__PURE__*/ React__default.createElement(Slider, {
5901
6939
  id: "LFO".concat(id, "_Sixteenths"),
5902
6940
  label: "LFO".concat(id, " 1/16ths")
5903
- }) : null), syncType === 0 || syncType === 1 ? /*#__PURE__*/ React__default.createElement(RotarySlider, {
5904
- polarity: RotarySlider.sliderPolarity.bipolar,
6941
+ }) : null), /*#__PURE__*/ React__default.createElement(Slider, {
6942
+ polarity: Slider.polarity.bipolar,
5905
6943
  id: "LFO".concat(id, "_Phase"),
5906
- label: "LFO".concat(id, " Phase")
5907
- }) : null, syncType !== 0 && syncType !== 1 ? /*#__PURE__*/ React__default.createElement(RotarySlider, {
5908
- polarity: RotarySlider.sliderPolarity.bipolar,
5909
- id: "LFO".concat(id, "_Sync_Offset"),
5910
- label: "LFO".concat(id, " Sync Offset")
5911
- }) : null, /*#__PURE__*/ React__default.createElement(Dropdown, {
5912
- labelColor: "var(--color-text)",
5913
- color: "var(--color-brand)",
5914
- id: "LFO".concat(id, "_Wave"),
5915
- label: "LFO".concat(id, " Wave"),
5916
- width: "6rem"
5917
- }), /*#__PURE__*/ React__default.createElement(RotarySlider, {
6944
+ label: "LFO".concat(id, " Phase"),
6945
+ // indicatorLineColor="var(--color-brand)"
6946
+ indicatorLineGradient: Slider.gradientStyles.unicolor,
6947
+ knobStrokeColor: "var(--color-brand)",
6948
+ trackColor: "var(--color-brand-900)",
6949
+ trackWidth: 3,
6950
+ markerShape: Slider.markerShape.rectangle
6951
+ }), /*#__PURE__*/ React__default.createElement(Slider, {
5918
6952
  id: "LFO".concat(id, "_Width"),
5919
- label: "LFO".concat(id, " Width")
5920
- }), /*#__PURE__*/ React__default.createElement(RotarySlider, {
6953
+ label: "LFO".concat(id, " Width"),
6954
+ indicatorLineColor: "var(--color-brand)",
6955
+ knobStrokeColor: "var(--color-brand)",
6956
+ trackColor: "var(--color-brand-900)",
6957
+ trackWidth: 3,
6958
+ indicatorLineGradient: Slider.gradientStyles.unicolor,
6959
+ markerShape: Slider.markerShape.rectangle
6960
+ }), /*#__PURE__*/ React__default.createElement(Slider, {
5921
6961
  id: "LFO".concat(id, "_Amp"),
5922
- label: "LFO".concat(id, " Amp")
5923
- }), /*#__PURE__*/ React__default.createElement(RotarySlider, {
6962
+ label: "LFO".concat(id, " Amp"),
6963
+ indicatorLineColor: "var(--color-brand)",
6964
+ knobStrokeColor: "var(--color-brand)",
6965
+ trackColor: "var(--color-brand-900)",
6966
+ trackWidth: 3,
6967
+ indicatorLineGradient: Slider.gradientStyles.unicolor,
6968
+ markerShape: Slider.markerShape.rectangle
6969
+ }), /*#__PURE__*/ React__default.createElement(Slider, {
5924
6970
  id: "LFO".concat(id, "_Rand"),
5925
- label: "LFO".concat(id, " Rand")
6971
+ label: "LFO".concat(id, " Rand"),
6972
+ indicatorLineColor: "var(--color-brand)",
6973
+ knobStrokeColor: "var(--color-brand)",
6974
+ trackColor: "var(--color-brand-900)",
6975
+ trackWidth: 3,
6976
+ indicatorLineGradient: Slider.gradientStyles.unicolor,
6977
+ markerShape: Slider.markerShape.rectangle
6978
+ }))), /*#__PURE__*/ React__default.createElement(Box, {
6979
+ flexDirection: Box.flexDirection.column,
6980
+ justifyContent: Box.justifyContent.flexStart,
6981
+ height: "100%"
6982
+ }, /*#__PURE__*/ React__default.createElement(Tabs, {
6983
+ id: "LFO".concat(id, "_Wave"),
6984
+ height: "100%",
6985
+ icons: [
6986
+ Icons.sine,
6987
+ Icons.triangle,
6988
+ Icons.negativeSaw,
6989
+ Icons.positiveSaw,
6990
+ Icons.square
6991
+ ],
6992
+ orientation: Tabs.orientation.vertical,
6993
+ backgroundColor: "var(--bg-lv3)",
6994
+ selectedBackgroundColor: "var(--bg-lv2)",
6995
+ // width="100%"
6996
+ // padding={[Tabs.padding.mediumSmall]}
6997
+ tabWidth: "60px",
6998
+ tabHeight: "auto",
6999
+ color: "var(--bg-lv11)"
5926
7000
  })));
5927
7001
  }
5928
7002
 
5929
7003
  function LFOTab() {
5930
7004
  return /*#__PURE__*/ React__default.createElement(Box, {
5931
7005
  className: "LFOTab",
5932
- gap: Box.gap.medium
5933
- }, /*#__PURE__*/ React__default.createElement(LFO, {
7006
+ gap: Box.gap.medium,
7007
+ height: "100%"
7008
+ }, /*#__PURE__*/ React__default.createElement(LFOBox, {
5934
7009
  id: 1
5935
- }), /*#__PURE__*/ React__default.createElement(LFO, {
7010
+ }), /*#__PURE__*/ React__default.createElement(LFOBox, {
5936
7011
  id: 2
5937
7012
  }));
5938
7013
  }
@@ -6052,15 +7127,17 @@ function StepSequencer(param) {
6052
7127
  return /*#__PURE__*/ React__default.createElement(Box, {
6053
7128
  className: "StepSequencer",
6054
7129
  justifyContent: Box.justifyContent.flexStart,
6055
- width: "auto"
7130
+ height: "100%"
6056
7131
  }, steps.map(function(_, i) {
6057
7132
  var sliderNumber = i + 1;
6058
7133
  return /*#__PURE__*/ React__default.createElement(Slider, {
7134
+ variant: Slider.variant.bar,
7135
+ indicatorLineGradient: Slider.gradientStyles.multicolor,
7136
+ barSliderVariant: Slider.barSliderVariant.wideTrack,
6059
7137
  isStandalone: false,
6060
- sliderOrientation: Slider.sliderOrientation.vertical,
7138
+ orientation: Slider.orientation.vertical,
6061
7139
  id: "seq".concat(seqId, "_step").concat(sliderNumber),
6062
- color: currentSeqStep === sliderNumber ? "var(--color-brand-300)" : "var(--color-brand)",
6063
- trackColor: currentSeqStep === sliderNumber ? "var(--color-brand-600)" : "var(--color-brand-900)"
7140
+ isHighlighted: currentSeqStep === sliderNumber
6064
7141
  });
6065
7142
  }));
6066
7143
  }
@@ -6126,45 +7203,93 @@ function SeqTab$1(param) {
6126
7203
  };
6127
7204
  return /*#__PURE__*/ React__default.createElement(Box, {
6128
7205
  flexDirection: Box.flexDirection.column,
6129
- gap: Box.gap.medium
6130
- }, /*#__PURE__*/ React__default.createElement(Box, null, /*#__PURE__*/ React__default.createElement(StepSequencer, {
7206
+ gap: Box.gap.medium,
7207
+ style: {
7208
+ background: 'var(--bg-lv4)',
7209
+ borderRadius: '6px'
7210
+ },
7211
+ padding: [
7212
+ Box.padding.mediumLarge
7213
+ ],
7214
+ height: "100%"
7215
+ }, /*#__PURE__*/ React__default.createElement(Box, {
7216
+ gap: Box.gap.medium,
7217
+ justifyContent: Box.justifyContent.flexStart
7218
+ }, /*#__PURE__*/ React__default.createElement(Heading, {
7219
+ padding: [
7220
+ Heading.padding.none,
7221
+ Heading.padding.medium
7222
+ ],
7223
+ color: "var(--color-brand)"
7224
+ }, "Seq ".concat(seqId)), /*#__PURE__*/ React__default.createElement(IndicatorLight, {
7225
+ id: "SEQ".concat(seqId, "_Out"),
7226
+ dataSource: IndicatorLight.dataSource.event
7227
+ })), /*#__PURE__*/ React__default.createElement(Box, {
7228
+ flexDirection: Box.flexDirection.column,
7229
+ gap: Box.gap.medium,
7230
+ height: "100%"
7231
+ }, /*#__PURE__*/ React__default.createElement(Box, {
7232
+ flex: "1 0 auto"
7233
+ }, /*#__PURE__*/ React__default.createElement(StepSequencer, {
6131
7234
  seqId: seqId
6132
7235
  })), /*#__PURE__*/ React__default.createElement(Box, {
6133
- alignItems: Box.alignItems.flexEnd,
6134
- justifyContent: Box.justifyContent.center
7236
+ gap: Box.gap.medium,
7237
+ padding: [
7238
+ Box.padding.none,
7239
+ Box.padding.none,
7240
+ Box.padding.medium,
7241
+ Box.padding.none
7242
+ ]
6135
7243
  }, /*#__PURE__*/ React__default.createElement(Dropdown, {
6136
7244
  labelColor: "var(--color-text)",
6137
7245
  color: "var(--color-brand)",
6138
7246
  id: "seq".concat(seqId, "_syncType"),
6139
7247
  label: "seq".concat(seqId, "_syncType"),
6140
7248
  onChange: handleSyncTypeChange
6141
- }), /*#__PURE__*/ React__default.createElement(React__default.Fragment, null, syncType === 0 ? /*#__PURE__*/ React__default.createElement(RotarySlider, {
7249
+ }), /*#__PURE__*/ React__default.createElement(React__default.Fragment, null, syncType === 0 ? /*#__PURE__*/ React__default.createElement(Slider, {
6142
7250
  id: "seq".concat(seqId, "_hertz"),
7251
+ variant: Slider.variant.bar,
7252
+ includeValueInHeight: false,
7253
+ orientation: Slider.orientation.horizontal,
7254
+ indicatorLineGradient: Slider.gradientStyles.unicolor,
7255
+ // barSliderVariant={Slider.barSliderVariant.valueInside}
6143
7256
  label: "Seq".concat(seqId, " Hz")
6144
- }) : null, syncType === 1 ? /*#__PURE__*/ React__default.createElement(RotarySlider, {
7257
+ }) : null, syncType === 1 ? /*#__PURE__*/ React__default.createElement(Slider, {
6145
7258
  id: "seq".concat(seqId, "_hertzHi"),
7259
+ includeValueInHeight: false,
7260
+ variant: Slider.variant.bar,
7261
+ orientation: Slider.orientation.horizontal,
7262
+ indicatorLineGradient: Slider.gradientStyles.unicolor,
7263
+ // barSliderVariant={Slider.barSliderVariant.valueInside}
6146
7264
  label: "Seq".concat(seqId, " Hz Hi")
6147
7265
  }) : null, syncType === 2 ? /*#__PURE__*/ React__default.createElement(Dropdown, {
6148
7266
  labelColor: "var(--color-text)",
6149
7267
  color: "var(--color-brand)",
6150
7268
  id: "seq".concat(seqId, "_syncRate"),
6151
7269
  label: "Seq".concat(seqId, " Sync Rate")
6152
- }) : null, syncType === 3 ? /*#__PURE__*/ React__default.createElement(RotarySlider, {
7270
+ }) : null, syncType === 3 ? /*#__PURE__*/ React__default.createElement(Slider, {
6153
7271
  id: "seq".concat(seqId, "_thirds"),
7272
+ indicatorLineGradient: Slider.gradientStyles.unicolor,
6154
7273
  label: "Seq".concat(seqId, " Thirds")
6155
- }) : null, syncType === 4 ? /*#__PURE__*/ React__default.createElement(RotarySlider, {
7274
+ }) : null, syncType === 4 ? /*#__PURE__*/ React__default.createElement(Slider, {
7275
+ indicatorLineGradient: Slider.gradientStyles.unicolor,
6156
7276
  id: "seq".concat(seqId, "_sixteenths"),
6157
7277
  label: "Seq".concat(seqId, " Sixteenths")
6158
- }) : null), /*#__PURE__*/ React__default.createElement(RotarySlider, {
7278
+ }) : null), /*#__PURE__*/ React__default.createElement(Slider, {
6159
7279
  id: "seq".concat(seqId, "_amp"),
6160
- label: "Seq".concat(seqId, " Amp")
6161
- })));
7280
+ label: "Seq".concat(seqId, " Amp"),
7281
+ variant: Slider.variant.bar,
7282
+ includeValueInHeight: false,
7283
+ orientation: Slider.orientation.horizontal,
7284
+ indicatorLineGradient: Slider.gradientStyles.unicolor
7285
+ }))));
6162
7286
  }
6163
7287
 
6164
7288
  function SeqTab() {
6165
7289
  return /*#__PURE__*/ React__default.createElement(Box, {
6166
7290
  className: "SeqTab",
6167
- gap: Box.gap.medium
7291
+ gap: Box.gap.medium,
7292
+ fullHeight: true
6168
7293
  }, /*#__PURE__*/ React__default.createElement(SeqTab$1, {
6169
7294
  seqId: 1
6170
7295
  }), /*#__PURE__*/ React__default.createElement(SeqTab$1, {
@@ -6172,7 +7297,7 @@ function SeqTab() {
6172
7297
  }));
6173
7298
  }
6174
7299
 
6175
- var css_248z = "/* Tab styles */\n/* TODO: Refactor to use utility classes? */\n/* TODO: Clean up */\n/* TODO how do we want to style the scrollbars? */\n.ModuleFooter {\n overflow-y: scroll;\n max-height: 340px;\n}\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.ModuleFooter .Tabs-item[data-headlessui-state='selected focus'] {\n background: var(--color-gray-700);\n}\n";
7300
+ var css_248z = ".ModuleFooter-tabs {\n overflow-y: auto;\n overflow-x: hidden;\n max-height: 340px;\n}\n";
6176
7301
  styleInject(css_248z);
6177
7302
 
6178
7303
  function _array_like_to_array(arr, len) {
@@ -6394,9 +7519,6 @@ function ModuleFooter(param) {
6394
7519
  var _useState = _sliced_to_array(useState(0), 2), selectedTab = _useState[0], setSelectedTab = _useState[1];
6395
7520
  var setSelectedFooterTabFunc = Juce.getNativeFunction('setSelectedFooterTab');
6396
7521
  var getSelectedFooterTabFunc = Juce.getNativeFunction('getSelectedFooterTab');
6397
- var isTabSelected = function(tabName) {
6398
- return Object.keys(FooterTabs)[selectedTab] === tabName;
6399
- };
6400
7522
  useEffect(function() {
6401
7523
  var getTabFromBackend = function() {
6402
7524
  return _async_to_generator(function() {
@@ -6459,27 +7581,29 @@ function ModuleFooter(param) {
6459
7581
  updateBackend();
6460
7582
  };
6461
7583
  return /*#__PURE__*/ React__default.createElement(Box, {
6462
- gap: Box.gap.medium,
7584
+ gap: Box.gap.small,
6463
7585
  tag: Box.tag.footer,
6464
- height: "100%",
6465
7586
  alignItems: Box.alignItems.flexStart,
6466
7587
  className: "ModuleFooter ".concat(className ? className : ''),
6467
7588
  style: _object_spread({
6468
- backgroundColor: 'var(--bg-section)'
6469
- }, style)
7589
+ backgroundColor: 'var(--bg-lv3)'
7590
+ }, style),
7591
+ flex: "1 1 auto"
6470
7592
  }, /*#__PURE__*/ React__default.createElement(Box, {
6471
- flexDirection: Box.flexDirection.column
7593
+ flexDirection: Box.flexDirection.column,
7594
+ height: "100%",
7595
+ justifyContent: Box.justifyContent.flexStart
6472
7596
  }, /*#__PURE__*/ React__default.createElement(Box, {
6473
- style: {
6474
- backgroundColor: 'var(--color-gray-500)'
6475
- },
7597
+ // style={{ backgroundColor: 'var(--bg-lv4)' }}
6476
7598
  padding: [
6477
- Box.padding.small,
6478
- Box.padding.small,
7599
+ Box.padding.xSmall,
7600
+ Box.padding.medium,
6479
7601
  Box.padding.none,
6480
- Box.padding.small
6481
- ]
7602
+ Box.padding.medium
7603
+ ],
7604
+ justifyContent: Box.justifyContent.spaceBetween
6482
7605
  }, /*#__PURE__*/ React__default.createElement(Tabs, {
7606
+ className: "ModuleFooter-tabs",
6483
7607
  items: [
6484
7608
  'Mod Matrix',
6485
7609
  'Input mod',
@@ -6488,19 +7612,21 @@ function ModuleFooter(param) {
6488
7612
  'Settings'
6489
7613
  ],
6490
7614
  onChange: handleTabChange,
6491
- selectedIndex: selectedTab,
6492
- gap: "2px",
6493
7615
  padding: [
6494
7616
  Tabs.padding.medium,
6495
7617
  Tabs.padding.large
6496
7618
  ],
7619
+ backgroundColor: "var(--bg-lv4)",
7620
+ selectedBackgroundColor: "var(--bg-lv3)",
6497
7621
  width: "100%"
6498
7622
  })), /*#__PURE__*/ React__default.createElement(Box, {
6499
7623
  padding: [
6500
- Box.padding.large
6501
- ]
6502
- }, isTabSelected("ModMatrix") ? /*#__PURE__*/ React__default.createElement(ModMatrixTab, null) : '', isTabSelected("InputMod") ? /*#__PURE__*/ React__default.createElement(InputModTab, null) : '', isTabSelected("LFOs") ? /*#__PURE__*/ React__default.createElement(LFOTab, null) : '', isTabSelected("Sequencer") ? /*#__PURE__*/ React__default.createElement(SequencerTab, null) : '', isTabSelected("Settings") ? /*#__PURE__*/ React__default.createElement(SettingsTab, null) : '')));
7624
+ Box.padding.medium
7625
+ ],
7626
+ alignItems: Box.alignItems.flexStart,
7627
+ flex: "1 1 auto"
7628
+ }, selectedTab === Object.keys(FooterTabs).indexOf("ModMatrix") ? /*#__PURE__*/ React__default.createElement(ModMatrixTab, null) : '', selectedTab === Object.keys(FooterTabs).indexOf("InputMod") ? /*#__PURE__*/ React__default.createElement(InputModTab, null) : '', selectedTab === Object.keys(FooterTabs).indexOf("LFOs") ? /*#__PURE__*/ React__default.createElement(LFOTab, null) : '', selectedTab === Object.keys(FooterTabs).indexOf("Sequencer") ? /*#__PURE__*/ React__default.createElement(SequencerTab, null) : '', selectedTab === Object.keys(FooterTabs).indexOf("Settings") ? /*#__PURE__*/ React__default.createElement(SettingsTab, null) : '')));
6503
7629
  }
6504
7630
 
6505
- export { Slider as BarSlider, Box, Button, Dropdown, FontSizes, GlobalContextProvider, Heading, IconButton, IndicatorLight, Input, KeyValueDisplayScreen, Label, ModuleFooter, ModuleHeader, Oscilloscope, RotarySlider, Spacing, Tabs, clamp, decimalToPercent, defaultGlobalStateValue as defaultValue, normalisedToScaled, percentToDecimal, randomizeValue, scaledToNormalised as scaledTonormalised, useGlobalContext, useObservable, useSlider };
7631
+ export { Slider$1 as BarSlider, Box, Button, Dropdown, FontSizes, GlobalContextProvider, Heading, IconButton, IndicatorLight, Input, KeyValueDisplayScreen, Label, ModuleFooter, ModuleHeader, Oscilloscope, RotarySlider, Slider, Spacing, Tabs, clamp, decimalToPercent, defaultGlobalStateValue as defaultValue, normalisedToScaled, percentToDecimal, randomizeValue, scaledToNormalised as scaledTonormalised, useGlobalContext, useObservable, useSlider };
6506
7632
  //# sourceMappingURL=index.js.map