@blibliki/engine 0.4.0 → 0.4.2
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blibliki/engine",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -15,15 +15,15 @@
|
|
|
15
15
|
"dist"
|
|
16
16
|
],
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@types/audioworklet": "
|
|
18
|
+
"@types/audioworklet": "0.0.92",
|
|
19
19
|
"vite-tsconfig-paths": "^5.1.4",
|
|
20
|
-
"vitest": "
|
|
20
|
+
"vitest": "4.0.15"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@julusian/midi": "^3.6.1",
|
|
24
24
|
"es-toolkit": "^1.41.0",
|
|
25
|
-
"@blibliki/transport": "^0.4.
|
|
26
|
-
"@blibliki/utils": "^0.4.
|
|
25
|
+
"@blibliki/transport": "^0.4.2",
|
|
26
|
+
"@blibliki/utils": "^0.4.2"
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
29
|
"build": "tsup",
|
|
@@ -81,7 +81,7 @@ class WebMidiAccess implements IMidiAccess {
|
|
|
81
81
|
): void {
|
|
82
82
|
this.midiAccess.addEventListener(event, (e) => {
|
|
83
83
|
const port = e.port;
|
|
84
|
-
if (
|
|
84
|
+
if (port?.type !== "input") return;
|
|
85
85
|
|
|
86
86
|
const input = port as MIDIInput;
|
|
87
87
|
if (!this.portCache.has(input.id)) {
|
|
@@ -33,9 +33,9 @@ export type IPolyModuleConstructor<T extends ModuleType> = Optional<
|
|
|
33
33
|
) => Module<T>;
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
export abstract class PolyModule<
|
|
37
|
-
|
|
38
|
-
{
|
|
36
|
+
export abstract class PolyModule<
|
|
37
|
+
T extends ModuleType,
|
|
38
|
+
> implements IPolyModule<T> {
|
|
39
39
|
id: string;
|
|
40
40
|
engineId: string;
|
|
41
41
|
moduleType: T;
|
|
@@ -72,6 +72,7 @@ export abstract class PolyModule<T extends ModuleType>
|
|
|
72
72
|
queueMicrotask(() => {
|
|
73
73
|
this.voices = voices || 1;
|
|
74
74
|
this.props = props;
|
|
75
|
+
this.triggerPropsUpdate();
|
|
75
76
|
});
|
|
76
77
|
}
|
|
77
78
|
|
|
@@ -67,7 +67,10 @@ export default class MidiSelector
|
|
|
67
67
|
const midiDevice = this.engine.findMidiDevice(value);
|
|
68
68
|
if (!midiDevice) return value;
|
|
69
69
|
|
|
70
|
-
this.props
|
|
70
|
+
if (this.props.selectedName !== midiDevice.name) {
|
|
71
|
+
this.props = { selectedName: midiDevice.name };
|
|
72
|
+
this.triggerPropsUpdate();
|
|
73
|
+
}
|
|
71
74
|
this.addEventListener(midiDevice);
|
|
72
75
|
|
|
73
76
|
return value;
|