@tremolo-ui/react 0.1.6 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/index.cjs +1329 -1152
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +238 -183
  4. package/dist/index.d.cts +367 -366
  5. package/dist/index.d.cts.map +1 -1
  6. package/dist/index.d.ts +367 -366
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +1313 -1125
  9. package/dist/index.js.map +1 -1
  10. package/package.json +17 -19
  11. package/src/components/AnimationCanvas/index.tsx +0 -7
  12. package/src/components/DragObserver/index.tsx +9 -7
  13. package/src/components/Knob/ActiveLine.tsx +29 -0
  14. package/src/components/Knob/InactiveLine.tsx +53 -0
  15. package/src/components/Knob/SVGRoot.tsx +39 -0
  16. package/src/components/Knob/Thumb.tsx +64 -0
  17. package/src/components/Knob/context.tsx +120 -0
  18. package/src/components/Knob/index.css +25 -27
  19. package/src/components/Knob/index.tsx +110 -164
  20. package/src/components/NumberInput/DecrementStepper.tsx +0 -2
  21. package/src/components/NumberInput/IncrementStepper.tsx +0 -2
  22. package/src/components/NumberInput/InternalInput.tsx +3 -1
  23. package/src/components/NumberInput/Stepper.tsx +0 -2
  24. package/src/components/NumberInput/context.tsx +0 -1
  25. package/src/components/NumberInput/index.css +31 -15
  26. package/src/components/NumberInput/index.tsx +21 -14
  27. package/src/components/Piano/KeyLabel.tsx +0 -2
  28. package/src/components/Piano/context.tsx +0 -2
  29. package/src/components/Piano/index.css +7 -14
  30. package/src/components/Piano/index.tsx +14 -15
  31. package/src/components/Piano/key.tsx +0 -10
  32. package/src/components/Piano/keyboardShortcuts.ts +0 -2
  33. package/src/components/PointsEditor/Background.tsx +17 -0
  34. package/src/components/PointsEditor/Container.tsx +26 -0
  35. package/src/components/PointsEditor/Point.tsx +137 -0
  36. package/src/components/PointsEditor/context.tsx +91 -0
  37. package/src/components/PointsEditor/index.css +30 -0
  38. package/src/components/PointsEditor/index.tsx +129 -0
  39. package/src/components/Slider/Scale.tsx +0 -2
  40. package/src/components/Slider/ScaleOption.tsx +0 -2
  41. package/src/components/Slider/Thumb.tsx +1 -5
  42. package/src/components/Slider/Track.tsx +1 -3
  43. package/src/components/Slider/context.tsx +0 -1
  44. package/src/components/Slider/index.css +33 -8
  45. package/src/components/Slider/index.tsx +61 -33
  46. package/src/components/WheelObserver/index.tsx +17 -19
  47. package/src/components/XYPad/Area.tsx +4 -5
  48. package/src/components/XYPad/Thumb.tsx +8 -7
  49. package/src/components/XYPad/index.css +18 -4
  50. package/src/components/XYPad/index.tsx +71 -38
  51. package/src/components/_util/composeRefs.tsx +63 -0
  52. package/src/components/_util/index.ts +23 -6
  53. package/src/components/_util/type.ts +1 -0
  54. package/src/hooks/useAnimationFrame.ts +0 -3
  55. package/src/hooks/useCallbackRef.ts +2 -2
  56. package/src/hooks/useDrag.ts +12 -11
  57. package/src/hooks/useDragWithElement.ts +12 -17
  58. package/src/hooks/useEventListener.ts +6 -9
  59. package/src/hooks/useInterval.ts +0 -3
  60. package/src/hooks/useLongPress.ts +0 -3
  61. package/src/hooks/useMIDIAccess.ts +0 -1
  62. package/src/hooks/useMIDIInput.ts +0 -1
  63. package/src/hooks/useMIDIMessage.ts +0 -1
  64. package/src/hooks/usePianoDrag.ts +75 -0
  65. package/src/index.ts +21 -30
  66. package/src/styles/global.css +16 -4
  67. package/dist/index.css.map +0 -1
  68. package/src/components/AnimationKnob/index.tsx +0 -314
package/dist/index.d.cts CHANGED
@@ -1,32 +1,20 @@
1
- import * as react0 from "react";
2
- import React$1, { CSSProperties, ComponentPropsWithoutRef, DependencyList, ElementType, ReactElement, ReactNode, RefObject } from "react";
1
+ import * as _$react from "react";
2
+ import React$1, { CSSProperties, ComponentProps, ComponentPropsWithoutRef, DependencyList, ElementType, ReactElement, ReactNode, Ref, RefObject, SVGProps } from "react";
3
3
  import { InputEventOption } from "@tremolo-ui/functions";
4
- import * as react_jsx_runtime0 from "react/jsx-runtime";
5
4
 
6
5
  //#region src/components/AnimationCanvas/index.d.ts
7
- /** @category AnimationCanvas */
8
6
  type InitFunction = (context: CanvasRenderingContext2D, option: {
9
- /** current canvas width */
10
- width: number;
11
- /** current canvas height */
7
+ /** current canvas width */width: number; /** current canvas height */
12
8
  height: number;
13
9
  }) => void;
14
- /** @category AnimationCanvas */
15
10
  type DrawFunction = (context: CanvasRenderingContext2D, option: {
16
- /** current canvas width */
17
- width: number;
18
- /** current canvas height */
19
- height: number;
20
- /** frame count */
21
- count: number;
22
- /** delta time (ms) */
23
- deltaTime: number;
24
- /** elapsed time (ms) */
25
- elapsedTime: number;
26
- /** frame per second */
11
+ /** current canvas width */width: number; /** current canvas height */
12
+ height: number; /** frame count */
13
+ count: number; /** delta time (ms) */
14
+ deltaTime: number; /** elapsed time (ms) */
15
+ elapsedTime: number; /** frame per second */
27
16
  fps: number;
28
17
  }) => void;
29
- /** @category AnimationCanvas */
30
18
  interface CommonProps {
31
19
  draw: DrawFunction;
32
20
  init?: InitFunction;
@@ -36,89 +24,25 @@ interface CommonProps {
36
24
  */
37
25
  options?: CanvasRenderingContext2DSettings;
38
26
  }
39
- /** @category AnimationCanvas */
40
27
  interface AbsoluteSizingProps {
41
28
  width?: number;
42
29
  height?: number;
43
30
  }
44
- /** @category AnimationCanvas */
45
31
  interface RelativeSizingProps {
46
32
  relativeSize?: boolean;
47
33
  reduceFlickering?: boolean;
48
34
  }
49
- /** @category AnimationCanvas */
50
35
  type AnimationCanvasProps = CommonProps & AbsoluteSizingProps & RelativeSizingProps;
51
36
  /**
52
37
  * A simple animatable canvas with requestAnimationFrame()
53
- * @category AnimationCanvas
54
38
  */
55
39
  declare function AnimationCanvas(props: CommonProps & AbsoluteSizingProps & Omit<ComponentPropsWithoutRef<'canvas'>, keyof AnimationCanvasProps>): ReactElement;
56
40
  declare function AnimationCanvas(pros: CommonProps & RelativeSizingProps & Omit<ComponentPropsWithoutRef<'canvas'>, keyof AnimationCanvasProps>): ReactElement;
57
- //# sourceMappingURL=index.d.ts.map
58
41
  //#endregion
59
- //#region src/components/AnimationKnob/index.d.ts
60
- /** @category AnimationKnob */
61
- type AnimationKnobProps = {
62
- value: number;
63
- min: number;
64
- max: number;
65
- step?: number;
66
- skew?: number;
67
- /**
68
- * value set when double-clicking
69
- * @see enableDoubleClickDefault
70
- */
71
- defaultValue?: number;
72
- /**
73
- * Value to be used as the starting point of the line when drawing.
74
- * @default min
75
- */
76
- startValue?: number;
77
- /** Priority over width or height */
78
- size?: number | `${number}%`;
79
- width?: number | `${number}%`;
80
- height?: number | `${number}%`;
81
- /** active line color */
82
- activeColor?: string;
83
- /** inactive line color */
84
- inactiveColor?: string;
85
- /** background color */
86
- bg?: string;
87
- /** thumb color */
88
- thumb?: string;
89
- lineWeight?: number;
90
- thumbWeight?: number;
91
- draw?: DrawFunction;
92
- /** Whether to apply `{use-select: none}` when dragging */
93
- bodyNoSelect?: boolean;
94
- /**
95
- * wheel control option
96
- */
97
- wheel?: InputEventOption | null;
98
- /**
99
- * keyboard control option
100
- */
101
- keyboard?: InputEventOption | null;
102
- enableDoubleClickDefault?: boolean;
103
- style?: CSSProperties;
104
- onChange?: (value: number) => void;
105
- };
106
- /**
107
- * @category AnimationKnob
108
- */
109
- interface AnimationKnobMethods {
110
- focus: () => void;
111
- blur: () => void;
112
- }
113
- /**
114
- * Animatable rotary knob.
115
- * @category AnimationKnob
116
- */
117
- declare const AnimationKnob: React$1.ForwardRefExoticComponent<AnimationKnobProps & Omit<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof AnimationKnobProps> & React$1.RefAttributes<AnimationKnobMethods>>;
118
- //# sourceMappingURL=index.d.ts.map
42
+ //#region src/components/_util/type.d.ts
43
+ type Override<T, U> = T & Omit<U, keyof T>;
119
44
  //#endregion
120
45
  //#region src/components/DragObserver/index.d.ts
121
- /** @category DragObserver */
122
46
  interface DragObserverProps<T extends ElementType> {
123
47
  /**
124
48
  * React.ElementType
@@ -131,16 +55,78 @@ interface DragObserverProps<T extends ElementType> {
131
55
  */
132
56
  threshold?: number;
133
57
  children?: ReactNode;
134
- onDrag: (x: number, y: number, deltaX: number, deltaY: number) => void;
58
+ onDrag?: (x: number, y: number, deltaX: number, deltaY: number) => void;
135
59
  onDragStart?: () => void;
136
60
  onDragEnd?: () => void;
137
61
  }
138
- /** @category DragObserver */
139
- declare function DragObserver<T extends ElementType = 'div'>(props: DragObserverProps<T> & Omit<ComponentPropsWithoutRef<T>, keyof DragObserverProps<T>>): react_jsx_runtime0.JSX.Element;
140
- //# sourceMappingURL=index.d.ts.map
62
+ declare function DragObserver<T extends ElementType = 'div'>(props: Override<DragObserverProps<T>, ComponentPropsWithoutRef<T>>): _$react.JSX.Element;
63
+ //#endregion
64
+ //#region src/components/_util/index.d.ts
65
+ declare const cursorStyles: {
66
+ grabbing: string;
67
+ grab: string;
68
+ pointer: string;
69
+ move: string;
70
+ none: string;
71
+ };
72
+ type Cursor = keyof typeof cursorStyles;
73
+ //#endregion
74
+ //#region src/components/Knob/ActiveLine.d.ts
75
+ declare function ActiveLine({
76
+ stroke,
77
+ strokeWidth,
78
+ className,
79
+ ...props
80
+ }: Omit<SVGProps<SVGPathElement>, 'd'>): _$react.JSX.Element;
81
+ //#endregion
82
+ //#region src/components/Knob/InactiveLine.d.ts
83
+ declare function InactiveLine({
84
+ stroke,
85
+ strokeWidth,
86
+ className,
87
+ ...props
88
+ }: Omit<SVGProps<SVGPathElement>, 'd'>): _$react.JSX.Element;
89
+ //#endregion
90
+ //#region src/components/Knob/SVGRoot.d.ts
91
+ interface SVGRoot {
92
+ block?: boolean;
93
+ overflowVisible?: boolean;
94
+ }
95
+ declare function SVGRoot({
96
+ children,
97
+ style,
98
+ ...props
99
+ }: Override<SVGRoot, SVGProps<SVGSVGElement>>): _$react.JSX.Element;
100
+ //#endregion
101
+ //#region src/components/Knob/Thumb.d.ts
102
+ interface Props {
103
+ /** color */
104
+ thumb?: string;
105
+ /** color */
106
+ thumbLine?: string;
107
+ /** percent (0-100) */
108
+ thumbSize?: number;
109
+ /** percent (0-100) */
110
+ thumbLineWeight?: number;
111
+ /** percent (0-100) */
112
+ thumbLineLength?: number;
113
+ classes?: {
114
+ thumb?: string;
115
+ thumbLine?: string;
116
+ };
117
+ }
118
+ declare function Thumb({
119
+ className,
120
+ thumb,
121
+ thumbLine,
122
+ thumbSize,
123
+ thumbLineWeight,
124
+ thumbLineLength,
125
+ classes,
126
+ ...props
127
+ }: Props & Omit<SVGProps<SVGSVGElement>, 'd' | keyof Props>): _$react.JSX.Element;
141
128
  //#endregion
142
129
  //#region src/components/Knob/index.d.ts
143
- /** @category Knob */
144
130
  interface KnobProps {
145
131
  value: number;
146
132
  min: number;
@@ -149,6 +135,7 @@ interface KnobProps {
149
135
  skew?: number;
150
136
  /**
151
137
  * value set when double-clicking
138
+ * restriction: enableDoubleClickDefault = true
152
139
  * @default min
153
140
  * @see enableDoubleClickDefault
154
141
  */
@@ -160,124 +147,100 @@ interface KnobProps {
160
147
  startValue?: number;
161
148
  /** width and height */
162
149
  size?: number | string;
163
- /** Whether to apply `{use-select: none}` when dragging */
164
- bodyNoSelect?: boolean;
150
+ /**
151
+ * Global style to apply when dragged
152
+ * @default defaultExternalStyles
153
+ */
154
+ externalStyles?: {
155
+ userSelectNone?: boolean;
156
+ cursor?: Cursor;
157
+ };
165
158
  /**
166
159
  * wheel control option
160
+ * If null, no event will be triggered
167
161
  */
168
162
  wheel?: InputEventOption | null;
169
163
  /**
170
164
  * keyboard control option
165
+ * If null, no event will be triggered
171
166
  */
172
167
  keyboard?: InputEventOption | null;
173
168
  enableDoubleClickDefault?: boolean;
174
169
  disabled?: boolean;
175
170
  readonly?: boolean;
176
- /** color */
177
- activeLine?: string;
178
- /** color */
179
- inactiveLine?: string;
180
- /** color */
181
- thumb?: string;
182
- /** color */
183
- thumbLine?: string;
184
- /** percent (0-100) */
185
- thumbSize?: number;
186
- /** percent (0-100) */
187
- thumbLineWeight?: number;
188
- /** percent (0-100) */
189
- thumbLineLength?: number;
190
- /** line weight [px] */
191
- lineWeight?: number;
192
171
  /** angle range [degree] */
193
172
  angleRange?: number;
194
- classes?: {
195
- activeLine?: string;
196
- inactiveLine?: string;
197
- thumb?: string;
198
- thumbLine?: string;
199
- };
200
173
  onChange?: (value: number) => void;
201
174
  }
202
- /**
203
- * @category Knob
204
- */
205
175
  interface KnobMethods {
206
176
  focus: () => void;
207
177
  blur: () => void;
208
178
  }
209
179
  /**
210
180
  * Interactive rotary knob component implemented in SVG.
211
- *
212
- * @category Knob
213
- */
214
- declare const Knob: react0.ForwardRefExoticComponent<KnobProps & Omit<Omit<react0.SVGProps<SVGSVGElement>, "ref">, keyof KnobProps> & react0.RefAttributes<KnobMethods>>;
215
- //# sourceMappingURL=index.d.ts.map
216
- //#endregion
217
- //#region src/components/NumberInput/type.d.ts
218
- /**
219
- * [unit, scale][]
220
- * @example
221
- * [['Hz', 1], ['kHz', 1000]]
222
181
  */
223
- type Units = [string, number][];
182
+ declare const Knob: {
183
+ Root: _$react.ForwardRefExoticComponent<KnobProps & Omit<Omit<_$react.DetailedHTMLProps<_$react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof KnobProps> & _$react.RefAttributes<KnobMethods>>;
184
+ SVGRoot: typeof SVGRoot;
185
+ InactiveLine: typeof InactiveLine;
186
+ ActiveLine: typeof ActiveLine;
187
+ Thumb: typeof Thumb;
188
+ };
224
189
  //#endregion
225
- //#region src/components/NumberInput/Stepper.d.ts
226
- /** @category NumberInput */
227
- interface StepperProps {
228
- /** Display only when hovering. */
229
- dynamic?: boolean;
190
+ //#region src/components/NumberInput/DecrementStepper.d.ts
191
+ interface DecrementStepperProps {
192
+ size?: number;
230
193
  children?: ReactNode;
231
194
  }
232
- /** @category NumberInput */
233
- declare function Stepper({
234
- dynamic,
195
+ declare function DecrementStepper({
196
+ size,
235
197
  children,
236
198
  className,
237
199
  ...props
238
- }: StepperProps & Omit<ComponentPropsWithoutRef<'div'>, keyof StepperProps>): react_jsx_runtime0.JSX.Element;
239
- //# sourceMappingURL=Stepper.d.ts.map
200
+ }: DecrementStepperProps & Omit<ComponentPropsWithoutRef<'div'>, keyof DecrementStepperProps>): _$react.JSX.Element;
240
201
  //#endregion
241
202
  //#region src/components/NumberInput/IncrementStepper.d.ts
242
- /** @category NumberInput */
243
203
  interface IncrementStepperProps {
244
204
  size?: number;
245
205
  children?: ReactNode;
246
206
  }
247
- /** @category NumberInput */
248
207
  declare function IncrementStepper({
249
208
  size,
250
209
  children,
251
210
  className,
252
211
  ...props
253
- }: IncrementStepperProps & Omit<ComponentPropsWithoutRef<'div'>, keyof IncrementStepperProps>): react_jsx_runtime0.JSX.Element;
254
- //# sourceMappingURL=IncrementStepper.d.ts.map
212
+ }: IncrementStepperProps & Omit<ComponentPropsWithoutRef<'div'>, keyof IncrementStepperProps>): _$react.JSX.Element;
255
213
  //#endregion
256
- //#region src/components/NumberInput/DecrementStepper.d.ts
257
- /** @category NumberInput */
258
- interface DecrementStepperProps {
259
- size?: number;
214
+ //#region src/components/NumberInput/Stepper.d.ts
215
+ interface StepperProps {
216
+ /** Display only when hovering. */
217
+ dynamic?: boolean;
260
218
  children?: ReactNode;
261
219
  }
262
- /** @category NumberInput */
263
- declare function DecrementStepper({
264
- size,
220
+ declare function Stepper({
221
+ dynamic,
265
222
  children,
266
223
  className,
267
224
  ...props
268
- }: DecrementStepperProps & Omit<ComponentPropsWithoutRef<'div'>, keyof DecrementStepperProps>): react_jsx_runtime0.JSX.Element;
269
- //# sourceMappingURL=DecrementStepper.d.ts.map
225
+ }: StepperProps & Omit<ComponentPropsWithoutRef<'div'>, keyof StepperProps>): _$react.JSX.Element;
226
+ //#endregion
227
+ //#region src/components/NumberInput/type.d.ts
228
+ /**
229
+ * [unit, scale][]
230
+ * @example
231
+ * [['Hz', 1], ['kHz', 1000]]
232
+ */
233
+ type Units = [string, number][];
270
234
  //#endregion
271
235
  //#region src/components/NumberInput/index.d.ts
272
- /** @category NumberInput */
273
236
  interface NumberInputProps {
274
237
  value: number | string;
275
238
  /**
276
- * @default Number.MIN_SAFE_INTEGER
239
+ * Number.MIN_SAFE_INTEGER
277
240
  */
278
241
  min?: number;
279
242
  /**
280
- * @default Number.MAX_SAFE_INTEGER
243
+ * Number.MAX_SAFE_INTEGER
281
244
  */
282
245
  max?: number;
283
246
  step?: number;
@@ -306,10 +269,12 @@ interface NumberInputProps {
306
269
  clampValueOnBlur?: boolean;
307
270
  /**
308
271
  * wheel control option
272
+ * If null, no event will be triggered
309
273
  */
310
274
  wheel?: InputEventOption | null;
311
275
  /**
312
276
  * keyboard control option
277
+ * If null, no event will be triggered
313
278
  */
314
279
  keyboard?: InputEventOption | null;
315
280
  activeColor?: string;
@@ -319,46 +284,21 @@ interface NumberInputProps {
319
284
  onBlur?: (value: number, text: string, event: React.FocusEvent<HTMLInputElement, Element>) => void;
320
285
  children?: ReactNode;
321
286
  }
322
- /**
323
- * @category NumberInput
324
- */
325
287
  interface NumberInputMethods {
326
288
  focus: () => void;
327
289
  blur: () => void;
328
290
  }
329
291
  /**
330
292
  * Input with some useful functions for entering numerical values.
331
- * @category NumberInput
332
293
  */
333
- declare const NumberInput: react0.ForwardRefExoticComponent<NumberInputProps & Omit<Omit<react0.DetailedHTMLProps<react0.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "type" | keyof NumberInputProps> & react0.RefAttributes<NumberInputMethods>>;
334
- //#endregion
335
- //#region src/components/Piano/context.d.ts
336
- /** @category Piano */
337
- type NoteRange = {
338
- first: number;
339
- last: number;
340
- };
341
- //#endregion
342
- //#region src/components/Piano/keyboardShortcuts.d.ts
343
- /** @category Piano */
344
- type KeyboardShortcuts = {
345
- keys: string[];
346
- flags?: {
347
- naturalOnly?: boolean;
348
- };
349
- };
350
- /** @category Piano */
351
- declare const SHORTCUTS: {
352
- HOME_ROW: {
353
- keys: string[];
354
- };
294
+ declare const NumberInput: {
295
+ Root: _$react.ForwardRefExoticComponent<NumberInputProps & Omit<Omit<_$react.DetailedHTMLProps<_$react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "type" | keyof NumberInputProps> & _$react.RefAttributes<NumberInputMethods>>;
296
+ Stepper: typeof Stepper;
297
+ IncrementStepper: typeof IncrementStepper;
298
+ DecrementStepper: typeof DecrementStepper;
355
299
  };
356
- //# sourceMappingURL=keyboardShortcuts.d.ts.map
357
300
  //#endregion
358
301
  //#region src/components/Piano/key.d.ts
359
- /**
360
- * @category Piano
361
- */
362
302
  interface KeyProps {
363
303
  noteNumber: number;
364
304
  width?: number;
@@ -375,24 +315,32 @@ interface KeyProps {
375
315
  /** @internal */
376
316
  __width?: number;
377
317
  }
378
- /**
379
- * @category Piano
380
- */
381
318
  interface KeyMethods {
382
319
  play: (velocity?: number) => void;
383
320
  stop: () => void;
384
321
  played: () => boolean;
385
322
  }
386
- /** @category Piano */
387
-
388
- /** @category Piano */
389
- declare const WhiteKey: React$1.ForwardRefExoticComponent<KeyProps & Omit<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof KeyProps> & React$1.RefAttributes<KeyMethods>>;
390
- /** @category Piano */
391
- declare const BlackKey: React$1.ForwardRefExoticComponent<KeyProps & Omit<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof KeyProps> & React$1.RefAttributes<KeyMethods>>;
392
- //# sourceMappingURL=key.d.ts.map
323
+ //#endregion
324
+ //#region src/components/Piano/context.d.ts
325
+ type NoteRange = {
326
+ first: number;
327
+ last: number;
328
+ };
329
+ //#endregion
330
+ //#region src/components/Piano/keyboardShortcuts.d.ts
331
+ type KeyboardShortcuts = {
332
+ keys: string[];
333
+ flags?: {
334
+ naturalOnly?: boolean;
335
+ };
336
+ };
337
+ declare const SHORTCUTS: {
338
+ HOME_ROW: {
339
+ keys: string[];
340
+ };
341
+ };
393
342
  //#endregion
394
343
  //#region src/components/Piano/KeyLabel.d.ts
395
- /** @category Piano */
396
344
  interface KeyLabelProps {
397
345
  /**
398
346
  * override Piano.label
@@ -405,7 +353,6 @@ interface KeyLabelProps {
405
353
  /** @internal */
406
354
  __label?: (note: number, index: number) => ReactNode;
407
355
  }
408
- /** @category Piano */
409
356
  declare function KeyLabel({
410
357
  label,
411
358
  className,
@@ -414,16 +361,13 @@ declare function KeyLabel({
414
361
  __note,
415
362
  __label,
416
363
  ...props
417
- }: KeyLabelProps & Omit<ComponentPropsWithoutRef<'div'>, keyof KeyLabelProps>): false | react_jsx_runtime0.JSX.Element;
418
- //# sourceMappingURL=KeyLabel.d.ts.map
364
+ }: KeyLabelProps & Omit<ComponentPropsWithoutRef<'div'>, keyof KeyLabelProps>): false | _$react.JSX.Element;
419
365
  //#endregion
420
366
  //#region src/components/Piano/index.d.ts
421
367
  /**
422
368
  * [noteRange.first, noteRange.first + 1 ..., noteRange.last]
423
- * @category Piano
424
369
  */
425
370
  declare function getNoteRangeArray(noteRange: NoteRange): number[];
426
- /** @category Piano */
427
371
  interface PianoProps {
428
372
  noteRange: NoteRange;
429
373
  glissando?: boolean;
@@ -442,101 +386,118 @@ interface PianoProps {
442
386
  */
443
387
  children?: ReactElement | ReactElement[];
444
388
  }
445
- /**
446
- * @category Piano
447
- */
448
389
  interface PianoMethods {
449
390
  playNote: (note: number, velocity?: number) => void;
450
391
  stopNote: (note: number) => void;
451
392
  }
452
393
  /**
453
394
  * Customizable piano component.
454
- * @category Piano
455
395
  */
456
- declare const Piano: React$1.ForwardRefExoticComponent<PianoProps & Omit<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof PianoProps> & React$1.RefAttributes<PianoMethods>>;
457
- //#endregion
458
- //#region src/components/Slider/context.d.ts
459
- type State = {
460
- min: number;
461
- max: number;
462
- step: number;
463
- skew: number;
464
- vertical: boolean;
465
- reverse: boolean;
466
- disabled: boolean;
467
- readonly: boolean;
396
+ declare const Piano: {
397
+ Root: React$1.ForwardRefExoticComponent<PianoProps & Omit<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof PianoProps> & React$1.RefAttributes<PianoMethods>>;
398
+ WhiteKey: React$1.ForwardRefExoticComponent<KeyProps & Omit<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof KeyProps> & React$1.RefAttributes<KeyMethods>>;
399
+ BlackKey: React$1.ForwardRefExoticComponent<KeyProps & Omit<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof KeyProps> & React$1.RefAttributes<KeyMethods>>;
400
+ KeyLabel: typeof KeyLabel;
468
401
  };
469
- /** @category Slider */
470
- declare function useSliderContext<T>(selector: (state: State) => T): T;
471
402
  //#endregion
472
- //#region src/components/Slider/Thumb.d.ts
473
- /** @category Slider */
474
- interface SliderThumbProps {
403
+ //#region src/components/PointsEditor/Background.d.ts
404
+ declare function Background({
405
+ className,
406
+ children,
407
+ ...props
408
+ }: ComponentPropsWithoutRef<'div'>): _$react.JSX.Element;
409
+ //#endregion
410
+ //#region src/components/PointsEditor/Container.d.ts
411
+ declare function Container({
412
+ className,
413
+ children,
414
+ ...props
415
+ }: ComponentPropsWithoutRef<'div'>): _$react.JSX.Element;
416
+ //#endregion
417
+ //#region src/components/PointsEditor/Point.d.ts
418
+ type PointBaseType = {
419
+ x: number;
420
+ y: number;
421
+ };
422
+ declare function clampPoint(point: PointBaseType, min?: Partial<PointBaseType>, max?: Partial<PointBaseType>): {
423
+ x: number;
424
+ y: number;
425
+ };
426
+ interface PointProps<T extends PointBaseType> {
427
+ value: T;
428
+ min?: Partial<PointBaseType>;
429
+ max?: Partial<PointBaseType>;
475
430
  size?: number | string;
476
431
  width?: number | string;
477
432
  height?: number | string;
478
433
  color?: string;
479
- className?: string;
480
- style?: CSSProperties;
481
- children?: ReactNode;
482
- /** @internal */
483
- __percent?: number;
484
- }
485
- /** @category Slider */
486
- interface SliderThumbMethods {
487
- focus: () => void;
488
- blur: () => void;
489
- }
490
- /** @category Slider */
491
-
492
- /** @category Slider */
493
- declare const SliderThumb: react0.ForwardRefExoticComponent<SliderThumbProps & react0.RefAttributes<SliderThumbMethods>>;
494
- //# sourceMappingURL=Thumb.d.ts.map
495
- //#endregion
496
- //#region src/components/Slider/Track.d.ts
497
- /** @category Slider */
498
- interface SliderTrackProps {
499
- length?: number | string;
500
- thickness?: number | string;
501
- active?: string;
502
- inactive?: string;
503
- defaultStyle?: boolean;
504
- className?: string;
505
- style?: CSSProperties;
506
- children?: ReactElement;
507
- /** @internal */
508
- __thumb?: ReactElement;
509
- /** @internal */
510
- __percent?: number;
434
+ disabled?: boolean;
435
+ readonly?: boolean;
436
+ onChange?: (value: PointBaseType) => void;
437
+ onDragStart?: (value: PointBaseType) => void;
438
+ onDragEnd?: (value: PointBaseType) => void;
511
439
  }
512
- /** @category Slider */
513
- declare function SliderTrack({
514
- length,
515
- thickness,
516
- active,
517
- inactive,
518
- children,
440
+ declare function Point<T extends PointBaseType>({
441
+ value,
442
+ min,
443
+ max,
444
+ size,
445
+ width,
446
+ height,
447
+ color,
448
+ disabled,
449
+ readonly,
450
+ onChange,
451
+ onDragStart,
452
+ onDragEnd,
519
453
  className,
520
454
  style,
521
- defaultStyle,
522
- __thumb,
523
- __percent,
455
+ onPointerDown,
524
456
  ...props
525
- }: SliderTrackProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SliderTrackProps>): react_jsx_runtime0.JSX.Element;
526
- //# sourceMappingURL=Track.d.ts.map
457
+ }: PointProps<T> & Omit<ComponentPropsWithoutRef<'div'>, keyof PointProps<T>>): _$react.JSX.Element;
458
+ //#endregion
459
+ //#region src/components/PointsEditor/index.d.ts
460
+ interface PointsEditorProps {
461
+ width?: number | string;
462
+ height?: number | string;
463
+ grid?: number | PointBaseType;
464
+ disabled?: boolean;
465
+ readonly?: boolean;
466
+ externalStyles?: {
467
+ userSelectNone?: boolean;
468
+ cursor?: Cursor;
469
+ };
470
+ /**
471
+ * wheel control option
472
+ * If null, no event will be triggered
473
+ */
474
+ wheel?: InputEventOption | null;
475
+ /**
476
+ * keyboard control option
477
+ * If null, no event will be triggered
478
+ */
479
+ keyboard?: InputEventOption | null;
480
+ }
481
+ /**
482
+ * Multiple Point Controller
483
+ */
484
+ declare const PointsEditor: {
485
+ Root: _$react.ForwardRefExoticComponent<PointsEditorProps & Omit<Omit<_$react.DetailedHTMLProps<_$react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof PointsEditorProps> & _$react.RefAttributes<HTMLDivElement>>;
486
+ Background: typeof Background;
487
+ Container: typeof Container;
488
+ Point: typeof Point;
489
+ };
527
490
  //#endregion
528
491
  //#region src/components/Slider/type.d.ts
529
492
  type ScaleType = 'mark' | 'mark-number' | 'number';
530
493
  type ScaleOptions = ['step', ScaleType] | [number, ScaleType];
531
494
  //#endregion
532
495
  //#region src/components/Slider/Scale.d.ts
533
- /** @category Slider */
534
496
  interface ScaleProps {
535
497
  gap?: number | string;
536
498
  options?: ScaleOptions;
537
499
  children?: ReactNode;
538
500
  }
539
- /** @category Slider */
540
501
  declare function Scale({
541
502
  gap,
542
503
  options,
@@ -544,11 +505,9 @@ declare function Scale({
544
505
  className,
545
506
  style,
546
507
  ...props
547
- }: ScaleProps & Omit<ComponentPropsWithoutRef<'div'>, keyof ScaleProps>): react_jsx_runtime0.JSX.Element;
548
- //# sourceMappingURL=Scale.d.ts.map
508
+ }: ScaleProps & Omit<ComponentPropsWithoutRef<'div'>, keyof ScaleProps>): _$react.JSX.Element;
549
509
  //#endregion
550
510
  //#region src/components/Slider/ScaleOption.d.ts
551
- /** @category Slider */
552
511
  interface ScaleOptionProps {
553
512
  value: number;
554
513
  type?: ScaleType;
@@ -570,7 +529,6 @@ interface ScaleOptionProps {
570
529
  label?: CSSProperties;
571
530
  };
572
531
  }
573
- /** @category Slider */
574
532
  declare function ScaleOption({
575
533
  value,
576
534
  type,
@@ -584,35 +542,104 @@ declare function ScaleOption({
584
542
  className,
585
543
  style,
586
544
  ...props
587
- }: ScaleOptionProps & Omit<ComponentPropsWithoutRef<'div'>, keyof ScaleOptionProps>): react_jsx_runtime0.JSX.Element;
588
- //# sourceMappingURL=ScaleOption.d.ts.map
545
+ }: ScaleOptionProps & Omit<ComponentPropsWithoutRef<'div'>, keyof ScaleOptionProps>): _$react.JSX.Element;
546
+ //#endregion
547
+ //#region src/components/Slider/Thumb.d.ts
548
+ interface SliderThumbProps {
549
+ size?: number | string;
550
+ width?: number | string;
551
+ height?: number | string;
552
+ color?: string;
553
+ className?: string;
554
+ style?: CSSProperties;
555
+ children?: ReactNode;
556
+ /** @internal */
557
+ __percent?: number;
558
+ }
559
+ interface SliderThumbMethods {
560
+ focus: () => void;
561
+ blur: () => void;
562
+ }
563
+ //#endregion
564
+ //#region src/components/Slider/Track.d.ts
565
+ interface SliderTrackProps {
566
+ length?: number | string;
567
+ thickness?: number | string;
568
+ active?: string;
569
+ inactive?: string;
570
+ defaultStyle?: boolean;
571
+ className?: string;
572
+ style?: CSSProperties;
573
+ children?: ReactElement;
574
+ /** @internal */
575
+ __thumb?: ReactElement;
576
+ /** @internal */
577
+ __percent?: number;
578
+ }
579
+ declare function Track({
580
+ length,
581
+ thickness,
582
+ active,
583
+ inactive,
584
+ children,
585
+ className,
586
+ style,
587
+ defaultStyle,
588
+ __thumb,
589
+ __percent,
590
+ ...props
591
+ }: SliderTrackProps & Omit<ComponentPropsWithoutRef<'div'>, keyof SliderTrackProps>): _$react.JSX.Element;
592
+ //#endregion
593
+ //#region src/components/Slider/context.d.ts
594
+ type State = {
595
+ min: number;
596
+ max: number;
597
+ step: number;
598
+ skew: number;
599
+ vertical: boolean;
600
+ reverse: boolean;
601
+ disabled: boolean;
602
+ readonly: boolean;
603
+ };
604
+ declare function useSliderContext<T>(selector: (state: State) => T): T;
589
605
  //#endregion
590
606
  //#region src/components/Slider/index.d.ts
591
- /** @category Slider */
592
607
  interface SliderProps {
593
608
  value: number;
594
609
  min: number;
595
610
  max: number;
596
611
  step?: number;
597
612
  skew?: number;
613
+ /**
614
+ * slider orientation
615
+ * aria-orientation property is also applied.
616
+ */
598
617
  vertical?: boolean;
599
618
  reverse?: boolean;
600
- bodyNoSelect?: boolean;
619
+ /** Global style to apply when dragged */
620
+ externalStyles?: {
621
+ userSelectNone?: boolean;
622
+ cursor?: Cursor;
623
+ };
601
624
  /**
602
625
  * wheel control option
626
+ * If null, no event will be triggered
603
627
  */
604
628
  wheel?: InputEventOption | null;
605
629
  /**
606
630
  * keyboard control option
631
+ * If null, no event will be triggered
607
632
  */
608
633
  keyboard?: InputEventOption | null;
609
634
  /**
610
635
  * Only the appearance will change.
611
636
  * Please consider using with readonly.
637
+ * aria-disabled property is also applied.
612
638
  */
613
639
  disabled?: boolean;
614
640
  /**
615
641
  * Make the value unchangeable.
642
+ * aria-readonly property is also applied.
616
643
  */
617
644
  readonly?: boolean;
618
645
  className?: string;
@@ -623,20 +650,31 @@ interface SliderProps {
623
650
  /** \<SliderThumb /> | \<SliderTrack /> */
624
651
  children?: ReactElement | ReactElement[];
625
652
  }
626
- /**
627
- * @category Slider
628
- */
629
653
  interface SliderMethods {
630
654
  focus: () => void;
631
655
  blur: () => void;
632
656
  }
633
657
  /**
634
658
  * Customizable slider
635
- * @category Slider
636
659
  */
637
- declare const Slider: React$1.ForwardRefExoticComponent<SliderProps & Omit<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SliderProps> & React$1.RefAttributes<SliderMethods>>;
660
+ declare const Slider: {
661
+ Root: React$1.ForwardRefExoticComponent<SliderProps & Omit<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof SliderProps> & React$1.RefAttributes<SliderMethods>>;
662
+ Thumb: React$1.ForwardRefExoticComponent<SliderThumbProps & React$1.RefAttributes<SliderThumbMethods>>;
663
+ Track: typeof Track;
664
+ Scale: typeof Scale;
665
+ ScaleOption: typeof ScaleOption;
666
+ };
638
667
  //#endregion
639
668
  //#region src/components/WheelObserver/index.d.ts
669
+ interface WheelObserverProps<T extends ElementType> {
670
+ /**
671
+ * React.ElementType
672
+ * @default div
673
+ */
674
+ as?: T;
675
+ children?: ReactNode;
676
+ onWheel?: (event: WheelEvent) => void;
677
+ }
640
678
  /**
641
679
  * @example
642
680
  * <WheelObserver
@@ -648,47 +686,10 @@ declare const Slider: React$1.ForwardRefExoticComponent<SliderProps & Omit<Omit<
648
686
  * <div>Wheel here</div>
649
687
  * </WheelObserver>
650
688
  */
651
- /** @category WheelObserver */
652
- interface WheelObserverProps<T extends ElementType> {
653
- /**
654
- * React.ElementType
655
- * @default div
656
- */
657
- as?: T;
658
- children?: ReactNode;
659
- onWheel?: (event: WheelEvent) => void;
660
- }
661
- /** @category WheelObserver */
662
- declare function WheelObserver<T extends ElementType = 'div'>(props: WheelObserverProps<T> & Omit<ComponentPropsWithoutRef<T>, keyof WheelObserverProps<T>>): react_jsx_runtime0.JSX.Element;
663
- //# sourceMappingURL=index.d.ts.map
664
- //#endregion
665
- //#region src/components/XYPad/Thumb.d.ts
666
- /** @category XYPad */
667
- interface ThumbProps {
668
- size?: number | string;
669
- width?: number | string;
670
- height?: number | string;
671
- color?: string;
672
- wrapperClassName?: string;
673
- wrapperStyle?: CSSProperties;
674
- children?: ReactNode;
675
- /** @internal */
676
- __disabled?: boolean;
677
- /** @internal */
678
- __css?: CSSProperties;
679
- }
680
- /** @category XYPad */
681
- interface XYPadThumbMethods {
682
- focus: () => void;
683
- blur: () => void;
684
- }
685
- /** @category XYPad */
686
- declare const XYPadThumb: react0.ForwardRefExoticComponent<ThumbProps & Omit<Omit<react0.DetailedHTMLProps<react0.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof ThumbProps> & react0.RefAttributes<XYPadThumbMethods>>;
687
- //# sourceMappingURL=Thumb.d.ts.map
689
+ declare function WheelObserver<T extends ElementType = 'div'>(props: Override<WheelObserverProps<T>, ComponentProps<T>>): _$react.JSX.Element;
688
690
  //#endregion
689
691
  //#region src/components/XYPad/Area.d.ts
690
- /** @category XYPad */
691
- interface AreaProps {
692
+ interface XYPadAreaProps {
692
693
  width?: number | string;
693
694
  height?: number | string;
694
695
  color?: string;
@@ -698,8 +699,7 @@ interface AreaProps {
698
699
  /** inherit */
699
700
  __thumb?: ReactElement;
700
701
  }
701
- /** @category XYPad */
702
- declare function XYPadArea({
702
+ declare function Area({
703
703
  width,
704
704
  height,
705
705
  color,
@@ -708,13 +708,32 @@ declare function XYPadArea({
708
708
  style,
709
709
  __thumb,
710
710
  ...props
711
- }: AreaProps & Omit<ComponentPropsWithoutRef<'div'>, keyof AreaProps>): react_jsx_runtime0.JSX.Element;
712
- //# sourceMappingURL=Area.d.ts.map
711
+ }: XYPadAreaProps & Omit<ComponentPropsWithoutRef<'div'>, keyof XYPadAreaProps>): _$react.JSX.Element;
712
+ //#endregion
713
+ //#region src/components/XYPad/Thumb.d.ts
714
+ interface XYPadThumbProps {
715
+ size?: number | string;
716
+ width?: number | string;
717
+ height?: number | string;
718
+ color?: string;
719
+ wrapperClassName?: string;
720
+ wrapperStyle?: CSSProperties;
721
+ children?: ReactNode;
722
+ /** @internal */
723
+ __disabled?: boolean;
724
+ /** @internal */
725
+ __readonly?: boolean;
726
+ /** @internal */
727
+ __css?: CSSProperties;
728
+ }
729
+ interface XYPadThumbMethods {
730
+ focus: () => void;
731
+ blur: () => void;
732
+ }
713
733
  //#endregion
714
734
  //#region src/components/XYPad/index.d.ts
715
735
  /**
716
736
  * Two-dimensional slider component.
717
- * @category XYPad
718
737
  */
719
738
  interface ValueOptions {
720
739
  value: number;
@@ -732,11 +751,13 @@ interface ValueOptions {
732
751
  */
733
752
  keyboard?: InputEventOption | null;
734
753
  }
735
- /** @category XYPad */
736
754
  interface XYPadProps {
737
755
  x: ValueOptions;
738
756
  y: ValueOptions;
739
- bodyNoSelect?: boolean;
757
+ externalStyles?: {
758
+ userSelectNone?: boolean;
759
+ cursor?: Cursor;
760
+ };
740
761
  disabled?: boolean;
741
762
  readonly?: boolean;
742
763
  onChange?: (valueX: number, valueY: number) => void;
@@ -745,83 +766,70 @@ interface XYPadProps {
745
766
  /** \<XYPadThumb /> | \<XYPadArea /> */
746
767
  children?: ReactElement | ReactElement[];
747
768
  }
748
- /** @category XYPad */
749
769
  interface XYPadMethods {
750
770
  focus: () => void;
751
771
  blur: () => void;
772
+ original: Ref<HTMLDivElement>;
752
773
  }
753
774
  /**
754
775
  * Simple XYPad
755
- * @category XYPad
756
776
  */
757
- declare const XYPad: React$1.ForwardRefExoticComponent<XYPadProps & Omit<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof XYPadProps> & React$1.RefAttributes<XYPadMethods>>;
777
+ declare const XYPad: {
778
+ Root: React$1.ForwardRefExoticComponent<XYPadProps & Omit<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof XYPadProps> & React$1.RefAttributes<XYPadMethods>>;
779
+ Thumb: React$1.ForwardRefExoticComponent<XYPadThumbProps & Omit<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof XYPadThumbProps> & React$1.RefAttributes<XYPadThumbMethods>>;
780
+ Area: typeof Area;
781
+ };
758
782
  //#endregion
759
783
  //#region src/hooks/useAnimationFrame.d.ts
760
- /**
761
- * @category hooks
762
- */
763
784
  declare function useAnimationFrame(callback?: () => void, deps?: DependencyList): void;
764
- //# sourceMappingURL=useAnimationFrame.d.ts.map
765
785
  //#endregion
766
786
  //#region src/hooks/useDrag.d.ts
767
787
  interface UseDragProps {
768
788
  threshold?: number;
769
- onDrag: (x: number, y: number, deltaX: number, deltaY: number) => void;
789
+ onDrag?: (x: number, y: number, deltaX: number, deltaY: number) => void;
770
790
  onDragStart?: () => void;
771
791
  onDragEnd?: () => void;
772
792
  }
773
793
  /**
774
- * @category hooks
775
794
  * @returns [refCallback, pointerDownHandler]
776
795
  */
777
796
  declare function useDrag<T extends Element>({
778
- threshold,
797
+ threshold: _threshold,
779
798
  onDrag,
780
799
  onDragStart,
781
800
  onDragEnd
782
801
  }: UseDragProps): [(div: EventTarget | null) => void, (event: React.PointerEvent<T>) => void];
783
802
  //#endregion
784
803
  //#region src/hooks/useDragWithElement.d.ts
785
- interface UseDragWithElementProps<T extends Element> {
804
+ interface UseDragWithElement<T extends Element> {
786
805
  baseElementRef: RefObject<T | null>;
787
806
  onDrag: (normalizedX: number, normalizedY: number) => void;
788
807
  onDragStart?: (normalizedX: number, normalizedY: number) => void;
789
808
  onDragEnd?: (normalizedX: number, normalizedY: number) => void;
790
809
  }
791
- /**
792
- * @category hooks
793
- * @returns [refCallback, pointerDownHandler]
794
- */
795
810
  declare function useDragWithElement<T extends Element>({
796
811
  baseElementRef,
797
812
  onDrag,
798
813
  onDragStart,
799
814
  onDragEnd
800
- }: UseDragWithElementProps<T>): [(div: EventTarget | null) => void, (event: React.PointerEvent<T>) => void];
815
+ }: UseDragWithElement<T>): {
816
+ refHandler: (div: EventTarget | null) => void;
817
+ pointerDownHandler: (event: React.PointerEvent<T>) => void;
818
+ dragging: boolean;
819
+ };
801
820
  //#endregion
802
821
  //#region src/hooks/useEventListener.d.ts
803
822
  type Target = EventTarget | null | (() => EventTarget | null);
804
823
  type Options = boolean | AddEventListenerOptions;
805
- /**
806
- * @category hooks
807
- */
808
- declare function useEventListener<K extends keyof DocumentEventMap>(target: Target, event: K, handler?: (event: DocumentEventMap[K]) => void, options?: Options): VoidFunction;
809
- declare function useEventListener<K extends keyof WindowEventMap>(target: Target, event: K, handler?: (event: WindowEventMap[K]) => void, options?: Options): VoidFunction;
810
- declare function useEventListener<K extends keyof GlobalEventHandlersEventMap>(target: Target, event: K, handler?: (event: GlobalEventHandlersEventMap[K]) => void, options?: Options): VoidFunction;
824
+ declare function useEventListener<K extends keyof DocumentEventMap>(target: Target, event: K, handler: (event: DocumentEventMap[K]) => void, options?: Options): VoidFunction;
825
+ declare function useEventListener<K extends keyof WindowEventMap>(target: Target, event: K, handler: (event: WindowEventMap[K]) => void, options?: Options): VoidFunction;
826
+ declare function useEventListener<K extends keyof GlobalEventHandlersEventMap>(target: Target, event: K, handler: (event: GlobalEventHandlersEventMap[K]) => void, options?: Options): VoidFunction;
811
827
  //#endregion
812
828
  //#region src/hooks/useInterval.d.ts
813
- /**
814
- * @category hooks
815
- */
816
829
  declare function useInterval(callback: () => void, delay: number | null): void;
817
- //# sourceMappingURL=useInterval.d.ts.map
818
830
  //#endregion
819
831
  //#region src/hooks/useLongPress.d.ts
820
- /**
821
- * @category hooks
822
- */
823
832
  declare function useLongPress(callback: () => void, initialDelay?: number, interval?: number): () => void;
824
- //# sourceMappingURL=useLongPress.d.ts.map
825
833
  //#endregion
826
834
  //#region src/hooks/useMIDIAccess.d.ts
827
835
  /** @private */
@@ -832,31 +840,24 @@ declare const NOT_SUPPORTED = "NOT_SUPPORTED";
832
840
  type MIDIAccessError = typeof PERMISSION_DENIED | typeof NOT_SUPPORTED;
833
841
  /**
834
842
  * Hooks for requesting MIDI access in the browser. The first argument allows you to choose whether to request access on mount.
835
- * @category hooks
836
843
  */
837
844
  declare function useMIDIAccess(requestOnMount?: boolean): {
838
845
  request: () => void;
839
846
  midiAccess: MIDIAccess | null;
840
847
  error: MIDIAccessError | null;
841
848
  };
842
- //# sourceMappingURL=useMIDIAccess.d.ts.map
843
849
  //#endregion
844
850
  //#region src/hooks/useMIDIInput.d.ts
845
851
  /**
846
852
  * Hooks for handling note on/off events. To be used with useMIDIAccess. Internally uses useMIDIMessage.
847
- * @category hooks
848
853
  */
849
854
  declare function useMIDIInput(midiAccess: MIDIAccess | null, onNoteOnEvent?: (note: number, velocity: number) => void, onNoteOffEvent?: (note: number) => void, onPitchBendEvent?: (msb: number, lsb: number) => void): void;
850
- //# sourceMappingURL=useMIDIInput.d.ts.map
851
855
  //#endregion
852
856
  //#region src/hooks/useMIDIMessage.d.ts
853
857
  /**
854
858
  * Hooks for when you want to process MIDI events in more detail than useMIDIInput.
855
- * @category hooks
856
859
  */
857
860
  declare function useMIDIMessage(midiAccess: MIDIAccess | null, onMIDIMessage: (event: MIDIMessageEvent) => void): void;
858
- //# sourceMappingURL=useMIDIMessage.d.ts.map
859
-
860
861
  //#endregion
861
- export { type AbsoluteSizingProps, AnimationCanvas, type AnimationCanvasProps, AnimationKnob, type AnimationKnobMethods, type AnimationKnobProps, type AreaProps, BlackKey, type CommonProps, DecrementStepper, type DecrementStepperProps, DragObserver, type DragObserverProps, type DrawFunction, IncrementStepper, type IncrementStepperProps, type InitFunction, KeyLabel, type KeyLabelProps, type KeyMethods, type KeyProps, type KeyboardShortcuts, Knob, type KnobMethods, type KnobProps, type MIDIAccessError, NOT_SUPPORTED, NumberInput, type NumberInputMethods, type NumberInputProps, PERMISSION_DENIED, Piano, type PianoMethods, type PianoProps, type RelativeSizingProps, SHORTCUTS, Scale, ScaleOption, type ScaleOptionProps, type ScaleProps, Slider, type SliderMethods, type SliderProps, SliderThumb, type SliderThumbMethods, type SliderThumbProps, SliderTrack, type SliderTrackProps, Stepper, type StepperProps, type ThumbProps, type ValueOptions, WheelObserver, type WheelObserverProps, WhiteKey, XYPad, XYPadArea, type XYPadMethods, type XYPadProps, XYPadThumb, type XYPadThumbMethods, getNoteRangeArray, useAnimationFrame, useDrag, useDragWithElement, useEventListener, useInterval, useLongPress, useMIDIAccess, useMIDIInput, useMIDIMessage, useSliderContext };
862
+ export { type AbsoluteSizingProps, AnimationCanvas, type AnimationCanvasProps, type CommonProps, type DecrementStepperProps, DragObserver, type DragObserverProps, type DrawFunction, type IncrementStepperProps, type InitFunction, type KeyLabelProps, type KeyMethods, type KeyProps, type KeyboardShortcuts, Knob, type KnobMethods, type KnobProps, type MIDIAccessError, NOT_SUPPORTED, NumberInput, type NumberInputMethods, type NumberInputProps, PERMISSION_DENIED, Piano, type PianoMethods, type PianoProps, type PointBaseType, type PointProps, PointsEditor, type PointsEditorProps, type RelativeSizingProps, SHORTCUTS, type ScaleOptionProps, type ScaleProps, Slider, type SliderMethods, type SliderProps, type SliderThumbMethods, type SliderThumbProps, type SliderTrackProps, type StepperProps, type ValueOptions, WheelObserver, type WheelObserverProps, XYPad, type XYPadAreaProps, type XYPadMethods, type XYPadProps, type XYPadThumbMethods, type XYPadThumbProps, clampPoint, getNoteRangeArray, useAnimationFrame, useDrag, useDragWithElement, useEventListener, useInterval, useLongPress, useMIDIAccess, useMIDIInput, useMIDIMessage, useSliderContext };
862
863
  //# sourceMappingURL=index.d.cts.map