@jupyter-notebook/notebook-extension 7.0.0-alpha.2 → 7.0.0-alpha.3
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 +1 -33
- package/package.json +10 -10
- package/style/base.css +1 -0
package/lib/index.js
CHANGED
|
@@ -3,13 +3,12 @@
|
|
|
3
3
|
import { DOMUtils } from '@jupyterlab/apputils';
|
|
4
4
|
import { Text, Time } from '@jupyterlab/coreutils';
|
|
5
5
|
import { IDocumentManager } from '@jupyterlab/docmanager';
|
|
6
|
-
import { IMainMenu } from '@jupyterlab/mainmenu';
|
|
7
6
|
import { NotebookPanel, INotebookTracker } from '@jupyterlab/notebook';
|
|
8
7
|
import { ISettingRegistry } from '@jupyterlab/settingregistry';
|
|
9
8
|
import { ITranslator } from '@jupyterlab/translation';
|
|
10
9
|
import { INotebookShell } from '@jupyter-notebook/application';
|
|
11
10
|
import { Poll } from '@lumino/polling';
|
|
12
|
-
import {
|
|
11
|
+
import { Widget } from '@lumino/widgets';
|
|
13
12
|
/**
|
|
14
13
|
* The class for kernel status errors.
|
|
15
14
|
*/
|
|
@@ -173,36 +172,6 @@ const kernelStatus = {
|
|
|
173
172
|
shell.currentChanged.connect(onChange);
|
|
174
173
|
}
|
|
175
174
|
};
|
|
176
|
-
/**
|
|
177
|
-
* A plugin to customize notebook related menu entries
|
|
178
|
-
* TODO: switch to settings define menus when fixed upstream: https://github.com/jupyterlab/jupyterlab/issues/11754
|
|
179
|
-
*/
|
|
180
|
-
const menuPlugin = {
|
|
181
|
-
id: '@jupyter-notebook/notebook-extension:menu-plugin',
|
|
182
|
-
autoStart: true,
|
|
183
|
-
requires: [IMainMenu, ITranslator],
|
|
184
|
-
activate: (app, mainMenu, translator) => {
|
|
185
|
-
const { commands } = app;
|
|
186
|
-
const trans = translator.load('notebook');
|
|
187
|
-
const cellTypeSubmenu = new Menu({ commands });
|
|
188
|
-
cellTypeSubmenu.title.label = trans._p('menu', 'Cell Type');
|
|
189
|
-
[
|
|
190
|
-
'notebook:change-cell-to-code',
|
|
191
|
-
'notebook:change-cell-to-markdown',
|
|
192
|
-
'notebook:change-cell-to-raw'
|
|
193
|
-
].forEach(command => {
|
|
194
|
-
cellTypeSubmenu.addItem({
|
|
195
|
-
command
|
|
196
|
-
});
|
|
197
|
-
});
|
|
198
|
-
mainMenu.runMenu.addItem({ type: 'separator', rank: 1000 });
|
|
199
|
-
mainMenu.runMenu.addItem({
|
|
200
|
-
type: 'submenu',
|
|
201
|
-
submenu: cellTypeSubmenu,
|
|
202
|
-
rank: 1010
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
175
|
/**
|
|
207
176
|
* A plugin to enable scrolling for outputs by default.
|
|
208
177
|
* Mimic the logic from the classic notebook, as found here:
|
|
@@ -288,7 +257,6 @@ const plugins = [
|
|
|
288
257
|
checkpoints,
|
|
289
258
|
kernelLogo,
|
|
290
259
|
kernelStatus,
|
|
291
|
-
menuPlugin,
|
|
292
260
|
scrollOutput
|
|
293
261
|
];
|
|
294
262
|
export default plugins;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupyter-notebook/notebook-extension",
|
|
3
|
-
"version": "7.0.0-alpha.
|
|
3
|
+
"version": "7.0.0-alpha.3",
|
|
4
4
|
"description": "Jupyter Notebook - Notebook Extension",
|
|
5
5
|
"homepage": "https://github.com/jupyter/notebook",
|
|
6
6
|
"bugs": {
|
|
@@ -39,20 +39,20 @@
|
|
|
39
39
|
"watch": "tsc -b --watch"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@jupyter-notebook/application": "^7.0.0-alpha.
|
|
43
|
-
"@jupyterlab/application": "^4.0.0-alpha.
|
|
44
|
-
"@jupyterlab/apputils": "^4.0.0-alpha.
|
|
45
|
-
"@jupyterlab/cells": "^4.0.0-alpha.
|
|
46
|
-
"@jupyterlab/docmanager": "^4.0.0-alpha.
|
|
47
|
-
"@jupyterlab/notebook": "^4.0.0-alpha.
|
|
48
|
-
"@jupyterlab/settingregistry": "^4.0.0-alpha.
|
|
49
|
-
"@jupyterlab/translation": "^4.0.0-alpha.
|
|
42
|
+
"@jupyter-notebook/application": "^7.0.0-alpha.3",
|
|
43
|
+
"@jupyterlab/application": "^4.0.0-alpha.9",
|
|
44
|
+
"@jupyterlab/apputils": "^4.0.0-alpha.9",
|
|
45
|
+
"@jupyterlab/cells": "^4.0.0-alpha.9",
|
|
46
|
+
"@jupyterlab/docmanager": "^4.0.0-alpha.9",
|
|
47
|
+
"@jupyterlab/notebook": "^4.0.0-alpha.9",
|
|
48
|
+
"@jupyterlab/settingregistry": "^4.0.0-alpha.9",
|
|
49
|
+
"@jupyterlab/translation": "^4.0.0-alpha.9",
|
|
50
50
|
"@lumino/polling": "^1.10.0",
|
|
51
51
|
"@lumino/widgets": "^1.31.1"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"rimraf": "~3.0.0",
|
|
55
|
-
"typescript": "~4.
|
|
55
|
+
"typescript": "~4.6.3"
|
|
56
56
|
},
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|
package/style/base.css
CHANGED