@jupyterlab/apputils 4.0.0-alpha.2 → 4.0.0-alpha.20
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/clipboard.d.ts +1 -1
- package/lib/dialog.d.ts +73 -4
- package/lib/dialog.js +143 -30
- package/lib/dialog.js.map +1 -1
- package/lib/domutils.js.map +1 -1
- package/lib/index.d.ts +6 -5
- package/lib/index.js +6 -5
- package/lib/index.js.map +1 -1
- package/lib/inputdialog.d.ts +35 -3
- package/lib/inputdialog.js +122 -12
- package/lib/inputdialog.js.map +1 -1
- package/lib/kernelstatuses.d.ts +74 -2
- package/lib/kernelstatuses.js +142 -2
- package/lib/kernelstatuses.js.map +1 -1
- package/lib/mainareawidget.d.ts +9 -0
- package/lib/mainareawidget.js +29 -4
- package/lib/mainareawidget.js.map +1 -1
- package/lib/menufactory.js +14 -15
- package/lib/menufactory.js.map +1 -1
- package/lib/notification.d.ts +336 -0
- package/lib/notification.js +310 -0
- package/lib/notification.js.map +1 -0
- package/lib/runningSessions.d.ts +72 -0
- package/lib/runningSessions.js +119 -0
- package/lib/runningSessions.js.map +1 -0
- package/lib/sanitizer.d.ts +6 -4
- package/lib/sanitizer.js +32 -12
- package/lib/sanitizer.js.map +1 -1
- package/lib/semanticCommand.js +11 -2
- package/lib/semanticCommand.js.map +1 -1
- package/lib/sessioncontext.d.ts +2 -3
- package/lib/sessioncontext.js +46 -27
- package/lib/sessioncontext.js.map +1 -1
- package/lib/testutils.d.ts +5 -0
- package/lib/testutils.js +46 -0
- package/lib/testutils.js.map +1 -0
- package/lib/thememanager.js +13 -4
- package/lib/thememanager.js.map +1 -1
- package/lib/tokens.d.ts +26 -9
- package/lib/tokens.js +1 -6
- package/lib/tokens.js.map +1 -1
- package/lib/toolbar/factory.d.ts +12 -2
- package/lib/toolbar/factory.js +237 -145
- package/lib/toolbar/factory.js.map +1 -1
- package/lib/toolbar/index.js +4 -0
- package/lib/toolbar/index.js.map +1 -1
- package/lib/toolbar/registry.d.ts +11 -0
- package/lib/toolbar/registry.js +20 -3
- package/lib/toolbar/registry.js.map +1 -1
- package/lib/toolbar/widget.d.ts +3 -0
- package/lib/toolbar/widget.js +3 -0
- package/lib/toolbar/widget.js.map +1 -1
- package/lib/widgettracker.d.ts +13 -1
- package/lib/widgettracker.js +29 -2
- package/lib/widgettracker.js.map +1 -1
- package/package.json +30 -30
- package/src/clipboard.ts +107 -0
- package/src/commandlinker.ts +209 -0
- package/src/commandpalette.ts +175 -0
- package/src/dialog.tsx +1133 -0
- package/src/domutils.ts +53 -0
- package/src/index.ts +78 -0
- package/src/inputdialog.ts +551 -0
- package/src/kernelstatuses.tsx +279 -0
- package/src/mainareawidget.ts +362 -0
- package/src/menufactory.ts +201 -0
- package/src/notification.ts +559 -0
- package/src/printing.ts +180 -0
- package/src/runningSessions.tsx +233 -0
- package/src/sanitizer.ts +968 -0
- package/src/semanticCommand.ts +77 -0
- package/src/sessioncontext.tsx +1712 -0
- package/src/testutils.ts +49 -0
- package/src/thememanager.ts +519 -0
- package/src/tokens.ts +372 -0
- package/src/toolbar/factory.ts +422 -0
- package/src/toolbar/index.ts +8 -0
- package/src/toolbar/registry.ts +158 -0
- package/src/toolbar/widget.tsx +243 -0
- package/src/widgettracker.ts +391 -0
- package/src/windowresolver.ts +218 -0
- package/style/base.css +0 -1
- package/style/commandpalette.css +7 -10
- package/style/dialog.css +23 -7
- package/style/index.css +1 -0
- package/style/index.js +1 -0
- package/style/inputdialog.css +5 -0
- package/style/materialcolors.css +8 -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
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
// Copyright (c) Jupyter Development Team.
|
|
2
|
+
// Distributed under the terms of the Modified BSD License.
|
|
3
|
+
|
|
4
|
+
import { PromiseDelegate } from '@lumino/coreutils';
|
|
5
|
+
import { IWindowResolver } from './tokens';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* A concrete implementation of a window name resolver.
|
|
9
|
+
*/
|
|
10
|
+
export class WindowResolver implements IWindowResolver {
|
|
11
|
+
/**
|
|
12
|
+
* The resolved window name.
|
|
13
|
+
*
|
|
14
|
+
* #### Notes
|
|
15
|
+
* If the `resolve` promise has not resolved, the behavior is undefined.
|
|
16
|
+
*/
|
|
17
|
+
get name(): string {
|
|
18
|
+
return this._name;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Resolve a window name to use as a handle among shared resources.
|
|
23
|
+
*
|
|
24
|
+
* @param candidate - The potential window name being resolved.
|
|
25
|
+
*
|
|
26
|
+
* #### Notes
|
|
27
|
+
* Typically, the name candidate should be a JupyterLab workspace name or
|
|
28
|
+
* an empty string if there is no workspace.
|
|
29
|
+
*
|
|
30
|
+
* If the returned promise rejects, a window name cannot be resolved without
|
|
31
|
+
* user intervention, which typically means navigation to a new URL.
|
|
32
|
+
*/
|
|
33
|
+
resolve(candidate: string): Promise<void> {
|
|
34
|
+
return Private.resolve(candidate).then(name => {
|
|
35
|
+
this._name = name;
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
private _name: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/*
|
|
43
|
+
* A namespace for private module data.
|
|
44
|
+
*/
|
|
45
|
+
namespace Private {
|
|
46
|
+
/**
|
|
47
|
+
* The internal prefix for private local storage keys.
|
|
48
|
+
*/
|
|
49
|
+
const PREFIX = '@jupyterlab/statedb:StateDB';
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* The local storage beacon key.
|
|
53
|
+
*/
|
|
54
|
+
const BEACON = `${PREFIX}:beacon`;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* The timeout (in ms) to wait for beacon responders.
|
|
58
|
+
*
|
|
59
|
+
* #### Notes
|
|
60
|
+
* This value is a whole number between 200 and 500 in order to prevent
|
|
61
|
+
* perfect timeout collisions between multiple simultaneously opening windows
|
|
62
|
+
* that have the same URL. This is an edge case because multiple windows
|
|
63
|
+
* should not ordinarily share the same URL, but it can be contrived.
|
|
64
|
+
*/
|
|
65
|
+
const TIMEOUT = Math.floor(200 + Math.random() * 300);
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* The local storage window key.
|
|
69
|
+
*/
|
|
70
|
+
const WINDOW = `${PREFIX}:window`;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Current beacon request
|
|
74
|
+
*
|
|
75
|
+
* #### Notes
|
|
76
|
+
* We keep track of the current request so that we can ignore our own beacon
|
|
77
|
+
* requests. This is to work around a bug in Safari, where Safari sometimes
|
|
78
|
+
* triggers local storage events for changes made by the current tab. See
|
|
79
|
+
* https://github.com/jupyterlab/jupyterlab/issues/6921#issuecomment-540817283
|
|
80
|
+
* for more details.
|
|
81
|
+
*/
|
|
82
|
+
let currentBeaconRequest: string | null = null;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* A potential preferred default window name.
|
|
86
|
+
*/
|
|
87
|
+
let candidate: string | null = null;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* The window name promise.
|
|
91
|
+
*/
|
|
92
|
+
const delegate = new PromiseDelegate<string>();
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* The known window names.
|
|
96
|
+
*/
|
|
97
|
+
const known: { [window: string]: null } = {};
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* The window name.
|
|
101
|
+
*/
|
|
102
|
+
let name: string | null = null;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Whether the name resolution has completed.
|
|
106
|
+
*/
|
|
107
|
+
let resolved = false;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Start the storage event handler.
|
|
111
|
+
*/
|
|
112
|
+
function initialize(): void {
|
|
113
|
+
// Listen to all storage events for beacons and window names.
|
|
114
|
+
window.addEventListener('storage', (event: StorageEvent) => {
|
|
115
|
+
const { key, newValue } = event;
|
|
116
|
+
|
|
117
|
+
// All the keys we care about have values.
|
|
118
|
+
if (newValue === null) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// If the beacon was fired, respond with a ping.
|
|
123
|
+
if (
|
|
124
|
+
key === BEACON &&
|
|
125
|
+
newValue !== currentBeaconRequest &&
|
|
126
|
+
candidate !== null
|
|
127
|
+
) {
|
|
128
|
+
ping(resolved ? name : candidate);
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// If the window name is resolved, bail.
|
|
133
|
+
if (resolved || key !== WINDOW) {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const reported = newValue.replace(/\-\d+$/, '');
|
|
138
|
+
|
|
139
|
+
// Store the reported window name.
|
|
140
|
+
known[reported] = null;
|
|
141
|
+
|
|
142
|
+
// If a reported window name and candidate collide, reject the candidate.
|
|
143
|
+
if (!candidate || candidate in known) {
|
|
144
|
+
reject();
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Ping peers with payload.
|
|
151
|
+
*/
|
|
152
|
+
function ping(payload: string | null): void {
|
|
153
|
+
if (payload === null) {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
const { localStorage } = window;
|
|
158
|
+
|
|
159
|
+
localStorage.setItem(WINDOW, `${payload}-${new Date().getTime()}`);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Reject the candidate.
|
|
164
|
+
*/
|
|
165
|
+
function reject(): void {
|
|
166
|
+
resolved = true;
|
|
167
|
+
currentBeaconRequest = null;
|
|
168
|
+
delegate.reject(`Window name candidate "${candidate}" already exists`);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Returns a promise that resolves with the window name used for restoration.
|
|
173
|
+
*/
|
|
174
|
+
export function resolve(potential: string): Promise<string> {
|
|
175
|
+
if (resolved) {
|
|
176
|
+
return delegate.promise;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// Set the local candidate.
|
|
180
|
+
candidate = potential;
|
|
181
|
+
|
|
182
|
+
if (candidate in known) {
|
|
183
|
+
reject();
|
|
184
|
+
return delegate.promise;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
const { localStorage, setTimeout } = window;
|
|
188
|
+
|
|
189
|
+
// Wait until other windows have reported before claiming the candidate.
|
|
190
|
+
setTimeout(() => {
|
|
191
|
+
if (resolved) {
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// If the window name has not already been resolved, check one last time
|
|
196
|
+
// to confirm it is not a duplicate before resolving.
|
|
197
|
+
if (!candidate || candidate in known) {
|
|
198
|
+
return reject();
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
resolved = true;
|
|
202
|
+
currentBeaconRequest = null;
|
|
203
|
+
delegate.resolve((name = candidate));
|
|
204
|
+
ping(name);
|
|
205
|
+
}, TIMEOUT);
|
|
206
|
+
|
|
207
|
+
// Fire the beacon to collect other windows' names.
|
|
208
|
+
currentBeaconRequest = `${Math.random()}-${new Date().getTime()}`;
|
|
209
|
+
localStorage.setItem(BEACON, currentBeaconRequest);
|
|
210
|
+
|
|
211
|
+
return delegate.promise;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// Initialize the storage listener at runtime.
|
|
215
|
+
(() => {
|
|
216
|
+
initialize();
|
|
217
|
+
})();
|
|
218
|
+
}
|
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 {
|
|
@@ -93,7 +94,7 @@ button.jp-Dialog-close-button {
|
|
|
93
94
|
padding-bottom: 12px;
|
|
94
95
|
font-size: var(--jp-ui-font-size3);
|
|
95
96
|
font-weight: 400;
|
|
96
|
-
color: var(--jp-ui-font-
|
|
97
|
+
color: var(--jp-ui-font-color1);
|
|
97
98
|
}
|
|
98
99
|
|
|
99
100
|
.jp-Dialog-body {
|
|
@@ -102,6 +103,7 @@ button.jp-Dialog-close-button {
|
|
|
102
103
|
flex: 1 1 auto;
|
|
103
104
|
font-size: var(--jp-ui-font-size1);
|
|
104
105
|
background: var(--jp-layout-color1);
|
|
106
|
+
color: var(--jp-ui-font-color1);
|
|
105
107
|
overflow: auto;
|
|
106
108
|
}
|
|
107
109
|
|
|
@@ -109,12 +111,26 @@ button.jp-Dialog-close-button {
|
|
|
109
111
|
display: flex;
|
|
110
112
|
flex-direction: row;
|
|
111
113
|
justify-content: flex-end;
|
|
114
|
+
align-items: center;
|
|
112
115
|
flex: 0 0 auto;
|
|
113
116
|
margin-left: -12px;
|
|
114
117
|
margin-right: -12px;
|
|
115
118
|
padding: 12px;
|
|
116
119
|
}
|
|
117
120
|
|
|
121
|
+
.jp-Dialog-checkbox {
|
|
122
|
+
padding-right: 5px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.jp-Dialog-checkbox > input:focus-visible {
|
|
126
|
+
outline: 1px solid var(--jp-input-active-border-color);
|
|
127
|
+
outline-offset: 1px;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.jp-Dialog-spacer {
|
|
131
|
+
flex: 1 1 auto;
|
|
132
|
+
}
|
|
133
|
+
|
|
118
134
|
.jp-Dialog-title {
|
|
119
135
|
overflow: hidden;
|
|
120
136
|
white-space: nowrap;
|
|
@@ -126,7 +142,7 @@ button.jp-Dialog-close-button {
|
|
|
126
142
|
}
|
|
127
143
|
|
|
128
144
|
.jp-Dialog-body > button {
|
|
129
|
-
padding:
|
|
145
|
+
padding: 0 16px;
|
|
130
146
|
}
|
|
131
147
|
|
|
132
148
|
.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/inputdialog.css
CHANGED
package/style/materialcolors.css
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Jupyter Development Team.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
1
6
|
/**
|
|
2
7
|
* google-material-color v1.2.6
|
|
3
8
|
* https://github.com/danlevan/google-material-color
|
|
@@ -17,7 +22,6 @@
|
|
|
17
22
|
--md-red-A200: #ff5252;
|
|
18
23
|
--md-red-A400: #ff1744;
|
|
19
24
|
--md-red-A700: #d50000;
|
|
20
|
-
|
|
21
25
|
--md-pink-50: #fce4ec;
|
|
22
26
|
--md-pink-100: #f8bbd0;
|
|
23
27
|
--md-pink-200: #f48fb1;
|
|
@@ -32,7 +36,6 @@
|
|
|
32
36
|
--md-pink-A200: #ff4081;
|
|
33
37
|
--md-pink-A400: #f50057;
|
|
34
38
|
--md-pink-A700: #c51162;
|
|
35
|
-
|
|
36
39
|
--md-purple-50: #f3e5f5;
|
|
37
40
|
--md-purple-100: #e1bee7;
|
|
38
41
|
--md-purple-200: #ce93d8;
|
|
@@ -46,8 +49,7 @@
|
|
|
46
49
|
--md-purple-A100: #ea80fc;
|
|
47
50
|
--md-purple-A200: #e040fb;
|
|
48
51
|
--md-purple-A400: #d500f9;
|
|
49
|
-
--md-purple-A700: #
|
|
50
|
-
|
|
52
|
+
--md-purple-A700: #a0f;
|
|
51
53
|
--md-deep-purple-50: #ede7f6;
|
|
52
54
|
--md-deep-purple-100: #d1c4e9;
|
|
53
55
|
--md-deep-purple-200: #b39ddb;
|
|
@@ -62,7 +64,6 @@
|
|
|
62
64
|
--md-deep-purple-A200: #7c4dff;
|
|
63
65
|
--md-deep-purple-A400: #651fff;
|
|
64
66
|
--md-deep-purple-A700: #6200ea;
|
|
65
|
-
|
|
66
67
|
--md-indigo-50: #e8eaf6;
|
|
67
68
|
--md-indigo-100: #c5cae9;
|
|
68
69
|
--md-indigo-200: #9fa8da;
|
|
@@ -77,7 +78,6 @@
|
|
|
77
78
|
--md-indigo-A200: #536dfe;
|
|
78
79
|
--md-indigo-A400: #3d5afe;
|
|
79
80
|
--md-indigo-A700: #304ffe;
|
|
80
|
-
|
|
81
81
|
--md-blue-50: #e3f2fd;
|
|
82
82
|
--md-blue-100: #bbdefb;
|
|
83
83
|
--md-blue-200: #90caf9;
|
|
@@ -92,7 +92,6 @@
|
|
|
92
92
|
--md-blue-A200: #448aff;
|
|
93
93
|
--md-blue-A400: #2979ff;
|
|
94
94
|
--md-blue-A700: #2962ff;
|
|
95
|
-
|
|
96
95
|
--md-light-blue-50: #e1f5fe;
|
|
97
96
|
--md-light-blue-100: #b3e5fc;
|
|
98
97
|
--md-light-blue-200: #81d4fa;
|
|
@@ -107,7 +106,6 @@
|
|
|
107
106
|
--md-light-blue-A200: #40c4ff;
|
|
108
107
|
--md-light-blue-A400: #00b0ff;
|
|
109
108
|
--md-light-blue-A700: #0091ea;
|
|
110
|
-
|
|
111
109
|
--md-cyan-50: #e0f7fa;
|
|
112
110
|
--md-cyan-100: #b2ebf2;
|
|
113
111
|
--md-cyan-200: #80deea;
|
|
@@ -122,7 +120,6 @@
|
|
|
122
120
|
--md-cyan-A200: #18ffff;
|
|
123
121
|
--md-cyan-A400: #00e5ff;
|
|
124
122
|
--md-cyan-A700: #00b8d4;
|
|
125
|
-
|
|
126
123
|
--md-teal-50: #e0f2f1;
|
|
127
124
|
--md-teal-100: #b2dfdb;
|
|
128
125
|
--md-teal-200: #80cbc4;
|
|
@@ -137,7 +134,6 @@
|
|
|
137
134
|
--md-teal-A200: #64ffda;
|
|
138
135
|
--md-teal-A400: #1de9b6;
|
|
139
136
|
--md-teal-A700: #00bfa5;
|
|
140
|
-
|
|
141
137
|
--md-green-50: #e8f5e9;
|
|
142
138
|
--md-green-100: #c8e6c9;
|
|
143
139
|
--md-green-200: #a5d6a7;
|
|
@@ -152,7 +148,6 @@
|
|
|
152
148
|
--md-green-A200: #69f0ae;
|
|
153
149
|
--md-green-A400: #00e676;
|
|
154
150
|
--md-green-A700: #00c853;
|
|
155
|
-
|
|
156
151
|
--md-light-green-50: #f1f8e9;
|
|
157
152
|
--md-light-green-100: #dcedc8;
|
|
158
153
|
--md-light-green-200: #c5e1a5;
|
|
@@ -167,7 +162,6 @@
|
|
|
167
162
|
--md-light-green-A200: #b2ff59;
|
|
168
163
|
--md-light-green-A400: #76ff03;
|
|
169
164
|
--md-light-green-A700: #64dd17;
|
|
170
|
-
|
|
171
165
|
--md-lime-50: #f9fbe7;
|
|
172
166
|
--md-lime-100: #f0f4c3;
|
|
173
167
|
--md-lime-200: #e6ee9c;
|
|
@@ -182,7 +176,6 @@
|
|
|
182
176
|
--md-lime-A200: #eeff41;
|
|
183
177
|
--md-lime-A400: #c6ff00;
|
|
184
178
|
--md-lime-A700: #aeea00;
|
|
185
|
-
|
|
186
179
|
--md-yellow-50: #fffde7;
|
|
187
180
|
--md-yellow-100: #fff9c4;
|
|
188
181
|
--md-yellow-200: #fff59d;
|
|
@@ -194,10 +187,9 @@
|
|
|
194
187
|
--md-yellow-800: #f9a825;
|
|
195
188
|
--md-yellow-900: #f57f17;
|
|
196
189
|
--md-yellow-A100: #ffff8d;
|
|
197
|
-
--md-yellow-A200: #
|
|
190
|
+
--md-yellow-A200: #ff0;
|
|
198
191
|
--md-yellow-A400: #ffea00;
|
|
199
192
|
--md-yellow-A700: #ffd600;
|
|
200
|
-
|
|
201
193
|
--md-amber-50: #fff8e1;
|
|
202
194
|
--md-amber-100: #ffecb3;
|
|
203
195
|
--md-amber-200: #ffe082;
|
|
@@ -212,7 +204,6 @@
|
|
|
212
204
|
--md-amber-A200: #ffd740;
|
|
213
205
|
--md-amber-A400: #ffc400;
|
|
214
206
|
--md-amber-A700: #ffab00;
|
|
215
|
-
|
|
216
207
|
--md-orange-50: #fff3e0;
|
|
217
208
|
--md-orange-100: #ffe0b2;
|
|
218
209
|
--md-orange-200: #ffcc80;
|
|
@@ -227,7 +218,6 @@
|
|
|
227
218
|
--md-orange-A200: #ffab40;
|
|
228
219
|
--md-orange-A400: #ff9100;
|
|
229
220
|
--md-orange-A700: #ff6d00;
|
|
230
|
-
|
|
231
221
|
--md-deep-orange-50: #fbe9e7;
|
|
232
222
|
--md-deep-orange-100: #ffccbc;
|
|
233
223
|
--md-deep-orange-200: #ffab91;
|
|
@@ -242,7 +232,6 @@
|
|
|
242
232
|
--md-deep-orange-A200: #ff6e40;
|
|
243
233
|
--md-deep-orange-A400: #ff3d00;
|
|
244
234
|
--md-deep-orange-A700: #dd2c00;
|
|
245
|
-
|
|
246
235
|
--md-brown-50: #efebe9;
|
|
247
236
|
--md-brown-100: #d7ccc8;
|
|
248
237
|
--md-brown-200: #bcaaa4;
|
|
@@ -253,10 +242,9 @@
|
|
|
253
242
|
--md-brown-700: #5d4037;
|
|
254
243
|
--md-brown-800: #4e342e;
|
|
255
244
|
--md-brown-900: #3e2723;
|
|
256
|
-
|
|
257
245
|
--md-grey-50: #fafafa;
|
|
258
246
|
--md-grey-100: #f5f5f5;
|
|
259
|
-
--md-grey-200: #
|
|
247
|
+
--md-grey-200: #eee;
|
|
260
248
|
--md-grey-300: #e0e0e0;
|
|
261
249
|
--md-grey-400: #bdbdbd;
|
|
262
250
|
--md-grey-500: #9e9e9e;
|
|
@@ -264,7 +252,6 @@
|
|
|
264
252
|
--md-grey-700: #616161;
|
|
265
253
|
--md-grey-800: #424242;
|
|
266
254
|
--md-grey-900: #212121;
|
|
267
|
-
|
|
268
255
|
--md-blue-grey-50: #eceff1;
|
|
269
256
|
--md-blue-grey-100: #cfd8dc;
|
|
270
257
|
--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
|
-
}
|