jupyter-docprovider 2.2.0b0__tar.gz → 2.2.1__tar.gz
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.
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/PKG-INFO +1 -1
- jupyter_docprovider-2.2.1/jupyter_docprovider/_version.py +1 -0
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/jupyter_docprovider/labextension/package.json +4 -4
- jupyter_docprovider-2.2.1/jupyter_docprovider/labextension/static/240.cfc0784ac6d2ff6b4dcf.js +1 -0
- jupyter_docprovider-2.2.1/jupyter_docprovider/labextension/static/703.cca2ba3bbe2fb4612085.js +1 -0
- jupyter_docprovider-2.2.0b0/jupyter_docprovider/labextension/static/944.eaec77f5cee3f07c3b7f.js → jupyter_docprovider-2.2.1/jupyter_docprovider/labextension/static/944.44dd443686c15fbe0cbf.js +1 -1
- jupyter_docprovider-2.2.1/jupyter_docprovider/labextension/static/remoteEntry.f104f1bdbc3e78a4d5c6.js +1 -0
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/jupyter_docprovider/labextension/static/third-party-licenses.json +3 -3
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/package.json +2 -2
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/src/TimelineSlider.tsx +6 -1
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/src/__tests__/forkManager.spec.ts +10 -5
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/src/component.tsx +12 -5
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/src/forkManager.ts +15 -4
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/src/requests.ts +12 -8
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/src/ydrive.ts +3 -8
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/src/yprovider.ts +43 -9
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider-extension/package.json +3 -3
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider-extension/src/filebrowser.ts +2 -1
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider-extension/src/forkManager.ts +5 -1
- jupyter_docprovider-2.2.0b0/jupyter_docprovider/_version.py +0 -1
- jupyter_docprovider-2.2.0b0/jupyter_docprovider/labextension/static/240.d0fe2fe7cb8c5a435ea6.js +0 -1
- jupyter_docprovider-2.2.0b0/jupyter_docprovider/labextension/static/703.8f6b4edcd0613ddadb68.js +0 -1
- jupyter_docprovider-2.2.0b0/jupyter_docprovider/labextension/static/remoteEntry.8fdfd7ea5206eb9831ce.js +0 -1
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/.gitignore +0 -0
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/LICENSE +0 -0
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/README.md +0 -0
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/install.json +0 -0
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/jupyter_docprovider/__init__.py +0 -0
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/jupyter_docprovider/labextension/static/422.3ab44960b241aac9f303.js +0 -0
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/jupyter_docprovider/labextension/static/444.13de0fd44849e3f7d780.js +0 -0
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/jupyter_docprovider/labextension/static/994.bc087314bdabeecb0923.js +0 -0
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/jupyter_docprovider/labextension/static/style.js +0 -0
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/babel.config.js +0 -0
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/jest.config.js +0 -0
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/src/__tests__/yprovider.spec.ts +0 -0
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/src/awareness.ts +0 -0
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/src/index.ts +0 -0
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/src/notebookCellExecutor.ts +0 -0
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/src/tokens.ts +0 -0
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/style/base.css +0 -0
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/style/index.css +0 -0
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/style/index.js +0 -0
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/style/slider.css +0 -0
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/tsconfig.json +0 -0
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/tsconfig.test.json +0 -0
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider-extension/README.md +0 -0
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider-extension/src/executor.ts +0 -0
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider-extension/src/index.ts +0 -0
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider-extension/style/index.css +0 -0
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider-extension/style/index.js +0 -0
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider-extension/tsconfig.json +0 -0
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/pyproject.toml +0 -0
- {jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: jupyter-docprovider
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.1
|
|
4
4
|
Summary: JupyterLab/Jupyter Notebook 7+ extension integrating collaborative shared models.
|
|
5
5
|
Project-URL: Documentation, https://jupyterlab-realtime-collaboration.readthedocs.io/
|
|
6
6
|
Project-URL: Repository, https://github.com/jupyterlab/jupyter-collaboration
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.2.1"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupyter/docprovider-extension",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.1",
|
|
4
4
|
"description": "JupyterLab - Collaborative Shared Models",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jupyter",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"watch:labextension": "jupyter labextension watch ."
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@jupyter/collaborative-drive": "^4.2.
|
|
57
|
-
"@jupyter/docprovider": "^4.2.
|
|
56
|
+
"@jupyter/collaborative-drive": "^4.2.1",
|
|
57
|
+
"@jupyter/docprovider": "^4.2.1",
|
|
58
58
|
"@jupyter/ydoc": "^2.1.3 || ^3.0.0",
|
|
59
59
|
"@jupyterlab/application": "^4.5.0",
|
|
60
60
|
"@jupyterlab/apputils": "^4.5.0",
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
}
|
|
129
129
|
},
|
|
130
130
|
"_build": {
|
|
131
|
-
"load": "static/remoteEntry.
|
|
131
|
+
"load": "static/remoteEntry.f104f1bdbc3e78a4d5c6.js",
|
|
132
132
|
"extension": "./extension",
|
|
133
133
|
"style": "./style"
|
|
134
134
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_jupyter_docprovider_extension=self.webpackChunk_jupyter_docprovider_extension||[]).push([[240],{68:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(758),o=n.n(r),s=n(935),i=n.n(s)()(o());i.push([e.id,"/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|---------------------------------------------------------------------------- */\n\n.jp-timelineSliderWrapper .jp-sliderContainer{\n display: flex;\n align-items: center;\n}\n\n.jp-Slider {\n height: 4.5px\n}\n\n#jp-slider-status-bar {\n display: flex;\n}\n\n.jp-timestampDisplay {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 6px;\n}\n\n.jp-restoreBtnContainer {\n width: 192px;\n}\n\n.jp-ToolbarButtonComponent.jp-restoreBtn {\n cursor: pointer;\n color: var(--jp-layout-color2);\n width: 100%;\n background: var(--jp-accept-color-normal)\n}\n",""]);const a=i},935:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,s){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(r)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(i[c]=!0)}for(var l=0;l<e.length;l++){var d=[].concat(e[l]);r&&i[d[0]]||(void 0!==s&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=s),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),o&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=o):d[4]="".concat(o)),t.push(d))}},t}},758:e=>{e.exports=function(e){return e[1]}},972:e=>{var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var s={},i=[],a=0;a<e.length;a++){var c=e[a],l=r.base?c[0]+r.base:c[0],d=s[l]||0,h="".concat(l," ").concat(d);s[l]=d+1;var u=n(h),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==u)t[u].references++,t[u].updater(p);else{var v=o(p,r);r.byIndex=a,t.splice(a,0,{identifier:h,updater:v,references:1})}i.push(h)}return i}function o(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var s=r(e=e||[],o=o||{});return function(e){e=e||[];for(var i=0;i<s.length;i++){var a=n(s[i]);t[a].references--}for(var c=r(e,o),l=0;l<s.length;l++){var d=n(s[l]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}s=c}}},128:e=>{var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},51:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},855:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},740:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},656:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},240:(e,t,n)=>{n.r(t),n.d(t,{ForkManager:()=>z,IForkManagerToken:()=>q,JUPYTER_COLLABORATION_FORK_EVENTS_URI:()=>K,NotebookCellServerExecutor:()=>l,ROOM_FORK_URL:()=>p,RtcContentProvider:()=>C,TimelineWidget:()=>V,WebSocketAwarenessProvider:()=>o,WebSocketProvider:()=>S,requestAPI:()=>v,requestDocSession:()=>m,requestDocumentTimeline:()=>g,requestUndoRedo:()=>f});var r=n(560);class o extends r.WebsocketProvider{constructor(e){super(e.url,e.roomID,e.awareness.doc,{awareness:e.awareness}),this._isDisposed=!1,this._awareness=e.awareness,this._user=e.user,this._user.ready.then((()=>this._onUserChanged(this._user))).catch((e=>console.error(e))),this._user.userChanged.connect(this._onUserChanged,this)}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed||(this._user.userChanged.disconnect(this._onUserChanged,this),this._isDisposed=!0,this.destroy())}_onUserChanged(e){this._awareness.setLocalStateField("user",e.identity)}}var s=n(285),i=n(526),a=n(125),c=n(769);class l{constructor(e){var t;this._serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:a.ServerConnection.makeSettings()}async runCell({cell:e,notebook:t,notebookConfig:n,onCellExecuted:r,onCellExecutionScheduled:o,sessionContext:l,sessionDialogs:d,translator:h}){var u,p,v;const m=(h=null!=h?h:c.nullTranslator).load("jupyterlab");switch(e.model.type){case"markdown":e.rendered=!0,e.inputHidden=!1,r({cell:e,success:!0});break;case"code":if(l){if(l.isTerminating){await(0,s.showDialog)({title:m.__("Kernel Terminating"),body:m.__("The kernel for %1 appears to be terminating. You can not run any cell for now.",null===(u=l.session)||void 0===u?void 0:u.path),buttons:[s.Dialog.okButton()]});break}if(l.pendingInput)return await(0,s.showDialog)({title:m.__("Cell not executed due to pending input"),body:m.__("The cell has not been executed to avoid kernel deadlock as there is another pending input! Submit your pending input and try again."),buttons:[s.Dialog.okButton()]}),!1;if(l.hasNoKernel&&await l.startKernel()&&d&&await d.selectKernel(l),l.hasNoKernel)return e.model.sharedModel.transact((()=>{e.model.clearExecution()})),!0;const n=null===(v=null===(p=null==l?void 0:l.session)||void 0===p?void 0:p.kernel)||void 0===v?void 0:v.id,c=i.URLExt.join(this._serverSettings.baseUrl,`api/kernels/${n}/execute`),h=e.model.sharedModel.getId(),g=t.sharedModel.getState("document_id"),f={method:"POST",body:JSON.stringify({cell_id:h,document_id:g})};o({cell:e});let _=!1;try{_=(await a.ServerConnection.makeRequest(c,f,this._serverSettings)).ok}catch(t){if(r({cell:e,success:!1}),e.isDisposed)return!1;throw t}return r({cell:e,success:_}),!0}e.model.sharedModel.transact((()=>{e.model.clearExecution()}),!1)}return Promise.resolve(!0)}}const d="api/collaboration/session",h="api/collaboration/undo_redo",u="api/collaboration/timeline",p="api/collaboration/fork";async function v(e="",t={},n){const r=null!=n?n:a.ServerConnection.makeSettings(),o=i.URLExt.join(r.baseUrl,e);let s;try{s=await a.ServerConnection.makeRequest(o,t,r)}catch(e){throw new a.ServerConnection.NetworkError(e)}let c=await s.text();if(c.length>0)try{c=JSON.parse(c)}catch(e){console.error("Not a JSON response body.",s)}if(!s.ok)throw new a.ServerConnection.ResponseError(s,c.message||c);return c}async function m(e,t,n,r){const o=null!=r?r:a.ServerConnection.makeSettings(),s=i.URLExt.join(o.baseUrl,d,encodeURIComponent(n)),c={method:"PUT",body:JSON.stringify({format:e,type:t})};let l;try{l=await a.ServerConnection.makeRequest(s,c,o)}catch(e){throw new a.ServerConnection.NetworkError(e)}let h=await l.text();if(h.length>0)try{h=JSON.parse(h)}catch(e){console.log("Not a JSON response body.",l)}if(!l.ok)throw new a.ServerConnection.ResponseError(l,h.message||h);return h}async function g(e,t,n,r){const o=null!=r?r:a.ServerConnection.makeSettings();let s=i.URLExt.join(o.baseUrl,u,n);s=s.concat(`?format=${e}&&type=${t}`);const c={method:"GET"};let l;try{l=await a.ServerConnection.makeRequest(s,c,o)}catch(e){throw new a.ServerConnection.NetworkError(e)}return l}async function f(e,t,n,r,o){const s=null!=o?o:a.ServerConnection.makeSettings();let c=i.URLExt.join(s.baseUrl,h,encodeURIComponent(e));c=c.concat(`?action=${t}&&steps=${n}&&forkRoom=${r}`);const l={method:"PUT"};let d;try{d=await a.ServerConnection.makeRequest(c,l,s)}catch(e){throw new a.ServerConnection.NetworkError(e)}let u=await d.text();if(u.length>0)try{u=JSON.parse(u)}catch(e){console.log("Not a JSON response body.",d)}if(!d.ok)throw new a.ServerConnection.ResponseError(d,u.message||u);return u}var _=n(262),y=n(602);class S{constructor(e){var t;this._onConnectionClosed=e=>{1003===e.code&&(console.error("Document provider closed:",e.reason),(0,s.showErrorMessage)(this._trans.__("Document session error"),e.reason,[s.Dialog.okButton()]),this._sharedModel.dispose())},this._onSync=e=>{e&&(this._yWebsocketProvider&&(this._yWebsocketProvider.off("sync",this._onSync),this._sharedModel.ydoc.getMap("state").set("document_id",this._yWebsocketProvider.roomname)),this._ready.resolve())},this._ready=new _.PromiseDelegate,this._isDisposed=!1,this._path=e.path,this._contentType=e.contentType,this._format=e.format,this._customServerUrl=e.url,this._sharedModel=e.model,this._awareness=e.model.awareness,this._yWebsocketProvider=null,this._serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:a.ServerConnection.makeSettings(),this._trans=e.translator;const n=e.user;n.ready.then((()=>{this._onUserChanged(n)})).catch((e=>console.error(e))),n.userChanged.connect(this._onUserChanged,this),this._connect().catch((e=>console.warn(e)))}get isDisposed(){return this._isDisposed}get ready(){return this._ready.promise}get contentType(){return this._contentType}get format(){return this._format}dispose(){var e,t,n;this.isDisposed||(this._isDisposed=!0,null===(e=this._yWebsocketProvider)||void 0===e||e.off("connection-close",this._onConnectionClosed),null===(t=this._yWebsocketProvider)||void 0===t||t.off("sync",this._onSync),null===(n=this._yWebsocketProvider)||void 0===n||n.destroy(),this._disconnect(),y.Signal.clearData(this))}async reconnect(){this._disconnect(),this._connect()}get _serverUrl(){var e;return null!==(e=this._customServerUrl)&&void 0!==e?e:i.URLExt.join(this._serverSettings.wsUrl,"api/collaboration/room")}async _connect(){const e=await m(this._format,this._contentType,this._path,this._serverSettings),t=this._serverSettings.token,n={sessionId:e.sessionId};this._serverSettings.appendToken&&""!==t&&(n.token=t),this._yWebsocketProvider=new r.WebsocketProvider(this._serverUrl,`${e.format}:${e.type}:${e.fileId}`,this._sharedModel.ydoc,{disableBc:!0,params:n,awareness:this._awareness,WebSocketPolyfill:this._serverSettings.WebSocket}),this._yWebsocketProvider.on("sync",this._onSync),this._yWebsocketProvider.on("connection-close",this._onConnectionClosed)}async connectToForkDoc(e,t){const n=this._serverSettings.token,o={sessionId:t};this._serverSettings.appendToken&&""!==n&&(o.token=n),this._disconnect(),this._yWebsocketProvider=new r.WebsocketProvider(this._serverUrl,e,this._sharedModel.ydoc,{disableBc:!0,params:o,awareness:this._awareness,WebSocketPolyfill:this._serverSettings.WebSocket})}get wsProvider(){return this._yWebsocketProvider}_disconnect(){var e,t,n;null===(e=this._yWebsocketProvider)||void 0===e||e.off("connection-close",this._onConnectionClosed),null===(t=this._yWebsocketProvider)||void 0===t||t.off("sync",this._onSync),null===(n=this._yWebsocketProvider)||void 0===n||n.destroy(),this._yWebsocketProvider=null}_onUserChanged(e){this._awareness.setLocalStateField("user",e.identity)}}var w=n(721),k=n(214);const b="true"===i.PageConfig.getOption("disableRTC");class C{constructor(e){this._onCreate=(e,t)=>{var n,r,o,s,i,a,c;if("string"!=typeof e.format)return;const l=null===(o=null===(r=null===(n=this._docmanagerSettings)||void 0===n?void 0:n.composite)||void 0===r?void 0:r.autosave)||void 0===o||o;t.awareness.setLocalStateField("autosave",l),null===(s=this._docmanagerSettings)||void 0===s||s.changed.connect((()=>{var e,n,r;const o=null===(r=null===(n=null===(e=this._docmanagerSettings)||void 0===e?void 0:e.composite)||void 0===n?void 0:n.autosave)||void 0===r||r;t.awareness.setLocalStateField("autosave",o)}));try{const n=new S({path:e.path,format:e.format,contentType:e.contentType,model:t,user:this._user,translator:this._trans,serverSettings:this._serverSettings}),r=((null===(i=this._globalAwareness)||void 0===i?void 0:i.getLocalState())||{}).documents||[];r.includes(e.path)||(r.push(e.path),null===(a=this._globalAwareness)||void 0===a||a.setLocalStateField("documents",r));let o=e.path,s=`${e.format}:${e.contentType}:${o}`;this._providers.set(s,n);const l=t=>{var n,r;const i=t.oldValue,a=t.newValue;if(!i||!a)return void console.debug("New or old path not given",t);const c=`${e.format}:${e.contentType}:${i}`;if(c!==s)return void console.error("The computed old provider key is different from the current key");const l=`${e.format}:${e.contentType}:${a}`,d=this._providers.get(c);if(!d)return void console.warn(`Could not find a provider to update after rename ${c}, ${l}`);this._providers.set(l,d),this._providers.delete(c),s=l,o=a;const h=((null===(n=this._globalAwareness)||void 0===n?void 0:n.getLocalState())||{}).documents||[],u=h.indexOf(i);h.includes(i)&&!h.includes(a)&&(h.splice(u,1),h.push(a),null===(r=this._globalAwareness)||void 0===r||r.setLocalStateField("documents",h))},d=(e,t)=>{var n,r;if("rename"!==t.type)return;const s=null===(n=t.oldValue)||void 0===n?void 0:n.path,i=null===(r=t.newValue)||void 0===r?void 0:r.path;s===o&&l({oldValue:s,newValue:i,name:"path"})};null===(c=this._driveFileChanged)||void 0===c||c.connect(d),t.changed.connect((async(n,r)=>{var o;if(!r.stateChange)return;const s=r.stateChange.filter((e=>"path"===e.name));for(const e of s)l(e);const i=r.stateChange.filter((e=>"hash"===e.name));if(0===i.length)return;i.length>1&&console.error("Unexpected multiple changes to hash value in a single transaction");const a=i[0],c=null!==(o=t.state.path)&&void 0!==o?o:e.path,d=await this.get(c,{content:!1});this._providerFileChanged.emit({type:"save",newValue:{...d,hash:a.newValue},oldValue:{hash:a.oldValue}})})),t.disposed.connect((()=>{var e,t,n;const r=this._providers.get(s);r&&(r.dispose(),this._providers.delete(s));const i=((null===(e=this._globalAwareness)||void 0===e?void 0:e.getLocalState())||{}).documents||[],a=i.indexOf(o);a>-1&&i.splice(a,1),null===(t=this._globalAwareness)||void 0===t||t.setLocalStateField("documents",i),null===(n=this._driveFileChanged)||void 0===n||n.disconnect(d)}))}catch(t){console.error(`Failed to open websocket connection for ${e.path}.\n:${t}`)}},this._saveCounter=0,this._providerFileChanged=new y.Signal(this),this._user=e.user,this._trans=e.trans,this._globalAwareness=e.globalAwareness,this._serverSettings=e.serverSettings,this._currentDrive=e.currentDrive,this.sharedModelFactory=new T(this._onCreate),this._providers=new Map,this._docmanagerSettings=e.docmanagerSettings,this._driveFileChanged=e.fileChanged}get providers(){return this._providers}async get(e,t){if(t&&t.format&&t.type){const n=`${t.format}:${t.type}:${e}`,r=this._providers.get(n);if(r){const[n]=await Promise.all([this._currentDrive.get(e,{...t,content:!1,contentProviderId:void 0}),r.ready]);return{...n,format:t.format}}}return this._currentDrive.get(e,{...t,contentProviderId:void 0})}async save(e,t={}){var n;if(t.format&&t.type){const r=`${t.format}:${t.type}:${e}`,o=this._providers.get(r),s=++this._saveCounter;if(o){const r=null===(n=o.wsProvider)||void 0===n?void 0:n.ws;if(r){const e=new _.PromiseDelegate,t=t=>{const n=new Uint8Array(t.data),r=w.$C(n);try{if(2!==w.cw(r))return}catch(e){return}const o=w.t3(r);let i=null;try{i=JSON.parse(o)}catch(e){console.debug("The raw reply received was not a JSON reply")}i&&"save"===i.type&&i.responseTo===s&&("success"===i.status?e.resolve():"failed"===i.status?e.reject("Saving failed"):"skipped"===i.status?e.reject("Saving already in progress"):e.reject("Unrecognised save reply status"))};r.addEventListener("message",t);const n=k.xv();k.zd(n,2),k.Qj(n,"save"),k.zd(n,s);const o=k.Fo(n);r.send(o),await e.promise,r.removeEventListener("message",t)}const i={type:t.type,format:t.format,content:!1};return this.get(e,i)}console.warn(`Could not find a provider for ${e}, falling back to REST API save`)}return this._currentDrive.save(e,{...t,contentProviderId:void 0})}get fileChanged(){return this._providerFileChanged}}class T{constructor(e){this._onCreate=e,this.collaborative=!b,this.documentFactories=new Map}registerDocumentFactory(e,t){if(this.documentFactories.has(e))throw new Error(`The content type ${e} already exists`);this.documentFactories.set(e,t)}createNew(e){if("string"==typeof e.format){if(this.collaborative&&e.collaborative&&this.documentFactories.has(e.contentType)){const t=this.documentFactories.get(e.contentType)(e);return this._onCreate(e,t),t}}else console.warn(`Only defined format are supported; got ${e.format}.`)}}var E=n(345),x=n.n(E),U=n(972),R=n.n(U),$=n(740),D=n.n($),P=n(128),j=n.n(P),N=n(855),L=n.n(N),I=n(51),F=n.n(I),M=n(656),A=n.n(M),W=n(68),O={};O.styleTagTransform=A(),O.setAttributes=L(),O.insert=j().bind(null,"head"),O.domAPI=D(),O.insertStyleElement=F(),R()(W.A,O),W.A&&W.A.locals&&W.A.locals;var J=n(391);const B=({apiURL:e,provider:t,contentType:n,format:r,documentTimelineUrl:o,serverSettings:i})=>{const[a,c]=(0,E.useState)({roomId:"",timestamps:[],forkRoom:"",sessionId:""}),[l,d]=(0,E.useState)(a.timestamps.length-1),[h,u]=(0,E.useState)(!1),[p,v]=(0,E.useState)(!1),_=(0,E.useRef)(!0),y=(0,E.useRef)(!0),S=(0,E.useRef)(null);function w(e){try{const t=new URL(e).pathname,n=t.lastIndexOf(o);if(-1===n)throw new Error(`API segment "${o}" not found in URL.`);return t.slice(n+o.length)}catch(e){return console.error("Invalid URL or unable to extract filename:",e),""}}return x().createElement("div",{className:"jp-sliderContainer"},x().createElement("div",{onClick:()=>{!async function(o){try{if(_.current){const a=await g(r,n,o,i);if(!a.ok)throw 404===a.status?new Error("Not found"):503===a.status?new Error("WebSocket closed"):new Error(`Failed to fetch data: ${a.statusText}`);const l=await a.text();let h={roomId:"",timestamps:[],forkRoom:"",sessionId:""};return l&&(s.Notification.warning("Document is now in read-only mode. Changes will not be saved.",{autoClose:2500}),h=JSON.parse(l),c(h),d(h.timestamps.length-1),t.connectToForkDoc(h.forkRoom,h.sessionId),S.current=await m(r,n,w(e),i)),u(!0),_.current=!1,h}}catch(e){console.error("Error fetching data:",e)}}(w(e))},className:"jp-mod-highlighted",title:"Document Timeline"},x().createElement(J.historyIcon.react,{marginRight:"4px"})),h&&x().createElement("div",{className:"jp-timestampDisplay"},x().createElement("input",{type:"range",min:0,max:a.timestamps.length-1,value:l,onChange:async e=>{const t=parseInt(e.target.value),n=Math.abs(t-l);try{const e=function(e){return e<l?"undo":"redo"}(t);if(d(t),y.current&&(v(!0),y.current=!1),!S.current)return void console.error("Session is not initialized");await f(`${S.current.format}:${S.current.type}:${S.current.fileId}`,e,n,a.forkRoom,i)}catch(e){console.error("Error fetching or applying updates:",e)}},className:"jp-Slider"}),x().createElement("div",null,x().createElement("strong",null,w(e).split("/").pop()," ")," "),p&&x().createElement("div",{className:"jp-restoreBtnContainer"},x().createElement("button",{onClick:async()=>{if(!S.current)return void console.error("Session is not initialized");const e=await f(`${S.current.format}:${S.current.type}:${S.current.fileId}`,"restore",0,a.forkRoom,i);200===e.code?(s.Notification.success(e.status,{autoClose:4e3}),t.reconnect(),u(!1),_.current=!0):s.Notification.error(e.status,{autoClose:4e3})},className:"jp-ToolbarButtonComponent jp-restoreBtn"},"Restore version"," ",(e=>{const t=new Date(1e3*e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")} ${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}:${String(t.getSeconds()).padStart(2,"0")}`})(a.timestamps[l])))))};class V extends s.ReactWidget{constructor(e,t,n,r,o,s){super(),this.apiURL=e,this.provider=t,this.contentType=n,this.format=r,this.documentTimelineUrl=o,this._serverSettings=s,this.addClass("jp-timelineSliderWrapper")}render(){return E.createElement(B,{key:this.apiURL,apiURL:this.apiURL,provider:this.provider,contentType:this.contentType,format:this.format,documentTimelineUrl:this.documentTimelineUrl,serverSettings:this._serverSettings})}updateContent(e,t){this.apiURL=e,this.provider=t,this.contentType=this.provider.contentType,this.format=this.provider.format,this.update()}}const q=new _.Token("@jupyter/docprovider:IForkManagerToken"),K="https://schema.jupyter.org/jupyter_collaboration/fork/v1";class z{constructor(e){this._disposed=!1,this._forkAddedSignal=new y.Signal(this),this._forkDeletedSignal=new y.Signal(this);const{contentProvider:t,eventManager:n}=e;this._contentProvider=t,this._eventManager=n,this._eventManager.stream.connect(this._handleEvent,this),this._serverSettings=e.serverSettings}get isDisposed(){return this._disposed}get forkAdded(){return this._forkAddedSignal}get forkDeleted(){return this._forkDeletedSignal}dispose(){var e;this._disposed||(null===(e=this._eventManager)||void 0===e||e.stream.disconnect(this._handleEvent),this._disposed=!0)}async createFork(e){const{rootId:t,title:n,description:r,synchronize:o}=e,s={method:"PUT",body:JSON.stringify({title:n,description:r,synchronize:o})},a=i.URLExt.join(p,t);return await v(a,s,this._serverSettings)}async getAllForks(e){const t=i.URLExt.join(p,e);return await v(t,{method:"GET"},this._serverSettings)}async deleteFork(e){const{forkId:t,merge:n}=e,r=i.URLExt.join(p,t),o=i.URLExt.objectToQueryString({merge:n});await v(`${r}${o}`,{method:"DELETE"},this._serverSettings)}getProvider(e){const{documentPath:t,format:n,type:r}=e,o=this._contentProvider;if(o){const e=t;return o.providers.get(`${n}:${r}:${e}`)}}_handleEvent(e,t){if(t.schema_id===K)switch(t.action){case"create":this._forkAddedSignal.emit(t);break;case"delete":this._forkDeletedSignal.emit(t)}}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_jupyter_docprovider_extension=self.webpackChunk_jupyter_docprovider_extension||[]).push([[703],{703:(e,t,o)=>{o.r(t),o.d(t,{default:()=>C});var r=o(285),n=o(247),i=o(165),a=o(121),s=o(333),l=o(931),d=o(249),c=o(769),u=o(0),v=o(627),g=o(591),p=o(526);const h="api/collaboration/timeline",y="The file %1 has been opened with two different views. This is not supported. Please close this view; otherwise, some of your edits may not be saved properly.",b={id:"@jupyter/docprovider-extension:content-provider",description:"The RTC content provider",provides:v.ICollaborativeContentProvider,requires:[c.ITranslator],optional:[v.IGlobalAwareness,d.ISettingRegistry],activate:async(e,t,o,r)=>{const n=t.load("jupyter_collaboration"),i=e.serviceManager.contents.defaultDrive;if(!i)throw Error("Cannot initialize content provider: default drive property not accessible on contents manager instance.");const a=i.contentProviderRegistry;if(!a)throw Error("Cannot initialize content provider: no content provider registry.");const s=r?await r.load("@jupyterlab/docmanager-extension:plugin"):null,l=new g.RtcContentProvider({currentDrive:i,serverSettings:i.serverSettings,user:e.serviceManager.user,trans:n,globalAwareness:o,docmanagerSettings:s,fileChanged:i.fileChanged});return a.register("rtc",l),l}},m={id:"@jupyter/docprovider-extension:yfile",description:"Plugin to register the shared model factory for the content type 'file'",autoStart:!0,requires:[v.ICollaborativeContentProvider,a.IEditorWidgetFactory],activate:(e,t,o)=>{t.sharedModelFactory.registerDocumentFactory("file",(()=>new u.YFile)),o.contentProviderId="rtc"}},f={id:"@jupyter/docprovider-extension:ynotebook",description:"Plugin to register the shared model factory for the content type 'notebook'",autoStart:!0,requires:[v.ICollaborativeContentProvider,l.INotebookWidgetFactory],optional:[d.ISettingRegistry],activate:(e,t,o,r)=>{let n=!0;r&&r.load("@jupyterlab/notebook-extension:tracker").then((e=>{const t=e=>{var t;const o=null==e?void 0:e.get("experimentalEnableDocumentWideUndoRedo").composite;n=null===(t=!o)||void 0===t||t};t(e),e.changed.connect((e=>t(e)))})),t.sharedModelFactory.registerDocumentFactory("notebook",(()=>new u.YNotebook({disableDocumentWideUndoRedo:n}))),o.contentProviderId="rtc"}},w={id:"@jupyter/docprovider-extension:statusBarTimeline",description:"Plugin to add a timeline slider to the status bar",autoStart:!0,requires:[i.IStatusBar,v.ICollaborativeContentProvider],activate:async(e,t,o)=>{try{let r=null,i=null;const a=async(t,r)=>{if(!r)return;i&&(i.dispose(),i=null);const[a,s]=r.split(":"),l=o.providers.get(`${a}:${s}:${t}`);if(!l)return;const d=l,c=p.URLExt.join(e.serviceManager.serverSettings.baseUrl,h,t);i=new g.TimelineWidget(c,d,d.contentType,d.format,h,e.serviceManager.serverSettings);const u=document.getElementById("jp-slider-status-bar");u&&!i.isAttached&&n.Widget.attach(i,u)};e.shell.currentChanged&&e.shell.currentChanged.connect((async(e,t)=>{const o=t.newValue;i&&(i.dispose(),i=null),o&&"context"in o&&(await o.context.ready,await a(o.context.path,o.context.model.sharedModel.getState("document_id")))})),t&&(r||(r=new n.Widget,r.addClass("jp-StatusBar-GroupItem"),r.addClass("jp-mod-highlighted"),r.id="jp-slider-status-bar",t.registerStatusItem("jp-slider-status-bar",{item:r,align:"left",rank:4,isActive:()=>{var t,o;const r=e.shell.currentWidget;return(null===(o=null===(t=null==r?void 0:r.context)||void 0===t?void 0:t.model)||void 0===o?void 0:o.collaborative)||!1}})))}catch(e){console.error("Failed to activate statusBarTimeline plugin:",e)}}},C=[b,m,f,{id:"@jupyter/docprovider-extension:logger",description:"A logging plugin for debugging purposes.",autoStart:!0,optional:[s.ILoggerRegistry,a.IEditorTracker,l.INotebookTracker,c.ITranslator],activate:(e,t,o,n,i)=>{const a=(null!=i?i:c.nullTranslator).load("jupyter_collaboration"),s="https://schema.jupyter.org/jupyter_collaboration/session/v1";if(!t)return void e.serviceManager.events.stream.connect(((e,t)=>{var o,n;t.schema_id===s&&(console.debug(`[${t.room}(${t.path})] ${null!==(o=t.action)&&void 0!==o?o:""}: ${null!==(n=t.msg)&&void 0!==n?n:""}`),"WARNING"===t.level&&(0,r.showDialog)({title:a.__("Warning"),body:a.__(y,t.path),buttons:[r.Dialog.okButton()]}))}));const l=new Map,d=(e,o)=>{const r=t.getLogger(o.context.path);l.set(o.context.localPath,r),o.disposed.connect((e=>{l.delete(e.context.localPath)}))};o&&o.widgetAdded.connect(d),n&&n.widgetAdded.connect(d),(async()=>{var t,o;const{events:n}=e.serviceManager;for await(const e of n.stream)if(e.schema_id===s){const n=l.get(e.path);null==n||n.log({type:"text",level:e.level.toLowerCase(),data:`[${e.room}] ${null!==(t=e.action)&&void 0!==t?t:""}: ${null!==(o=e.msg)&&void 0!==o?o:""}`}),"WARNING"===e.level&&(0,r.showDialog)({title:a.__("Warning"),body:a.__(y,e.path),buttons:[r.Dialog.warnButton({label:a.__("Ok")})]})}})()}},{id:"@jupyter/docprovider-extension:notebook-cell-executor",description:"Add notebook cell executor that uses REST API instead of kernel protocol over WebSocket.",autoStart:!0,provides:l.INotebookCellExecutor,activate:e=>"true"===p.PageConfig.getOption("serverSideExecution")?new g.NotebookCellServerExecutor({serverSettings:e.serviceManager.serverSettings}):Object.freeze({runCell:l.runCell})},w,{id:"@jupyter/docprovider-extension:forkManager",autoStart:!0,requires:[v.ICollaborativeContentProvider],provides:g.IForkManagerToken,activate:(e,t)=>{const o=e.serviceManager.events;return new g.ForkManager({contentProvider:t,eventManager:o,serverSettings:e.serviceManager.serverSettings})}}]}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_jupyter_docprovider_extension=self.webpackChunk_jupyter_docprovider_extension||[]).push([[944],{78:(n,e,o)=>{o.d(e,{A:()=>u});var r=o(758),t=o.n(r),a=o(935),i=o.n(a),l=o(875),p=o(28),s=o(921),d=o(674),c=i()(t());c.i(l.A),c.i(p.A),c.i(s.A),c.i(d.A),c.push([n.id,"/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|---------------------------------------------------------------------------- */\n\n.jp-shared-link-body {\n user-select: none;\n}\n",""]);const u=c},875:(n,e,o)=>{o.d(e,{A:()=>l});var r=o(758),t=o.n(r),a=o(935),i=o.n(a)()(t());i.push([n.id,"/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|---------------------------------------------------------------------------- */\n\n.jp-MenuBar-label {\n margin-left: 25px;\n}\n\n.jp-MenuBar-anonymousIcon span {\n width: 24px;\n text-align: center;\n fill: var(--jp-ui-font-color1);\n color: var(--jp-ui-font-color1);\n}\n\n.jp-MenuBar-anonymousIcon,\n.jp-MenuBar-imageIcon {\n position: absolute;\n top: 1px;\n left: 8px;\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n vertical-align: middle;\n border-radius: 100%;\n}\n\n.jp-MenuBar-imageIcon img {\n width: 24px;\n border-radius: 100%;\n fill: var(--jp-ui-font-color1);\n color: var(--jp-ui-font-color1);\n}\n\n.jp-UserMenu-caretDownIcon {\n height: 22px;\n position: relative;\n top: 15%;\n}\n",""]);const l=i},674:(n,e,o)=>{o.d(e,{A:()=>l});var r=o(758),t=o.n(r),a=o(935),i=o.n(a)()(t());i.push([n.id,"/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|---------------------------------------------------------------------------- */\n\n.jp-shared-link-body {\n user-select: none;\n}\n\n.jp-ManageSharesBody-search-container {\n margin-bottom: 10px;\n}\n\n.jp-ManageSharesBody-search-input {\n width: 100%;\n padding: 5px;\n margin-top: 5px;\n}\n\n.jp-ManageSharesBody-search-results {\n height: 10em;\n overflow-y: auto;\n border: 1px solid var(--jp-border-color0);\n padding: 5px;\n flex-shrink: 0;\n}\n\n.jp-ManageSharesBody-user-item {\n padding: 5px;\n cursor: pointer;\n}\n\n.jp-ManageSharesBody-user-item:hover {\n background-color: var(--jp-border-color3);\n}\n\n.jp-ManageSharesBody-selected-users {\n margin-top: 10px;\n height: 10em;\n overflow-y: auto;\n border: 1px solid var(--jp-border-color0);\n flex-shrink: 0;\n}\n\n.jp-ManageSharesBody-url-input {\n width: 100%;\n padding: 5px;\n margin-top: 10px;\n}\n\n.jp-ManageSharesBody-shares-table {\n width: 100%;\n}\n\n.jp-ManageSharesBody-shares-table td:nth-child(2),\n.jp-ManageSharesBody-shares-table td:nth-child(3) {\n text-align: center;\n}\n\n.jp-Dialog-content:has(.jp-shared-link-body) {\n max-height: 750px;\n}\n",""]);const l=i},28:(n,e,o)=>{o.d(e,{A:()=>l});var r=o(758),t=o.n(r),a=o(935),i=o.n(a)()(t());i.push([n.id,"/*\n * Copyright (c) Jupyter Development Team.\n * Distributed under the terms of the Modified BSD License.\n */\n\n/************************************************************\n Main Panel\n*************************************************************/\n\n.jp-RTCPanel {\n min-width: var(--jp-sidebar-min-width) !important;\n color: var(--jp-ui-font-color1);\n background: var(--jp-layout-color1);\n font-size: var(--jp-ui-font-size1);\n}\n\n/************************************************************\n User Info Panel\n*************************************************************/\n.jp-UserInfoPanel {\n display: flex;\n flex-direction: column;\n max-height: 140px;\n padding-top: 3px;\n}\n\n.jp-UserInfo-Container {\n margin: 20px;\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n\n.jp-UserInfo-Icon {\n margin: auto;\n width: 50px;\n height: 50px;\n border-radius: 50px;\n display: inline-flex;\n align-items: center;\n}\n\n.jp-UserInfo-Icon span {\n margin: auto;\n text-align: center;\n font-size: 25px;\n fill: var(--jp-ui-font-color1);\n color: var(--jp-ui-font-color1);\n}\n\n.jp-UserInfo-Info {\n margin: 20px;\n display: inline-flex;\n flex-direction: column;\n}\n\n.jp-UserInfo-Info label {\n font-weight: bold;\n fill: var(--jp-ui-font-color1);\n color: var(--jp-ui-font-color1);\n}\n\n.jp-UserInfo-Info input {\n text-decoration: none;\n border-top: none;\n border-left: none;\n border-right: none;\n border-color: var(--jp-ui-font-color1);\n border-width: 0.5px;\n background-color: transparent;\n fill: var(--jp-ui-font-color1);\n color: var(--jp-ui-font-color1);\n}\n\n/************************************************************\n Collaborators Info Panel\n*************************************************************/\n\n.jp-CollaboratorsPanel {\n overflow-y: auto;\n}\n\n.jp-CollaboratorsList {\n flex-direction: column;\n display: flex;\n z-index: 1000;\n}\n\n.jp-CollaboratorHeader {\n padding: 10px;\n display: flex;\n align-items: center;\n font-size: var(--jp-ui-font-size0);\n fill: var(--jp-ui-font-color1);\n color: var(--jp-ui-font-color1);\n}\n\n.jp-CollaboratorHeader > span {\n padding-left: 7px;\n}\n\n.jp-ClickableCollaborator:hover {\n cursor: pointer;\n background-color: var(--jp-layout-color2);\n fill: var(--jp-ui-font-color0);\n color: var(--jp-ui-font-color0);\n}\n\n.jp-CollaboratorHeaderCollapser {\n transform: rotate(-90deg);\n margin: auto 0;\n height: 16px;\n}\n\n.jp-CollaboratorHeader:not(.jp-ClickableCollaborator) .jp-CollaboratorHeaderCollapser {\n visibility: hidden;\n}\n\n.jp-CollaboratorHeaderCollapser.jp-mod-expanded {\n transform: rotate(0deg);\n}\n\n.jp-CollaboratorIcon {\n border-radius: 100%;\n padding: 2px;\n width: 24px;\n height: 24px;\n display: flex;\n}\n\n.jp-CollaboratorIcon > span {\n text-align: center;\n margin: auto;\n font-size: 12px;\n fill: var(--jp-ui-font-color1);\n color: var(--jp-ui-font-color1);\n}\n\n.jp-CollaboratorFiles {\n padding-left: 1em;\n margin-top: 0;\n box-shadow: 0 2px 2px -2px rgb(0 0 0 / 24%);\n\n}\n\n/************************************************************\n User Info Details\n*************************************************************/\n.jp-UserInfo-Field {\n display: flex;\n justify-content: space-between;\n}\n\n.jp-UserInfo-Field > label,\n.jp-UserInfo-Field > input {\n padding: 0.5em 1em;\n margin: 0.25em 0;\n}\n\n.jp-UserInfo-Field > label {\n font-weight: bold;\n}\n\n.jp-UserInfo-Field > input {\n border: none;\n}\n\n.jp-UserInfo-Field > input:not(:disabled) {\n cursor: pointer;\n background-color: var(--jp-input-background);\n}\n\n.jp-UserInfo-Field > input:focus {\n border: solid 1px var(--jp-cell-editor-active-border-color);\n}\n\n.jp-UserInfo-Field > input:focus-visible {\n outline: none;\n}\n",""]);const l=i},921:(n,e,o)=>{o.d(e,{A:()=>l});var r=o(758),t=o.n(r),a=o(935),i=o.n(a)()(t());i.push([n.id,"/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|---------------------------------------------------------------------------- */\n\n.jp-toolbar-users-item {\n flex-grow: 1;\n display: flex;\n flex-direction: row;\n}\n\n.jp-toolbar-users-item .jp-MenuBar-anonymousIcon,\n.jp-toolbar-users-item .jp-MenuBar-imageIcon {\n position: relative;\n left: 0;\n height: 22px;\n width: 22px;\n box-sizing: border-box;\n cursor: default;\n}\n",""]);const l=i},935:n=>{n.exports=function(n){var e=[];return e.toString=function(){return this.map((function(e){var o="",r=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),r&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=n(e),r&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o})).join("")},e.i=function(n,o,r,t,a){"string"==typeof n&&(n=[[null,n,void 0]]);var i={};if(r)for(var l=0;l<this.length;l++){var p=this[l][0];null!=p&&(i[p]=!0)}for(var s=0;s<n.length;s++){var d=[].concat(n[s]);r&&i[d[0]]||(void 0!==a&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=a),o&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=o):d[2]=o),t&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=t):d[4]="".concat(t)),e.push(d))}},e}},758:n=>{n.exports=function(n){return n[1]}},591:n=>{var e=[];function o(n){for(var o=-1,r=0;r<e.length;r++)if(e[r].identifier===n){o=r;break}return o}function r(n,r){for(var a={},i=[],l=0;l<n.length;l++){var p=n[l],s=r.base?p[0]+r.base:p[0],d=a[s]||0,c="".concat(s," ").concat(d);a[s]=d+1;var u=o(c),f={css:p[1],media:p[2],sourceMap:p[3],supports:p[4],layer:p[5]};if(-1!==u)e[u].references++,e[u].updater(f);else{var h=t(f,r);r.byIndex=l,e.splice(l,0,{identifier:c,updater:h,references:1})}i.push(c)}return i}function t(n,e){var o=e.domAPI(e);return o.update(n),function(e){if(e){if(e.css===n.css&&e.media===n.media&&e.sourceMap===n.sourceMap&&e.supports===n.supports&&e.layer===n.layer)return;o.update(n=e)}else o.remove()}}n.exports=function(n,t){var a=r(n=n||[],t=t||{});return function(n){n=n||[];for(var i=0;i<a.length;i++){var l=o(a[i]);e[l].references--}for(var p=r(n,t),s=0;s<a.length;s++){var d=o(a[s]);0===e[d].references&&(e[d].updater(),e.splice(d,1))}a=p}}},128:n=>{var e={};n.exports=function(n,o){var r=function(n){if(void 0===e[n]){var o=document.querySelector(n);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(n){o=null}e[n]=o}return e[n]}(n);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(o)}},51:n=>{n.exports=function(n){var e=document.createElement("style");return n.setAttributes(e,n.attributes),n.insert(e,n.options),e}},855:(n,e,o)=>{n.exports=function(n){var e=o.nc;e&&n.setAttribute("nonce",e)}},740:n=>{n.exports=function(n){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=n.insertStyleElement(n);return{update:function(o){!function(n,e,o){var r="";o.supports&&(r+="@supports (".concat(o.supports,") {")),o.media&&(r+="@media ".concat(o.media," {"));var t=void 0!==o.layer;t&&(r+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),r+=o.css,t&&(r+="}"),o.media&&(r+="}"),o.supports&&(r+="}");var a=o.sourceMap;a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleTagTransform(r,n,e.options)}(e,n,o)},remove:function(){!function(n){if(null===n.parentNode)return!1;n.parentNode.removeChild(n)}(e)}}}},656:n=>{n.exports=function(n,e){if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}},944:(n,e,o)=>{var r=o(591),t=o.n(r),a=o(740),i=o.n(a),l=o(128),p=o.n(l),s=o(855),d=o.n(s),c=o(51),u=o.n(c),f=o(656),h=o.n(f),m=o(78),v={};v.styleTagTransform=h(),v.setAttributes=d(),v.insert=p().bind(null,"head"),v.domAPI=i(),v.insertStyleElement=u(),t()(m.A,v),m.A&&m.A.locals&&m.A.locals}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_jupyter_docprovider_extension=self.webpackChunk_jupyter_docprovider_extension||[]).push([[944],{78:(n,e,o)=>{o.d(e,{A:()=>u});var r=o(758),t=o.n(r),a=o(935),i=o.n(a),l=o(256),p=o(28),s=o(921),d=o(674),c=i()(t());c.i(l.A),c.i(p.A),c.i(s.A),c.i(d.A),c.push([n.id,"/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|---------------------------------------------------------------------------- */\n\n.jp-shared-link-body {\n user-select: none;\n}\n",""]);const u=c},256:(n,e,o)=>{o.d(e,{A:()=>l});var r=o(758),t=o.n(r),a=o(935),i=o.n(a)()(t());i.push([n.id,"/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|---------------------------------------------------------------------------- */\n\n.jp-MenuBar-label {\n margin-left: 25px;\n}\n\n.jp-MenuBar-anonymousIcon span {\n width: 24px;\n text-align: center;\n fill: var(--jp-ui-font-color1);\n color: var(--jp-ui-font-color1);\n}\n\n.jp-MenuBar-anonymousIcon,\n.jp-MenuBar-imageIcon {\n position: absolute;\n top: 1px;\n left: 8px;\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n vertical-align: middle;\n border-radius: 100%;\n}\n\n.jp-MenuBar-imageIcon img {\n width: 24px;\n border-radius: 100%;\n fill: var(--jp-ui-font-color1);\n color: var(--jp-ui-font-color1);\n}\n\n.jp-UserMenu-caretDownIcon {\n height: 22px;\n position: relative;\n top: 15%;\n}\n",""]);const l=i},674:(n,e,o)=>{o.d(e,{A:()=>l});var r=o(758),t=o.n(r),a=o(935),i=o.n(a)()(t());i.push([n.id,"/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|---------------------------------------------------------------------------- */\n\n.jp-shared-link-body {\n user-select: none;\n}\n\n.jp-ManageSharesBody-search-container {\n margin-bottom: 10px;\n}\n\n.jp-ManageSharesBody-search-input {\n width: 100%;\n padding: 5px;\n margin-top: 5px;\n}\n\n.jp-ManageSharesBody-search-results {\n height: 10em;\n overflow-y: auto;\n border: 1px solid var(--jp-border-color0);\n padding: 5px;\n flex-shrink: 0;\n}\n\n.jp-ManageSharesBody-user-item {\n padding: 5px;\n cursor: pointer;\n}\n\n.jp-ManageSharesBody-user-item:hover {\n background-color: var(--jp-border-color3);\n}\n\n.jp-ManageSharesBody-selected-users {\n margin-top: 10px;\n height: 10em;\n overflow-y: auto;\n border: 1px solid var(--jp-border-color0);\n flex-shrink: 0;\n}\n\n.jp-ManageSharesBody-url-input {\n width: 100%;\n padding: 5px;\n margin-top: 10px;\n}\n\n.jp-ManageSharesBody-shares-table {\n width: 100%;\n}\n\n.jp-ManageSharesBody-shares-table td:nth-child(2),\n.jp-ManageSharesBody-shares-table td:nth-child(3) {\n text-align: center;\n}\n\n.jp-Dialog-content:has(.jp-shared-link-body) {\n max-height: 750px;\n}\n",""]);const l=i},28:(n,e,o)=>{o.d(e,{A:()=>l});var r=o(758),t=o.n(r),a=o(935),i=o.n(a)()(t());i.push([n.id,"/*\n * Copyright (c) Jupyter Development Team.\n * Distributed under the terms of the Modified BSD License.\n */\n\n/************************************************************\n Main Panel\n*************************************************************/\n\n.jp-RTCPanel {\n min-width: var(--jp-sidebar-min-width) !important;\n color: var(--jp-ui-font-color1);\n background: var(--jp-layout-color1);\n font-size: var(--jp-ui-font-size1);\n}\n\n/************************************************************\n User Info Panel\n*************************************************************/\n.jp-UserInfoPanel {\n display: flex;\n flex-direction: column;\n max-height: 140px;\n padding-top: 3px;\n}\n\n.jp-UserInfo-Container {\n margin: 20px;\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n\n.jp-UserInfo-Icon {\n margin: auto;\n width: 50px;\n height: 50px;\n border-radius: 50px;\n display: inline-flex;\n align-items: center;\n}\n\n.jp-UserInfo-Icon span {\n margin: auto;\n text-align: center;\n font-size: 25px;\n fill: var(--jp-ui-font-color1);\n color: var(--jp-ui-font-color1);\n}\n\n.jp-UserInfo-Info {\n margin: 20px;\n display: inline-flex;\n flex-direction: column;\n}\n\n.jp-UserInfo-Info label {\n font-weight: bold;\n fill: var(--jp-ui-font-color1);\n color: var(--jp-ui-font-color1);\n}\n\n.jp-UserInfo-Info input {\n text-decoration: none;\n border-top: none;\n border-left: none;\n border-right: none;\n border-color: var(--jp-ui-font-color1);\n border-width: 0.5px;\n background-color: transparent;\n fill: var(--jp-ui-font-color1);\n color: var(--jp-ui-font-color1);\n}\n\n/************************************************************\n Collaborators Info Panel\n*************************************************************/\n\n.jp-CollaboratorsPanel {\n overflow-y: auto;\n}\n\n.jp-CollaboratorsList {\n flex-direction: column;\n display: flex;\n z-index: 1000;\n}\n\n.jp-CollaboratorHeader {\n padding: 10px;\n display: flex;\n align-items: center;\n font-size: var(--jp-ui-font-size0);\n fill: var(--jp-ui-font-color1);\n color: var(--jp-ui-font-color1);\n}\n\n.jp-CollaboratorHeader > span {\n padding-left: 7px;\n}\n\n.jp-ClickableCollaborator:hover {\n cursor: pointer;\n background-color: var(--jp-layout-color2);\n fill: var(--jp-ui-font-color0);\n color: var(--jp-ui-font-color0);\n}\n\n.jp-CollaboratorHeaderCollapser {\n transform: rotate(-90deg);\n margin: auto 0;\n height: 16px;\n}\n\n.jp-CollaboratorHeader:not(.jp-ClickableCollaborator) .jp-CollaboratorHeaderCollapser {\n visibility: hidden;\n}\n\n.jp-CollaboratorHeaderCollapser.jp-mod-expanded {\n transform: rotate(0deg);\n}\n\n.jp-CollaboratorIcon {\n border-radius: 100%;\n padding: 2px;\n width: 24px;\n height: 24px;\n display: flex;\n}\n\n.jp-CollaboratorIcon > span {\n text-align: center;\n margin: auto;\n font-size: 12px;\n fill: var(--jp-ui-font-color1);\n color: var(--jp-ui-font-color1);\n}\n\n.jp-CollaboratorFiles {\n padding-left: 1em;\n margin-top: 0;\n box-shadow: 0 2px 2px -2px rgb(0 0 0 / 24%);\n\n}\n\n/************************************************************\n User Info Details\n*************************************************************/\n.jp-UserInfo-Field {\n display: flex;\n justify-content: space-between;\n}\n\n.jp-UserInfo-Field > label,\n.jp-UserInfo-Field > input {\n padding: 0.5em 1em;\n margin: 0.25em 0;\n}\n\n.jp-UserInfo-Field > label {\n font-weight: bold;\n}\n\n.jp-UserInfo-Field > input {\n border: none;\n}\n\n.jp-UserInfo-Field > input:not(:disabled) {\n cursor: pointer;\n background-color: var(--jp-input-background);\n}\n\n.jp-UserInfo-Field > input:focus {\n border: solid 1px var(--jp-cell-editor-active-border-color);\n}\n\n.jp-UserInfo-Field > input:focus-visible {\n outline: none;\n}\n",""]);const l=i},921:(n,e,o)=>{o.d(e,{A:()=>l});var r=o(758),t=o.n(r),a=o(935),i=o.n(a)()(t());i.push([n.id,"/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|---------------------------------------------------------------------------- */\n\n.jp-toolbar-users-item {\n flex-grow: 1;\n display: flex;\n flex-direction: row;\n}\n\n.jp-toolbar-users-item .jp-MenuBar-anonymousIcon,\n.jp-toolbar-users-item .jp-MenuBar-imageIcon {\n position: relative;\n left: 0;\n height: 22px;\n width: 22px;\n box-sizing: border-box;\n cursor: default;\n}\n",""]);const l=i},935:n=>{n.exports=function(n){var e=[];return e.toString=function(){return this.map((function(e){var o="",r=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),r&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=n(e),r&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o})).join("")},e.i=function(n,o,r,t,a){"string"==typeof n&&(n=[[null,n,void 0]]);var i={};if(r)for(var l=0;l<this.length;l++){var p=this[l][0];null!=p&&(i[p]=!0)}for(var s=0;s<n.length;s++){var d=[].concat(n[s]);r&&i[d[0]]||(void 0!==a&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=a),o&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=o):d[2]=o),t&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=t):d[4]="".concat(t)),e.push(d))}},e}},758:n=>{n.exports=function(n){return n[1]}},972:n=>{var e=[];function o(n){for(var o=-1,r=0;r<e.length;r++)if(e[r].identifier===n){o=r;break}return o}function r(n,r){for(var a={},i=[],l=0;l<n.length;l++){var p=n[l],s=r.base?p[0]+r.base:p[0],d=a[s]||0,c="".concat(s," ").concat(d);a[s]=d+1;var u=o(c),f={css:p[1],media:p[2],sourceMap:p[3],supports:p[4],layer:p[5]};if(-1!==u)e[u].references++,e[u].updater(f);else{var h=t(f,r);r.byIndex=l,e.splice(l,0,{identifier:c,updater:h,references:1})}i.push(c)}return i}function t(n,e){var o=e.domAPI(e);return o.update(n),function(e){if(e){if(e.css===n.css&&e.media===n.media&&e.sourceMap===n.sourceMap&&e.supports===n.supports&&e.layer===n.layer)return;o.update(n=e)}else o.remove()}}n.exports=function(n,t){var a=r(n=n||[],t=t||{});return function(n){n=n||[];for(var i=0;i<a.length;i++){var l=o(a[i]);e[l].references--}for(var p=r(n,t),s=0;s<a.length;s++){var d=o(a[s]);0===e[d].references&&(e[d].updater(),e.splice(d,1))}a=p}}},128:n=>{var e={};n.exports=function(n,o){var r=function(n){if(void 0===e[n]){var o=document.querySelector(n);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(n){o=null}e[n]=o}return e[n]}(n);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(o)}},51:n=>{n.exports=function(n){var e=document.createElement("style");return n.setAttributes(e,n.attributes),n.insert(e,n.options),e}},855:(n,e,o)=>{n.exports=function(n){var e=o.nc;e&&n.setAttribute("nonce",e)}},740:n=>{n.exports=function(n){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=n.insertStyleElement(n);return{update:function(o){!function(n,e,o){var r="";o.supports&&(r+="@supports (".concat(o.supports,") {")),o.media&&(r+="@media ".concat(o.media," {"));var t=void 0!==o.layer;t&&(r+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),r+=o.css,t&&(r+="}"),o.media&&(r+="}"),o.supports&&(r+="}");var a=o.sourceMap;a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleTagTransform(r,n,e.options)}(e,n,o)},remove:function(){!function(n){if(null===n.parentNode)return!1;n.parentNode.removeChild(n)}(e)}}}},656:n=>{n.exports=function(n,e){if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}},944:(n,e,o)=>{var r=o(972),t=o.n(r),a=o(740),i=o.n(a),l=o(128),p=o.n(l),s=o(855),d=o.n(s),c=o(51),u=o.n(c),f=o(656),h=o.n(f),m=o(78),v={};v.styleTagTransform=h(),v.setAttributes=d(),v.insert=p().bind(null,"head"),v.domAPI=i(),v.insertStyleElement=u(),t()(m.A,v),m.A&&m.A.locals&&m.A.locals}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _JUPYTERLAB;(()=>{"use strict";var e,r,t,o,a,n,i,l,u,d,s,f,c,p,v,h,b,y,m,g,j,w,P,S={496:(e,r,t)=>{var o={"./index":()=>Promise.all([t.e(642),t.e(258),t.e(703)]).then((()=>()=>t(703))),"./extension":()=>Promise.all([t.e(642),t.e(258),t.e(703)]).then((()=>()=>t(703))),"./style":()=>t.e(944).then((()=>()=>t(944)))},a=(e,r)=>(t.R=r,r=t.o(o,e)?o[e]():Promise.resolve().then((()=>{throw new Error('Module "'+e+'" does not exist in container.')})),t.R=void 0,r),n=(e,r)=>{if(t.S){var o="default",a=t.S[o];if(a&&a!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[o]=e,t.I(o,r)}};t.d(r,{get:()=>a,init:()=>n})}},k={};function x(e){var r=k[e];if(void 0!==r)return r.exports;var t=k[e]={id:e,exports:{}};return S[e](t,t.exports,x),t.exports}x.m=S,x.c=k,x.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return x.d(r,{a:r}),r},x.d=(e,r)=>{for(var t in r)x.o(r,t)&&!x.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},x.f={},x.e=e=>Promise.all(Object.keys(x.f).reduce(((r,t)=>(x.f[t](e,r),r)),[])),x.u=e=>e+"."+{240:"cfc0784ac6d2ff6b4dcf",422:"3ab44960b241aac9f303",444:"13de0fd44849e3f7d780",703:"cca2ba3bbe2fb4612085",944:"44dd443686c15fbe0cbf",994:"bc087314bdabeecb0923"}[e]+".js?v="+{240:"cfc0784ac6d2ff6b4dcf",422:"3ab44960b241aac9f303",444:"13de0fd44849e3f7d780",703:"cca2ba3bbe2fb4612085",944:"44dd443686c15fbe0cbf",994:"bc087314bdabeecb0923"}[e],x.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),x.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="@jupyter/docprovider-extension:",x.l=(t,o,a,n)=>{if(e[t])e[t].push(o);else{var i,l;if(void 0!==a)for(var u=document.getElementsByTagName("script"),d=0;d<u.length;d++){var s=u[d];if(s.getAttribute("src")==t||s.getAttribute("data-webpack")==r+a){i=s;break}}i||(l=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,x.nc&&i.setAttribute("nonce",x.nc),i.setAttribute("data-webpack",r+a),i.src=t),e[t]=[o];var f=(r,o)=>{i.onerror=i.onload=null,clearTimeout(c);var a=e[t];if(delete e[t],i.parentNode&&i.parentNode.removeChild(i),a&&a.forEach((e=>e(o))),r)return r(o)},c=setTimeout(f.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=f.bind(null,i.onerror),i.onload=f.bind(null,i.onload),l&&document.head.appendChild(i)}},x.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{x.S={};var e={},r={};x.I=(t,o)=>{o||(o=[]);var a=r[t];if(a||(a=r[t]={}),!(o.indexOf(a)>=0)){if(o.push(a),e[t])return e[t];x.o(x.S,t)||(x.S[t]={});var n=x.S[t],i="@jupyter/docprovider-extension",l=(e,r,t,o)=>{var a=n[e]=n[e]||{},l=a[r];(!l||!l.loaded&&(!o!=!l.eager?o:i>l.from))&&(a[r]={get:t,from:i,eager:!!o})},u=[];return"default"===t&&(l("@jupyter/collaborative-drive","4.2.1",(()=>Promise.all([x.e(262),x.e(444)]).then((()=>()=>x(444))))),l("@jupyter/docprovider-extension","4.2.1",(()=>Promise.all([x.e(642),x.e(258),x.e(703)]).then((()=>()=>x(703))))),l("@jupyter/docprovider","4.2.1",(()=>Promise.all([x.e(422),x.e(642),x.e(262),x.e(240)]).then((()=>()=>x(240))))),l("y-websocket","1.5.4",(()=>Promise.all([x.e(422),x.e(994),x.e(206)]).then((()=>()=>x(994)))))),e[t]=u.length?Promise.all(u).then((()=>e[t]=1)):1}}})(),(()=>{var e;x.g.importScripts&&(e=x.g.location+"");var r=x.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var o=t.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=t[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),x.p=e})(),t=e=>{var r=e=>e.split(".").map((e=>+e==e?+e:e)),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),o=t[1]?r(t[1]):[];return t[2]&&(o.length++,o.push.apply(o,r(t[2]))),t[3]&&(o.push([]),o.push.apply(o,r(t[3]))),o},o=(e,r)=>{e=t(e),r=t(r);for(var o=0;;){if(o>=e.length)return o<r.length&&"u"!=(typeof r[o])[0];var a=e[o],n=(typeof a)[0];if(o>=r.length)return"u"==n;var i=r[o],l=(typeof i)[0];if(n!=l)return"o"==n&&"n"==l||"s"==l||"u"==n;if("o"!=n&&"u"!=n&&a!=i)return a<i;o++}},a=e=>{var r=e[0],t="";if(1===e.length)return"*";if(r+.5){t+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var o=1,n=1;n<e.length;n++)o--,t+="u"==(typeof(l=e[n]))[0]?"-":(o>0?".":"")+(o=2,l);return t}var i=[];for(n=1;n<e.length;n++){var l=e[n];i.push(0===l?"not("+u()+")":1===l?"("+u()+" || "+u()+")":2===l?i.pop()+" "+i.pop():a(l))}return u();function u(){return i.pop().replace(/^\((.+)\)$/,"$1")}},n=(e,r)=>{if(0 in e){r=t(r);var o=e[0],a=o<0;a&&(o=-o-1);for(var i=0,l=1,u=!0;;l++,i++){var d,s,f=l<e.length?(typeof e[l])[0]:"";if(i>=r.length||"o"==(s=(typeof(d=r[i]))[0]))return!u||("u"==f?l>o&&!a:""==f!=a);if("u"==s){if(!u||"u"!=f)return!1}else if(u)if(f==s)if(l<=o){if(d!=e[l])return!1}else{if(a?d>e[l]:d<e[l])return!1;d!=e[l]&&(u=!1)}else if("s"!=f&&"n"!=f){if(a||l<=o)return!1;u=!1,l--}else{if(l<=o||s<f!=a)return!1;u=!1}else"s"!=f&&"n"!=f&&(u=!1,l--)}}var c=[],p=c.pop.bind(c);for(i=1;i<e.length;i++){var v=e[i];c.push(1==v?p()|p():2==v?p()&p():v?n(v,r):!p())}return!!p()},i=(e,r)=>e&&x.o(e,r),l=e=>(e.loaded=1,e.get()),u=e=>Object.keys(e).reduce(((r,t)=>(e[t].eager&&(r[t]=e[t]),r)),{}),d=(e,r,t,a)=>{var i=a?u(e[r]):e[r];return(r=Object.keys(i).reduce(((e,r)=>!n(t,r)||e&&!o(e,r)?e:r),0))&&i[r]},s=(e,r,t)=>{var a=t?u(e[r]):e[r];return Object.keys(a).reduce(((e,r)=>!e||!a[e].loaded&&o(e,r)?r:e),0)},f=(e,r,t,o)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+a(o)+")",c=(e,r,t,o,n)=>{var i=e[t];return"No satisfying version ("+a(o)+")"+(n?" for eager consumption":"")+" of shared module "+t+" found in shared scope "+r+".\nAvailable versions: "+Object.keys(i).map((e=>e+" from "+i[e].from)).join(", ")},p=e=>{throw new Error(e)},v=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},b=(e,r,t)=>t?t():((e,r)=>p("Shared module "+r+" doesn't exist in shared scope "+e))(e,r),y=(h=e=>function(r,t,o,a,n){var i=x.I(r);return i&&i.then&&!o?i.then(e.bind(e,r,x.S[r],t,!1,a,n)):e(r,x.S[r],t,o,a,n)})(((e,r,t,o,a,n)=>{if(!i(r,t))return b(e,t,n);var u=d(r,t,a,o);return u?l(u):n?n():void p(c(r,e,t,a,o))})),m=h(((e,r,t,o,a,u)=>{if(!i(r,t))return b(e,t,u);var d=s(r,t,o);return n(a,d)||v(f(r,t,d,a)),l(r[t][d])})),g={},j={285:()=>m("default","@jupyterlab/apputils",!1,[1,4,6,3]),526:()=>m("default","@jupyterlab/coreutils",!1,[1,6,5,3]),769:()=>m("default","@jupyterlab/translation",!1,[1,4,5,3]),0:()=>m("default","@jupyter/ydoc",!1,[1,3,0,0,,"a3"]),121:()=>m("default","@jupyterlab/fileeditor",!1,[1,4,5,3]),165:()=>m("default","@jupyterlab/statusbar",!1,[1,4,5,3]),247:()=>m("default","@lumino/widgets",!1,[1,2,3,1,,"alpha",1]),249:()=>m("default","@jupyterlab/settingregistry",!1,[1,4,5,3]),333:()=>m("default","@jupyterlab/logconsole",!1,[1,4,5,3]),591:()=>m("default","@jupyter/docprovider",!1,[1,4,2,1],(()=>Promise.all([x.e(422),x.e(262),x.e(240)]).then((()=>()=>x(240))))),627:()=>m("default","@jupyter/collaborative-drive",!1,[1,4,2,1],(()=>Promise.all([x.e(262),x.e(444)]).then((()=>()=>x(444))))),931:()=>m("default","@jupyterlab/notebook",!1,[1,4,5,3]),262:()=>m("default","@lumino/coreutils",!1,[1,2,0,0]),125:()=>m("default","@jupyterlab/services",!1,[1,7,5,3]),345:()=>m("default","react",!1,[1,18,2,0]),391:()=>m("default","@jupyterlab/ui-components",!1,[1,4,5,3]),560:()=>y("default","y-websocket",!1,[1,1,3,15],(()=>Promise.all([x.e(994),x.e(206)]).then((()=>()=>x(994))))),602:()=>m("default","@lumino/signaling",!1,[1,2,0,0]),206:()=>m("default","yjs",!1,[1,13,5,40])},w={206:[206],240:[125,345,391,560,602],258:[0,121,165,247,249,333,591,627,931],262:[262],642:[285,526,769]},P={},x.f.consumes=(e,r)=>{x.o(w,e)&&w[e].forEach((e=>{if(x.o(g,e))return r.push(g[e]);if(!P[e]){var t=r=>{g[e]=0,x.m[e]=t=>{delete x.c[e],t.exports=r()}};P[e]=!0;var o=r=>{delete g[e],x.m[e]=t=>{throw delete x.c[e],r}};try{var a=j[e]();a.then?r.push(g[e]=a.then(t).catch(o)):t(a)}catch(e){o(e)}}}))},(()=>{var e={552:0};x.f.j=(r,t)=>{var o=x.o(e,r)?e[r]:void 0;if(0!==o)if(o)t.push(o[2]);else if(/^(2(06|58|62)|642)$/.test(r))e[r]=0;else{var a=new Promise(((t,a)=>o=e[r]=[t,a]));t.push(o[2]=a);var n=x.p+x.u(r),i=new Error;x.l(n,(t=>{if(x.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var a=t&&("load"===t.type?"missing":t.type),n=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+a+": "+n+")",i.name="ChunkLoadError",i.type=a,i.request=n,o[1](i)}}),"chunk-"+r,r)}};var r=(r,t)=>{var o,a,[n,i,l]=t,u=0;if(n.some((r=>0!==e[r]))){for(o in i)x.o(i,o)&&(x.m[o]=i[o]);l&&l(x)}for(r&&r(t);u<n.length;u++)a=n[u],x.o(e,a)&&e[a]&&e[a][0](),e[a]=0},t=self.webpackChunk_jupyter_docprovider_extension=self.webpackChunk_jupyter_docprovider_extension||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),x.nc=void 0;var E=x(496);(_JUPYTERLAB=void 0===_JUPYTERLAB?{}:_JUPYTERLAB)["@jupyter/docprovider-extension"]=E})();
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
"packages": [
|
|
3
3
|
{
|
|
4
4
|
"name": "@jupyter/collaboration",
|
|
5
|
-
"versionInfo": "4.2.
|
|
5
|
+
"versionInfo": "4.2.1",
|
|
6
6
|
"licenseId": "BSD-3-Clause",
|
|
7
7
|
"extractedText": ""
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
10
|
"name": "@jupyter/collaborative-drive",
|
|
11
|
-
"versionInfo": "4.2.
|
|
11
|
+
"versionInfo": "4.2.1",
|
|
12
12
|
"licenseId": "BSD-3-Clause",
|
|
13
13
|
"extractedText": ""
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
"name": "@jupyter/docprovider",
|
|
17
|
-
"versionInfo": "4.2.
|
|
17
|
+
"versionInfo": "4.2.1",
|
|
18
18
|
"licenseId": "BSD-3-Clause",
|
|
19
19
|
"extractedText": ""
|
|
20
20
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupyter/docprovider",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.1",
|
|
4
4
|
"description": "JupyterLab - Document Provider",
|
|
5
5
|
"homepage": "https://github.com/jupyterlab/jupyter-collaboration",
|
|
6
6
|
"bugs": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"watch": "tsc -b --watch"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@jupyter/collaborative-drive": "^4.2.
|
|
44
|
+
"@jupyter/collaborative-drive": "^4.2.1",
|
|
45
45
|
"@jupyter/ydoc": "^2.1.3 || ^3.0.0",
|
|
46
46
|
"@jupyterlab/apputils": "^4.5.0",
|
|
47
47
|
"@jupyterlab/cells": "^4.5.0",
|
|
@@ -7,6 +7,7 @@ import { ReactWidget } from '@jupyterlab/apputils';
|
|
|
7
7
|
import { TimelineSliderComponent } from './component';
|
|
8
8
|
import * as React from 'react';
|
|
9
9
|
import { IForkProvider } from './ydrive';
|
|
10
|
+
import { ServerConnection } from '@jupyterlab/services';
|
|
10
11
|
|
|
11
12
|
export class TimelineWidget extends ReactWidget {
|
|
12
13
|
private apiURL: string;
|
|
@@ -14,13 +15,15 @@ export class TimelineWidget extends ReactWidget {
|
|
|
14
15
|
private contentType: string;
|
|
15
16
|
private format: string;
|
|
16
17
|
private documentTimelineUrl: string;
|
|
18
|
+
private _serverSettings?: ServerConnection.ISettings;
|
|
17
19
|
|
|
18
20
|
constructor(
|
|
19
21
|
apiURL: string,
|
|
20
22
|
provider: IForkProvider,
|
|
21
23
|
contentType: string,
|
|
22
24
|
format: string,
|
|
23
|
-
documentTimelineUrl: string
|
|
25
|
+
documentTimelineUrl: string,
|
|
26
|
+
serverSettings?: ServerConnection.ISettings
|
|
24
27
|
) {
|
|
25
28
|
super();
|
|
26
29
|
this.apiURL = apiURL;
|
|
@@ -28,6 +31,7 @@ export class TimelineWidget extends ReactWidget {
|
|
|
28
31
|
this.contentType = contentType;
|
|
29
32
|
this.format = format;
|
|
30
33
|
this.documentTimelineUrl = documentTimelineUrl;
|
|
34
|
+
this._serverSettings = serverSettings;
|
|
31
35
|
this.addClass('jp-timelineSliderWrapper');
|
|
32
36
|
}
|
|
33
37
|
|
|
@@ -40,6 +44,7 @@ export class TimelineWidget extends ReactWidget {
|
|
|
40
44
|
contentType={this.contentType}
|
|
41
45
|
format={this.format}
|
|
42
46
|
documentTimelineUrl={this.documentTimelineUrl}
|
|
47
|
+
serverSettings={this._serverSettings}
|
|
43
48
|
/>
|
|
44
49
|
);
|
|
45
50
|
}
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
ForkManager,
|
|
7
7
|
JUPYTER_COLLABORATION_FORK_EVENTS_URI
|
|
8
8
|
} from '../forkManager';
|
|
9
|
-
import { Event } from '@jupyterlab/services';
|
|
9
|
+
import { Event, ServerConnection } from '@jupyterlab/services';
|
|
10
10
|
import { Signal } from '@lumino/signaling';
|
|
11
11
|
import { requestAPI } from '../requests';
|
|
12
12
|
jest.mock('../requests');
|
|
@@ -18,13 +18,15 @@ const stream = new Signal({});
|
|
|
18
18
|
const eventManagerMock = {
|
|
19
19
|
stream: stream as any
|
|
20
20
|
} as Event.IManager;
|
|
21
|
+
const serverSettingsMock = {} as ServerConnection.ISettings;
|
|
21
22
|
|
|
22
23
|
describe('@jupyter/docprovider', () => {
|
|
23
24
|
let manager: ForkManager;
|
|
24
25
|
beforeEach(() => {
|
|
25
26
|
manager = new ForkManager({
|
|
26
27
|
contentProvider: contentProviderMock,
|
|
27
|
-
eventManager: eventManagerMock
|
|
28
|
+
eventManager: eventManagerMock,
|
|
29
|
+
serverSettings: serverSettingsMock
|
|
28
30
|
});
|
|
29
31
|
});
|
|
30
32
|
describe('forkManager', () => {
|
|
@@ -50,7 +52,8 @@ describe('@jupyter/docprovider', () => {
|
|
|
50
52
|
description: 'my fork description',
|
|
51
53
|
synchronize: true
|
|
52
54
|
})
|
|
53
|
-
}
|
|
55
|
+
},
|
|
56
|
+
serverSettingsMock
|
|
54
57
|
);
|
|
55
58
|
});
|
|
56
59
|
it('should be able to get all forks', async () => {
|
|
@@ -59,7 +62,8 @@ describe('@jupyter/docprovider', () => {
|
|
|
59
62
|
'api/collaboration/fork/root-uuid',
|
|
60
63
|
{
|
|
61
64
|
method: 'GET'
|
|
62
|
-
}
|
|
65
|
+
},
|
|
66
|
+
serverSettingsMock
|
|
63
67
|
);
|
|
64
68
|
});
|
|
65
69
|
it('should be able to get delete forks', async () => {
|
|
@@ -68,7 +72,8 @@ describe('@jupyter/docprovider', () => {
|
|
|
68
72
|
'api/collaboration/fork/fork-uuid?merge=true',
|
|
69
73
|
{
|
|
70
74
|
method: 'DELETE'
|
|
71
|
-
}
|
|
75
|
+
},
|
|
76
|
+
serverSettingsMock
|
|
72
77
|
);
|
|
73
78
|
});
|
|
74
79
|
it('should be able to emit fork added signal', async () => {
|
{jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/src/component.tsx
RENAMED
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
import { historyIcon } from '@jupyterlab/ui-components';
|
|
14
14
|
import { Notification } from '@jupyterlab/apputils';
|
|
15
15
|
import { IForkProvider } from './ydrive';
|
|
16
|
+
import { ServerConnection } from '@jupyterlab/services';
|
|
16
17
|
|
|
17
18
|
type Props = {
|
|
18
19
|
apiURL: string;
|
|
@@ -20,6 +21,7 @@ type Props = {
|
|
|
20
21
|
contentType: string;
|
|
21
22
|
format: string;
|
|
22
23
|
documentTimelineUrl: string;
|
|
24
|
+
serverSettings?: ServerConnection.ISettings;
|
|
23
25
|
};
|
|
24
26
|
|
|
25
27
|
export const TimelineSliderComponent: React.FC<Props> = ({
|
|
@@ -27,7 +29,8 @@ export const TimelineSliderComponent: React.FC<Props> = ({
|
|
|
27
29
|
provider,
|
|
28
30
|
contentType,
|
|
29
31
|
format,
|
|
30
|
-
documentTimelineUrl
|
|
32
|
+
documentTimelineUrl,
|
|
33
|
+
serverSettings
|
|
31
34
|
}) => {
|
|
32
35
|
const [data, setData] = useState({
|
|
33
36
|
roomId: '',
|
|
@@ -51,7 +54,8 @@ export const TimelineSliderComponent: React.FC<Props> = ({
|
|
|
51
54
|
const response = await requestDocumentTimeline(
|
|
52
55
|
format,
|
|
53
56
|
contentType,
|
|
54
|
-
notebookPath
|
|
57
|
+
notebookPath,
|
|
58
|
+
serverSettings
|
|
55
59
|
);
|
|
56
60
|
|
|
57
61
|
if (!response.ok) {
|
|
@@ -79,7 +83,8 @@ export const TimelineSliderComponent: React.FC<Props> = ({
|
|
|
79
83
|
sessionRef.current = await requestDocSession(
|
|
80
84
|
format,
|
|
81
85
|
contentType,
|
|
82
|
-
extractFilenameFromURL(apiURL)
|
|
86
|
+
extractFilenameFromURL(apiURL),
|
|
87
|
+
serverSettings
|
|
83
88
|
);
|
|
84
89
|
}
|
|
85
90
|
setToggle(true);
|
|
@@ -102,7 +107,8 @@ export const TimelineSliderComponent: React.FC<Props> = ({
|
|
|
102
107
|
`${sessionRef.current.format}:${sessionRef.current.type}:${sessionRef.current.fileId}`,
|
|
103
108
|
'restore',
|
|
104
109
|
0,
|
|
105
|
-
data.forkRoom
|
|
110
|
+
data.forkRoom,
|
|
111
|
+
serverSettings
|
|
106
112
|
);
|
|
107
113
|
|
|
108
114
|
if (response.code === 200) {
|
|
@@ -138,7 +144,8 @@ export const TimelineSliderComponent: React.FC<Props> = ({
|
|
|
138
144
|
`${sessionRef.current.format}:${sessionRef.current.type}:${sessionRef.current.fileId}`,
|
|
139
145
|
action,
|
|
140
146
|
steps,
|
|
141
|
-
data.forkRoom
|
|
147
|
+
data.forkRoom,
|
|
148
|
+
serverSettings
|
|
142
149
|
);
|
|
143
150
|
} catch (error: any) {
|
|
144
151
|
console.error('Error fetching or applying updates:', error);
|
{jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/src/forkManager.ts
RENAMED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import { ICollaborativeContentProvider } from '@jupyter/collaborative-drive';
|
|
7
7
|
import { URLExt } from '@jupyterlab/coreutils';
|
|
8
|
-
import { Event } from '@jupyterlab/services';
|
|
8
|
+
import { Event, ServerConnection } from '@jupyterlab/services';
|
|
9
9
|
import { ISignal, Signal } from '@lumino/signaling';
|
|
10
10
|
|
|
11
11
|
import { requestAPI, ROOM_FORK_URL } from './requests';
|
|
@@ -26,6 +26,7 @@ export class ForkManager implements IForkManager {
|
|
|
26
26
|
this._contentProvider = contentProvider;
|
|
27
27
|
this._eventManager = eventManager;
|
|
28
28
|
this._eventManager.stream.connect(this._handleEvent, this);
|
|
29
|
+
this._serverSettings = options.serverSettings;
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
get isDisposed(): boolean {
|
|
@@ -57,14 +58,22 @@ export class ForkManager implements IForkManager {
|
|
|
57
58
|
body: JSON.stringify({ title, description, synchronize })
|
|
58
59
|
};
|
|
59
60
|
const url = URLExt.join(ROOM_FORK_URL, rootId);
|
|
60
|
-
const response = await requestAPI<IForkCreationResponse>(
|
|
61
|
+
const response = await requestAPI<IForkCreationResponse>(
|
|
62
|
+
url,
|
|
63
|
+
init,
|
|
64
|
+
this._serverSettings
|
|
65
|
+
);
|
|
61
66
|
return response;
|
|
62
67
|
}
|
|
63
68
|
|
|
64
69
|
async getAllForks(rootId: string) {
|
|
65
70
|
const url = URLExt.join(ROOM_FORK_URL, rootId);
|
|
66
71
|
const init = { method: 'GET' };
|
|
67
|
-
const response = await requestAPI<IAllForksResponse>(
|
|
72
|
+
const response = await requestAPI<IAllForksResponse>(
|
|
73
|
+
url,
|
|
74
|
+
init,
|
|
75
|
+
this._serverSettings
|
|
76
|
+
);
|
|
68
77
|
return response;
|
|
69
78
|
}
|
|
70
79
|
|
|
@@ -73,7 +82,7 @@ export class ForkManager implements IForkManager {
|
|
|
73
82
|
const url = URLExt.join(ROOM_FORK_URL, forkId);
|
|
74
83
|
const query = URLExt.objectToQueryString({ merge });
|
|
75
84
|
const init = { method: 'DELETE' };
|
|
76
|
-
await requestAPI(`${url}${query}`, init);
|
|
85
|
+
await requestAPI(`${url}${query}`, init, this._serverSettings);
|
|
77
86
|
}
|
|
78
87
|
getProvider(options: {
|
|
79
88
|
documentPath: string;
|
|
@@ -114,11 +123,13 @@ export class ForkManager implements IForkManager {
|
|
|
114
123
|
private _eventManager: Event.IManager | undefined;
|
|
115
124
|
private _forkAddedSignal = new Signal<ForkManager, IForkChangedEvent>(this);
|
|
116
125
|
private _forkDeletedSignal = new Signal<ForkManager, IForkChangedEvent>(this);
|
|
126
|
+
private _serverSettings?: ServerConnection.ISettings;
|
|
117
127
|
}
|
|
118
128
|
|
|
119
129
|
export namespace ForkManager {
|
|
120
130
|
export interface IOptions {
|
|
121
131
|
contentProvider: ICollaborativeContentProvider;
|
|
122
132
|
eventManager: Event.IManager;
|
|
133
|
+
serverSettings?: ServerConnection.ISettings;
|
|
123
134
|
}
|
|
124
135
|
}
|
{jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/src/requests.ts
RENAMED
|
@@ -47,10 +47,11 @@ export interface ISessionModel {
|
|
|
47
47
|
*/
|
|
48
48
|
export async function requestAPI<T = any>(
|
|
49
49
|
endPoint = '',
|
|
50
|
-
init: RequestInit = {}
|
|
50
|
+
init: RequestInit = {},
|
|
51
|
+
serverSettings?: ServerConnection.ISettings
|
|
51
52
|
): Promise<T> {
|
|
52
53
|
// Make request to Jupyter API
|
|
53
|
-
const settings = ServerConnection.makeSettings();
|
|
54
|
+
const settings = serverSettings ?? ServerConnection.makeSettings();
|
|
54
55
|
const requestUrl = URLExt.join(settings.baseUrl, endPoint);
|
|
55
56
|
|
|
56
57
|
let response: Response;
|
|
@@ -80,9 +81,10 @@ export async function requestAPI<T = any>(
|
|
|
80
81
|
export async function requestDocSession(
|
|
81
82
|
format: string,
|
|
82
83
|
type: string,
|
|
83
|
-
path: string
|
|
84
|
+
path: string,
|
|
85
|
+
serverSettings?: ServerConnection.ISettings
|
|
84
86
|
): Promise<ISessionModel> {
|
|
85
|
-
const settings = ServerConnection.makeSettings();
|
|
87
|
+
const settings = serverSettings ?? ServerConnection.makeSettings();
|
|
86
88
|
const url = URLExt.join(
|
|
87
89
|
settings.baseUrl,
|
|
88
90
|
DOC_SESSION_URL,
|
|
@@ -120,9 +122,10 @@ export async function requestDocSession(
|
|
|
120
122
|
export async function requestDocumentTimeline(
|
|
121
123
|
format: string,
|
|
122
124
|
type: string,
|
|
123
|
-
path: string
|
|
125
|
+
path: string,
|
|
126
|
+
serverSettings?: ServerConnection.ISettings
|
|
124
127
|
): Promise<any> {
|
|
125
|
-
const settings = ServerConnection.makeSettings();
|
|
128
|
+
const settings = serverSettings ?? ServerConnection.makeSettings();
|
|
126
129
|
|
|
127
130
|
let url = URLExt.join(settings.baseUrl, TIMELINE_URL, path);
|
|
128
131
|
url = url.concat(`?format=${format}&&type=${type}`);
|
|
@@ -144,9 +147,10 @@ export async function requestUndoRedo(
|
|
|
144
147
|
roomid: string,
|
|
145
148
|
action: 'undo' | 'redo' | 'restore',
|
|
146
149
|
steps: number,
|
|
147
|
-
forkRoom: string
|
|
150
|
+
forkRoom: string,
|
|
151
|
+
serverSettings?: ServerConnection.ISettings
|
|
148
152
|
): Promise<any> {
|
|
149
|
-
const settings = ServerConnection.makeSettings();
|
|
153
|
+
const settings = serverSettings ?? ServerConnection.makeSettings();
|
|
150
154
|
let url = URLExt.join(
|
|
151
155
|
settings.baseUrl,
|
|
152
156
|
DOC_FORK_URL,
|
{jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/src/ydrive.ts
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Jupyter Development Team.
|
|
2
2
|
// Distributed under the terms of the Modified BSD License.
|
|
3
3
|
|
|
4
|
-
import { PageConfig
|
|
4
|
+
import { PageConfig } from '@jupyterlab/coreutils';
|
|
5
5
|
import { TranslationBundle } from '@jupyterlab/translation';
|
|
6
6
|
import {
|
|
7
7
|
Contents,
|
|
@@ -35,11 +35,6 @@ const DISABLE_RTC =
|
|
|
35
35
|
|
|
36
36
|
const RAW_MESSAGE_TYPE = 2;
|
|
37
37
|
|
|
38
|
-
/**
|
|
39
|
-
* The url for the default drive service.
|
|
40
|
-
*/
|
|
41
|
-
const DOCUMENT_PROVIDER_URL = 'api/collaboration/room';
|
|
42
|
-
|
|
43
38
|
export interface IForkProvider {
|
|
44
39
|
connectToForkDoc: (forkRoomId: string, sessionId: string) => Promise<void>;
|
|
45
40
|
reconnect: () => Promise<void>;
|
|
@@ -245,13 +240,13 @@ export class RtcContentProvider implements IContentProvider {
|
|
|
245
240
|
|
|
246
241
|
try {
|
|
247
242
|
const provider = new WebSocketProvider({
|
|
248
|
-
url: URLExt.join(this._serverSettings.wsUrl, DOCUMENT_PROVIDER_URL),
|
|
249
243
|
path: options.path,
|
|
250
244
|
format: options.format,
|
|
251
245
|
contentType: options.contentType,
|
|
252
246
|
model: sharedModel,
|
|
253
247
|
user: this._user,
|
|
254
|
-
translator: this._trans
|
|
248
|
+
translator: this._trans,
|
|
249
|
+
serverSettings: this._serverSettings
|
|
255
250
|
});
|
|
256
251
|
|
|
257
252
|
// Add the document path in the list of opened ones for this user.
|
{jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/src/yprovider.ts
RENAMED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import { IDocumentProvider } from '@jupyter/collaborative-drive';
|
|
7
7
|
import { showErrorMessage, Dialog } from '@jupyterlab/apputils';
|
|
8
|
-
import { User } from '@jupyterlab/services';
|
|
8
|
+
import { ServerConnection, User } from '@jupyterlab/services';
|
|
9
9
|
import { TranslationBundle } from '@jupyterlab/translation';
|
|
10
10
|
|
|
11
11
|
import { PromiseDelegate } from '@lumino/coreutils';
|
|
@@ -18,6 +18,12 @@ import { WebsocketProvider as YWebsocketProvider } from 'y-websocket';
|
|
|
18
18
|
|
|
19
19
|
import { requestDocSession } from './requests';
|
|
20
20
|
import { IForkProvider } from './ydrive';
|
|
21
|
+
import { URLExt } from '@jupyterlab/coreutils';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The url for the default drive service.
|
|
25
|
+
*/
|
|
26
|
+
const DOCUMENT_PROVIDER_URL = 'api/collaboration/room';
|
|
21
27
|
|
|
22
28
|
/**
|
|
23
29
|
* A class to provide Yjs synchronization over WebSocket.
|
|
@@ -37,10 +43,12 @@ export class WebSocketProvider implements IDocumentProvider, IForkProvider {
|
|
|
37
43
|
this._path = options.path;
|
|
38
44
|
this._contentType = options.contentType;
|
|
39
45
|
this._format = options.format;
|
|
40
|
-
this.
|
|
46
|
+
this._customServerUrl = options.url;
|
|
41
47
|
this._sharedModel = options.model;
|
|
42
48
|
this._awareness = options.model.awareness;
|
|
43
49
|
this._yWebsocketProvider = null;
|
|
50
|
+
this._serverSettings =
|
|
51
|
+
options.serverSettings ?? ServerConnection.makeSettings();
|
|
44
52
|
this._trans = options.translator;
|
|
45
53
|
|
|
46
54
|
const user = options.user;
|
|
@@ -95,12 +103,25 @@ export class WebSocketProvider implements IDocumentProvider, IForkProvider {
|
|
|
95
103
|
this._connect();
|
|
96
104
|
}
|
|
97
105
|
|
|
106
|
+
private get _serverUrl() {
|
|
107
|
+
return (
|
|
108
|
+
this._customServerUrl ??
|
|
109
|
+
URLExt.join(this._serverSettings.wsUrl, DOCUMENT_PROVIDER_URL)
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
|
|
98
113
|
private async _connect(): Promise<void> {
|
|
99
114
|
const session = await requestDocSession(
|
|
100
115
|
this._format,
|
|
101
116
|
this._contentType,
|
|
102
|
-
this._path
|
|
117
|
+
this._path,
|
|
118
|
+
this._serverSettings
|
|
103
119
|
);
|
|
120
|
+
const token = this._serverSettings.token;
|
|
121
|
+
const params: Record<string, string> = { sessionId: session.sessionId };
|
|
122
|
+
if (this._serverSettings.appendToken && token !== '') {
|
|
123
|
+
params['token'] = token;
|
|
124
|
+
}
|
|
104
125
|
|
|
105
126
|
this._yWebsocketProvider = new YWebsocketProvider(
|
|
106
127
|
this._serverUrl,
|
|
@@ -108,8 +129,9 @@ export class WebSocketProvider implements IDocumentProvider, IForkProvider {
|
|
|
108
129
|
this._sharedModel.ydoc,
|
|
109
130
|
{
|
|
110
131
|
disableBc: true,
|
|
111
|
-
params
|
|
112
|
-
awareness: this._awareness
|
|
132
|
+
params,
|
|
133
|
+
awareness: this._awareness,
|
|
134
|
+
WebSocketPolyfill: this._serverSettings.WebSocket
|
|
113
135
|
}
|
|
114
136
|
);
|
|
115
137
|
|
|
@@ -118,6 +140,11 @@ export class WebSocketProvider implements IDocumentProvider, IForkProvider {
|
|
|
118
140
|
}
|
|
119
141
|
|
|
120
142
|
async connectToForkDoc(forkRoomId: string, sessionId: string): Promise<void> {
|
|
143
|
+
const token = this._serverSettings.token;
|
|
144
|
+
const params: Record<string, string> = { sessionId };
|
|
145
|
+
if (this._serverSettings.appendToken && token !== '') {
|
|
146
|
+
params['token'] = token;
|
|
147
|
+
}
|
|
121
148
|
this._disconnect();
|
|
122
149
|
this._yWebsocketProvider = new YWebsocketProvider(
|
|
123
150
|
this._serverUrl,
|
|
@@ -125,8 +152,9 @@ export class WebSocketProvider implements IDocumentProvider, IForkProvider {
|
|
|
125
152
|
this._sharedModel.ydoc,
|
|
126
153
|
{
|
|
127
154
|
disableBc: true,
|
|
128
|
-
params
|
|
129
|
-
awareness: this._awareness
|
|
155
|
+
params,
|
|
156
|
+
awareness: this._awareness,
|
|
157
|
+
WebSocketPolyfill: this._serverSettings.WebSocket
|
|
130
158
|
}
|
|
131
159
|
);
|
|
132
160
|
}
|
|
@@ -177,9 +205,10 @@ export class WebSocketProvider implements IDocumentProvider, IForkProvider {
|
|
|
177
205
|
private _isDisposed: boolean;
|
|
178
206
|
private _path: string;
|
|
179
207
|
private _ready = new PromiseDelegate<void>();
|
|
180
|
-
private
|
|
208
|
+
private _customServerUrl?: string;
|
|
181
209
|
private _sharedModel: YDocument<DocumentChange>;
|
|
182
210
|
private _yWebsocketProvider: YWebsocketProvider | null;
|
|
211
|
+
private _serverSettings: ServerConnection.ISettings;
|
|
183
212
|
private _trans: TranslationBundle;
|
|
184
213
|
}
|
|
185
214
|
|
|
@@ -194,7 +223,7 @@ export namespace WebSocketProvider {
|
|
|
194
223
|
/**
|
|
195
224
|
* The server URL
|
|
196
225
|
*/
|
|
197
|
-
url
|
|
226
|
+
url?: string;
|
|
198
227
|
|
|
199
228
|
/**
|
|
200
229
|
* The document file path
|
|
@@ -225,5 +254,10 @@ export namespace WebSocketProvider {
|
|
|
225
254
|
* The jupyterlab translator
|
|
226
255
|
*/
|
|
227
256
|
translator: TranslationBundle;
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* The server settings.
|
|
260
|
+
*/
|
|
261
|
+
serverSettings?: ServerConnection.ISettings;
|
|
228
262
|
}
|
|
229
263
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupyter/docprovider-extension",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.1",
|
|
4
4
|
"description": "JupyterLab - Collaborative Shared Models",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jupyter",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"watch:labextension": "jupyter labextension watch ."
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@jupyter/collaborative-drive": "^4.2.
|
|
57
|
-
"@jupyter/docprovider": "^4.2.
|
|
56
|
+
"@jupyter/collaborative-drive": "^4.2.1",
|
|
57
|
+
"@jupyter/docprovider": "^4.2.1",
|
|
58
58
|
"@jupyter/ydoc": "^2.1.3 || ^3.0.0",
|
|
59
59
|
"@jupyterlab/application": "^4.5.0",
|
|
60
60
|
"@jupyterlab/apputils": "^4.5.0",
|
|
@@ -221,7 +221,8 @@ export const statusBarTimeline: JupyterFrontEndPlugin<void> = {
|
|
|
221
221
|
forkProvider,
|
|
222
222
|
forkProvider.contentType,
|
|
223
223
|
forkProvider.format,
|
|
224
|
-
DOCUMENT_TIMELINE_URL
|
|
224
|
+
DOCUMENT_TIMELINE_URL,
|
|
225
|
+
app.serviceManager.serverSettings
|
|
225
226
|
);
|
|
226
227
|
|
|
227
228
|
const elt = document.getElementById('jp-slider-status-bar');
|
|
@@ -25,7 +25,11 @@ export const forkManagerPlugin: JupyterFrontEndPlugin<IForkManager> = {
|
|
|
25
25
|
contentProvider: ICollaborativeContentProvider
|
|
26
26
|
) => {
|
|
27
27
|
const eventManager = app.serviceManager.events;
|
|
28
|
-
const manager = new ForkManager({
|
|
28
|
+
const manager = new ForkManager({
|
|
29
|
+
contentProvider,
|
|
30
|
+
eventManager,
|
|
31
|
+
serverSettings: app.serviceManager.serverSettings
|
|
32
|
+
});
|
|
29
33
|
return manager;
|
|
30
34
|
}
|
|
31
35
|
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.2.0b0"
|
jupyter_docprovider-2.2.0b0/jupyter_docprovider/labextension/static/240.d0fe2fe7cb8c5a435ea6.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_jupyter_docprovider_extension=self.webpackChunk_jupyter_docprovider_extension||[]).push([[240],{68:(e,t,n)=>{n.d(t,{A:()=>a});var o=n(758),r=n.n(o),s=n(935),i=n.n(s)()(r());i.push([e.id,"/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|---------------------------------------------------------------------------- */\n\n.jp-timelineSliderWrapper .jp-sliderContainer{\n display: flex;\n align-items: center;\n}\n\n.jp-Slider {\n height: 4.5px\n}\n\n#jp-slider-status-bar {\n display: flex;\n}\n\n.jp-timestampDisplay {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 6px;\n}\n\n.jp-restoreBtnContainer {\n width: 192px;\n}\n\n.jp-ToolbarButtonComponent.jp-restoreBtn {\n cursor: pointer;\n color: var(--jp-layout-color2);\n width: 100%;\n background: var(--jp-accept-color-normal)\n}\n",""]);const a=i},935:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,o,r,s){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(o)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(i[c]=!0)}for(var l=0;l<e.length;l++){var d=[].concat(e[l]);o&&i[d[0]]||(void 0!==s&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=s),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),r&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=r):d[4]="".concat(r)),t.push(d))}},t}},758:e=>{e.exports=function(e){return e[1]}},591:e=>{var t=[];function n(e){for(var n=-1,o=0;o<t.length;o++)if(t[o].identifier===e){n=o;break}return n}function o(e,o){for(var s={},i=[],a=0;a<e.length;a++){var c=e[a],l=o.base?c[0]+o.base:c[0],d=s[l]||0,u="".concat(l," ").concat(d);s[l]=d+1;var h=n(u),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==h)t[h].references++,t[h].updater(p);else{var v=r(p,o);o.byIndex=a,t.splice(a,0,{identifier:u,updater:v,references:1})}i.push(u)}return i}function r(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,r){var s=o(e=e||[],r=r||{});return function(e){e=e||[];for(var i=0;i<s.length;i++){var a=n(s[i]);t[a].references--}for(var c=o(e,r),l=0;l<s.length;l++){var d=n(s[l]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}s=c}}},128:e=>{var t={};e.exports=function(e,n){var o=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},51:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},855:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},740:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var o="";n.supports&&(o+="@supports (".concat(n.supports,") {")),n.media&&(o+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(o+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),o+=n.css,r&&(o+="}"),n.media&&(o+="}"),n.supports&&(o+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),t.styleTagTransform(o,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},656:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},240:(e,t,n)=>{n.r(t),n.d(t,{ForkManager:()=>z,IForkManagerToken:()=>q,JUPYTER_COLLABORATION_FORK_EVENTS_URI:()=>K,NotebookCellServerExecutor:()=>l,ROOM_FORK_URL:()=>p,RtcContentProvider:()=>C,TimelineWidget:()=>V,WebSocketAwarenessProvider:()=>r,WebSocketProvider:()=>w,requestAPI:()=>v,requestDocSession:()=>m,requestDocumentTimeline:()=>f,requestUndoRedo:()=>g});var o=n(560);class r extends o.WebsocketProvider{constructor(e){super(e.url,e.roomID,e.awareness.doc,{awareness:e.awareness}),this._isDisposed=!1,this._awareness=e.awareness,this._user=e.user,this._user.ready.then((()=>this._onUserChanged(this._user))).catch((e=>console.error(e))),this._user.userChanged.connect(this._onUserChanged,this)}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed||(this._user.userChanged.disconnect(this._onUserChanged,this),this._isDisposed=!0,this.destroy())}_onUserChanged(e){this._awareness.setLocalStateField("user",e.identity)}}var s=n(324),i=n(603),a=n(596),c=n(248);class l{constructor(e){var t;this._serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:a.ServerConnection.makeSettings()}async runCell({cell:e,notebook:t,notebookConfig:n,onCellExecuted:o,onCellExecutionScheduled:r,sessionContext:l,sessionDialogs:d,translator:u}){var h,p,v;const m=(u=null!=u?u:c.nullTranslator).load("jupyterlab");switch(e.model.type){case"markdown":e.rendered=!0,e.inputHidden=!1,o({cell:e,success:!0});break;case"code":if(l){if(l.isTerminating){await(0,s.showDialog)({title:m.__("Kernel Terminating"),body:m.__("The kernel for %1 appears to be terminating. You can not run any cell for now.",null===(h=l.session)||void 0===h?void 0:h.path),buttons:[s.Dialog.okButton()]});break}if(l.pendingInput)return await(0,s.showDialog)({title:m.__("Cell not executed due to pending input"),body:m.__("The cell has not been executed to avoid kernel deadlock as there is another pending input! Submit your pending input and try again."),buttons:[s.Dialog.okButton()]}),!1;if(l.hasNoKernel&&await l.startKernel()&&d&&await d.selectKernel(l),l.hasNoKernel)return e.model.sharedModel.transact((()=>{e.model.clearExecution()})),!0;const n=null===(v=null===(p=null==l?void 0:l.session)||void 0===p?void 0:p.kernel)||void 0===v?void 0:v.id,c=i.URLExt.join(this._serverSettings.baseUrl,`api/kernels/${n}/execute`),u=e.model.sharedModel.getId(),f=t.sharedModel.getState("document_id"),g={method:"POST",body:JSON.stringify({cell_id:u,document_id:f})};r({cell:e});let y=!1;try{y=(await a.ServerConnection.makeRequest(c,g,this._serverSettings)).ok}catch(t){if(o({cell:e,success:!1}),e.isDisposed)return!1;throw t}return o({cell:e,success:y}),!0}e.model.sharedModel.transact((()=>{e.model.clearExecution()}),!1)}return Promise.resolve(!0)}}const d="api/collaboration/session",u="api/collaboration/undo_redo",h="api/collaboration/timeline",p="api/collaboration/fork";async function v(e="",t={}){const n=a.ServerConnection.makeSettings(),o=i.URLExt.join(n.baseUrl,e);let r;try{r=await a.ServerConnection.makeRequest(o,t,n)}catch(e){throw new a.ServerConnection.NetworkError(e)}let s=await r.text();if(s.length>0)try{s=JSON.parse(s)}catch(e){console.error("Not a JSON response body.",r)}if(!r.ok)throw new a.ServerConnection.ResponseError(r,s.message||s);return s}async function m(e,t,n){const o=a.ServerConnection.makeSettings(),r=i.URLExt.join(o.baseUrl,d,encodeURIComponent(n)),s={method:"PUT",body:JSON.stringify({format:e,type:t})};let c;try{c=await a.ServerConnection.makeRequest(r,s,o)}catch(e){throw new a.ServerConnection.NetworkError(e)}let l=await c.text();if(l.length>0)try{l=JSON.parse(l)}catch(e){console.log("Not a JSON response body.",c)}if(!c.ok)throw new a.ServerConnection.ResponseError(c,l.message||l);return l}async function f(e,t,n){const o=a.ServerConnection.makeSettings();let r=i.URLExt.join(o.baseUrl,h,n);r=r.concat(`?format=${e}&&type=${t}`);const s={method:"GET"};let c;try{c=await a.ServerConnection.makeRequest(r,s,o)}catch(e){throw new a.ServerConnection.NetworkError(e)}return c}async function g(e,t,n,o){const r=a.ServerConnection.makeSettings();let s=i.URLExt.join(r.baseUrl,u,encodeURIComponent(e));s=s.concat(`?action=${t}&&steps=${n}&&forkRoom=${o}`);const c={method:"PUT"};let l;try{l=await a.ServerConnection.makeRequest(s,c,r)}catch(e){throw new a.ServerConnection.NetworkError(e)}let d=await l.text();if(d.length>0)try{d=JSON.parse(d)}catch(e){console.log("Not a JSON response body.",l)}if(!l.ok)throw new a.ServerConnection.ResponseError(l,d.message||d);return d}var y=n(262),_=n(602);class w{constructor(e){this._onConnectionClosed=e=>{1003===e.code&&(console.error("Document provider closed:",e.reason),(0,s.showErrorMessage)(this._trans.__("Document session error"),e.reason,[s.Dialog.okButton()]),this._sharedModel.dispose())},this._onSync=e=>{e&&(this._yWebsocketProvider&&(this._yWebsocketProvider.off("sync",this._onSync),this._sharedModel.ydoc.getMap("state").set("document_id",this._yWebsocketProvider.roomname)),this._ready.resolve())},this._ready=new y.PromiseDelegate,this._isDisposed=!1,this._path=e.path,this._contentType=e.contentType,this._format=e.format,this._serverUrl=e.url,this._sharedModel=e.model,this._awareness=e.model.awareness,this._yWebsocketProvider=null,this._trans=e.translator;const t=e.user;t.ready.then((()=>{this._onUserChanged(t)})).catch((e=>console.error(e))),t.userChanged.connect(this._onUserChanged,this),this._connect().catch((e=>console.warn(e)))}get isDisposed(){return this._isDisposed}get ready(){return this._ready.promise}get contentType(){return this._contentType}get format(){return this._format}dispose(){var e,t,n;this.isDisposed||(this._isDisposed=!0,null===(e=this._yWebsocketProvider)||void 0===e||e.off("connection-close",this._onConnectionClosed),null===(t=this._yWebsocketProvider)||void 0===t||t.off("sync",this._onSync),null===(n=this._yWebsocketProvider)||void 0===n||n.destroy(),this._disconnect(),_.Signal.clearData(this))}async reconnect(){this._disconnect(),this._connect()}async _connect(){const e=await m(this._format,this._contentType,this._path);this._yWebsocketProvider=new o.WebsocketProvider(this._serverUrl,`${e.format}:${e.type}:${e.fileId}`,this._sharedModel.ydoc,{disableBc:!0,params:{sessionId:e.sessionId},awareness:this._awareness}),this._yWebsocketProvider.on("sync",this._onSync),this._yWebsocketProvider.on("connection-close",this._onConnectionClosed)}async connectToForkDoc(e,t){this._disconnect(),this._yWebsocketProvider=new o.WebsocketProvider(this._serverUrl,e,this._sharedModel.ydoc,{disableBc:!0,params:{sessionId:t},awareness:this._awareness})}get wsProvider(){return this._yWebsocketProvider}_disconnect(){var e,t,n;null===(e=this._yWebsocketProvider)||void 0===e||e.off("connection-close",this._onConnectionClosed),null===(t=this._yWebsocketProvider)||void 0===t||t.off("sync",this._onSync),null===(n=this._yWebsocketProvider)||void 0===n||n.destroy(),this._yWebsocketProvider=null}_onUserChanged(e){this._awareness.setLocalStateField("user",e.identity)}}var S=n(721),k=n(214);const b="true"===i.PageConfig.getOption("disableRTC");class C{constructor(e){this._onCreate=(e,t)=>{var n,o,r,s,a,c,l;if("string"!=typeof e.format)return;const d=null===(r=null===(o=null===(n=this._docmanagerSettings)||void 0===n?void 0:n.composite)||void 0===o?void 0:o.autosave)||void 0===r||r;t.awareness.setLocalStateField("autosave",d),null===(s=this._docmanagerSettings)||void 0===s||s.changed.connect((()=>{var e,n,o;const r=null===(o=null===(n=null===(e=this._docmanagerSettings)||void 0===e?void 0:e.composite)||void 0===n?void 0:n.autosave)||void 0===o||o;t.awareness.setLocalStateField("autosave",r)}));try{const n=new w({url:i.URLExt.join(this._serverSettings.wsUrl,"api/collaboration/room"),path:e.path,format:e.format,contentType:e.contentType,model:t,user:this._user,translator:this._trans}),o=((null===(a=this._globalAwareness)||void 0===a?void 0:a.getLocalState())||{}).documents||[];o.includes(e.path)||(o.push(e.path),null===(c=this._globalAwareness)||void 0===c||c.setLocalStateField("documents",o));let r=e.path,s=`${e.format}:${e.contentType}:${r}`;this._providers.set(s,n);const d=t=>{var n,o;const i=t.oldValue,a=t.newValue;if(!i||!a)return void console.debug("New or old path not given",t);const c=`${e.format}:${e.contentType}:${i}`;if(c!==s)return void console.error("The computed old provider key is different from the current key");const l=`${e.format}:${e.contentType}:${a}`,d=this._providers.get(c);if(!d)return void console.warn(`Could not find a provider to update after rename ${c}, ${l}`);this._providers.set(l,d),this._providers.delete(c),s=l,r=a;const u=((null===(n=this._globalAwareness)||void 0===n?void 0:n.getLocalState())||{}).documents||[],h=u.indexOf(i);u.includes(i)&&!u.includes(a)&&(u.splice(h,1),u.push(a),null===(o=this._globalAwareness)||void 0===o||o.setLocalStateField("documents",u))},u=(e,t)=>{var n,o;if("rename"!==t.type)return;const s=null===(n=t.oldValue)||void 0===n?void 0:n.path,i=null===(o=t.newValue)||void 0===o?void 0:o.path;s===r&&d({oldValue:s,newValue:i,name:"path"})};null===(l=this._driveFileChanged)||void 0===l||l.connect(u),t.changed.connect((async(n,o)=>{var r;if(!o.stateChange)return;const s=o.stateChange.filter((e=>"path"===e.name));for(const e of s)d(e);const i=o.stateChange.filter((e=>"hash"===e.name));if(0===i.length)return;i.length>1&&console.error("Unexpected multiple changes to hash value in a single transaction");const a=i[0],c=null!==(r=t.state.path)&&void 0!==r?r:e.path,l=await this.get(c,{content:!1});this._providerFileChanged.emit({type:"save",newValue:{...l,hash:a.newValue},oldValue:{hash:a.oldValue}})})),t.disposed.connect((()=>{var e,t,n;const o=this._providers.get(s);o&&(o.dispose(),this._providers.delete(s));const i=((null===(e=this._globalAwareness)||void 0===e?void 0:e.getLocalState())||{}).documents||[],a=i.indexOf(r);a>-1&&i.splice(a,1),null===(t=this._globalAwareness)||void 0===t||t.setLocalStateField("documents",i),null===(n=this._driveFileChanged)||void 0===n||n.disconnect(u)}))}catch(t){console.error(`Failed to open websocket connection for ${e.path}.\n:${t}`)}},this._saveCounter=0,this._providerFileChanged=new _.Signal(this),this._user=e.user,this._trans=e.trans,this._globalAwareness=e.globalAwareness,this._serverSettings=e.serverSettings,this._currentDrive=e.currentDrive,this.sharedModelFactory=new T(this._onCreate),this._providers=new Map,this._docmanagerSettings=e.docmanagerSettings,this._driveFileChanged=e.fileChanged}get providers(){return this._providers}async get(e,t){if(t&&t.format&&t.type){const n=`${t.format}:${t.type}:${e}`,o=this._providers.get(n);if(o){const[n]=await Promise.all([this._currentDrive.get(e,{...t,content:!1,contentProviderId:void 0}),o.ready]);return{...n,format:t.format}}}return this._currentDrive.get(e,{...t,contentProviderId:void 0})}async save(e,t={}){var n;if(t.format&&t.type){const o=`${t.format}:${t.type}:${e}`,r=this._providers.get(o),s=++this._saveCounter;if(r){const o=null===(n=r.wsProvider)||void 0===n?void 0:n.ws;if(o){const e=new y.PromiseDelegate,t=t=>{const n=new Uint8Array(t.data),o=S.$C(n);try{if(2!==S.cw(o))return}catch(e){return}const r=S.t3(o);let i=null;try{i=JSON.parse(r)}catch(e){console.debug("The raw reply received was not a JSON reply")}i&&"save"===i.type&&i.responseTo===s&&("success"===i.status?e.resolve():"failed"===i.status?e.reject("Saving failed"):"skipped"===i.status?e.reject("Saving already in progress"):e.reject("Unrecognised save reply status"))};o.addEventListener("message",t);const n=k.xv();k.zd(n,2),k.Qj(n,"save"),k.zd(n,s);const r=k.Fo(n);o.send(r),await e.promise,o.removeEventListener("message",t)}const i={type:t.type,format:t.format,content:!1};return this.get(e,i)}console.warn(`Could not find a provider for ${e}, falling back to REST API save`)}return this._currentDrive.save(e,{...t,contentProviderId:void 0})}get fileChanged(){return this._providerFileChanged}}class T{constructor(e){this._onCreate=e,this.collaborative=!b,this.documentFactories=new Map}registerDocumentFactory(e,t){if(this.documentFactories.has(e))throw new Error(`The content type ${e} already exists`);this.documentFactories.set(e,t)}createNew(e){if("string"==typeof e.format){if(this.collaborative&&e.collaborative&&this.documentFactories.has(e.contentType)){const t=this.documentFactories.get(e.contentType)(e);return this._onCreate(e,t),t}}else console.warn(`Only defined format are supported; got ${e.format}.`)}}var E=n(345),x=n.n(E),R=n(591),U=n.n(R),$=n(740),D=n.n($),P=n(128),j=n.n(P),N=n(855),L=n.n(N),I=n(51),F=n.n(I),M=n(656),A=n.n(M),O=n(68),W={};W.styleTagTransform=A(),W.setAttributes=L(),W.insert=j().bind(null,"head"),W.domAPI=D(),W.insertStyleElement=F(),U()(O.A,W),O.A&&O.A.locals&&O.A.locals;var J=n(882);const B=({apiURL:e,provider:t,contentType:n,format:o,documentTimelineUrl:r})=>{const[i,a]=(0,E.useState)({roomId:"",timestamps:[],forkRoom:"",sessionId:""}),[c,l]=(0,E.useState)(i.timestamps.length-1),[d,u]=(0,E.useState)(!1),[h,p]=(0,E.useState)(!1),v=(0,E.useRef)(!0),y=(0,E.useRef)(!0),_=(0,E.useRef)(null);function w(e){try{const t=new URL(e).pathname,n=t.lastIndexOf(r);if(-1===n)throw new Error(`API segment "${r}" not found in URL.`);return t.slice(n+r.length)}catch(e){return console.error("Invalid URL or unable to extract filename:",e),""}}return x().createElement("div",{className:"jp-sliderContainer"},x().createElement("div",{onClick:()=>{!async function(r){try{if(v.current){const i=await f(o,n,r);if(!i.ok)throw 404===i.status?new Error("Not found"):503===i.status?new Error("WebSocket closed"):new Error(`Failed to fetch data: ${i.statusText}`);const c=await i.text();let d={roomId:"",timestamps:[],forkRoom:"",sessionId:""};return c&&(s.Notification.warning("Document is now in read-only mode. Changes will not be saved.",{autoClose:2500}),d=JSON.parse(c),a(d),l(d.timestamps.length-1),t.connectToForkDoc(d.forkRoom,d.sessionId),_.current=await m(o,n,w(e))),u(!0),v.current=!1,d}}catch(e){console.error("Error fetching data:",e)}}(w(e))},className:"jp-mod-highlighted",title:"Document Timeline"},x().createElement(J.historyIcon.react,{marginRight:"4px"})),d&&x().createElement("div",{className:"jp-timestampDisplay"},x().createElement("input",{type:"range",min:0,max:i.timestamps.length-1,value:c,onChange:async e=>{const t=parseInt(e.target.value),n=Math.abs(t-c);try{const e=function(e){return e<c?"undo":"redo"}(t);if(l(t),y.current&&(p(!0),y.current=!1),!_.current)return void console.error("Session is not initialized");await g(`${_.current.format}:${_.current.type}:${_.current.fileId}`,e,n,i.forkRoom)}catch(e){console.error("Error fetching or applying updates:",e)}},className:"jp-Slider"}),x().createElement("div",null,x().createElement("strong",null,w(e).split("/").pop()," ")," "),h&&x().createElement("div",{className:"jp-restoreBtnContainer"},x().createElement("button",{onClick:async()=>{if(!_.current)return void console.error("Session is not initialized");const e=await g(`${_.current.format}:${_.current.type}:${_.current.fileId}`,"restore",0,i.forkRoom);200===e.code?(s.Notification.success(e.status,{autoClose:4e3}),t.reconnect(),u(!1),v.current=!0):s.Notification.error(e.status,{autoClose:4e3})},className:"jp-ToolbarButtonComponent jp-restoreBtn"},"Restore version"," ",(e=>{const t=new Date(1e3*e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")} ${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}:${String(t.getSeconds()).padStart(2,"0")}`})(i.timestamps[c])))))};class V extends s.ReactWidget{constructor(e,t,n,o,r){super(),this.apiURL=e,this.provider=t,this.contentType=n,this.format=o,this.documentTimelineUrl=r,this.addClass("jp-timelineSliderWrapper")}render(){return E.createElement(B,{key:this.apiURL,apiURL:this.apiURL,provider:this.provider,contentType:this.contentType,format:this.format,documentTimelineUrl:this.documentTimelineUrl})}updateContent(e,t){this.apiURL=e,this.provider=t,this.contentType=this.provider.contentType,this.format=this.provider.format,this.update()}}const q=new y.Token("@jupyter/docprovider:IForkManagerToken"),K="https://schema.jupyter.org/jupyter_collaboration/fork/v1";class z{constructor(e){this._disposed=!1,this._forkAddedSignal=new _.Signal(this),this._forkDeletedSignal=new _.Signal(this);const{contentProvider:t,eventManager:n}=e;this._contentProvider=t,this._eventManager=n,this._eventManager.stream.connect(this._handleEvent,this)}get isDisposed(){return this._disposed}get forkAdded(){return this._forkAddedSignal}get forkDeleted(){return this._forkDeletedSignal}dispose(){var e;this._disposed||(null===(e=this._eventManager)||void 0===e||e.stream.disconnect(this._handleEvent),this._disposed=!0)}async createFork(e){const{rootId:t,title:n,description:o,synchronize:r}=e,s={method:"PUT",body:JSON.stringify({title:n,description:o,synchronize:r})},a=i.URLExt.join(p,t);return await v(a,s)}async getAllForks(e){const t=i.URLExt.join(p,e);return await v(t,{method:"GET"})}async deleteFork(e){const{forkId:t,merge:n}=e,o=i.URLExt.join(p,t),r=i.URLExt.objectToQueryString({merge:n});await v(`${o}${r}`,{method:"DELETE"})}getProvider(e){const{documentPath:t,format:n,type:o}=e,r=this._contentProvider;if(r){const e=t;return r.providers.get(`${n}:${o}:${e}`)}}_handleEvent(e,t){if(t.schema_id===K)switch(t.action){case"create":this._forkAddedSignal.emit(t);break;case"delete":this._forkDeletedSignal.emit(t)}}}}}]);
|
jupyter_docprovider-2.2.0b0/jupyter_docprovider/labextension/static/703.8f6b4edcd0613ddadb68.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_jupyter_docprovider_extension=self.webpackChunk_jupyter_docprovider_extension||[]).push([[703],{703:(e,t,o)=>{o.r(t),o.d(t,{default:()=>C});var r=o(324),n=o(247),i=o(956),a=o(256),s=o(812),l=o(766),d=o(816),c=o(248),u=o(0),v=o(565),g=o(555),p=o(603);const h="api/collaboration/timeline",y="The file %1 has been opened with two different views. This is not supported. Please close this view; otherwise, some of your edits may not be saved properly.",b={id:"@jupyter/docprovider-extension:content-provider",description:"The RTC content provider",provides:v.ICollaborativeContentProvider,requires:[c.ITranslator],optional:[v.IGlobalAwareness,d.ISettingRegistry],activate:async(e,t,o,r)=>{const n=t.load("jupyter_collaboration"),i=e.serviceManager.contents.defaultDrive;if(!i)throw Error("Cannot initialize content provider: default drive property not accessible on contents manager instance.");const a=i.contentProviderRegistry;if(!a)throw Error("Cannot initialize content provider: no content provider registry.");const s=r?await r.load("@jupyterlab/docmanager-extension:plugin"):null,l=new g.RtcContentProvider({currentDrive:i,serverSettings:i.serverSettings,user:e.serviceManager.user,trans:n,globalAwareness:o,docmanagerSettings:s,fileChanged:i.fileChanged});return a.register("rtc",l),l}},m={id:"@jupyter/docprovider-extension:yfile",description:"Plugin to register the shared model factory for the content type 'file'",autoStart:!0,requires:[v.ICollaborativeContentProvider,a.IEditorWidgetFactory],activate:(e,t,o)=>{t.sharedModelFactory.registerDocumentFactory("file",(()=>new u.YFile)),o.contentProviderId="rtc"}},f={id:"@jupyter/docprovider-extension:ynotebook",description:"Plugin to register the shared model factory for the content type 'notebook'",autoStart:!0,requires:[v.ICollaborativeContentProvider,l.INotebookWidgetFactory],optional:[d.ISettingRegistry],activate:(e,t,o,r)=>{let n=!0;r&&r.load("@jupyterlab/notebook-extension:tracker").then((e=>{const t=e=>{var t;const o=null==e?void 0:e.get("experimentalEnableDocumentWideUndoRedo").composite;n=null===(t=!o)||void 0===t||t};t(e),e.changed.connect((e=>t(e)))})),t.sharedModelFactory.registerDocumentFactory("notebook",(()=>new u.YNotebook({disableDocumentWideUndoRedo:n}))),o.contentProviderId="rtc"}},w={id:"@jupyter/docprovider-extension:statusBarTimeline",description:"Plugin to add a timeline slider to the status bar",autoStart:!0,requires:[i.IStatusBar,v.ICollaborativeContentProvider],activate:async(e,t,o)=>{try{let r=null,i=null;const a=async(t,r)=>{if(!r)return;i&&(i.dispose(),i=null);const[a,s]=r.split(":"),l=o.providers.get(`${a}:${s}:${t}`);if(!l)return;const d=l,c=p.URLExt.join(e.serviceManager.serverSettings.baseUrl,h,t);i=new g.TimelineWidget(c,d,d.contentType,d.format,h);const u=document.getElementById("jp-slider-status-bar");u&&!i.isAttached&&n.Widget.attach(i,u)};e.shell.currentChanged&&e.shell.currentChanged.connect((async(e,t)=>{const o=t.newValue;i&&(i.dispose(),i=null),o&&"context"in o&&(await o.context.ready,await a(o.context.path,o.context.model.sharedModel.getState("document_id")))})),t&&(r||(r=new n.Widget,r.addClass("jp-StatusBar-GroupItem"),r.addClass("jp-mod-highlighted"),r.id="jp-slider-status-bar",t.registerStatusItem("jp-slider-status-bar",{item:r,align:"left",rank:4,isActive:()=>{var t,o;const r=e.shell.currentWidget;return(null===(o=null===(t=null==r?void 0:r.context)||void 0===t?void 0:t.model)||void 0===o?void 0:o.collaborative)||!1}})))}catch(e){console.error("Failed to activate statusBarTimeline plugin:",e)}}},C=[b,m,f,{id:"@jupyter/docprovider-extension:logger",description:"A logging plugin for debugging purposes.",autoStart:!0,optional:[s.ILoggerRegistry,a.IEditorTracker,l.INotebookTracker,c.ITranslator],activate:(e,t,o,n,i)=>{const a=(null!=i?i:c.nullTranslator).load("jupyter_collaboration"),s="https://schema.jupyter.org/jupyter_collaboration/session/v1";if(!t)return void e.serviceManager.events.stream.connect(((e,t)=>{var o,n;t.schema_id===s&&(console.debug(`[${t.room}(${t.path})] ${null!==(o=t.action)&&void 0!==o?o:""}: ${null!==(n=t.msg)&&void 0!==n?n:""}`),"WARNING"===t.level&&(0,r.showDialog)({title:a.__("Warning"),body:a.__(y,t.path),buttons:[r.Dialog.okButton()]}))}));const l=new Map,d=(e,o)=>{const r=t.getLogger(o.context.path);l.set(o.context.localPath,r),o.disposed.connect((e=>{l.delete(e.context.localPath)}))};o&&o.widgetAdded.connect(d),n&&n.widgetAdded.connect(d),(async()=>{var t,o;const{events:n}=e.serviceManager;for await(const e of n.stream)if(e.schema_id===s){const n=l.get(e.path);null==n||n.log({type:"text",level:e.level.toLowerCase(),data:`[${e.room}] ${null!==(t=e.action)&&void 0!==t?t:""}: ${null!==(o=e.msg)&&void 0!==o?o:""}`}),"WARNING"===e.level&&(0,r.showDialog)({title:a.__("Warning"),body:a.__(y,e.path),buttons:[r.Dialog.warnButton({label:a.__("Ok")})]})}})()}},{id:"@jupyter/docprovider-extension:notebook-cell-executor",description:"Add notebook cell executor that uses REST API instead of kernel protocol over WebSocket.",autoStart:!0,provides:l.INotebookCellExecutor,activate:e=>"true"===p.PageConfig.getOption("serverSideExecution")?new g.NotebookCellServerExecutor({serverSettings:e.serviceManager.serverSettings}):Object.freeze({runCell:l.runCell})},w,{id:"@jupyter/docprovider-extension:forkManager",autoStart:!0,requires:[v.ICollaborativeContentProvider],provides:g.IForkManagerToken,activate:(e,t)=>{const o=e.serviceManager.events;return new g.ForkManager({contentProvider:t,eventManager:o})}}]}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var _JUPYTERLAB;(()=>{"use strict";var e,r,t,o,a,n,i,l,u,d,s,f,c,p,v,h,b,y,m,g,j,w,P,S={496:(e,r,t)=>{var o={"./index":()=>Promise.all([t.e(575),t.e(719),t.e(703)]).then((()=>()=>t(703))),"./extension":()=>Promise.all([t.e(575),t.e(719),t.e(703)]).then((()=>()=>t(703))),"./style":()=>t.e(944).then((()=>()=>t(944)))},a=(e,r)=>(t.R=r,r=t.o(o,e)?o[e]():Promise.resolve().then((()=>{throw new Error('Module "'+e+'" does not exist in container.')})),t.R=void 0,r),n=(e,r)=>{if(t.S){var o="default",a=t.S[o];if(a&&a!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[o]=e,t.I(o,r)}};t.d(r,{get:()=>a,init:()=>n})}},k={};function x(e){var r=k[e];if(void 0!==r)return r.exports;var t=k[e]={id:e,exports:{}};return S[e](t,t.exports,x),t.exports}x.m=S,x.c=k,x.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return x.d(r,{a:r}),r},x.d=(e,r)=>{for(var t in r)x.o(r,t)&&!x.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},x.f={},x.e=e=>Promise.all(Object.keys(x.f).reduce(((r,t)=>(x.f[t](e,r),r)),[])),x.u=e=>e+"."+{240:"d0fe2fe7cb8c5a435ea6",422:"3ab44960b241aac9f303",444:"13de0fd44849e3f7d780",703:"8f6b4edcd0613ddadb68",944:"eaec77f5cee3f07c3b7f",994:"bc087314bdabeecb0923"}[e]+".js?v="+{240:"d0fe2fe7cb8c5a435ea6",422:"3ab44960b241aac9f303",444:"13de0fd44849e3f7d780",703:"8f6b4edcd0613ddadb68",944:"eaec77f5cee3f07c3b7f",994:"bc087314bdabeecb0923"}[e],x.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),x.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="@jupyter/docprovider-extension:",x.l=(t,o,a,n)=>{if(e[t])e[t].push(o);else{var i,l;if(void 0!==a)for(var u=document.getElementsByTagName("script"),d=0;d<u.length;d++){var s=u[d];if(s.getAttribute("src")==t||s.getAttribute("data-webpack")==r+a){i=s;break}}i||(l=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,x.nc&&i.setAttribute("nonce",x.nc),i.setAttribute("data-webpack",r+a),i.src=t),e[t]=[o];var f=(r,o)=>{i.onerror=i.onload=null,clearTimeout(c);var a=e[t];if(delete e[t],i.parentNode&&i.parentNode.removeChild(i),a&&a.forEach((e=>e(o))),r)return r(o)},c=setTimeout(f.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=f.bind(null,i.onerror),i.onload=f.bind(null,i.onload),l&&document.head.appendChild(i)}},x.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{x.S={};var e={},r={};x.I=(t,o)=>{o||(o=[]);var a=r[t];if(a||(a=r[t]={}),!(o.indexOf(a)>=0)){if(o.push(a),e[t])return e[t];x.o(x.S,t)||(x.S[t]={});var n=x.S[t],i="@jupyter/docprovider-extension",l=(e,r,t,o)=>{var a=n[e]=n[e]||{},l=a[r];(!l||!l.loaded&&(!o!=!l.eager?o:i>l.from))&&(a[r]={get:t,from:i,eager:!!o})},u=[];return"default"===t&&(l("@jupyter/collaborative-drive","4.2.0-beta.0",(()=>Promise.all([x.e(262),x.e(444)]).then((()=>()=>x(444))))),l("@jupyter/docprovider-extension","4.2.0-beta.0",(()=>Promise.all([x.e(575),x.e(719),x.e(703)]).then((()=>()=>x(703))))),l("@jupyter/docprovider","4.2.0-beta.0",(()=>Promise.all([x.e(422),x.e(575),x.e(262),x.e(240)]).then((()=>()=>x(240))))),l("y-websocket","1.5.4",(()=>Promise.all([x.e(422),x.e(994),x.e(206)]).then((()=>()=>x(994)))))),e[t]=u.length?Promise.all(u).then((()=>e[t]=1)):1}}})(),(()=>{var e;x.g.importScripts&&(e=x.g.location+"");var r=x.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var o=t.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=t[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),x.p=e})(),t=e=>{var r=e=>e.split(".").map((e=>+e==e?+e:e)),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),o=t[1]?r(t[1]):[];return t[2]&&(o.length++,o.push.apply(o,r(t[2]))),t[3]&&(o.push([]),o.push.apply(o,r(t[3]))),o},o=(e,r)=>{e=t(e),r=t(r);for(var o=0;;){if(o>=e.length)return o<r.length&&"u"!=(typeof r[o])[0];var a=e[o],n=(typeof a)[0];if(o>=r.length)return"u"==n;var i=r[o],l=(typeof i)[0];if(n!=l)return"o"==n&&"n"==l||"s"==l||"u"==n;if("o"!=n&&"u"!=n&&a!=i)return a<i;o++}},a=e=>{var r=e[0],t="";if(1===e.length)return"*";if(r+.5){t+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var o=1,n=1;n<e.length;n++)o--,t+="u"==(typeof(l=e[n]))[0]?"-":(o>0?".":"")+(o=2,l);return t}var i=[];for(n=1;n<e.length;n++){var l=e[n];i.push(0===l?"not("+u()+")":1===l?"("+u()+" || "+u()+")":2===l?i.pop()+" "+i.pop():a(l))}return u();function u(){return i.pop().replace(/^\((.+)\)$/,"$1")}},n=(e,r)=>{if(0 in e){r=t(r);var o=e[0],a=o<0;a&&(o=-o-1);for(var i=0,l=1,u=!0;;l++,i++){var d,s,f=l<e.length?(typeof e[l])[0]:"";if(i>=r.length||"o"==(s=(typeof(d=r[i]))[0]))return!u||("u"==f?l>o&&!a:""==f!=a);if("u"==s){if(!u||"u"!=f)return!1}else if(u)if(f==s)if(l<=o){if(d!=e[l])return!1}else{if(a?d>e[l]:d<e[l])return!1;d!=e[l]&&(u=!1)}else if("s"!=f&&"n"!=f){if(a||l<=o)return!1;u=!1,l--}else{if(l<=o||s<f!=a)return!1;u=!1}else"s"!=f&&"n"!=f&&(u=!1,l--)}}var c=[],p=c.pop.bind(c);for(i=1;i<e.length;i++){var v=e[i];c.push(1==v?p()|p():2==v?p()&p():v?n(v,r):!p())}return!!p()},i=(e,r)=>e&&x.o(e,r),l=e=>(e.loaded=1,e.get()),u=e=>Object.keys(e).reduce(((r,t)=>(e[t].eager&&(r[t]=e[t]),r)),{}),d=(e,r,t,a)=>{var i=a?u(e[r]):e[r];return(r=Object.keys(i).reduce(((e,r)=>!n(t,r)||e&&!o(e,r)?e:r),0))&&i[r]},s=(e,r,t)=>{var a=t?u(e[r]):e[r];return Object.keys(a).reduce(((e,r)=>!e||!a[e].loaded&&o(e,r)?r:e),0)},f=(e,r,t,o)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+a(o)+")",c=(e,r,t,o,n)=>{var i=e[t];return"No satisfying version ("+a(o)+")"+(n?" for eager consumption":"")+" of shared module "+t+" found in shared scope "+r+".\nAvailable versions: "+Object.keys(i).map((e=>e+" from "+i[e].from)).join(", ")},p=e=>{throw new Error(e)},v=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},b=(e,r,t)=>t?t():((e,r)=>p("Shared module "+r+" doesn't exist in shared scope "+e))(e,r),y=(h=e=>function(r,t,o,a,n){var i=x.I(r);return i&&i.then&&!o?i.then(e.bind(e,r,x.S[r],t,!1,a,n)):e(r,x.S[r],t,o,a,n)})(((e,r,t,o,a,n)=>{if(!i(r,t))return b(e,t,n);var u=d(r,t,a,o);return u?l(u):n?n():void p(c(r,e,t,a,o))})),m=h(((e,r,t,o,a,u)=>{if(!i(r,t))return b(e,t,u);var d=s(r,t,o);return n(a,d)||v(f(r,t,d,a)),l(r[t][d])})),g={},j={248:()=>m("default","@jupyterlab/translation",!1,[1,4,5,0]),324:()=>m("default","@jupyterlab/apputils",!1,[1,4,6,0]),603:()=>m("default","@jupyterlab/coreutils",!1,[1,6,5,0]),0:()=>m("default","@jupyter/ydoc",!1,[1,3,0,0,,"a3"]),247:()=>m("default","@lumino/widgets",!1,[1,2,3,1,,"alpha",1]),256:()=>m("default","@jupyterlab/fileeditor",!1,[1,4,5,0]),555:()=>m("default","@jupyter/docprovider",!1,[1,4,2,0,,"beta",0],(()=>Promise.all([x.e(422),x.e(262),x.e(240)]).then((()=>()=>x(240))))),565:()=>m("default","@jupyter/collaborative-drive",!1,[1,4,2,0,,"beta",0],(()=>Promise.all([x.e(262),x.e(444)]).then((()=>()=>x(444))))),766:()=>m("default","@jupyterlab/notebook",!1,[1,4,5,0]),812:()=>m("default","@jupyterlab/logconsole",!1,[1,4,5,0]),816:()=>m("default","@jupyterlab/settingregistry",!1,[1,4,5,0]),956:()=>m("default","@jupyterlab/statusbar",!1,[1,4,5,0]),262:()=>m("default","@lumino/coreutils",!1,[1,2,0,0]),345:()=>m("default","react",!1,[1,18,2,0]),560:()=>y("default","y-websocket",!1,[1,1,3,15],(()=>Promise.all([x.e(994),x.e(206)]).then((()=>()=>x(994))))),596:()=>m("default","@jupyterlab/services",!1,[1,7,5,0]),602:()=>m("default","@lumino/signaling",!1,[1,2,0,0]),882:()=>m("default","@jupyterlab/ui-components",!1,[1,4,5,0]),206:()=>m("default","yjs",!1,[1,13,5,40])},w={206:[206],240:[345,560,596,602,882],262:[262],575:[248,324,603],719:[0,247,256,555,565,766,812,816,956]},P={},x.f.consumes=(e,r)=>{x.o(w,e)&&w[e].forEach((e=>{if(x.o(g,e))return r.push(g[e]);if(!P[e]){var t=r=>{g[e]=0,x.m[e]=t=>{delete x.c[e],t.exports=r()}};P[e]=!0;var o=r=>{delete g[e],x.m[e]=t=>{throw delete x.c[e],r}};try{var a=j[e]();a.then?r.push(g[e]=a.then(t).catch(o)):t(a)}catch(e){o(e)}}}))},(()=>{var e={552:0};x.f.j=(r,t)=>{var o=x.o(e,r)?e[r]:void 0;if(0!==o)if(o)t.push(o[2]);else if(/^(206|262|575|719)$/.test(r))e[r]=0;else{var a=new Promise(((t,a)=>o=e[r]=[t,a]));t.push(o[2]=a);var n=x.p+x.u(r),i=new Error;x.l(n,(t=>{if(x.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var a=t&&("load"===t.type?"missing":t.type),n=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+a+": "+n+")",i.name="ChunkLoadError",i.type=a,i.request=n,o[1](i)}}),"chunk-"+r,r)}};var r=(r,t)=>{var o,a,[n,i,l]=t,u=0;if(n.some((r=>0!==e[r]))){for(o in i)x.o(i,o)&&(x.m[o]=i[o]);l&&l(x)}for(r&&r(t);u<n.length;u++)a=n[u],x.o(e,a)&&e[a]&&e[a][0](),e[a]=0},t=self.webpackChunk_jupyter_docprovider_extension=self.webpackChunk_jupyter_docprovider_extension||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),x.nc=void 0;var E=x(496);(_JUPYTERLAB=void 0===_JUPYTERLAB?{}:_JUPYTERLAB)["@jupyter/docprovider-extension"]=E})();
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/babel.config.js
RENAMED
|
File without changes
|
{jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/jest.config.js
RENAMED
|
File without changes
|
|
File without changes
|
{jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/src/awareness.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/src/tokens.ts
RENAMED
|
File without changes
|
{jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/style/base.css
RENAMED
|
File without changes
|
{jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/style/index.css
RENAMED
|
File without changes
|
{jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/style/index.js
RENAMED
|
File without changes
|
{jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/style/slider.css
RENAMED
|
File without changes
|
{jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/tsconfig.json
RENAMED
|
File without changes
|
{jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider/tsconfig.test.json
RENAMED
|
File without changes
|
{jupyter_docprovider-2.2.0b0 → jupyter_docprovider-2.2.1}/packages/docprovider-extension/README.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|