@codingame/monaco-vscode-api 38.0.0 → 38.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/css.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export declare function registerCss(module: {
2
2
  default?: string | CSSStyleSheet;
3
3
  } | undefined, order?: number): void;
4
- export declare function injectCss(target: HTMLElement): void;
4
+ export declare function injectCss(target: HTMLElement): Promise<void>;
package/css.js CHANGED
@@ -2,6 +2,10 @@
2
2
  import { mainWindow } from './vscode/src/vs/base/browser/window.js';
3
3
 
4
4
  const sheets = [];
5
+ const sheetPromises = [];
6
+ function whenSheetsLoaded() {
7
+ return Promise.allSettled(sheetPromises);
8
+ }
5
9
  function registerCss(module, order = 0) {
6
10
  const exportedValue = module?.default;
7
11
  let sheet = undefined;
@@ -17,6 +21,7 @@ function registerCss(module, order = 0) {
17
21
  .join('\n'));
18
22
  }
19
23
  if (sheetPromise != null) {
24
+ sheetPromises.push(sheetPromise);
20
25
  sheetPromise.then((sheet) => {
21
26
  const fontFaces = Array.from(sheet.cssRules)
22
27
  .filter((rule) => rule instanceof mainWindow.CSSFontFaceRule)
@@ -44,11 +49,12 @@ function getInjectElement(target) {
44
49
  }
45
50
  return target.ownerDocument;
46
51
  }
47
- function injectCss(target) {
52
+ async function injectCss(target) {
48
53
  const root = getInjectElement(target);
49
54
  if (root instanceof mainWindow.ShadowRoot && sheets.length === 0) {
50
55
  console.error("@codingame/monaco-vscode-api was loaded inside a shadow dom, but it's unable to load the css into it because the bundler configuration wasn't applied properly: imported css files should export their content as default");
51
56
  }
57
+ await whenSheetsLoaded();
52
58
  sheets.sort((a, b) => a.order - b.order);
53
59
  root.adoptedStyleSheets = [...root.adoptedStyleSheets, ...sheets.map((s) => s.sheet)];
54
60
  }
package/lifecycle.js CHANGED
@@ -57,13 +57,9 @@ async function startup(instantiationService) {
57
57
  lifecycleService.phase = LifecyclePhase.Ready;
58
58
  }
59
59
  });
60
- await instantiationService.invokeFunction(async (accessor) => {
61
- await Promise.all(serviceInitializePostParticipants.map((participant) => participant(accessor)));
62
- });
63
60
  serviceInitializedBarrier.open();
64
61
  serviceInitializedEmitter.fire();
65
- void instantiationService.invokeFunction(async (accessor) => {
66
- const lifecycleService = accessor.get(ILifecycleService);
62
+ await instantiationService.invokeFunction(async (accessor) => {
67
63
  if (!workbenchHooksDisabled) {
68
64
  onRenderWorkbench((accessor) => {
69
65
  accessor.get(IInstantiationService).createInstance(WorkbenchContextKeysHandler);
@@ -71,6 +67,12 @@ async function startup(instantiationService) {
71
67
  }
72
68
  layoutEmitter.fire(accessor);
73
69
  renderWorkbenchEmitter.fire(accessor);
70
+ });
71
+ await instantiationService.invokeFunction(async (accessor) => {
72
+ await Promise.all(serviceInitializePostParticipants.map((participant) => participant(accessor)));
73
+ });
74
+ await instantiationService.invokeFunction(async (accessor) => {
75
+ const lifecycleService = accessor.get(ILifecycleService);
74
76
  await Promise.race([accessor.get(IWorkbenchLayoutService).whenRestored, timeout(2000)]);
75
77
  if (!workbenchHooksDisabled) {
76
78
  lifecycleService.phase = LifecyclePhase.Restored;
@@ -373,7 +373,6 @@ import { NullRemoteAgentHostService } from './vscode/src/vs/platform/agentHost/c
373
373
  import { IRemoteAgentHostService } from './vscode/src/vs/platform/agentHost/common/remoteAgentHostService.service.js';
374
374
  import { ISSHRemoteAgentHostService } from './vscode/src/vs/platform/agentHost/common/sshRemoteAgentHost.service.js';
375
375
  import { ITunnelAgentHostService } from './vscode/src/vs/platform/agentHost/common/tunnelAgentHost.service.js';
376
- import { IGitHubService } from './vscode/src/vs/platform/github/common/githubService.service.js';
377
376
  import { IAgentNetworkFilterService } from './vscode/src/vs/platform/networkFilter/common/networkFilterService.service.js';
378
377
  import { ISandboxHelperService } from './vscode/src/vs/platform/sandbox/common/sandboxHelperService.service.js';
379
378
  import { ITerminalSandboxService } from './vscode/src/vs/platform/sandbox/common/terminalSandboxService.service.js';
@@ -395,7 +394,7 @@ import { ISessionTaskRunnerRegistry } from './vscode/src/vs/sessions/contrib/cha
395
394
  import { ISessionsTasksService } from './vscode/src/vs/sessions/contrib/chat/browser/sessionsTasksService.service.js';
396
395
  import { ICodeReviewService } from './vscode/src/vs/sessions/contrib/codeReview/browser/codeReviewService.service.js';
397
396
  import { IDiffEditorOptionsService } from './vscode/src/vs/sessions/contrib/editor/common/diffEditorOptionsService.service.js';
398
- import { IGitHubService as IGitHubService$1 } from './vscode/src/vs/sessions/contrib/github/browser/githubService.service.js';
397
+ import { IGitHubService } from './vscode/src/vs/sessions/contrib/github/browser/githubService.service.js';
399
398
  import { IPullRequestIconCache } from './vscode/src/vs/sessions/contrib/github/browser/pullRequestIconCache.service.js';
400
399
  import { ICloudSandboxTelemetryService } from './vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxTelemetry.service.js';
401
400
  import { IRemoteAgentHostConnectionCustomizationService } from './vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHostConnectionCustomization.service.js';
@@ -9771,23 +9770,32 @@ class WorkspaceFolderLabelService {
9771
9770
  }
9772
9771
  }
9773
9772
  registerSingleton(IWorkspaceFolderLabelService, WorkspaceFolderLabelService, InstantiationType.Delayed);
9774
- class GitHubService {
9773
+ class WorkbenchGitHubService {
9775
9774
  constructor() {
9776
9775
  this.acquireClient = unsupported;
9777
9776
  this.acquireAnonymousClient = unsupported;
9778
9777
  this.acquireBootstrapClient = unsupported;
9778
+ this.onDidChangeDefaultClient = Event.None;
9779
+ this.acquireDefaultAccountClient = unsupported;
9780
+ this.acquireSessionClient = unsupported;
9779
9781
  }
9780
9782
  }
9781
9783
  __decorate([
9782
9784
  Unsupported
9783
- ], GitHubService.prototype, "acquireClient", void 0);
9785
+ ], WorkbenchGitHubService.prototype, "acquireClient", void 0);
9786
+ __decorate([
9787
+ Unsupported
9788
+ ], WorkbenchGitHubService.prototype, "acquireAnonymousClient", void 0);
9789
+ __decorate([
9790
+ Unsupported
9791
+ ], WorkbenchGitHubService.prototype, "acquireBootstrapClient", void 0);
9784
9792
  __decorate([
9785
9793
  Unsupported
9786
- ], GitHubService.prototype, "acquireAnonymousClient", void 0);
9794
+ ], WorkbenchGitHubService.prototype, "acquireDefaultAccountClient", void 0);
9787
9795
  __decorate([
9788
9796
  Unsupported
9789
- ], GitHubService.prototype, "acquireBootstrapClient", void 0);
9790
- registerSingleton(IGitHubService, GitHubService, InstantiationType.Delayed);
9797
+ ], WorkbenchGitHubService.prototype, "acquireSessionClient", void 0);
9798
+ registerSingleton(IWorkbenchGitHubService, WorkbenchGitHubService, InstantiationType.Delayed);
9791
9799
  class RemoteAgentHostLocationPreferenceService {
9792
9800
  constructor() {
9793
9801
  this.onDidChangePreference = Event.None;
@@ -10243,7 +10251,7 @@ __decorate([
10243
10251
  __decorate([
10244
10252
  Unsupported
10245
10253
  ], GitHubSessionService.prototype, "getPullRequestContext", void 0);
10246
- registerSingleton(IGitHubService$1, GitHubSessionService, InstantiationType.Delayed);
10254
+ registerSingleton(IGitHubService, GitHubSessionService, InstantiationType.Delayed);
10247
10255
  class PullRequestIconCache {
10248
10256
  constructor() {
10249
10257
  this.get = () => undefined;
@@ -11149,32 +11157,6 @@ class ManagedSettingsPresentationService {
11149
11157
  }
11150
11158
  }
11151
11159
  registerSingleton(IManagedSettingsPresentationService, ManagedSettingsPresentationService, InstantiationType.Delayed);
11152
- class WorkbenchGitHubService {
11153
- constructor() {
11154
- this.onDidChangeDefaultClient = Event.None;
11155
- this.acquireClient = unsupported;
11156
- this.acquireAnonymousClient = unsupported;
11157
- this.acquireBootstrapClient = unsupported;
11158
- this.acquireDefaultAccountClient = unsupported;
11159
- this.acquireSessionClient = unsupported;
11160
- }
11161
- }
11162
- __decorate([
11163
- Unsupported
11164
- ], WorkbenchGitHubService.prototype, "acquireClient", void 0);
11165
- __decorate([
11166
- Unsupported
11167
- ], WorkbenchGitHubService.prototype, "acquireAnonymousClient", void 0);
11168
- __decorate([
11169
- Unsupported
11170
- ], WorkbenchGitHubService.prototype, "acquireBootstrapClient", void 0);
11171
- __decorate([
11172
- Unsupported
11173
- ], WorkbenchGitHubService.prototype, "acquireDefaultAccountClient", void 0);
11174
- __decorate([
11175
- Unsupported
11176
- ], WorkbenchGitHubService.prototype, "acquireSessionClient", void 0);
11177
- registerSingleton(IWorkbenchGitHubService, WorkbenchGitHubService, InstantiationType.Delayed);
11178
11160
  class ManagedSettingsUpdateService {
11179
11161
  constructor() {
11180
11162
  this.updateInfo = constObservable(undefined);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-api",
3
- "version": "38.0.0",
3
+ "version": "38.0.1",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor",
6
6
  "keywords": [],
@@ -15,13 +15,13 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-base-service-override": "38.0.0",
19
- "@codingame/monaco-vscode-environment-service-override": "38.0.0",
20
- "@codingame/monaco-vscode-extensions-service-override": "38.0.0",
21
- "@codingame/monaco-vscode-files-service-override": "38.0.0",
22
- "@codingame/monaco-vscode-host-service-override": "38.0.0",
23
- "@codingame/monaco-vscode-layout-service-override": "38.0.0",
24
- "@codingame/monaco-vscode-quickaccess-service-override": "38.0.0",
18
+ "@codingame/monaco-vscode-base-service-override": "38.0.1",
19
+ "@codingame/monaco-vscode-environment-service-override": "38.0.1",
20
+ "@codingame/monaco-vscode-extensions-service-override": "38.0.1",
21
+ "@codingame/monaco-vscode-files-service-override": "38.0.1",
22
+ "@codingame/monaco-vscode-host-service-override": "38.0.1",
23
+ "@codingame/monaco-vscode-layout-service-override": "38.0.1",
24
+ "@codingame/monaco-vscode-quickaccess-service-override": "38.0.1",
25
25
  "@vscode/diff": "0.0.2-7",
26
26
  "@vscode/iconv-lite-umd": "0.7.1",
27
27
  "dompurify": "3.4.15",
package/services.js CHANGED
@@ -123,6 +123,7 @@ import { asArray } from './vscode/src/vs/base/common/arrays.js';
123
123
  import { MenuId, MenuRegistry } from './vscode/src/vs/platform/actions/common/actions.js';
124
124
  import { Menu } from './vscode/src/vs/workbench/browser/web.api.js';
125
125
  export { ColorScheme } from './vscode/src/vs/workbench/browser/web.api.js';
126
+ import { mark } from './vscode/src/vs/base/common/performance.js';
126
127
  export { SyncDescriptor } from './vscode/src/vs/platform/instantiation/common/descriptors.js';
127
128
  export { ICommandService } from './vscode/src/vs/platform/commands/common/commands.service.js';
128
129
  export { INotificationService } from './vscode/src/vs/platform/notification/common/notification.service.js';
@@ -570,10 +571,10 @@ export { IManagedSettingsPresentationService } from './vscode/src/vs/workbench/s
570
571
  export { IWorkbenchGitHubService } from './vscode/src/vs/workbench/services/github/common/githubService.service.js';
571
572
  export { IManagedSettingsUpdateService } from './vscode/src/vs/workbench/services/policies/common/managedSettingsUpdate.service.js';
572
573
 
573
- if (window.monacoVscodeApiBuildId != null && window.monacoVscodeApiBuildId !== "1.142.0-86b821ee-1568-4dc6-b149-3d6816c685c2") {
574
- throw new Error(`Another version of monaco-vscode-api has already been loaded. Trying to load ${"1.142.0-86b821ee-1568-4dc6-b149-3d6816c685c2"}, ${window.monacoVscodeApiBuildId} is already loaded`);
574
+ if (window.monacoVscodeApiBuildId != null && window.monacoVscodeApiBuildId !== "1.142.0-7af917ea-3b3d-471b-bd88-8dae56f1e597") {
575
+ throw new Error(`Another version of monaco-vscode-api has already been loaded. Trying to load ${"1.142.0-7af917ea-3b3d-471b-bd88-8dae56f1e597"}, ${window.monacoVscodeApiBuildId} is already loaded`);
575
576
  }
576
- window.monacoVscodeApiBuildId = "1.142.0-86b821ee-1568-4dc6-b149-3d6816c685c2";
577
+ window.monacoVscodeApiBuildId = "1.142.0-7af917ea-3b3d-471b-bd88-8dae56f1e597";
577
578
  function registerCommands(options) {
578
579
  function asMenuId(menu) {
579
580
  switch (menu) {
@@ -600,7 +601,8 @@ function registerCommands(options) {
600
601
  }
601
602
  async function initialize(overrides, container = document.body, configuration = {}, env) {
602
603
  checkServicesNotInitialized();
603
- injectCss(container);
604
+ mark('code/didLoadWorkbenchMain');
605
+ await injectCss(container);
604
606
  registerCommands(configuration);
605
607
  initialize$1(container, configuration, env);
606
608
  const productService = mixin({ _serviceBrand: undefined, ...product }, configuration.productConfiguration);
@@ -6,7 +6,7 @@ var product = {
6
6
  quality: 'stable',
7
7
  version: '1.142.0',
8
8
  commit: 'd956e8a6ac5d904486557eea07e1d6bd62a4d36f',
9
- date: '2026-10-19T14:31:45.224Z',
9
+ date: '2026-10-19T22:09:51.085Z',
10
10
  ...(globalThis._VSCODE_PRODUCT_JSON ?? {})
11
11
  };
12
12