@codingame/monaco-vscode-view-status-bar-service-override 34.1.3 → 35.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": "35.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - view-status-bar service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "
|
|
18
|
+
"@codingame/monaco-vscode-api": "35.0.0"
|
|
19
19
|
},
|
|
20
20
|
"main": "index.js",
|
|
21
21
|
"module": "index.js",
|
|
@@ -30,7 +30,7 @@ class ToggleStatusbarEntryVisibilityAction extends Action {
|
|
|
30
30
|
}
|
|
31
31
|
class HideStatusbarEntryAction extends Action {
|
|
32
32
|
constructor(id, name, model) {
|
|
33
|
-
super(id, ( localize(
|
|
33
|
+
super(id, ( localize(3922, "Hide '{0}'", name)), undefined, true);
|
|
34
34
|
this.model = model;
|
|
35
35
|
}
|
|
36
36
|
async run() {
|
|
@@ -39,7 +39,7 @@ class HideStatusbarEntryAction extends Action {
|
|
|
39
39
|
}
|
|
40
40
|
let ManageExtensionAction = class ManageExtensionAction extends Action {
|
|
41
41
|
constructor(extensionId, commandService) {
|
|
42
|
-
super("statusbar.manage.extension", ( localize(
|
|
42
|
+
super("statusbar.manage.extension", ( localize(3923, "Manage Extension")));
|
|
43
43
|
this.extensionId = extensionId;
|
|
44
44
|
this.commandService = commandService;
|
|
45
45
|
}
|
|
@@ -111,7 +111,7 @@ class FocusStatusBarAction extends Action2 {
|
|
|
111
111
|
constructor() {
|
|
112
112
|
super({
|
|
113
113
|
id: "workbench.action.focusStatusBar",
|
|
114
|
-
title: ( localize2(
|
|
114
|
+
title: ( localize2(3924, "Focus Status Bar")),
|
|
115
115
|
category: Categories.View,
|
|
116
116
|
f1: true
|
|
117
117
|
});
|
|
@@ -8,6 +8,7 @@ import { IThemeService } from "@codingame/monaco-vscode-api/vscode/vs/platform/t
|
|
|
8
8
|
import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
|
|
9
9
|
import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
10
10
|
import { IWorkbenchLayoutService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService.service";
|
|
11
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
11
12
|
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
12
13
|
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
13
14
|
import { IView } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/grid/grid";
|
|
@@ -77,11 +78,19 @@ declare class StatusbarPart extends Part implements IStatusbarEntryContainer {
|
|
|
77
78
|
private readonly contextService;
|
|
78
79
|
private readonly contextMenuService;
|
|
79
80
|
private readonly contextKeyService;
|
|
81
|
+
private readonly configurationService;
|
|
80
82
|
static readonly HEIGHT = 22;
|
|
83
|
+
/**
|
|
84
|
+
* Bottom padding reserved below the main status bar under the floating panels
|
|
85
|
+
* experiment so it floats off the window's bottom edge. The part grows by this
|
|
86
|
+
* amount and the matching `padding-bottom` is applied in `part.css`.
|
|
87
|
+
*/
|
|
88
|
+
static readonly FLOATING_BOTTOM_PADDING = 4;
|
|
89
|
+
private get floatingBottomPadding();
|
|
81
90
|
readonly minimumWidth: number;
|
|
82
91
|
readonly maximumWidth: number;
|
|
83
|
-
|
|
84
|
-
|
|
92
|
+
get minimumHeight(): number;
|
|
93
|
+
get maximumHeight(): number;
|
|
85
94
|
private styleElement;
|
|
86
95
|
private pendingEntries;
|
|
87
96
|
private readonly viewModel;
|
|
@@ -98,7 +107,7 @@ declare class StatusbarPart extends Part implements IStatusbarEntryContainer {
|
|
|
98
107
|
private readonly hoverDelegate;
|
|
99
108
|
private readonly compactEntriesDisposable;
|
|
100
109
|
private readonly styleOverrides;
|
|
101
|
-
constructor(id: string, instantiationService: IInstantiationService, themeService: IThemeService, contextService: IWorkspaceContextService, storageService: IStorageService, layoutService: IWorkbenchLayoutService, contextMenuService: IContextMenuService, contextKeyService: IContextKeyService);
|
|
110
|
+
constructor(id: string, instantiationService: IInstantiationService, themeService: IThemeService, contextService: IWorkspaceContextService, storageService: IStorageService, layoutService: IWorkbenchLayoutService, contextMenuService: IContextMenuService, contextKeyService: IContextKeyService, configurationService: IConfigurationService);
|
|
102
111
|
private registerListeners;
|
|
103
112
|
overrideEntry(id: string, override: Partial<IStatusbarEntry>): IDisposable;
|
|
104
113
|
private withEntryOverride;
|
|
@@ -127,7 +136,7 @@ declare class StatusbarPart extends Part implements IStatusbarEntryContainer {
|
|
|
127
136
|
dispose(): void;
|
|
128
137
|
}
|
|
129
138
|
export declare class MainStatusbarPart extends StatusbarPart {
|
|
130
|
-
constructor(instantiationService: IInstantiationService, themeService: IThemeService, contextService: IWorkspaceContextService, storageService: IStorageService, layoutService: IWorkbenchLayoutService, contextMenuService: IContextMenuService, contextKeyService: IContextKeyService);
|
|
139
|
+
constructor(instantiationService: IInstantiationService, themeService: IThemeService, contextService: IWorkspaceContextService, storageService: IStorageService, layoutService: IWorkbenchLayoutService, contextMenuService: IContextMenuService, contextKeyService: IContextKeyService, configurationService: IConfigurationService);
|
|
131
140
|
}
|
|
132
141
|
export interface IAuxiliaryStatusbarPart extends IStatusbarEntryContainer, IView {
|
|
133
142
|
readonly container: HTMLElement;
|
|
@@ -137,7 +146,7 @@ export declare class AuxiliaryStatusbarPart extends StatusbarPart implements IAu
|
|
|
137
146
|
readonly container: HTMLElement;
|
|
138
147
|
private static COUNTER;
|
|
139
148
|
readonly height = 22;
|
|
140
|
-
constructor(container: HTMLElement, instantiationService: IInstantiationService, themeService: IThemeService, contextService: IWorkspaceContextService, storageService: IStorageService, layoutService: IWorkbenchLayoutService, contextMenuService: IContextMenuService, contextKeyService: IContextKeyService);
|
|
149
|
+
constructor(container: HTMLElement, instantiationService: IInstantiationService, themeService: IThemeService, contextService: IWorkspaceContextService, storageService: IStorageService, layoutService: IWorkbenchLayoutService, contextMenuService: IContextMenuService, contextKeyService: IContextKeyService, configurationService: IConfigurationService);
|
|
141
150
|
}
|
|
142
151
|
export declare class StatusbarService extends MultiWindowParts<StatusbarPart> implements IStatusbarService {
|
|
143
152
|
private readonly instantiationService;
|
|
@@ -29,8 +29,9 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/sear
|
|
|
29
29
|
import { isHTMLElement, $, addDisposableListener, EventType, clearNode, EventHelper, getWindow } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
30
30
|
import { createStyleSheet } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/domStylesheets';
|
|
31
31
|
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
32
|
-
import { Parts } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
32
|
+
import { FLOATING_PANEL_MARGIN, Parts, LayoutSettings } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
33
33
|
import { IWorkbenchLayoutService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService.service';
|
|
34
|
+
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
34
35
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
|
|
35
36
|
import { equals } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
|
|
36
37
|
import { StandardMouseEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/mouseEvent';
|
|
@@ -56,6 +57,18 @@ let StatusbarPart = class StatusbarPart extends Part {
|
|
|
56
57
|
static {
|
|
57
58
|
this.HEIGHT = 22;
|
|
58
59
|
}
|
|
60
|
+
static {
|
|
61
|
+
this.FLOATING_BOTTOM_PADDING = FLOATING_PANEL_MARGIN;
|
|
62
|
+
}
|
|
63
|
+
get floatingBottomPadding() {
|
|
64
|
+
return this.getId() === Parts.STATUSBAR_PART && this.layoutService.isFloatingPanelsEnabled() ? StatusbarPart_1.FLOATING_BOTTOM_PADDING : 0;
|
|
65
|
+
}
|
|
66
|
+
get minimumHeight() {
|
|
67
|
+
return StatusbarPart_1.HEIGHT + this.floatingBottomPadding;
|
|
68
|
+
}
|
|
69
|
+
get maximumHeight() {
|
|
70
|
+
return StatusbarPart_1.HEIGHT + this.floatingBottomPadding;
|
|
71
|
+
}
|
|
59
72
|
constructor(
|
|
60
73
|
id,
|
|
61
74
|
instantiationService,
|
|
@@ -64,7 +77,8 @@ let StatusbarPart = class StatusbarPart extends Part {
|
|
|
64
77
|
storageService,
|
|
65
78
|
layoutService,
|
|
66
79
|
contextMenuService,
|
|
67
|
-
contextKeyService
|
|
80
|
+
contextKeyService,
|
|
81
|
+
configurationService
|
|
68
82
|
) {
|
|
69
83
|
super(id, {
|
|
70
84
|
hasTitle: false
|
|
@@ -73,10 +87,9 @@ let StatusbarPart = class StatusbarPart extends Part {
|
|
|
73
87
|
this.contextService = contextService;
|
|
74
88
|
this.contextMenuService = contextMenuService;
|
|
75
89
|
this.contextKeyService = contextKeyService;
|
|
90
|
+
this.configurationService = configurationService;
|
|
76
91
|
this.minimumWidth = 0;
|
|
77
92
|
this.maximumWidth = Number.POSITIVE_INFINITY;
|
|
78
|
-
this.minimumHeight = StatusbarPart_1.HEIGHT;
|
|
79
|
-
this.maximumHeight = StatusbarPart_1.HEIGHT;
|
|
80
93
|
this.pendingEntries = [];
|
|
81
94
|
this._onWillDispose = this._register(( new Emitter()));
|
|
82
95
|
this.onWillDispose = this._onWillDispose.event;
|
|
@@ -110,6 +123,11 @@ let StatusbarPart = class StatusbarPart extends Part {
|
|
|
110
123
|
registerListeners() {
|
|
111
124
|
this._register(this.onDidChangeEntryVisibility(() => this.updateCompactEntries()));
|
|
112
125
|
this._register(this.contextService.onDidChangeWorkbenchState(() => this.updateStyles()));
|
|
126
|
+
this._register(this.configurationService.onDidChangeConfiguration(e => {
|
|
127
|
+
if (this.getId() === Parts.STATUSBAR_PART && e.affectsConfiguration(LayoutSettings.MODERN_UI)) {
|
|
128
|
+
this._onDidChange.fire(undefined);
|
|
129
|
+
}
|
|
130
|
+
}));
|
|
113
131
|
}
|
|
114
132
|
overrideEntry(id, override) {
|
|
115
133
|
this.entryOverrides.set(id, override);
|
|
@@ -437,7 +455,7 @@ let StatusbarPart = class StatusbarPart extends Part {
|
|
|
437
455
|
const actions = [];
|
|
438
456
|
actions.push(toAction({
|
|
439
457
|
id: ToggleStatusbarVisibilityAction.ID,
|
|
440
|
-
label: ( localize(
|
|
458
|
+
label: ( localize(3925, "Hide Status Bar")),
|
|
441
459
|
run: () => this.instantiationService.invokeFunction(accessor => ( new ToggleStatusbarVisibilityAction()).run(accessor))
|
|
442
460
|
}));
|
|
443
461
|
actions.push(( new Separator()));
|
|
@@ -536,7 +554,7 @@ let StatusbarPart = class StatusbarPart extends Part {
|
|
|
536
554
|
super.dispose();
|
|
537
555
|
}
|
|
538
556
|
};
|
|
539
|
-
StatusbarPart = StatusbarPart_1 = ( __decorate([( __param(1, IInstantiationService)), ( __param(2, IThemeService)), ( __param(3, IWorkspaceContextService)), ( __param(4, IStorageService)), ( __param(5, IWorkbenchLayoutService)), ( __param(6, IContextMenuService)), ( __param(7, IContextKeyService))], StatusbarPart));
|
|
557
|
+
StatusbarPart = StatusbarPart_1 = ( __decorate([( __param(1, IInstantiationService)), ( __param(2, IThemeService)), ( __param(3, IWorkspaceContextService)), ( __param(4, IStorageService)), ( __param(5, IWorkbenchLayoutService)), ( __param(6, IContextMenuService)), ( __param(7, IContextKeyService)), ( __param(8, IConfigurationService))], StatusbarPart));
|
|
540
558
|
let MainStatusbarPart = class MainStatusbarPart extends StatusbarPart {
|
|
541
559
|
constructor(
|
|
542
560
|
instantiationService,
|
|
@@ -545,7 +563,8 @@ let MainStatusbarPart = class MainStatusbarPart extends StatusbarPart {
|
|
|
545
563
|
storageService,
|
|
546
564
|
layoutService,
|
|
547
565
|
contextMenuService,
|
|
548
|
-
contextKeyService
|
|
566
|
+
contextKeyService,
|
|
567
|
+
configurationService
|
|
549
568
|
) {
|
|
550
569
|
super(
|
|
551
570
|
Parts.STATUSBAR_PART,
|
|
@@ -555,11 +574,12 @@ let MainStatusbarPart = class MainStatusbarPart extends StatusbarPart {
|
|
|
555
574
|
storageService,
|
|
556
575
|
layoutService,
|
|
557
576
|
contextMenuService,
|
|
558
|
-
contextKeyService
|
|
577
|
+
contextKeyService,
|
|
578
|
+
configurationService
|
|
559
579
|
);
|
|
560
580
|
}
|
|
561
581
|
};
|
|
562
|
-
MainStatusbarPart = ( __decorate([( __param(0, IInstantiationService)), ( __param(1, IThemeService)), ( __param(2, IWorkspaceContextService)), ( __param(3, IStorageService)), ( __param(4, IWorkbenchLayoutService)), ( __param(5, IContextMenuService)), ( __param(6, IContextKeyService))], MainStatusbarPart));
|
|
582
|
+
MainStatusbarPart = ( __decorate([( __param(0, IInstantiationService)), ( __param(1, IThemeService)), ( __param(2, IWorkspaceContextService)), ( __param(3, IStorageService)), ( __param(4, IWorkbenchLayoutService)), ( __param(5, IContextMenuService)), ( __param(6, IContextKeyService)), ( __param(7, IConfigurationService))], MainStatusbarPart));
|
|
563
583
|
let AuxiliaryStatusbarPart = class AuxiliaryStatusbarPart extends StatusbarPart {
|
|
564
584
|
static {
|
|
565
585
|
AuxiliaryStatusbarPart_1 = this;
|
|
@@ -575,7 +595,8 @@ let AuxiliaryStatusbarPart = class AuxiliaryStatusbarPart extends StatusbarPart
|
|
|
575
595
|
storageService,
|
|
576
596
|
layoutService,
|
|
577
597
|
contextMenuService,
|
|
578
|
-
contextKeyService
|
|
598
|
+
contextKeyService,
|
|
599
|
+
configurationService
|
|
579
600
|
) {
|
|
580
601
|
const id = AuxiliaryStatusbarPart_1.COUNTER++;
|
|
581
602
|
super(
|
|
@@ -586,13 +607,14 @@ let AuxiliaryStatusbarPart = class AuxiliaryStatusbarPart extends StatusbarPart
|
|
|
586
607
|
storageService,
|
|
587
608
|
layoutService,
|
|
588
609
|
contextMenuService,
|
|
589
|
-
contextKeyService
|
|
610
|
+
contextKeyService,
|
|
611
|
+
configurationService
|
|
590
612
|
);
|
|
591
613
|
this.container = container;
|
|
592
614
|
this.height = StatusbarPart.HEIGHT;
|
|
593
615
|
}
|
|
594
616
|
};
|
|
595
|
-
AuxiliaryStatusbarPart = AuxiliaryStatusbarPart_1 = ( __decorate([( __param(1, IInstantiationService)), ( __param(2, IThemeService)), ( __param(3, IWorkspaceContextService)), ( __param(4, IStorageService)), ( __param(5, IWorkbenchLayoutService)), ( __param(6, IContextMenuService)), ( __param(7, IContextKeyService))], AuxiliaryStatusbarPart));
|
|
617
|
+
AuxiliaryStatusbarPart = AuxiliaryStatusbarPart_1 = ( __decorate([( __param(1, IInstantiationService)), ( __param(2, IThemeService)), ( __param(3, IWorkspaceContextService)), ( __param(4, IStorageService)), ( __param(5, IWorkbenchLayoutService)), ( __param(6, IContextMenuService)), ( __param(7, IContextKeyService)), ( __param(8, IConfigurationService))], AuxiliaryStatusbarPart));
|
|
596
618
|
let StatusbarService = class StatusbarService extends MultiWindowParts {
|
|
597
619
|
constructor(instantiationService, storageService, themeService) {
|
|
598
620
|
super("workbench.statusBarService", themeService, storageService);
|