@codingame/monaco-vscode-view-banner-service-override 9.0.2 → 10.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-banner-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@10.0.0"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -3,13 +3,11 @@ import './media/bannerpart.css.js';
|
|
|
3
3
|
import { localize2 } from 'vscode/vscode/vs/nls';
|
|
4
4
|
import { addDisposableListener, EventType, clearNode, isHTMLElement, $, append, asCSSUrl } from 'vscode/vscode/vs/base/browser/dom';
|
|
5
5
|
import { ActionBar } from 'vscode/vscode/vs/base/browser/ui/actionbar/actionbar';
|
|
6
|
-
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
7
6
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
8
7
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
9
8
|
import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService.service';
|
|
10
9
|
import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
|
|
11
10
|
import { Part } from 'vscode/vscode/vs/workbench/browser/part';
|
|
12
|
-
import { Parts } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
13
11
|
import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService.service';
|
|
14
12
|
import { Action } from 'vscode/vscode/vs/base/common/actions';
|
|
15
13
|
import { Link } from 'vscode/vscode/vs/platform/opener/browser/link';
|
|
@@ -18,8 +16,7 @@ import { IBannerService } from 'vscode/vscode/vs/workbench/services/banner/brows
|
|
|
18
16
|
import { MarkdownRenderer } from 'vscode/vscode/vs/editor/browser/widget/markdownRenderer/browser/markdownRenderer';
|
|
19
17
|
import { Action2, registerAction2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
20
18
|
import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
|
|
21
|
-
import { KeybindingsRegistry
|
|
22
|
-
import { KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
19
|
+
import { KeybindingsRegistry } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
23
20
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
24
21
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
25
22
|
import { widgetClose } from 'vscode/vscode/vs/platform/theme/common/iconRegistry';
|
|
@@ -34,7 +31,7 @@ let BannerPart = class BannerPart extends Part {
|
|
|
34
31
|
}
|
|
35
32
|
get onDidChange() { return this._onDidChangeSize.event; }
|
|
36
33
|
constructor(themeService, layoutService, storageService, contextKeyService, instantiationService) {
|
|
37
|
-
super(
|
|
34
|
+
super("workbench.parts.banner" , { hasTitle: false }, themeService, storageService, layoutService);
|
|
38
35
|
this.contextKeyService = contextKeyService;
|
|
39
36
|
this.instantiationService = instantiationService;
|
|
40
37
|
this.height = 26;
|
|
@@ -99,7 +96,7 @@ let BannerPart = class BannerPart extends Part {
|
|
|
99
96
|
if (visible !== this.visible) {
|
|
100
97
|
this.visible = visible;
|
|
101
98
|
this.focusedActionIndex = -1;
|
|
102
|
-
this.layoutService.setPartHidden(!visible,
|
|
99
|
+
this.layoutService.setPartHidden(!visible, "workbench.parts.banner" );
|
|
103
100
|
this._onDidChangeSize.fire(undefined);
|
|
104
101
|
}
|
|
105
102
|
}
|
|
@@ -170,7 +167,7 @@ let BannerPart = class BannerPart extends Part {
|
|
|
170
167
|
}
|
|
171
168
|
toJSON() {
|
|
172
169
|
return {
|
|
173
|
-
type:
|
|
170
|
+
type: "workbench.parts.banner"
|
|
174
171
|
};
|
|
175
172
|
}
|
|
176
173
|
};
|
|
@@ -183,8 +180,8 @@ BannerPart = ( (__decorate([
|
|
|
183
180
|
], BannerPart)));
|
|
184
181
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
185
182
|
id: 'workbench.banner.focusBanner',
|
|
186
|
-
weight:
|
|
187
|
-
primary:
|
|
183
|
+
weight: 200 ,
|
|
184
|
+
primary: 9 ,
|
|
188
185
|
when: BannerFocused,
|
|
189
186
|
handler: (accessor) => {
|
|
190
187
|
const bannerService = accessor.get(IBannerService);
|
|
@@ -193,9 +190,9 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
193
190
|
});
|
|
194
191
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
195
192
|
id: 'workbench.banner.focusNextAction',
|
|
196
|
-
weight:
|
|
197
|
-
primary:
|
|
198
|
-
secondary: [
|
|
193
|
+
weight: 200 ,
|
|
194
|
+
primary: 17 ,
|
|
195
|
+
secondary: [18 ],
|
|
199
196
|
when: BannerFocused,
|
|
200
197
|
handler: (accessor) => {
|
|
201
198
|
const bannerService = accessor.get(IBannerService);
|
|
@@ -204,9 +201,9 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
204
201
|
});
|
|
205
202
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
206
203
|
id: 'workbench.banner.focusPreviousAction',
|
|
207
|
-
weight:
|
|
208
|
-
primary:
|
|
209
|
-
secondary: [
|
|
204
|
+
weight: 200 ,
|
|
205
|
+
primary: 15 ,
|
|
206
|
+
secondary: [16 ],
|
|
210
207
|
when: BannerFocused,
|
|
211
208
|
handler: (accessor) => {
|
|
212
209
|
const bannerService = accessor.get(IBannerService);
|
|
@@ -215,7 +212,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
215
212
|
});
|
|
216
213
|
class FocusBannerAction extends Action2 {
|
|
217
214
|
static { this.ID = 'workbench.action.focusBanner'; }
|
|
218
|
-
static { this.LABEL = ( localize2(
|
|
215
|
+
static { this.LABEL = ( localize2(2993, "Focus Banner")); }
|
|
219
216
|
constructor() {
|
|
220
217
|
super({
|
|
221
218
|
id: FocusBannerAction.ID,
|
|
@@ -226,7 +223,7 @@ class FocusBannerAction extends Action2 {
|
|
|
226
223
|
}
|
|
227
224
|
async run(accessor) {
|
|
228
225
|
const layoutService = accessor.get(IWorkbenchLayoutService);
|
|
229
|
-
layoutService.focusPart(
|
|
226
|
+
layoutService.focusPart("workbench.parts.banner" );
|
|
230
227
|
}
|
|
231
228
|
}
|
|
232
229
|
registerAction2(FocusBannerAction);
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
|
-
import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
3
2
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
4
3
|
import { Extensions } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
5
4
|
import { IBannerService } from 'vscode/vscode/vs/workbench/services/banner/browser/bannerService.service';
|
|
6
|
-
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
7
5
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
8
6
|
import { IBrowserWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/browser/environmentService.service';
|
|
9
7
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
@@ -18,7 +16,7 @@ let WelcomeBannerContribution = class WelcomeBannerContribution {
|
|
|
18
16
|
if (!welcomeBanner) {
|
|
19
17
|
return;
|
|
20
18
|
}
|
|
21
|
-
if (storageService.getBoolean(WelcomeBannerContribution_1.WELCOME_BANNER_DISMISSED_KEY,
|
|
19
|
+
if (storageService.getBoolean(WelcomeBannerContribution_1.WELCOME_BANNER_DISMISSED_KEY, 0 , false)) {
|
|
22
20
|
return;
|
|
23
21
|
}
|
|
24
22
|
let icon = undefined;
|
|
@@ -34,7 +32,7 @@ let WelcomeBannerContribution = class WelcomeBannerContribution {
|
|
|
34
32
|
icon,
|
|
35
33
|
actions: welcomeBanner.actions,
|
|
36
34
|
onClose: () => {
|
|
37
|
-
storageService.store(WelcomeBannerContribution_1.WELCOME_BANNER_DISMISSED_KEY, true,
|
|
35
|
+
storageService.store(WelcomeBannerContribution_1.WELCOME_BANNER_DISMISSED_KEY, true, 0 , 1 );
|
|
38
36
|
}
|
|
39
37
|
});
|
|
40
38
|
}
|
|
@@ -45,4 +43,4 @@ WelcomeBannerContribution = WelcomeBannerContribution_1 = ( __decorate([
|
|
|
45
43
|
( __param(2, IBrowserWorkbenchEnvironmentService))
|
|
46
44
|
], WelcomeBannerContribution));
|
|
47
45
|
( Registry.as(Extensions.Workbench))
|
|
48
|
-
.registerWorkbenchContribution(WelcomeBannerContribution,
|
|
46
|
+
.registerWorkbenchContribution(WelcomeBannerContribution, 3 );
|