@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
|
@@ -1,8 +1,50 @@
|
|
|
1
|
+
import { ServiceIdentifier } from '../../instantiation/common/instantiation.js';
|
|
2
|
+
import { Event } from '../../../base/common/event.js';
|
|
1
3
|
import { URI } from '../../../base/common/uri.js';
|
|
4
|
+
import { IWorkspaceBackupInfo, IFolderBackupInfo } from '../../backup/common/backup.js';
|
|
5
|
+
import { IWorkspaceIdentifier } from '../../workspace/common/workspace.js';
|
|
2
6
|
|
|
7
|
+
declare const IWorkspacesService: ServiceIdentifier<IWorkspacesService>;
|
|
8
|
+
interface IWorkspacesService {
|
|
9
|
+
readonly _serviceBrand: undefined;
|
|
10
|
+
enterWorkspace(workspaceUri: URI): Promise<IEnterWorkspaceResult | undefined>;
|
|
11
|
+
createUntitledWorkspace(folders?: IWorkspaceFolderCreationData[], remoteAuthority?: string): Promise<IWorkspaceIdentifier>;
|
|
12
|
+
deleteUntitledWorkspace(workspace: IWorkspaceIdentifier): Promise<void>;
|
|
13
|
+
getWorkspaceIdentifier(workspaceUri: URI): Promise<IWorkspaceIdentifier>;
|
|
14
|
+
readonly onDidChangeRecentlyOpened: Event<void>;
|
|
15
|
+
addRecentlyOpened(recents: IRecent[]): Promise<void>;
|
|
16
|
+
removeRecentlyOpened(workspaces: URI[]): Promise<void>;
|
|
17
|
+
clearRecentlyOpened(): Promise<void>;
|
|
18
|
+
getRecentlyOpened(): Promise<IRecentlyOpened>;
|
|
19
|
+
getDirtyWorkspaces(): Promise<Array<IWorkspaceBackupInfo | IFolderBackupInfo>>;
|
|
20
|
+
}
|
|
21
|
+
interface IRecentlyOpened {
|
|
22
|
+
workspaces: Array<IRecentWorkspace | IRecentFolder>;
|
|
23
|
+
files: IRecentFile[];
|
|
24
|
+
}
|
|
25
|
+
type IRecent = IRecentWorkspace | IRecentFolder | IRecentFile;
|
|
26
|
+
interface IRecentWorkspace {
|
|
27
|
+
readonly workspace: IWorkspaceIdentifier;
|
|
28
|
+
label?: string;
|
|
29
|
+
readonly remoteAuthority?: string;
|
|
30
|
+
}
|
|
31
|
+
interface IRecentFolder {
|
|
32
|
+
readonly folderUri: URI;
|
|
33
|
+
label?: string;
|
|
34
|
+
readonly remoteAuthority?: string;
|
|
35
|
+
}
|
|
36
|
+
interface IRecentFile {
|
|
37
|
+
readonly fileUri: URI;
|
|
38
|
+
label?: string;
|
|
39
|
+
readonly remoteAuthority?: string;
|
|
40
|
+
}
|
|
3
41
|
interface IWorkspaceFolderCreationData {
|
|
4
42
|
readonly uri: URI;
|
|
5
43
|
readonly name?: string;
|
|
6
44
|
}
|
|
45
|
+
interface IEnterWorkspaceResult {
|
|
46
|
+
readonly workspace: IWorkspaceIdentifier;
|
|
47
|
+
readonly backupPath?: string;
|
|
48
|
+
}
|
|
7
49
|
|
|
8
|
-
export type
|
|
50
|
+
export { type IEnterWorkspaceResult, type IRecent, type IRecentFile, type IRecentFolder, type IRecentWorkspace, type IRecentlyOpened, type IWorkspaceFolderCreationData, IWorkspacesService };
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { Event } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
3
|
+
import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
4
|
+
import { setConstant, IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
|
|
5
|
+
import { IsMacContext, IsLinuxContext, IsWindowsContext, IsWebContext, IsMacNativeContext, IsIOSContext, IsMobileContext, IsDevelopmentContext, ProductQualityContext, InputFocusedContext } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkeys.js';
|
|
6
|
+
import { RemoteNameContext, VirtualWorkspaceContext, TemporaryWorkspaceContext, HasWebFileSystemAccess, EmbedderIdentifierContext, ActiveEditorContext, ActiveEditorReadonlyContext, ActiveEditorCanToggleReadonlyContext, ActiveEditorCanRevertContext, ActiveEditorCanSplitInGroupContext, ActiveEditorAvailableEditorIdsContext, EditorsVisibleContext, TextCompareEditorVisibleContext, TextCompareEditorActiveContext, SideBySideEditorActiveContext, ActiveEditorGroupEmptyContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorGroupLockedContext, MultipleEditorGroupsContext, DirtyWorkingCopiesContext, WorkbenchStateContext, WorkspaceFolderCountContext, OpenFolderWorkspaceSupportContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, SplitEditorsVertically, IsFullscreenContext, InEditorZenModeContext, IsCenteredLayoutContext, EditorAreaVisibleContext, EditorTabsVisibleContext, SideBarVisibleContext, PanelPositionContext, PanelVisibleContext, PanelMaximizedContext, PanelAlignmentContext, AuxiliaryBarVisibleContext, applyAvailableEditorIds } from '../common/contextkeys.js';
|
|
7
|
+
import { TEXT_DIFF_EDITOR_ID, SIDE_BY_SIDE_EDITOR_ID, EditorResourceAccessor, SideBySideEditor } from '../common/editor.js';
|
|
8
|
+
import { addDisposableListener, EventType, trackFocus } from 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
9
|
+
import { preferredSideBySideGroupDirection, IEditorGroupsService } from '../services/editor/common/editorGroupsService.js';
|
|
10
|
+
import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
|
|
11
|
+
import { IWorkbenchEnvironmentService } from '../services/environment/common/environmentService.js';
|
|
12
|
+
import { IEditorService } from '../services/editor/common/editorService.js';
|
|
13
|
+
import { isTemporaryWorkspace, IWorkspaceContextService } from 'monaco-editor/esm/vs/platform/workspace/common/workspace.js';
|
|
14
|
+
import { positionToString, IWorkbenchLayoutService } from '../services/layout/browser/layoutService.js';
|
|
15
|
+
import { getRemoteName } from 'monaco-editor/esm/vs/platform/remote/common/remoteHosts.js';
|
|
16
|
+
import { getVirtualWorkspaceScheme } from '../../platform/workspace/common/virtualWorkspace.js';
|
|
17
|
+
import { IWorkingCopyService } from '../services/workingCopy/common/workingCopyService.js';
|
|
18
|
+
import { isNative } from 'monaco-editor/esm/vs/base/common/platform.js';
|
|
19
|
+
import { IEditorResolverService } from '../services/editor/common/editorResolverService.js';
|
|
20
|
+
import { IPaneCompositePartService } from '../services/panecomposite/browser/panecomposite.js';
|
|
21
|
+
import { WebFileSystemAccess } from 'monaco-editor/esm/vs/platform/files/browser/webFileSystemAccess.js';
|
|
22
|
+
import { IProductService } from 'monaco-editor/esm/vs/platform/product/common/productService.js';
|
|
23
|
+
import { IFileService } from 'monaco-editor/esm/vs/platform/files/common/files.js';
|
|
24
|
+
let WorkbenchContextKeysHandler = class WorkbenchContextKeysHandler extends Disposable {
|
|
25
|
+
constructor(contextKeyService, contextService, configurationService, environmentService, productService, editorService, editorResolverService, editorGroupService, layoutService, paneCompositeService, workingCopyService, fileService) {
|
|
26
|
+
super();
|
|
27
|
+
this.contextKeyService = contextKeyService;
|
|
28
|
+
this.contextService = contextService;
|
|
29
|
+
this.configurationService = configurationService;
|
|
30
|
+
this.environmentService = environmentService;
|
|
31
|
+
this.productService = productService;
|
|
32
|
+
this.editorService = editorService;
|
|
33
|
+
this.editorResolverService = editorResolverService;
|
|
34
|
+
this.editorGroupService = editorGroupService;
|
|
35
|
+
this.layoutService = layoutService;
|
|
36
|
+
this.paneCompositeService = paneCompositeService;
|
|
37
|
+
this.workingCopyService = workingCopyService;
|
|
38
|
+
this.fileService = fileService;
|
|
39
|
+
IsMacContext.bindTo(this.contextKeyService);
|
|
40
|
+
IsLinuxContext.bindTo(this.contextKeyService);
|
|
41
|
+
IsWindowsContext.bindTo(this.contextKeyService);
|
|
42
|
+
IsWebContext.bindTo(this.contextKeyService);
|
|
43
|
+
IsMacNativeContext.bindTo(this.contextKeyService);
|
|
44
|
+
IsIOSContext.bindTo(this.contextKeyService);
|
|
45
|
+
IsMobileContext.bindTo(this.contextKeyService);
|
|
46
|
+
RemoteNameContext.bindTo(this.contextKeyService).set(getRemoteName(this.environmentService.remoteAuthority) || '');
|
|
47
|
+
this.virtualWorkspaceContext = VirtualWorkspaceContext.bindTo(this.contextKeyService);
|
|
48
|
+
this.temporaryWorkspaceContext = TemporaryWorkspaceContext.bindTo(this.contextKeyService);
|
|
49
|
+
this.updateWorkspaceContextKeys();
|
|
50
|
+
HasWebFileSystemAccess.bindTo(this.contextKeyService).set(WebFileSystemAccess.supported(window));
|
|
51
|
+
const isDevelopment = !this.environmentService.isBuilt || this.environmentService.isExtensionDevelopment;
|
|
52
|
+
IsDevelopmentContext.bindTo(this.contextKeyService).set(isDevelopment);
|
|
53
|
+
setConstant(IsDevelopmentContext.key, isDevelopment);
|
|
54
|
+
ProductQualityContext.bindTo(this.contextKeyService).set(this.productService.quality || '');
|
|
55
|
+
EmbedderIdentifierContext.bindTo(this.contextKeyService).set(productService.embedderIdentifier);
|
|
56
|
+
this.activeEditorContext = ActiveEditorContext.bindTo(this.contextKeyService);
|
|
57
|
+
this.activeEditorIsReadonly = ActiveEditorReadonlyContext.bindTo(this.contextKeyService);
|
|
58
|
+
this.activeEditorCanToggleReadonly = ActiveEditorCanToggleReadonlyContext.bindTo(this.contextKeyService);
|
|
59
|
+
this.activeEditorCanRevert = ActiveEditorCanRevertContext.bindTo(this.contextKeyService);
|
|
60
|
+
this.activeEditorCanSplitInGroup = ActiveEditorCanSplitInGroupContext.bindTo(this.contextKeyService);
|
|
61
|
+
this.activeEditorAvailableEditorIds = ActiveEditorAvailableEditorIdsContext.bindTo(this.contextKeyService);
|
|
62
|
+
this.editorsVisibleContext = EditorsVisibleContext.bindTo(this.contextKeyService);
|
|
63
|
+
this.textCompareEditorVisibleContext = TextCompareEditorVisibleContext.bindTo(this.contextKeyService);
|
|
64
|
+
this.textCompareEditorActiveContext = TextCompareEditorActiveContext.bindTo(this.contextKeyService);
|
|
65
|
+
this.sideBySideEditorActiveContext = SideBySideEditorActiveContext.bindTo(this.contextKeyService);
|
|
66
|
+
this.activeEditorGroupEmpty = ActiveEditorGroupEmptyContext.bindTo(this.contextKeyService);
|
|
67
|
+
this.activeEditorGroupIndex = ActiveEditorGroupIndexContext.bindTo(this.contextKeyService);
|
|
68
|
+
this.activeEditorGroupLast = ActiveEditorGroupLastContext.bindTo(this.contextKeyService);
|
|
69
|
+
this.activeEditorGroupLocked = ActiveEditorGroupLockedContext.bindTo(this.contextKeyService);
|
|
70
|
+
this.multipleEditorGroupsContext = MultipleEditorGroupsContext.bindTo(this.contextKeyService);
|
|
71
|
+
this.dirtyWorkingCopiesContext = DirtyWorkingCopiesContext.bindTo(this.contextKeyService);
|
|
72
|
+
this.dirtyWorkingCopiesContext.set(this.workingCopyService.hasDirty);
|
|
73
|
+
this.inputFocusedContext = InputFocusedContext.bindTo(this.contextKeyService);
|
|
74
|
+
this.workbenchStateContext = WorkbenchStateContext.bindTo(this.contextKeyService);
|
|
75
|
+
this.updateWorkbenchStateContextKey();
|
|
76
|
+
this.workspaceFolderCountContext = WorkspaceFolderCountContext.bindTo(this.contextKeyService);
|
|
77
|
+
this.updateWorkspaceFolderCountContextKey();
|
|
78
|
+
this.openFolderWorkspaceSupportContext = OpenFolderWorkspaceSupportContext.bindTo(this.contextKeyService);
|
|
79
|
+
this.openFolderWorkspaceSupportContext.set(isNative || typeof this.environmentService.remoteAuthority === 'string');
|
|
80
|
+
this.emptyWorkspaceSupportContext = EmptyWorkspaceSupportContext.bindTo(this.contextKeyService);
|
|
81
|
+
this.emptyWorkspaceSupportContext.set(isNative || typeof this.environmentService.remoteAuthority === 'string');
|
|
82
|
+
this.enterMultiRootWorkspaceSupportContext = EnterMultiRootWorkspaceSupportContext.bindTo(this.contextKeyService);
|
|
83
|
+
this.enterMultiRootWorkspaceSupportContext.set(isNative || typeof this.environmentService.remoteAuthority === 'string');
|
|
84
|
+
this.splitEditorsVerticallyContext = SplitEditorsVertically.bindTo(this.contextKeyService);
|
|
85
|
+
this.updateSplitEditorsVerticallyContext();
|
|
86
|
+
this.isFullscreenContext = IsFullscreenContext.bindTo(this.contextKeyService);
|
|
87
|
+
this.inZenModeContext = InEditorZenModeContext.bindTo(this.contextKeyService);
|
|
88
|
+
this.isCenteredLayoutContext = IsCenteredLayoutContext.bindTo(this.contextKeyService);
|
|
89
|
+
this.editorAreaVisibleContext = EditorAreaVisibleContext.bindTo(this.contextKeyService);
|
|
90
|
+
this.editorTabsVisibleContext = EditorTabsVisibleContext.bindTo(this.contextKeyService);
|
|
91
|
+
this.sideBarVisibleContext = SideBarVisibleContext.bindTo(this.contextKeyService);
|
|
92
|
+
this.panelPositionContext = PanelPositionContext.bindTo(this.contextKeyService);
|
|
93
|
+
this.panelPositionContext.set(positionToString(this.layoutService.getPanelPosition()));
|
|
94
|
+
this.panelVisibleContext = PanelVisibleContext.bindTo(this.contextKeyService);
|
|
95
|
+
this.panelVisibleContext.set(this.layoutService.isVisible("workbench.parts.panel" ));
|
|
96
|
+
this.panelMaximizedContext = PanelMaximizedContext.bindTo(this.contextKeyService);
|
|
97
|
+
this.panelMaximizedContext.set(this.layoutService.isPanelMaximized());
|
|
98
|
+
this.panelAlignmentContext = PanelAlignmentContext.bindTo(this.contextKeyService);
|
|
99
|
+
this.panelAlignmentContext.set(this.layoutService.getPanelAlignment());
|
|
100
|
+
this.auxiliaryBarVisibleContext = AuxiliaryBarVisibleContext.bindTo(this.contextKeyService);
|
|
101
|
+
this.auxiliaryBarVisibleContext.set(this.layoutService.isVisible("workbench.parts.auxiliarybar" ));
|
|
102
|
+
this.registerListeners();
|
|
103
|
+
}
|
|
104
|
+
registerListeners() {
|
|
105
|
+
this.editorGroupService.whenReady.then(() => {
|
|
106
|
+
this.updateEditorAreaContextKeys();
|
|
107
|
+
this.updateEditorContextKeys();
|
|
108
|
+
});
|
|
109
|
+
this._register(this.editorService.onDidActiveEditorChange(() => this.updateEditorContextKeys()));
|
|
110
|
+
this._register(this.editorService.onDidVisibleEditorsChange(() => this.updateEditorContextKeys()));
|
|
111
|
+
this._register(this.editorGroupService.onDidAddGroup(() => this.updateEditorContextKeys()));
|
|
112
|
+
this._register(this.editorGroupService.onDidRemoveGroup(() => this.updateEditorContextKeys()));
|
|
113
|
+
this._register(this.editorGroupService.onDidChangeGroupIndex(() => this.updateEditorContextKeys()));
|
|
114
|
+
this._register(this.editorGroupService.onDidChangeActiveGroup(() => this.updateEditorGroupContextKeys()));
|
|
115
|
+
this._register(this.editorGroupService.onDidChangeGroupLocked(() => this.updateEditorGroupContextKeys()));
|
|
116
|
+
this._register(this.editorGroupService.onDidChangeEditorPartOptions(() => this.updateEditorAreaContextKeys()));
|
|
117
|
+
this._register(addDisposableListener(window, EventType.FOCUS_IN, () => this.updateInputContextKeys(), true));
|
|
118
|
+
this._register(this.contextService.onDidChangeWorkbenchState(() => this.updateWorkbenchStateContextKey()));
|
|
119
|
+
this._register(this.contextService.onDidChangeWorkspaceFolders(() => {
|
|
120
|
+
this.updateWorkspaceFolderCountContextKey();
|
|
121
|
+
this.updateWorkspaceContextKeys();
|
|
122
|
+
}));
|
|
123
|
+
this._register(this.configurationService.onDidChangeConfiguration(e => {
|
|
124
|
+
if (e.affectsConfiguration('workbench.editor.openSideBySideDirection')) {
|
|
125
|
+
this.updateSplitEditorsVerticallyContext();
|
|
126
|
+
}
|
|
127
|
+
}));
|
|
128
|
+
this._register(this.layoutService.onDidChangeZenMode(enabled => this.inZenModeContext.set(enabled)));
|
|
129
|
+
this._register(this.layoutService.onDidChangeFullscreen(fullscreen => this.isFullscreenContext.set(fullscreen)));
|
|
130
|
+
this._register(this.layoutService.onDidChangeCenteredLayout(centered => this.isCenteredLayoutContext.set(centered)));
|
|
131
|
+
this._register(this.layoutService.onDidChangePanelPosition(position => this.panelPositionContext.set(position)));
|
|
132
|
+
this._register(this.layoutService.onDidChangePanelAlignment(alignment => this.panelAlignmentContext.set(alignment)));
|
|
133
|
+
this._register(this.paneCompositeService.onDidPaneCompositeClose(() => this.updateSideBarContextKeys()));
|
|
134
|
+
this._register(this.paneCompositeService.onDidPaneCompositeOpen(() => this.updateSideBarContextKeys()));
|
|
135
|
+
this._register(this.layoutService.onDidChangePartVisibility(() => {
|
|
136
|
+
this.editorAreaVisibleContext.set(this.layoutService.isVisible("workbench.parts.editor" ));
|
|
137
|
+
this.panelVisibleContext.set(this.layoutService.isVisible("workbench.parts.panel" ));
|
|
138
|
+
this.panelMaximizedContext.set(this.layoutService.isPanelMaximized());
|
|
139
|
+
this.auxiliaryBarVisibleContext.set(this.layoutService.isVisible("workbench.parts.auxiliarybar" ));
|
|
140
|
+
}));
|
|
141
|
+
this._register(this.workingCopyService.onDidChangeDirty(workingCopy => this.dirtyWorkingCopiesContext.set(workingCopy.isDirty() || this.workingCopyService.hasDirty)));
|
|
142
|
+
}
|
|
143
|
+
updateEditorAreaContextKeys() {
|
|
144
|
+
this.editorTabsVisibleContext.set(!!this.editorGroupService.partOptions.showTabs);
|
|
145
|
+
}
|
|
146
|
+
updateEditorContextKeys() {
|
|
147
|
+
const activeEditorPane = this.editorService.activeEditorPane;
|
|
148
|
+
const visibleEditorPanes = this.editorService.visibleEditorPanes;
|
|
149
|
+
this.textCompareEditorActiveContext.set(activeEditorPane?.getId() === TEXT_DIFF_EDITOR_ID);
|
|
150
|
+
this.textCompareEditorVisibleContext.set(( visibleEditorPanes.some(editorPane => editorPane.getId() === TEXT_DIFF_EDITOR_ID)));
|
|
151
|
+
this.sideBySideEditorActiveContext.set(activeEditorPane?.getId() === SIDE_BY_SIDE_EDITOR_ID);
|
|
152
|
+
if (visibleEditorPanes.length > 0) {
|
|
153
|
+
this.editorsVisibleContext.set(true);
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
this.editorsVisibleContext.reset();
|
|
157
|
+
}
|
|
158
|
+
if (!this.editorService.activeEditor) {
|
|
159
|
+
this.activeEditorGroupEmpty.set(true);
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
this.activeEditorGroupEmpty.reset();
|
|
163
|
+
}
|
|
164
|
+
this.updateEditorGroupContextKeys();
|
|
165
|
+
if (activeEditorPane) {
|
|
166
|
+
this.activeEditorContext.set(activeEditorPane.getId());
|
|
167
|
+
this.activeEditorCanRevert.set(!activeEditorPane.input.hasCapability(4 ));
|
|
168
|
+
this.activeEditorCanSplitInGroup.set(activeEditorPane.input.hasCapability(32 ));
|
|
169
|
+
applyAvailableEditorIds(this.activeEditorAvailableEditorIds, activeEditorPane.input, this.editorResolverService);
|
|
170
|
+
this.activeEditorIsReadonly.set(!!activeEditorPane.input.isReadonly());
|
|
171
|
+
const primaryEditorResource = EditorResourceAccessor.getOriginalUri(activeEditorPane.input, { supportSideBySide: SideBySideEditor.PRIMARY });
|
|
172
|
+
this.activeEditorCanToggleReadonly.set(!!primaryEditorResource && this.fileService.hasProvider(primaryEditorResource) && !this.fileService.hasCapability(primaryEditorResource, 2048 ));
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
this.activeEditorContext.reset();
|
|
176
|
+
this.activeEditorIsReadonly.reset();
|
|
177
|
+
this.activeEditorCanToggleReadonly.reset();
|
|
178
|
+
this.activeEditorCanRevert.reset();
|
|
179
|
+
this.activeEditorCanSplitInGroup.reset();
|
|
180
|
+
this.activeEditorAvailableEditorIds.reset();
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
updateEditorGroupContextKeys() {
|
|
184
|
+
const groupCount = this.editorGroupService.count;
|
|
185
|
+
if (groupCount > 1) {
|
|
186
|
+
this.multipleEditorGroupsContext.set(true);
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
this.multipleEditorGroupsContext.reset();
|
|
190
|
+
}
|
|
191
|
+
const activeGroup = this.editorGroupService.activeGroup;
|
|
192
|
+
this.activeEditorGroupIndex.set(activeGroup.index + 1);
|
|
193
|
+
this.activeEditorGroupLast.set(activeGroup.index === groupCount - 1);
|
|
194
|
+
this.activeEditorGroupLocked.set(activeGroup.isLocked);
|
|
195
|
+
}
|
|
196
|
+
updateInputContextKeys() {
|
|
197
|
+
function activeElementIsInput() {
|
|
198
|
+
return !!document.activeElement && (document.activeElement.tagName === 'INPUT' || document.activeElement.tagName === 'TEXTAREA');
|
|
199
|
+
}
|
|
200
|
+
const isInputFocused = activeElementIsInput();
|
|
201
|
+
this.inputFocusedContext.set(isInputFocused);
|
|
202
|
+
if (isInputFocused) {
|
|
203
|
+
const tracker = trackFocus(document.activeElement);
|
|
204
|
+
Event.once(tracker.onDidBlur)(() => {
|
|
205
|
+
this.inputFocusedContext.set(activeElementIsInput());
|
|
206
|
+
tracker.dispose();
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
updateWorkbenchStateContextKey() {
|
|
211
|
+
this.workbenchStateContext.set(this.getWorkbenchStateString());
|
|
212
|
+
}
|
|
213
|
+
updateWorkspaceFolderCountContextKey() {
|
|
214
|
+
this.workspaceFolderCountContext.set(this.contextService.getWorkspace().folders.length);
|
|
215
|
+
}
|
|
216
|
+
updateSplitEditorsVerticallyContext() {
|
|
217
|
+
const direction = preferredSideBySideGroupDirection(this.configurationService);
|
|
218
|
+
this.splitEditorsVerticallyContext.set(direction === 1 );
|
|
219
|
+
}
|
|
220
|
+
getWorkbenchStateString() {
|
|
221
|
+
switch (this.contextService.getWorkbenchState()) {
|
|
222
|
+
case 1 : return 'empty';
|
|
223
|
+
case 2 : return 'folder';
|
|
224
|
+
case 3 : return 'workspace';
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
updateSideBarContextKeys() {
|
|
228
|
+
this.sideBarVisibleContext.set(this.layoutService.isVisible("workbench.parts.sidebar" ));
|
|
229
|
+
}
|
|
230
|
+
updateWorkspaceContextKeys() {
|
|
231
|
+
this.virtualWorkspaceContext.set(getVirtualWorkspaceScheme(this.contextService.getWorkspace()) || '');
|
|
232
|
+
this.temporaryWorkspaceContext.set(isTemporaryWorkspace(this.contextService.getWorkspace()));
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
WorkbenchContextKeysHandler = ( __decorate([
|
|
236
|
+
( __param(0, IContextKeyService)),
|
|
237
|
+
( __param(1, IWorkspaceContextService)),
|
|
238
|
+
( __param(2, IConfigurationService)),
|
|
239
|
+
( __param(3, IWorkbenchEnvironmentService)),
|
|
240
|
+
( __param(4, IProductService)),
|
|
241
|
+
( __param(5, IEditorService)),
|
|
242
|
+
( __param(6, IEditorResolverService)),
|
|
243
|
+
( __param(7, IEditorGroupsService)),
|
|
244
|
+
( __param(8, IWorkbenchLayoutService)),
|
|
245
|
+
( __param(9, IPaneCompositePartService)),
|
|
246
|
+
( __param(10, IWorkingCopyService)),
|
|
247
|
+
( __param(11, IFileService))
|
|
248
|
+
], WorkbenchContextKeysHandler));
|
|
249
|
+
export { WorkbenchContextKeysHandler };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Event } from '../../../../base/common/event.js';
|
|
2
|
+
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
|
|
3
|
+
import { IStorageService } from '../../../../platform/storage/common/storage.js';
|
|
4
|
+
import { IThemeService } from '../../../../platform/theme/common/themeService.js';
|
|
5
|
+
import { Part } from '../../part.js';
|
|
6
|
+
import { IWorkbenchLayoutService } from '../../../services/layout/browser/layoutService.js';
|
|
7
|
+
import { IBannerService, IBannerItem } from '../../../services/banner/browser/bannerService.js';
|
|
8
|
+
import { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js';
|
|
9
|
+
|
|
10
|
+
declare class BannerPart extends Part implements IBannerService {
|
|
11
|
+
private readonly contextKeyService;
|
|
12
|
+
private readonly instantiationService;
|
|
13
|
+
readonly _serviceBrand: undefined;
|
|
14
|
+
readonly height: number;
|
|
15
|
+
readonly minimumWidth: number;
|
|
16
|
+
readonly maximumWidth: number;
|
|
17
|
+
get minimumHeight(): number;
|
|
18
|
+
get maximumHeight(): number;
|
|
19
|
+
private _onDidChangeSize;
|
|
20
|
+
get onDidChange(): Event<{
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
} | undefined>;
|
|
24
|
+
private item;
|
|
25
|
+
private readonly markdownRenderer;
|
|
26
|
+
private visible;
|
|
27
|
+
private actionBar;
|
|
28
|
+
private messageActionsContainer;
|
|
29
|
+
private focusedActionIndex;
|
|
30
|
+
constructor(themeService: IThemeService, layoutService: IWorkbenchLayoutService, storageService: IStorageService, contextKeyService: IContextKeyService, instantiationService: IInstantiationService);
|
|
31
|
+
protected createContentArea(parent: HTMLElement): HTMLElement;
|
|
32
|
+
private close;
|
|
33
|
+
private focusActionLink;
|
|
34
|
+
private getAriaLabel;
|
|
35
|
+
private getBannerMessage;
|
|
36
|
+
private setVisibility;
|
|
37
|
+
focus(): void;
|
|
38
|
+
focusNextAction(): void;
|
|
39
|
+
focusPreviousAction(): void;
|
|
40
|
+
hide(id: string): void;
|
|
41
|
+
show(item: IBannerItem): void;
|
|
42
|
+
toJSON(): object;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { BannerPart };
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import './media/bannerpart.css.js';
|
|
3
|
+
import { localize } from 'monaco-editor/esm/vs/nls.js';
|
|
4
|
+
import { addDisposableListener, EventType, clearNode, $, append, asCSSUrl } from 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
5
|
+
import { ActionBar } from 'monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js';
|
|
6
|
+
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
7
|
+
import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js';
|
|
8
|
+
import { IThemeService } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
|
|
9
|
+
import { ThemeIcon } from 'monaco-editor/esm/vs/base/common/themables.js';
|
|
10
|
+
import { Part } from '../../part.js';
|
|
11
|
+
import { IWorkbenchLayoutService } from '../../../services/layout/browser/layoutService.js';
|
|
12
|
+
import { Action } from 'monaco-editor/esm/vs/base/common/actions.js';
|
|
13
|
+
import { Link } from 'monaco-editor/esm/vs/platform/opener/browser/link.js';
|
|
14
|
+
import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
15
|
+
import { IBannerService } from '../../../services/banner/browser/bannerService.js';
|
|
16
|
+
import { MarkdownRenderer } from 'monaco-editor/esm/vs/editor/contrib/markdownRenderer/browser/markdownRenderer.js';
|
|
17
|
+
import { Action2, registerAction2 } from 'monaco-editor/esm/vs/platform/actions/common/actions.js';
|
|
18
|
+
import { Categories } from 'monaco-editor/esm/vs/platform/action/common/actionCommonCategories.js';
|
|
19
|
+
import { KeybindingsRegistry } from 'monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js';
|
|
20
|
+
import { IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
|
|
21
|
+
import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
22
|
+
import { widgetClose } from 'monaco-editor/esm/vs/platform/theme/common/iconRegistry.js';
|
|
23
|
+
import { BannerFocused } from '../../../common/contextkeys.js';
|
|
24
|
+
let BannerPart = class BannerPart extends Part {
|
|
25
|
+
get minimumHeight() {
|
|
26
|
+
return this.visible ? this.height : 0;
|
|
27
|
+
}
|
|
28
|
+
get maximumHeight() {
|
|
29
|
+
return this.visible ? this.height : 0;
|
|
30
|
+
}
|
|
31
|
+
get onDidChange() { return this._onDidChangeSize.event; }
|
|
32
|
+
constructor(themeService, layoutService, storageService, contextKeyService, instantiationService) {
|
|
33
|
+
super("workbench.parts.banner" , { hasTitle: false }, themeService, storageService, layoutService);
|
|
34
|
+
this.contextKeyService = contextKeyService;
|
|
35
|
+
this.instantiationService = instantiationService;
|
|
36
|
+
this.height = 26;
|
|
37
|
+
this.minimumWidth = 0;
|
|
38
|
+
this.maximumWidth = Number.POSITIVE_INFINITY;
|
|
39
|
+
this._onDidChangeSize = this._register(( new Emitter()));
|
|
40
|
+
this.visible = false;
|
|
41
|
+
this.focusedActionIndex = -1;
|
|
42
|
+
this.markdownRenderer = this.instantiationService.createInstance(MarkdownRenderer, {});
|
|
43
|
+
}
|
|
44
|
+
createContentArea(parent) {
|
|
45
|
+
this.element = parent;
|
|
46
|
+
this.element.tabIndex = 0;
|
|
47
|
+
this._register(addDisposableListener(this.element, EventType.FOCUS, () => {
|
|
48
|
+
if (this.focusedActionIndex !== -1) {
|
|
49
|
+
this.focusActionLink();
|
|
50
|
+
}
|
|
51
|
+
}));
|
|
52
|
+
const scopedContextKeyService = this.contextKeyService.createScoped(this.element);
|
|
53
|
+
BannerFocused.bindTo(scopedContextKeyService).set(true);
|
|
54
|
+
return this.element;
|
|
55
|
+
}
|
|
56
|
+
close(item) {
|
|
57
|
+
this.setVisibility(false);
|
|
58
|
+
clearNode(this.element);
|
|
59
|
+
if (typeof item.onClose === 'function') {
|
|
60
|
+
item.onClose();
|
|
61
|
+
}
|
|
62
|
+
this.item = undefined;
|
|
63
|
+
}
|
|
64
|
+
focusActionLink() {
|
|
65
|
+
const length = this.item?.actions?.length ?? 0;
|
|
66
|
+
if (this.focusedActionIndex < length) {
|
|
67
|
+
const actionLink = this.messageActionsContainer?.children[this.focusedActionIndex];
|
|
68
|
+
if (actionLink instanceof HTMLElement) {
|
|
69
|
+
this.actionBar?.setFocusable(false);
|
|
70
|
+
actionLink.focus();
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
this.actionBar?.focus(0);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
getAriaLabel(item) {
|
|
78
|
+
if (item.ariaLabel) {
|
|
79
|
+
return item.ariaLabel;
|
|
80
|
+
}
|
|
81
|
+
if (typeof item.message === 'string') {
|
|
82
|
+
return item.message;
|
|
83
|
+
}
|
|
84
|
+
return undefined;
|
|
85
|
+
}
|
|
86
|
+
getBannerMessage(message) {
|
|
87
|
+
if (typeof message === 'string') {
|
|
88
|
+
const element = $('span');
|
|
89
|
+
element.innerText = message;
|
|
90
|
+
return element;
|
|
91
|
+
}
|
|
92
|
+
return this.markdownRenderer.render(message).element;
|
|
93
|
+
}
|
|
94
|
+
setVisibility(visible) {
|
|
95
|
+
if (visible !== this.visible) {
|
|
96
|
+
this.visible = visible;
|
|
97
|
+
this.focusedActionIndex = -1;
|
|
98
|
+
this.layoutService.setPartHidden(!visible, "workbench.parts.banner" );
|
|
99
|
+
this._onDidChangeSize.fire(undefined);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
focus() {
|
|
103
|
+
this.focusedActionIndex = -1;
|
|
104
|
+
this.element.focus();
|
|
105
|
+
}
|
|
106
|
+
focusNextAction() {
|
|
107
|
+
const length = this.item?.actions?.length ?? 0;
|
|
108
|
+
this.focusedActionIndex = this.focusedActionIndex < length ? this.focusedActionIndex + 1 : 0;
|
|
109
|
+
this.focusActionLink();
|
|
110
|
+
}
|
|
111
|
+
focusPreviousAction() {
|
|
112
|
+
const length = this.item?.actions?.length ?? 0;
|
|
113
|
+
this.focusedActionIndex = this.focusedActionIndex > 0 ? this.focusedActionIndex - 1 : length;
|
|
114
|
+
this.focusActionLink();
|
|
115
|
+
}
|
|
116
|
+
hide(id) {
|
|
117
|
+
if (this.item?.id !== id) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
this.setVisibility(false);
|
|
121
|
+
}
|
|
122
|
+
show(item) {
|
|
123
|
+
if (item.id === this.item?.id) {
|
|
124
|
+
this.setVisibility(true);
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
clearNode(this.element);
|
|
128
|
+
const ariaLabel = this.getAriaLabel(item);
|
|
129
|
+
if (ariaLabel) {
|
|
130
|
+
this.element.setAttribute('aria-label', ariaLabel);
|
|
131
|
+
}
|
|
132
|
+
const iconContainer = append(this.element, $('div.icon-container'));
|
|
133
|
+
iconContainer.setAttribute('aria-hidden', 'true');
|
|
134
|
+
if (ThemeIcon.isThemeIcon(item.icon)) {
|
|
135
|
+
iconContainer.appendChild($(`div${ThemeIcon.asCSSSelector(item.icon)}`));
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
iconContainer.classList.add('custom-icon');
|
|
139
|
+
if (URI.isUri(item.icon)) {
|
|
140
|
+
iconContainer.style.backgroundImage = asCSSUrl(item.icon);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
const messageContainer = append(this.element, $('div.message-container'));
|
|
144
|
+
messageContainer.setAttribute('aria-hidden', 'true');
|
|
145
|
+
messageContainer.appendChild(this.getBannerMessage(item.message));
|
|
146
|
+
this.messageActionsContainer = append(this.element, $('div.message-actions-container'));
|
|
147
|
+
if (item.actions) {
|
|
148
|
+
for (const action of item.actions) {
|
|
149
|
+
this._register(this.instantiationService.createInstance(Link, this.messageActionsContainer, { ...action, tabIndex: -1 }, {}));
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
const actionBarContainer = append(this.element, $('div.action-container'));
|
|
153
|
+
this.actionBar = this._register(( new ActionBar(actionBarContainer)));
|
|
154
|
+
const closeAction = this._register(( new Action(
|
|
155
|
+
'banner.close',
|
|
156
|
+
'Close Banner',
|
|
157
|
+
ThemeIcon.asClassName(widgetClose),
|
|
158
|
+
true,
|
|
159
|
+
() => this.close(item)
|
|
160
|
+
)));
|
|
161
|
+
this.actionBar.push(closeAction, { icon: true, label: false });
|
|
162
|
+
this.actionBar.setFocusable(false);
|
|
163
|
+
this.setVisibility(true);
|
|
164
|
+
this.item = item;
|
|
165
|
+
}
|
|
166
|
+
toJSON() {
|
|
167
|
+
return {
|
|
168
|
+
type: "workbench.parts.banner"
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
BannerPart = ( __decorate([
|
|
173
|
+
( __param(0, IThemeService)),
|
|
174
|
+
( __param(1, IWorkbenchLayoutService)),
|
|
175
|
+
( __param(2, IStorageService)),
|
|
176
|
+
( __param(3, IContextKeyService)),
|
|
177
|
+
( __param(4, IInstantiationService))
|
|
178
|
+
], BannerPart));
|
|
179
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
180
|
+
id: 'workbench.banner.focusBanner',
|
|
181
|
+
weight: 200 ,
|
|
182
|
+
primary: 9 ,
|
|
183
|
+
when: BannerFocused,
|
|
184
|
+
handler: (accessor) => {
|
|
185
|
+
const bannerService = accessor.get(IBannerService);
|
|
186
|
+
bannerService.focus();
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
190
|
+
id: 'workbench.banner.focusNextAction',
|
|
191
|
+
weight: 200 ,
|
|
192
|
+
primary: 17 ,
|
|
193
|
+
secondary: [18 ],
|
|
194
|
+
when: BannerFocused,
|
|
195
|
+
handler: (accessor) => {
|
|
196
|
+
const bannerService = accessor.get(IBannerService);
|
|
197
|
+
bannerService.focusNextAction();
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
201
|
+
id: 'workbench.banner.focusPreviousAction',
|
|
202
|
+
weight: 200 ,
|
|
203
|
+
primary: 15 ,
|
|
204
|
+
secondary: [16 ],
|
|
205
|
+
when: BannerFocused,
|
|
206
|
+
handler: (accessor) => {
|
|
207
|
+
const bannerService = accessor.get(IBannerService);
|
|
208
|
+
bannerService.focusPreviousAction();
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
class FocusBannerAction extends Action2 {
|
|
212
|
+
static { this.ID = 'workbench.action.focusBanner'; }
|
|
213
|
+
static { this.LABEL = ( localize('focusBanner', "Focus Banner")); }
|
|
214
|
+
constructor() {
|
|
215
|
+
super({
|
|
216
|
+
id: FocusBannerAction.ID,
|
|
217
|
+
title: { value: FocusBannerAction.LABEL, original: 'Focus Banner' },
|
|
218
|
+
category: Categories.View,
|
|
219
|
+
f1: true
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
async run(accessor) {
|
|
223
|
+
const layoutService = accessor.get(IWorkbenchLayoutService);
|
|
224
|
+
layoutService.focusPart("workbench.parts.banner" );
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
registerAction2(FocusBannerAction);
|
|
228
|
+
export { BannerPart };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import n from '../../../../../../../../external/rollup-plugin-styles/dist/runtime/inject-css.js';
|
|
2
|
+
var css = ".monaco-workbench .part.banner{background-color:var(--vscode-banner-background);box-sizing:border-box;color:var(--vscode-banner-foreground);cursor:default;display:flex;font-size:12px;height:100%;overflow:visible;width:100%}.monaco-workbench .part.banner .icon-container{align-items:center;display:flex;flex-shrink:0;padding:0 6px 0 10px}.monaco-workbench .part.banner .icon-container .codicon{color:var(--vscode-banner-iconForeground)}.monaco-workbench .part.banner .icon-container.custom-icon{background-image:url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGQ9Ik0xMDI0IDEwMjRIMFYwaDEwMjR2MTAyNHoiIHN0eWxlPSJmaWxsOiNmNmY2ZjY7ZmlsbC1vcGFjaXR5OjAiIGZpbGw9Im5vbmUiLz48cGF0aCBkPSJNMTAyNCA4NS4zMzN2ODUzLjMzM0gwVjg1LjMzM2gxMDI0eiIgc3R5bGU9ImZpbGw6I2ZmZiIvPjxwYXRoIGQ9Ik0wIDg1LjMzM2gyOTguNjY3djg1My4zMzNIMFY4NS4zMzN6bTEwMjQgMHY4NTMuMzMzSDM4NFY4NS4zMzNoNjQwem0tNTU0LjY2NyAxNjBoMzQxLjMzM3YtNjRINDY5LjMzM3Y2NHptMzQxLjMzNCA1MzMuMzM0SDQ2OS4zMzN2NjRoMzQxLjMzM2wuMDAxLTY0em0xMjgtMTQ5LjMzNEg1OTcuMzMzdjY0aDM0MS4zMzNsLjAwMS02NHptMC0xNDkuMzMzSDU5Ny4zMzN2NjRoMzQxLjMzM2wuMDAxLTY0em0wLTE0OS4zMzNINTk3LjMzM3Y2NGgzNDEuMzMzbC4wMDEtNjR6IiBzdHlsZT0iZmlsbDojMTY3YWJmIi8+PC9zdmc+\");background-position:50%;background-repeat:no-repeat;background-size:16px;margin:0 6px 0 10px;padding:0;width:16px}.monaco-workbench .part.banner .message-container{line-height:26px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-workbench .part.banner .message-container a{color:var(--vscode-banner-foreground)}.monaco-workbench .part.banner .message-container p{margin-block-end:0;margin-block-start:0}.monaco-workbench .part.banner .message-actions-container{flex-grow:1;flex-shrink:0;line-height:26px}.monaco-workbench .part.banner .message-actions-container a{color:var(--vscode-banner-foreground);cursor:pointer;margin-left:12px;padding:3px;text-decoration:underline}.monaco-workbench .part.banner .message-container a{cursor:pointer;text-decoration:underline}.monaco-workbench .part.banner .action-container{padding:0 10px 0 6px}.monaco-workbench .part.banner .action-container .codicon{color:var(--vscode-banner-foreground)}";
|
|
3
|
+
n(css,{});
|
|
4
|
+
export { css, css as default };
|
|
@@ -257,6 +257,27 @@ registerAction2(class extends SwitchPanelViewAction {
|
|
|
257
257
|
return super.run(accessor, 1);
|
|
258
258
|
}
|
|
259
259
|
});
|
|
260
|
+
registerAction2(class extends Action2 {
|
|
261
|
+
constructor() {
|
|
262
|
+
super({
|
|
263
|
+
id: 'workbench.action.closePanel',
|
|
264
|
+
title: { value: ( localize('closePanel', "Close Panel")), original: 'Close Panel' },
|
|
265
|
+
category: Categories.View,
|
|
266
|
+
icon: closeIcon,
|
|
267
|
+
menu: [{
|
|
268
|
+
id: MenuId.CommandPalette,
|
|
269
|
+
when: PanelVisibleContext,
|
|
270
|
+
}, {
|
|
271
|
+
id: MenuId.PanelTitle,
|
|
272
|
+
group: 'navigation',
|
|
273
|
+
order: 2
|
|
274
|
+
}]
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
run(accessor) {
|
|
278
|
+
accessor.get(IWorkbenchLayoutService).setPartHidden(true, "workbench.parts.panel" );
|
|
279
|
+
}
|
|
280
|
+
});
|
|
260
281
|
registerAction2(class extends Action2 {
|
|
261
282
|
constructor() {
|
|
262
283
|
super({
|