@theia/core 1.63.3 → 1.64.0-next.17

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 (42) hide show
  1. package/README.md +7 -7
  2. package/lib/browser/catalog.json +2 -3
  3. package/lib/browser/hover-service.d.ts +9 -3
  4. package/lib/browser/hover-service.d.ts.map +1 -1
  5. package/lib/browser/hover-service.js +25 -13
  6. package/lib/browser/hover-service.js.map +1 -1
  7. package/lib/browser/shell/tab-bar-toolbar/tab-toolbar-item.d.ts.map +1 -1
  8. package/lib/browser/shell/tab-bar-toolbar/tab-toolbar-item.js +5 -0
  9. package/lib/browser/shell/tab-bar-toolbar/tab-toolbar-item.js.map +1 -1
  10. package/lib/browser/status-bar/status-bar.d.ts +2 -1
  11. package/lib/browser/status-bar/status-bar.d.ts.map +1 -1
  12. package/lib/browser/status-bar/status-bar.js +14 -7
  13. package/lib/browser/status-bar/status-bar.js.map +1 -1
  14. package/lib/browser/tree/tree-widget.d.ts +2 -0
  15. package/lib/browser/tree/tree-widget.d.ts.map +1 -1
  16. package/lib/browser/tree/tree-widget.js +8 -3
  17. package/lib/browser/tree/tree-widget.js.map +1 -1
  18. package/lib/browser/widgets/alert-message.js +1 -2
  19. package/lib/browser/widgets/alert-message.js.map +1 -1
  20. package/lib/browser/widgets/select-component.d.ts +2 -0
  21. package/lib/browser/widgets/select-component.d.ts.map +1 -1
  22. package/lib/browser/widgets/select-component.js +1 -1
  23. package/lib/browser/widgets/select-component.js.map +1 -1
  24. package/package.json +6 -6
  25. package/src/browser/hover-service.ts +31 -13
  26. package/src/browser/shell/tab-bar-toolbar/tab-toolbar-item.tsx +8 -0
  27. package/src/browser/status-bar/status-bar.tsx +14 -7
  28. package/src/browser/style/alert-messages.css +20 -17
  29. package/src/browser/style/breadcrumbs.css +1 -2
  30. package/src/browser/style/dialog.css +3 -2
  31. package/src/browser/style/index.css +5 -3
  32. package/src/browser/style/progress-bar.css +3 -0
  33. package/src/browser/style/select-component.css +1 -4
  34. package/src/browser/style/sidepanel.css +10 -14
  35. package/src/browser/style/split-widget.css +4 -0
  36. package/src/browser/style/status-bar.css +23 -20
  37. package/src/browser/style/tabs.css +15 -13
  38. package/src/browser/style/tree.css +5 -3
  39. package/src/browser/style/view-container.css +3 -7
  40. package/src/browser/tree/tree-widget.tsx +11 -2
  41. package/src/browser/widgets/alert-message.tsx +2 -2
  42. package/src/browser/widgets/select-component.tsx +4 -1
@@ -123,8 +123,10 @@ blockquote {
123
123
  font-family: var(--theia-ui-font-family);
124
124
  font-size: var(--theia-ui-font-size1);
125
125
  line-height: var(--theia-content-line-height);
126
- padding-left: 5px;
126
+ padding: 3px 0 3px 8px;
127
127
  border-radius: 2px;
128
+ min-height: 28px;
129
+ box-sizing: border-box;
128
130
  }
129
131
 
130
132
  .theia-input[type="text"] {
@@ -248,7 +250,7 @@ blockquote {
248
250
 
249
251
  .action-label {
250
252
  padding: 2px;
251
- border-radius: 5px;
253
+ border-radius: 4px;
252
254
  cursor: pointer;
253
255
  }
254
256
 
@@ -262,7 +264,7 @@ blockquote {
262
264
  min-width: 65px;
263
265
  outline: none;
264
266
  cursor: pointer;
265
- padding: 4px 9px;
267
+ padding: 6px 9px;
266
268
  margin-left: calc(var(--theia-ui-padding) * 2);
267
269
  border-radius: 2px;
268
270
  }
@@ -15,6 +15,9 @@
15
15
  ********************************************************************************/
16
16
 
17
17
  .theia-progress-bar-container {
18
+ position: absolute;
19
+ top: -2px;
20
+ left: 0;
18
21
  width: 100%;
19
22
  height: 2px;
20
23
  }
@@ -43,10 +43,6 @@
43
43
  overflow: hidden;
44
44
  }
45
45
 
46
- .theia-select-component:focus {
47
- outline-color: var(--theia-focusBorder);
48
- }
49
-
50
46
  .theia-select-component-dropdown {
51
47
  font-family: var(--theia-ui-font-family);
52
48
  font-size: var(--theia-ui-font-size1);
@@ -57,6 +53,7 @@
57
53
  user-select: none;
58
54
  overflow: auto;
59
55
  border-radius: 2px;
56
+ margin-top: 2px;
60
57
  }
61
58
 
62
59
  .theia-select-component-dropdown .theia-select-component-option {
@@ -35,7 +35,6 @@
35
35
  .lm-TabBar.theia-app-sides {
36
36
  display: block;
37
37
  color: var(--theia-activityBar-inactiveForeground);
38
- background: var(--theia-activityBar-background);
39
38
  font-size: var(--theia-ui-font-size1);
40
39
  min-width: var(--theia-private-sidebar-tab-width);
41
40
  max-width: var(--theia-private-sidebar-tab-width);
@@ -52,7 +51,6 @@
52
51
 
53
52
  .lm-TabBar.theia-app-sides .lm-TabBar-tab {
54
53
  position: relative;
55
- background: var(--theia-activityBar-background);
56
54
  flex-direction: column;
57
55
  justify-content: center;
58
56
  align-items: center;
@@ -146,6 +144,14 @@
146
144
  max-width: var(--theia-private-sidebar-tab-width);
147
145
  }
148
146
 
147
+ #theia-left-content-panel.theia-mod-collapsed .theia-app-sidebar-container {
148
+ border-right: none;
149
+ }
150
+
151
+ #theia-right-content-panel.theia-mod-collapsed .theia-app-sidebar-container {
152
+ border-left: none;
153
+ }
154
+
149
155
  #theia-left-content-panel > .lm-Panel {
150
156
  border-right: var(--theia-panel-border-width) solid
151
157
  var(--theia-activityBar-border);
@@ -326,13 +332,9 @@
326
332
  |----------------------------------------------------------------------------*/
327
333
 
328
334
  .theia-sidepanel-toolbar {
329
- min-height: calc(
330
- var(--theia-private-horizontal-tab-height) +
331
- var(--theia-private-horizontal-tab-scrollbar-rail-height) / 2
332
- );
333
335
  display: flex;
334
- padding-left: 5px;
335
336
  align-items: center;
337
+ min-height: var(--theia-horizontal-toolbar-height);
336
338
  background-color: var(--theia-sideBar-background);
337
339
  overflow: hidden;
338
340
  }
@@ -340,7 +342,7 @@
340
342
  .theia-sidepanel-toolbar .theia-sidepanel-title {
341
343
  color: var(--theia-settings-headerForeground);
342
344
  flex: 1;
343
- margin-left: 14px;
345
+ margin-left: calc(var(--theia-ui-padding) * 3);
344
346
  text-transform: uppercase;
345
347
  font-size: var(--theia-ui-font-size0);
346
348
  min-width: 1rem;
@@ -350,12 +352,6 @@
350
352
  color: var(--theia-icon-foreground);
351
353
  }
352
354
 
353
- .theia-sidepanel-toolbar .lm-TabBar-toolbar .item > div {
354
- height: 18px;
355
- width: 18px;
356
- background-repeat: no-repeat;
357
- }
358
-
359
355
  .noWrapInfo {
360
356
  white-space: nowrap;
361
357
  overflow: hidden;
@@ -25,6 +25,10 @@
25
25
  min-height: var(--theia-content-line-height);
26
26
  }
27
27
 
28
+ .lm-SplitPanel-handle {
29
+ z-index: 6; /* Upper than the minimap */
30
+ }
31
+
28
32
  .theia-split-widget > .lm-SplitPanel > .lm-SplitPanel-handle {
29
33
  box-sizing: border-box;
30
34
  }
@@ -37,60 +37,63 @@ body.theia-no-open-workspace #theia-statusBar {
37
37
  flex: 1;
38
38
  display: flex;
39
39
  align-items: stretch;
40
+ gap: var(--theia-ui-padding)
40
41
  }
41
42
 
42
43
  #theia-statusBar .area.left {
43
44
  justify-content: flex-start;
45
+ padding-left: var(--theia-ui-padding);
44
46
  }
45
47
 
46
48
  #theia-statusBar .area.right {
47
49
  justify-content: flex-end;
48
- padding-right: calc(var(--theia-ui-padding) * 2);
50
+ padding-right: var(--theia-ui-padding);
49
51
  }
50
52
 
51
53
  #theia-statusBar .area .element {
52
54
  color: var(--theia-statusBar-foreground);
53
55
  display: flex;
54
56
  align-items: center;
57
+ justify-content: center;
55
58
  font-size: var(--theia-statusBar-font-size);
59
+ min-width: var(--theia-statusBar-height);
56
60
  }
57
61
 
58
62
  #theia-statusBar .area.left .element.has-background {
59
- margin-left: 0px;
60
- margin-right: 3px;
61
- padding-left: 7px;
62
- padding-right: 7px;
63
+ padding-inline: var(--theia-ui-padding);
63
64
  }
64
- #theia-statusBar .area .element>* {
65
- margin-left: calc(var(--theia-ui-padding)/2);
65
+
66
+ #theia-statusBar .area.left .element.has-background {
67
+ margin-left: calc(-1 * var(--theia-ui-padding));
66
68
  }
67
69
 
70
+ /* Icons */
68
71
  #theia-statusBar .area .element .codicon {
69
72
  /* Scaling down codicons from 16 to 14 pixels */
70
73
  font-size: 14px;
74
+ margin: auto;
71
75
  }
72
76
 
73
- #theia-statusBar .area .element > *:last-child {
74
- margin-right: calc(var(--theia-ui-padding) / 2);
77
+ /* Icon with text */
78
+ #theia-statusBar .area .element .codicon:has(+ span) {
79
+ margin-inline: calc(var(--theia-ui-padding) / 2);
75
80
  }
76
81
 
77
- .theia-mod-offline #theia-statusBar {
78
- background-color: var(--theia-statusBar-offlineBackground) !important;
82
+ /* Text labels */
83
+ #theia-statusBar .area .element>span:not(.codicon) {
84
+ margin-inline: calc(var(--theia-ui-padding) / 2)
79
85
  }
80
86
 
81
- .theia-mod-offline #theia-statusBar .area .element {
82
- color: var(--theia-statusBar-offlineForeground) !important;
87
+ #theia-statusBar .area .element>span:not(.codicon):empty {
88
+ display: none;
83
89
  }
84
90
 
85
- #theia-statusBar .area.left .element:first-child:not(.has-background) {
86
- margin-left: calc(var(--theia-ui-padding) * 3);
87
- }
88
- #theia-statusBar .area.left .element {
89
- margin-right: var(--theia-ui-padding);
91
+ .theia-mod-offline #theia-statusBar {
92
+ background-color: var(--theia-statusBar-offlineBackground) !important;
90
93
  }
91
94
 
92
- #theia-statusBar .area.right .element {
93
- margin-left: var(--theia-ui-padding);
95
+ .theia-mod-offline #theia-statusBar .area .element {
96
+ color: var(--theia-statusBar-offlineForeground) !important;
94
97
  }
95
98
 
96
99
  #theia-statusBar .area.right .element.compact-right,
@@ -4,12 +4,12 @@
4
4
 
5
5
  :root {
6
6
  /* These need to be root because tabs get attached to the body during dragging. */
7
- --theia-private-horizontal-tab-height: 28.5px;
7
+ --theia-private-horizontal-tab-height: 35px;
8
+ --theia-horizontal-toolbar-height: var(--theia-private-horizontal-tab-height);
8
9
  --theia-private-horizontal-tab-scrollbar-rail-height: 7px;
9
10
  --theia-private-horizontal-tab-scrollbar-height: 5px;
10
11
  --theia-tabbar-toolbar-z-index: 1001;
11
12
  --theia-toolbar-active-transform-scale: 1.272019649;
12
- --theia-horizontal-toolbar-height: calc(var(--theia-private-horizontal-tab-height) + var(--theia-private-horizontal-tab-scrollbar-rail-height) / 2);
13
13
  --theia-dragover-tab-border-width: 2px;
14
14
  }
15
15
 
@@ -32,8 +32,8 @@
32
32
  .lm-TabBar[data-orientation="horizontal"] .lm-TabBar-tab {
33
33
  flex: none;
34
34
  height: var(--theia-horizontal-toolbar-height);
35
+ line-height: var(--theia-horizontal-toolbar-height);
35
36
  min-width: 35px;
36
- line-height: var(--theia-private-horizontal-tab-height);
37
37
  padding: 0px 8px;
38
38
  align-items: center;
39
39
  overflow: hidden;
@@ -221,7 +221,6 @@
221
221
  .lm-TabBar.theia-app-centers .lm-TabBar-tab.lm-mod-closable>.lm-TabBar-tabCloseIcon,
222
222
  .lm-TabBar.theia-app-centers .lm-TabBar-tab.theia-mod-pinned>.lm-TabBar-tabCloseIcon {
223
223
  padding: 2px;
224
- margin-top: 2px;
225
224
  margin-left: 4px;
226
225
  height: var(--theia-icon-size);
227
226
  width: var(--theia-icon-size);
@@ -328,7 +327,8 @@
328
327
  |----------------------------------------------------------------------------*/
329
328
 
330
329
  .lm-TabBar[data-orientation="horizontal"] .lm-TabBar-content-container>.ps__rail-x {
331
- height: var(--theia-private-horizontal-tab-scrollbar-rail-height);
330
+ height: var(--theia-private-horizontal-tab-scrollbar-rail-height) !important;
331
+ background: transparent !important;
332
332
  z-index: 1000;
333
333
  }
334
334
 
@@ -384,9 +384,10 @@
384
384
  /* Due to the scrollbar (`z-index: 1000;`) it has a greater `z-index`. */
385
385
  display: flex;
386
386
  flex-direction: row-reverse;
387
- padding: 4px;
388
- padding-left: 0px;
389
- margin-right: 4px;
387
+ align-items: center;
388
+ justify-content: center;
389
+ padding-inline: var(--theia-ui-padding);
390
+ gap: 2px;
390
391
  }
391
392
 
392
393
  .lm-TabBar-content-container {
@@ -402,7 +403,7 @@
402
403
  display: flex;
403
404
  flex-direction: row;
404
405
  column-gap: 0px;
405
- align-items: centery;
406
+ align-items: center;
406
407
  }
407
408
 
408
409
  .lm-TabBar-toolbar .item>div {
@@ -414,7 +415,7 @@
414
415
  cursor: pointer;
415
416
  }
416
417
 
417
- .lm-TabBar-toolbar :not(.item.enabled) .action-label {
418
+ .lm-TabBar-toolbar > :not(.item.enabled) > .action-label {
418
419
  background: transparent;
419
420
  cursor: default;
420
421
  }
@@ -425,10 +426,10 @@
425
426
  }
426
427
 
427
428
  .lm-TabBar-toolbar .item>div {
428
- line-height: calc(var(--theia-icon-size) + 2px);
429
- height: calc(var(--theia-icon-size) + 2px);
429
+ min-width: var(--theia-icon-size);
430
+ height: var(--theia-icon-size);
431
+ line-height: var(--theia-icon-size);
430
432
  background-repeat: no-repeat;
431
- line-height: 18px;
432
433
  }
433
434
 
434
435
  .lm-TabBar-toolbar .item>div.no-icon {
@@ -492,6 +493,7 @@
492
493
 
493
494
  .lm-TabBar[data-orientation="horizontal"] .lm-TabBar-content {
494
495
  flex-direction: row;
496
+ min-height: var(--theia-horizontal-toolbar-height);
495
497
  }
496
498
 
497
499
  .lm-TabBar[data-orientation="vertical"] .lm-TabBar-content {
@@ -73,14 +73,16 @@
73
73
  .theia-TreeNodeContent {
74
74
  display: flex;
75
75
  align-items: center;
76
- width: calc(100% - var(--theia-scrollbar-rail-width));
76
+ width: 100%;
77
+ padding-right: var(--theia-ui-padding);
78
+ box-sizing: border-box;
77
79
  }
78
80
 
79
81
  .theia-ExpansionToggle {
80
82
  display: flex;
81
83
  justify-content: center;
82
- padding-left: calc(var(--theia-ui-padding) / 2);
83
- padding-right: calc(var(--theia-ui-padding) / 2);
84
+ padding-left: calc(var(--theia-ui-padding) / 3);
85
+ padding-right: calc(var(--theia-ui-padding) / 3);
84
86
  min-width: var(--theia-icon-size);
85
87
  min-height: var(--theia-icon-size);
86
88
  }
@@ -15,7 +15,7 @@
15
15
  ********************************************************************************/
16
16
 
17
17
  :root {
18
- --theia-view-container-title-height: var(--theia-content-line-height);
18
+ --theia-view-container-title-height: 24px;
19
19
  --theia-view-container-content-height: calc(100% - var(--theia-view-container-title-height));
20
20
  }
21
21
 
@@ -82,10 +82,6 @@
82
82
  box-shadow: none;
83
83
  }
84
84
 
85
- .theia-view-container-part-header .theia-ExpansionToggle {
86
- padding-left: 4px;
87
- }
88
-
89
85
  .theia-view-container>.lm-SplitPanel[data-orientation="horizontal"] .part>.theia-header .theia-ExpansionToggle::before {
90
86
  display: none;
91
87
  padding-left: 0px;
@@ -114,7 +110,7 @@
114
110
  }
115
111
 
116
112
  .theia-view-container-part-header .notification-count-container {
117
- margin-right: 12px;
113
+ margin-right: var(--theia-ui-padding);
118
114
  }
119
115
 
120
116
  .theia-view-container .part>.body {
@@ -156,7 +152,7 @@
156
152
  .lm-TabBar-toolbar.theia-view-container-part-title {
157
153
  overflow: visible !important;
158
154
  padding: 0px;
159
- padding-right: calc(var(--theia-ui-padding) * 2 / 3);
155
+ padding-right: var(--theia-ui-padding);
160
156
  }
161
157
 
162
158
  .theia-view-container-part-title {
@@ -81,6 +81,8 @@ export interface TreeScrollEvent {
81
81
  export interface TreeScrollState {
82
82
  readonly scrollTop: number;
83
83
  readonly isAtBottom: boolean;
84
+ readonly scrollHeight?: number;
85
+ readonly clientHeight?: number;
84
86
  }
85
87
 
86
88
  export const TreeProps = Symbol('TreeProps');
@@ -1643,7 +1645,7 @@ export namespace TreeWidget {
1643
1645
  }
1644
1646
  export class View extends React.Component<ViewProps> {
1645
1647
  list: VirtuosoHandle | undefined;
1646
- private lastScrollState: TreeScrollState = { scrollTop: 0, isAtBottom: true };
1648
+ private lastScrollState: TreeScrollState = { scrollTop: 0, isAtBottom: true, scrollHeight: 0, clientHeight: 0 };
1647
1649
 
1648
1650
  override render(): React.ReactNode {
1649
1651
  const { rows, width, height, scrollToRow, renderNodeRow, onScrollEmitter, ...other } = this.props;
@@ -1665,9 +1667,16 @@ export namespace TreeWidget {
1665
1667
  const isAtBottom = scrollHeight - scrollTop - clientHeight <= SCROLL_BOTTOM_THRESHOLD;
1666
1668
 
1667
1669
  // Store scroll state before firing the event to prevent jitter during inference and scrolling
1668
- this.lastScrollState = { scrollTop, isAtBottom };
1670
+ this.lastScrollState = { scrollTop, isAtBottom, scrollHeight, clientHeight };
1669
1671
  onScrollEmitter?.fire({ scrollTop, scrollLeft: e.target.scrollLeft || 0 });
1670
1672
  }}
1673
+ atBottomStateChange={(atBottom: boolean) => {
1674
+ this.lastScrollState = {
1675
+ ...this.lastScrollState,
1676
+ isAtBottom: atBottom
1677
+ };
1678
+ }}
1679
+ atBottomThreshold={SCROLL_BOTTOM_THRESHOLD}
1671
1680
  totalCount={rows.length}
1672
1681
  itemContent={index => renderNodeRow(rows[index])}
1673
1682
  width={width}
@@ -43,9 +43,9 @@ export class AlertMessage extends React.Component<AlertMessageProps> {
43
43
 
44
44
  override render(): React.ReactNode {
45
45
  return <div className='theia-alert-message-container'>
46
- <div className={`theia-${this.props.type.toLowerCase()}-alert`}>
46
+ <div className={`theia-alert theia-${this.props.type.toLowerCase()}-alert`}>
47
47
  <div className='theia-message-header'>
48
- <i className={AlertMessageIcon[this.props.type]}></i>&nbsp;
48
+ <i className={AlertMessageIcon[this.props.type]}></i>
49
49
  {this.props.header}
50
50
  </div>
51
51
  <div className='theia-message-content'>{this.props.children}</div>
@@ -34,6 +34,8 @@ export interface SelectOption {
34
34
  }
35
35
 
36
36
  export interface SelectComponentProps {
37
+ id?: string
38
+ className?: string
37
39
  options: readonly SelectOption[]
38
40
  defaultValue?: string | number
39
41
  onChange?: (option: SelectOption, index: number) => void,
@@ -193,10 +195,11 @@ export class SelectComponent extends React.Component<SelectComponentProps, Selec
193
195
  const selectedItemLabel = options[selected]?.label ?? options[selected]?.value;
194
196
  return <>
195
197
  <div
198
+ id={this.props.id}
196
199
  key="select-component"
197
200
  ref={this.fieldRef}
198
201
  tabIndex={0}
199
- className="theia-select-component"
202
+ className={`theia-select-component${this.props.className ? ` ${this.props.className}` : ''}`}
200
203
  onClick={e => this.handleClickEvent(e)}
201
204
  onBlur={
202
205
  () => {