@jupyter-notebook/notebook-extension 7.2.0-rc.1 → 7.3.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +25 -1
- package/package.json +9 -9
- package/schema/edit-notebook-metadata.json +9 -0
package/lib/index.js
CHANGED
|
@@ -108,7 +108,8 @@ const closeTab = {
|
|
|
108
108
|
commands.addCommand(id, {
|
|
109
109
|
label: trans.__('Close and Shut Down Notebook'),
|
|
110
110
|
execute: async () => {
|
|
111
|
-
|
|
111
|
+
// Shut the kernel down, without confirmation
|
|
112
|
+
await commands.execute('notebook:shutdown-kernel', { activate: false });
|
|
112
113
|
window.close();
|
|
113
114
|
},
|
|
114
115
|
});
|
|
@@ -120,6 +121,28 @@ const closeTab = {
|
|
|
120
121
|
});
|
|
121
122
|
},
|
|
122
123
|
};
|
|
124
|
+
/**
|
|
125
|
+
* Add a command to open the tree view from the notebook view
|
|
126
|
+
*/
|
|
127
|
+
const openTreeTab = {
|
|
128
|
+
id: '@jupyter-notebook/notebook-extension:open-tree-tab',
|
|
129
|
+
description: 'Add a command to open a browser tab on the tree view when clicking "Open...".',
|
|
130
|
+
autoStart: true,
|
|
131
|
+
optional: [ITranslator],
|
|
132
|
+
activate: (app, translator) => {
|
|
133
|
+
const { commands } = app;
|
|
134
|
+
translator = translator !== null && translator !== void 0 ? translator : nullTranslator;
|
|
135
|
+
const trans = translator.load('notebook');
|
|
136
|
+
const id = 'notebook:open-tree-tab';
|
|
137
|
+
commands.addCommand(id, {
|
|
138
|
+
label: trans.__('Open…'),
|
|
139
|
+
execute: async () => {
|
|
140
|
+
const url = URLExt.join(PageConfig.getBaseUrl(), 'tree');
|
|
141
|
+
window.open(url);
|
|
142
|
+
},
|
|
143
|
+
});
|
|
144
|
+
},
|
|
145
|
+
};
|
|
123
146
|
/**
|
|
124
147
|
* The kernel logo plugin.
|
|
125
148
|
*/
|
|
@@ -441,6 +464,7 @@ const editNotebookMetadata = {
|
|
|
441
464
|
const plugins = [
|
|
442
465
|
checkpoints,
|
|
443
466
|
closeTab,
|
|
467
|
+
openTreeTab,
|
|
444
468
|
editNotebookMetadata,
|
|
445
469
|
kernelLogo,
|
|
446
470
|
kernelStatus,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupyter-notebook/notebook-extension",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.0-alpha.0",
|
|
4
4
|
"description": "Jupyter Notebook - Notebook Extension",
|
|
5
5
|
"homepage": "https://github.com/jupyter/notebook",
|
|
6
6
|
"bugs": {
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"watch": "tsc -b --watch"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@jupyter-notebook/application": "^7.
|
|
42
|
-
"@jupyterlab/application": "~4.
|
|
43
|
-
"@jupyterlab/apputils": "~4.
|
|
44
|
-
"@jupyterlab/cells": "~4.
|
|
45
|
-
"@jupyterlab/docmanager": "~4.
|
|
46
|
-
"@jupyterlab/notebook": "~4.
|
|
47
|
-
"@jupyterlab/settingregistry": "~4.
|
|
48
|
-
"@jupyterlab/translation": "~4.
|
|
41
|
+
"@jupyter-notebook/application": "^7.3.0-alpha.0",
|
|
42
|
+
"@jupyterlab/application": "~4.3.0-alpha.0",
|
|
43
|
+
"@jupyterlab/apputils": "~4.4.0-alpha.0",
|
|
44
|
+
"@jupyterlab/cells": "~4.3.0-alpha.0",
|
|
45
|
+
"@jupyterlab/docmanager": "~4.3.0-alpha.0",
|
|
46
|
+
"@jupyterlab/notebook": "~4.3.0-alpha.0",
|
|
47
|
+
"@jupyterlab/settingregistry": "~4.3.0-alpha.0",
|
|
48
|
+
"@jupyterlab/translation": "~4.3.0-alpha.0",
|
|
49
49
|
"@lumino/polling": "^2.1.2",
|
|
50
50
|
"@lumino/widgets": "^2.3.2",
|
|
51
51
|
"react": "^18.2.0",
|