@jupyter-notebook/notebook-extension 7.0.0-alpha.6 → 7.0.0-alpha.7

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 CHANGED
@@ -3,7 +3,7 @@
3
3
  import { DOMUtils, IToolbarWidgetRegistry } from '@jupyterlab/apputils';
4
4
  import { Text, Time } from '@jupyterlab/coreutils';
5
5
  import { IDocumentManager } from '@jupyterlab/docmanager';
6
- import { NotebookPanel, INotebookTracker } from '@jupyterlab/notebook';
6
+ import { NotebookPanel, INotebookTracker, INotebookTools } from '@jupyterlab/notebook';
7
7
  import { ISettingRegistry } from '@jupyterlab/settingregistry';
8
8
  import { ITranslator } from '@jupyterlab/translation';
9
9
  import { INotebookShell } from '@jupyter-notebook/application';
@@ -253,6 +253,28 @@ const scrollOutput = {
253
253
  }
254
254
  }
255
255
  };
256
+ /**
257
+ * A plugin to add the NotebookTools to the side panel;
258
+ */
259
+ const notebookToolsWidget = {
260
+ id: '@jupyter-notebook/notebook-extension:notebook-tools',
261
+ autoStart: true,
262
+ requires: [INotebookShell],
263
+ optional: [INotebookTools],
264
+ activate: (app, shell, notebookTools) => {
265
+ const onChange = async () => {
266
+ const current = shell.currentWidget;
267
+ if (!(current instanceof NotebookPanel)) {
268
+ return;
269
+ }
270
+ // Add the notebook tools in right area.
271
+ if (notebookTools) {
272
+ shell.add(notebookTools, 'right');
273
+ }
274
+ };
275
+ shell.currentChanged.connect(onChange);
276
+ }
277
+ };
256
278
  /**
257
279
  * Export the plugins as default.
258
280
  */
@@ -260,6 +282,7 @@ const plugins = [
260
282
  checkpoints,
261
283
  kernelLogo,
262
284
  kernelStatus,
263
- scrollOutput
285
+ scrollOutput,
286
+ notebookToolsWidget
264
287
  ];
265
288
  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.6",
3
+ "version": "7.0.0-alpha.7",
4
4
  "description": "Jupyter Notebook - Notebook Extension",
5
5
  "homepage": "https://github.com/jupyter/notebook",
6
6
  "bugs": {
@@ -39,14 +39,14 @@
39
39
  "watch": "tsc -b --watch"
40
40
  },
41
41
  "dependencies": {
42
- "@jupyter-notebook/application": "^7.0.0-alpha.6",
43
- "@jupyterlab/application": "^4.0.0-alpha.14",
44
- "@jupyterlab/apputils": "^4.0.0-alpha.14",
45
- "@jupyterlab/cells": "^4.0.0-alpha.14",
46
- "@jupyterlab/docmanager": "^4.0.0-alpha.14",
47
- "@jupyterlab/notebook": "^4.0.0-alpha.14",
48
- "@jupyterlab/settingregistry": "^4.0.0-alpha.14",
49
- "@jupyterlab/translation": "^4.0.0-alpha.14",
42
+ "@jupyter-notebook/application": "^7.0.0-alpha.7",
43
+ "@jupyterlab/application": "^4.0.0-alpha.15",
44
+ "@jupyterlab/apputils": "^4.0.0-alpha.15",
45
+ "@jupyterlab/cells": "^4.0.0-alpha.15",
46
+ "@jupyterlab/docmanager": "^4.0.0-alpha.15",
47
+ "@jupyterlab/notebook": "^4.0.0-alpha.15",
48
+ "@jupyterlab/settingregistry": "^4.0.0-alpha.15",
49
+ "@jupyterlab/translation": "^4.0.0-alpha.15",
50
50
  "@lumino/polling": "^2.0.0-alpha.6",
51
51
  "@lumino/widgets": "^2.0.0-alpha.6"
52
52
  },
package/style/base.css CHANGED
@@ -136,13 +136,6 @@ body[data-format='mobile'] .jp-Notebook > *:first-child {
136
136
 
137
137
  body[data-notebook='notebooks'] .jp-WindowedPanel-window {
138
138
  background: var(--jp-layout-color0);
139
- /* TODO: remove when https://github.com/jupyterlab/jupyterlab/pull/13154 is released */
140
- width: unset;
141
- }
142
-
143
- body[data-notebook='notebooks'] .jp-WindowedPanel-inner {
144
- /* TODO: remove when https://github.com/jupyterlab/jupyterlab/pull/13157 is released */
145
- width: unset;
146
139
  }
147
140
 
148
141
  /* Notebook box shadow */