@textbus/collaborate 2.5.6 → 2.5.8

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.
@@ -25,7 +25,7 @@ export declare class CollaborateCursor {
25
25
  private nativeSelection;
26
26
  private scheduler;
27
27
  private selection;
28
- private awarenessDelegate;
28
+ private awarenessDelegate?;
29
29
  private host;
30
30
  private canvasContainer;
31
31
  private canvas;
@@ -35,7 +35,7 @@ export declare class CollaborateCursor {
35
35
  private subscription;
36
36
  private currentSelection;
37
37
  private container;
38
- constructor(injector: Injector, nativeSelection: SelectionBridge, scheduler: Scheduler, selection: Selection, awarenessDelegate?: CollaborateSelectionAwarenessDelegate | null);
38
+ constructor(injector: Injector, nativeSelection: SelectionBridge, scheduler: Scheduler, selection: Selection, awarenessDelegate?: CollaborateSelectionAwarenessDelegate | undefined);
39
39
  refresh(): void;
40
40
  destroy(): void;
41
41
  draw(paths: RemoteSelection[]): void;
@@ -29,6 +29,7 @@ export declare class Collaborate implements History {
29
29
  protected registry: Registry;
30
30
  protected selection: Selection;
31
31
  protected starter: Starter;
32
+ onLocalChangesApplied: Observable<void>;
32
33
  onSelectionChange: Observable<SelectionPaths>;
33
34
  yDoc: YDoc;
34
35
  onBack: Observable<void>;
@@ -48,6 +49,7 @@ export declare class Collaborate implements History {
48
49
  protected slotStateSyncCaches: WeakMap<Slot<any>, () => void>;
49
50
  protected slotsSyncCaches: WeakMap<ComponentInstance<import("@textbus/core").ComponentExtends, any, unknown>, () => void>;
50
51
  protected componentStateSyncCaches: WeakMap<ComponentInstance<import("@textbus/core").ComponentExtends, any, unknown>, () => void>;
52
+ protected localChangesAppliedEvent: Subject<void>;
51
53
  protected selectionChangeEvent: Subject<SelectionPaths>;
52
54
  protected contentMap: ContentMap;
53
55
  protected updateRemoteActions: Array<UpdateItem>;
@@ -37,7 +37,7 @@ function __metadata(metadataKey, metadataValue) {
37
37
  class CollaborateSelectionAwarenessDelegate {
38
38
  }
39
39
  let CollaborateCursor = class CollaborateCursor {
40
- constructor(injector, nativeSelection, scheduler, selection, awarenessDelegate = null) {
40
+ constructor(injector, nativeSelection, scheduler, selection, awarenessDelegate) {
41
41
  this.injector = injector;
42
42
  this.nativeSelection = nativeSelection;
43
43
  this.scheduler = scheduler;
@@ -279,7 +279,8 @@ CollaborateCursor = __decorate([
279
279
  __metadata("design:paramtypes", [Injector,
280
280
  SelectionBridge,
281
281
  Scheduler,
282
- Selection, Object])
282
+ Selection,
283
+ CollaborateSelectionAwarenessDelegate])
283
284
  ], CollaborateCursor);
284
285
 
285
286
  function createUnknownComponent(factoryName, canInsertInlineComponent) {
@@ -365,6 +366,7 @@ let Collaborate = class Collaborate {
365
366
  this.slotStateSyncCaches = new WeakMap();
366
367
  this.slotsSyncCaches = new WeakMap();
367
368
  this.componentStateSyncCaches = new WeakMap();
369
+ this.localChangesAppliedEvent = new Subject();
368
370
  this.selectionChangeEvent = new Subject();
369
371
  this.contentMap = new ContentMap();
370
372
  this.updateRemoteActions = [];
@@ -374,6 +376,7 @@ let Collaborate = class Collaborate {
374
376
  this.onForward = this.forwardEvent.asObservable();
375
377
  this.onChange = this.changeEvent.asObservable();
376
378
  this.onPush = this.pushEvent.asObservable();
379
+ this.onLocalChangesApplied = this.localChangesAppliedEvent.asObservable();
377
380
  }
378
381
  get canBack() {
379
382
  var _a;
@@ -445,6 +448,7 @@ let Collaborate = class Collaborate {
445
448
  });
446
449
  }, item.record ? this.yDoc : this.noRecord);
447
450
  }
451
+ this.localChangesAppliedEvent.next();
448
452
  }));
449
453
  this.syncRootComponent(root, rootComponent);
450
454
  }
package/bundles/index.js CHANGED
@@ -39,7 +39,7 @@ function __metadata(metadataKey, metadataValue) {
39
39
  class CollaborateSelectionAwarenessDelegate {
40
40
  }
41
41
  exports.CollaborateCursor = class CollaborateCursor {
42
- constructor(injector, nativeSelection, scheduler, selection, awarenessDelegate = null) {
42
+ constructor(injector, nativeSelection, scheduler, selection, awarenessDelegate) {
43
43
  this.injector = injector;
44
44
  this.nativeSelection = nativeSelection;
45
45
  this.scheduler = scheduler;
@@ -281,7 +281,8 @@ exports.CollaborateCursor = __decorate([
281
281
  __metadata("design:paramtypes", [di.Injector,
282
282
  browser.SelectionBridge,
283
283
  core.Scheduler,
284
- core.Selection, Object])
284
+ core.Selection,
285
+ CollaborateSelectionAwarenessDelegate])
285
286
  ], exports.CollaborateCursor);
286
287
 
287
288
  function createUnknownComponent(factoryName, canInsertInlineComponent) {
@@ -367,6 +368,7 @@ exports.Collaborate = class Collaborate {
367
368
  this.slotStateSyncCaches = new WeakMap();
368
369
  this.slotsSyncCaches = new WeakMap();
369
370
  this.componentStateSyncCaches = new WeakMap();
371
+ this.localChangesAppliedEvent = new stream.Subject();
370
372
  this.selectionChangeEvent = new stream.Subject();
371
373
  this.contentMap = new ContentMap();
372
374
  this.updateRemoteActions = [];
@@ -376,6 +378,7 @@ exports.Collaborate = class Collaborate {
376
378
  this.onForward = this.forwardEvent.asObservable();
377
379
  this.onChange = this.changeEvent.asObservable();
378
380
  this.onPush = this.pushEvent.asObservable();
381
+ this.onLocalChangesApplied = this.localChangesAppliedEvent.asObservable();
379
382
  }
380
383
  get canBack() {
381
384
  var _a;
@@ -447,6 +450,7 @@ exports.Collaborate = class Collaborate {
447
450
  });
448
451
  }, item.record ? this.yDoc : this.noRecord);
449
452
  }
453
+ this.localChangesAppliedEvent.next();
450
454
  }));
451
455
  this.syncRootComponent(root, rootComponent);
452
456
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@textbus/collaborate",
3
- "version": "2.5.6",
3
+ "version": "2.5.8",
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,8 +27,8 @@
27
27
  "dependencies": {
28
28
  "@tanbo/di": "^1.1.3",
29
29
  "@tanbo/stream": "^1.1.8",
30
- "@textbus/browser": "^2.5.5",
31
- "@textbus/core": "^2.5.5",
30
+ "@textbus/browser": "^2.5.8",
31
+ "@textbus/core": "^2.5.8",
32
32
  "reflect-metadata": "^0.1.13",
33
33
  "y-protocols": "^1.0.5",
34
34
  "yjs": "^13.5.39"
@@ -51,5 +51,5 @@
51
51
  "bugs": {
52
52
  "url": "https://github.com/textbus/textbus.git/issues"
53
53
  },
54
- "gitHead": "cd75d4ae54f0976cbb87c654ab322b5d66f572e5"
54
+ "gitHead": "ede05edbb5bb27e0080eca7bde12e394758beffd"
55
55
  }