@jupyterlab/application 0.19.1-alpha.0 → 0.19.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/LICENSE +34 -0
- package/lib/index.d.ts +241 -241
- package/lib/index.js +283 -283
- package/lib/layoutrestorer.d.ts +205 -205
- package/lib/layoutrestorer.js +423 -423
- package/lib/mimerenderers.d.ts +22 -22
- package/lib/mimerenderers.js +137 -134
- package/lib/router.d.ts +204 -204
- package/lib/router.js +145 -145
- package/lib/shell.d.ts +277 -277
- package/lib/shell.js +857 -854
- package/package.json +13 -10
package/lib/shell.d.ts
CHANGED
|
@@ -1,277 +1,277 @@
|
|
|
1
|
-
import { IIterator } from '@phosphor/algorithm';
|
|
2
|
-
import { Message } from '@phosphor/messaging';
|
|
3
|
-
import { ISignal } from '@phosphor/signaling';
|
|
4
|
-
import { DockLayout, DockPanel, FocusTracker, Widget } from '@phosphor/widgets';
|
|
5
|
-
import { DocumentRegistry } from '@jupyterlab/docregistry';
|
|
6
|
-
/**
|
|
7
|
-
* The application shell for JupyterLab.
|
|
8
|
-
*/
|
|
9
|
-
export declare class ApplicationShell extends Widget {
|
|
10
|
-
/**
|
|
11
|
-
* Construct a new application shell.
|
|
12
|
-
*/
|
|
13
|
-
constructor();
|
|
14
|
-
/**
|
|
15
|
-
* A signal emitted when main area's active focus changes.
|
|
16
|
-
*/
|
|
17
|
-
readonly activeChanged: ISignal<this, ApplicationShell.IChangedArgs>;
|
|
18
|
-
/**
|
|
19
|
-
* The active widget in the shell's main area.
|
|
20
|
-
*/
|
|
21
|
-
readonly activeWidget: Widget | null;
|
|
22
|
-
/**
|
|
23
|
-
* A signal emitted when main area's current focus changes.
|
|
24
|
-
*/
|
|
25
|
-
readonly currentChanged: ISignal<this, ApplicationShell.IChangedArgs>;
|
|
26
|
-
/**
|
|
27
|
-
* The current widget in the shell's main area.
|
|
28
|
-
*/
|
|
29
|
-
readonly currentWidget: Widget | null;
|
|
30
|
-
/**
|
|
31
|
-
* A signal emitted when the main area's layout is modified.
|
|
32
|
-
*/
|
|
33
|
-
readonly layoutModified: ISignal<this, void>;
|
|
34
|
-
/**
|
|
35
|
-
* Whether the left area is collapsed.
|
|
36
|
-
*/
|
|
37
|
-
readonly leftCollapsed: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Whether the left area is collapsed.
|
|
40
|
-
*/
|
|
41
|
-
readonly rightCollapsed: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Whether JupyterLab is in presentation mode with the `jp-mod-presentationMode` CSS class.
|
|
44
|
-
*/
|
|
45
|
-
/**
|
|
46
|
-
* Enable/disable presentation mode (`jp-mod-presentationMode` CSS class) with a boolean.
|
|
47
|
-
*/
|
|
48
|
-
presentationMode: boolean;
|
|
49
|
-
/**
|
|
50
|
-
* The main dock area's user interface mode.
|
|
51
|
-
*/
|
|
52
|
-
mode: DockPanel.Mode;
|
|
53
|
-
/**
|
|
54
|
-
* Promise that resolves when state is first restored, returning layout
|
|
55
|
-
* description.
|
|
56
|
-
*/
|
|
57
|
-
readonly restored: Promise<ApplicationShell.ILayout>;
|
|
58
|
-
/**
|
|
59
|
-
* Activate a widget in its area.
|
|
60
|
-
*/
|
|
61
|
-
activateById(id: string): void;
|
|
62
|
-
activateNextTab(): void;
|
|
63
|
-
activatePreviousTab(): void;
|
|
64
|
-
/**
|
|
65
|
-
* Add a widget to the left content area.
|
|
66
|
-
*
|
|
67
|
-
* #### Notes
|
|
68
|
-
* Widgets must have a unique `id` property, which will be used as the DOM id.
|
|
69
|
-
*/
|
|
70
|
-
addToLeftArea(widget: Widget, options?: ApplicationShell.ISideAreaOptions): void;
|
|
71
|
-
/**
|
|
72
|
-
* Add a widget to the main content area.
|
|
73
|
-
*
|
|
74
|
-
* #### Notes
|
|
75
|
-
* Widgets must have a unique `id` property, which will be used as the DOM id.
|
|
76
|
-
* All widgets added to the main area should be disposed after removal
|
|
77
|
-
* (disposal before removal will remove the widget automatically).
|
|
78
|
-
*
|
|
79
|
-
* In the options, `ref` defaults to `null`, `mode` defaults to `'tab-after'`,
|
|
80
|
-
* and `activate` defaults to `true`.
|
|
81
|
-
*/
|
|
82
|
-
addToMainArea(widget: Widget, options?: ApplicationShell.IMainAreaOptions): void;
|
|
83
|
-
/**
|
|
84
|
-
* Add a widget to the right content area.
|
|
85
|
-
*
|
|
86
|
-
* #### Notes
|
|
87
|
-
* Widgets must have a unique `id` property, which will be used as the DOM id.
|
|
88
|
-
*/
|
|
89
|
-
addToRightArea(widget: Widget, options?: ApplicationShell.ISideAreaOptions): void;
|
|
90
|
-
/**
|
|
91
|
-
* Add a widget to the top content area.
|
|
92
|
-
*
|
|
93
|
-
* #### Notes
|
|
94
|
-
* Widgets must have a unique `id` property, which will be used as the DOM id.
|
|
95
|
-
*/
|
|
96
|
-
addToTopArea(widget: Widget, options?: ApplicationShell.ISideAreaOptions): void;
|
|
97
|
-
/**
|
|
98
|
-
* Add a widget to the bottom content area.
|
|
99
|
-
*
|
|
100
|
-
* #### Notes
|
|
101
|
-
* Widgets must have a unique `id` property, which will be used as the DOM id.
|
|
102
|
-
*/
|
|
103
|
-
addToBottomArea(widget: Widget, options?: ApplicationShell.ISideAreaOptions): void;
|
|
104
|
-
/**
|
|
105
|
-
* Collapse the left area.
|
|
106
|
-
*/
|
|
107
|
-
collapseLeft(): void;
|
|
108
|
-
/**
|
|
109
|
-
* Collapse the right area.
|
|
110
|
-
*/
|
|
111
|
-
collapseRight(): void;
|
|
112
|
-
/**
|
|
113
|
-
* Expand the left area.
|
|
114
|
-
*
|
|
115
|
-
* #### Notes
|
|
116
|
-
* This will open the most recently used tab,
|
|
117
|
-
* or the first tab if there is no most recently used.
|
|
118
|
-
*/
|
|
119
|
-
expandLeft(): void;
|
|
120
|
-
/**
|
|
121
|
-
* Expand the right area.
|
|
122
|
-
*
|
|
123
|
-
* #### Notes
|
|
124
|
-
* This will open the most recently used tab,
|
|
125
|
-
* or the first tab if there is no most recently used.
|
|
126
|
-
*/
|
|
127
|
-
expandRight(): void;
|
|
128
|
-
/**
|
|
129
|
-
* Close all widgets in the main area.
|
|
130
|
-
*/
|
|
131
|
-
closeAll(): void;
|
|
132
|
-
/**
|
|
133
|
-
* True if the given area is empty.
|
|
134
|
-
*/
|
|
135
|
-
isEmpty(area: ApplicationShell.Area): boolean;
|
|
136
|
-
/**
|
|
137
|
-
* Restore the layout state for the application shell.
|
|
138
|
-
*/
|
|
139
|
-
restoreLayout(layout: ApplicationShell.ILayout): void;
|
|
140
|
-
/**
|
|
141
|
-
* Save the dehydrated state of the application shell.
|
|
142
|
-
*/
|
|
143
|
-
saveLayout(): ApplicationShell.ILayout;
|
|
144
|
-
/**
|
|
145
|
-
* Returns the widgets for an application area.
|
|
146
|
-
*/
|
|
147
|
-
widgets(area: ApplicationShell.Area): IIterator<Widget>;
|
|
148
|
-
/**
|
|
149
|
-
* Handle `after-attach` messages for the application shell.
|
|
150
|
-
*/
|
|
151
|
-
protected onAfterAttach(msg: Message): void;
|
|
152
|
-
private _adjacentBar;
|
|
153
|
-
private _currentTabBar;
|
|
154
|
-
/**
|
|
155
|
-
* Handle a change to the dock area active widget.
|
|
156
|
-
*/
|
|
157
|
-
private _onActiveChanged;
|
|
158
|
-
/**
|
|
159
|
-
* Handle a change to the dock area current widget.
|
|
160
|
-
*/
|
|
161
|
-
private _onCurrentChanged;
|
|
162
|
-
/**
|
|
163
|
-
* Handle a change to the layout.
|
|
164
|
-
*/
|
|
165
|
-
private _onLayoutModified;
|
|
166
|
-
/**
|
|
167
|
-
* A message hook for child add/remove messages on the main area dock panel.
|
|
168
|
-
*/
|
|
169
|
-
private _dockChildHook;
|
|
170
|
-
private _activeChanged;
|
|
171
|
-
private _cachedLayout;
|
|
172
|
-
private _currentChanged;
|
|
173
|
-
private _dockPanel;
|
|
174
|
-
private _isRestored;
|
|
175
|
-
private _layoutModified;
|
|
176
|
-
private _leftHandler;
|
|
177
|
-
private _restored;
|
|
178
|
-
private _rightHandler;
|
|
179
|
-
private _tracker;
|
|
180
|
-
private _topPanel;
|
|
181
|
-
private _bottomPanel;
|
|
182
|
-
private _debouncer;
|
|
183
|
-
private _addOptionsCache;
|
|
184
|
-
private _sideOptionsCache;
|
|
185
|
-
}
|
|
186
|
-
/**
|
|
187
|
-
* The namespace for `ApplicationShell` class statics.
|
|
188
|
-
*/
|
|
189
|
-
export declare namespace ApplicationShell {
|
|
190
|
-
/**
|
|
191
|
-
* The areas of the application shell where widgets can reside.
|
|
192
|
-
*/
|
|
193
|
-
type Area = 'main' | 'top' | 'left' | 'right' | 'bottom';
|
|
194
|
-
/**
|
|
195
|
-
* The restorable description of an area within the main dock panel.
|
|
196
|
-
*/
|
|
197
|
-
type AreaConfig = DockLayout.AreaConfig;
|
|
198
|
-
/**
|
|
199
|
-
* An arguments object for the changed signals.
|
|
200
|
-
*/
|
|
201
|
-
type IChangedArgs = FocusTracker.IChangedArgs<Widget>;
|
|
202
|
-
/**
|
|
203
|
-
* A description of the application's user interface layout.
|
|
204
|
-
*/
|
|
205
|
-
interface ILayout {
|
|
206
|
-
/**
|
|
207
|
-
* Indicates whether fetched session restore data was actually retrieved
|
|
208
|
-
* from the state database or whether it is a fresh blank slate.
|
|
209
|
-
*
|
|
210
|
-
* #### Notes
|
|
211
|
-
* This attribute is only relevant when the layout data is retrieved via a
|
|
212
|
-
* `fetch` call. If it is set when being passed into `save`, it will be
|
|
213
|
-
* ignored.
|
|
214
|
-
*/
|
|
215
|
-
readonly fresh?: boolean;
|
|
216
|
-
/**
|
|
217
|
-
* The main area of the user interface.
|
|
218
|
-
*/
|
|
219
|
-
readonly mainArea: IMainArea | null;
|
|
220
|
-
/**
|
|
221
|
-
* The left area of the user interface.
|
|
222
|
-
*/
|
|
223
|
-
readonly leftArea: ISideArea | null;
|
|
224
|
-
/**
|
|
225
|
-
* The right area of the user interface.
|
|
226
|
-
*/
|
|
227
|
-
readonly rightArea: ISideArea | null;
|
|
228
|
-
}
|
|
229
|
-
/**
|
|
230
|
-
* The restorable description of the main application area.
|
|
231
|
-
*/
|
|
232
|
-
interface IMainArea {
|
|
233
|
-
/**
|
|
234
|
-
* The current widget that has application focus.
|
|
235
|
-
*/
|
|
236
|
-
readonly currentWidget: Widget | null;
|
|
237
|
-
/**
|
|
238
|
-
* The contents of the main application dock panel.
|
|
239
|
-
*/
|
|
240
|
-
readonly dock: DockLayout.ILayoutConfig | null;
|
|
241
|
-
/**
|
|
242
|
-
* The document mode (i.e., multiple/single) of the main dock panel.
|
|
243
|
-
*/
|
|
244
|
-
readonly mode: DockPanel.Mode | null;
|
|
245
|
-
}
|
|
246
|
-
/**
|
|
247
|
-
* The restorable description of a sidebar in the user interface.
|
|
248
|
-
*/
|
|
249
|
-
interface ISideArea {
|
|
250
|
-
/**
|
|
251
|
-
* A flag denoting whether the sidebar has been collapsed.
|
|
252
|
-
*/
|
|
253
|
-
readonly collapsed: boolean;
|
|
254
|
-
/**
|
|
255
|
-
* The current widget that has side area focus.
|
|
256
|
-
*/
|
|
257
|
-
readonly currentWidget: Widget | null;
|
|
258
|
-
/**
|
|
259
|
-
* The collection of widgets held by the sidebar.
|
|
260
|
-
*/
|
|
261
|
-
readonly widgets: Array<Widget> | null;
|
|
262
|
-
}
|
|
263
|
-
/**
|
|
264
|
-
* The options for adding a widget to a side area of the shell.
|
|
265
|
-
*/
|
|
266
|
-
interface ISideAreaOptions {
|
|
267
|
-
/**
|
|
268
|
-
* The rank order of the widget among its siblings.
|
|
269
|
-
*/
|
|
270
|
-
rank?: number;
|
|
271
|
-
}
|
|
272
|
-
/**
|
|
273
|
-
* The options for adding a widget to a side area of the shell.
|
|
274
|
-
*/
|
|
275
|
-
interface IMainAreaOptions extends DocumentRegistry.IOpenOptions {
|
|
276
|
-
}
|
|
277
|
-
}
|
|
1
|
+
import { IIterator } from '@phosphor/algorithm';
|
|
2
|
+
import { Message } from '@phosphor/messaging';
|
|
3
|
+
import { ISignal } from '@phosphor/signaling';
|
|
4
|
+
import { DockLayout, DockPanel, FocusTracker, Widget } from '@phosphor/widgets';
|
|
5
|
+
import { DocumentRegistry } from '@jupyterlab/docregistry';
|
|
6
|
+
/**
|
|
7
|
+
* The application shell for JupyterLab.
|
|
8
|
+
*/
|
|
9
|
+
export declare class ApplicationShell extends Widget {
|
|
10
|
+
/**
|
|
11
|
+
* Construct a new application shell.
|
|
12
|
+
*/
|
|
13
|
+
constructor();
|
|
14
|
+
/**
|
|
15
|
+
* A signal emitted when main area's active focus changes.
|
|
16
|
+
*/
|
|
17
|
+
readonly activeChanged: ISignal<this, ApplicationShell.IChangedArgs>;
|
|
18
|
+
/**
|
|
19
|
+
* The active widget in the shell's main area.
|
|
20
|
+
*/
|
|
21
|
+
readonly activeWidget: Widget | null;
|
|
22
|
+
/**
|
|
23
|
+
* A signal emitted when main area's current focus changes.
|
|
24
|
+
*/
|
|
25
|
+
readonly currentChanged: ISignal<this, ApplicationShell.IChangedArgs>;
|
|
26
|
+
/**
|
|
27
|
+
* The current widget in the shell's main area.
|
|
28
|
+
*/
|
|
29
|
+
readonly currentWidget: Widget | null;
|
|
30
|
+
/**
|
|
31
|
+
* A signal emitted when the main area's layout is modified.
|
|
32
|
+
*/
|
|
33
|
+
readonly layoutModified: ISignal<this, void>;
|
|
34
|
+
/**
|
|
35
|
+
* Whether the left area is collapsed.
|
|
36
|
+
*/
|
|
37
|
+
readonly leftCollapsed: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the left area is collapsed.
|
|
40
|
+
*/
|
|
41
|
+
readonly rightCollapsed: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Whether JupyterLab is in presentation mode with the `jp-mod-presentationMode` CSS class.
|
|
44
|
+
*/
|
|
45
|
+
/**
|
|
46
|
+
* Enable/disable presentation mode (`jp-mod-presentationMode` CSS class) with a boolean.
|
|
47
|
+
*/
|
|
48
|
+
presentationMode: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* The main dock area's user interface mode.
|
|
51
|
+
*/
|
|
52
|
+
mode: DockPanel.Mode;
|
|
53
|
+
/**
|
|
54
|
+
* Promise that resolves when state is first restored, returning layout
|
|
55
|
+
* description.
|
|
56
|
+
*/
|
|
57
|
+
readonly restored: Promise<ApplicationShell.ILayout>;
|
|
58
|
+
/**
|
|
59
|
+
* Activate a widget in its area.
|
|
60
|
+
*/
|
|
61
|
+
activateById(id: string): void;
|
|
62
|
+
activateNextTab(): void;
|
|
63
|
+
activatePreviousTab(): void;
|
|
64
|
+
/**
|
|
65
|
+
* Add a widget to the left content area.
|
|
66
|
+
*
|
|
67
|
+
* #### Notes
|
|
68
|
+
* Widgets must have a unique `id` property, which will be used as the DOM id.
|
|
69
|
+
*/
|
|
70
|
+
addToLeftArea(widget: Widget, options?: ApplicationShell.ISideAreaOptions): void;
|
|
71
|
+
/**
|
|
72
|
+
* Add a widget to the main content area.
|
|
73
|
+
*
|
|
74
|
+
* #### Notes
|
|
75
|
+
* Widgets must have a unique `id` property, which will be used as the DOM id.
|
|
76
|
+
* All widgets added to the main area should be disposed after removal
|
|
77
|
+
* (disposal before removal will remove the widget automatically).
|
|
78
|
+
*
|
|
79
|
+
* In the options, `ref` defaults to `null`, `mode` defaults to `'tab-after'`,
|
|
80
|
+
* and `activate` defaults to `true`.
|
|
81
|
+
*/
|
|
82
|
+
addToMainArea(widget: Widget, options?: ApplicationShell.IMainAreaOptions): void;
|
|
83
|
+
/**
|
|
84
|
+
* Add a widget to the right content area.
|
|
85
|
+
*
|
|
86
|
+
* #### Notes
|
|
87
|
+
* Widgets must have a unique `id` property, which will be used as the DOM id.
|
|
88
|
+
*/
|
|
89
|
+
addToRightArea(widget: Widget, options?: ApplicationShell.ISideAreaOptions): void;
|
|
90
|
+
/**
|
|
91
|
+
* Add a widget to the top content area.
|
|
92
|
+
*
|
|
93
|
+
* #### Notes
|
|
94
|
+
* Widgets must have a unique `id` property, which will be used as the DOM id.
|
|
95
|
+
*/
|
|
96
|
+
addToTopArea(widget: Widget, options?: ApplicationShell.ISideAreaOptions): void;
|
|
97
|
+
/**
|
|
98
|
+
* Add a widget to the bottom content area.
|
|
99
|
+
*
|
|
100
|
+
* #### Notes
|
|
101
|
+
* Widgets must have a unique `id` property, which will be used as the DOM id.
|
|
102
|
+
*/
|
|
103
|
+
addToBottomArea(widget: Widget, options?: ApplicationShell.ISideAreaOptions): void;
|
|
104
|
+
/**
|
|
105
|
+
* Collapse the left area.
|
|
106
|
+
*/
|
|
107
|
+
collapseLeft(): void;
|
|
108
|
+
/**
|
|
109
|
+
* Collapse the right area.
|
|
110
|
+
*/
|
|
111
|
+
collapseRight(): void;
|
|
112
|
+
/**
|
|
113
|
+
* Expand the left area.
|
|
114
|
+
*
|
|
115
|
+
* #### Notes
|
|
116
|
+
* This will open the most recently used tab,
|
|
117
|
+
* or the first tab if there is no most recently used.
|
|
118
|
+
*/
|
|
119
|
+
expandLeft(): void;
|
|
120
|
+
/**
|
|
121
|
+
* Expand the right area.
|
|
122
|
+
*
|
|
123
|
+
* #### Notes
|
|
124
|
+
* This will open the most recently used tab,
|
|
125
|
+
* or the first tab if there is no most recently used.
|
|
126
|
+
*/
|
|
127
|
+
expandRight(): void;
|
|
128
|
+
/**
|
|
129
|
+
* Close all widgets in the main area.
|
|
130
|
+
*/
|
|
131
|
+
closeAll(): void;
|
|
132
|
+
/**
|
|
133
|
+
* True if the given area is empty.
|
|
134
|
+
*/
|
|
135
|
+
isEmpty(area: ApplicationShell.Area): boolean;
|
|
136
|
+
/**
|
|
137
|
+
* Restore the layout state for the application shell.
|
|
138
|
+
*/
|
|
139
|
+
restoreLayout(layout: ApplicationShell.ILayout): void;
|
|
140
|
+
/**
|
|
141
|
+
* Save the dehydrated state of the application shell.
|
|
142
|
+
*/
|
|
143
|
+
saveLayout(): ApplicationShell.ILayout;
|
|
144
|
+
/**
|
|
145
|
+
* Returns the widgets for an application area.
|
|
146
|
+
*/
|
|
147
|
+
widgets(area: ApplicationShell.Area): IIterator<Widget>;
|
|
148
|
+
/**
|
|
149
|
+
* Handle `after-attach` messages for the application shell.
|
|
150
|
+
*/
|
|
151
|
+
protected onAfterAttach(msg: Message): void;
|
|
152
|
+
private _adjacentBar;
|
|
153
|
+
private _currentTabBar;
|
|
154
|
+
/**
|
|
155
|
+
* Handle a change to the dock area active widget.
|
|
156
|
+
*/
|
|
157
|
+
private _onActiveChanged;
|
|
158
|
+
/**
|
|
159
|
+
* Handle a change to the dock area current widget.
|
|
160
|
+
*/
|
|
161
|
+
private _onCurrentChanged;
|
|
162
|
+
/**
|
|
163
|
+
* Handle a change to the layout.
|
|
164
|
+
*/
|
|
165
|
+
private _onLayoutModified;
|
|
166
|
+
/**
|
|
167
|
+
* A message hook for child add/remove messages on the main area dock panel.
|
|
168
|
+
*/
|
|
169
|
+
private _dockChildHook;
|
|
170
|
+
private _activeChanged;
|
|
171
|
+
private _cachedLayout;
|
|
172
|
+
private _currentChanged;
|
|
173
|
+
private _dockPanel;
|
|
174
|
+
private _isRestored;
|
|
175
|
+
private _layoutModified;
|
|
176
|
+
private _leftHandler;
|
|
177
|
+
private _restored;
|
|
178
|
+
private _rightHandler;
|
|
179
|
+
private _tracker;
|
|
180
|
+
private _topPanel;
|
|
181
|
+
private _bottomPanel;
|
|
182
|
+
private _debouncer;
|
|
183
|
+
private _addOptionsCache;
|
|
184
|
+
private _sideOptionsCache;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* The namespace for `ApplicationShell` class statics.
|
|
188
|
+
*/
|
|
189
|
+
export declare namespace ApplicationShell {
|
|
190
|
+
/**
|
|
191
|
+
* The areas of the application shell where widgets can reside.
|
|
192
|
+
*/
|
|
193
|
+
type Area = 'main' | 'top' | 'left' | 'right' | 'bottom';
|
|
194
|
+
/**
|
|
195
|
+
* The restorable description of an area within the main dock panel.
|
|
196
|
+
*/
|
|
197
|
+
type AreaConfig = DockLayout.AreaConfig;
|
|
198
|
+
/**
|
|
199
|
+
* An arguments object for the changed signals.
|
|
200
|
+
*/
|
|
201
|
+
type IChangedArgs = FocusTracker.IChangedArgs<Widget>;
|
|
202
|
+
/**
|
|
203
|
+
* A description of the application's user interface layout.
|
|
204
|
+
*/
|
|
205
|
+
interface ILayout {
|
|
206
|
+
/**
|
|
207
|
+
* Indicates whether fetched session restore data was actually retrieved
|
|
208
|
+
* from the state database or whether it is a fresh blank slate.
|
|
209
|
+
*
|
|
210
|
+
* #### Notes
|
|
211
|
+
* This attribute is only relevant when the layout data is retrieved via a
|
|
212
|
+
* `fetch` call. If it is set when being passed into `save`, it will be
|
|
213
|
+
* ignored.
|
|
214
|
+
*/
|
|
215
|
+
readonly fresh?: boolean;
|
|
216
|
+
/**
|
|
217
|
+
* The main area of the user interface.
|
|
218
|
+
*/
|
|
219
|
+
readonly mainArea: IMainArea | null;
|
|
220
|
+
/**
|
|
221
|
+
* The left area of the user interface.
|
|
222
|
+
*/
|
|
223
|
+
readonly leftArea: ISideArea | null;
|
|
224
|
+
/**
|
|
225
|
+
* The right area of the user interface.
|
|
226
|
+
*/
|
|
227
|
+
readonly rightArea: ISideArea | null;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* The restorable description of the main application area.
|
|
231
|
+
*/
|
|
232
|
+
interface IMainArea {
|
|
233
|
+
/**
|
|
234
|
+
* The current widget that has application focus.
|
|
235
|
+
*/
|
|
236
|
+
readonly currentWidget: Widget | null;
|
|
237
|
+
/**
|
|
238
|
+
* The contents of the main application dock panel.
|
|
239
|
+
*/
|
|
240
|
+
readonly dock: DockLayout.ILayoutConfig | null;
|
|
241
|
+
/**
|
|
242
|
+
* The document mode (i.e., multiple/single) of the main dock panel.
|
|
243
|
+
*/
|
|
244
|
+
readonly mode: DockPanel.Mode | null;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* The restorable description of a sidebar in the user interface.
|
|
248
|
+
*/
|
|
249
|
+
interface ISideArea {
|
|
250
|
+
/**
|
|
251
|
+
* A flag denoting whether the sidebar has been collapsed.
|
|
252
|
+
*/
|
|
253
|
+
readonly collapsed: boolean;
|
|
254
|
+
/**
|
|
255
|
+
* The current widget that has side area focus.
|
|
256
|
+
*/
|
|
257
|
+
readonly currentWidget: Widget | null;
|
|
258
|
+
/**
|
|
259
|
+
* The collection of widgets held by the sidebar.
|
|
260
|
+
*/
|
|
261
|
+
readonly widgets: Array<Widget> | null;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* The options for adding a widget to a side area of the shell.
|
|
265
|
+
*/
|
|
266
|
+
interface ISideAreaOptions {
|
|
267
|
+
/**
|
|
268
|
+
* The rank order of the widget among its siblings.
|
|
269
|
+
*/
|
|
270
|
+
rank?: number;
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* The options for adding a widget to a side area of the shell.
|
|
274
|
+
*/
|
|
275
|
+
interface IMainAreaOptions extends DocumentRegistry.IOpenOptions {
|
|
276
|
+
}
|
|
277
|
+
}
|