@codingame/monaco-vscode-view-title-bar-service-override 7.1.0 → 7.1.1
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-title-bar-service-override",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.1",
|
|
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@7.1.
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@7.1.1"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -7,7 +7,7 @@ import { SubmenuAction } from 'vscode/vscode/vs/base/common/actions';
|
|
|
7
7
|
import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
|
|
8
8
|
import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
|
|
9
9
|
import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
10
|
-
import {
|
|
10
|
+
import { localize } from 'vscode/vscode/vs/nls';
|
|
11
11
|
import { createActionViewItem } from 'vscode/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
|
|
12
12
|
import { MenuWorkbenchToolBar, HiddenItemStrategy, WorkbenchToolBar } from 'vscode/vscode/vs/platform/actions/browser/toolbar';
|
|
13
13
|
import { MenuId, SubmenuItemAction, MenuRegistry } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
@@ -18,7 +18,6 @@ import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor
|
|
|
18
18
|
import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover.service';
|
|
19
19
|
|
|
20
20
|
var CommandCenterCenterViewItem_1;
|
|
21
|
-
const _moduleId = "vs/workbench/browser/parts/titlebar/commandCenterControl";
|
|
22
21
|
let CommandCenterControl = class CommandCenterControl {
|
|
23
22
|
constructor(windowTitle, hoverDelegate, instantiationService, quickInputService) {
|
|
24
23
|
this._disposables = ( (new DisposableStore()));
|
|
@@ -144,13 +143,13 @@ let CommandCenterCenterViewItem = class CommandCenterCenterViewItem extends Base
|
|
|
144
143
|
label = that._windowTitle.fileName ?? label;
|
|
145
144
|
}
|
|
146
145
|
if (!label) {
|
|
147
|
-
label = (
|
|
146
|
+
label = ( localize(6951, "Search"));
|
|
148
147
|
}
|
|
149
148
|
if (prefix) {
|
|
150
|
-
label = (
|
|
149
|
+
label = ( localize(6952, "{0} {1}", prefix, label));
|
|
151
150
|
}
|
|
152
151
|
if (suffix) {
|
|
153
|
-
label = (
|
|
152
|
+
label = ( localize(6953, "{0} {1}", label, suffix));
|
|
154
153
|
}
|
|
155
154
|
return label.replaceAll(/\r\n|\r|\n/g, '\u23CE');
|
|
156
155
|
}
|
|
@@ -171,17 +170,15 @@ let CommandCenterCenterViewItem = class CommandCenterCenterViewItem extends Base
|
|
|
171
170
|
getTooltip() {
|
|
172
171
|
const kb = this._keybindingService.lookupKeybinding(this.action.id)?.getLabel();
|
|
173
172
|
const title = kb
|
|
174
|
-
? (
|
|
175
|
-
|
|
176
|
-
3,
|
|
173
|
+
? ( localize(
|
|
174
|
+
6954,
|
|
177
175
|
"Search {0} ({1}) \u2014 {2}",
|
|
178
176
|
this._windowTitle.workspaceName,
|
|
179
177
|
kb,
|
|
180
178
|
this._windowTitle.value
|
|
181
179
|
))
|
|
182
|
-
: (
|
|
183
|
-
|
|
184
|
-
4,
|
|
180
|
+
: ( localize(
|
|
181
|
+
6955,
|
|
185
182
|
"Search {0} \u2014 {1}",
|
|
186
183
|
this._windowTitle.workspaceName,
|
|
187
184
|
this._windowTitle.value
|
|
@@ -197,7 +194,7 @@ CommandCenterCenterViewItem = CommandCenterCenterViewItem_1 = ( (__decorate([
|
|
|
197
194
|
], CommandCenterCenterViewItem)));
|
|
198
195
|
MenuRegistry.appendMenuItem(MenuId.CommandCenter, {
|
|
199
196
|
submenu: MenuId.CommandCenterCenter,
|
|
200
|
-
title: (
|
|
197
|
+
title: ( localize(6956, "Command Center")),
|
|
201
198
|
icon: Codicon.shield,
|
|
202
199
|
order: 101,
|
|
203
200
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { localize, localize2 } from 'vscode/vscode/vs/nls';
|
|
2
2
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
3
3
|
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
4
4
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
@@ -10,7 +10,6 @@ import { ACCOUNTS_ACTIVITY_ID, GLOBAL_ACTIVITY_ID } from 'vscode/vscode/vs/workb
|
|
|
10
10
|
import { IsAuxiliaryWindowFocusedContext, TitleBarStyleContext, IsMainWindowFullscreenContext, TitleBarVisibleContext } from 'vscode/vscode/vs/workbench/common/contextkeys';
|
|
11
11
|
import { TitleBarSetting, TitlebarStyle, CustomTitleBarVisibility } from 'vscode/vscode/vs/platform/window/common/window';
|
|
12
12
|
|
|
13
|
-
const _moduleId = "vs/workbench/browser/parts/titlebar/titlebarActions";
|
|
14
13
|
class ToggleConfigAction extends Action2 {
|
|
15
14
|
constructor(section, title, description, order, mainWindowOnly) {
|
|
16
15
|
const when = mainWindowOnly ? ( (IsAuxiliaryWindowFocusedContext.toNegated())) : ContextKeyExpr.true();
|
|
@@ -44,19 +43,19 @@ class ToggleConfigAction extends Action2 {
|
|
|
44
43
|
}
|
|
45
44
|
registerAction2(class ToggleCommandCenter extends ToggleConfigAction {
|
|
46
45
|
constructor() {
|
|
47
|
-
super(LayoutSettings.COMMAND_CENTER, (
|
|
46
|
+
super(LayoutSettings.COMMAND_CENTER, ( localize(6989, 'Command Center')), ( localize(6990, "Toggle visibility of the Command Center in title bar")), 1, false);
|
|
48
47
|
}
|
|
49
48
|
});
|
|
50
49
|
registerAction2(class ToggleLayoutControl extends ToggleConfigAction {
|
|
51
50
|
constructor() {
|
|
52
|
-
super('workbench.layoutControl.enabled', (
|
|
51
|
+
super('workbench.layoutControl.enabled', ( localize(6991, 'Layout Controls')), ( localize(6992, "Toggle visibility of the Layout Controls in title bar")), 2, true);
|
|
53
52
|
}
|
|
54
53
|
});
|
|
55
54
|
registerAction2(class ToggleCustomTitleBar extends Action2 {
|
|
56
55
|
constructor() {
|
|
57
56
|
super({
|
|
58
57
|
id: `toggle.${TitleBarSetting.CUSTOM_TITLE_BAR_VISIBILITY}`,
|
|
59
|
-
title: (
|
|
58
|
+
title: ( localize(6993, 'Hide Custom Title Bar')),
|
|
60
59
|
menu: [
|
|
61
60
|
{ id: MenuId.TitleBarContext, order: 0, when: ( (ContextKeyExpr.equals(TitleBarStyleContext.key, TitlebarStyle.NATIVE))), group: '3_toggle' },
|
|
62
61
|
{ id: MenuId.TitleBarTitleContext, order: 0, when: ( (ContextKeyExpr.equals(TitleBarStyleContext.key, TitlebarStyle.NATIVE))), group: '3_toggle' },
|
|
@@ -72,7 +71,7 @@ registerAction2(class ToggleCustomTitleBarWindowed extends Action2 {
|
|
|
72
71
|
constructor() {
|
|
73
72
|
super({
|
|
74
73
|
id: `toggle.${TitleBarSetting.CUSTOM_TITLE_BAR_VISIBILITY}.windowed`,
|
|
75
|
-
title: (
|
|
74
|
+
title: ( localize(6994, 'Hide Custom Title Bar In Full Screen')),
|
|
76
75
|
menu: [
|
|
77
76
|
{ id: MenuId.TitleBarContext, order: 1, when: IsMainWindowFullscreenContext, group: '3_toggle' },
|
|
78
77
|
{ id: MenuId.TitleBarTitleContext, order: 1, when: IsMainWindowFullscreenContext, group: '3_toggle' },
|
|
@@ -88,7 +87,7 @@ class ToggleCustomTitleBar extends Action2 {
|
|
|
88
87
|
constructor() {
|
|
89
88
|
super({
|
|
90
89
|
id: `toggle.toggleCustomTitleBar`,
|
|
91
|
-
title: (
|
|
90
|
+
title: ( localize(6995, 'Custom Title Bar')),
|
|
92
91
|
toggled: TitleBarVisibleContext,
|
|
93
92
|
menu: [
|
|
94
93
|
{
|
|
@@ -139,7 +138,7 @@ registerAction2(class ShowCustomTitleBar extends Action2 {
|
|
|
139
138
|
constructor() {
|
|
140
139
|
super({
|
|
141
140
|
id: `showCustomTitleBar`,
|
|
142
|
-
title: (
|
|
141
|
+
title: ( localize2(6996, "Show Custom Title Bar")),
|
|
143
142
|
precondition: ( (TitleBarVisibleContext.negate())),
|
|
144
143
|
f1: true
|
|
145
144
|
});
|
|
@@ -153,7 +152,7 @@ registerAction2(class HideCustomTitleBar extends Action2 {
|
|
|
153
152
|
constructor() {
|
|
154
153
|
super({
|
|
155
154
|
id: `hideCustomTitleBar`,
|
|
156
|
-
title: (
|
|
155
|
+
title: ( localize2(6997, "Hide Custom Title Bar")),
|
|
157
156
|
precondition: TitleBarVisibleContext,
|
|
158
157
|
f1: true
|
|
159
158
|
});
|
|
@@ -167,7 +166,7 @@ registerAction2(class HideCustomTitleBar extends Action2 {
|
|
|
167
166
|
constructor() {
|
|
168
167
|
super({
|
|
169
168
|
id: `hideCustomTitleBarInFullScreen`,
|
|
170
|
-
title: (
|
|
169
|
+
title: ( localize2(6998, "Hide Custom Title Bar In Full Screen")),
|
|
171
170
|
precondition: ( (ContextKeyExpr.and(TitleBarVisibleContext, IsMainWindowFullscreenContext))),
|
|
172
171
|
f1: true
|
|
173
172
|
});
|
|
@@ -186,7 +185,7 @@ registerAction2(class ToggleEditorActions extends Action2 {
|
|
|
186
185
|
)))?.negate();
|
|
187
186
|
super({
|
|
188
187
|
id: `toggle.${ToggleEditorActions.settingsID}`,
|
|
189
|
-
title: (
|
|
188
|
+
title: ( localize(6999, 'Editor Actions')),
|
|
190
189
|
toggled: ( (( (ContextKeyExpr.equals(`config.${ToggleEditorActions.settingsID}`, 'hidden'))).negate())),
|
|
191
190
|
menu: [
|
|
192
191
|
{ id: MenuId.TitleBarContext, order: 3, when: titleBarContextCondition, group: '2_config' },
|
|
@@ -217,16 +216,16 @@ registerAction2(class ToggleEditorActions extends Action2 {
|
|
|
217
216
|
});
|
|
218
217
|
const ACCOUNTS_ACTIVITY_TILE_ACTION = {
|
|
219
218
|
id: ACCOUNTS_ACTIVITY_ID,
|
|
220
|
-
label: (
|
|
221
|
-
tooltip: (
|
|
219
|
+
label: ( localize(7000, "Accounts")),
|
|
220
|
+
tooltip: ( localize(7000, "Accounts")),
|
|
222
221
|
class: undefined,
|
|
223
222
|
enabled: true,
|
|
224
223
|
run: function () { }
|
|
225
224
|
};
|
|
226
225
|
const GLOBAL_ACTIVITY_TITLE_ACTION = {
|
|
227
226
|
id: GLOBAL_ACTIVITY_ID,
|
|
228
|
-
label: (
|
|
229
|
-
tooltip: (
|
|
227
|
+
label: ( localize(7001, "Manage")),
|
|
228
|
+
tooltip: ( localize(7001, "Manage")),
|
|
230
229
|
class: undefined,
|
|
231
230
|
enabled: true,
|
|
232
231
|
run: function () { }
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import './media/titlebarpart.css.js';
|
|
3
|
-
import {
|
|
3
|
+
import { localize2, localize } from 'vscode/vscode/vs/nls';
|
|
4
4
|
import { MultiWindowParts, Part } from 'vscode/vscode/vs/workbench/browser/part';
|
|
5
|
-
import { isWCOEnabled, getZoomFactor } from 'vscode/vscode/vs/base/browser/browser';
|
|
5
|
+
import { isWCOEnabled, getWCOBoundingRect, getZoomFactor } from 'vscode/vscode/vs/base/browser/browser';
|
|
6
6
|
import { DEFAULT_CUSTOM_TITLEBAR_HEIGHT, getTitleBarStyle, hasNativeTitlebar, getMenuBarVisibility } from 'vscode/vscode/vs/platform/window/common/window';
|
|
7
7
|
import { IContextMenuService } from 'vscode/vscode/vs/platform/contextview/browser/contextView.service';
|
|
8
8
|
import { StandardMouseEvent } from 'vscode/vscode/vs/base/browser/mouseEvent';
|
|
@@ -50,7 +50,6 @@ import { ACCOUNTS_ACTIVITY_TILE_ACTION, GLOBAL_ACTIVITY_TITLE_ACTION } from './t
|
|
|
50
50
|
import { createInstantHoverDelegate } from 'vscode/vscode/vs/base/browser/ui/hover/hoverDelegateFactory';
|
|
51
51
|
|
|
52
52
|
var AuxiliaryBrowserTitlebarPart_1;
|
|
53
|
-
const _moduleId = "vs/workbench/browser/parts/titlebar/titlebarPart";
|
|
54
53
|
let BrowserTitleService = class BrowserTitleService extends MultiWindowParts {
|
|
55
54
|
constructor(instantiationService, storageService, themeService) {
|
|
56
55
|
super('workbench.titleService', themeService, storageService);
|
|
@@ -71,7 +70,7 @@ let BrowserTitleService = class BrowserTitleService extends MultiWindowParts {
|
|
|
71
70
|
constructor() {
|
|
72
71
|
super({
|
|
73
72
|
id: `workbench.action.focusTitleBar`,
|
|
74
|
-
title: (
|
|
73
|
+
title: ( localize2(3046, 'Focus Title Bar')),
|
|
75
74
|
category: Categories.View,
|
|
76
75
|
f1: true,
|
|
77
76
|
});
|
|
@@ -124,7 +123,11 @@ BrowserTitleService = ( (__decorate([
|
|
|
124
123
|
], BrowserTitleService)));
|
|
125
124
|
let BrowserTitlebarPart = class BrowserTitlebarPart extends Part {
|
|
126
125
|
get minimumHeight() {
|
|
127
|
-
const
|
|
126
|
+
const wcoEnabled = isWeb && isWCOEnabled();
|
|
127
|
+
let value = this.isCommandCenterVisible || wcoEnabled ? DEFAULT_CUSTOM_TITLEBAR_HEIGHT : 30;
|
|
128
|
+
if (wcoEnabled) {
|
|
129
|
+
value = Math.max(value, getWCOBoundingRect()?.height ?? 0);
|
|
130
|
+
}
|
|
128
131
|
return value / (this.preventZoom ? getZoomFactor(getWindow(this.element)) : 1);
|
|
129
132
|
}
|
|
130
133
|
get maximumHeight() { return this.minimumHeight; }
|
|
@@ -350,7 +353,7 @@ let BrowserTitlebarPart = class BrowserTitlebarPart extends Part {
|
|
|
350
353
|
this.actionToolBar = this.actionToolBarDisposable.add(this.instantiationService.createInstance(WorkbenchToolBar, this.actionToolBarElement, {
|
|
351
354
|
contextMenu: MenuId.TitleBarContext,
|
|
352
355
|
orientation: ActionsOrientation.HORIZONTAL,
|
|
353
|
-
ariaLabel: (
|
|
356
|
+
ariaLabel: ( localize(3047, "Title actions")),
|
|
354
357
|
getKeyBinding: action => this.getKeybinding(action),
|
|
355
358
|
overflowBehavior: { maxItems: 9, exempted: [ACCOUNTS_ACTIVITY_ID, GLOBAL_ACTIVITY_ID, ...EDITOR_CORE_NAVIGATION_COMMANDS] },
|
|
356
359
|
anchorAlignmentProvider: () => AnchorAlignment.RIGHT,
|