@codingame/monaco-vscode-host-service-override 17.2.1 → 18.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-host-service-override",
3
- "version": "17.2.1",
3
+ "version": "18.0.1",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - host service-override",
6
6
  "keywords": [],
@@ -15,10 +15,10 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-158b9837-fc78-5d9c-86f5-9134e4358643-common": "17.2.1",
19
- "@codingame/monaco-vscode-34a0ffd3-b9f5-5699-b43b-38af5732f38a-common": "17.2.1",
20
- "@codingame/monaco-vscode-api": "17.2.1",
21
- "@codingame/monaco-vscode-d0fb86d3-2a47-594e-955b-9a24631a7124-common": "17.2.1"
18
+ "@codingame/monaco-vscode-158b9837-fc78-5d9c-86f5-9134e4358643-common": "18.0.1",
19
+ "@codingame/monaco-vscode-34a0ffd3-b9f5-5699-b43b-38af5732f38a-common": "18.0.1",
20
+ "@codingame/monaco-vscode-api": "18.0.1",
21
+ "@codingame/monaco-vscode-dcfc2191-2da1-54c7-8fb7-e92c5d11ecef-common": "18.0.1"
22
22
  },
23
23
  "main": "index.js",
24
24
  "module": "index.js",
@@ -14,7 +14,6 @@ import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/
14
14
  import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
15
15
  import { IUserDataProfilesService } from "@codingame/monaco-vscode-api/vscode/vs/platform/userDataProfile/common/userDataProfile.service";
16
16
  import { VSBuffer } from "@codingame/monaco-vscode-api/vscode/vs/base/common/buffer";
17
- import { IElementData } from "@codingame/monaco-vscode-api/vscode/vs/platform/native/common/native";
18
17
  export declare class BrowserHostService extends Disposable implements IHostService {
19
18
  private readonly layoutService;
20
19
  private readonly configurationService;
@@ -61,7 +60,6 @@ export declare class BrowserHostService extends Disposable implements IHostServi
61
60
  withExpectedShutdown<T>(expectedShutdownTask: () => Promise<T>): Promise<T>;
62
61
  private handleExpectedShutdown;
63
62
  getScreenshot(): Promise<VSBuffer | undefined>;
64
- getElementData(): Promise<IElementData | undefined>;
65
63
  getBrowserId(): Promise<string | undefined>;
66
64
  getNativeWindowHandle(_windowId: number): Promise<undefined>;
67
65
  }
@@ -8,7 +8,7 @@ import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench
8
8
  import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
9
9
  import { isFolderToOpen, isWorkspaceToOpen, isFileToOpen } from '@codingame/monaco-vscode-api/vscode/vs/platform/window/common/window';
10
10
  import { pathsToEditors, isResourceEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
11
- import { whenEditorClosed } from '@codingame/monaco-vscode-d0fb86d3-2a47-594e-955b-9a24631a7124-common/vscode/vs/workbench/browser/editor';
11
+ import { whenEditorClosed } from '@codingame/monaco-vscode-dcfc2191-2da1-54c7-8fb7-e92c5d11ecef-common/vscode/vs/workbench/browser/editor';
12
12
  import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
13
13
  import { Verbosity } from '@codingame/monaco-vscode-158b9837-fc78-5d9c-86f5-9134e4358643-common/vscode/vs/platform/label/common/label';
14
14
  import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
@@ -35,6 +35,7 @@ import { mainWindow, isAuxiliaryWindow } from '@codingame/monaco-vscode-api/vsco
35
35
  import { isIOS, isMacintosh } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
36
36
  import { IUserDataProfilesService } from '@codingame/monaco-vscode-api/vscode/vs/platform/userDataProfile/common/userDataProfile.service';
37
37
  import { VSBuffer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
38
+ import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
38
39
 
39
40
  var HostShutdownReason;
40
41
  (function (HostShutdownReason) {
@@ -269,7 +270,14 @@ let BrowserHostService = class BrowserHostService extends Disposable {
269
270
  const waitMarkerFileURI = options?.waitMarkerFileURI;
270
271
  if (waitMarkerFileURI) {
271
272
  (async () => {
272
- await this.instantiationService.invokeFunction(accessor => whenEditorClosed(accessor, ( fileOpenables.map(fileOpenable => fileOpenable.fileUri))));
273
+ const filesToWaitFor = [];
274
+ if (options.mergeMode) {
275
+ filesToWaitFor.push(fileOpenables[3].fileUri );
276
+ }
277
+ else {
278
+ filesToWaitFor.push(...( fileOpenables.map(fileOpenable => fileOpenable.fileUri)));
279
+ }
280
+ await this.instantiationService.invokeFunction(accessor => whenEditorClosed(accessor, filesToWaitFor));
273
281
  await this.fileService.del(waitMarkerFileURI);
274
282
  })();
275
283
  }
@@ -338,17 +346,33 @@ let BrowserHostService = class BrowserHostService extends Disposable {
338
346
  }
339
347
  const opened = await this.workspaceProvider.open(workspace, options);
340
348
  if (!opened) {
341
- const { confirmed } = await this.dialogService.confirm({
349
+ await this.dialogService.prompt({
342
350
  type: Severity.Warning,
343
- message: ( localize(
344
- 12408,
345
- "The browser interrupted the opening of a new tab or window. Press 'Open' to open it anyway."
351
+ message: workspace ?
352
+ ( localize(
353
+ 12688,
354
+ "The browser blocked opening a new tab or window for '{0}'. Press 'Retry' to try again.",
355
+ this.getRecentLabel(workspace)
356
+ )) :
357
+ ( localize(
358
+ 12689,
359
+ "The browser blocked opening a new tab or window. Press 'Retry' to try again."
346
360
  )),
347
- primaryButton: ( localize(12409, "&&Open"))
361
+ custom: {
362
+ markdownDetails: [{ markdown: ( new MarkdownString(( localize(
363
+ 12690,
364
+ "Please allow pop-ups for this website in your [browser settings]({0}).",
365
+ 'https://aka.ms/allow-vscode-popup'
366
+ )), true)) }]
367
+ },
368
+ buttons: [
369
+ {
370
+ label: ( localize(12691, "&&Retry")),
371
+ run: () => this.workspaceProvider.open(workspace, options)
372
+ }
373
+ ],
374
+ cancelButton: true
348
375
  });
349
- if (confirmed) {
350
- await this.workspaceProvider.open(workspace, options);
351
- }
352
376
  }
353
377
  }
354
378
  async toggleFullScreen(targetWindow) {
@@ -459,9 +483,6 @@ let BrowserHostService = class BrowserHostService extends Disposable {
459
483
  }
460
484
  }
461
485
  }
462
- async getElementData() {
463
- return undefined;
464
- }
465
486
  async getBrowserId() {
466
487
  return undefined;
467
488
  }