@tremolo-ui/vue 0.7.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/LICENSE +21 -0
- package/README.md +13 -0
- package/dist/index.cjs +2486 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1678 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +1678 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2444 -0
- package/dist/index.js.map +1 -0
- package/package.json +78 -0
- package/src/components/AnimationCanvas/AnimationCanvas.ts +105 -0
- package/src/components/AnimationCanvas/index.ts +5 -0
- package/src/components/DropZone/DropZone.ts +43 -0
- package/src/components/DropZone/index.ts +1 -0
- package/src/components/FileInput/FileInput.ts +82 -0
- package/src/components/FileInput/FileInputTrigger.ts +24 -0
- package/src/components/FileInput/context.ts +18 -0
- package/src/components/FileInput/index.ts +3 -0
- package/src/components/Knob/Knob.ts +237 -0
- package/src/components/Knob/KnobActiveLine.ts +31 -0
- package/src/components/Knob/KnobInactiveLine.ts +36 -0
- package/src/components/Knob/KnobSVGRoot.ts +25 -0
- package/src/components/Knob/KnobThumb.ts +53 -0
- package/src/components/Knob/context.ts +30 -0
- package/src/components/Knob/index.ts +6 -0
- package/src/components/NumberInput/NumberInput.ts +258 -0
- package/src/components/NumberInput/NumberInputDecrementStepper.ts +7 -0
- package/src/components/NumberInput/NumberInputField.ts +128 -0
- package/src/components/NumberInput/NumberInputIncrementStepper.ts +7 -0
- package/src/components/NumberInput/NumberInputStepper.ts +54 -0
- package/src/components/NumberInput/context.ts +63 -0
- package/src/components/NumberInput/index.ts +6 -0
- package/src/components/NumberInput/stepper-button.ts +65 -0
- package/src/components/Piano/Piano.ts +243 -0
- package/src/components/Piano/index.ts +1 -0
- package/src/components/PointsEditor/PointsEditor.ts +146 -0
- package/src/components/PointsEditor/PointsEditorBackground.ts +17 -0
- package/src/components/PointsEditor/PointsEditorContainer.ts +73 -0
- package/src/components/PointsEditor/PointsEditorPoint.ts +253 -0
- package/src/components/PointsEditor/PointsEditorSelectionBox.ts +36 -0
- package/src/components/PointsEditor/context.ts +39 -0
- package/src/components/PointsEditor/index.ts +9 -0
- package/src/components/Slider/Slider.ts +224 -0
- package/src/components/Slider/SliderMarks.ts +57 -0
- package/src/components/Slider/SliderMarksOption.ts +85 -0
- package/src/components/Slider/SliderThumb.ts +92 -0
- package/src/components/Slider/SliderTrack.ts +50 -0
- package/src/components/Slider/context.ts +33 -0
- package/src/components/Slider/index.ts +6 -0
- package/src/components/XYPad/XYPad.ts +250 -0
- package/src/components/XYPad/XYPadArea.ts +20 -0
- package/src/components/XYPad/XYPadThumb.ts +105 -0
- package/src/components/XYPad/context.ts +33 -0
- package/src/components/XYPad/index.ts +4 -0
- package/src/components/_util/context.ts +8 -0
- package/src/components/_util/placement.ts +36 -0
- package/src/components/_util/props.ts +32 -0
- package/src/components/_util/useCheckSteps.ts +22 -0
- package/src/components/_util/visually-hidden-range-input.ts +16 -0
- package/src/composables/useDrag.ts +22 -0
- package/src/composables/useDragValue.ts +20 -0
- package/src/composables/useDropZone.ts +32 -0
- package/src/composables/useInstance.ts +52 -0
- package/src/composables/useLongPress.ts +20 -0
- package/src/composables/useMIDIAccess.ts +58 -0
- package/src/composables/useMIDIInput.ts +33 -0
- package/src/composables/useMIDIMessage.ts +30 -0
- package/src/composables/useWheel.ts +23 -0
- package/src/index.ts +67 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,1678 @@
|
|
|
1
|
+
import { HTMLAttributes, MaybeRefOrGetter, PropType, SlotsType } from "vue";
|
|
2
|
+
import { AnimationFrame, DragOptions, DragValueOptions, DropZoneOptions, DropZoneState, InputEventOption, KeyboardShortcuts, KeyboardShortcutsScope, KnobAngles, LongPressOptions, MIDIAccessOptions, MIDIAccessState, MIDIInputHandlers, MarksOptions, ModifierState, ModifierValue, NoteRange, PointPosition, PointsEditorInstance, SelectionBoxRect, WheelOptions, XY, XYInput, parseNumberText } from "@tremolo-ui/dom";
|
|
3
|
+
import { Scale, ValueRange } from "@tremolo-ui/functions";
|
|
4
|
+
//#region src/components/AnimationCanvas/AnimationCanvas.d.ts
|
|
5
|
+
/** Called once the canvas is ready, and again whenever it is resized. */
|
|
6
|
+
type InitFunction = (context: CanvasRenderingContext2D, size: {
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
}) => void;
|
|
10
|
+
/** Called on every frame while `animate` is on, and once otherwise. */
|
|
11
|
+
type DrawFunction = (context: CanvasRenderingContext2D, frame: AnimationFrame) => void;
|
|
12
|
+
/** A `<canvas>` drawn by `draw` on every animation frame. */
|
|
13
|
+
export declare const AnimationCanvas: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
14
|
+
/** Draws a frame. */
|
|
15
|
+
draw: {
|
|
16
|
+
type: PropType<DrawFunction>;
|
|
17
|
+
required: true;
|
|
18
|
+
};
|
|
19
|
+
/** Sets the canvas up before the first frame and after a resize. */
|
|
20
|
+
init: PropType<InitFunction>;
|
|
21
|
+
/** Draw on every animation frame. @default true */
|
|
22
|
+
animate: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
default: boolean;
|
|
25
|
+
};
|
|
26
|
+
/** Settings for the 2D context. Read once, when the canvas is created. */
|
|
27
|
+
options: PropType<CanvasRenderingContext2DSettings>;
|
|
28
|
+
/** Keep the drawing while the canvas is resized. @default true */
|
|
29
|
+
reduceFlickering: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
default: boolean;
|
|
32
|
+
};
|
|
33
|
+
/** Follow the size of the parent element; `width` and `height` are ignored. */
|
|
34
|
+
resizable: BooleanConstructor;
|
|
35
|
+
/** Width in CSS pixels, while not `resizable`. @default 100 */
|
|
36
|
+
width: {
|
|
37
|
+
type: NumberConstructor;
|
|
38
|
+
default: number;
|
|
39
|
+
};
|
|
40
|
+
/** Height in CSS pixels, while not `resizable`. @default 100 */
|
|
41
|
+
height: {
|
|
42
|
+
type: NumberConstructor;
|
|
43
|
+
default: number;
|
|
44
|
+
};
|
|
45
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
46
|
+
[key: string]: any;
|
|
47
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
48
|
+
/** Draws a frame. */
|
|
49
|
+
draw: {
|
|
50
|
+
type: PropType<DrawFunction>;
|
|
51
|
+
required: true;
|
|
52
|
+
};
|
|
53
|
+
/** Sets the canvas up before the first frame and after a resize. */
|
|
54
|
+
init: PropType<InitFunction>;
|
|
55
|
+
/** Draw on every animation frame. @default true */
|
|
56
|
+
animate: {
|
|
57
|
+
type: BooleanConstructor;
|
|
58
|
+
default: boolean;
|
|
59
|
+
};
|
|
60
|
+
/** Settings for the 2D context. Read once, when the canvas is created. */
|
|
61
|
+
options: PropType<CanvasRenderingContext2DSettings>;
|
|
62
|
+
/** Keep the drawing while the canvas is resized. @default true */
|
|
63
|
+
reduceFlickering: {
|
|
64
|
+
type: BooleanConstructor;
|
|
65
|
+
default: boolean;
|
|
66
|
+
};
|
|
67
|
+
/** Follow the size of the parent element; `width` and `height` are ignored. */
|
|
68
|
+
resizable: BooleanConstructor;
|
|
69
|
+
/** Width in CSS pixels, while not `resizable`. @default 100 */
|
|
70
|
+
width: {
|
|
71
|
+
type: NumberConstructor;
|
|
72
|
+
default: number;
|
|
73
|
+
};
|
|
74
|
+
/** Height in CSS pixels, while not `resizable`. @default 100 */
|
|
75
|
+
height: {
|
|
76
|
+
type: NumberConstructor;
|
|
77
|
+
default: number;
|
|
78
|
+
};
|
|
79
|
+
}>> & Readonly<{}>, {
|
|
80
|
+
resizable: boolean;
|
|
81
|
+
animate: boolean;
|
|
82
|
+
reduceFlickering: boolean;
|
|
83
|
+
width: number;
|
|
84
|
+
height: number;
|
|
85
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region src/components/DropZone/DropZone.d.ts
|
|
88
|
+
/** A region that takes dropped files. */
|
|
89
|
+
export declare const DropZone: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
90
|
+
/** Which files to take, as the `accept` attribute of a file input. */
|
|
91
|
+
accept: StringConstructor;
|
|
92
|
+
/** Take every file dropped, rather than the first. */
|
|
93
|
+
multiple: BooleanConstructor;
|
|
94
|
+
/** Ignore drops. The zone carries `data-disabled`. */
|
|
95
|
+
disabled: BooleanConstructor;
|
|
96
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
97
|
+
[key: string]: any;
|
|
98
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
99
|
+
/** The dropped files that satisfy `accept`. */
|
|
100
|
+
drop: (files: File[], _event: DragEvent) => boolean;
|
|
101
|
+
/** The dropped files that do not satisfy `accept`, after `drop` for the same drop. */
|
|
102
|
+
reject: (files: File[], _event: DragEvent) => boolean;
|
|
103
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
104
|
+
/** Which files to take, as the `accept` attribute of a file input. */
|
|
105
|
+
accept: StringConstructor;
|
|
106
|
+
/** Take every file dropped, rather than the first. */
|
|
107
|
+
multiple: BooleanConstructor;
|
|
108
|
+
/** Ignore drops. The zone carries `data-disabled`. */
|
|
109
|
+
disabled: BooleanConstructor;
|
|
110
|
+
}>> & Readonly<{
|
|
111
|
+
onDrop?: ((files: File[], _event: DragEvent) => any) | undefined;
|
|
112
|
+
onReject?: ((files: File[], _event: DragEvent) => any) | undefined;
|
|
113
|
+
}>, {
|
|
114
|
+
multiple: boolean;
|
|
115
|
+
disabled: boolean;
|
|
116
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
117
|
+
//#endregion
|
|
118
|
+
//#region src/components/FileInput/context.d.ts
|
|
119
|
+
/** What `FileInput` shares with `FileInputTrigger`. */
|
|
120
|
+
interface FileInputContextValue {
|
|
121
|
+
/** The id of the file input, for the trigger's `for`. */
|
|
122
|
+
readonly inputId: string;
|
|
123
|
+
readonly disabled: boolean;
|
|
124
|
+
}
|
|
125
|
+
/** The context of the enclosing `FileInput`, for a part of your own. */
|
|
126
|
+
export declare function useFileInputContext(): FileInputContextValue;
|
|
127
|
+
//#endregion
|
|
128
|
+
//#region src/components/FileInput/FileInput.d.ts
|
|
129
|
+
/**
|
|
130
|
+
* Picks files. The control is the native file input, out of sight but in the
|
|
131
|
+
* tab order, with `FileInputTrigger` as its label.
|
|
132
|
+
*/
|
|
133
|
+
export declare const FileInput: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
134
|
+
/**
|
|
135
|
+
* Which files to take: extensions, MIME types and type groups. It is
|
|
136
|
+
* checked again when the files arrive, since the picker only takes it as
|
|
137
|
+
* a hint.
|
|
138
|
+
*/
|
|
139
|
+
accept: StringConstructor;
|
|
140
|
+
/** Let several files be picked at once. */
|
|
141
|
+
multiple: BooleanConstructor;
|
|
142
|
+
/** Make the input unusable. The parts carry `data-disabled`. */
|
|
143
|
+
disabled: BooleanConstructor;
|
|
144
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
145
|
+
[key: string]: any;
|
|
146
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
147
|
+
/** The picked files that satisfy `accept`. */
|
|
148
|
+
change: (files: File[]) => boolean;
|
|
149
|
+
/** The picked files that do not satisfy `accept`, after `change` for the same selection. */
|
|
150
|
+
reject: (files: File[]) => boolean;
|
|
151
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
152
|
+
/**
|
|
153
|
+
* Which files to take: extensions, MIME types and type groups. It is
|
|
154
|
+
* checked again when the files arrive, since the picker only takes it as
|
|
155
|
+
* a hint.
|
|
156
|
+
*/
|
|
157
|
+
accept: StringConstructor;
|
|
158
|
+
/** Let several files be picked at once. */
|
|
159
|
+
multiple: BooleanConstructor;
|
|
160
|
+
/** Make the input unusable. The parts carry `data-disabled`. */
|
|
161
|
+
disabled: BooleanConstructor;
|
|
162
|
+
}>> & Readonly<{
|
|
163
|
+
onChange?: ((files: File[]) => any) | undefined;
|
|
164
|
+
onReject?: ((files: File[]) => any) | undefined;
|
|
165
|
+
}>, {
|
|
166
|
+
multiple: boolean;
|
|
167
|
+
disabled: boolean;
|
|
168
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
169
|
+
//#endregion
|
|
170
|
+
//#region src/components/FileInput/FileInputTrigger.d.ts
|
|
171
|
+
/**
|
|
172
|
+
* Opens the file picker and names the input. A `<label>` rather than a
|
|
173
|
+
* button: the browser forwards the click, the input stays the one thing in
|
|
174
|
+
* the tab order, and its name comes from this text.
|
|
175
|
+
*/
|
|
176
|
+
export declare const FileInputTrigger: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
177
|
+
[key: string]: any;
|
|
178
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
179
|
+
//#endregion
|
|
180
|
+
//#region src/components/Knob/context.d.ts
|
|
181
|
+
/**
|
|
182
|
+
* What `Knob` shares with its parts. The fields are getters, so reading one in
|
|
183
|
+
* a render or a `computed` follows the value as it changes.
|
|
184
|
+
*/
|
|
185
|
+
interface KnobContextValue {
|
|
186
|
+
readonly value: number;
|
|
187
|
+
readonly min: number;
|
|
188
|
+
readonly max: number;
|
|
189
|
+
readonly step: number;
|
|
190
|
+
readonly scale: Scale;
|
|
191
|
+
readonly startValue: number;
|
|
192
|
+
/** How far the knob turns from `min` to `max`, in degrees. */
|
|
193
|
+
readonly angleRange: number;
|
|
194
|
+
/** The angles the parts are drawn with. See `knobAngles` in `@tremolo-ui/dom`. */
|
|
195
|
+
readonly angles: KnobAngles;
|
|
196
|
+
}
|
|
197
|
+
/** The context of the enclosing `Knob`, for a part of your own. */
|
|
198
|
+
export declare function useKnobContext(): KnobContextValue;
|
|
199
|
+
//#endregion
|
|
200
|
+
//#region src/components/Knob/Knob.d.ts
|
|
201
|
+
/**
|
|
202
|
+
* Interactive rotary knob, drawn in SVG by `KnobSVGRoot` and the parts inside
|
|
203
|
+
* it. Bind the value with `v-model`.
|
|
204
|
+
*/
|
|
205
|
+
export declare const Knob: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
206
|
+
/** The current value. Bind it with `v-model`. */
|
|
207
|
+
modelValue: {
|
|
208
|
+
type: NumberConstructor;
|
|
209
|
+
required: true;
|
|
210
|
+
};
|
|
211
|
+
/** The value with the knob turned all the way down. */
|
|
212
|
+
min: {
|
|
213
|
+
type: NumberConstructor;
|
|
214
|
+
required: true;
|
|
215
|
+
};
|
|
216
|
+
/** The value with the knob turned all the way up. */
|
|
217
|
+
max: {
|
|
218
|
+
type: NumberConstructor;
|
|
219
|
+
required: true;
|
|
220
|
+
};
|
|
221
|
+
/** Granularity of the value. @default 1 */
|
|
222
|
+
step: {
|
|
223
|
+
type: NumberConstructor;
|
|
224
|
+
default: number;
|
|
225
|
+
};
|
|
226
|
+
/** How the value is distributed across the travel. @default linearScale */
|
|
227
|
+
scale: {
|
|
228
|
+
type: PropType<Scale>;
|
|
229
|
+
default: () => Scale;
|
|
230
|
+
};
|
|
231
|
+
/** The value a double click restores. @default min */
|
|
232
|
+
defaultValue: NumberConstructor;
|
|
233
|
+
/** Where the active arc starts. @default min */
|
|
234
|
+
startValue: NumberConstructor;
|
|
235
|
+
/** Width and height of the knob. Sets `--knob-size`. */
|
|
236
|
+
size: (NumberConstructor | StringConstructor)[];
|
|
237
|
+
/** The cursor to show while dragging. @default { cursor: 'grabbing' } */
|
|
238
|
+
externalStyles: PropType<{
|
|
239
|
+
cursor?: string;
|
|
240
|
+
}>;
|
|
241
|
+
/** How much one notch of the wheel moves the value. `null` turns it off. */
|
|
242
|
+
wheel: {
|
|
243
|
+
type: PropType<ModifierValue<InputEventOption> | null>;
|
|
244
|
+
default: () => ModifierValue<InputEventOption>;
|
|
245
|
+
};
|
|
246
|
+
/** How much one arrow key press moves the value. `null` turns it off. */
|
|
247
|
+
keyboard: {
|
|
248
|
+
type: PropType<ModifierValue<InputEventOption> | null>;
|
|
249
|
+
default: () => ModifierValue<InputEventOption>;
|
|
250
|
+
};
|
|
251
|
+
/** How much a drag moves the value, per modifier key. */
|
|
252
|
+
dragSensitivity: {
|
|
253
|
+
type: PropType<ModifierValue<number>>;
|
|
254
|
+
default: () => ModifierValue<number>;
|
|
255
|
+
};
|
|
256
|
+
/** Hide the cursor while dragging and read the movement directly. */
|
|
257
|
+
pointerLock: BooleanConstructor;
|
|
258
|
+
/** Restore `defaultValue` on a double click. @default true */
|
|
259
|
+
enableDoubleClickDefault: {
|
|
260
|
+
type: BooleanConstructor;
|
|
261
|
+
default: boolean;
|
|
262
|
+
};
|
|
263
|
+
/** Make the knob unchangeable and remove it from the tab order. */
|
|
264
|
+
disabled: BooleanConstructor;
|
|
265
|
+
/** Make the knob unchangeable while leaving it focusable. */
|
|
266
|
+
readonly: BooleanConstructor;
|
|
267
|
+
/** How far the knob turns from `min` to `max`, in degrees. @default 270 */
|
|
268
|
+
angleRange: {
|
|
269
|
+
type: NumberConstructor;
|
|
270
|
+
default: number;
|
|
271
|
+
};
|
|
272
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
273
|
+
[key: string]: any;
|
|
274
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
275
|
+
'update:modelValue': (value: number) => boolean;
|
|
276
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
277
|
+
/** The current value. Bind it with `v-model`. */
|
|
278
|
+
modelValue: {
|
|
279
|
+
type: NumberConstructor;
|
|
280
|
+
required: true;
|
|
281
|
+
};
|
|
282
|
+
/** The value with the knob turned all the way down. */
|
|
283
|
+
min: {
|
|
284
|
+
type: NumberConstructor;
|
|
285
|
+
required: true;
|
|
286
|
+
};
|
|
287
|
+
/** The value with the knob turned all the way up. */
|
|
288
|
+
max: {
|
|
289
|
+
type: NumberConstructor;
|
|
290
|
+
required: true;
|
|
291
|
+
};
|
|
292
|
+
/** Granularity of the value. @default 1 */
|
|
293
|
+
step: {
|
|
294
|
+
type: NumberConstructor;
|
|
295
|
+
default: number;
|
|
296
|
+
};
|
|
297
|
+
/** How the value is distributed across the travel. @default linearScale */
|
|
298
|
+
scale: {
|
|
299
|
+
type: PropType<Scale>;
|
|
300
|
+
default: () => Scale;
|
|
301
|
+
};
|
|
302
|
+
/** The value a double click restores. @default min */
|
|
303
|
+
defaultValue: NumberConstructor;
|
|
304
|
+
/** Where the active arc starts. @default min */
|
|
305
|
+
startValue: NumberConstructor;
|
|
306
|
+
/** Width and height of the knob. Sets `--knob-size`. */
|
|
307
|
+
size: (NumberConstructor | StringConstructor)[];
|
|
308
|
+
/** The cursor to show while dragging. @default { cursor: 'grabbing' } */
|
|
309
|
+
externalStyles: PropType<{
|
|
310
|
+
cursor?: string;
|
|
311
|
+
}>;
|
|
312
|
+
/** How much one notch of the wheel moves the value. `null` turns it off. */
|
|
313
|
+
wheel: {
|
|
314
|
+
type: PropType<ModifierValue<InputEventOption> | null>;
|
|
315
|
+
default: () => ModifierValue<InputEventOption>;
|
|
316
|
+
};
|
|
317
|
+
/** How much one arrow key press moves the value. `null` turns it off. */
|
|
318
|
+
keyboard: {
|
|
319
|
+
type: PropType<ModifierValue<InputEventOption> | null>;
|
|
320
|
+
default: () => ModifierValue<InputEventOption>;
|
|
321
|
+
};
|
|
322
|
+
/** How much a drag moves the value, per modifier key. */
|
|
323
|
+
dragSensitivity: {
|
|
324
|
+
type: PropType<ModifierValue<number>>;
|
|
325
|
+
default: () => ModifierValue<number>;
|
|
326
|
+
};
|
|
327
|
+
/** Hide the cursor while dragging and read the movement directly. */
|
|
328
|
+
pointerLock: BooleanConstructor;
|
|
329
|
+
/** Restore `defaultValue` on a double click. @default true */
|
|
330
|
+
enableDoubleClickDefault: {
|
|
331
|
+
type: BooleanConstructor;
|
|
332
|
+
default: boolean;
|
|
333
|
+
};
|
|
334
|
+
/** Make the knob unchangeable and remove it from the tab order. */
|
|
335
|
+
disabled: BooleanConstructor;
|
|
336
|
+
/** Make the knob unchangeable while leaving it focusable. */
|
|
337
|
+
readonly: BooleanConstructor;
|
|
338
|
+
/** How far the knob turns from `min` to `max`, in degrees. @default 270 */
|
|
339
|
+
angleRange: {
|
|
340
|
+
type: NumberConstructor;
|
|
341
|
+
default: number;
|
|
342
|
+
};
|
|
343
|
+
}>> & Readonly<{
|
|
344
|
+
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
345
|
+
}>, {
|
|
346
|
+
wheel: ModifierValue<InputEventOption> | null;
|
|
347
|
+
disabled: boolean;
|
|
348
|
+
step: number;
|
|
349
|
+
keyboard: ModifierValue<InputEventOption> | null;
|
|
350
|
+
dragSensitivity: ModifierValue<number>;
|
|
351
|
+
readonly: boolean;
|
|
352
|
+
scale: Scale;
|
|
353
|
+
pointerLock: boolean;
|
|
354
|
+
enableDoubleClickDefault: boolean;
|
|
355
|
+
angleRange: number;
|
|
356
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
357
|
+
//#endregion
|
|
358
|
+
//#region src/components/Knob/KnobActiveLine.d.ts
|
|
359
|
+
/** The arc between `startValue` and the value, as an SVG `<path>`. */
|
|
360
|
+
export declare const KnobActiveLine: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
361
|
+
stroke: {
|
|
362
|
+
type: StringConstructor;
|
|
363
|
+
default: string;
|
|
364
|
+
};
|
|
365
|
+
strokeWidth: {
|
|
366
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
367
|
+
default: number;
|
|
368
|
+
};
|
|
369
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
370
|
+
[key: string]: any;
|
|
371
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
372
|
+
stroke: {
|
|
373
|
+
type: StringConstructor;
|
|
374
|
+
default: string;
|
|
375
|
+
};
|
|
376
|
+
strokeWidth: {
|
|
377
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
378
|
+
default: number;
|
|
379
|
+
};
|
|
380
|
+
}>> & Readonly<{}>, {
|
|
381
|
+
stroke: string;
|
|
382
|
+
strokeWidth: string | number;
|
|
383
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
384
|
+
//#endregion
|
|
385
|
+
//#region src/components/Knob/KnobInactiveLine.d.ts
|
|
386
|
+
/**
|
|
387
|
+
* The travel outside the value, as SVG `<path>`s: one on each side of the
|
|
388
|
+
* active arc that has any length.
|
|
389
|
+
*/
|
|
390
|
+
export declare const KnobInactiveLine: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
391
|
+
stroke: {
|
|
392
|
+
type: StringConstructor;
|
|
393
|
+
default: string;
|
|
394
|
+
};
|
|
395
|
+
strokeWidth: {
|
|
396
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
397
|
+
default: number;
|
|
398
|
+
};
|
|
399
|
+
}>, () => (import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
400
|
+
[key: string]: any;
|
|
401
|
+
}> | null)[], {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
402
|
+
stroke: {
|
|
403
|
+
type: StringConstructor;
|
|
404
|
+
default: string;
|
|
405
|
+
};
|
|
406
|
+
strokeWidth: {
|
|
407
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
408
|
+
default: number;
|
|
409
|
+
};
|
|
410
|
+
}>> & Readonly<{}>, {
|
|
411
|
+
stroke: string;
|
|
412
|
+
strokeWidth: string | number;
|
|
413
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
414
|
+
//#endregion
|
|
415
|
+
//#region src/components/Knob/KnobSVGRoot.d.ts
|
|
416
|
+
/**
|
|
417
|
+
* The `<svg>` the drawing parts go in, in the order you want them painted.
|
|
418
|
+
* It sets the view box they are drawn against.
|
|
419
|
+
*/
|
|
420
|
+
export declare const KnobSVGRoot: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
421
|
+
[key: string]: any;
|
|
422
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
423
|
+
//#endregion
|
|
424
|
+
//#region src/components/Knob/KnobThumb.d.ts
|
|
425
|
+
/** The circle that turns with the value, and the line on it that points at it. */
|
|
426
|
+
export declare const KnobThumb: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
427
|
+
/** Fill colour of the circle. @default 'currentColor' */
|
|
428
|
+
thumb: {
|
|
429
|
+
type: StringConstructor;
|
|
430
|
+
default: string;
|
|
431
|
+
};
|
|
432
|
+
/** Colour of the line that points at the value. @default 'currentColor' */
|
|
433
|
+
thumbLine: {
|
|
434
|
+
type: StringConstructor;
|
|
435
|
+
default: string;
|
|
436
|
+
};
|
|
437
|
+
/** Diameter of the circle, as a percentage of the knob. @default 84 */
|
|
438
|
+
thumbSize: {
|
|
439
|
+
type: NumberConstructor;
|
|
440
|
+
default: number;
|
|
441
|
+
};
|
|
442
|
+
/** Thickness of the line, as a percentage of the knob. @default 6 */
|
|
443
|
+
thumbLineWeight: {
|
|
444
|
+
type: NumberConstructor;
|
|
445
|
+
default: number;
|
|
446
|
+
};
|
|
447
|
+
/** How far down the line reaches, as a percentage. @default 35 */
|
|
448
|
+
thumbLineLength: {
|
|
449
|
+
type: NumberConstructor;
|
|
450
|
+
default: number;
|
|
451
|
+
};
|
|
452
|
+
/** Classes for the line that points at the value. */
|
|
453
|
+
classes: PropType<{
|
|
454
|
+
thumbLine?: string;
|
|
455
|
+
}>;
|
|
456
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
457
|
+
[key: string]: any;
|
|
458
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
459
|
+
/** Fill colour of the circle. @default 'currentColor' */
|
|
460
|
+
thumb: {
|
|
461
|
+
type: StringConstructor;
|
|
462
|
+
default: string;
|
|
463
|
+
};
|
|
464
|
+
/** Colour of the line that points at the value. @default 'currentColor' */
|
|
465
|
+
thumbLine: {
|
|
466
|
+
type: StringConstructor;
|
|
467
|
+
default: string;
|
|
468
|
+
};
|
|
469
|
+
/** Diameter of the circle, as a percentage of the knob. @default 84 */
|
|
470
|
+
thumbSize: {
|
|
471
|
+
type: NumberConstructor;
|
|
472
|
+
default: number;
|
|
473
|
+
};
|
|
474
|
+
/** Thickness of the line, as a percentage of the knob. @default 6 */
|
|
475
|
+
thumbLineWeight: {
|
|
476
|
+
type: NumberConstructor;
|
|
477
|
+
default: number;
|
|
478
|
+
};
|
|
479
|
+
/** How far down the line reaches, as a percentage. @default 35 */
|
|
480
|
+
thumbLineLength: {
|
|
481
|
+
type: NumberConstructor;
|
|
482
|
+
default: number;
|
|
483
|
+
};
|
|
484
|
+
/** Classes for the line that points at the value. */
|
|
485
|
+
classes: PropType<{
|
|
486
|
+
thumbLine?: string;
|
|
487
|
+
}>;
|
|
488
|
+
}>> & Readonly<{}>, {
|
|
489
|
+
thumb: string;
|
|
490
|
+
thumbLine: string;
|
|
491
|
+
thumbSize: number;
|
|
492
|
+
thumbLineWeight: number;
|
|
493
|
+
thumbLineLength: number;
|
|
494
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
495
|
+
//#endregion
|
|
496
|
+
//#region src/components/NumberInput/context.d.ts
|
|
497
|
+
/** What `NumberInput` shares with its parts. The fields are getters. */
|
|
498
|
+
interface NumberInputContextValue {
|
|
499
|
+
readonly value: number;
|
|
500
|
+
readonly min: number | undefined;
|
|
501
|
+
readonly max: number | undefined;
|
|
502
|
+
readonly step: number;
|
|
503
|
+
readonly disabled: boolean;
|
|
504
|
+
readonly readonly: boolean;
|
|
505
|
+
readonly keyboard: ModifierValue<InputEventOption> | null;
|
|
506
|
+
readonly drag: number | null;
|
|
507
|
+
readonly dragSensitivity: ModifierValue<number>;
|
|
508
|
+
readonly pointerLock: boolean;
|
|
509
|
+
readonly selectOnFocus: 'all' | 'number' | 'none';
|
|
510
|
+
readonly unformatOnFocus: boolean;
|
|
511
|
+
readonly keepCaretOnStep: boolean;
|
|
512
|
+
readonly blurOnEnter: boolean;
|
|
513
|
+
/** The text the field shows: the draft while typing, else `format(value)`. */
|
|
514
|
+
readonly text: string;
|
|
515
|
+
/** Whether the user has typed since the value was last committed. */
|
|
516
|
+
readonly editing: boolean;
|
|
517
|
+
readonly outOfRange: boolean;
|
|
518
|
+
readonly atMin: boolean;
|
|
519
|
+
readonly atMax: boolean;
|
|
520
|
+
/** The range a raw amount moves across, for the stepper drag. */
|
|
521
|
+
readonly rawRange: ValueRange;
|
|
522
|
+
/** Keep typed text as the draft, reporting the number in it. */
|
|
523
|
+
setDraft: (text: string) => void;
|
|
524
|
+
/** Commit the draft, clamped, or drop it when it holds no number. */
|
|
525
|
+
commitDraft: () => void;
|
|
526
|
+
/** Set the value, dropping any draft. */
|
|
527
|
+
changeValue: (value: number) => void;
|
|
528
|
+
/** Move the value by one press of `option`. */
|
|
529
|
+
nudge: (direction: number, option: ModifierValue<InputEventOption>, modifiers?: ModifierState) => void;
|
|
530
|
+
/** @internal `NumberInputField` registers the element focus() moves to. */
|
|
531
|
+
setInput: (input: HTMLInputElement | null) => void;
|
|
532
|
+
}
|
|
533
|
+
/** The context of the enclosing `NumberInput`, for a part of your own. */
|
|
534
|
+
export declare function useNumberInputContext(): NumberInputContextValue;
|
|
535
|
+
//#endregion
|
|
536
|
+
//#region src/components/NumberInput/NumberInput.d.ts
|
|
537
|
+
/** Input with some useful functions for entering numbers. Bind it with `v-model`. */
|
|
538
|
+
export declare const NumberInput: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
539
|
+
/** The current value. Bind it with `v-model`. */
|
|
540
|
+
modelValue: {
|
|
541
|
+
type: NumberConstructor;
|
|
542
|
+
required: true;
|
|
543
|
+
};
|
|
544
|
+
/** The lowest value. Leave it out for no lower end. */
|
|
545
|
+
min: NumberConstructor;
|
|
546
|
+
/** The highest value. Leave it out for no upper end. */
|
|
547
|
+
max: NumberConstructor;
|
|
548
|
+
/** Granularity of the value. @default 1 */
|
|
549
|
+
step: {
|
|
550
|
+
type: NumberConstructor;
|
|
551
|
+
default: number;
|
|
552
|
+
};
|
|
553
|
+
/** How the value is distributed, for a `normalized` amount. */
|
|
554
|
+
scale: {
|
|
555
|
+
type: PropType<Scale>;
|
|
556
|
+
default: () => Scale;
|
|
557
|
+
};
|
|
558
|
+
/** The text shown for a value. @default String */
|
|
559
|
+
format: {
|
|
560
|
+
type: PropType<(value: number) => string>;
|
|
561
|
+
default: StringConstructor;
|
|
562
|
+
};
|
|
563
|
+
/** Read a value back out of the text. Has to undo `format`. */
|
|
564
|
+
parse: {
|
|
565
|
+
type: PropType<(text: string) => number>;
|
|
566
|
+
default: typeof parseNumberText;
|
|
567
|
+
};
|
|
568
|
+
/** Keep the value within `min` and `max` when committed or stepped. */
|
|
569
|
+
clampValue: {
|
|
570
|
+
type: BooleanConstructor;
|
|
571
|
+
default: boolean;
|
|
572
|
+
};
|
|
573
|
+
wheel: {
|
|
574
|
+
type: PropType<import("@tremolo-ui/dom").ModifierValue<import("@tremolo-ui/dom").InputEventOption> | null>;
|
|
575
|
+
default: () => import("@tremolo-ui/dom").ModifierValue<import("@tremolo-ui/dom").InputEventOption>;
|
|
576
|
+
};
|
|
577
|
+
keyboard: {
|
|
578
|
+
type: PropType<import("@tremolo-ui/dom").ModifierValue<import("@tremolo-ui/dom").InputEventOption> | null>;
|
|
579
|
+
default: () => import("@tremolo-ui/dom").ModifierValue<import("@tremolo-ui/dom").InputEventOption>;
|
|
580
|
+
};
|
|
581
|
+
dragSensitivity: {
|
|
582
|
+
type: PropType<import("@tremolo-ui/dom").ModifierValue<number>>;
|
|
583
|
+
default: () => import("@tremolo-ui/dom").ModifierValue<number>;
|
|
584
|
+
};
|
|
585
|
+
/** Pixels of vertical drag on the stepper per `step`. `null` turns it off. */
|
|
586
|
+
drag: {
|
|
587
|
+
type: PropType<number | null>;
|
|
588
|
+
default: number;
|
|
589
|
+
};
|
|
590
|
+
/** Hide the cursor while dragging the stepper. */
|
|
591
|
+
pointerLock: BooleanConstructor;
|
|
592
|
+
/** Select the text when the field takes focus. @default 'none' */
|
|
593
|
+
selectOnFocus: {
|
|
594
|
+
type: PropType<"all" | "number" | "none">;
|
|
595
|
+
default: string;
|
|
596
|
+
};
|
|
597
|
+
/** Show the plain value while the field has focus. */
|
|
598
|
+
unformatOnFocus: BooleanConstructor;
|
|
599
|
+
/** Put the caret back at the same digit after an arrow key step. */
|
|
600
|
+
keepCaretOnStep: BooleanConstructor;
|
|
601
|
+
/** Commit and leave the field on Enter. @default true */
|
|
602
|
+
blurOnEnter: {
|
|
603
|
+
type: BooleanConstructor;
|
|
604
|
+
default: boolean;
|
|
605
|
+
};
|
|
606
|
+
/** Make the input unchangeable and remove it from the tab order. */
|
|
607
|
+
disabled: BooleanConstructor;
|
|
608
|
+
/** Make the value unchangeable while leaving the field focusable. */
|
|
609
|
+
readonly: BooleanConstructor;
|
|
610
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
611
|
+
[key: string]: any;
|
|
612
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
613
|
+
'update:modelValue': (value: number) => boolean;
|
|
614
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
615
|
+
/** The current value. Bind it with `v-model`. */
|
|
616
|
+
modelValue: {
|
|
617
|
+
type: NumberConstructor;
|
|
618
|
+
required: true;
|
|
619
|
+
};
|
|
620
|
+
/** The lowest value. Leave it out for no lower end. */
|
|
621
|
+
min: NumberConstructor;
|
|
622
|
+
/** The highest value. Leave it out for no upper end. */
|
|
623
|
+
max: NumberConstructor;
|
|
624
|
+
/** Granularity of the value. @default 1 */
|
|
625
|
+
step: {
|
|
626
|
+
type: NumberConstructor;
|
|
627
|
+
default: number;
|
|
628
|
+
};
|
|
629
|
+
/** How the value is distributed, for a `normalized` amount. */
|
|
630
|
+
scale: {
|
|
631
|
+
type: PropType<Scale>;
|
|
632
|
+
default: () => Scale;
|
|
633
|
+
};
|
|
634
|
+
/** The text shown for a value. @default String */
|
|
635
|
+
format: {
|
|
636
|
+
type: PropType<(value: number) => string>;
|
|
637
|
+
default: StringConstructor;
|
|
638
|
+
};
|
|
639
|
+
/** Read a value back out of the text. Has to undo `format`. */
|
|
640
|
+
parse: {
|
|
641
|
+
type: PropType<(text: string) => number>;
|
|
642
|
+
default: typeof parseNumberText;
|
|
643
|
+
};
|
|
644
|
+
/** Keep the value within `min` and `max` when committed or stepped. */
|
|
645
|
+
clampValue: {
|
|
646
|
+
type: BooleanConstructor;
|
|
647
|
+
default: boolean;
|
|
648
|
+
};
|
|
649
|
+
wheel: {
|
|
650
|
+
type: PropType<import("@tremolo-ui/dom").ModifierValue<import("@tremolo-ui/dom").InputEventOption> | null>;
|
|
651
|
+
default: () => import("@tremolo-ui/dom").ModifierValue<import("@tremolo-ui/dom").InputEventOption>;
|
|
652
|
+
};
|
|
653
|
+
keyboard: {
|
|
654
|
+
type: PropType<import("@tremolo-ui/dom").ModifierValue<import("@tremolo-ui/dom").InputEventOption> | null>;
|
|
655
|
+
default: () => import("@tremolo-ui/dom").ModifierValue<import("@tremolo-ui/dom").InputEventOption>;
|
|
656
|
+
};
|
|
657
|
+
dragSensitivity: {
|
|
658
|
+
type: PropType<import("@tremolo-ui/dom").ModifierValue<number>>;
|
|
659
|
+
default: () => import("@tremolo-ui/dom").ModifierValue<number>;
|
|
660
|
+
};
|
|
661
|
+
/** Pixels of vertical drag on the stepper per `step`. `null` turns it off. */
|
|
662
|
+
drag: {
|
|
663
|
+
type: PropType<number | null>;
|
|
664
|
+
default: number;
|
|
665
|
+
};
|
|
666
|
+
/** Hide the cursor while dragging the stepper. */
|
|
667
|
+
pointerLock: BooleanConstructor;
|
|
668
|
+
/** Select the text when the field takes focus. @default 'none' */
|
|
669
|
+
selectOnFocus: {
|
|
670
|
+
type: PropType<"all" | "number" | "none">;
|
|
671
|
+
default: string;
|
|
672
|
+
};
|
|
673
|
+
/** Show the plain value while the field has focus. */
|
|
674
|
+
unformatOnFocus: BooleanConstructor;
|
|
675
|
+
/** Put the caret back at the same digit after an arrow key step. */
|
|
676
|
+
keepCaretOnStep: BooleanConstructor;
|
|
677
|
+
/** Commit and leave the field on Enter. @default true */
|
|
678
|
+
blurOnEnter: {
|
|
679
|
+
type: BooleanConstructor;
|
|
680
|
+
default: boolean;
|
|
681
|
+
};
|
|
682
|
+
/** Make the input unchangeable and remove it from the tab order. */
|
|
683
|
+
disabled: BooleanConstructor;
|
|
684
|
+
/** Make the value unchangeable while leaving the field focusable. */
|
|
685
|
+
readonly: BooleanConstructor;
|
|
686
|
+
}>> & Readonly<{
|
|
687
|
+
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
688
|
+
}>, {
|
|
689
|
+
drag: number | null;
|
|
690
|
+
wheel: import("@tremolo-ui/dom").ModifierValue<import("@tremolo-ui/dom").InputEventOption> | null;
|
|
691
|
+
disabled: boolean;
|
|
692
|
+
step: number;
|
|
693
|
+
keyboard: import("@tremolo-ui/dom").ModifierValue<import("@tremolo-ui/dom").InputEventOption> | null;
|
|
694
|
+
dragSensitivity: import("@tremolo-ui/dom").ModifierValue<number>;
|
|
695
|
+
readonly: boolean;
|
|
696
|
+
scale: Scale;
|
|
697
|
+
pointerLock: boolean;
|
|
698
|
+
unformatOnFocus: boolean;
|
|
699
|
+
keepCaretOnStep: boolean;
|
|
700
|
+
format: (value: number) => string;
|
|
701
|
+
parse: (text: string) => number;
|
|
702
|
+
clampValue: boolean;
|
|
703
|
+
selectOnFocus: "number" | "none" | "all";
|
|
704
|
+
blurOnEnter: boolean;
|
|
705
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
706
|
+
//#endregion
|
|
707
|
+
//#region src/components/NumberInput/NumberInputDecrementStepper.d.ts
|
|
708
|
+
/** Lowers the value by one `step`, repeating while held. */
|
|
709
|
+
export declare const NumberInputDecrementStepper: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
710
|
+
[key: string]: any;
|
|
711
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
712
|
+
//#endregion
|
|
713
|
+
//#region src/components/NumberInput/NumberInputField.d.ts
|
|
714
|
+
/**
|
|
715
|
+
* The text field, and the only place the value can be typed. While the user
|
|
716
|
+
* types, their own text stands rather than `format(value)`.
|
|
717
|
+
*/
|
|
718
|
+
export declare const NumberInputField: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
719
|
+
[key: string]: any;
|
|
720
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
721
|
+
//#endregion
|
|
722
|
+
//#region src/components/NumberInput/NumberInputIncrementStepper.d.ts
|
|
723
|
+
/** Raises the value by one `step`, repeating while held. */
|
|
724
|
+
export declare const NumberInputIncrementStepper: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
725
|
+
[key: string]: any;
|
|
726
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
727
|
+
//#endregion
|
|
728
|
+
//#region src/components/NumberInput/NumberInputStepper.d.ts
|
|
729
|
+
/**
|
|
730
|
+
* The area the steppers sit in, and a drag handle in its own right: dragging
|
|
731
|
+
* it up and down moves the value one `step` every `drag` pixels.
|
|
732
|
+
*/
|
|
733
|
+
export declare const NumberInputStepper: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
734
|
+
[key: string]: any;
|
|
735
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
736
|
+
//#endregion
|
|
737
|
+
//#region src/components/Piano/Piano.d.ts
|
|
738
|
+
/** What a key is, when the `label` slot or `keyProps` is asked about it. */
|
|
739
|
+
interface KeyState {
|
|
740
|
+
/** Position in the note range, counting from `noteRange.first`. */
|
|
741
|
+
index: number;
|
|
742
|
+
keyType: 'white' | 'black';
|
|
743
|
+
/** Whether the note is currently sounding. */
|
|
744
|
+
active: boolean;
|
|
745
|
+
/** Whether the note is above `midiMax` and cannot sound. */
|
|
746
|
+
disabled: boolean;
|
|
747
|
+
}
|
|
748
|
+
/** What `keyProps` may return for one key. */
|
|
749
|
+
type KeyAttributes = HTMLAttributes & Record<`data-${string}`, string | number | boolean | undefined>;
|
|
750
|
+
/**
|
|
751
|
+
* Customizable piano. The keys are drawn by the component; what goes inside
|
|
752
|
+
* one is the `label` slot, which receives the note and its state.
|
|
753
|
+
*/
|
|
754
|
+
export declare const Piano: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
755
|
+
/** The notes drawn, from `first` to `last`. */
|
|
756
|
+
noteRange: {
|
|
757
|
+
type: PropType<NoteRange>;
|
|
758
|
+
required: true;
|
|
759
|
+
};
|
|
760
|
+
/** Let a pointer slide from one key to the next. @default true */
|
|
761
|
+
glissando: {
|
|
762
|
+
type: BooleanConstructor;
|
|
763
|
+
default: boolean;
|
|
764
|
+
};
|
|
765
|
+
/** Highest note that can sound. @default 127 */
|
|
766
|
+
midiMax: {
|
|
767
|
+
type: NumberConstructor;
|
|
768
|
+
default: number;
|
|
769
|
+
};
|
|
770
|
+
/** Play notes from the computer keyboard. See `SHORTCUTS` in `@tremolo-ui/dom`. */
|
|
771
|
+
keyboardShortcuts: PropType<KeyboardShortcuts>;
|
|
772
|
+
/** Where keyboard shortcuts listen. @default 'root' */
|
|
773
|
+
keyboardShortcutsScope: {
|
|
774
|
+
type: PropType<KeyboardShortcutsScope>;
|
|
775
|
+
default: string;
|
|
776
|
+
};
|
|
777
|
+
/** Follow the width of the parent element. */
|
|
778
|
+
resizable: BooleanConstructor;
|
|
779
|
+
/** Width of a white key in pixels. @default 40 */
|
|
780
|
+
whiteKeyWidth: {
|
|
781
|
+
type: NumberConstructor;
|
|
782
|
+
default: number;
|
|
783
|
+
};
|
|
784
|
+
/** Space between two white keys, in pixels. @default 1 */
|
|
785
|
+
keyGap: {
|
|
786
|
+
type: NumberConstructor;
|
|
787
|
+
default: number;
|
|
788
|
+
};
|
|
789
|
+
/** Width of a black key, as a fraction of a white one. @default 0.65 */
|
|
790
|
+
blackKeyWidthRatio: {
|
|
791
|
+
type: NumberConstructor;
|
|
792
|
+
default: number;
|
|
793
|
+
};
|
|
794
|
+
/** Height of a black key, as a fraction of the keyboard. @default 0.6 */
|
|
795
|
+
blackKeyHeightRatio: {
|
|
796
|
+
type: NumberConstructor;
|
|
797
|
+
default: number;
|
|
798
|
+
};
|
|
799
|
+
/** Classes for the label inside each key. */
|
|
800
|
+
classes: PropType<{
|
|
801
|
+
keyLabelWrapper?: string;
|
|
802
|
+
keyLabel?: string;
|
|
803
|
+
}>;
|
|
804
|
+
/**
|
|
805
|
+
* Extra attributes for one key, by note. The geometry of the key is
|
|
806
|
+
* applied after the returned style and cannot be overridden.
|
|
807
|
+
*/
|
|
808
|
+
keyProps: PropType<(note: number, state: KeyState) => KeyAttributes>;
|
|
809
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
810
|
+
[key: string]: any;
|
|
811
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
812
|
+
/** A note started sounding. */
|
|
813
|
+
playNote: (note: number, _velocity?: number) => boolean;
|
|
814
|
+
/** Everything holding a note let go of it. */
|
|
815
|
+
stopNote: (note: number) => boolean;
|
|
816
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
817
|
+
/** The notes drawn, from `first` to `last`. */
|
|
818
|
+
noteRange: {
|
|
819
|
+
type: PropType<NoteRange>;
|
|
820
|
+
required: true;
|
|
821
|
+
};
|
|
822
|
+
/** Let a pointer slide from one key to the next. @default true */
|
|
823
|
+
glissando: {
|
|
824
|
+
type: BooleanConstructor;
|
|
825
|
+
default: boolean;
|
|
826
|
+
};
|
|
827
|
+
/** Highest note that can sound. @default 127 */
|
|
828
|
+
midiMax: {
|
|
829
|
+
type: NumberConstructor;
|
|
830
|
+
default: number;
|
|
831
|
+
};
|
|
832
|
+
/** Play notes from the computer keyboard. See `SHORTCUTS` in `@tremolo-ui/dom`. */
|
|
833
|
+
keyboardShortcuts: PropType<KeyboardShortcuts>;
|
|
834
|
+
/** Where keyboard shortcuts listen. @default 'root' */
|
|
835
|
+
keyboardShortcutsScope: {
|
|
836
|
+
type: PropType<KeyboardShortcutsScope>;
|
|
837
|
+
default: string;
|
|
838
|
+
};
|
|
839
|
+
/** Follow the width of the parent element. */
|
|
840
|
+
resizable: BooleanConstructor;
|
|
841
|
+
/** Width of a white key in pixels. @default 40 */
|
|
842
|
+
whiteKeyWidth: {
|
|
843
|
+
type: NumberConstructor;
|
|
844
|
+
default: number;
|
|
845
|
+
};
|
|
846
|
+
/** Space between two white keys, in pixels. @default 1 */
|
|
847
|
+
keyGap: {
|
|
848
|
+
type: NumberConstructor;
|
|
849
|
+
default: number;
|
|
850
|
+
};
|
|
851
|
+
/** Width of a black key, as a fraction of a white one. @default 0.65 */
|
|
852
|
+
blackKeyWidthRatio: {
|
|
853
|
+
type: NumberConstructor;
|
|
854
|
+
default: number;
|
|
855
|
+
};
|
|
856
|
+
/** Height of a black key, as a fraction of the keyboard. @default 0.6 */
|
|
857
|
+
blackKeyHeightRatio: {
|
|
858
|
+
type: NumberConstructor;
|
|
859
|
+
default: number;
|
|
860
|
+
};
|
|
861
|
+
/** Classes for the label inside each key. */
|
|
862
|
+
classes: PropType<{
|
|
863
|
+
keyLabelWrapper?: string;
|
|
864
|
+
keyLabel?: string;
|
|
865
|
+
}>;
|
|
866
|
+
/**
|
|
867
|
+
* Extra attributes for one key, by note. The geometry of the key is
|
|
868
|
+
* applied after the returned style and cannot be overridden.
|
|
869
|
+
*/
|
|
870
|
+
keyProps: PropType<(note: number, state: KeyState) => KeyAttributes>;
|
|
871
|
+
}>> & Readonly<{
|
|
872
|
+
onPlayNote?: ((note: number, _velocity?: number | undefined) => any) | undefined;
|
|
873
|
+
onStopNote?: ((note: number) => any) | undefined;
|
|
874
|
+
}>, {
|
|
875
|
+
resizable: boolean;
|
|
876
|
+
glissando: boolean;
|
|
877
|
+
midiMax: number;
|
|
878
|
+
keyboardShortcutsScope: KeyboardShortcutsScope;
|
|
879
|
+
whiteKeyWidth: number;
|
|
880
|
+
keyGap: number;
|
|
881
|
+
blackKeyWidthRatio: number;
|
|
882
|
+
blackKeyHeightRatio: number;
|
|
883
|
+
}, SlotsType<{
|
|
884
|
+
label: {
|
|
885
|
+
note: number;
|
|
886
|
+
state: KeyState;
|
|
887
|
+
};
|
|
888
|
+
}>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
889
|
+
//#endregion
|
|
890
|
+
//#region src/components/PointsEditor/context.d.ts
|
|
891
|
+
/** What `PointsEditor` shares with its parts. The fields are getters. */
|
|
892
|
+
interface PointsEditorContextValue {
|
|
893
|
+
readonly disabled: boolean;
|
|
894
|
+
readonly readonly: boolean;
|
|
895
|
+
readonly wheel: ModifierValue<InputEventOption> | null;
|
|
896
|
+
readonly keyboard: ModifierValue<InputEventOption> | null;
|
|
897
|
+
readonly dragSensitivity: ModifierValue<number>;
|
|
898
|
+
readonly cursor: string;
|
|
899
|
+
readonly selectable: boolean;
|
|
900
|
+
/** Ids of the selected points. Always empty while `selectable` is off. */
|
|
901
|
+
readonly selection: readonly string[];
|
|
902
|
+
/** The selection box, while one is being dragged. */
|
|
903
|
+
readonly selectionBox: SelectionBoxRect | null;
|
|
904
|
+
/** The element points are placed in and measured against. */
|
|
905
|
+
readonly container: HTMLElement | null;
|
|
906
|
+
/** The selection and the moves, from `createPointsEditor` in `@tremolo-ui/dom`. */
|
|
907
|
+
readonly editor: PointsEditorInstance;
|
|
908
|
+
/** @internal `PointsEditorContainer` registers its element. */
|
|
909
|
+
setContainer: (element: HTMLElement | null) => void;
|
|
910
|
+
}
|
|
911
|
+
/** The context of the enclosing `PointsEditor`, for a part of your own. */
|
|
912
|
+
export declare function usePointsEditorContext(): PointsEditorContextValue;
|
|
913
|
+
//#endregion
|
|
914
|
+
//#region src/components/PointsEditor/PointsEditor.d.ts
|
|
915
|
+
/**
|
|
916
|
+
* Multiple point controller. Bind the selection with `v-model:selection` to
|
|
917
|
+
* hold it yourself; the editor keeps its own otherwise.
|
|
918
|
+
*/
|
|
919
|
+
export declare const PointsEditor: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
920
|
+
/** Make the points unchangeable and remove them from the tab order. */
|
|
921
|
+
disabled: BooleanConstructor;
|
|
922
|
+
/** Make the points unmovable. */
|
|
923
|
+
readonly: BooleanConstructor;
|
|
924
|
+
/** The cursor to show while dragging a point. @default { cursor: 'grabbing' } */
|
|
925
|
+
externalStyles: PropType<{
|
|
926
|
+
cursor?: string;
|
|
927
|
+
}>;
|
|
928
|
+
/** How much one wheel notch moves the focused point. */
|
|
929
|
+
wheel: {
|
|
930
|
+
type: PropType<ModifierValue<InputEventOption> | null>;
|
|
931
|
+
default: () => ModifierValue<InputEventOption>;
|
|
932
|
+
};
|
|
933
|
+
/** How much one arrow key press moves a point. */
|
|
934
|
+
keyboard: {
|
|
935
|
+
type: PropType<ModifierValue<InputEventOption> | null>;
|
|
936
|
+
default: () => ModifierValue<InputEventOption>;
|
|
937
|
+
};
|
|
938
|
+
/** How much a drag moves a point, per modifier key. */
|
|
939
|
+
dragSensitivity: {
|
|
940
|
+
type: PropType<ModifierValue<number>>;
|
|
941
|
+
default: () => ModifierValue<number>;
|
|
942
|
+
};
|
|
943
|
+
/**
|
|
944
|
+
* Let points be selected, and a selection be moved as one. A selection
|
|
945
|
+
* updates several points in the same tick.
|
|
946
|
+
*/
|
|
947
|
+
selectable: BooleanConstructor;
|
|
948
|
+
/** Ids of the selected points. Bind it with `v-model:selection`. */
|
|
949
|
+
selection: PropType<string[]>;
|
|
950
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
951
|
+
[key: string]: any;
|
|
952
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
953
|
+
'update:selection': (selection: string[]) => boolean;
|
|
954
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
955
|
+
/** Make the points unchangeable and remove them from the tab order. */
|
|
956
|
+
disabled: BooleanConstructor;
|
|
957
|
+
/** Make the points unmovable. */
|
|
958
|
+
readonly: BooleanConstructor;
|
|
959
|
+
/** The cursor to show while dragging a point. @default { cursor: 'grabbing' } */
|
|
960
|
+
externalStyles: PropType<{
|
|
961
|
+
cursor?: string;
|
|
962
|
+
}>;
|
|
963
|
+
/** How much one wheel notch moves the focused point. */
|
|
964
|
+
wheel: {
|
|
965
|
+
type: PropType<ModifierValue<InputEventOption> | null>;
|
|
966
|
+
default: () => ModifierValue<InputEventOption>;
|
|
967
|
+
};
|
|
968
|
+
/** How much one arrow key press moves a point. */
|
|
969
|
+
keyboard: {
|
|
970
|
+
type: PropType<ModifierValue<InputEventOption> | null>;
|
|
971
|
+
default: () => ModifierValue<InputEventOption>;
|
|
972
|
+
};
|
|
973
|
+
/** How much a drag moves a point, per modifier key. */
|
|
974
|
+
dragSensitivity: {
|
|
975
|
+
type: PropType<ModifierValue<number>>;
|
|
976
|
+
default: () => ModifierValue<number>;
|
|
977
|
+
};
|
|
978
|
+
/**
|
|
979
|
+
* Let points be selected, and a selection be moved as one. A selection
|
|
980
|
+
* updates several points in the same tick.
|
|
981
|
+
*/
|
|
982
|
+
selectable: BooleanConstructor;
|
|
983
|
+
/** Ids of the selected points. Bind it with `v-model:selection`. */
|
|
984
|
+
selection: PropType<string[]>;
|
|
985
|
+
}>> & Readonly<{
|
|
986
|
+
"onUpdate:selection"?: ((selection: string[]) => any) | undefined;
|
|
987
|
+
}>, {
|
|
988
|
+
wheel: ModifierValue<InputEventOption> | null;
|
|
989
|
+
disabled: boolean;
|
|
990
|
+
keyboard: ModifierValue<InputEventOption> | null;
|
|
991
|
+
dragSensitivity: ModifierValue<number>;
|
|
992
|
+
readonly: boolean;
|
|
993
|
+
selectable: boolean;
|
|
994
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
995
|
+
//#endregion
|
|
996
|
+
//#region src/components/PointsEditor/PointsEditorBackground.d.ts
|
|
997
|
+
/**
|
|
998
|
+
* Behind the points, filling the editor. The order of the layers holds
|
|
999
|
+
* whichever way they are written, so the z-index is part of the mechanics.
|
|
1000
|
+
*/
|
|
1001
|
+
export declare const PointsEditorBackground: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
1002
|
+
[key: string]: any;
|
|
1003
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
1004
|
+
//#endregion
|
|
1005
|
+
//#region src/components/PointsEditor/PointsEditorContainer.d.ts
|
|
1006
|
+
/** The layer the points are placed in, over the background. */
|
|
1007
|
+
export declare const PointsEditorContainer: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
1008
|
+
[key: string]: any;
|
|
1009
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
1010
|
+
//#endregion
|
|
1011
|
+
//#region src/components/PointsEditor/PointsEditorPoint.d.ts
|
|
1012
|
+
type PerAxis$1 = string | Partial<Record<'x' | 'y', string>>;
|
|
1013
|
+
/** One point, bound with `v-model` as `{ x, y }` from 0 to 1. */
|
|
1014
|
+
export declare const PointsEditorPoint: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
1015
|
+
/** Where the point is, with `y` growing downwards. Bind it with `v-model`. */
|
|
1016
|
+
modelValue: {
|
|
1017
|
+
type: PropType<PointPosition>;
|
|
1018
|
+
required: true;
|
|
1019
|
+
};
|
|
1020
|
+
/** How the selection refers to this point. One is generated when left out. */
|
|
1021
|
+
id: StringConstructor;
|
|
1022
|
+
/** The lowest position the point can take, per axis. */
|
|
1023
|
+
min: PropType<Partial<PointPosition>>;
|
|
1024
|
+
/** The highest position the point can take, per axis. */
|
|
1025
|
+
max: PropType<Partial<PointPosition>>;
|
|
1026
|
+
/** Sets `--color`, for the theme to colour the point with. */
|
|
1027
|
+
color: StringConstructor;
|
|
1028
|
+
/** Overrides the `disabled` of `PointsEditor`. */
|
|
1029
|
+
disabled: {
|
|
1030
|
+
type: BooleanConstructor;
|
|
1031
|
+
default: undefined;
|
|
1032
|
+
};
|
|
1033
|
+
/** Overrides the `readonly` of `PointsEditor`. */
|
|
1034
|
+
readonly: {
|
|
1035
|
+
type: BooleanConstructor;
|
|
1036
|
+
default: undefined;
|
|
1037
|
+
};
|
|
1038
|
+
/** Overrides the `wheel` of `PointsEditor`; `null` turns it off. */
|
|
1039
|
+
wheel: {
|
|
1040
|
+
type: PropType<ModifierValue<InputEventOption> | null>;
|
|
1041
|
+
default: undefined;
|
|
1042
|
+
};
|
|
1043
|
+
/** Overrides the `keyboard` of `PointsEditor`; `null` turns it off. */
|
|
1044
|
+
keyboard: {
|
|
1045
|
+
type: PropType<ModifierValue<InputEventOption> | null>;
|
|
1046
|
+
default: undefined;
|
|
1047
|
+
};
|
|
1048
|
+
/** The accessible name of each axis, or one for both. */
|
|
1049
|
+
ariaLabel: PropType<PerAxis$1>;
|
|
1050
|
+
/** What the value of each axis means, or one for both. */
|
|
1051
|
+
ariaValuetext: PropType<PerAxis$1>;
|
|
1052
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
1053
|
+
[key: string]: any;
|
|
1054
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
1055
|
+
'update:modelValue': (value: PointPosition) => boolean;
|
|
1056
|
+
dragStart: (value: PointPosition) => boolean;
|
|
1057
|
+
dragEnd: (value: PointPosition) => boolean;
|
|
1058
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1059
|
+
/** Where the point is, with `y` growing downwards. Bind it with `v-model`. */
|
|
1060
|
+
modelValue: {
|
|
1061
|
+
type: PropType<PointPosition>;
|
|
1062
|
+
required: true;
|
|
1063
|
+
};
|
|
1064
|
+
/** How the selection refers to this point. One is generated when left out. */
|
|
1065
|
+
id: StringConstructor;
|
|
1066
|
+
/** The lowest position the point can take, per axis. */
|
|
1067
|
+
min: PropType<Partial<PointPosition>>;
|
|
1068
|
+
/** The highest position the point can take, per axis. */
|
|
1069
|
+
max: PropType<Partial<PointPosition>>;
|
|
1070
|
+
/** Sets `--color`, for the theme to colour the point with. */
|
|
1071
|
+
color: StringConstructor;
|
|
1072
|
+
/** Overrides the `disabled` of `PointsEditor`. */
|
|
1073
|
+
disabled: {
|
|
1074
|
+
type: BooleanConstructor;
|
|
1075
|
+
default: undefined;
|
|
1076
|
+
};
|
|
1077
|
+
/** Overrides the `readonly` of `PointsEditor`. */
|
|
1078
|
+
readonly: {
|
|
1079
|
+
type: BooleanConstructor;
|
|
1080
|
+
default: undefined;
|
|
1081
|
+
};
|
|
1082
|
+
/** Overrides the `wheel` of `PointsEditor`; `null` turns it off. */
|
|
1083
|
+
wheel: {
|
|
1084
|
+
type: PropType<ModifierValue<InputEventOption> | null>;
|
|
1085
|
+
default: undefined;
|
|
1086
|
+
};
|
|
1087
|
+
/** Overrides the `keyboard` of `PointsEditor`; `null` turns it off. */
|
|
1088
|
+
keyboard: {
|
|
1089
|
+
type: PropType<ModifierValue<InputEventOption> | null>;
|
|
1090
|
+
default: undefined;
|
|
1091
|
+
};
|
|
1092
|
+
/** The accessible name of each axis, or one for both. */
|
|
1093
|
+
ariaLabel: PropType<PerAxis$1>;
|
|
1094
|
+
/** What the value of each axis means, or one for both. */
|
|
1095
|
+
ariaValuetext: PropType<PerAxis$1>;
|
|
1096
|
+
}>> & Readonly<{
|
|
1097
|
+
"onUpdate:modelValue"?: ((value: PointPosition) => any) | undefined;
|
|
1098
|
+
onDragStart?: ((value: PointPosition) => any) | undefined;
|
|
1099
|
+
onDragEnd?: ((value: PointPosition) => any) | undefined;
|
|
1100
|
+
}>, {
|
|
1101
|
+
wheel: ModifierValue<InputEventOption> | null;
|
|
1102
|
+
disabled: boolean;
|
|
1103
|
+
keyboard: ModifierValue<InputEventOption> | null;
|
|
1104
|
+
readonly: boolean;
|
|
1105
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
1106
|
+
//#endregion
|
|
1107
|
+
//#region src/components/PointsEditor/PointsEditorSelectionBox.d.ts
|
|
1108
|
+
/**
|
|
1109
|
+
* The box a drag on empty space draws. Nothing is rendered while no drag is
|
|
1110
|
+
* running, and it takes none of the pointer.
|
|
1111
|
+
*/
|
|
1112
|
+
export declare const PointsEditorSelectionBox: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
1113
|
+
[key: string]: any;
|
|
1114
|
+
}> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
1115
|
+
//#endregion
|
|
1116
|
+
//#region src/components/Slider/context.d.ts
|
|
1117
|
+
/** What `Slider` shares with its parts. The fields are getters. */
|
|
1118
|
+
interface SliderContextValue {
|
|
1119
|
+
readonly value: number;
|
|
1120
|
+
readonly min: number;
|
|
1121
|
+
readonly max: number;
|
|
1122
|
+
readonly step: number;
|
|
1123
|
+
readonly scale: Scale;
|
|
1124
|
+
readonly vertical: boolean;
|
|
1125
|
+
readonly reverse: boolean;
|
|
1126
|
+
readonly disabled: boolean;
|
|
1127
|
+
readonly readonly: boolean;
|
|
1128
|
+
/** Where the value sits along the track, as a percentage from the top or left. */
|
|
1129
|
+
readonly percent: number;
|
|
1130
|
+
/** Set the value, as an input on the slider would. */
|
|
1131
|
+
change: (value: number) => void;
|
|
1132
|
+
/** @internal `SliderTrack` registers the element the pointer is measured against. */
|
|
1133
|
+
setTrack: (element: HTMLElement | null) => void;
|
|
1134
|
+
/** @internal `SliderThumb` registers the input the focus goes to. */
|
|
1135
|
+
setThumb: (input: HTMLInputElement | null) => void;
|
|
1136
|
+
}
|
|
1137
|
+
/** The context of the enclosing `Slider`, for a part of your own. */
|
|
1138
|
+
export declare function useSliderContext(): SliderContextValue;
|
|
1139
|
+
//#endregion
|
|
1140
|
+
//#region src/components/Slider/Slider.d.ts
|
|
1141
|
+
/** Customizable slider. Bind the value with `v-model`. */
|
|
1142
|
+
export declare const Slider: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
1143
|
+
/** The current value. Bind it with `v-model`. */
|
|
1144
|
+
modelValue: {
|
|
1145
|
+
type: NumberConstructor;
|
|
1146
|
+
required: true;
|
|
1147
|
+
};
|
|
1148
|
+
/** The value at the start of the travel. */
|
|
1149
|
+
min: {
|
|
1150
|
+
type: NumberConstructor;
|
|
1151
|
+
required: true;
|
|
1152
|
+
};
|
|
1153
|
+
/** The value at the end of the travel. */
|
|
1154
|
+
max: {
|
|
1155
|
+
type: NumberConstructor;
|
|
1156
|
+
required: true;
|
|
1157
|
+
};
|
|
1158
|
+
/** Granularity of the value. @default 1 */
|
|
1159
|
+
step: {
|
|
1160
|
+
type: NumberConstructor;
|
|
1161
|
+
default: number;
|
|
1162
|
+
};
|
|
1163
|
+
/** How the value is distributed across the travel. @default linearScale */
|
|
1164
|
+
scale: {
|
|
1165
|
+
type: PropType<Scale>;
|
|
1166
|
+
default: () => Scale;
|
|
1167
|
+
};
|
|
1168
|
+
/** Run the slider vertically, with the value growing upwards. */
|
|
1169
|
+
vertical: BooleanConstructor;
|
|
1170
|
+
/** Grow the value the other way. */
|
|
1171
|
+
reverse: BooleanConstructor;
|
|
1172
|
+
/** The cursor to show while dragging. @default { cursor: 'pointer' } */
|
|
1173
|
+
externalStyles: PropType<{
|
|
1174
|
+
cursor?: string;
|
|
1175
|
+
}>;
|
|
1176
|
+
wheel: {
|
|
1177
|
+
type: PropType<import("@tremolo-ui/dom").ModifierValue<import("@tremolo-ui/dom").InputEventOption> | null>;
|
|
1178
|
+
default: () => import("@tremolo-ui/dom").ModifierValue<import("@tremolo-ui/dom").InputEventOption>;
|
|
1179
|
+
};
|
|
1180
|
+
keyboard: {
|
|
1181
|
+
type: PropType<import("@tremolo-ui/dom").ModifierValue<import("@tremolo-ui/dom").InputEventOption> | null>;
|
|
1182
|
+
default: () => import("@tremolo-ui/dom").ModifierValue<import("@tremolo-ui/dom").InputEventOption>;
|
|
1183
|
+
};
|
|
1184
|
+
dragSensitivity: {
|
|
1185
|
+
type: PropType<import("@tremolo-ui/dom").ModifierValue<number>>;
|
|
1186
|
+
default: () => import("@tremolo-ui/dom").ModifierValue<number>;
|
|
1187
|
+
};
|
|
1188
|
+
/** Make the slider unchangeable and remove it from the tab order. */
|
|
1189
|
+
disabled: BooleanConstructor;
|
|
1190
|
+
/** Make the value unchangeable. */
|
|
1191
|
+
readonly: BooleanConstructor;
|
|
1192
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
1193
|
+
[key: string]: any;
|
|
1194
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
1195
|
+
'update:modelValue': (value: number) => boolean;
|
|
1196
|
+
/** A drag started, with the value where the track was pressed. */
|
|
1197
|
+
dragStart: (value: number) => boolean;
|
|
1198
|
+
/** The drag ended, with the value it ended on. */
|
|
1199
|
+
dragEnd: (value: number) => boolean;
|
|
1200
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1201
|
+
/** The current value. Bind it with `v-model`. */
|
|
1202
|
+
modelValue: {
|
|
1203
|
+
type: NumberConstructor;
|
|
1204
|
+
required: true;
|
|
1205
|
+
};
|
|
1206
|
+
/** The value at the start of the travel. */
|
|
1207
|
+
min: {
|
|
1208
|
+
type: NumberConstructor;
|
|
1209
|
+
required: true;
|
|
1210
|
+
};
|
|
1211
|
+
/** The value at the end of the travel. */
|
|
1212
|
+
max: {
|
|
1213
|
+
type: NumberConstructor;
|
|
1214
|
+
required: true;
|
|
1215
|
+
};
|
|
1216
|
+
/** Granularity of the value. @default 1 */
|
|
1217
|
+
step: {
|
|
1218
|
+
type: NumberConstructor;
|
|
1219
|
+
default: number;
|
|
1220
|
+
};
|
|
1221
|
+
/** How the value is distributed across the travel. @default linearScale */
|
|
1222
|
+
scale: {
|
|
1223
|
+
type: PropType<Scale>;
|
|
1224
|
+
default: () => Scale;
|
|
1225
|
+
};
|
|
1226
|
+
/** Run the slider vertically, with the value growing upwards. */
|
|
1227
|
+
vertical: BooleanConstructor;
|
|
1228
|
+
/** Grow the value the other way. */
|
|
1229
|
+
reverse: BooleanConstructor;
|
|
1230
|
+
/** The cursor to show while dragging. @default { cursor: 'pointer' } */
|
|
1231
|
+
externalStyles: PropType<{
|
|
1232
|
+
cursor?: string;
|
|
1233
|
+
}>;
|
|
1234
|
+
wheel: {
|
|
1235
|
+
type: PropType<import("@tremolo-ui/dom").ModifierValue<import("@tremolo-ui/dom").InputEventOption> | null>;
|
|
1236
|
+
default: () => import("@tremolo-ui/dom").ModifierValue<import("@tremolo-ui/dom").InputEventOption>;
|
|
1237
|
+
};
|
|
1238
|
+
keyboard: {
|
|
1239
|
+
type: PropType<import("@tremolo-ui/dom").ModifierValue<import("@tremolo-ui/dom").InputEventOption> | null>;
|
|
1240
|
+
default: () => import("@tremolo-ui/dom").ModifierValue<import("@tremolo-ui/dom").InputEventOption>;
|
|
1241
|
+
};
|
|
1242
|
+
dragSensitivity: {
|
|
1243
|
+
type: PropType<import("@tremolo-ui/dom").ModifierValue<number>>;
|
|
1244
|
+
default: () => import("@tremolo-ui/dom").ModifierValue<number>;
|
|
1245
|
+
};
|
|
1246
|
+
/** Make the slider unchangeable and remove it from the tab order. */
|
|
1247
|
+
disabled: BooleanConstructor;
|
|
1248
|
+
/** Make the value unchangeable. */
|
|
1249
|
+
readonly: BooleanConstructor;
|
|
1250
|
+
}>> & Readonly<{
|
|
1251
|
+
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
1252
|
+
onDragStart?: ((value: number) => any) | undefined;
|
|
1253
|
+
onDragEnd?: ((value: number) => any) | undefined;
|
|
1254
|
+
}>, {
|
|
1255
|
+
reverse: boolean;
|
|
1256
|
+
wheel: import("@tremolo-ui/dom").ModifierValue<import("@tremolo-ui/dom").InputEventOption> | null;
|
|
1257
|
+
disabled: boolean;
|
|
1258
|
+
step: number;
|
|
1259
|
+
vertical: boolean;
|
|
1260
|
+
keyboard: import("@tremolo-ui/dom").ModifierValue<import("@tremolo-ui/dom").InputEventOption> | null;
|
|
1261
|
+
dragSensitivity: import("@tremolo-ui/dom").ModifierValue<number>;
|
|
1262
|
+
readonly: boolean;
|
|
1263
|
+
scale: Scale;
|
|
1264
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
1265
|
+
//#endregion
|
|
1266
|
+
//#region src/components/Slider/SliderMarks.d.ts
|
|
1267
|
+
/** The marks along the slider: written out as options, or built from `options`. */
|
|
1268
|
+
export declare const SliderMarks: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
1269
|
+
/** Space between the marks and the track. Sets `--gap`. */
|
|
1270
|
+
gap: (NumberConstructor | StringConstructor)[];
|
|
1271
|
+
/**
|
|
1272
|
+
* Build the marks instead of writing `SliderMarksOption` out: a number
|
|
1273
|
+
* puts one every that many, `'step'` one every `step`. The default slot
|
|
1274
|
+
* is ignored while it is set.
|
|
1275
|
+
*/
|
|
1276
|
+
options: PropType<MarksOptions>;
|
|
1277
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
1278
|
+
[key: string]: any;
|
|
1279
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1280
|
+
/** Space between the marks and the track. Sets `--gap`. */
|
|
1281
|
+
gap: (NumberConstructor | StringConstructor)[];
|
|
1282
|
+
/**
|
|
1283
|
+
* Build the marks instead of writing `SliderMarksOption` out: a number
|
|
1284
|
+
* puts one every that many, `'step'` one every `step`. The default slot
|
|
1285
|
+
* is ignored while it is set.
|
|
1286
|
+
*/
|
|
1287
|
+
options: PropType<MarksOptions>;
|
|
1288
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
1289
|
+
//#endregion
|
|
1290
|
+
//#region src/components/Slider/SliderMarksOption.d.ts
|
|
1291
|
+
/** One mark along the slider, and its label. */
|
|
1292
|
+
export declare const SliderMarksOption: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
1293
|
+
/** Where the mark sits, on the same scale as the thumb. */
|
|
1294
|
+
value: {
|
|
1295
|
+
type: NumberConstructor;
|
|
1296
|
+
required: true;
|
|
1297
|
+
};
|
|
1298
|
+
/** Draw the mark itself. @default true */
|
|
1299
|
+
mark: {
|
|
1300
|
+
type: BooleanConstructor;
|
|
1301
|
+
default: boolean;
|
|
1302
|
+
};
|
|
1303
|
+
/**
|
|
1304
|
+
* Text shown next to the mark. Leave it out to show the value; `null`
|
|
1305
|
+
* leaves the label out.
|
|
1306
|
+
*/
|
|
1307
|
+
label: {
|
|
1308
|
+
type: PropType<number | string | null>;
|
|
1309
|
+
default: undefined;
|
|
1310
|
+
};
|
|
1311
|
+
/** Thickness of the mark. Sets `--thickness`. */
|
|
1312
|
+
thickness: (NumberConstructor | StringConstructor)[];
|
|
1313
|
+
/** Length of the mark. Sets `--length`. */
|
|
1314
|
+
length: (NumberConstructor | StringConstructor)[];
|
|
1315
|
+
/** Space between the mark and the label. Sets `--gap`. */
|
|
1316
|
+
gap: (NumberConstructor | StringConstructor)[];
|
|
1317
|
+
/** Classes for the mark and the label inside the option. */
|
|
1318
|
+
classes: PropType<{
|
|
1319
|
+
mark?: string;
|
|
1320
|
+
label?: string;
|
|
1321
|
+
}>;
|
|
1322
|
+
/** Styles for the mark and the label inside the option. */
|
|
1323
|
+
styles: PropType<{
|
|
1324
|
+
mark?: string;
|
|
1325
|
+
label?: string;
|
|
1326
|
+
}>;
|
|
1327
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
1328
|
+
[key: string]: any;
|
|
1329
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1330
|
+
/** Where the mark sits, on the same scale as the thumb. */
|
|
1331
|
+
value: {
|
|
1332
|
+
type: NumberConstructor;
|
|
1333
|
+
required: true;
|
|
1334
|
+
};
|
|
1335
|
+
/** Draw the mark itself. @default true */
|
|
1336
|
+
mark: {
|
|
1337
|
+
type: BooleanConstructor;
|
|
1338
|
+
default: boolean;
|
|
1339
|
+
};
|
|
1340
|
+
/**
|
|
1341
|
+
* Text shown next to the mark. Leave it out to show the value; `null`
|
|
1342
|
+
* leaves the label out.
|
|
1343
|
+
*/
|
|
1344
|
+
label: {
|
|
1345
|
+
type: PropType<number | string | null>;
|
|
1346
|
+
default: undefined;
|
|
1347
|
+
};
|
|
1348
|
+
/** Thickness of the mark. Sets `--thickness`. */
|
|
1349
|
+
thickness: (NumberConstructor | StringConstructor)[];
|
|
1350
|
+
/** Length of the mark. Sets `--length`. */
|
|
1351
|
+
length: (NumberConstructor | StringConstructor)[];
|
|
1352
|
+
/** Space between the mark and the label. Sets `--gap`. */
|
|
1353
|
+
gap: (NumberConstructor | StringConstructor)[];
|
|
1354
|
+
/** Classes for the mark and the label inside the option. */
|
|
1355
|
+
classes: PropType<{
|
|
1356
|
+
mark?: string;
|
|
1357
|
+
label?: string;
|
|
1358
|
+
}>;
|
|
1359
|
+
/** Styles for the mark and the label inside the option. */
|
|
1360
|
+
styles: PropType<{
|
|
1361
|
+
mark?: string;
|
|
1362
|
+
label?: string;
|
|
1363
|
+
}>;
|
|
1364
|
+
}>> & Readonly<{}>, {
|
|
1365
|
+
label: string | number | null;
|
|
1366
|
+
mark: boolean;
|
|
1367
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
1368
|
+
//#endregion
|
|
1369
|
+
//#region src/components/Slider/SliderThumb.d.ts
|
|
1370
|
+
/**
|
|
1371
|
+
* The thumb, placed at the value. The ARIA (`aria-label` and friends) lands
|
|
1372
|
+
* on the range input inside it, which is the control and takes the focus.
|
|
1373
|
+
*/
|
|
1374
|
+
export declare const SliderThumb: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
1375
|
+
/** Sets `--color`, for the theme to colour the thumb with. */
|
|
1376
|
+
color: StringConstructor;
|
|
1377
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
1378
|
+
[key: string]: any;
|
|
1379
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1380
|
+
/** Sets `--color`, for the theme to colour the thumb with. */
|
|
1381
|
+
color: StringConstructor;
|
|
1382
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
1383
|
+
//#endregion
|
|
1384
|
+
//#region src/components/Slider/SliderTrack.d.ts
|
|
1385
|
+
/** The track the thumb runs along, and what the pointer is measured against. */
|
|
1386
|
+
export declare const SliderTrack: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
1387
|
+
/** How long the track is along the axis the slider runs. Sets `--length`. */
|
|
1388
|
+
length: (NumberConstructor | StringConstructor)[];
|
|
1389
|
+
/** How thick the track is across that axis. Sets `--thickness`. */
|
|
1390
|
+
thickness: (NumberConstructor | StringConstructor)[];
|
|
1391
|
+
/** Colour of the part from `min` to the value. Sets `--active`. */
|
|
1392
|
+
active: StringConstructor;
|
|
1393
|
+
/** Colour of the rest of the track. Sets `--inactive`. */
|
|
1394
|
+
inactive: StringConstructor;
|
|
1395
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
1396
|
+
[key: string]: any;
|
|
1397
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1398
|
+
/** How long the track is along the axis the slider runs. Sets `--length`. */
|
|
1399
|
+
length: (NumberConstructor | StringConstructor)[];
|
|
1400
|
+
/** How thick the track is across that axis. Sets `--thickness`. */
|
|
1401
|
+
thickness: (NumberConstructor | StringConstructor)[];
|
|
1402
|
+
/** Colour of the part from `min` to the value. Sets `--active`. */
|
|
1403
|
+
active: StringConstructor;
|
|
1404
|
+
/** Colour of the rest of the track. Sets `--inactive`. */
|
|
1405
|
+
inactive: StringConstructor;
|
|
1406
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
1407
|
+
//#endregion
|
|
1408
|
+
//#region src/components/XYPad/context.d.ts
|
|
1409
|
+
/** What `XYPad` shares with its parts. The fields are getters. */
|
|
1410
|
+
interface XYPadContextValue {
|
|
1411
|
+
readonly value: XY<number>;
|
|
1412
|
+
readonly min: XY<number>;
|
|
1413
|
+
readonly max: XY<number>;
|
|
1414
|
+
readonly step: XY<number>;
|
|
1415
|
+
readonly scale: XY<Scale>;
|
|
1416
|
+
readonly reverse: XY<boolean>;
|
|
1417
|
+
readonly disabled: boolean;
|
|
1418
|
+
readonly readonly: boolean;
|
|
1419
|
+
/** Where the value sits in the area, as percentages from the left and top. */
|
|
1420
|
+
readonly percent: XY<number>;
|
|
1421
|
+
/** Set the value, as an input on the pad would. */
|
|
1422
|
+
change: (value: XY<number>) => void;
|
|
1423
|
+
/** @internal `XYPadArea` registers the element the pointer is measured against. */
|
|
1424
|
+
setArea: (element: HTMLElement | null) => void;
|
|
1425
|
+
/** @internal `XYPadThumb` registers the input the focus goes to. */
|
|
1426
|
+
setThumb: (input: HTMLInputElement | null) => void;
|
|
1427
|
+
}
|
|
1428
|
+
/** The context of the enclosing `XYPad`, for a part of your own. */
|
|
1429
|
+
export declare function useXYPadContext(): XYPadContextValue;
|
|
1430
|
+
//#endregion
|
|
1431
|
+
//#region src/components/XYPad/XYPad.d.ts
|
|
1432
|
+
/**
|
|
1433
|
+
* Two-dimensional slider. The per-axis settings are `[x, y]` tuples, and a
|
|
1434
|
+
* plain value applies to both axes. Bind the value with `v-model`.
|
|
1435
|
+
*/
|
|
1436
|
+
export declare const XYPad: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
1437
|
+
/** The current value as `[x, y]`. Bind it with `v-model`. */
|
|
1438
|
+
modelValue: {
|
|
1439
|
+
type: PropType<XY<number>>;
|
|
1440
|
+
required: true;
|
|
1441
|
+
};
|
|
1442
|
+
/** The value at the start of the travel, per axis. */
|
|
1443
|
+
min: {
|
|
1444
|
+
type: PropType<XYInput<number>>;
|
|
1445
|
+
required: true;
|
|
1446
|
+
};
|
|
1447
|
+
/** The value at the end of the travel, per axis. */
|
|
1448
|
+
max: {
|
|
1449
|
+
type: PropType<XYInput<number>>;
|
|
1450
|
+
required: true;
|
|
1451
|
+
};
|
|
1452
|
+
/** Granularity of the value, per axis. @default 1 */
|
|
1453
|
+
step: {
|
|
1454
|
+
type: PropType<XYInput<number>>;
|
|
1455
|
+
default: number;
|
|
1456
|
+
};
|
|
1457
|
+
/** How the value is distributed, per axis. @default linearScale */
|
|
1458
|
+
scale: {
|
|
1459
|
+
type: PropType<XYInput<Scale>>;
|
|
1460
|
+
default: () => Scale;
|
|
1461
|
+
};
|
|
1462
|
+
/** Grow the value the other way, per axis. `y` grows downwards unless reversed. */
|
|
1463
|
+
reverse: {
|
|
1464
|
+
type: PropType<XYInput<boolean>>;
|
|
1465
|
+
default: boolean;
|
|
1466
|
+
};
|
|
1467
|
+
/** The cursor to show while dragging. @default { cursor: 'pointer' } */
|
|
1468
|
+
externalStyles: PropType<{
|
|
1469
|
+
cursor?: string;
|
|
1470
|
+
}>;
|
|
1471
|
+
wheel: {
|
|
1472
|
+
type: PropType<ModifierValue<InputEventOption> | null>;
|
|
1473
|
+
default: () => ModifierValue<InputEventOption>;
|
|
1474
|
+
};
|
|
1475
|
+
keyboard: {
|
|
1476
|
+
type: PropType<ModifierValue<InputEventOption> | null>;
|
|
1477
|
+
default: () => ModifierValue<InputEventOption>;
|
|
1478
|
+
};
|
|
1479
|
+
dragSensitivity: {
|
|
1480
|
+
type: PropType<ModifierValue<number>>;
|
|
1481
|
+
default: () => ModifierValue<number>;
|
|
1482
|
+
};
|
|
1483
|
+
/** Make the pad unchangeable and remove it from the tab order. */
|
|
1484
|
+
disabled: BooleanConstructor;
|
|
1485
|
+
/** Make the value unchangeable. */
|
|
1486
|
+
readonly: BooleanConstructor;
|
|
1487
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
1488
|
+
[key: string]: any;
|
|
1489
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
1490
|
+
'update:modelValue': (value: XY<number>) => boolean;
|
|
1491
|
+
dragStart: (value: XY<number>) => boolean;
|
|
1492
|
+
dragEnd: (value: XY<number>) => boolean;
|
|
1493
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1494
|
+
/** The current value as `[x, y]`. Bind it with `v-model`. */
|
|
1495
|
+
modelValue: {
|
|
1496
|
+
type: PropType<XY<number>>;
|
|
1497
|
+
required: true;
|
|
1498
|
+
};
|
|
1499
|
+
/** The value at the start of the travel, per axis. */
|
|
1500
|
+
min: {
|
|
1501
|
+
type: PropType<XYInput<number>>;
|
|
1502
|
+
required: true;
|
|
1503
|
+
};
|
|
1504
|
+
/** The value at the end of the travel, per axis. */
|
|
1505
|
+
max: {
|
|
1506
|
+
type: PropType<XYInput<number>>;
|
|
1507
|
+
required: true;
|
|
1508
|
+
};
|
|
1509
|
+
/** Granularity of the value, per axis. @default 1 */
|
|
1510
|
+
step: {
|
|
1511
|
+
type: PropType<XYInput<number>>;
|
|
1512
|
+
default: number;
|
|
1513
|
+
};
|
|
1514
|
+
/** How the value is distributed, per axis. @default linearScale */
|
|
1515
|
+
scale: {
|
|
1516
|
+
type: PropType<XYInput<Scale>>;
|
|
1517
|
+
default: () => Scale;
|
|
1518
|
+
};
|
|
1519
|
+
/** Grow the value the other way, per axis. `y` grows downwards unless reversed. */
|
|
1520
|
+
reverse: {
|
|
1521
|
+
type: PropType<XYInput<boolean>>;
|
|
1522
|
+
default: boolean;
|
|
1523
|
+
};
|
|
1524
|
+
/** The cursor to show while dragging. @default { cursor: 'pointer' } */
|
|
1525
|
+
externalStyles: PropType<{
|
|
1526
|
+
cursor?: string;
|
|
1527
|
+
}>;
|
|
1528
|
+
wheel: {
|
|
1529
|
+
type: PropType<ModifierValue<InputEventOption> | null>;
|
|
1530
|
+
default: () => ModifierValue<InputEventOption>;
|
|
1531
|
+
};
|
|
1532
|
+
keyboard: {
|
|
1533
|
+
type: PropType<ModifierValue<InputEventOption> | null>;
|
|
1534
|
+
default: () => ModifierValue<InputEventOption>;
|
|
1535
|
+
};
|
|
1536
|
+
dragSensitivity: {
|
|
1537
|
+
type: PropType<ModifierValue<number>>;
|
|
1538
|
+
default: () => ModifierValue<number>;
|
|
1539
|
+
};
|
|
1540
|
+
/** Make the pad unchangeable and remove it from the tab order. */
|
|
1541
|
+
disabled: BooleanConstructor;
|
|
1542
|
+
/** Make the value unchangeable. */
|
|
1543
|
+
readonly: BooleanConstructor;
|
|
1544
|
+
}>> & Readonly<{
|
|
1545
|
+
"onUpdate:modelValue"?: ((value: XY<number>) => any) | undefined;
|
|
1546
|
+
onDragStart?: ((value: XY<number>) => any) | undefined;
|
|
1547
|
+
onDragEnd?: ((value: XY<number>) => any) | undefined;
|
|
1548
|
+
}>, {
|
|
1549
|
+
reverse: boolean | readonly [x: boolean, y: boolean];
|
|
1550
|
+
wheel: ModifierValue<InputEventOption> | null;
|
|
1551
|
+
disabled: boolean;
|
|
1552
|
+
step: number | readonly [x: number, y: number];
|
|
1553
|
+
keyboard: ModifierValue<InputEventOption> | null;
|
|
1554
|
+
dragSensitivity: ModifierValue<number>;
|
|
1555
|
+
readonly: boolean;
|
|
1556
|
+
scale: Scale | readonly [x: Scale, y: Scale];
|
|
1557
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
1558
|
+
//#endregion
|
|
1559
|
+
//#region src/components/XYPad/XYPadArea.d.ts
|
|
1560
|
+
/** The area the thumb moves in, and what the pointer is measured against. */
|
|
1561
|
+
export declare const XYPadArea: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
1562
|
+
[key: string]: any;
|
|
1563
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
1564
|
+
//#endregion
|
|
1565
|
+
//#region src/components/XYPad/XYPadThumb.d.ts
|
|
1566
|
+
type PerAxis = XYInput<string | undefined>;
|
|
1567
|
+
/** The thumb, placed at the value, with one range input per axis inside. */
|
|
1568
|
+
export declare const XYPadThumb: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
1569
|
+
/** Sets `--color`, for the theme to colour the thumb with. */
|
|
1570
|
+
color: StringConstructor;
|
|
1571
|
+
/** The accessible name of each axis, as `[x, y]`. */
|
|
1572
|
+
ariaLabel: PropType<PerAxis>;
|
|
1573
|
+
/** The ids of what labels each axis, as `[x, y]` or one for both. */
|
|
1574
|
+
ariaLabelledby: PropType<PerAxis>;
|
|
1575
|
+
/** The ids of what describes each axis, as `[x, y]` or one for both. */
|
|
1576
|
+
ariaDescribedby: PropType<PerAxis>;
|
|
1577
|
+
/** What the value of each axis means, as `[x, y]` or one for both. */
|
|
1578
|
+
ariaValuetext: PropType<PerAxis>;
|
|
1579
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
1580
|
+
[key: string]: any;
|
|
1581
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1582
|
+
/** Sets `--color`, for the theme to colour the thumb with. */
|
|
1583
|
+
color: StringConstructor;
|
|
1584
|
+
/** The accessible name of each axis, as `[x, y]`. */
|
|
1585
|
+
ariaLabel: PropType<PerAxis>;
|
|
1586
|
+
/** The ids of what labels each axis, as `[x, y]` or one for both. */
|
|
1587
|
+
ariaLabelledby: PropType<PerAxis>;
|
|
1588
|
+
/** The ids of what describes each axis, as `[x, y]` or one for both. */
|
|
1589
|
+
ariaDescribedby: PropType<PerAxis>;
|
|
1590
|
+
/** What the value of each axis means, as `[x, y]` or one for both. */
|
|
1591
|
+
ariaValuetext: PropType<PerAxis>;
|
|
1592
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
1593
|
+
//#endregion
|
|
1594
|
+
//#region src/composables/useDrag.d.ts
|
|
1595
|
+
/**
|
|
1596
|
+
* Track a pointer drag on an element. See `createDrag` in `@tremolo-ui/dom`
|
|
1597
|
+
* for the options.
|
|
1598
|
+
*
|
|
1599
|
+
* @example
|
|
1600
|
+
* const el = useTemplateRef('el')
|
|
1601
|
+
* useDrag(el, { onDrag: (state) => (x.value += state.deltaX) })
|
|
1602
|
+
*/
|
|
1603
|
+
export declare function useDrag(target: MaybeRefOrGetter<Element | null | undefined>, options?: MaybeRefOrGetter<DragOptions>): void;
|
|
1604
|
+
//#endregion
|
|
1605
|
+
//#region src/composables/useDragValue.d.ts
|
|
1606
|
+
/**
|
|
1607
|
+
* Drive a value with a pointer drag. See `createDragValue` in
|
|
1608
|
+
* `@tremolo-ui/dom` for the options; `elementMapping` and `relativeMapping`
|
|
1609
|
+
* from there choose how the pointer becomes a value. `mapping` is read when
|
|
1610
|
+
* the element is attached.
|
|
1611
|
+
*/
|
|
1612
|
+
export declare function useDragValue(target: MaybeRefOrGetter<Element | null | undefined>, options: MaybeRefOrGetter<DragValueOptions>): void;
|
|
1613
|
+
//#endregion
|
|
1614
|
+
//#region src/composables/useDropZone.d.ts
|
|
1615
|
+
/**
|
|
1616
|
+
* Take files dropped on an element. See `createDropZone` in
|
|
1617
|
+
* `@tremolo-ui/dom`. Returns whether files are over it, and whether they
|
|
1618
|
+
* would be refused, for styling it while they are.
|
|
1619
|
+
*/
|
|
1620
|
+
export declare function useDropZone(target: MaybeRefOrGetter<Element | null | undefined>, options?: MaybeRefOrGetter<DropZoneOptions>): import("vue").ShallowRef<DropZoneState, DropZoneState>;
|
|
1621
|
+
//#endregion
|
|
1622
|
+
//#region src/composables/useLongPress.d.ts
|
|
1623
|
+
/**
|
|
1624
|
+
* Repeat `onPress` while a pointer is held down: once on the press, then
|
|
1625
|
+
* every `interval` after `delay`. See `createLongPress` in `@tremolo-ui/dom`.
|
|
1626
|
+
*
|
|
1627
|
+
* Returns the function that starts a press, for `@pointerdown`.
|
|
1628
|
+
*/
|
|
1629
|
+
export declare function useLongPress(options: MaybeRefOrGetter<LongPressOptions>): (event?: Pick<PointerEvent, "button" | "pointerId">) => void;
|
|
1630
|
+
//#endregion
|
|
1631
|
+
//#region src/composables/useMIDIAccess.d.ts
|
|
1632
|
+
/**
|
|
1633
|
+
* Request MIDI access in the browser. Call it during `setup`.
|
|
1634
|
+
*
|
|
1635
|
+
* `state` holds the access, the error and the connected inputs, and follows
|
|
1636
|
+
* devices as they are plugged in and unplugged.
|
|
1637
|
+
*
|
|
1638
|
+
* @param requestOnMount ask for access once the component is mounted — never
|
|
1639
|
+
* during server rendering, where there is no MIDI to ask for. Leave it off to
|
|
1640
|
+
* ask from a click instead, so that opening a page does not bring up a
|
|
1641
|
+
* permission prompt. A ref or a getter asks once it turns true.
|
|
1642
|
+
*/
|
|
1643
|
+
export declare function useMIDIAccess(requestOnMount?: MaybeRefOrGetter<boolean>): {
|
|
1644
|
+
state: import("vue").ComputedRef<MIDIAccessState>;
|
|
1645
|
+
/**
|
|
1646
|
+
* Ask for access. Takes `{ sysex: true }` when the app needs system
|
|
1647
|
+
* exclusive messages, which browsers treat as a separate permission.
|
|
1648
|
+
*/
|
|
1649
|
+
request: (options?: MIDIAccessOptions) => void;
|
|
1650
|
+
};
|
|
1651
|
+
//#endregion
|
|
1652
|
+
//#region src/composables/useMIDIInput.d.ts
|
|
1653
|
+
/**
|
|
1654
|
+
* Handle the channel voice messages of every connected input. Call it during
|
|
1655
|
+
* `setup`. See `createMIDIInput` in `@tremolo-ui/dom` for the handlers.
|
|
1656
|
+
*
|
|
1657
|
+
* The listeners follow `midiAccess` as it is granted, and new handlers
|
|
1658
|
+
* replace the old ones without re-subscribing.
|
|
1659
|
+
*/
|
|
1660
|
+
export declare function useMIDIInput(midiAccess: MaybeRefOrGetter<MIDIAccess | null>, handlers: MaybeRefOrGetter<MIDIInputHandlers>): void;
|
|
1661
|
+
//#endregion
|
|
1662
|
+
//#region src/composables/useMIDIMessage.d.ts
|
|
1663
|
+
/**
|
|
1664
|
+
* Listen to raw `midimessage` events on every input. Call it during `setup`.
|
|
1665
|
+
* For note and controller events, `useMIDIInput` decodes the message for you.
|
|
1666
|
+
*/
|
|
1667
|
+
export declare function useMIDIMessage(midiAccess: MaybeRefOrGetter<MIDIAccess | null>, onMIDIMessage: MaybeRefOrGetter<(event: MIDIMessageEvent) => void>): void;
|
|
1668
|
+
//#endregion
|
|
1669
|
+
//#region src/composables/useWheel.d.ts
|
|
1670
|
+
/**
|
|
1671
|
+
* Listen to the wheel on an element, as a non-passive listener so that
|
|
1672
|
+
* `preventDefault()` can keep the page from scrolling. See `createWheel` in
|
|
1673
|
+
* `@tremolo-ui/dom`.
|
|
1674
|
+
*/
|
|
1675
|
+
export declare function useWheel(target: MaybeRefOrGetter<Element | null | undefined>, onWheel: (event: WheelEvent) => void, options?: MaybeRefOrGetter<WheelOptions>): void;
|
|
1676
|
+
//#endregion
|
|
1677
|
+
export type { DrawFunction, FileInputContextValue, InitFunction, KeyAttributes, KeyState, KnobContextValue, NumberInputContextValue, PointsEditorContextValue, SliderContextValue, XYPadContextValue };
|
|
1678
|
+
//# sourceMappingURL=index.d.cts.map
|