@codingame/monaco-vscode-view-status-bar-service-override 2.2.1 → 3.0.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-view-status-bar-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
"module": "index.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@3.0.0"
|
|
22
22
|
}
|
|
23
23
|
}
|
package/viewStatusBar.js
CHANGED
|
@@ -3,9 +3,8 @@ import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/d
|
|
|
3
3
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
4
4
|
import { StatusbarService } from './vscode/src/vs/workbench/browser/parts/statusbar/statusbarPart.js';
|
|
5
5
|
import { IStatusbarService } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar';
|
|
6
|
-
import {
|
|
6
|
+
import { registerWorkbenchContribution2 } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
7
7
|
import { StatusBarItemsExtensionPoint, IExtensionStatusBarItemService, ExtensionStatusBarItemService } from 'vscode/vscode/vs/workbench/api/browser/statusBarExtensionPoint';
|
|
8
|
-
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
9
8
|
|
|
10
9
|
let ExtensionPoints = class ExtensionPoints {
|
|
11
10
|
constructor(instantiationService) {
|
|
@@ -13,10 +12,11 @@ let ExtensionPoints = class ExtensionPoints {
|
|
|
13
12
|
this.instantiationService.createInstance(StatusBarItemsExtensionPoint);
|
|
14
13
|
}
|
|
15
14
|
};
|
|
15
|
+
ExtensionPoints.ID = 'workbench.contrib.extensionPoints.statusBar';
|
|
16
16
|
ExtensionPoints = __decorate([
|
|
17
17
|
( __param(0, IInstantiationService))
|
|
18
18
|
], ExtensionPoints);
|
|
19
|
-
(
|
|
19
|
+
registerWorkbenchContribution2(ExtensionPoints.ID, ExtensionPoints, 1 );
|
|
20
20
|
function getServiceOverride() {
|
|
21
21
|
return {
|
|
22
22
|
[( IStatusbarService.toString())]: new SyncDescriptor(StatusbarService, [], false),
|
|
@@ -24,7 +24,7 @@ class StatusbarViewModel extends Disposable {
|
|
|
24
24
|
if (hiddenRaw) {
|
|
25
25
|
try {
|
|
26
26
|
const hiddenArray = JSON.parse(hiddenRaw);
|
|
27
|
-
this.hidden = ( new Set(hiddenArray));
|
|
27
|
+
this.hidden = ( new Set(hiddenArray.filter(entry => !entry.startsWith('status.workspaceTrust.'))));
|
|
28
28
|
}
|
|
29
29
|
catch (error) {
|
|
30
30
|
}
|
|
@@ -22,8 +22,7 @@ import { assertIsDefined } from 'vscode/vscode/vs/base/common/types';
|
|
|
22
22
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
23
23
|
import { isHighContrast } from 'vscode/vscode/vs/platform/theme/common/theme';
|
|
24
24
|
import { hash } from 'vscode/vscode/vs/base/common/hash';
|
|
25
|
-
import {
|
|
26
|
-
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
|
|
25
|
+
import { WorkbenchHoverDelegate } from 'vscode/vscode/vs/platform/hover/browser/hover';
|
|
27
26
|
import { ToggleStatusbarEntryVisibilityAction, HideStatusbarEntryAction } from './statusbarActions.js';
|
|
28
27
|
import { StatusbarViewModel } from './statusbarModel.js';
|
|
29
28
|
import { StatusbarEntryItem } from './statusbarItem.js';
|
|
@@ -34,15 +33,13 @@ var StatusbarPart_1, AuxiliaryStatusbarPart_1;
|
|
|
34
33
|
let StatusbarPart = class StatusbarPart extends Part {
|
|
35
34
|
static { StatusbarPart_1 = this; }
|
|
36
35
|
static { this.HEIGHT = 22; }
|
|
37
|
-
constructor(id, instantiationService, themeService, contextService, storageService, layoutService, contextMenuService, contextKeyService
|
|
36
|
+
constructor(id, instantiationService, themeService, contextService, storageService, layoutService, contextMenuService, contextKeyService) {
|
|
38
37
|
super(id, { hasTitle: false }, themeService, storageService, layoutService);
|
|
39
38
|
this.instantiationService = instantiationService;
|
|
40
39
|
this.contextService = contextService;
|
|
41
40
|
this.storageService = storageService;
|
|
42
41
|
this.contextMenuService = contextMenuService;
|
|
43
42
|
this.contextKeyService = contextKeyService;
|
|
44
|
-
this.hoverService = hoverService;
|
|
45
|
-
this.configurationService = configurationService;
|
|
46
43
|
this.minimumWidth = 0;
|
|
47
44
|
this.maximumWidth = Number.POSITIVE_INFINITY;
|
|
48
45
|
this.minimumHeight = StatusbarPart_1.HEIGHT;
|
|
@@ -52,32 +49,12 @@ let StatusbarPart = class StatusbarPart extends Part {
|
|
|
52
49
|
this.onDidChangeEntryVisibility = this.viewModel.onDidChangeEntryVisibility;
|
|
53
50
|
this._onWillDispose = this._register(( new Emitter()));
|
|
54
51
|
this.onWillDispose = this._onWillDispose.event;
|
|
55
|
-
this.hoverDelegate =
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
return this.configurationService.getValue('workbench.hover.delay');
|
|
61
|
-
}
|
|
62
|
-
constructor(configurationService, hoverService) {
|
|
63
|
-
this.configurationService = configurationService;
|
|
64
|
-
this.hoverService = hoverService;
|
|
65
|
-
this.lastHoverHideTime = 0;
|
|
66
|
-
this.placement = 'element';
|
|
67
|
-
}
|
|
68
|
-
showHover(options, focus) {
|
|
69
|
-
return this.hoverService.showHover({
|
|
70
|
-
...options,
|
|
71
|
-
persistence: {
|
|
72
|
-
hideOnKeyDown: true,
|
|
73
|
-
sticky: focus
|
|
74
|
-
}
|
|
75
|
-
}, focus);
|
|
76
|
-
}
|
|
77
|
-
onDidHideHover() {
|
|
78
|
-
this.lastHoverHideTime = Date.now();
|
|
52
|
+
this.hoverDelegate = this._register(this.instantiationService.createInstance(WorkbenchHoverDelegate, 'element', true, (_, focus) => ({
|
|
53
|
+
persistence: {
|
|
54
|
+
hideOnKeyDown: true,
|
|
55
|
+
sticky: focus
|
|
79
56
|
}
|
|
80
|
-
})
|
|
57
|
+
})));
|
|
81
58
|
this.compactEntriesDisposable = this._register(( new MutableDisposable()));
|
|
82
59
|
this.styleOverrides = ( new Set());
|
|
83
60
|
this.registerListeners();
|
|
@@ -410,7 +387,7 @@ let StatusbarPart = class StatusbarPart extends Part {
|
|
|
410
387
|
}
|
|
411
388
|
|
|
412
389
|
/* Status bar item focus outline */
|
|
413
|
-
.monaco-workbench .part.statusbar > .items-container > .statusbar-item a:focus-visible
|
|
390
|
+
.monaco-workbench .part.statusbar > .items-container > .statusbar-item a:focus-visible {
|
|
414
391
|
outline: 1px solid ${this.getColor(activeContrastBorder) ?? itemBorderColor};
|
|
415
392
|
outline-offset: ${borderColor ? '-2px' : '-1px'};
|
|
416
393
|
}
|
|
@@ -450,13 +427,11 @@ StatusbarPart = StatusbarPart_1 = ( __decorate([
|
|
|
450
427
|
( __param(4, IStorageService)),
|
|
451
428
|
( __param(5, IWorkbenchLayoutService)),
|
|
452
429
|
( __param(6, IContextMenuService)),
|
|
453
|
-
( __param(7, IContextKeyService))
|
|
454
|
-
( __param(8, IHoverService)),
|
|
455
|
-
( __param(9, IConfigurationService))
|
|
430
|
+
( __param(7, IContextKeyService))
|
|
456
431
|
], StatusbarPart));
|
|
457
432
|
let MainStatusbarPart = class MainStatusbarPart extends StatusbarPart {
|
|
458
|
-
constructor(instantiationService, themeService, contextService, storageService, layoutService, contextMenuService, contextKeyService
|
|
459
|
-
super("workbench.parts.statusbar" , instantiationService, themeService, contextService, storageService, layoutService, contextMenuService, contextKeyService
|
|
433
|
+
constructor(instantiationService, themeService, contextService, storageService, layoutService, contextMenuService, contextKeyService) {
|
|
434
|
+
super("workbench.parts.statusbar" , instantiationService, themeService, contextService, storageService, layoutService, contextMenuService, contextKeyService);
|
|
460
435
|
}
|
|
461
436
|
};
|
|
462
437
|
MainStatusbarPart = ( __decorate([
|
|
@@ -466,16 +441,14 @@ MainStatusbarPart = ( __decorate([
|
|
|
466
441
|
( __param(3, IStorageService)),
|
|
467
442
|
( __param(4, IWorkbenchLayoutService)),
|
|
468
443
|
( __param(5, IContextMenuService)),
|
|
469
|
-
( __param(6, IContextKeyService))
|
|
470
|
-
( __param(7, IHoverService)),
|
|
471
|
-
( __param(8, IConfigurationService))
|
|
444
|
+
( __param(6, IContextKeyService))
|
|
472
445
|
], MainStatusbarPart));
|
|
473
446
|
let AuxiliaryStatusbarPart = class AuxiliaryStatusbarPart extends StatusbarPart {
|
|
474
447
|
static { AuxiliaryStatusbarPart_1 = this; }
|
|
475
448
|
static { this.COUNTER = 1; }
|
|
476
|
-
constructor(container, instantiationService, themeService, contextService, storageService, layoutService, contextMenuService, contextKeyService
|
|
449
|
+
constructor(container, instantiationService, themeService, contextService, storageService, layoutService, contextMenuService, contextKeyService) {
|
|
477
450
|
const id = AuxiliaryStatusbarPart_1.COUNTER++;
|
|
478
|
-
super(`workbench.parts.auxiliaryStatus.${id}`, instantiationService, themeService, contextService, storageService, layoutService, contextMenuService, contextKeyService
|
|
451
|
+
super(`workbench.parts.auxiliaryStatus.${id}`, instantiationService, themeService, contextService, storageService, layoutService, contextMenuService, contextKeyService);
|
|
479
452
|
this.container = container;
|
|
480
453
|
this.height = StatusbarPart.HEIGHT;
|
|
481
454
|
}
|
|
@@ -487,9 +460,7 @@ AuxiliaryStatusbarPart = AuxiliaryStatusbarPart_1 = ( __decorate([
|
|
|
487
460
|
( __param(4, IStorageService)),
|
|
488
461
|
( __param(5, IWorkbenchLayoutService)),
|
|
489
462
|
( __param(6, IContextMenuService)),
|
|
490
|
-
( __param(7, IContextKeyService))
|
|
491
|
-
( __param(8, IHoverService)),
|
|
492
|
-
( __param(9, IConfigurationService))
|
|
463
|
+
( __param(7, IContextKeyService))
|
|
493
464
|
], AuxiliaryStatusbarPart));
|
|
494
465
|
let StatusbarService = class StatusbarService extends MultiWindowParts {
|
|
495
466
|
constructor(instantiationService, storageService, themeService) {
|