diff --git a/demo/package-lock.json b/demo/package-lock.json index 7f8efa67..25effa3c 100644 --- a/demo/package-lock.json +++ b/demo/package-lock.json @@ -7,7 +7,6 @@ "": { "name": "monaco-vscode-api-demo", "version": "0.0.0", - "hasInstallScript": true, "dependencies": { "@codingame/monaco-vscode-accessibility-service-override": "file:../dist/service-override-accessibility", "@codingame/monaco-vscode-ai-service-override": "file:../dist/service-override-ai", @@ -153,7 +152,7 @@ "ansi-colors": "^4.1.3", "dockerode": "^4.0.2", "express": "^4.18.2", - "monaco-editor": "^0.45.0", + "monaco-editor": "file:../dist/editor-api", "vscode": "file:../dist/main", "ws": "^8.16.0" }, @@ -884,6 +883,14 @@ "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" } }, + "../dist/editor-api": { + "name": "@codingame/monaco-vscode-editor-api", + "version": "0.0.0-semantic-release", + "license": "MIT", + "dependencies": { + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + } + }, "../dist/main": { "name": "@codingame/monaco-vscode-api", "version": "0.0.0-semantic-release", @@ -896,11 +903,8 @@ "@codingame/monaco-vscode-host-service-override": "0.0.0-semantic-release", "@codingame/monaco-vscode-layout-service-override": "0.0.0-semantic-release", "@codingame/monaco-vscode-quickaccess-service-override": "0.0.0-semantic-release", - "monaco-editor": "0.45.0", + "vscode-marked": "npm:marked@=3.0.2", "vscode-semver": "npm:semver@=5.5.0" - }, - "bin": { - "monaco-treemending": "monaco-treemending.js" } }, "../dist/rollup-vsix-plugin": { @@ -948,8 +952,8 @@ "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "monaco-editor": "0.45.0", - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2" } }, "../dist/service-override-ai": { @@ -957,7 +961,6 @@ "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "monaco-editor": "0.45.0", "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" } }, @@ -966,7 +969,6 @@ "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "monaco-editor": "0.45.0", "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" } }, @@ -975,7 +977,6 @@ "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "monaco-editor": "0.45.0", "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" } }, @@ -984,7 +985,6 @@ "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "monaco-editor": "0.45.0", "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" } }, @@ -993,8 +993,8 @@ "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "monaco-editor": "0.45.0", - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2" } }, "../dist/service-override-chat": { @@ -1002,8 +1002,8 @@ "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "monaco-editor": "0.45.0", - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2" } }, "../dist/service-override-configuration": { @@ -1018,8 +1018,8 @@ "@codingame/monaco-vscode-host-service-override": "0.0.0-semantic-release", "@codingame/monaco-vscode-layout-service-override": "0.0.0-semantic-release", "@codingame/monaco-vscode-quickaccess-service-override": "0.0.0-semantic-release", - "monaco-editor": "0.45.0", - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2" } }, "../dist/service-override-debug": { @@ -1028,8 +1028,8 @@ "license": "MIT", "dependencies": { "@codingame/monaco-vscode-layout-service-override": "0.0.0-semantic-release", - "monaco-editor": "0.45.0", - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2" } }, "../dist/service-override-dialogs": { @@ -1038,8 +1038,8 @@ "license": "MIT", "dependencies": { "@codingame/monaco-vscode-layout-service-override": "0.0.0-semantic-release", - "monaco-editor": "0.45.0", - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2" } }, "../dist/service-override-editor": { @@ -1047,8 +1047,8 @@ "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "monaco-editor": "0.45.0", - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2" } }, "../dist/service-override-environment": { @@ -1056,7 +1056,6 @@ "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "monaco-editor": "0.45.0", "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" } }, @@ -1065,8 +1064,8 @@ "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "monaco-editor": "0.45.0", "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2", "vscode-semver": "npm:semver@=5.5.0" } }, @@ -1076,8 +1075,8 @@ "license": "MIT", "dependencies": { "@codingame/monaco-vscode-files-service-override": "0.0.0-semantic-release", - "monaco-editor": "0.45.0", "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2", "vscode-semver": "npm:semver@=5.5.0" } }, @@ -1086,8 +1085,8 @@ "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "monaco-editor": "0.45.0", - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2" } }, "../dist/service-override-host": { @@ -1095,7 +1094,6 @@ "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "monaco-editor": "0.45.0", "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" } }, @@ -1105,8 +1103,8 @@ "license": "MIT", "dependencies": { "@codingame/monaco-vscode-files-service-override": "0.0.0-semantic-release", - "monaco-editor": "0.45.0", - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2" } }, "../dist/service-override-language-detection-worker": { @@ -1115,7 +1113,6 @@ "license": "MIT", "dependencies": { "@vscode/vscode-languagedetection": "1.0.21", - "monaco-editor": "0.45.0", "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" } }, @@ -1125,7 +1122,6 @@ "license": "MIT", "dependencies": { "@codingame/monaco-vscode-files-service-override": "0.0.0-semantic-release", - "monaco-editor": "0.45.0", "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" } }, @@ -1134,8 +1130,8 @@ "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "monaco-editor": "0.45.0", - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2" } }, "../dist/service-override-lifecycle": { @@ -1143,7 +1139,6 @@ "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "monaco-editor": "0.45.0", "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" } }, @@ -1153,8 +1148,8 @@ "license": "MIT", "dependencies": { "@codingame/monaco-vscode-environment-service-override": "0.0.0-semantic-release", - "monaco-editor": "0.45.0", - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2" } }, "../dist/service-override-markers": { @@ -1162,8 +1157,8 @@ "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "monaco-editor": "0.45.0", - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2" } }, "../dist/service-override-model": { @@ -1171,7 +1166,6 @@ "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "monaco-editor": "0.45.0", "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" } }, @@ -1180,8 +1174,8 @@ "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "monaco-editor": "0.45.0", - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2" } }, "../dist/service-override-notifications": { @@ -1190,8 +1184,8 @@ "license": "MIT", "dependencies": { "@codingame/monaco-vscode-layout-service-override": "0.0.0-semantic-release", - "monaco-editor": "0.45.0", - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2" } }, "../dist/service-override-outline": { @@ -1199,8 +1193,8 @@ "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "monaco-editor": "0.45.0", - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2" } }, "../dist/service-override-output": { @@ -1209,8 +1203,8 @@ "license": "MIT", "dependencies": { "@codingame/monaco-vscode-log-service-override": "0.0.0-semantic-release", - "monaco-editor": "0.45.0", - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2" } }, "../dist/service-override-preferences": { @@ -1218,8 +1212,8 @@ "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "monaco-editor": "0.45.0", - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2" } }, "../dist/service-override-quickaccess": { @@ -1227,8 +1221,8 @@ "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "monaco-editor": "0.45.0", - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2" } }, "../dist/service-override-remote-agent": { @@ -1237,8 +1231,8 @@ "license": "MIT", "dependencies": { "@codingame/monaco-vscode-environment-service-override": "0.0.0-semantic-release", - "monaco-editor": "0.45.0", - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2" } }, "../dist/service-override-scm": { @@ -1246,8 +1240,8 @@ "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "monaco-editor": "0.45.0", - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2" } }, "../dist/service-override-search": { @@ -1255,8 +1249,8 @@ "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "monaco-editor": "0.45.0", - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2" } }, "../dist/service-override-snippets": { @@ -1265,8 +1259,8 @@ "license": "MIT", "dependencies": { "@codingame/monaco-vscode-files-service-override": "0.0.0-semantic-release", - "monaco-editor": "0.45.0", - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2" } }, "../dist/service-override-storage": { @@ -1274,8 +1268,8 @@ "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "monaco-editor": "0.45.0", - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2" } }, "../dist/service-override-task": { @@ -1283,7 +1277,6 @@ "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "monaco-editor": "0.45.0", "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" } }, @@ -1299,8 +1292,8 @@ "@xterm/addon-unicode11": "0.7.0-beta.14", "@xterm/addon-webgl": "0.17.0-beta.14", "@xterm/xterm": "5.4.0-beta.14", - "monaco-editor": "0.45.0", - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2" } }, "../dist/service-override-testing": { @@ -1314,8 +1307,8 @@ "@xterm/addon-serialize": "0.12.0-beta.14", "@xterm/addon-unicode11": "0.7.0-beta.14", "@xterm/addon-webgl": "0.17.0-beta.14", - "monaco-editor": "0.45.0", - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2" } }, "../dist/service-override-textmate": { @@ -1324,8 +1317,8 @@ "license": "MIT", "dependencies": { "@codingame/monaco-vscode-files-service-override": "0.0.0-semantic-release", - "monaco-editor": "0.45.0", "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2", "vscode-oniguruma": "1.7.0", "vscode-textmate": "9.0.0" } @@ -1336,7 +1329,6 @@ "license": "MIT", "dependencies": { "@codingame/monaco-vscode-files-service-override": "0.0.0-semantic-release", - "monaco-editor": "0.45.0", "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" } }, @@ -1345,8 +1337,8 @@ "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "monaco-editor": "0.45.0", - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2" } }, "../dist/service-override-user-data-sync": { @@ -1354,8 +1346,8 @@ "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "monaco-editor": "0.45.0", - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2" } }, "../dist/service-override-view-banner": { @@ -1363,8 +1355,8 @@ "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "monaco-editor": "0.45.0", - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2" } }, "../dist/service-override-view-status-bar": { @@ -1372,7 +1364,6 @@ "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "monaco-editor": "0.45.0", "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" } }, @@ -1381,8 +1372,8 @@ "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "monaco-editor": "0.45.0", - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2" } }, "../dist/service-override-views": { @@ -1399,8 +1390,8 @@ "@codingame/monaco-vscode-keybindings-service-override": "0.0.0-semantic-release", "@codingame/monaco-vscode-layout-service-override": "0.0.0-semantic-release", "@codingame/monaco-vscode-quickaccess-service-override": "0.0.0-semantic-release", - "monaco-editor": "0.45.0", - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2" } }, "../dist/service-override-welcome": { @@ -1408,8 +1399,8 @@ "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "monaco-editor": "0.45.0", - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2" } }, "../dist/service-override-working-copy": { @@ -1418,7 +1409,6 @@ "license": "MIT", "dependencies": { "@codingame/monaco-vscode-files-service-override": "0.0.0-semantic-release", - "monaco-editor": "0.45.0", "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" } }, @@ -1427,8 +1417,8 @@ "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "monaco-editor": "0.45.0", - "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", + "vscode-marked": "npm:marked@=3.0.2" } }, "../dist/vscode-language-pack-cs": { @@ -3732,9 +3722,8 @@ "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" }, "node_modules/monaco-editor": { - "version": "0.45.0", - "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.45.0.tgz", - "integrity": "sha512-mjv1G1ZzfEE3k9HZN0dQ2olMdwIfaeAAjFiwNprLfYNRSz7ctv9XuCT7gPtBGrMUeV1/iZzYKj17Khu1hxoHOA==" + "resolved": "../dist/editor-api", + "link": true }, "node_modules/ms": { "version": "2.1.2", diff --git a/demo/package.json b/demo/package.json index f0019d83..3ff0736f 100644 --- a/demo/package.json +++ b/demo/package.json @@ -4,7 +4,6 @@ "version": "0.0.0", "type": "module", "scripts": { - "postinstall": "monaco-treemending", "clean": "tsc -b -c", "compile": "tsc", "start": "NODE_OPTIONS=--experimental-import-meta-resolve vite --config vite.config.ts", @@ -170,7 +169,7 @@ "ansi-colors": "^4.1.3", "dockerode": "^4.0.2", "express": "^4.18.2", - "monaco-editor": "^0.45.0", + "monaco-editor": "file:../dist/editor-api", "vscode": "file:../dist/main", "ws": "^8.16.0" }, diff --git a/demo/src/features/editor.ts b/demo/src/features/editor.ts index 08ba9b75..17075abd 100644 --- a/demo/src/features/editor.ts +++ b/demo/src/features/editor.ts @@ -1,6 +1,5 @@ import { IResolvedTextEditorModel, IReference, OpenEditor } from '@codingame/monaco-vscode-views-service-override' import * as monaco from 'monaco-editor' -import { createConfiguredEditor } from 'vscode/monaco' let currentEditor: ({ modelRef: IReference @@ -28,7 +27,7 @@ export const openNewCodeEditor: OpenEditor = async (modelRef) => { document.body.appendChild(container) try { - const editor = createConfiguredEditor( + const editor = monaco.editor.create( editorElem, { model: modelRef.object.textEditorModel, diff --git a/demo/src/main.ts b/demo/src/main.ts index 11e8d8dc..8973673b 100644 --- a/demo/src/main.ts +++ b/demo/src/main.ts @@ -1,6 +1,5 @@ import './style.css' import * as monaco from 'monaco-editor' -import { createConfiguredEditor, createModelReference } from 'vscode/monaco' import { registerFileSystemOverlay, HTMLFileSystemProvider } from '@codingame/monaco-vscode-files-service-override' import * as vscode from 'vscode' import { ILogService, StandaloneServices, IPreferencesService, IEditorService, IDialogService, getService, createInstance } from 'vscode/services' @@ -68,7 +67,7 @@ if (remoteAuthority != null) { import('./features/remoteExtension') } -const modelRef = await createModelReference(monaco.Uri.file('/tmp/test.js')) +const modelRef = await monaco.editor.createModelReference(monaco.Uri.file('/tmp/test.js')) const [mainDocument] = await Promise.all([ vscode.workspace.openTextDocument(modelRef.object.textEditorModel!.uri), @@ -90,13 +89,13 @@ diagnostics.set(modelRef.object.textEditorModel!.uri, [{ source: 'Demo', code: 42 }]) -const settingsModelReference = await createModelReference(defaultUserConfigurationFile) +const settingsModelReference = await monaco.editor.createModelReference(defaultUserConfigurationFile) function updateSettingsDirty () { document.getElementById('settings-dirty')!.style.display = settingsModelReference.object.isDirty() ? 'inline' : 'none' } updateSettingsDirty() settingsModelReference.object.onDidChangeDirty(updateSettingsDirty) -const settingEditor = createConfiguredEditor(document.getElementById('settings-editor')!, { +const settingEditor = monaco.editor.create(document.getElementById('settings-editor')!, { model: settingsModelReference.object.textEditorModel, automaticLayout: true }) @@ -113,14 +112,14 @@ settingEditor.addAction({ contextMenuGroupId: 'custom' }) -const keybindingsModelReference = await createModelReference(defaultUserKeybindindsFile) +const keybindingsModelReference = await monaco.editor.createModelReference(defaultUserKeybindindsFile) function updateKeydinbingsDirty () { document.getElementById('keybindings-dirty')!.style.display = keybindingsModelReference.object.isDirty() ? 'inline' : 'none' } updateKeydinbingsDirty() keybindingsModelReference.object.onDidChangeDirty(updateKeydinbingsDirty) -createConfiguredEditor(document.getElementById('keybindings-editor')!, { +monaco.editor.create(document.getElementById('keybindings-editor')!, { model: keybindingsModelReference.object.textEditorModel, automaticLayout: true }) diff --git a/demo/vite.config.ts b/demo/vite.config.ts index e5266a57..4c618012 100644 --- a/demo/vite.config.ts +++ b/demo/vite.config.ts @@ -59,7 +59,7 @@ export default defineConfig({ // These 2 lines prevent vite from reloading the whole page when starting a worker (so 2 times in a row after cleaning the vite cache - for the editor then the textmate workers) // it's mainly empirical and probably not the best way, fix me if you find a better way - 'monaco-editor/esm/vs/nls.js', 'monaco-editor/esm/vs/editor/editor.worker.js', 'vscode-textmate', 'vscode-oniguruma', '@vscode/vscode-languagedetection', 'vscode-semver', + 'vscode-textmate', 'vscode-oniguruma', '@vscode/vscode-languagedetection', 'vscode-semver', 'vscode-marked', ...(await glob('monaco-editor/esm/vs/**/common/**/*.js', { cwd: path.resolve(__dirname, '../node_modules') })) ], exclude: [], @@ -105,6 +105,6 @@ export default defineConfig({ rootDirectory: JSON.stringify(__dirname) }, resolve: { - dedupe: ['monaco-editor', 'vscode', ...localDependencies] + dedupe: ['vscode', ...localDependencies] } }) diff --git a/demo/vite.github-page.config.ts b/demo/vite.github-page.config.ts index c045cac3..8f193d23 100644 --- a/demo/vite.github-page.config.ts +++ b/demo/vite.github-page.config.ts @@ -12,6 +12,6 @@ export default defineConfig({ }, base: 'https://codingame.github.io/monaco-vscode-api', resolve: { - dedupe: ['monaco-editor', 'vscode', ...localDependencies] + dedupe: ['vscode', ...localDependencies] } })