@jupyterlab/apputils 4.0.0-alpha.4 → 4.0.0-alpha.5
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.d.ts +4 -4
- package/lib/index.js +4 -4
- package/lib/index.js.map +1 -1
- package/lib/kernelstatuses.d.ts +74 -2
- package/lib/kernelstatuses.js +141 -2
- package/lib/kernelstatuses.js.map +1 -1
- package/lib/runningSessions.d.ts +72 -0
- package/lib/runningSessions.js +119 -0
- package/lib/runningSessions.js.map +1 -0
- package/lib/sanitizer.js +0 -2
- package/lib/sanitizer.js.map +1 -1
- package/lib/sessioncontext.d.ts +1 -1
- package/lib/sessioncontext.js +37 -18
- package/lib/sessioncontext.js.map +1 -1
- package/lib/thememanager.js +5 -0
- package/lib/thememanager.js.map +1 -1
- package/lib/tokens.d.ts +13 -0
- package/lib/tokens.js +1 -6
- package/lib/tokens.js.map +1 -1
- package/lib/toolbar/factory.d.ts +2 -1
- package/lib/toolbar/factory.js +67 -67
- package/lib/toolbar/factory.js.map +1 -1
- package/package.json +14 -14
- package/style/base.css +0 -1
- package/style/commandpalette.css +7 -10
- package/style/dialog.css +7 -6
- package/style/index.css +1 -0
- package/style/index.js +1 -0
- package/style/materialcolors.css +3 -21
- package/lib/hoverbox.d.ts +0 -82
- package/lib/hoverbox.js +0 -100
- package/lib/hoverbox.js.map +0 -1
- package/style/hoverbox.css +0 -13
package/lib/toolbar/factory.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ObservableList } from '@jupyterlab/observables';
|
|
2
2
|
import { SettingRegistry } from '@jupyterlab/settingregistry';
|
|
3
|
-
import {
|
|
3
|
+
import { toArray } from '@lumino/algorithm';
|
|
4
4
|
import { JSONExt } from '@lumino/coreutils';
|
|
5
5
|
import { Dialog, showDialog } from '../dialog';
|
|
6
6
|
/**
|
|
@@ -29,8 +29,11 @@ async function displayInformation(trans) {
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* Set the toolbar definition by accumulating all settings definition.
|
|
33
33
|
*
|
|
34
|
+
* The list will be populated only with the enabled items.
|
|
35
|
+
*
|
|
36
|
+
* @param toolbarItems Observable list to populate
|
|
34
37
|
* @param registry Application settings registry
|
|
35
38
|
* @param factoryName Widget factory name that needs a toolbar
|
|
36
39
|
* @param pluginId Settings plugin id
|
|
@@ -38,7 +41,7 @@ async function displayInformation(trans) {
|
|
|
38
41
|
* @param propertyId Property holding the toolbar definition in the settings; default 'toolbar'
|
|
39
42
|
* @returns List of toolbar items
|
|
40
43
|
*/
|
|
41
|
-
async function
|
|
44
|
+
async function setToolbarItems(toolbarItems, registry, factoryName, pluginId, translator, propertyId = 'toolbar') {
|
|
42
45
|
var _a;
|
|
43
46
|
const trans = translator.load('jupyterlab');
|
|
44
47
|
let canonical;
|
|
@@ -64,9 +67,7 @@ async function getToolbarItems(registry, factoryName, pluginId, translator, prop
|
|
|
64
67
|
// Apply default value as last step to take into account overrides.json
|
|
65
68
|
// The standard default being [] as the plugin must use `jupyter.lab.toolbars.<factory>`
|
|
66
69
|
// to define their default value.
|
|
67
|
-
schema.properties[propertyId].default = SettingRegistry.reconcileToolbarItems(pluginDefaults, schema.properties[propertyId].default, true)
|
|
68
|
-
// flatten one level
|
|
69
|
-
.sort((a, b) => {
|
|
70
|
+
schema.properties[propertyId].default = SettingRegistry.reconcileToolbarItems(pluginDefaults, schema.properties[propertyId].default, true).sort((a, b) => {
|
|
70
71
|
var _a, _b;
|
|
71
72
|
return ((_a = a.rank) !== null && _a !== void 0 ? _a : DEFAULT_TOOLBAR_ITEM_RANK) -
|
|
72
73
|
((_b = b.rank) !== null && _b !== void 0 ? _b : DEFAULT_TOOLBAR_ITEM_RANK);
|
|
@@ -88,8 +89,11 @@ async function getToolbarItems(registry, factoryName, pluginId, translator, prop
|
|
|
88
89
|
// Overrides the value with using the aggregated default for the toolbar property
|
|
89
90
|
user[propertyId] =
|
|
90
91
|
(_d = plugin.data.user[propertyId]) !== null && _d !== void 0 ? _d : [];
|
|
91
|
-
composite[propertyId] =
|
|
92
|
-
|
|
92
|
+
composite[propertyId] = ((_e = SettingRegistry.reconcileToolbarItems(defaults, user[propertyId], false)) !== null && _e !== void 0 ? _e : []).sort((a, b) => {
|
|
93
|
+
var _a, _b;
|
|
94
|
+
return ((_a = a.rank) !== null && _a !== void 0 ? _a : DEFAULT_TOOLBAR_ITEM_RANK) -
|
|
95
|
+
((_b = b.rank) !== null && _b !== void 0 ? _b : DEFAULT_TOOLBAR_ITEM_RANK);
|
|
96
|
+
});
|
|
93
97
|
plugin.data = { composite, user };
|
|
94
98
|
return plugin;
|
|
95
99
|
},
|
|
@@ -112,19 +116,11 @@ async function getToolbarItems(registry, factoryName, pluginId, translator, prop
|
|
|
112
116
|
// preloaded all initial plugins.
|
|
113
117
|
canonical = null;
|
|
114
118
|
const settings = await registry.load(pluginId);
|
|
115
|
-
const toolbarItems = new ObservableList({
|
|
116
|
-
values: (_a = JSONExt.deepCopy(settings.composite[propertyId])) !== null && _a !== void 0 ? _a : [],
|
|
117
|
-
itemCmp: (a, b) => JSONExt.deepEqual(a, b)
|
|
118
|
-
});
|
|
119
119
|
// React to customization by the user
|
|
120
120
|
settings.changed.connect(() => {
|
|
121
121
|
var _a;
|
|
122
|
-
// As extension may change the toolbar through API,
|
|
123
|
-
// prompt the user to reload if the toolbar definition has been updated.
|
|
124
122
|
const newItems = (_a = settings.composite[propertyId]) !== null && _a !== void 0 ? _a : [];
|
|
125
|
-
|
|
126
|
-
void displayInformation(trans);
|
|
127
|
-
}
|
|
123
|
+
transferSettings(newItems);
|
|
128
124
|
});
|
|
129
125
|
// React to plugin changes
|
|
130
126
|
registry.pluginChanged.connect(async (sender, plugin) => {
|
|
@@ -145,22 +141,25 @@ async function getToolbarItems(registry, factoryName, pluginId, translator, prop
|
|
|
145
141
|
else {
|
|
146
142
|
// The plugin was not yet loaded => update the toolbar items list
|
|
147
143
|
loaded[plugin] = JSONExt.deepCopy(newItems);
|
|
148
|
-
const newList = (_d = SettingRegistry.reconcileToolbarItems(toArray(toolbarItems), newItems, false)) !== null && _d !== void 0 ? _d : []
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
if (index < 0) {
|
|
153
|
-
toolbarItems.push(item);
|
|
154
|
-
}
|
|
155
|
-
else {
|
|
156
|
-
toolbarItems.set(index, item);
|
|
157
|
-
}
|
|
144
|
+
const newList = ((_d = SettingRegistry.reconcileToolbarItems(toArray(toolbarItems), newItems, false)) !== null && _d !== void 0 ? _d : []).sort((a, b) => {
|
|
145
|
+
var _a, _b;
|
|
146
|
+
return ((_a = a.rank) !== null && _a !== void 0 ? _a : DEFAULT_TOOLBAR_ITEM_RANK) -
|
|
147
|
+
((_b = b.rank) !== null && _b !== void 0 ? _b : DEFAULT_TOOLBAR_ITEM_RANK);
|
|
158
148
|
});
|
|
149
|
+
transferSettings(newList);
|
|
159
150
|
}
|
|
160
151
|
}
|
|
161
152
|
}
|
|
162
153
|
});
|
|
163
|
-
|
|
154
|
+
const transferSettings = (newItems) => {
|
|
155
|
+
// This is not optimal but safer because a toolbar item with the same
|
|
156
|
+
// name cannot be inserted (it will be a no-op). But that could happen
|
|
157
|
+
// if the settings are changing the items order.
|
|
158
|
+
toolbarItems.clear();
|
|
159
|
+
toolbarItems.pushAll(newItems.filter(item => !item.disabled));
|
|
160
|
+
};
|
|
161
|
+
// Initialize the toolbar
|
|
162
|
+
transferSettings((_a = settings.composite[propertyId]) !== null && _a !== void 0 ? _a : []);
|
|
164
163
|
}
|
|
165
164
|
/**
|
|
166
165
|
* Create the toolbar factory for a given container widget based
|
|
@@ -175,48 +174,49 @@ async function getToolbarItems(registry, factoryName, pluginId, translator, prop
|
|
|
175
174
|
* @returns List of toolbar widgets
|
|
176
175
|
*/
|
|
177
176
|
export function createToolbarFactory(toolbarRegistry, settingsRegistry, factoryName, pluginId, translator, propertyId = 'toolbar') {
|
|
178
|
-
const items =
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
switch (change.type) {
|
|
182
|
-
case 'move':
|
|
183
|
-
break;
|
|
184
|
-
case 'add':
|
|
185
|
-
case 'remove':
|
|
186
|
-
case 'set':
|
|
187
|
-
items.length = 0;
|
|
188
|
-
items.push(...toArray(list)
|
|
189
|
-
.filter(item => !item.disabled)
|
|
190
|
-
.sort((a, b) => {
|
|
191
|
-
var _a, _b;
|
|
192
|
-
return ((_a = a.rank) !== null && _a !== void 0 ? _a : DEFAULT_TOOLBAR_ITEM_RANK) -
|
|
193
|
-
((_b = b.rank) !== null && _b !== void 0 ? _b : DEFAULT_TOOLBAR_ITEM_RANK);
|
|
194
|
-
}));
|
|
195
|
-
break;
|
|
196
|
-
}
|
|
197
|
-
};
|
|
177
|
+
const items = new ObservableList({
|
|
178
|
+
itemCmp: (a, b) => JSONExt.deepEqual(a, b)
|
|
179
|
+
});
|
|
198
180
|
// Get toolbar definition from the settings
|
|
199
|
-
|
|
200
|
-
.then(candidates => {
|
|
201
|
-
rawItems = candidates;
|
|
202
|
-
rawItems.changed.connect(transfer);
|
|
203
|
-
// Force initialization of items
|
|
204
|
-
transfer(rawItems, {
|
|
205
|
-
type: 'add',
|
|
206
|
-
newIndex: 0,
|
|
207
|
-
newValues: [],
|
|
208
|
-
oldIndex: 0,
|
|
209
|
-
oldValues: []
|
|
210
|
-
});
|
|
211
|
-
})
|
|
212
|
-
.catch(reason => {
|
|
181
|
+
setToolbarItems(items, settingsRegistry, factoryName, pluginId, translator, propertyId).catch(reason => {
|
|
213
182
|
console.error(`Failed to load toolbar items for factory ${factoryName} from ${pluginId}`, reason);
|
|
214
183
|
});
|
|
215
|
-
return (widget) =>
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
184
|
+
return (widget) => {
|
|
185
|
+
const updateToolbar = (list, change) => {
|
|
186
|
+
switch (change.type) {
|
|
187
|
+
case 'move':
|
|
188
|
+
toolbar.move(change.oldIndex, change.newIndex);
|
|
189
|
+
break;
|
|
190
|
+
case 'add':
|
|
191
|
+
change.newValues.forEach(item => toolbar.push({
|
|
192
|
+
name: item.name,
|
|
193
|
+
widget: toolbarRegistry.createWidget(factoryName, widget, item)
|
|
194
|
+
}));
|
|
195
|
+
break;
|
|
196
|
+
case 'remove':
|
|
197
|
+
change.oldValues.forEach(() => toolbar.remove(change.oldIndex));
|
|
198
|
+
break;
|
|
199
|
+
case 'set':
|
|
200
|
+
change.newValues.forEach(item => toolbar.set(change.newIndex, {
|
|
201
|
+
name: item.name,
|
|
202
|
+
widget: toolbarRegistry.createWidget(factoryName, widget, item)
|
|
203
|
+
}));
|
|
204
|
+
break;
|
|
205
|
+
}
|
|
219
206
|
};
|
|
220
|
-
|
|
207
|
+
const toolbar = new ObservableList({
|
|
208
|
+
values: toArray(items).map(item => {
|
|
209
|
+
return {
|
|
210
|
+
name: item.name,
|
|
211
|
+
widget: toolbarRegistry.createWidget(factoryName, widget, item)
|
|
212
|
+
};
|
|
213
|
+
})
|
|
214
|
+
});
|
|
215
|
+
items.changed.connect(updateToolbar);
|
|
216
|
+
widget.disposed.connect(() => {
|
|
217
|
+
items.changed.disconnect(updateToolbar);
|
|
218
|
+
});
|
|
219
|
+
return toolbar;
|
|
220
|
+
};
|
|
221
221
|
}
|
|
222
222
|
//# sourceMappingURL=factory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../src/toolbar/factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAoB,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAEhF,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../src/toolbar/factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAoB,eAAe,EAAE,MAAM,6BAA6B,CAAC;AA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YACJ,CAAC,CAAC;SACH,CAAC,CAAC;QAEH,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QACrC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE;YAC3B,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;QAC1C,CAAC,CAAC,CAAC;QAEH,OAAO,OAAO,CAAC;IACjB,CAAC,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupyterlab/apputils",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.5",
|
|
4
4
|
"description": "JupyterLab - Application Utilities",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jupyter",
|
|
@@ -44,29 +44,29 @@
|
|
|
44
44
|
"watch": "tsc -b --watch"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@jupyterlab/coreutils": "^6.0.0-alpha.
|
|
48
|
-
"@jupyterlab/observables": "^5.0.0-alpha.
|
|
49
|
-
"@jupyterlab/services": "^7.0.0-alpha.
|
|
50
|
-
"@jupyterlab/settingregistry": "^4.0.0-alpha.
|
|
51
|
-
"@jupyterlab/statedb": "^4.0.0-alpha.
|
|
52
|
-
"@jupyterlab/
|
|
53
|
-
"@jupyterlab/
|
|
47
|
+
"@jupyterlab/coreutils": "^6.0.0-alpha.5",
|
|
48
|
+
"@jupyterlab/observables": "^5.0.0-alpha.5",
|
|
49
|
+
"@jupyterlab/services": "^7.0.0-alpha.5",
|
|
50
|
+
"@jupyterlab/settingregistry": "^4.0.0-alpha.5",
|
|
51
|
+
"@jupyterlab/statedb": "^4.0.0-alpha.5",
|
|
52
|
+
"@jupyterlab/statusbar": "^4.0.0-alpha.5",
|
|
53
|
+
"@jupyterlab/translation": "^4.0.0-alpha.5",
|
|
54
|
+
"@jupyterlab/ui-components": "^4.0.0-alpha.20",
|
|
54
55
|
"@lumino/algorithm": "^1.9.1",
|
|
55
|
-
"@lumino/commands": "^1.
|
|
56
|
-
"@lumino/coreutils": "^1.
|
|
56
|
+
"@lumino/commands": "^1.20.0",
|
|
57
|
+
"@lumino/coreutils": "^1.12.0",
|
|
57
58
|
"@lumino/disposable": "^1.10.1",
|
|
58
59
|
"@lumino/domutils": "^1.8.1",
|
|
59
60
|
"@lumino/messaging": "^1.10.1",
|
|
60
61
|
"@lumino/signaling": "^1.10.1",
|
|
61
62
|
"@lumino/virtualdom": "^1.14.1",
|
|
62
|
-
"@lumino/widgets": "^1.
|
|
63
|
+
"@lumino/widgets": "^1.31.1",
|
|
63
64
|
"@types/react": "^17.0.0",
|
|
64
65
|
"react": "^17.0.1",
|
|
65
|
-
"sanitize-html": "~2.5.3"
|
|
66
|
-
"url": "^0.11.0"
|
|
66
|
+
"sanitize-html": "~2.5.3"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@jupyterlab/testutils": "^4.0.0-alpha.
|
|
69
|
+
"@jupyterlab/testutils": "^4.0.0-alpha.5",
|
|
70
70
|
"@types/jest": "^26.0.10",
|
|
71
71
|
"@types/sanitize-html": "^2.3.1",
|
|
72
72
|
"jest": "^26.4.2",
|
package/style/base.css
CHANGED
package/style/commandpalette.css
CHANGED
|
@@ -16,9 +16,10 @@
|
|
|
16
16
|
|----------------------------------------------------------------------------*/
|
|
17
17
|
|
|
18
18
|
.lm-CommandPalette {
|
|
19
|
-
padding-bottom:
|
|
19
|
+
padding-bottom: 0;
|
|
20
20
|
color: var(--jp-ui-font-color1);
|
|
21
21
|
background: var(--jp-layout-color1);
|
|
22
|
+
|
|
22
23
|
/* This is needed so that all font sizing of children done in ems is
|
|
23
24
|
* relative to this base size */
|
|
24
25
|
font-size: var(--jp-ui-font-size1);
|
|
@@ -76,7 +77,7 @@
|
|
|
76
77
|
|
|
77
78
|
.lm-CommandPalette-wrapper {
|
|
78
79
|
overflow: overlay;
|
|
79
|
-
padding:
|
|
80
|
+
padding: 0 9px;
|
|
80
81
|
background-color: var(--jp-input-active-background);
|
|
81
82
|
height: 30px;
|
|
82
83
|
box-shadow: inset 0 0 0 var(--jp-border-width) var(--jp-input-border-color);
|
|
@@ -93,7 +94,7 @@
|
|
|
93
94
|
position: absolute;
|
|
94
95
|
top: 4px;
|
|
95
96
|
right: 4px;
|
|
96
|
-
padding: 5px 5px 1px
|
|
97
|
+
padding: 5px 5px 1px;
|
|
97
98
|
}
|
|
98
99
|
|
|
99
100
|
.jp-SearchIconGroup svg {
|
|
@@ -128,7 +129,7 @@
|
|
|
128
129
|
|----------------------------------------------------------------------------*/
|
|
129
130
|
|
|
130
131
|
.lm-CommandPalette-header:first-child {
|
|
131
|
-
margin-top:
|
|
132
|
+
margin-top: 0;
|
|
132
133
|
}
|
|
133
134
|
|
|
134
135
|
.lm-CommandPalette-header {
|
|
@@ -179,10 +180,6 @@
|
|
|
179
180
|
fill: var(--jp-layout-color0);
|
|
180
181
|
}
|
|
181
182
|
|
|
182
|
-
.lm-CommandPalette-item.lm-mod-active .lm-CommandPalette-itemLabel > mark {
|
|
183
|
-
color: var(--jp-ui-inverse-font-color0);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
183
|
.lm-CommandPalette-item.lm-mod-active:hover:not(.lm-mod-disabled) {
|
|
187
184
|
color: var(--jp-ui-inverse-font-color1);
|
|
188
185
|
background: var(--jp-brand-color1);
|
|
@@ -230,7 +227,7 @@
|
|
|
230
227
|
background-color: var(--jp-layout-color1);
|
|
231
228
|
}
|
|
232
229
|
|
|
233
|
-
.lm-CommandPalette-content:empty
|
|
230
|
+
.lm-CommandPalette-content:empty::after {
|
|
234
231
|
content: 'No results';
|
|
235
232
|
margin: auto;
|
|
236
233
|
margin-top: 20px;
|
|
@@ -245,6 +242,6 @@
|
|
|
245
242
|
text-align: center;
|
|
246
243
|
margin-top: 24px;
|
|
247
244
|
line-height: 1.32;
|
|
248
|
-
padding:
|
|
245
|
+
padding: 0 8px;
|
|
249
246
|
color: var(--jp-content-font-color3);
|
|
250
247
|
}
|
package/style/dialog.css
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
flex-direction: column;
|
|
12
12
|
align-items: center;
|
|
13
13
|
justify-content: center;
|
|
14
|
-
top:
|
|
15
|
-
left:
|
|
14
|
+
top: 0;
|
|
15
|
+
left: 0;
|
|
16
16
|
margin: 0;
|
|
17
17
|
padding: 0;
|
|
18
18
|
width: 100%;
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
margin-left: auto;
|
|
27
27
|
margin-right: auto;
|
|
28
28
|
background: var(--jp-layout-color1);
|
|
29
|
-
padding: 24px 24px 12px
|
|
29
|
+
padding: 24px 24px 12px;
|
|
30
30
|
min-width: 300px;
|
|
31
31
|
min-height: 150px;
|
|
32
32
|
max-width: 1000px;
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
box-shadow: var(--jp-elevation-z20);
|
|
36
36
|
word-wrap: break-word;
|
|
37
37
|
border-radius: var(--jp-border-radius);
|
|
38
|
+
|
|
38
39
|
/* This is needed so that all font sizing of children done in ems is
|
|
39
40
|
* relative to this base size */
|
|
40
41
|
font-size: var(--jp-ui-font-size1);
|
|
@@ -53,7 +54,7 @@
|
|
|
53
54
|
button.jp-Dialog-button:focus {
|
|
54
55
|
outline: 1px solid var(--jp-brand-color1);
|
|
55
56
|
outline-offset: 4px;
|
|
56
|
-
-moz-outline-radius:
|
|
57
|
+
-moz-outline-radius: 0;
|
|
57
58
|
}
|
|
58
59
|
|
|
59
60
|
button.jp-Dialog-button:focus::-moz-focus-inner {
|
|
@@ -64,7 +65,7 @@ button.jp-Dialog-button.jp-mod-styled.jp-mod-accept:focus,
|
|
|
64
65
|
button.jp-Dialog-button.jp-mod-styled.jp-mod-warn:focus,
|
|
65
66
|
button.jp-Dialog-button.jp-mod-styled.jp-mod-reject:focus {
|
|
66
67
|
outline-offset: 4px;
|
|
67
|
-
-moz-outline-radius:
|
|
68
|
+
-moz-outline-radius: 0;
|
|
68
69
|
}
|
|
69
70
|
|
|
70
71
|
button.jp-Dialog-button.jp-mod-styled.jp-mod-accept:focus {
|
|
@@ -126,7 +127,7 @@ button.jp-Dialog-close-button {
|
|
|
126
127
|
}
|
|
127
128
|
|
|
128
129
|
.jp-Dialog-body > button {
|
|
129
|
-
padding:
|
|
130
|
+
padding: 0 16px;
|
|
130
131
|
}
|
|
131
132
|
|
|
132
133
|
.jp-Dialog-body > label {
|
package/style/index.css
CHANGED
|
@@ -6,5 +6,6 @@
|
|
|
6
6
|
/* This file was auto-generated by ensurePackage() in @jupyterlab/buildutils */
|
|
7
7
|
@import url('~@lumino/widgets/style/index.css');
|
|
8
8
|
@import url('~@jupyterlab/ui-components/style/index.css');
|
|
9
|
+
@import url('~@jupyterlab/statusbar/style/index.css');
|
|
9
10
|
|
|
10
11
|
@import url('./base.css');
|
package/style/index.js
CHANGED
package/style/materialcolors.css
CHANGED
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
--md-red-A200: #ff5252;
|
|
18
18
|
--md-red-A400: #ff1744;
|
|
19
19
|
--md-red-A700: #d50000;
|
|
20
|
-
|
|
21
20
|
--md-pink-50: #fce4ec;
|
|
22
21
|
--md-pink-100: #f8bbd0;
|
|
23
22
|
--md-pink-200: #f48fb1;
|
|
@@ -32,7 +31,6 @@
|
|
|
32
31
|
--md-pink-A200: #ff4081;
|
|
33
32
|
--md-pink-A400: #f50057;
|
|
34
33
|
--md-pink-A700: #c51162;
|
|
35
|
-
|
|
36
34
|
--md-purple-50: #f3e5f5;
|
|
37
35
|
--md-purple-100: #e1bee7;
|
|
38
36
|
--md-purple-200: #ce93d8;
|
|
@@ -46,8 +44,7 @@
|
|
|
46
44
|
--md-purple-A100: #ea80fc;
|
|
47
45
|
--md-purple-A200: #e040fb;
|
|
48
46
|
--md-purple-A400: #d500f9;
|
|
49
|
-
--md-purple-A700: #
|
|
50
|
-
|
|
47
|
+
--md-purple-A700: #a0f;
|
|
51
48
|
--md-deep-purple-50: #ede7f6;
|
|
52
49
|
--md-deep-purple-100: #d1c4e9;
|
|
53
50
|
--md-deep-purple-200: #b39ddb;
|
|
@@ -62,7 +59,6 @@
|
|
|
62
59
|
--md-deep-purple-A200: #7c4dff;
|
|
63
60
|
--md-deep-purple-A400: #651fff;
|
|
64
61
|
--md-deep-purple-A700: #6200ea;
|
|
65
|
-
|
|
66
62
|
--md-indigo-50: #e8eaf6;
|
|
67
63
|
--md-indigo-100: #c5cae9;
|
|
68
64
|
--md-indigo-200: #9fa8da;
|
|
@@ -77,7 +73,6 @@
|
|
|
77
73
|
--md-indigo-A200: #536dfe;
|
|
78
74
|
--md-indigo-A400: #3d5afe;
|
|
79
75
|
--md-indigo-A700: #304ffe;
|
|
80
|
-
|
|
81
76
|
--md-blue-50: #e3f2fd;
|
|
82
77
|
--md-blue-100: #bbdefb;
|
|
83
78
|
--md-blue-200: #90caf9;
|
|
@@ -92,7 +87,6 @@
|
|
|
92
87
|
--md-blue-A200: #448aff;
|
|
93
88
|
--md-blue-A400: #2979ff;
|
|
94
89
|
--md-blue-A700: #2962ff;
|
|
95
|
-
|
|
96
90
|
--md-light-blue-50: #e1f5fe;
|
|
97
91
|
--md-light-blue-100: #b3e5fc;
|
|
98
92
|
--md-light-blue-200: #81d4fa;
|
|
@@ -107,7 +101,6 @@
|
|
|
107
101
|
--md-light-blue-A200: #40c4ff;
|
|
108
102
|
--md-light-blue-A400: #00b0ff;
|
|
109
103
|
--md-light-blue-A700: #0091ea;
|
|
110
|
-
|
|
111
104
|
--md-cyan-50: #e0f7fa;
|
|
112
105
|
--md-cyan-100: #b2ebf2;
|
|
113
106
|
--md-cyan-200: #80deea;
|
|
@@ -122,7 +115,6 @@
|
|
|
122
115
|
--md-cyan-A200: #18ffff;
|
|
123
116
|
--md-cyan-A400: #00e5ff;
|
|
124
117
|
--md-cyan-A700: #00b8d4;
|
|
125
|
-
|
|
126
118
|
--md-teal-50: #e0f2f1;
|
|
127
119
|
--md-teal-100: #b2dfdb;
|
|
128
120
|
--md-teal-200: #80cbc4;
|
|
@@ -137,7 +129,6 @@
|
|
|
137
129
|
--md-teal-A200: #64ffda;
|
|
138
130
|
--md-teal-A400: #1de9b6;
|
|
139
131
|
--md-teal-A700: #00bfa5;
|
|
140
|
-
|
|
141
132
|
--md-green-50: #e8f5e9;
|
|
142
133
|
--md-green-100: #c8e6c9;
|
|
143
134
|
--md-green-200: #a5d6a7;
|
|
@@ -152,7 +143,6 @@
|
|
|
152
143
|
--md-green-A200: #69f0ae;
|
|
153
144
|
--md-green-A400: #00e676;
|
|
154
145
|
--md-green-A700: #00c853;
|
|
155
|
-
|
|
156
146
|
--md-light-green-50: #f1f8e9;
|
|
157
147
|
--md-light-green-100: #dcedc8;
|
|
158
148
|
--md-light-green-200: #c5e1a5;
|
|
@@ -167,7 +157,6 @@
|
|
|
167
157
|
--md-light-green-A200: #b2ff59;
|
|
168
158
|
--md-light-green-A400: #76ff03;
|
|
169
159
|
--md-light-green-A700: #64dd17;
|
|
170
|
-
|
|
171
160
|
--md-lime-50: #f9fbe7;
|
|
172
161
|
--md-lime-100: #f0f4c3;
|
|
173
162
|
--md-lime-200: #e6ee9c;
|
|
@@ -182,7 +171,6 @@
|
|
|
182
171
|
--md-lime-A200: #eeff41;
|
|
183
172
|
--md-lime-A400: #c6ff00;
|
|
184
173
|
--md-lime-A700: #aeea00;
|
|
185
|
-
|
|
186
174
|
--md-yellow-50: #fffde7;
|
|
187
175
|
--md-yellow-100: #fff9c4;
|
|
188
176
|
--md-yellow-200: #fff59d;
|
|
@@ -194,10 +182,9 @@
|
|
|
194
182
|
--md-yellow-800: #f9a825;
|
|
195
183
|
--md-yellow-900: #f57f17;
|
|
196
184
|
--md-yellow-A100: #ffff8d;
|
|
197
|
-
--md-yellow-A200: #
|
|
185
|
+
--md-yellow-A200: #ff0;
|
|
198
186
|
--md-yellow-A400: #ffea00;
|
|
199
187
|
--md-yellow-A700: #ffd600;
|
|
200
|
-
|
|
201
188
|
--md-amber-50: #fff8e1;
|
|
202
189
|
--md-amber-100: #ffecb3;
|
|
203
190
|
--md-amber-200: #ffe082;
|
|
@@ -212,7 +199,6 @@
|
|
|
212
199
|
--md-amber-A200: #ffd740;
|
|
213
200
|
--md-amber-A400: #ffc400;
|
|
214
201
|
--md-amber-A700: #ffab00;
|
|
215
|
-
|
|
216
202
|
--md-orange-50: #fff3e0;
|
|
217
203
|
--md-orange-100: #ffe0b2;
|
|
218
204
|
--md-orange-200: #ffcc80;
|
|
@@ -227,7 +213,6 @@
|
|
|
227
213
|
--md-orange-A200: #ffab40;
|
|
228
214
|
--md-orange-A400: #ff9100;
|
|
229
215
|
--md-orange-A700: #ff6d00;
|
|
230
|
-
|
|
231
216
|
--md-deep-orange-50: #fbe9e7;
|
|
232
217
|
--md-deep-orange-100: #ffccbc;
|
|
233
218
|
--md-deep-orange-200: #ffab91;
|
|
@@ -242,7 +227,6 @@
|
|
|
242
227
|
--md-deep-orange-A200: #ff6e40;
|
|
243
228
|
--md-deep-orange-A400: #ff3d00;
|
|
244
229
|
--md-deep-orange-A700: #dd2c00;
|
|
245
|
-
|
|
246
230
|
--md-brown-50: #efebe9;
|
|
247
231
|
--md-brown-100: #d7ccc8;
|
|
248
232
|
--md-brown-200: #bcaaa4;
|
|
@@ -253,10 +237,9 @@
|
|
|
253
237
|
--md-brown-700: #5d4037;
|
|
254
238
|
--md-brown-800: #4e342e;
|
|
255
239
|
--md-brown-900: #3e2723;
|
|
256
|
-
|
|
257
240
|
--md-grey-50: #fafafa;
|
|
258
241
|
--md-grey-100: #f5f5f5;
|
|
259
|
-
--md-grey-200: #
|
|
242
|
+
--md-grey-200: #eee;
|
|
260
243
|
--md-grey-300: #e0e0e0;
|
|
261
244
|
--md-grey-400: #bdbdbd;
|
|
262
245
|
--md-grey-500: #9e9e9e;
|
|
@@ -264,7 +247,6 @@
|
|
|
264
247
|
--md-grey-700: #616161;
|
|
265
248
|
--md-grey-800: #424242;
|
|
266
249
|
--md-grey-900: #212121;
|
|
267
|
-
|
|
268
250
|
--md-blue-grey-50: #eceff1;
|
|
269
251
|
--md-blue-grey-100: #cfd8dc;
|
|
270
252
|
--md-blue-grey-200: #b0bec5;
|
package/lib/hoverbox.d.ts
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A namespace for `HoverBox` members.
|
|
3
|
-
*/
|
|
4
|
-
export declare namespace HoverBox {
|
|
5
|
-
/**
|
|
6
|
-
* Options for setting the geometry of a hovering node and its anchor node.
|
|
7
|
-
*/
|
|
8
|
-
interface IOptions {
|
|
9
|
-
/**
|
|
10
|
-
* The referent anchor rectangle to which the hover box is bound.
|
|
11
|
-
*
|
|
12
|
-
* #### Notes
|
|
13
|
-
* In an editor context, this value will typically be the cursor's
|
|
14
|
-
* coordinate position, which can be retrieved via calling the
|
|
15
|
-
* `getCoordinateForPosition` method.
|
|
16
|
-
*/
|
|
17
|
-
anchor: DOMRect;
|
|
18
|
-
/**
|
|
19
|
-
* The node that hosts the anchor.
|
|
20
|
-
*
|
|
21
|
-
* #### Notes
|
|
22
|
-
* The visibility of the anchor rectangle within this host node is the
|
|
23
|
-
* heuristic that determines whether the hover box ought to be visible.
|
|
24
|
-
*/
|
|
25
|
-
host: HTMLElement;
|
|
26
|
-
/**
|
|
27
|
-
* The maximum height of a hover box.
|
|
28
|
-
*
|
|
29
|
-
* #### Notes
|
|
30
|
-
* This value is only used if a CSS max-height attribute is not set for the
|
|
31
|
-
* hover box. It is a fallback value.
|
|
32
|
-
*/
|
|
33
|
-
maxHeight: number;
|
|
34
|
-
/**
|
|
35
|
-
* The minimum height of a hover box.
|
|
36
|
-
*/
|
|
37
|
-
minHeight: number;
|
|
38
|
-
/**
|
|
39
|
-
* The hover box node.
|
|
40
|
-
*/
|
|
41
|
-
node: HTMLElement;
|
|
42
|
-
/**
|
|
43
|
-
* Optional pixel offset values added to where the hover box should render.
|
|
44
|
-
*
|
|
45
|
-
* #### Notes
|
|
46
|
-
* This option is useful for passing in values that may pertain to CSS
|
|
47
|
-
* borders or padding in cases where the text inside the hover box may need
|
|
48
|
-
* to align with the text of the referent editor.
|
|
49
|
-
*
|
|
50
|
-
* Because the hover box calculation may render a box either above or below
|
|
51
|
-
* the cursor, the `vertical` offset accepts `above` and `below` values for
|
|
52
|
-
* the different render modes.
|
|
53
|
-
*/
|
|
54
|
-
offset?: {
|
|
55
|
-
horizontal?: number;
|
|
56
|
-
vertical?: {
|
|
57
|
-
above?: number;
|
|
58
|
-
below?: number;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
/**
|
|
62
|
-
* If space is available both above and below the anchor, denote which
|
|
63
|
-
* location is privileged. Use forceBelow and forceAbove to mandate where
|
|
64
|
-
* hover box should render relative to anchor.
|
|
65
|
-
*
|
|
66
|
-
* #### Notes
|
|
67
|
-
* The default value is `'below'`.
|
|
68
|
-
*/
|
|
69
|
-
privilege?: 'above' | 'below' | 'forceAbove' | 'forceBelow';
|
|
70
|
-
/**
|
|
71
|
-
* If the style of the node has already been computed, it can be passed into
|
|
72
|
-
* the hover box for geometry calculation.
|
|
73
|
-
*/
|
|
74
|
-
style?: CSSStyleDeclaration;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Set the visible dimensions of a hovering box anchored to an editor cursor.
|
|
78
|
-
*
|
|
79
|
-
* @param options - The hover box geometry calculation options.
|
|
80
|
-
*/
|
|
81
|
-
function setGeometry(options: IOptions): void;
|
|
82
|
-
}
|