expo-juce 0.3.2 → 0.3.3
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/build/index.d.ts +19 -19
- package/build/index.d.ts.map +1 -1
- package/build/index.js +37 -35
- package/build/index.js.map +1 -1
- package/ios/ExpoJuceModule.swift +52 -47
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -3,25 +3,25 @@ import ExpoJuceView from './ExpoJuceView';
|
|
|
3
3
|
import { ChangeEventPayload, BeatEventPayload, ExpoJuceViewProps } from './ExpoJuce.types';
|
|
4
4
|
export declare function setup(): Promise<void>;
|
|
5
5
|
export declare function shutdown(): Promise<void>;
|
|
6
|
-
export declare function noteOn(note: number, velocity: number):
|
|
7
|
-
export declare function noteOff(note: number):
|
|
8
|
-
export declare function allNotesOff():
|
|
9
|
-
export declare function setWaveform(waveform: 'sine' | 'square' | 'saw' | 'triangle'):
|
|
10
|
-
export declare function setFilterCutoff(hz: number):
|
|
11
|
-
export declare function setFilterResonance(q: number):
|
|
12
|
-
export declare function setAttack(ms: number):
|
|
13
|
-
export declare function setDecay(ms: number):
|
|
14
|
-
export declare function setSustain(level: number):
|
|
15
|
-
export declare function setRelease(ms: number):
|
|
16
|
-
export declare function setDetune(cents: number):
|
|
17
|
-
export declare function setMasterLevel(level: number):
|
|
18
|
-
export declare function startTransport():
|
|
19
|
-
export declare function stopTransport():
|
|
20
|
-
export declare function setTempo(bpm: number):
|
|
21
|
-
export declare function setTransportPosition(beat: number):
|
|
22
|
-
export declare function getTransportPosition():
|
|
23
|
-
export declare function getTempo():
|
|
24
|
-
export declare function isTransportPlaying():
|
|
6
|
+
export declare function noteOn(note: number, velocity: number): void;
|
|
7
|
+
export declare function noteOff(note: number): void;
|
|
8
|
+
export declare function allNotesOff(): void;
|
|
9
|
+
export declare function setWaveform(waveform: 'sine' | 'square' | 'saw' | 'triangle'): void;
|
|
10
|
+
export declare function setFilterCutoff(hz: number): void;
|
|
11
|
+
export declare function setFilterResonance(q: number): void;
|
|
12
|
+
export declare function setAttack(ms: number): void;
|
|
13
|
+
export declare function setDecay(ms: number): void;
|
|
14
|
+
export declare function setSustain(level: number): void;
|
|
15
|
+
export declare function setRelease(ms: number): void;
|
|
16
|
+
export declare function setDetune(cents: number): void;
|
|
17
|
+
export declare function setMasterLevel(level: number): void;
|
|
18
|
+
export declare function startTransport(): void;
|
|
19
|
+
export declare function stopTransport(): void;
|
|
20
|
+
export declare function setTempo(bpm: number): void;
|
|
21
|
+
export declare function setTransportPosition(beat: number): void;
|
|
22
|
+
export declare function getTransportPosition(): number;
|
|
23
|
+
export declare function getTempo(): number;
|
|
24
|
+
export declare function isTransportPlaying(): boolean;
|
|
25
25
|
export declare function setValueAsync(value: string): Promise<any>;
|
|
26
26
|
export declare function addChangeListener(listener: (event: ChangeEventPayload) => void): Subscription;
|
|
27
27
|
export declare function addBeatListener(listener: (event: BeatEventPayload) => void): Subscription;
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGnF,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAI3F,wBAAsB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAE3C;AAED,wBAAsB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAE9C;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGnF,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAA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IAAI,OAAO,CAE5C;AAID,wBAAsB,aAAa,CAAC,KAAK,EAAE,MAAM,gBAEhD;AAID,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,GAAG,YAAY,CAE7F;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,GAAG,YAAY,CAEzF;AAED,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,CAAC"}
|
package/build/index.js
CHANGED
|
@@ -9,63 +9,65 @@ export async function shutdown() {
|
|
|
9
9
|
return ExpoJuceModule.shutdown();
|
|
10
10
|
}
|
|
11
11
|
// ── Polyphonic Synth (MIDI-style) ────────────────────────────────
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
// Synchronous — uses lock-free SPSC queue, no main thread required
|
|
13
|
+
export function noteOn(note, velocity) {
|
|
14
|
+
ExpoJuceModule.noteOn(note, velocity);
|
|
14
15
|
}
|
|
15
|
-
export
|
|
16
|
-
|
|
16
|
+
export function noteOff(note) {
|
|
17
|
+
ExpoJuceModule.noteOff(note);
|
|
17
18
|
}
|
|
18
|
-
export
|
|
19
|
-
|
|
19
|
+
export function allNotesOff() {
|
|
20
|
+
ExpoJuceModule.allNotesOff();
|
|
20
21
|
}
|
|
21
22
|
// ── Global Synth Params ──────────────────────────────────────────
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
// Synchronous — all params are std::atomic
|
|
24
|
+
export function setWaveform(waveform) {
|
|
25
|
+
ExpoJuceModule.setWaveform(waveform);
|
|
24
26
|
}
|
|
25
|
-
export
|
|
26
|
-
|
|
27
|
+
export function setFilterCutoff(hz) {
|
|
28
|
+
ExpoJuceModule.setFilterCutoff(hz);
|
|
27
29
|
}
|
|
28
|
-
export
|
|
29
|
-
|
|
30
|
+
export function setFilterResonance(q) {
|
|
31
|
+
ExpoJuceModule.setFilterResonance(q);
|
|
30
32
|
}
|
|
31
|
-
export
|
|
32
|
-
|
|
33
|
+
export function setAttack(ms) {
|
|
34
|
+
ExpoJuceModule.setAttack(ms);
|
|
33
35
|
}
|
|
34
|
-
export
|
|
35
|
-
|
|
36
|
+
export function setDecay(ms) {
|
|
37
|
+
ExpoJuceModule.setDecay(ms);
|
|
36
38
|
}
|
|
37
|
-
export
|
|
38
|
-
|
|
39
|
+
export function setSustain(level) {
|
|
40
|
+
ExpoJuceModule.setSustain(level);
|
|
39
41
|
}
|
|
40
|
-
export
|
|
41
|
-
|
|
42
|
+
export function setRelease(ms) {
|
|
43
|
+
ExpoJuceModule.setRelease(ms);
|
|
42
44
|
}
|
|
43
|
-
export
|
|
44
|
-
|
|
45
|
+
export function setDetune(cents) {
|
|
46
|
+
ExpoJuceModule.setDetune(cents);
|
|
45
47
|
}
|
|
46
|
-
export
|
|
47
|
-
|
|
48
|
+
export function setMasterLevel(level) {
|
|
49
|
+
ExpoJuceModule.setMasterLevel(level);
|
|
48
50
|
}
|
|
49
51
|
// ── Transport ────────────────────────────────────────────────────
|
|
50
|
-
export
|
|
51
|
-
|
|
52
|
+
export function startTransport() {
|
|
53
|
+
ExpoJuceModule.startTransport();
|
|
52
54
|
}
|
|
53
|
-
export
|
|
54
|
-
|
|
55
|
+
export function stopTransport() {
|
|
56
|
+
ExpoJuceModule.stopTransport();
|
|
55
57
|
}
|
|
56
|
-
export
|
|
57
|
-
|
|
58
|
+
export function setTempo(bpm) {
|
|
59
|
+
ExpoJuceModule.setTempo(bpm);
|
|
58
60
|
}
|
|
59
|
-
export
|
|
60
|
-
|
|
61
|
+
export function setTransportPosition(beat) {
|
|
62
|
+
ExpoJuceModule.setTransportPosition(beat);
|
|
61
63
|
}
|
|
62
|
-
export
|
|
64
|
+
export function getTransportPosition() {
|
|
63
65
|
return ExpoJuceModule.getTransportPosition();
|
|
64
66
|
}
|
|
65
|
-
export
|
|
67
|
+
export function getTempo() {
|
|
66
68
|
return ExpoJuceModule.getTempo();
|
|
67
69
|
}
|
|
68
|
-
export
|
|
70
|
+
export function isTransportPlaying() {
|
|
69
71
|
return ExpoJuceModule.isTransportPlaying();
|
|
70
72
|
}
|
|
71
73
|
// ── Events ───────────────────────────────────────────────────────
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAgB,MAAM,mBAAmB,CAAC;AAEnF,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAG1C,oEAAoE;AAEpE,MAAM,CAAC,KAAK,UAAU,KAAK;IACzB,OAAO,cAAc,CAAC,KAAK,EAAE,CAAC;AAChC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,QAAQ;IAC5B,OAAO,cAAc,CAAC,QAAQ,EAAE,CAAC;AACnC,CAAC;AAED,oEAAoE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAgB,MAAM,mBAAmB,CAAC;AAEnF,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAG1C,oEAAoE;AAEpE,MAAM,CAAC,KAAK,UAAU,KAAK;IACzB,OAAO,cAAc,CAAC,KAAK,EAAE,CAAC;AAChC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,QAAQ;IAC5B,OAAO,cAAc,CAAC,QAAQ,EAAE,CAAC;AACnC,CAAC;AAED,oEAAoE;AACpE,mEAAmE;AAEnE,MAAM,UAAU,MAAM,CAAC,IAAY,EAAE,QAAgB;IACnD,cAAc,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,IAAY;IAClC,cAAc,CAAC,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AAQ,CAAC,GAAG,CAAC,CAAC;AAC/B,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC/C,cAAc,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;AAC5C,CAAC;AAED,MAAM,UAAU,oBAAoB;IAClC,OAAO,cAAc,CAAC,oBAAoB,EAAE,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,QAAQ;IACtB,OAAO,cAAc,CAAC,QAAQ,EAAE,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,kBAAkB;IAChC,OAAO,cAAc,CAAC,kBAAkB,EAAE,CAAC;AAC7C,CAAC;AAED,oEAAoE;AAEpE,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,KAAa;IAC/C,OAAO,MAAM,cAAc,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AACnD,CAAC;AAED,MAAM,OAAO,GAAG,IAAI,YAAY,CAAC,cAAc,IAAI,kBAAkB,CAAC,QAAQ,CAAC,CAAC;AAEhF,MAAM,UAAU,iBAAiB,CAAC,QAA6C;IAC7E,OAAO,OAAO,CAAC,WAAW,CAAqB,UAAU,EAAE,QAAQ,CAAC,CAAC;AACvE,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,QAA2C;IACzE,OAAO,OAAO,CAAC,WAAW,CAAmB,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACnE,CAAC;AAED,OAAO,EAAE,YAAY,EAA2D,CAAC","sourcesContent":["import { NativeModulesProxy, EventEmitter, Subscription } from 'expo-modules-core';\n\nimport ExpoJuceModule from './ExpoJuceModule';\nimport ExpoJuceView from './ExpoJuceView';\nimport { ChangeEventPayload, BeatEventPayload, ExpoJuceViewProps } from './ExpoJuce.types';\n\n// ── Lifecycle ────────────────────────────────────────────────────\n\nexport async function setup(): Promise<void> {\n return ExpoJuceModule.setup();\n}\n\nexport async function shutdown(): Promise<void> {\n return ExpoJuceModule.shutdown();\n}\n\n// ── Polyphonic Synth (MIDI-style) ────────────────────────────────\n// Synchronous — uses lock-free SPSC queue, no main thread required\n\nexport function noteOn(note: number, velocity: number): void {\n ExpoJuceModule.noteOn(note, velocity);\n}\n\nexport function noteOff(note: number): void {\n ExpoJuceModule.noteOff(note);\n}\n\nexport function allNotesOff(): void {\n ExpoJuceModule.allNotesOff();\n}\n\n// ── Global Synth Params ──────────────────────────────────────────\n// Synchronous — all params are std::atomic\n\nexport function setWaveform(waveform: 'sine' | 'square' | 'saw' | 'triangle'): void {\n ExpoJuceModule.setWaveform(waveform);\n}\n\nexport function setFilterCutoff(hz: number): void {\n ExpoJuceModule.setFilterCutoff(hz);\n}\n\nexport function setFilterResonance(q: number): void {\n ExpoJuceModule.setFilterResonance(q);\n}\n\nexport function setAttack(ms: number): void {\n ExpoJuceModule.setAttack(ms);\n}\n\nexport function setDecay(ms: number): void {\n ExpoJuceModule.setDecay(ms);\n}\n\nexport function setSustain(level: number): void {\n ExpoJuceModule.setSustain(level);\n}\n\nexport function setRelease(ms: number): void {\n ExpoJuceModule.setRelease(ms);\n}\n\nexport function setDetune(cents: number): void {\n ExpoJuceModule.setDetune(cents);\n}\n\nexport function setMasterLevel(level: number): void {\n ExpoJuceModule.setMasterLevel(level);\n}\n\n// ── Transport ────────────────────────────────────────────────────\n\nexport function startTransport(): void {\n ExpoJuceModule.startTransport();\n}\n\nexport function stopTransport(): void {\n ExpoJuceModule.stopTransport();\n}\n\nexport function setTempo(bpm: number): void {\n ExpoJuceModule.setTempo(bpm);\n}\n\nexport function setTransportPosition(beat: number): void {\n ExpoJuceModule.setTransportPosition(beat);\n}\n\nexport function getTransportPosition(): number {\n return ExpoJuceModule.getTransportPosition();\n}\n\nexport function getTempo(): number {\n return ExpoJuceModule.getTempo();\n}\n\nexport function isTransportPlaying(): boolean {\n return ExpoJuceModule.isTransportPlaying();\n}\n\n// ── Events ───────────────────────────────────────────────────────\n\nexport async function setValueAsync(value: string) {\n return await ExpoJuceModule.setValueAsync(value);\n}\n\nconst emitter = new EventEmitter(ExpoJuceModule ?? NativeModulesProxy.ExpoJuce);\n\nexport function addChangeListener(listener: (event: ChangeEventPayload) => void): Subscription {\n return emitter.addListener<ChangeEventPayload>('onChange', listener);\n}\n\nexport function addBeatListener(listener: (event: BeatEventPayload) => void): Subscription {\n return emitter.addListener<BeatEventPayload>('onBeat', listener);\n}\n\nexport { ExpoJuceView, ExpoJuceViewProps, ChangeEventPayload, BeatEventPayload };\n"]}
|
package/ios/ExpoJuceModule.swift
CHANGED
|
@@ -33,102 +33,107 @@ public class ExpoJuceModule: Module {
|
|
|
33
33
|
|
|
34
34
|
// ── Lifecycle ──────────────────────────────────────────────────
|
|
35
35
|
|
|
36
|
-
AsyncFunction("setup") { [weak self] in
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
AsyncFunction("setup") { [weak self] (promise: Promise) in
|
|
37
|
+
DispatchQueue.main.async {
|
|
38
|
+
ExpoJuceBridge.setup()
|
|
39
|
+
ExpoJuceBridge.setBeatCallback { [weak self] beat, bpm in
|
|
40
|
+
guard let self = self, self.hasListeners else { return }
|
|
41
|
+
self.sendEvent("onBeat", [
|
|
42
|
+
"beat": beat,
|
|
43
|
+
"bpm": bpm,
|
|
44
|
+
])
|
|
45
|
+
}
|
|
46
|
+
promise.resolve(NSNull())
|
|
44
47
|
}
|
|
45
|
-
}
|
|
48
|
+
}
|
|
46
49
|
|
|
47
50
|
AsyncFunction("shutdown") {
|
|
48
51
|
ExpoJuceBridge.shutdown()
|
|
49
52
|
}.runOnQueue(.main)
|
|
50
53
|
|
|
51
54
|
// ── Synth (MIDI-style) ─────────────────────────────────────────
|
|
55
|
+
// Thread-safe: PolySynthProcessor uses a lock-free SPSC queue
|
|
52
56
|
|
|
53
|
-
|
|
57
|
+
Function("noteOn") { (note: Int, velocity: Int) in
|
|
54
58
|
ExpoJuceBridge.note(on: Int32(note), velocity: Int32(velocity))
|
|
55
|
-
}
|
|
59
|
+
}
|
|
56
60
|
|
|
57
|
-
|
|
61
|
+
Function("noteOff") { (note: Int) in
|
|
58
62
|
ExpoJuceBridge.noteOff(Int32(note))
|
|
59
|
-
}
|
|
63
|
+
}
|
|
60
64
|
|
|
61
|
-
|
|
65
|
+
Function("allNotesOff") {
|
|
62
66
|
ExpoJuceBridge.allNotesOff()
|
|
63
|
-
}
|
|
67
|
+
}
|
|
64
68
|
|
|
65
69
|
// ── Global Synth Params ────────────────────────────────────────
|
|
70
|
+
// Thread-safe: all params are std::atomic
|
|
66
71
|
|
|
67
|
-
|
|
72
|
+
Function("setWaveform") { (waveform: String) in
|
|
68
73
|
ExpoJuceBridge.setWaveform(waveform)
|
|
69
|
-
}
|
|
74
|
+
}
|
|
70
75
|
|
|
71
|
-
|
|
76
|
+
Function("setFilterCutoff") { (hz: Double) in
|
|
72
77
|
ExpoJuceBridge.setFilterCutoff(hz)
|
|
73
|
-
}
|
|
78
|
+
}
|
|
74
79
|
|
|
75
|
-
|
|
80
|
+
Function("setFilterResonance") { (q: Double) in
|
|
76
81
|
ExpoJuceBridge.setFilterResonance(q)
|
|
77
|
-
}
|
|
82
|
+
}
|
|
78
83
|
|
|
79
|
-
|
|
84
|
+
Function("setAttack") { (ms: Double) in
|
|
80
85
|
ExpoJuceBridge.setAttack(ms)
|
|
81
|
-
}
|
|
86
|
+
}
|
|
82
87
|
|
|
83
|
-
|
|
88
|
+
Function("setDecay") { (ms: Double) in
|
|
84
89
|
ExpoJuceBridge.setDecay(ms)
|
|
85
|
-
}
|
|
90
|
+
}
|
|
86
91
|
|
|
87
|
-
|
|
92
|
+
Function("setSustain") { (level: Double) in
|
|
88
93
|
ExpoJuceBridge.setSustain(level)
|
|
89
|
-
}
|
|
94
|
+
}
|
|
90
95
|
|
|
91
|
-
|
|
96
|
+
Function("setRelease") { (ms: Double) in
|
|
92
97
|
ExpoJuceBridge.setRelease(ms)
|
|
93
|
-
}
|
|
98
|
+
}
|
|
94
99
|
|
|
95
|
-
|
|
100
|
+
Function("setDetune") { (cents: Double) in
|
|
96
101
|
ExpoJuceBridge.setDetune(cents)
|
|
97
|
-
}
|
|
102
|
+
}
|
|
98
103
|
|
|
99
|
-
|
|
104
|
+
Function("setMasterLevel") { (level: Double) in
|
|
100
105
|
ExpoJuceBridge.setMasterLevel(level)
|
|
101
|
-
}
|
|
106
|
+
}
|
|
102
107
|
|
|
103
108
|
// ── Transport ──────────────────────────────────────────────────
|
|
104
109
|
|
|
105
|
-
|
|
110
|
+
Function("startTransport") {
|
|
106
111
|
ExpoJuceBridge.startTransport()
|
|
107
|
-
}
|
|
112
|
+
}
|
|
108
113
|
|
|
109
|
-
|
|
114
|
+
Function("stopTransport") {
|
|
110
115
|
ExpoJuceBridge.stopTransport()
|
|
111
|
-
}
|
|
116
|
+
}
|
|
112
117
|
|
|
113
|
-
|
|
118
|
+
Function("setTempo") { (bpm: Double) in
|
|
114
119
|
ExpoJuceBridge.setTempo(bpm)
|
|
115
|
-
}
|
|
120
|
+
}
|
|
116
121
|
|
|
117
|
-
|
|
122
|
+
Function("setTransportPosition") { (beat: Double) in
|
|
118
123
|
ExpoJuceBridge.setTransportPosition(beat)
|
|
119
|
-
}
|
|
124
|
+
}
|
|
120
125
|
|
|
121
|
-
|
|
126
|
+
Function("getTransportPosition") { () -> Double in
|
|
122
127
|
return ExpoJuceBridge.getTransportPosition()
|
|
123
|
-
}
|
|
128
|
+
}
|
|
124
129
|
|
|
125
|
-
|
|
130
|
+
Function("getTempo") { () -> Double in
|
|
126
131
|
return ExpoJuceBridge.getTempo()
|
|
127
|
-
}
|
|
132
|
+
}
|
|
128
133
|
|
|
129
|
-
|
|
134
|
+
Function("isTransportPlaying") { () -> Bool in
|
|
130
135
|
return ExpoJuceBridge.isTransportPlaying()
|
|
131
|
-
}
|
|
136
|
+
}
|
|
132
137
|
|
|
133
138
|
// ── Async / View ───────────────────────────────────────────────
|
|
134
139
|
|