@opendaw/lib-fusion 0.0.87 → 0.0.88
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.
|
@@ -6,6 +6,7 @@ export declare class LiveStreamReceiver implements Terminable {
|
|
|
6
6
|
static ID: int;
|
|
7
7
|
constructor();
|
|
8
8
|
connect(messenger: Messenger): Terminable;
|
|
9
|
+
dispatch(): void;
|
|
9
10
|
subscribeFloat(address: Address, procedure: Procedure<float>): Subscription;
|
|
10
11
|
subscribeInteger(address: Address, procedure: Procedure<int>): Subscription;
|
|
11
12
|
subscribeFloats(address: Address, procedure: Procedure<Float32Array>): Subscription;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LiveStreamReceiver.d.ts","sourceRoot":"","sources":["../../src/live-stream/LiveStreamReceiver.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,KAAK,EACL,GAAG,EAIH,SAAS,EAET,YAAY,EACZ,UAAU,EACb,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAC,OAAO,EAAC,MAAM,kBAAkB,CAAA;AAExC,OAAO,EAAe,SAAS,EAAC,MAAM,sBAAsB,CAAA;AAyG5D,qBAAa,kBAAmB,YAAW,UAAU;;IACjD,MAAM,CAAC,EAAE,EAAE,GAAG,CAAQ;;IA+BtB,OAAO,CAAC,SAAS,EAAE,SAAS,GAAG,UAAU;
|
|
1
|
+
{"version":3,"file":"LiveStreamReceiver.d.ts","sourceRoot":"","sources":["../../src/live-stream/LiveStreamReceiver.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,KAAK,EACL,GAAG,EAIH,SAAS,EAET,YAAY,EACZ,UAAU,EACb,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAC,OAAO,EAAC,MAAM,kBAAkB,CAAA;AAExC,OAAO,EAAe,SAAS,EAAC,MAAM,sBAAsB,CAAA;AAyG5D,qBAAa,kBAAmB,YAAW,UAAU;;IACjD,MAAM,CAAC,EAAE,EAAE,GAAG,CAAQ;;IA+BtB,OAAO,CAAC,SAAS,EAAE,SAAS,GAAG,UAAU;IAuBzC,QAAQ,IAAI,IAAI;IA2BhB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,KAAK,CAAC,GAAG,YAAY;IAI3E,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,GAAG,CAAC,GAAG,YAAY;IAI3E,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,YAAY,CAAC,GAAG,YAAY;IAInF,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,UAAU,CAAC,GAAG,YAAY;IAInF,kBAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,SAAS,CAAC,GAAG,YAAY;IAInF,SAAS,IAAI,IAAI;CAwDpB"}
|
|
@@ -128,6 +128,7 @@ export class LiveStreamReceiver {
|
|
|
128
128
|
}
|
|
129
129
|
}), AnimationFrame.add(() => this.#dispatch()));
|
|
130
130
|
}
|
|
131
|
+
dispatch() { this.#dispatch(); }
|
|
131
132
|
#updateDataViews() {
|
|
132
133
|
if (this.#sab.isEmpty() || this.#numPackages === 0 || this.#numPackages !== this.#sabNumPackages) {
|
|
133
134
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Preferences.d.ts","sourceRoot":"","sources":["../../src/preferences/Preferences.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,sBAAsB,EACtB,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,UAAU,EAEV,WAAW,EACd,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAA;AACrD,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AAErB,MAAM,WAAW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,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AAErB,MAAM,WAAW,WAAW,CAAC,QAAQ;IACjC,IAAI,QAAQ,IAAI,QAAQ,CAAA;IACxB,SAAS,CAAC,CAAC,SAAS,SAAS,CAAC,QAAQ,CAAC,EACnC,QAAQ,EAAE,QAAQ,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,GAAG,YAAY,CAAA;IAC3E,mBAAmB,CAAC,CAAC,SAAS,SAAS,CAAC,QAAQ,CAAC,EAC7C,QAAQ,EAAE,QAAQ,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,GAAG,YAAY,CAAA;IAC3E,4BAA4B,CAAC,CAAC,SAAS,SAAS,CAAC,QAAQ,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,GAChE,sBAAsB,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,GAAG,UAAU,CAAA;CACtE;AAED,yBAAiB,WAAW,CAAC;IAGlB,MAAM,IAAI,GAAI,QAAQ,SAAS,MAAM,EAAE,KAAK,MAAM,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAG,eAAe,CAAC,QAAQ,CAM7G,CAAA;IAEM,MAAM,MAAM,GAAI,QAAQ,SAAS,MAAM,EAAE,KAAK,MAAM,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAG,iBAAiB,CAAC,QAAQ,CAMjH,CAAA;CA0BJ"}
|
|
@@ -19,19 +19,36 @@ export var Preferences;
|
|
|
19
19
|
return facade;
|
|
20
20
|
};
|
|
21
21
|
const loadFromStorage = (key, zod) => {
|
|
22
|
+
const defaults = zod.parse({});
|
|
22
23
|
if (!hasLocalStorage) {
|
|
23
|
-
return
|
|
24
|
+
return defaults;
|
|
24
25
|
}
|
|
25
26
|
const stored = localStorage.getItem(key);
|
|
26
|
-
if (isDefined(stored)) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
if (!isDefined(stored)) {
|
|
28
|
+
return defaults;
|
|
29
|
+
}
|
|
30
|
+
const { status, value } = tryCatch(() => JSON.parse(stored));
|
|
31
|
+
if (status !== "success" || typeof value !== "object" || value === null) {
|
|
32
|
+
return defaults;
|
|
33
|
+
}
|
|
34
|
+
const result = zod.safeParse(value);
|
|
35
|
+
if (result.success) {
|
|
36
|
+
return result.data;
|
|
37
|
+
}
|
|
38
|
+
// Full parse failed (schema changed). Parse each section independently to preserve valid user settings.
|
|
39
|
+
const merged = {};
|
|
40
|
+
for (const sectionKey of Object.keys(defaults)) {
|
|
41
|
+
const sectionSchema = zod.shape?.[sectionKey];
|
|
42
|
+
if (isDefined(sectionSchema) && isDefined(value[sectionKey])) {
|
|
43
|
+
const sectionResult = sectionSchema.safeParse(value[sectionKey]);
|
|
44
|
+
merged[sectionKey] = sectionResult.success
|
|
45
|
+
? sectionResult.data
|
|
46
|
+
: defaults[sectionKey];
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
merged[sectionKey] = defaults[sectionKey];
|
|
33
50
|
}
|
|
34
51
|
}
|
|
35
|
-
return
|
|
52
|
+
return merged;
|
|
36
53
|
};
|
|
37
54
|
})(Preferences || (Preferences = {}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opendaw/lib-fusion",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.88",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"license": "LGPL-3.0-or-later",
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"test": "vitest run"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@opendaw/lib-box": "^0.0.
|
|
27
|
-
"@opendaw/lib-dom": "^0.0.
|
|
28
|
-
"@opendaw/lib-runtime": "^0.0.
|
|
29
|
-
"@opendaw/lib-std": "^0.0.
|
|
26
|
+
"@opendaw/lib-box": "^0.0.81",
|
|
27
|
+
"@opendaw/lib-dom": "^0.0.80",
|
|
28
|
+
"@opendaw/lib-runtime": "^0.0.76",
|
|
29
|
+
"@opendaw/lib-std": "^0.0.75"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@opendaw/eslint-config": "^0.0.27",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"jsdom": "^25.0.1",
|
|
35
35
|
"vitest": "^2.1.8"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "ff6efcb5332559bb0ba064be829ab0d18a6ba226"
|
|
38
38
|
}
|