@textbus/collaborate 2.0.0-beta.26 → 2.0.0-beta.30

Sign up to get free protection for your applications and to get access to all the features.
@@ -28,6 +28,8 @@ export declare class CollaborateCursor {
28
28
  private awarenessDelegate;
29
29
  private nativeSelection;
30
30
  private selection;
31
+ private host;
32
+ private canvasContainer;
31
33
  private canvas;
32
34
  private context;
33
35
  private tooltips;
@@ -35,6 +37,7 @@ export declare class CollaborateCursor {
35
37
  private subscription;
36
38
  private currentSelection;
37
39
  constructor(container: HTMLElement, awarenessDelegate: CollaborateCursorAwarenessDelegate, nativeSelection: SelectionBridge, selection: Selection);
40
+ refresh(): void;
38
41
  destroy(): void;
39
42
  draw(paths: RemoteSelection[]): void;
40
43
  private drawUserCursor;
@@ -42,6 +42,37 @@ let CollaborateCursor = class CollaborateCursor {
42
42
  writable: true,
43
43
  value: selection
44
44
  });
45
+ Object.defineProperty(this, "host", {
46
+ enumerable: true,
47
+ configurable: true,
48
+ writable: true,
49
+ value: createElement('div', {
50
+ styles: {
51
+ position: 'absolute',
52
+ left: 0,
53
+ top: 0,
54
+ width: '100%',
55
+ height: '100%',
56
+ pointerEvents: 'none',
57
+ zIndex: 1
58
+ }
59
+ })
60
+ });
61
+ Object.defineProperty(this, "canvasContainer", {
62
+ enumerable: true,
63
+ configurable: true,
64
+ writable: true,
65
+ value: createElement('div', {
66
+ styles: {
67
+ position: 'absolute',
68
+ left: 0,
69
+ top: 0,
70
+ width: '100%',
71
+ height: '100%',
72
+ overflow: 'hidden'
73
+ }
74
+ })
75
+ });
45
76
  Object.defineProperty(this, "canvas", {
46
77
  enumerable: true,
47
78
  configurable: true,
@@ -55,7 +86,6 @@ let CollaborateCursor = class CollaborateCursor {
55
86
  width: '100%',
56
87
  height: document.documentElement.clientHeight + 'px',
57
88
  pointerEvents: 'none',
58
- zIndex: 1
59
89
  }
60
90
  })
61
91
  });
@@ -100,7 +130,9 @@ let CollaborateCursor = class CollaborateCursor {
100
130
  writable: true,
101
131
  value: []
102
132
  });
103
- container.prepend(this.canvas, this.tooltips);
133
+ this.canvasContainer.append(this.canvas);
134
+ this.host.append(this.canvasContainer, this.tooltips);
135
+ container.prepend(this.host);
104
136
  this.subscription.add(this.onRectsChange.subscribe(rects => {
105
137
  for (const rect of rects) {
106
138
  this.context.fillStyle = rect.color;
@@ -111,9 +143,12 @@ let CollaborateCursor = class CollaborateCursor {
111
143
  }
112
144
  }), fromEvent(window, 'resize').subscribe(() => {
113
145
  this.canvas.style.height = document.documentElement.clientHeight + 'px';
114
- this.draw(this.currentSelection);
146
+ this.refresh();
115
147
  }));
116
148
  }
149
+ refresh() {
150
+ this.draw(this.currentSelection);
151
+ }
117
152
  destroy() {
118
153
  this.subscription.unsubscribe();
119
154
  }
@@ -285,4 +320,4 @@ CollaborateCursor = __decorate([
285
320
  Selection])
286
321
  ], CollaborateCursor);
287
322
  export { CollaborateCursor };
288
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sbGFib3JhdGUtY3Vyc29yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2NvbGxhYm9yYXRlLWN1cnNvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7QUFBQSxPQUFPLEVBQUUsTUFBTSxFQUFFLFVBQVUsRUFBRSxRQUFRLEVBQUUsTUFBTSxXQUFXLENBQUE7QUFDeEQsT0FBTyxFQUNMLGFBQWEsRUFDYixjQUFjLEVBQ2Qsb0JBQW9CLEVBQ3BCLGVBQWUsRUFDaEIsTUFBTSxrQkFBa0IsQ0FBQTtBQUN6QixPQUFPLEVBQUUsU0FBUyxFQUFvQyxNQUFNLGVBQWUsQ0FBQTtBQUMzRSxPQUFPLEVBQUUsU0FBUyxFQUFFLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxlQUFlLENBQUE7QUEwQmhFLE1BQU0sT0FBZ0Isa0NBQWtDO0NBRXZEO0FBR0QsSUFBYSxpQkFBa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WFyZ2luQm90dG9tOiAnMnB4JyxcbiAgICAgICAgYm90dG9tOiAnMTAwJScsXG4gICAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgICAgICBjb2xvcjogJyNmZmYnLFxuICAgICAgICBib3hTaGFkb3c6ICcwIDFweCAycHggcmdiYSgwLDAsMCwuMSknLFxuICAgICAgICBib3JkZXJSYWRpdXM6ICczcHgnLFxuICAgICAgICBwYWRkaW5nOiAnM3B4IDVweCcsXG4gICAgICAgIHBvaW50ZXJFdmVudHM6ICdub25lJyxcbiAgICAgIH1cbiAgICB9KVxuXG4gICAgY29uc3QgYW5jaG9yID0gY3JlYXRlRWxlbWVudCgnc3BhbicsIHtcbiAgICAgIHN0eWxlczoge1xuICAgICAgICBwb3NpdGlvbjogJ2Fic29sdXRlJyxcbiAgICAgICAgdG9wOiAnLTJweCcsXG4gICAgICAgIGxlZnQ6ICctMnB4JyxcbiAgICAgICAgd2lkdGg6ICc2cHgnLFxuICAgICAgICBoZWlnaHQ6ICc2cHgnLFxuICAgICAgICBwb2ludGVyRXZlbnRzOiAnYXV0bycsXG4gICAgICAgIHBvaW50ZXI6ICdjdXJzb3InLFxuICAgICAgfSxcbiAgICAgIGNoaWxkcmVuOiBbdXNlclRpcF0sXG4gICAgICBvbjoge1xuICAgICAgICBtb3VzZWVudGVyKCkge1xuICAgICAgICAgIHVzZXJUaXAuc3R5bGUuZGlzcGxheSA9ICdibG9jaydcbiAgICAgICAgfSxcbiAgICAgICAgbW91c2VsZWF2ZSgpIHtcbiAgICAgICAgICB1c2VyVGlwLnN0eWxlLmRpc3BsYXkgPSAnbm9uZSdcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0pXG4gICAgY2hpbGQgPSBjcmVhdGVFbGVtZW50KCdzcGFuJywge1xuICAgICAgc3R5bGVzOiB7XG4gICAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgfSxcbiAgICAgIGNoaWxkcmVuOiBbXG4gICAgICAgI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lZnQ6ICc1MCUnLFxuICAgICAgICB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKC01MCUpJyxcbiAgICAgICAgbWFyZ2luQm90dG9tOiAnMnB4JyxcbiAgICAgICAgYm90dG9tOiAnMTAwJScsXG4gICAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgICAgICBjb2xvcjogJyNmZmYnLFxuICAgICAgICBib3hTaGFkb3c6ICcwIDFweCAycHggcmdiYSgwLDAsMCwuMSknLFxuICAgICAgICBib3JkZXJSYWRpdXM6ICczcHgnLFxuICAgICAgICBwYWRkaW5nOiAnM3B4IDVweCcsXG4gICAgICAgIHBvaW50ZXJFdmVudHM6ICdub25lJyxcbiAgICAgIH1cbiAgICB9KVxuXG4gICAgY29uc3QgYW5jaG9yID0gY3JlYXRlRWxlbWVudCgnc3BhbicsIHtcbiAgICAgIHN0eWxlczoge1xuICAgICAgICBwb3NpdGlvbjogJ2Fic29sdXRlJyxcbiAgICAgICAgdG9wOiAnLTJweCcsXG4gICAgICAgIGxlZnQ6ICctMnB4JyxcbiAgICAgICAgd2lkdGg6ICc2cHgnLFxuICAgICAgICBoZWlnaHQ6ICc2cHgnLFxuICAgICAgICBwb2ludGVyRXZlbnRzOiAnYXV0bycsXG4gICAgICAgIHBvaW50ZXI6ICdjdXJzb3InLFxuICAgICAgfSxcbiAgICAgIGNoaWxkcmVuOiBbdXNlclRpcF0sXG4gICAgICBvbjoge1xuICAgICAgICBtb3VzZWVudGVyKCkge1xuICAgICAgICAgIHVzZXJUaXAuc3R5bGUuZGlzcGxheSA9ICdibG9jaydcbiAgICAgICAgfSxcbiAgICAgICAgbW91c2VsZWF2ZSgpIHtcbiAgICAgICAgICB1c2VyVGlwLnN0eWxlLmRpc3BsYXkgPSAnbm9uZSdcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0pXG4gICAgY2hpbGQgPSBjcmVhdGVFbGVtZW50KCdzcGFuJywge1xuICAgICAgc3R5bGVzOiB7XG4gICAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgfSxcbiAgICAgIGNoaWxkcmVuOiBbXG4gICAgICAgIGFuY2hvclxuICAgICAgXVxuICAgIH0pXG4gICAgdGhpcy50b29sdGlwcy5hcHBlbmQoY2hpbGQpXG4gICAgcmV0dXJuIHtcbiAgICAgIGN1cnNvcjogY2hpbGQsXG4gICAgICBhbmNob3IsXG4gICAgICB1c2VyVGlwXG4gICAgfVxuICB9XG59XG4iXX0=
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@textbus/collaborate",
3
- "version": "2.0.0-beta.26",
3
+ "version": "2.0.0-beta.30",
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",
@@ -27,8 +27,8 @@
27
27
  "dependencies": {
28
28
  "@tanbo/di": "^1.1.1",
29
29
  "@tanbo/stream": "^1.0.2",
30
- "@textbus/browser": "^2.0.0-beta.26",
31
- "@textbus/core": "^2.0.0-beta.26",
30
+ "@textbus/browser": "^2.0.0-beta.27",
31
+ "@textbus/core": "^2.0.0-beta.27",
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": "0401ddb801e69dcc4e81140b8209a64ae0d79b1b"
47
+ "gitHead": "9bec956fa6f07b0a7e7c8bca9caccf317d3dfc51"
48
48
  }
@@ -38,6 +38,27 @@ export abstract class CollaborateCursorAwarenessDelegate {
38
38
 
39
39
  @Injectable()
40
40
  export class CollaborateCursor {
41
+ private host = createElement('div', {
42
+ styles: {
43
+ position: 'absolute',
44
+ left: 0,
45
+ top: 0,
46
+ width: '100%',
47
+ height: '100%',
48
+ pointerEvents: 'none',
49
+ zIndex: 1
50
+ }
51
+ })
52
+ private canvasContainer = createElement('div', {
53
+ styles: {
54
+ position: 'absolute',
55
+ left: 0,
56
+ top: 0,
57
+ width: '100%',
58
+ height: '100%',
59
+ overflow: 'hidden'
60
+ }
61
+ })
41
62
  private canvas = createElement('canvas', {
42
63
  styles: {
43
64
  position: 'absolute',
@@ -47,7 +68,6 @@ export class CollaborateCursor {
47
68
  width: '100%',
48
69
  height: document.documentElement.clientHeight + 'px',
49
70
  pointerEvents: 'none',
50
- zIndex: 1
51
71
  }
52
72
  }) as HTMLCanvasElement
53
73
  private context = this.canvas.getContext('2d')!
@@ -73,7 +93,9 @@ export class CollaborateCursor {
73
93
  @Optional() private awarenessDelegate: CollaborateCursorAwarenessDelegate,
74
94
  private nativeSelection: SelectionBridge,
75
95
  private selection: Selection) {
76
- container.prepend(this.canvas, this.tooltips)
96
+ this.canvasContainer.append(this.canvas)
97
+ this.host.append(this.canvasContainer, this.tooltips)
98
+ container.prepend(this.host)
77
99
  this.subscription.add(this.onRectsChange.subscribe(rects => {
78
100
  for (const rect of rects) {
79
101
  this.context.fillStyle = rect.color
@@ -84,10 +106,14 @@ export class CollaborateCursor {
84
106
  }
85
107
  }), fromEvent(window, 'resize').subscribe(() => {
86
108
  this.canvas.style.height = document.documentElement.clientHeight + 'px'
87
- this.draw(this.currentSelection)
109
+ this.refresh()
88
110
  }))
89
111
  }
90
112
 
113
+ refresh() {
114
+ this.draw(this.currentSelection)
115
+ }
116
+
91
117
  destroy() {
92
118
  this.subscription.unsubscribe()
93
119
  }