@types/gorilla-engine 1.1.29 → 1.1.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. gorilla-engine/README.md +1 -1
  2. gorilla-engine/components/AmpEnv.d.ts +44 -0
  3. gorilla-engine/components/BarStepEditor.d.ts +41 -2
  4. gorilla-engine/components/ComboBox.d.ts +63 -3
  5. gorilla-engine/components/Curve.d.ts +52 -0
  6. gorilla-engine/components/Knob.d.ts +30 -0
  7. gorilla-engine/components/Label.d.ts +6 -0
  8. gorilla-engine/components/LevelMeter.d.ts +60 -0
  9. gorilla-engine/components/ListBox.d.ts +24 -0
  10. gorilla-engine/components/LottieAnimation.d.ts +37 -0
  11. gorilla-engine/components/MidiKeyboard.d.ts +70 -0
  12. gorilla-engine/components/Pad.d.ts +13 -0
  13. gorilla-engine/components/Rubberband.d.ts +3 -0
  14. gorilla-engine/components/ScrollView.d.ts +24 -0
  15. gorilla-engine/components/Slider.d.ts +10 -0
  16. gorilla-engine/components/StepEditor.d.ts +37 -0
  17. gorilla-engine/components/TextBox.d.ts +45 -1
  18. gorilla-engine/components/Toggle.d.ts +66 -0
  19. gorilla-engine/components/Waveform.d.ts +117 -0
  20. gorilla-engine/components/Window.d.ts +12 -0
  21. gorilla-engine/components/XYPad.d.ts +30 -0
  22. gorilla-engine/index.d.ts +11 -1
  23. gorilla-engine/interfaces/Background.d.ts +26 -0
  24. gorilla-engine/interfaces/Bounds.d.ts +10 -1
  25. gorilla-engine/interfaces/Clickable.d.ts +34 -0
  26. gorilla-engine/interfaces/Common.d.ts +28 -0
  27. gorilla-engine/interfaces/Font.d.ts +19 -0
  28. gorilla-engine/interfaces/Highlight.d.ts +23 -0
  29. gorilla-engine/interfaces/Keyable.d.ts +7 -0
  30. gorilla-engine/interfaces/KeyboardFocus.d.ts +13 -0
  31. gorilla-engine/interfaces/MIDILearn.d.ts +6 -0
  32. gorilla-engine/interfaces/Margin.d.ts +12 -0
  33. gorilla-engine/interfaces/Scrollable.d.ts +3 -0
  34. gorilla-engine/interfaces/Skinnable.d.ts +17 -0
  35. gorilla-engine/package.json +3 -3
@@ -1,10 +1,34 @@
1
1
  declare namespace GorillaEngine.UI {
2
2
  interface ScrollViewProps extends Common, Bounds, Scrollable {
3
+ /**
4
+ * The thickness of the scrollbar in pixels.
5
+ */
3
6
  scrollbarThickness: number;
7
+ /**
8
+ * Hides the vertical scrollbar.
9
+ * @default false
10
+ */
4
11
  hideVerticalScrollbar: boolean;
12
+ /**
13
+ * Hides the horizontal scrollbar.
14
+ * @default false
15
+ */
5
16
  hideHorizontalScrollbar: boolean;
17
+ /** TODO:: No idea if this is correct
18
+ * If true, the scroll view will ignore keypress events.
19
+ * @default false
20
+ */
6
21
  ignoreKeypressEvent: boolean;
22
+ /**
23
+ * Scrolls the child at the given index into view.
24
+ * @param childIndex The index of the child to scroll into view.
25
+ */
7
26
  scrollChildIntoView(childIndex: number): void;
27
+ /**
28
+ * Sets the scroll position of the view.
29
+ * @param xPos The horizontal scroll position in pixels.
30
+ * @param yPos The vertical scroll position in pixels.
31
+ */
8
32
  setScrollPositionProportionately(xPos: number, yPos: number): void;
9
33
  }
10
34
 
@@ -1,7 +1,17 @@
1
1
  declare namespace GorillaEngine.UI {
2
2
  interface SliderProps extends KnobProps {
3
+ /**
4
+ * The direction of the slider.
5
+ */
3
6
  direction: "horizontal" | "vertical";
7
+ /**
8
+ * The path to the image used for the thumb of the slider.
9
+ */
4
10
  thumbImage: string;
11
+
12
+ /**
13
+ * TODO:: no idea what this does
14
+ */
5
15
  sliderBounds: {
6
16
  x: number;
7
17
  y: number;
@@ -1,25 +1,62 @@
1
1
  declare namespace GorillaEngine.UI {
2
2
  interface StepEditorProps extends Common, Background, Bounds, Clickable {
3
3
  value: any;
4
+ /**
5
+ * The spacing between the bars.
6
+ */
4
7
  divSize: number;
5
8
  min: number;
6
9
  max: number;
10
+ /**
11
+ * The path to the respective script in the instrument.
12
+ */
7
13
  paramPath: string;
14
+ /**
15
+ * Index of the first
16
+ */
8
17
  startIndex: number;
9
18
  endIndex: number;
19
+ /**
20
+ * The dimension of the step
21
+ */
10
22
  step: Partial<{
23
+ /**
24
+ * The horizontal offset of the step relative to its default position
25
+ */
11
26
  x: number;
27
+ /**
28
+ * The vertical offset of the step relative to its default position
29
+ */
12
30
  y: number;
31
+ /**
32
+ * The width of a step.
33
+ */
13
34
  width: number;
35
+ /**
36
+ * The height of a step.
37
+ */
14
38
  height: number;
39
+ /**
40
+ * The corner radius of the step.
41
+ */
15
42
  cornerRadius: number;
16
43
  borderSizeX: number;
17
44
  borderSizeY: number;
45
+ /**
46
+ * The color of the step when it is active.
47
+ */
18
48
  activeColor: string;
49
+
19
50
  markDefault: boolean;
20
51
  incrementHeight: number;
21
52
  backgroundColor: string;
53
+ /**
54
+ * The color of the step when it is on.
55
+ */
22
56
  onColor: string;
57
+ /**
58
+ * The color of the step when it is off.
59
+ */
23
60
  offColor: string;
24
61
  }>;
25
62
  }
@@ -1,18 +1,62 @@
1
1
  declare namespace GorillaEngine.UI {
2
2
  interface TextBoxProps extends Font, Clickable, Bounds, Background, Margin, Keyable {
3
+ /**
4
+ * The initial text value of the text box.
5
+ */
3
6
  text: string;
4
- palceholder: string;
7
+ /**
8
+ * The placeholder text of the text box.
9
+ */
10
+ placeholder: string;
11
+ /** TODO:: check if it works
12
+ * An additional suffix displayed in the textbox without alterting the text value.
13
+ */
5
14
  unit: string;
15
+ /**
16
+ * The textcolor of the placeholder
17
+ */
6
18
  placeHolderColor: string;
19
+ /**
20
+ * When highlighted via automation in AAX this is the color used to highlight the text.
21
+ */
7
22
  highlightTextColor: string;
23
+ /**
24
+ * When highlighted via automation in AAX this is the color used to highlight the background.
25
+ */
8
26
  highlightColor: string;
27
+ /**
28
+ * The color of the caret in the text box.
29
+ */
9
30
  caretColor: string;
31
+ /**
32
+ * The maximum length of the text in the text box.
33
+ */
10
34
  maxLength: number;
35
+ /**
36
+ * If set, the text box will display a password character instead of the actual text.
37
+ */
11
38
  passwordCharacter: string;
39
+ /**
40
+ * If true, the text box will allow multiple lines of text.
41
+ */
12
42
  multiLine: boolean;
43
+
44
+ /** TODO:: what is even the point of this?
45
+ * If true, the text box will not allow user input and will be read-only.
46
+ */
13
47
  readOnly: boolean;
48
+ /**
49
+ * The type of data that accepted by the text box.
50
+ */
14
51
  acceptedDataType: "integer" | "int" | "float" | "string";
52
+
53
+ /**
54
+ * If acceptedDataType is numeric, this is the minimum value allowed in the text box.
55
+ */
15
56
  minValue: number;
57
+ /**
58
+ * If acceptedDataType is numeric, this is the maximum value allowed in the text box.
59
+ */
16
60
  maxValue: number;
17
61
  highlightStart: number;
18
62
  highlightEnd: number;
@@ -1,26 +1,92 @@
1
1
  declare namespace GorillaEngine.UI {
2
2
  interface ToggleProps extends Common, Bounds, Font, Clickable, Background, Highlight, MIDILearn, Margin {
3
+ /**
4
+ * The text displayed next to the toggle.
5
+ */
3
6
  text: string;
7
+ /**
8
+ * The background color of the toggle when it is on.
9
+ */
4
10
  onColor: string;
11
+ /**
12
+ * The background color of the toggle when it is off.
13
+ */
5
14
  offColor: string;
15
+ /**
16
+ * The background color of the toggle when it is on and hovered.
17
+ */
6
18
  onColorHover: string;
19
+ /**
20
+ * The background color of the toggle when it is off and hovered.
21
+ */
7
22
  offColorHover: string;
23
+ /**
24
+ * The text color of the toggle when it is on.
25
+ */
8
26
  textColorOn: string;
27
+ /**
28
+ * The text color of the toggle when it is off.
29
+ */
9
30
  textColorOff: string;
31
+ /**
32
+ * The text color of the toggle when it is on and hovered.
33
+ */
10
34
  textColorOnHover: string;
35
+ /**
36
+ * The text color of the toggle when it is off and hovered.
37
+ */
11
38
  textColorOffHover: string;
39
+ /**
40
+ * The image of the toggle when it is on.
41
+ */
12
42
  onImage: string;
43
+ /**
44
+ * The image of the toggle when it is on and pressed.
45
+ */
13
46
  onImagePressed: string;
47
+ /**
48
+ * The image of the toggle when it is on and hovered.
49
+ */
14
50
  onImageHovered: string;
51
+ /**
52
+ * The image of the toggle when it is off.
53
+ */
15
54
  offImage: string;
55
+ /**
56
+ * The image of the toggle when it is off and pressed.
57
+ */
16
58
  offImagePressed: string;
59
+ /**
60
+ * The image of the toggle when it is off and hovered.
61
+ */
17
62
  offImageHovered: string;
63
+ /**
64
+ * The image of the toggle when it is disabled.
65
+ */
18
66
  disabledImage: string;
67
+ /**
68
+ * The radio index of the toggle
69
+ */
19
70
  radioIndex: number;
71
+ /**
72
+ * The radio value of the toggle. If it maches radioIndex, the toggle will be on.
73
+ */
20
74
  radioValue: number;
75
+ /**
76
+ * If true, the toggle will draw a tick box to toggle.
77
+ */
21
78
  drawTick: boolean;
79
+ /**
80
+ * Adjusts font size to fit the text within the toggle's bounds.
81
+ */
22
82
  fitToText: boolean;
83
+ /**
84
+ * The value of the toggle.
85
+ */
23
86
  value: boolean;
87
+ /**
88
+ * The lottie animation to play when the toggle is interacted with.
89
+ */
24
90
  animation: LottieAnimation;
25
91
  }
26
92
  // tslint:disable-next-line:no-empty-interface
@@ -4,51 +4,168 @@ declare namespace GorillaEngine.UI {
4
4
  y: number;
5
5
  x2: number;
6
6
  y2: number;
7
+ /**
8
+ * The path to the asset for the left handle.
9
+ */
7
10
  leftHandleImage: string;
11
+ /**
12
+ * The path to the asset for the right handle.
13
+ */
8
14
  rightHandleImage: string;
15
+ /**
16
+ * The background color of the Drag Zone
17
+ */
9
18
  backgroundColor: string;
19
+ /**
20
+ * The color of the overlay.
21
+ */
10
22
  overlayColor: string;
23
+ /**
24
+ * The width of the left handle.
25
+ */
11
26
  leftHandleWidth: number;
27
+ /**
28
+ * The height of the left handle.
29
+ */
12
30
  leftHandleHeight: number;
31
+ /**
32
+ * The width of the right handle.
33
+ */
13
34
  rightHandleWidth: number;
35
+ /**
36
+ * The height of the right handle.
37
+ */
14
38
  rightHandleHeight: number;
39
+ /**
40
+ * Whether the drag zone can be resized.
41
+ */
15
42
  canResize: boolean;
43
+ /**
44
+ * Whether the drag zone can be panned.
45
+ */
16
46
  canPan: boolean;
47
+ /**
48
+ * Whether the drag zone is enabled.
49
+ */
17
50
  enabled: boolean;
51
+ /**
52
+ * Value bindings for the drag zone properties.
53
+ */
18
54
  bindings: any;
19
55
  }
20
56
 
21
57
  interface WaveformMarker {
58
+ /**
59
+ * Whether the marker is enabled.
60
+ */
22
61
  enabled: boolean;
23
62
  x: number;
24
63
  y: number;
25
64
  x2: number;
26
65
  y2: number;
66
+ /**
67
+ * The path to the asset for the left handle.
68
+ */
27
69
  leftHandleImage: string;
70
+ /**
71
+ * The path to the asset for the right handle.
72
+ */
28
73
  rightHandleImage: string;
74
+ /**
75
+ * The background color of the marker.
76
+ */
29
77
  backgroundColor: string;
78
+ /**
79
+ * The width of the left handle.
80
+ */
30
81
  leftHandleWidth: number;
82
+ /**
83
+ * The height of the left handle.
84
+ */
31
85
  leftHandleHeight: number;
86
+ /**
87
+ * The width of the right handle.
88
+ */
32
89
  rightHandleWidth: number;
90
+ /**
91
+ * The height of the right handle.
92
+ */
33
93
  rightHandleHeight: number;
94
+ /**
95
+ * Whether the marker can be resized.
96
+ */
34
97
  canResize: boolean;
35
98
  }
36
99
 
37
100
  interface WaveformProps extends Common, Bounds, Background, Font, Clickable, Margin {
101
+ /**
102
+ * The color of the waveform.
103
+ */
38
104
  waveformColor: string;
105
+ /**
106
+ * The color of the gradient center.
107
+ */
39
108
  gradientCenterColor: string;
109
+ /**
110
+ * The color of the gradient end.
111
+ */
40
112
  gradientEndColor: string;
113
+ /**
114
+ * The color of the horizontal axis.
115
+ */
41
116
  horizontalAxisColor: string;
117
+ /**
118
+ * The text to display when the waveform is unavailable.
119
+ */
42
120
  waveformUnavailableText: string;
121
+ /**
122
+ * The width of the waveform.
123
+ */
43
124
  waveWidth: number;
125
+
126
+ /**
127
+ * The initial X offset of the waveform.
128
+ */
44
129
  initialXOffset: number;
130
+
131
+ /**
132
+ * The horizontal spacing between waves.
133
+ */
45
134
  waveHorizontalSapcing: number;
135
+
136
+ /**
137
+ * The vertical padding of the waveform.
138
+ */
46
139
  verticalPadding: number;
140
+
141
+ /**
142
+ * Whether to fit the waveform height.
143
+ */
47
144
  fitHeight: boolean;
145
+
146
+ /**
147
+ * Whether to paint the center line.
148
+ */
48
149
  paintCenterLine: boolean;
150
+
151
+ /**
152
+ * The value of the waveform.
153
+ */
49
154
  value: number;
155
+
156
+ /**
157
+ * Whether to draw using legacy mode.
158
+ */
50
159
  drawUsingLegacy: boolean;
160
+
161
+ /**
162
+ * The drag zone configuration.
163
+ */
51
164
  dragzone: Partial<WaveformDragZone>;
165
+
166
+ /**
167
+ * The marker configuration.
168
+ */
52
169
  markers: Partial<WaveformMarker>;
53
170
  }
54
171
 
@@ -1,9 +1,21 @@
1
1
  declare namespace GorillaEngine.UI {
2
2
  interface WindowProps extends Common, Background {
3
+ /**
4
+ * The width of the plugin window. */
3
5
  width: number;
6
+ /**
7
+ * The height of the plugin window. */
4
8
  height: number;
9
+ /**
10
+ * The initial scaling of the window's dimensions. */
5
11
  uiScale: number;
12
+ /**
13
+ * The minimum allowed scaling of the window's dimensions.
14
+ */
6
15
  uiScaleMin: number;
16
+ /**
17
+ * The maximum allowed scaling of the window's dimensions.
18
+ */
7
19
  uiScaleMax: number;
8
20
  }
9
21
  // tslint:disable-next-line:no-empty-interface
@@ -1,14 +1,44 @@
1
1
  declare namespace GorillaEngine.UI {
2
2
  interface XYPadProps extends Common, Bounds, Clickable, Background {
3
+ /**
4
+ * The x- value of the XYPad inthe range of [minX, maxX].
5
+ */
3
6
  valueX: number;
7
+ /**
8
+ * The y- value of the XYPad in the range of [minY, maxY].
9
+ */
4
10
  valueY: number;
11
+ /**
12
+ * The minimum x- value of the XYPad.
13
+ */
5
14
  minX: number;
15
+ /**
16
+ * The maximum x- value of the XYPad.
17
+ */
6
18
  maxX: number;
19
+ /**
20
+ * The minimum y- value of the XYPad.
21
+ */
7
22
  minY: number;
23
+ /**
24
+ * The maximum y- value of the XYPad.
25
+ */
8
26
  maxY: number;
27
+ /**
28
+ * The step size for the x- value.
29
+ */
9
30
  stepSizeX: number;
31
+ /**
32
+ * The step size for the y- value.
33
+ */
10
34
  stepSizeY: number;
35
+ /**
36
+ * If set to true, the XYPad will snap to the mouse position when clicked.
37
+ */
11
38
  snapsToMousePosition: boolean;
39
+ /**
40
+ * The path to the image used for the XYPad thumb.
41
+ */
12
42
  thumbImage: string;
13
43
  }
14
44
 
gorilla-engine/index.d.ts CHANGED
@@ -174,6 +174,13 @@ declare namespace GorillaEngine {
174
174
  * @param module The serialised module to set as a string
175
175
  */
176
176
  setModuleAtPath(path: string, module: string): boolean;
177
+ /**
178
+ * Method used to replace a module in an instrument in a given path
179
+ * @param path The path to the module that should be retrieved.
180
+ * @param module The serialised module to replace as a string
181
+ */
182
+ replaceModuleAtPath(path: string, module: string): boolean;
183
+
177
184
  /**
178
185
  * Method used to determine if a value from the Gorilla Engine is a module.
179
186
  *
@@ -356,7 +363,9 @@ declare namespace GorillaEngine {
356
363
  /**
357
364
  * Method used to retrieve a string from the Gorilla Engine.
358
365
  * @param path The path to the string that should be retrieved.
359
- * @returns the string found at the given `path` or `false` if nothing was found.
366
+ * @returns the string found at the given `path` or `false` if nothing was found. If a numeric
367
+ * value is found at the path it's string representation is returned - the same as if the value
368
+ * was passed to {@link valueToStringAtPath}.
360
369
  */
361
370
  getStringAtPath(path: string): string;
362
371
 
@@ -596,6 +605,7 @@ declare namespace GorillaEngine {
596
605
  * @param x the x position to place the settings button
597
606
  * @param y the y position to place the settings button
598
607
  */
608
+
599
609
  function setSettingsButtonPosition(x: number, y: number): void;
600
610
  }
601
611
  }
@@ -1,11 +1,37 @@
1
1
  declare namespace GorillaEngine.UI {
2
2
  interface Background {
3
+ /**
4
+ * Specifies the URL or base64 encoded string of an image to be used as the background.
5
+ * This property takes precedence over `backgroundColor` if both are provided.
6
+ */
3
7
  backgroundImage: string;
8
+
9
+ /**
10
+ * Defines the solid color to be used for the background.
11
+ * This color will be visible if `backgroundImage` is not set or if the image has transparent areas.
12
+ */
4
13
  backgroundColor: string;
14
+
15
+ /**
16
+ * Sets the radius for the corners of the component, creating rounded edges.
17
+ */
5
18
  cornerRadius: number;
19
+
20
+ /**
21
+ * Defines the properties of the border surrounding the component.
22
+ */
6
23
  border: {
24
+ /**
25
+ * The thickness of the border in pixels.
26
+ */
7
27
  width?: number;
28
+ /**
29
+ * The color of the border when the component is not in focus.
30
+ */
8
31
  color?: string;
32
+ /**
33
+ * The color of the border when the component is in focus (e.g. on hover).
34
+ */
9
35
  focusColor?: string;
10
36
  };
11
37
  }
@@ -1,11 +1,20 @@
1
1
  declare namespace GorillaEngine.UI {
2
2
  interface Bounds {
3
3
  /**
4
- * The x position of the component
4
+ * The **x-coordinate** of the component's top-left corner, typically measured from the left edge of its containing element or viewport.
5
5
  */
6
6
  x: number;
7
+ /**
8
+ * The **y-coordinate** of the component's top-left corner, typically measured from the top edge of its containing element or viewport.
9
+ */
7
10
  y: number;
11
+ /**
12
+ * The **width** of the component in pixels.
13
+ */
8
14
  width: number;
15
+ /**
16
+ * The **height** of the component in pixels.
17
+ */
9
18
  height: number;
10
19
  }
11
20
  }
@@ -1,12 +1,46 @@
1
1
  declare namespace GorillaEngine.UI {
2
+ /**
3
+ * Describes an element that can respond to mouse clicks and other pointer interactions.
4
+ */
2
5
  interface Clickable {
6
+ /**
7
+ * Indicates whether the component processes mouse events directly.
8
+ */
3
9
  interceptsMouseClicks: boolean;
10
+
11
+ /**
12
+ * Determines if child components can process mouse events.
13
+ */
4
14
  allowClicksOnChildren: boolean;
15
+
16
+ /**
17
+ * Defines the action to be triggered when a click occurs with a modifier key (e.g., Shift or Ctrl).
18
+ */
5
19
  modifiedClickAction: string;
20
+
21
+ /**
22
+ * Specifies the action to be executed on a double-click event. (Requires ViewModel support)
23
+ */
6
24
  doubleClickAction: string;
25
+
26
+ /**
27
+ * The action to be performed when the mouse pointer enters the control's area.
28
+ */
7
29
  mouseEnterAction: string;
30
+
31
+ /**
32
+ * The action to be performed when the mouse pointer exits the control's area.
33
+ */
8
34
  mouseExitAction: string;
35
+
36
+ /**
37
+ * An optional bitmask that defines the clickable region within the control.
38
+ */
9
39
  clickMask: string;
40
+
41
+ /**
42
+ * Specifies the type of mouse cursor displayed when the pointer hovers over the control.
43
+ */
10
44
  mouseCursorType:
11
45
  | "none"
12
46
  | "normal"
@@ -1,11 +1,39 @@
1
1
  declare namespace GorillaEngine.UI {
2
2
  interface Common {
3
+ /**
4
+ * A unique identifier for the component. This ID is needed for referencing
5
+ * and managing the component within the application's hierarchy.
6
+ */
3
7
  id: string;
8
+ /**
9
+ * Controls the visibility of the component. If set to `false`, the component
10
+ * will not be rendered.
11
+ */
4
12
  visible: boolean;
13
+ /**
14
+ * Determines if the component is active. If `false`, the component
15
+ * will not respond to user input (e.g., clicks, keyboard events) but may still be visible.
16
+ */
5
17
  enabled: boolean;
18
+ /**
19
+ * Indicates whether the component requests keyboard focus when it becomes active or is
20
+ * programmatically highlighted. This is important for keyboard navigation and input.
21
+ */
6
22
  wantsKeyboardFocus: boolean;
23
+ /**
24
+ * If `true`, a mouse click on this component will automatically
25
+ * transfer keyboard focus to it, allowing for immediate keyboard interaction.
26
+ */
7
27
  clickGrabsKeyboardFocus: boolean;
28
+ /**
29
+ * Sets the opacity level of the component, ranging from `0.0` (fully transparent)
30
+ * to `1.0` (fully opaque).
31
+ */
8
32
  alpha: number;
33
+ /**
34
+ * If `true`, the component will always be rendered on top of other components
35
+ * within the same stacking context, regardless of their Z-order.
36
+ */
9
37
  alwaysOnTop: boolean;
10
38
  }
11
39
  }