@codingame/monaco-vscode-api 1.82.2 → 1.82.4-next.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/README.md +2 -0
- package/missing-services.js +23 -6
- package/monaco-editor-treemending.patch +1026 -1026
- package/package.json +1 -1
- package/service-override/keybindings.js +11 -0
- package/service-override/quickaccess.js +1 -1
- package/service-override/tools/editor.d.ts +1 -1
- package/service-override/viewBanner.d.ts +6 -0
- package/service-override/viewBanner.js +10 -0
- package/service-override/viewStatusBar.d.ts +6 -0
- package/service-override/viewStatusBar.js +10 -0
- package/service-override/viewTitleBar.d.ts +6 -0
- package/service-override/viewTitleBar.js +10 -0
- package/service-override/views.d.ts +0 -1
- package/service-override/views.js +14 -6
- package/service-override/workspaceTrust.d.ts +5 -0
- package/service-override/workspaceTrust.js +13 -0
- package/services.d.ts +3 -0
- package/services.js +3 -0
- package/vscode/src/vs/base/common/actions.d.ts +15 -1
- package/vscode/src/vs/base/common/async.d.ts +31 -1
- package/vscode/src/vs/base/common/htmlContent.d.ts +23 -2
- package/vscode/src/vs/platform/backup/common/backup.d.ts +14 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementUtil.js +16 -1
- package/vscode/src/vs/platform/label/common/label.d.ts +62 -0
- package/vscode/src/vs/platform/opener/browser/link.d.ts +8 -0
- package/vscode/src/vs/platform/update/common/update.d.ts +112 -0
- package/vscode/src/vs/platform/window/common/window.d.ts +2 -1
- package/vscode/src/vs/platform/workspace/common/workspaceTrust.d.ts +34 -1
- package/vscode/src/vs/platform/workspaces/common/workspaces.d.ts +43 -1
- package/vscode/src/vs/workbench/browser/contextkeys.js +249 -0
- package/vscode/src/vs/workbench/browser/parts/banner/bannerPart.d.ts +45 -0
- package/vscode/src/vs/workbench/browser/parts/banner/bannerPart.js +228 -0
- package/vscode/src/vs/workbench/browser/parts/banner/media/bannerpart.css.js +4 -0
- package/vscode/src/vs/workbench/browser/parts/panel/panelActions.js +21 -0
- package/vscode/src/vs/workbench/browser/parts/titlebar/commandCenterControl.js +134 -0
- package/vscode/src/vs/workbench/browser/parts/titlebar/media/titlebarpart.css.js +4 -0
- package/vscode/src/vs/workbench/browser/parts/titlebar/menubarControl.d.ts +115 -0
- package/vscode/src/vs/workbench/browser/parts/titlebar/titlebarPart.d.ts +77 -0
- package/vscode/src/vs/workbench/browser/parts/titlebar/titlebarPart.js +365 -0
- package/vscode/src/vs/workbench/browser/parts/titlebar/windowTitle.js +216 -0
- package/vscode/src/vs/workbench/common/contextkeys.js +21 -1
- package/vscode/src/vs/workbench/common/theme.js +6 -6
- package/vscode/src/vs/workbench/contrib/extensions/common/extensions.js +2 -1
- package/vscode/src/vs/workbench/contrib/preferences/browser/preferences.contribution.js +108 -4
- package/vscode/src/vs/workbench/contrib/webview/browser/themeing.js +2 -2
- package/vscode/src/vs/workbench/contrib/workspace/browser/media/workspaceTrustEditor.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/workspace/browser/workspace.contribution.js +842 -0
- package/vscode/src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.js +1047 -0
- package/vscode/src/vs/workbench/contrib/workspace/common/workspace.js +14 -0
- package/vscode/src/vs/workbench/services/banner/browser/bannerService.d.ts +25 -0
- package/vscode/src/vs/workbench/services/banner/browser/bannerService.js +3 -0
- package/vscode/src/vs/workbench/services/themes/common/themeCompatibility.js +10 -10
- package/vscode/src/vs/workbench/services/title/common/titleService.d.ts +31 -0
- package/vscode/src/vs/workbench/services/title/common/titleService.js +3 -0
- package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfile.js +3 -1
- package/vscode/src/vs/workbench/services/workspaces/browser/workspaceTrustEditorInput.js +27 -0
- package/vscode/src/vs/workbench/services/workspaces/common/workspaceTrust.js +649 -1
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { reset } from 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
3
|
+
import { BaseActionViewItem } from 'monaco-editor/esm/vs/base/browser/ui/actionbar/actionViewItems.js';
|
|
4
|
+
import { setupCustomHover } from 'monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabelHover.js';
|
|
5
|
+
import { renderIcon } from 'monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabels.js';
|
|
6
|
+
import { Codicon } from 'monaco-editor/esm/vs/base/common/codicons.js';
|
|
7
|
+
import { Color } from 'monaco-editor/esm/vs/base/common/color.js';
|
|
8
|
+
import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
9
|
+
import { DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
10
|
+
import { localize } from 'monaco-editor/esm/vs/nls.js';
|
|
11
|
+
import { createActionViewItem } from 'monaco-editor/esm/vs/platform/actions/browser/menuEntryActionViewItem.js';
|
|
12
|
+
import { MenuWorkbenchToolBar } from 'monaco-editor/esm/vs/platform/actions/browser/toolbar.js';
|
|
13
|
+
import { MenuId, MenuItemAction } from 'monaco-editor/esm/vs/platform/actions/common/actions.js';
|
|
14
|
+
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
15
|
+
import { IKeybindingService } from 'monaco-editor/esm/vs/platform/keybinding/common/keybinding.js';
|
|
16
|
+
import { IQuickInputService } from 'monaco-editor/esm/vs/platform/quickinput/common/quickInput.js';
|
|
17
|
+
import * as colors from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
|
|
18
|
+
import { TITLE_BAR_ACTIVE_FOREGROUND, MENUBAR_SELECTION_FOREGROUND, TITLE_BAR_INACTIVE_FOREGROUND, MENUBAR_SELECTION_BACKGROUND } from '../../../common/theme.js';
|
|
19
|
+
let CommandCenterControl = class CommandCenterControl {
|
|
20
|
+
constructor(windowTitle, hoverDelegate, instantiationService, quickInputService, keybindingService) {
|
|
21
|
+
this._disposables = ( new DisposableStore());
|
|
22
|
+
this._onDidChangeVisibility = ( new Emitter());
|
|
23
|
+
this.onDidChangeVisibility = this._onDidChangeVisibility.event;
|
|
24
|
+
this.element = document.createElement('div');
|
|
25
|
+
this.element.classList.add('command-center');
|
|
26
|
+
const titleToolbar = instantiationService.createInstance(MenuWorkbenchToolBar, this.element, MenuId.CommandCenter, {
|
|
27
|
+
contextMenu: MenuId.TitleBarContext,
|
|
28
|
+
hiddenItemStrategy: 0 ,
|
|
29
|
+
toolbarOptions: {
|
|
30
|
+
primaryGroup: () => true,
|
|
31
|
+
},
|
|
32
|
+
telemetrySource: 'commandCenter',
|
|
33
|
+
actionViewItemProvider: (action) => {
|
|
34
|
+
if (action instanceof MenuItemAction && action.id === 'workbench.action.quickOpenWithModes') {
|
|
35
|
+
class CommandCenterViewItem extends BaseActionViewItem {
|
|
36
|
+
constructor(action, options) {
|
|
37
|
+
super(undefined, action, options);
|
|
38
|
+
}
|
|
39
|
+
render(container) {
|
|
40
|
+
super.render(container);
|
|
41
|
+
container.classList.add('command-center');
|
|
42
|
+
const searchIcon = renderIcon(Codicon.search);
|
|
43
|
+
searchIcon.classList.add('search-icon');
|
|
44
|
+
const label = this._getLabel();
|
|
45
|
+
const labelElement = document.createElement('span');
|
|
46
|
+
labelElement.classList.add('search-label');
|
|
47
|
+
labelElement.innerText = label;
|
|
48
|
+
reset(container, searchIcon, labelElement);
|
|
49
|
+
const hover = this._store.add(setupCustomHover(hoverDelegate, container, this.getTooltip()));
|
|
50
|
+
this._store.add(windowTitle.onDidChange(() => {
|
|
51
|
+
hover.update(this.getTooltip());
|
|
52
|
+
labelElement.innerText = this._getLabel();
|
|
53
|
+
}));
|
|
54
|
+
}
|
|
55
|
+
_getLabel() {
|
|
56
|
+
const { prefix, suffix } = windowTitle.getTitleDecorations();
|
|
57
|
+
let label = windowTitle.isCustomTitleFormat() ? windowTitle.getWindowTitle() : windowTitle.workspaceName;
|
|
58
|
+
if (!label) {
|
|
59
|
+
label = ( localize('label.dfl', "Search"));
|
|
60
|
+
}
|
|
61
|
+
if (prefix) {
|
|
62
|
+
label = ( localize('label1', "{0} {1}", prefix, label));
|
|
63
|
+
}
|
|
64
|
+
if (suffix) {
|
|
65
|
+
label = ( localize('label2', "{0} {1}", label, suffix));
|
|
66
|
+
}
|
|
67
|
+
return label;
|
|
68
|
+
}
|
|
69
|
+
getTooltip() {
|
|
70
|
+
const kb = keybindingService.lookupKeybinding(action.id)?.getLabel();
|
|
71
|
+
const title = kb
|
|
72
|
+
? ( localize(
|
|
73
|
+
'title',
|
|
74
|
+
"Search {0} ({1}) \u2014 {2}",
|
|
75
|
+
windowTitle.workspaceName,
|
|
76
|
+
kb,
|
|
77
|
+
windowTitle.value
|
|
78
|
+
))
|
|
79
|
+
: ( localize(
|
|
80
|
+
'title2',
|
|
81
|
+
"Search {0} \u2014 {1}",
|
|
82
|
+
windowTitle.workspaceName,
|
|
83
|
+
windowTitle.value
|
|
84
|
+
));
|
|
85
|
+
return title;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return instantiationService.createInstance(CommandCenterViewItem, action, {});
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
return createActionViewItem(instantiationService, action, { hoverDelegate });
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
this._disposables.add(quickInputService.onShow(this._setVisibility.bind(this, false)));
|
|
96
|
+
this._disposables.add(quickInputService.onHide(this._setVisibility.bind(this, true)));
|
|
97
|
+
this._disposables.add(titleToolbar);
|
|
98
|
+
}
|
|
99
|
+
_setVisibility(show) {
|
|
100
|
+
this.element.classList.toggle('hide', !show);
|
|
101
|
+
this._onDidChangeVisibility.fire();
|
|
102
|
+
}
|
|
103
|
+
dispose() {
|
|
104
|
+
this._disposables.dispose();
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
CommandCenterControl = ( __decorate([
|
|
108
|
+
( __param(2, IInstantiationService)),
|
|
109
|
+
( __param(3, IQuickInputService)),
|
|
110
|
+
( __param(4, IKeybindingService))
|
|
111
|
+
], CommandCenterControl));
|
|
112
|
+
colors.registerColor('commandCenter.foreground', { dark: TITLE_BAR_ACTIVE_FOREGROUND, hcDark: TITLE_BAR_ACTIVE_FOREGROUND, light: TITLE_BAR_ACTIVE_FOREGROUND, hcLight: TITLE_BAR_ACTIVE_FOREGROUND }, ( localize('commandCenter-foreground', "Foreground color of the command center")), false);
|
|
113
|
+
colors.registerColor('commandCenter.activeForeground', { dark: MENUBAR_SELECTION_FOREGROUND, hcDark: MENUBAR_SELECTION_FOREGROUND, light: MENUBAR_SELECTION_FOREGROUND, hcLight: MENUBAR_SELECTION_FOREGROUND }, ( localize(
|
|
114
|
+
'commandCenter-activeForeground',
|
|
115
|
+
"Active foreground color of the command center"
|
|
116
|
+
)), false);
|
|
117
|
+
colors.registerColor('commandCenter.inactiveForeground', { dark: TITLE_BAR_INACTIVE_FOREGROUND, hcDark: TITLE_BAR_INACTIVE_FOREGROUND, light: TITLE_BAR_INACTIVE_FOREGROUND, hcLight: TITLE_BAR_INACTIVE_FOREGROUND }, ( localize(
|
|
118
|
+
'commandCenter-inactiveForeground',
|
|
119
|
+
"Foreground color of the command center when the window is inactive"
|
|
120
|
+
)), false);
|
|
121
|
+
colors.registerColor('commandCenter.background', {
|
|
122
|
+
dark: ( Color.white.transparent(0.05)), hcDark: null, light: ( Color.black.transparent(0.05)), hcLight: null
|
|
123
|
+
}, ( localize('commandCenter-background', "Background color of the command center")), false);
|
|
124
|
+
colors.registerColor('commandCenter.activeBackground', { dark: ( Color.white.transparent(0.08)), hcDark: MENUBAR_SELECTION_BACKGROUND, light: ( Color.black.transparent(0.08)), hcLight: MENUBAR_SELECTION_BACKGROUND }, ( localize(
|
|
125
|
+
'commandCenter-activeBackground',
|
|
126
|
+
"Active background color of the command center"
|
|
127
|
+
)), false);
|
|
128
|
+
colors.registerColor('commandCenter.border', { dark: ( colors.transparent(TITLE_BAR_ACTIVE_FOREGROUND, .20)), hcDark: ( colors.transparent(TITLE_BAR_ACTIVE_FOREGROUND, .60)), light: ( colors.transparent(TITLE_BAR_ACTIVE_FOREGROUND, .20)), hcLight: ( colors.transparent(TITLE_BAR_ACTIVE_FOREGROUND, .60)) }, ( localize('commandCenter-border', "Border color of the command center")), false);
|
|
129
|
+
colors.registerColor('commandCenter.activeBorder', { dark: ( colors.transparent(TITLE_BAR_ACTIVE_FOREGROUND, .30)), hcDark: TITLE_BAR_ACTIVE_FOREGROUND, light: ( colors.transparent(TITLE_BAR_ACTIVE_FOREGROUND, .30)), hcLight: TITLE_BAR_ACTIVE_FOREGROUND }, ( localize('commandCenter-activeBorder', "Active border color of the command center")), false);
|
|
130
|
+
colors.registerColor('commandCenter.inactiveBorder', { dark: ( colors.transparent(TITLE_BAR_INACTIVE_FOREGROUND, .25)), hcDark: ( colors.transparent(TITLE_BAR_INACTIVE_FOREGROUND, .25)), light: ( colors.transparent(TITLE_BAR_INACTIVE_FOREGROUND, .25)), hcLight: ( colors.transparent(TITLE_BAR_INACTIVE_FOREGROUND, .25)) }, ( localize(
|
|
131
|
+
'commandCenter-inactiveBorder',
|
|
132
|
+
"Border color of the command center when the window is inactive"
|
|
133
|
+
)), false);
|
|
134
|
+
export { CommandCenterControl };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import n from '../../../../../../../../external/rollup-plugin-styles/dist/runtime/inject-css.js';
|
|
2
|
+
var css = ".monaco-workbench .part.titlebar{display:flex;flex-direction:row}.monaco-workbench.mac .part.titlebar{flex-direction:row-reverse}.monaco-workbench .part.titlebar>.titlebar-container{align-items:center;box-sizing:border-box;display:flex;flex-grow:1;flex-shrink:1;height:100%;justify-content:space-between;overflow:hidden;user-select:none;-webkit-user-select:none;width:100%}.monaco-workbench .part.titlebar>.titlebar-container.counter-zoom{zoom:calc(1/var(--zoom-factor))}.monaco-workbench.mac .part.titlebar>.titlebar-container{line-height:22px}.monaco-workbench.linux .part.titlebar>.titlebar-container,.monaco-workbench.web .part.titlebar>.titlebar-container,.monaco-workbench.windows .part.titlebar>.titlebar-container{justify-content:left;line-height:22px}.monaco-workbench.web.safari .part.titlebar,.monaco-workbench.web.safari .part.titlebar>.titlebar-container{overflow:visible}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-drag-region{-webkit-app-region:drag;display:block;height:100%;left:0;position:absolute;top:0;width:100%}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center,.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-left,.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-right{align-items:center;display:flex;height:100%}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-left{flex-grow:2;justify-content:flex-start;order:0;width:20%}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center{justify-content:center;margin:0 10px;max-width:fit-content;min-width:0;order:1;width:60%}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-right{flex-grow:2;justify-content:flex-end;min-width:min-content;order:2;width:20%}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center>.window-title{flex:0 1 auto;font-size:12px;margin-left:auto;margin-right:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-workbench.linux .part.titlebar>.titlebar-container>.titlebar-center>.window-title,.monaco-workbench.web .part.titlebar>.titlebar-container>.titlebar-center>.window-title,.monaco-workbench.windows .part.titlebar>.titlebar-container>.titlebar-center>.window-title{cursor:default}.monaco-workbench.linux .part.titlebar>.titlebar-container>.titlebar-center>.window-title{font-size:inherit}.monaco-workbench .part.titlebar>.titlebar-container .monaco-toolbar .actions-container{gap:4px}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center>.window-title>.command-center{-webkit-app-region:no-drag;z-index:2500}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center>.window-title>.command-center.hide{visibility:hidden}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center>.window-title>.command-center .action-item>.action-label{color:var(--vscode-titleBar-activeForeground)}.monaco-workbench .part.titlebar.inactive>.titlebar-container>.titlebar-center>.window-title>.command-center .action-item>.action-label{color:var(--vscode-titleBar-inactiveForeground)}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center>.window-title>.command-center .codicon{color:inherit}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center>.window-title>.command-center .action-item.command-center{align-items:stretch;background-color:var(--vscode-commandCenter-background);border:1px solid var(--vscode-commandCenter-border);border-bottom-left-radius:6px;border-bottom-right-radius:6px;border-top-left-radius:6px;border-top-right-radius:6px;color:var(--vscode-commandCenter-foreground);display:flex;height:22px;margin-left:6px;max-width:600px;overflow:hidden;width:38vw}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center>.window-title>.command-center .action-item.command-center:only-child{margin-left:0}.monaco-workbench .part.titlebar.inactive>.titlebar-container>.titlebar-center>.window-title>.command-center .action-item.command-center{border-color:var(--vscode-commandCenter-inactiveBorder)!important;color:var(--vscode-titleBar-inactiveForeground)}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center>.window-title>.command-center .action-item.command-center .search-icon{font-size:14px;margin:auto 3px;opacity:.8}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center>.window-title>.command-center .action-item.command-center .search-label{overflow:hidden;text-overflow:ellipsis}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-center>.window-title>.command-center .action-item.command-center:HOVER{background-color:var(--vscode-commandCenter-activeBackground);border-color:var(--vscode-commandCenter-activeBorder);color:var(--vscode-commandCenter-activeForeground)}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-left>.menubar{flex-wrap:nowrap;min-width:36px;order:2;z-index:2500}.monaco-workbench.web .part.titlebar>.titlebar-container>.titlebar-left>.menubar{margin-left:4px}.monaco-workbench .part.titlebar>.titlebar-container.counter-zoom .menubar .menubar-menu-button>.menubar-menu-items-holder.monaco-menu-container{zoom:var(--zoom-factor)}.monaco-workbench.linux .part.titlebar>.titlebar-container>.resizer,.monaco-workbench.windows .part.titlebar>.titlebar-container>.resizer{-webkit-app-region:no-drag;height:4px;position:absolute;top:0;width:100%}.monaco-workbench.linux.fullscreen .part.titlebar>.titlebar-container>.resizer,.monaco-workbench.windows.fullscreen .part.titlebar>.titlebar-container>.resizer{display:none}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-left>.window-appicon{flex-shrink:0;height:100%;order:1;position:relative;width:35px;z-index:2500}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-left>.window-appicon:not(.codicon){background-image:url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGQ9Ik0xMDI0IDEwMjRIMFYwaDEwMjR2MTAyNHoiIHN0eWxlPSJmaWxsOiNmNmY2ZjY7ZmlsbC1vcGFjaXR5OjAiIGZpbGw9Im5vbmUiLz48cGF0aCBkPSJNMTAyNCA4NS4zMzN2ODUzLjMzM0gwVjg1LjMzM2gxMDI0eiIgc3R5bGU9ImZpbGw6I2ZmZiIvPjxwYXRoIGQ9Ik0wIDg1LjMzM2gyOTguNjY3djg1My4zMzNIMFY4NS4zMzN6bTEwMjQgMHY4NTMuMzMzSDM4NFY4NS4zMzNoNjQwem0tNTU0LjY2NyAxNjBoMzQxLjMzM3YtNjRINDY5LjMzM3Y2NHptMzQxLjMzNCA1MzMuMzM0SDQ2OS4zMzN2NjRoMzQxLjMzM2wuMDAxLTY0em0xMjgtMTQ5LjMzNEg1OTcuMzMzdjY0aDM0MS4zMzNsLjAwMS02NHptMC0xNDkuMzMzSDU5Ny4zMzN2NjRoMzQxLjMzM2wuMDAxLTY0em0wLTE0OS4zMzNINTk3LjMzM3Y2NGgzNDEuMzMzbC4wMDEtNjR6IiBzdHlsZT0iZmlsbDojMTY3YWJmIi8+PC9zdmc+\");background-position:50%;background-repeat:no-repeat;background-size:16px}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-left>.window-appicon.codicon{line-height:30px}.monaco-workbench.fullscreen .part.titlebar>.titlebar-container>.titlebar-left>.window-appicon{display:none}.monaco-workbench .part.titlebar>.titlebar-container .window-appicon>.home-bar-icon-badge{background-image:url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGQ9Ik0xMDI0IDEwMjRIMFYwaDEwMjR2MTAyNHoiIHN0eWxlPSJmaWxsOiNmNmY2ZjY7ZmlsbC1vcGFjaXR5OjAiIGZpbGw9Im5vbmUiLz48cGF0aCBkPSJNMTAyNCA4NS4zMzN2ODUzLjMzM0gwVjg1LjMzM2gxMDI0eiIgc3R5bGU9ImZpbGw6I2ZmZiIvPjxwYXRoIGQ9Ik0wIDg1LjMzM2gyOTguNjY3djg1My4zMzNIMFY4NS4zMzN6bTEwMjQgMHY4NTMuMzMzSDM4NFY4NS4zMzNoNjQwem0tNTU0LjY2NyAxNjBoMzQxLjMzM3YtNjRINDY5LjMzM3Y2NHptMzQxLjMzNCA1MzMuMzM0SDQ2OS4zMzN2NjRoMzQxLjMzM2wuMDAxLTY0em0xMjgtMTQ5LjMzNEg1OTcuMzMzdjY0aDM0MS4zMzNsLjAwMS02NHptMC0xNDkuMzMzSDU5Ny4zMzN2NjRoMzQxLjMzM2wuMDAxLTY0em0wLTE0OS4zMzNINTk3LjMzM3Y2NGgzNDEuMzMzbC4wMDEtNjR6IiBzdHlsZT0iZmlsbDojMTY3YWJmIi8+PC9zdmc+\");background-position:50%;background-repeat:no-repeat;background-size:8px;border-left:1px solid transparent;border-top:1px solid transparent;bottom:6px;height:8px;pointer-events:none;position:absolute;right:9px;width:8px;z-index:1}.monaco-workbench .part.titlebar .window-controls-container{-webkit-app-region:no-drag;display:flex;flex-grow:0;flex-shrink:0;height:100%;text-align:center;width:0;z-index:3000}.monaco-workbench.web .part.titlebar .titlebar-right .window-controls-container{height:env(titlebar-area-height,35px);width:calc(100vw - env(titlebar-area-width, 100vw) - env(titlebar-area-x, 0px))}.monaco-workbench.web .part.titlebar .titlebar-left .window-controls-container{height:env(titlebar-area-height,35px);width:env(titlebar-area-x,0)}.monaco-workbench.web.mac .part.titlebar .titlebar-left .window-controls-container{order:0}.monaco-workbench.web.mac .part.titlebar .titlebar-right .window-controls-container{order:1}.monaco-workbench:not(.web):not(.mac) .part.titlebar .window-controls-container.primary{width:calc(138px/var(--zoom-factor, 1))}.monaco-workbench:not(.web):not(.mac) .part.titlebar .titlebar-container.counter-zoom .window-controls-container.primary{width:138px}.monaco-workbench:not(.web):not(.mac) .part.titlebar .titlebar-container:not(.counter-zoom) .window-controls-container *{zoom:calc(1/var(--zoom-factor, 1))}.monaco-workbench:not(.web).mac .part.titlebar .window-controls-container.primary{width:70px}.monaco-workbench.fullscreen .part.titlebar .window-controls-container{background-color:transparent;display:none}.monaco-workbench .part.titlebar .window-controls-container>.window-icon{align-items:center;display:flex;font-size:16px;height:100%;justify-content:center;width:46px}.monaco-workbench .part.titlebar .window-controls-container>.window-icon:before{height:16px;line-height:16px}.monaco-workbench .part.titlebar .window-controls-container>.window-icon:hover{background-color:hsla(0,0%,100%,.1)}.monaco-workbench .part.titlebar.light>.window-controls-container>.window-icon:hover{background-color:rgba(0,0,0,.1)}.monaco-workbench .part.titlebar .window-controls-container>.window-icon.window-close:hover{background-color:rgba(232,17,35,.9)}.monaco-workbench .part.titlebar .window-controls-container .window-icon.window-close:hover{color:#fff}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-right>.layout-controls-container{-webkit-app-region:no-drag;display:none;flex-grow:0;flex-shrink:0;height:100%;margin-left:auto;min-width:28px;padding-right:2px;position:relative;text-align:center;z-index:2500}.monaco-workbench.mac:not(.web) .part.titlebar>.titlebar-container>.titlebar-right>.layout-controls-container{right:8px}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-right>.layout-controls-container.show-layout-control{display:flex;justify-content:center}.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-right>.layout-controls-container .codicon{color:inherit}.monaco-workbench .part.titlebar .window-controls-container .window-icon{color:var(--vscode-titleBar-activeForeground)}.monaco-workbench .part.titlebar.inactive .window-controls-container .window-icon{color:var(--vscode-titleBar-inactiveForeground)}";
|
|
3
|
+
n(css,{});
|
|
4
|
+
export { css, css as default };
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { IMenuService, IMenu } from '../../../../platform/actions/common/actions.js';
|
|
2
|
+
import { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js';
|
|
3
|
+
import { Separator, IAction } from '../../../../base/common/actions.js';
|
|
4
|
+
import { Dimension } from '../../../../base/browser/dom.js';
|
|
5
|
+
import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';
|
|
6
|
+
import { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';
|
|
7
|
+
import { Event } from '../../../../base/common/event.js';
|
|
8
|
+
import { Disposable, DisposableStore } from '../../../../base/common/lifecycle.js';
|
|
9
|
+
import { IWorkspacesService, IRecentlyOpened } from '../../../../platform/workspaces/common/workspaces.js';
|
|
10
|
+
import { RunOnceScheduler } from '../../../../base/common/async.js';
|
|
11
|
+
import { URI } from '../../../../base/common/uri.js';
|
|
12
|
+
import { ILabelService } from '../../../../platform/label/common/label.js';
|
|
13
|
+
import { IUpdateService } from '../../../../platform/update/common/update.js';
|
|
14
|
+
import { IStorageService } from '../../../../platform/storage/common/storage.js';
|
|
15
|
+
import { INotificationService } from '../../../../platform/notification/common/notification.js';
|
|
16
|
+
import { IPreferencesService } from '../../../services/preferences/common/preferences.js';
|
|
17
|
+
import { IWorkbenchEnvironmentService } from '../../../services/environment/common/environmentService.js';
|
|
18
|
+
import { IAccessibilityService } from '../../../../platform/accessibility/common/accessibility.js';
|
|
19
|
+
import { IWorkbenchLayoutService } from '../../../services/layout/browser/layoutService.js';
|
|
20
|
+
import { IHostService } from '../../../services/host/browser/host.js';
|
|
21
|
+
import { ICommandService } from '../../../../platform/commands/common/commands.js';
|
|
22
|
+
import { ITelemetryService } from '../../../../platform/telemetry/common/telemetry.js';
|
|
23
|
+
|
|
24
|
+
type IOpenRecentAction = IAction & {
|
|
25
|
+
uri: URI;
|
|
26
|
+
remoteAuthority?: string;
|
|
27
|
+
};
|
|
28
|
+
declare abstract class MenubarControl extends Disposable {
|
|
29
|
+
protected readonly menuService: IMenuService;
|
|
30
|
+
protected readonly workspacesService: IWorkspacesService;
|
|
31
|
+
protected readonly contextKeyService: IContextKeyService;
|
|
32
|
+
protected readonly keybindingService: IKeybindingService;
|
|
33
|
+
protected readonly configurationService: IConfigurationService;
|
|
34
|
+
protected readonly labelService: ILabelService;
|
|
35
|
+
protected readonly updateService: IUpdateService;
|
|
36
|
+
protected readonly storageService: IStorageService;
|
|
37
|
+
protected readonly notificationService: INotificationService;
|
|
38
|
+
protected readonly preferencesService: IPreferencesService;
|
|
39
|
+
protected readonly environmentService: IWorkbenchEnvironmentService;
|
|
40
|
+
protected readonly accessibilityService: IAccessibilityService;
|
|
41
|
+
protected readonly hostService: IHostService;
|
|
42
|
+
protected readonly commandService: ICommandService;
|
|
43
|
+
protected keys: string[];
|
|
44
|
+
protected mainMenu: IMenu;
|
|
45
|
+
protected menus: {
|
|
46
|
+
[index: string]: IMenu | undefined;
|
|
47
|
+
};
|
|
48
|
+
protected topLevelTitles: {
|
|
49
|
+
[menu: string]: string;
|
|
50
|
+
};
|
|
51
|
+
protected mainMenuDisposables: DisposableStore;
|
|
52
|
+
protected recentlyOpened: IRecentlyOpened;
|
|
53
|
+
protected menuUpdater: RunOnceScheduler;
|
|
54
|
+
protected static readonly MAX_MENU_RECENT_ENTRIES = 10;
|
|
55
|
+
constructor(menuService: IMenuService, workspacesService: IWorkspacesService, contextKeyService: IContextKeyService, keybindingService: IKeybindingService, configurationService: IConfigurationService, labelService: ILabelService, updateService: IUpdateService, storageService: IStorageService, notificationService: INotificationService, preferencesService: IPreferencesService, environmentService: IWorkbenchEnvironmentService, accessibilityService: IAccessibilityService, hostService: IHostService, commandService: ICommandService);
|
|
56
|
+
protected abstract doUpdateMenubar(firstTime: boolean): void;
|
|
57
|
+
protected registerListeners(): void;
|
|
58
|
+
protected setupMainMenu(): void;
|
|
59
|
+
protected updateMenubar(): void;
|
|
60
|
+
protected calculateActionLabel(action: {
|
|
61
|
+
id: string;
|
|
62
|
+
label: string;
|
|
63
|
+
}): string;
|
|
64
|
+
protected onUpdateStateChange(): void;
|
|
65
|
+
protected onUpdateKeybindings(): void;
|
|
66
|
+
protected getOpenRecentActions(): (Separator | IOpenRecentAction)[];
|
|
67
|
+
protected onDidChangeWindowFocus(hasFocus: boolean): void;
|
|
68
|
+
private onConfigurationUpdated;
|
|
69
|
+
private get menubarHidden();
|
|
70
|
+
protected onDidChangeRecentlyOpened(): void;
|
|
71
|
+
private createOpenRecentMenuAction;
|
|
72
|
+
private notifyUserOfCustomMenubarAccessibility;
|
|
73
|
+
}
|
|
74
|
+
declare class CustomMenubarControl extends MenubarControl {
|
|
75
|
+
private readonly layoutService;
|
|
76
|
+
private readonly telemetryService;
|
|
77
|
+
private menubar;
|
|
78
|
+
private container;
|
|
79
|
+
private alwaysOnMnemonics;
|
|
80
|
+
private focusInsideMenubar;
|
|
81
|
+
private pendingFirstTimeUpdate;
|
|
82
|
+
private visible;
|
|
83
|
+
private actionRunner;
|
|
84
|
+
private readonly webNavigationMenu;
|
|
85
|
+
private readonly _onVisibilityChange;
|
|
86
|
+
private readonly _onFocusStateChange;
|
|
87
|
+
constructor(menuService: IMenuService, workspacesService: IWorkspacesService, contextKeyService: IContextKeyService, keybindingService: IKeybindingService, configurationService: IConfigurationService, labelService: ILabelService, updateService: IUpdateService, storageService: IStorageService, notificationService: INotificationService, preferencesService: IPreferencesService, environmentService: IWorkbenchEnvironmentService, accessibilityService: IAccessibilityService, layoutService: IWorkbenchLayoutService, telemetryService: ITelemetryService, hostService: IHostService, commandService: ICommandService);
|
|
88
|
+
protected doUpdateMenubar(firstTime: boolean): void;
|
|
89
|
+
private registerActions;
|
|
90
|
+
private getUpdateAction;
|
|
91
|
+
private get currentMenubarVisibility();
|
|
92
|
+
private get currentDisableMenuBarAltFocus();
|
|
93
|
+
private insertActionsBefore;
|
|
94
|
+
private get currentEnableMenuBarMnemonics();
|
|
95
|
+
private get currentCompactMenuMode();
|
|
96
|
+
private onDidVisibilityChange;
|
|
97
|
+
private toActionsArray;
|
|
98
|
+
private reinstallDisposables;
|
|
99
|
+
private setupCustomMenubar;
|
|
100
|
+
private getWebNavigationActions;
|
|
101
|
+
private getMenuBarOptions;
|
|
102
|
+
protected onDidChangeWindowFocus(hasFocus: boolean): void;
|
|
103
|
+
protected onUpdateStateChange(): void;
|
|
104
|
+
protected onDidChangeRecentlyOpened(): void;
|
|
105
|
+
protected onUpdateKeybindings(): void;
|
|
106
|
+
protected registerListeners(): void;
|
|
107
|
+
get onVisibilityChange(): Event<boolean>;
|
|
108
|
+
get onFocusStateChange(): Event<boolean>;
|
|
109
|
+
getMenubarItemsDimensions(): Dimension;
|
|
110
|
+
create(parent: HTMLElement): HTMLElement;
|
|
111
|
+
layout(dimension: Dimension): void;
|
|
112
|
+
toggleFocus(): void;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export { CustomMenubarControl, type IOpenRecentAction, MenubarControl };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Part } from '../../part.js';
|
|
2
|
+
import { ITitleService, ITitleProperties } from '../../../services/title/common/titleService.js';
|
|
3
|
+
import { MenuBarVisibility } from '../../../../platform/window/common/window.js';
|
|
4
|
+
import { IContextMenuService } from '../../../../platform/contextview/browser/contextView.js';
|
|
5
|
+
import { IConfigurationService, IConfigurationChangeEvent } from '../../../../platform/configuration/common/configuration.js';
|
|
6
|
+
import { IBrowserWorkbenchEnvironmentService } from '../../../services/environment/browser/environmentService.js';
|
|
7
|
+
import { IThemeService } from '../../../../platform/theme/common/themeService.js';
|
|
8
|
+
import { Dimension } from '../../../../base/browser/dom.js';
|
|
9
|
+
import { CustomMenubarControl } from './menubarControl.js';
|
|
10
|
+
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
|
|
11
|
+
import { Event } from '../../../../base/common/event.js';
|
|
12
|
+
import { IStorageService } from '../../../../platform/storage/common/storage.js';
|
|
13
|
+
import { IWorkbenchLayoutService } from '../../../services/layout/browser/layoutService.js';
|
|
14
|
+
import { MenuId } from '../../../../platform/actions/common/actions.js';
|
|
15
|
+
import { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js';
|
|
16
|
+
import { IHostService } from '../../../services/host/browser/host.js';
|
|
17
|
+
import { IHoverService } from '../../../services/hover/browser/hover.js';
|
|
18
|
+
|
|
19
|
+
declare class TitlebarPart extends Part implements ITitleService {
|
|
20
|
+
private readonly contextMenuService;
|
|
21
|
+
protected readonly configurationService: IConfigurationService;
|
|
22
|
+
protected readonly environmentService: IBrowserWorkbenchEnvironmentService;
|
|
23
|
+
protected readonly instantiationService: IInstantiationService;
|
|
24
|
+
private readonly contextKeyService;
|
|
25
|
+
private readonly hostService;
|
|
26
|
+
private static readonly configCommandCenter;
|
|
27
|
+
readonly _serviceBrand: undefined;
|
|
28
|
+
readonly minimumWidth: number;
|
|
29
|
+
readonly maximumWidth: number;
|
|
30
|
+
get minimumHeight(): number;
|
|
31
|
+
get maximumHeight(): number;
|
|
32
|
+
private _onMenubarVisibilityChange;
|
|
33
|
+
readonly onMenubarVisibilityChange: Event<boolean>;
|
|
34
|
+
private readonly _onDidChangeCommandCenterVisibility;
|
|
35
|
+
readonly onDidChangeCommandCenterVisibility: Event<void>;
|
|
36
|
+
protected rootContainer: HTMLElement;
|
|
37
|
+
protected primaryWindowControls: HTMLElement | undefined;
|
|
38
|
+
protected dragRegion: HTMLElement | undefined;
|
|
39
|
+
protected title: HTMLElement;
|
|
40
|
+
private leftContent;
|
|
41
|
+
private centerContent;
|
|
42
|
+
private rightContent;
|
|
43
|
+
protected customMenubar: CustomMenubarControl | undefined;
|
|
44
|
+
protected appIcon: HTMLElement | undefined;
|
|
45
|
+
private appIconBadge;
|
|
46
|
+
protected menubar?: HTMLElement;
|
|
47
|
+
protected layoutControls: HTMLElement | undefined;
|
|
48
|
+
private layoutToolbar;
|
|
49
|
+
protected lastLayoutDimensions: Dimension | undefined;
|
|
50
|
+
private hoverDelegate;
|
|
51
|
+
private readonly titleDisposables;
|
|
52
|
+
private titleBarStyle;
|
|
53
|
+
private isInactive;
|
|
54
|
+
private readonly windowTitle;
|
|
55
|
+
constructor(contextMenuService: IContextMenuService, configurationService: IConfigurationService, environmentService: IBrowserWorkbenchEnvironmentService, instantiationService: IInstantiationService, themeService: IThemeService, storageService: IStorageService, layoutService: IWorkbenchLayoutService, contextKeyService: IContextKeyService, hostService: IHostService, hoverService: IHoverService);
|
|
56
|
+
updateProperties(properties: ITitleProperties): void;
|
|
57
|
+
get isCommandCenterVisible(): boolean;
|
|
58
|
+
private registerListeners;
|
|
59
|
+
private onBlur;
|
|
60
|
+
private onFocus;
|
|
61
|
+
protected onConfigurationChanged(event: IConfigurationChangeEvent): void;
|
|
62
|
+
protected onMenubarVisibilityChanged(visible: boolean): void;
|
|
63
|
+
private uninstallMenubar;
|
|
64
|
+
protected installMenubar(): void;
|
|
65
|
+
private updateTitle;
|
|
66
|
+
protected createContentArea(parent: HTMLElement): HTMLElement;
|
|
67
|
+
updateStyles(): void;
|
|
68
|
+
protected onContextMenu(e: MouseEvent, menuId: MenuId): void;
|
|
69
|
+
protected get currentMenubarVisibility(): MenuBarVisibility;
|
|
70
|
+
private get layoutControlEnabled();
|
|
71
|
+
protected get useCounterZoom(): boolean;
|
|
72
|
+
updateLayout(dimension: Dimension): void;
|
|
73
|
+
layout(width: number, height: number): void;
|
|
74
|
+
toJSON(): object;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export { TitlebarPart };
|