@codingame/monaco-vscode-api 22.1.3 → 22.1.5

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,2 +1,4 @@
1
- export declare function registerCss(module: unknown): void;
1
+ export declare function registerCss(module: {
2
+ default?: string | CSSStyleSheet;
3
+ } | undefined): void;
2
4
  export declare function injectCss(target: HTMLElement): void;
package/css.js CHANGED
@@ -3,7 +3,7 @@ import { mainWindow } from './vscode/src/vs/base/browser/window.js';
3
3
 
4
4
  const sheets = [];
5
5
  function registerCss(module) {
6
- const exportedValue = module.default;
6
+ const exportedValue = module?.default;
7
7
  let sheet = undefined;
8
8
  if (typeof exportedValue === 'string') {
9
9
  sheet = new mainWindow.CSSStyleSheet();
@@ -152,6 +152,7 @@ import { IMcpService, IMcpWorkbenchService, IMcpSamplingService, IMcpElicitation
152
152
  import { IMultiDiffSourceResolverService } from './vscode/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffSourceResolverService.service.js';
153
153
  import { INotebookOriginalCellModelFactory } from './vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.service.js';
154
154
  import { INotebookOriginalModelReferenceFactory } from './vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.service.js';
155
+ import { INotebookCellOutlineDataSourceFactory } from './vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineDataSourceFactory.service.js';
155
156
  import { INotebookEditorService } from './vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service.js';
156
157
  import { INotebookCellStatusBarService } from './vscode/src/vs/workbench/contrib/notebook/common/notebookCellStatusBarService.service.js';
157
158
  import { INotebookEditorModelResolverService } from './vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverService.service.js';
@@ -6965,6 +6966,15 @@ __decorate([
6965
6966
  Unsupported
6966
6967
  ], NotebookOriginalModelReferenceFactory.prototype, "getOrCreate", void 0);
6967
6968
  registerSingleton(INotebookOriginalModelReferenceFactory, NotebookOriginalModelReferenceFactory, InstantiationType.Delayed);
6969
+ class NotebookCellOutlineDataSourceFactory {
6970
+ constructor() {
6971
+ this.getOrCreate = unsupported;
6972
+ }
6973
+ }
6974
+ __decorate([
6975
+ Unsupported
6976
+ ], NotebookCellOutlineDataSourceFactory.prototype, "getOrCreate", void 0);
6977
+ registerSingleton(INotebookCellOutlineDataSourceFactory, NotebookCellOutlineDataSourceFactory, InstantiationType.Delayed);
6968
6978
  class QuickDiffModelService {
6969
6979
  constructor() {
6970
6980
  this.createQuickDiffModelReference = () => undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-api",
3
- "version": "22.1.3",
3
+ "version": "22.1.5",
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": "22.1.3",
19
- "@codingame/monaco-vscode-environment-service-override": "22.1.3",
20
- "@codingame/monaco-vscode-extensions-service-override": "22.1.3",
21
- "@codingame/monaco-vscode-files-service-override": "22.1.3",
22
- "@codingame/monaco-vscode-host-service-override": "22.1.3",
23
- "@codingame/monaco-vscode-layout-service-override": "22.1.3",
24
- "@codingame/monaco-vscode-quickaccess-service-override": "22.1.3",
18
+ "@codingame/monaco-vscode-base-service-override": "22.1.5",
19
+ "@codingame/monaco-vscode-environment-service-override": "22.1.5",
20
+ "@codingame/monaco-vscode-extensions-service-override": "22.1.5",
21
+ "@codingame/monaco-vscode-files-service-override": "22.1.5",
22
+ "@codingame/monaco-vscode-host-service-override": "22.1.5",
23
+ "@codingame/monaco-vscode-layout-service-override": "22.1.5",
24
+ "@codingame/monaco-vscode-quickaccess-service-override": "22.1.5",
25
25
  "@vscode/iconv-lite-umd": "0.7.0",
26
26
  "dompurify": "3.2.7",
27
27
  "jschardet": "3.1.4",
package/services.js CHANGED
@@ -403,10 +403,10 @@ export { IInlineCompletionsUnificationService } from './vscode/src/vs/workbench/
403
403
  export { IMcpGalleryManifestService } from './vscode/src/vs/platform/mcp/common/mcpGalleryManifest.service.js';
404
404
  export { IDataChannelService } from './vscode/src/vs/platform/dataChannel/common/dataChannel.service.js';
405
405
 
406
- if (window.monacoVscodeApiBuildId != null && window.monacoVscodeApiBuildId !== "1.105.0-ead3bf38-2ced-47ac-aa64-b5d108d09558") {
407
- throw new Error(`Another version of monaco-vscode-api has already been loaded. Trying to load ${"1.105.0-ead3bf38-2ced-47ac-aa64-b5d108d09558"}, ${window.monacoVscodeApiBuildId} is already loaded`);
406
+ if (window.monacoVscodeApiBuildId != null && window.monacoVscodeApiBuildId !== "1.105.0-55984e81-73fe-4d25-9232-d46d72a27104") {
407
+ throw new Error(`Another version of monaco-vscode-api has already been loaded. Trying to load ${"1.105.0-55984e81-73fe-4d25-9232-d46d72a27104"}, ${window.monacoVscodeApiBuildId} is already loaded`);
408
408
  }
409
- window.monacoVscodeApiBuildId = "1.105.0-ead3bf38-2ced-47ac-aa64-b5d108d09558";
409
+ window.monacoVscodeApiBuildId = "1.105.0-55984e81-73fe-4d25-9232-d46d72a27104";
410
410
  function registerCommands(options) {
411
411
  function asMenuId(menu) {
412
412
  switch (menu) {
@@ -2,7 +2,9 @@
2
2
  import { Schemas } from '../common/network.js';
3
3
  import { reset } from './dom.js';
4
4
  import dompurify from 'dompurify';
5
+ import { mainWindow } from './window.js';
5
6
 
7
+ const mainWindowDompurify = dompurify(mainWindow);
6
8
  const basicMarkupHtmlTags = ( Object.freeze([
7
9
  'a',
8
10
  'abbr',
@@ -114,7 +116,7 @@ function validateLink(value, allowedProtocols) {
114
116
  }
115
117
  }
116
118
  function hookDomPurifyHrefAndSrcSanitizer(allowedLinkProtocols, allowedMediaProtocols) {
117
- dompurify.addHook('afterSanitizeAttributes', (node) => {
119
+ mainWindowDompurify.addHook('afterSanitizeAttributes', (node) => {
118
120
  for (const attr of ['href', 'src']) {
119
121
  if (node.hasAttribute(attr)) {
120
122
  const attrValue = node.getAttribute(attr);
@@ -188,10 +190,10 @@ function doSanitizeHtml(untrusted, config, outputType) {
188
190
  allowRelativePaths: config?.allowRelativeMediaPaths ?? false
189
191
  });
190
192
  if (config?.replaceWithPlaintext) {
191
- dompurify.addHook('uponSanitizeElement', replaceWithPlainTextHook);
193
+ mainWindowDompurify.addHook('uponSanitizeElement', replaceWithPlainTextHook);
192
194
  }
193
195
  if (allowedAttrPredicates.size) {
194
- dompurify.addHook('uponSanitizeAttribute', (node, e) => {
196
+ mainWindowDompurify.addHook('uponSanitizeAttribute', (node, e) => {
195
197
  const predicate = allowedAttrPredicates.get(e.attrName);
196
198
  if (predicate) {
197
199
  const result = predicate.shouldKeep(node, e);
@@ -209,20 +211,20 @@ function doSanitizeHtml(untrusted, config, outputType) {
209
211
  });
210
212
  }
211
213
  if (outputType === 'dom') {
212
- return dompurify.sanitize(untrusted, {
214
+ return mainWindowDompurify.sanitize(untrusted, {
213
215
  ...resolvedConfig,
214
216
  RETURN_DOM_FRAGMENT: true
215
217
  });
216
218
  }
217
219
  else {
218
- return dompurify.sanitize(untrusted, {
220
+ return mainWindowDompurify.sanitize(untrusted, {
219
221
  ...resolvedConfig,
220
222
  RETURN_TRUSTED_TYPE: true
221
223
  });
222
224
  }
223
225
  }
224
226
  finally {
225
- dompurify.removeAllHooks();
227
+ mainWindowDompurify.removeAllHooks();
226
228
  }
227
229
  }
228
230
  const selfClosingTags = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'];
@@ -6,7 +6,7 @@ var product = {
6
6
  quality: 'stable',
7
7
  version: '1.105.0',
8
8
  commit: '03c265b1adee71ac88f833e065f7bb956b60550a',
9
- date: '2025-10-24T08:45:08.589Z',
9
+ date: '2025-11-10T11:40:42.049Z',
10
10
  ...(globalThis._VSCODE_PRODUCT_JSON ?? {})
11
11
  };
12
12
 
@@ -0,0 +1,37 @@
1
+ import { ThemeIcon } from "../../../../../base/common/themables.js";
2
+ import { MarkerSeverity } from "../../../../../platform/markers/common/markers.js";
3
+ import { IMarkerService } from "../../../../../platform/markers/common/markers.service.js";
4
+ import { ICellViewModel } from "@codingame/monaco-vscode-670aae94-7f88-54d7-90ea-6fcbef423557-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser";
5
+ import { IRange } from "../../../../../editor/common/core/range.js";
6
+ import { SymbolKind } from "../../../../../editor/common/languages.js";
7
+ export interface IOutlineMarkerInfo {
8
+ readonly count: number;
9
+ readonly topSev: MarkerSeverity;
10
+ }
11
+ export declare class OutlineEntry {
12
+ readonly index: number;
13
+ readonly level: number;
14
+ readonly cell: ICellViewModel;
15
+ readonly label: string;
16
+ readonly isExecuting: boolean;
17
+ readonly isPaused: boolean;
18
+ readonly range?: IRange | undefined;
19
+ readonly symbolKind?: SymbolKind | undefined;
20
+ private _children;
21
+ private _parent;
22
+ private _markerInfo;
23
+ get icon(): ThemeIcon;
24
+ constructor(index: number, level: number, cell: ICellViewModel, label: string, isExecuting: boolean, isPaused: boolean, range?: IRange | undefined, symbolKind?: SymbolKind | undefined);
25
+ addChild(entry: OutlineEntry): void;
26
+ get parent(): OutlineEntry | undefined;
27
+ get children(): Iterable<OutlineEntry>;
28
+ get markerInfo(): IOutlineMarkerInfo | undefined;
29
+ get position(): {
30
+ startLineNumber: number;
31
+ startColumn: number;
32
+ } | undefined;
33
+ updateMarkers(markerService: IMarkerService): void;
34
+ clearMarkers(): void;
35
+ find(cell: ICellViewModel, parents: OutlineEntry[]): OutlineEntry | undefined;
36
+ asFlatList(bucket: OutlineEntry[]): void;
37
+ }
@@ -0,0 +1,7 @@
1
+ import { IReference } from "../../../../../base/common/lifecycle.js";
2
+ import { INotebookEditor } from "@codingame/monaco-vscode-670aae94-7f88-54d7-90ea-6fcbef423557-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser";
3
+ import { NotebookCellOutlineDataSource } from "@codingame/monaco-vscode-notebook-service-override/vscode/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineDataSource";
4
+ export declare const INotebookCellOutlineDataSourceFactory: import("../../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier<INotebookCellOutlineDataSourceFactory>;
5
+ export interface INotebookCellOutlineDataSourceFactory {
6
+ getOrCreate(editor: INotebookEditor): IReference<NotebookCellOutlineDataSource>;
7
+ }
@@ -0,0 +1,6 @@
1
+
2
+ import { createDecorator } from '../../../../../platform/instantiation/common/instantiation.js';
3
+
4
+ const INotebookCellOutlineDataSourceFactory = ( createDecorator('INotebookCellOutlineDataSourceFactory'));
5
+
6
+ export { INotebookCellOutlineDataSourceFactory };