@codingame/monaco-vscode-api 34.0.3 → 34.1.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-api",
3
- "version": "34.0.3",
3
+ "version": "34.1.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": "34.0.3",
19
- "@codingame/monaco-vscode-environment-service-override": "34.0.3",
20
- "@codingame/monaco-vscode-extensions-service-override": "34.0.3",
21
- "@codingame/monaco-vscode-files-service-override": "34.0.3",
22
- "@codingame/monaco-vscode-host-service-override": "34.0.3",
23
- "@codingame/monaco-vscode-layout-service-override": "34.0.3",
24
- "@codingame/monaco-vscode-quickaccess-service-override": "34.0.3",
18
+ "@codingame/monaco-vscode-base-service-override": "34.1.1",
19
+ "@codingame/monaco-vscode-environment-service-override": "34.1.1",
20
+ "@codingame/monaco-vscode-extensions-service-override": "34.1.1",
21
+ "@codingame/monaco-vscode-files-service-override": "34.1.1",
22
+ "@codingame/monaco-vscode-host-service-override": "34.1.1",
23
+ "@codingame/monaco-vscode-layout-service-override": "34.1.1",
24
+ "@codingame/monaco-vscode-quickaccess-service-override": "34.1.1",
25
25
  "@vscode/diff": "0.0.2-7",
26
26
  "@vscode/iconv-lite-umd": "0.7.1",
27
27
  "dompurify": "3.4.9",
package/services.js CHANGED
@@ -444,10 +444,10 @@ export { IChatGoalSummaryService } from './vscode/src/vs/workbench/contrib/chat/
444
444
  export { IAgentHostCustomizationService } from './vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCustomizationService.service.js';
445
445
  export { IAgentHostActiveClientService } from './vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.service.js';
446
446
 
447
- if (window.monacoVscodeApiBuildId != null && window.monacoVscodeApiBuildId !== "1.124.2-4b8a8f05-73ab-4a73-8ce9-0d1597dfc6c2") {
448
- throw new Error(`Another version of monaco-vscode-api has already been loaded. Trying to load ${"1.124.2-4b8a8f05-73ab-4a73-8ce9-0d1597dfc6c2"}, ${window.monacoVscodeApiBuildId} is already loaded`);
447
+ if (window.monacoVscodeApiBuildId != null && window.monacoVscodeApiBuildId !== "1.124.2-9e636252-193b-4804-b738-c5231a7994a5") {
448
+ throw new Error(`Another version of monaco-vscode-api has already been loaded. Trying to load ${"1.124.2-9e636252-193b-4804-b738-c5231a7994a5"}, ${window.monacoVscodeApiBuildId} is already loaded`);
449
449
  }
450
- window.monacoVscodeApiBuildId = "1.124.2-4b8a8f05-73ab-4a73-8ce9-0d1597dfc6c2";
450
+ window.monacoVscodeApiBuildId = "1.124.2-9e636252-193b-4804-b738-c5231a7994a5";
451
451
  function registerCommands(options) {
452
452
  function asMenuId(menu) {
453
453
  switch (menu) {
@@ -3,7 +3,7 @@ import { IObservable } from "../common/observable.js";
3
3
  export declare function isGlobalStylesheet(node: Node): boolean;
4
4
  export declare let shadowRootContainer: ShadowRoot | undefined;
5
5
  export declare function setContainerElement(container: HTMLElement): void;
6
- export declare function createStyleSheet(container?: HTMLElement, beforeAppend?: (style: HTMLStyleElement) => void, disposableStore?: DisposableStore): HTMLStyleElement;
6
+ export declare function createStyleSheet(container?: HTMLElement | ShadowRoot, beforeAppend?: (style: HTMLStyleElement) => void, disposableStore?: DisposableStore): HTMLStyleElement;
7
7
  export declare function cloneGlobalStylesheets(targetWindow: Window): IDisposable;
8
8
  export declare function createCSSRule(selector: string, cssText: string, style?: HTMLStyleElement): void;
9
9
  export declare function removeCSSRulesContainingSelector(ruleName: string, style?: HTMLStyleElement): void;
@@ -22,7 +22,7 @@ class WrappedStyleElement extends Disposable {
22
22
  }
23
23
  this._currentCssStyle = cssStyle;
24
24
  if (!this._styleSheet) {
25
- this._styleSheet = createStyleSheet(mainWindow.document.head, s => s.textContent = cssStyle, this._store);
25
+ this._styleSheet = createStyleSheet(undefined, s => s.textContent = cssStyle, this._store);
26
26
  } else {
27
27
  this._styleSheet.textContent = cssStyle;
28
28
  }
@@ -39,7 +39,11 @@ function setContainerElement(container) {
39
39
  shadowRootContainer = root;
40
40
  }
41
41
  }
42
- function createStyleSheet(container = mainWindow.document.head, beforeAppend, disposableStore) {
42
+ function createStyleSheet(
43
+ container = shadowRootContainer ?? mainWindow.document.head,
44
+ beforeAppend,
45
+ disposableStore
46
+ ) {
43
47
  const style = createElement("style");
44
48
  style.type = "text/css";
45
49
  style.media = "screen";
@@ -49,7 +53,7 @@ function createStyleSheet(container = mainWindow.document.head, beforeAppend, di
49
53
  if (disposableStore) {
50
54
  disposableStore.add(toDisposable(() => style.remove()));
51
55
  }
52
- if (container === mainWindow.document.head) {
56
+ if (container === (shadowRootContainer ?? mainWindow.document.head)) {
53
57
  const globalStylesheetClones = ( new Set());
54
58
  globalStylesheets.set(style, globalStylesheetClones);
55
59
  if (disposableStore) {
@@ -67,10 +71,6 @@ function createStyleSheet(container = mainWindow.document.head, beforeAppend, di
67
71
  );
68
72
  disposableStore?.add(cloneDisposable);
69
73
  }
70
- if (shadowRootContainer !== undefined) {
71
- const cloneDisposable = cloneGlobalStyleSheet(style, globalStylesheetClones, shadowRootContainer);
72
- disposableStore?.add(cloneDisposable);
73
- }
74
74
  }
75
75
  return style;
76
76
  }
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License. See License.txt in the project root for license information.
4
4
  *--------------------------------------------------------------------------------------------*/
5
5
 
6
- :root {
6
+ :root, :host {
7
7
  --vscode-sash-size: 4px;
8
8
  --vscode-sash-hover-size: 4px;
9
9
  }
@@ -2160,7 +2160,7 @@ registerThemingParticipant((theme, collector) => {
2160
2160
  `.monaco-editor .${ClassName.EditorErrorDecoration} { background: url("data:image/svg+xml,${getSquigglySVGData(errorForeground)}") repeat-x bottom left; }`
2161
2161
  );
2162
2162
  collector.addRule(
2163
- `:root { --monaco-editor-error-decoration: url("data:image/svg+xml,${getSquigglySVGData(errorForeground)}"); }`
2163
+ `:root, :host { --monaco-editor-error-decoration: url("data:image/svg+xml,${getSquigglySVGData(errorForeground)}"); }`
2164
2164
  );
2165
2165
  }
2166
2166
  const warningForeground = theme.getColor(editorWarningForeground);
@@ -2169,7 +2169,7 @@ registerThemingParticipant((theme, collector) => {
2169
2169
  `.monaco-editor .${ClassName.EditorWarningDecoration} { background: url("data:image/svg+xml,${getSquigglySVGData(warningForeground)}") repeat-x bottom left; }`
2170
2170
  );
2171
2171
  collector.addRule(
2172
- `:root { --monaco-editor-warning-decoration: url("data:image/svg+xml,${getSquigglySVGData(warningForeground)}"); }`
2172
+ `:root, :host { --monaco-editor-warning-decoration: url("data:image/svg+xml,${getSquigglySVGData(warningForeground)}"); }`
2173
2173
  );
2174
2174
  }
2175
2175
  const infoForeground = theme.getColor(editorInfoForeground);
@@ -2178,7 +2178,7 @@ registerThemingParticipant((theme, collector) => {
2178
2178
  `.monaco-editor .${ClassName.EditorInfoDecoration} { background: url("data:image/svg+xml,${getSquigglySVGData(infoForeground)}") repeat-x bottom left; }`
2179
2179
  );
2180
2180
  collector.addRule(
2181
- `:root { --monaco-editor-info-decoration: url("data:image/svg+xml,${getSquigglySVGData(infoForeground)}"); }`
2181
+ `:root, :host { --monaco-editor-info-decoration: url("data:image/svg+xml,${getSquigglySVGData(infoForeground)}"); }`
2182
2182
  );
2183
2183
  }
2184
2184
  const hintForeground = theme.getColor(editorHintForeground);
@@ -2187,7 +2187,7 @@ registerThemingParticipant((theme, collector) => {
2187
2187
  `.monaco-editor .${ClassName.EditorHintDecoration} { background: url("data:image/svg+xml,${getDotDotDotSVGData(hintForeground)}") no-repeat bottom left; }`
2188
2188
  );
2189
2189
  collector.addRule(
2190
- `:root { --monaco-editor-hint-decoration: url("data:image/svg+xml,${getDotDotDotSVGData(hintForeground)}"); }`
2190
+ `:root, :host { --monaco-editor-hint-decoration: url("data:image/svg+xml,${getDotDotDotSVGData(hintForeground)}"); }`
2191
2191
  );
2192
2192
  }
2193
2193
  const unnecessaryForeground = theme.getColor(editorUnnecessaryCodeOpacity);
@@ -2196,7 +2196,7 @@ registerThemingParticipant((theme, collector) => {
2196
2196
  `.monaco-editor.showUnused .${ClassName.EditorUnnecessaryInlineDecoration} { opacity: ${unnecessaryForeground.rgba.a}; }`
2197
2197
  );
2198
2198
  collector.addRule(
2199
- `:root { --monaco-editor-unnecessary-decoration-opacity: ${unnecessaryForeground.rgba.a}; }`
2199
+ `:root, :host { --monaco-editor-unnecessary-decoration-opacity: ${unnecessaryForeground.rgba.a}; }`
2200
2200
  );
2201
2201
  }
2202
2202
  });
@@ -53,7 +53,7 @@ class ZIndexRegistry {
53
53
  this.zIndexMap.forEach((zIndex, name) => {
54
54
  ruleBuilder += `${this.getVarName(name)}: ${zIndex};\n`;
55
55
  });
56
- createCSSRule(":root", ruleBuilder, this.styleSheet);
56
+ createCSSRule(":root, :host", ruleBuilder, this.styleSheet);
57
57
  }
58
58
  }
59
59
  const zIndexRegistry = ( new ZIndexRegistry());
@@ -6,7 +6,7 @@ var product = {
6
6
  quality: 'stable',
7
7
  version: '1.124.2',
8
8
  commit: '6928394f91b684055b873eecb8bc281365131f1c',
9
- date: '2026-06-18T13:34:00.227Z',
9
+ date: '2026-06-25T11:10:14.136Z',
10
10
  ...(globalThis._VSCODE_PRODUCT_JSON ?? {})
11
11
  };
12
12
 
@@ -61,7 +61,7 @@ function getIconsStyleSheet(themeService) {
61
61
  inline`@font-face { src: ${src.join(", ")}; font-family: ${stringValue(id)};${fontWeight}${fontStyle} font-display: block; }`
62
62
  );
63
63
  }
64
- rules.push(inline`:root { ${rootAttribs.join(" ")} }`);
64
+ rules.push(inline`:root, :host { ${rootAttribs.join(" ")} }`);
65
65
  return rules.join("\n");
66
66
  }
67
67
  };
@@ -403,16 +403,17 @@ let BrowserAuxiliaryWindowService = class BrowserAuxiliaryWindowService extends
403
403
  }
404
404
  mapOriginalToClone.set(originalNode, clonedNode);
405
405
  }
406
+ const container = shadowRootContainer ?? mainWindow.document.head;
406
407
  pendingLinksToSettle++;
407
408
  try {
408
- for (const originalNode of mainWindow.document.head.querySelectorAll("link[rel=\"stylesheet\"], style")) {
409
+ for (const originalNode of container.querySelectorAll("link[rel=\"stylesheet\"], style")) {
409
410
  cloneNode(originalNode);
410
411
  }
411
412
  } finally {
412
413
  onLinkSettled();
413
414
  }
414
415
  disposables.add(cloneGlobalStylesheets(auxiliaryWindow));
415
- disposables.add(sharedMutationObserver.observe(mainWindow.document.head, disposables, {
416
+ disposables.add(sharedMutationObserver.observe(container, disposables, {
416
417
  childList: true,
417
418
  subtree: true
418
419
  })(mutations => {