@antimatter-audio/antimatter-ui 12.0.5 → 14.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) 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 +2284 -1160
  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/Input/Input.d.ts +4 -1
  92. package/dist/src/core/Input/Input.d.ts.map +1 -1
  93. package/dist/src/core/Label/Label.d.ts +2 -1
  94. package/dist/src/core/Label/Label.d.ts.map +1 -1
  95. package/dist/src/core/PositioningWrapper/PositioningWrapper.d.ts +16 -0
  96. package/dist/src/core/PositioningWrapper/PositioningWrapper.d.ts.map +1 -0
  97. package/dist/src/core/Slider/BarSlider.d.ts +20 -6
  98. package/dist/src/core/Slider/BarSlider.d.ts.map +1 -1
  99. package/dist/src/core/Slider/RotaryCircle.d.ts +35 -0
  100. package/dist/src/core/Slider/RotaryCircle.d.ts.map +1 -0
  101. package/dist/src/core/Slider/RotaryCombobox.d.ts +34 -0
  102. package/dist/src/core/Slider/RotaryCombobox.d.ts.map +1 -0
  103. package/dist/src/core/Slider/RotarySlider.d.ts +16 -15
  104. package/dist/src/core/Slider/RotarySlider.d.ts.map +1 -1
  105. package/dist/src/core/Slider/RotarySliderSVG.d.ts +20 -0
  106. package/dist/src/core/Slider/RotarySliderSVG.d.ts.map +1 -0
  107. package/dist/src/core/Slider/Slider.d.ts +75 -0
  108. package/dist/src/core/Slider/Slider.d.ts.map +1 -0
  109. package/dist/src/core/Slider/SliderSVG.d.ts +33 -0
  110. package/dist/src/core/Slider/SliderSVG.d.ts.map +1 -0
  111. package/dist/src/core/Slider/types.d.ts +22 -0
  112. package/dist/src/core/Slider/types.d.ts.map +1 -1
  113. package/dist/src/core/Tabs/Tabs.d.ts +32 -6
  114. package/dist/src/core/Tabs/Tabs.d.ts.map +1 -1
  115. package/dist/src/hooks/useCombobox.d.ts +6 -3
  116. package/dist/src/hooks/useCombobox.d.ts.map +1 -1
  117. package/dist/src/hooks/useDropdown.d.ts +3 -1
  118. package/dist/src/hooks/useDropdown.d.ts.map +1 -1
  119. package/dist/src/hooks/useIndicator.d.ts +14 -0
  120. package/dist/src/hooks/useIndicator.d.ts.map +1 -0
  121. package/dist/src/hooks/useSlider.d.ts.map +1 -1
  122. package/dist/src/index.d.ts +2 -1
  123. package/dist/src/index.d.ts.map +1 -1
  124. package/dist/styles.css +16 -6
  125. 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);
@@ -1551,20 +2157,68 @@ function Dropdown(param) {
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
- flex: "0 1 auto"
1560
- }, /*#__PURE__*/ React__default.createElement(Listbox, {
2165
+ flex: "1 1 auto"
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,
2221
+ paddingRight: '1.5rem'
1568
2222
  }, style),
1569
2223
  id: id,
1570
2224
  onClick: onClick,
@@ -1572,39 +2226,26 @@ function Dropdown(param) {
1572
2226
  onChange: function(value) {
1573
2227
  return console.log(value);
1574
2228
  }
1575
- }, value), /*#__PURE__*/ React__default.createElement(ListboxOptions, {
2229
+ }, /*#__PURE__*/ React__default.createElement(Box, {
2230
+ gap: Box.gap.none,
2231
+ justifyContent: Box.justifyContent.spaceBetween
2232
+ }, /*#__PURE__*/ React__default.createElement(Label, {
2233
+ fontSize: Label.fontSize.small
2234
+ }, value)))), /*#__PURE__*/ React__default.createElement(ListboxOptions, {
1576
2235
  anchor: "bottom",
1577
2236
  portal: false,
1578
- className: "Dropdown-items z-10",
1579
- style: {
1580
- color: "".concat(color ? color : 'initial')
1581
- }
2237
+ className: "Dropdown-items z-10"
1582
2238
  }, choices === null || choices === void 0 ? void 0 : choices.map(function(item, i) {
1583
2239
  return /*#__PURE__*/ React__default.createElement(ListboxOption, {
1584
2240
  className: classnames('Dropdown-item'),
1585
2241
  key: item,
1586
- value: item,
1587
- style: {
1588
- color: "".concat(color ? color : 'initial')
1589
- }
2242
+ value: item
1590
2243
  }, 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
- }));
2244
+ }))));
1604
2245
  }
1605
2246
 
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);
2247
+ 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";
2248
+ styleInject(css_248z$9);
1608
2249
 
1609
2250
  function _array_like_to_array$f(arr, len) {
1610
2251
  if (len == null || len > arr.length) len = arr.length;
@@ -1654,7 +2295,7 @@ function _iterable_to_array_limit$f(arr, i) {
1654
2295
  function _non_iterable_rest$f() {
1655
2296
  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
2297
  }
1657
- function _object_spread$f(target) {
2298
+ function _object_spread$e(target) {
1658
2299
  for(var i = 1; i < arguments.length; i++){
1659
2300
  var source = arguments[i] != null ? arguments[i] : {};
1660
2301
  var ownKeys = Object.keys(source);
@@ -1688,7 +2329,7 @@ var InputTypes = /*#__PURE__*/ function(InputTypes) {
1688
2329
  return InputTypes;
1689
2330
  }({});
1690
2331
  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;
2332
+ 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
2333
  var _inputRef_current;
1693
2334
  var _useState = _sliced_to_array$f(useState(value), 2), internalValue = _useState[0], setInternalValue = _useState[1];
1694
2335
  // const [hasError, setHasError] = useState<boolean>(false);
@@ -1810,8 +2451,9 @@ function Input(param) {
1810
2451
  id: "".concat(id, "-input"),
1811
2452
  ref: inputRef,
1812
2453
  className: classnames('TextInput', isHighlighted ? 'is-highlighted' : '', className),
1813
- style: _object_spread$f({
2454
+ style: _object_spread$e({
1814
2455
  fontSize: "var(--text-".concat(fontSize),
2456
+ textAlign: textAlign,
1815
2457
  color: textColor
1816
2458
  }, style),
1817
2459
  value: internalValue,
@@ -1829,13 +2471,50 @@ function Input(param) {
1829
2471
  });
1830
2472
  }
1831
2473
  Input.type = InputTypes;
2474
+ Input.textAlign = TextAlign;
1832
2475
 
2476
+ function _define_property$e(obj, key, value) {
2477
+ if (key in obj) {
2478
+ Object.defineProperty(obj, key, {
2479
+ value: value,
2480
+ enumerable: true,
2481
+ configurable: true,
2482
+ writable: true
2483
+ });
2484
+ } else {
2485
+ obj[key] = value;
2486
+ }
2487
+ return obj;
2488
+ }
1833
2489
  var SliderType = /*#__PURE__*/ function(SliderType) {
1834
2490
  SliderType["bar"] = "bar";
1835
2491
  SliderType["rotary"] = "rotary";
1836
2492
  SliderType["custom"] = "custom";
1837
2493
  return SliderType;
1838
2494
  }({});
2495
+ var RotarySliderMarkerShapes = /*#__PURE__*/ function(RotarySliderMarkerShapes) {
2496
+ RotarySliderMarkerShapes["circle"] = "circle";
2497
+ RotarySliderMarkerShapes["rectangle"] = "rectangle";
2498
+ return RotarySliderMarkerShapes;
2499
+ }({});
2500
+ var RotarySliderSizes = /*#__PURE__*/ function(RotarySliderSizes) {
2501
+ RotarySliderSizes["small"] = "small";
2502
+ RotarySliderSizes["large"] = "large";
2503
+ return RotarySliderSizes;
2504
+ }({});
2505
+ var _obj;
2506
+ var rotarySliderSizeMap = (_obj = {}, _define_property$e(_obj, "small", {
2507
+ width: 40,
2508
+ height: 40
2509
+ }), _define_property$e(_obj, "large", {
2510
+ width: 65,
2511
+ height: 65
2512
+ }), _obj);
2513
+ var GradientStyles = /*#__PURE__*/ function(GradientStyles) {
2514
+ GradientStyles["unicolor"] = "unicolor";
2515
+ GradientStyles["multicolor"] = "multicolor";
2516
+ return GradientStyles;
2517
+ }({});
1839
2518
 
1840
2519
  function _array_like_to_array$e(arr, len) {
1841
2520
  if (len == null || len > arr.length) len = arr.length;
@@ -2062,13 +2741,6 @@ var useSlider = function(param) {
2062
2741
  // console.log(movement, hasMoved, 'movementinelesif');
2063
2742
  newValue = 1 - y / rect.width;
2064
2743
  } else if (hasMoved || ignoreMoveStatus) {
2065
- // console.log(
2066
- // hasMoved,
2067
- // orientation,
2068
- // dragOrientation,
2069
- // movement,
2070
- // '213312312',
2071
- // );
2072
2744
  newValue = x / rect.width;
2073
2745
  }
2074
2746
  newValue && setNormalisedState(clamp(newValue));
@@ -2150,11 +2822,11 @@ var useSlider = function(param) {
2150
2822
  };
2151
2823
  };
2152
2824
 
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);
2825
+ 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";
2826
+ styleInject(css_248z$8);
2155
2827
 
2156
- var css_248z$6 = "";
2157
- styleInject(css_248z$6);
2828
+ var css_248z$7 = "";
2829
+ styleInject(css_248z$7);
2158
2830
 
2159
2831
  function _array_like_to_array$d(arr, len) {
2160
2832
  if (len == null || len > arr.length) len = arr.length;
@@ -2204,7 +2876,7 @@ function _unsupported_iterable_to_array$d(o, minLen) {
2204
2876
  }
2205
2877
  function ControlGroup(param) {
2206
2878
  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
2879
+ // EXPECTED CONTROL GROUP STRUCTURE
2208
2880
  // <ControlGroup id={id-control-group} is-active>
2209
2881
  // <Slider id={id}></Slider>
2210
2882
  // <Input id={id-input}></Input>
@@ -2281,7 +2953,234 @@ function ControlGroup(param) {
2281
2953
  }, children);
2282
2954
  }
2283
2955
 
2284
- function _define_property$e(obj, key, value) {
2956
+ var ProgressCircle = function(param) {
2957
+ 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,
2958
+ param.indicatorLineColor; var indicatorLineGradient = param.indicatorLineGradient, trackColor = param.trackColor, radius = param.radius, circ = param.circ, activeZone = param.activeZone, normalisedValue = param.normalisedValue;
2959
+ var cx = '50%';
2960
+ var cy = '50%';
2961
+ var unipolarOffset = circ - activeZone * (normalisedValue * 100) / 100;
2962
+ var bipolarOffset = circ - activeZone * (normalisedValue * 100 - 50) / 100;
2963
+ return /*#__PURE__*/ React__default.createElement("svg", {
2964
+ className: "ProgressCircle",
2965
+ width: width,
2966
+ height: height
2967
+ }, /*#__PURE__*/ React__default.createElement("circle", {
2968
+ id: "circle2",
2969
+ className: "ProgressCircle-bg",
2970
+ cx: cx,
2971
+ cy: cy,
2972
+ r: radius,
2973
+ style: {
2974
+ stroke: trackColor ? trackColor : 'var(--bg-lv2)',
2975
+ strokeWidth: strokeWidth,
2976
+ strokeDasharray: circ,
2977
+ transform: 'rotate(135deg)',
2978
+ strokeDashoffset: circ - activeZone
2979
+ }
2980
+ }), /*#__PURE__*/ React__default.createElement("circle", {
2981
+ id: "circle2",
2982
+ className: "ProgressCircle-fg",
2983
+ cx: cx,
2984
+ cy: cy,
2985
+ r: radius,
2986
+ style: {
2987
+ stroke: indicatorLineGradient === GradientStyles.unicolor ? 'url(#unicolorGradient)' : 'url(#multicolorGradient)',
2988
+ strokeWidth: strokeWidth,
2989
+ strokeDasharray: circ,
2990
+ // transform: `rotate(${polarity === Polarity.unipolar ? '135deg' : '270deg'})`,
2991
+ transform: polarity === Polarity.unipolar ? 'rotate(135deg)' : 'rotate(270deg)',
2992
+ strokeDashoffset: polarity === Polarity.unipolar ? unipolarOffset : bipolarOffset
2993
+ }
2994
+ }), /*#__PURE__*/ React__default.createElement("linearGradient", {
2995
+ id: "unicolorGradient",
2996
+ x1: "0%",
2997
+ y1: "0%",
2998
+ x2: "100%",
2999
+ y2: "0%"
3000
+ }, /*#__PURE__*/ React__default.createElement("stop", {
3001
+ offset: "0%",
3002
+ "stop-color": "var(--color-brand-700)"
3003
+ }), /*#__PURE__*/ React__default.createElement("stop", {
3004
+ offset: "80%",
3005
+ "stop-color": "var(--color-brand)"
3006
+ })), /*#__PURE__*/ React__default.createElement("linearGradient", {
3007
+ id: "multicolorGradient",
3008
+ x1: "0%",
3009
+ y1: "0%",
3010
+ x2: "100%",
3011
+ y2: "0%"
3012
+ }, /*#__PURE__*/ React__default.createElement("stop", {
3013
+ offset: "0%",
3014
+ "stop-color": "var(--color-brand-700)"
3015
+ }), /*#__PURE__*/ React__default.createElement("stop", {
3016
+ offset: "80%",
3017
+ "stop-color": "var(--color-brand-secondary)"
3018
+ })));
3019
+ };
3020
+ var InnerCircle = function(param) {
3021
+ 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;
3022
+ var width = rotarySliderSizeMap[size].width;
3023
+ var height = rotarySliderSizeMap[size].height;
3024
+ var cx = '50%';
3025
+ var cy = '50%';
3026
+ return /*#__PURE__*/ React__default.createElement("svg", {
3027
+ className: "InnerCircle",
3028
+ width: width,
3029
+ height: height,
3030
+ style: {
3031
+ transform: markerShape === RotarySliderMarkerShapes.circle ? "rotate(".concat(-90 + normalisedValue * 270, "deg)") : "rotate(".concat(-225 + normalisedValue * 270, "deg)")
3032
+ }
3033
+ }, /*#__PURE__*/ React__default.createElement("circle", {
3034
+ id: "InnerCircle",
3035
+ className: "InnerCircle",
3036
+ cx: cx,
3037
+ cy: cy,
3038
+ r: size === RotarySliderSizes.small ? 12 : 24,
3039
+ fill: knobFillColor || "url(#radialGradient)",
3040
+ filter: "url(#boxShadow)",
3041
+ style: {
3042
+ stroke: knobStrokeColor,
3043
+ strokeWidth: 2
3044
+ }
3045
+ }), markerShape === RotarySliderMarkerShapes.circle ? /*#__PURE__*/ React__default.createElement("circle", {
3046
+ id: "InnerCircle-marker",
3047
+ className: "InnerCircle-marker",
3048
+ cx: size === RotarySliderSizes.small ? 16 : 20,
3049
+ cy: size === RotarySliderSizes.small ? 16 : 20,
3050
+ r: 2,
3051
+ style: {
3052
+ fill: knobStrokeColor
3053
+ }
3054
+ }) : /*#__PURE__*/ React__default.createElement("rect", {
3055
+ id: "InnerCircle-marker",
3056
+ className: "InnerCircle-marker",
3057
+ x: size === RotarySliderSizes.small ? 19 : 10,
3058
+ y: size === RotarySliderSizes.small ? -31 : 10,
3059
+ width: 2,
3060
+ height: 8,
3061
+ style: {
3062
+ transform: 'rotate(90deg)',
3063
+ fill: knobStrokeColor
3064
+ }
3065
+ }), /*#__PURE__*/ React__default.createElement("defs", null, /*#__PURE__*/ React__default.createElement("filter", {
3066
+ id: "boxShadow",
3067
+ x: "-50%",
3068
+ y: "-50%",
3069
+ width: "200%",
3070
+ height: "200%"
3071
+ }, /*#__PURE__*/ React__default.createElement("feGaussianBlur", {
3072
+ in: "SourceAlpha",
3073
+ stdDeviation: "3",
3074
+ result: "blur"
3075
+ }), /*#__PURE__*/ React__default.createElement("feComposite", {
3076
+ in: "SourceAlpha",
3077
+ operator: "arithmetic",
3078
+ k2: "-1",
3079
+ k3: "1",
3080
+ result: "shadowAlpha"
3081
+ }), /*#__PURE__*/ React__default.createElement("feFlood", {
3082
+ "flood-color": "rgba(0,0,0,0.5)",
3083
+ result: "floodColor"
3084
+ }), /*#__PURE__*/ React__default.createElement("feComposite", {
3085
+ in: "floodColor",
3086
+ in2: "shadowAlpha",
3087
+ operator: "in",
3088
+ result: "boxShadow"
3089
+ }), /*#__PURE__*/ React__default.createElement("feMerge", null, /*#__PURE__*/ React__default.createElement("feMergeNode", {
3090
+ in: "SourceGraphic"
3091
+ }), /*#__PURE__*/ React__default.createElement("feMergeNode", {
3092
+ in: "boxShadow"
3093
+ }))), /*#__PURE__*/ React__default.createElement("radialGradient", {
3094
+ id: "radialGradient",
3095
+ cx: "50%",
3096
+ cy: "50%",
3097
+ r: "50%",
3098
+ fx: "50%",
3099
+ fy: "50%"
3100
+ }, /*#__PURE__*/ React__default.createElement("stop", {
3101
+ offset: "75%",
3102
+ style: {
3103
+ stopColor: 'var(--bg-lv3)',
3104
+ stopOpacity: '0'
3105
+ }
3106
+ }), /*#__PURE__*/ React__default.createElement("stop", {
3107
+ offset: "90%",
3108
+ style: {
3109
+ stopColor: 'var(--bg-lv3)',
3110
+ stopOpacity: '1'
3111
+ }
3112
+ }))));
3113
+ };
3114
+ var BarSliderMarker = function(param) {
3115
+ 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;
3116
+ return /*#__PURE__*/ React__default.createElement("svg", {
3117
+ className: "BarSliderMarker",
3118
+ width: "18px",
3119
+ height: "18px"
3120
+ }, /*#__PURE__*/ React__default.createElement("circle", {
3121
+ id: "BarSliderMarker",
3122
+ className: "BarSliderMarker",
3123
+ r: "6px",
3124
+ cx: '50%',
3125
+ cy: '50%',
3126
+ fill: "url(#radialGradient)",
3127
+ filter: "url(#boxShadow)",
3128
+ style: {
3129
+ stroke: markerStrokeColor,
3130
+ strokeWidth: strokeWidth,
3131
+ fill: markerFillColor
3132
+ }
3133
+ }), /*#__PURE__*/ React__default.createElement("defs", null, /*#__PURE__*/ React__default.createElement("filter", {
3134
+ id: "boxShadow",
3135
+ x: "-50%",
3136
+ y: "-50%",
3137
+ width: "200%",
3138
+ height: "200%"
3139
+ }, /*#__PURE__*/ React__default.createElement("feGaussianBlur", {
3140
+ in: "SourceAlpha",
3141
+ stdDeviation: "3",
3142
+ result: "blur"
3143
+ }), /*#__PURE__*/ React__default.createElement("feComposite", {
3144
+ in: "SourceAlpha",
3145
+ operator: "arithmetic",
3146
+ k2: "-1",
3147
+ k3: "1",
3148
+ result: "shadowAlpha"
3149
+ }), /*#__PURE__*/ React__default.createElement("feFlood", {
3150
+ "flood-color": "rgba(0,0,0,0.5)",
3151
+ result: "floodColor"
3152
+ }), /*#__PURE__*/ React__default.createElement("feComposite", {
3153
+ in: "floodColor",
3154
+ in2: "shadowAlpha",
3155
+ operator: "in",
3156
+ result: "boxShadow"
3157
+ }), /*#__PURE__*/ React__default.createElement("feMerge", null, /*#__PURE__*/ React__default.createElement("feMergeNode", {
3158
+ in: "SourceGraphic"
3159
+ }), /*#__PURE__*/ React__default.createElement("feMergeNode", {
3160
+ in: "boxShadow"
3161
+ }))), /*#__PURE__*/ React__default.createElement("radialGradient", {
3162
+ id: "radialGradient",
3163
+ cx: "50%",
3164
+ cy: "50%",
3165
+ r: "50%",
3166
+ fx: "50%",
3167
+ fy: "50%"
3168
+ }, /*#__PURE__*/ React__default.createElement("stop", {
3169
+ offset: "75%",
3170
+ style: {
3171
+ stopColor: 'var(--bg-lv3)',
3172
+ stopOpacity: '0'
3173
+ }
3174
+ }), /*#__PURE__*/ React__default.createElement("stop", {
3175
+ offset: "90%",
3176
+ style: {
3177
+ stopColor: 'var(--bg-lv3)',
3178
+ stopOpacity: '1'
3179
+ }
3180
+ }))));
3181
+ };
3182
+
3183
+ function _define_property$d(obj, key, value) {
2285
3184
  if (key in obj) {
2286
3185
  Object.defineProperty(obj, key, {
2287
3186
  value: value,
@@ -2294,7 +3193,7 @@ function _define_property$e(obj, key, value) {
2294
3193
  }
2295
3194
  return obj;
2296
3195
  }
2297
- function _object_spread$e(target) {
3196
+ function _object_spread$d(target) {
2298
3197
  for(var i = 1; i < arguments.length; i++){
2299
3198
  var source = arguments[i] != null ? arguments[i] : {};
2300
3199
  var ownKeys = Object.keys(source);
@@ -2304,7 +3203,7 @@ function _object_spread$e(target) {
2304
3203
  }));
2305
3204
  }
2306
3205
  ownKeys.forEach(function(key) {
2307
- _define_property$e(target, key, source[key]);
3206
+ _define_property$d(target, key, source[key]);
2308
3207
  });
2309
3208
  }
2310
3209
  return target;
@@ -2328,67 +3227,79 @@ function _object_spread_props$2(target, source) {
2328
3227
  }
2329
3228
  return target;
2330
3229
  }
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;
3230
+ function RotaryCircle(param) {
3231
+ 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;
3232
+ var width = rotarySliderSizeMap[size].width;
3233
+ var height = rotarySliderSizeMap[size].height;
3234
+ var radius = (width - trackWidth * 2) / 2;
2336
3235
  var circ = 2 * 3.14 * radius;
2337
3236
  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,
3237
+ return /*#__PURE__*/ React__default.createElement(Box, _object_spread_props$2(_object_spread$d({
3238
+ id: id,
3239
+ tabIndex: 0,
3240
+ className: classnames('Slider', 'RotarySlider', polarity === Polarity.unipolar ? 'Slider-polarity-unipolar' : 'Slider-polarity-bipolar', className)
3241
+ }, bindDrag()), {
3242
+ onDoubleClick: function() {
3243
+ onDoubleClick && onDoubleClick();
3244
+ },
3245
+ style: _object_spread$d({
3246
+ touchAction: 'none',
3247
+ height: "".concat(height !== null && height !== void 0 ? height : width, "px"),
3248
+ width: "".concat(width, "px")
3249
+ }, style)
3250
+ }), sliderValue !== null ? /*#__PURE__*/ React__default.createElement("div", {
2349
3251
  style: {
2350
- stroke: bgColor,
2351
- strokeWidth: strokeWidth,
2352
- strokeDasharray: "".concat(activeZone)
3252
+ position: 'relative',
3253
+ width: width,
3254
+ height: height
2353
3255
  }
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,
3256
+ }, /*#__PURE__*/ React__default.createElement("div", {
3257
+ className: "RotarySlider-positioning-wrapper",
2360
3258
  style: {
2361
- stroke: color,
2362
- strokeWidth: strokeWidth,
2363
- strokeLinecap: 'round',
2364
- strokeDasharray: circ,
2365
- transform: "rotate(270deg)",
2366
- strokeDashoffset: 107.5
3259
+ width: '100%',
3260
+ height: '100%'
2367
3261
  }
2368
- }) : null, /*#__PURE__*/ React__default.createElement("circle", {
2369
- id: "circle2",
2370
- className: "ProgressCircle-fg",
2371
- cx: cx,
2372
- cy: cy,
2373
- r: radius,
3262
+ }, /*#__PURE__*/ React__default.createElement(ProgressCircle, {
3263
+ width: width,
3264
+ height: height,
3265
+ polarity: polarity,
3266
+ radius: radius,
3267
+ circ: circ,
3268
+ strokeWidth: trackWidth,
3269
+ activeZone: activeZone,
3270
+ normalisedValue: sliderValue,
3271
+ indicatorLineColor: indicatorLineColor,
3272
+ indicatorLineGradient: indicatorLineGradient,
3273
+ trackColor: trackColor,
3274
+ gradient: true
3275
+ })), /*#__PURE__*/ React__default.createElement("div", {
3276
+ className: 'RotarySlider-positioning-wrapper',
2374
3277
  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
- };
3278
+ width: '100%',
3279
+ height: '100%'
3280
+ }
3281
+ }, /*#__PURE__*/ React__default.createElement(InnerCircle, {
3282
+ normalisedValue: sliderValue,
3283
+ size: size,
3284
+ markerShape: markerShape,
3285
+ knobStrokeColor: knobStrokeColor,
3286
+ knobFillColor: knobFillColor
3287
+ }))) : '');
3288
+ }
3289
+ RotaryCircle.polarity = Polarity;
3290
+ RotaryCircle.size = RotarySliderSizes;
3291
+
3292
+ // Rotary Slider UI component.
3293
+ // Connects to Juce's Slider element
2384
3294
  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 ? {
3295
+ 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,
3296
+ 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
3297
  start: 20.0,
2388
3298
  end: 15000.0,
2389
3299
  interval: 0.1,
2390
3300
  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;
3301
+ } : _param_mockProperties; param.style;
3302
+ var _rotarySliderSizeMap_size;
2392
3303
  var _useSlider = useSlider({
2393
3304
  id: id,
2394
3305
  label: label,
@@ -2396,9 +3307,7 @@ function RotarySlider(param) {
2396
3307
  mockInitialNormalisedValue: mockInitialNormalisedValue,
2397
3308
  onChange: onChange,
2398
3309
  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;
3310
+ }), bindDrag = _useSlider.bindDrag, normalisedValue = _useSlider.normalisedValue, scaledValue = _useSlider.scaledValue, setToDefaultState = _useSlider.setToDefaultState, setNormalisedState = _useSlider.setNormalisedState, properties = _useSlider.properties;
2402
3311
  return /*#__PURE__*/ React__default.createElement(ControlGroup, {
2403
3312
  id: id
2404
3313
  }, /*#__PURE__*/ React__default.createElement(Box, {
@@ -2406,46 +3315,43 @@ function RotarySlider(param) {
2406
3315
  flexDirection: Box.flexDirection.column,
2407
3316
  gap: Box.gap.none,
2408
3317
  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,
3318
+ }, label ? /*#__PURE__*/ React__default.createElement(Label, {
3319
+ padding: [
3320
+ Label.padding.none,
3321
+ Label.padding.none,
3322
+ Label.padding.mediumSmall,
3323
+ Label.padding.none
3324
+ ],
3325
+ fontSize: Label.fontSize.xSmall,
3326
+ value: label
3327
+ }) : null, /*#__PURE__*/ React__default.createElement(RotaryCircle, {
2433
3328
  polarity: polarity,
2434
- color: bgColor,
2435
- bgColor: color,
2436
- width: width,
2437
- height: height
2438
- })) : ''), /*#__PURE__*/ React__default.createElement(Input, {
3329
+ className: className,
3330
+ id: id,
3331
+ trackWidth: trackWidth,
3332
+ markerShape: markerShape,
3333
+ // trackOffset={trackOffset}
3334
+ sliderValue: normalisedValue,
3335
+ bindDrag: bindDrag,
3336
+ onDoubleClick: setToDefaultState,
3337
+ size: size,
3338
+ indicatorLineColor: indicatorLineColor,
3339
+ indicatorLineGradient: indicatorLineGradient,
3340
+ trackColor: trackColor,
3341
+ trackStrokeColor: trackStrokeColor,
3342
+ knobStrokeColor: knobStrokeColor,
3343
+ knobFillColor: knobFillColor
3344
+ }), /*#__PURE__*/ React__default.createElement(Input, {
2439
3345
  className: "ProgressCircle-value",
2440
3346
  value: scaledValue,
2441
3347
  id: id,
2442
3348
  min: (properties === null || properties === void 0 ? void 0 : properties.start) || 0,
2443
3349
  max: (properties === null || properties === void 0 ? void 0 : properties.end) || 0,
3350
+ textAlign: Input.textAlign.center,
2444
3351
  style: {
2445
3352
  fontWeight: 'bold',
2446
3353
  width: '100%',
2447
- maxWidth: "".concat(width, "px"),
2448
- marginBottom: 'var(--spacing-sm)'
3354
+ 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
3355
  },
2450
3356
  onComplete: function(value) {
2451
3357
  var normalisedVal = properties && scaledToNormalised({
@@ -2456,17 +3362,16 @@ function RotarySlider(param) {
2456
3362
  });
2457
3363
  normalisedVal !== undefined && setNormalisedState(normalisedVal);
2458
3364
  }
2459
- }), /*#__PURE__*/ React__default.createElement(Label, {
2460
- padding: [
2461
- Label.padding.none
2462
- ],
2463
- fontSize: Label.fontSize.xSmall,
2464
- value: label
2465
3365
  })));
2466
3366
  }
2467
- RotarySlider.sliderPolarity = Polarity;
3367
+ RotarySlider.polarity = Polarity;
3368
+ RotarySlider.size = RotarySliderSizes;
3369
+ RotarySlider.markerShape = RotarySliderMarkerShapes;
2468
3370
 
2469
- function _define_property$d(obj, key, value) {
3371
+ 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";
3372
+ styleInject(css_248z$6);
3373
+
3374
+ function _define_property$c(obj, key, value) {
2470
3375
  if (key in obj) {
2471
3376
  Object.defineProperty(obj, key, {
2472
3377
  value: value,
@@ -2479,7 +3384,7 @@ function _define_property$d(obj, key, value) {
2479
3384
  }
2480
3385
  return obj;
2481
3386
  }
2482
- function _object_spread$d(target) {
3387
+ function _object_spread$c(target) {
2483
3388
  for(var i = 1; i < arguments.length; i++){
2484
3389
  var source = arguments[i] != null ? arguments[i] : {};
2485
3390
  var ownKeys = Object.keys(source);
@@ -2489,7 +3394,7 @@ function _object_spread$d(target) {
2489
3394
  }));
2490
3395
  }
2491
3396
  ownKeys.forEach(function(key) {
2492
- _define_property$d(target, key, source[key]);
3397
+ _define_property$c(target, key, source[key]);
2493
3398
  });
2494
3399
  }
2495
3400
  return target;
@@ -2513,8 +3418,15 @@ function _object_spread_props$1(target, source) {
2513
3418
  }
2514
3419
  return target;
2515
3420
  }
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
3421
+ // Slider UI component.
3422
+ // Connects to Juce's Slider element.
3423
+ var BarSliderVariants = /*#__PURE__*/ function(BarSliderVariants) {
3424
+ BarSliderVariants["narrowTrack"] = "narrowTrack";
3425
+ BarSliderVariants["wideTrack"] = "wideTrack";
3426
+ return BarSliderVariants;
3427
+ }({});
3428
+ function Slider$1(param) {
3429
+ 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
3430
  mockInitialNormalisedValue, mockInitialNormalisedValue = _param_mockInitialNormalisedValue === void 0 ? 0 : _param_mockInitialNormalisedValue, _param_mockProperties = param.mockProperties, mockProperties = _param_mockProperties === void 0 ? {
2519
3431
  start: 20.0,
2520
3432
  end: 15000.0,
@@ -2522,6 +3434,16 @@ function Slider(param) {
2522
3434
  skew: 0.7
2523
3435
  } : _param_mockProperties;
2524
3436
  var sliderElementRef = useRef(null);
3437
+ var isNarrowTrack = barSliderVariant === "narrowTrack";
3438
+ var isWideTrack = barSliderVariant === "wideTrack";
3439
+ var isHorizontal = orientation === Orientation.horizontal;
3440
+ var isVertical = orientation === Orientation.vertical;
3441
+ var defaultShowValueState = barSliderVariant === "narrowTrack" ? true : false;
3442
+ dragOrientation = isHorizontal ? Orientation.horizontal : orientation;
3443
+ var multiColorGradient = "linear-gradient(".concat(isHorizontal ? 'to right' : 'to top', ", var(--color-brand) 0%, var(--color-brand-secondary) 100%");
3444
+ var singleColorGradient = "linear-gradient(".concat(isHorizontal ? 'to right' : 'to top', ", var(--color-brand-700) 0%, var(--color-brand) 100%");
3445
+ var _obj;
3446
+ var selectedGradientMap = (_obj = {}, _define_property$c(_obj, GradientStyles.multicolor, multiColorGradient), _define_property$c(_obj, GradientStyles.unicolor, singleColorGradient), _obj);
2525
3447
  var _useSlider = useSlider({
2526
3448
  id: id,
2527
3449
  label: label,
@@ -2529,115 +3451,100 @@ function Slider(param) {
2529
3451
  mockInitialNormalisedValue: mockInitialNormalisedValue,
2530
3452
  onChange: onChange,
2531
3453
  isRandomizable: isRandomizable,
3454
+ orientation: orientation,
3455
+ dragOrientation: dragOrientation,
2532
3456
  sliderElementRef: sliderElementRef
2533
- }), // bindBarSliderDrag,
2534
- bindSequenceBarSliderDrag = _useSlider.bindSequenceBarSliderDrag, bindDrag = _useSlider.bindDrag, normalisedValue = _useSlider.normalisedValue;
2535
- var drag = isStandalone ? bindDrag : bindSequenceBarSliderDrag;
3457
+ }), bindBarSliderDrag = _useSlider.bindBarSliderDrag, bindSequenceBarSliderDrag = _useSlider.bindSequenceBarSliderDrag, // bindDrag,
3458
+ normalisedValue = _useSlider.normalisedValue, setNormalisedState = _useSlider.setNormalisedState, properties = _useSlider.properties;
3459
+ var drag = isStandalone ? bindBarSliderDrag : bindSequenceBarSliderDrag;
2536
3460
  return /*#__PURE__*/ React__default.createElement(Box, {
2537
3461
  flexDirection: Box.flexDirection.column,
2538
3462
  justifyContent: Box.justifyContent.center,
2539
- className: classnames(className),
2540
- flex: '1',
3463
+ className: classnames('BarSlider', isNarrowTrack && 'BarSlider--narrowTrack', isWideTrack && 'BarSlider--wideTrack', isVertical && 'BarSlider--isVertical', isHorizontal && 'BarSlider--isHorizontal', className),
2541
3464
  id: id,
2542
- ref: sliderElementRef
2543
- }, polarity === Polarity.bipolar && /*#__PURE__*/ React__default.createElement("div", {
3465
+ ref: sliderElementRef,
3466
+ gap: Box.gap.small,
3467
+ height: isVertical ? '100%' : 'auto',
3468
+ style: {
3469
+ position: 'relative'
3470
+ }
3471
+ }, ' ', label ? /*#__PURE__*/ React__default.createElement(Label, {
3472
+ fontSize: Label.fontSize.xSmall,
3473
+ value: label,
3474
+ color: "var(--color-text)"
3475
+ }) : null, polarity === Polarity.bipolar && /*#__PURE__*/ React__default.createElement("div", {
2544
3476
  className: 'Slider-center-marker'
2545
- }), /*#__PURE__*/ React__default.createElement("div", _object_spread_props$1(_object_spread$d({
2546
- className: classnames('Slider', 'Slider-bar')
3477
+ }), /*#__PURE__*/ React__default.createElement(Box, {
3478
+ padding: isNarrowTrack ? (showValue !== null && showValue !== void 0 ? showValue : defaultShowValueState) ? [
3479
+ Box.padding.mediumSmall,
3480
+ Box.padding.mediumSmall,
3481
+ Box.padding.none,
3482
+ Box.padding.mediumSmall
3483
+ ] : [
3484
+ Box.padding.mediumSmall
3485
+ ] : [
3486
+ Box.padding.none
3487
+ ],
3488
+ height: "100%"
3489
+ }, /*#__PURE__*/ React__default.createElement("div", _object_spread_props$1(_object_spread$c({
3490
+ className: classnames('BarSlider-Track', isHighlighted && 'isHighlighted')
2547
3491
  }, drag()), {
2548
3492
  // onMouseEnter={onMouseEnter}
2549
3493
  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'
3494
+ style: _object_spread$c({
3495
+ background: trackColor,
3496
+ stroke: trackStrokeColor ? "1px solid ".concat(trackStrokeColor) : 'none'
2556
3497
  }, style)
2557
- }), normalisedValue ? /*#__PURE__*/ React__default.createElement("div", {
3498
+ }), normalisedValue !== null && normalisedValue !== undefined ? /*#__PURE__*/ React__default.createElement("div", {
3499
+ className: "Barslider-IndicatorLineWrapper"
3500
+ }, /*#__PURE__*/ React__default.createElement("div", {
2558
3501
  // 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'
3502
+ // className={classnames('h-full', 'w-full', 'absolute', 'bg-panel')}
3503
+ className: "BarSlider-IndicatorLine",
3504
+ style: _object_spread$c({
3505
+ background: indicatorLineGradient ? selectedGradientMap[indicatorLineGradient] : indicatorLineColor,
3506
+ opacity: isStandalone || isHighlighted ? '100%' : '80%',
3507
+ top: "".concat(isHorizontal && isNarrowTrack && 'calc(50% - 3px)'),
3508
+ left: "".concat(isVertical && isNarrowTrack && 'calc(50% - 3px)')
2564
3509
  }, getBarTransformStyles({
2565
- orientation: sliderOrientation,
3510
+ orientation: orientation,
2566
3511
  polarity: polarity,
2567
3512
  normalisedValue: normalisedValue
2568
3513
  }))
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
- }));
3514
+ })) : '', isNarrowTrack ? /*#__PURE__*/ React__default.createElement("div", {
3515
+ className: "BarSlider-MarkerWrapper",
3516
+ style: {
3517
+ bottom: '2px'
2611
3518
  }
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, {
3519
+ }, /*#__PURE__*/ React__default.createElement("div", {
3520
+ className: "BarSlider-Marker",
3521
+ style: {
3522
+ bottom: isVertical ? "calc(".concat(normalisedValue * 100, "% - 6px)") : '-6px',
3523
+ left: isHorizontal ? "calc(".concat(normalisedValue * 100, "% - 6px)") : '-6px'
3524
+ }
3525
+ }, /*#__PURE__*/ React__default.createElement(BarSliderMarker, {
3526
+ markerFillColor: markerFillColor,
3527
+ markerStrokeColor: markerStrokeColor,
3528
+ strokeWidth: 5
3529
+ }))) : null)), (showValue !== null && showValue !== void 0 ? showValue : defaultShowValueState) ? /*#__PURE__*/ React__default.createElement(Input, {
3530
+ className: "BarSlider-Input ".concat(includeValueInHeight ? 'includeValueInHeightIsTrue' : 'includeValueInHeightIsFalse'),
3531
+ value: normalisedValue,
2625
3532
  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);
3533
+ min: (properties === null || properties === void 0 ? void 0 : properties.start) || 0,
3534
+ max: (properties === null || properties === void 0 ? void 0 : properties.end) || 0,
3535
+ type: Input.type.number,
3536
+ textColor: 'var(--bg-lv12)',
3537
+ style: {
3538
+ },
3539
+ textAlign: Input.textAlign.center,
3540
+ onComplete: function(value) {
3541
+ normalisedValue !== undefined && setNormalisedState(normalisedValue);
3542
+ }
3543
+ }) : null);
2637
3544
  }
2638
- Heading.fontSize = FontSizes;
2639
- Heading.tag = HeadingTags;
2640
- Heading.padding = Spacing;
3545
+ Slider$1.sliderType = SliderType;
3546
+ Slider$1.polarity = Polarity;
3547
+ Slider$1.orientation = Orientation;
2641
3548
 
2642
3549
  function _array_like_to_array$c(arr, len) {
2643
3550
  if (len == null || len > arr.length) len = arr.length;
@@ -2685,45 +3592,202 @@ function _unsupported_iterable_to_array$c(o, minLen) {
2685
3592
  if (n === "Map" || n === "Set") return Array.from(n);
2686
3593
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$c(o, minLen);
2687
3594
  }
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
3595
+ var useCombobox = function(param) {
3596
+ 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;
3597
+ var _Object_values;
3598
+ var comboBoxState = Juce.getComboBoxState(id);
3599
+ var _useState = _sliced_to_array$c(useState(comboBoxState === null || comboBoxState === void 0 ? void 0 : comboBoxState.properties), 2), properties = _useState[0], setProperties = _useState[1];
3600
+ var _useState1 = _sliced_to_array$c(useState(0), 2), index = _useState1[0], setIndex = _useState1[1];
3601
+ var prevIndex = useRef(null);
3602
+ var nextIndex = useRef(null);
3603
+ var prevDragDirection = useRef(null);
3604
+ 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;
3605
+ //TODO: Filter choices for subsequent rows
3606
+ // const availableChoices = properties?.choices;
2703
3607
  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);
3608
+ setIndex(comboBoxState === null || comboBoxState === void 0 ? void 0 : comboBoxState.getChoiceIndex());
2707
3609
  }, [
2708
3610
  id
2709
3611
  ]);
2710
- // Sets up listeners to handle changes on the backend
2711
3612
  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);
3613
+ setProperties(comboBoxState === null || comboBoxState === void 0 ? void 0 : comboBoxState.properties);
3614
+ });
3615
+ useEffect(function() {
3616
+ if (modSlotPreview.slotId === id) {
3617
+ setIndex(modSlotPreview.targetIndex);
3618
+ }
3619
+ }, [
3620
+ modSlotTargets,
3621
+ modSlotPreview
3622
+ ]);
3623
+ useEffect(function() {
3624
+ var _comboBoxState_valueChangedEvent, _comboBoxState_propertiesChangedEvent;
3625
+ var valueListenerId = comboBoxState === null || comboBoxState === void 0 ? void 0 : (_comboBoxState_valueChangedEvent = comboBoxState.valueChangedEvent) === null || _comboBoxState_valueChangedEvent === void 0 ? void 0 : _comboBoxState_valueChangedEvent.addListener(function() {
3626
+ if ((comboBoxState === null || comboBoxState === void 0 ? void 0 : comboBoxState.getChoiceIndex()) !== prevIndex) {
3627
+ setIndex(comboBoxState === null || comboBoxState === void 0 ? void 0 : comboBoxState.getChoiceIndex());
3628
+ }
3629
+ });
3630
+ var propertiesListenerId = comboBoxState === null || comboBoxState === void 0 ? void 0 : (_comboBoxState_propertiesChangedEvent = comboBoxState.propertiesChangedEvent) === null || _comboBoxState_propertiesChangedEvent === void 0 ? void 0 : _comboBoxState_propertiesChangedEvent.addListener(function() {
3631
+ setProperties(comboBoxState === null || comboBoxState === void 0 ? void 0 : comboBoxState.properties);
2716
3632
  });
2717
3633
  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);
3634
+ var _comboBoxState_valueChangedEvent, _comboBoxState_propertiesChangedEvent;
3635
+ comboBoxState === null || comboBoxState === void 0 ? void 0 : (_comboBoxState_valueChangedEvent = comboBoxState.valueChangedEvent) === null || _comboBoxState_valueChangedEvent === void 0 ? void 0 : _comboBoxState_valueChangedEvent.removeListener(valueListenerId);
3636
+ comboBoxState === null || comboBoxState === void 0 ? void 0 : (_comboBoxState_propertiesChangedEvent = comboBoxState.propertiesChangedEvent) === null || _comboBoxState_propertiesChangedEvent === void 0 ? void 0 : _comboBoxState_propertiesChangedEvent.removeListener(propertiesListenerId);
2720
3637
  };
3638
+ }, [
3639
+ window
3640
+ ]);
3641
+ var selectedChoices = (_Object_values = Object.values(modSlotTargets)) === null || _Object_values === void 0 ? void 0 : _Object_values.filter(function(item) {
3642
+ return item > 0;
3643
+ });
3644
+ var selectedLabels = automatableParamLabels === null || automatableParamLabels === void 0 ? void 0 : automatableParamLabels.filter(function(item, i) {
3645
+ return selectedChoices === null || selectedChoices === void 0 ? void 0 : selectedChoices.includes(i);
3646
+ });
3647
+ var displayedLabels = automatableParamLabels === null || automatableParamLabels === void 0 ? void 0 : automatableParamLabels.filter(function(item) {
3648
+ return !(selectedLabels === null || selectedLabels === void 0 ? void 0 : selectedLabels.includes(item)) || item === automatableParamLabels[index];
3649
+ });
3650
+ var filteredChoices = filter && (filter === null || filter === void 0 ? void 0 : filter.length) > 1 ? displayedLabels === null || displayedLabels === void 0 ? void 0 : displayedLabels.filter(function(item) {
3651
+ var _item_toLowerCase;
3652
+ 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());
3653
+ }) : displayedLabels;
3654
+ // const prevIndex = useRef<string | null>(null);
3655
+ // const handleChange = (newValue: number) => {
3656
+ // if (newValue !== prevIndex.current) {
3657
+ // // const juceIndex = automatableParamLabels?.indexOf(newValue);
3658
+ // // comboBoxState?.setChoiceIndex(newValue);s
3659
+ // setIndex(newValue);
3660
+ // // onChange && onChange(newValue);
3661
+ // // //@ts-expect-error
3662
+ // // window.__JUCE__.backend.emitEvent('undoableActionOccurred', {});
3663
+ // if (displayValInHeader) {
3664
+ // highlightedItemChanged({
3665
+ // label,
3666
+ // value: automatableParamLabels?.[newValue],
3667
+ // });
3668
+ // }
3669
+ // prevIndex.current = newValue;
3670
+ // }
3671
+ // };
3672
+ var incrementIndex = throttle(function() {
3673
+ nextIndex.current = index + 1;
3674
+ }, 100);
3675
+ var decrementIndex = throttle(function() {
3676
+ nextIndex.current = index - 1;
3677
+ }, 100);
3678
+ // Used in RotaryCombobox
3679
+ var bindDrag = useGesture({
3680
+ onDrag: function(param) {
3681
+ var direction = param.direction;
3682
+ //TODO: Move this out of useSlider
3683
+ if (id !== modSlotPreview.rowId) {
3684
+ setModSlotRowTargetAsPreview({
3685
+ paramId: id
3686
+ });
3687
+ }
3688
+ var directionY;
3689
+ if (direction[1] * -1 === 1 && directionY !== prevDragDirection.current) {
3690
+ directionY = 1;
3691
+ } else if (direction[1] * -1 === -1 && directionY !== prevDragDirection.current) {
3692
+ directionY = -1;
3693
+ }
3694
+ if (index < (properties === null || properties === void 0 ? void 0 : properties.choices.length) && directionY && directionY === 1) {
3695
+ incrementIndex();
3696
+ } else if (index > 0 && directionY && directionY === -1) {
3697
+ decrementIndex();
3698
+ }
3699
+ // console.log(nextIndex.current, 'nextIndexnextIndexnextIndex');
3700
+ if (nextIndex.current !== null && nextIndex.current !== undefined && nextIndex.current !== index.current) {
3701
+ comboBoxState === null || comboBoxState === void 0 ? void 0 : comboBoxState.setChoiceIndex(nextIndex.current);
3702
+ }
3703
+ }
3704
+ }, {
3705
+ enabled: !isDisabled
2721
3706
  });
3707
+ var onMouseEnter = function() {
3708
+ if (displayValInHeader) {
3709
+ highlightedItemChanged({
3710
+ label: label,
3711
+ value: automatableParamLabels === null || automatableParamLabels === void 0 ? void 0 : automatableParamLabels[index]
3712
+ });
3713
+ }
3714
+ };
3715
+ var onClick = function() {
3716
+ setModSlotRowTargetAsPreview({
3717
+ paramId: id
3718
+ });
3719
+ };
3720
+ var onDoubleClick = function() {
3721
+ setModSlotRowTargetAsPreview({
3722
+ paramId: id
3723
+ });
3724
+ };
2722
3725
  return {
2723
- isActive: isActive
3726
+ index: index,
3727
+ valueString: automatableParamLabels === null || automatableParamLabels === void 0 ? void 0 : automatableParamLabels[index],
3728
+ setIndex: setIndex,
3729
+ choices: properties === null || properties === void 0 ? void 0 : properties.choices,
3730
+ filteredChoices: filteredChoices,
3731
+ onMouseEnter: onMouseEnter,
3732
+ onClick: onClick,
3733
+ onDoubleClick: onDoubleClick,
3734
+ bindDrag: bindDrag
2724
3735
  };
2725
3736
  };
2726
3737
 
3738
+ // Rotary Slider UI component.
3739
+ // Connects to Juce's Slider element
3740
+ function RotaryCombobox(param) {
3741
+ 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,
3742
+ 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;
3743
+ var _useCombobox = useCombobox({
3744
+ id: id
3745
+ }), index = _useCombobox.index, choices = _useCombobox.choices, valueString = _useCombobox.valueString, onDoubleClick = _useCombobox.onDoubleClick, bindDrag = _useCombobox.bindDrag;
3746
+ return /*#__PURE__*/ React__default.createElement(ControlGroup, {
3747
+ id: id
3748
+ }, /*#__PURE__*/ React__default.createElement(Box, {
3749
+ className: "RotarySlider-wrapper",
3750
+ flexDirection: Box.flexDirection.column,
3751
+ gap: Box.gap.none,
3752
+ flex: "0 1 auto"
3753
+ }, label ? /*#__PURE__*/ React__default.createElement(Label, {
3754
+ padding: [
3755
+ Label.padding.none,
3756
+ Label.padding.none,
3757
+ Label.padding.small,
3758
+ Label.padding.none
3759
+ ],
3760
+ fontSize: Label.fontSize.xSmall,
3761
+ value: label
3762
+ }) : null, /*#__PURE__*/ React__default.createElement(RotaryCircle, {
3763
+ polarity: polarity,
3764
+ className: className,
3765
+ id: id,
3766
+ markerShape: markerShape,
3767
+ trackWidth: trackWidth,
3768
+ // trackOffset={trackOffset}
3769
+ sliderValue: scaledToNormalised({
3770
+ scaledValue: index,
3771
+ start: 0,
3772
+ end: choices.length - 1
3773
+ }),
3774
+ bindDrag: bindDrag,
3775
+ onDoubleClick: onDoubleClick,
3776
+ size: size,
3777
+ indicatorLineColor: indicatorLineColor,
3778
+ indicatorLineGradient: indicatorLineGradient,
3779
+ trackColor: trackColor,
3780
+ trackStrokeColor: trackStrokeColor,
3781
+ knobStrokeColor: knobStrokeColor,
3782
+ knobFillColor: knobFillColor
3783
+ }), /*#__PURE__*/ React__default.createElement(Label, {
3784
+ fontSize: Label.fontSize.xSmall
3785
+ }, valueString)));
3786
+ }
3787
+ RotaryCombobox.polarity = Polarity;
3788
+ RotaryCombobox.size = RotarySliderSizes;
3789
+ RotaryCombobox.markerShape = RotarySliderMarkerShapes;
3790
+
2727
3791
  function _define_property$b(obj, key, value) {
2728
3792
  if (key in obj) {
2729
3793
  Object.defineProperty(obj, key, {
@@ -2752,324 +3816,338 @@ function _object_spread$b(target) {
2752
3816
  }
2753
3817
  return target;
2754
3818
  }
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", {
3819
+ // Rotary Slider UI component.
3820
+ // Connects to Juce's Slider element
3821
+ function PositioningWrapper(param) {
3822
+ 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;
3823
+ return /*#__PURE__*/ React__default.createElement("div", {
2765
3824
  id: id,
2766
- className: classnames('IndicatorLight', 'bg-input', className),
3825
+ className: className,
2767
3826
  style: _object_spread$b({
2768
- width: '12px',
2769
- height: '12px',
2770
- background: isActive ? color : ''
3827
+ position: 'relative',
3828
+ height: height,
3829
+ width: width,
3830
+ margin: margin
2771
3831
  }, style)
2772
- }), label ? /*#__PURE__*/ React__default.createElement(Label, {
2773
- value: label
2774
- }) : null);
3832
+ }, children, /*#__PURE__*/ React__default.createElement("div", {
3833
+ style: {
3834
+ position: 'absolute',
3835
+ top: top,
3836
+ right: right,
3837
+ bottom: bottom,
3838
+ left: left
3839
+ }
3840
+ }, positionedElement ? positionedElement : null));
2775
3841
  }
2776
3842
 
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;
3843
+ function _array_like_to_array$b(arr, len) {
3844
+ if (len == null || len > arr.length) len = arr.length;
3845
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3846
+ return arr2;
2792
3847
  }
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
- }));
3848
+ function _array_with_holes$b(arr) {
3849
+ if (Array.isArray(arr)) return arr;
3850
+ }
3851
+ function _iterable_to_array_limit$b(arr, i) {
3852
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
3853
+ if (_i == null) return;
3854
+ var _arr = [];
3855
+ var _n = true;
3856
+ var _d = false;
3857
+ var _s, _e;
3858
+ try {
3859
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
3860
+ _arr.push(_s.value);
3861
+ if (i && _arr.length === i) break;
3862
+ }
3863
+ } catch (err) {
3864
+ _d = true;
3865
+ _e = err;
3866
+ } finally{
3867
+ try {
3868
+ if (!_n && _i["return"] != null) _i["return"]();
3869
+ } finally{
3870
+ if (_d) throw _e;
2801
3871
  }
2802
- ownKeys.forEach(function(key) {
2803
- _define_property$a(target, key, source[key]);
2804
- });
2805
3872
  }
2806
- return target;
2807
- }
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
3873
+ return _arr;
3874
+ }
3875
+ function _non_iterable_rest$b() {
3876
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3877
+ }
3878
+ function _sliced_to_array$b(arr, i) {
3879
+ return _array_with_holes$b(arr) || _iterable_to_array_limit$b(arr, i) || _unsupported_iterable_to_array$b(arr, i) || _non_iterable_rest$b();
3880
+ }
3881
+ function _unsupported_iterable_to_array$b(o, minLen) {
3882
+ if (!o) return;
3883
+ if (typeof o === "string") return _array_like_to_array$b(o, minLen);
3884
+ var n = Object.prototype.toString.call(o).slice(8, -1);
3885
+ if (n === "Object" && o.constructor) n = o.constructor.name;
3886
+ if (n === "Map" || n === "Set") return Array.from(n);
3887
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$b(o, minLen);
3888
+ }
3889
+ // 20.0f, 15000.0f, 0.1f, 0.7f),800.0f
3890
+ // ValueType rangeStart, ValueType rangeEnd, ValueType intervalValue, ValueType skewFactor, bool useSymmetricSkew=false)
3891
+ var DataSource = /*#__PURE__*/ function(DataSource) {
3892
+ DataSource["sliderAttachment"] = "sliderAttachment";
3893
+ DataSource["buttonAttachment"] = "buttonAttachment";
3894
+ DataSource["event"] = "event";
3895
+ return DataSource;
3896
+ }({});
3897
+ var useIndicator = function(param) {
3898
+ var id = param.id, _param_dataSource = param.dataSource, dataSource = _param_dataSource === void 0 ? "buttonAttachment" : _param_dataSource;
3899
+ var isLocalhost = window.location.hostname === 'localhost';
3900
+ // This value should be a range from 0 to 1
3901
+ var _useState = _sliced_to_array$b(useState(0), 2), brightness = _useState[0], setBrightness = _useState[1];
3902
+ var updateState = function() {
3903
+ if (!isLocalhost && dataSource === "buttonAttachment") {
3904
+ var _Juce_getToggleState;
3905
+ var toggleState = (_Juce_getToggleState = Juce.getToggleState(id)) === null || _Juce_getToggleState === void 0 ? void 0 : _Juce_getToggleState.value;
3906
+ setBrightness(toggleState);
3907
+ } else if (!isLocalhost && dataSource === "sliderAttachment") {
3908
+ var sliderState = Juce.getSliderState(id);
3909
+ setBrightness(sliderState === null || sliderState === void 0 ? void 0 : sliderState.normalisedValue);
3910
+ }
3911
+ };
3912
+ // Set the initial state
3913
+ useEffect(function() {
3914
+ updateState();
3915
+ }, []);
3916
+ // Update the local state when the ID changes
3917
+ useEffect(function() {
3918
+ updateState();
3919
+ }, [
3920
+ id
3921
+ ]);
3922
+ // Sets up listeners to handle changes on the backend
3923
+ useEffect(function() {
3924
+ if (!isLocalhost && dataSource === "buttonAttachment") {
3925
+ var _toggleState_valueChangedEvent;
3926
+ var toggleState = Juce.getToggleState(id);
3927
+ var valueListenerId = toggleState === null || toggleState === void 0 ? void 0 : (_toggleState_valueChangedEvent = toggleState.valueChangedEvent) === null || _toggleState_valueChangedEvent === void 0 ? void 0 : _toggleState_valueChangedEvent.addListener(function() {
3928
+ setBrightness(toggleState);
3929
+ });
3930
+ return function cleanup() {
3931
+ var _toggleState_valueChangedEvent;
3932
+ toggleState === null || toggleState === void 0 ? void 0 : (_toggleState_valueChangedEvent = toggleState.valueChangedEvent) === null || _toggleState_valueChangedEvent === void 0 ? void 0 : _toggleState_valueChangedEvent.removeListener(valueListenerId);
3933
+ };
3934
+ } else if (!isLocalhost && dataSource === "sliderAttachment") {
3935
+ var _sliderState_valueChangedEvent;
3936
+ var sliderState = Juce.getSliderState(id);
3937
+ var valueListenerId1 = sliderState === null || sliderState === void 0 ? void 0 : (_sliderState_valueChangedEvent = sliderState.valueChangedEvent) === null || _sliderState_valueChangedEvent === void 0 ? void 0 : _sliderState_valueChangedEvent.addListener(function() {
3938
+ setBrightness(sliderState);
3939
+ });
3940
+ return function cleanup() {
3941
+ var _sliderState_valueChangedEvent;
3942
+ sliderState === null || sliderState === void 0 ? void 0 : (_sliderState_valueChangedEvent = sliderState.valueChangedEvent) === null || _sliderState_valueChangedEvent === void 0 ? void 0 : _sliderState_valueChangedEvent.removeListener(valueListenerId1);
3943
+ };
3944
+ } else if (!isLocalhost && dataSource === "event") {
3945
+ var getLFOOutdata = id && //@ts-expect-error
3946
+ window.__JUCE__.backend.addEventListener("".concat(id), function(event) {
3947
+ setBrightness(event);
3948
+ });
3949
+ return function cleanup() {
3950
+ //@ts-expect-error
3951
+ window.__JUCE__.backend.removeEventListener(getLFOOutdata);
3952
+ };
3953
+ } else {
3954
+ return;
3955
+ }
3956
+ });
3957
+ return {
3958
+ dataSource: dataSource,
3959
+ brightness: brightness
3960
+ };
3047
3961
  };
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];
3962
+
3963
+ function _define_property$a(obj, key, value) {
3964
+ if (key in obj) {
3965
+ Object.defineProperty(obj, key, {
3966
+ value: value,
3967
+ enumerable: true,
3968
+ configurable: true,
3969
+ writable: true
3970
+ });
3971
+ } else {
3972
+ obj[key] = value;
3973
+ }
3974
+ return obj;
3975
+ }
3976
+ function _object_spread$a(target) {
3977
+ for(var i = 1; i < arguments.length; i++){
3978
+ var source = arguments[i] != null ? arguments[i] : {};
3979
+ var ownKeys = Object.keys(source);
3980
+ if (typeof Object.getOwnPropertySymbols === "function") {
3981
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
3982
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
3983
+ }));
3984
+ }
3985
+ ownKeys.forEach(function(key) {
3986
+ _define_property$a(target, key, source[key]);
3987
+ });
3988
+ }
3989
+ return target;
3990
+ }
3991
+ function IndicatorLight(param) {
3992
+ 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;
3993
+ var brightness = useIndicator({
3994
+ id: id,
3995
+ dataSource: dataSource
3996
+ }).brightness;
3057
3997
  return /*#__PURE__*/ React__default.createElement(Box, {
3058
- className: "Icon ".concat(className ? className : ''),
3059
- onClick: onClick,
3060
- padding: padding,
3998
+ flexDirection: Box.flexDirection.column,
3999
+ gap: Box.gap.small,
4000
+ alignItems: Box.alignItems.center,
4001
+ width: "auto"
4002
+ }, /*#__PURE__*/ React__default.createElement("div", {
3061
4003
  style: _object_spread$a({
3062
- width: width,
3063
- height: height
4004
+ position: 'relative',
4005
+ width: '12px',
4006
+ height: '12px',
4007
+ borderRadius: shape === "round" ? '100%' : 'initial',
4008
+ overflow: 'hidden'
3064
4009
  }, style)
3065
- }, /*#__PURE__*/ React__default.createElement(_$Icon, {
3066
- height: width,
3067
- color: disabled ? 'var(--color-gray-400)' : color
3068
- }));
4010
+ }, /*#__PURE__*/ React__default.createElement("div", {
4011
+ className: classnames('IndicatorLight-bg', 'bg-panel', className),
4012
+ style: {
4013
+ width: '12px',
4014
+ height: '12px',
4015
+ position: 'absolute',
4016
+ top: 0,
4017
+ right: 0,
4018
+ bottom: 0,
4019
+ left: 0,
4020
+ background: inactiveColor
4021
+ }
4022
+ }), /*#__PURE__*/ React__default.createElement("div", {
4023
+ className: classnames('IndicatorLight', 'bg-panel', className),
4024
+ style: {
4025
+ opacity: brightness,
4026
+ // transition: `opacity 500ms ease-in`,
4027
+ background: activeColor,
4028
+ position: 'absolute',
4029
+ width: '12px',
4030
+ height: '12px',
4031
+ top: 0,
4032
+ right: 0,
4033
+ bottom: 0,
4034
+ left: 0
4035
+ }
4036
+ })), label ? /*#__PURE__*/ React__default.createElement(Label, {
4037
+ value: label
4038
+ }) : null);
3069
4039
  }
3070
- Icon.icon = Icons;
3071
- Icon.padding = Spacing;
3072
- Icon.margin = Spacing;
4040
+ IndicatorLight.dataSource = DataSource;
4041
+
4042
+ // Rotary Slider UI component.
4043
+ // Connects to Juce's Slider element
4044
+ var SliderVariants = /*#__PURE__*/ function(SliderVariants) {
4045
+ SliderVariants["bar"] = "bar";
4046
+ SliderVariants["rotary"] = "rotary";
4047
+ SliderVariants["rotaryCombobox"] = "rotaryCombobox";
4048
+ return SliderVariants;
4049
+ }({});
4050
+ function Slider(param) {
4051
+ 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,
4052
+ 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;
4053
+ var totalWidth = "".concat(rotarySliderSizeMap[size].width + 35, "px");
4054
+ var totalHeight = "calc(".concat(rotarySliderSizeMap[size].width, " + 1em + ").concat(label ? 1 : 0, "em)");
4055
+ return /*#__PURE__*/ React__default.createElement(React__default.Fragment, null, variant === "rotary" ? /*#__PURE__*/ React__default.createElement(PositioningWrapper, {
4056
+ top: '25%',
4057
+ left: '-8px',
4058
+ width: totalWidth,
4059
+ height: totalHeight,
4060
+ positionedElement: indicatorId ? /*#__PURE__*/ React__default.createElement(IndicatorLight, {
4061
+ id: indicatorId,
4062
+ dataSource: IndicatorLight.dataSource.event
4063
+ }) : null
4064
+ }, /*#__PURE__*/ React__default.createElement(RotarySlider, {
4065
+ polarity: polarity,
4066
+ label: label,
4067
+ labelColor: labelColor,
4068
+ trackWidth: trackWidth,
4069
+ indicatorLineColor: indicatorLineColor,
4070
+ indicatorLineGradient: indicatorLineGradient,
4071
+ // trackOffset={trackOffset}
4072
+ markerShape: markerShape,
4073
+ trackColor: trackColor,
4074
+ trackStrokeColor: trackStrokeColor,
4075
+ knobStrokeColor: knobStrokeColor,
4076
+ knobFillColor: knobFillColor,
4077
+ className: className,
4078
+ id: id,
4079
+ onChange: onChange,
4080
+ size: size,
4081
+ mockInitialNormalisedValue: mockInitialNormalisedValue,
4082
+ isRandomizable: isRandomizable,
4083
+ rotationBehavior: rotationBehavior
4084
+ })) : null, variant === "rotaryCombobox" ? /*#__PURE__*/ React__default.createElement(PositioningWrapper, {
4085
+ top: '25%',
4086
+ left: '-8px',
4087
+ width: totalWidth,
4088
+ height: totalHeight,
4089
+ positionedElement: indicatorId ? /*#__PURE__*/ React__default.createElement(IndicatorLight, {
4090
+ id: indicatorId,
4091
+ dataSource: IndicatorLight.dataSource.event
4092
+ }) : null
4093
+ }, /*#__PURE__*/ React__default.createElement(RotaryCombobox, {
4094
+ polarity: polarity,
4095
+ label: label,
4096
+ labelColor: labelColor,
4097
+ trackWidth: trackWidth,
4098
+ indicatorLineColor: indicatorLineColor,
4099
+ indicatorLineGradient: indicatorLineGradient,
4100
+ // trackOffset={trackOffset}
4101
+ markerShape: markerShape,
4102
+ trackColor: trackColor,
4103
+ trackStrokeColor: trackStrokeColor,
4104
+ knobStrokeColor: knobStrokeColor,
4105
+ knobFillColor: knobFillColor,
4106
+ className: className,
4107
+ id: id,
4108
+ onChange: onChange,
4109
+ size: size,
4110
+ mockInitialNormalisedValue: mockInitialNormalisedValue,
4111
+ isRandomizable: isRandomizable,
4112
+ rotationBehavior: rotationBehavior
4113
+ })) : null, variant === "bar" ? /*#__PURE__*/ React__default.createElement(Slider$1, {
4114
+ polarity: polarity,
4115
+ label: label,
4116
+ indicatorLineColor: indicatorLineColor,
4117
+ indicatorLineGradient: indicatorLineGradient,
4118
+ trackColor: trackColor,
4119
+ trackStrokeColor: trackStrokeColor,
4120
+ markerFillColor: markerFillColor,
4121
+ markerStrokeColor: markerStrokeColor,
4122
+ className: className,
4123
+ barSliderVariant: barSliderVariant,
4124
+ showValue: showValue,
4125
+ id: id,
4126
+ onChange: onChange,
4127
+ mockInitialNormalisedValue: mockInitialNormalisedValue,
4128
+ isRandomizable: isRandomizable,
4129
+ orientation: orientation,
4130
+ dragOrientation: dragOrientation,
4131
+ isStandalone: isStandalone,
4132
+ isHighlighted: isHighlighted,
4133
+ includeValueInHeight: includeValueInHeight
4134
+ }) : null);
4135
+ }
4136
+ Slider.polarity = Polarity;
4137
+ Slider.size = RotarySliderSizes;
4138
+ Slider.variant = SliderVariants;
4139
+ Slider.barSliderVariant = BarSliderVariants;
4140
+ Slider.orientation = Orientation;
4141
+ Slider.markerShape = RotarySliderMarkerShapes;
4142
+ Slider.gradientStyles = GradientStyles;
4143
+
4144
+ var HeadingTags = /*#__PURE__*/ function(HeadingTags) {
4145
+ HeadingTags["h1"] = "h1";
4146
+ HeadingTags["h2"] = "h2";
4147
+ HeadingTags["h3"] = "h3";
4148
+ HeadingTags["h4"] = "h4";
4149
+ return HeadingTags;
4150
+ }({});
3073
4151
 
3074
4152
  function _define_property$9(obj, key, value) {
3075
4153
  if (key in obj) {
@@ -3099,33 +4177,32 @@ function _object_spread$9(target) {
3099
4177
  }
3100
4178
  return target;
3101
4179
  }
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, {
4180
+ function Heading(param) {
4181
+ 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 ? [
4182
+ Spacing.none
4183
+ ] : _param_padding, _param_fontSize = param.fontSize, fontSize = _param_fontSize === void 0 ? FontSizes.large : _param_fontSize, children = param.children;
4184
+ var Tag = tag;
4185
+ var _padding_, _padding_1, _padding_2, _ref;
4186
+ return /*#__PURE__*/ React.createElement(Tag, {
3110
4187
  id: id,
3111
- className: "IconButton ".concat(className ? className : ''),
3112
- onClick: onClick,
3113
- padding: padding,
3114
- margin: margin,
3115
- disabled: disabled,
3116
4188
  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
- }));
4189
+ fontSize: "var(--text-".concat(fontSize),
4190
+ paddingTop: "var(--p-".concat(padding[0], ")"),
4191
+ paddingRight: "var(--p-".concat((_padding_ = padding[1]) !== null && _padding_ !== void 0 ? _padding_ : padding[0], ")"),
4192
+ paddingBottom: "var(--p-".concat((_padding_1 = padding[2]) !== null && _padding_1 !== void 0 ? _padding_1 : padding[0], ")"),
4193
+ 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], ")"),
4194
+ WebkitUserSelect: 'none',
4195
+ userSelect: 'none',
4196
+ letterSpacing: '1px',
4197
+ lineHeight: removeLineHeight ? '.75em' : 'auto',
4198
+ color: color
4199
+ }, style),
4200
+ className: classnames('Heading', 'font-bold', 'select-none', "text-".concat(fontSize), className)
4201
+ }, value ? value : children);
3125
4202
  }
3126
- IconButton.icon = Icons;
3127
- IconButton.padding = Spacing;
3128
- IconButton.margin = Spacing;
4203
+ Heading.fontSize = FontSizes;
4204
+ Heading.tag = HeadingTags;
4205
+ Heading.padding = Spacing;
3129
4206
 
3130
4207
  function _define_property$8(obj, key, value) {
3131
4208
  if (key in obj) {
@@ -3178,10 +4255,11 @@ function KeyValueDisplayScreen(param) {
3178
4255
  Box.padding.xSmall,
3179
4256
  Box.padding.medium
3180
4257
  ],
4258
+ height: "30px",
3181
4259
  className: classnames('KeyValueDisplayScreen', 'uppercase', 'bg-popover', 'rounded-sm'),
3182
4260
  style: {
3183
4261
  maxWidth: '250px',
3184
- backgroundColor: "var(--bg-page)",
4262
+ backgroundColor: "var(--bg-lv1)",
3185
4263
  color: "var(--color-text)"
3186
4264
  }
3187
4265
  }, /*#__PURE__*/ React__default.createElement(Label, {
@@ -3274,15 +4352,15 @@ function LinePlot(param) {
3274
4352
  })) : null);
3275
4353
  }
3276
4354
 
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);
4355
+ var css_248z$5 = ".Oscilloscope {\n background: #0EAC8B;\n box-shadow: inset 0 0 20px #086350;\n height: 200px;\n };";
4356
+ styleInject(css_248z$5);
3279
4357
 
3280
- function _array_like_to_array$b(arr, len) {
4358
+ function _array_like_to_array$a(arr, len) {
3281
4359
  if (len == null || len > arr.length) len = arr.length;
3282
4360
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3283
4361
  return arr2;
3284
4362
  }
3285
- function _array_with_holes$b(arr) {
4363
+ function _array_with_holes$a(arr) {
3286
4364
  if (Array.isArray(arr)) return arr;
3287
4365
  }
3288
4366
  function _define_property$7(obj, key, value) {
@@ -3298,7 +4376,7 @@ function _define_property$7(obj, key, value) {
3298
4376
  }
3299
4377
  return obj;
3300
4378
  }
3301
- function _iterable_to_array_limit$b(arr, i) {
4379
+ function _iterable_to_array_limit$a(arr, i) {
3302
4380
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
3303
4381
  if (_i == null) return;
3304
4382
  var _arr = [];
@@ -3322,7 +4400,7 @@ function _iterable_to_array_limit$b(arr, i) {
3322
4400
  }
3323
4401
  return _arr;
3324
4402
  }
3325
- function _non_iterable_rest$b() {
4403
+ function _non_iterable_rest$a() {
3326
4404
  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
4405
  }
3328
4406
  function _object_spread$7(target) {
@@ -3340,20 +4418,20 @@ function _object_spread$7(target) {
3340
4418
  }
3341
4419
  return target;
3342
4420
  }
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();
4421
+ function _sliced_to_array$a(arr, i) {
4422
+ 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
4423
  }
3346
- function _unsupported_iterable_to_array$b(o, minLen) {
4424
+ function _unsupported_iterable_to_array$a(o, minLen) {
3347
4425
  if (!o) return;
3348
- if (typeof o === "string") return _array_like_to_array$b(o, minLen);
4426
+ if (typeof o === "string") return _array_like_to_array$a(o, minLen);
3349
4427
  var n = Object.prototype.toString.call(o).slice(8, -1);
3350
4428
  if (n === "Object" && o.constructor) n = o.constructor.name;
3351
4429
  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);
4430
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$a(o, minLen);
3353
4431
  }
3354
4432
  function Oscilloscope(param) {
3355
4433
  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];
4434
+ var _useState = _sliced_to_array$a(useState([]), 2), viewData = _useState[0], setViewData = _useState[1];
3357
4435
  var cycleLength = useRef(0);
3358
4436
  useEffect(function() {
3359
4437
  //@ts-expect-error
@@ -3391,18 +4469,18 @@ function Oscilloscope(param) {
3391
4469
  }));
3392
4470
  }
3393
4471
 
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);
4472
+ 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";
4473
+ styleInject(css_248z$4);
3396
4474
 
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);
4475
+ 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";
4476
+ styleInject(css_248z$3);
3399
4477
 
3400
- function _array_like_to_array$a(arr, len) {
4478
+ function _array_like_to_array$9(arr, len) {
3401
4479
  if (len == null || len > arr.length) len = arr.length;
3402
4480
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3403
4481
  return arr2;
3404
4482
  }
3405
- function _array_with_holes$a(arr) {
4483
+ function _array_with_holes$9(arr) {
3406
4484
  if (Array.isArray(arr)) return arr;
3407
4485
  }
3408
4486
  function asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, key, arg) {
@@ -3434,7 +4512,7 @@ function _async_to_generator$3(fn) {
3434
4512
  });
3435
4513
  };
3436
4514
  }
3437
- function _iterable_to_array_limit$a(arr, i) {
4515
+ function _iterable_to_array_limit$9(arr, i) {
3438
4516
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
3439
4517
  if (_i == null) return;
3440
4518
  var _arr = [];
@@ -3458,23 +4536,23 @@ function _iterable_to_array_limit$a(arr, i) {
3458
4536
  }
3459
4537
  return _arr;
3460
4538
  }
3461
- function _non_iterable_rest$a() {
4539
+ function _non_iterable_rest$9() {
3462
4540
  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
4541
  }
3464
4542
  function _object_destructuring_empty(o) {
3465
4543
  if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o);
3466
4544
  return o;
3467
4545
  }
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();
4546
+ function _sliced_to_array$9(arr, i) {
4547
+ 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
4548
  }
3471
- function _unsupported_iterable_to_array$a(o, minLen) {
4549
+ function _unsupported_iterable_to_array$9(o, minLen) {
3472
4550
  if (!o) return;
3473
- if (typeof o === "string") return _array_like_to_array$a(o, minLen);
4551
+ if (typeof o === "string") return _array_like_to_array$9(o, minLen);
3474
4552
  var n = Object.prototype.toString.call(o).slice(8, -1);
3475
4553
  if (n === "Object" && o.constructor) n = o.constructor.name;
3476
4554
  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);
4555
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$9(o, minLen);
3478
4556
  }
3479
4557
  function _ts_generator$3(thisArg, body) {
3480
4558
  var f, y, t, _ = {
@@ -3569,16 +4647,16 @@ function _ts_generator$3(thisArg, body) {
3569
4647
  }
3570
4648
  function PresetManager(param) {
3571
4649
  _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];
4650
+ var _useState = _sliced_to_array$9(useState([]), 2), presetList = _useState[0], setPresetList = _useState[1];
4651
+ var _useState1 = _sliced_to_array$9(useState(false), 2); _useState1[0]; var setIsSaving = _useState1[1];
3574
4652
  var savePresetFunc = Juce.getNativeFunction('savePreset');
3575
4653
  var loadPresetFunc = Juce.getNativeFunction('loadPreset');
3576
4654
  var getAllPresetsFunc = Juce.getNativeFunction('getAllPresets');
3577
4655
  var getCurrentPresetFunc = Juce.getNativeFunction('getCurrentPreset');
3578
4656
  var isDirtyFunc = Juce.getNativeFunction('canUndo');
3579
- var _useState2 = _sliced_to_array$a(useState(), 2), selectedPreset = _useState2[0], setSelectedPreset = _useState2[1];
4657
+ var _useState2 = _sliced_to_array$9(useState(), 2), selectedPreset = _useState2[0], setSelectedPreset = _useState2[1];
3580
4658
  var isLocalhost = window.location.hostname === 'localhost';
3581
- var _useState3 = _sliced_to_array$a(useState(false), 2), isDirty = _useState3[0], setIsDirty = _useState3[1];
4659
+ var _useState3 = _sliced_to_array$9(useState(false), 2), isDirty = _useState3[0], setIsDirty = _useState3[1];
3582
4660
  useEffect(function() {
3583
4661
  if (!isLocalhost) {
3584
4662
  var isDirtyListenerId = //@ts-expect-error
@@ -3766,10 +4844,10 @@ function PresetManager(param) {
3766
4844
  Box.padding.medium
3767
4845
  ],
3768
4846
  height: "30px",
3769
- className: "uppercase bg-popover rounded-sm PresetManagerContainer",
4847
+ className: "uppercase bg-panel rounded-sm PresetManagerContainer",
3770
4848
  style: {
3771
4849
  maxWidth: '325px',
3772
- backgroundColor: "var(--bg-page)",
4850
+ backgroundColor: "var(--bg-lv1)",
3773
4851
  color: "var(--color-text)"
3774
4852
  }
3775
4853
  }, /*#__PURE__*/ React__default.createElement(Listbox, null, /*#__PURE__*/ React__default.createElement(Listbox.Button, {
@@ -3804,10 +4882,11 @@ function PresetManager(param) {
3804
4882
  fontSize: Label.fontSize.large,
3805
4883
  className: 'PresetManagerButtonLabel'
3806
4884
  }, selectedPreset)))), /*#__PURE__*/ React__default.createElement(Box, {
3807
- flex: "0"
4885
+ flex: "0",
4886
+ gap: Box.gap.mediumSmall
3808
4887
  }, /*#__PURE__*/ React__default.createElement(IconButton, {
3809
4888
  id: "previousPreset",
3810
- width: "20px",
4889
+ width: "12px",
3811
4890
  icon: IconButton.icon.up,
3812
4891
  onClick: function(e) {
3813
4892
  e.preventDefault();
@@ -3815,7 +4894,7 @@ function PresetManager(param) {
3815
4894
  }
3816
4895
  }), /*#__PURE__*/ React__default.createElement(IconButton, {
3817
4896
  id: "nextPreset",
3818
- width: "20px",
4897
+ width: "12px",
3819
4898
  icon: IconButton.icon.down,
3820
4899
  onClick: function(e) {
3821
4900
  e.preventDefault();
@@ -3855,12 +4934,12 @@ function PresetManager(param) {
3855
4934
  }))))));
3856
4935
  }
3857
4936
 
3858
- function _array_like_to_array$9(arr, len) {
4937
+ function _array_like_to_array$8(arr, len) {
3859
4938
  if (len == null || len > arr.length) len = arr.length;
3860
4939
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3861
4940
  return arr2;
3862
4941
  }
3863
- function _array_with_holes$9(arr) {
4942
+ function _array_with_holes$8(arr) {
3864
4943
  if (Array.isArray(arr)) return arr;
3865
4944
  }
3866
4945
  function asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, key, arg) {
@@ -3905,7 +4984,7 @@ function _define_property$6(obj, key, value) {
3905
4984
  }
3906
4985
  return obj;
3907
4986
  }
3908
- function _iterable_to_array_limit$9(arr, i) {
4987
+ function _iterable_to_array_limit$8(arr, i) {
3909
4988
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
3910
4989
  if (_i == null) return;
3911
4990
  var _arr = [];
@@ -3929,7 +5008,7 @@ function _iterable_to_array_limit$9(arr, i) {
3929
5008
  }
3930
5009
  return _arr;
3931
5010
  }
3932
- function _non_iterable_rest$9() {
5011
+ function _non_iterable_rest$8() {
3933
5012
  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
5013
  }
3935
5014
  function _object_spread$6(target) {
@@ -3947,16 +5026,16 @@ function _object_spread$6(target) {
3947
5026
  }
3948
5027
  return target;
3949
5028
  }
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();
5029
+ function _sliced_to_array$8(arr, i) {
5030
+ return _array_with_holes$8(arr) || _iterable_to_array_limit$8(arr, i) || _unsupported_iterable_to_array$8(arr, i) || _non_iterable_rest$8();
3952
5031
  }
3953
- function _unsupported_iterable_to_array$9(o, minLen) {
5032
+ function _unsupported_iterable_to_array$8(o, minLen) {
3954
5033
  if (!o) return;
3955
- if (typeof o === "string") return _array_like_to_array$9(o, minLen);
5034
+ if (typeof o === "string") return _array_like_to_array$8(o, minLen);
3956
5035
  var n = Object.prototype.toString.call(o).slice(8, -1);
3957
5036
  if (n === "Object" && o.constructor) n = o.constructor.name;
3958
5037
  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);
5038
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
3960
5039
  }
3961
5040
  function _ts_generator$2(thisArg, body) {
3962
5041
  var f, y, t, _ = {
@@ -4139,8 +5218,8 @@ function ModuleHeader(param) {
4139
5218
  }, [
4140
5219
  window
4141
5220
  ]);
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];
5221
+ var _useState = _sliced_to_array$8(useState(false), 2), canUndo = _useState[0], setCanUndo = _useState[1];
5222
+ var _useState1 = _sliced_to_array$8(useState(false), 2), canRedo = _useState1[0], setCanRedo = _useState1[1];
4144
5223
  var handleUndo = function() {
4145
5224
  undo();
4146
5225
  };
@@ -4306,6 +5385,7 @@ function ModuleHeader(param) {
4306
5385
  Box.padding.large
4307
5386
  ],
4308
5387
  className: classnames('ModuleHeader', className),
5388
+ height: "72px",
4309
5389
  style: _object_spread$6({}, style)
4310
5390
  }, /*#__PURE__*/ React__default.createElement(Box, {
4311
5391
  style: {
@@ -4335,6 +5415,8 @@ function ModuleHeader(param) {
4335
5415
  width: "30px",
4336
5416
  height: "30px",
4337
5417
  icon: IconButton.icon.undo,
5418
+ iconWidth: "20px",
5419
+ backgroundColor: 'var(--bg-lv1)',
4338
5420
  padding: [
4339
5421
  IconButton.padding.none,
4340
5422
  IconButton.padding.small
@@ -4347,11 +5429,13 @@ function ModuleHeader(param) {
4347
5429
  id: "redo",
4348
5430
  width: "30px",
4349
5431
  height: "30px",
5432
+ iconWidth: "20px",
4350
5433
  padding: [
4351
5434
  IconButton.padding.none,
4352
5435
  IconButton.padding.small
4353
5436
  ],
4354
5437
  disabled: !canRedo,
5438
+ backgroundColor: 'var(--bg-lv1)',
4355
5439
  onClick: function() {
4356
5440
  handleRedo();
4357
5441
  },
@@ -4372,8 +5456,8 @@ function ModuleHeader(param) {
4372
5456
  }, "Advanced")))));
4373
5457
  }
4374
5458
 
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);
5459
+ 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";
5460
+ styleInject(css_248z$2);
4377
5461
 
4378
5462
  var targetColors = [
4379
5463
  'var(--color-brand)',
@@ -4388,145 +5472,6 @@ var targetColors = [
4388
5472
  var ComboboxCellWidth = '217px';
4389
5473
  var DeleteButtonCellWidth = '50px';
4390
5474
 
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
5475
  function _array_like_to_array$7(arr, len) {
4531
5476
  if (len == null || len > arr.length) len = arr.length;
4532
5477
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
@@ -4607,7 +5552,9 @@ function ModMatrixComboboxCell(param) {
4607
5552
  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
5553
  var _useCombobox = useCombobox({
4609
5554
  id: rowId,
4610
- filter: filterString}), value = _useCombobox.value, filteredChoices = _useCombobox.filteredChoices;
5555
+ filter: filterString,
5556
+ displayValInHeader: false
5557
+ }), index = _useCombobox.index, filteredChoices = _useCombobox.filteredChoices;
4611
5558
  var previewValue = modSlotPreview.slotId === rowId ? modSlotPreview.targetIndex : null;
4612
5559
  var onChange = function(newValue) {
4613
5560
  // TODO: 'juceIndex' is needed here because the 'value' from the combobox is the string label.
@@ -4643,11 +5590,11 @@ function ModMatrixComboboxCell(param) {
4643
5590
  alignItems: Box.alignItems.flexStart,
4644
5591
  height: '2.5rem'
4645
5592
  }, /*#__PURE__*/ React__default.createElement(Combobox, {
4646
- value: value || previewValue,
5593
+ value: index || previewValue,
4647
5594
  onChange: onChange
4648
5595
  }, /*#__PURE__*/ React__default.createElement(Box, null, /*#__PURE__*/ React__default.createElement(ComboboxInput, {
4649
5596
  displayValue: function(item) {
4650
- return value ? automatableParamLabels === null || automatableParamLabels === void 0 ? void 0 : automatableParamLabels[value] : '';
5597
+ return index ? automatableParamLabels === null || automatableParamLabels === void 0 ? void 0 : automatableParamLabels[index] : '';
4651
5598
  },
4652
5599
  placeholder: "Select a target...",
4653
5600
  onChange: function(e) {
@@ -4665,8 +5612,8 @@ function ModMatrixComboboxCell(param) {
4665
5612
  return e.preventDefault();
4666
5613
  },
4667
5614
  color: 'var(--color-text)',
4668
- width: "20px",
4669
- height: "20px"
5615
+ width: "10px",
5616
+ height: "10px"
4670
5617
  }))), /*#__PURE__*/ React__default.createElement(ComboboxOptions, {
4671
5618
  className: "ModMatrixComboboxItems",
4672
5619
  // anchor="bottom"
@@ -5372,7 +6319,7 @@ function ModMatrix(param) {
5372
6319
  ],
5373
6320
  className: "ModMatrix ".concat(className ? className : ''),
5374
6321
  style: _object_spread$1({
5375
- backgroundColor: 'var(--bg-section)'
6322
+ backgroundColor: 'var(--bg-lvl2)'
5376
6323
  }, style),
5377
6324
  flexDirection: Box.flexDirection.column
5378
6325
  }, /*#__PURE__*/ React__default.createElement(Box, {
@@ -5411,8 +6358,8 @@ var WaveTypes = /*#__PURE__*/ function(WaveTypes) {
5411
6358
  WaveTypes["Triangle"] = "Triangle";
5412
6359
  WaveTypes["Ramp"] = "Ramp";
5413
6360
  WaveTypes["Saw"] = "Saw";
5414
- WaveTypes["ExpUp"] = "Exp Up";
5415
- WaveTypes["ExpDown"] = "Exp Down";
6361
+ // ExpUp = 'Exp Up',
6362
+ // ExpDown = 'Exp Down',
5416
6363
  WaveTypes["Square"] = "Square";
5417
6364
  return WaveTypes;
5418
6365
  }({});
@@ -5464,17 +6411,19 @@ var getPointArray = function(param) {
5464
6411
  y: adjustedVal * ampValue * (1 - randomNumber)
5465
6412
  });
5466
6413
  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;
6414
+ // case WaveTypes.ExpUp:
6415
+ // cycle.push({
6416
+ // y:
6417
+ // ((Math.exp(adjustedVal * ampValue) - 1) / 1.7) *
6418
+ // (1 - randomNumber),
6419
+ // });
6420
+ // break;
6421
+ // case WaveTypes.ExpDown:
6422
+ // cycle.push({
6423
+ // //prettier-ignore
6424
+ // y: (Math.exp(adjustedVal > 0 ? (1 - adjustedVal) * ampValue : 0) - 1) / 1.7 * (1 - randomNumber),
6425
+ // });
6426
+ // break;
5478
6427
  case WaveTypes.Saw:
5479
6428
  cycle.push({
5480
6429
  y: (adjustedVal > 0 ? 1 - adjustedVal : 0) * (1 - randomNumber) * ampValue
@@ -5536,6 +6485,9 @@ var getPointArray = function(param) {
5536
6485
  return output;
5537
6486
  };
5538
6487
 
6488
+ 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";
6489
+ styleInject(css_248z$1);
6490
+
5539
6491
  function _array_like_to_array$4(arr, len) {
5540
6492
  if (len == null || len > arr.length) len = arr.length;
5541
6493
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
@@ -5583,7 +6535,7 @@ function _unsupported_iterable_to_array$4(o, minLen) {
5583
6535
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
5584
6536
  }
5585
6537
  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;
6538
+ var id = param.id, _param_width = param.width, width = _param_width === void 0 ? 365 : _param_width, _param_height = param.height, height = _param_height === void 0 ? 160 : _param_height;
5587
6539
  var svgRef = useRef(null);
5588
6540
  var isLocalhost = window.location.hostname === 'localhost';
5589
6541
  var _useState = _sliced_to_array$4(useState(0), 2), waveValue = _useState[0], setWaveValue = _useState[1];
@@ -5701,7 +6653,7 @@ function LFOVisualizer(param) {
5701
6653
  // Set up initial graph view
5702
6654
  var svg = d3.select(svgRef.current).attr('width', width * 2).attr('height', height);
5703
6655
  // 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);
6656
+ 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
6657
  return function() {
5706
6658
  // Remove listeners on unmount
5707
6659
  waveState === null || waveState === void 0 ? void 0 : waveState.valueChangedEvent.removeListener(waveListenerId);
@@ -5731,7 +6683,9 @@ function LFOVisualizer(param) {
5731
6683
  pulseWidth: widthValue,
5732
6684
  maxLength: maxLength
5733
6685
  });
5734
- setPoints(pointArray);
6686
+ setPoints(pointArray.filter(function(item) {
6687
+ return item.y !== undefined;
6688
+ }));
5735
6689
  }, [
5736
6690
  waveValue,
5737
6691
  syncTypeValue,
@@ -5769,14 +6723,51 @@ function LFOVisualizer(param) {
5769
6723
  }).curve(d3.curveBasis);
5770
6724
  d3.select(svgRef.current).selectAll('path').attr('width', width * 2 - svgInnerMargin).attr('height', height).data([
5771
6725
  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);
6726
+ ]).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))
6727
+ // .x0(xScale(0))
6728
+ .x(function(d) {
6729
+ //@ts-expect-error
6730
+ return xScale(d.x);
6731
+ }).y0(yScale(-1))//@ts-expect-error
6732
+ .y1(function(d) {
6733
+ return yScale(d.y);
6734
+ })).attr('class', 'area');
5773
6735
  }, [
5774
6736
  points,
5775
6737
  maxLength
5776
6738
  ]);
6739
+ d3.select(svgRef.current).append('linearGradient').attr('id', 'area-gradient')//.attr("gradientUnits", "userSpaceOnUse")
6740
+ .attr('x1', 0).attr('y1', 0).attr('x2', 0).attr('y2', 1).selectAll('stop').data([
6741
+ {
6742
+ offset: '0%',
6743
+ color: 'var(--color-brand)',
6744
+ opacity: 0.2
6745
+ },
6746
+ {
6747
+ offset: '20%',
6748
+ color: 'var(--color-brand)',
6749
+ opacity: 0.15
6750
+ },
6751
+ {
6752
+ offset: '30%',
6753
+ color: 'var(--color-brand)',
6754
+ opacity: 0.1
6755
+ },
6756
+ {
6757
+ offset: '55%',
6758
+ color: 'var(--color-brand)',
6759
+ opacity: 0
6760
+ }
6761
+ ]).enter().append('stop').attr('offset', function(d) {
6762
+ return d.offset;
6763
+ }).attr('stop-color', function(d) {
6764
+ return d.color;
6765
+ }).attr('stop-opacity', function(d) {
6766
+ return d.opacity;
6767
+ });
5777
6768
  return /*#__PURE__*/ React__default.createElement(Box, {
5778
6769
  style: {
5779
- backgroundColor: 'var(--bg-page)'
6770
+ backgroundColor: 'var(--bg-lv2)'
5780
6771
  },
5781
6772
  padding: [
5782
6773
  Box.padding.medium
@@ -5857,7 +6848,7 @@ function _unsupported_iterable_to_array$3(o, minLen) {
5857
6848
  if (n === "Map" || n === "Set") return Array.from(n);
5858
6849
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
5859
6850
  }
5860
- function LFO(param) {
6851
+ function LFOBox(param) {
5861
6852
  var id = param.id;
5862
6853
  var _useState = _sliced_to_array$3(useState(0), 2), syncType = _useState[0], setSyncType = _useState[1];
5863
6854
  useEffect(function() {
@@ -5871,68 +6862,150 @@ function LFO(param) {
5871
6862
  setSyncType(value);
5872
6863
  };
5873
6864
  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, {
5879
- labelColor: "var(--color-text)",
5880
- color: "var(--color-brand)",
5881
- id: "LFO".concat(id, "_SyncType"),
5882
- label: "LFO".concat(id, " Sync Type"),
5883
- onChange: handleSyncTypeChange,
5884
- width: "6rem"
5885
- }), /*#__PURE__*/ React__default.createElement(React__default.Fragment, null, syncType === 0 ? /*#__PURE__*/ React__default.createElement(RotarySlider, {
6865
+ className: "LFOBox",
6866
+ gap: Box.gap.mediumLarge,
6867
+ style: {
6868
+ background: 'var(--bg-lv4)',
6869
+ borderRadius: '6px'
6870
+ },
6871
+ padding: [
6872
+ Box.padding.large,
6873
+ Box.padding.mediumLarge
6874
+ ],
6875
+ fullHeight: true
6876
+ }, /*#__PURE__*/ React__default.createElement(Box, {
6877
+ flexDirection: Box.flexDirection.column,
6878
+ justifyContent: Box.justifyContent.flexStart,
6879
+ alignItems: Box.alignItems.flexStart,
6880
+ width: Box.width.auto,
6881
+ // padding={[Box.padding.medium]}
6882
+ fullHeight: true
6883
+ }, /*#__PURE__*/ React__default.createElement(Heading, {
6884
+ padding: [
6885
+ Heading.padding.none,
6886
+ Heading.padding.none,
6887
+ Heading.padding.large,
6888
+ Heading.padding.none
6889
+ ],
6890
+ removeLineHeight: true,
6891
+ color: "var(--color-brand)"
6892
+ }, "LFO ".concat(id)), /*#__PURE__*/ React__default.createElement(Box, {
6893
+ flexDirection: Box.flexDirection.column,
6894
+ flex: "1",
6895
+ gap: Box.gap.mediumLarge,
6896
+ justifyContent: Box.justifyContent.flexStart
6897
+ }, /*#__PURE__*/ React__default.createElement(Box, null, syncType === 0 ? /*#__PURE__*/ React__default.createElement(Slider, {
6898
+ size: Slider.size.large,
5886
6899
  id: "LFO".concat(id, "_Hz"),
5887
- label: "LFO".concat(id, " Hz")
5888
- }) : null, syncType === 1 ? /*#__PURE__*/ React__default.createElement(RotarySlider, {
6900
+ label: "LFO".concat(id, " Hz"),
6901
+ indicatorId: "LFO".concat(id, "_Out")
6902
+ }) : null, syncType === 1 ? /*#__PURE__*/ React__default.createElement(Slider, {
6903
+ size: Slider.size.large,
5889
6904
  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)",
6905
+ label: "LFO".concat(id, " Hz Hi"),
6906
+ indicatorId: "LFO".concat(id, "_Out")
6907
+ }) : null, syncType !== 0 && syncType !== 1 ? /*#__PURE__*/ React__default.createElement(Slider, {
5894
6908
  id: "LFO".concat(id, "_SyncRate"),
5895
6909
  label: "LFO".concat(id, " Sync Rate"),
5896
- width: "8rem"
5897
- }) : null, syncType === 3 ? /*#__PURE__*/ React__default.createElement(RotarySlider, {
5898
- id: "LFO".concat(id, "_Thirds"),
5899
- label: "LFO".concat(id, " 1/3rds")
5900
- }) : null, syncType === 4 ? /*#__PURE__*/ React__default.createElement(RotarySlider, {
5901
- id: "LFO".concat(id, "_Sixteenths"),
5902
- label: "LFO".concat(id, " 1/16ths")
5903
- }) : null), syncType === 0 || syncType === 1 ? /*#__PURE__*/ React__default.createElement(RotarySlider, {
5904
- polarity: RotarySlider.sliderPolarity.bipolar,
5905
- 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, {
6910
+ size: Slider.size.large,
6911
+ variant: Slider.variant.rotaryCombobox,
6912
+ indicatorId: "LFO".concat(id, "_Out")
6913
+ }) : null), /*#__PURE__*/ React__default.createElement(Dropdown, {
5912
6914
  labelColor: "var(--color-text)",
5913
6915
  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, {
6916
+ id: "LFO".concat(id, "_SyncType"),
6917
+ label: "LFO".concat(id, " Sync Type"),
6918
+ onChange: handleSyncTypeChange
6919
+ }), syncType !== 0 && syncType !== 1 ? /*#__PURE__*/ React__default.createElement(Slider, {
6920
+ variant: Slider.variant.bar,
6921
+ polarity: Slider.polarity.bipolar,
6922
+ orientation: Slider.orientation.horizontal,
6923
+ dragOrientation: Slider.orientation.horizontal,
6924
+ id: "LFO".concat(id, "_Sync_Offset"),
6925
+ label: "LFO".concat(id, " Sync Offset")
6926
+ }) : null)), /*#__PURE__*/ React__default.createElement(Box, {
6927
+ flexDirection: Box.flexDirection.column,
6928
+ // padding={[Box.padding.small]}
6929
+ fullHeight: true,
6930
+ justifyContent: Box.justifyContent.spaceBetween,
6931
+ width: Box.width.auto,
6932
+ // gap={Box.gap.large}
6933
+ flex: "1"
6934
+ }, /*#__PURE__*/ React__default.createElement(LFOVisualizer, {
6935
+ id: id
6936
+ }), /*#__PURE__*/ React__default.createElement(Box, {
6937
+ gap: Box.gap.xLarge
6938
+ }, /*#__PURE__*/ React__default.createElement(Slider, {
6939
+ polarity: Slider.polarity.bipolar,
6940
+ id: "LFO".concat(id, "_Phase"),
6941
+ label: "LFO".concat(id, " Phase"),
6942
+ // indicatorLineColor="var(--color-brand)"
6943
+ indicatorLineGradient: Slider.gradientStyles.unicolor,
6944
+ knobStrokeColor: "var(--color-brand)",
6945
+ trackColor: "var(--color-brand-900)",
6946
+ trackWidth: 3,
6947
+ markerShape: Slider.markerShape.rectangle
6948
+ }), /*#__PURE__*/ React__default.createElement(Slider, {
5918
6949
  id: "LFO".concat(id, "_Width"),
5919
- label: "LFO".concat(id, " Width")
5920
- }), /*#__PURE__*/ React__default.createElement(RotarySlider, {
6950
+ label: "LFO".concat(id, " Width"),
6951
+ indicatorLineColor: "var(--color-brand)",
6952
+ knobStrokeColor: "var(--color-brand)",
6953
+ trackColor: "var(--color-brand-900)",
6954
+ trackWidth: 3,
6955
+ indicatorLineGradient: Slider.gradientStyles.unicolor,
6956
+ markerShape: Slider.markerShape.rectangle
6957
+ }), /*#__PURE__*/ React__default.createElement(Slider, {
5921
6958
  id: "LFO".concat(id, "_Amp"),
5922
- label: "LFO".concat(id, " Amp")
5923
- }), /*#__PURE__*/ React__default.createElement(RotarySlider, {
6959
+ label: "LFO".concat(id, " Amp"),
6960
+ indicatorLineColor: "var(--color-brand)",
6961
+ knobStrokeColor: "var(--color-brand)",
6962
+ trackColor: "var(--color-brand-900)",
6963
+ trackWidth: 3,
6964
+ indicatorLineGradient: Slider.gradientStyles.unicolor,
6965
+ markerShape: Slider.markerShape.rectangle
6966
+ }), /*#__PURE__*/ React__default.createElement(Slider, {
5924
6967
  id: "LFO".concat(id, "_Rand"),
5925
- label: "LFO".concat(id, " Rand")
6968
+ label: "LFO".concat(id, " Rand"),
6969
+ indicatorLineColor: "var(--color-brand)",
6970
+ knobStrokeColor: "var(--color-brand)",
6971
+ trackColor: "var(--color-brand-900)",
6972
+ trackWidth: 3,
6973
+ indicatorLineGradient: Slider.gradientStyles.unicolor,
6974
+ markerShape: Slider.markerShape.rectangle
6975
+ }))), /*#__PURE__*/ React__default.createElement(Box, {
6976
+ flexDirection: Box.flexDirection.column,
6977
+ justifyContent: Box.justifyContent.flexStart,
6978
+ height: "100%",
6979
+ width: Box.width.auto
6980
+ }, /*#__PURE__*/ React__default.createElement(Tabs, {
6981
+ id: "LFO".concat(id, "_Wave"),
6982
+ height: "100%",
6983
+ icons: [
6984
+ Icons.sine,
6985
+ Icons.triangle,
6986
+ Icons.negativeSaw,
6987
+ Icons.positiveSaw,
6988
+ Icons.square
6989
+ ],
6990
+ orientation: Tabs.orientation.vertical,
6991
+ backgroundColor: "var(--bg-lv3)",
6992
+ selectedBackgroundColor: "var(--bg-lv2)",
6993
+ // width="100%"
6994
+ // padding={[Tabs.padding.mediumSmall]}
6995
+ tabWidth: "60px",
6996
+ tabHeight: "auto",
6997
+ color: "var(--bg-lv11)"
5926
6998
  })));
5927
6999
  }
5928
7000
 
5929
7001
  function LFOTab() {
5930
7002
  return /*#__PURE__*/ React__default.createElement(Box, {
5931
7003
  className: "LFOTab",
5932
- gap: Box.gap.medium
5933
- }, /*#__PURE__*/ React__default.createElement(LFO, {
7004
+ gap: Box.gap.medium,
7005
+ height: "100%"
7006
+ }, /*#__PURE__*/ React__default.createElement(LFOBox, {
5934
7007
  id: 1
5935
- }), /*#__PURE__*/ React__default.createElement(LFO, {
7008
+ }), /*#__PURE__*/ React__default.createElement(LFOBox, {
5936
7009
  id: 2
5937
7010
  }));
5938
7011
  }
@@ -6052,15 +7125,17 @@ function StepSequencer(param) {
6052
7125
  return /*#__PURE__*/ React__default.createElement(Box, {
6053
7126
  className: "StepSequencer",
6054
7127
  justifyContent: Box.justifyContent.flexStart,
6055
- width: "auto"
7128
+ height: "100%"
6056
7129
  }, steps.map(function(_, i) {
6057
7130
  var sliderNumber = i + 1;
6058
7131
  return /*#__PURE__*/ React__default.createElement(Slider, {
7132
+ variant: Slider.variant.bar,
7133
+ indicatorLineGradient: Slider.gradientStyles.multicolor,
7134
+ barSliderVariant: Slider.barSliderVariant.wideTrack,
6059
7135
  isStandalone: false,
6060
- sliderOrientation: Slider.sliderOrientation.vertical,
7136
+ orientation: Slider.orientation.vertical,
6061
7137
  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)"
7138
+ isHighlighted: currentSeqStep === sliderNumber
6064
7139
  });
6065
7140
  }));
6066
7141
  }
@@ -6126,45 +7201,93 @@ function SeqTab$1(param) {
6126
7201
  };
6127
7202
  return /*#__PURE__*/ React__default.createElement(Box, {
6128
7203
  flexDirection: Box.flexDirection.column,
6129
- gap: Box.gap.medium
6130
- }, /*#__PURE__*/ React__default.createElement(Box, null, /*#__PURE__*/ React__default.createElement(StepSequencer, {
7204
+ gap: Box.gap.medium,
7205
+ style: {
7206
+ background: 'var(--bg-lv4)',
7207
+ borderRadius: '6px'
7208
+ },
7209
+ padding: [
7210
+ Box.padding.mediumLarge
7211
+ ],
7212
+ height: "100%"
7213
+ }, /*#__PURE__*/ React__default.createElement(Box, {
7214
+ gap: Box.gap.medium,
7215
+ justifyContent: Box.justifyContent.flexStart
7216
+ }, /*#__PURE__*/ React__default.createElement(Heading, {
7217
+ padding: [
7218
+ Heading.padding.none,
7219
+ Heading.padding.medium
7220
+ ],
7221
+ color: "var(--color-brand)"
7222
+ }, "Seq ".concat(seqId)), /*#__PURE__*/ React__default.createElement(IndicatorLight, {
7223
+ id: "SEQ".concat(seqId, "_Out"),
7224
+ dataSource: IndicatorLight.dataSource.event
7225
+ })), /*#__PURE__*/ React__default.createElement(Box, {
7226
+ flexDirection: Box.flexDirection.column,
7227
+ gap: Box.gap.medium,
7228
+ height: "100%"
7229
+ }, /*#__PURE__*/ React__default.createElement(Box, {
7230
+ flex: "1 0 auto"
7231
+ }, /*#__PURE__*/ React__default.createElement(StepSequencer, {
6131
7232
  seqId: seqId
6132
7233
  })), /*#__PURE__*/ React__default.createElement(Box, {
6133
- alignItems: Box.alignItems.flexEnd,
6134
- justifyContent: Box.justifyContent.center
7234
+ gap: Box.gap.medium,
7235
+ padding: [
7236
+ Box.padding.none,
7237
+ Box.padding.none,
7238
+ Box.padding.medium,
7239
+ Box.padding.none
7240
+ ]
6135
7241
  }, /*#__PURE__*/ React__default.createElement(Dropdown, {
6136
7242
  labelColor: "var(--color-text)",
6137
7243
  color: "var(--color-brand)",
6138
7244
  id: "seq".concat(seqId, "_syncType"),
6139
7245
  label: "seq".concat(seqId, "_syncType"),
6140
7246
  onChange: handleSyncTypeChange
6141
- }), /*#__PURE__*/ React__default.createElement(React__default.Fragment, null, syncType === 0 ? /*#__PURE__*/ React__default.createElement(RotarySlider, {
7247
+ }), /*#__PURE__*/ React__default.createElement(React__default.Fragment, null, syncType === 0 ? /*#__PURE__*/ React__default.createElement(Slider, {
6142
7248
  id: "seq".concat(seqId, "_hertz"),
7249
+ variant: Slider.variant.bar,
7250
+ includeValueInHeight: false,
7251
+ orientation: Slider.orientation.horizontal,
7252
+ indicatorLineGradient: Slider.gradientStyles.unicolor,
7253
+ // barSliderVariant={Slider.barSliderVariant.valueInside}
6143
7254
  label: "Seq".concat(seqId, " Hz")
6144
- }) : null, syncType === 1 ? /*#__PURE__*/ React__default.createElement(RotarySlider, {
7255
+ }) : null, syncType === 1 ? /*#__PURE__*/ React__default.createElement(Slider, {
6145
7256
  id: "seq".concat(seqId, "_hertzHi"),
7257
+ includeValueInHeight: false,
7258
+ variant: Slider.variant.bar,
7259
+ orientation: Slider.orientation.horizontal,
7260
+ indicatorLineGradient: Slider.gradientStyles.unicolor,
7261
+ // barSliderVariant={Slider.barSliderVariant.valueInside}
6146
7262
  label: "Seq".concat(seqId, " Hz Hi")
6147
7263
  }) : null, syncType === 2 ? /*#__PURE__*/ React__default.createElement(Dropdown, {
6148
7264
  labelColor: "var(--color-text)",
6149
7265
  color: "var(--color-brand)",
6150
7266
  id: "seq".concat(seqId, "_syncRate"),
6151
7267
  label: "Seq".concat(seqId, " Sync Rate")
6152
- }) : null, syncType === 3 ? /*#__PURE__*/ React__default.createElement(RotarySlider, {
7268
+ }) : null, syncType === 3 ? /*#__PURE__*/ React__default.createElement(Slider, {
6153
7269
  id: "seq".concat(seqId, "_thirds"),
7270
+ indicatorLineGradient: Slider.gradientStyles.unicolor,
6154
7271
  label: "Seq".concat(seqId, " Thirds")
6155
- }) : null, syncType === 4 ? /*#__PURE__*/ React__default.createElement(RotarySlider, {
7272
+ }) : null, syncType === 4 ? /*#__PURE__*/ React__default.createElement(Slider, {
7273
+ indicatorLineGradient: Slider.gradientStyles.unicolor,
6156
7274
  id: "seq".concat(seqId, "_sixteenths"),
6157
7275
  label: "Seq".concat(seqId, " Sixteenths")
6158
- }) : null), /*#__PURE__*/ React__default.createElement(RotarySlider, {
7276
+ }) : null), /*#__PURE__*/ React__default.createElement(Slider, {
6159
7277
  id: "seq".concat(seqId, "_amp"),
6160
- label: "Seq".concat(seqId, " Amp")
6161
- })));
7278
+ label: "Seq".concat(seqId, " Amp"),
7279
+ variant: Slider.variant.bar,
7280
+ includeValueInHeight: false,
7281
+ orientation: Slider.orientation.horizontal,
7282
+ indicatorLineGradient: Slider.gradientStyles.unicolor
7283
+ }))));
6162
7284
  }
6163
7285
 
6164
7286
  function SeqTab() {
6165
7287
  return /*#__PURE__*/ React__default.createElement(Box, {
6166
7288
  className: "SeqTab",
6167
- gap: Box.gap.medium
7289
+ gap: Box.gap.medium,
7290
+ fullHeight: true
6168
7291
  }, /*#__PURE__*/ React__default.createElement(SeqTab$1, {
6169
7292
  seqId: 1
6170
7293
  }), /*#__PURE__*/ React__default.createElement(SeqTab$1, {
@@ -6172,7 +7295,7 @@ function SeqTab() {
6172
7295
  }));
6173
7296
  }
6174
7297
 
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";
7298
+ var css_248z = ".ModuleFooter-tabs {\n overflow-y: auto;\n overflow-x: hidden;\n max-height: 340px;\n}\n";
6176
7299
  styleInject(css_248z);
6177
7300
 
6178
7301
  function _array_like_to_array(arr, len) {
@@ -6394,9 +7517,6 @@ function ModuleFooter(param) {
6394
7517
  var _useState = _sliced_to_array(useState(0), 2), selectedTab = _useState[0], setSelectedTab = _useState[1];
6395
7518
  var setSelectedFooterTabFunc = Juce.getNativeFunction('setSelectedFooterTab');
6396
7519
  var getSelectedFooterTabFunc = Juce.getNativeFunction('getSelectedFooterTab');
6397
- var isTabSelected = function(tabName) {
6398
- return Object.keys(FooterTabs)[selectedTab] === tabName;
6399
- };
6400
7520
  useEffect(function() {
6401
7521
  var getTabFromBackend = function() {
6402
7522
  return _async_to_generator(function() {
@@ -6459,27 +7579,29 @@ function ModuleFooter(param) {
6459
7579
  updateBackend();
6460
7580
  };
6461
7581
  return /*#__PURE__*/ React__default.createElement(Box, {
6462
- gap: Box.gap.medium,
7582
+ gap: Box.gap.small,
6463
7583
  tag: Box.tag.footer,
6464
- height: "100%",
6465
7584
  alignItems: Box.alignItems.flexStart,
6466
7585
  className: "ModuleFooter ".concat(className ? className : ''),
6467
7586
  style: _object_spread({
6468
- backgroundColor: 'var(--bg-section)'
6469
- }, style)
7587
+ backgroundColor: 'var(--bg-lv3)'
7588
+ }, style),
7589
+ flex: "1 1 auto"
6470
7590
  }, /*#__PURE__*/ React__default.createElement(Box, {
6471
- flexDirection: Box.flexDirection.column
7591
+ flexDirection: Box.flexDirection.column,
7592
+ height: "100%",
7593
+ justifyContent: Box.justifyContent.flexStart
6472
7594
  }, /*#__PURE__*/ React__default.createElement(Box, {
6473
- style: {
6474
- backgroundColor: 'var(--color-gray-500)'
6475
- },
7595
+ // style={{ backgroundColor: 'var(--bg-lv4)' }}
6476
7596
  padding: [
6477
- Box.padding.small,
6478
- Box.padding.small,
7597
+ Box.padding.xSmall,
7598
+ Box.padding.medium,
6479
7599
  Box.padding.none,
6480
- Box.padding.small
6481
- ]
7600
+ Box.padding.medium
7601
+ ],
7602
+ justifyContent: Box.justifyContent.spaceBetween
6482
7603
  }, /*#__PURE__*/ React__default.createElement(Tabs, {
7604
+ className: "ModuleFooter-tabs",
6483
7605
  items: [
6484
7606
  'Mod Matrix',
6485
7607
  'Input mod',
@@ -6488,19 +7610,21 @@ function ModuleFooter(param) {
6488
7610
  'Settings'
6489
7611
  ],
6490
7612
  onChange: handleTabChange,
6491
- selectedIndex: selectedTab,
6492
- gap: "2px",
6493
7613
  padding: [
6494
7614
  Tabs.padding.medium,
6495
7615
  Tabs.padding.large
6496
7616
  ],
7617
+ backgroundColor: "var(--bg-lv4)",
7618
+ selectedBackgroundColor: "var(--bg-lv3)",
6497
7619
  width: "100%"
6498
7620
  })), /*#__PURE__*/ React__default.createElement(Box, {
6499
7621
  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) : '')));
7622
+ Box.padding.medium
7623
+ ],
7624
+ alignItems: Box.alignItems.flexStart,
7625
+ flex: "1 1 auto"
7626
+ }, 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
7627
  }
6504
7628
 
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 };
7629
+ 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
7630
  //# sourceMappingURL=index.js.map