@textbus/collaborate 4.0.0-alpha.5 → 4.0.0-alpha.50

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,2 +1,3 @@
1
1
  export * from './collaborate';
2
2
  export * from './collaborate-module';
3
+ export * from './user-activity';
@@ -0,0 +1,23 @@
1
+ import { Observable } from '@tanbo/stream';
2
+ import { Selection, SelectionPaths } from '@textbus/core';
3
+ import { WebsocketProvider } from 'y-websocket';
4
+ export interface UserInfo {
5
+ username: string;
6
+ color: string;
7
+ id: string;
8
+ }
9
+ export interface ActivityInfo extends UserInfo {
10
+ selection: SelectionPaths;
11
+ }
12
+ export declare class UserActivity {
13
+ private websocketProvider;
14
+ private selection;
15
+ onStateChange: Observable<ActivityInfo[]>;
16
+ onUserChange: Observable<UserInfo[]>;
17
+ private stateChangeEvent;
18
+ private userChangeEvent;
19
+ private subscription;
20
+ constructor(websocketProvider: WebsocketProvider, selection: Selection);
21
+ init(userinfo: UserInfo): void;
22
+ destroy(): void;
23
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@textbus/collaborate",
3
- "version": "4.0.0-alpha.5",
3
+ "version": "4.0.0-alpha.50",
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",
@@ -25,12 +25,12 @@
25
25
  "typescript editor"
26
26
  ],
27
27
  "dependencies": {
28
- "@tanbo/stream": "^1.2.0",
29
- "@textbus/core": "^4.0.0-alpha.5",
30
- "@viewfly/core": "^0.2.4",
28
+ "@tanbo/stream": "^1.2.3",
29
+ "@textbus/core": "^4.0.0-alpha.50",
30
+ "@viewfly/core": "^1.0.0-alpha.4",
31
31
  "reflect-metadata": "^0.1.13",
32
- "y-protocols": "^1.0.5",
33
- "yjs": "^13.6.7"
32
+ "y-websocket": "^1.4.3",
33
+ "yjs": "^13.6.14"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@rollup/plugin-commonjs": "^23.0.2",
@@ -50,5 +50,5 @@
50
50
  "bugs": {
51
51
  "url": "https://github.com/textbus/textbus.git/issues"
52
52
  },
53
- "gitHead": "072831527fe07e7c21a14f3141d55b24d321a690"
53
+ "gitHead": "a7918554368f01ea704bedb8750a7513602aae49"
54
54
  }