@codingame/monaco-vscode-api 17.1.1 → 17.1.3
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/lifecycle.js +3 -1
- package/package.json +9 -8
- package/services.d.ts +2 -2
- package/services.js +3 -3
- package/vscode/src/vs/base/browser/dom.js +4 -4
- package/vscode/src/vs/base/browser/markdownRenderer.js +4 -4
- package/vscode/src/vs/base/browser/ui/button/button.js +3 -3
- package/vscode/src/vs/platform/dialogs/common/dialogs.service.d.ts +1 -1
- package/vscode/src/vs/platform/label/common/label.service.d.ts +1 -1
- package/vscode/src/vs/platform/native/common/native.d.ts +1 -1
- package/vscode/src/vs/platform/product/common/product.js +3 -3
- package/vscode/src/vs/platform/userDataSync/common/userDataSync.service.d.ts +1 -1
- package/vscode/src/vs/platform/workspace/common/virtualWorkspace.d.ts +10 -0
- package/vscode/src/vs/platform/workspace/common/virtualWorkspace.js +26 -0
- package/vscode/src/vs/platform/workspaces/common/workspaces.service.d.ts +2 -2
- package/vscode/src/vs/workbench/api/common/extHost.protocol.d.ts +1 -1
- package/vscode/src/vs/workbench/api/common/extHostLabelService.d.ts +1 -1
- package/vscode/src/vs/workbench/browser/contextkeys.d.ts +67 -0
- package/vscode/src/vs/workbench/browser/contextkeys.js +241 -0
- package/vscode/src/vs/workbench/common/editor/editorInput.d.ts +1 -1
- package/vscode/src/vs/workbench/services/layout/browser/layoutService.d.ts +64 -0
- package/vscode/src/vs/workbench/services/layout/browser/layoutService.js +169 -0
- package/vscode/src/vs/workbench/services/layout/browser/layoutService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/outline/browser/outline.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/workspaces/common/workspaceEditing.service.d.ts +1 -1
- package/workers/editor.worker.js +5 -1
- package/vscode/src/vs/base/browser/dompurify/dompurify.js +0 -937
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Emitter } from "../../../base/common/event.js";
|
|
2
2
|
import { URI } from "../../../base/common/uri.js";
|
|
3
3
|
import { EditorInputCapabilities, Verbosity, GroupIdentifier, ISaveOptions, IRevertOptions, IMoveResult, IEditorDescriptor, IEditorPane, IUntypedEditorInput, AbstractEditorInput, IEditorIdentifier } from "../editor.js";
|
|
4
|
-
import { ConfirmResult } from "@codingame/monaco-vscode-
|
|
4
|
+
import { ConfirmResult } from "@codingame/monaco-vscode-0f262ee3-cace-5644-818e-eba5fe007685-common/vscode/vs/platform/dialogs/common/dialogs";
|
|
5
5
|
import { IMarkdownString } from "../../../base/common/htmlContent.js";
|
|
6
6
|
import { IDisposable } from "../../../base/common/lifecycle.js";
|
|
7
7
|
import { ThemeIcon } from "../../../base/common/themables.js";
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { IConfigurationService } from "../../../../platform/configuration/common/configuration.service.js";
|
|
2
|
+
export declare enum Parts {
|
|
3
|
+
TITLEBAR_PART = "workbench.parts.titlebar",
|
|
4
|
+
BANNER_PART = "workbench.parts.banner",
|
|
5
|
+
ACTIVITYBAR_PART = "workbench.parts.activitybar",
|
|
6
|
+
SIDEBAR_PART = "workbench.parts.sidebar",
|
|
7
|
+
PANEL_PART = "workbench.parts.panel",
|
|
8
|
+
AUXILIARYBAR_PART = "workbench.parts.auxiliarybar",
|
|
9
|
+
EDITOR_PART = "workbench.parts.editor",
|
|
10
|
+
STATUSBAR_PART = "workbench.parts.statusbar"
|
|
11
|
+
}
|
|
12
|
+
export declare enum ZenModeSettings {
|
|
13
|
+
SHOW_TABS = "zenMode.showTabs",
|
|
14
|
+
HIDE_LINENUMBERS = "zenMode.hideLineNumbers",
|
|
15
|
+
HIDE_STATUSBAR = "zenMode.hideStatusBar",
|
|
16
|
+
HIDE_ACTIVITYBAR = "zenMode.hideActivityBar",
|
|
17
|
+
CENTER_LAYOUT = "zenMode.centerLayout",
|
|
18
|
+
FULLSCREEN = "zenMode.fullScreen",
|
|
19
|
+
RESTORE = "zenMode.restore",
|
|
20
|
+
SILENT_NOTIFICATIONS = "zenMode.silentNotifications"
|
|
21
|
+
}
|
|
22
|
+
export declare enum LayoutSettings {
|
|
23
|
+
ACTIVITY_BAR_LOCATION = "workbench.activityBar.location",
|
|
24
|
+
EDITOR_TABS_MODE = "workbench.editor.showTabs",
|
|
25
|
+
EDITOR_ACTIONS_LOCATION = "workbench.editor.editorActionsLocation",
|
|
26
|
+
COMMAND_CENTER = "window.commandCenter",
|
|
27
|
+
LAYOUT_ACTIONS = "workbench.layoutControl.enabled"
|
|
28
|
+
}
|
|
29
|
+
export declare enum ActivityBarPosition {
|
|
30
|
+
DEFAULT = "default",
|
|
31
|
+
TOP = "top",
|
|
32
|
+
BOTTOM = "bottom",
|
|
33
|
+
HIDDEN = "hidden"
|
|
34
|
+
}
|
|
35
|
+
export declare enum EditorTabsMode {
|
|
36
|
+
MULTIPLE = "multiple",
|
|
37
|
+
SINGLE = "single",
|
|
38
|
+
NONE = "none"
|
|
39
|
+
}
|
|
40
|
+
export declare enum EditorActionsLocation {
|
|
41
|
+
DEFAULT = "default",
|
|
42
|
+
TITLEBAR = "titleBar",
|
|
43
|
+
HIDDEN = "hidden"
|
|
44
|
+
}
|
|
45
|
+
export declare enum Position {
|
|
46
|
+
LEFT = 0,
|
|
47
|
+
RIGHT = 1,
|
|
48
|
+
BOTTOM = 2,
|
|
49
|
+
TOP = 3
|
|
50
|
+
}
|
|
51
|
+
export declare function isHorizontal(position: Position): boolean;
|
|
52
|
+
export declare enum PanelOpensMaximizedOptions {
|
|
53
|
+
ALWAYS = 0,
|
|
54
|
+
NEVER = 1,
|
|
55
|
+
REMEMBER_LAST = 2
|
|
56
|
+
}
|
|
57
|
+
export type PanelAlignment = "left" | "center" | "right" | "justify";
|
|
58
|
+
export declare function positionToString(position: Position): string;
|
|
59
|
+
export declare function positionFromString(str: string): Position;
|
|
60
|
+
export declare function panelOpensMaximizedFromString(str: string): PanelOpensMaximizedOptions;
|
|
61
|
+
export type MULTI_WINDOW_PARTS = Parts.EDITOR_PART | Parts.STATUSBAR_PART | Parts.TITLEBAR_PART;
|
|
62
|
+
export type SINGLE_WINDOW_PARTS = Exclude<Parts, MULTI_WINDOW_PARTS>;
|
|
63
|
+
export declare function isMultiWindowPart(part: Parts): part is MULTI_WINDOW_PARTS;
|
|
64
|
+
export declare function shouldShowCustomTitleBar(configurationService: IConfigurationService, window: Window, menuBarToggled?: boolean): boolean;
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
|
|
2
|
+
import { isWeb, isMacintosh, isNative } from '../../../../base/common/platform.js';
|
|
3
|
+
import { isAuxiliaryWindow } from '../../../../base/browser/window.js';
|
|
4
|
+
import { hasNativeTitlebar, TitleBarSetting, CustomTitleBarVisibility, getMenuBarVisibility } from '../../../../platform/window/common/window.js';
|
|
5
|
+
import { isFullscreen, isWCOEnabled } from '../../../../base/browser/browser.js';
|
|
6
|
+
|
|
7
|
+
var Parts;
|
|
8
|
+
(function (Parts) {
|
|
9
|
+
Parts["TITLEBAR_PART"] = "workbench.parts.titlebar";
|
|
10
|
+
Parts["BANNER_PART"] = "workbench.parts.banner";
|
|
11
|
+
Parts["ACTIVITYBAR_PART"] = "workbench.parts.activitybar";
|
|
12
|
+
Parts["SIDEBAR_PART"] = "workbench.parts.sidebar";
|
|
13
|
+
Parts["PANEL_PART"] = "workbench.parts.panel";
|
|
14
|
+
Parts["AUXILIARYBAR_PART"] = "workbench.parts.auxiliarybar";
|
|
15
|
+
Parts["EDITOR_PART"] = "workbench.parts.editor";
|
|
16
|
+
Parts["STATUSBAR_PART"] = "workbench.parts.statusbar";
|
|
17
|
+
})(Parts || (Parts = {}));
|
|
18
|
+
var ZenModeSettings;
|
|
19
|
+
(function (ZenModeSettings) {
|
|
20
|
+
ZenModeSettings["SHOW_TABS"] = "zenMode.showTabs";
|
|
21
|
+
ZenModeSettings["HIDE_LINENUMBERS"] = "zenMode.hideLineNumbers";
|
|
22
|
+
ZenModeSettings["HIDE_STATUSBAR"] = "zenMode.hideStatusBar";
|
|
23
|
+
ZenModeSettings["HIDE_ACTIVITYBAR"] = "zenMode.hideActivityBar";
|
|
24
|
+
ZenModeSettings["CENTER_LAYOUT"] = "zenMode.centerLayout";
|
|
25
|
+
ZenModeSettings["FULLSCREEN"] = "zenMode.fullScreen";
|
|
26
|
+
ZenModeSettings["RESTORE"] = "zenMode.restore";
|
|
27
|
+
ZenModeSettings["SILENT_NOTIFICATIONS"] = "zenMode.silentNotifications";
|
|
28
|
+
})(ZenModeSettings || (ZenModeSettings = {}));
|
|
29
|
+
var LayoutSettings;
|
|
30
|
+
(function (LayoutSettings) {
|
|
31
|
+
LayoutSettings["ACTIVITY_BAR_LOCATION"] = "workbench.activityBar.location";
|
|
32
|
+
LayoutSettings["EDITOR_TABS_MODE"] = "workbench.editor.showTabs";
|
|
33
|
+
LayoutSettings["EDITOR_ACTIONS_LOCATION"] = "workbench.editor.editorActionsLocation";
|
|
34
|
+
LayoutSettings["COMMAND_CENTER"] = "window.commandCenter";
|
|
35
|
+
LayoutSettings["LAYOUT_ACTIONS"] = "workbench.layoutControl.enabled";
|
|
36
|
+
})(LayoutSettings || (LayoutSettings = {}));
|
|
37
|
+
var ActivityBarPosition;
|
|
38
|
+
(function (ActivityBarPosition) {
|
|
39
|
+
ActivityBarPosition["DEFAULT"] = "default";
|
|
40
|
+
ActivityBarPosition["TOP"] = "top";
|
|
41
|
+
ActivityBarPosition["BOTTOM"] = "bottom";
|
|
42
|
+
ActivityBarPosition["HIDDEN"] = "hidden";
|
|
43
|
+
})(ActivityBarPosition || (ActivityBarPosition = {}));
|
|
44
|
+
var EditorTabsMode;
|
|
45
|
+
(function (EditorTabsMode) {
|
|
46
|
+
EditorTabsMode["MULTIPLE"] = "multiple";
|
|
47
|
+
EditorTabsMode["SINGLE"] = "single";
|
|
48
|
+
EditorTabsMode["NONE"] = "none";
|
|
49
|
+
})(EditorTabsMode || (EditorTabsMode = {}));
|
|
50
|
+
var EditorActionsLocation;
|
|
51
|
+
(function (EditorActionsLocation) {
|
|
52
|
+
EditorActionsLocation["DEFAULT"] = "default";
|
|
53
|
+
EditorActionsLocation["TITLEBAR"] = "titleBar";
|
|
54
|
+
EditorActionsLocation["HIDDEN"] = "hidden";
|
|
55
|
+
})(EditorActionsLocation || (EditorActionsLocation = {}));
|
|
56
|
+
var Position;
|
|
57
|
+
(function (Position) {
|
|
58
|
+
Position[Position["LEFT"] = 0] = "LEFT";
|
|
59
|
+
Position[Position["RIGHT"] = 1] = "RIGHT";
|
|
60
|
+
Position[Position["BOTTOM"] = 2] = "BOTTOM";
|
|
61
|
+
Position[Position["TOP"] = 3] = "TOP";
|
|
62
|
+
})(Position || (Position = {}));
|
|
63
|
+
function isHorizontal(position) {
|
|
64
|
+
return position === Position.BOTTOM || position === Position.TOP;
|
|
65
|
+
}
|
|
66
|
+
var PanelOpensMaximizedOptions;
|
|
67
|
+
(function (PanelOpensMaximizedOptions) {
|
|
68
|
+
PanelOpensMaximizedOptions[PanelOpensMaximizedOptions["ALWAYS"] = 0] = "ALWAYS";
|
|
69
|
+
PanelOpensMaximizedOptions[PanelOpensMaximizedOptions["NEVER"] = 1] = "NEVER";
|
|
70
|
+
PanelOpensMaximizedOptions[PanelOpensMaximizedOptions["REMEMBER_LAST"] = 2] = "REMEMBER_LAST";
|
|
71
|
+
})(PanelOpensMaximizedOptions || (PanelOpensMaximizedOptions = {}));
|
|
72
|
+
function positionToString(position) {
|
|
73
|
+
switch (position) {
|
|
74
|
+
case Position.LEFT: return 'left';
|
|
75
|
+
case Position.RIGHT: return 'right';
|
|
76
|
+
case Position.BOTTOM: return 'bottom';
|
|
77
|
+
case Position.TOP: return 'top';
|
|
78
|
+
default: return 'bottom';
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
const positionsByString = {
|
|
82
|
+
[positionToString(Position.LEFT)]: Position.LEFT,
|
|
83
|
+
[positionToString(Position.RIGHT)]: Position.RIGHT,
|
|
84
|
+
[positionToString(Position.BOTTOM)]: Position.BOTTOM,
|
|
85
|
+
[positionToString(Position.TOP)]: Position.TOP
|
|
86
|
+
};
|
|
87
|
+
function positionFromString(str) {
|
|
88
|
+
return positionsByString[str];
|
|
89
|
+
}
|
|
90
|
+
function panelOpensMaximizedSettingToString(setting) {
|
|
91
|
+
switch (setting) {
|
|
92
|
+
case PanelOpensMaximizedOptions.ALWAYS: return 'always';
|
|
93
|
+
case PanelOpensMaximizedOptions.NEVER: return 'never';
|
|
94
|
+
case PanelOpensMaximizedOptions.REMEMBER_LAST: return 'preserve';
|
|
95
|
+
default: return 'preserve';
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
const panelOpensMaximizedByString = {
|
|
99
|
+
[panelOpensMaximizedSettingToString(PanelOpensMaximizedOptions.ALWAYS)]: PanelOpensMaximizedOptions.ALWAYS,
|
|
100
|
+
[panelOpensMaximizedSettingToString(PanelOpensMaximizedOptions.NEVER)]: PanelOpensMaximizedOptions.NEVER,
|
|
101
|
+
[panelOpensMaximizedSettingToString(PanelOpensMaximizedOptions.REMEMBER_LAST)]: PanelOpensMaximizedOptions.REMEMBER_LAST
|
|
102
|
+
};
|
|
103
|
+
function panelOpensMaximizedFromString(str) {
|
|
104
|
+
return panelOpensMaximizedByString[str];
|
|
105
|
+
}
|
|
106
|
+
function isMultiWindowPart(part) {
|
|
107
|
+
return part === Parts.EDITOR_PART ||
|
|
108
|
+
part === Parts.STATUSBAR_PART ||
|
|
109
|
+
part === Parts.TITLEBAR_PART;
|
|
110
|
+
}
|
|
111
|
+
function shouldShowCustomTitleBar(configurationService, window, menuBarToggled) {
|
|
112
|
+
const inFullscreen = isFullscreen(window);
|
|
113
|
+
const nativeTitleBarEnabled = hasNativeTitlebar(configurationService);
|
|
114
|
+
if (!isWeb) {
|
|
115
|
+
const showCustomTitleBar = configurationService.getValue(TitleBarSetting.CUSTOM_TITLE_BAR_VISIBILITY);
|
|
116
|
+
if (showCustomTitleBar === CustomTitleBarVisibility.NEVER && nativeTitleBarEnabled || showCustomTitleBar === CustomTitleBarVisibility.WINDOWED && inFullscreen) {
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
if (!isTitleBarEmpty(configurationService)) {
|
|
121
|
+
return true;
|
|
122
|
+
}
|
|
123
|
+
if (nativeTitleBarEnabled) {
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
126
|
+
if (isMacintosh && isNative) {
|
|
127
|
+
return !inFullscreen;
|
|
128
|
+
}
|
|
129
|
+
if (isNative && !inFullscreen) {
|
|
130
|
+
return true;
|
|
131
|
+
}
|
|
132
|
+
if (isWCOEnabled() && !inFullscreen) {
|
|
133
|
+
return true;
|
|
134
|
+
}
|
|
135
|
+
const menuBarVisibility = !isAuxiliaryWindow(window) ? getMenuBarVisibility(configurationService) : 'hidden';
|
|
136
|
+
switch (menuBarVisibility) {
|
|
137
|
+
case 'classic':
|
|
138
|
+
return !inFullscreen || !!menuBarToggled;
|
|
139
|
+
case 'compact':
|
|
140
|
+
case 'hidden':
|
|
141
|
+
return false;
|
|
142
|
+
case 'toggle':
|
|
143
|
+
return !!menuBarToggled;
|
|
144
|
+
case 'visible':
|
|
145
|
+
return true;
|
|
146
|
+
default:
|
|
147
|
+
return isWeb ? false : !inFullscreen || !!menuBarToggled;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
function isTitleBarEmpty(configurationService) {
|
|
151
|
+
if (configurationService.getValue(LayoutSettings.COMMAND_CENTER)) {
|
|
152
|
+
return false;
|
|
153
|
+
}
|
|
154
|
+
const activityBarPosition = configurationService.getValue(LayoutSettings.ACTIVITY_BAR_LOCATION);
|
|
155
|
+
if (activityBarPosition === ActivityBarPosition.TOP || activityBarPosition === ActivityBarPosition.BOTTOM) {
|
|
156
|
+
return false;
|
|
157
|
+
}
|
|
158
|
+
const editorActionsLocation = configurationService.getValue(LayoutSettings.EDITOR_ACTIONS_LOCATION);
|
|
159
|
+
const editorTabsMode = configurationService.getValue(LayoutSettings.EDITOR_TABS_MODE);
|
|
160
|
+
if (editorActionsLocation === EditorActionsLocation.TITLEBAR || editorActionsLocation === EditorActionsLocation.DEFAULT && editorTabsMode === EditorTabsMode.NONE) {
|
|
161
|
+
return false;
|
|
162
|
+
}
|
|
163
|
+
if (configurationService.getValue(LayoutSettings.LAYOUT_ACTIONS)) {
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
return true;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export { ActivityBarPosition, EditorActionsLocation, EditorTabsMode, LayoutSettings, PanelOpensMaximizedOptions, Parts, Position, ZenModeSettings, isHorizontal, isMultiWindowPart, panelOpensMaximizedFromString, positionFromString, positionToString, shouldShowCustomTitleBar };
|
|
@@ -5,7 +5,7 @@ import { Event } from "../../../../base/common/event.js";
|
|
|
5
5
|
import { IDisposable } from "../../../../base/common/lifecycle.js";
|
|
6
6
|
import { ILayoutService } from "../../../../platform/layout/browser/layoutService.service.js";
|
|
7
7
|
import { Part } from "@codingame/monaco-vscode-85886bdb-61c5-52f1-8eb7-d1d32f6f8cbd-common/vscode/vs/workbench/browser/part";
|
|
8
|
-
import { PanelAlignment, Parts, SINGLE_WINDOW_PARTS, MULTI_WINDOW_PARTS, Position } from "
|
|
8
|
+
import { PanelAlignment, Parts, SINGLE_WINDOW_PARTS, MULTI_WINDOW_PARTS, Position } from "./layoutService.js";
|
|
9
9
|
export declare const IWorkbenchLayoutService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier<IWorkbenchLayoutService>;
|
|
10
10
|
export interface IWorkbenchLayoutService extends ILayoutService {
|
|
11
11
|
readonly _serviceBrand: undefined;
|
|
@@ -2,7 +2,7 @@ import { CancellationToken } from "../../../../base/common/cancellation.js";
|
|
|
2
2
|
import { Event } from "../../../../base/common/event.js";
|
|
3
3
|
import { IDisposable } from "../../../../base/common/lifecycle.js";
|
|
4
4
|
import { IEditorPane } from "../../../common/editor.js";
|
|
5
|
-
import { OutlineTarget, IOutline, IOutlineCreator } from "@codingame/monaco-vscode-
|
|
5
|
+
import { OutlineTarget, IOutline, IOutlineCreator } from "@codingame/monaco-vscode-0f262ee3-cace-5644-818e-eba5fe007685-common/vscode/vs/workbench/services/outline/browser/outline";
|
|
6
6
|
export declare const IOutlineService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier<IOutlineService>;
|
|
7
7
|
export interface IOutlineService {
|
|
8
8
|
_serviceBrand: undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { URI } from "../../../../base/common/uri.js";
|
|
2
2
|
import { IWorkspaceIdentifier } from "../../../../platform/workspace/common/workspace.js";
|
|
3
|
-
import { IWorkspaceFolderCreationData } from "@codingame/monaco-vscode-
|
|
3
|
+
import { IWorkspaceFolderCreationData } from "@codingame/monaco-vscode-158b9837-fc78-5d9c-86f5-9134e4358643-common/vscode/vs/platform/workspaces/common/workspaces";
|
|
4
4
|
export declare const IWorkspaceEditingService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier<IWorkspaceEditingService>;
|
|
5
5
|
export interface IWorkspaceEditingService {
|
|
6
6
|
readonly _serviceBrand: undefined;
|
package/workers/editor.worker.js
CHANGED
|
@@ -13,7 +13,11 @@ function initialize(createFn) {
|
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
const value = requestHandler?.[propKey];
|
|
17
|
+
if (typeof value === 'function') {
|
|
18
|
+
return value.bind(requestHandler);
|
|
19
|
+
}
|
|
20
|
+
return value;
|
|
17
21
|
}
|
|
18
22
|
});
|
|
19
23
|
const context = start(foreignModule);
|