@jupyter-notebook/application 7.1.0-alpha.1 → 7.1.0-alpha.2

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/app.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { JupyterFrontEnd, JupyterFrontEndPlugin } from '@jupyterlab/application';
1
+ import { JupyterLab, JupyterFrontEnd, JupyterFrontEndPlugin } from '@jupyterlab/application';
2
2
  import { LabStatus } from '@jupyterlab/application/lib/status';
3
3
  import { IRenderMime } from '@jupyterlab/rendermime-interfaces';
4
4
  import { INotebookShell } from './shell';
@@ -32,6 +32,10 @@ export declare class NotebookApp extends JupyterFrontEnd<INotebookShell> {
32
32
  * The version of the application.
33
33
  */
34
34
  readonly version: string;
35
+ /**
36
+ * The NotebookApp application information dictionary.
37
+ */
38
+ get info(): JupyterLab.IInfo;
35
39
  /**
36
40
  * The JupyterLab application paths dictionary.
37
41
  */
@@ -54,6 +58,7 @@ export declare class NotebookApp extends JupyterFrontEnd<INotebookShell> {
54
58
  * @param mods - The plugin modules to register.
55
59
  */
56
60
  registerPluginModules(mods: NotebookApp.IPluginModule[]): void;
61
+ private _info;
57
62
  private _formatter;
58
63
  }
59
64
  /**
@@ -73,6 +78,10 @@ export declare namespace NotebookApp {
73
78
  * The mime renderer extensions.
74
79
  */
75
80
  readonly mimeExtensions: IRenderMime.IExtensionModule[];
81
+ /**
82
+ * The information about available plugins.
83
+ */
84
+ readonly availablePlugins: JupyterLab.IPluginInfo[];
76
85
  }
77
86
  /**
78
87
  * The interface for a module that exports a plugin or plugins as
package/lib/app.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Jupyter Development Team.
2
2
  // Distributed under the terms of the Modified BSD License.
3
- import { JupyterFrontEnd, } from '@jupyterlab/application';
3
+ import { JupyterLab, JupyterFrontEnd, } from '@jupyterlab/application';
4
4
  import { Base64ModelFactory } from '@jupyterlab/docregistry';
5
5
  import { createRendermimePlugins } from '@jupyterlab/application/lib/mimerenderers';
6
6
  import { LabStatus } from '@jupyterlab/application/lib/status';
@@ -35,6 +35,7 @@ export class NotebookApp extends JupyterFrontEnd {
35
35
  * The version of the application.
36
36
  */
37
37
  this.version = (_b = PageConfig.getOption('appVersion')) !== null && _b !== void 0 ? _b : 'unknown';
38
+ this._info = JupyterLab.defaultInfo;
38
39
  this._formatter = new Throttler(() => {
39
40
  Private.setFormat(this);
40
41
  }, 250);
@@ -45,9 +46,24 @@ export class NotebookApp extends JupyterFrontEnd {
45
46
  this.registerPlugin(plugin);
46
47
  }
47
48
  }
49
+ // Create an IInfo dictionary from the options to override the defaults.
50
+ const info = Object.keys(JupyterLab.defaultInfo).reduce((acc, val) => {
51
+ if (val in options) {
52
+ acc[val] = JSON.parse(JSON.stringify(options[val]));
53
+ }
54
+ return acc;
55
+ }, {});
56
+ // Populate application info.
57
+ this._info = { ...JupyterLab.defaultInfo, ...info };
48
58
  this.restored = this.shell.restored;
49
59
  this.restored.then(() => this._formatter.invoke());
50
60
  }
61
+ /**
62
+ * The NotebookApp application information dictionary.
63
+ */
64
+ get info() {
65
+ return this._info;
66
+ }
51
67
  /**
52
68
  * The JupyterLab application paths dictionary.
53
69
  */
@@ -141,18 +141,22 @@ export class SidePanelHandler extends PanelHandler {
141
141
  * if there is no most recently used.
142
142
  */
143
143
  expand(id) {
144
- if (this._currentWidget) {
145
- this.collapse();
146
- }
147
144
  if (id) {
148
- this.activate(id);
149
- }
150
- else {
151
- const visibleWidget = this.currentWidget;
152
- if (visibleWidget) {
153
- this._currentWidget = visibleWidget;
154
- this.activate(visibleWidget.id);
145
+ if (this._currentWidget && this._currentWidget.id === id) {
146
+ this.collapse();
147
+ this.hide();
155
148
  }
149
+ else {
150
+ this.collapse();
151
+ this.hide();
152
+ this.activate(id);
153
+ this.show();
154
+ }
155
+ }
156
+ else if (this.currentWidget) {
157
+ this._currentWidget = this.currentWidget;
158
+ this.activate(this._currentWidget.id);
159
+ this.show();
156
160
  }
157
161
  }
158
162
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jupyter-notebook/application",
3
- "version": "7.1.0-alpha.1",
3
+ "version": "7.1.0-alpha.2",
4
4
  "description": "Jupyter Notebook - Application",
5
5
  "homepage": "https://github.com/jupyter/notebook",
6
6
  "bugs": {
@@ -42,11 +42,11 @@
42
42
  "watch": "tsc -b --watch"
43
43
  },
44
44
  "dependencies": {
45
- "@jupyterlab/application": "^4.1.0-alpha.4",
46
- "@jupyterlab/coreutils": "^6.1.0-alpha.4",
47
- "@jupyterlab/docregistry": "^4.1.0-alpha.4",
48
- "@jupyterlab/rendermime-interfaces": "^3.9.0-alpha.3",
49
- "@jupyterlab/ui-components": "^4.1.0-alpha.4",
45
+ "@jupyterlab/application": "^4.1.0-beta.0",
46
+ "@jupyterlab/coreutils": "^6.1.0-beta.0",
47
+ "@jupyterlab/docregistry": "^4.1.0-beta.0",
48
+ "@jupyterlab/rendermime-interfaces": "^3.9.0-beta.0",
49
+ "@jupyterlab/ui-components": "^4.1.0-beta.0",
50
50
  "@lumino/algorithm": "^2.0.1",
51
51
  "@lumino/coreutils": "^2.1.2",
52
52
  "@lumino/messaging": "^2.0.1",
@@ -57,7 +57,7 @@
57
57
  "devDependencies": {
58
58
  "@babel/core": "^7.11.6",
59
59
  "@babel/preset-env": "^7.12.1",
60
- "@jupyterlab/testutils": "^4.1.0-alpha.4",
60
+ "@jupyterlab/testutils": "^4.1.0-beta.0",
61
61
  "@types/jest": "^29.2.5",
62
62
  "jest": "^29.3.1",
63
63
  "rimraf": "^3.0.2",