@codingame/monaco-editor-wrapper 2.3.0 → 3.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/README.md +1 -3
- package/dist/_monaco-editor_commonjs-external.js +28 -2
- package/dist/configuration/index.d.ts +3 -3
- package/dist/css.worker.js +1 -1
- package/dist/features/extensionConfigurations.js +1 -2
- package/dist/features/htmlContribution.js +7 -7
- package/dist/features/jsonContribution.js +6 -66
- package/dist/features/typescriptContribution.d.ts +0 -4
- package/dist/features/typescriptContribution.js +1 -29
- package/dist/hacks.d.ts +15 -2
- package/dist/html.worker.js +1 -1
- package/dist/index.d.ts +1 -4
- package/dist/index.js +1343 -4899
- package/dist/index2.js +2191 -1309
- package/dist/json.worker.js +1 -1
- package/dist/keybindings/index.d.ts +1 -1
- package/dist/languages/extensions/extensionConfigurationLoader.d.ts +2 -2
- package/dist/languages/extensions/languageConfigurationLoader.d.ts +1 -10
- package/dist/languages/extensions/snippetLoader.d.ts +1 -2
- package/dist/languages/extensions/themeLoader.d.ts +1 -2
- package/dist/languages/index.d.ts +1 -0
- package/dist/languages/textMate/index.d.ts +0 -2
- package/dist/main.js +4342 -10
- package/dist/monaco.d.ts +2 -2
- package/dist/theme/index.d.ts +2 -2
- package/dist/ts.worker.js +1 -1
- package/dist/vim.js +45 -20
- package/dist/worker.js +1 -1
- package/package.json +27 -26
- package/stats.html +1455 -110
- package/dist/_rollupPluginBabelHelpers.js +0 -42
- package/dist/index3.js +0 -2208
- package/dist/keybindings/keybindingHelper.d.ts +0 -2
- package/dist/languages/monarch/index.d.ts +0 -7
- package/dist/languages/monarch/stub-generator.d.ts +0 -2
- package/dist/languages/textMate/CGTMGrammarFactory.d.ts +0 -5
- package/dist/languages/textMate/CGTMTokenizationSupport.d.ts +0 -8
- package/dist/stub-generator.js +0 -15
- package/dist/theme/registry.d.ts +0 -9
- package/dist/theme/semanticHighlight.d.ts +0 -1
- package/dist/theme/tools.d.ts +0 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { configurationRegistry } from 'vscode/service-override/configuration';
|
|
2
2
|
|
|
3
3
|
// Generated file, do not modify
|
|
4
4
|
|
|
@@ -126,7 +126,6 @@ const loader = {
|
|
|
126
126
|
'../svelte.svelte-vscode.js').then(module => module)).default
|
|
127
127
|
};
|
|
128
128
|
|
|
129
|
-
const configurationRegistry = monaco.extra.Registry.as(monaco.extra.ConfigurationExtensions.Configuration);
|
|
130
129
|
async function loadConfigurationForExtension(extensionId) {
|
|
131
130
|
const loader$1 = loader[extensionId];
|
|
132
131
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
|
|
2
2
|
import 'monaco-editor/esm/vs/language/html/monaco.contribution';
|
|
3
|
-
import {
|
|
3
|
+
import { ConfigurationScope } from 'vscode/service-override/configuration';
|
|
4
|
+
import { DisposableStore } from 'vscode/monaco';
|
|
5
|
+
import { StandaloneServices, ICodeEditorService } from 'vscode/services';
|
|
4
6
|
import { r as registerWorkerLoader } from '../worker.js';
|
|
5
|
-
import '
|
|
6
|
-
import 'vscode/service-override/configuration';
|
|
7
|
-
import '../_rollupPluginBabelHelpers.js';
|
|
7
|
+
import { r as registerConfigurations, g as getConfiguration, o as onConfigurationChanged } from '../index.js';
|
|
8
8
|
|
|
9
9
|
const workerLoader = async () => (await import(
|
|
10
10
|
/* webpackChunkName: "MonacoHtmlWorker" */
|
|
@@ -27,7 +27,7 @@ registerConfigurations([{
|
|
|
27
27
|
properties: {
|
|
28
28
|
'html.autoClosingTags': {
|
|
29
29
|
type: 'boolean',
|
|
30
|
-
scope:
|
|
30
|
+
scope: ConfigurationScope.RESOURCE,
|
|
31
31
|
default: true,
|
|
32
32
|
description: 'Enable/disable autoclosing of HTML tags.'
|
|
33
33
|
}
|
|
@@ -45,7 +45,7 @@ setTimeout(() => {
|
|
|
45
45
|
});
|
|
46
46
|
|
|
47
47
|
function autoCloseHtmlTags(editor) {
|
|
48
|
-
const disposableStore = new
|
|
48
|
+
const disposableStore = new DisposableStore();
|
|
49
49
|
let timeout;
|
|
50
50
|
disposableStore.add({
|
|
51
51
|
dispose: () => {
|
|
@@ -110,7 +110,7 @@ function autoCloseHtmlTags(editor) {
|
|
|
110
110
|
|
|
111
111
|
setTimeout(() => {
|
|
112
112
|
// In a timeout so the service can be overriden
|
|
113
|
-
const codeEditors =
|
|
113
|
+
const codeEditors = StandaloneServices.get(ICodeEditorService).listCodeEditors();
|
|
114
114
|
|
|
115
115
|
for (const editor of codeEditors) {
|
|
116
116
|
autoCloseHtmlTags(editor);
|
|
@@ -1,81 +1,21 @@
|
|
|
1
|
-
import { _ as _objectSpread2 } from '../_rollupPluginBabelHelpers.js';
|
|
2
1
|
import 'monaco-editor/esm/vs/language/json/monaco.contribution';
|
|
3
2
|
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
|
|
3
|
+
import { onDidChangeJsonSchema, getJsonSchemas } from 'vscode/monaco';
|
|
4
4
|
import { r as registerWorkerLoader } from '../worker.js';
|
|
5
5
|
|
|
6
|
-
const registry = monaco.extra.Registry.as(monaco.extra.JsonContributionExtensions.JSONContribution); // Hack because the commands are filled by a code not run in monaco-editor
|
|
7
|
-
|
|
8
|
-
{
|
|
9
|
-
const allCommands = monaco.extra.CommandsRegistry.getCommands();
|
|
10
|
-
const keybindingsCommandSchema = registry.getSchemaContributions().schemas['vscode://schemas/keybindings'].items.properties.command.anyOf[0];
|
|
11
|
-
keybindingsCommandSchema.enum = Array.from(allCommands.keys());
|
|
12
|
-
keybindingsCommandSchema.enumDescriptions = Array.from(allCommands.values()).map(command => {
|
|
13
|
-
var _command$description;
|
|
14
|
-
|
|
15
|
-
return (_command$description = command.description) === null || _command$description === void 0 ? void 0 : _command$description.description;
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
const vimKeybindingsSchema = {
|
|
19
|
-
type: 'object',
|
|
20
|
-
properties: {
|
|
21
|
-
before: {
|
|
22
|
-
type: 'array',
|
|
23
|
-
items: {
|
|
24
|
-
type: 'string'
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
after: {
|
|
28
|
-
type: 'array',
|
|
29
|
-
items: {
|
|
30
|
-
type: 'string'
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
|
|
36
6
|
function updateDiagnosticsOptions() {
|
|
37
7
|
monaco.languages.json.jsonDefaults.setDiagnosticsOptions({
|
|
38
8
|
comments: 'ignore',
|
|
39
9
|
validate: true,
|
|
40
|
-
schemas:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
uri: 'vscode://schemas/keybindings',
|
|
45
|
-
fileMatch: ['file:///keybindings.json'],
|
|
46
|
-
schema: registry.getSchemaContributions().schemas['vscode://schemas/keybindings']
|
|
47
|
-
}, {
|
|
48
|
-
uri: 'vscode://schemas/settings/user',
|
|
49
|
-
fileMatch: ['file:///settings.json'],
|
|
50
|
-
schema: {
|
|
51
|
-
properties: _objectSpread2(_objectSpread2({}, monaco.extra.allSettings.properties), {}, {
|
|
52
|
-
'vim.normalModeKeyBindings': {
|
|
53
|
-
type: 'array',
|
|
54
|
-
description: 'Remapped keys in Normal mode.',
|
|
55
|
-
items: vimKeybindingsSchema
|
|
56
|
-
},
|
|
57
|
-
'vim.insertModeKeyBindings': {
|
|
58
|
-
type: 'array',
|
|
59
|
-
description: 'Remapped keys in Insert mode.',
|
|
60
|
-
items: vimKeybindingsSchema
|
|
61
|
-
},
|
|
62
|
-
'vim.visualModeKeyBindings': {
|
|
63
|
-
type: 'array',
|
|
64
|
-
description: 'Remapped keys in Visual mode.',
|
|
65
|
-
items: vimKeybindingsSchema
|
|
66
|
-
}
|
|
67
|
-
}),
|
|
68
|
-
patternProperties: monaco.extra.allSettings.patternProperties,
|
|
69
|
-
additionalProperties: true,
|
|
70
|
-
allowTrailingCommas: true,
|
|
71
|
-
allowComments: true
|
|
72
|
-
}
|
|
73
|
-
}]
|
|
10
|
+
schemas: getJsonSchemas({
|
|
11
|
+
keybindings: ['file:///keybindings.json'],
|
|
12
|
+
'settings/user': ['file:///settings.json']
|
|
13
|
+
})
|
|
74
14
|
});
|
|
75
15
|
}
|
|
76
16
|
|
|
77
17
|
updateDiagnosticsOptions();
|
|
78
|
-
|
|
18
|
+
onDidChangeJsonSchema(updateDiagnosticsOptions);
|
|
79
19
|
|
|
80
20
|
const workerLoader = async () => (await import(
|
|
81
21
|
/* webpackChunkName: "MonacoJsonWorker" */
|
|
@@ -1,5 +1 @@
|
|
|
1
1
|
import 'monaco-editor/esm/vs/language/typescript/monaco.contribution';
|
|
2
|
-
import * as monaco from 'monaco-editor';
|
|
3
|
-
declare const typescriptReactDefaults: monaco.languages.typescript.LanguageServiceDefaultsImpl;
|
|
4
|
-
declare const javascriptReactDefaults: monaco.languages.typescript.LanguageServiceDefaultsImpl;
|
|
5
|
-
export { typescriptReactDefaults, javascriptReactDefaults };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { _ as _objectSpread2 } from '../_rollupPluginBabelHelpers.js';
|
|
2
1
|
import 'monaco-editor/esm/vs/language/typescript/monaco.contribution';
|
|
3
2
|
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
|
|
4
3
|
import { r as registerWorkerLoader } from '../worker.js';
|
|
@@ -29,36 +28,9 @@ monaco.languages.typescript.javascriptDefaults.addExtraLib(typescriptGlobal, 'no
|
|
|
29
28
|
monaco.languages.typescript.javascriptDefaults.addExtraLib(typescriptConsole, 'node/console.d.ts');
|
|
30
29
|
monaco.languages.typescript.javascriptDefaults.addExtraLib(typescriptProcess, 'node/process.d.ts');
|
|
31
30
|
|
|
32
|
-
const reactCompilerOptions = _objectSpread2(_objectSpread2({}, compilerOptions), {}, {
|
|
33
|
-
jsx: monaco.languages.typescript.JsxEmit.React,
|
|
34
|
-
esModuleInterop: true
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
const typescriptReactDefaults = new monaco.languages.typescript.LanguageServiceDefaultsImpl(reactCompilerOptions, {
|
|
38
|
-
noSemanticValidation: false,
|
|
39
|
-
noSyntaxValidation: false,
|
|
40
|
-
onlyVisible: false
|
|
41
|
-
}, {}, {});
|
|
42
|
-
const javascriptReactDefaults = new monaco.languages.typescript.LanguageServiceDefaultsImpl(reactCompilerOptions, {
|
|
43
|
-
noSemanticValidation: true,
|
|
44
|
-
noSyntaxValidation: false,
|
|
45
|
-
onlyVisible: false
|
|
46
|
-
}, {}, {});
|
|
47
|
-
|
|
48
31
|
const workerLoader = async () => (await import(
|
|
49
32
|
/* webpackChunkName: "MonacoTypescriptWorker" */
|
|
50
33
|
'../ts.worker.js').then(module => module)).default;
|
|
51
34
|
|
|
52
35
|
registerWorkerLoader('typescript', workerLoader);
|
|
53
|
-
registerWorkerLoader('javascript', workerLoader);
|
|
54
|
-
|
|
55
|
-
registerWorkerLoader('typescriptreact', workerLoader);
|
|
56
|
-
registerWorkerLoader('javascriptreact', workerLoader);
|
|
57
|
-
monaco.languages.onLanguage('typescriptreact', () => {
|
|
58
|
-
void monaco.languages.typescript.setupMode(typescriptReactDefaults, 'typescriptreact');
|
|
59
|
-
});
|
|
60
|
-
monaco.languages.onLanguage('javascriptreact', () => {
|
|
61
|
-
void monaco.languages.typescript.setupMode(javascriptReactDefaults, 'javascriptreact');
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
export { javascriptReactDefaults, typescriptReactDefaults };
|
|
36
|
+
registerWorkerLoader('javascript', workerLoader);
|
package/dist/hacks.d.ts
CHANGED
|
@@ -1,2 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
interface IRegExp {
|
|
2
|
+
pattern: string;
|
|
3
|
+
flags?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface ILanguageConfiguration {
|
|
6
|
+
folding?: {
|
|
7
|
+
offSide?: boolean;
|
|
8
|
+
markers?: {
|
|
9
|
+
start?: string | IRegExp;
|
|
10
|
+
end?: string | IRegExp;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export declare function addCustomFoldingMarkers<T extends ILanguageConfiguration>(configuration: T): T;
|
|
15
|
+
export {};
|