@codingame/monaco-vscode-views-service-override 1.85.0 → 1.85.2

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.
Files changed (44) hide show
  1. package/assets/index-no-csp.html +4 -0
  2. package/assets/index.html +5 -1
  3. package/index.d.ts +2 -2
  4. package/index.js +2 -2
  5. package/package.json +11 -9
  6. package/tools/editor.js +1 -1
  7. package/views.d.ts +9 -4
  8. package/views.js +32 -10
  9. package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +2 -2
  10. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +1 -1
  11. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +692 -0
  12. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +240 -0
  13. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +77 -0
  14. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorSerializer.js +42 -0
  15. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +71 -0
  16. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/conflictActions.js +346 -0
  17. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editorGutter.js +96 -0
  18. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +145 -0
  19. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.js +103 -0
  20. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +399 -0
  21. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +196 -0
  22. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/fixedZoneWidget.js +41 -0
  23. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/lineAlignment.js +128 -0
  24. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/media/mergeEditor.css.js +6 -0
  25. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +611 -0
  26. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.js +158 -0
  27. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +262 -0
  28. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewZones.js +173 -0
  29. package/vscode/src/vs/workbench/contrib/webview/browser/webview.contribution.js +79 -0
  30. package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindWidget.js +1 -1
  31. package/vscode/src/vs/workbench/services/history/browser/historyService.js +3 -0
  32. package/override/vs/workbench/contrib/notebook/common/notebookEditorInput.js +0 -3
  33. package/vscode/src/vs/base/browser/ui/tree/treeDefaults.js +0 -16
  34. package/vscode/src/vs/workbench/browser/parts/views/checkbox.js +0 -107
  35. package/vscode/src/vs/workbench/browser/parts/views/media/views.css.js +0 -6
  36. package/vscode/src/vs/workbench/browser/parts/views/treeView.js +0 -1604
  37. package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.css.js +0 -6
  38. package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +0 -390
  39. package/vscode/src/vs/workbench/contrib/languageDetection/browser/languageDetection.contribution.js +0 -157
  40. package/vscode/src/vs/workbench/contrib/notebook/common/notebookContextKeys.js +0 -5
  41. package/vscode/src/vs/workbench/contrib/remote/browser/media/tunnelView.css.js +0 -6
  42. package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +0 -217
  43. package/vscode/src/vs/workbench/contrib/remote/browser/remoteIcons.js +0 -91
  44. package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +0 -1837
@@ -1,217 +0,0 @@
1
- import * as nls from 'monaco-editor/esm/vs/nls.js';
2
- import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
3
- import { OnPortForward, makeAddress, mapHasAddressLocalhostOrAllInterfaces, TunnelCloseReason, AutoTunnelSource } from 'vscode/vscode/vs/workbench/services/remote/common/tunnelModel';
4
- import { OpenPortInPreviewAction, OpenPortInBrowserAction, TunnelPanel, openPreviewEnabledContext } from './tunnelView.js';
5
- import Severity from 'monaco-editor/esm/vs/base/common/severity.js';
6
- import { isWeb } from 'monaco-editor/esm/vs/base/common/platform.js';
7
- import { TunnelPrivacyId } from 'vscode/vscode/vs/platform/tunnel/common/tunnel';
8
-
9
- const VIEWLET_ID = 'workbench.view.remote';
10
- class OnAutoForwardedAction extends Disposable {
11
- static { this.NOTIFY_COOL_DOWN = 5000; }
12
- constructor(notificationService, remoteExplorerService, openerService, externalOpenerService, tunnelService, hostService, logService, contextKeyService) {
13
- super();
14
- this.notificationService = notificationService;
15
- this.remoteExplorerService = remoteExplorerService;
16
- this.openerService = openerService;
17
- this.externalOpenerService = externalOpenerService;
18
- this.tunnelService = tunnelService;
19
- this.hostService = hostService;
20
- this.logService = logService;
21
- this.contextKeyService = contextKeyService;
22
- this.alreadyOpenedOnce = ( new Set());
23
- this.lastNotifyTime = ( new Date());
24
- this.lastNotifyTime.setFullYear(this.lastNotifyTime.getFullYear() - 1);
25
- }
26
- async doAction(tunnels) {
27
- this.logService.trace(`ForwardedPorts: (OnAutoForwardedAction) Starting action for ${tunnels[0]?.tunnelRemotePort}`);
28
- this.doActionTunnels = tunnels;
29
- const tunnel = await this.portNumberHeuristicDelay();
30
- this.logService.trace(`ForwardedPorts: (OnAutoForwardedAction) Heuristic chose ${tunnel?.tunnelRemotePort}`);
31
- if (tunnel) {
32
- const allAttributes = await this.remoteExplorerService.tunnelModel.getAttributes([{ port: tunnel.tunnelRemotePort, host: tunnel.tunnelRemoteHost }]);
33
- const attributes = allAttributes?.get(tunnel.tunnelRemotePort)?.onAutoForward;
34
- this.logService.trace(`ForwardedPorts: (OnAutoForwardedAction) onAutoForward action is ${attributes}`);
35
- switch (attributes) {
36
- case OnPortForward.OpenBrowserOnce: {
37
- if (( this.alreadyOpenedOnce.has(tunnel.localAddress))) {
38
- break;
39
- }
40
- this.alreadyOpenedOnce.add(tunnel.localAddress);
41
- }
42
- case OnPortForward.OpenBrowser: {
43
- const address = makeAddress(tunnel.tunnelRemoteHost, tunnel.tunnelRemotePort);
44
- await OpenPortInBrowserAction.run(this.remoteExplorerService.tunnelModel, this.openerService, address);
45
- break;
46
- }
47
- case OnPortForward.OpenPreview: {
48
- const address = makeAddress(tunnel.tunnelRemoteHost, tunnel.tunnelRemotePort);
49
- await OpenPortInPreviewAction.run(this.remoteExplorerService.tunnelModel, this.openerService, this.externalOpenerService, address);
50
- break;
51
- }
52
- case OnPortForward.Silent: break;
53
- default: {
54
- const elapsed = ( new Date()).getTime() - this.lastNotifyTime.getTime();
55
- this.logService.trace(`ForwardedPorts: (OnAutoForwardedAction) time elapsed since last notification ${elapsed} ms`);
56
- if (elapsed > OnAutoForwardedAction.NOTIFY_COOL_DOWN) {
57
- await this.showNotification(tunnel);
58
- }
59
- }
60
- }
61
- }
62
- }
63
- hide(removedPorts) {
64
- if (this.doActionTunnels) {
65
- this.doActionTunnels = this.doActionTunnels.filter(value => !removedPorts.includes(value.tunnelRemotePort));
66
- }
67
- if (this.lastShownPort && removedPorts.indexOf(this.lastShownPort) >= 0) {
68
- this.lastNotification?.close();
69
- }
70
- }
71
- async portNumberHeuristicDelay() {
72
- this.logService.trace(`ForwardedPorts: (OnAutoForwardedAction) Starting heuristic delay`);
73
- if (!this.doActionTunnels || this.doActionTunnels.length === 0) {
74
- return;
75
- }
76
- this.doActionTunnels = this.doActionTunnels.sort((a, b) => a.tunnelRemotePort - b.tunnelRemotePort);
77
- const firstTunnel = this.doActionTunnels.shift();
78
- if (firstTunnel.tunnelRemotePort % 1000 === 0) {
79
- this.logService.trace(`ForwardedPorts: (OnAutoForwardedAction) Heuristic chose tunnel because % 1000: ${firstTunnel.tunnelRemotePort}`);
80
- this.newerTunnel = firstTunnel;
81
- return firstTunnel;
82
- }
83
- else if (firstTunnel.tunnelRemotePort < 10000 && firstTunnel.tunnelRemotePort !== 9229) {
84
- this.logService.trace(`ForwardedPorts: (OnAutoForwardedAction) Heuristic chose tunnel because < 10000: ${firstTunnel.tunnelRemotePort}`);
85
- this.newerTunnel = firstTunnel;
86
- return firstTunnel;
87
- }
88
- this.logService.trace(`ForwardedPorts: (OnAutoForwardedAction) Waiting for "better" tunnel than ${firstTunnel.tunnelRemotePort}`);
89
- this.newerTunnel = undefined;
90
- return ( new Promise(resolve => {
91
- setTimeout(() => {
92
- if (this.newerTunnel) {
93
- resolve(undefined);
94
- }
95
- else if (this.doActionTunnels?.includes(firstTunnel)) {
96
- resolve(firstTunnel);
97
- }
98
- else {
99
- resolve(undefined);
100
- }
101
- }, 3000);
102
- }));
103
- }
104
- basicMessage(tunnel) {
105
- return ( nls.localizeWithPath(
106
- 'vs/workbench/contrib/remote/browser/remoteExplorer',
107
- 'remote.tunnelsView.automaticForward',
108
- "Your application running on port {0} is available. ",
109
- tunnel.tunnelRemotePort
110
- ));
111
- }
112
- linkMessage() {
113
- return ( nls.localizeWithPath(
114
- 'vs/workbench/contrib/remote/browser/remoteExplorer',
115
- { key: 'remote.tunnelsView.notificationLink2', comment: ['[See all forwarded ports]({0}) is a link. Only translate `See all forwarded ports`. Do not change brackets and parentheses or {0}'] },
116
- "[See all forwarded ports]({0})",
117
- `command:${TunnelPanel.ID}.focus`
118
- ));
119
- }
120
- async showNotification(tunnel) {
121
- if (!(await this.hostService.hadLastFocus())) {
122
- return;
123
- }
124
- this.lastNotification?.close();
125
- let message = this.basicMessage(tunnel);
126
- const choices = [this.openBrowserChoice(tunnel)];
127
- if (!isWeb || openPreviewEnabledContext.getValue(this.contextKeyService)) {
128
- choices.push(this.openPreviewChoice(tunnel));
129
- }
130
- if ((tunnel.tunnelLocalPort !== tunnel.tunnelRemotePort) && this.tunnelService.canElevate && this.tunnelService.isPortPrivileged(tunnel.tunnelRemotePort)) {
131
- message += ( nls.localizeWithPath(
132
- 'vs/workbench/contrib/remote/browser/remoteExplorer',
133
- 'remote.tunnelsView.elevationMessage',
134
- "You'll need to run as superuser to use port {0} locally. ",
135
- tunnel.tunnelRemotePort
136
- ));
137
- choices.unshift(this.elevateChoice(tunnel));
138
- }
139
- if (tunnel.privacy === TunnelPrivacyId.Private && isWeb && this.tunnelService.canChangePrivacy) {
140
- choices.push(this.makePublicChoice(tunnel));
141
- }
142
- message += this.linkMessage();
143
- this.lastNotification = this.notificationService.prompt(Severity.Info, message, choices, { neverShowAgain: { id: 'remote.tunnelsView.autoForwardNeverShow', isSecondary: true } });
144
- this.lastShownPort = tunnel.tunnelRemotePort;
145
- this.lastNotifyTime = ( new Date());
146
- this.lastNotification.onDidClose(() => {
147
- this.lastNotification = undefined;
148
- this.lastShownPort = undefined;
149
- });
150
- }
151
- makePublicChoice(tunnel) {
152
- return {
153
- label: ( nls.localizeWithPath(
154
- 'vs/workbench/contrib/remote/browser/remoteExplorer',
155
- 'remote.tunnelsView.makePublic',
156
- "Make Public"
157
- )),
158
- run: async () => {
159
- const oldTunnelDetails = mapHasAddressLocalhostOrAllInterfaces(this.remoteExplorerService.tunnelModel.forwarded, tunnel.tunnelRemoteHost, tunnel.tunnelRemotePort);
160
- await this.remoteExplorerService.close({ host: tunnel.tunnelRemoteHost, port: tunnel.tunnelRemotePort }, TunnelCloseReason.Other);
161
- return this.remoteExplorerService.forward({
162
- remote: { host: tunnel.tunnelRemoteHost, port: tunnel.tunnelRemotePort },
163
- local: tunnel.tunnelLocalPort,
164
- name: oldTunnelDetails?.name,
165
- elevateIfNeeded: true,
166
- privacy: TunnelPrivacyId.Public,
167
- source: oldTunnelDetails?.source
168
- });
169
- }
170
- };
171
- }
172
- openBrowserChoice(tunnel) {
173
- const address = makeAddress(tunnel.tunnelRemoteHost, tunnel.tunnelRemotePort);
174
- return {
175
- label: OpenPortInBrowserAction.LABEL,
176
- run: () => OpenPortInBrowserAction.run(this.remoteExplorerService.tunnelModel, this.openerService, address)
177
- };
178
- }
179
- openPreviewChoice(tunnel) {
180
- const address = makeAddress(tunnel.tunnelRemoteHost, tunnel.tunnelRemotePort);
181
- return {
182
- label: OpenPortInPreviewAction.LABEL,
183
- run: () => OpenPortInPreviewAction.run(this.remoteExplorerService.tunnelModel, this.openerService, this.externalOpenerService, address)
184
- };
185
- }
186
- elevateChoice(tunnel) {
187
- return {
188
- label: ( nls.localizeWithPath(
189
- 'vs/workbench/contrib/remote/browser/remoteExplorer',
190
- 'remote.tunnelsView.elevationButton',
191
- "Use Port {0} as Sudo...",
192
- tunnel.tunnelRemotePort
193
- )),
194
- run: async () => {
195
- await this.remoteExplorerService.close({ host: tunnel.tunnelRemoteHost, port: tunnel.tunnelRemotePort }, TunnelCloseReason.Other);
196
- const newTunnel = await this.remoteExplorerService.forward({
197
- remote: { host: tunnel.tunnelRemoteHost, port: tunnel.tunnelRemotePort },
198
- local: tunnel.tunnelRemotePort,
199
- elevateIfNeeded: true,
200
- source: AutoTunnelSource
201
- });
202
- if (!newTunnel || (typeof newTunnel === 'string')) {
203
- return;
204
- }
205
- this.lastNotification?.close();
206
- this.lastShownPort = newTunnel.tunnelRemotePort;
207
- this.lastNotification = this.notificationService.prompt(Severity.Info, this.basicMessage(newTunnel) + this.linkMessage(), [this.openBrowserChoice(newTunnel), this.openPreviewChoice(tunnel)], { neverShowAgain: { id: 'remote.tunnelsView.autoForwardNeverShow', isSecondary: true } });
208
- this.lastNotification.onDidClose(() => {
209
- this.lastNotification = undefined;
210
- this.lastShownPort = undefined;
211
- });
212
- }
213
- };
214
- }
215
- }
216
-
217
- export { VIEWLET_ID };
@@ -1,91 +0,0 @@
1
- import * as nls from 'monaco-editor/esm/vs/nls.js';
2
- import { Codicon } from 'monaco-editor/esm/vs/base/common/codicons.js';
3
- import { registerIcon } from 'monaco-editor/esm/vs/platform/theme/common/iconRegistry.js';
4
-
5
- registerIcon('remote-explorer-get-started', Codicon.star, ( nls.localizeWithPath(
6
- 'vs/workbench/contrib/remote/browser/remoteIcons',
7
- 'getStartedIcon',
8
- 'Getting started icon in the remote explorer view.'
9
- )));
10
- registerIcon('remote-explorer-documentation', Codicon.book, ( nls.localizeWithPath(
11
- 'vs/workbench/contrib/remote/browser/remoteIcons',
12
- 'documentationIcon',
13
- 'Documentation icon in the remote explorer view.'
14
- )));
15
- registerIcon('remote-explorer-feedback', Codicon.twitter, ( nls.localizeWithPath(
16
- 'vs/workbench/contrib/remote/browser/remoteIcons',
17
- 'feedbackIcon',
18
- 'Feedback icon in the remote explorer view.'
19
- )));
20
- registerIcon('remote-explorer-review-issues', Codicon.issues, ( nls.localizeWithPath(
21
- 'vs/workbench/contrib/remote/browser/remoteIcons',
22
- 'reviewIssuesIcon',
23
- 'Review issue icon in the remote explorer view.'
24
- )));
25
- registerIcon('remote-explorer-report-issues', Codicon.comment, ( nls.localizeWithPath(
26
- 'vs/workbench/contrib/remote/browser/remoteIcons',
27
- 'reportIssuesIcon',
28
- 'Report issue icon in the remote explorer view.'
29
- )));
30
- registerIcon('remote-explorer-view-icon', Codicon.remoteExplorer, ( nls.localizeWithPath(
31
- 'vs/workbench/contrib/remote/browser/remoteIcons',
32
- 'remoteExplorerViewIcon',
33
- 'View icon of the remote explorer view.'
34
- )));
35
- registerIcon('ports-view-icon', Codicon.plug, ( nls.localizeWithPath(
36
- 'vs/workbench/contrib/remote/browser/remoteIcons',
37
- 'portsViewIcon',
38
- 'View icon of the remote ports view.'
39
- )));
40
- registerIcon('ports-view-icon', Codicon.plug, ( nls.localizeWithPath(
41
- 'vs/workbench/contrib/remote/browser/remoteIcons',
42
- 'portIcon',
43
- 'Icon representing a remote port.'
44
- )));
45
- const privatePortIcon = registerIcon('private-ports-view-icon', Codicon.lock, ( nls.localizeWithPath(
46
- 'vs/workbench/contrib/remote/browser/remoteIcons',
47
- 'privatePortIcon',
48
- 'Icon representing a private remote port.'
49
- )));
50
- const forwardPortIcon = registerIcon('ports-forward-icon', Codicon.plus, ( nls.localizeWithPath(
51
- 'vs/workbench/contrib/remote/browser/remoteIcons',
52
- 'forwardPortIcon',
53
- 'Icon for the forward action.'
54
- )));
55
- const stopForwardIcon = registerIcon('ports-stop-forward-icon', Codicon.x, ( nls.localizeWithPath(
56
- 'vs/workbench/contrib/remote/browser/remoteIcons',
57
- 'stopForwardIcon',
58
- 'Icon for the stop forwarding action.'
59
- )));
60
- const openBrowserIcon = registerIcon('ports-open-browser-icon', Codicon.globe, ( nls.localizeWithPath(
61
- 'vs/workbench/contrib/remote/browser/remoteIcons',
62
- 'openBrowserIcon',
63
- 'Icon for the open browser action.'
64
- )));
65
- const openPreviewIcon = registerIcon('ports-open-preview-icon', Codicon.openPreview, ( nls.localizeWithPath(
66
- 'vs/workbench/contrib/remote/browser/remoteIcons',
67
- 'openPreviewIcon',
68
- 'Icon for the open preview action.'
69
- )));
70
- const copyAddressIcon = registerIcon('ports-copy-address-icon', Codicon.clippy, ( nls.localizeWithPath(
71
- 'vs/workbench/contrib/remote/browser/remoteIcons',
72
- 'copyAddressIcon',
73
- 'Icon for the copy local address action.'
74
- )));
75
- const labelPortIcon = registerIcon('ports-label-icon', Codicon.tag, ( nls.localizeWithPath(
76
- 'vs/workbench/contrib/remote/browser/remoteIcons',
77
- 'labelPortIcon',
78
- 'Icon for the label port action.'
79
- )));
80
- const forwardedPortWithoutProcessIcon = registerIcon('ports-forwarded-without-process-icon', Codicon.circleOutline, ( nls.localizeWithPath(
81
- 'vs/workbench/contrib/remote/browser/remoteIcons',
82
- 'forwardedPortWithoutProcessIcon',
83
- 'Icon for forwarded ports that don\'t have a running process.'
84
- )));
85
- const forwardedPortWithProcessIcon = registerIcon('ports-forwarded-with-process-icon', Codicon.circleFilled, ( nls.localizeWithPath(
86
- 'vs/workbench/contrib/remote/browser/remoteIcons',
87
- 'forwardedPortWithProcessIcon',
88
- 'Icon for forwarded ports that do have a running process.'
89
- )));
90
-
91
- export { copyAddressIcon, forwardPortIcon, forwardedPortWithProcessIcon, forwardedPortWithoutProcessIcon, labelPortIcon, openBrowserIcon, openPreviewIcon, privatePortIcon, stopForwardIcon };