@textbus/collaborate 5.0.0-alpha.2 → 5.0.0-alpha.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/bundles/index.esm.js +5 -1
- package/bundles/index.js +5 -1
- package/package.json +3 -3
package/bundles/index.esm.js
CHANGED
@@ -521,6 +521,8 @@ let Collaborate = class Collaborate {
|
|
521
521
|
return;
|
522
522
|
}
|
523
523
|
const content = subDocument.getText('content');
|
524
|
+
const data = subDocument.getMap('data');
|
525
|
+
this.syncLocalMapToSharedMap(localSlot.data, data);
|
524
526
|
this.initSharedSlotByLocalSlot(content, localSlot);
|
525
527
|
this.syncSlot(content, localSlot);
|
526
528
|
this.addSubModelEvent.next({
|
@@ -572,11 +574,13 @@ let Collaborate = class Collaborate {
|
|
572
574
|
const schema = sharedSlot.getAttribute('schema');
|
573
575
|
if (type === 'async') {
|
574
576
|
const metadata = sharedSlot.getAttribute('metadata');
|
575
|
-
const slot = new AsyncSlot(schema || [], {});
|
577
|
+
const slot = new AsyncSlot(schema || [], {}, {});
|
576
578
|
this.syncSharedMapToLocalMap(metadata, slot.metadata);
|
577
579
|
const loadedSubDocument = this.subModelLoader.getLoadedModelBySlot(slot);
|
578
580
|
if (loadedSubDocument) {
|
579
581
|
const subContent = loadedSubDocument.getText('content');
|
582
|
+
const data = loadedSubDocument.getMap('data');
|
583
|
+
this.syncLocalMapToSharedMap(slot, data);
|
580
584
|
this.syncRootSlot(loadedSubDocument, subContent, slot);
|
581
585
|
this.addSubModelEvent.next({
|
582
586
|
yDoc: loadedSubDocument,
|
package/bundles/index.js
CHANGED
@@ -523,6 +523,8 @@ exports.Collaborate = class Collaborate {
|
|
523
523
|
return;
|
524
524
|
}
|
525
525
|
const content = subDocument.getText('content');
|
526
|
+
const data = subDocument.getMap('data');
|
527
|
+
this.syncLocalMapToSharedMap(localSlot.data, data);
|
526
528
|
this.initSharedSlotByLocalSlot(content, localSlot);
|
527
529
|
this.syncSlot(content, localSlot);
|
528
530
|
this.addSubModelEvent.next({
|
@@ -574,11 +576,13 @@ exports.Collaborate = class Collaborate {
|
|
574
576
|
const schema = sharedSlot.getAttribute('schema');
|
575
577
|
if (type === 'async') {
|
576
578
|
const metadata = sharedSlot.getAttribute('metadata');
|
577
|
-
const slot = new core.AsyncSlot(schema || [], {});
|
579
|
+
const slot = new core.AsyncSlot(schema || [], {}, {});
|
578
580
|
this.syncSharedMapToLocalMap(metadata, slot.metadata);
|
579
581
|
const loadedSubDocument = this.subModelLoader.getLoadedModelBySlot(slot);
|
580
582
|
if (loadedSubDocument) {
|
581
583
|
const subContent = loadedSubDocument.getText('content');
|
584
|
+
const data = loadedSubDocument.getMap('data');
|
585
|
+
this.syncLocalMapToSharedMap(slot, data);
|
582
586
|
this.syncRootSlot(loadedSubDocument, subContent, slot);
|
583
587
|
this.addSubModelEvent.next({
|
584
588
|
yDoc: loadedSubDocument,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@textbus/collaborate",
|
3
|
-
"version": "5.0.0-alpha.
|
3
|
+
"version": "5.0.0-alpha.3",
|
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",
|
@@ -27,7 +27,7 @@
|
|
27
27
|
"dependencies": {
|
28
28
|
"@hocuspocus/provider": "^2.15.2",
|
29
29
|
"@tanbo/stream": "^1.2.7",
|
30
|
-
"@textbus/core": "^5.0.0-alpha.
|
30
|
+
"@textbus/core": "^5.0.0-alpha.3",
|
31
31
|
"@viewfly/core": "^2.0.0-alpha.3",
|
32
32
|
"y-websocket": "^2.1.0",
|
33
33
|
"yjs": "^13.6.23"
|
@@ -50,5 +50,5 @@
|
|
50
50
|
"bugs": {
|
51
51
|
"url": "https://github.com/textbus/textbus.git/issues"
|
52
52
|
},
|
53
|
-
"gitHead": "
|
53
|
+
"gitHead": "4635f5529f7a807e59d11a933ed27c114e6106e6"
|
54
54
|
}
|