@jupyterlab/apputils 4.0.0-alpha.1 → 4.0.0-alpha.10

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 (47) hide show
  1. package/lib/dialog.d.ts +7 -0
  2. package/lib/dialog.js +21 -3
  3. package/lib/dialog.js.map +1 -1
  4. package/lib/domutils.js.map +1 -1
  5. package/lib/index.d.ts +5 -5
  6. package/lib/index.js +5 -5
  7. package/lib/index.js.map +1 -1
  8. package/lib/kernelstatuses.d.ts +74 -2
  9. package/lib/kernelstatuses.js +141 -2
  10. package/lib/kernelstatuses.js.map +1 -1
  11. package/lib/mainareawidget.d.ts +9 -0
  12. package/lib/mainareawidget.js +28 -3
  13. package/lib/mainareawidget.js.map +1 -1
  14. package/lib/menufactory.js.map +1 -1
  15. package/lib/runningSessions.d.ts +72 -0
  16. package/lib/runningSessions.js +119 -0
  17. package/lib/runningSessions.js.map +1 -0
  18. package/lib/sanitizer.js +14 -6
  19. package/lib/sanitizer.js.map +1 -1
  20. package/lib/semanticCommand.js.map +1 -1
  21. package/lib/sessioncontext.d.ts +1 -1
  22. package/lib/sessioncontext.js +42 -21
  23. package/lib/sessioncontext.js.map +1 -1
  24. package/lib/thememanager.js +5 -0
  25. package/lib/thememanager.js.map +1 -1
  26. package/lib/tokens.d.ts +26 -9
  27. package/lib/tokens.js +1 -6
  28. package/lib/tokens.js.map +1 -1
  29. package/lib/toolbar/factory.d.ts +12 -2
  30. package/lib/toolbar/factory.js +232 -142
  31. package/lib/toolbar/factory.js.map +1 -1
  32. package/lib/toolbar/registry.d.ts +11 -0
  33. package/lib/toolbar/registry.js +15 -2
  34. package/lib/toolbar/registry.js.map +1 -1
  35. package/lib/toolbar/widget.js.map +1 -1
  36. package/lib/widgettracker.js.map +1 -1
  37. package/package.json +17 -16
  38. package/style/base.css +0 -1
  39. package/style/commandpalette.css +7 -10
  40. package/style/dialog.css +7 -6
  41. package/style/index.css +1 -0
  42. package/style/index.js +1 -0
  43. package/style/materialcolors.css +3 -21
  44. package/lib/hoverbox.d.ts +0 -82
  45. package/lib/hoverbox.js +0 -100
  46. package/lib/hoverbox.js.map +0 -1
  47. package/style/hoverbox.css +0 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jupyterlab/apputils",
3
- "version": "4.0.0-alpha.1",
3
+ "version": "4.0.0-alpha.10",
4
4
  "description": "JupyterLab - Application Utilities",
5
5
  "keywords": [
6
6
  "jupyter",
@@ -44,36 +44,37 @@
44
44
  "watch": "tsc -b --watch"
45
45
  },
46
46
  "dependencies": {
47
- "@jupyterlab/coreutils": "^6.0.0-alpha.1",
48
- "@jupyterlab/observables": "^5.0.0-alpha.1",
49
- "@jupyterlab/services": "^7.0.0-alpha.1",
50
- "@jupyterlab/settingregistry": "^4.0.0-alpha.1",
51
- "@jupyterlab/statedb": "^4.0.0-alpha.1",
52
- "@jupyterlab/translation": "^4.0.0-alpha.1",
53
- "@jupyterlab/ui-components": "^4.0.0-alpha.16",
47
+ "@jupyterlab/coreutils": "^6.0.0-alpha.10",
48
+ "@jupyterlab/observables": "^5.0.0-alpha.10",
49
+ "@jupyterlab/rendermime-interfaces": "^3.8.0-alpha.10",
50
+ "@jupyterlab/services": "^7.0.0-alpha.10",
51
+ "@jupyterlab/settingregistry": "^4.0.0-alpha.10",
52
+ "@jupyterlab/statedb": "^4.0.0-alpha.10",
53
+ "@jupyterlab/statusbar": "^4.0.0-alpha.10",
54
+ "@jupyterlab/translation": "^4.0.0-alpha.10",
55
+ "@jupyterlab/ui-components": "^4.0.0-alpha.25",
54
56
  "@lumino/algorithm": "^1.9.1",
55
- "@lumino/commands": "^1.19.0",
56
- "@lumino/coreutils": "^1.11.1",
57
+ "@lumino/commands": "^1.20.0",
58
+ "@lumino/coreutils": "^1.12.0",
57
59
  "@lumino/disposable": "^1.10.1",
58
60
  "@lumino/domutils": "^1.8.1",
59
61
  "@lumino/messaging": "^1.10.1",
60
62
  "@lumino/signaling": "^1.10.1",
61
63
  "@lumino/virtualdom": "^1.14.1",
62
- "@lumino/widgets": "^1.30.0",
64
+ "@lumino/widgets": "^1.32.0",
63
65
  "@types/react": "^17.0.0",
64
66
  "react": "^17.0.1",
65
- "sanitize-html": "~2.5.3",
66
- "url": "^0.11.0"
67
+ "sanitize-html": "~2.5.3"
67
68
  },
68
69
  "devDependencies": {
69
- "@jupyterlab/testutils": "^4.0.0-alpha.1",
70
+ "@jupyterlab/testutils": "^4.0.0-alpha.10",
70
71
  "@types/jest": "^26.0.10",
71
72
  "@types/sanitize-html": "^2.3.1",
72
73
  "jest": "^26.4.2",
73
74
  "rimraf": "~3.0.0",
74
75
  "ts-jest": "^26.3.0",
75
- "typedoc": "~0.21.2",
76
- "typescript": "~4.1.3"
76
+ "typedoc": "~0.22.10",
77
+ "typescript": "~4.6.3"
77
78
  },
78
79
  "publishConfig": {
79
80
  "access": "public"
package/style/base.css CHANGED
@@ -6,7 +6,6 @@
6
6
 
7
7
  @import './commandpalette.css';
8
8
  @import './dialog.css';
9
- @import './hoverbox.css';
10
9
  @import './inputdialog.css';
11
10
  @import './mainareawidget.css';
12
11
  @import './materialcolors.css';
@@ -16,9 +16,10 @@
16
16
  |----------------------------------------------------------------------------*/
17
17
 
18
18
  .lm-CommandPalette {
19
- padding-bottom: 0px;
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: 0px 9px;
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 5px;
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: 0px;
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:after {
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: 0px 8px;
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: 0px;
15
- left: 0px;
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 24px;
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: 0px;
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: 0px;
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: 0px 16px;
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
@@ -6,5 +6,6 @@
6
6
  /* This file was auto-generated by ensurePackage() in @jupyterlab/buildutils */
7
7
  import '@lumino/widgets/style/index.js';
8
8
  import '@jupyterlab/ui-components/style/index.js';
9
+ import '@jupyterlab/statusbar/style/index.js';
9
10
 
10
11
  import './base.css';
@@ -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: #aa00ff;
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: #ffff00;
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: #eeeeee;
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: ClientRect;
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
- }
package/lib/hoverbox.js DELETED
@@ -1,100 +0,0 @@
1
- // Copyright (c) Jupyter Development Team.
2
- // Distributed under the terms of the Modified BSD License.
3
- /**
4
- * The class name added to all hover boxes.
5
- */
6
- const HOVERBOX_CLASS = 'jp-HoverBox';
7
- /**
8
- * The class name added to a hovering node that is scrolled out of view.
9
- */
10
- const OUTOFVIEW_CLASS = 'jp-mod-outofview';
11
- /**
12
- * A namespace for `HoverBox` members.
13
- */
14
- export var HoverBox;
15
- (function (HoverBox) {
16
- /**
17
- * Set the visible dimensions of a hovering box anchored to an editor cursor.
18
- *
19
- * @param options - The hover box geometry calculation options.
20
- */
21
- function setGeometry(options) {
22
- const { anchor, host, node, privilege } = options;
23
- // Add hover box class if it does not exist.
24
- node.classList.add(HOVERBOX_CLASS);
25
- // Hide the hover box before querying the DOM for the anchor coordinates.
26
- node.classList.add(OUTOFVIEW_CLASS);
27
- // If the current coordinates are not visible, bail.
28
- if (!host.contains(document.elementFromPoint(anchor.left, anchor.top))) {
29
- return;
30
- }
31
- // Clear any previously set max-height.
32
- node.style.maxHeight = '';
33
- // Clear any programmatically set margin-top.
34
- node.style.marginTop = '';
35
- // Make sure the node is visible so that its dimensions can be queried.
36
- node.classList.remove(OUTOFVIEW_CLASS);
37
- const style = options.style || window.getComputedStyle(node);
38
- const innerHeight = window.innerHeight;
39
- const spaceAbove = anchor.top;
40
- const spaceBelow = innerHeight - anchor.bottom;
41
- const marginTop = parseInt(style.marginTop, 10) || 0;
42
- const minHeight = parseInt(style.minHeight, 10) || options.minHeight;
43
- let maxHeight = parseInt(style.maxHeight, 10) || options.maxHeight;
44
- // Determine whether to render above or below; check privilege.
45
- const renderBelow = privilege === 'forceAbove'
46
- ? false
47
- : privilege === 'forceBelow'
48
- ? true
49
- : privilege === 'above'
50
- ? spaceAbove < maxHeight && spaceAbove < spaceBelow
51
- : spaceBelow >= maxHeight || spaceBelow >= spaceAbove;
52
- if (renderBelow) {
53
- maxHeight = Math.min(spaceBelow - marginTop, maxHeight);
54
- }
55
- else {
56
- maxHeight = Math.min(spaceAbove, maxHeight);
57
- // If the box renders above the text, its top margin is irrelevant.
58
- node.style.marginTop = '0px';
59
- }
60
- node.style.maxHeight = `${maxHeight}px`;
61
- // Make sure the box ought to be visible.
62
- const withinBounds = maxHeight > minHeight &&
63
- (spaceBelow >= minHeight || spaceAbove >= minHeight);
64
- if (!withinBounds) {
65
- node.classList.add(OUTOFVIEW_CLASS);
66
- return;
67
- }
68
- // Position the box vertically.
69
- const offsetAbove = (options.offset &&
70
- options.offset.vertical &&
71
- options.offset.vertical.above) ||
72
- 0;
73
- const offsetBelow = (options.offset &&
74
- options.offset.vertical &&
75
- options.offset.vertical.below) ||
76
- 0;
77
- const top = renderBelow
78
- ? innerHeight - spaceBelow + offsetBelow
79
- : spaceAbove - node.getBoundingClientRect().height + offsetAbove;
80
- node.style.top = `${Math.floor(top)}px`;
81
- // Position the box horizontally.
82
- const offsetHorizontal = (options.offset && options.offset.horizontal) || 0;
83
- let left = anchor.left + offsetHorizontal;
84
- node.style.left = `${Math.ceil(left)}px`;
85
- node.style.width = 'auto';
86
- // Expand the menu width by the scrollbar size, if present.
87
- if (node.scrollHeight >= maxHeight) {
88
- node.style.width = `${2 * node.offsetWidth - node.clientWidth}`;
89
- node.scrollTop = 0;
90
- }
91
- // Move left to fit in the window.
92
- const right = node.getBoundingClientRect().right;
93
- if (right > window.innerWidth) {
94
- left -= right - window.innerWidth;
95
- node.style.left = `${Math.ceil(left)}px`;
96
- }
97
- }
98
- HoverBox.setGeometry = setGeometry;
99
- })(HoverBox || (HoverBox = {}));
100
- //# sourceMappingURL=hoverbox.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hoverbox.js","sourceRoot":"","sources":["../src/hoverbox.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D;;GAEG;AACH,MAAM,cAAc,GAAG,aAAa,CAAC;AAErC;;GAEG;AACH,MAAM,eAAe,GAAG,kBAAkB,CAAC;AAE3C;;GAEG;AACH,MAAM,KAAW,QAAQ,CAmLxB;AAnLD,WAAiB,QAAQ;IA6EvB;;;;OAIG;IACH,SAAgB,WAAW,CAAC,OAAiB;QAC3C,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC;QAElD,4CAA4C;QAC5C,IAAI,C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G,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC;QAExC,iCAAiC;QACjC,MAAM,gBAAgB,GAAG,CAAC,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAC5E,IAAI,IAAI,GAAG,MAAM,CAAC,IAAI,GAAG,gBAAgB,CAAC;QAE1C,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;QACzC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC;QAE1B,2DAA2D;QAC3D,IAAI,IAAI,CAAC,YAAY,IAAI,SAAS,EAAE;YAClC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;YAChE,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;SACpB;QAED,kCAAkC;QAClC,MAAM,KAAK,GAAG,IAAI,CAAC,qBAAqB,EAAE,CAAC,KAAK,CAAC;QACjD,IAAI,KAAK,GAAG,MAAM,CAAC,UAAU,EAAE;YAC7B,IAAI,IAAI,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC;YAClC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;SAC1C;IACH,CAAC;IAhGe,oBAAW,cAgG1B,CAAA;AACH,CAAC,EAnLgB,QAAQ,KAAR,QAAQ,QAmLxB"}
@@ -1,13 +0,0 @@
1
- /*-----------------------------------------------------------------------------
2
- | Copyright (c) 2014-2016, Jupyter Development Team.
3
- |
4
- | Distributed under the terms of the Modified BSD License.
5
- |----------------------------------------------------------------------------*/
6
-
7
- .jp-HoverBox {
8
- position: fixed;
9
- }
10
-
11
- .jp-HoverBox.jp-mod-outofview {
12
- display: none;
13
- }