@antimatter-audio/antimatter-ui 6.0.0 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.d.ts +293 -258
- package/dist/index.js +963 -1502
- package/dist/index.js.map +1 -1
- package/package.json +6 -1
package/README.md
CHANGED
|
@@ -74,7 +74,7 @@ If you add a new component to this library, make sure to also add the component
|
|
|
74
74
|
|
|
75
75
|
If your new component controls an `AudioProcessorValueTreeState` paramater in Juce, you will need to handle getting and setting that state in your React component, and you will also need to set up a parameter for that state in the demo Juce app in [antimatter-plugin-template](http://github.com/antimatter-audio/antimatter-ui).
|
|
76
76
|
|
|
77
|
-
See `
|
|
77
|
+
See `core/Buttons/Button.tsx`, `core/Input/Dropdown.tsx`, and `core/Input/Slider.tsx` for examples of how to get and set Juce's `ToggleState`, `ComboBoxState`, and `SliderState`.
|
|
78
78
|
|
|
79
79
|
See the README file in the `/juce` directory in the [antimatter-plugin-template](http://github.com/antimatter-audio/antimatter-ui) repo for more information on setting up an `AudioProcessorValueTreeState` parameter in the demo app.
|
|
80
80
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,130 +1,84 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { Spacing as Spacing$1, FlexWrap as FlexWrap$1 } from 'common/types';
|
|
4
|
+
import { FlexDirection as FlexDirection$1, AlignItems, JustifyContent as JustifyContent$1 } from 'core/Layout/types';
|
|
5
|
+
export { defaultTheme, root, themeValues } from 'styles.css';
|
|
6
|
+
import * as _use_gesture_react_dist_declarations_src_types from '@use-gesture/react/dist/declarations/src/types';
|
|
7
|
+
import { SliderOrientation as SliderOrientation$1, JuceSliderProperties as JuceSliderProperties$1 } from 'core/Slider/types';
|
|
4
8
|
|
|
5
9
|
interface TabsProps {
|
|
6
10
|
items: Array<string>;
|
|
7
11
|
onChange: (index: number) => void;
|
|
8
|
-
|
|
9
|
-
textColor: GLOBAL_NAMED_COLORS$1 | string;
|
|
10
|
-
backgroundColor: GLOBAL_NAMED_COLORS$1 | string;
|
|
11
|
-
backgroundImage: string;
|
|
12
|
-
};
|
|
13
|
-
padding?: Array<SPACING$1>;
|
|
12
|
+
padding?: Array<Spacing$1>;
|
|
14
13
|
className?: string;
|
|
15
14
|
style?: object;
|
|
16
15
|
}
|
|
17
16
|
declare function Tabs({ items, className, padding, onChange, }: React__default.PropsWithChildren<TabsProps>): React__default.JSX.Element;
|
|
18
|
-
declare namespace Tabs {
|
|
19
|
-
var TEXT_COLOR: typeof GLOBAL_NAMED_COLORS$1;
|
|
20
|
-
var BACKGROUND_COLOR: typeof GLOBAL_NAMED_COLORS$1;
|
|
21
|
-
}
|
|
22
17
|
|
|
23
|
-
declare enum
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
declare enum ButtonSize {
|
|
19
|
+
small = "small",
|
|
20
|
+
large = "large"
|
|
26
21
|
}
|
|
27
|
-
declare enum
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
declare enum ButtonType {
|
|
23
|
+
momentary = "momentary",
|
|
24
|
+
latch = "latch"
|
|
30
25
|
}
|
|
31
26
|
|
|
32
27
|
interface TextButtonProps {
|
|
33
28
|
id: any;
|
|
34
29
|
disabled?: boolean;
|
|
35
|
-
size?:
|
|
36
|
-
type?:
|
|
37
|
-
componentTheme?: {
|
|
38
|
-
textColor?: GLOBAL_NAMED_COLORS$1 | string;
|
|
39
|
-
backgroundColor?: GLOBAL_NAMED_COLORS$1 | string;
|
|
40
|
-
backgroundImage?: string;
|
|
41
|
-
};
|
|
30
|
+
size?: ButtonSize;
|
|
31
|
+
type?: ButtonType;
|
|
42
32
|
text?: string;
|
|
43
33
|
className?: string;
|
|
44
34
|
style?: object;
|
|
45
35
|
children?: React.ReactNode;
|
|
46
36
|
}
|
|
47
|
-
declare function Button({ disabled, text, id, className,
|
|
37
|
+
declare function Button({ disabled, text, id, className, style, children, type, size, }: React.PropsWithChildren<TextButtonProps>): React.JSX.Element;
|
|
48
38
|
declare namespace Button {
|
|
49
|
-
var
|
|
50
|
-
var
|
|
51
|
-
var BACKGROUND: typeof GLOBAL_NAMED_COLORS$1;
|
|
52
|
-
var TEXT_COLOR: typeof GLOBAL_NAMED_COLORS$1;
|
|
39
|
+
var type: typeof ButtonType;
|
|
40
|
+
var size: typeof ButtonSize;
|
|
53
41
|
}
|
|
54
42
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
43
|
+
interface DropdownProps {
|
|
44
|
+
id: string;
|
|
45
|
+
items: Array<string>;
|
|
46
|
+
className?: string;
|
|
47
|
+
onChange?: (event: any) => {};
|
|
58
48
|
}
|
|
49
|
+
declare function Dropdown({ items, className, id }: DropdownProps): React__default.JSX.Element;
|
|
50
|
+
|
|
51
|
+
declare function TextInput({ onChange, value, min, max, minLength, maxLength, style, className, textColor, }: {
|
|
52
|
+
onChange: ({ scaledValue }: {
|
|
53
|
+
scaledValue: number;
|
|
54
|
+
}) => any;
|
|
55
|
+
value: number;
|
|
56
|
+
min: number;
|
|
57
|
+
max: number;
|
|
58
|
+
minLength?: number;
|
|
59
|
+
maxLength?: number;
|
|
60
|
+
textColor?: string;
|
|
61
|
+
style?: React__default.CSSProperties;
|
|
62
|
+
className?: string;
|
|
63
|
+
}): React__default.JSX.Element;
|
|
59
64
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
MEDIUM_LARGE = "mediumlarge",
|
|
78
|
-
LARGE = "large",
|
|
79
|
-
X_LARGE = "xlarge"
|
|
80
|
-
}
|
|
81
|
-
declare enum POSITION {
|
|
82
|
-
TOP = "top",
|
|
83
|
-
BOTTOM = "bottom"
|
|
84
|
-
}
|
|
85
|
-
declare enum DIRECTION {
|
|
86
|
-
VERTICAL = "vertical",
|
|
87
|
-
HORIZONTAL = "horizontal"
|
|
88
|
-
}
|
|
89
|
-
declare enum ALIGN {
|
|
90
|
-
FLEX_START = "flex-start",
|
|
91
|
-
FLEX_END = "flex-end",
|
|
92
|
-
CENTER = "center"
|
|
93
|
-
}
|
|
94
|
-
declare enum JUSTIFY {
|
|
95
|
-
FLEX_START = "flex-start",
|
|
96
|
-
FLEX_END = "flex-end",
|
|
97
|
-
CENTER = "center"
|
|
98
|
-
}
|
|
99
|
-
declare enum HEIGHT {
|
|
100
|
-
FULL = "100%",
|
|
101
|
-
AUTO = "auto"
|
|
102
|
-
}
|
|
103
|
-
declare enum WIDTH {
|
|
104
|
-
FULL = "100%",
|
|
105
|
-
AUTO = "auto"
|
|
106
|
-
}
|
|
107
|
-
declare enum TEXT_SIZES {
|
|
108
|
-
X_SMALL = "xsmall",
|
|
109
|
-
SMALL = "small",
|
|
110
|
-
MEDIUM = "medium",
|
|
111
|
-
LARGE = "large",
|
|
112
|
-
X_LARGE = "xlarge"
|
|
113
|
-
}
|
|
114
|
-
declare enum GLOBAL_DEFAULT_THEMES {
|
|
115
|
-
LIGHT = "light",
|
|
116
|
-
MED = "med",
|
|
117
|
-
DARK = "dark"
|
|
118
|
-
}
|
|
119
|
-
declare enum GLOBAL_NAMED_COLORS {
|
|
120
|
-
GLOBAL_ACCENT_DEFAULT = "global-accent-default",
|
|
121
|
-
LIGHT_TEXT = "light-text",
|
|
122
|
-
DARK_TEXT = "dark-text",
|
|
123
|
-
BG_LIGHT = "bg-light",
|
|
124
|
-
BG_MED_LIGHT = "bg-med-light",
|
|
125
|
-
BG_MED = "bg-med",
|
|
126
|
-
BG_MED_DARK = "bg-med-dark",
|
|
127
|
-
BG_DARK = "bg-dark"
|
|
65
|
+
declare enum SliderPolarity {
|
|
66
|
+
linear = "linear",
|
|
67
|
+
bipolar = "bipolar"
|
|
68
|
+
}
|
|
69
|
+
declare enum SliderType {
|
|
70
|
+
bar = "bar",
|
|
71
|
+
rotary = "rotary",
|
|
72
|
+
custom = "custom"
|
|
73
|
+
}
|
|
74
|
+
declare enum SliderRotationBehavior {
|
|
75
|
+
rotateIndicator = "rotateIndicator",
|
|
76
|
+
rotateKnob = "rotateKnob",
|
|
77
|
+
noRotation = "noRotation"
|
|
78
|
+
}
|
|
79
|
+
declare enum SliderOrientation {
|
|
80
|
+
horizontal = "horizontal",
|
|
81
|
+
vertical = "vertical"
|
|
128
82
|
}
|
|
129
83
|
interface JuceSliderProperties {
|
|
130
84
|
name?: string;
|
|
@@ -136,100 +90,66 @@ interface JuceSliderProperties {
|
|
|
136
90
|
numSteps?: number;
|
|
137
91
|
}
|
|
138
92
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
offset?: number;
|
|
146
|
-
padding?: Array<SPACING>;
|
|
147
|
-
centerContentHorizontal?: boolean;
|
|
148
|
-
centerContentVertical?: boolean;
|
|
149
|
-
alignContentRight?: boolean;
|
|
150
|
-
flexDirection?: FLEX_DIRECTION;
|
|
151
|
-
gap?: SPACING;
|
|
152
|
-
componentTheme?: {
|
|
153
|
-
backgroundColor: GLOBAL_NAMED_COLORS;
|
|
154
|
-
backgroundImage: string;
|
|
155
|
-
};
|
|
156
|
-
role?: LAYOUT_ROLES$2;
|
|
93
|
+
interface RotarySliderProps {
|
|
94
|
+
id: any;
|
|
95
|
+
polarity?: SliderPolarity;
|
|
96
|
+
rotationBehavior?: SliderRotationBehavior;
|
|
97
|
+
onMouseEnter?: (label: string, scaledValue: number) => void;
|
|
98
|
+
onChange?: (newValue: any) => void;
|
|
157
99
|
className?: string;
|
|
158
|
-
style?:
|
|
159
|
-
|
|
160
|
-
|
|
100
|
+
style?: object;
|
|
101
|
+
/**
|
|
102
|
+
* Returns the scaled value of the parameter. This corresponds to the return value of
|
|
103
|
+
* NormalisableRange::convertFrom0to1() (C++). This value will differ from a linear
|
|
104
|
+
* [0, 1] range if a non-default NormalisableRange was set for the parameter.
|
|
105
|
+
*/
|
|
106
|
+
mockInitialScaledValue?: number;
|
|
107
|
+
mockProperties?: JuceSliderProperties;
|
|
161
108
|
}
|
|
162
|
-
declare function
|
|
163
|
-
declare namespace
|
|
164
|
-
var
|
|
165
|
-
var ROLE: typeof LAYOUT_ROLES$2;
|
|
166
|
-
var FLEX_DIRECTION: typeof FLEX_DIRECTION;
|
|
167
|
-
var GAP: typeof SPACING;
|
|
109
|
+
declare function RotarySlider({ polarity, className, id, onMouseEnter, onChange, rotationBehavior, mockInitialScaledValue, mockProperties, style, }: React__default.PropsWithChildren<RotarySliderProps>): React__default.JSX.Element;
|
|
110
|
+
declare namespace RotarySlider {
|
|
111
|
+
var sliderPolarity: typeof SliderPolarity;
|
|
168
112
|
}
|
|
169
113
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
114
|
+
interface SliderProps {
|
|
115
|
+
id: any;
|
|
116
|
+
polarity?: SliderPolarity;
|
|
117
|
+
sliderOrientation?: SliderOrientation;
|
|
118
|
+
onMouseEnter?: (label: string, scaledValue: number) => void;
|
|
119
|
+
onChange?: (newValue: any) => any;
|
|
175
120
|
className?: string;
|
|
176
|
-
id?: string;
|
|
177
121
|
style?: object;
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
backgroundImage: string;
|
|
186
|
-
};
|
|
187
|
-
role?: LAYOUT_ROLES$1;
|
|
188
|
-
border?: boolean;
|
|
189
|
-
onClick?: () => void;
|
|
122
|
+
/**
|
|
123
|
+
* Returns the scaled value of the parameter. This corresponds to the return value of
|
|
124
|
+
* NormalisableRange::convertFrom0to1() (C++). This value will differ from a linear
|
|
125
|
+
* [0, 1] range if a non-default NormalisableRange was set for the parameter.
|
|
126
|
+
*/
|
|
127
|
+
mockInitialScaledValue?: number;
|
|
128
|
+
mockProperties?: JuceSliderProperties;
|
|
190
129
|
}
|
|
191
|
-
declare function
|
|
192
|
-
declare namespace
|
|
193
|
-
var
|
|
194
|
-
var
|
|
195
|
-
var
|
|
196
|
-
var GAP: typeof SPACING$1;
|
|
130
|
+
declare function Slider({ polarity, sliderOrientation, className, id, onMouseEnter, onChange, style, mockInitialScaledValue, mockProperties, }: React__default.PropsWithChildren<SliderProps>): React__default.JSX.Element;
|
|
131
|
+
declare namespace Slider {
|
|
132
|
+
var sliderType: typeof SliderType;
|
|
133
|
+
var sliderPolarity: typeof SliderPolarity;
|
|
134
|
+
var sliderOrientation: typeof SliderOrientation;
|
|
197
135
|
}
|
|
198
136
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
137
|
+
declare function SliderValue({ value, min, max, minLength, maxLength, isEditable, onChange, className, style, }: {
|
|
138
|
+
value: number;
|
|
139
|
+
min: number;
|
|
140
|
+
max: number;
|
|
141
|
+
minLength: number;
|
|
142
|
+
maxLength: number;
|
|
143
|
+
isEditable: boolean;
|
|
144
|
+
onChange: (...args: any) => any;
|
|
145
|
+
className: string;
|
|
146
|
+
style: React__default.CSSProperties;
|
|
147
|
+
}): React__default.JSX.Element;
|
|
206
148
|
|
|
207
|
-
|
|
208
|
-
LINEAR = "LINEAR",
|
|
209
|
-
BIPOLAR = "BIPOLAR"
|
|
210
|
-
}
|
|
211
|
-
declare enum SLIDER_TYPE {
|
|
212
|
-
BAR = "BAR",
|
|
213
|
-
ROTARY = "ROTARY",
|
|
214
|
-
ROTARY_LARGE = "ROTARY_LARGE"
|
|
215
|
-
}
|
|
216
|
-
declare enum SLIDER_ORIENTATION {
|
|
217
|
-
HORIZONTAL = "HORIZONTAL",
|
|
218
|
-
VERTICAL = "VERTICAL"
|
|
219
|
-
}
|
|
220
|
-
interface SliderProps {
|
|
149
|
+
interface CustomSliderProps {
|
|
221
150
|
id: any;
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
showValue?: boolean;
|
|
225
|
-
sliderPolarity?: SLIDER_POLARITY;
|
|
226
|
-
sliderType?: SLIDER_TYPE;
|
|
227
|
-
sliderOrientation?: SLIDER_ORIENTATION;
|
|
228
|
-
onMouseEnter?: (label: string, scaledValue: number) => void;
|
|
229
|
-
onChange?: (newValue: any) => void;
|
|
230
|
-
componentTheme?: {
|
|
231
|
-
backgroundImage?: string;
|
|
232
|
-
};
|
|
151
|
+
onMouseEnter?: (...args: any[]) => any;
|
|
152
|
+
onChange?: (...args: any[]) => any;
|
|
233
153
|
className?: string;
|
|
234
154
|
style?: object;
|
|
235
155
|
/**
|
|
@@ -240,91 +160,74 @@ interface SliderProps {
|
|
|
240
160
|
mockInitialScaledValue?: number;
|
|
241
161
|
mockProperties?: JuceSliderProperties;
|
|
242
162
|
}
|
|
243
|
-
declare function
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
163
|
+
declare function CustomSlider({ className, id, onMouseEnter, onChange, mockInitialScaledValue, mockProperties, style, children, }: React__default.PropsWithChildren<CustomSliderProps>): React__default.JSX.Element;
|
|
164
|
+
|
|
165
|
+
declare enum Spacing {
|
|
166
|
+
none = "none",
|
|
167
|
+
xSmall = "xSmall",
|
|
168
|
+
small = "small",
|
|
169
|
+
mediumSmall = "mediumSmall",
|
|
170
|
+
medium = "medium",
|
|
171
|
+
mediumLarge = "mediumLarge",
|
|
172
|
+
large = "large",
|
|
173
|
+
xLarge = "xLarge"
|
|
174
|
+
}
|
|
175
|
+
declare enum FlexDirection {
|
|
176
|
+
row = "row",
|
|
177
|
+
column = "column"
|
|
178
|
+
}
|
|
179
|
+
declare enum FlexAlign {
|
|
180
|
+
flexStart = "flex-start",
|
|
181
|
+
flexEnd = "flex-end",
|
|
182
|
+
center = "center"
|
|
183
|
+
}
|
|
184
|
+
declare enum FlexWrap {
|
|
185
|
+
wrap = "wrap",
|
|
186
|
+
noWrap = "nowrap"
|
|
187
|
+
}
|
|
188
|
+
declare enum JustifyContent {
|
|
189
|
+
flexStart = "flex-start",
|
|
190
|
+
flexEnd = "flex-end",
|
|
191
|
+
center = "center"
|
|
192
|
+
}
|
|
193
|
+
declare enum Height {
|
|
194
|
+
full = "100%",
|
|
195
|
+
auto = "auto"
|
|
196
|
+
}
|
|
197
|
+
declare enum Width {
|
|
198
|
+
full = "100%",
|
|
199
|
+
auto = "auto"
|
|
249
200
|
}
|
|
250
201
|
|
|
251
|
-
declare enum
|
|
252
|
-
|
|
253
|
-
|
|
202
|
+
declare enum HeaderLevels {
|
|
203
|
+
h1 = "h1",
|
|
204
|
+
h2 = "h2"
|
|
254
205
|
}
|
|
255
206
|
|
|
256
207
|
interface TextHeaderProps {
|
|
257
|
-
level?:
|
|
258
|
-
padding?: Array<
|
|
259
|
-
|
|
260
|
-
fontFamily?: string;
|
|
261
|
-
textColor?: GLOBAL_NAMED_COLORS | string;
|
|
262
|
-
};
|
|
263
|
-
text?: string;
|
|
208
|
+
level?: HeaderLevels;
|
|
209
|
+
padding?: Array<Spacing>;
|
|
210
|
+
value?: string;
|
|
264
211
|
id?: any;
|
|
265
212
|
className?: string;
|
|
266
213
|
style?: object;
|
|
267
214
|
}
|
|
268
|
-
declare function TextHeader({
|
|
215
|
+
declare function TextHeader({ value, id, className, style, level, padding, children, }: React.PropsWithChildren<TextHeaderProps>): React.JSX.Element;
|
|
269
216
|
declare namespace TextHeader {
|
|
270
|
-
var
|
|
271
|
-
var
|
|
272
|
-
var THEME: typeof GLOBAL_DEFAULT_THEMES;
|
|
217
|
+
var headerLevels: typeof HeaderLevels;
|
|
218
|
+
var spacing: typeof Spacing;
|
|
273
219
|
}
|
|
274
220
|
|
|
275
|
-
interface
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
customTheme?: {
|
|
279
|
-
textColor?: GLOBAL_NAMED_COLORS;
|
|
280
|
-
fontFamily?: string;
|
|
281
|
-
};
|
|
282
|
-
size?: TEXT_SIZES;
|
|
221
|
+
interface LabelProps {
|
|
222
|
+
padding?: Array<Spacing>;
|
|
223
|
+
value?: string | number;
|
|
283
224
|
id?: any;
|
|
284
225
|
className?: string;
|
|
285
226
|
style?: object;
|
|
286
227
|
}
|
|
287
|
-
declare function
|
|
288
|
-
declare namespace
|
|
289
|
-
var
|
|
290
|
-
var COLOR: typeof GLOBAL_NAMED_COLORS;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
declare enum LAYOUT_ROLES {
|
|
294
|
-
MAIN = "main",
|
|
295
|
-
SECTION = "section"
|
|
296
|
-
}
|
|
297
|
-
interface LayoutProps {
|
|
298
|
-
className?: string;
|
|
299
|
-
style?: React__default.CSSProperties;
|
|
300
|
-
alignItems?: ALIGN;
|
|
301
|
-
justifyContent?: JUSTIFY;
|
|
302
|
-
gap?: SPACING;
|
|
303
|
-
wrap?: boolean;
|
|
304
|
-
direction?: DIRECTION;
|
|
305
|
-
globalTheme?: GLOBAL_DEFAULT_THEMES | string;
|
|
306
|
-
componentTheme?: {
|
|
307
|
-
backgroundColor?: GLOBAL_NAMED_COLORS | string;
|
|
308
|
-
backgroundImage?: string;
|
|
309
|
-
};
|
|
310
|
-
role?: LAYOUT_ROLES;
|
|
311
|
-
width?: WIDTH | string;
|
|
312
|
-
height?: HEIGHT | string;
|
|
313
|
-
border?: boolean;
|
|
314
|
-
padding?: Array<SPACING>;
|
|
315
|
-
}
|
|
316
|
-
declare function Layout({ alignItems, justifyContent, className, style, children, componentTheme, globalTheme, role, width, wrap, height, border, direction, padding, gap, }: React__default.PropsWithChildren<LayoutProps>): React__default.JSX.Element;
|
|
317
|
-
declare namespace Layout {
|
|
318
|
-
var ALIGN_ITEMS: typeof ALIGN;
|
|
319
|
-
var JUSTIFY_CONTENT: typeof JUSTIFY;
|
|
320
|
-
var GAP: typeof SPACING;
|
|
321
|
-
var DIRECTION: typeof DIRECTION;
|
|
322
|
-
var WIDTH: typeof WIDTH;
|
|
323
|
-
var HEIGHT: typeof HEIGHT;
|
|
324
|
-
var PADDING: typeof SPACING;
|
|
325
|
-
var GLOBAL_THEME: typeof GLOBAL_DEFAULT_THEMES;
|
|
326
|
-
var BACKGROUND_COLOR: typeof GLOBAL_NAMED_COLORS;
|
|
327
|
-
var ROLE: typeof LAYOUT_ROLES;
|
|
228
|
+
declare function Label({ value, id, className, style, padding, children, }: React.PropsWithChildren<LabelProps>): React.JSX.Element;
|
|
229
|
+
declare namespace Label {
|
|
230
|
+
var spacing: typeof Spacing;
|
|
328
231
|
}
|
|
329
232
|
|
|
330
233
|
interface MatrixProps {
|
|
@@ -338,20 +241,84 @@ interface MatrixProps {
|
|
|
338
241
|
}
|
|
339
242
|
declare const Matrix: React__default.FC<React__default.PropsWithChildren<MatrixProps>>;
|
|
340
243
|
|
|
341
|
-
declare enum
|
|
342
|
-
|
|
343
|
-
|
|
244
|
+
declare enum IndicatorLightType {
|
|
245
|
+
small = "small",
|
|
246
|
+
large = "large"
|
|
344
247
|
}
|
|
345
248
|
interface IndicatorLightProps {
|
|
346
249
|
id?: string;
|
|
347
250
|
isActive: boolean;
|
|
348
|
-
type?:
|
|
251
|
+
type?: IndicatorLightType;
|
|
349
252
|
label?: string;
|
|
350
253
|
className?: string;
|
|
351
254
|
}
|
|
352
255
|
declare function IndicatorLight({ isActive, className, label, type, id, }: IndicatorLightProps): React__default.JSX.Element;
|
|
353
256
|
declare namespace IndicatorLight {
|
|
354
|
-
var
|
|
257
|
+
var type: typeof IndicatorLightType;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
interface LayoutProps {
|
|
261
|
+
className?: string;
|
|
262
|
+
style?: React__default.CSSProperties;
|
|
263
|
+
alignItems?: FlexAlign;
|
|
264
|
+
justifyContent?: JustifyContent;
|
|
265
|
+
gap?: Spacing;
|
|
266
|
+
flexWrap?: FlexWrap;
|
|
267
|
+
flexDirection?: FlexDirection;
|
|
268
|
+
width?: Width | string;
|
|
269
|
+
height?: Height | string;
|
|
270
|
+
border?: boolean;
|
|
271
|
+
padding?: Array<Spacing>;
|
|
272
|
+
}
|
|
273
|
+
declare function Layout({ alignItems, justifyContent, className, style, children, width, flexWrap, height, border, flexDirection, padding, gap, }: React__default.PropsWithChildren<LayoutProps>): React__default.JSX.Element;
|
|
274
|
+
declare namespace Layout {
|
|
275
|
+
var alignItems: typeof FlexAlign;
|
|
276
|
+
var justifyContent: typeof JustifyContent;
|
|
277
|
+
var gap: typeof Spacing;
|
|
278
|
+
var flexDirection: typeof FlexDirection;
|
|
279
|
+
var width: typeof Width;
|
|
280
|
+
var height: typeof Height;
|
|
281
|
+
var padding: typeof Spacing;
|
|
282
|
+
var flexWrap: typeof FlexWrap;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
interface LayoutFlexItemProps {
|
|
286
|
+
span?: number;
|
|
287
|
+
offset?: number;
|
|
288
|
+
padding?: Array<Spacing$1>;
|
|
289
|
+
justifyContent?: JustifyContent$1;
|
|
290
|
+
alignItems?: AlignItems;
|
|
291
|
+
flexDirection?: FlexDirection$1;
|
|
292
|
+
flexWrap?: FlexWrap$1;
|
|
293
|
+
flex?: string;
|
|
294
|
+
gap?: Spacing$1;
|
|
295
|
+
className?: string;
|
|
296
|
+
style?: React.CSSProperties;
|
|
297
|
+
border?: boolean;
|
|
298
|
+
onClick?: () => void;
|
|
299
|
+
}
|
|
300
|
+
declare function LayoutFlexItem({ justifyContent, alignItems, flexDirection, className, children, onClick, flex, padding, style, border, gap, }: React.PropsWithChildren<LayoutFlexItemProps>): React.JSX.Element;
|
|
301
|
+
declare namespace LayoutFlexItem {
|
|
302
|
+
var padding: typeof Spacing$1;
|
|
303
|
+
var flexDirection: typeof FlexDirection$1;
|
|
304
|
+
var alignItems: typeof AlignItems;
|
|
305
|
+
var justifyContent: typeof JustifyContent$1;
|
|
306
|
+
var gap: typeof Spacing$1;
|
|
307
|
+
var flexWrap: typeof FlexWrap$1;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
interface LayoutBlockItemProps {
|
|
311
|
+
span?: number;
|
|
312
|
+
offset?: number;
|
|
313
|
+
padding?: Array<Spacing$1>;
|
|
314
|
+
className?: string;
|
|
315
|
+
style?: React.CSSProperties;
|
|
316
|
+
border?: boolean;
|
|
317
|
+
onClick?: () => void;
|
|
318
|
+
}
|
|
319
|
+
declare function LayoutBlockItem({ className, children, onClick, padding, style, border, }: React.PropsWithChildren<LayoutBlockItemProps>): React.JSX.Element;
|
|
320
|
+
declare namespace LayoutBlockItem {
|
|
321
|
+
var padding: typeof Spacing$1;
|
|
355
322
|
}
|
|
356
323
|
|
|
357
324
|
interface KeyValueDisplayScreenProps {
|
|
@@ -373,4 +340,72 @@ interface OscilloscopeProps {
|
|
|
373
340
|
}
|
|
374
341
|
declare function Oscilloscope({ width, height, className, style, id, }: OscilloscopeProps): React__default.JSX.Element;
|
|
375
342
|
|
|
376
|
-
|
|
343
|
+
declare const clamp: (val: number, min?: number, max?: number) => number;
|
|
344
|
+
declare function normalizedToScaledValue({ normalizedValue, skew, end, start, }: {
|
|
345
|
+
normalizedValue: number;
|
|
346
|
+
skew?: number;
|
|
347
|
+
end: number;
|
|
348
|
+
start: number;
|
|
349
|
+
}): number;
|
|
350
|
+
declare function getNormalizedValue({ scaledValue, start, end, skew, }: {
|
|
351
|
+
scaledValue: number;
|
|
352
|
+
start: number;
|
|
353
|
+
end: number;
|
|
354
|
+
skew?: number;
|
|
355
|
+
}): number;
|
|
356
|
+
declare const decimalToPercent: (decimal: number | string) => number;
|
|
357
|
+
declare const percentToDecimal: (percent: number | string) => number;
|
|
358
|
+
declare const getTransformString: ({ sliderType, sliderOrientation, polarity, normalizedValue, scaledValue, }: {
|
|
359
|
+
sliderType: SliderType;
|
|
360
|
+
sliderOrientation?: SliderOrientation;
|
|
361
|
+
polarity: SliderPolarity;
|
|
362
|
+
normalizedValue: number;
|
|
363
|
+
scaledValue: number;
|
|
364
|
+
}) => {
|
|
365
|
+
transform: string;
|
|
366
|
+
transformOrigin: string;
|
|
367
|
+
} | {
|
|
368
|
+
transform: string;
|
|
369
|
+
transformOrigin?: undefined;
|
|
370
|
+
};
|
|
371
|
+
declare const getPosition: ({ sliderType, sliderOrientation, polarity, }: {
|
|
372
|
+
sliderType: SliderType;
|
|
373
|
+
sliderOrientation?: SliderOrientation;
|
|
374
|
+
polarity: SliderPolarity;
|
|
375
|
+
}) => {
|
|
376
|
+
top: string;
|
|
377
|
+
bottom: string;
|
|
378
|
+
left: string;
|
|
379
|
+
right?: undefined;
|
|
380
|
+
} | {
|
|
381
|
+
right: string;
|
|
382
|
+
bottom: string;
|
|
383
|
+
left: string;
|
|
384
|
+
top?: undefined;
|
|
385
|
+
} | {
|
|
386
|
+
top?: undefined;
|
|
387
|
+
bottom?: undefined;
|
|
388
|
+
left?: undefined;
|
|
389
|
+
right?: undefined;
|
|
390
|
+
};
|
|
391
|
+
|
|
392
|
+
declare const useSlider: ({ id, mockProperties, mockInitialScaledValue, sliderOrientation, onChange, }: {
|
|
393
|
+
id: string;
|
|
394
|
+
sliderOrientation?: SliderOrientation$1;
|
|
395
|
+
mockProperties: JuceSliderProperties$1;
|
|
396
|
+
mockInitialScaledValue: number;
|
|
397
|
+
onChange?: (newValue: any) => any;
|
|
398
|
+
}) => {
|
|
399
|
+
handleChange: ({ normalizedValue, scaledValue, }: {
|
|
400
|
+
normalizedValue?: number;
|
|
401
|
+
scaledValue?: number;
|
|
402
|
+
}) => void;
|
|
403
|
+
bindDrag: (...args: any[]) => _use_gesture_react_dist_declarations_src_types.ReactDOMAttributes;
|
|
404
|
+
normalizedValue: number;
|
|
405
|
+
setNormalizedValue: React.Dispatch<React.SetStateAction<number>>;
|
|
406
|
+
scaledValue: number;
|
|
407
|
+
setScaledValue: React.Dispatch<React.SetStateAction<number>>;
|
|
408
|
+
properties: JuceSliderProperties$1 | null;
|
|
409
|
+
};
|
|
410
|
+
|
|
411
|
+
export { Slider as BarSlider, Button, CustomSlider, Dropdown, IndicatorLight, KeyValueDisplayScreen, Label, Layout, LayoutBlockItem, LayoutFlexItem, Matrix, Oscilloscope, RotarySlider, SliderValue, Tabs, TextHeader, TextInput, clamp, decimalToPercent, getNormalizedValue, getPosition, getTransformString, normalizedToScaledValue, percentToDecimal, useSlider };
|