@antimatter-audio/antimatter-ui 14.0.6 → 14.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/advanced/ControlGroup/ControlGroup.d.ts +2 -1
- package/dist/advanced/ControlGroup/ControlGroup.d.ts.map +1 -1
- package/dist/advanced/ModuleFooter/LFOBox.d.ts.map +1 -1
- package/dist/advanced/ModuleFooter/LFOTab.d.ts.map +1 -1
- package/dist/advanced/ModuleFooter/ModuleFooter.d.ts.map +1 -1
- package/dist/advanced/ModuleFooter/SeqPanel.d.ts.map +1 -1
- package/dist/advanced/ModuleFooter/SeqTab.d.ts.map +1 -1
- package/dist/core/Dropdown/Dropdown.d.ts +2 -1
- package/dist/core/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/core/PositioningWrapper/PositioningWrapper.d.ts +3 -1
- package/dist/core/PositioningWrapper/PositioningWrapper.d.ts.map +1 -1
- package/dist/core/Slider/RotaryCombobox.d.ts +3 -1
- package/dist/core/Slider/RotaryCombobox.d.ts.map +1 -1
- package/dist/core/Slider/RotarySlider.d.ts +3 -1
- package/dist/core/Slider/RotarySlider.d.ts.map +1 -1
- package/dist/core/Slider/Slider.d.ts +3 -1
- package/dist/core/Slider/Slider.d.ts.map +1 -1
- package/dist/index.js +671 -632
- package/dist/index.js.map +1 -1
- package/dist/src/advanced/ControlGroup/ControlGroup.d.ts +2 -1
- package/dist/src/advanced/ControlGroup/ControlGroup.d.ts.map +1 -1
- package/dist/src/advanced/ModuleFooter/LFOBox.d.ts.map +1 -1
- package/dist/src/advanced/ModuleFooter/LFOTab.d.ts.map +1 -1
- package/dist/src/advanced/ModuleFooter/ModuleFooter.d.ts.map +1 -1
- package/dist/src/advanced/ModuleFooter/SeqPanel.d.ts.map +1 -1
- package/dist/src/advanced/ModuleFooter/SeqTab.d.ts.map +1 -1
- package/dist/src/common/utils.d.ts +1 -0
- package/dist/src/common/utils.d.ts.map +1 -1
- package/dist/src/core/Dropdown/Dropdown.d.ts +2 -1
- package/dist/src/core/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/src/core/Slider/RotaryCombobox.d.ts +3 -1
- package/dist/src/core/Slider/RotaryCombobox.d.ts.map +1 -1
- package/dist/src/core/Slider/RotarySlider.d.ts +3 -1
- package/dist/src/core/Slider/RotarySlider.d.ts.map +1 -1
- package/dist/src/core/Slider/Slider.d.ts +3 -1
- package/dist/src/core/Slider/Slider.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -33,7 +33,7 @@ function styleInject(css, ref) {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
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:
|
|
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: default;\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
37
|
styleInject(css_248z$f);
|
|
38
38
|
|
|
39
39
|
var Spacing = /*#__PURE__*/ function(Spacing) {
|
|
@@ -111,7 +111,7 @@ var Orientation = /*#__PURE__*/ function(Orientation) {
|
|
|
111
111
|
return Orientation;
|
|
112
112
|
}({});
|
|
113
113
|
|
|
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:
|
|
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: default;\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
115
|
styleInject(css_248z$e);
|
|
116
116
|
|
|
117
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";
|
|
@@ -2119,7 +2119,7 @@ Tabs.justifyContent = JustifyContent$1;
|
|
|
2119
2119
|
Tabs.alignItems = AlignItems$1;
|
|
2120
2120
|
Tabs.fontSize = FontSizes;
|
|
2121
2121
|
|
|
2122
|
-
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:
|
|
2122
|
+
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: default;\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";
|
|
2123
2123
|
styleInject(css_248z$a);
|
|
2124
2124
|
|
|
2125
2125
|
function _define_property$g(obj, key, value) {
|
|
@@ -2151,7 +2151,7 @@ function _object_spread$f(target) {
|
|
|
2151
2151
|
return target;
|
|
2152
2152
|
}
|
|
2153
2153
|
function Dropdown(param) {
|
|
2154
|
-
var label = param.label, _param_color = param.color, color = _param_color === void 0 ? 'var(--color-text)' : _param_color, _param_labelColor = param.labelColor, labelColor = _param_labelColor === void 0 ? 'var(--color-text)' : _param_labelColor, className = param.className, onChange = param.onChange,
|
|
2154
|
+
var label = param.label, _param_color = param.color, color = _param_color === void 0 ? 'var(--color-text)' : _param_color, _param_labelColor = param.labelColor, labelColor = _param_labelColor === void 0 ? 'var(--color-text)' : _param_labelColor, className = param.className, onChange = param.onChange, _param_width = param.width, width = _param_width === void 0 ? '110px' : _param_width, _param_height = param.height, height = _param_height === void 0 ? '34px' : _param_height, id = param.id, style = param.style;
|
|
2155
2155
|
var _useDropdown = useDropdown({
|
|
2156
2156
|
id: id,
|
|
2157
2157
|
label: label,
|
|
@@ -2181,7 +2181,7 @@ function Dropdown(param) {
|
|
|
2181
2181
|
style: {
|
|
2182
2182
|
position: 'relative',
|
|
2183
2183
|
width: width,
|
|
2184
|
-
height:
|
|
2184
|
+
height: height
|
|
2185
2185
|
}
|
|
2186
2186
|
}, /*#__PURE__*/ React__default.createElement(Box, {
|
|
2187
2187
|
flexDirection: Box.flexDirection.column,
|
|
@@ -2189,7 +2189,7 @@ function Dropdown(param) {
|
|
|
2189
2189
|
gap: Box.gap.small,
|
|
2190
2190
|
style: {
|
|
2191
2191
|
position: 'absolute',
|
|
2192
|
-
right: '
|
|
2192
|
+
right: '0',
|
|
2193
2193
|
top: '0',
|
|
2194
2194
|
bottom: '0',
|
|
2195
2195
|
zIndex: '2'
|
|
@@ -2198,21 +2198,36 @@ function Dropdown(param) {
|
|
|
2198
2198
|
id: "Dropdown-up-arrow",
|
|
2199
2199
|
className: "Dropdown-arrow",
|
|
2200
2200
|
backgroundColor: "transparent",
|
|
2201
|
-
width: "8px",
|
|
2202
2201
|
icon: IconButton.icon.up,
|
|
2202
|
+
iconWidth: "8px",
|
|
2203
|
+
disabled: value === choices[0],
|
|
2204
|
+
padding: [
|
|
2205
|
+
IconButton.padding.small,
|
|
2206
|
+
IconButton.padding.small,
|
|
2207
|
+
IconButton.padding.xSmall,
|
|
2208
|
+
IconButton.padding.small
|
|
2209
|
+
],
|
|
2203
2210
|
onClick: decrementValue
|
|
2204
2211
|
}), /*#__PURE__*/ React__default.createElement(IconButton, {
|
|
2205
2212
|
className: "Dropdown-arrow",
|
|
2206
2213
|
id: "Dropdown-down-arrow",
|
|
2207
2214
|
backgroundColor: "transparent",
|
|
2208
|
-
|
|
2215
|
+
iconWidth: "8px",
|
|
2216
|
+
disabled: value === choices[choices.length - 1],
|
|
2209
2217
|
icon: IconButton.icon.down,
|
|
2218
|
+
padding: [
|
|
2219
|
+
IconButton.padding.xSmall,
|
|
2220
|
+
IconButton.padding.small,
|
|
2221
|
+
IconButton.padding.small,
|
|
2222
|
+
IconButton.padding.small
|
|
2223
|
+
],
|
|
2210
2224
|
onClick: incrementValue
|
|
2211
2225
|
})), /*#__PURE__*/ React__default.createElement(ListboxButton, {
|
|
2212
2226
|
className: classnames('Combobox Dropdown-button', className),
|
|
2213
2227
|
style: _object_spread$f({
|
|
2214
2228
|
color: "".concat(color ? color : 'initial'),
|
|
2215
2229
|
width: "".concat(width ? width : '100%'),
|
|
2230
|
+
height: height,
|
|
2216
2231
|
// position: 'absolute',
|
|
2217
2232
|
top: 0,
|
|
2218
2233
|
bottom: 0,
|
|
@@ -2875,7 +2890,7 @@ function _unsupported_iterable_to_array$d(o, minLen) {
|
|
|
2875
2890
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$d(o, minLen);
|
|
2876
2891
|
}
|
|
2877
2892
|
function ControlGroup(param) {
|
|
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;
|
|
2893
|
+
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, width = param.width;
|
|
2879
2894
|
// EXPECTED CONTROL GROUP STRUCTURE
|
|
2880
2895
|
// <ControlGroup id={id-control-group} is-active>
|
|
2881
2896
|
// <Slider id={id}></Slider>
|
|
@@ -2949,6 +2964,7 @@ function ControlGroup(param) {
|
|
|
2949
2964
|
]);
|
|
2950
2965
|
return /*#__PURE__*/ React__default.createElement(Box, {
|
|
2951
2966
|
id: groupId,
|
|
2967
|
+
width: width,
|
|
2952
2968
|
className: "controlGroup ".concat(isActive ? 'isActive' : '', " ").concat(isDisabled ? 'isDisabled' : '', " ").concat(className ? className : '')
|
|
2953
2969
|
}, children);
|
|
2954
2970
|
}
|
|
@@ -3289,88 +3305,6 @@ function RotaryCircle(param) {
|
|
|
3289
3305
|
RotaryCircle.polarity = Polarity;
|
|
3290
3306
|
RotaryCircle.size = RotarySliderSizes;
|
|
3291
3307
|
|
|
3292
|
-
// Rotary Slider UI component.
|
|
3293
|
-
// Connects to Juce's Slider element
|
|
3294
|
-
function RotarySlider(param) {
|
|
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 ? {
|
|
3297
|
-
start: 20.0,
|
|
3298
|
-
end: 15000.0,
|
|
3299
|
-
interval: 0.1,
|
|
3300
|
-
skew: 0.7
|
|
3301
|
-
} : _param_mockProperties; param.style;
|
|
3302
|
-
var _rotarySliderSizeMap_size;
|
|
3303
|
-
var _useSlider = useSlider({
|
|
3304
|
-
id: id,
|
|
3305
|
-
label: label,
|
|
3306
|
-
mockProperties: mockProperties,
|
|
3307
|
-
mockInitialNormalisedValue: mockInitialNormalisedValue,
|
|
3308
|
-
onChange: onChange,
|
|
3309
|
-
isRandomizable: isRandomizable
|
|
3310
|
-
}), bindDrag = _useSlider.bindDrag, normalisedValue = _useSlider.normalisedValue, scaledValue = _useSlider.scaledValue, setToDefaultState = _useSlider.setToDefaultState, setNormalisedState = _useSlider.setNormalisedState, properties = _useSlider.properties;
|
|
3311
|
-
return /*#__PURE__*/ React__default.createElement(ControlGroup, {
|
|
3312
|
-
id: id
|
|
3313
|
-
}, /*#__PURE__*/ React__default.createElement(Box, {
|
|
3314
|
-
className: "RotarySlider-wrapper",
|
|
3315
|
-
flexDirection: Box.flexDirection.column,
|
|
3316
|
-
gap: Box.gap.none,
|
|
3317
|
-
flex: "0 1 auto"
|
|
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, {
|
|
3328
|
-
polarity: polarity,
|
|
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, {
|
|
3345
|
-
className: "ProgressCircle-value",
|
|
3346
|
-
value: scaledValue,
|
|
3347
|
-
id: id,
|
|
3348
|
-
min: (properties === null || properties === void 0 ? void 0 : properties.start) || 0,
|
|
3349
|
-
max: (properties === null || properties === void 0 ? void 0 : properties.end) || 0,
|
|
3350
|
-
textAlign: Input.textAlign.center,
|
|
3351
|
-
style: {
|
|
3352
|
-
fontWeight: 'bold',
|
|
3353
|
-
width: '100%',
|
|
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")
|
|
3355
|
-
},
|
|
3356
|
-
onComplete: function(value) {
|
|
3357
|
-
var normalisedVal = properties && scaledToNormalised({
|
|
3358
|
-
scaledValue: value,
|
|
3359
|
-
start: properties === null || properties === void 0 ? void 0 : properties.start,
|
|
3360
|
-
end: properties === null || properties === void 0 ? void 0 : properties.end,
|
|
3361
|
-
skew: properties === null || properties === void 0 ? void 0 : properties.skew
|
|
3362
|
-
});
|
|
3363
|
-
normalisedVal !== undefined && setNormalisedState(normalisedVal);
|
|
3364
|
-
}
|
|
3365
|
-
})));
|
|
3366
|
-
}
|
|
3367
|
-
RotarySlider.polarity = Polarity;
|
|
3368
|
-
RotarySlider.size = RotarySliderSizes;
|
|
3369
|
-
RotarySlider.markerShape = RotarySliderMarkerShapes;
|
|
3370
|
-
|
|
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
3308
|
function _define_property$c(obj, key, value) {
|
|
3375
3309
|
if (key in obj) {
|
|
3376
3310
|
Object.defineProperty(obj, key, {
|
|
@@ -3399,152 +3333,29 @@ function _object_spread$c(target) {
|
|
|
3399
3333
|
}
|
|
3400
3334
|
return target;
|
|
3401
3335
|
}
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
}
|
|
3408
|
-
return keys;
|
|
3409
|
-
}
|
|
3410
|
-
function _object_spread_props$1(target, source) {
|
|
3411
|
-
source = source != null ? source : {};
|
|
3412
|
-
if (Object.getOwnPropertyDescriptors) {
|
|
3413
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
3414
|
-
} else {
|
|
3415
|
-
ownKeys$1(Object(source)).forEach(function(key) {
|
|
3416
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
3417
|
-
});
|
|
3418
|
-
}
|
|
3419
|
-
return target;
|
|
3420
|
-
}
|
|
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
|
|
3430
|
-
mockInitialNormalisedValue, mockInitialNormalisedValue = _param_mockInitialNormalisedValue === void 0 ? 0 : _param_mockInitialNormalisedValue, _param_mockProperties = param.mockProperties, mockProperties = _param_mockProperties === void 0 ? {
|
|
3431
|
-
start: 20.0,
|
|
3432
|
-
end: 15000.0,
|
|
3433
|
-
interval: 0.1,
|
|
3434
|
-
skew: 0.7
|
|
3435
|
-
} : _param_mockProperties;
|
|
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);
|
|
3447
|
-
var _useSlider = useSlider({
|
|
3448
|
-
id: id,
|
|
3449
|
-
label: label,
|
|
3450
|
-
mockProperties: mockProperties,
|
|
3451
|
-
mockInitialNormalisedValue: mockInitialNormalisedValue,
|
|
3452
|
-
onChange: onChange,
|
|
3453
|
-
isRandomizable: isRandomizable,
|
|
3454
|
-
orientation: orientation,
|
|
3455
|
-
dragOrientation: dragOrientation,
|
|
3456
|
-
sliderElementRef: sliderElementRef
|
|
3457
|
-
}), bindBarSliderDrag = _useSlider.bindBarSliderDrag, bindSequenceBarSliderDrag = _useSlider.bindSequenceBarSliderDrag, // bindDrag,
|
|
3458
|
-
normalisedValue = _useSlider.normalisedValue, setNormalisedState = _useSlider.setNormalisedState, properties = _useSlider.properties;
|
|
3459
|
-
var drag = isStandalone ? bindBarSliderDrag : bindSequenceBarSliderDrag;
|
|
3460
|
-
return /*#__PURE__*/ React__default.createElement(Box, {
|
|
3461
|
-
flexDirection: Box.flexDirection.column,
|
|
3462
|
-
justifyContent: Box.justifyContent.center,
|
|
3463
|
-
className: classnames('BarSlider', isNarrowTrack && 'BarSlider--narrowTrack', isWideTrack && 'BarSlider--wideTrack', isVertical && 'BarSlider--isVertical', isHorizontal && 'BarSlider--isHorizontal', className),
|
|
3464
|
-
id: id,
|
|
3465
|
-
ref: sliderElementRef,
|
|
3466
|
-
gap: Box.gap.mediumSmall,
|
|
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", {
|
|
3476
|
-
className: 'Slider-center-marker'
|
|
3477
|
-
}), /*#__PURE__*/ React__default.createElement(Box, {
|
|
3478
|
-
padding: isNarrowTrack ? (showValue !== null && showValue !== void 0 ? showValue : defaultShowValueState) ? [
|
|
3479
|
-
Box.padding.none,
|
|
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')
|
|
3491
|
-
}, drag()), {
|
|
3492
|
-
// onMouseEnter={onMouseEnter}
|
|
3336
|
+
// Rotary Slider UI component.
|
|
3337
|
+
// Connects to Juce's Slider element
|
|
3338
|
+
function PositioningWrapper(param) {
|
|
3339
|
+
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;
|
|
3340
|
+
return /*#__PURE__*/ React__default.createElement("div", {
|
|
3493
3341
|
id: id,
|
|
3342
|
+
className: className,
|
|
3494
3343
|
style: _object_spread$c({
|
|
3495
|
-
|
|
3496
|
-
|
|
3344
|
+
position: 'relative',
|
|
3345
|
+
height: height,
|
|
3346
|
+
width: width,
|
|
3347
|
+
margin: margin
|
|
3497
3348
|
}, style)
|
|
3498
|
-
}
|
|
3499
|
-
className: "Barslider-IndicatorLineWrapper"
|
|
3500
|
-
}, /*#__PURE__*/ React__default.createElement("div", {
|
|
3501
|
-
// TODO: Why aren't the Tailwind classes working?
|
|
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)')
|
|
3509
|
-
}, getBarTransformStyles({
|
|
3510
|
-
orientation: orientation,
|
|
3511
|
-
polarity: polarity,
|
|
3512
|
-
normalisedValue: normalisedValue
|
|
3513
|
-
}))
|
|
3514
|
-
})) : '', isNarrowTrack ? /*#__PURE__*/ React__default.createElement("div", {
|
|
3515
|
-
className: "BarSlider-MarkerWrapper",
|
|
3516
|
-
style: {
|
|
3517
|
-
bottom: '2px'
|
|
3518
|
-
}
|
|
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,
|
|
3532
|
-
id: id,
|
|
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)',
|
|
3349
|
+
}, children, /*#__PURE__*/ React__default.createElement("div", {
|
|
3537
3350
|
style: {
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3351
|
+
position: 'absolute',
|
|
3352
|
+
top: top,
|
|
3353
|
+
right: right,
|
|
3354
|
+
bottom: bottom,
|
|
3355
|
+
left: left
|
|
3542
3356
|
}
|
|
3543
|
-
}
|
|
3357
|
+
}, positionedElement ? positionedElement : null));
|
|
3544
3358
|
}
|
|
3545
|
-
Slider$1.sliderType = SliderType;
|
|
3546
|
-
Slider$1.polarity = Polarity;
|
|
3547
|
-
Slider$1.orientation = Orientation;
|
|
3548
3359
|
|
|
3549
3360
|
function _array_like_to_array$c(arr, len) {
|
|
3550
3361
|
if (len == null || len > arr.length) len = arr.length;
|
|
@@ -3592,24 +3403,490 @@ function _unsupported_iterable_to_array$c(o, minLen) {
|
|
|
3592
3403
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
3593
3404
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$c(o, minLen);
|
|
3594
3405
|
}
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
var
|
|
3605
|
-
|
|
3606
|
-
//
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3406
|
+
// 20.0f, 15000.0f, 0.1f, 0.7f),800.0f
|
|
3407
|
+
// ValueType rangeStart, ValueType rangeEnd, ValueType intervalValue, ValueType skewFactor, bool useSymmetricSkew=false)
|
|
3408
|
+
var DataSource = /*#__PURE__*/ function(DataSource) {
|
|
3409
|
+
DataSource["sliderAttachment"] = "sliderAttachment";
|
|
3410
|
+
DataSource["buttonAttachment"] = "buttonAttachment";
|
|
3411
|
+
DataSource["event"] = "event";
|
|
3412
|
+
return DataSource;
|
|
3413
|
+
}({});
|
|
3414
|
+
var useIndicator = function(param) {
|
|
3415
|
+
var id = param.id, _param_dataSource = param.dataSource, dataSource = _param_dataSource === void 0 ? "buttonAttachment" : _param_dataSource;
|
|
3416
|
+
var isLocalhost = window.location.hostname === 'localhost';
|
|
3417
|
+
// This value should be a range from 0 to 1
|
|
3418
|
+
var _useState = _sliced_to_array$c(useState(0), 2), brightness = _useState[0], setBrightness = _useState[1];
|
|
3419
|
+
var updateState = function() {
|
|
3420
|
+
if (!isLocalhost && dataSource === "buttonAttachment") {
|
|
3421
|
+
var _Juce_getToggleState;
|
|
3422
|
+
var toggleState = (_Juce_getToggleState = Juce.getToggleState(id)) === null || _Juce_getToggleState === void 0 ? void 0 : _Juce_getToggleState.value;
|
|
3423
|
+
setBrightness(toggleState);
|
|
3424
|
+
} else if (!isLocalhost && dataSource === "sliderAttachment") {
|
|
3425
|
+
var sliderState = Juce.getSliderState(id);
|
|
3426
|
+
setBrightness(sliderState === null || sliderState === void 0 ? void 0 : sliderState.normalisedValue);
|
|
3427
|
+
}
|
|
3428
|
+
};
|
|
3429
|
+
// Set the initial state
|
|
3430
|
+
useEffect(function() {
|
|
3431
|
+
updateState();
|
|
3432
|
+
}, []);
|
|
3433
|
+
// Update the local state when the ID changes
|
|
3434
|
+
useEffect(function() {
|
|
3435
|
+
updateState();
|
|
3436
|
+
}, [
|
|
3437
|
+
id
|
|
3438
|
+
]);
|
|
3439
|
+
// Sets up listeners to handle changes on the backend
|
|
3440
|
+
useEffect(function() {
|
|
3441
|
+
if (!isLocalhost && dataSource === "buttonAttachment") {
|
|
3442
|
+
var _toggleState_valueChangedEvent;
|
|
3443
|
+
var toggleState = Juce.getToggleState(id);
|
|
3444
|
+
var valueListenerId = toggleState === null || toggleState === void 0 ? void 0 : (_toggleState_valueChangedEvent = toggleState.valueChangedEvent) === null || _toggleState_valueChangedEvent === void 0 ? void 0 : _toggleState_valueChangedEvent.addListener(function() {
|
|
3445
|
+
setBrightness(toggleState);
|
|
3446
|
+
});
|
|
3447
|
+
return function cleanup() {
|
|
3448
|
+
var _toggleState_valueChangedEvent;
|
|
3449
|
+
toggleState === null || toggleState === void 0 ? void 0 : (_toggleState_valueChangedEvent = toggleState.valueChangedEvent) === null || _toggleState_valueChangedEvent === void 0 ? void 0 : _toggleState_valueChangedEvent.removeListener(valueListenerId);
|
|
3450
|
+
};
|
|
3451
|
+
} else if (!isLocalhost && dataSource === "sliderAttachment") {
|
|
3452
|
+
var _sliderState_valueChangedEvent;
|
|
3453
|
+
var sliderState = Juce.getSliderState(id);
|
|
3454
|
+
var valueListenerId1 = sliderState === null || sliderState === void 0 ? void 0 : (_sliderState_valueChangedEvent = sliderState.valueChangedEvent) === null || _sliderState_valueChangedEvent === void 0 ? void 0 : _sliderState_valueChangedEvent.addListener(function() {
|
|
3455
|
+
setBrightness(sliderState);
|
|
3456
|
+
});
|
|
3457
|
+
return function cleanup() {
|
|
3458
|
+
var _sliderState_valueChangedEvent;
|
|
3459
|
+
sliderState === null || sliderState === void 0 ? void 0 : (_sliderState_valueChangedEvent = sliderState.valueChangedEvent) === null || _sliderState_valueChangedEvent === void 0 ? void 0 : _sliderState_valueChangedEvent.removeListener(valueListenerId1);
|
|
3460
|
+
};
|
|
3461
|
+
} else if (!isLocalhost && dataSource === "event") {
|
|
3462
|
+
var getLFOOutdata = id && //@ts-expect-error
|
|
3463
|
+
window.__JUCE__.backend.addEventListener("".concat(id), function(event) {
|
|
3464
|
+
setBrightness(event);
|
|
3465
|
+
});
|
|
3466
|
+
return function cleanup() {
|
|
3467
|
+
//@ts-expect-error
|
|
3468
|
+
window.__JUCE__.backend.removeEventListener(getLFOOutdata);
|
|
3469
|
+
};
|
|
3470
|
+
} else {
|
|
3471
|
+
return;
|
|
3472
|
+
}
|
|
3473
|
+
});
|
|
3474
|
+
return {
|
|
3475
|
+
dataSource: dataSource,
|
|
3476
|
+
brightness: brightness
|
|
3477
|
+
};
|
|
3478
|
+
};
|
|
3479
|
+
|
|
3480
|
+
function _define_property$b(obj, key, value) {
|
|
3481
|
+
if (key in obj) {
|
|
3482
|
+
Object.defineProperty(obj, key, {
|
|
3483
|
+
value: value,
|
|
3484
|
+
enumerable: true,
|
|
3485
|
+
configurable: true,
|
|
3486
|
+
writable: true
|
|
3487
|
+
});
|
|
3488
|
+
} else {
|
|
3489
|
+
obj[key] = value;
|
|
3490
|
+
}
|
|
3491
|
+
return obj;
|
|
3492
|
+
}
|
|
3493
|
+
function _object_spread$b(target) {
|
|
3494
|
+
for(var i = 1; i < arguments.length; i++){
|
|
3495
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
3496
|
+
var ownKeys = Object.keys(source);
|
|
3497
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
3498
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
3499
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
3500
|
+
}));
|
|
3501
|
+
}
|
|
3502
|
+
ownKeys.forEach(function(key) {
|
|
3503
|
+
_define_property$b(target, key, source[key]);
|
|
3504
|
+
});
|
|
3505
|
+
}
|
|
3506
|
+
return target;
|
|
3507
|
+
}
|
|
3508
|
+
function IndicatorLight(param) {
|
|
3509
|
+
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;
|
|
3510
|
+
var brightness = useIndicator({
|
|
3511
|
+
id: id,
|
|
3512
|
+
dataSource: dataSource
|
|
3513
|
+
}).brightness;
|
|
3514
|
+
return /*#__PURE__*/ React__default.createElement(Box, {
|
|
3515
|
+
flexDirection: Box.flexDirection.column,
|
|
3516
|
+
gap: Box.gap.small,
|
|
3517
|
+
alignItems: Box.alignItems.center,
|
|
3518
|
+
width: "auto"
|
|
3519
|
+
}, /*#__PURE__*/ React__default.createElement("div", {
|
|
3520
|
+
style: _object_spread$b({
|
|
3521
|
+
position: 'relative',
|
|
3522
|
+
width: '12px',
|
|
3523
|
+
height: '12px',
|
|
3524
|
+
borderRadius: shape === "round" ? '100%' : 'initial',
|
|
3525
|
+
overflow: 'hidden'
|
|
3526
|
+
}, style)
|
|
3527
|
+
}, /*#__PURE__*/ React__default.createElement("div", {
|
|
3528
|
+
className: classnames('IndicatorLight-bg', 'bg-panel', className),
|
|
3529
|
+
style: {
|
|
3530
|
+
width: '12px',
|
|
3531
|
+
height: '12px',
|
|
3532
|
+
position: 'absolute',
|
|
3533
|
+
top: 0,
|
|
3534
|
+
right: 0,
|
|
3535
|
+
bottom: 0,
|
|
3536
|
+
left: 0,
|
|
3537
|
+
background: inactiveColor
|
|
3538
|
+
}
|
|
3539
|
+
}), /*#__PURE__*/ React__default.createElement("div", {
|
|
3540
|
+
className: classnames('IndicatorLight', 'bg-panel', className),
|
|
3541
|
+
style: {
|
|
3542
|
+
opacity: brightness,
|
|
3543
|
+
// transition: `opacity 500ms ease-in`,
|
|
3544
|
+
background: activeColor,
|
|
3545
|
+
position: 'absolute',
|
|
3546
|
+
width: '12px',
|
|
3547
|
+
height: '12px',
|
|
3548
|
+
top: 0,
|
|
3549
|
+
right: 0,
|
|
3550
|
+
bottom: 0,
|
|
3551
|
+
left: 0
|
|
3552
|
+
}
|
|
3553
|
+
})), label ? /*#__PURE__*/ React__default.createElement(Label, {
|
|
3554
|
+
value: label
|
|
3555
|
+
}) : null);
|
|
3556
|
+
}
|
|
3557
|
+
IndicatorLight.dataSource = DataSource;
|
|
3558
|
+
|
|
3559
|
+
// Rotary Slider UI component.
|
|
3560
|
+
// Connects to Juce's Slider element
|
|
3561
|
+
function RotarySlider(param) {
|
|
3562
|
+
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,
|
|
3563
|
+
indicatorId = param.indicatorId, 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, width = param.width, 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 ? {
|
|
3564
|
+
start: 20.0,
|
|
3565
|
+
end: 15000.0,
|
|
3566
|
+
interval: 0.1,
|
|
3567
|
+
skew: 0.7
|
|
3568
|
+
} : _param_mockProperties; param.style;
|
|
3569
|
+
var _rotarySliderSizeMap_size, _rotarySliderSizeMap_size1, _rotarySliderSizeMap_size2;
|
|
3570
|
+
var _useSlider = useSlider({
|
|
3571
|
+
id: id,
|
|
3572
|
+
label: label,
|
|
3573
|
+
mockProperties: mockProperties,
|
|
3574
|
+
mockInitialNormalisedValue: mockInitialNormalisedValue,
|
|
3575
|
+
onChange: onChange,
|
|
3576
|
+
isRandomizable: isRandomizable
|
|
3577
|
+
}), bindDrag = _useSlider.bindDrag, normalisedValue = _useSlider.normalisedValue, scaledValue = _useSlider.scaledValue, setToDefaultState = _useSlider.setToDefaultState, setNormalisedState = _useSlider.setNormalisedState, properties = _useSlider.properties;
|
|
3578
|
+
return /*#__PURE__*/ React__default.createElement(ControlGroup, {
|
|
3579
|
+
id: id,
|
|
3580
|
+
width: width
|
|
3581
|
+
}, /*#__PURE__*/ React__default.createElement(Box, {
|
|
3582
|
+
className: "RotarySlider-wrapper",
|
|
3583
|
+
flexDirection: Box.flexDirection.column,
|
|
3584
|
+
gap: Box.gap.none,
|
|
3585
|
+
flex: "0 1 auto"
|
|
3586
|
+
}, label ? /*#__PURE__*/ React__default.createElement(Label, {
|
|
3587
|
+
padding: [
|
|
3588
|
+
Label.padding.none,
|
|
3589
|
+
Label.padding.none,
|
|
3590
|
+
Label.padding.small,
|
|
3591
|
+
Label.padding.none
|
|
3592
|
+
],
|
|
3593
|
+
fontSize: Label.fontSize.xSmall,
|
|
3594
|
+
value: label
|
|
3595
|
+
}) : null, /*#__PURE__*/ React__default.createElement(PositioningWrapper, {
|
|
3596
|
+
top: '25%',
|
|
3597
|
+
left: '-16px',
|
|
3598
|
+
width: "".concat(rotarySliderSizeMap === null || rotarySliderSizeMap === void 0 ? void 0 : (_rotarySliderSizeMap_size = rotarySliderSizeMap[size]) === null || _rotarySliderSizeMap_size === void 0 ? void 0 : _rotarySliderSizeMap_size.width, "px"),
|
|
3599
|
+
height: "".concat(rotarySliderSizeMap === null || rotarySliderSizeMap === void 0 ? void 0 : (_rotarySliderSizeMap_size1 = rotarySliderSizeMap[size]) === null || _rotarySliderSizeMap_size1 === void 0 ? void 0 : _rotarySliderSizeMap_size1.height, "px"),
|
|
3600
|
+
positionedElement: indicatorId ? /*#__PURE__*/ React__default.createElement(IndicatorLight, {
|
|
3601
|
+
id: indicatorId,
|
|
3602
|
+
dataSource: IndicatorLight.dataSource.event
|
|
3603
|
+
}) : null
|
|
3604
|
+
}, /*#__PURE__*/ React__default.createElement(RotaryCircle, {
|
|
3605
|
+
polarity: polarity,
|
|
3606
|
+
className: className,
|
|
3607
|
+
id: id,
|
|
3608
|
+
trackWidth: trackWidth,
|
|
3609
|
+
markerShape: markerShape,
|
|
3610
|
+
// trackOffset={trackOffset}
|
|
3611
|
+
sliderValue: normalisedValue,
|
|
3612
|
+
bindDrag: bindDrag,
|
|
3613
|
+
onDoubleClick: setToDefaultState,
|
|
3614
|
+
size: size,
|
|
3615
|
+
indicatorLineColor: indicatorLineColor,
|
|
3616
|
+
indicatorLineGradient: indicatorLineGradient,
|
|
3617
|
+
trackColor: trackColor,
|
|
3618
|
+
trackStrokeColor: trackStrokeColor,
|
|
3619
|
+
knobStrokeColor: knobStrokeColor,
|
|
3620
|
+
knobFillColor: knobFillColor
|
|
3621
|
+
})), /*#__PURE__*/ React__default.createElement(Input, {
|
|
3622
|
+
className: "ProgressCircle-value",
|
|
3623
|
+
value: scaledValue,
|
|
3624
|
+
id: id,
|
|
3625
|
+
min: (properties === null || properties === void 0 ? void 0 : properties.start) || 0,
|
|
3626
|
+
max: (properties === null || properties === void 0 ? void 0 : properties.end) || 0,
|
|
3627
|
+
textAlign: Input.textAlign.center,
|
|
3628
|
+
style: {
|
|
3629
|
+
fontWeight: 'bold',
|
|
3630
|
+
width: '100%',
|
|
3631
|
+
maxWidth: "".concat(rotarySliderSizeMap === null || rotarySliderSizeMap === void 0 ? void 0 : (_rotarySliderSizeMap_size2 = rotarySliderSizeMap[size]) === null || _rotarySliderSizeMap_size2 === void 0 ? void 0 : _rotarySliderSizeMap_size2.width, "px")
|
|
3632
|
+
},
|
|
3633
|
+
onComplete: function(value) {
|
|
3634
|
+
var normalisedVal = properties && scaledToNormalised({
|
|
3635
|
+
scaledValue: value,
|
|
3636
|
+
start: properties === null || properties === void 0 ? void 0 : properties.start,
|
|
3637
|
+
end: properties === null || properties === void 0 ? void 0 : properties.end,
|
|
3638
|
+
skew: properties === null || properties === void 0 ? void 0 : properties.skew
|
|
3639
|
+
});
|
|
3640
|
+
normalisedVal !== undefined && setNormalisedState(normalisedVal);
|
|
3641
|
+
}
|
|
3642
|
+
})));
|
|
3643
|
+
}
|
|
3644
|
+
RotarySlider.polarity = Polarity;
|
|
3645
|
+
RotarySlider.size = RotarySliderSizes;
|
|
3646
|
+
RotarySlider.markerShape = RotarySliderMarkerShapes;
|
|
3647
|
+
|
|
3648
|
+
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";
|
|
3649
|
+
styleInject(css_248z$6);
|
|
3650
|
+
|
|
3651
|
+
function _define_property$a(obj, key, value) {
|
|
3652
|
+
if (key in obj) {
|
|
3653
|
+
Object.defineProperty(obj, key, {
|
|
3654
|
+
value: value,
|
|
3655
|
+
enumerable: true,
|
|
3656
|
+
configurable: true,
|
|
3657
|
+
writable: true
|
|
3658
|
+
});
|
|
3659
|
+
} else {
|
|
3660
|
+
obj[key] = value;
|
|
3661
|
+
}
|
|
3662
|
+
return obj;
|
|
3663
|
+
}
|
|
3664
|
+
function _object_spread$a(target) {
|
|
3665
|
+
for(var i = 1; i < arguments.length; i++){
|
|
3666
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
3667
|
+
var ownKeys = Object.keys(source);
|
|
3668
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
3669
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
3670
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
3671
|
+
}));
|
|
3672
|
+
}
|
|
3673
|
+
ownKeys.forEach(function(key) {
|
|
3674
|
+
_define_property$a(target, key, source[key]);
|
|
3675
|
+
});
|
|
3676
|
+
}
|
|
3677
|
+
return target;
|
|
3678
|
+
}
|
|
3679
|
+
function ownKeys$1(object, enumerableOnly) {
|
|
3680
|
+
var keys = Object.keys(object);
|
|
3681
|
+
if (Object.getOwnPropertySymbols) {
|
|
3682
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
3683
|
+
keys.push.apply(keys, symbols);
|
|
3684
|
+
}
|
|
3685
|
+
return keys;
|
|
3686
|
+
}
|
|
3687
|
+
function _object_spread_props$1(target, source) {
|
|
3688
|
+
source = source != null ? source : {};
|
|
3689
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
3690
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
3691
|
+
} else {
|
|
3692
|
+
ownKeys$1(Object(source)).forEach(function(key) {
|
|
3693
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
3694
|
+
});
|
|
3695
|
+
}
|
|
3696
|
+
return target;
|
|
3697
|
+
}
|
|
3698
|
+
// Slider UI component.
|
|
3699
|
+
// Connects to Juce's Slider element.
|
|
3700
|
+
var BarSliderVariants = /*#__PURE__*/ function(BarSliderVariants) {
|
|
3701
|
+
BarSliderVariants["narrowTrack"] = "narrowTrack";
|
|
3702
|
+
BarSliderVariants["wideTrack"] = "wideTrack";
|
|
3703
|
+
return BarSliderVariants;
|
|
3704
|
+
}({});
|
|
3705
|
+
function Slider$1(param) {
|
|
3706
|
+
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
|
|
3707
|
+
mockInitialNormalisedValue, mockInitialNormalisedValue = _param_mockInitialNormalisedValue === void 0 ? 0 : _param_mockInitialNormalisedValue, _param_mockProperties = param.mockProperties, mockProperties = _param_mockProperties === void 0 ? {
|
|
3708
|
+
start: 20.0,
|
|
3709
|
+
end: 15000.0,
|
|
3710
|
+
interval: 0.1,
|
|
3711
|
+
skew: 0.7
|
|
3712
|
+
} : _param_mockProperties;
|
|
3713
|
+
var sliderElementRef = useRef(null);
|
|
3714
|
+
var isNarrowTrack = barSliderVariant === "narrowTrack";
|
|
3715
|
+
var isWideTrack = barSliderVariant === "wideTrack";
|
|
3716
|
+
var isHorizontal = orientation === Orientation.horizontal;
|
|
3717
|
+
var isVertical = orientation === Orientation.vertical;
|
|
3718
|
+
var defaultShowValueState = barSliderVariant === "narrowTrack" ? true : false;
|
|
3719
|
+
dragOrientation = isHorizontal ? Orientation.horizontal : orientation;
|
|
3720
|
+
var multiColorGradient = "linear-gradient(".concat(isHorizontal ? 'to right' : 'to top', ", var(--color-brand) 0%, var(--color-brand-secondary) 100%");
|
|
3721
|
+
var singleColorGradient = "linear-gradient(".concat(isHorizontal ? 'to right' : 'to top', ", var(--color-brand-700) 0%, var(--color-brand) 100%");
|
|
3722
|
+
var _obj;
|
|
3723
|
+
var selectedGradientMap = (_obj = {}, _define_property$a(_obj, GradientStyles.multicolor, multiColorGradient), _define_property$a(_obj, GradientStyles.unicolor, singleColorGradient), _obj);
|
|
3724
|
+
var _useSlider = useSlider({
|
|
3725
|
+
id: id,
|
|
3726
|
+
label: label,
|
|
3727
|
+
mockProperties: mockProperties,
|
|
3728
|
+
mockInitialNormalisedValue: mockInitialNormalisedValue,
|
|
3729
|
+
onChange: onChange,
|
|
3730
|
+
isRandomizable: isRandomizable,
|
|
3731
|
+
orientation: orientation,
|
|
3732
|
+
dragOrientation: dragOrientation,
|
|
3733
|
+
sliderElementRef: sliderElementRef
|
|
3734
|
+
}), bindBarSliderDrag = _useSlider.bindBarSliderDrag, bindSequenceBarSliderDrag = _useSlider.bindSequenceBarSliderDrag, // bindDrag,
|
|
3735
|
+
normalisedValue = _useSlider.normalisedValue, setNormalisedState = _useSlider.setNormalisedState, properties = _useSlider.properties;
|
|
3736
|
+
var drag = isStandalone ? bindBarSliderDrag : bindSequenceBarSliderDrag;
|
|
3737
|
+
return /*#__PURE__*/ React__default.createElement(Box, {
|
|
3738
|
+
flexDirection: Box.flexDirection.column,
|
|
3739
|
+
justifyContent: Box.justifyContent.center,
|
|
3740
|
+
className: classnames('BarSlider', isNarrowTrack && 'BarSlider--narrowTrack', isWideTrack && 'BarSlider--wideTrack', isVertical && 'BarSlider--isVertical', isHorizontal && 'BarSlider--isHorizontal', className),
|
|
3741
|
+
id: id,
|
|
3742
|
+
ref: sliderElementRef,
|
|
3743
|
+
gap: Box.gap.mediumSmall,
|
|
3744
|
+
height: isVertical ? '100%' : 'auto',
|
|
3745
|
+
style: {
|
|
3746
|
+
position: 'relative'
|
|
3747
|
+
}
|
|
3748
|
+
}, ' ', label ? /*#__PURE__*/ React__default.createElement(Label, {
|
|
3749
|
+
fontSize: Label.fontSize.xSmall,
|
|
3750
|
+
value: label,
|
|
3751
|
+
color: "var(--color-text)"
|
|
3752
|
+
}) : null, polarity === Polarity.bipolar && /*#__PURE__*/ React__default.createElement("div", {
|
|
3753
|
+
className: 'Slider-center-marker'
|
|
3754
|
+
}), /*#__PURE__*/ React__default.createElement(Box, {
|
|
3755
|
+
padding: isNarrowTrack ? (showValue !== null && showValue !== void 0 ? showValue : defaultShowValueState) ? [
|
|
3756
|
+
Box.padding.none,
|
|
3757
|
+
Box.padding.mediumSmall,
|
|
3758
|
+
Box.padding.none,
|
|
3759
|
+
Box.padding.mediumSmall
|
|
3760
|
+
] : [
|
|
3761
|
+
Box.padding.mediumSmall
|
|
3762
|
+
] : [
|
|
3763
|
+
Box.padding.none
|
|
3764
|
+
],
|
|
3765
|
+
height: "100%"
|
|
3766
|
+
}, /*#__PURE__*/ React__default.createElement("div", _object_spread_props$1(_object_spread$a({
|
|
3767
|
+
className: classnames('BarSlider-Track', isHighlighted && 'isHighlighted')
|
|
3768
|
+
}, drag()), {
|
|
3769
|
+
// onMouseEnter={onMouseEnter}
|
|
3770
|
+
id: id,
|
|
3771
|
+
style: _object_spread$a({
|
|
3772
|
+
background: trackColor,
|
|
3773
|
+
stroke: trackStrokeColor ? "1px solid ".concat(trackStrokeColor) : 'none'
|
|
3774
|
+
}, style)
|
|
3775
|
+
}), normalisedValue !== null && normalisedValue !== undefined ? /*#__PURE__*/ React__default.createElement("div", {
|
|
3776
|
+
className: "Barslider-IndicatorLineWrapper"
|
|
3777
|
+
}, /*#__PURE__*/ React__default.createElement("div", {
|
|
3778
|
+
// TODO: Why aren't the Tailwind classes working?
|
|
3779
|
+
// className={classnames('h-full', 'w-full', 'absolute', 'bg-panel')}
|
|
3780
|
+
className: "BarSlider-IndicatorLine",
|
|
3781
|
+
style: _object_spread$a({
|
|
3782
|
+
background: indicatorLineGradient ? selectedGradientMap[indicatorLineGradient] : indicatorLineColor,
|
|
3783
|
+
opacity: isStandalone || isHighlighted ? '100%' : '80%',
|
|
3784
|
+
top: "".concat(isHorizontal && isNarrowTrack && 'calc(50% - 3px)'),
|
|
3785
|
+
left: "".concat(isVertical && isNarrowTrack && 'calc(50% - 3px)')
|
|
3786
|
+
}, getBarTransformStyles({
|
|
3787
|
+
orientation: orientation,
|
|
3788
|
+
polarity: polarity,
|
|
3789
|
+
normalisedValue: normalisedValue
|
|
3790
|
+
}))
|
|
3791
|
+
})) : '', isNarrowTrack ? /*#__PURE__*/ React__default.createElement("div", {
|
|
3792
|
+
className: "BarSlider-MarkerWrapper",
|
|
3793
|
+
style: {
|
|
3794
|
+
bottom: '2px'
|
|
3795
|
+
}
|
|
3796
|
+
}, /*#__PURE__*/ React__default.createElement("div", {
|
|
3797
|
+
className: "BarSlider-Marker",
|
|
3798
|
+
style: {
|
|
3799
|
+
bottom: isVertical ? "calc(".concat(normalisedValue * 100, "% - 6px)") : '-6px',
|
|
3800
|
+
left: isHorizontal ? "calc(".concat(normalisedValue * 100, "% - 6px)") : '-6px'
|
|
3801
|
+
}
|
|
3802
|
+
}, /*#__PURE__*/ React__default.createElement(BarSliderMarker, {
|
|
3803
|
+
markerFillColor: markerFillColor,
|
|
3804
|
+
markerStrokeColor: markerStrokeColor,
|
|
3805
|
+
strokeWidth: 5
|
|
3806
|
+
}))) : null)), (showValue !== null && showValue !== void 0 ? showValue : defaultShowValueState) ? /*#__PURE__*/ React__default.createElement(Input, {
|
|
3807
|
+
className: "BarSlider-Input ".concat(includeValueInHeight ? 'includeValueInHeightIsTrue' : 'includeValueInHeightIsFalse'),
|
|
3808
|
+
value: normalisedValue,
|
|
3809
|
+
id: id,
|
|
3810
|
+
min: (properties === null || properties === void 0 ? void 0 : properties.start) || 0,
|
|
3811
|
+
max: (properties === null || properties === void 0 ? void 0 : properties.end) || 0,
|
|
3812
|
+
type: Input.type.number,
|
|
3813
|
+
textColor: 'var(--bg-lv12)',
|
|
3814
|
+
style: {
|
|
3815
|
+
},
|
|
3816
|
+
textAlign: Input.textAlign.center,
|
|
3817
|
+
onComplete: function(value) {
|
|
3818
|
+
normalisedValue !== undefined && setNormalisedState(normalisedValue);
|
|
3819
|
+
}
|
|
3820
|
+
}) : null);
|
|
3821
|
+
}
|
|
3822
|
+
Slider$1.sliderType = SliderType;
|
|
3823
|
+
Slider$1.polarity = Polarity;
|
|
3824
|
+
Slider$1.orientation = Orientation;
|
|
3825
|
+
|
|
3826
|
+
function _array_like_to_array$b(arr, len) {
|
|
3827
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
3828
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
3829
|
+
return arr2;
|
|
3830
|
+
}
|
|
3831
|
+
function _array_with_holes$b(arr) {
|
|
3832
|
+
if (Array.isArray(arr)) return arr;
|
|
3833
|
+
}
|
|
3834
|
+
function _iterable_to_array_limit$b(arr, i) {
|
|
3835
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
3836
|
+
if (_i == null) return;
|
|
3837
|
+
var _arr = [];
|
|
3838
|
+
var _n = true;
|
|
3839
|
+
var _d = false;
|
|
3840
|
+
var _s, _e;
|
|
3841
|
+
try {
|
|
3842
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
3843
|
+
_arr.push(_s.value);
|
|
3844
|
+
if (i && _arr.length === i) break;
|
|
3845
|
+
}
|
|
3846
|
+
} catch (err) {
|
|
3847
|
+
_d = true;
|
|
3848
|
+
_e = err;
|
|
3849
|
+
} finally{
|
|
3850
|
+
try {
|
|
3851
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
3852
|
+
} finally{
|
|
3853
|
+
if (_d) throw _e;
|
|
3854
|
+
}
|
|
3855
|
+
}
|
|
3856
|
+
return _arr;
|
|
3857
|
+
}
|
|
3858
|
+
function _non_iterable_rest$b() {
|
|
3859
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
3860
|
+
}
|
|
3861
|
+
function _sliced_to_array$b(arr, i) {
|
|
3862
|
+
return _array_with_holes$b(arr) || _iterable_to_array_limit$b(arr, i) || _unsupported_iterable_to_array$b(arr, i) || _non_iterable_rest$b();
|
|
3863
|
+
}
|
|
3864
|
+
function _unsupported_iterable_to_array$b(o, minLen) {
|
|
3865
|
+
if (!o) return;
|
|
3866
|
+
if (typeof o === "string") return _array_like_to_array$b(o, minLen);
|
|
3867
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
3868
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
3869
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
3870
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$b(o, minLen);
|
|
3871
|
+
}
|
|
3872
|
+
var useCombobox = function(param) {
|
|
3873
|
+
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;
|
|
3874
|
+
var _Object_values;
|
|
3875
|
+
var comboBoxState = Juce.getComboBoxState(id);
|
|
3876
|
+
var _useState = _sliced_to_array$b(useState(comboBoxState === null || comboBoxState === void 0 ? void 0 : comboBoxState.properties), 2), properties = _useState[0], setProperties = _useState[1];
|
|
3877
|
+
var _useState1 = _sliced_to_array$b(useState(0), 2), index = _useState1[0], setIndex = _useState1[1];
|
|
3878
|
+
var prevIndex = useRef(null);
|
|
3879
|
+
var nextIndex = useRef(null);
|
|
3880
|
+
var prevDragDirection = useRef(null);
|
|
3881
|
+
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;
|
|
3882
|
+
//TODO: Filter choices for subsequent rows
|
|
3883
|
+
// const availableChoices = properties?.choices;
|
|
3884
|
+
useEffect(function() {
|
|
3885
|
+
setIndex(comboBoxState === null || comboBoxState === void 0 ? void 0 : comboBoxState.getChoiceIndex());
|
|
3886
|
+
}, [
|
|
3887
|
+
id
|
|
3888
|
+
]);
|
|
3889
|
+
useEffect(function() {
|
|
3613
3890
|
setProperties(comboBoxState === null || comboBoxState === void 0 ? void 0 : comboBoxState.properties);
|
|
3614
3891
|
});
|
|
3615
3892
|
useEffect(function() {
|
|
@@ -3684,360 +3961,120 @@ var useCombobox = function(param) {
|
|
|
3684
3961
|
setModSlotRowTargetAsPreview({
|
|
3685
3962
|
paramId: id
|
|
3686
3963
|
});
|
|
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
|
|
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
|
-
};
|
|
3725
|
-
return {
|
|
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
|
|
3735
|
-
};
|
|
3736
|
-
};
|
|
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
|
-
|
|
3791
|
-
function _define_property$b(obj, key, value) {
|
|
3792
|
-
if (key in obj) {
|
|
3793
|
-
Object.defineProperty(obj, key, {
|
|
3794
|
-
value: value,
|
|
3795
|
-
enumerable: true,
|
|
3796
|
-
configurable: true,
|
|
3797
|
-
writable: true
|
|
3798
|
-
});
|
|
3799
|
-
} else {
|
|
3800
|
-
obj[key] = value;
|
|
3801
|
-
}
|
|
3802
|
-
return obj;
|
|
3803
|
-
}
|
|
3804
|
-
function _object_spread$b(target) {
|
|
3805
|
-
for(var i = 1; i < arguments.length; i++){
|
|
3806
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
3807
|
-
var ownKeys = Object.keys(source);
|
|
3808
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
3809
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
3810
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
3811
|
-
}));
|
|
3812
|
-
}
|
|
3813
|
-
ownKeys.forEach(function(key) {
|
|
3814
|
-
_define_property$b(target, key, source[key]);
|
|
3815
|
-
});
|
|
3816
|
-
}
|
|
3817
|
-
return target;
|
|
3818
|
-
}
|
|
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", {
|
|
3824
|
-
id: id,
|
|
3825
|
-
className: className,
|
|
3826
|
-
style: _object_spread$b({
|
|
3827
|
-
position: 'relative',
|
|
3828
|
-
height: height,
|
|
3829
|
-
width: width,
|
|
3830
|
-
margin: margin
|
|
3831
|
-
}, style)
|
|
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));
|
|
3841
|
-
}
|
|
3842
|
-
|
|
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;
|
|
3847
|
-
}
|
|
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;
|
|
3871
|
-
}
|
|
3872
|
-
}
|
|
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);
|
|
3964
|
+
}
|
|
3965
|
+
var directionY;
|
|
3966
|
+
if (direction[1] * -1 === 1 && directionY !== prevDragDirection.current) {
|
|
3967
|
+
directionY = 1;
|
|
3968
|
+
} else if (direction[1] * -1 === -1 && directionY !== prevDragDirection.current) {
|
|
3969
|
+
directionY = -1;
|
|
3970
|
+
}
|
|
3971
|
+
if (index < (properties === null || properties === void 0 ? void 0 : properties.choices.length) && directionY && directionY === 1) {
|
|
3972
|
+
incrementIndex();
|
|
3973
|
+
} else if (index > 0 && directionY && directionY === -1) {
|
|
3974
|
+
decrementIndex();
|
|
3975
|
+
}
|
|
3976
|
+
// console.log(nextIndex.current, 'nextIndexnextIndexnextIndex');
|
|
3977
|
+
if (nextIndex.current !== null && nextIndex.current !== undefined && nextIndex.current !== index.current) {
|
|
3978
|
+
comboBoxState === null || comboBoxState === void 0 ? void 0 : comboBoxState.setChoiceIndex(nextIndex.current);
|
|
3979
|
+
}
|
|
3910
3980
|
}
|
|
3911
|
-
}
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
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);
|
|
3981
|
+
}, {
|
|
3982
|
+
enabled: !isDisabled
|
|
3983
|
+
});
|
|
3984
|
+
var onMouseEnter = function() {
|
|
3985
|
+
if (displayValInHeader) {
|
|
3986
|
+
highlightedItemChanged({
|
|
3987
|
+
label: label,
|
|
3988
|
+
value: automatableParamLabels === null || automatableParamLabels === void 0 ? void 0 : automatableParamLabels[index]
|
|
3948
3989
|
});
|
|
3949
|
-
return function cleanup() {
|
|
3950
|
-
//@ts-expect-error
|
|
3951
|
-
window.__JUCE__.backend.removeEventListener(getLFOOutdata);
|
|
3952
|
-
};
|
|
3953
|
-
} else {
|
|
3954
|
-
return;
|
|
3955
3990
|
}
|
|
3956
|
-
}
|
|
3991
|
+
};
|
|
3992
|
+
var onClick = function() {
|
|
3993
|
+
setModSlotRowTargetAsPreview({
|
|
3994
|
+
paramId: id
|
|
3995
|
+
});
|
|
3996
|
+
};
|
|
3997
|
+
var onDoubleClick = function() {
|
|
3998
|
+
setModSlotRowTargetAsPreview({
|
|
3999
|
+
paramId: id
|
|
4000
|
+
});
|
|
4001
|
+
};
|
|
3957
4002
|
return {
|
|
3958
|
-
|
|
3959
|
-
|
|
4003
|
+
index: index,
|
|
4004
|
+
valueString: automatableParamLabels === null || automatableParamLabels === void 0 ? void 0 : automatableParamLabels[index],
|
|
4005
|
+
setIndex: setIndex,
|
|
4006
|
+
choices: properties === null || properties === void 0 ? void 0 : properties.choices,
|
|
4007
|
+
filteredChoices: filteredChoices,
|
|
4008
|
+
onMouseEnter: onMouseEnter,
|
|
4009
|
+
onClick: onClick,
|
|
4010
|
+
onDoubleClick: onDoubleClick,
|
|
4011
|
+
bindDrag: bindDrag
|
|
3960
4012
|
};
|
|
3961
4013
|
};
|
|
3962
4014
|
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
}
|
|
3972
|
-
|
|
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({
|
|
4015
|
+
// Rotary Slider UI component.
|
|
4016
|
+
// Connects to Juce's Slider element
|
|
4017
|
+
function RotaryCombobox(param) {
|
|
4018
|
+
var _param_polarity = param.polarity, polarity = _param_polarity === void 0 ? Polarity.unipolar : _param_polarity, label = param.label, className = param.className, id = param.id, indicatorId = param.indicatorId, trackWidth = param.trackWidth, width = param.width, // trackOffset,
|
|
4019
|
+
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;
|
|
4020
|
+
var _rotarySliderSizeMap_size, _rotarySliderSizeMap_size1;
|
|
4021
|
+
var _useCombobox = useCombobox({
|
|
4022
|
+
id: id
|
|
4023
|
+
}), index = _useCombobox.index, choices = _useCombobox.choices, valueString = _useCombobox.valueString, onDoubleClick = _useCombobox.onDoubleClick, bindDrag = _useCombobox.bindDrag;
|
|
4024
|
+
return /*#__PURE__*/ React__default.createElement(ControlGroup, {
|
|
3994
4025
|
id: id,
|
|
3995
|
-
|
|
3996
|
-
}
|
|
3997
|
-
|
|
4026
|
+
width: width
|
|
4027
|
+
}, /*#__PURE__*/ React__default.createElement(Box, {
|
|
4028
|
+
className: "RotarySlider-wrapper",
|
|
3998
4029
|
flexDirection: Box.flexDirection.column,
|
|
3999
|
-
gap: Box.gap.
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
}, style)
|
|
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, {
|
|
4030
|
+
gap: Box.gap.none,
|
|
4031
|
+
flex: "0 1 auto"
|
|
4032
|
+
}, label ? /*#__PURE__*/ React__default.createElement(Label, {
|
|
4033
|
+
padding: [
|
|
4034
|
+
Label.padding.none,
|
|
4035
|
+
Label.padding.none,
|
|
4036
|
+
Label.padding.small,
|
|
4037
|
+
Label.padding.none
|
|
4038
|
+
],
|
|
4039
|
+
fontSize: Label.fontSize.xSmall,
|
|
4037
4040
|
value: label
|
|
4038
|
-
}) : null
|
|
4041
|
+
}) : null, /*#__PURE__*/ React__default.createElement(PositioningWrapper, {
|
|
4042
|
+
top: '25%',
|
|
4043
|
+
left: '-16px',
|
|
4044
|
+
width: "".concat(rotarySliderSizeMap === null || rotarySliderSizeMap === void 0 ? void 0 : (_rotarySliderSizeMap_size = rotarySliderSizeMap[size]) === null || _rotarySliderSizeMap_size === void 0 ? void 0 : _rotarySliderSizeMap_size.width, "px"),
|
|
4045
|
+
height: "".concat(rotarySliderSizeMap === null || rotarySliderSizeMap === void 0 ? void 0 : (_rotarySliderSizeMap_size1 = rotarySliderSizeMap[size]) === null || _rotarySliderSizeMap_size1 === void 0 ? void 0 : _rotarySliderSizeMap_size1.height, "px"),
|
|
4046
|
+
positionedElement: indicatorId ? /*#__PURE__*/ React__default.createElement(IndicatorLight, {
|
|
4047
|
+
id: indicatorId,
|
|
4048
|
+
dataSource: IndicatorLight.dataSource.event
|
|
4049
|
+
}) : null
|
|
4050
|
+
}, /*#__PURE__*/ React__default.createElement(RotaryCircle, {
|
|
4051
|
+
polarity: polarity,
|
|
4052
|
+
className: className,
|
|
4053
|
+
id: id,
|
|
4054
|
+
markerShape: markerShape,
|
|
4055
|
+
trackWidth: trackWidth,
|
|
4056
|
+
// trackOffset={trackOffset}
|
|
4057
|
+
sliderValue: scaledToNormalised({
|
|
4058
|
+
scaledValue: index,
|
|
4059
|
+
start: 0,
|
|
4060
|
+
end: choices.length - 1
|
|
4061
|
+
}),
|
|
4062
|
+
bindDrag: bindDrag,
|
|
4063
|
+
onDoubleClick: onDoubleClick,
|
|
4064
|
+
size: size,
|
|
4065
|
+
indicatorLineColor: indicatorLineColor,
|
|
4066
|
+
indicatorLineGradient: indicatorLineGradient,
|
|
4067
|
+
trackColor: trackColor,
|
|
4068
|
+
trackStrokeColor: trackStrokeColor,
|
|
4069
|
+
knobStrokeColor: knobStrokeColor,
|
|
4070
|
+
knobFillColor: knobFillColor
|
|
4071
|
+
})), /*#__PURE__*/ React__default.createElement(Label, {
|
|
4072
|
+
fontSize: Label.fontSize.xSmall
|
|
4073
|
+
}, valueString)));
|
|
4039
4074
|
}
|
|
4040
|
-
|
|
4075
|
+
RotaryCombobox.polarity = Polarity;
|
|
4076
|
+
RotaryCombobox.size = RotarySliderSizes;
|
|
4077
|
+
RotaryCombobox.markerShape = RotarySliderMarkerShapes;
|
|
4041
4078
|
|
|
4042
4079
|
// Rotary Slider UI component.
|
|
4043
4080
|
// Connects to Juce's Slider element
|
|
@@ -4048,26 +4085,16 @@ var SliderVariants = /*#__PURE__*/ function(SliderVariants) {
|
|
|
4048
4085
|
return SliderVariants;
|
|
4049
4086
|
}({});
|
|
4050
4087
|
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,
|
|
4088
|
+
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, width = param.width, 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
4089
|
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
|
-
|
|
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, {
|
|
4090
|
+
return /*#__PURE__*/ React__default.createElement(React__default.Fragment, null, variant === "rotary" ? /*#__PURE__*/ React__default.createElement(RotarySlider, {
|
|
4065
4091
|
polarity: polarity,
|
|
4066
4092
|
label: label,
|
|
4067
4093
|
labelColor: labelColor,
|
|
4068
4094
|
trackWidth: trackWidth,
|
|
4069
4095
|
indicatorLineColor: indicatorLineColor,
|
|
4070
4096
|
indicatorLineGradient: indicatorLineGradient,
|
|
4097
|
+
width: width,
|
|
4071
4098
|
// trackOffset={trackOffset}
|
|
4072
4099
|
markerShape: markerShape,
|
|
4073
4100
|
trackColor: trackColor,
|
|
@@ -4076,23 +4103,16 @@ function Slider(param) {
|
|
|
4076
4103
|
knobFillColor: knobFillColor,
|
|
4077
4104
|
className: className,
|
|
4078
4105
|
id: id,
|
|
4106
|
+
indicatorId: indicatorId,
|
|
4079
4107
|
onChange: onChange,
|
|
4080
4108
|
size: size,
|
|
4081
4109
|
mockInitialNormalisedValue: mockInitialNormalisedValue,
|
|
4082
4110
|
isRandomizable: isRandomizable,
|
|
4083
4111
|
rotationBehavior: rotationBehavior
|
|
4084
|
-
})
|
|
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, {
|
|
4112
|
+
}) : null, variant === "rotaryCombobox" ? /*#__PURE__*/ React__default.createElement(RotaryCombobox, {
|
|
4094
4113
|
polarity: polarity,
|
|
4095
4114
|
label: label,
|
|
4115
|
+
width: width,
|
|
4096
4116
|
labelColor: labelColor,
|
|
4097
4117
|
trackWidth: trackWidth,
|
|
4098
4118
|
indicatorLineColor: indicatorLineColor,
|
|
@@ -4105,12 +4125,13 @@ function Slider(param) {
|
|
|
4105
4125
|
knobFillColor: knobFillColor,
|
|
4106
4126
|
className: className,
|
|
4107
4127
|
id: id,
|
|
4128
|
+
indicatorId: indicatorId,
|
|
4108
4129
|
onChange: onChange,
|
|
4109
4130
|
size: size,
|
|
4110
4131
|
mockInitialNormalisedValue: mockInitialNormalisedValue,
|
|
4111
4132
|
isRandomizable: isRandomizable,
|
|
4112
4133
|
rotationBehavior: rotationBehavior
|
|
4113
|
-
})
|
|
4134
|
+
}) : null, variant === "bar" ? /*#__PURE__*/ React__default.createElement(Slider$1, {
|
|
4114
4135
|
polarity: polarity,
|
|
4115
4136
|
label: label,
|
|
4116
4137
|
indicatorLineColor: indicatorLineColor,
|
|
@@ -5456,7 +5477,7 @@ function ModuleHeader(param) {
|
|
|
5456
5477
|
}, "Advanced")))));
|
|
5457
5478
|
}
|
|
5458
5479
|
|
|
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:
|
|
5480
|
+
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: default;\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
5481
|
styleInject(css_248z$2);
|
|
5461
5482
|
|
|
5462
5483
|
var targetColors = [
|
|
@@ -6872,20 +6893,21 @@ function LFOBox(param) {
|
|
|
6872
6893
|
Box.padding.large,
|
|
6873
6894
|
Box.padding.mediumLarge
|
|
6874
6895
|
],
|
|
6896
|
+
flex: "1 1 auto",
|
|
6875
6897
|
fullHeight: true
|
|
6876
6898
|
}, /*#__PURE__*/ React__default.createElement(Box, {
|
|
6877
6899
|
flexDirection: Box.flexDirection.column,
|
|
6878
6900
|
justifyContent: Box.justifyContent.flexStart,
|
|
6879
6901
|
alignItems: Box.alignItems.flexStart,
|
|
6880
6902
|
width: "130px",
|
|
6881
|
-
flex
|
|
6903
|
+
// flex="0 0 130px"
|
|
6882
6904
|
// padding={[Box.padding.medium]}
|
|
6883
6905
|
fullHeight: true
|
|
6884
6906
|
}, /*#__PURE__*/ React__default.createElement(Heading, {
|
|
6885
6907
|
padding: [
|
|
6886
6908
|
Heading.padding.none,
|
|
6887
6909
|
Heading.padding.none,
|
|
6888
|
-
Heading.padding.
|
|
6910
|
+
Heading.padding.small,
|
|
6889
6911
|
Heading.padding.none
|
|
6890
6912
|
],
|
|
6891
6913
|
removeLineHeight: true,
|
|
@@ -6895,7 +6917,11 @@ function LFOBox(param) {
|
|
|
6895
6917
|
flex: "1",
|
|
6896
6918
|
gap: Box.gap.large,
|
|
6897
6919
|
justifyContent: Box.justifyContent.flexStart
|
|
6898
|
-
}, /*#__PURE__*/ React__default.createElement(Box,
|
|
6920
|
+
}, /*#__PURE__*/ React__default.createElement(Box, {
|
|
6921
|
+
padding: [
|
|
6922
|
+
Box.padding.small
|
|
6923
|
+
]
|
|
6924
|
+
}, syncType === 0 ? /*#__PURE__*/ React__default.createElement(Slider, {
|
|
6899
6925
|
size: Slider.size.large,
|
|
6900
6926
|
id: "LFO".concat(id, "_Hz"),
|
|
6901
6927
|
label: "LFO".concat(id, " Hz"),
|
|
@@ -7013,7 +7039,11 @@ function LFOTab() {
|
|
|
7013
7039
|
return /*#__PURE__*/ React__default.createElement(Box, {
|
|
7014
7040
|
className: "LFOTab",
|
|
7015
7041
|
gap: Box.gap.medium,
|
|
7016
|
-
|
|
7042
|
+
fullHeight: true,
|
|
7043
|
+
alignItems: Box.alignItems.flexStart,
|
|
7044
|
+
padding: [
|
|
7045
|
+
Box.padding.medium
|
|
7046
|
+
]
|
|
7017
7047
|
}, /*#__PURE__*/ React__default.createElement(LFOBox, {
|
|
7018
7048
|
id: 1
|
|
7019
7049
|
}), /*#__PURE__*/ React__default.createElement(LFOBox, {
|
|
@@ -7220,10 +7250,11 @@ function SeqTab$1(param) {
|
|
|
7220
7250
|
padding: [
|
|
7221
7251
|
Box.padding.mediumLarge
|
|
7222
7252
|
],
|
|
7223
|
-
|
|
7253
|
+
fullHeight: true
|
|
7224
7254
|
}, /*#__PURE__*/ React__default.createElement(Box, {
|
|
7225
7255
|
gap: Box.gap.medium,
|
|
7226
|
-
justifyContent: Box.justifyContent.flexStart
|
|
7256
|
+
justifyContent: Box.justifyContent.flexStart,
|
|
7257
|
+
fullHeight: true
|
|
7227
7258
|
}, /*#__PURE__*/ React__default.createElement(Heading, {
|
|
7228
7259
|
padding: [
|
|
7229
7260
|
Heading.padding.none,
|
|
@@ -7238,10 +7269,12 @@ function SeqTab$1(param) {
|
|
|
7238
7269
|
gap: Box.gap.medium,
|
|
7239
7270
|
height: "100%"
|
|
7240
7271
|
}, /*#__PURE__*/ React__default.createElement(Box, {
|
|
7241
|
-
flex: "
|
|
7272
|
+
flex: "0 0 170px",
|
|
7273
|
+
height: "170px"
|
|
7242
7274
|
}, /*#__PURE__*/ React__default.createElement(StepSequencer, {
|
|
7243
7275
|
seqId: seqId
|
|
7244
7276
|
})), /*#__PURE__*/ React__default.createElement(Box, {
|
|
7277
|
+
height: "71px",
|
|
7245
7278
|
gap: Box.gap.medium,
|
|
7246
7279
|
padding: [
|
|
7247
7280
|
Box.padding.none,
|
|
@@ -7277,10 +7310,12 @@ function SeqTab$1(param) {
|
|
|
7277
7310
|
id: "seq".concat(seqId, "_syncRate"),
|
|
7278
7311
|
label: "Seq".concat(seqId, " Sync Rate")
|
|
7279
7312
|
}) : null, syncType === 3 ? /*#__PURE__*/ React__default.createElement(Slider, {
|
|
7313
|
+
width: "155px",
|
|
7280
7314
|
id: "seq".concat(seqId, "_thirds"),
|
|
7281
7315
|
indicatorLineGradient: Slider.gradientStyles.unicolor,
|
|
7282
7316
|
label: "Seq".concat(seqId, " Thirds")
|
|
7283
7317
|
}) : null, syncType === 4 ? /*#__PURE__*/ React__default.createElement(Slider, {
|
|
7318
|
+
width: "155px",
|
|
7284
7319
|
indicatorLineGradient: Slider.gradientStyles.unicolor,
|
|
7285
7320
|
id: "seq".concat(seqId, "_sixteenths"),
|
|
7286
7321
|
label: "Seq".concat(seqId, " Sixteenths")
|
|
@@ -7298,7 +7333,11 @@ function SeqTab() {
|
|
|
7298
7333
|
return /*#__PURE__*/ React__default.createElement(Box, {
|
|
7299
7334
|
className: "SeqTab",
|
|
7300
7335
|
gap: Box.gap.medium,
|
|
7301
|
-
fullHeight: true
|
|
7336
|
+
fullHeight: true,
|
|
7337
|
+
alignItems: Box.alignItems.flexStart,
|
|
7338
|
+
padding: [
|
|
7339
|
+
Box.padding.medium
|
|
7340
|
+
]
|
|
7302
7341
|
}, /*#__PURE__*/ React__default.createElement(SeqTab$1, {
|
|
7303
7342
|
seqId: 1
|
|
7304
7343
|
}), /*#__PURE__*/ React__default.createElement(SeqTab$1, {
|
|
@@ -7597,12 +7636,13 @@ function ModuleFooter(param) {
|
|
|
7597
7636
|
style: _object_spread({
|
|
7598
7637
|
backgroundColor: 'var(--bg-lv3)'
|
|
7599
7638
|
}, style),
|
|
7600
|
-
|
|
7639
|
+
height: "342px"
|
|
7601
7640
|
}, /*#__PURE__*/ React__default.createElement(Box, {
|
|
7602
7641
|
flexDirection: Box.flexDirection.column,
|
|
7603
|
-
|
|
7642
|
+
fullHeight: true,
|
|
7604
7643
|
justifyContent: Box.justifyContent.flexStart
|
|
7605
7644
|
}, /*#__PURE__*/ React__default.createElement(Box, {
|
|
7645
|
+
height: "32px",
|
|
7606
7646
|
// style={{ backgroundColor: 'var(--bg-lv4)' }}
|
|
7607
7647
|
padding: [
|
|
7608
7648
|
Box.padding.xSmall,
|
|
@@ -7627,13 +7667,12 @@ function ModuleFooter(param) {
|
|
|
7627
7667
|
],
|
|
7628
7668
|
backgroundColor: "var(--bg-lv4)",
|
|
7629
7669
|
selectedBackgroundColor: "var(--bg-lv3)",
|
|
7630
|
-
width: "100%"
|
|
7670
|
+
width: "100%",
|
|
7671
|
+
height: "32px"
|
|
7631
7672
|
})), /*#__PURE__*/ React__default.createElement(Box, {
|
|
7632
|
-
padding: [
|
|
7633
|
-
Box.padding.medium
|
|
7634
|
-
],
|
|
7635
7673
|
alignItems: Box.alignItems.flexStart,
|
|
7636
|
-
|
|
7674
|
+
height: "305px",
|
|
7675
|
+
width: "100%"
|
|
7637
7676
|
}, 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) : '')));
|
|
7638
7677
|
}
|
|
7639
7678
|
|