@textbus/collaborate 2.0.0-beta.33 → 2.0.0-beta.36
Sign up to get free protection for your applications and to get access to all the features.
- package/bundles/collaborate-cursor.js +7 -3
- package/bundles/collaborate.d.ts +4 -2
- package/bundles/collaborate.js +51 -17
- package/package.json +5 -5
- package/src/collaborate-cursor.ts +6 -2
- package/src/collaborate.ts +36 -16
@@ -217,14 +217,18 @@ let CollaborateCursor = class CollaborateCursor {
|
|
217
217
|
cursorRange.setStart(focus.node, focus.offset);
|
218
218
|
cursorRange.collapse(true);
|
219
219
|
const cursorRect = getLayoutRectByRange(cursorRange);
|
220
|
-
|
220
|
+
const rect = {
|
221
221
|
username: item.username,
|
222
222
|
color: item.color,
|
223
223
|
x: cursorRect.x - containerRect.x,
|
224
224
|
y: cursorRect.y - containerRect.y,
|
225
225
|
width: 2,
|
226
226
|
height: cursorRect.height
|
227
|
-
}
|
227
|
+
};
|
228
|
+
if (rect.x < 0 || rect.y < 0 || rect.x > containerRect.width) {
|
229
|
+
return;
|
230
|
+
}
|
231
|
+
users.push(rect);
|
228
232
|
});
|
229
233
|
this.drawUserCursor(users);
|
230
234
|
}
|
@@ -320,4 +324,4 @@ CollaborateCursor = __decorate([
|
|
320
324
|
Selection])
|
321
325
|
], CollaborateCursor);
|
322
326
|
export { CollaborateCursor };
|
323
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sbGFib3JhdGUtY3Vyc29yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2NvbGxhYm9yYXRlLWN1cnNvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7QUFBQSxPQUFPLEVBQUUsTUFBTSxFQUFFLFVBQVUsRUFBRSxRQUFRLEVBQUUsTUFBTSxXQUFXLENBQUE7QUFDeEQsT0FBTyxFQUNMLGFBQWEsRUFDYixjQUFjLEVBQ2Qsb0JBQW9CLEVBQ3BCLGVBQWUsRUFDa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ZnQ6ICctMnB4JyxcbiAgICAgICAgd2lkdGg6ICc2cHgnLFxuICAgICAgICBoZWlnaHQ6ICc2cHgnLFxuICAgICAgICBwb2ludGVyRXZlbnRzOiAnYXV0bycsXG4gICAgICAgIHBvaW50ZXI6ICdjdXJzb3InLFxuICAgICAgfSxcbiAgICAgIGNoaWxkcmVuOiBbdXNlclRpcF0sXG4gICAgICBvbjoge1xuICAgICAgICBtb3VzZWVudGVyKCkge1xuICAgICAgICAgIHVzZXJUaXAuc3R5bGUuZGlzcGxheSA9ICdibG9jaydcbiAgICAgICAgfSxcbiAgICAgICAgbW91c2VsZWF2ZSgpIHtcbiAgICAgICAgICB1c2VyVGlwLnN0eWxlLmRpc3BsYXkgPSAnbm9uZSdcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0pXG4gICAgY2hpbGQgPSBjcmVhdGVFbGVtZW50KCdzcGFuJywge1xuICAgICAgc3R5bGVzOiB7XG4gICAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgfSxcbiAgICAgIGNoaWxkcmVuOiBbXG4gICAgICAgIGFuY2hvclxuICAgICAgXVxuICAgIH0pXG4gICAgdGhpcy50b29sdGlwcy5hcHBlbmQoY2hpbGQpXG4gICAgcmV0dXJuIHtcbiAgICAgIGN1cnNvcjogY2hpbGQsXG4gICAgICBhbmNob3IsXG4gICAgICB1c2VyVGlwXG4gICAgfVxuICB9XG59XG4iXX0=
|
327
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sbGFib3JhdGUtY3Vyc29yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2NvbGxhYm9yYXRlLWN1cnNvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7QUFBQSxPQUFPLEVBQUUsTUFBTSxFQUFFLFVBQVUsRUFBRSxRQUFRLEVBQUUsTUFBTSxXQUFXLENBQU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3R0b206ICcycHgnLFxuICAgICAgICBib3R0b206ICcxMDAlJyxcbiAgICAgICAgd2hpdGVTcGFjZTogJ25vd3JhcCcsXG4gICAgICAgIGNvbG9yOiAnI2ZmZicsXG4gICAgICAgIGJveFNoYWRvdzogJzAgMXB4IDJweCByZ2JhKDAsMCwwLC4xKScsXG4gICAgICAgIGJvcmRlclJhZGl1czogJzNweCcsXG4gICAgICAgIHBhZGRpbmc6ICczcHggNXB4JyxcbiAgICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgfVxuICAgIH0pXG5cbiAgICBjb25zdCBhbmNob3IgPSBjcmVhdGVFbGVtZW50KCdzcGFuJywge1xuICAgICAgc3R5bGVzOiB7XG4gICAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgICB0b3A6ICctMnB4JyxcbiAgICAgICAgbGVmdDogJy0ycHgnLFxuICAgICAgICB3aWR0aDogJzZweCcsXG4gICAgICAgIGhlaWdodDogJzZweCcsXG4gICAgICAgIHBvaW50ZXJFdmVudHM6ICdhdXRvJyxcbiAgICAgICAgcG9pbnRlcjogJ2N1cnNvcicsXG4gICAgICB9LFxuICAgICAgY2hpbGRyZW46IFt1c2VyVGlwXSxcbiAgICAgIG9uOiB7XG4gICAgICAgIG1vdXNlZW50ZXIoKSB7XG4gICAgICAgICAgdXNlclRpcC5zdHlsZS5kaXNwbGF5ID0gJ2Jsb2NrJ1xuICAgICAgICB9LFxuICAgICAgICBtb3VzZWxlYXZlKCkge1xuICAgICAgICAgIHVzZXJUaXAuc3R5bGUuZGlzcGxheSA9ICdub25lJ1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfSlcbiAgICBjaGlsZCA9IGNyZWF0ZUVsZW1lbnQoJ3NwYW4nLCB7XG4gICAgICBzdHlsZXM6IHtcbiAgICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICB9LFxuICAgICAgY2hpbGRyZW46IFtcbiAgICAgICAgYW5jaG9yXG4gICAgICBdXG4gICAgfSlcbiAgICB0aGlzLnRvb2x0aXBzLmFwcGVuZChjaGlsZClcbiAgICByZXR1cm4ge1xuICAgICAgY3Vyc29yOiBjaGlsZCxcbiAgICAgIGFuY2hvcixcbiAgICAgIHVzZXJUaXBcbiAgICB9XG4gIH1cbn1cbiJdfQ==
|
package/bundles/collaborate.d.ts
CHANGED
@@ -1,10 +1,12 @@
|
|
1
1
|
import { Observable } from '@tanbo/stream';
|
2
|
-
import { History, Registry, RootComponentRef, Scheduler, Selection, SelectionPaths, Starter, Translator } from '@textbus/core';
|
2
|
+
import { Controller, History, Registry, RootComponentRef, Scheduler, Selection, SelectionPaths, Starter, Translator } from '@textbus/core';
|
3
3
|
import { Doc as YDoc } from 'yjs';
|
4
4
|
import { CollaborateCursor, RemoteSelection } from './collaborate-cursor';
|
5
5
|
export declare class Collaborate implements History {
|
6
|
+
private stackSize;
|
6
7
|
private rootComponentRef;
|
7
8
|
private collaborateCursor;
|
9
|
+
private controller;
|
8
10
|
private scheduler;
|
9
11
|
private translator;
|
10
12
|
private registry;
|
@@ -31,7 +33,7 @@ export declare class Collaborate implements History {
|
|
31
33
|
private componentStateSyncCaches;
|
32
34
|
private selectionChangeEvent;
|
33
35
|
private updateRemoteActions;
|
34
|
-
constructor(rootComponentRef: RootComponentRef, collaborateCursor: CollaborateCursor, scheduler: Scheduler, translator: Translator, registry: Registry, selection: Selection, starter: Starter);
|
36
|
+
constructor(stackSize: number, rootComponentRef: RootComponentRef, collaborateCursor: CollaborateCursor, controller: Controller, scheduler: Scheduler, translator: Translator, registry: Registry, selection: Selection, starter: Starter);
|
35
37
|
setup(): void;
|
36
38
|
updateRemoteSelection(paths: RemoteSelection[]): void;
|
37
39
|
listen(): void;
|
package/bundles/collaborate.js
CHANGED
@@ -7,15 +7,24 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
7
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
|
-
|
11
|
-
|
12
|
-
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
12
|
+
};
|
13
|
+
import { Inject, Injectable } from '@tanbo/di';
|
14
|
+
import { delay, filter, map, Subject } from '@tanbo/stream';
|
15
|
+
import { ChangeOrigin, ContentType, Controller, HISTORY_STACK_SIZE, makeError, Registry, RootComponentRef, Scheduler, Selection, Slot, Starter, Translator } from '@textbus/core';
|
13
16
|
import { Array as YArray, Doc as YDoc, Map as YMap, Text as YText, UndoManager } from 'yjs';
|
14
17
|
import { CollaborateCursor } from './collaborate-cursor';
|
15
18
|
import { createUnknownComponent } from './unknown.component';
|
16
19
|
const collaborateErrorFn = makeError('Collaborate');
|
17
20
|
let Collaborate = class Collaborate {
|
18
|
-
constructor(rootComponentRef, collaborateCursor, scheduler, translator, registry, selection, starter) {
|
21
|
+
constructor(stackSize, rootComponentRef, collaborateCursor, controller, scheduler, translator, registry, selection, starter) {
|
22
|
+
Object.defineProperty(this, "stackSize", {
|
23
|
+
enumerable: true,
|
24
|
+
configurable: true,
|
25
|
+
writable: true,
|
26
|
+
value: stackSize
|
27
|
+
});
|
19
28
|
Object.defineProperty(this, "rootComponentRef", {
|
20
29
|
enumerable: true,
|
21
30
|
configurable: true,
|
@@ -28,6 +37,12 @@ let Collaborate = class Collaborate {
|
|
28
37
|
writable: true,
|
29
38
|
value: collaborateCursor
|
30
39
|
});
|
40
|
+
Object.defineProperty(this, "controller", {
|
41
|
+
enumerable: true,
|
42
|
+
configurable: true,
|
43
|
+
writable: true,
|
44
|
+
value: controller
|
45
|
+
});
|
31
46
|
Object.defineProperty(this, "scheduler", {
|
32
47
|
enumerable: true,
|
33
48
|
configurable: true,
|
@@ -122,7 +137,7 @@ let Collaborate = class Collaborate {
|
|
122
137
|
enumerable: true,
|
123
138
|
configurable: true,
|
124
139
|
writable: true,
|
125
|
-
value:
|
140
|
+
value: null
|
126
141
|
});
|
127
142
|
Object.defineProperty(this, "subscriptions", {
|
128
143
|
enumerable: true,
|
@@ -180,11 +195,11 @@ let Collaborate = class Collaborate {
|
|
180
195
|
}
|
181
196
|
get canBack() {
|
182
197
|
var _a;
|
183
|
-
return (_a = this.manager) === null || _a === void 0 ? void 0 : _a.canUndo();
|
198
|
+
return ((_a = this.manager) === null || _a === void 0 ? void 0 : _a.canUndo()) || false;
|
184
199
|
}
|
185
200
|
get canForward() {
|
186
201
|
var _a;
|
187
|
-
return (_a = this.manager) === null || _a === void 0 ? void 0 : _a.canRedo();
|
202
|
+
return ((_a = this.manager) === null || _a === void 0 ? void 0 : _a.canRedo()) || false;
|
188
203
|
}
|
189
204
|
setup() {
|
190
205
|
this.subscriptions.push(this.selection.onChange.subscribe(() => {
|
@@ -201,21 +216,27 @@ let Collaborate = class Collaborate {
|
|
201
216
|
}
|
202
217
|
back() {
|
203
218
|
if (this.canBack) {
|
204
|
-
this.scheduler.
|
205
|
-
|
206
|
-
|
219
|
+
this.scheduler.historyApplyTransact(() => {
|
220
|
+
var _a;
|
221
|
+
this.selection.unSelect();
|
222
|
+
(_a = this.manager) === null || _a === void 0 ? void 0 : _a.undo();
|
223
|
+
});
|
207
224
|
}
|
208
225
|
}
|
209
226
|
forward() {
|
210
227
|
if (this.canForward) {
|
211
|
-
this.scheduler.
|
212
|
-
|
213
|
-
|
228
|
+
this.scheduler.historyApplyTransact(() => {
|
229
|
+
var _a;
|
230
|
+
this.selection.unSelect();
|
231
|
+
(_a = this.manager) === null || _a === void 0 ? void 0 : _a.redo();
|
232
|
+
});
|
214
233
|
}
|
215
234
|
}
|
216
235
|
destroy() {
|
236
|
+
var _a;
|
217
237
|
this.subscriptions.forEach(i => i.unsubscribe());
|
218
238
|
this.collaborateCursor.destroy();
|
239
|
+
(_a = this.manager) === null || _a === void 0 ? void 0 : _a.destroy();
|
219
240
|
}
|
220
241
|
syncRootComponent() {
|
221
242
|
const root = this.yDoc.getText('content');
|
@@ -223,8 +244,19 @@ let Collaborate = class Collaborate {
|
|
223
244
|
this.manager = new UndoManager(root, {
|
224
245
|
trackedOrigins: new Set([this.yDoc])
|
225
246
|
});
|
247
|
+
this.manager.on('stack-item-added', () => {
|
248
|
+
if (this.manager.undoStack.length > this.stackSize) {
|
249
|
+
this.manager.undoStack.shift();
|
250
|
+
}
|
251
|
+
});
|
226
252
|
this.syncContent(root, rootComponent.slots.get(0));
|
227
|
-
this.subscriptions.push(this.scheduler.onDocChange.
|
253
|
+
this.subscriptions.push(this.scheduler.onDocChange.pipe(map(item => {
|
254
|
+
return item.filter(i => {
|
255
|
+
return i.from === ChangeOrigin.Local;
|
256
|
+
});
|
257
|
+
}), filter(item => {
|
258
|
+
return item.length;
|
259
|
+
})).subscribe(() => {
|
228
260
|
this.yDoc.transact(() => {
|
229
261
|
this.updateRemoteActions.forEach(fn => {
|
230
262
|
fn();
|
@@ -466,7 +498,7 @@ let Collaborate = class Collaborate {
|
|
466
498
|
});
|
467
499
|
}
|
468
500
|
runLocalUpdate(fn) {
|
469
|
-
if (this.updateFromRemote) {
|
501
|
+
if (this.updateFromRemote || this.controller.readonly) {
|
470
502
|
return;
|
471
503
|
}
|
472
504
|
this.updateRemoteActions.push(fn);
|
@@ -603,8 +635,10 @@ let Collaborate = class Collaborate {
|
|
603
635
|
};
|
604
636
|
Collaborate = __decorate([
|
605
637
|
Injectable(),
|
606
|
-
|
638
|
+
__param(0, Inject(HISTORY_STACK_SIZE)),
|
639
|
+
__metadata("design:paramtypes", [Number, RootComponentRef,
|
607
640
|
CollaborateCursor,
|
641
|
+
Controller,
|
608
642
|
Scheduler,
|
609
643
|
Translator,
|
610
644
|
Registry,
|
@@ -624,4 +658,4 @@ function makeFormats(registry, attrs) {
|
|
624
658
|
}
|
625
659
|
return formats;
|
626
660
|
}
|
627
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sbGFib3JhdGU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GZuKClcbiAgICAgICAgICB9KVxuICAgICAgICAgIHRoaXMudXBkYXRlUmVtb3RlQWN0aW9ucyA9IFtdXG4gICAgICAgIH0sIHRoaXMueURvYylcbiAgICAgIH0pXG4gICAgKVxuICB9XG5cbiAgcHJpdmF0ZSBzeW5jQ29udGVudChjb250ZW50OiBZVGV4dCwgc2xvdDogU2xvdCkge1xuICAgIGNvbnN0IHN5bmNSZW1vdGUgPSAoZXYsIHRyKSA9PiB7XG4gICAgICB0aGlzLnJ1blJlbW90ZVVwZGF0ZSh0ciwgKCkgPT4ge1xuICAgICAgICBzbG90LnJldGFpbigwKVxuICAgICAgICBldi5kZWx0YS5mb3JFYWNoKGFjdGlvbiA9PiB7XG4gICAgICAgICAgaWYgKFJlZmxlY3QuaGFzKGFjdGlvbiwgJ3JldGFpbicpKSB7XG4gICAgICAgICAgICBpZiAoYWN0aW9uLmF0dHJpYnV0ZXMpIHtcbiAgICAgICAgICAgICAgY29uc3QgZm9ybWF0cyA9IG1ha2VGb3JtYXRzKHRoaXMucmVnaXN0cnksIGFjdGlvbi5hdHRyaWJ1dGVzKVxuICAgICAgICAgICAgICBpZiAoZm9ybWF0cy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBzbG90LnJldGFpbihhY3Rpb24ucmV0YWluISwgZm9ybWF0cylcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgc2xvdC5yZXRhaW4oYWN0aW9uLnJldGFpbilcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2UgaWYgKGFjdGlvbi5pbnNlcnQpIHtcbiAgICAgICAgICAgIGNvbnN0IGluZGV4ID0gc2xvdC5pbmRleFxuICAgICAgICAgICAgbGV0IGxlbmd0aCA9IDFcbiAgICAgICAgICAgIGlmICh0eXBlb2YgYWN0aW9uLmluc2VydCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgbGVuZ3RoID0gYWN0aW9uLmluc2VydC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AgICAgICAgICBpZiAobGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgY29udGVudC5mb3JtYXQob2Zmc2V0LCBhY3Rpb24ub2Zmc2V0LCBmb3JtYXRzKVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBvZmZzZXQgPSBhY3Rpb24ub2Zmc2V0XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIGlmIChhY3Rpb24udHlwZSA9PT0gJ2luc2VydCcpIHtcbiAgICAgICAgICAgIGNvbnN0IGRlbHRhID0gY29udGVudC50b0RlbHRhKClcbiAgICAgICAgICAgIGNvbnN0IGlzRW1wdHkgPSBkZWx0YS5sZW5ndGggPT09IDEgJiYgZGVsdGFbMF0uaW5zZXJ0ID09PSBTbG90LmVtcHR5UGxhY2Vob2xkZXJcbiAgICAgICAgICAgIGlmICh0eXBlb2YgYWN0aW9uLmNvbnRlbnQgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgIGxlbmd0aCA9IGFjdGlvbi5jb250ZW50Lmxlbmd0aFxuICAgICAgICAgICAgICBjb250ZW50Lmluc2VydChvZmZzZXQsIGFjdGlvbi5jb250ZW50LCBhY3Rpb24uZm9ybWF0cyB8fCB7fSlcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIGxlbmd0aCA9IDFcbiAgICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gc2xvdC5nZXRDb250ZW50QXRJbmRleChvZmZzZXQpIGFzIENvbXBvbmVudEluc3RhbmNlXG4gICAgICAgICAgICAgIGNvbnN0IHNoYXJlZENvbXBvbmVudCA9IHRoaXMuY3JlYXRlU2hhcmVkQ29tcG9uZW50QnlDb21wb25lbnQoY29tcG9uZW50KVxuICAgICAgICAgICAgICBjb250ZW50Lmluc2VydEVtYmVkKG9mZnNldCwgc2hhcmVkQ29tcG9uZW50KVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoaXNFbXB0eSAmJiBvZmZzZXQgPT09IDApIHtcbiAgICAgICAgICAgICAgY29udGVudC5kZWxldGUoY29udGVudC5sZW5ndGggLSAxLCAxKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgb2Zmc2V0ICs9IGxlbmd0aFxuICAgICAgICAgIH0gZWxzZSBpZiAoYWN0aW9uLnR5cGUgPT09ICdkZWxldGUnKSB7XG4gICAgICAgICAgICBjb25zdCBkZWx0YSA9IGNvbnRlbnQudG9EZWx0YSgpXG4gICAgICAgICAgICBjb250ZW50LmRlbGV0ZShvZmZzZXQsIGFjdGlvbi5jb3VudClcbiAgICAgICAgICAgIGlmIChjb250ZW50Lmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgICBjb250ZW50Lmluc2VydCgwLCAnXFxuJywgZGVsdGFbMF0/LmF0dHJpYnV0ZXMpXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9KVxuICAgIH0pXG5cbiAgICBzdWIuYWRkKHNsb3Qub25DaGlsZENvbXBvbmVudFJlbW92ZS5zdWJzY3JpYmUoY29tcG9uZW50cyA9PiB7XG4gICAgICBjb21wb25lbnRzLmZvckVhY2goYyA9PiB7XG4gICAgICAgIHRoaXMuY2xlYW5TdWJzY3JpcHRpb25zQnlDb21wb25lbnQoYylcbiAgICAgIH0pXG4gICAgfSkpXG4gICAgdGhpcy5jb250ZW50U3luY0NhY2hlcy5zZXQoc2xvdCwgKCkgPT4ge1xuICAgICAgY29udGVudC51bm9ic2VydmUoc3luY1JlbW90ZSlcbiAgICAgIHN1Yi51bnN1YnNjcmliZSgpXG4gICAgfSlcbiAgfVxuXG4gIHByaXZhdGUgc3luY1Nsb3QocmVtb3RlU2xvdDogWU1hcDxhbnk+LCBzbG90OiBTbG90KSB7XG4gICAgY29uc3Qgc3luY1JlbW90ZSA9IChldiwgdHIpID0+IHtcbiAgICAgIHRoaXMucnVuUmVtb3RlVXBkYXRlKHRyLCAoKSA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G9jKVxuICAgICAgfSlcbiAgICApXG4gIH1cblxuICBwcml2YXRlIHN5bmNDb250ZW50KGNvbnRlbnQ6IFlUZXh0LCBzbG90OiBTbG90KSB7XG4gICAgY29uc3Qgc3luY1JlbW90ZSA9IChldiwgdHIpID0+IHtcbiAgICAgIHRoaXMucnVuUmVtb3RlVXBkYXRlKHRyLCAoKSA9PiB7XG4gICAgICAgIHNsb3QucmV0YWluKDApXG4gICAgICAgIGV2LmRlbHRhLmZvckVhY2goYWN0aW9uID0+IHtcbiAgICAgICAgICBpZiAoUmVmbGVjdC5oYXMoYWN0aW9uLCAncmV0YWluJykpIHtcbiAgICAgICAgICAgIGlmIChhY3Rpb24uYXR0cmlidXRlcykge1xuICAgICAgICAgICAgICBjb25zdCBmb3JtYXRzID0gbWFrZUZvcm1hdHModGhpcy5yZWdpc3RyeSwgYWN0aW9uLmF0dHJpYnV0ZXMpXG4gICAgICAgICAgICAgIGlmIChmb3JtYXRzLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgIHNsb3QucmV0YWluKGFjdGlvbi5yZXRhaW4hLCBmb3JtYXRzKVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBzbG90LnJldGFpbihhY3Rpb24ucmV0YWluKVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSBpZiAoYWN0aW9uLmluc2VydCkge1xuICAgICAgICAgICAgY29uc3QgaW5kZXggPSBzbG90LmluZGV4XG4gICAgICAgICAgICBsZXQgbGVuZ3RoID0gMVxuICAgICAgICAgICAgaWYgKHR5cGVvZiBhY3Rpb24uaW5zZXJ0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICBsZW5ndGggPSBhY3Rpb24uaW5zZXJ0Lmxlbmd0aFxuICAgICAgICAgICAgICBzbG90Lmluc2VydChhY3Rpb24uaW5zZXJ0LCBtYWtlRm9ybWF0cyh0aGlzLnJlZ2lzdHJ5LCBhY3Rpb24uYXR0c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ICAgICAgICBPYmplY3QuYXNzaWduKGRyYWZ0LCBhY3Rpb24uYXR0cmlidXRlcylcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgfVxuICAgICAgICB9KVxuICAgICAgfSlcbiAgICB9XG4gICAgY29udGVudC5vYnNlcnZlKHN5bmNSZW1vdGUpXG5cbiAgICBjb25zdCBzdWIgPSBzbG90Lm9uQ29udGVudENoYW5nZS5zdWJzY3JpYmUoYWN0aW9ucyA9PiB7XG4gICAgICB0aGlzLnJ1bkxvY2FsVXBkYXRlKCgpID0+IHtcbiAgICAgICAgbGV0IG9mZnNldCA9IDBcbiAgICAgICAgbGV0IGxlbmd0aCA9IDBcbiAgICAgICAgZm9yIChjb25zdCBhY3Rpb24gb2YgYWN0aW9ucykge1xuICAgICAgICAgIGlmIChhY3Rpb24udHlwZSA9PT0gJ3JldGFpbicpIHtcbiAgICAgICAgICAgIGNvbnN0IGZvcm1hdHMgPSBhY3Rpb24uZm9ybWF0c1xuICAgICAgICAgICAgaWYgKGZvcm1hdHMpIHtcbiAgICAgICAgICAgICAgY29uc3Qga2V5cyA9IE9iamVjdC5rZXlzKGZvcm1hdHMpXG4gICAgICAgICAgICAgIGxldCBsZW5ndGggPSBrZXlzLmxlbmd0aFxuICAgICAgICAgICAgICBrZXlzLmZvckVhY2goa2V5ID0+IHtcbiAgICAgICAgICAgICAgICBpZiAoIXRoaXMucmVnaXN0cnkuZ2V0Rm9ybWF0dGVyKGtleSkpIHtcbiAgICAgICAgICAgICAgICAgIGxlbmd0aC0tXG4gICAgICAgICAgICAgICAgICBSZWZsZWN0LmRlbGV0ZVByb3BlcnR5KGZvcm1hdHMsIGtleSlcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgIGlmIChsZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBjb250ZW50LmZvcm1hdChvZmZzZXQsIGFjdGlvbi5vZmZzZXQsIGZvcm1hdHMpXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIG9mZnNldCA9IGFjdGlvbi5vZmZzZXRcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2UgaWYgKGFjdGlvbi50eXBlID09PSAnaW5zZXJ0Jykge1xuICAgICAgICAgICAgY29uc3QgZGVsdGEgPSBjb250ZW50LnRvRGVsdGEoKVxuICAgICAgICAgICAgY29uc3QgaXNFbXB0eSA9IGRlbHRhLmxlbmd0aCA9PT0gMSAmJiBkZWx0YVswXS5pbnNlcnQgPT09IFNsb3QuZW1wdHlQbGFjZWhvbGRlclxuICAgICAgICAgICAgaWYgKHR5cGVvZiBhY3Rpb24uY29udGVudCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgbGVuZ3RoID0gYWN0aW9uLmNvbnRlbnQubGVuZ3RoXG4gICAgICAgICAgICAgIGNvbnRlbnQuaW5zZXJ0KG9mZnNldCwgYWN0aW9uLmNvbnRlbnQsIGFjdGlvbi5mb3JtYXRzIHx8IHt9KVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgbGVuZ3RoID0gMVxuICAgICAgICAgICAgICBjb25zdCBjb21wb25lbnQgPSBzbG90LmdldENvbnRlbnRBdEluZGV4KG9mZnNldCkgYXMgQ29tcG9uZW50SW5zdGFuY2VcbiAgICAgICAgICAgICAgY29uc3Qgc2hhcmVkQ29tcG9uZW50ID0gdGhpcy5jcmVhdGVTaGFyZWRDb21wb25lbnRCeUNvbXBvbmVudChjb21wb25lbnQpXG4gICAgICAgICAgICAgIGNvbnRlbnQuaW5zZXJ0RW1iZWQob2Zmc2V0LCBzaGFyZWRDb21wb25lbnQpXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChpc0VtcHR5ICYmIG9mZnNldCA9PT0gMCkge1xuICAgICAgICAgICAgICBjb250ZW50LmRlbGV0ZShjb250ZW50Lmxlbmd0aCAtIDEsIDEpXG4gICAgICAgICAgICB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gPT4ge1xuICAgICAgICAgIGlmIChSZWZsZWN0LmhhcyhhY3Rpb24sICdyZXRhaW4nKSkge1xuICAgICAgICAgICAgaW5kZXggKz0gYWN0aW9uLnJldGFpblxuICAgICAgICAgICAgc2xvdHMucmV0YWluKGluZGV4KVxuICAgICAgICAgIH0gZWxzZSBpZiAoYWN0aW9uLmluc2VydCkge1xuICAgICAgICAgICAgKGFjdGlvbi5pbnNlcnQgYXMgQXJyYXk8WU1hcDxhbnk+PikuZm9yRWFjaChpdGVtID0+IHtcbiAgICAgICAgICAgICAgY29uc3Qgc2xvdCA9IHRoaXMuY3JlYXRlU2xvdEJ5U2hhcmVkU2xvdChpdGVtKVxuICAgICAgICAgICAgICBzbG90cy5pbnNlcnQoc2xvdClcbiAgICAgICAgICAgICAgdGhpcy5zeW5jQ29udGVudChpdGVtLmdldCgnY29udGVudCcpLCBzbG90KVxuICAgICAgICAgICAgICB0aGlzLnN5bmNTbG90KGl0ZW0sIHNsb3QpXG4gICAgICAgICAgICAgIGluZGV4KytcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgfSBlbHNlIGlmIChhY3Rpb24uZGVsZXRlKSB7XG4gICAgICAgICAgICBzbG90cy5yZXRhaW4oaW5kZXgpXG4gICAgICAgICAgICBzbG90cy5kZWxldGUoYWN0aW9uLmRlbGV0ZSlcbiAgICAgICAgICB9XG4gICAgICAgIH0pXG4gICAgICB9KVxuICAgIH1cbiAgICByZW1vdGVTbG90cy5vYnNlcnZlKHN5bmNSZW1vdGUpXG5cbiAgICBjb25zdCBzdWIgPSBzbG90cy5vbkNoYW5nZS5zdWJzY3JpYmUob3BlcmF0aW9ucyA9PiB7XG4gICAgICB0aGlzLnJ1bkxvY2FsVXBkYXRlKCgpID0+IHtcbiAgICAgICAgY29uc3QgYXBwbHlBY3Rpb25zID0gb3BlcmF0aW9ucy5hcHBseVxuICAgICAgICBsZXQgaW5kZXg6IG51bWJlclxuICAgICAgICBhcHBseUFjdGlvbnMuZm9yRWFjaChhY3Rpb24gPT4ge1xuICAgICAgICAgIGlmIChhY3Rpb24udHlwZSA9PT0gJ3JldGFpbicpIHtcbiAgICAgICAgICAgIGluZGV4ID0gYWN0aW9uLm9mZnNldFxuICAgICAgICAgIH0gZWxzZSBpZiAoYWN0aW9uLnR5cGUgPT09ICdpbnNlcnRTbG90Jykge1xuICAgICAgICAgICAgY29uc3Qgc2xvdCA9IHNsb3RzLmdldChpbmRleCkhXG4gICAgICAgICAgICBjb25zdCBzaGFyZWRTbG90ID0gdGhpcy5jcmVhdGVTaGFyZWRTbG90QnlTbG90KHNsb3QpXG4gICAgICAgICAgICByZW1vdGVTbG90cy5pbnNlcnQoaW5kZXgsIFtzaGFyZWRTbG90XSlcbiAgICAgICAgICAgIGluZGV4KytcbiAgICAgICAgICB9IGVsc2UgaWYgKGFjdGlvbi50eXBlID09PSAnZGVsZXRlJykge1xuICAgICAgICAgICAgcmVtb3RlU2xvdHMuZGVsZXRlKGluZGV4LCBhY3Rpb24uY291bnQpXG4gICAgICAgICAgfVxuICAgICAgICB9KVxuICAgICAgfSlcbiAgICB9KVxuXG4gICAgc3ViLmFkZChzbG90cy5vbkNoaWxkU2xvdFJlbW92ZS5zdWJzY3JpYmUoc2xvdHMgPT4ge1xuICAgICAgc2xvdHMuZm9yRWFjaChzbG90ID0+IHtcbiAgICAgICAgdGhpcy5jbGVhblN1YnNjcmlwdGlvbnNCeVNsb3Qoc2xvdClcbiAgICAgIH0pXG4gICAgfSkpXG5cbiAgICB0aGlzLnNsb3RzU3luY0NhY2hlcy5zZXQoY29tcG9uZW50LCAoKSA9PiB7XG4gICAgICByZW1vdGVTbG90cy51bm9ic2VydmUoc3luY1JlbW90ZSlcbiAgICAgIHN1Yi51bnN1YnNjcmliZSgpXG4gICAgfSlcbiAgfVxuXG4gIHByaXZhdGUgc3luY0NvbXBvbmVudChyZW1vdGVDb21wb25lbnQ6IFlNYXA8YW55PiwgY29tcG9uZW50OiBDb21wb25lbnRJbnN0YW5jZSkge1xu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package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@textbus/collaborate",
|
3
|
-
"version": "2.0.0-beta.
|
3
|
+
"version": "2.0.0-beta.36",
|
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.1.1",
|
29
|
-
"@tanbo/stream": "^1.
|
30
|
-
"@textbus/browser": "^2.0.0-beta.
|
31
|
-
"@textbus/core": "^2.0.0-beta.
|
29
|
+
"@tanbo/stream": "^1.1.2",
|
30
|
+
"@textbus/browser": "^2.0.0-beta.36",
|
31
|
+
"@textbus/core": "^2.0.0-beta.36",
|
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": "f59b58ff16a4f880c29ca996c0e7c755ba85dea3"
|
48
48
|
}
|
@@ -190,14 +190,18 @@ export class CollaborateCursor {
|
|
190
190
|
|
191
191
|
const cursorRect = getLayoutRectByRange(cursorRange)
|
192
192
|
|
193
|
-
|
193
|
+
const rect: SelectionRect = {
|
194
194
|
username: item.username,
|
195
195
|
color: item.color,
|
196
196
|
x: cursorRect.x - containerRect.x,
|
197
197
|
y: cursorRect.y - containerRect.y,
|
198
198
|
width: 2,
|
199
199
|
height: cursorRect.height
|
200
|
-
}
|
200
|
+
}
|
201
|
+
if (rect.x < 0 || rect.y < 0 || rect.x > containerRect.width) {
|
202
|
+
return
|
203
|
+
}
|
204
|
+
users.push(rect)
|
201
205
|
})
|
202
206
|
this.drawUserCursor(users)
|
203
207
|
}
|
package/src/collaborate.ts
CHANGED
@@ -1,10 +1,11 @@
|
|
1
|
-
import { Injectable } from '@tanbo/di'
|
2
|
-
import { delay, Observable, Subject, Subscription } from '@tanbo/stream'
|
1
|
+
import { Inject, Injectable } from '@tanbo/di'
|
2
|
+
import { delay, filter, map, Observable, Subject, Subscription } from '@tanbo/stream'
|
3
3
|
import {
|
4
|
+
ChangeOrigin,
|
4
5
|
ComponentInstance,
|
5
|
-
ContentType,
|
6
|
+
ContentType, Controller,
|
6
7
|
Formats,
|
7
|
-
History,
|
8
|
+
History, HISTORY_STACK_SIZE,
|
8
9
|
makeError,
|
9
10
|
Registry,
|
10
11
|
RootComponentRef,
|
@@ -32,11 +33,11 @@ export class Collaborate implements History {
|
|
32
33
|
onPush: Observable<void>
|
33
34
|
|
34
35
|
get canBack() {
|
35
|
-
return this.manager?.canUndo()
|
36
|
+
return this.manager?.canUndo() || false
|
36
37
|
}
|
37
38
|
|
38
39
|
get canForward() {
|
39
|
-
return this.manager?.canRedo()
|
40
|
+
return this.manager?.canRedo() || false
|
40
41
|
}
|
41
42
|
|
42
43
|
private backEvent = new Subject<void>()
|
@@ -44,7 +45,7 @@ export class Collaborate implements History {
|
|
44
45
|
private changeEvent = new Subject<void>()
|
45
46
|
private pushEvent = new Subject<void>()
|
46
47
|
|
47
|
-
private manager
|
48
|
+
private manager: UndoManager | null = null
|
48
49
|
|
49
50
|
private subscriptions: Subscription[] = []
|
50
51
|
private updateFromRemote = false
|
@@ -58,8 +59,10 @@ export class Collaborate implements History {
|
|
58
59
|
|
59
60
|
private updateRemoteActions: Array<() => void> = []
|
60
61
|
|
61
|
-
constructor(private
|
62
|
+
constructor(@Inject(HISTORY_STACK_SIZE) private stackSize: number,
|
63
|
+
private rootComponentRef: RootComponentRef,
|
62
64
|
private collaborateCursor: CollaborateCursor,
|
65
|
+
private controller: Controller,
|
63
66
|
private scheduler: Scheduler,
|
64
67
|
private translator: Translator,
|
65
68
|
private registry: Registry,
|
@@ -92,23 +95,26 @@ export class Collaborate implements History {
|
|
92
95
|
|
93
96
|
back() {
|
94
97
|
if (this.canBack) {
|
95
|
-
this.scheduler.
|
96
|
-
|
97
|
-
|
98
|
+
this.scheduler.historyApplyTransact(() => {
|
99
|
+
this.selection.unSelect()
|
100
|
+
this.manager?.undo()
|
101
|
+
})
|
98
102
|
}
|
99
103
|
}
|
100
104
|
|
101
105
|
forward() {
|
102
106
|
if (this.canForward) {
|
103
|
-
this.scheduler.
|
104
|
-
|
105
|
-
|
107
|
+
this.scheduler.historyApplyTransact(() => {
|
108
|
+
this.selection.unSelect()
|
109
|
+
this.manager?.redo()
|
110
|
+
})
|
106
111
|
}
|
107
112
|
}
|
108
113
|
|
109
114
|
destroy() {
|
110
115
|
this.subscriptions.forEach(i => i.unsubscribe())
|
111
116
|
this.collaborateCursor.destroy()
|
117
|
+
this.manager?.destroy()
|
112
118
|
}
|
113
119
|
|
114
120
|
private syncRootComponent() {
|
@@ -117,10 +123,24 @@ export class Collaborate implements History {
|
|
117
123
|
this.manager = new UndoManager(root, {
|
118
124
|
trackedOrigins: new Set<any>([this.yDoc])
|
119
125
|
})
|
126
|
+
this.manager.on('stack-item-added', () => {
|
127
|
+
if (this.manager!.undoStack.length > this.stackSize) {
|
128
|
+
this.manager!.undoStack.shift()
|
129
|
+
}
|
130
|
+
})
|
120
131
|
this.syncContent(root, rootComponent.slots.get(0)!)
|
121
132
|
|
122
133
|
this.subscriptions.push(
|
123
|
-
this.scheduler.onDocChange.
|
134
|
+
this.scheduler.onDocChange.pipe(
|
135
|
+
map(item => {
|
136
|
+
return item.filter(i => {
|
137
|
+
return i.from === ChangeOrigin.Local
|
138
|
+
})
|
139
|
+
}),
|
140
|
+
filter(item => {
|
141
|
+
return item.length
|
142
|
+
})
|
143
|
+
).subscribe(() => {
|
124
144
|
this.yDoc.transact(() => {
|
125
145
|
this.updateRemoteActions.forEach(fn => {
|
126
146
|
fn()
|
@@ -362,7 +382,7 @@ export class Collaborate implements History {
|
|
362
382
|
}
|
363
383
|
|
364
384
|
private runLocalUpdate(fn: () => void) {
|
365
|
-
if (this.updateFromRemote) {
|
385
|
+
if (this.updateFromRemote || this.controller.readonly) {
|
366
386
|
return
|
367
387
|
}
|
368
388
|
this.updateRemoteActions.push(fn)
|