@jupyter-notebook/application 7.0.0-alpha.1

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 ADDED
@@ -0,0 +1,83 @@
1
+ import { JupyterFrontEnd, JupyterFrontEndPlugin } from '@jupyterlab/application';
2
+ import { LabStatus } from '@jupyterlab/application/lib/status';
3
+ import { IRenderMime } from '@jupyterlab/rendermime-interfaces';
4
+ import { INotebookShell } from './shell';
5
+ /**
6
+ * App is the main application class. It is instantiated once and shared.
7
+ */
8
+ export declare class NotebookApp extends JupyterFrontEnd<INotebookShell> {
9
+ /**
10
+ * Construct a new NotebookApp object.
11
+ *
12
+ * @param options The instantiation options for an application.
13
+ */
14
+ constructor(options?: NotebookApp.IOptions);
15
+ /**
16
+ * The name of the application.
17
+ */
18
+ readonly name = "Jupyter Notebook";
19
+ /**
20
+ * A namespace/prefix plugins may use to denote their provenance.
21
+ */
22
+ readonly namespace = "Jupyter Notebook";
23
+ /**
24
+ * The application busy and dirty status signals and flags.
25
+ */
26
+ readonly status: LabStatus;
27
+ /**
28
+ * The version of the application.
29
+ */
30
+ readonly version: string;
31
+ /**
32
+ * The JupyterLab application paths dictionary.
33
+ */
34
+ get paths(): JupyterFrontEnd.IPaths;
35
+ /**
36
+ * Handle the DOM events for the application.
37
+ *
38
+ * @param event - The DOM event sent to the application.
39
+ */
40
+ handleEvent(event: Event): void;
41
+ /**
42
+ * Register plugins from a plugin module.
43
+ *
44
+ * @param mod - The plugin module to register.
45
+ */
46
+ registerPluginModule(mod: NotebookApp.IPluginModule): void;
47
+ /**
48
+ * Register the plugins from multiple plugin modules.
49
+ *
50
+ * @param mods - The plugin modules to register.
51
+ */
52
+ registerPluginModules(mods: NotebookApp.IPluginModule[]): void;
53
+ private _formatter;
54
+ }
55
+ /**
56
+ * A namespace for App statics.
57
+ */
58
+ export declare namespace NotebookApp {
59
+ /**
60
+ * The instantiation options for an App application.
61
+ */
62
+ interface IOptions extends JupyterFrontEnd.IOptions<INotebookShell>, Partial<IInfo> {
63
+ }
64
+ /**
65
+ * The information about a Jupyter Notebook application.
66
+ */
67
+ interface IInfo {
68
+ /**
69
+ * The mime renderer extensions.
70
+ */
71
+ readonly mimeExtensions: IRenderMime.IExtensionModule[];
72
+ }
73
+ /**
74
+ * The interface for a module that exports a plugin or plugins as
75
+ * the default value.
76
+ */
77
+ interface IPluginModule {
78
+ /**
79
+ * The default export.
80
+ */
81
+ default: JupyterFrontEndPlugin<any> | JupyterFrontEndPlugin<any>[];
82
+ }
83
+ }
package/lib/app.js ADDED
@@ -0,0 +1,141 @@
1
+ // Copyright (c) Jupyter Development Team.
2
+ // Distributed under the terms of the Modified BSD License.
3
+ import { JupyterFrontEnd } from '@jupyterlab/application';
4
+ import { createRendermimePlugins } from '@jupyterlab/application/lib/mimerenderers';
5
+ import { LabStatus } from '@jupyterlab/application/lib/status';
6
+ import { PageConfig } from '@jupyterlab/coreutils';
7
+ import { Throttler } from '@lumino/polling';
8
+ import { NotebookShell } from './shell';
9
+ /**
10
+ * App is the main application class. It is instantiated once and shared.
11
+ */
12
+ export class NotebookApp extends JupyterFrontEnd {
13
+ /**
14
+ * Construct a new NotebookApp object.
15
+ *
16
+ * @param options The instantiation options for an application.
17
+ */
18
+ constructor(options = { shell: new NotebookShell() }) {
19
+ var _a, _b;
20
+ super(Object.assign(Object.assign({}, options), { shell: (_a = options.shell) !== null && _a !== void 0 ? _a : new NotebookShell() }));
21
+ /**
22
+ * The name of the application.
23
+ */
24
+ this.name = 'Jupyter Notebook';
25
+ /**
26
+ * A namespace/prefix plugins may use to denote their provenance.
27
+ */
28
+ this.namespace = this.name;
29
+ /**
30
+ * The application busy and dirty status signals and flags.
31
+ */
32
+ this.status = new LabStatus(this);
33
+ /**
34
+ * The version of the application.
35
+ */
36
+ this.version = (_b = PageConfig.getOption('appVersion')) !== null && _b !== void 0 ? _b : 'unknown';
37
+ this._formatter = new Throttler(() => {
38
+ Private.setFormat(this);
39
+ }, 250);
40
+ if (options.mimeExtensions) {
41
+ for (const plugin of createRendermimePlugins(options.mimeExtensions)) {
42
+ this.registerPlugin(plugin);
43
+ }
44
+ }
45
+ this.restored.then(() => this._formatter.invoke());
46
+ }
47
+ /**
48
+ * The JupyterLab application paths dictionary.
49
+ */
50
+ get paths() {
51
+ return {
52
+ urls: {
53
+ base: PageConfig.getOption('baseUrl'),
54
+ notFound: PageConfig.getOption('notFoundUrl'),
55
+ app: PageConfig.getOption('appUrl'),
56
+ static: PageConfig.getOption('staticUrl'),
57
+ settings: PageConfig.getOption('settingsUrl'),
58
+ themes: PageConfig.getOption('themesUrl'),
59
+ doc: PageConfig.getOption('docUrl'),
60
+ translations: PageConfig.getOption('translationsApiUrl'),
61
+ hubHost: PageConfig.getOption('hubHost') || undefined,
62
+ hubPrefix: PageConfig.getOption('hubPrefix') || undefined,
63
+ hubUser: PageConfig.getOption('hubUser') || undefined,
64
+ hubServerName: PageConfig.getOption('hubServerName') || undefined
65
+ },
66
+ directories: {
67
+ appSettings: PageConfig.getOption('appSettingsDir'),
68
+ schemas: PageConfig.getOption('schemasDir'),
69
+ static: PageConfig.getOption('staticDir'),
70
+ templates: PageConfig.getOption('templatesDir'),
71
+ themes: PageConfig.getOption('themesDir'),
72
+ userSettings: PageConfig.getOption('userSettingsDir'),
73
+ serverRoot: PageConfig.getOption('serverRoot'),
74
+ workspaces: PageConfig.getOption('workspacesDir')
75
+ }
76
+ };
77
+ }
78
+ /**
79
+ * Handle the DOM events for the application.
80
+ *
81
+ * @param event - The DOM event sent to the application.
82
+ */
83
+ handleEvent(event) {
84
+ super.handleEvent(event);
85
+ if (event.type === 'resize') {
86
+ void this._formatter.invoke();
87
+ }
88
+ }
89
+ /**
90
+ * Register plugins from a plugin module.
91
+ *
92
+ * @param mod - The plugin module to register.
93
+ */
94
+ registerPluginModule(mod) {
95
+ let data = mod.default;
96
+ // Handle commonjs exports.
97
+ if (!Object.prototype.hasOwnProperty.call(mod, '__esModule')) {
98
+ data = mod;
99
+ }
100
+ if (!Array.isArray(data)) {
101
+ data = [data];
102
+ }
103
+ data.forEach(item => {
104
+ try {
105
+ this.registerPlugin(item);
106
+ }
107
+ catch (error) {
108
+ console.error(error);
109
+ }
110
+ });
111
+ }
112
+ /**
113
+ * Register the plugins from multiple plugin modules.
114
+ *
115
+ * @param mods - The plugin modules to register.
116
+ */
117
+ registerPluginModules(mods) {
118
+ mods.forEach(mod => {
119
+ this.registerPluginModule(mod);
120
+ });
121
+ }
122
+ }
123
+ /**
124
+ * A namespace for module-private functionality.
125
+ */
126
+ var Private;
127
+ (function (Private) {
128
+ /**
129
+ * Media query for mobile devices.
130
+ */
131
+ const MOBILE_QUERY = 'only screen and (max-width: 760px)';
132
+ /**
133
+ * Sets the `format` of a Jupyter front-end application.
134
+ *
135
+ * @param app The front-end application whose format is set.
136
+ */
137
+ function setFormat(app) {
138
+ app.format = window.matchMedia(MOBILE_QUERY).matches ? 'mobile' : 'desktop';
139
+ }
140
+ Private.setFormat = setFormat;
141
+ })(Private || (Private = {}));
package/lib/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './app';
2
+ export * from './shell';
package/lib/index.js ADDED
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Jupyter Development Team.
2
+ // Distributed under the terms of the Modified BSD License.
3
+ export * from './app';
4
+ export * from './shell';
package/lib/shell.d.ts ADDED
@@ -0,0 +1,83 @@
1
+ import { JupyterFrontEnd } from '@jupyterlab/application';
2
+ import { DocumentRegistry } from '@jupyterlab/docregistry';
3
+ import { IIterator } from '@lumino/algorithm';
4
+ import { Token } from '@lumino/coreutils';
5
+ import { ISignal } from '@lumino/signaling';
6
+ import { Widget } from '@lumino/widgets';
7
+ /**
8
+ * The Jupyter Notebook application shell token.
9
+ */
10
+ export declare const INotebookShell: Token<INotebookShell>;
11
+ /**
12
+ * The Jupyter Notebook application shell interface.
13
+ */
14
+ export interface INotebookShell extends NotebookShell {
15
+ }
16
+ /**
17
+ * The application shell.
18
+ */
19
+ export declare class NotebookShell extends Widget implements JupyterFrontEnd.IShell {
20
+ constructor();
21
+ /**
22
+ * A signal emitted when the current widget changes.
23
+ */
24
+ get currentChanged(): ISignal<NotebookShell, void>;
25
+ /**
26
+ * The current widget in the shell's main area.
27
+ */
28
+ get currentWidget(): Widget | null;
29
+ /**
30
+ * Get the top area wrapper panel
31
+ */
32
+ get top(): Widget;
33
+ /**
34
+ * Get the menu area wrapper panel
35
+ */
36
+ get menu(): Widget;
37
+ /**
38
+ * Activate a widget in its area.
39
+ */
40
+ activateById(id: string): void;
41
+ /**
42
+ * Add a widget to the application shell.
43
+ *
44
+ * @param widget - The widget being added.
45
+ *
46
+ * @param area - Optional region in the shell into which the widget should
47
+ * be added.
48
+ *
49
+ * @param options - Optional open options.
50
+ *
51
+ */
52
+ add(widget: Widget, area?: Shell.Area, options?: DocumentRegistry.IOpenOptions): void;
53
+ /**
54
+ * Collapse the top area and the spacer to make the view more compact.
55
+ */
56
+ collapseTop(): void;
57
+ /**
58
+ * Expand the top area to show the header and the spacer.
59
+ */
60
+ expandTop(): void;
61
+ /**
62
+ * Return the list of widgets for the given area.
63
+ *
64
+ * @param area The area
65
+ */
66
+ widgets(area: Shell.Area): IIterator<Widget>;
67
+ private _topWrapper;
68
+ private _topHandler;
69
+ private _menuWrapper;
70
+ private _menuHandler;
71
+ private _spacer;
72
+ private _main;
73
+ private _currentChanged;
74
+ }
75
+ /**
76
+ * A namespace for Shell statics
77
+ */
78
+ export declare namespace Shell {
79
+ /**
80
+ * The areas of the application shell where widgets can reside.
81
+ */
82
+ type Area = 'main' | 'top' | 'menu';
83
+ }
package/lib/shell.js ADDED
@@ -0,0 +1,215 @@
1
+ // Copyright (c) Jupyter Development Team.
2
+ // Distributed under the terms of the Modified BSD License.
3
+ import { ArrayExt, find, iter } from '@lumino/algorithm';
4
+ import { Token } from '@lumino/coreutils';
5
+ import { MessageLoop } from '@lumino/messaging';
6
+ import { Signal } from '@lumino/signaling';
7
+ import { Panel, Widget, BoxLayout } from '@lumino/widgets';
8
+ /**
9
+ * The Jupyter Notebook application shell token.
10
+ */
11
+ export const INotebookShell = new Token('@jupyter-notebook/application:INotebookShell');
12
+ /**
13
+ * The default rank for ranked panels.
14
+ */
15
+ const DEFAULT_RANK = 900;
16
+ /**
17
+ * The application shell.
18
+ */
19
+ export class NotebookShell extends Widget {
20
+ constructor() {
21
+ super();
22
+ this._currentChanged = new Signal(this);
23
+ this.id = 'main';
24
+ const rootLayout = new BoxLayout();
25
+ this._topHandler = new Private.PanelHandler();
26
+ this._menuHandler = new Private.PanelHandler();
27
+ this._main = new Panel();
28
+ this._topHandler.panel.id = 'top-panel';
29
+ this._menuHandler.panel.id = 'menu-panel';
30
+ this._main.id = 'main-panel';
31
+ // create wrappers around the top and menu areas
32
+ const topWrapper = (this._topWrapper = new Panel());
33
+ topWrapper.id = 'top-panel-wrapper';
34
+ topWrapper.addWidget(this._topHandler.panel);
35
+ const menuWrapper = (this._menuWrapper = new Panel());
36
+ menuWrapper.id = 'menu-panel-wrapper';
37
+ menuWrapper.addWidget(this._menuHandler.panel);
38
+ BoxLayout.setStretch(topWrapper, 0);
39
+ BoxLayout.setStretch(menuWrapper, 0);
40
+ BoxLayout.setStretch(this._main, 1);
41
+ this._spacer = new Widget();
42
+ this._spacer.id = 'spacer-widget';
43
+ rootLayout.spacing = 0;
44
+ rootLayout.addWidget(topWrapper);
45
+ rootLayout.addWidget(menuWrapper);
46
+ rootLayout.addWidget(this._spacer);
47
+ rootLayout.addWidget(this._main);
48
+ this.layout = rootLayout;
49
+ }
50
+ /**
51
+ * A signal emitted when the current widget changes.
52
+ */
53
+ get currentChanged() {
54
+ return this._currentChanged;
55
+ }
56
+ /**
57
+ * The current widget in the shell's main area.
58
+ */
59
+ get currentWidget() {
60
+ var _a;
61
+ return (_a = this._main.widgets[0]) !== null && _a !== void 0 ? _a : null;
62
+ }
63
+ /**
64
+ * Get the top area wrapper panel
65
+ */
66
+ get top() {
67
+ return this._topWrapper;
68
+ }
69
+ /**
70
+ * Get the menu area wrapper panel
71
+ */
72
+ get menu() {
73
+ return this._menuWrapper;
74
+ }
75
+ /**
76
+ * Activate a widget in its area.
77
+ */
78
+ activateById(id) {
79
+ const widget = find(this.widgets('main'), w => w.id === id);
80
+ if (widget) {
81
+ widget.activate();
82
+ }
83
+ }
84
+ /**
85
+ * Add a widget to the application shell.
86
+ *
87
+ * @param widget - The widget being added.
88
+ *
89
+ * @param area - Optional region in the shell into which the widget should
90
+ * be added.
91
+ *
92
+ * @param options - Optional open options.
93
+ *
94
+ */
95
+ add(widget, area, options) {
96
+ var _a;
97
+ const rank = (_a = options === null || options === void 0 ? void 0 : options.rank) !== null && _a !== void 0 ? _a : DEFAULT_RANK;
98
+ if (area === 'top') {
99
+ return this._topHandler.addWidget(widget, rank);
100
+ }
101
+ if (area === 'menu') {
102
+ return this._menuHandler.addWidget(widget, rank);
103
+ }
104
+ if (area === 'main' || area === undefined) {
105
+ if (this._main.widgets.length > 0) {
106
+ // do not add the widget if there is already one
107
+ return;
108
+ }
109
+ this._main.addWidget(widget);
110
+ this._main.update();
111
+ this._currentChanged.emit(void 0);
112
+ }
113
+ }
114
+ /**
115
+ * Collapse the top area and the spacer to make the view more compact.
116
+ */
117
+ collapseTop() {
118
+ this._topWrapper.setHidden(true);
119
+ this._spacer.setHidden(true);
120
+ }
121
+ /**
122
+ * Expand the top area to show the header and the spacer.
123
+ */
124
+ expandTop() {
125
+ this._topWrapper.setHidden(false);
126
+ this._spacer.setHidden(false);
127
+ }
128
+ /**
129
+ * Return the list of widgets for the given area.
130
+ *
131
+ * @param area The area
132
+ */
133
+ widgets(area) {
134
+ switch (area !== null && area !== void 0 ? area : 'main') {
135
+ case 'top':
136
+ return iter(this._topHandler.panel.widgets);
137
+ case 'menu':
138
+ return iter(this._menuHandler.panel.widgets);
139
+ case 'main':
140
+ return iter(this._main.widgets);
141
+ default:
142
+ throw new Error(`Invalid area: ${area}`);
143
+ }
144
+ }
145
+ }
146
+ /**
147
+ * A namespace for private module data.
148
+ */
149
+ var Private;
150
+ (function (Private) {
151
+ /**
152
+ * A less-than comparison function for side bar rank items.
153
+ */
154
+ function itemCmp(first, second) {
155
+ return first.rank - second.rank;
156
+ }
157
+ Private.itemCmp = itemCmp;
158
+ /**
159
+ * A class which manages a panel and sorts its widgets by rank.
160
+ */
161
+ class PanelHandler {
162
+ constructor() {
163
+ /**
164
+ * A message hook for child add/remove messages on the main area dock panel.
165
+ */
166
+ this._panelChildHook = (handler, msg) => {
167
+ switch (msg.type) {
168
+ case 'child-added':
169
+ {
170
+ const widget = msg.child;
171
+ // If we already know about this widget, we're done
172
+ if (this._items.find(v => v.widget === widget)) {
173
+ break;
174
+ }
175
+ // Otherwise, add to the end by default
176
+ const rank = this._items[this._items.length - 1].rank;
177
+ this._items.push({ widget, rank });
178
+ }
179
+ break;
180
+ case 'child-removed':
181
+ {
182
+ const widget = msg.child;
183
+ ArrayExt.removeFirstWhere(this._items, v => v.widget === widget);
184
+ }
185
+ break;
186
+ default:
187
+ break;
188
+ }
189
+ return true;
190
+ };
191
+ this._items = new Array();
192
+ this._panel = new Panel();
193
+ MessageLoop.installMessageHook(this._panel, this._panelChildHook);
194
+ }
195
+ /**
196
+ * Get the panel managed by the handler.
197
+ */
198
+ get panel() {
199
+ return this._panel;
200
+ }
201
+ /**
202
+ * Add a widget to the panel.
203
+ *
204
+ * If the widget is already added, it will be moved.
205
+ */
206
+ addWidget(widget, rank) {
207
+ widget.parent = null;
208
+ const item = { widget, rank };
209
+ const index = ArrayExt.upperBound(this._items, item, Private.itemCmp);
210
+ ArrayExt.insert(this._items, index, item);
211
+ this._panel.insertWidget(index, widget);
212
+ }
213
+ }
214
+ Private.PanelHandler = PanelHandler;
215
+ })(Private || (Private = {}));
package/package.json ADDED
@@ -0,0 +1,75 @@
1
+ {
2
+ "name": "@jupyter-notebook/application",
3
+ "version": "7.0.0-alpha.1",
4
+ "description": "Jupyter Notebook - Application",
5
+ "homepage": "https://github.com/jupyter/notebook",
6
+ "bugs": {
7
+ "url": "https://github.com/jupyter/notebook/issues"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/jupyter/notebook.git"
12
+ },
13
+ "license": "BSD-3-Clause",
14
+ "author": "Project Jupyter",
15
+ "sideEffects": [
16
+ "style/*.css",
17
+ "style/index.js"
18
+ ],
19
+ "main": "lib/index.js",
20
+ "types": "lib/index.d.ts",
21
+ "style": "style/index.css",
22
+ "directories": {
23
+ "lib": "lib/"
24
+ },
25
+ "files": [
26
+ "lib/*.d.ts",
27
+ "lib/*.js.map",
28
+ "lib/*.js",
29
+ "style/*.css",
30
+ "style/index.js"
31
+ ],
32
+ "scripts": {
33
+ "build": "tsc -b",
34
+ "build:prod": "tsc -b",
35
+ "build:test": "tsc --build tsconfig.test.json",
36
+ "clean": "rimraf lib && rimraf tsconfig.tsbuildinfo",
37
+ "docs": "typedoc src",
38
+ "prepublishOnly": "npm run build",
39
+ "test": "jest",
40
+ "test:cov": "jest --collect-coverage",
41
+ "test:debug": "node --inspect-brk node_modules/.bin/jest --runInBand",
42
+ "test:debug:watch": "node --inspect-brk node_modules/.bin/jest --runInBand --watch",
43
+ "watch": "tsc -b --watch"
44
+ },
45
+ "dependencies": {
46
+ "@jupyterlab/application": "^4.0.0-alpha.5",
47
+ "@jupyterlab/coreutils": "^6.0.0-alpha.5",
48
+ "@jupyterlab/docregistry": "^4.0.0-alpha.5",
49
+ "@jupyterlab/rendermime-interfaces": "^4.0.0-alpha.5",
50
+ "@jupyterlab/ui-components": "^4.0.0-alpha.19",
51
+ "@lumino/algorithm": "^1.9.1",
52
+ "@lumino/coreutils": "^1.12.0",
53
+ "@lumino/messaging": "^1.10.1",
54
+ "@lumino/polling": "^1.10.0",
55
+ "@lumino/signaling": "^1.10.1",
56
+ "@lumino/widgets": "^1.31.1"
57
+ },
58
+ "devDependencies": {
59
+ "@babel/core": "^7.11.6",
60
+ "@babel/preset-env": "^7.12.1",
61
+ "@jupyterlab/testutils": "^4.0.0-alpha.5",
62
+ "@types/jest": "^26.0.10",
63
+ "jest": "^26.4.2",
64
+ "rimraf": "~3.0.0",
65
+ "ts-jest": "^26.3.0",
66
+ "typescript": "~4.1.3"
67
+ },
68
+ "publishConfig": {
69
+ "access": "public"
70
+ },
71
+ "jupyterlab": {
72
+ "coreDependency": true
73
+ },
74
+ "styleModule": "style/index.js"
75
+ }
package/style/base.css ADDED
@@ -0,0 +1,82 @@
1
+ /*-----------------------------------------------------------------------------
2
+ | Copyright (c) Jupyter Development Team.
3
+ | Distributed under the terms of the Modified BSD License.
4
+ |----------------------------------------------------------------------------*/
5
+
6
+ :root {
7
+ --jp-private-topbar-height: 28px;
8
+ /* Override the layout-2 color for the dark theme */
9
+ --md-grey-800: #323232;
10
+ --jp-notebook-max-width: 1200px;
11
+ }
12
+
13
+ body {
14
+ margin: 0;
15
+ padding: 0;
16
+ background: var(--jp-layout-color2);
17
+ }
18
+
19
+ #main {
20
+ position: absolute;
21
+ top: 0;
22
+ left: 0;
23
+ right: 0;
24
+ bottom: 0;
25
+ }
26
+
27
+ #top-panel-wrapper {
28
+ min-height: calc(1.5 * var(--jp-private-topbar-height));
29
+ border-bottom: var(--jp-border-width) solid var(--jp-border-color0);
30
+ background: var(--jp-layout-color1);
31
+ }
32
+
33
+ #top-panel {
34
+ display: flex;
35
+ min-height: calc(1.5 * var(--jp-private-topbar-height));
36
+ padding-left: 5px;
37
+ padding-right: 5px;
38
+ margin-left: auto;
39
+ margin-right: auto;
40
+ max-width: 1200px;
41
+ }
42
+
43
+ #menu-panel-wrapper {
44
+ min-height: var(--jp-private-topbar-height);
45
+ background: var(--jp-layout-color1);
46
+ border-bottom: var(--jp-border-width) solid var(--jp-border-color0);
47
+ box-shadow: var(--jp-elevation-z1);
48
+ }
49
+
50
+ #menu-panel {
51
+ display: flex;
52
+ min-height: var(--jp-private-topbar-height);
53
+ background: var(--jp-layout-color1);
54
+ padding-left: 5px;
55
+ padding-right: 5px;
56
+ margin-left: auto;
57
+ margin-right: auto;
58
+ max-width: var(--jp-notebook-max-width);
59
+ }
60
+
61
+ #main-panel {
62
+ box-shadow: var(--jp-elevation-z4);
63
+ margin-left: auto;
64
+ margin-right: auto;
65
+ max-width: var(--jp-notebook-max-width);
66
+ }
67
+
68
+ #spacer-widget {
69
+ min-height: 16px;
70
+ }
71
+
72
+ /* Special case notebooks as document oriented pages */
73
+
74
+ body[data-notebook='notebooks'] #main-panel {
75
+ margin-left: unset;
76
+ margin-right: unset;
77
+ max-width: unset;
78
+ }
79
+
80
+ body[data-notebook='notebooks'] #spacer-widget {
81
+ min-height: unset;
82
+ }
@@ -0,0 +1,10 @@
1
+ /*-----------------------------------------------------------------------------
2
+ | Copyright (c) Jupyter Development Team.
3
+ | Distributed under the terms of the Modified BSD License.
4
+ |----------------------------------------------------------------------------*/
5
+
6
+ @import url('~@jupyterlab/application/style/index.css');
7
+ @import url('~@jupyterlab/mainmenu/style/index.css');
8
+ @import url('~@jupyterlab/ui-components/style/index.css');
9
+
10
+ @import url('./base.css');
package/style/index.js ADDED
@@ -0,0 +1,10 @@
1
+ /*-----------------------------------------------------------------------------
2
+ | Copyright (c) Jupyter Development Team.
3
+ | Distributed under the terms of the Modified BSD License.
4
+ |----------------------------------------------------------------------------*/
5
+
6
+ import '@jupyterlab/application/style/index.js';
7
+ import '@jupyterlab/mainmenu/style/index.js';
8
+ import '@jupyterlab/ui-components/style/index.js';
9
+
10
+ import './base.css';