diff --git a/.gitignore b/.gitignore index e6d937b..9e477ad 100644 --- a/.gitignore +++ b/.gitignore @@ -8,5 +8,5 @@ _testoutput/ anaconda-project.yml envs/ node_modules/ -src/*/lib +src/**/lib Untitled* diff --git a/environment.yml b/environment.yml index 312c6d5..8adf050 100644 --- a/environment.yml +++ b/environment.yml @@ -9,3 +9,4 @@ dependencies: - jupyterlab >=1.0.2,<1.1.0a0 - nodejs >=11,<12 - python >=3.7,<3.8.0a0 + - python-socketio >=4,<4.1 diff --git a/jupyter_notebook_config.json b/jupyter_notebook_config.json new file mode 100644 index 0000000..de1ff06 --- /dev/null +++ b/jupyter_notebook_config.json @@ -0,0 +1,7 @@ +{ + "NotebookApp": { + "nbserver_extensions": { + "jupyter_y_websockets": true + } + } +} diff --git a/labex.txt b/labex.txt index f487172..4bae956 100644 --- a/labex.txt +++ b/labex.txt @@ -1,4 +1,5 @@ @jupyterlab/toc@1.0.1 -./src/_core -./src/blockly -./src/prosemirror +./src/ts/_core +./src/ts/blockly +./src/ts/prosemirror +./src/ts/y diff --git a/package.json b/package.json index 593b64d..f4279ff 100644 --- a/package.json +++ b/package.json @@ -16,16 +16,16 @@ "private": true, "scripts": { "bootstrap": "jlpm && jlpm build", - "build": "cd src && cd _meta && jlpm build", + "build": "cd src && cd ts && cd _meta && jlpm build", "clean": "lerna exec --parallel --stream -- rimraf lib", "lint": "jlpm lint:root && jlpm lint:prettier && jlpm lint:ts", "lint:prettier": "lerna exec -- prettier --write --config=../../.prettierrc ./src/**/*.ts ./src/**/*.tsx ./style/**/*.css ./*.json ./*.md", "lint:root": "prettier --write *.json *.md *.yml", "lint:ts": "lerna exec -- tslint -c ../../tslint.json --fix ./src/**/*.ts", - "watch": "cd src && cd _meta && jlpm watch" + "watch": "cd src && cd ts && cd _meta && jlpm watch" }, "version": "1.0.0", "workspaces": [ - "src/*" + "src/ts/*" ] } diff --git a/postBuild b/postBuild index 85a422c..cb9bd7f 100755 --- a/postBuild +++ b/postBuild @@ -14,7 +14,11 @@ else fi fi -set -ex +set -eux +pushd src/py/jupyter_y_websockets +python -m pip install -e . --ignore-installed --no-deps +popd + jlpm --ignore-optional || jlpm || echo "well, let's try anyway" jlpm bootstrap jupyter labextension install $(cat labex.txt) diff --git a/src/py/jupyter_y_websockets/LICENSE b/src/py/jupyter_y_websockets/LICENSE new file mode 100644 index 0000000..177e140 --- /dev/null +++ b/src/py/jupyter_y_websockets/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2018, Dead Pixels Collective +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of [project] nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/py/jupyter_y_websockets/README.md b/src/py/jupyter_y_websockets/README.md new file mode 100644 index 0000000..2e57814 --- /dev/null +++ b/src/py/jupyter_y_websockets/README.md @@ -0,0 +1,3 @@ +# jupyter_y_websockets + +> Inspired by https://github.com/y-js/y-websockets-server diff --git a/src/py/jupyter_y_websockets/setup.cfg b/src/py/jupyter_y_websockets/setup.cfg new file mode 100644 index 0000000..00e70e7 --- /dev/null +++ b/src/py/jupyter_y_websockets/setup.cfg @@ -0,0 +1,42 @@ +[metadata] +name = jupyter_y_websockets +version = 0.1.0 +description = a yjs-websockets backend for jupyter +long_description = file: README.md +long_description_content_type = text/markdown +url = https://github.com/deathbeds/jupyterlab-outsource +author = dead pixels collective +author_email = ripxl@googlegroups.com +license = BSD-3-Clause +keywords = + Interactive +license_file = LICENSE +classifiers = + Framework :: Jupyter + Intended Audience :: Developers + Intended Audience :: Information Technology + License :: OSI Approved :: BSD License + Programming Language :: Python + +[options] +install_requires = + notebook + python-socketio +package_dir = + = src +packages = + jupyter_y_websockets +include_package_data = True +zip_safe = False + +[options.extras_require] +tests = + pytest + +[options.packages.find] +where = + src + +[flake8] +exclude = .git,__pycache__,envs +max-line-length = 88 diff --git a/src/py/jupyter_y_websockets/setup.py b/src/py/jupyter_y_websockets/setup.py new file mode 100644 index 0000000..aefdf20 --- /dev/null +++ b/src/py/jupyter_y_websockets/setup.py @@ -0,0 +1 @@ +__import__("setuptools").setup() diff --git a/src/py/jupyter_y_websockets/src/jupyter_y_websockets/__init__.py b/src/py/jupyter_y_websockets/src/jupyter_y_websockets/__init__.py new file mode 100644 index 0000000..bb54ac8 --- /dev/null +++ b/src/py/jupyter_y_websockets/src/jupyter_y_websockets/__init__.py @@ -0,0 +1,19 @@ +from notebook.utils import url_path_join as ujoin + +from ._version import __version__ +from .manager import YWebSocketsManager + + +def _jupyter_server_extension_paths(): + raise Exception("POOP") + return [{"module": "jupyter_y_websockets"}] + + +def load_jupyter_server_extension(nbapp): + mgr = YWebSocketsManager(parent=nbapp) + + app = nbapp.web_app + url = ujoin(app.settings["base_url"], "/y/ws/") + handler = mgr.get_handler() + app.add_handlers(".*$", [(url, handler)]) + nbapp.log.debug(f"y is listening on {url}") diff --git a/src/py/jupyter_y_websockets/src/jupyter_y_websockets/_version.py b/src/py/jupyter_y_websockets/src/jupyter_y_websockets/_version.py new file mode 100644 index 0000000..3dc1f76 --- /dev/null +++ b/src/py/jupyter_y_websockets/src/jupyter_y_websockets/_version.py @@ -0,0 +1 @@ +__version__ = "0.1.0" diff --git a/src/py/jupyter_y_websockets/src/jupyter_y_websockets/manager.py b/src/py/jupyter_y_websockets/src/jupyter_y_websockets/manager.py new file mode 100644 index 0000000..1eb8760 --- /dev/null +++ b/src/py/jupyter_y_websockets/src/jupyter_y_websockets/manager.py @@ -0,0 +1,63 @@ +import traitlets as T +from traitlets.config import LoggingConfigurable + +import socketio as S + + +class YWebSocketsManager(LoggingConfigurable): + sio = T.Instance(S.AsyncServer) + + def get_handler(self): + + _Handler = S.get_tornado_handler(self.sio) + + mgr = self + + class SocketHandler(_Handler): + def check_xsrf_cookie(self): + pass + + async def on_message(self, message): + mgr.log.error(f"MSG {msg}") + await super().on_message(message) + + return SocketHandler + + @T.default("sio") + def _default_sio(self): + s = S.AsyncServer(async_mode="tornado") + + @s.on("connect") + async def connect(sid, environ): return await self._on_connect(sid, environ) + + @s.on("disconnect") + async def disconnect(sid): return await self._on_disconnect(sid) + + @s.on("joinRoom") + async def join(sid, data): return await self._on_join(sid, data) + + @s.on("yjsEvent") + async def y_event(sid, data): return await self._on_receive(sid, data) + + @s.on("leaveRoom") + async def leave(sid, data): return await self._on_leave(sid, data) + + return s + + @property + def web_app(self): + return self.parent.web_app + + async def _on_connect(self, sid, enviorn): + self.parent.log.error(f"Connected {sid}") + + async def _on_disconnect(self, sid): + self.parent.log.error(f"disconnect {sid}") + + async def _on_join(self, sid, data): + self.parent.log.error(f"{sid} joins {data}") + return await self.sio.enter_root(sid, data["room"]) + + async def _on_receieve(self, sid, data): + self.parent.log.error(f"{sid} SAYS {data}") + return await self.sio.emit("yjsEvent", data, skip_sid=sid) diff --git a/src/_core/package.json b/src/ts/_core/package.json similarity index 100% rename from src/_core/package.json rename to src/ts/_core/package.json diff --git a/src/_core/src/button.ts b/src/ts/_core/src/button.ts similarity index 100% rename from src/_core/src/button.ts rename to src/ts/_core/src/button.ts diff --git a/src/_core/src/extension.ts b/src/ts/_core/src/extension.ts similarity index 100% rename from src/_core/src/extension.ts rename to src/ts/_core/src/extension.ts diff --git a/src/_core/src/index.ts b/src/ts/_core/src/index.ts similarity index 100% rename from src/_core/src/index.ts rename to src/ts/_core/src/index.ts diff --git a/src/_core/src/picker.tsx b/src/ts/_core/src/picker.tsx similarity index 100% rename from src/_core/src/picker.tsx rename to src/ts/_core/src/picker.tsx diff --git a/src/_core/src/sourcerer.ts b/src/ts/_core/src/sourcerer.ts similarity index 100% rename from src/_core/src/sourcerer.ts rename to src/ts/_core/src/sourcerer.ts diff --git a/src/_core/style/img/outsource.svg b/src/ts/_core/style/img/outsource.svg similarity index 100% rename from src/_core/style/img/outsource.svg rename to src/ts/_core/style/img/outsource.svg diff --git a/src/_core/style/index.css b/src/ts/_core/style/index.css similarity index 100% rename from src/_core/style/index.css rename to src/ts/_core/style/index.css diff --git a/src/_core/tsconfig.json b/src/ts/_core/tsconfig.json similarity index 77% rename from src/_core/tsconfig.json rename to src/ts/_core/tsconfig.json index 69599d6..140c9e1 100644 --- a/src/_core/tsconfig.json +++ b/src/ts/_core/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfigbase", + "extends": "../../../tsconfigbase", "compilerOptions": { "outDir": "lib", "rootDir": "src" diff --git a/src/_meta/package.json b/src/ts/_meta/package.json similarity index 88% rename from src/_meta/package.json rename to src/ts/_meta/package.json index b58ab94..e67e57a 100644 --- a/src/_meta/package.json +++ b/src/ts/_meta/package.json @@ -6,7 +6,8 @@ "dependencies": { "@deathbeds/jupyterlab-outsource": "^1.0.0", "@deathbeds/jupyterlab-outsource-blockly": "^1.0.0", - "@deathbeds/jupyterlab-outsource-prosemirror": "^1.0.0" + "@deathbeds/jupyterlab-outsource-prosemirror": "^1.0.0", + "@deathbeds/jupyterlab-outsource-y": "^1.0.0" }, "description": "Alternate editors for JupyterLab Source", "files": [ diff --git a/src/_meta/src/index.ts b/src/ts/_meta/src/index.ts similarity index 76% rename from src/_meta/src/index.ts rename to src/ts/_meta/src/index.ts index b653ad6..9faf84a 100644 --- a/src/_meta/src/index.ts +++ b/src/ts/_meta/src/index.ts @@ -1,3 +1,4 @@ import '@deathbeds/jupyterlab-outsource'; import '@deathbeds/jupyterlab-outsource-blockly'; import '@deathbeds/jupyterlab-outsource-prosemirror'; +import '@deathbeds/jupyterlab-outsource-y'; diff --git a/src/_meta/tsconfig.json b/src/ts/_meta/tsconfig.json similarity index 77% rename from src/_meta/tsconfig.json rename to src/ts/_meta/tsconfig.json index e95ee38..e51fd39 100644 --- a/src/_meta/tsconfig.json +++ b/src/ts/_meta/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfigbase", + "extends": "../../../tsconfigbase", "compilerOptions": { "outDir": "lib", "rootDir": "src" @@ -16,6 +16,9 @@ }, { "path": "../prosemirror" + }, + { + "path": "../y" } ] } diff --git a/src/blockly/package.json b/src/ts/blockly/package.json similarity index 100% rename from src/blockly/package.json rename to src/ts/blockly/package.json diff --git a/src/blockly/src/extension.ts b/src/ts/blockly/src/extension.ts similarity index 100% rename from src/blockly/src/extension.ts rename to src/ts/blockly/src/extension.ts diff --git a/src/blockly/src/factory.ts b/src/ts/blockly/src/factory.ts similarity index 100% rename from src/blockly/src/factory.ts rename to src/ts/blockly/src/factory.ts diff --git a/src/blockly/src/index.ts b/src/ts/blockly/src/index.ts similarity index 100% rename from src/blockly/src/index.ts rename to src/ts/blockly/src/index.ts diff --git a/src/blockly/src/raw-loader.d.ts b/src/ts/blockly/src/raw-loader.d.ts similarity index 100% rename from src/blockly/src/raw-loader.d.ts rename to src/ts/blockly/src/raw-loader.d.ts diff --git a/src/blockly/src/typings.d.ts b/src/ts/blockly/src/typings.d.ts similarity index 100% rename from src/blockly/src/typings.d.ts rename to src/ts/blockly/src/typings.d.ts diff --git a/src/blockly/src/widget.ts b/src/ts/blockly/src/widget.ts similarity index 100% rename from src/blockly/src/widget.ts rename to src/ts/blockly/src/widget.ts diff --git a/src/blockly/style/img/blockly.svg b/src/ts/blockly/style/img/blockly.svg similarity index 100% rename from src/blockly/style/img/blockly.svg rename to src/ts/blockly/style/img/blockly.svg diff --git a/src/blockly/style/index.css b/src/ts/blockly/style/index.css similarity index 100% rename from src/blockly/style/index.css rename to src/ts/blockly/style/index.css diff --git a/src/blockly/tsconfig.json b/src/ts/blockly/tsconfig.json similarity index 83% rename from src/blockly/tsconfig.json rename to src/ts/blockly/tsconfig.json index 6cce9e3..f12e55d 100644 --- a/src/blockly/tsconfig.json +++ b/src/ts/blockly/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfigbase", + "extends": "../../../tsconfigbase", "compilerOptions": { "outDir": "lib", "rootDir": "src" diff --git a/src/blockly/xml/toolbox.xml b/src/ts/blockly/xml/toolbox.xml similarity index 100% rename from src/blockly/xml/toolbox.xml rename to src/ts/blockly/xml/toolbox.xml diff --git a/src/prosemirror/package.json b/src/ts/prosemirror/package.json similarity index 100% rename from src/prosemirror/package.json rename to src/ts/prosemirror/package.json diff --git a/src/prosemirror/src/extension.ts b/src/ts/prosemirror/src/extension.ts similarity index 100% rename from src/prosemirror/src/extension.ts rename to src/ts/prosemirror/src/extension.ts diff --git a/src/prosemirror/src/factory.ts b/src/ts/prosemirror/src/factory.ts similarity index 100% rename from src/prosemirror/src/factory.ts rename to src/ts/prosemirror/src/factory.ts diff --git a/src/prosemirror/src/index.ts b/src/ts/prosemirror/src/index.ts similarity index 100% rename from src/prosemirror/src/index.ts rename to src/ts/prosemirror/src/index.ts diff --git a/src/prosemirror/src/typings.d.ts b/src/ts/prosemirror/src/typings.d.ts similarity index 100% rename from src/prosemirror/src/typings.d.ts rename to src/ts/prosemirror/src/typings.d.ts diff --git a/src/prosemirror/src/widget.ts b/src/ts/prosemirror/src/widget.ts similarity index 100% rename from src/prosemirror/src/widget.ts rename to src/ts/prosemirror/src/widget.ts diff --git a/src/prosemirror/style/img/prosemirror.svg b/src/ts/prosemirror/style/img/prosemirror.svg similarity index 100% rename from src/prosemirror/style/img/prosemirror.svg rename to src/ts/prosemirror/style/img/prosemirror.svg diff --git a/src/prosemirror/style/index.css b/src/ts/prosemirror/style/index.css similarity index 100% rename from src/prosemirror/style/index.css rename to src/ts/prosemirror/style/index.css diff --git a/src/prosemirror/tsconfig.json b/src/ts/prosemirror/tsconfig.json similarity index 83% rename from src/prosemirror/tsconfig.json rename to src/ts/prosemirror/tsconfig.json index 6cce9e3..f12e55d 100644 --- a/src/prosemirror/tsconfig.json +++ b/src/ts/prosemirror/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfigbase", + "extends": "../../../tsconfigbase", "compilerOptions": { "outDir": "lib", "rootDir": "src" diff --git a/src/ts/y/package.json b/src/ts/y/package.json new file mode 100644 index 0000000..d7d5805 --- /dev/null +++ b/src/ts/y/package.json @@ -0,0 +1,51 @@ +{ + "author": "Dead Pixels Collective", + "bugs": { + "url": "https://github.com/deathbeds/jupyterlab-outsource/issues" + }, + "peerDependencies": { + "@deathbeds/jupyterlab-outsource": "^1.0.0", + "@jupyterlab/application": "^1.0.0", + "@jupyterlab/launcher": "^1.0.0" + }, + "dependencies": { + "y-websockets-client": "^8.0.0-0", + "yjs": "^12.0.0-0", + "y-text": "*", + "y-array": "*", + "y-memory": "*", + "y-map": "*" + }, + "devDependencies": { + "@deathbeds/jupyterlab-outsource": "^1.0.0", + "@jupyterlab/application": "^1.0.0", + "@jupyterlab/launcher": "^1.0.0" + }, + "description": "YJS for outsource", + "files": [ + "{lib,style}/**/*.{css,d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}" + ], + "homepage": "https://github.com/deathbeds/jupyterlab-outsource", + "jupyterlab": { + "extension": "lib/extension.js" + }, + "keywords": [ + "jupyter", + "jupyterlab", + "jupyterlab-extension", + "yjs" + ], + "license": "BSD-3-Clause", + "main": "lib/index.js", + "name": "@deathbeds/jupyterlab-outsource-y", + "repository": { + "type": "git", + "url": "https://github.com/deathbeds/jupyterlab-outsource.git" + }, + "scripts": { + "build": "tsc -b", + "watch": "tsc -b --watch" + }, + "types": "lib/index.d.ts", + "version": "1.0.0" +} diff --git a/src/ts/y/src/extension.ts b/src/ts/y/src/extension.ts new file mode 100644 index 0000000..8f9c14c --- /dev/null +++ b/src/ts/y/src/extension.ts @@ -0,0 +1,37 @@ +import {JupyterFrontEnd, JupyterFrontEndPlugin} from '@jupyterlab/application'; +import { ILauncher } from '@jupyterlab/launcher'; + +import {IOutsourceY, PLUGIN_ID} from '.'; + + +import '../style/index.css'; + +const CMD = 'outsource-y:scratch-path'; + +const extension: JupyterFrontEndPlugin = { + id: PLUGIN_ID, + autoStart: true, + provides: IOutsourceY, + requires: [ILauncher], + activate: (_app: JupyterFrontEnd, launcher: ILauncher): IOutsourceY => { + _app.commands.addCommand(CMD, { + label: 'Y', + execute: async (_args: any) => { + (window as any).ws = WebSocket; + const {makeWidget} = await import(/* webpackChunkName: "yjs" */ './widget'); + const widget = await makeWidget(); + _app.shell.add(widget, 'main'); + console.log('added widget'); + } + }); + + launcher.add({ + command: CMD, + category: 'Other' + }); + + return {}; + }, +}; + +export default extension; diff --git a/src/ts/y/src/index.ts b/src/ts/y/src/index.ts new file mode 100644 index 0000000..6863e6f --- /dev/null +++ b/src/ts/y/src/index.ts @@ -0,0 +1,13 @@ +import {Token} from '@phosphor/coreutils'; + +export const PLUGIN_ID = '@deathbeds/jupyterlab-outsource:y'; + +/* tslint:disable */ +export const IOutsourceY = new Token(PLUGIN_ID); +/* tslint:enable */ + +export interface IOutsourceY {} + +export const CSS = {}; + +export const API = '/y/ws/'; diff --git a/src/ts/y/src/typings.d.ts b/src/ts/y/src/typings.d.ts new file mode 100644 index 0000000..2148df7 --- /dev/null +++ b/src/ts/y/src/typings.d.ts @@ -0,0 +1,8 @@ +declare module 'socket.io-client' {} +declare module 'ws' {} +declare module 'y-array/src/Array' {} +declare module 'y-map/src/Map' {} +declare module 'y-memory/src/Memory' {} +declare module 'y-text/src/Text' {} +declare module 'y-websockets-client/src/Websockets-client' {} +declare module 'yjs/src/y' {} diff --git a/src/ts/y/src/widget.ts b/src/ts/y/src/widget.ts new file mode 100644 index 0000000..e3a508c --- /dev/null +++ b/src/ts/y/src/widget.ts @@ -0,0 +1,101 @@ +import {Widget} from '@phosphor/widgets'; +import {MainAreaWidget} from '@jupyterlab/apputils'; +import { ServerConnection } from '@jupyterlab/services'; +import {URLExt} from '@jupyterlab/coreutils'; + +import io from 'socket.io-client'; + +import Y from 'yjs/src/y'; +import YWebSocket from 'y-websockets-client/src/Websockets-client'; +import YArray from 'y-array/src/Array'; +import YMap from 'y-map/src/Map'; +import YText from 'y-text/src/Text'; +import YMemory from 'y-memory/src/Memory'; + +import {API} from '.'; + +let id = 0; + +[YWebSocket, YMemory, YArray, YMap, YText].map((fn: any) => fn(Y)); + +function xsrf() { + return document.cookie.match('\\b_xsrf=([^;]*)\\b'); +} + +export class YTextArea extends Widget { + private settings: ServerConnection.ISettings; + private _y: any; + + constructor(options?: Widget.IOptions, settings?: ServerConnection.ISettings) { + options = options || {}; + options.node = document.createElement('textarea'); + super(options); + this.settings = settings || ServerConnection.makeSettings(); + } + + protected makeSocket(url: string) { + const socket = (io as any)(url, { + path: url.split(window.location.origin)[1], + transportOptions: { + polling: { + extraHeaders: { + 'X-CSRFToken': xsrf() + } + } + } + }); + console.log('socket', socket); + return socket; + } + + protected async makeY(socket: any, url: string) { + const y = await (Y as any)({ + db: {name: 'memory'}, + connector: { + name: 'websockets-client', + room: 'hello-jupyter', + socket, + url, + }, + share: {textarea: 'Text'} + }); + console.log('y', y); + return y; + } + + protected onY(y: any) { + // bind the textarea to a shared text element + y.share.textarea.bindTextarea(this.node); + console.log('bound'); + } + + async onAfterShow() { + if (this._y) { + console.log('already shown'); + return; + } + + const url = URLExt.join(this.settings.baseUrl, API); + const socket = this.makeSocket(url); + + try { + this._y = await this.makeY(socket, url); + this.onY(this._y); + console.log(this._y); + } catch (err) { + console.error(err); + } + } +} + +export async function makeWidget() { + const content = new YTextArea(); + const _id = id++; + + content.title.label = `Y ${_id}`; + + const w = new MainAreaWidget({content}); + w.id = `id-y-${_id}`; + + return w; +} diff --git a/src/ts/y/style/index.css b/src/ts/y/style/index.css new file mode 100644 index 0000000..e69de29 diff --git a/src/ts/y/tsconfig.json b/src/ts/y/tsconfig.json new file mode 100644 index 0000000..f12e55d --- /dev/null +++ b/src/ts/y/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../../../tsconfigbase", + "compilerOptions": { + "outDir": "lib", + "rootDir": "src" + }, + "include": [ + "src/**/*", + "src/@types/**/*" + ], + "references": [ + { + "path": "../_core" + } + ] +} diff --git a/yarn.lock b/yarn.lock index 8143959..d3d26e4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -279,6 +279,20 @@ "@phosphor/signaling" "^1.2.3" "@phosphor/widgets" "^1.8.0" +"@jupyterlab/launcher@^1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@jupyterlab/launcher/-/launcher-1.0.1.tgz#d75e6457e1abd329d111437bde1cec56fcc9338f" + integrity sha512-GarY6YGFYY0oyeaJZv8KYM7SYrrd2BcqRmgm36+q3uXqu8qbGegSp4N/sNanWVjaCSnXUG3ab0Kb1gcDi5AAZQ== + dependencies: + "@jupyterlab/apputils" "^1.0.1" + "@phosphor/algorithm" "^1.1.3" + "@phosphor/commands" "^1.6.3" + "@phosphor/coreutils" "^1.3.1" + "@phosphor/disposable" "^1.2.0" + "@phosphor/properties" "^1.1.3" + "@phosphor/widgets" "^1.8.0" + react "~16.8.4" + "@jupyterlab/notebook@^1.0.0": version "1.0.1" resolved "https://registry.yarnpkg.com/@jupyterlab/notebook/-/notebook-1.0.1.tgz#0b7d9b2c728bcc12897c30c4259d19121b84fa4b" @@ -1406,6 +1420,11 @@ acorn@^6.0.1, acorn@^6.0.7, acorn@^6.1.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.2.0.tgz#67f0da2fc339d6cfb5d6fb244fd449f33cd8bbe3" integrity sha512-8oe72N3WPMjA+2zVG71Ia0nXZ8DpQH+QyyHO+p06jT8eg8FGG3FbcUIi8KziHlAfheJQZeoqbvq1mQSQHXKYLw== +after@0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/after/-/after-0.8.1.tgz#ab5d4fb883f596816d3515f8f791c0af486dd627" + integrity sha1-q11PuIP1loFtNRX495HAr0ht1ic= + agent-base@4, agent-base@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" @@ -1541,6 +1560,11 @@ array-unique@^0.3.2: resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= +arraybuffer.slice@0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz#f33b2159f0532a3f3107a272c0ccfbd1ad2979ca" + integrity sha1-8zshWfBTKj8xB6JywMz70a0peco= + arrify@^1.0.0, arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" @@ -1603,11 +1627,21 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== +backo2@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/backo2/-/backo2-1.0.2.tgz#31ab1ac8b129363463e35b3ebb69f4dfcfba7947" + integrity sha1-MasayLEpNjRj41s+u2n038+6eUc= + balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= +base64-arraybuffer@0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-0.1.2.tgz#474df4a9f2da24e05df3158c3b1db3c3cd46a154" + integrity sha1-R030qfLaJOBd8xWMOx2zw81GoVQ= + base@^0.11.1: version "0.11.2" resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" @@ -1633,11 +1667,33 @@ before-after-hook@^2.0.0: resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.0.1.tgz#a21dc15582fee3f035c39dcbb77f6892a99ada36" integrity sha512-dpgMHA51KZyCu7uuxF6FCkN+scfGd/6aLxEr/14vKUo/1nPxcd2fhFv4BgYCbWxKt7JfgpbjJq9nc30Ip/p2uw== +benchmark@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/benchmark/-/benchmark-1.0.0.tgz#2f1e2fa4c359f11122aa183082218e957e390c73" + integrity sha1-Lx4vpMNZ8REiqhgwgiGOlX45DHM= + +better-assert@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/better-assert/-/better-assert-1.0.2.tgz#40866b9e1b9e0b55b481894311e68faffaebc522" + integrity sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI= + dependencies: + callsite "1.0.0" + +bindings@1.2.x, bindings@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.2.1.tgz#14ad6113812d2d37d72e67b4cacb4bb726505f11" + integrity sha1-FK1hE4EtLTfXLme0ystLtyZQXxE= + bindings@~1.3.0: version "1.3.1" resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.3.1.tgz#21fc7c6d67c18516ec5aaa2815b145ff77b26ea5" integrity sha512-i47mqjF9UbjxJhxGf+pZ6kSxrnI3wBLlnGI2ArWJ4r0VrvDS7ZYXkprq/pLaBWYq4GM0r4zdHY+NNRqEMU7uew== +blob@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.4.tgz#bcf13052ca54463f30f9fc7e95b9a47630a94921" + integrity sha1-vPEwUspURj8w+fx+lbmkdjCpSSE= + bluebird@^3.5.1, bluebird@^3.5.3, bluebird@^3.5.5: version "3.5.5" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.5.tgz#a8d0afd73251effbbd5fe384a77d73003c17a71f" @@ -1682,6 +1738,14 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== +bufferutil@1.2.x: + version "1.2.1" + resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-1.2.1.tgz#37be5d36e1e06492221e68d474b1ac58e510cbd7" + integrity sha1-N75dNuHgZJIiHmjUdLGsWOUQy9c= + dependencies: + bindings "1.2.x" + nan "^2.0.5" + builtin-modules@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" @@ -1756,6 +1820,11 @@ caller-path@^2.0.0: dependencies: caller-callsite "^2.0.0" +callsite@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/callsite/-/callsite-1.0.0.tgz#280398e5d664bd74038b6f0905153e6e8af1bc20" + integrity sha1-KAOY5dZkvXQDi28JBRU+borxvCA= + callsites@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" @@ -1934,11 +2003,26 @@ compare-func@^1.3.1: array-ify "^1.0.0" dot-prop "^3.0.0" +component-bind@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/component-bind/-/component-bind-1.0.0.tgz#00c608ab7dcd93897c0009651b1d3a8e1e73bbd1" + integrity sha1-AMYIq33Nk4l8AAllGx06jh5zu9E= + +component-emitter@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.1.2.tgz#296594f2753daa63996d2af08d15a95116c9aec3" + integrity sha1-KWWU8nU9qmOZbSrwjRWpURbJrsM= + component-emitter@^1.2.1: version "1.3.0" resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== +component-inherit@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/component-inherit/-/component-inherit-0.0.3.tgz#645fc4adf58b72b649d5cae65135619db26ff143" + integrity sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM= + concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -2185,6 +2269,18 @@ dateformat@^3.0.0: resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== +debug@0.7.4: + version "0.7.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-0.7.4.tgz#06e1ea8082c2cb14e39806e22e2f6f757f92af39" + integrity sha1-BuHqgILCyxTjmAbiLi9vdX+Srzk= + +debug@1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-1.0.4.tgz#5b9c256bd54b6ec02283176fa8a0ede6d154cbf8" + integrity sha1-W5wla9VLbsAigxdvqKDt5tFUy/g= + dependencies: + ms "0.6.2" + debug@3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" @@ -2192,7 +2288,7 @@ debug@3.1.0: dependencies: ms "2.0.0" -debug@^2.2.0, debug@^2.3.3: +debug@^2.2.0, debug@^2.3.3, debug@^2.6.3: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== @@ -2438,6 +2534,35 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0: dependencies: once "^1.4.0" +engine.io-client@1.5.4: + version "1.5.4" + resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-1.5.4.tgz#c6ad65a65752a29cb930c6911e579d2b28d1106c" + integrity sha1-xq1lpldSopy5MMaRHledKyjREGw= + dependencies: + component-emitter "1.1.2" + component-inherit "0.0.3" + debug "1.0.4" + engine.io-parser "1.2.2" + has-cors "1.0.3" + indexof "0.0.1" + parsejson "0.0.1" + parseqs "0.0.2" + parseuri "0.0.4" + ws "0.8.0" + xmlhttprequest "https://github.com/rase-/node-XMLHttpRequest/archive/a6b6f2.tar.gz" + +engine.io-parser@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-1.2.2.tgz#cd081041feea39c64323ff79b82a90a72afcccdd" + integrity sha1-zQgQQf7qOcZDI/95uCqQpyr8zN0= + dependencies: + after "0.8.1" + arraybuffer.slice "0.0.6" + base64-arraybuffer "0.1.2" + blob "0.0.4" + has-binary "0.1.6" + utf8 "2.1.0" + entities@^1.1.1, entities@~1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" @@ -3060,6 +3185,10 @@ glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: once "^1.3.0" path-is-absolute "^1.0.0" +"global@https://github.com/component/global/archive/v2.0.1.tar.gz": + version "2.0.1" + resolved "https://github.com/component/global/archive/v2.0.1.tar.gz#3fb25343fb66d79991b0f4a429ce3b54480eec3c" + globals@^11.7.0: version "11.12.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" @@ -3112,6 +3241,20 @@ har-validator@~5.1.0: ajv "^6.5.5" har-schema "^2.0.0" +has-binary@0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/has-binary/-/has-binary-0.1.6.tgz#25326f39cfa4f616ad8787894e3af2cfbc7b6e10" + integrity sha1-JTJvOc+k9hath4eJTjryz7x7bhA= + dependencies: + isarray "0.0.1" + +has-cors@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-cors/-/has-cors-1.0.3.tgz#502acb9b3104dac33dd2630eaf2f888b0baf4cb3" + integrity sha1-UCrLmzEE2sM90mMOry+IiwuvTLM= + dependencies: + global "https://github.com/component/global/archive/v2.0.1.tar.gz" + has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -3296,6 +3439,11 @@ indent-string@^3.0.0: resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289" integrity sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok= +indexof@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" + integrity sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10= + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -3574,6 +3722,11 @@ is-windows@^1.0.2: resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= + isarray@1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -3717,6 +3870,11 @@ json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= +json3@3.2.6: + version "3.2.6" + resolved "https://registry.yarnpkg.com/json3/-/json3-3.2.6.tgz#f6efc93c06a04de9aec53053df2559bb19e2038b" + integrity sha1-9u/JPAagTemuxTBT3yVZuxniA4s= + json5@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.0.tgz#e7a0c62c48285c628d20a10b85c89bb807c32850" @@ -4237,6 +4395,11 @@ move-concurrently@^1.0.1: rimraf "^2.5.4" run-queue "^1.0.3" +ms@0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.6.2.tgz#d89c2124c6fdc1353d65a8b77bf1aac4b193708c" + integrity sha1-2JwhJMb9wTU9Zai3e/GqxLGTcIw= + ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -4267,11 +4430,21 @@ mute-stream@~0.0.4: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== +nan@^2.0.5: + version "2.14.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" + integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== + nan@~2.10.0: version "2.10.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f" integrity sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA== +nan@~2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.4.0.tgz#fb3c59d45fe4effe215f0b890f8adf6eb32d2232" + integrity sha1-+zxZ1F/k7/4hXwuJD4rfbrMtIjI= + nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -4466,6 +4639,11 @@ object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= +object-component@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/object-component/-/object-component-0.0.3.tgz#f0c69aa50efc95b866c186f400a33769cb2f1291" + integrity sha1-8MaapQ78lbhmwYb0AKM3acsvEpE= + object-copy@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" @@ -4541,6 +4719,11 @@ optionator@^0.8.1, optionator@^0.8.2: type-check "~0.3.2" wordwrap "~1.0.0" +options@>=0.0.5: + version "0.0.6" + resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f" + integrity sha1-7CLTEoBrtT5zF3Pnza788cZDEo8= + orderedmap@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/orderedmap/-/orderedmap-1.0.0.tgz#d90fc2ba1ed085190907d601dec6e6a53f8d41ba" @@ -4734,6 +4917,34 @@ parse5@^1.5.1: resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94" integrity sha1-m387DeMr543CQBsXVzzK8Pb1nZQ= +parsejson@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/parsejson/-/parsejson-0.0.1.tgz#9b10c6c0d825ab589e685153826de0a3ba278bcc" + integrity sha1-mxDGwNglq1ieaFFTgm3go7oni8w= + dependencies: + better-assert "~1.0.0" + +parseqs@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/parseqs/-/parseqs-0.0.2.tgz#9dfe70b2cddac388bde4f35b1f240fa58adbe6c7" + integrity sha1-nf5wss3aw4i95PNbHyQPpYrb5sc= + dependencies: + better-assert "~1.0.0" + +parseuri@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/parseuri/-/parseuri-0.0.2.tgz#db41878f2d6964718be870b3140973d8093be156" + integrity sha1-20GHjy1pZHGL6HCzFAlz2Ak74VY= + dependencies: + better-assert "~1.0.0" + +parseuri@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/parseuri/-/parseuri-0.0.4.tgz#806582a39887e1ea18dd5e2fe0e01902268e9350" + integrity sha1-gGWCo5iH4eoY3V4v4OAZAiaOk1A= + dependencies: + better-assert "~1.0.0" + pascalcase@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" @@ -5642,6 +5853,34 @@ snapdragon@^0.8.1: source-map-resolve "^0.5.0" use "^3.1.0" +socket.io-client@1.3.7: + version "1.3.7" + resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-1.3.7.tgz#7ab7c069b8d50425eb265f031f84a97e6ebe719c" + integrity sha1-erfAabjVBCXrJl8DH4Spfm6+cZw= + dependencies: + backo2 "1.0.2" + component-bind "1.0.0" + component-emitter "1.1.2" + debug "0.7.4" + engine.io-client "1.5.4" + has-binary "0.1.6" + indexof "0.0.1" + object-component "0.0.3" + parseuri "0.0.2" + socket.io-parser "2.2.4" + to-array "0.1.3" + +socket.io-parser@2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-2.2.4.tgz#f9ce19bf1909608ceb15d97721e23bfdd1e7cf65" + integrity sha1-+c4ZvxkJYIzrFdl3IeI7/dHnz2U= + dependencies: + benchmark "1.0.0" + component-emitter "1.1.2" + debug "0.7.4" + isarray "0.0.1" + json3 "3.2.6" + socks-proxy-agent@^4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-4.0.2.tgz#3c8991f3145b2799e70e11bd5fbc8b1963116386" @@ -5999,6 +6238,11 @@ tmp@^0.0.33: dependencies: os-tmpdir "~1.0.2" +to-array@0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/to-array/-/to-array-0.1.3.tgz#d45dadc6363417f60f28474fea50ecddbb4f4991" + integrity sha1-1F2txjY0F/YPKEdP6lDs3btPSZE= + to-object-path@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" @@ -6186,6 +6430,11 @@ uid-number@0.0.6: resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" integrity sha1-DqEOgDXo61uOREnwbaHHMGY7qoE= +ultron@1.0.x: + version "1.0.2" + resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.0.2.tgz#ace116ab557cd197386a4e88f4685378c8b2e4fa" + integrity sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po= + umask@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/umask/-/umask-1.1.0.tgz#f29cebf01df517912bb58ff9c4e50fde8e33320d" @@ -6265,6 +6514,19 @@ use@^3.1.0: resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== +utf-8-validate@1.2.x: + version "1.2.2" + resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-1.2.2.tgz#8bb871a4741e085c70487ca7acdbd7d6d36029eb" + integrity sha1-i7hxpHQeCFxwSHynrNvX1tNgKes= + dependencies: + bindings "~1.2.1" + nan "~2.4.0" + +utf8@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/utf8/-/utf8-2.1.0.tgz#0cfec5c8052d44a23e3aaa908104e8075f95dfd5" + integrity sha1-DP7FyAUtRKI+OqqQgQToB1+V39U= + util-deprecate@^1.0.1, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" @@ -6470,6 +6732,17 @@ write@1.0.3: dependencies: mkdirp "^0.5.1" +ws@0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-0.8.0.tgz#ac60ebad312121d01e16cc3383d7ec67ad0f0f1f" + integrity sha1-rGDrrTEhIdAeFswzg9fsZ60PDx8= + dependencies: + options ">=0.0.5" + ultron "1.0.x" + optionalDependencies: + bufferutil "1.2.x" + utf-8-validate "1.2.x" + ws@^7.0.0: version "7.1.0" resolved "https://registry.yarnpkg.com/ws/-/ws-7.1.0.tgz#0395646c6fcc3ac56abf61ce1a42039637a6bd98" @@ -6492,6 +6765,10 @@ xmlchars@^2.1.1: resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.1.1.tgz#ef1a81c05bff629c2280007f12daca21bd6f6c93" integrity sha512-7hew1RPJ1iIuje/Y01bGD/mXokXxegAgVS+e+E0wSi2ILHQkYAH1+JXARwTjZSM4Z4Z+c73aKspEcqj+zPPL/w== +"xmlhttprequest@https://github.com/rase-/node-XMLHttpRequest/archive/a6b6f2.tar.gz": + version "1.5.0" + resolved "https://github.com/rase-/node-XMLHttpRequest/archive/a6b6f2.tar.gz#20cafa5caa55f6db6bfaee849d1eb60ee43a5fca" + xmlshim@^0.2.5: version "0.2.5" resolved "https://registry.yarnpkg.com/xmlshim/-/xmlshim-0.2.5.tgz#59dd36167ff422b8433ea63d49d2c9c6bcf01133" @@ -6505,6 +6782,35 @@ xtend@^4.0.1, xtend@~4.0.1: resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== +y-array@*: + version "10.1.4" + resolved "https://registry.yarnpkg.com/y-array/-/y-array-10.1.4.tgz#e131a5b030d6dcbca10268d4293ecf44bdae7b34" + integrity sha1-4TGlsDDW3LyhAmjUKT7PRL2uezQ= + +y-map@*: + version "10.1.3" + resolved "https://registry.yarnpkg.com/y-map/-/y-map-10.1.3.tgz#a15802cedbac369e506b96f68def8f0a2e836196" + integrity sha1-oVgCztusNp5Qa5b2je+PCi6DYZY= + +y-memory@*: + version "8.0.9" + resolved "https://registry.yarnpkg.com/y-memory/-/y-memory-8.0.9.tgz#551af9ca153bd344647663b91ebde59a6802b23b" + integrity sha512-OrcReh6DgZhz5R7JGXqAH53T0Ygw24qcxKj4jN9w2DIi2eIiKFCD5Y6apBTTNxiw2FaVP15F+M8phRRIMXFGBQ== + +y-text@*: + version "9.5.1" + resolved "https://registry.yarnpkg.com/y-text/-/y-text-9.5.1.tgz#8739f42592e73d795c4b56a8de013e46c14170ac" + integrity sha512-uwNLY4LeLLR7Cu4xfvh9ZY4gmOYyjii4irDHYRuhPDs1XFcm6krVaALeggA42LevTQ+k5q1eHpdv5jnJha8r6g== + dependencies: + fast-diff "^1.1.1" + +y-websockets-client@^8.0.0-0: + version "8.0.16" + resolved "https://registry.yarnpkg.com/y-websockets-client/-/y-websockets-client-8.0.16.tgz#a50b0ad7546952542a3d3300bd4d0e85a2fb7443" + integrity sha1-pQsK11RpUlQqPTMAvU0OhaL7dEM= + dependencies: + socket.io-client "1.3.7" + "y18n@^3.2.1 || ^4.0.0", y18n@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" @@ -6545,3 +6851,10 @@ yargs@^12.0.1: which-module "^2.0.0" y18n "^3.2.1 || ^4.0.0" yargs-parser "^11.1.1" + +yjs@^12.0.0-0: + version "12.3.3" + resolved "https://registry.yarnpkg.com/yjs/-/yjs-12.3.3.tgz#7bec14d59afe166d68cc2b27413193c0e5ba724c" + integrity sha1-e+wU1Zr+Fm1ozCsnQTGTwOW6ckw= + dependencies: + debug "^2.6.3"