@jupyter/collaboration-extension 4.3.0-rc.0 → 4.4.0-alpha.0
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.
- package/lib/collaboration.js +8 -12
- package/package.json +5 -5
- package/schema/shared-link.json +1 -0
package/lib/collaboration.js
CHANGED
|
@@ -7,10 +7,8 @@
|
|
|
7
7
|
import { IToolbarWidgetRegistry } from '@jupyterlab/apputils';
|
|
8
8
|
import { EditorExtensionRegistry, IEditorExtensionRegistry } from '@jupyterlab/codemirror';
|
|
9
9
|
import { IGlobalAwareness } from '@jupyter/collaborative-drive';
|
|
10
|
-
import {
|
|
10
|
+
import { IAwarenessProviderFactory } from '@jupyter/docprovider';
|
|
11
11
|
import { SidePanel, usersIcon } from '@jupyterlab/ui-components';
|
|
12
|
-
import { URLExt } from '@jupyterlab/coreutils';
|
|
13
|
-
import { ServerConnection } from '@jupyterlab/services';
|
|
14
12
|
import { IStateDB } from '@jupyterlab/statedb';
|
|
15
13
|
import { ITranslator, nullTranslator } from '@jupyterlab/translation';
|
|
16
14
|
import { MenuBar } from '@lumino/widgets';
|
|
@@ -60,21 +58,19 @@ export const menuBarPlugin = {
|
|
|
60
58
|
export const rtcGlobalAwarenessPlugin = {
|
|
61
59
|
id: '@jupyter/collaboration-extension:rtcGlobalAwareness',
|
|
62
60
|
description: 'Add global awareness to share working document of users.',
|
|
63
|
-
requires: [IStateDB],
|
|
61
|
+
requires: [IStateDB, IAwarenessProviderFactory],
|
|
64
62
|
provides: IGlobalAwareness,
|
|
65
|
-
activate: (app, state) => {
|
|
66
|
-
var _a;
|
|
63
|
+
activate: (app, state, factory) => {
|
|
67
64
|
const { user } = app.serviceManager;
|
|
68
65
|
const ydoc = new Y.Doc();
|
|
69
66
|
const awareness = new Awareness(ydoc);
|
|
70
|
-
const
|
|
71
|
-
const url = URLExt.join(server.wsUrl, 'api/collaboration/room');
|
|
72
|
-
new WebSocketAwarenessProvider({
|
|
73
|
-
url: url,
|
|
67
|
+
const awarenessOptions = {
|
|
74
68
|
roomID: 'JupyterLab:globalAwareness',
|
|
75
69
|
awareness: awareness,
|
|
76
|
-
user: user
|
|
77
|
-
|
|
70
|
+
user: user,
|
|
71
|
+
serverSettings: app.serviceManager.serverSettings
|
|
72
|
+
};
|
|
73
|
+
factory.create(awarenessOptions);
|
|
78
74
|
state.changed.connect(async () => {
|
|
79
75
|
var _a, _b;
|
|
80
76
|
const data = await state.toJSON();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupyter/collaboration-extension",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0-alpha.0",
|
|
4
4
|
"description": "JupyterLab - Real-Time Collaboration Extension",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jupyter",
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"watch:labextension": "jupyter labextension watch ."
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@jupyter/collaboration": "^4.
|
|
57
|
-
"@jupyter/collaborative-drive": "^4.
|
|
58
|
-
"@jupyter/docprovider": "^4.
|
|
56
|
+
"@jupyter/collaboration": "^4.4.0-alpha.0",
|
|
57
|
+
"@jupyter/collaborative-drive": "^4.4.0-alpha.0",
|
|
58
|
+
"@jupyter/docprovider": "^4.4.0-alpha.0",
|
|
59
59
|
"@jupyter/ydoc": "^2.1.3 || ^3.0.0",
|
|
60
60
|
"@jupyterlab/application": "^4.5.0",
|
|
61
61
|
"@jupyterlab/apputils": "^4.5.0",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"@types/react": "~18.3.1",
|
|
76
76
|
"npm-run-all": "^4.1.5",
|
|
77
77
|
"rimraf": "^4.1.2",
|
|
78
|
-
"typescript": "~5.
|
|
78
|
+
"typescript": "~5.9.3"
|
|
79
79
|
},
|
|
80
80
|
"publishConfig": {
|
|
81
81
|
"access": "public"
|