@jupyterlab/apputils 1.0.0-alpha.8 → 1.0.0

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.
Files changed (59) hide show
  1. package/lib/clientsession.js +4 -3
  2. package/lib/clientsession.js.map +1 -0
  3. package/lib/clipboard.js +1 -0
  4. package/lib/clipboard.js.map +1 -0
  5. package/lib/collapse.js +1 -0
  6. package/lib/collapse.js.map +1 -0
  7. package/lib/commandlinker.js +1 -0
  8. package/lib/commandlinker.js.map +1 -0
  9. package/lib/commandpalette.js +1 -0
  10. package/lib/commandpalette.js.map +1 -0
  11. package/lib/dialog.d.ts +4 -15
  12. package/lib/dialog.js +31 -75
  13. package/lib/dialog.js.map +1 -0
  14. package/lib/domutils.js +1 -0
  15. package/lib/domutils.js.map +1 -0
  16. package/lib/hoverbox.js +1 -0
  17. package/lib/hoverbox.js.map +1 -0
  18. package/lib/iframe.js +1 -0
  19. package/lib/iframe.js.map +1 -0
  20. package/lib/index.d.ts +1 -2
  21. package/lib/index.js +2 -2
  22. package/lib/index.js.map +1 -0
  23. package/lib/inputdialog.d.ts +80 -27
  24. package/lib/inputdialog.js +96 -39
  25. package/lib/inputdialog.js.map +1 -0
  26. package/lib/mainareawidget.d.ts +4 -0
  27. package/lib/mainareawidget.js +8 -0
  28. package/lib/mainareawidget.js.map +1 -0
  29. package/lib/printing.js +1 -0
  30. package/lib/printing.js.map +1 -0
  31. package/lib/sanitizer.js +1 -0
  32. package/lib/sanitizer.js.map +1 -0
  33. package/lib/spinner.js +1 -0
  34. package/lib/spinner.js.map +1 -0
  35. package/lib/splash.js +1 -0
  36. package/lib/splash.js.map +1 -0
  37. package/lib/styling.js +1 -0
  38. package/lib/styling.js.map +1 -0
  39. package/lib/thememanager.js +1 -0
  40. package/lib/thememanager.js.map +1 -0
  41. package/lib/tokens.js +1 -0
  42. package/lib/tokens.js.map +1 -0
  43. package/lib/toolbar.js +6 -2
  44. package/lib/toolbar.js.map +1 -0
  45. package/lib/vdom.js +1 -0
  46. package/lib/vdom.js.map +1 -0
  47. package/lib/widgettracker.d.ts +249 -0
  48. package/lib/widgettracker.js +218 -0
  49. package/lib/widgettracker.js.map +1 -0
  50. package/lib/windowresolver.js +1 -0
  51. package/lib/windowresolver.js.map +1 -0
  52. package/package.json +20 -16
  53. package/style/base.css +16 -0
  54. package/style/commandpalette.css +11 -3
  55. package/style/dialog.css +14 -0
  56. package/style/index.css +6 -12
  57. package/style/styling.css +0 -1
  58. package/lib/instancetracker.d.ts +0 -302
  59. package/lib/instancetracker.js +0 -340
@@ -0,0 +1,249 @@
1
+ import { IRestorable } from '@jupyterlab/coreutils';
2
+ import { IDisposable } from '@phosphor/disposable';
3
+ import { ISignal } from '@phosphor/signaling';
4
+ import { Widget } from '@phosphor/widgets';
5
+ /**
6
+ * A tracker that tracks widgets.
7
+ *
8
+ * @typeparam T - The type of widget being tracked. Defaults to `Widget`.
9
+ */
10
+ export interface IWidgetTracker<T extends Widget = Widget> extends IDisposable {
11
+ /**
12
+ * A signal emitted when a widget is added.
13
+ */
14
+ readonly widgetAdded: ISignal<this, T>;
15
+ /**
16
+ * The current widget is the most recently focused or added widget.
17
+ *
18
+ * #### Notes
19
+ * It is the most recently focused widget, or the most recently added
20
+ * widget if no widget has taken focus.
21
+ */
22
+ readonly currentWidget: T | null;
23
+ /**
24
+ * A signal emitted when the current instance changes.
25
+ *
26
+ * #### Notes
27
+ * If the last instance being tracked is disposed, `null` will be emitted.
28
+ */
29
+ readonly currentChanged: ISignal<this, T | null>;
30
+ /**
31
+ * The number of instances held by the tracker.
32
+ */
33
+ readonly size: number;
34
+ /**
35
+ * A promise that is resolved when the widget tracker has been
36
+ * restored from a serialized state.
37
+ *
38
+ * #### Notes
39
+ * Most client code will not need to use this, since they can wait
40
+ * for the whole application to restore. However, if an extension
41
+ * wants to perform actions during the application restoration, but
42
+ * after the restoration of another widget tracker, they can use
43
+ * this promise.
44
+ */
45
+ readonly restored: Promise<void>;
46
+ /**
47
+ * A signal emitted when a widget is updated.
48
+ */
49
+ readonly widgetUpdated: ISignal<this, T>;
50
+ /**
51
+ * Find the first instance in the tracker that satisfies a filter function.
52
+ *
53
+ * @param - fn The filter function to call on each instance.
54
+ *
55
+ * #### Notes
56
+ * If nothing is found, the value returned is `undefined`.
57
+ */
58
+ find(fn: (obj: T) => boolean): T | undefined;
59
+ /**
60
+ * Iterate through each instance in the tracker.
61
+ *
62
+ * @param fn - The function to call on each instance.
63
+ */
64
+ forEach(fn: (obj: T) => void): void;
65
+ /**
66
+ * Filter the instances in the tracker based on a predicate.
67
+ *
68
+ * @param fn - The function by which to filter.
69
+ */
70
+ filter(fn: (obj: T) => boolean): T[];
71
+ /**
72
+ * Check if this tracker has the specified instance.
73
+ *
74
+ * @param obj - The object whose existence is being checked.
75
+ */
76
+ has(obj: Widget): boolean;
77
+ /**
78
+ * Inject an instance into the widget tracker without the tracker handling
79
+ * its restoration lifecycle.
80
+ *
81
+ * @param obj - The instance to inject into the tracker.
82
+ */
83
+ inject(obj: T): void;
84
+ }
85
+ /**
86
+ * A class that keeps track of widget instances on an Application shell.
87
+ *
88
+ * @typeparam T - The type of widget being tracked. Defaults to `Widget`.
89
+ *
90
+ * #### Notes
91
+ * The API surface area of this concrete implementation is substantially larger
92
+ * than the widget tracker interface it implements. The interface is intended
93
+ * for export by JupyterLab plugins that create widgets and have clients who may
94
+ * wish to keep track of newly created widgets. This class, however, can be used
95
+ * internally by plugins to restore state as well.
96
+ */
97
+ export declare class WidgetTracker<T extends Widget = Widget> implements IWidgetTracker<T>, IRestorable<T> {
98
+ /**
99
+ * Create a new widget tracker.
100
+ *
101
+ * @param options - The instantiation options for a widget tracker.
102
+ */
103
+ constructor(options: WidgetTracker.IOptions);
104
+ /**
105
+ * A namespace for all tracked widgets, (e.g., `notebook`).
106
+ */
107
+ readonly namespace: string;
108
+ /**
109
+ * A signal emitted when the current widget changes.
110
+ */
111
+ readonly currentChanged: ISignal<this, T | null>;
112
+ /**
113
+ * The current widget is the most recently focused or added widget.
114
+ *
115
+ * #### Notes
116
+ * It is the most recently focused widget, or the most recently added
117
+ * widget if no widget has taken focus.
118
+ */
119
+ readonly currentWidget: T | null;
120
+ /**
121
+ * A promise resolved when the tracker has been restored.
122
+ */
123
+ readonly restored: Promise<void>;
124
+ /**
125
+ * The number of widgets held by the tracker.
126
+ */
127
+ readonly size: number;
128
+ /**
129
+ * A signal emitted when a widget is added.
130
+ *
131
+ * #### Notes
132
+ * This signal will only fire when a widget is added to the tracker. It will
133
+ * not fire if a widget is injected into the tracker.
134
+ */
135
+ readonly widgetAdded: ISignal<this, T>;
136
+ /**
137
+ * A signal emitted when a widget is updated.
138
+ */
139
+ readonly widgetUpdated: ISignal<this, T>;
140
+ /**
141
+ * Add a new widget to the tracker.
142
+ *
143
+ * @param widget - The widget being added.
144
+ *
145
+ * #### Notes
146
+ * The widget passed into the tracker is added synchronously; its existence in
147
+ * the tracker can be checked with the `has()` method. The promise this method
148
+ * returns resolves after the widget has been added and saved to an underlying
149
+ * restoration connector, if one is available.
150
+ */
151
+ add(widget: T): Promise<void>;
152
+ /**
153
+ * Test whether the tracker is disposed.
154
+ */
155
+ readonly isDisposed: boolean;
156
+ /**
157
+ * Dispose of the resources held by the tracker.
158
+ */
159
+ dispose(): void;
160
+ /**
161
+ * Find the first widget in the tracker that satisfies a filter function.
162
+ *
163
+ * @param - fn The filter function to call on each widget.
164
+ *
165
+ * #### Notes
166
+ * If no widget is found, the value returned is `undefined`.
167
+ */
168
+ find(fn: (widget: T) => boolean): T | undefined;
169
+ /**
170
+ * Iterate through each widget in the tracker.
171
+ *
172
+ * @param fn - The function to call on each widget.
173
+ */
174
+ forEach(fn: (widget: T) => void): void;
175
+ /**
176
+ * Filter the widgets in the tracker based on a predicate.
177
+ *
178
+ * @param fn - The function by which to filter.
179
+ */
180
+ filter(fn: (widget: T) => boolean): T[];
181
+ /**
182
+ * Inject a foreign widget into the widget tracker.
183
+ *
184
+ * @param widget - The widget to inject into the tracker.
185
+ *
186
+ * #### Notes
187
+ * Injected widgets will not have their state saved by the tracker.
188
+ *
189
+ * The primary use case for widget injection is for a plugin that offers a
190
+ * sub-class of an extant plugin to have its instances share the same commands
191
+ * as the parent plugin (since most relevant commands will use the
192
+ * `currentWidget` of the parent plugin's widget tracker). In this situation,
193
+ * the sub-class plugin may well have its own widget tracker for layout and
194
+ * state restoration in addition to injecting its widgets into the parent
195
+ * plugin's widget tracker.
196
+ */
197
+ inject(widget: T): Promise<void>;
198
+ /**
199
+ * Check if this tracker has the specified widget.
200
+ *
201
+ * @param widget - The widget whose existence is being checked.
202
+ */
203
+ has(widget: Widget): boolean;
204
+ /**
205
+ * Restore the widgets in this tracker's namespace.
206
+ *
207
+ * @param options - The configuration options that describe restoration.
208
+ *
209
+ * @returns A promise that resolves when restoration has completed.
210
+ *
211
+ * #### Notes
212
+ * This function should not typically be invoked by client code.
213
+ * Its primary use case is to be invoked by a restorer.
214
+ */
215
+ restore(options: IRestorable.IOptions<T>): Promise<any>;
216
+ /**
217
+ * Save the restore data for a given widget.
218
+ *
219
+ * @param widget - The widget being saved.
220
+ */
221
+ save(widget: T): Promise<void>;
222
+ /**
223
+ * Handle the current change event.
224
+ *
225
+ * #### Notes
226
+ * The default implementation is a no-op.
227
+ */
228
+ protected onCurrentChanged(value: T | null): void;
229
+ private _currentChanged;
230
+ private _focusTracker;
231
+ private _pool;
232
+ private _isDisposed;
233
+ private _widgetAdded;
234
+ private _widgetUpdated;
235
+ }
236
+ /**
237
+ * A namespace for `WidgetTracker` statics.
238
+ */
239
+ export declare namespace WidgetTracker {
240
+ /**
241
+ * The instantiation options for a widget tracker.
242
+ */
243
+ interface IOptions {
244
+ /**
245
+ * A namespace for all tracked widgets, (e.g., `notebook`).
246
+ */
247
+ namespace: string;
248
+ }
249
+ }
@@ -0,0 +1,218 @@
1
+ // Copyright (c) Jupyter Development Team.
2
+ // Distributed under the terms of the Modified BSD License.
3
+ import { RestorablePool } from '@jupyterlab/coreutils';
4
+ import { Signal } from '@phosphor/signaling';
5
+ import { FocusTracker } from '@phosphor/widgets';
6
+ /**
7
+ * A class that keeps track of widget instances on an Application shell.
8
+ *
9
+ * @typeparam T - The type of widget being tracked. Defaults to `Widget`.
10
+ *
11
+ * #### Notes
12
+ * The API surface area of this concrete implementation is substantially larger
13
+ * than the widget tracker interface it implements. The interface is intended
14
+ * for export by JupyterLab plugins that create widgets and have clients who may
15
+ * wish to keep track of newly created widgets. This class, however, can be used
16
+ * internally by plugins to restore state as well.
17
+ */
18
+ export class WidgetTracker {
19
+ /**
20
+ * Create a new widget tracker.
21
+ *
22
+ * @param options - The instantiation options for a widget tracker.
23
+ */
24
+ constructor(options) {
25
+ this._currentChanged = new Signal(this);
26
+ this._isDisposed = false;
27
+ this._widgetAdded = new Signal(this);
28
+ this._widgetUpdated = new Signal(this);
29
+ const focus = (this._focusTracker = new FocusTracker());
30
+ const pool = (this._pool = new RestorablePool(options));
31
+ this.namespace = options.namespace;
32
+ focus.currentChanged.connect((_, current) => {
33
+ if (current.newValue !== this.currentWidget) {
34
+ pool.current = current.newValue;
35
+ }
36
+ }, this);
37
+ pool.added.connect((_, widget) => {
38
+ this._widgetAdded.emit(widget);
39
+ }, this);
40
+ pool.currentChanged.connect((_, widget) => {
41
+ // If the pool's current reference is `null` but the focus tracker has a
42
+ // current widget, update the pool to match the focus tracker.
43
+ if (widget === null && focus.currentWidget) {
44
+ pool.current = focus.currentWidget;
45
+ return;
46
+ }
47
+ this.onCurrentChanged(widget);
48
+ this._currentChanged.emit(widget);
49
+ }, this);
50
+ pool.updated.connect((_, widget) => {
51
+ this._widgetUpdated.emit(widget);
52
+ }, this);
53
+ }
54
+ /**
55
+ * A signal emitted when the current widget changes.
56
+ */
57
+ get currentChanged() {
58
+ return this._currentChanged;
59
+ }
60
+ /**
61
+ * The current widget is the most recently focused or added widget.
62
+ *
63
+ * #### Notes
64
+ * It is the most recently focused widget, or the most recently added
65
+ * widget if no widget has taken focus.
66
+ */
67
+ get currentWidget() {
68
+ return this._pool.current || null;
69
+ }
70
+ /**
71
+ * A promise resolved when the tracker has been restored.
72
+ */
73
+ get restored() {
74
+ return this._pool.restored;
75
+ }
76
+ /**
77
+ * The number of widgets held by the tracker.
78
+ */
79
+ get size() {
80
+ return this._pool.size;
81
+ }
82
+ /**
83
+ * A signal emitted when a widget is added.
84
+ *
85
+ * #### Notes
86
+ * This signal will only fire when a widget is added to the tracker. It will
87
+ * not fire if a widget is injected into the tracker.
88
+ */
89
+ get widgetAdded() {
90
+ return this._widgetAdded;
91
+ }
92
+ /**
93
+ * A signal emitted when a widget is updated.
94
+ */
95
+ get widgetUpdated() {
96
+ return this._widgetUpdated;
97
+ }
98
+ /**
99
+ * Add a new widget to the tracker.
100
+ *
101
+ * @param widget - The widget being added.
102
+ *
103
+ * #### Notes
104
+ * The widget passed into the tracker is added synchronously; its existence in
105
+ * the tracker can be checked with the `has()` method. The promise this method
106
+ * returns resolves after the widget has been added and saved to an underlying
107
+ * restoration connector, if one is available.
108
+ */
109
+ async add(widget) {
110
+ this._focusTracker.add(widget);
111
+ await this._pool.add(widget);
112
+ this._pool.current = widget;
113
+ }
114
+ /**
115
+ * Test whether the tracker is disposed.
116
+ */
117
+ get isDisposed() {
118
+ return this._isDisposed;
119
+ }
120
+ /**
121
+ * Dispose of the resources held by the tracker.
122
+ */
123
+ dispose() {
124
+ if (this.isDisposed) {
125
+ return;
126
+ }
127
+ this._isDisposed = true;
128
+ this._pool.dispose();
129
+ this._focusTracker.dispose();
130
+ Signal.clearData(this);
131
+ }
132
+ /**
133
+ * Find the first widget in the tracker that satisfies a filter function.
134
+ *
135
+ * @param - fn The filter function to call on each widget.
136
+ *
137
+ * #### Notes
138
+ * If no widget is found, the value returned is `undefined`.
139
+ */
140
+ find(fn) {
141
+ return this._pool.find(fn);
142
+ }
143
+ /**
144
+ * Iterate through each widget in the tracker.
145
+ *
146
+ * @param fn - The function to call on each widget.
147
+ */
148
+ forEach(fn) {
149
+ return this._pool.forEach(fn);
150
+ }
151
+ /**
152
+ * Filter the widgets in the tracker based on a predicate.
153
+ *
154
+ * @param fn - The function by which to filter.
155
+ */
156
+ filter(fn) {
157
+ return this._pool.filter(fn);
158
+ }
159
+ /**
160
+ * Inject a foreign widget into the widget tracker.
161
+ *
162
+ * @param widget - The widget to inject into the tracker.
163
+ *
164
+ * #### Notes
165
+ * Injected widgets will not have their state saved by the tracker.
166
+ *
167
+ * The primary use case for widget injection is for a plugin that offers a
168
+ * sub-class of an extant plugin to have its instances share the same commands
169
+ * as the parent plugin (since most relevant commands will use the
170
+ * `currentWidget` of the parent plugin's widget tracker). In this situation,
171
+ * the sub-class plugin may well have its own widget tracker for layout and
172
+ * state restoration in addition to injecting its widgets into the parent
173
+ * plugin's widget tracker.
174
+ */
175
+ inject(widget) {
176
+ return this._pool.inject(widget);
177
+ }
178
+ /**
179
+ * Check if this tracker has the specified widget.
180
+ *
181
+ * @param widget - The widget whose existence is being checked.
182
+ */
183
+ has(widget) {
184
+ return this._pool.has(widget);
185
+ }
186
+ /**
187
+ * Restore the widgets in this tracker's namespace.
188
+ *
189
+ * @param options - The configuration options that describe restoration.
190
+ *
191
+ * @returns A promise that resolves when restoration has completed.
192
+ *
193
+ * #### Notes
194
+ * This function should not typically be invoked by client code.
195
+ * Its primary use case is to be invoked by a restorer.
196
+ */
197
+ async restore(options) {
198
+ return this._pool.restore(options);
199
+ }
200
+ /**
201
+ * Save the restore data for a given widget.
202
+ *
203
+ * @param widget - The widget being saved.
204
+ */
205
+ async save(widget) {
206
+ return this._pool.save(widget);
207
+ }
208
+ /**
209
+ * Handle the current change event.
210
+ *
211
+ * #### Notes
212
+ * The default implementation is a no-op.
213
+ */
214
+ onCurrentChanged(value) {
215
+ /* no-op */
216
+ }
217
+ }
218
+ //# sourceMappingURL=widgettracker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widgettracker.js","sourceRoot":"","sources":["../src/widgettracker.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC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B,CAAC,KAAe;QACxC,WAAW;IACb,CAAC;CAQF"}
@@ -168,3 +168,4 @@ var Private;
168
168
  initialize();
169
169
  })();
170
170
  })(Private || (Private = {}));
171
+ //# sourceMappingURL=windowresolver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"windowresolver.js","sourceRoot":"","sources":["../src/windowresolver.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE7D,oBAAoB;AACpB;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,KAAK,CACtC,sCAAsC,CACvC,CAAC;AAaF;;GAEG;AACH,MAAM,OAAO,cAAc;IAA3B;QA0BU,UAAK,GAAkB,IAAI,CAAC;IACtC,CAAC;IA1BC;;OAEG;IACH,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,SAAiB;QACvB,OAAO,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;YAC5C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QACpB,CAAC,CAAC,CAAC;IACL,CAAC;CAGF;AAED;;GAEG;AACH,IAAU,OAAO,CA0JhB;AA1JD,WAAU,OAAO;IACf;;OAEG;IACH,MAAM,MAAM,GAAG,+BAA+B,CAAC;IAE/C;;OAEG;IACH,MAAM,MAAM,GAAG,GAAG,MAAM,SAAS,CAAC;IAElC;;;;;;;;OAQG;IACH,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC;IAEtD;;OAEG;IACH,MAAM,MAAM,GAAG,GAAG,MAAM,SAAS,CAAC;IAElC;;OAEG;IACH,IAAI,SAAS,GAAkB,IAAI,CAAC;IAEpC;;OAEG;IAC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2
  "name": "@jupyterlab/apputils",
3
- "version": "1.0.0-alpha.8",
3
+ "version": "1.0.0",
4
4
  "description": "JupyterLab - Application Utilities",
5
5
  "homepage": "https://github.com/jupyterlab/jupyterlab",
6
6
  "bugs": {
@@ -18,8 +18,12 @@
18
18
  "lib/*.js",
19
19
  "style/*.css"
20
20
  ],
21
+ "sideEffects": [
22
+ "style/*.css"
23
+ ],
21
24
  "main": "lib/index.js",
22
25
  "types": "lib/index.d.ts",
26
+ "style": "style/index.css",
23
27
  "directories": {
24
28
  "lib": "lib/"
25
29
  },
@@ -31,19 +35,19 @@
31
35
  "watch": "tsc -b --watch"
32
36
  },
33
37
  "dependencies": {
34
- "@jupyterlab/coreutils": "^3.0.0-alpha.8",
35
- "@jupyterlab/services": "^4.0.0-alpha.8",
36
- "@jupyterlab/ui-components": "^1.0.0-alpha.8",
37
- "@phosphor/algorithm": "^1.1.2",
38
- "@phosphor/commands": "^1.6.1",
39
- "@phosphor/coreutils": "^1.3.0",
40
- "@phosphor/disposable": "^1.1.2",
41
- "@phosphor/domutils": "^1.1.2",
42
- "@phosphor/messaging": "^1.2.2",
43
- "@phosphor/properties": "^1.1.2",
44
- "@phosphor/signaling": "^1.2.2",
45
- "@phosphor/virtualdom": "^1.1.2",
46
- "@phosphor/widgets": "^1.6.0",
38
+ "@jupyterlab/coreutils": "^3.0.0",
39
+ "@jupyterlab/services": "^4.0.0",
40
+ "@jupyterlab/ui-components": "^1.0.0",
41
+ "@phosphor/algorithm": "^1.1.3",
42
+ "@phosphor/commands": "^1.6.3",
43
+ "@phosphor/coreutils": "^1.3.1",
44
+ "@phosphor/disposable": "^1.2.0",
45
+ "@phosphor/domutils": "^1.1.3",
46
+ "@phosphor/messaging": "^1.2.3",
47
+ "@phosphor/properties": "^1.1.3",
48
+ "@phosphor/signaling": "^1.2.3",
49
+ "@phosphor/virtualdom": "^1.1.3",
50
+ "@phosphor/widgets": "^1.8.0",
47
51
  "@types/react": "~16.8.18",
48
52
  "react": "~16.8.4",
49
53
  "react-dom": "~16.8.4",
@@ -54,10 +58,10 @@
54
58
  "@types/sanitize-html": "^1.18.3",
55
59
  "rimraf": "~2.6.2",
56
60
  "typedoc": "^0.14.2",
57
- "typescript": "~3.4.3"
61
+ "typescript": "~3.5.1"
58
62
  },
59
63
  "publishConfig": {
60
64
  "access": "public"
61
65
  },
62
- "gitHead": "ac27c477b689240fe0e3e11ff2e3b4984687a899"
66
+ "gitHead": "382da7c3efb2696a0ae26a4fea27aeeead99fbd9"
63
67
  }
package/style/base.css ADDED
@@ -0,0 +1,16 @@
1
+ /*-----------------------------------------------------------------------------
2
+ | Copyright (c) 2014-2017, Jupyter Development Team.
3
+ |
4
+ | Distributed under the terms of the Modified BSD License.
5
+ |----------------------------------------------------------------------------*/
6
+
7
+ @import './collapse.css';
8
+ @import './commandpalette.css';
9
+ @import './dialog.css';
10
+ @import './hoverbox.css';
11
+ @import './iframe.css';
12
+ @import './mainareawidget.css';
13
+ @import './materialcolors.css';
14
+ @import './spinner.css';
15
+ @import './styling.css';
16
+ @import './toolbar.css';
@@ -105,10 +105,18 @@
105
105
  background: var(--jp-layout-color2);
106
106
  }
107
107
 
108
- .p-CommandPalette-header:hover::before {
109
- content: '\2026'; /* ellipsis */
108
+ .p-CommandPalette-header:hover::after {
109
+ content: '';
110
+ min-width: 12px;
111
+ min-height: 12px;
112
+ background-size: 14px;
113
+ margin-right: 16px;
110
114
  float: right;
111
- margin-right: 4px;
115
+ display: inline-block;
116
+ vertical-align: middle;
117
+ background-repeat: no-repeat;
118
+ background-position: center;
119
+ background-image: var(--jp-icon-filter-list);
112
120
  }
113
121
 
114
122
  .p-CommandPalette-header > mark {
package/style/dialog.css CHANGED
@@ -42,6 +42,20 @@
42
42
  color: var(--jp-ui-font-color1);
43
43
  }
44
44
 
45
+ .jp-Dialog-button {
46
+ overflow: visible;
47
+ }
48
+
49
+ button.jp-Dialog-button:focus {
50
+ outline: 1px solid var(--jp-brand-color1);
51
+ outline-offset: 4px;
52
+ -moz-outline-radius: 0px;
53
+ }
54
+
55
+ button.jp-Dialog-button:focus::-moz-focus-inner {
56
+ border: 0;
57
+ }
58
+
45
59
  .jp-Dialog-header {
46
60
  flex: 0 0 auto;
47
61
  padding-bottom: 12px;
package/style/index.css CHANGED
@@ -1,16 +1,10 @@
1
1
  /*-----------------------------------------------------------------------------
2
- | Copyright (c) 2014-2017, Jupyter Development Team.
3
- |
2
+ | Copyright (c) Jupyter Development Team.
4
3
  | Distributed under the terms of the Modified BSD License.
5
4
  |----------------------------------------------------------------------------*/
6
5
 
7
- @import './collapse.css';
8
- @import './commandpalette.css';
9
- @import './dialog.css';
10
- @import './hoverbox.css';
11
- @import './iframe.css';
12
- @import './mainareawidget.css';
13
- @import './materialcolors.css';
14
- @import './spinner.css';
15
- @import './styling.css';
16
- @import './toolbar.css';
6
+ /* This file was auto-generated by ensurePackage() in @jupyterlab/buildutils */
7
+ @import url('~@jupyterlab/ui-components/style/index.css');
8
+ @import url('~@phosphor/widgets/style/index.css');
9
+
10
+ @import url('./base.css');
package/style/styling.css CHANGED
@@ -9,7 +9,6 @@ button.jp-mod-styled {
9
9
  color: var(--jp-ui-font-color0);
10
10
  border: none;
11
11
  box-sizing: border-box;
12
- text-transform: uppercase;
13
12
  text-align: center;
14
13
  line-height: 32px;
15
14
  height: 32px;