@theia/core 1.53.2 → 1.55.0-next.14

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 (70) hide show
  1. package/README.md +9 -9
  2. package/i18n/nls.cs.json +3 -0
  3. package/i18n/nls.de.json +3 -0
  4. package/i18n/nls.es.json +3 -0
  5. package/i18n/nls.fr.json +3 -0
  6. package/i18n/nls.hu.json +3 -0
  7. package/i18n/nls.it.json +3 -0
  8. package/i18n/nls.ja.json +3 -0
  9. package/i18n/nls.json +3 -0
  10. package/i18n/nls.ko.json +3 -0
  11. package/i18n/nls.pl.json +3 -0
  12. package/i18n/nls.pt-br.json +3 -0
  13. package/i18n/nls.ru.json +3 -0
  14. package/i18n/nls.tr.json +3 -0
  15. package/i18n/nls.zh-cn.json +3 -0
  16. package/i18n/nls.zh-tw.json +3 -0
  17. package/lib/browser/authentication-service.d.ts +15 -14
  18. package/lib/browser/authentication-service.d.ts.map +1 -1
  19. package/lib/browser/authentication-service.js +5 -5
  20. package/lib/browser/authentication-service.js.map +1 -1
  21. package/lib/browser/catalog.json +274 -61
  22. package/lib/browser/core-preferences.d.ts.map +1 -1
  23. package/lib/browser/core-preferences.js +9 -0
  24. package/lib/browser/core-preferences.js.map +1 -1
  25. package/lib/browser/frontend-application-module.d.ts.map +1 -1
  26. package/lib/browser/frontend-application-module.js +4 -0
  27. package/lib/browser/frontend-application-module.js.map +1 -1
  28. package/lib/browser/index.d.ts +1 -0
  29. package/lib/browser/index.d.ts.map +1 -1
  30. package/lib/browser/index.js +1 -0
  31. package/lib/browser/index.js.map +1 -1
  32. package/lib/browser/open-with-service.d.ts +13 -1
  33. package/lib/browser/open-with-service.d.ts.map +1 -1
  34. package/lib/browser/open-with-service.js +52 -9
  35. package/lib/browser/open-with-service.js.map +1 -1
  36. package/lib/browser/opener-service.d.ts +3 -0
  37. package/lib/browser/opener-service.d.ts.map +1 -1
  38. package/lib/browser/opener-service.js +13 -1
  39. package/lib/browser/opener-service.js.map +1 -1
  40. package/lib/browser/widget-status-bar-service.d.ts +29 -0
  41. package/lib/browser/widget-status-bar-service.d.ts.map +1 -0
  42. package/lib/browser/widget-status-bar-service.js +81 -0
  43. package/lib/browser/widget-status-bar-service.js.map +1 -0
  44. package/lib/browser/widgets/extractable-widget.js +1 -1
  45. package/lib/browser/widgets/extractable-widget.js.map +1 -1
  46. package/lib/browser/widgets/split-widget.d.ts +2 -3
  47. package/lib/browser/widgets/split-widget.d.ts.map +1 -1
  48. package/lib/browser/widgets/split-widget.js +2 -2
  49. package/lib/browser/widgets/split-widget.js.map +1 -1
  50. package/lib/common/glob.d.ts +4 -4
  51. package/lib/node/logger-cli-contribution.d.ts.map +1 -1
  52. package/lib/node/logger-cli-contribution.js +10 -8
  53. package/lib/node/logger-cli-contribution.js.map +1 -1
  54. package/package.json +8 -8
  55. package/shared/@parcel/watcher/index.d.ts +2 -0
  56. package/shared/@parcel/watcher/index.js +1 -0
  57. package/src/browser/authentication-service.ts +18 -19
  58. package/src/browser/core-preferences.ts +9 -0
  59. package/src/browser/frontend-application-module.ts +5 -0
  60. package/src/browser/index.ts +1 -0
  61. package/src/browser/open-with-service.ts +58 -7
  62. package/src/browser/opener-service.ts +13 -0
  63. package/src/browser/style/tabs.css +55 -138
  64. package/src/browser/widget-status-bar-service.ts +84 -0
  65. package/src/browser/widgets/extractable-widget.ts +1 -1
  66. package/src/browser/widgets/split-widget.ts +1 -2
  67. package/src/common/glob.ts +4 -4
  68. package/src/node/logger-cli-contribution.ts +10 -8
  69. package/shared/nsfw/index.d.ts +0 -2
  70. package/shared/nsfw/index.js +0 -1
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@theia/core",
3
- "version": "1.53.2",
3
+ "version": "1.55.0-next.14+d999fe031",
4
4
  "description": "Theia is a cloud & desktop IDE framework implemented in TypeScript.",
5
5
  "main": "lib/common/index.js",
6
6
  "typings": "lib/common/index.d.ts",
7
7
  "dependencies": {
8
8
  "@babel/runtime": "^7.10.0",
9
+ "@parcel/watcher": "^2.4.1",
9
10
  "@phosphor/algorithm": "1",
10
11
  "@phosphor/commands": "1",
11
12
  "@phosphor/coreutils": "1",
@@ -16,8 +17,8 @@
16
17
  "@phosphor/signaling": "1",
17
18
  "@phosphor/virtualdom": "1",
18
19
  "@phosphor/widgets": "1",
19
- "@theia/application-package": "1.53.2",
20
- "@theia/request": "1.53.2",
20
+ "@theia/application-package": "1.55.0-next.14+d999fe031",
21
+ "@theia/request": "1.55.0-next.14+d999fe031",
21
22
  "@types/body-parser": "^1.16.4",
22
23
  "@types/cookie": "^0.3.3",
23
24
  "@types/dompurify": "^2.2.2",
@@ -57,7 +58,6 @@
57
58
  "lodash.throttle": "^4.1.1",
58
59
  "markdown-it": "^12.3.2",
59
60
  "msgpackr": "^1.10.2",
60
- "nsfw": "^2.2.4",
61
61
  "p-debounce": "^2.1.0",
62
62
  "perfect-scrollbar": "^1.3.0",
63
63
  "react": "^18.2.0",
@@ -119,11 +119,11 @@
119
119
  "vscode-uri"
120
120
  ],
121
121
  "export =": [
122
+ "@parcel/watcher as parcelWatcher",
122
123
  "dompurify as DOMPurify",
123
124
  "express",
124
125
  "lodash.debounce as debounce",
125
126
  "lodash.throttle as throttle",
126
- "nsfw",
127
127
  "markdown-it as markdownit",
128
128
  "react as React",
129
129
  "ws as WebSocket",
@@ -210,13 +210,13 @@
210
210
  "watch": "theiaext watch"
211
211
  },
212
212
  "devDependencies": {
213
- "@theia/ext-scripts": "1.53.2",
214
- "@theia/re-exports": "1.53.2",
213
+ "@theia/ext-scripts": "1.54.0",
214
+ "@theia/re-exports": "1.54.0",
215
215
  "minimist": "^1.2.0",
216
216
  "nodejs-file-downloader": "4.13.0"
217
217
  },
218
218
  "nyc": {
219
219
  "extends": "../../configs/nyc.json"
220
220
  },
221
- "gitHead": "4f6f158bd27c5dd608dddc036910698a51d8c953"
221
+ "gitHead": "d999fe0315a29bc5b154067621dbc1eb180fa567"
222
222
  }
@@ -0,0 +1,2 @@
1
+ import parcelWatcher = require('@parcel/watcher');
2
+ export = parcelWatcher;
@@ -0,0 +1 @@
1
+ module.exports = require('@parcel/watcher');
@@ -32,6 +32,13 @@ export interface AuthenticationSessionAccountInformation {
32
32
  readonly id: string;
33
33
  readonly label: string;
34
34
  }
35
+ export interface AuthenticationProviderSessionOptions {
36
+ /**
37
+ * The account that is being asked about. If this is passed in, the provider should
38
+ * attempt to return the sessions that are only related to this account.
39
+ */
40
+ account?: AuthenticationSessionAccountInformation;
41
+ }
35
42
 
36
43
  export interface AuthenticationSession {
37
44
  id: string;
@@ -82,16 +89,6 @@ export interface AuthenticationProvider {
82
89
 
83
90
  updateSessionItems(event: AuthenticationProviderAuthenticationSessionsChangeEvent): Promise<void>;
84
91
 
85
- /**
86
- * @deprecated use `createSession` instead.
87
- */
88
- login(scopes: string[]): Promise<AuthenticationSession>;
89
-
90
- /**
91
- * @deprecated use `removeSession` instead.
92
- */
93
- logout(sessionId: string): Promise<void>;
94
-
95
92
  /**
96
93
  * An [event](#Event) which fires when the array of sessions has changed, or data
97
94
  * within a session has changed.
@@ -102,16 +99,18 @@ export interface AuthenticationProvider {
102
99
  * Get a list of sessions.
103
100
  * @param scopes An optional list of scopes. If provided, the sessions returned should match
104
101
  * these permissions, otherwise all sessions should be returned.
102
+ * @param account The optional account that you would like to get the session for
105
103
  * @returns A promise that resolves to an array of authentication sessions.
106
104
  */
107
- getSessions(scopes?: string[]): Thenable<ReadonlyArray<AuthenticationSession>>;
105
+ getSessions(scopes: string[] | undefined, account?: AuthenticationSessionAccountInformation): Thenable<ReadonlyArray<AuthenticationSession>>;
108
106
 
109
107
  /**
110
108
  * Prompts a user to login.
111
109
  * @param scopes A list of scopes, permissions, that the new session should be created with.
110
+ * @param options The options for createing the session
112
111
  * @returns A promise that resolves to an authentication session.
113
112
  */
114
- createSession(scopes: string[]): Thenable<AuthenticationSession>;
113
+ createSession(scopes: string[], options: AuthenticationProviderSessionOptions): Thenable<AuthenticationSession>;
115
114
 
116
115
  /**
117
116
  * Removes the session corresponding to session id.
@@ -134,10 +133,10 @@ export interface AuthenticationService {
134
133
 
135
134
  readonly onDidChangeSessions: Event<{ providerId: string, label: string, event: AuthenticationProviderAuthenticationSessionsChangeEvent }>;
136
135
  readonly onDidUpdateSignInCount: Event<number>;
137
- getSessions(providerId: string, scopes?: string[]): Promise<ReadonlyArray<AuthenticationSession>>;
136
+ getSessions(providerId: string, scopes?: string[], user?: AuthenticationSessionAccountInformation): Promise<ReadonlyArray<AuthenticationSession>>;
138
137
  getLabel(providerId: string): string;
139
138
  supportsMultipleAccounts(providerId: string): boolean;
140
- login(providerId: string, scopes: string[]): Promise<AuthenticationSession>;
139
+ login(providerId: string, scopes: string[], options?: AuthenticationProviderSessionOptions): Promise<AuthenticationSession>;
141
140
  logout(providerId: string, sessionId: string): Promise<void>;
142
141
 
143
142
  signOutOfAccount(providerId: string, accountName: string): Promise<void>;
@@ -300,7 +299,7 @@ export class AuthenticationServiceImpl implements AuthenticationService {
300
299
  }
301
300
 
302
301
  const previousSize = this.signInRequestItems.size;
303
- const sessions = await provider.getSessions();
302
+ const sessions = await provider.getSessions(undefined);
304
303
  Object.keys(existingRequestsForProvider).forEach(requestedScopes => {
305
304
  if (sessions.some(session => session.scopes.slice().sort().join('') === requestedScopes)) {
306
305
  const sessionRequest = existingRequestsForProvider[requestedScopes];
@@ -411,19 +410,19 @@ export class AuthenticationServiceImpl implements AuthenticationService {
411
410
  }
412
411
  }
413
412
 
414
- async getSessions(id: string, scopes?: string[]): Promise<ReadonlyArray<AuthenticationSession>> {
413
+ async getSessions(id: string, scopes?: string[], user?: AuthenticationSessionAccountInformation): Promise<ReadonlyArray<AuthenticationSession>> {
415
414
  const authProvider = this.authenticationProviders.get(id);
416
415
  if (authProvider) {
417
- return authProvider.getSessions(scopes);
416
+ return authProvider.getSessions(scopes, user);
418
417
  } else {
419
418
  throw new Error(`No authentication provider '${id}' is currently registered.`);
420
419
  }
421
420
  }
422
421
 
423
- async login(id: string, scopes: string[]): Promise<AuthenticationSession> {
422
+ async login(id: string, scopes: string[], options?: AuthenticationProviderSessionOptions): Promise<AuthenticationSession> {
424
423
  const authProvider = this.authenticationProviders.get(id);
425
424
  if (authProvider) {
426
- return authProvider.createSession(scopes);
425
+ return authProvider.createSession(scopes, options || {});
427
426
  } else {
428
427
  throw new Error(`No authentication provider '${id}' is currently registered.`);
429
428
  }
@@ -281,6 +281,15 @@ export const corePreferenceSchema: PreferenceSchema = {
281
281
  default: 200,
282
282
  minimum: 10,
283
283
  description: nls.localize('theia/core/tabDefaultSize', 'Specifies the default size for tabs.')
284
+ },
285
+ 'workbench.editorAssociations': {
286
+ type: 'object',
287
+ markdownDescription: nls.localizeByDefault('Configure [glob patterns](https://aka.ms/vscode-glob-patterns) to editors (for example `"*.hex": "hexEditor.hexedit"`). These have precedence over the default behavior.'),
288
+ patternProperties: {
289
+ '.*': {
290
+ type: 'string'
291
+ }
292
+ }
284
293
  }
285
294
  }
286
295
  };
@@ -144,6 +144,7 @@ import { bindTreePreferences } from './tree';
144
144
  import { OpenWithService } from './open-with-service';
145
145
  import { ViewColumnService } from './shell/view-column-service';
146
146
  import { DomInputUndoRedoHandler, UndoRedoHandler, UndoRedoHandlerService } from './undo-redo-handler';
147
+ import { WidgetStatusBarContribution, WidgetStatusBarService } from './widget-status-bar-service';
147
148
 
148
149
  export { bindResourceProvider, bindMessageService, bindPreferenceService };
149
150
 
@@ -471,4 +472,8 @@ export const frontendApplicationModule = new ContainerModule((bind, _unbind, _is
471
472
  bindContributionProvider(bind, UndoRedoHandler);
472
473
  bind(DomInputUndoRedoHandler).toSelf().inSingletonScope();
473
474
  bind(UndoRedoHandler).toService(DomInputUndoRedoHandler);
475
+
476
+ bind(WidgetStatusBarService).toSelf().inSingletonScope();
477
+ bind(FrontendApplicationContribution).toService(WidgetStatusBarService);
478
+ bindContributionProvider(bind, WidgetStatusBarContribution);
474
479
  });
@@ -48,3 +48,4 @@ export * from './styling-service';
48
48
  export * from './hover-service';
49
49
  export * from './saveable-service';
50
50
  export * from './undo-redo-handler';
51
+ export * from './widget-status-bar-service';
@@ -19,7 +19,9 @@ import { Disposable } from '../common/disposable';
19
19
  import { nls } from '../common/nls';
20
20
  import { MaybePromise } from '../common/types';
21
21
  import { URI } from '../common/uri';
22
- import { QuickInputService } from './quick-input';
22
+ import { QuickInputService, QuickPickItem, QuickPickItemOrSeparator } from './quick-input';
23
+ import { PreferenceScope, PreferenceService } from './preferences';
24
+ import { getDefaultHandler } from './opener-service';
23
25
 
24
26
  export interface OpenWithHandler {
25
27
  /**
@@ -46,6 +48,11 @@ export interface OpenWithHandler {
46
48
  * A returned value indicating a priority of this handler.
47
49
  */
48
50
  canHandle(uri: URI): number;
51
+ /**
52
+ * Test whether this handler and open the given URI
53
+ * and return the order of this handler in the list.
54
+ */
55
+ getOrder?(uri: URI): number;
49
56
  /**
50
57
  * Open a widget for the given URI and options.
51
58
  * Resolve to an opened widget or undefined, e.g. if a page is opened.
@@ -54,15 +61,26 @@ export interface OpenWithHandler {
54
61
  open(uri: URI): MaybePromise<object | undefined>;
55
62
  }
56
63
 
64
+ export interface OpenWithQuickPickItem extends QuickPickItem {
65
+ handler: OpenWithHandler;
66
+ }
67
+
57
68
  @injectable()
58
69
  export class OpenWithService {
59
70
 
60
71
  @inject(QuickInputService)
61
72
  protected readonly quickInputService: QuickInputService;
62
73
 
74
+ @inject(PreferenceService)
75
+ protected readonly preferenceService: PreferenceService;
76
+
63
77
  protected readonly handlers: OpenWithHandler[] = [];
64
78
 
65
79
  registerHandler(handler: OpenWithHandler): Disposable {
80
+ if (this.handlers.some(h => h.id === handler.id)) {
81
+ console.warn('Duplicate OpenWithHandler registration: ' + handler.id);
82
+ return Disposable.NULL;
83
+ }
66
84
  this.handlers.push(handler);
67
85
  return Disposable.create(() => {
68
86
  const index = this.handlers.indexOf(handler);
@@ -73,17 +91,50 @@ export class OpenWithService {
73
91
  }
74
92
 
75
93
  async openWith(uri: URI): Promise<object | undefined> {
94
+ // Clone the object, because all objects returned by the preferences service are frozen.
95
+ const associations: Record<string, unknown> = { ...this.preferenceService.get('workbench.editorAssociations') };
96
+ const ext = `*${uri.path.ext}`;
76
97
  const handlers = this.getHandlers(uri);
77
- const result = await this.quickInputService.pick(handlers.map(handler => ({
78
- handler: handler,
79
- label: handler.label ?? handler.id,
80
- detail: handler.providerName
81
- })), {
98
+ const ordered = handlers.slice().sort((a, b) => this.getOrder(b, uri) - this.getOrder(a, uri));
99
+ const defaultHandler = getDefaultHandler(uri, this.preferenceService) ?? handlers[0]?.id;
100
+ const items = this.getQuickPickItems(ordered, defaultHandler);
101
+ // Only offer to select a default editor when the file has a file extension
102
+ const extraItems: QuickPickItemOrSeparator[] = uri.path.ext ? [{
103
+ type: 'separator'
104
+ }, {
105
+ label: nls.localizeByDefault("Configure default editor for '{0}'...", ext)
106
+ }] : [];
107
+ const result = await this.quickInputService.pick<OpenWithQuickPickItem | { label: string }>([...items, ...extraItems], {
82
108
  placeHolder: nls.localizeByDefault("Select editor for '{0}'", uri.path.base)
83
109
  });
84
110
  if (result) {
85
- return result.handler.open(uri);
111
+ if ('handler' in result) {
112
+ return result.handler.open(uri);
113
+ } else if (result.label) {
114
+ const configureResult = await this.quickInputService.pick(items, {
115
+ placeHolder: nls.localizeByDefault("Select new default editor for '{0}'", ext)
116
+ });
117
+ if (configureResult) {
118
+ associations[ext] = configureResult.handler.id;
119
+ this.preferenceService.set('workbench.editorAssociations', associations, PreferenceScope.User);
120
+ return configureResult.handler.open(uri);
121
+ }
122
+ }
86
123
  }
124
+ return undefined;
125
+ }
126
+
127
+ protected getQuickPickItems(handlers: OpenWithHandler[], defaultHandler?: string): OpenWithQuickPickItem[] {
128
+ return handlers.map(handler => ({
129
+ handler,
130
+ label: handler.label ?? handler.id,
131
+ detail: handler.providerName ?? '',
132
+ description: handler.id === defaultHandler ? nls.localizeByDefault('Default') : undefined
133
+ }));
134
+ }
135
+
136
+ protected getOrder(handler: OpenWithHandler, uri: URI): number {
137
+ return handler.getOrder ? handler.getOrder(uri) : handler.canHandle(uri);
87
138
  }
88
139
 
89
140
  getHandlers(uri: URI): OpenWithHandler[] {
@@ -17,6 +17,8 @@
17
17
  import { named, injectable, inject } from 'inversify';
18
18
  import URI from '../common/uri';
19
19
  import { ContributionProvider, Prioritizeable, MaybePromise, Emitter, Event, Disposable } from '../common';
20
+ import { PreferenceService } from './preferences';
21
+ import { match } from '../common/glob';
20
22
 
21
23
  export interface OpenerOptions {
22
24
  }
@@ -96,6 +98,17 @@ export async function open(openerService: OpenerService, uri: URI, options?: Ope
96
98
  return opener.open(uri, options);
97
99
  }
98
100
 
101
+ export function getDefaultHandler(uri: URI, preferenceService: PreferenceService): string | undefined {
102
+ const associations = preferenceService.get('workbench.editorAssociations', {});
103
+ const defaultHandler = Object.entries(associations).find(([key]) => match(key, uri.path.base))?.[1];
104
+ if (typeof defaultHandler === 'string') {
105
+ return defaultHandler;
106
+ }
107
+ return undefined;
108
+ }
109
+
110
+ export const defaultHandlerPriority = 100_000;
111
+
99
112
  @injectable()
100
113
  export class DefaultOpenerService implements OpenerService {
101
114
  // Collection of open-handlers for custom-editor contributions.
@@ -9,10 +9,7 @@
9
9
  --theia-private-horizontal-tab-scrollbar-height: 5px;
10
10
  --theia-tabbar-toolbar-z-index: 1001;
11
11
  --theia-toolbar-active-transform-scale: 1.272019649;
12
- --theia-horizontal-toolbar-height: calc(
13
- var(--theia-private-horizontal-tab-height) +
14
- var(--theia-private-horizontal-tab-scrollbar-rail-height) / 2
15
- );
12
+ --theia-horizontal-toolbar-height: calc(var(--theia-private-horizontal-tab-height) + var(--theia-private-horizontal-tab-scrollbar-rail-height) / 2);
16
13
  --theia-dragover-tab-border-width: 2px;
17
14
  }
18
15
 
@@ -75,9 +72,7 @@
75
72
  border-left: var(--theia-border-width) solid var(--theia-editorGroup-border);
76
73
  }
77
74
 
78
- #theia-main-content-panel
79
- .p-DockPanel-handle[data-orientation="vertical"]
80
- + .p-TabBar {
75
+ #theia-main-content-panel .p-DockPanel-handle[data-orientation="vertical"]+.p-TabBar {
81
76
  border-top: var(--theia-border-width) solid var(--theia-editorGroup-border);
82
77
  }
83
78
 
@@ -142,11 +137,9 @@
142
137
 
143
138
  -webkit-appearance: none;
144
139
  -moz-appearance: none;
145
- background-image: linear-gradient(
146
- 45deg,
140
+ background-image: linear-gradient(45deg,
147
141
  transparent 50%,
148
- var(--theia-icon-foreground) 50%
149
- ),
142
+ var(--theia-icon-foreground) 50%),
150
143
  linear-gradient(135deg, var(--theia-icon-foreground) 50%, transparent 50%);
151
144
  background-position: calc(100% - 6px) 8px, calc(100% - 2px) 8px, 100% 0;
152
145
  background-size: 4px 5px;
@@ -225,12 +218,8 @@
225
218
  visibility: hidden;
226
219
  }
227
220
 
228
- .p-TabBar.theia-app-centers
229
- .p-TabBar-tab.p-mod-closable
230
- > .p-TabBar-tabCloseIcon,
231
- .p-TabBar.theia-app-centers
232
- .p-TabBar-tab.theia-mod-pinned
233
- > .p-TabBar-tabCloseIcon {
221
+ .p-TabBar.theia-app-centers .p-TabBar-tab.p-mod-closable>.p-TabBar-tabCloseIcon,
222
+ .p-TabBar.theia-app-centers .p-TabBar-tab.theia-mod-pinned>.p-TabBar-tabCloseIcon {
234
223
  padding: 2px;
235
224
  margin-top: 2px;
236
225
  margin-left: 4px;
@@ -248,31 +237,19 @@
248
237
  -ms-user-select: none;
249
238
  }
250
239
 
251
- .p-TabBar.theia-app-centers.dynamic-tabs
252
- .p-TabBar-tab.p-mod-closable
253
- > .p-TabBar-tabCloseIcon,
254
- .p-TabBar.theia-app-centers.dynamic-tabs
255
- .p-TabBar-tab.theia-mod-pinned
256
- > .p-TabBar-tabCloseIcon {
240
+ .p-TabBar.theia-app-centers.dynamic-tabs .p-TabBar-tab.p-mod-closable>.p-TabBar-tabCloseIcon,
241
+ .p-TabBar.theia-app-centers.dynamic-tabs .p-TabBar-tab.theia-mod-pinned>.p-TabBar-tabCloseIcon {
257
242
  /* hide close icon for dynamic tabs strategy*/
258
243
  display: none;
259
244
  }
260
245
 
261
- .p-TabBar.theia-app-centers
262
- .p-TabBar-tab.p-mod-current
263
- > .p-TabBar-tabCloseIcon,
264
- .p-TabBar.theia-app-centers
265
- .p-TabBar-tab:hover.p-mod-closable
266
- > .p-TabBar-tabCloseIcon,
267
- .p-TabBar.theia-app-centers
268
- .p-TabBar-tab:hover.theia-mod-pinned
269
- > .p-TabBar-tabCloseIcon {
246
+ .p-TabBar.theia-app-centers .p-TabBar-tab.p-mod-current>.p-TabBar-tabCloseIcon,
247
+ .p-TabBar.theia-app-centers .p-TabBar-tab:hover.p-mod-closable>.p-TabBar-tabCloseIcon,
248
+ .p-TabBar.theia-app-centers .p-TabBar-tab:hover.theia-mod-pinned>.p-TabBar-tabCloseIcon {
270
249
  display: inline-block;
271
250
  }
272
251
 
273
- .p-TabBar.theia-app-centers
274
- .p-TabBar-tab.p-mod-closable
275
- > .p-TabBar-tabCloseIcon:hover {
252
+ .p-TabBar.theia-app-centers .p-TabBar-tab.p-mod-closable>.p-TabBar-tabCloseIcon:hover {
276
253
  border-radius: 5px;
277
254
  background-color: rgba(50%, 50%, 50%, 0.2);
278
255
  }
@@ -282,33 +259,21 @@
282
259
  padding-right: 4px;
283
260
  }
284
261
 
285
- .p-TabBar.theia-app-centers
286
- .p-TabBar-tab.p-mod-closable:not(.theia-mod-dirty):hover
287
- > .p-TabBar-tabCloseIcon:before,
288
- .p-TabBar.theia-app-centers
289
- .p-TabBar-tab.p-mod-closable:not(.theia-mod-dirty).p-TabBar-tab.p-mod-current
290
- > .p-TabBar-tabCloseIcon:before,
291
- .p-TabBar.theia-app-centers
292
- .p-TabBar-tab.p-mod-closable.theia-mod-dirty
293
- > .p-TabBar-tabCloseIcon:hover:before {
262
+ .p-TabBar.theia-app-centers .p-TabBar-tab.p-mod-closable:not(.theia-mod-dirty):hover>.p-TabBar-tabCloseIcon:before,
263
+ .p-TabBar.theia-app-centers .p-TabBar-tab.p-mod-closable:not(.theia-mod-dirty).p-TabBar-tab.p-mod-current>.p-TabBar-tabCloseIcon:before,
264
+ .p-TabBar.theia-app-centers .p-TabBar-tab.p-mod-closable.theia-mod-dirty>.p-TabBar-tabCloseIcon:hover:before {
294
265
  content: "\ea76";
295
266
  }
296
267
 
297
- .p-TabBar.theia-app-centers
298
- .p-TabBar-tab.p-mod-closable.theia-mod-dirty
299
- > .p-TabBar-tabCloseIcon:before {
268
+ .p-TabBar.theia-app-centers .p-TabBar-tab.p-mod-closable.theia-mod-dirty>.p-TabBar-tabCloseIcon:before {
300
269
  content: "\ea71";
301
270
  }
302
271
 
303
- .p-TabBar.theia-app-centers
304
- .p-TabBar-tab.theia-mod-pinned
305
- > .p-TabBar-tabCloseIcon:before {
272
+ .p-TabBar.theia-app-centers .p-TabBar-tab.theia-mod-pinned>.p-TabBar-tabCloseIcon:before {
306
273
  content: "\eba0";
307
274
  }
308
275
 
309
- .p-TabBar.theia-app-centers
310
- .p-TabBar-tab.theia-mod-pinned.theia-mod-dirty
311
- > .p-TabBar-tabCloseIcon:before {
276
+ .p-TabBar.theia-app-centers .p-TabBar-tab.theia-mod-pinned.theia-mod-dirty>.p-TabBar-tabCloseIcon:before {
312
277
  content: "\ebb2";
313
278
  }
314
279
 
@@ -351,72 +316,35 @@
351
316
  | Perfect scrollbar
352
317
  |----------------------------------------------------------------------------*/
353
318
 
354
- .p-TabBar[data-orientation="horizontal"]
355
- .p-TabBar-content-container
356
- > .ps__rail-x {
319
+ .p-TabBar[data-orientation="horizontal"] .p-TabBar-content-container>.ps__rail-x {
357
320
  height: var(--theia-private-horizontal-tab-scrollbar-rail-height);
358
321
  z-index: 1000;
359
322
  }
360
323
 
361
- .p-TabBar[data-orientation="horizontal"]
362
- .p-TabBar-content-container
363
- > .ps__rail-x
364
- > .ps__thumb-x {
324
+ .p-TabBar[data-orientation="horizontal"] .p-TabBar-content-container>.ps__rail-x>.ps__thumb-x {
365
325
  height: var(--theia-private-horizontal-tab-scrollbar-height) !important;
366
- bottom: calc(
367
- (
368
- var(--theia-private-horizontal-tab-scrollbar-rail-height) -
369
- var(--theia-private-horizontal-tab-scrollbar-height)
370
- ) / 2
371
- );
372
- }
373
-
374
- .p-TabBar[data-orientation="horizontal"]
375
- .p-TabBar-content-container
376
- > .ps__rail-x:hover,
377
- .p-TabBar[data-orientation="horizontal"]
378
- .p-TabBar-content-container
379
- > .ps__rail-x:focus {
326
+ bottom: calc((var(--theia-private-horizontal-tab-scrollbar-rail-height) - var(--theia-private-horizontal-tab-scrollbar-height)) / 2);
327
+ }
328
+
329
+ .p-TabBar[data-orientation="horizontal"] .p-TabBar-content-container>.ps__rail-x:hover,
330
+ .p-TabBar[data-orientation="horizontal"] .p-TabBar-content-container>.ps__rail-x:focus {
380
331
  height: var(--theia-private-horizontal-tab-scrollbar-rail-height) !important;
381
332
  }
382
333
 
383
- .p-TabBar[data-orientation="horizontal"]
384
- .p-TabBar-content-container
385
- > .ps__rail-x:hover
386
- > .ps__thumb-x,
387
- .p-TabBar[data-orientation="horizontal"]
388
- .p-TabBar-content-container
389
- > .ps__rail-x:focus
390
- > .ps__thumb-x {
391
- height: calc(
392
- var(--theia-private-horizontal-tab-scrollbar-height) / 2
393
- ) !important;
394
- bottom: calc(
395
- (
396
- var(--theia-private-horizontal-tab-scrollbar-rail-height) -
397
- var(--theia-private-horizontal-tab-scrollbar-height)
398
- ) / 2
399
- );
400
- }
401
-
402
- .p-TabBar[data-orientation="vertical"]
403
- .p-TabBar-content-container
404
- > .ps__rail-y {
334
+ .p-TabBar[data-orientation="horizontal"] .p-TabBar-content-container>.ps__rail-x:hover>.ps__thumb-x,
335
+ .p-TabBar[data-orientation="horizontal"] .p-TabBar-content-container>.ps__rail-x:focus>.ps__thumb-x {
336
+ height: calc(var(--theia-private-horizontal-tab-scrollbar-height) / 2) !important;
337
+ bottom: calc((var(--theia-private-horizontal-tab-scrollbar-rail-height) - var(--theia-private-horizontal-tab-scrollbar-height)) / 2);
338
+ }
339
+
340
+ .p-TabBar[data-orientation="vertical"] .p-TabBar-content-container>.ps__rail-y {
405
341
  width: var(--theia-private-horizontal-tab-scrollbar-rail-height);
406
342
  z-index: 1000;
407
343
  }
408
344
 
409
- .p-TabBar[data-orientation="vertical"]
410
- .p-TabBar-content-container
411
- > .ps__rail-y
412
- > .ps__thumb-y {
345
+ .p-TabBar[data-orientation="vertical"] .p-TabBar-content-container>.ps__rail-y>.ps__thumb-y {
413
346
  width: var(--theia-private-horizontal-tab-scrollbar-height) !important;
414
- right: calc(
415
- (
416
- var(--theia-private-horizontal-tab-scrollbar-rail-height) -
417
- var(--theia-private-horizontal-tab-scrollbar-height)
418
- ) / 2
419
- );
347
+ right: calc((var(--theia-private-horizontal-tab-scrollbar-rail-height) - var(--theia-private-horizontal-tab-scrollbar-height)) / 2);
420
348
  }
421
349
 
422
350
  .p-TabBar[data-orientation="vertical"] .p-TabBar-content-container {
@@ -447,9 +375,8 @@
447
375
  |----------------------------------------------------------------------------*/
448
376
 
449
377
  .p-TabBar-toolbar {
450
- z-index: var(
451
- --theia-tabbar-toolbar-z-index
452
- ); /* Due to the scrollbar (`z-index: 1000;`) it has a greater `z-index`. */
378
+ z-index: var(--theia-tabbar-toolbar-z-index);
379
+ /* Due to the scrollbar (`z-index: 1000;`) it has a greater `z-index`. */
453
380
  display: flex;
454
381
  flex-direction: row-reverse;
455
382
  padding: 4px;
@@ -460,7 +387,8 @@
460
387
  .p-TabBar-content-container {
461
388
  display: flex;
462
389
  flex: 1;
463
- position: relative; /* This is necessary for perfect-scrollbar */
390
+ position: relative;
391
+ /* This is necessary for perfect-scrollbar */
464
392
  }
465
393
 
466
394
  .p-TabBar-toolbar .item {
@@ -473,7 +401,7 @@
473
401
  }
474
402
 
475
403
  .p-TabBar-toolbar .item>div {
476
- height: 100%;
404
+ height: 100%;
477
405
  }
478
406
 
479
407
  .p-TabBar-toolbar .item.enabled {
@@ -491,14 +419,14 @@
491
419
  background-color: var(--theia-inputOption-activeBackground);
492
420
  }
493
421
 
494
- .p-TabBar-toolbar .item > div {
495
- line-height: calc(var(--theia-icon-size)+2px);
496
- height: calc(var(--theia-icon-size)+2px);
422
+ .p-TabBar-toolbar .item>div {
423
+ line-height: calc(var(--theia-icon-size) + 2px);
424
+ height: calc(var(--theia-icon-size) + 2px);
497
425
  background-repeat: no-repeat;
498
426
  line-height: 18px;
499
427
  }
500
428
 
501
- .p-TabBar-toolbar .item > div.no-icon {
429
+ .p-TabBar-toolbar .item>div.no-icon {
502
430
  /* Make room for a text label instead of an icon. */
503
431
  width: 100%;
504
432
  }
@@ -532,9 +460,7 @@
532
460
  vertical-align: bottom;
533
461
  }
534
462
 
535
- #theia-main-content-panel
536
- .p-TabBar:not(.theia-tabBar-active)
537
- .p-TabBar-toolbar {
463
+ #theia-main-content-panel .p-TabBar:not(.theia-tabBar-active) .p-TabBar-toolbar {
538
464
  display: none;
539
465
  }
540
466
 
@@ -543,9 +469,7 @@
543
469
  }
544
470
 
545
471
  .p-TabBar.theia-tabBar-multirow[data-orientation="horizontal"] {
546
- min-height: calc(
547
- var(--theia-breadcrumbs-height) + var(--theia-horizontal-toolbar-height)
548
- );
472
+ min-height: calc(var(--theia-breadcrumbs-height) + var(--theia-horizontal-toolbar-height));
549
473
  flex-direction: column;
550
474
  }
551
475
 
@@ -569,19 +493,14 @@
569
493
  flex-direction: column;
570
494
  }
571
495
 
572
- .p-TabBar.theia-app-centers[data-orientation="horizontal"].dynamic-tabs
573
- .p-TabBar-tabLabel {
496
+ .p-TabBar.theia-app-centers[data-orientation="horizontal"].dynamic-tabs .p-TabBar-tabLabel {
574
497
  /* fade out text with dynamic tabs strategy */
575
- mask-image: linear-gradient(
576
- to left,
577
- rgba(0, 0, 0, 0.3),
578
- rgba(0, 0, 0, 1) 15px
579
- );
580
- -webkit-mask-image: linear-gradient(
581
- to left,
582
- rgba(0, 0, 0, 0.3),
583
- rgba(0, 0, 0, 1) 15px
584
- );
498
+ mask-image: linear-gradient(to left,
499
+ rgba(0, 0, 0, 0.3),
500
+ rgba(0, 0, 0, 1) 15px);
501
+ -webkit-mask-image: linear-gradient(to left,
502
+ rgba(0, 0, 0, 0.3),
503
+ rgba(0, 0, 0, 1) 15px);
585
504
  flex: 1;
586
505
  }
587
506
 
@@ -625,13 +544,11 @@
625
544
  /*-----------------------------------------------------------------------------
626
545
  | Open tabs dropdown
627
546
  |----------------------------------------------------------------------------*/
628
- .theia-tabBar-open-tabs
629
- > .theia-select-component
630
- .theia-select-component-label {
547
+ .theia-tabBar-open-tabs>.theia-select-component .theia-select-component-label {
631
548
  display: none;
632
549
  }
633
550
 
634
- .theia-tabBar-open-tabs > .theia-select-component {
551
+ .theia-tabBar-open-tabs>.theia-select-component {
635
552
  min-width: auto;
636
553
  height: 100%;
637
554
  }
@@ -644,4 +561,4 @@
644
561
 
645
562
  .theia-tabBar-open-tabs.p-mod-hidden {
646
563
  display: none;
647
- }
564
+ }