@jupyter/collaborative-drive 3.0.0-beta.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.
- package/lib/index.d.ts +5 -0
- package/lib/index.js +9 -0
- package/lib/tokens.d.ts +49 -0
- package/lib/tokens.js +11 -0
- package/package.json +57 -0
package/lib/index.d.ts
ADDED
package/lib/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/* -----------------------------------------------------------------------------
|
|
2
|
+
| Copyright (c) Jupyter Development Team.
|
|
3
|
+
| Distributed under the terms of the Modified BSD License.
|
|
4
|
+
|----------------------------------------------------------------------------*/
|
|
5
|
+
/**
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
* @module collaborative-drive
|
|
8
|
+
*/
|
|
9
|
+
export * from './tokens';
|
package/lib/tokens.d.ts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { DocumentChange, YDocument } from '@jupyter/ydoc';
|
|
2
|
+
import { Contents } from '@jupyterlab/services';
|
|
3
|
+
import { IDisposable } from '@lumino/disposable';
|
|
4
|
+
import { Token } from '@lumino/coreutils';
|
|
5
|
+
/**
|
|
6
|
+
* The collaborative drive.
|
|
7
|
+
*/
|
|
8
|
+
export declare const ICollaborativeDrive: Token<ICollaborativeDrive>;
|
|
9
|
+
/**
|
|
10
|
+
* The global awareness token.
|
|
11
|
+
*/
|
|
12
|
+
export declare const IGlobalAwareness: Token<import("y-protocols/awareness").Awareness>;
|
|
13
|
+
/**
|
|
14
|
+
* A document factory for registering shared models
|
|
15
|
+
*/
|
|
16
|
+
export type SharedDocumentFactory = (options: Contents.ISharedFactoryOptions) => YDocument<DocumentChange>;
|
|
17
|
+
/**
|
|
18
|
+
* A Collaborative implementation for an `IDrive`, talking to the
|
|
19
|
+
* server using the Jupyter REST API and a WebSocket connection.
|
|
20
|
+
*/
|
|
21
|
+
export interface ICollaborativeDrive extends Contents.IDrive {
|
|
22
|
+
/**
|
|
23
|
+
* SharedModel factory for the YDrive.
|
|
24
|
+
*/
|
|
25
|
+
readonly sharedModelFactory: ISharedModelFactory;
|
|
26
|
+
readonly providers: Map<string, IDocumentProvider>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Yjs sharedModel factory for real-time collaboration.
|
|
30
|
+
*/
|
|
31
|
+
export interface ISharedModelFactory extends Contents.ISharedFactory {
|
|
32
|
+
/**
|
|
33
|
+
* Register a SharedDocumentFactory.
|
|
34
|
+
*
|
|
35
|
+
* @param type Document type
|
|
36
|
+
* @param factory Document factory
|
|
37
|
+
*/
|
|
38
|
+
registerDocumentFactory(type: Contents.ContentType, factory: SharedDocumentFactory): void;
|
|
39
|
+
documentFactories: Map<Contents.ContentType, SharedDocumentFactory>;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* An interface for a document provider.
|
|
43
|
+
*/
|
|
44
|
+
export interface IDocumentProvider extends IDisposable {
|
|
45
|
+
/**
|
|
46
|
+
* Returns a Promise that resolves when the document provider is ready.
|
|
47
|
+
*/
|
|
48
|
+
readonly ready: Promise<void>;
|
|
49
|
+
}
|
package/lib/tokens.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Copyright (c) Jupyter Development Team.
|
|
2
|
+
// Distributed under the terms of the Modified BSD License.
|
|
3
|
+
import { Token } from '@lumino/coreutils';
|
|
4
|
+
/**
|
|
5
|
+
* The collaborative drive.
|
|
6
|
+
*/
|
|
7
|
+
export const ICollaborativeDrive = new Token('@jupyter/collaboration-extension:ICollaborativeDrive');
|
|
8
|
+
/**
|
|
9
|
+
* The global awareness token.
|
|
10
|
+
*/
|
|
11
|
+
export const IGlobalAwareness = new Token('@jupyter/collaboration:IGlobalAwareness');
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@jupyter/collaborative-drive",
|
|
3
|
+
"version": "3.0.0-beta.8",
|
|
4
|
+
"description": "JupyterLab - Collaborative Drive",
|
|
5
|
+
"homepage": "https://github.com/jupyterlab/jupyter-collaboration",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/jupyterlab/jupyter-collaboration/issues"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/jupyterlab/jupyter-collaboration.git"
|
|
12
|
+
},
|
|
13
|
+
"license": "BSD-3-Clause",
|
|
14
|
+
"author": "Project Jupyter",
|
|
15
|
+
"sideEffects": [
|
|
16
|
+
"style/**/*"
|
|
17
|
+
],
|
|
18
|
+
"main": "lib/index.js",
|
|
19
|
+
"types": "lib/index.d.ts",
|
|
20
|
+
"directories": {
|
|
21
|
+
"lib": "lib/"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
|
|
25
|
+
"schema/*.json",
|
|
26
|
+
"style/**/*.{css,eot,gif,html,jpg,json,png,svg,woff2,ttf}",
|
|
27
|
+
"style/index.js"
|
|
28
|
+
],
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "tsc -b",
|
|
31
|
+
"build:prod": "jlpm run build",
|
|
32
|
+
"build:test": "tsc --build tsconfig.test.json",
|
|
33
|
+
"clean": "rimraf lib tsconfig.tsbuildinfo",
|
|
34
|
+
"clean:lib": "jlpm run clean:all",
|
|
35
|
+
"clean:all": "rimraf lib tsconfig.tsbuildinfo node_modules",
|
|
36
|
+
"install:extension": "jlpm run build",
|
|
37
|
+
"watch": "tsc -b --watch"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@jupyter/ydoc": "^2.0.0 || ^3.0.0-a3",
|
|
41
|
+
"@jupyterlab/services": "^7.2.0",
|
|
42
|
+
"@lumino/coreutils": "^2.1.0",
|
|
43
|
+
"@lumino/disposable": "^2.1.0"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"rimraf": "^4.1.2",
|
|
47
|
+
"typescript": "~5.0.4"
|
|
48
|
+
},
|
|
49
|
+
"publishConfig": {
|
|
50
|
+
"access": "public"
|
|
51
|
+
},
|
|
52
|
+
"typedoc": {
|
|
53
|
+
"entryPoint": "./src/index.ts",
|
|
54
|
+
"displayName": "@jupyter/collaborative-drive",
|
|
55
|
+
"tsconfig": "./tsconfig.json"
|
|
56
|
+
}
|
|
57
|
+
}
|