@textbus/collaborate 2.0.0-beta.51 → 2.0.0-beta.54
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
|
|
1
1
|
import { SelectionBridge } from '@textbus/browser';
|
2
|
-
import { Selection, SelectionPaths, Range as TBRange } from '@textbus/core';
|
2
|
+
import { Selection, SelectionPaths, Range as TBRange, Scheduler } from '@textbus/core';
|
3
3
|
export interface RemoteSelection {
|
4
4
|
color: string;
|
5
5
|
username: string;
|
@@ -20,13 +20,14 @@ export interface RemoteSelectionCursor {
|
|
20
20
|
anchor: HTMLElement;
|
21
21
|
userTip: HTMLElement;
|
22
22
|
}
|
23
|
-
export declare abstract class
|
23
|
+
export declare abstract class CollaborateSelectionAwarenessDelegate {
|
24
24
|
abstract getRects(range: TBRange, nativeRange: Range): false | Rect[];
|
25
25
|
}
|
26
26
|
export declare class CollaborateCursor {
|
27
27
|
private container;
|
28
28
|
private awarenessDelegate;
|
29
29
|
private nativeSelection;
|
30
|
+
private scheduler;
|
30
31
|
private selection;
|
31
32
|
private host;
|
32
33
|
private canvasContainer;
|
@@ -36,7 +37,7 @@ export declare class CollaborateCursor {
|
|
36
37
|
private onRectsChange;
|
37
38
|
private subscription;
|
38
39
|
private currentSelection;
|
39
|
-
constructor(container: HTMLElement, awarenessDelegate:
|
40
|
+
constructor(container: HTMLElement, awarenessDelegate: CollaborateSelectionAwarenessDelegate, nativeSelection: SelectionBridge, scheduler: Scheduler, selection: Selection);
|
40
41
|
refresh(): void;
|
41
42
|
destroy(): void;
|
42
43
|
draw(paths: RemoteSelection[]): void;
|
@@ -12,15 +12,16 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
12
|
};
|
13
13
|
import { Inject, Injectable, Optional } from '@tanbo/di';
|
14
14
|
import { createElement, VIEW_CONTAINER, getLayoutRectByRange, SelectionBridge } from '@textbus/browser';
|
15
|
-
import { Selection } from '@textbus/core';
|
15
|
+
import { Selection, Scheduler } from '@textbus/core';
|
16
16
|
import { fromEvent, Subject, Subscription } from '@tanbo/stream';
|
17
|
-
export class
|
17
|
+
export class CollaborateSelectionAwarenessDelegate {
|
18
18
|
}
|
19
19
|
let CollaborateCursor = class CollaborateCursor {
|
20
|
-
constructor(container, awarenessDelegate, nativeSelection, selection) {
|
20
|
+
constructor(container, awarenessDelegate, nativeSelection, scheduler, selection) {
|
21
21
|
this.container = container;
|
22
22
|
this.awarenessDelegate = awarenessDelegate;
|
23
23
|
this.nativeSelection = nativeSelection;
|
24
|
+
this.scheduler = scheduler;
|
24
25
|
this.selection = selection;
|
25
26
|
this.host = createElement('div', {
|
26
27
|
styles: {
|
@@ -84,6 +85,8 @@ let CollaborateCursor = class CollaborateCursor {
|
|
84
85
|
}), fromEvent(window, 'resize').subscribe(() => {
|
85
86
|
this.canvas.style.height = document.documentElement.clientHeight + 'px';
|
86
87
|
this.refresh();
|
88
|
+
}), this.scheduler.onDocChanged.subscribe(() => {
|
89
|
+
this.refresh();
|
87
90
|
}));
|
88
91
|
}
|
89
92
|
refresh() {
|
@@ -259,9 +262,10 @@ CollaborateCursor = __decorate([
|
|
259
262
|
__param(0, Inject(VIEW_CONTAINER)),
|
260
263
|
__param(1, Optional()),
|
261
264
|
__metadata("design:paramtypes", [HTMLElement,
|
262
|
-
|
265
|
+
CollaborateSelectionAwarenessDelegate,
|
263
266
|
SelectionBridge,
|
267
|
+
Scheduler,
|
264
268
|
Selection])
|
265
269
|
], CollaborateCursor);
|
266
270
|
export { CollaborateCursor };
|
267
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sbGFib3JhdGUtY3Vyc29yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2NvbGxhYm9yYXRlLWN1cnNvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7QUFBQSxPQUFPLEVBQUUsTUFBTSxFQUFFLFVBQVUsRUFBRSxRQUFRLEVBQUUsTUF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M6IHtcbiAgICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICAgIGRpc3BsYXk6ICdub25lJyxcbiAgICAgICAgbGVmdDogJzUwJScsXG4gICAgICAgIHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoLTUwJSknLFxuICAgICAgICBtYXJnaW5Cb3R0b206ICcycHgnLFxuICAgICAgICBib3R0b206ICcxMDAlJyxcbiAgICAgICAgd2hpdGVTcGFjZTogJ25vd3JhcCcsXG4gICAgICAgIGNvbG9yOiAnI2ZmZicsXG4gICAgICAgIGJveFNoYWRvdzogJzAgMXB4IDJweCByZ2JhKDAsMCwwLC4xKScsXG4gICAgICAgIGJvcmRlclJhZGl1czogJzNweCcsXG4gICAgICAgIHBhZGRpbmc6ICczcHggNXB4JyxcbiAgICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgfVxuICAgIH0pXG5cbiAgICBjb25zdCBhbmNob3IgPSBjcmVhdGVFbGVtZW50KCdzcGFuJywge1xuICAgICAgc3R5bGVzOiB7XG4gICAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgICB0b3A6ICctMnB4JyxcbiAgICAgICAgbGVmdDogJy0ycHgnLFxuICAgICAgICB3aWR0aDogJzZweCcsXG4gICAgICAgIGhlaWdodDogJzZweCcsXG4gICAgICAgIHBvaW50ZXJFdmVudHM6ICdhdXRvJyxcbiAgICAgICAgcG9pbnRlcjogJ2N1cnNvcicsXG4gICAgICB9LFxuICAgICAgY2hpbGRyZW46IFt1c2VyVGlwXSxcbiAgICAgIG9uOiB7XG4gICAgICAgIG1vdXNlZW50ZXIoKSB7XG4gICAgICAgICAgdXNlclRpcC5zdHlsZS5kaXNwbGF5ID0gJ2Jsb2NrJ1xuICAgICAgICB9LFxuICAgICAgICBtb3VzZWxlYXZlKCkge1xuICAgICAgICAgIHVzZXJUaXAuc3R5bGUuZGlzcGxheSA9ICdub25lJ1xuICAgICAgICB9XG4gICAgICB9XG4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sIHtcbiAgICAgIHN0eWxlczoge1xuICAgICAgICBwb3NpdGlvbjogJ2Fic29sdXRlJyxcbiAgICAgIH0sXG4gICAgICBjaGlsZHJlbjogW1xuICAgICAgICBhbmNob3JcbiAgICAgIF1cbiAgICB9KVxuICAgIHRoaXMudG9vbHRpcHMuYXBwZW5kKGNoaWxkKVxuICAgIHJldHVybiB7XG4gICAgICBjdXJzb3I6IGNoaWxkLFxuICAgICAgYW5jaG9yLFxuICAgICAgdXNlclRpcFxuICAgIH1cbiAgfVxufVxuIl19
|
package/bundles/collaborate.d.ts
CHANGED
@@ -16,7 +16,7 @@ export declare class Collaborate implements History {
|
|
16
16
|
yDoc: YDoc;
|
17
17
|
onBack: Observable<void>;
|
18
18
|
onForward: Observable<void>;
|
19
|
-
onChange: Observable<
|
19
|
+
onChange: Observable<void>;
|
20
20
|
onPush: Observable<void>;
|
21
21
|
get canBack(): boolean;
|
22
22
|
get canForward(): boolean;
|
@@ -35,9 +35,8 @@ export declare class Collaborate implements History {
|
|
35
35
|
private contentMap;
|
36
36
|
private updateRemoteActions;
|
37
37
|
constructor(stackSize: number, rootComponentRef: RootComponentRef, collaborateCursor: CollaborateCursor, controller: Controller, scheduler: Scheduler, translator: Translator, registry: Registry, selection: Selection, starter: Starter);
|
38
|
-
sync(): void;
|
39
|
-
updateRemoteSelection(paths: RemoteSelection[]): void;
|
40
38
|
listen(): void;
|
39
|
+
updateRemoteSelection(paths: RemoteSelection[]): void;
|
41
40
|
back(): void;
|
42
41
|
forward(): void;
|
43
42
|
clear(): void;
|
package/bundles/collaborate.js
CHANGED
@@ -95,19 +95,51 @@ let Collaborate = class Collaborate {
|
|
95
95
|
var _a;
|
96
96
|
return ((_a = this.manager) === null || _a === void 0 ? void 0 : _a.canRedo()) || false;
|
97
97
|
}
|
98
|
-
|
98
|
+
listen() {
|
99
|
+
const root = this.yDoc.getMap('RootComponent');
|
100
|
+
const rootComponent = this.rootComponentRef.component;
|
101
|
+
this.manager = new UndoManager(root, {
|
102
|
+
trackedOrigins: new Set([this.yDoc])
|
103
|
+
});
|
104
|
+
const cursorKey = 'cursor-position';
|
105
|
+
this.manager.on('stack-item-added', event => {
|
106
|
+
event.stackItem.meta.set(cursorKey, this.getRelativeCursorLocation());
|
107
|
+
if (this.manager.undoStack.length > this.stackSize) {
|
108
|
+
this.manager.undoStack.shift();
|
109
|
+
}
|
110
|
+
if (event.origin === this.yDoc) {
|
111
|
+
this.pushEvent.next();
|
112
|
+
}
|
113
|
+
this.changeEvent.next();
|
114
|
+
});
|
115
|
+
this.manager.on('stack-item-popped', event => {
|
116
|
+
const position = event.stackItem.meta.get(cursorKey);
|
117
|
+
if (position) {
|
118
|
+
this.restoreCursorLocation(position);
|
119
|
+
}
|
120
|
+
});
|
99
121
|
this.subscriptions.push(this.selection.onChange.subscribe(() => {
|
100
122
|
const paths = this.selection.getPaths();
|
101
123
|
this.selectionChangeEvent.next(paths);
|
124
|
+
}), this.scheduler.onDocChanged.pipe(map(item => {
|
125
|
+
return item.filter(i => {
|
126
|
+
return i.from !== ChangeOrigin.Remote;
|
127
|
+
});
|
128
|
+
}), filter(item => {
|
129
|
+
return item.length;
|
130
|
+
})).subscribe(() => {
|
131
|
+
this.yDoc.transact(() => {
|
132
|
+
this.updateRemoteActions.forEach(fn => {
|
133
|
+
fn();
|
134
|
+
});
|
135
|
+
this.updateRemoteActions = [];
|
136
|
+
}, this.yDoc);
|
102
137
|
}));
|
103
|
-
this.syncRootComponent();
|
138
|
+
this.syncRootComponent(root, rootComponent);
|
104
139
|
}
|
105
140
|
updateRemoteSelection(paths) {
|
106
141
|
this.collaborateCursor.draw(paths);
|
107
142
|
}
|
108
|
-
listen() {
|
109
|
-
//
|
110
|
-
}
|
111
143
|
back() {
|
112
144
|
var _a;
|
113
145
|
if (this.canBack) {
|
@@ -133,29 +165,7 @@ let Collaborate = class Collaborate {
|
|
133
165
|
this.collaborateCursor.destroy();
|
134
166
|
(_a = this.manager) === null || _a === void 0 ? void 0 : _a.destroy();
|
135
167
|
}
|
136
|
-
syncRootComponent() {
|
137
|
-
const root = this.yDoc.getMap('RootComponent');
|
138
|
-
const rootComponent = this.rootComponentRef.component;
|
139
|
-
this.manager = new UndoManager(root, {
|
140
|
-
trackedOrigins: new Set([this.yDoc])
|
141
|
-
});
|
142
|
-
const cursorKey = 'cursor-position';
|
143
|
-
this.manager.on('stack-item-added', event => {
|
144
|
-
event.stackItem.meta.set(cursorKey, this.getRelativeCursorLocation());
|
145
|
-
if (this.manager.undoStack.length > this.stackSize) {
|
146
|
-
this.manager.undoStack.shift();
|
147
|
-
}
|
148
|
-
if (event.origin === this.yDoc) {
|
149
|
-
this.pushEvent.next();
|
150
|
-
}
|
151
|
-
this.changeEvent.next();
|
152
|
-
});
|
153
|
-
this.manager.on('stack-item-popped', event => {
|
154
|
-
const position = event.stackItem.meta.get(cursorKey);
|
155
|
-
if (position) {
|
156
|
-
this.restoreCursorLocation(position);
|
157
|
-
}
|
158
|
-
});
|
168
|
+
syncRootComponent(root, rootComponent) {
|
159
169
|
let slots = root.get('slots');
|
160
170
|
if (!slots) {
|
161
171
|
slots = new YArray();
|
@@ -193,20 +203,6 @@ let Collaborate = class Collaborate {
|
|
193
203
|
}
|
194
204
|
this.syncComponent(root, rootComponent);
|
195
205
|
this.syncSlots(slots, rootComponent);
|
196
|
-
this.subscriptions.push(this.scheduler.onDocChanged.pipe(map(item => {
|
197
|
-
return item.filter(i => {
|
198
|
-
return i.from !== ChangeOrigin.Remote;
|
199
|
-
});
|
200
|
-
}), filter(item => {
|
201
|
-
return item.length;
|
202
|
-
})).subscribe(() => {
|
203
|
-
this.yDoc.transact(() => {
|
204
|
-
this.updateRemoteActions.forEach(fn => {
|
205
|
-
fn();
|
206
|
-
});
|
207
|
-
this.updateRemoteActions = [];
|
208
|
-
}, this.yDoc);
|
209
|
-
}));
|
210
206
|
}
|
211
207
|
restoreCursorLocation(position) {
|
212
208
|
const anchorPosition = createAbsolutePositionFromRelativePosition(position.anchor, this.yDoc);
|
@@ -216,8 +212,10 @@ let Collaborate = class Collaborate {
|
|
216
212
|
const anchorSlot = this.contentMap.get(anchorPosition.type);
|
217
213
|
if (focusSlot && anchorSlot) {
|
218
214
|
this.selection.setBaseAndExtent(anchorSlot, anchorPosition.index, focusSlot, focusPosition.index);
|
215
|
+
return;
|
219
216
|
}
|
220
217
|
}
|
218
|
+
this.selection.unSelect();
|
221
219
|
}
|
222
220
|
getRelativeCursorLocation() {
|
223
221
|
const { anchorSlot, anchorOffset, focusSlot, focusOffset } = this.selection;
|
@@ -251,6 +249,7 @@ let Collaborate = class Collaborate {
|
|
251
249
|
if (formats.length) {
|
252
250
|
slot.retain(action.retain, formats);
|
253
251
|
}
|
252
|
+
slot.retain(slot.index + action.retain);
|
254
253
|
}
|
255
254
|
else {
|
256
255
|
slot.retain(action.retain);
|
@@ -295,7 +294,12 @@ let Collaborate = class Collaborate {
|
|
295
294
|
}
|
296
295
|
else if (action.attributes) {
|
297
296
|
slot.updateState(draft => {
|
298
|
-
|
297
|
+
if (typeof draft === 'object' && draft !== null) {
|
298
|
+
Object.assign(draft, action.attributes);
|
299
|
+
}
|
300
|
+
else {
|
301
|
+
return action.attributes;
|
302
|
+
}
|
299
303
|
});
|
300
304
|
}
|
301
305
|
});
|
@@ -373,7 +377,12 @@ let Collaborate = class Collaborate {
|
|
373
377
|
if (key === 'state') {
|
374
378
|
const state = ev.target.get('state');
|
375
379
|
slot.updateState(draft => {
|
376
|
-
|
380
|
+
if (typeof draft === 'object' && draft !== null) {
|
381
|
+
Object.assign(draft, state);
|
382
|
+
}
|
383
|
+
else {
|
384
|
+
return state;
|
385
|
+
}
|
377
386
|
});
|
378
387
|
}
|
379
388
|
});
|
@@ -455,7 +464,12 @@ let Collaborate = class Collaborate {
|
|
455
464
|
if (key === 'state') {
|
456
465
|
const state = ev.target.get('state');
|
457
466
|
component.updateState(draft => {
|
458
|
-
|
467
|
+
if (typeof draft === 'object' && draft !== null) {
|
468
|
+
Object.assign(draft, state);
|
469
|
+
}
|
470
|
+
else {
|
471
|
+
return state;
|
472
|
+
}
|
459
473
|
});
|
460
474
|
}
|
461
475
|
});
|
@@ -639,4 +653,4 @@ function makeFormats(registry, attrs) {
|
|
639
653
|
}
|
640
654
|
return formats;
|
641
655
|
}
|
642
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sbGFib3JhdGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvY29sbGFib3JhdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O0FBQUEsT0FBTyxFQUFFLE1BQU0sRUFBRSxVQUFVLEVBQUUsTUFBTSxXQUFXLENBQUE7QUFDOUMsT0FBTyxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUUsR0FBRyxFQUFjLE9BQU8sRUFBZ0IsTUFBTSxlQUFlLENBQUE7QUFDckYsT0FBTyxFQUNMLFlBQVksRUFFWixXQUFXLEVBQUUsVUFBVSxFQUVkLGtCQUFrQixFQUMzQixTQUFTLEVBQ1QsUUFBUSxFQUNSLGdCQUFnQixFQUNoQixTQUFTLEVBQ1QsU0FBUyxFQUVULElBQUksRUFDSixPQUFPLEVBQ1AsVUFBVSxFQUNYLE1BQU0sZUFBZSxDQUFBO0FBQ3RCLE9BQU8sRUFDTCxLQUFLLElBQUksTUFBTSxFQUNmLEdBQUcsSUFBSSxJQUFJLEVBQ1gsR0FBRyxJQUFJLElBQUksRUFFWCxJQUFJLElBQUksS0FBSyxFQUViLFdBQVcsRUFDWCwwQ0FBMEMsRUFDMUMsbUNBQW1DLEVBQ3BDLE1BQU0sS0FBSyxDQUFBO0FBRVosT0FBTyxFQUFFLGlCQUFpQixFQUFtQixNQUFNLHNCQUFzQixDQUFBO0FBQ3pFLE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxNQUFNLHFCQUFxQixDQUFBO0FBRTVELE1BQU0sa0JBQWtCLEdBQ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lcbiAgICB9IGVsc2Uge1xuICAgICAgcm9vdENvbXBvbmVudC51cGRhdGVTdGF0ZSgoKSA9PiB7XG4gICAgICAgIHJldHVybiByb290LmdldCgnc3RhdGUnKVxuICAgICAgfSlcbiAgICAgIHJvb3RDb21wb25lbnQuc2xvdHMuY2xlYW4oKVxuICAgICAgc2xvdHMuZm9yRWFjaChzaGFyZWRTbG90ID0+IHtcbiAgICAgICAgY29uc3Qgc2xvdCA9IHRoaXMuY3JlYXRlU2xvdEJ5U2hhcmVkU2xvdChzaGFyZWRTbG90KVxuICAgICAgICB0aGlzLnN5bmNDb250ZW50KHNoYXJlZFNsb3QuZ2V0KCdjb250ZW50JyksIHNsb3QpXG4gICAgICAgIHRoaXMuc3luY1Nsb3Qoc2hhcmVkU2xvdCwgc2xvdClcbiAgICAgICAgcm9vdENvbXBvbmVudC5zbG90cy5pbnNlcnQoc2xvdClcbiAgICAgIH0pXG4gICAgfVxuICAgIHRoaXMuc3luY0NvbXBvbmVudChyb290LCByb290Q29tcG9uZW50KVxuICAgIHRoaXMuc3luY1Nsb3RzKHNsb3RzLCByb290Q29tcG9uZW50KVxuXG4gICAgdGhpcy5zdWJzY3JpcHRpb25zLnB1c2goXG4gICAgICB0aGlzLnNjaGVkdWxlci5vbkRvY0NoYW5nZWQucGlwZShcbiAgICAgICAgbWFwKGl0ZW0gPT4ge1xuICAgICAgICAgIHJldHVybiBpdGVtLmZpbHRlcihpID0+IHtcbiAgICAgICAgICAgIHJldHVybiBpLmZyb20gIT09IENoYW5nZU9yaWdpbi5SZW1vdGVcbiAgICAgICAgICB9KVxuICAgICAgICB9KSxcbiAgICAgICAgZmlsdGVyKGl0ZW0gPT4ge1xuICAgICAgICAgIHJldHVybiBpdGVtLmxlbmd0aFxuICAgICAgICB9KVxuICAgICAgKS5zdWJzY3JpYmUoKCkgPT4ge1xuICAgICAgICB0aGlzLnlEb2MudHJhbnNhY3QoKCkgPT4ge1xuICAgICAgICAgIHRoaXMudXBkYXRlUmVt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XMucnVuUmVtb3RlVXBkYXRlKHRyLCAoKSA9PiB7XG4gICAgICAgIHNsb3QucmV0YWluKDApXG4gICAgICAgIGV2LmRlbHRhLmZvckVhY2goYWN0aW9uID0+IHtcbiAgICAgICAgICBpZiAoUmVmbGVjdC5oYXMoYWN0aW9uLCAncmV0YWluJykpIHtcbiAgICAgICAgICAgIGlmIChhY3Rpb24uYXR0cmlidXRlcykge1xuICAgICAgICAgICAgICBjb25zdCBmb3JtYXRzID0gbWFrZUZvcm1hdHModGhpcy5yZWdpc3RyeSwgYWN0aW9uLmF0dHJpYnV0ZXMpXG4gICAgICAgICAgICAgIGlmIChmb3JtYXRzLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgIHNsb3QucmV0YWluKGFjdGlvbi5yZXRhaW4hLCBmb3JtYXRzKVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBzbG90LnJldGFpbihhY3Rpb24ucmV0YWluKVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSBpZiAoYWN0aW9uLmluc2VydCkge1xuICAgICAgICAgICAgY29uc3QgaW5kZXggPSBzbG90LmluZGV4XG4gICAgICAgICAgICBsZXQgbGVuZ3RoID0gMVxuICAgICAgICAgICAgaWYgKHR5cGVvZiBhY3Rpb24uaW5zZXJ0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICBsZW5ndGggPSBhY3Rpb24uaW5zZXJ0Lmxlbmd0aFxuICAgICAgICAgICAgICBzbG90Lmluc2VydChhY3Rpb24uaW5zZXJ0LCBtYWtlRm9ybWF0cyh0aGlzLnJlZ2lzdHJ5LCBhY3Rpb24uYXR0cmlidXRlcykpXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBjb25zdCBzaGFyZWRDb21wb25lbnQgPSBhY3Rpb24uaW5zZXJ0IGFzIFlNYXA8YW55PlxuICAgICAgICAgICAgICBjb25zdCBjYW5JbnNlcnRJbmxpb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1vdGUpXG5cbiAgICBjb25zdCBzdWIgPSBzbG90Lm9uQ29udGVudENoYW5nZS5zdWJzY3JpYmUoYWN0aW9ucyA9PiB7XG4gICAgICB0aGlzLnJ1bkxvY2FsVXBkYXRlKCgpID0+IHtcbiAgICAgICAgbGV0IG9mZnNldCA9IDBcbiAgICAgICAgbGV0IGxlbmd0aCA9IDBcbiAgICAgICAgZm9yIChjb25zdCBhY3Rpb24gb2YgYWN0aW9ucykge1xuICAgICAgICAgIGlmIChhY3Rpb24udHlwZSA9PT0gJ3JldGFpbicpIHtcbiAgICAgICAgICAgIGNvbnN0IGZvcm1hdHMgPSBhY3Rpb24uZm9ybWF0c1xuICAgICAgICAgICAgaWYgKGZvcm1hdHMpIHtcbiAgICAgICAgICAgICAgY29uc3Qga2V5cyA9IE9iamVjdC5rZXlzKGZvcm1hdHMpXG4gICAgICAgICAgICAgIGxldCBsZW5ndGggPSBrZXlzLmxlbmd0aFxuICAgICAgICAgICAgICBrZXlzLmZvckVhY2goa2V5ID0+IHtcbiAgICAgICAgICAgICAgICBpZiAoIXRoaXMucmVnaXN0cnkuZ2V0Rm9ybWF0dGVyKGtleSkpIHtcbiAgICAgICAgICAgICAgICAgIGxlbmd0aC0tXG4gICAgICAgICAgICAgICAgICBSZWZsZWN0LmRlbGV0ZVByb3BlcnR5KGZvcm1hdHMsIGtleSlcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgIGlmIChsZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBjb250ZW50LmZvcm1hdChvZmZzZXQsIGFjdGlvbi5vZmZzZXQsIGZvcm1hdHMpXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIG9mZnNldCA9IGFjdGlvbi5vZmZzZXRcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2UgaWYgKGFjdGlvbi50eXBlID09PSAnaW5zZXJ0Jykge1xuICAgIC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ZShvZmZzZXQsIGFjdGlvbi5jb3VudClcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChjb250ZW50Lmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgICBjb250ZW50Lmluc2VydCgwLCAnXFxuJywgZGVsdGFbMF0/LmF0dHJpYnV0ZXMpXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9KVxuICAgIH0pXG5cbiAgICBzdWIuYWRkKHNsb3Qub25DaGlsZENvbXBvbmVudFJlbW92ZS5zdWJzY3JpYmUoY29tcG9uZW50cyA9PiB7XG4gICAgICBjb21wb25lbnRzLmZvckVhY2goYyA9PiB7XG4gICAgICAgIHRoaXMuY2xlYW5TdWJzY3JpcHRpb25zQnlDb21wb25lbnQoYylcbiAgICAgIH0pXG4gICAgfSkpXG4gICAgdGhpcy5jb250ZW50U3luY0NhY2hlcy5zZXQoc2xvdCwgKCkgPT4ge1xuICAgICAgY29udGVudC51bm9ic2VydmUoc3luY1JlbW90ZSlcbiAgICAgIHN1Yi51bnN1YnNjcmliZSgpXG4gICAgfSlcbiAgfVxuXG4gIHByaXZhdGUgc3luY1Nsb3QocmVtb3RlU2xvdDogWU1hcDxhbnk+LCBzbG90OiBTbG90KSB7XG4gICAgY29uc3Qgc3luY1JlbW90ZSA9IChldiwgdHIpID0+IHtcbiAgICAgIHRoaXMucnVuUmVtb3RlVXBkYXRlKHRyLCAoKSA9PiB7XG4gICAgICAgIGV2LmtleXNDaGFuZ2VkLmZvckVhY2goa2V5ID0+IHtcbiAgICAgICAgICBpZiAoa2V5ID09PSAnc3RhdGUnKSB7XG4gICAgICAgICAgICBjb25zdCBzdGF0ZSA9IChldi50YXJnZXQgYXMgWU1hcDxhbnk+KS5nZXQoJ3N0YXRlJylcbiAgICAgICAgICAgIHNsb3QudXBkYXRlU3RhdGUoZHJhZnQgPT4ge1xuICAgICAgICAgICAgICBPYmplY3QuYXNzaWduKGRyYWZ0LCBzdGF0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c3QgZm9jdXNQb3NpdGlvbiA9IGNyZWF0ZVJlbGF0aXZlUG9zaXRpb25Gcm9tVHlwZUluZGV4KGZvY3VzWVRleHQsIGZvY3VzT2Zmc2V0ISlcbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgIGZvY3VzOiBmb2N1c1Bvc2l0aW9uLFxuICAgICAgICAgICAgICBhbmNob3I6IGFuY2hvclBvc2l0aW9uXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiBudWxsXG4gIH1cblxuICBwcml2YXRlIHN5bmNDb250ZW50KGNvbnRlbnQ6IFlUZXh0LCBzbG90OiBTbG90KSB7XG4gICAgdGhpcy5jb250ZW50TWFwLnNldChzbG90LCBjb250ZW50KVxuICAgIGNvbnN0IHN5bmNSZW1vdGUgPSAoZXYsIHRyKSA9PiB7XG4gICAgICB0aGlzLnJ1blJlbW90ZVVwZGF0ZSh0ciwgKCkgPT4ge1xuICAgICAgICBzbG90LnJldGFpbigwKVxuICAgICAgICBldi5kZWx0YS5mb3JFYWNoKGFjdGlvbiA9PiB7XG4gICAgICAgICAgaWYgKFJlZmxlY3QuaGFzKGFjdGlvbiwgJ3JldGFpbicpKSB7XG4gICAgICAgICAgICBpZiAoYWN0aW9uLmF0dHJpYnV0ZXMpIHtcbiAgICAgICAgICAgICAgY29uc3QgZm9ybWF0cyA9IG1ha2VGb3JtYXRzKHRoaXMucmVnaXN0cnksIGFjdGlvbi5hdHRyaWJ1dGVzKVxuICAgICAgICAgICAgICBpZiAoZm9ybWF0cy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBzbG90LnJldGFpbihhY3Rpb24ucmV0YWluISwgZm9ybWF0cylcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBzbG90LnJldGFpbihzbG90LmluZGV4ICsgYWN0aW9uLnJldGFpbilcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHNsb3QucmV0YWluKGFjdGlvbi5yZXRhaW4pXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIGlmIChhY3Rpb24uaW5zZXJ0KSB7XG4gICAgICAgICAgICBjb25zdCBpbmRleCA9IHNsb3QuaW5kZXhcbiAgICAgICAgICAgIGxldCBsZW5ndGggPSAxXG4gICAgICAgICAgICBpZiAodHlwZW9mIGFjdGlvbi5pbnNlcnQgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgIGxlbmd0aCA9IGFjdGlvbi5pbnNlcnQubGVuZ3RoXG4gICAgICAgICAgICAgIHNsb3QuaW5zZXJ0KGFjdGlvbi5pbnNlcnQsIG1ha2VGb3JtYXRzKHRoaXMucmVnaXN0cnksIGFjdGlvbi5hdHRyaWJ1dGVzKSlcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIGNvbnN0IHNoYXJlZENvbXBvbmVudCA9IGFjdGlvbi5pbnNlcnQgYXMgWU1hcDxhbnk+XG4gICAgICAgICAgICAgIGNvbnN0IGNhbkluc2VydElubGluZUNvbXBvbmVudCA9IHNsb3Quc2NoZW1hLmluY2x1ZGVzKENvbnRlbnRUeXBlLklubGluZUNvbXBvbmVudClcbiAgICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gdGhpcy5jcmVhdGVDb21wb25lbnRCeVNoYXJlZENvbXBvbmVudChzaGFyZWRDb21wb25lbnQsIGNhbkluc2VydElubGluZUNvbXBvbmVudClcbiAgICAgICAgICAgICAgdGhpcy5zeW5jU2xvdHMoc2hhcmVkQ29tcG9uZW50LmdldCgnc2xvdHMnKSwgY29tcG9uZW50KVxuICAgICAgICAgICAgICB0aGlzLnN5bmNDb21wb25lbnQoc2hhcmVkQ29tcG9uZW50LCBjb21wb25lbnQpXG4gICAgICAgICAgICAgIHNsb3QuaW5zZXJ0KGNvbXBvbmVudClcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh0aGlzLnNlbGVj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gIH1cbiAgICAgICAgICAgICAgaWYgKHNsb3QgPT09IHRoaXMuc2VsZWN0aW9uLmZvY3VzU2xvdCAmJiB0aGlzLnNlbGVjdGlvbi5mb2N1c09mZnNldCEgPj0gaW5kZXgpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnNlbGVjdGlvbi5zZXRGb2N1cyhzbG90LCB0aGlzLnNlbGVjdGlvbi5mb2N1c09mZnNldCEgLSBhY3Rpb24uZGVsZXRlKVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIGlmIChhY3Rpb24uYXR0cmlidXRlcykge1xuICAgICAgICAgICAgc2xvdC51cGRhdGVTdGF0ZShkcmFmdCA9PiB7XG4gICAgICAgICAgICAgIGlmICh0eXBlb2YgZHJhZnQgPT09ICdvYmplY3QnICYmIGRyYWZ0ICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgT2JqZWN0LmFzc2lnbihkcmFmdCwgYWN0aW9uLmF0dHJpYnV0ZXMpXG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGFjdGlvbi5hdHRyaWJ1dGVzXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgfVxuICAgICAgICB9KVxuICAgICAgfSlcbiAgICB9XG4gICAgY29udGVudC5vYnNlcnZlKHN5bmNSZW1vdGUpXG5cbiAgICBjb25zdCBzdWIgPSBzbG90Lm9uQ29udGVudENoYW5nZS5zdWJzY3JpYmUoYWN0aW9ucyA9PiB7XG4gICAgICB0aGlzLnJ1bkxvY2FsVXBkYXRlKCgpID0+IHtcbiAgICAgICAgbGV0IG9mZnNldCA9IDBcbiAgICAgICAgbGV0IGxlbmd0aCA9IDBcbiAgICAgICAgZm9yIChjb25zdCBhY3Rpb24gb2YgYWN0aW9ucykge1xuICAgICAgICAgIGlmIChhY3Rpb24udHlwZSA9PT0gJ3JldGFpbicpIHtcbiAgICAgICAgICAgIGNvbnN0IGZvcm1hdHMgPSBhY3Rpb24uZm9ybWF0c1xuICAgICAgICAgICAgaWYgKGZvcm1hdHMpIHtcbiAgICAgICAgICAgICAgY29uc3Qga2V5cyA9IE9iamVjdC5rZXlzKGZvcm1hdHMpXG4gICAgICAgICAgICAgIGxldCBsZW5ndGggPSBrZXlzLmxlbmd0aFxuICAgICAgICAgICAgICBrZXlzLmZvckVhY2goa2V5ID0+IHtcbiAgICAgICAgICAgICAgICBpZiAoIXRoaXMucmVnaXN0cnkuZ2V0Rm9ybWF0dGVyKGtleSkpIHtcbiAgICAgICAgICAgICAgICAgIGxlbmd0aC0tXG4gICAgICAgICAgICAgICAgICBSZWZsZWN0LmRlbGV0ZVByb3BlcnR5KGZvcm1hdHMsIGtleSlcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgIGlmIChsZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBjb250ZW50LmZvcm1hdChvZmZzZXQsIGFjdGlvbi5vZmZzZXQsIGZvcm1hdHMpXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIG9mZnNldCA9IGFjdGlvbi5vZmZzZXRcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2UgaWYgKGFjdGlvbi50eXBlID09PSAnaW5zZXJ0Jykge1xuICAgICAgICAgICAgY29uc3QgZGVsdGEgPSBjb250ZW50LnRvRGVsdGEoKVxuICAgICAgICAgICAgY29uc3QgaXNFbXB0eSA9IGRlbHRhLmxlbmd0aCA9PT0gMSAmJiBkZWx0YVswXS5pbnNlcnQgPT09IFNsb3QuZW1wdHlQbGFjZWhvbGRlclxuICAgICAgICAgICAgaWYgKHR5cGVvZiBhY3Rpb24uY29udGVudCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgbGVuZ3RoID0gYWN0aW9uLmNvbnRlbnQubGVuZ3RoXG4gICAgICAgICAgICAgIGNvbnRlbnQuaW5zZXJ0KG9mZnNldCwgYWN0aW9uLmNvbnRlbnQsIGFjdGlvbi5mb3JtYXRzIHx8IHt9KVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgbGVuZ3RoID0gMVxuICAgICAgICAgICAgICBjb25zdCBzaGFyZWRDb21wb25lbnQgPSB0aGlzLmNyZWF0ZVNoYXJlZENvbXBvbmVudEJ5Q29tcG9uZW50KGFjdGlvbi5yZWYgYXMgQ29tcG9uZW50SW5zdGFuY2UpXG4gICAgICAgICAgICAgIGNvbnRlbnQuaW5zZXJ0RW1iZWQob2Zmc2V0LCBzaGFyZWRDb21wb25lbnQpXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChpc0VtcHR5ICYmIG9mZnNldCA9PT0gMCkge1xuICAgICAgICAgICAgICBjb250ZW50LmRlbGV0ZShjb250ZW50Lmxlbmd0aCAtIDEsIDEpXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBvZmZzZXQgKz0gbGVuZ3RoXG4gICAgICAgICAgfSBlbHNlIGlmIChhY3Rpb24udHlwZSA9PT0gJ2RlbGV0ZScpIHtcbiAgICAgICAgICAgIGNvbnN0IGRlbHRhID0gY29udGVudC50b0RlbHRhKClcbiAgICAgICAgICAgIGlmIChjb250ZW50Lmxlbmd0aCkge1xuICAgICAgICAgICAgICBjb250ZW50LmRlbGV0ZShvZmZzZXQsIGFjdGlvbi5jb3VudClcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChjb250ZW50Lmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgICBjb250ZW50Lmluc2VydCgwLCAnXFxuJywgZGVsdGFbMF0/LmF0dHJpYnV0ZXMpXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9KVxuICAgIH0pXG5cbiAgICBzdWIuYWRkKHNsb3Qub25DaGlsZENvbXBvbmVudFJlbW92ZS5zdWJzY3JpYmUoY29tcG9uZW50cyA9PiB7XG4gICAgICBjb21wb25lbnRzLmZvckVhY2goYyA9PiB7XG4gICAgICAgIHRoaXMuY2xlYW5TdWJzY3JpcHRpb25zQnlDb21wb25lbnQoYylcbiAgICAgIH0pXG4gICAgfSkpXG4gICAgdGhpcy5jb250ZW50U3luY0NhY2hlcy5zZXQoc2xvdCwgKCkgPT4ge1xuICAgICAgY29udGVudC51bm9ic2VydmUoc3luY1JlbW90ZSlcbiAgICAgIHN1Yi51bnN1YnNjcmliZSgpXG4gICAgfSlcbiAgfVxuXG4gIHByaXZhdGUgc3luY1Nsb3QocmVtb3RlU2xvdDogWU1hcDxhbnk+LCBzbG90OiBTbG90KSB7XG4gICAgY29uc3Qgc3luY1JlbW90ZSA9IChldiwgdHIpID0+IHtcbiAgICAgIHRoaXMucnVuUmVtb3RlVXBkYXRlKHRyLCAoKSA9PiB7XG4gICAgICAgIGV2LmtleXNDaGFuZ2VkLmZvckVhY2goa2V5ID0+IHtcbiAgICAgICAgICBpZiAoa2V5ID09PSAnc3RhdGUnKSB7XG4gICAgICAgICAgICBjb25zdCBzdGF0ZSA9IChldi50YXJnZXQgYXMgWU1hcDxhbnk+KS5nZXQoJ3N0YXRlJylcbiAgICAgICAgICAgIHNsb3QudXBkYXRlU3RhdGUoZHJhZnQgPT4ge1xuICAgICAgICAgICAgICBpZiAodHlwZW9mIGRyYWZ0ID09PSAnb2JqZWN0JyAmJiBkcmFmdCAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIE9iamVjdC5hc3NpZ24oZHJhZnQsIHN0YXRlKVxuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJldHVybiBzdGF0ZVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH1cbiAgICAgICAgfSlcbiAgICAgIH0pXG4gICAgfVxuICAgIHJlbW90ZVNsb3Qub2JzZXJ2ZShzeW5jUmVtb3RlKVxuXG4gICAgY29uc3Qgc3ViID0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bG90QnlTaGFyZWRTbG90KGl0ZW0pXG4gICAgICAgICAgICAgIHNsb3RzLmluc2VydChzbG90KVxuICAgICAgICAgICAgICB0aGlzLnN5bmNDb250ZW50KGl0ZW0uZ2V0KCdjb250ZW50JyksIHNsb3QpXG4gICAgICAgICAgICAgIHRoaXMuc3luY1Nsb3QoaXRlbSwgc2xvdClcbiAgICAgICAgICAgICAgaW5kZXgrK1xuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9IGVsc2UgaWYgKGFjdGlvbi5kZWxldGUpIHtcbiAgICAgICAgICAgIHNsb3RzLnJldGFpbihpbmRleClcbiAgICAgICAgICAgIHNsb3RzLmRlbGV0ZShhY3Rpb24uZGVsZXRlKVxuICAgICAgICAgIH1cbiAgICAgICAgfSlcbiAgICAgIH0pXG4gICAgfVxuICAgIHJlbW90ZVNsb3RzLm9ic2VydmUoc3luY1JlbW90ZSlcblxuICAgIGNvbnN0IHN1YiA9IHNsb3RzLm9uQ2hhbmdlLnN1YnNjcmliZShvcGVyYXRpb25zID0+IHtcbiAgICAgIHRoaXMucnVuTG9jYWxVcGRhdGUoKCkgPT4ge1xuICAgICAgICBjb25zdCBhcHBseUFjdGlvbnMgPSBvcGVyYXRpb25zLmFwcGx5XG4gICAgICAgIGxldCBpbmRleDogbnVtYmVyXG4gICAgICAgIGFwcGx5QWN0aW9ucy5mb3JFYWNoKGFjdGlvbiA9PiB7XG4gICAgICAgICAgaWYgKGFjdGlvbi50eXBlID09PSAncmV0YWluJykge1xuICAgICAgICAgICAgaW5kZXggPSBhY3Rpb24ub2Zmc2V0XG4gICAgICAgICAgfSBlbHNlIGlmIChhY3Rpb24udHlwZSA9PT0gJ2luc2VydFNsb3QnKSB7XG4gICAgICAgICAgICBjb25zdCBzaGFyZWRTbG90ID0gdGhpcy5jcmVhdGVTaGFyZWRTbG90QnlTbG90KGFjdGlvbi5yZWYpXG4gICAgICAgICAgICByZW1vdGVTbG90cy5pbnNlcnQoaW5kZXgsIFtzaGFyZWRT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|
{
|
2
2
|
"name": "@textbus/collaborate",
|
3
|
-
"version": "2.0.0-beta.
|
3
|
+
"version": "2.0.0-beta.54",
|
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",
|
@@ -25,10 +25,10 @@
|
|
25
25
|
"typescript editor"
|
26
26
|
],
|
27
27
|
"dependencies": {
|
28
|
-
"@tanbo/di": "^1.1.
|
29
|
-
"@tanbo/stream": "^1.1.
|
30
|
-
"@textbus/browser": "^2.0.0-beta.
|
31
|
-
"@textbus/core": "^2.0.0-beta.
|
28
|
+
"@tanbo/di": "^1.1.2",
|
29
|
+
"@tanbo/stream": "^1.1.4",
|
30
|
+
"@textbus/browser": "^2.0.0-beta.54",
|
31
|
+
"@textbus/core": "^2.0.0-beta.54",
|
32
32
|
"reflect-metadata": "^0.1.13",
|
33
33
|
"y-protocols": "^1.0.5",
|
34
34
|
"yjs": "^13.5.39"
|
@@ -44,5 +44,5 @@
|
|
44
44
|
"bugs": {
|
45
45
|
"url": "https://github.com/textbus/textbus.git/issues"
|
46
46
|
},
|
47
|
-
"gitHead": "
|
47
|
+
"gitHead": "fe5915060fdfae45beefebed99720c598a9ac8c4"
|
48
48
|
}
|
@@ -5,7 +5,7 @@ import {
|
|
5
5
|
getLayoutRectByRange,
|
6
6
|
SelectionBridge
|
7
7
|
} from '@textbus/browser'
|
8
|
-
import { Selection, SelectionPaths, Range as TBRange } from '@textbus/core'
|
8
|
+
import { Selection, SelectionPaths, Range as TBRange, Scheduler } from '@textbus/core'
|
9
9
|
import { fromEvent, Subject, Subscription } from '@tanbo/stream'
|
10
10
|
|
11
11
|
export interface RemoteSelection {
|
@@ -32,7 +32,7 @@ export interface RemoteSelectionCursor {
|
|
32
32
|
userTip: HTMLElement
|
33
33
|
}
|
34
34
|
|
35
|
-
export abstract class
|
35
|
+
export abstract class CollaborateSelectionAwarenessDelegate {
|
36
36
|
abstract getRects(range: TBRange, nativeRange: Range): false | Rect[]
|
37
37
|
}
|
38
38
|
|
@@ -90,8 +90,9 @@ export class CollaborateCursor {
|
|
90
90
|
private currentSelection: RemoteSelection[] = []
|
91
91
|
|
92
92
|
constructor(@Inject(VIEW_CONTAINER) private container: HTMLElement,
|
93
|
-
@Optional() private awarenessDelegate:
|
93
|
+
@Optional() private awarenessDelegate: CollaborateSelectionAwarenessDelegate,
|
94
94
|
private nativeSelection: SelectionBridge,
|
95
|
+
private scheduler: Scheduler,
|
95
96
|
private selection: Selection) {
|
96
97
|
this.canvasContainer.append(this.canvas)
|
97
98
|
this.host.append(this.canvasContainer, this.tooltips)
|
@@ -107,6 +108,8 @@ export class CollaborateCursor {
|
|
107
108
|
}), fromEvent(window, 'resize').subscribe(() => {
|
108
109
|
this.canvas.style.height = document.documentElement.clientHeight + 'px'
|
109
110
|
this.refresh()
|
111
|
+
}), this.scheduler.onDocChanged.subscribe(() => {
|
112
|
+
this.refresh()
|
110
113
|
}))
|
111
114
|
}
|
112
115
|
|
package/src/collaborate.ts
CHANGED
@@ -86,7 +86,7 @@ export class Collaborate implements History {
|
|
86
86
|
yDoc = new YDoc()
|
87
87
|
onBack: Observable<void>
|
88
88
|
onForward: Observable<void>
|
89
|
-
onChange: Observable<
|
89
|
+
onChange: Observable<void>
|
90
90
|
onPush: Observable<void>
|
91
91
|
|
92
92
|
get canBack() {
|
@@ -133,24 +133,59 @@ export class Collaborate implements History {
|
|
133
133
|
this.onPush = this.pushEvent.asObservable()
|
134
134
|
}
|
135
135
|
|
136
|
-
|
136
|
+
listen() {
|
137
|
+
const root = this.yDoc.getMap('RootComponent')
|
138
|
+
const rootComponent = this.rootComponentRef.component!
|
139
|
+
this.manager = new UndoManager(root, {
|
140
|
+
trackedOrigins: new Set<any>([this.yDoc])
|
141
|
+
})
|
142
|
+
const cursorKey = 'cursor-position'
|
143
|
+
this.manager.on('stack-item-added', event => {
|
144
|
+
event.stackItem.meta.set(cursorKey, this.getRelativeCursorLocation())
|
145
|
+
if (this.manager!.undoStack.length > this.stackSize) {
|
146
|
+
this.manager!.undoStack.shift()
|
147
|
+
}
|
148
|
+
if (event.origin === this.yDoc) {
|
149
|
+
this.pushEvent.next()
|
150
|
+
}
|
151
|
+
this.changeEvent.next()
|
152
|
+
})
|
153
|
+
this.manager.on('stack-item-popped', event => {
|
154
|
+
const position = event.stackItem.meta.get(cursorKey) as CursorPosition
|
155
|
+
if (position) {
|
156
|
+
this.restoreCursorLocation(position)
|
157
|
+
}
|
158
|
+
})
|
137
159
|
this.subscriptions.push(
|
138
160
|
this.selection.onChange.subscribe(() => {
|
139
161
|
const paths = this.selection.getPaths()
|
140
162
|
this.selectionChangeEvent.next(paths)
|
163
|
+
}),
|
164
|
+
this.scheduler.onDocChanged.pipe(
|
165
|
+
map(item => {
|
166
|
+
return item.filter(i => {
|
167
|
+
return i.from !== ChangeOrigin.Remote
|
168
|
+
})
|
169
|
+
}),
|
170
|
+
filter(item => {
|
171
|
+
return item.length
|
172
|
+
})
|
173
|
+
).subscribe(() => {
|
174
|
+
this.yDoc.transact(() => {
|
175
|
+
this.updateRemoteActions.forEach(fn => {
|
176
|
+
fn()
|
177
|
+
})
|
178
|
+
this.updateRemoteActions = []
|
179
|
+
}, this.yDoc)
|
141
180
|
})
|
142
181
|
)
|
143
|
-
this.syncRootComponent()
|
182
|
+
this.syncRootComponent(root, rootComponent)
|
144
183
|
}
|
145
184
|
|
146
185
|
updateRemoteSelection(paths: RemoteSelection[]) {
|
147
186
|
this.collaborateCursor.draw(paths)
|
148
187
|
}
|
149
188
|
|
150
|
-
listen() {
|
151
|
-
//
|
152
|
-
}
|
153
|
-
|
154
189
|
back() {
|
155
190
|
if (this.canBack) {
|
156
191
|
this.manager?.undo()
|
@@ -176,30 +211,7 @@ export class Collaborate implements History {
|
|
176
211
|
this.manager?.destroy()
|
177
212
|
}
|
178
213
|
|
179
|
-
private syncRootComponent() {
|
180
|
-
const root = this.yDoc.getMap('RootComponent')
|
181
|
-
const rootComponent = this.rootComponentRef.component!
|
182
|
-
this.manager = new UndoManager(root, {
|
183
|
-
trackedOrigins: new Set<any>([this.yDoc])
|
184
|
-
})
|
185
|
-
const cursorKey = 'cursor-position'
|
186
|
-
this.manager.on('stack-item-added', event => {
|
187
|
-
event.stackItem.meta.set(cursorKey, this.getRelativeCursorLocation())
|
188
|
-
if (this.manager!.undoStack.length > this.stackSize) {
|
189
|
-
this.manager!.undoStack.shift()
|
190
|
-
}
|
191
|
-
if (event.origin === this.yDoc) {
|
192
|
-
this.pushEvent.next()
|
193
|
-
}
|
194
|
-
this.changeEvent.next()
|
195
|
-
})
|
196
|
-
this.manager.on('stack-item-popped', event => {
|
197
|
-
const position = event.stackItem.meta.get(cursorKey) as CursorPosition
|
198
|
-
if (position) {
|
199
|
-
this.restoreCursorLocation(position)
|
200
|
-
}
|
201
|
-
})
|
202
|
-
|
214
|
+
private syncRootComponent(root: YMap<any>, rootComponent: ComponentInstance) {
|
203
215
|
let slots = root.get('slots') as YArray<YMap<any>>
|
204
216
|
if (!slots) {
|
205
217
|
slots = new YArray()
|
@@ -235,26 +247,6 @@ export class Collaborate implements History {
|
|
235
247
|
}
|
236
248
|
this.syncComponent(root, rootComponent)
|
237
249
|
this.syncSlots(slots, rootComponent)
|
238
|
-
|
239
|
-
this.subscriptions.push(
|
240
|
-
this.scheduler.onDocChanged.pipe(
|
241
|
-
map(item => {
|
242
|
-
return item.filter(i => {
|
243
|
-
return i.from !== ChangeOrigin.Remote
|
244
|
-
})
|
245
|
-
}),
|
246
|
-
filter(item => {
|
247
|
-
return item.length
|
248
|
-
})
|
249
|
-
).subscribe(() => {
|
250
|
-
this.yDoc.transact(() => {
|
251
|
-
this.updateRemoteActions.forEach(fn => {
|
252
|
-
fn()
|
253
|
-
})
|
254
|
-
this.updateRemoteActions = []
|
255
|
-
}, this.yDoc)
|
256
|
-
})
|
257
|
-
)
|
258
250
|
}
|
259
251
|
|
260
252
|
private restoreCursorLocation(position: CursorPosition) {
|
@@ -265,8 +257,10 @@ export class Collaborate implements History {
|
|
265
257
|
const anchorSlot = this.contentMap.get(anchorPosition.type as YText)
|
266
258
|
if (focusSlot && anchorSlot) {
|
267
259
|
this.selection.setBaseAndExtent(anchorSlot, anchorPosition.index, focusSlot, focusPosition.index)
|
260
|
+
return
|
268
261
|
}
|
269
262
|
}
|
263
|
+
this.selection.unSelect()
|
270
264
|
}
|
271
265
|
|
272
266
|
private getRelativeCursorLocation(): CursorPosition | null {
|
@@ -302,6 +296,7 @@ export class Collaborate implements History {
|
|
302
296
|
if (formats.length) {
|
303
297
|
slot.retain(action.retain!, formats)
|
304
298
|
}
|
299
|
+
slot.retain(slot.index + action.retain)
|
305
300
|
} else {
|
306
301
|
slot.retain(action.retain)
|
307
302
|
}
|
@@ -341,7 +336,11 @@ export class Collaborate implements History {
|
|
341
336
|
}
|
342
337
|
} else if (action.attributes) {
|
343
338
|
slot.updateState(draft => {
|
344
|
-
|
339
|
+
if (typeof draft === 'object' && draft !== null) {
|
340
|
+
Object.assign(draft, action.attributes)
|
341
|
+
} else {
|
342
|
+
return action.attributes
|
343
|
+
}
|
345
344
|
})
|
346
345
|
}
|
347
346
|
})
|
@@ -418,7 +417,11 @@ export class Collaborate implements History {
|
|
418
417
|
if (key === 'state') {
|
419
418
|
const state = (ev.target as YMap<any>).get('state')
|
420
419
|
slot.updateState(draft => {
|
421
|
-
|
420
|
+
if (typeof draft === 'object' && draft !== null) {
|
421
|
+
Object.assign(draft, state)
|
422
|
+
} else {
|
423
|
+
return state
|
424
|
+
}
|
422
425
|
})
|
423
426
|
}
|
424
427
|
})
|
@@ -502,7 +505,11 @@ export class Collaborate implements History {
|
|
502
505
|
if (key === 'state') {
|
503
506
|
const state = (ev.target as YMap<any>).get('state')
|
504
507
|
component.updateState(draft => {
|
505
|
-
|
508
|
+
if (typeof draft === 'object' && draft !== null) {
|
509
|
+
Object.assign(draft, state)
|
510
|
+
} else {
|
511
|
+
return state
|
512
|
+
}
|
506
513
|
})
|
507
514
|
}
|
508
515
|
})
|