@textbus/collaborate 4.0.0-alpha.31 → 4.0.0-alpha.34
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/bundles/index.esm.js +6 -4
- package/bundles/index.js +6 -4
- package/package.json +4 -4
package/bundles/index.esm.js
CHANGED
|
@@ -264,7 +264,9 @@ let Collaborate = class Collaborate {
|
|
|
264
264
|
});
|
|
265
265
|
}
|
|
266
266
|
else {
|
|
267
|
-
rootComponent.state.
|
|
267
|
+
Object.keys(rootComponent.state).forEach(key => {
|
|
268
|
+
Reflect.deleteProperty(rootComponent.state, key);
|
|
269
|
+
});
|
|
268
270
|
this.syncSharedMapToLocalMap(state, rootComponent.state, rootComponent);
|
|
269
271
|
}
|
|
270
272
|
}
|
|
@@ -603,7 +605,7 @@ let Collaborate = class Collaborate {
|
|
|
603
605
|
const data = action.ref.map(item => {
|
|
604
606
|
return this.createSharedModelByLocalModel(item, parent);
|
|
605
607
|
});
|
|
606
|
-
sharedArray.insert(index,
|
|
608
|
+
sharedArray.insert(index, data);
|
|
607
609
|
}
|
|
608
610
|
break;
|
|
609
611
|
case 'delete':
|
|
@@ -611,7 +613,7 @@ let Collaborate = class Collaborate {
|
|
|
611
613
|
break;
|
|
612
614
|
case 'setIndex':
|
|
613
615
|
sharedArray.delete(action.index, 1);
|
|
614
|
-
sharedArray.insert(action.index, this.createSharedModelByLocalModel(action.ref, parent));
|
|
616
|
+
sharedArray.insert(action.index, [this.createSharedModelByLocalModel(action.ref, parent)]);
|
|
615
617
|
break;
|
|
616
618
|
}
|
|
617
619
|
}
|
|
@@ -679,7 +681,7 @@ let Collaborate = class Collaborate {
|
|
|
679
681
|
}
|
|
680
682
|
});
|
|
681
683
|
});
|
|
682
|
-
localObject.destroyCallbacks.push(function () {
|
|
684
|
+
localObject.__changeMarker__.destroyCallbacks.push(function () {
|
|
683
685
|
sharedObject.unobserve(syncRemote);
|
|
684
686
|
sub.unsubscribe();
|
|
685
687
|
});
|
package/bundles/index.js
CHANGED
|
@@ -266,7 +266,9 @@ exports.Collaborate = class Collaborate {
|
|
|
266
266
|
});
|
|
267
267
|
}
|
|
268
268
|
else {
|
|
269
|
-
rootComponent.state.
|
|
269
|
+
Object.keys(rootComponent.state).forEach(key => {
|
|
270
|
+
Reflect.deleteProperty(rootComponent.state, key);
|
|
271
|
+
});
|
|
270
272
|
this.syncSharedMapToLocalMap(state, rootComponent.state, rootComponent);
|
|
271
273
|
}
|
|
272
274
|
}
|
|
@@ -605,7 +607,7 @@ exports.Collaborate = class Collaborate {
|
|
|
605
607
|
const data = action.ref.map(item => {
|
|
606
608
|
return this.createSharedModelByLocalModel(item, parent);
|
|
607
609
|
});
|
|
608
|
-
sharedArray.insert(index,
|
|
610
|
+
sharedArray.insert(index, data);
|
|
609
611
|
}
|
|
610
612
|
break;
|
|
611
613
|
case 'delete':
|
|
@@ -613,7 +615,7 @@ exports.Collaborate = class Collaborate {
|
|
|
613
615
|
break;
|
|
614
616
|
case 'setIndex':
|
|
615
617
|
sharedArray.delete(action.index, 1);
|
|
616
|
-
sharedArray.insert(action.index, this.createSharedModelByLocalModel(action.ref, parent));
|
|
618
|
+
sharedArray.insert(action.index, [this.createSharedModelByLocalModel(action.ref, parent)]);
|
|
617
619
|
break;
|
|
618
620
|
}
|
|
619
621
|
}
|
|
@@ -681,7 +683,7 @@ exports.Collaborate = class Collaborate {
|
|
|
681
683
|
}
|
|
682
684
|
});
|
|
683
685
|
});
|
|
684
|
-
localObject.destroyCallbacks.push(function () {
|
|
686
|
+
localObject.__changeMarker__.destroyCallbacks.push(function () {
|
|
685
687
|
sharedObject.unobserve(syncRemote);
|
|
686
688
|
sub.unsubscribe();
|
|
687
689
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@textbus/collaborate",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.34",
|
|
4
4
|
"description": "Textbus is a rich text editor and framework that is highly customizable and extensible to achieve rich wysiwyg effects.",
|
|
5
5
|
"main": "./bundles/index.js",
|
|
6
6
|
"module": "./bundles/index.esm.js",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@tanbo/stream": "^1.2.3",
|
|
29
|
-
"@textbus/core": "^4.0.0-alpha.
|
|
30
|
-
"@viewfly/core": "^0.6.
|
|
29
|
+
"@textbus/core": "^4.0.0-alpha.34",
|
|
30
|
+
"@viewfly/core": "^0.6.3",
|
|
31
31
|
"reflect-metadata": "^0.1.13",
|
|
32
32
|
"y-websocket": "^1.4.3",
|
|
33
33
|
"yjs": "^13.6.14"
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"bugs": {
|
|
51
51
|
"url": "https://github.com/textbus/textbus.git/issues"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "b6f9bfbce3135865fc0c8a3e6b622a7040019634"
|
|
54
54
|
}
|