@hyperframes/sdk 0.8.191 → 0.8.192
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/session.js +8 -1
- package/package.json +3 -3
package/dist/session.js
CHANGED
|
@@ -49,6 +49,7 @@ class CompositionImpl {
|
|
|
49
49
|
selectionHandlers = [];
|
|
50
50
|
patchHandlers = [];
|
|
51
51
|
errorHandlers = [];
|
|
52
|
+
persistErrorUnsubscribes = new Set();
|
|
52
53
|
previewSelectionUnsubscribe = null;
|
|
53
54
|
/** Attached by openComposition() for standalone mode. */
|
|
54
55
|
historyModule = null;
|
|
@@ -626,9 +627,12 @@ class CompositionImpl {
|
|
|
626
627
|
const typedH = h;
|
|
627
628
|
this.errorHandlers.push(typedH);
|
|
628
629
|
const offPersist = this.persist?.on("persist:error", typedH);
|
|
630
|
+
if (offPersist)
|
|
631
|
+
this.persistErrorUnsubscribes.add(offPersist);
|
|
629
632
|
return () => {
|
|
630
633
|
this.errorHandlers = this.errorHandlers.filter((x) => x !== typedH);
|
|
631
|
-
offPersist
|
|
634
|
+
if (offPersist && this.persistErrorUnsubscribes.delete(offPersist))
|
|
635
|
+
offPersist();
|
|
632
636
|
};
|
|
633
637
|
}
|
|
634
638
|
return () => { };
|
|
@@ -679,6 +683,9 @@ class CompositionImpl {
|
|
|
679
683
|
dispose() {
|
|
680
684
|
this.previewSelectionUnsubscribe?.();
|
|
681
685
|
this.previewSelectionUnsubscribe = null;
|
|
686
|
+
for (const unsubscribe of this.persistErrorUnsubscribes)
|
|
687
|
+
unsubscribe();
|
|
688
|
+
this.persistErrorUnsubscribes.clear();
|
|
682
689
|
this.persistQueueModule?.dispose();
|
|
683
690
|
this.historyModule?.dispose();
|
|
684
691
|
this.changeHandlers = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/sdk",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.192",
|
|
4
4
|
"description": "Headless, framework-neutral HyperFrames composition editing engine",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"linkedom": "^0.18.12",
|
|
47
|
-
"@hyperframes/
|
|
48
|
-
"@hyperframes/
|
|
47
|
+
"@hyperframes/core": "0.8.192",
|
|
48
|
+
"@hyperframes/parsers": "0.8.192"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/node": "^25.0.10",
|