midiwire 0.11.3 → 0.13.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/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/midiwire.es.js +1297 -1429
- package/dist/midiwire.umd.js +1 -1
- package/package.json +6 -6
- package/src/index.js +27 -0
- package/src/index.test.js +214 -0
package/dist/index.d.ts
CHANGED
|
@@ -230,6 +230,30 @@ export function createMIDIDeviceManager(options?: MIDIDeviceManagerOptions): Pro
|
|
|
230
230
|
* });
|
|
231
231
|
*/
|
|
232
232
|
export function createMIDIController(options?: MIDIControlsOptions): Promise<MIDIController>;
|
|
233
|
+
/**
|
|
234
|
+
* Check if the browser supports the Web MIDI API.
|
|
235
|
+
* Returns true if `navigator.requestMIDIAccess` is available.
|
|
236
|
+
*
|
|
237
|
+
* @returns {boolean} True if Web MIDI is supported, false otherwise
|
|
238
|
+
*
|
|
239
|
+
* @example
|
|
240
|
+
* // Check before initializing
|
|
241
|
+
* if (isMIDISupported()) {
|
|
242
|
+
* const midi = await createMIDIController()
|
|
243
|
+
* } else {
|
|
244
|
+
* alert("Please use Chrome, Edge, or Opera for Web MIDI support")
|
|
245
|
+
* }
|
|
246
|
+
*
|
|
247
|
+
* @example
|
|
248
|
+
* // Conditional UI rendering
|
|
249
|
+
* const midiSection = document.getElementById("midi-controls")
|
|
250
|
+
* if (isMIDISupported()) {
|
|
251
|
+
* midiSection.style.display = "block"
|
|
252
|
+
* } else {
|
|
253
|
+
* midiSection.innerHTML = "<p>MIDI not supported in this browser</p>"
|
|
254
|
+
* }
|
|
255
|
+
*/
|
|
256
|
+
export function isMIDISupported(): boolean;
|
|
233
257
|
export { DataAttributeBinder } from './bindings/DataAttributeBinder.js';
|
|
234
258
|
export { EventEmitter } from './core/EventEmitter.js';
|
|
235
259
|
export { MIDIDeviceManager } from './core/MIDIDeviceManager.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":"AAwEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6EG;AACH,kDAzEW,wBAAwB,GACtB,OAAO,CAAC,iBAAiB,CAAC,CA0HtC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,+CAnDW,mBAAmB,GACjB,OAAO,CAAC,cAAc,CAAC,CAoEnC;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":"AAwEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6EG;AACH,kDAzEW,wBAAwB,GACtB,OAAO,CAAC,iBAAiB,CAAC,CA0HtC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,+CAnDW,mBAAmB,GACjB,OAAO,CAAC,cAAc,CAAC,CAoEnC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,mCAnBa,OAAO,CAqBnB;;;;;;;;;;;;;;;;;;;;;;mBAlUa,MAAM;;;;oBACN,MAAM;;;;aACN,MAAM,GAAC,MAAM;;;;YACb,OAAO;;;;;;;;;;;;eAGP,MAAM;;;;eACN,OAAO;;;;YACP,MAAM,GAAC,MAAM;;;;;;;;;eAgLb,MAAM;;;;mBACN,MAAM;;;;oBACN,MAAM;;;;aACN,MAAM,GAAC,MAAM;;;;YACb,OAAO;;;;kBACP,OAAO;;;;eACP,OAAO;;;;;;;;;;;;YAGP,MAAM,GAAC,MAAM;;kCAxMO,6BAA6B;+BADhC,0BAA0B"}
|