Merge pull request #6429 from jtpio/update-lab

Update to JupyterLab 4.0.0a25
This commit is contained in:
Jeremy Tuloup 2022-05-20 18:07:42 +02:00 committed by GitHub
commit 4bfaaac148
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
37 changed files with 2091 additions and 1860 deletions

View File

@ -9,7 +9,7 @@ runs:
- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade jupyter_packaging~=0.10 "jupyterlab>=4.0.0a24,<5" build
python -m pip install --upgrade jupyter_packaging~=0.10 "jupyterlab>=4.0.0a25,<5" build
- name: Build pypi distributions
shell: bash

View File

@ -25,7 +25,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install -U "jupyterlab>=4.0.0a24,<5" jupyter_packaging~=0.10
python -m pip install -U "jupyterlab>=4.0.0a25,<5" jupyter_packaging~=0.10
jlpm
jlpm run build
@ -80,6 +80,6 @@ jobs:
- name: Install dependencies
run: |
python -m pip install -U "jupyterlab>=4.0.0a24,<5" jupyter_packaging~=0.10 pip
python -m pip install -U "jupyterlab>=4.0.0a25,<5" jupyter_packaging~=0.10 pip
jlpm
jlpm run build

View File

@ -76,6 +76,7 @@ async function main() {
'@jupyterlab/application-extension:commands',
'@jupyterlab/application-extension:context-menu',
'@jupyterlab/application-extension:faviconbusy',
'@jupyterlab/application-extension:top-bar',
'@jupyterlab/application-extension:top-spacer'
].includes(id)
),
@ -162,6 +163,7 @@ async function main() {
'@jupyterlab/filebrowser-extension:download',
'@jupyterlab/filebrowser-extension:file-upload-status',
'@jupyterlab/filebrowser-extension:open-with',
'@jupyterlab/filebrowser-extension:search',
'@jupyterlab/filebrowser-extension:share-file'
].includes(id)
),
@ -174,7 +176,10 @@ async function main() {
baseMods = baseMods.concat([
require('@jupyterlab/cell-toolbar-extension'),
require('@jupyterlab/notebook-extension').default.filter(({ id }) =>
['@jupyterlab/notebook-extension:completer'].includes(id)
[
'@jupyterlab/notebook-extension:completer',
'@jupyterlab/notebook-extension:search'
].includes(id)
),
require('@jupyterlab/tooltip-extension').default.filter(({ id }) =>
[
@ -202,7 +207,10 @@ async function main() {
['@jupyterlab/codemirror-extension:commands'].includes(id)
),
require('@jupyterlab/fileeditor-extension').default.filter(({ id }) =>
['@jupyterlab/fileeditor-extension:completer'].includes(id)
[
'@jupyterlab/fileeditor-extension:completer',
'@jupyterlab/fileeditor-extension:search'
].includes(id)
),
require('@jupyterlab/filebrowser-extension').default.filter(({ id }) =>
['@jupyterlab/filebrowser-extension:browser'].includes(id)

View File

@ -21,66 +21,66 @@
"@jupyter-notebook/terminal-extension": "~7.0.0-alpha.3",
"@jupyter-notebook/tree-extension": "~7.0.0-alpha.3",
"@jupyter-notebook/ui-components": "~7.0.0-alpha.3",
"@jupyterlab/application": "~4.0.0-alpha.9",
"@jupyterlab/application-extension": "~4.0.0-alpha.9",
"@jupyterlab/apputils": "~4.0.0-alpha.9",
"@jupyterlab/apputils-extension": "~4.0.0-alpha.9",
"@jupyterlab/cell-toolbar": "~4.0.0-alpha.7",
"@jupyterlab/cell-toolbar-extension": "~4.0.0-alpha.7",
"@jupyterlab/celltags": "~4.0.0-alpha.9",
"@jupyterlab/codeeditor": "~4.0.0-alpha.9",
"@jupyterlab/codemirror-extension": "~4.0.0-alpha.9",
"@jupyterlab/completer": "~4.0.0-alpha.9",
"@jupyterlab/completer-extension": "~4.0.0-alpha.9",
"@jupyterlab/console": "~4.0.0-alpha.9",
"@jupyterlab/console-extension": "~4.0.0-alpha.9",
"@jupyterlab/coreutils": "~6.0.0-alpha.9",
"@jupyterlab/docmanager": "~4.0.0-alpha.9",
"@jupyterlab/docmanager-extension": "~4.0.0-alpha.9",
"@jupyterlab/docprovider": "~4.0.0-alpha.9",
"@jupyterlab/docprovider-extension": "~4.0.0-alpha.9",
"@jupyterlab/documentsearch": "~4.0.0-alpha.9",
"@jupyterlab/documentsearch-extension": "~4.0.0-alpha.9",
"@jupyterlab/filebrowser": "~4.0.0-alpha.9",
"@jupyterlab/filebrowser-extension": "~4.0.0-alpha.9",
"@jupyterlab/fileeditor": "~4.0.0-alpha.9",
"@jupyterlab/fileeditor-extension": "~4.0.0-alpha.9",
"@jupyterlab/hub-extension": "~4.0.0-alpha.9",
"@jupyterlab/javascript-extension": "~4.0.0-alpha.9",
"@jupyterlab/json-extension": "~4.0.0-alpha.9",
"@jupyterlab/mainmenu": "~4.0.0-alpha.9",
"@jupyterlab/mainmenu-extension": "~4.0.0-alpha.9",
"@jupyterlab/markedparser-extension": "~4.0.0-alpha.9",
"@jupyterlab/mathjax2-extension": "~4.0.0-alpha.9",
"@jupyterlab/notebook": "~4.0.0-alpha.9",
"@jupyterlab/notebook-extension": "~4.0.0-alpha.9",
"@jupyterlab/observables": "~5.0.0-alpha.9",
"@jupyterlab/outputarea": "~4.0.0-alpha.9",
"@jupyterlab/pdf-extension": "~4.0.0-alpha.9",
"@jupyterlab/rendermime": "~4.0.0-alpha.9",
"@jupyterlab/rendermime-extension": "~4.0.0-alpha.9",
"@jupyterlab/rendermime-interfaces": "~4.0.0-alpha.9",
"@jupyterlab/running-extension": "~4.0.0-alpha.9",
"@jupyterlab/services": "~7.0.0-alpha.9",
"@jupyterlab/settingregistry": "~4.0.0-alpha.9",
"@jupyterlab/shared-models": "~4.0.0-alpha.9",
"@jupyterlab/shortcuts-extension": "~4.0.0-alpha.9",
"@jupyterlab/statedb": "~4.0.0-alpha.9",
"@jupyterlab/statusbar": "~4.0.0-alpha.9",
"@jupyterlab/terminal": "~4.0.0-alpha.9",
"@jupyterlab/terminal-extension": "~4.0.0-alpha.9",
"@jupyterlab/theme-dark-extension": "~4.0.0-alpha.9",
"@jupyterlab/theme-light-extension": "~4.0.0-alpha.9",
"@jupyterlab/tooltip": "~4.0.0-alpha.9",
"@jupyterlab/tooltip-extension": "~4.0.0-alpha.9",
"@jupyterlab/translation": "~4.0.0-alpha.9",
"@jupyterlab/translation-extension": "~4.0.0-alpha.9",
"@jupyterlab/ui-components": "~4.0.0-alpha.24",
"@jupyterlab/user": "~4.0.0-alpha.9",
"@jupyterlab/user-extension": "~4.0.0-alpha.9",
"@jupyterlab/vega5-extension": "~4.0.0-alpha.9",
"@jupyterlab/application": "~4.0.0-alpha.10",
"@jupyterlab/application-extension": "~4.0.0-alpha.10",
"@jupyterlab/apputils": "~4.0.0-alpha.10",
"@jupyterlab/apputils-extension": "~4.0.0-alpha.10",
"@jupyterlab/cell-toolbar": "~4.0.0-alpha.10",
"@jupyterlab/cell-toolbar-extension": "~4.0.0-alpha.10",
"@jupyterlab/celltags": "~4.0.0-alpha.10",
"@jupyterlab/codeeditor": "~4.0.0-alpha.10",
"@jupyterlab/codemirror-extension": "~4.0.0-alpha.10",
"@jupyterlab/completer": "~4.0.0-alpha.10",
"@jupyterlab/completer-extension": "~4.0.0-alpha.10",
"@jupyterlab/console": "~4.0.0-alpha.10",
"@jupyterlab/console-extension": "~4.0.0-alpha.10",
"@jupyterlab/coreutils": "~6.0.0-alpha.10",
"@jupyterlab/docmanager": "~4.0.0-alpha.10",
"@jupyterlab/docmanager-extension": "~4.0.0-alpha.10",
"@jupyterlab/docprovider": "~4.0.0-alpha.10",
"@jupyterlab/docprovider-extension": "~4.0.0-alpha.10",
"@jupyterlab/documentsearch": "~4.0.0-alpha.10",
"@jupyterlab/documentsearch-extension": "~4.0.0-alpha.10",
"@jupyterlab/filebrowser": "~4.0.0-alpha.10",
"@jupyterlab/filebrowser-extension": "~4.0.0-alpha.10",
"@jupyterlab/fileeditor": "~4.0.0-alpha.10",
"@jupyterlab/fileeditor-extension": "~4.0.0-alpha.10",
"@jupyterlab/hub-extension": "~4.0.0-alpha.10",
"@jupyterlab/javascript-extension": "~4.0.0-alpha.10",
"@jupyterlab/json-extension": "~4.0.0-alpha.10",
"@jupyterlab/mainmenu": "~4.0.0-alpha.10",
"@jupyterlab/mainmenu-extension": "~4.0.0-alpha.10",
"@jupyterlab/markedparser-extension": "~4.0.0-alpha.10",
"@jupyterlab/mathjax2-extension": "~4.0.0-alpha.10",
"@jupyterlab/notebook": "~4.0.0-alpha.10",
"@jupyterlab/notebook-extension": "~4.0.0-alpha.10",
"@jupyterlab/observables": "~5.0.0-alpha.10",
"@jupyterlab/outputarea": "~4.0.0-alpha.10",
"@jupyterlab/pdf-extension": "~4.0.0-alpha.10",
"@jupyterlab/rendermime": "~4.0.0-alpha.10",
"@jupyterlab/rendermime-extension": "~4.0.0-alpha.10",
"@jupyterlab/rendermime-interfaces": "~3.8.0-alpha.10",
"@jupyterlab/running-extension": "~4.0.0-alpha.10",
"@jupyterlab/services": "~7.0.0-alpha.10",
"@jupyterlab/settingregistry": "~4.0.0-alpha.10",
"@jupyterlab/shared-models": "~4.0.0-alpha.10",
"@jupyterlab/shortcuts-extension": "~4.0.0-alpha.10",
"@jupyterlab/statedb": "~4.0.0-alpha.10",
"@jupyterlab/statusbar": "~4.0.0-alpha.10",
"@jupyterlab/terminal": "~4.0.0-alpha.10",
"@jupyterlab/terminal-extension": "~4.0.0-alpha.10",
"@jupyterlab/theme-dark-extension": "~4.0.0-alpha.10",
"@jupyterlab/theme-light-extension": "~4.0.0-alpha.10",
"@jupyterlab/tooltip": "~4.0.0-alpha.10",
"@jupyterlab/tooltip-extension": "~4.0.0-alpha.10",
"@jupyterlab/translation": "~4.0.0-alpha.10",
"@jupyterlab/translation-extension": "~4.0.0-alpha.10",
"@jupyterlab/ui-components": "~4.0.0-alpha.25",
"@jupyterlab/user": "~4.0.0-alpha.10",
"@jupyterlab/user-extension": "~4.0.0-alpha.10",
"@jupyterlab/vega5-extension": "~4.0.0-alpha.10",
"@lumino/algorithm": "~1.9.1",
"@lumino/application": "~1.28.1",
"@lumino/application": "~1.29.0",
"@lumino/commands": "~1.20.0",
"@lumino/coreutils": "~1.12.0",
"@lumino/disposable": "~1.10.1",
@ -90,10 +90,10 @@
"@lumino/properties": "~1.8.1",
"@lumino/signaling": "~1.10.1",
"@lumino/virtualdom": "~1.14.1",
"@lumino/widgets": "~1.31.1",
"@lumino/widgets": "~1.32.0",
"react": "~17.0.2",
"react-dom": "~17.0.2",
"yjs": "~13.5.28"
"yjs": "~13.5.38"
},
"dependencies": {
"@jupyter-notebook/application": "^7.0.0-alpha.3",
@ -106,41 +106,41 @@
"@jupyter-notebook/terminal-extension": "^7.0.0-alpha.3",
"@jupyter-notebook/tree-extension": "^7.0.0-alpha.3",
"@jupyter-notebook/ui-components": "^7.0.0-alpha.3",
"@jupyterlab/application-extension": "^4.0.0-alpha.9",
"@jupyterlab/apputils-extension": "^4.0.0-alpha.9",
"@jupyterlab/cell-toolbar-extension": "^4.0.0-alpha.7",
"@jupyterlab/celltags": "^4.0.0-alpha.9",
"@jupyterlab/codemirror-extension": "^4.0.0-alpha.9",
"@jupyterlab/completer-extension": "^4.0.0-alpha.9",
"@jupyterlab/console-extension": "^4.0.0-alpha.9",
"@jupyterlab/coreutils": "~6.0.0-alpha.9",
"@jupyterlab/docmanager-extension": "^4.0.0-alpha.9",
"@jupyterlab/docprovider-extension": "^4.0.0-alpha.9",
"@jupyterlab/documentsearch-extension": "^4.0.0-alpha.9",
"@jupyterlab/filebrowser-extension": "^4.0.0-alpha.9",
"@jupyterlab/fileeditor-extension": "^4.0.0-alpha.9",
"@jupyterlab/hub-extension": "^4.0.0-alpha.9",
"@jupyterlab/javascript-extension": "^4.0.0-alpha.9",
"@jupyterlab/json-extension": "^4.0.0-alpha.9",
"@jupyterlab/mainmenu-extension": "^4.0.0-alpha.9",
"@jupyterlab/markedparser-extension": "^4.0.0-alpha.9",
"@jupyterlab/mathjax2-extension": "^4.0.0-alpha.9",
"@jupyterlab/notebook-extension": "^4.0.0-alpha.9",
"@jupyterlab/pdf-extension": "^4.0.0-alpha.9",
"@jupyterlab/rendermime-extension": "^4.0.0-alpha.9",
"@jupyterlab/running-extension": "^4.0.0-alpha.9",
"@jupyterlab/shortcuts-extension": "^4.0.0-alpha.9",
"@jupyterlab/terminal-extension": "^4.0.0-alpha.9",
"@jupyterlab/theme-dark-extension": "^4.0.0-alpha.9",
"@jupyterlab/theme-light-extension": "^4.0.0-alpha.9",
"@jupyterlab/tooltip-extension": "^4.0.0-alpha.9",
"@jupyterlab/translation-extension": "^4.0.0-alpha.9",
"@jupyterlab/user-extension": "^4.0.0-alpha.9",
"@jupyterlab/vega5-extension": "^4.0.0-alpha.9"
"@jupyterlab/application-extension": "^4.0.0-alpha.10",
"@jupyterlab/apputils-extension": "^4.0.0-alpha.10",
"@jupyterlab/cell-toolbar-extension": "^4.0.0-alpha.10",
"@jupyterlab/celltags": "^4.0.0-alpha.10",
"@jupyterlab/codemirror-extension": "^4.0.0-alpha.10",
"@jupyterlab/completer-extension": "^4.0.0-alpha.10",
"@jupyterlab/console-extension": "^4.0.0-alpha.10",
"@jupyterlab/coreutils": "~6.0.0-alpha.10",
"@jupyterlab/docmanager-extension": "^4.0.0-alpha.10",
"@jupyterlab/docprovider-extension": "^4.0.0-alpha.10",
"@jupyterlab/documentsearch-extension": "^4.0.0-alpha.10",
"@jupyterlab/filebrowser-extension": "^4.0.0-alpha.10",
"@jupyterlab/fileeditor-extension": "^4.0.0-alpha.10",
"@jupyterlab/hub-extension": "^4.0.0-alpha.10",
"@jupyterlab/javascript-extension": "^4.0.0-alpha.10",
"@jupyterlab/json-extension": "^4.0.0-alpha.10",
"@jupyterlab/mainmenu-extension": "^4.0.0-alpha.10",
"@jupyterlab/markedparser-extension": "^4.0.0-alpha.10",
"@jupyterlab/mathjax2-extension": "^4.0.0-alpha.10",
"@jupyterlab/notebook-extension": "^4.0.0-alpha.10",
"@jupyterlab/pdf-extension": "^4.0.0-alpha.10",
"@jupyterlab/rendermime-extension": "^4.0.0-alpha.10",
"@jupyterlab/running-extension": "^4.0.0-alpha.10",
"@jupyterlab/shortcuts-extension": "^4.0.0-alpha.10",
"@jupyterlab/terminal-extension": "^4.0.0-alpha.10",
"@jupyterlab/theme-dark-extension": "^4.0.0-alpha.10",
"@jupyterlab/theme-light-extension": "^4.0.0-alpha.10",
"@jupyterlab/tooltip-extension": "^4.0.0-alpha.10",
"@jupyterlab/translation-extension": "^4.0.0-alpha.10",
"@jupyterlab/user-extension": "^4.0.0-alpha.10",
"@jupyterlab/vega5-extension": "^4.0.0-alpha.10"
},
"devDependencies": {
"@jupyterlab/builder": "^4.0.0-alpha.9",
"@jupyterlab/buildutils": "^4.0.0-alpha.9",
"@jupyterlab/builder": "^4.0.0-alpha.10",
"@jupyterlab/buildutils": "^4.0.0-alpha.10",
"@types/rimraf": "^3.0.0",
"css-loader": "~5.0.1",
"fs-extra": "^8.1.0",

View File

@ -30,7 +30,7 @@
"watch": "tsc -w --listEmittedFiles"
},
"dependencies": {
"@jupyterlab/buildutils": "^4.0.0-alpha.9",
"@jupyterlab/buildutils": "^4.0.0-alpha.10",
"commander": "^6.2.0",
"fs-extra": "^9.1.0",
"typescript": "~4.6.3"

View File

@ -42,7 +42,7 @@
"watch:lib": "lerna exec --stream --scope @jupyter-notebook/metapackage jlpm watch"
},
"devDependencies": {
"@jupyterlab/buildutils": "^4.0.0-alpha.9",
"@jupyterlab/buildutils": "^4.0.0-alpha.10",
"@typescript-eslint/eslint-plugin": "^4.2.0",
"@typescript-eslint/parser": "^4.2.0",
"eslint": "^7.10.0",

View File

@ -41,21 +41,21 @@
"dependencies": {
"@jupyter-notebook/application": "^7.0.0-alpha.3",
"@jupyter-notebook/ui-components": "^7.0.0-alpha.3",
"@jupyterlab/application": "^4.0.0-alpha.9",
"@jupyterlab/apputils": "^4.0.0-alpha.9",
"@jupyterlab/celltags": "^4.0.0-alpha.9",
"@jupyterlab/codeeditor": "^4.0.0-alpha.9",
"@jupyterlab/codemirror": "^4.0.0-alpha.9",
"@jupyterlab/console": "^4.0.0-alpha.9",
"@jupyterlab/coreutils": "^6.0.0-alpha.9",
"@jupyterlab/docmanager": "^4.0.0-alpha.9",
"@jupyterlab/docregistry": "^4.0.0-alpha.9",
"@jupyterlab/mainmenu": "^4.0.0-alpha.9",
"@jupyterlab/settingregistry": "^4.0.0-alpha.9",
"@jupyterlab/translation": "^4.0.0-alpha.9",
"@jupyterlab/application": "^4.0.0-alpha.10",
"@jupyterlab/apputils": "^4.0.0-alpha.10",
"@jupyterlab/celltags": "^4.0.0-alpha.10",
"@jupyterlab/codeeditor": "^4.0.0-alpha.10",
"@jupyterlab/codemirror": "^4.0.0-alpha.10",
"@jupyterlab/console": "^4.0.0-alpha.10",
"@jupyterlab/coreutils": "^6.0.0-alpha.10",
"@jupyterlab/docmanager": "^4.0.0-alpha.10",
"@jupyterlab/docregistry": "^4.0.0-alpha.10",
"@jupyterlab/mainmenu": "^4.0.0-alpha.10",
"@jupyterlab/settingregistry": "^4.0.0-alpha.10",
"@jupyterlab/translation": "^4.0.0-alpha.10",
"@lumino/coreutils": "^1.12.0",
"@lumino/disposable": "^1.10.1",
"@lumino/widgets": "^1.31.1"
"@lumino/widgets": "^1.32.0"
},
"devDependencies": {
"rimraf": "~3.0.0",

View File

@ -0,0 +1,10 @@
{
"title": "Title widget",
"description": "Title widget",
"jupyter.lab.toolbars": {
"TopBar": [{ "name": "widgetTitle", "rank": 10 }]
},
"properties": {},
"additionalProperties": false,
"type": "object"
}

View File

@ -14,7 +14,8 @@ import {
sessionContextDialogs,
ISessionContextDialogs,
DOMUtils,
ICommandPalette
ICommandPalette,
IToolbarWidgetRegistry
} from '@jupyterlab/apputils';
import { ConsolePanel } from '@jupyterlab/console';
@ -390,34 +391,40 @@ const title: JupyterFrontEndPlugin<void> = {
id: '@jupyter-notebook/application-extension:title',
autoStart: true,
requires: [INotebookShell, ITranslator],
optional: [IDocumentManager, IRouter],
optional: [IDocumentManager, IRouter, IToolbarWidgetRegistry],
activate: (
app: JupyterFrontEnd,
shell: INotebookShell,
translator: ITranslator,
docManager: IDocumentManager | null,
router: IRouter | null
router: IRouter | null,
toolbarRegistry: IToolbarWidgetRegistry | null
) => {
const { commands } = app;
const trans = translator.load('notebook');
const widget = new Widget();
widget.id = 'jp-title';
app.shell.add(widget, 'top', { rank: 10 });
const node = document.createElement('div');
if (toolbarRegistry) {
toolbarRegistry.addFactory('TopBar', 'widgetTitle', toolbar => {
const widget = new Widget({ node });
widget.id = 'jp-title';
return widget;
});
}
const addTitle = async (): Promise<void> => {
const current = shell.currentWidget;
if (!current || !(current instanceof DocumentWidget)) {
return;
}
if (widget.node.children.length > 0) {
if (node.children.length > 0) {
return;
}
const h = document.createElement('h1');
h.textContent = current.title.label.replace(STRIP_IPYNB, '');
widget.node.appendChild(h);
widget.node.style.marginLeft = '10px';
node.appendChild(h);
node.style.marginLeft = '10px';
if (!docManager) {
return;
}
@ -465,7 +472,7 @@ const title: JupyterFrontEndPlugin<void> = {
}
});
widget.node.onclick = async () => {
node.onclick = async () => {
void commands.execute(CommandIDs.rename);
};
};

View File

@ -12,3 +12,7 @@
.jp-MainAreaWidget {
height: 100%;
}
.jp-Toolbar > .jp-Toolbar-item {
height: unset;
}

View File

@ -43,22 +43,22 @@
"watch": "tsc -b --watch"
},
"dependencies": {
"@jupyterlab/application": "^4.0.0-alpha.9",
"@jupyterlab/coreutils": "^6.0.0-alpha.9",
"@jupyterlab/docregistry": "^4.0.0-alpha.9",
"@jupyterlab/rendermime-interfaces": "^4.0.0-alpha.9",
"@jupyterlab/ui-components": "^4.0.0-alpha.24",
"@jupyterlab/application": "^4.0.0-alpha.10",
"@jupyterlab/coreutils": "^6.0.0-alpha.10",
"@jupyterlab/docregistry": "^4.0.0-alpha.10",
"@jupyterlab/rendermime-interfaces": "^3.8.0-alpha.10",
"@jupyterlab/ui-components": "^4.0.0-alpha.25",
"@lumino/algorithm": "^1.9.1",
"@lumino/coreutils": "^1.12.0",
"@lumino/messaging": "^1.10.1",
"@lumino/polling": "^1.10.0",
"@lumino/signaling": "^1.10.1",
"@lumino/widgets": "^1.31.1"
"@lumino/widgets": "^1.32.0"
},
"devDependencies": {
"@babel/core": "^7.11.6",
"@babel/preset-env": "^7.12.1",
"@jupyterlab/testutils": "^4.0.0-alpha.9",
"@jupyterlab/testutils": "^4.0.0-alpha.10",
"@types/jest": "^26.0.10",
"jest": "^26.4.2",
"rimraf": "~3.0.0",

View File

@ -39,9 +39,9 @@
"watch": "tsc -b --watch"
},
"dependencies": {
"@jupyterlab/application": "^4.0.0-alpha.9",
"@jupyterlab/console": "^4.0.0-alpha.9",
"@jupyterlab/coreutils": "^6.0.0-alpha.9",
"@jupyterlab/application": "^4.0.0-alpha.10",
"@jupyterlab/console": "^4.0.0-alpha.10",
"@jupyterlab/coreutils": "^6.0.0-alpha.10",
"@lumino/algorithm": "^1.9.1"
},
"devDependencies": {

View File

@ -39,11 +39,11 @@
"watch": "tsc -b --watch"
},
"dependencies": {
"@jupyterlab/application": "^4.0.0-alpha.9",
"@jupyterlab/coreutils": "^6.0.0-alpha.9",
"@jupyterlab/docmanager": "^4.0.0-alpha.9",
"@jupyterlab/docregistry": "^4.0.0-alpha.9",
"@jupyterlab/services": "^7.0.0-alpha.9",
"@jupyterlab/application": "^4.0.0-alpha.10",
"@jupyterlab/coreutils": "^6.0.0-alpha.10",
"@jupyterlab/docmanager": "^4.0.0-alpha.10",
"@jupyterlab/docregistry": "^4.0.0-alpha.10",
"@jupyterlab/services": "^7.0.0-alpha.10",
"@lumino/algorithm": "^1.9.1"
},
"devDependencies": {

View File

@ -40,9 +40,9 @@
},
"dependencies": {
"@jupyter-notebook/application": "^7.0.0-alpha.3",
"@jupyterlab/application": "^4.0.0-alpha.9",
"@jupyterlab/documentsearch": "^4.0.0-alpha.9",
"@lumino/widgets": "^1.31.1"
"@jupyterlab/application": "^4.0.0-alpha.10",
"@jupyterlab/documentsearch": "^4.0.0-alpha.10",
"@lumino/widgets": "^1.32.0"
},
"devDependencies": {
"rimraf": "~3.0.0",

View File

@ -29,11 +29,9 @@ const notebookShellWidgetListener: JupyterFrontEndPlugin<void> = {
if (!widget) {
return;
}
const providerForWidget = registry.getProviderForWidget(widget);
if (providerForWidget) {
if (registry.hasProvider(widget)) {
widget.addClass(SEARCHABLE_CLASS);
}
if (!providerForWidget) {
} else {
widget.removeClass(SEARCHABLE_CLASS);
}
};

View File

@ -40,10 +40,10 @@
},
"dependencies": {
"@jupyter-notebook/ui-components": "^7.0.0-alpha.3",
"@jupyterlab/application": "^4.0.0-alpha.9",
"@jupyterlab/apputils": "^4.0.0-alpha.9",
"@jupyterlab/mainmenu": "^4.0.0-alpha.9",
"@jupyterlab/translation": "^4.0.0-alpha.9"
"@jupyterlab/application": "^4.0.0-alpha.10",
"@jupyterlab/apputils": "^4.0.0-alpha.10",
"@jupyterlab/mainmenu": "^4.0.0-alpha.10",
"@jupyterlab/translation": "^4.0.0-alpha.10"
},
"devDependencies": {
"rimraf": "~3.0.0",

View File

@ -44,17 +44,17 @@
},
"dependencies": {
"@jupyter-notebook/application": "^7.0.0-alpha.3",
"@jupyterlab/application": "^4.0.0-alpha.9",
"@jupyterlab/apputils": "^4.0.0-alpha.9",
"@jupyterlab/coreutils": "^6.0.0-alpha.9",
"@jupyterlab/docregistry": "^4.0.0-alpha.9",
"@jupyterlab/notebook": "^4.0.0-alpha.9",
"@jupyterlab/translation": "^4.0.0-alpha.9",
"@jupyterlab/application": "^4.0.0-alpha.10",
"@jupyterlab/apputils": "^4.0.0-alpha.10",
"@jupyterlab/coreutils": "^6.0.0-alpha.10",
"@jupyterlab/docregistry": "^4.0.0-alpha.10",
"@jupyterlab/notebook": "^4.0.0-alpha.10",
"@jupyterlab/translation": "^4.0.0-alpha.10",
"@lumino/commands": "^1.20.0",
"@lumino/disposable": "^1.10.1"
},
"devDependencies": {
"@jupyterlab/builder": "^4.0.0-alpha.9",
"@jupyterlab/builder": "^4.0.0-alpha.10",
"rimraf": "~3.0.0",
"typescript": "~4.6.3"
},

View File

@ -130,7 +130,7 @@ const launchButtons: JupyterFrontEndPlugin<void> = {
}
if (toolbarRegistry) {
toolbarRegistry.registerFactory<NotebookPanel>(
toolbarRegistry.addFactory<NotebookPanel>(
'Notebook',
'interfaceSwitcher',
panel => {

View File

@ -40,15 +40,15 @@
},
"dependencies": {
"@jupyter-notebook/application": "^7.0.0-alpha.3",
"@jupyterlab/application": "^4.0.0-alpha.9",
"@jupyterlab/apputils": "^4.0.0-alpha.9",
"@jupyterlab/cells": "^4.0.0-alpha.9",
"@jupyterlab/docmanager": "^4.0.0-alpha.9",
"@jupyterlab/notebook": "^4.0.0-alpha.9",
"@jupyterlab/settingregistry": "^4.0.0-alpha.9",
"@jupyterlab/translation": "^4.0.0-alpha.9",
"@jupyterlab/application": "^4.0.0-alpha.10",
"@jupyterlab/apputils": "^4.0.0-alpha.10",
"@jupyterlab/cells": "^4.0.0-alpha.10",
"@jupyterlab/docmanager": "^4.0.0-alpha.10",
"@jupyterlab/notebook": "^4.0.0-alpha.10",
"@jupyterlab/settingregistry": "^4.0.0-alpha.10",
"@jupyterlab/translation": "^4.0.0-alpha.10",
"@lumino/polling": "^1.10.0",
"@lumino/widgets": "^1.31.1"
"@lumino/widgets": "^1.32.0"
},
"devDependencies": {
"rimraf": "~3.0.0",

View File

@ -0,0 +1,10 @@
{
"title": "Notebook checkpoint indicator",
"description": "Notebook checkpoint indicator",
"jupyter.lab.toolbars": {
"TopBar": [{ "name": "checkpoint", "rank": 20 }]
},
"properties": {},
"additionalProperties": false,
"type": "object"
}

View File

@ -0,0 +1,10 @@
{
"title": "Kernel logo",
"description": "Kernel logo in the top area",
"jupyter.lab.toolbars": {
"TopBar": [{ "name": "kernelLogo", "rank": 110 }]
},
"properties": {},
"additionalProperties": false,
"type": "object"
}

View File

@ -6,7 +6,11 @@ import {
JupyterFrontEndPlugin
} from '@jupyterlab/application';
import { ISessionContext, DOMUtils } from '@jupyterlab/apputils';
import {
ISessionContext,
DOMUtils,
IToolbarWidgetRegistry
} from '@jupyterlab/apputils';
import { CodeCell } from '@jupyterlab/cells';
@ -58,19 +62,26 @@ const checkpoints: JupyterFrontEndPlugin<void> = {
id: '@jupyter-notebook/notebook-extension:checkpoints',
autoStart: true,
requires: [IDocumentManager, ITranslator],
optional: [INotebookShell],
optional: [INotebookShell, IToolbarWidgetRegistry],
activate: (
app: JupyterFrontEnd,
docManager: IDocumentManager,
translator: ITranslator,
notebookShell: INotebookShell | null
notebookShell: INotebookShell | null,
toolbarRegistry: IToolbarWidgetRegistry | null
) => {
const { shell } = app;
const trans = translator.load('notebook');
const widget = new Widget();
widget.id = DOMUtils.createDomID();
widget.addClass('jp-NotebookCheckpoint');
app.shell.add(widget, 'top', { rank: 100 });
const node = document.createElement('div');
if (toolbarRegistry) {
toolbarRegistry.addFactory('TopBar', 'checkpoint', toolbar => {
const widget = new Widget({ node });
widget.id = DOMUtils.createDomID();
widget.addClass('jp-NotebookCheckpoint');
return widget;
});
}
const onChange = async () => {
const current = shell.currentWidget;
@ -87,7 +98,7 @@ const checkpoints: JupyterFrontEndPlugin<void> = {
return;
}
const checkpoint = checkpoints[checkpoints.length - 1];
widget.node.textContent = trans.__(
node.textContent = trans.__(
'Last Checkpoint: %1',
Time.formatHuman(new Date(checkpoint.last_modified))
);
@ -116,15 +127,19 @@ const kernelLogo: JupyterFrontEndPlugin<void> = {
id: '@jupyter-notebook/notebook-extension:kernel-logo',
autoStart: true,
requires: [INotebookShell],
activate: (app: JupyterFrontEnd, shell: INotebookShell) => {
optional: [IToolbarWidgetRegistry],
activate: (
app: JupyterFrontEnd,
shell: INotebookShell,
toolbarRegistry: IToolbarWidgetRegistry | null
) => {
const { serviceManager } = app;
let widget: Widget;
const node = document.createElement('div');
const img = document.createElement('img');
node.appendChild(img);
const onChange = async () => {
if (widget) {
widget.dispose();
widget.parent = null;
}
const current = shell.currentWidget;
if (!(current instanceof NotebookPanel)) {
return;
@ -145,16 +160,18 @@ const kernelLogo: JupyterFrontEndPlugin<void> = {
return;
}
const node = document.createElement('div');
const img = document.createElement('img');
img.src = kernelIconUrl;
img.title = spec.display_name;
node.appendChild(img);
widget = new Widget({ node });
widget.addClass('jp-NotebookKernelLogo');
app.shell.add(widget, 'top', { rank: 10_010 });
};
if (toolbarRegistry) {
toolbarRegistry.addFactory('TopBar', 'kernelLogo', toolbar => {
const widget = new Widget({ node });
widget.addClass('jp-NotebookKernelLogo');
return widget;
});
}
app.started.then(() => {
shell.currentChanged.connect(onChange);
});

View File

@ -39,9 +39,9 @@
"watch": "tsc -b --watch"
},
"dependencies": {
"@jupyterlab/application": "^4.0.0-alpha.9",
"@jupyterlab/coreutils": "^6.0.0-alpha.9",
"@jupyterlab/terminal": "^4.0.0-alpha.9",
"@jupyterlab/application": "^4.0.0-alpha.10",
"@jupyterlab/coreutils": "^6.0.0-alpha.10",
"@jupyterlab/terminal": "^4.0.0-alpha.10",
"@lumino/algorithm": "^1.9.1"
},
"devDependencies": {

View File

@ -40,20 +40,20 @@
},
"dependencies": {
"@jupyter-notebook/application": "^7.0.0-alpha.3",
"@jupyterlab/application": "^4.0.0-alpha.9",
"@jupyterlab/apputils": "^4.0.0-alpha.9",
"@jupyterlab/coreutils": "^6.0.0-alpha.9",
"@jupyterlab/docmanager": "^4.0.0-alpha.9",
"@jupyterlab/filebrowser": "^4.0.0-alpha.9",
"@jupyterlab/mainmenu": "^4.0.0-alpha.9",
"@jupyterlab/services": "^7.0.0-alpha.9",
"@jupyterlab/settingregistry": "^4.0.0-alpha.9",
"@jupyterlab/statedb": "^4.0.0-alpha.9",
"@jupyterlab/translation": "^4.0.0-alpha.9",
"@jupyterlab/ui-components": "^4.0.0-alpha.24",
"@jupyterlab/application": "^4.0.0-alpha.10",
"@jupyterlab/apputils": "^4.0.0-alpha.10",
"@jupyterlab/coreutils": "^6.0.0-alpha.10",
"@jupyterlab/docmanager": "^4.0.0-alpha.10",
"@jupyterlab/filebrowser": "^4.0.0-alpha.10",
"@jupyterlab/mainmenu": "^4.0.0-alpha.10",
"@jupyterlab/services": "^7.0.0-alpha.10",
"@jupyterlab/settingregistry": "^4.0.0-alpha.10",
"@jupyterlab/statedb": "^4.0.0-alpha.10",
"@jupyterlab/translation": "^4.0.0-alpha.10",
"@jupyterlab/ui-components": "^4.0.0-alpha.25",
"@lumino/algorithm": "^1.9.1",
"@lumino/commands": "^1.20.0",
"@lumino/widgets": "^1.31.1"
"@lumino/widgets": "^1.32.0"
},
"devDependencies": {
"rimraf": "~3.0.0",

View File

@ -78,7 +78,7 @@ const createNew: JupyterFrontEndPlugin<void> = {
});
if (toolbarRegistry) {
toolbarRegistry.registerFactory(
toolbarRegistry.addFactory(
FILE_BROWSER_FACTORY,
'new-dropdown',
(browser: FileBrowser) => {
@ -128,7 +128,7 @@ const browserWidget: JupyterFrontEndPlugin<void> = {
tabPanel.tabBar.addTab(browser.title);
// Toolbar
toolbarRegistry.registerFactory(
toolbarRegistry.addFactory(
FILE_BROWSER_FACTORY,
'uploader',
(browser: FileBrowser) =>

View File

@ -43,14 +43,14 @@
"watch": "tsc -b --watch"
},
"dependencies": {
"@jupyterlab/ui-components": "^4.0.0-alpha.24",
"@jupyterlab/ui-components": "^4.0.0-alpha.25",
"react": "^17.0.1",
"react-dom": "^17.0.1"
},
"devDependencies": {
"@babel/core": "^7.10.2",
"@babel/preset-env": "^7.10.2",
"@jupyterlab/testutils": "^4.0.0-alpha.9",
"@jupyterlab/testutils": "^4.0.0-alpha.10",
"@types/jest": "^26.0.10",
"babel-loader": "^8.0.6",
"jest": "^26.4.2",

View File

@ -1,5 +1,5 @@
[build-system]
requires = ["jupyter_packaging~=0.10", "jupyterlab>=4.0.0a24,<5", "pre-commit"]
requires = ["jupyter_packaging~=0.10", "jupyterlab>=4.0.0a25,<5", "pre-commit"]
build-backend = "jupyter_packaging.build_api"
[license]

View File

@ -33,7 +33,7 @@ packages = find:
python_requires = >=3.7
install_requires =
notebook_shim>=0.1,<0.2
jupyterlab>=4.0.0a24,<5
jupyterlab>=4.0.0a25,<5
jupyterlab_server>=2.13,<3
jupyter_server>=1.16.0,<2
tornado>=6.1.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

3473
yarn.lock

File diff suppressed because it is too large Load Diff