@theia/core 1.21.0-next.24 → 1.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.md +3 -4
  2. package/lib/browser/common-frontend-contribution.d.ts +2 -0
  3. package/lib/browser/common-frontend-contribution.d.ts.map +1 -1
  4. package/lib/browser/common-frontend-contribution.js +17 -1
  5. package/lib/browser/common-frontend-contribution.js.map +1 -1
  6. package/lib/browser/core-preferences.d.ts +2 -0
  7. package/lib/browser/core-preferences.d.ts.map +1 -1
  8. package/lib/browser/core-preferences.js +14 -0
  9. package/lib/browser/core-preferences.js.map +1 -1
  10. package/lib/browser/decoration-style.d.ts +21 -0
  11. package/lib/browser/decoration-style.d.ts.map +1 -0
  12. package/lib/browser/decoration-style.js +61 -0
  13. package/lib/browser/decoration-style.js.map +1 -0
  14. package/lib/browser/index.d.ts +1 -0
  15. package/lib/browser/index.d.ts.map +1 -1
  16. package/lib/browser/index.js +1 -0
  17. package/lib/browser/index.js.map +1 -1
  18. package/lib/browser/shell/application-shell.d.ts.map +1 -1
  19. package/lib/browser/shell/application-shell.js +5 -2
  20. package/lib/browser/shell/application-shell.js.map +1 -1
  21. package/lib/browser/view-container.d.ts +6 -0
  22. package/lib/browser/view-container.d.ts.map +1 -1
  23. package/lib/browser/view-container.js +27 -0
  24. package/lib/browser/view-container.js.map +1 -1
  25. package/lib/common/lsp-types.d.ts +1 -1
  26. package/lib/common/lsp-types.d.ts.map +1 -1
  27. package/lib/common/lsp-types.js +2 -2
  28. package/lib/common/lsp-types.js.map +1 -1
  29. package/lib/common/severity.d.ts +1 -1
  30. package/lib/common/severity.d.ts.map +1 -1
  31. package/lib/common/severity.js +7 -7
  32. package/lib/common/severity.js.map +1 -1
  33. package/lib/electron-browser/window/electron-window-service.d.ts +1 -1
  34. package/lib/electron-browser/window/electron-window-service.js +1 -1
  35. package/package.json +7 -7
  36. package/src/browser/common-frontend-contribution.ts +21 -1
  37. package/src/browser/core-preferences.ts +16 -0
  38. package/src/browser/decoration-style.ts +61 -0
  39. package/src/browser/index.ts +1 -0
  40. package/src/browser/shell/application-shell.ts +5 -2
  41. package/src/browser/style/dockpanel.css +24 -0
  42. package/src/browser/style/view-container.css +28 -3
  43. package/src/browser/view-container.ts +30 -0
  44. package/src/common/lsp-types.ts +1 -1
  45. package/src/common/severity.ts +1 -1
  46. package/src/electron-browser/window/electron-window-service.ts +1 -1
  47. package/shared/vscode-languageserver-types.d.ts +0 -1
  48. package/shared/vscode-languageserver-types.js +0 -1
@@ -36,16 +36,41 @@
36
36
  min-height: var(--theia-content-line-height);
37
37
  }
38
38
 
39
- .theia-view-container > .p-SplitPanel > .p-SplitPanel-handle:after {
40
- background-color: var(--theia-sideBarSectionHeader-border);
39
+ .theia-view-container > .p-SplitPanel > .p-SplitPanel-handle::after {
41
40
  min-height: 2px;
42
- min-width: 2px
41
+ min-width: 2px;
43
42
  }
44
43
 
45
44
  .theia-view-container > .p-SplitPanel > .p-SplitPanel-handle {
46
45
  background-color: var(--theia-sideBarSectionHeader-border);
47
46
  }
48
47
 
48
+ .p-SplitPanel > .p-SplitPanel-handle:hover::after {
49
+ background-color: var(--theia-sash-hoverBorder);
50
+ transition-delay: var(--theia-sash-hoverDelay);
51
+ }
52
+
53
+ .p-SplitPanel > .p-SplitPanel-handle:active::after {
54
+ background-color: var(--theia-sash-activeBorder);
55
+ transition-delay: 0s !important;
56
+ }
57
+
58
+ .p-SplitPanel[data-orientation='horizontal'] > .p-SplitPanel-handle::after {
59
+ min-width: var(--theia-sash-width);
60
+ }
61
+
62
+ .p-SplitPanel[data-orientation='vertical'] > .p-SplitPanel-handle::after {
63
+ min-height: var(--theia-sash-width);
64
+ }
65
+
66
+ .p-SplitPanel[data-orientation='vertical'] > .p-SplitPanel-handle.sash-hidden {
67
+ visibility: hidden;
68
+ }
69
+
70
+ .p-SplitPanel[data-orientation='vertical'] > .p-SplitPanel-handle.sash-hidden::after {
71
+ min-height: 0px;
72
+ }
73
+
49
74
  .theia-view-container .part {
50
75
  height: 100%;
51
76
  }
@@ -46,6 +46,11 @@ export interface ViewContainerTitleOptions {
46
46
  closeable?: boolean;
47
47
  }
48
48
 
49
+ enum SashType {
50
+ TopSash = 'top-sash',
51
+ BottomSash = 'bottom-sash'
52
+ }
53
+
49
54
  @injectable()
50
55
  export class ViewContainerIdentifier {
51
56
  id: string;
@@ -994,6 +999,11 @@ export class ViewContainerPart extends BaseWidget {
994
999
  }
995
1000
  this._collapsed = collapsed;
996
1001
  this.node.classList.toggle('collapsed', collapsed);
1002
+
1003
+ // Update the sashes for the active `horizontal` container when the container is collapsed/expanded
1004
+ this.updateSashState(SashType.TopSash, this.node.previousElementSibling, collapsed);
1005
+ this.updateSashState(SashType.BottomSash, this.node.nextElementSibling, collapsed);
1006
+
997
1007
  if (collapsed && this.wrapped.node.contains(document.activeElement)) {
998
1008
  this.header.focus();
999
1009
  }
@@ -1230,6 +1240,26 @@ export class ViewContainerPart extends BaseWidget {
1230
1240
  }
1231
1241
  }
1232
1242
 
1243
+ protected updateSashState(sashType: SashType, sashElement: Element | null, activeContainerCollapsed: boolean): void {
1244
+ if (sashElement && sashElement.className.includes('p-SplitPanel-handle')) {
1245
+ // Hide the sash when the active `horizontal` container in the left panel is collapsed
1246
+ sashElement.classList.toggle('sash-hidden', activeContainerCollapsed);
1247
+
1248
+ let adjacentContainer: Element | null;
1249
+ if (sashType === SashType.TopSash) {
1250
+ adjacentContainer = sashElement.previousElementSibling;
1251
+ } else {
1252
+ adjacentContainer = sashElement.nextElementSibling;
1253
+ }
1254
+
1255
+ // Sash should only appear when the following two conditions are met:
1256
+ // 1. the active `horizontal` container is expanded
1257
+ // 2. the container that is above/below the active `horizontal` container is also expanded
1258
+ if (!activeContainerCollapsed && adjacentContainer) {
1259
+ sashElement.classList.toggle('sash-hidden', adjacentContainer.className.includes('collapsed'));
1260
+ }
1261
+ }
1262
+ }
1233
1263
  }
1234
1264
 
1235
1265
  export namespace ViewContainerPart {
@@ -14,7 +14,7 @@
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
16
 
17
- import { Range } from 'vscode-languageserver-types';
17
+ import { Range } from 'vscode-languageserver-protocol';
18
18
 
19
19
  export interface TextDocumentContentChangeDelta {
20
20
  readonly range: Range;
@@ -19,7 +19,7 @@
19
19
  * Licensed under the MIT License. See License.txt in the project root for license information.
20
20
  *--------------------------------------------------------------------------------------------*/
21
21
 
22
- import { DiagnosticSeverity } from 'vscode-languageserver-types';
22
+ import { DiagnosticSeverity } from 'vscode-languageserver-protocol';
23
23
 
24
24
  export enum Severity {
25
25
  Ignore = 0,
@@ -68,7 +68,7 @@ export class ElectronWindowService extends DefaultWindowService {
68
68
  /**
69
69
  * Run when ElectronMain detects a `close` event and emits a `close-requested` event.
70
70
  * Should send an event to `electron.ipcRenderer` on the event's `confirmChannel` if it is safe to exit
71
- * after running FrontentApplication `onWillStop` handlers or on the `cancelChannel` if it is not safe to exit.
71
+ * after running FrontendApplication `onWillStop` handlers or on the `cancelChannel` if it is not safe to exit.
72
72
  */
73
73
  protected async handleCloseRequestedEvent(event: CloseRequestArguments): Promise<void> {
74
74
  const safeToClose = await this.isSafeToShutDown();
@@ -1 +0,0 @@
1
- export * from 'vscode-languageserver-types';
@@ -1 +0,0 @@
1
- module.exports = require('vscode-languageserver-types');