@codingame/monaco-editor-wrapper 3.8.0 → 3.8.2

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.
@@ -0,0 +1,51 @@
1
+ function ownKeys(object, enumerableOnly) {
2
+ var keys = Object.keys(object);
3
+ if (Object.getOwnPropertySymbols) {
4
+ var symbols = Object.getOwnPropertySymbols(object);
5
+ enumerableOnly && (symbols = symbols.filter(function (sym) {
6
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
7
+ })), keys.push.apply(keys, symbols);
8
+ }
9
+ return keys;
10
+ }
11
+ function _objectSpread2(target) {
12
+ for (var i = 1; i < arguments.length; i++) {
13
+ var source = null != arguments[i] ? arguments[i] : {};
14
+ i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
15
+ _defineProperty(target, key, source[key]);
16
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
17
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
18
+ });
19
+ }
20
+ return target;
21
+ }
22
+ function _defineProperty(obj, key, value) {
23
+ key = _toPropertyKey(key);
24
+ if (key in obj) {
25
+ Object.defineProperty(obj, key, {
26
+ value: value,
27
+ enumerable: true,
28
+ configurable: true,
29
+ writable: true
30
+ });
31
+ } else {
32
+ obj[key] = value;
33
+ }
34
+ return obj;
35
+ }
36
+ function _toPrimitive(input, hint) {
37
+ if (typeof input !== "object" || input === null) return input;
38
+ var prim = input[Symbol.toPrimitive];
39
+ if (prim !== undefined) {
40
+ var res = prim.call(input, hint || "default");
41
+ if (typeof res !== "object") return res;
42
+ throw new TypeError("@@toPrimitive must return a primitive value.");
43
+ }
44
+ return (hint === "string" ? String : Number)(input);
45
+ }
46
+ function _toPropertyKey(arg) {
47
+ var key = _toPrimitive(arg, "string");
48
+ return typeof key === "symbol" ? key : String(key);
49
+ }
50
+
51
+ export { _objectSpread2 as _, _defineProperty as a };
@@ -5,6 +5,7 @@ import { DisposableStore } from 'vscode/monaco';
5
5
  import { StandaloneServices, ICodeEditorService } from 'vscode/services';
6
6
  import { r as registerWorkerLoader } from '../worker.js';
7
7
  import { r as registerConfigurations, g as getConfiguration, o as onConfigurationChanged } from '../index2.js';
8
+ import '../_rollupPluginBabelHelpers.js';
8
9
 
9
10
  const workerLoader = async () => (await import( /* webpackChunkName: "MonacoHtmlWorker" */'../html.worker.js').then(module => module)).default;
10
11
  registerWorkerLoader('html', workerLoader);
@@ -1,9 +1,14 @@
1
+ import { _ as _objectSpread2 } from '../_rollupPluginBabelHelpers.js';
1
2
  import 'monaco-editor/esm/vs/language/json/monaco.contribution';
2
3
  import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
3
4
  import { onDidChangeJsonSchema, getJsonSchemas } from 'vscode/monaco';
4
5
  import { Disposable } from 'vscode';
5
6
  import { r as registerWorkerLoader } from '../worker.js';
6
7
 
8
+ monaco.languages.json.jsonDefaults.setModeConfiguration(_objectSpread2(_objectSpread2({}, monaco.languages.json.jsonDefaults.modeConfiguration), {}, {
9
+ tokens: false // Disable monarch tokenizer as we use TextMate here
10
+ }));
11
+
7
12
  const customSchemas = [];
8
13
  function updateDiagnosticsOptions() {
9
14
  monaco.languages.json.jsonDefaults.setDiagnosticsOptions({
package/dist/index2.js CHANGED
@@ -1,55 +1,6 @@
1
1
  import { StandaloneServices, IConfigurationService } from 'vscode/services';
2
2
  import { configurationRegistry, ConfigurationScope } from 'vscode/service-override/configuration';
3
-
4
- function ownKeys(object, enumerableOnly) {
5
- var keys = Object.keys(object);
6
- if (Object.getOwnPropertySymbols) {
7
- var symbols = Object.getOwnPropertySymbols(object);
8
- enumerableOnly && (symbols = symbols.filter(function (sym) {
9
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
10
- })), keys.push.apply(keys, symbols);
11
- }
12
- return keys;
13
- }
14
- function _objectSpread2(target) {
15
- for (var i = 1; i < arguments.length; i++) {
16
- var source = null != arguments[i] ? arguments[i] : {};
17
- i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
18
- _defineProperty(target, key, source[key]);
19
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
20
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
21
- });
22
- }
23
- return target;
24
- }
25
- function _defineProperty(obj, key, value) {
26
- key = _toPropertyKey(key);
27
- if (key in obj) {
28
- Object.defineProperty(obj, key, {
29
- value: value,
30
- enumerable: true,
31
- configurable: true,
32
- writable: true
33
- });
34
- } else {
35
- obj[key] = value;
36
- }
37
- return obj;
38
- }
39
- function _toPrimitive(input, hint) {
40
- if (typeof input !== "object" || input === null) return input;
41
- var prim = input[Symbol.toPrimitive];
42
- if (prim !== undefined) {
43
- var res = prim.call(input, hint || "default");
44
- if (typeof res !== "object") return res;
45
- throw new TypeError("@@toPrimitive must return a primitive value.");
46
- }
47
- return (hint === "string" ? String : Number)(input);
48
- }
49
- function _toPropertyKey(arg) {
50
- var key = _toPrimitive(arg, "string");
51
- return typeof key === "symbol" ? key : String(key);
52
- }
3
+ import { _ as _objectSpread2 } from './_rollupPluginBabelHelpers.js';
53
4
 
54
5
  var configurationDefaults = {
55
6
  "[clojure]": {
@@ -1444,4 +1395,4 @@ function registerDefaultConfigurations(defaultConfigurations) {
1444
1395
  })));
1445
1396
  }
1446
1397
 
1447
- export { _objectSpread2 as _, _defineProperty as a, registerDefaultConfigurations as b, extensions as e, getConfiguration as g, onConfigurationChanged as o, registerConfigurations as r };
1398
+ export { registerDefaultConfigurations as a, extensions as e, getConfiguration as g, onConfigurationChanged as o, registerConfigurations as r };
package/dist/main.js CHANGED
@@ -1,12 +1,13 @@
1
1
  import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
2
2
  export { monaco };
3
- import { e as extensions, _ as _objectSpread2, a as _defineProperty, g as getConfiguration } from './index2.js';
4
- export { o as onConfigurationChanged, r as registerConfigurations, b as registerDefaultConfigurations } from './index2.js';
3
+ import { _ as _objectSpread2, a as _defineProperty } from './_rollupPluginBabelHelpers.js';
5
4
  import getLanguagesServiceOverride, { setLanguages } from 'vscode/service-override/languages';
6
5
  import getLanguageConfigurationServiceOverride, { setLanguageConfiguration } from 'vscode/service-override/languageConfiguration';
7
6
  import { StandaloneServices, ILanguageService, ITextModelService } from 'vscode/services';
8
7
  import getTextmateServiceOverride, { setGrammars } from 'vscode/service-override/textmate';
9
8
  import geTokenClassificationServiceOverride, { setTokenTypes, setTokenModifiers, setTokenStyleDefaults } from 'vscode/service-override/tokenClassification';
9
+ import { e as extensions, g as getConfiguration } from './index2.js';
10
+ export { o as onConfigurationChanged, r as registerConfigurations, a as registerDefaultConfigurations } from './index2.js';
10
11
  import getSnippetConfigurationServiceOverride, { setSnippets } from 'vscode/service-override/snippets';
11
12
  import getThemeServiceOverride, { setDefaultThemes, setThemes } from 'vscode/service-override/theme';
12
13
  import { registerColor, FoldingController, setCollapseStateForMatchingLines, errorHandler, createConfiguredEditor } from 'vscode/monaco';
package/dist/vim.js CHANGED
@@ -4,6 +4,7 @@ import { configurationRegistry, ConfigurationScope } from 'vscode/service-overri
4
4
  import { o as onConfigurationChanged, g as getConfiguration } from './index2.js';
5
5
  import 'monaco-editor/esm/vs/editor/editor.api';
6
6
  import 'vscode/services';
7
+ import './_rollupPluginBabelHelpers.js';
7
8
 
8
9
  var lib = {};
9
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-editor-wrapper",
3
- "version": "3.8.0",
3
+ "version": "3.8.2",
4
4
  "private": false,
5
5
  "description": "Enhanced Monaco editor with TextMate grammars and more",
6
6
  "scripts": {
@@ -68,7 +68,8 @@
68
68
  "dependencies": {
69
69
  "monaco-editor": "^0.34.0",
70
70
  "vscode": "npm:@codingame/monaco-vscode-api@~1.69.18",
71
- "vscode-oniguruma": "^1.6.2"
71
+ "vscode-oniguruma": "^1.6.2",
72
+ "vscode-textmate": "^7.0.4"
72
73
  },
73
74
  "devDependencies": {
74
75
  "@babel/core": "7.20.12",