@textbus/collaborate 2.0.0-alpha.63 → 2.0.0-alpha.67
Sign up to get free protection for your applications and to get access to all the features.
- package/bundles/collaborate.js +3 -7
- package/package.json +5 -5
- package/src/collaborate.ts +3 -9
package/bundles/collaborate.js
CHANGED
@@ -8,7 +8,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
9
9
|
};
|
10
10
|
import { Injectable } from '@tanbo/di';
|
11
|
-
import {
|
11
|
+
import { filter, microTask, Subject } from '@tanbo/stream';
|
12
12
|
import { RootComponentRef, Starter, Translator, Registry, Selection, Renderer } from '@textbus/core';
|
13
13
|
import { Doc as YDoc, UndoManager } from 'yjs';
|
14
14
|
import { LocalToRemote } from './collab/local-to-remote';
|
@@ -211,17 +211,13 @@ let Collaborate = class Collaborate {
|
|
211
211
|
this.selection.restore();
|
212
212
|
this.updateFromSelf = true;
|
213
213
|
});
|
214
|
-
const operations = [];
|
215
214
|
this.subscriptions.push(this.rootComponentRef.component.changeMarker.onChange.pipe(filter(() => {
|
216
215
|
return this.updateFromSelf;
|
217
|
-
}),
|
218
|
-
operations.push(op);
|
219
|
-
}), debounceTime(1)).subscribe(() => {
|
216
|
+
}), microTask()).subscribe((operations) => {
|
220
217
|
this.yDoc.transact(() => {
|
221
218
|
operations.forEach(operation => {
|
222
219
|
this.localToRemote.transform(operation, root);
|
223
220
|
});
|
224
|
-
operations.length = 0;
|
225
221
|
}, this.yDoc);
|
226
222
|
this.renderer.render();
|
227
223
|
this.selection.restore();
|
@@ -239,4 +235,4 @@ Collaborate = __decorate([
|
|
239
235
|
Starter])
|
240
236
|
], Collaborate);
|
241
237
|
export { Collaborate };
|
242
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sbGFib3JhdGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvY29sbGFib3JhdGUudHMiX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OiBPcGVyYXRpb25bXSA9IFtdXG4gICAgdGhpcy5zdWJzY3JpcHRpb25zLnB1c2goXG4gICAgICB0aGlzLnJvb3RDb21wb25lbnRSZWYuY29tcG9uZW50LmNoYW5nZU1hcmtlci5vbkNoYW5nZS5waXBlKFxuICAgICAgICBmaWx0ZXIoKCkgPT4ge1xuICAgICAgICAgIHJldHVybiB0aGlzLnVwZGF0ZUZyb21TZWxmXG4gICAgICAgIH0pLFxuICAgICAgICB0YXAob3AgPT4ge1xuICAgICAgICAgIG9wZXJhdGlvbnMucHVzaChvcClcbiAgICAgICAgfSksXG4gICAgICAgIGRlYm91bmNlVGltZSgxKVxuICAgICAgKS5zdWJzY3JpYmUoKCkgPT4ge1xuICAgICAgICB0aGlzLnlEb2MudHJhbnNhY3QoKCkgPT4ge1xuICAgICAgICAgIG9wZXJhdGlvbnMuZm9yRWFjaChvcGVyYXRpb24gPT4ge1xuICAgICAgICAgICAgdGhpcy5sb2NhbFRvUmVtb3RlLnRyYW5zZm9ybShvcGVyYXRpb24sIHJvb3QpXG4gICAgICAgICAgfSlcbiAgICAgICAgICBvcGVyYXRpb25zLmxlbmd0aCA9IDBcbiAgICAgICAgfSwgdGhpcy55RG9jKVxuICAgICAgICB0aGlzLnJlbmRlcmVyLnJlbmRlcigpXG4gICAgICAgIHRoaXMuc2VsZWN0aW9uLnJlc3RvcmUoKVxuICAgICAgfSlcbiAgICApXG4gIH1cbn1cbiJdfQ==
|
238
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sbGFib3JhdGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvY29sbGFib3JhdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLFdBQVcsQ0FBQTtBQUN0QyxPQUFPLEVBQUUsTUFBTSxFQUFFLFNBQVMsRU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AgICB0aGlzLmxvY2FsVG9SZW1vdGUudHJhbnNmb3JtKG9wZXJhdGlvbiwgcm9vdClcbiAgICAgICAgICB9KVxuICAgICAgICB9LCB0aGlzLnlEb2MpXG4gICAgICAgIHRoaXMucmVuZGVyZXIucmVuZGVyKClcbiAgICAgICAgdGhpcy5zZWxlY3Rpb24ucmVzdG9yZSgpXG4gICAgICB9KVxuICAgIClcbiAgfVxufVxuIl19
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@textbus/collaborate",
|
3
|
-
"version": "2.0.0-alpha.
|
3
|
+
"version": "2.0.0-alpha.67",
|
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/public-api.js",
|
6
6
|
"module": "./bundles/public-api.js",
|
@@ -26,9 +26,9 @@
|
|
26
26
|
],
|
27
27
|
"dependencies": {
|
28
28
|
"@tanbo/di": "^1.0.7",
|
29
|
-
"@tanbo/stream": "^0.0
|
30
|
-
"@textbus/browser": "^2.0.0-alpha.
|
31
|
-
"@textbus/core": "^2.0.0-alpha.
|
29
|
+
"@tanbo/stream": "^1.0.0",
|
30
|
+
"@textbus/browser": "^2.0.0-alpha.67",
|
31
|
+
"@textbus/core": "^2.0.0-alpha.64",
|
32
32
|
"reflect-metadata": "^0.1.13",
|
33
33
|
"y-protocols": "^1.0.5",
|
34
34
|
"yjs": "^13.5.27"
|
@@ -44,5 +44,5 @@
|
|
44
44
|
"bugs": {
|
45
45
|
"url": "https://github.com/textbus/textbus.git/issues"
|
46
46
|
},
|
47
|
-
"gitHead": "
|
47
|
+
"gitHead": "c9a9c101318e821ed07665d74caa31d7f7f0eecd"
|
48
48
|
}
|
package/src/collaborate.ts
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
import { Injectable } from '@tanbo/di'
|
2
|
-
import {
|
2
|
+
import { filter, microTask, Observable, Subject, Subscription } from '@tanbo/stream'
|
3
3
|
import {
|
4
4
|
RootComponentRef,
|
5
5
|
Starter,
|
6
|
-
Operation,
|
7
6
|
Translator,
|
8
7
|
Registry,
|
9
8
|
Selection,
|
@@ -114,22 +113,17 @@ export class Collaborate implements History {
|
|
114
113
|
this.selection.restore()
|
115
114
|
this.updateFromSelf = true
|
116
115
|
})
|
117
|
-
const operations: Operation[] = []
|
118
116
|
this.subscriptions.push(
|
119
117
|
this.rootComponentRef.component.changeMarker.onChange.pipe(
|
120
118
|
filter(() => {
|
121
119
|
return this.updateFromSelf
|
122
120
|
}),
|
123
|
-
|
124
|
-
|
125
|
-
}),
|
126
|
-
debounceTime(1)
|
127
|
-
).subscribe(() => {
|
121
|
+
microTask()
|
122
|
+
).subscribe((operations) => {
|
128
123
|
this.yDoc.transact(() => {
|
129
124
|
operations.forEach(operation => {
|
130
125
|
this.localToRemote.transform(operation, root)
|
131
126
|
})
|
132
|
-
operations.length = 0
|
133
127
|
}, this.yDoc)
|
134
128
|
this.renderer.render()
|
135
129
|
this.selection.restore()
|