@difizen/libro-cofine-editor-core 0.0.0-snapshot-20241017072317
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/LICENSE +21 -0
- package/README.md +3 -0
- package/es/default-worker-contribution.d.ts +9 -0
- package/es/default-worker-contribution.d.ts.map +1 -0
- package/es/default-worker-contribution.js +32 -0
- package/es/e2-editor.d.ts +33 -0
- package/es/e2-editor.d.ts.map +1 -0
- package/es/e2-editor.js +164 -0
- package/es/editor-handler-registry.d.ts +12 -0
- package/es/editor-handler-registry.d.ts.map +1 -0
- package/es/editor-handler-registry.js +59 -0
- package/es/editor-provider.d.ts +15 -0
- package/es/editor-provider.d.ts.map +1 -0
- package/es/editor-provider.js +1 -0
- package/es/editor.worker.d.ts +2 -0
- package/es/editor.worker.d.ts.map +1 -0
- package/es/editor.worker.js +23 -0
- package/es/global.d.ts +7 -0
- package/es/index.d.ts +18 -0
- package/es/index.d.ts.map +1 -0
- package/es/index.js +23 -0
- package/es/initialize-provider.d.ts +18 -0
- package/es/initialize-provider.d.ts.map +1 -0
- package/es/initialize-provider.js +120 -0
- package/es/mana-export.d.ts +4 -0
- package/es/mana-export.d.ts.map +1 -0
- package/es/mana-export.js +23 -0
- package/es/monaco-compability.esm.d.ts +4 -0
- package/es/monaco-compability.esm.d.ts.map +1 -0
- package/es/monaco-compability.esm.js +10 -0
- package/es/monaco-environment.d.ts +29 -0
- package/es/monaco-environment.d.ts.map +1 -0
- package/es/monaco-environment.js +276 -0
- package/es/monaco-loader.d.ts +22 -0
- package/es/monaco-loader.d.ts.map +1 -0
- package/es/monaco-loader.js +139 -0
- package/es/monaco-module.d.ts +5 -0
- package/es/monaco-module.d.ts.map +1 -0
- package/es/monaco-module.js +71 -0
- package/es/snippets-suggest-registry.d.ts +31 -0
- package/es/snippets-suggest-registry.d.ts.map +1 -0
- package/es/snippets-suggest-registry.js +110 -0
- package/es/theme-registry.d.ts +58 -0
- package/es/theme-registry.d.ts.map +1 -0
- package/es/theme-registry.js +91 -0
- package/package.json +65 -0
- package/src/default-worker-contribution.ts +25 -0
- package/src/e2-editor.ts +204 -0
- package/src/editor-handler-registry.ts +47 -0
- package/src/editor-provider.ts +29 -0
- package/src/editor.worker.ts +25 -0
- package/src/global.d.ts +7 -0
- package/src/index.spec.ts +8 -0
- package/src/index.ts +46 -0
- package/src/initialize-provider.ts +54 -0
- package/src/mana-export.ts +8 -0
- package/src/monaco-compability.esm.ts +4 -0
- package/src/monaco-environment.ts +115 -0
- package/src/monaco-loader.ts +100 -0
- package/src/monaco-module.ts +101 -0
- package/src/snippets-suggest-registry.ts +101 -0
- package/src/theme-registry.ts +116 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023-present Difizen Team
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { LanguageWorkerRegistry } from '@difizen/libro-cofine-editor-contribution';
|
|
2
|
+
import { LanguageWorkerContribution } from '@difizen/libro-cofine-editor-contribution';
|
|
3
|
+
import { MonacoLoaderConfig } from './monaco-loader.js';
|
|
4
|
+
export declare class DefaultWorkerContribution implements LanguageWorkerContribution {
|
|
5
|
+
config: MonacoLoaderConfig;
|
|
6
|
+
constructor(config: MonacoLoaderConfig);
|
|
7
|
+
registerLanguageWorkers(registry: LanguageWorkerRegistry): void;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=default-worker-contribution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-worker-contribution.d.ts","sourceRoot":"","sources":["../../src/default-worker-contribution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACxF,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AAKvF,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,qBACa,yBAA0B,YAAW,0BAA0B;IAC1E,MAAM,EAAE,kBAAkB,CAAC;gBACa,MAAM,EAAE,kBAAkB;IAGlE,uBAAuB,CAAC,QAAQ,EAAE,sBAAsB;CAUzD"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
var _dec, _class;
|
|
3
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
4
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
5
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
+
import { LanguageWorkerContribution } from '@difizen/libro-cofine-editor-contribution';
|
|
9
|
+
import { inject, singleton } from '@difizen/mana-app';
|
|
10
|
+
import pkg from "../package.json";
|
|
11
|
+
import { MonacoLoaderConfig } from "./monaco-loader.js";
|
|
12
|
+
export var DefaultWorkerContribution = (_dec = singleton({
|
|
13
|
+
contrib: LanguageWorkerContribution
|
|
14
|
+
}), _dec(_class = /*#__PURE__*/function () {
|
|
15
|
+
function DefaultWorkerContribution(config) {
|
|
16
|
+
_classCallCheck(this, DefaultWorkerContribution);
|
|
17
|
+
this.config = config;
|
|
18
|
+
}
|
|
19
|
+
DefaultWorkerContribution = inject(MonacoLoaderConfig)(DefaultWorkerContribution, undefined, 0) || DefaultWorkerContribution;
|
|
20
|
+
_createClass(DefaultWorkerContribution, [{
|
|
21
|
+
key: "registerLanguageWorkers",
|
|
22
|
+
value: function registerLanguageWorkers(registry) {
|
|
23
|
+
registry.registerWorker({
|
|
24
|
+
language: 'editorWorkerService',
|
|
25
|
+
getWorkerUrl: function getWorkerUrl() {
|
|
26
|
+
return "data:text/javascript;charset=utf-8,".concat(encodeURIComponent("importScripts('https://unpkg.com/@difizen/libro-cofine-editor-core@".concat(pkg.version, "/dist/worker/editor.worker.min.js')")));
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}]);
|
|
31
|
+
return DefaultWorkerContribution;
|
|
32
|
+
}()) || _class);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { DisposableCollection } from '@difizen/mana-app';
|
|
2
|
+
import * as monaco from '@difizen/monaco-editor-core';
|
|
3
|
+
import { EditorHanlerRegistry } from './editor-handler-registry.js';
|
|
4
|
+
import type { LazyCallbackType, Options } from './editor-provider.js';
|
|
5
|
+
import { ThemeRegistry } from './theme-registry.js';
|
|
6
|
+
export declare const EditorNode: unique symbol;
|
|
7
|
+
export declare const MonacoOptions: unique symbol;
|
|
8
|
+
export declare const LazyCallback: unique symbol;
|
|
9
|
+
export declare const IsDiff: unique symbol;
|
|
10
|
+
/**
|
|
11
|
+
* E2 Editor
|
|
12
|
+
*/
|
|
13
|
+
export declare class E2Editor<T extends monaco.editor.IStandaloneCodeEditor | monaco.editor.IStandaloneDiffEditor> {
|
|
14
|
+
static createMonacoModel(value: string, language?: string, uri?: monaco.Uri): monaco.editor.ITextModel;
|
|
15
|
+
static createMonacoEditor(node: HTMLElement, options: Options): monaco.editor.IStandaloneCodeEditor;
|
|
16
|
+
static createMonacoDiffEditor(node: HTMLElement, options: Options): monaco.editor.IStandaloneDiffEditor;
|
|
17
|
+
codeEditor: T;
|
|
18
|
+
model: monaco.editor.ITextModel;
|
|
19
|
+
modified: monaco.editor.ITextModel;
|
|
20
|
+
original: monaco.editor.ITextModel;
|
|
21
|
+
language?: string;
|
|
22
|
+
protected toDispose: DisposableCollection;
|
|
23
|
+
node: HTMLElement;
|
|
24
|
+
options: Options;
|
|
25
|
+
editorHandlerRegistry: EditorHanlerRegistry;
|
|
26
|
+
themeRegistry: ThemeRegistry;
|
|
27
|
+
isDiff: boolean;
|
|
28
|
+
lazyCallback?: LazyCallbackType;
|
|
29
|
+
constructor(node: HTMLElement, options: Options, editorHandlerRegistry: EditorHanlerRegistry, themeRegistry: ThemeRegistry, isDiff: boolean, lazycallback?: LazyCallbackType);
|
|
30
|
+
protected handleEditorLanguageFeatureBefore(language: string | undefined): void;
|
|
31
|
+
protected handleEditorLanguageFeatureAfter(): void;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=e2-editor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"e2-editor.d.ts","sourceRoot":"","sources":["../../src/e2-editor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEzD,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AAEtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,eAAO,MAAM,UAAU,eAAuB,CAAC;AAC/C,eAAO,MAAM,aAAa,eAA0B,CAAC;AACrD,eAAO,MAAM,YAAY,eAAyB,CAAC;AACnD,eAAO,MAAM,MAAM,eAAmB,CAAC;AACvC;;GAEG;AAEH,qBACa,QAAQ,CACnB,CAAC,SAAS,MAAM,CAAC,MAAM,CAAC,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAAC,qBAAqB;IAEnF,MAAM,CAAC,iBAAiB,CACtB,KAAK,EAAE,MAAM,EACb,QAAQ,CAAC,EAAE,MAAM,EACjB,GAAG,CAAC,EAAE,MAAM,CAAC,GAAG,GACf,MAAM,CAAC,MAAM,CAAC,UAAU;IAI3B,MAAM,CAAC,kBAAkB,CACvB,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,OAAO,GACf,MAAM,CAAC,MAAM,CAAC,qBAAqB;IAItC,MAAM,CAAC,sBAAsB,CAC3B,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,OAAO,GACf,MAAM,CAAC,MAAM,CAAC,qBAAqB;IAGtC,UAAU,EAAG,CAAC,CAAC;IACf,KAAK,EAAG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC;IACjC,QAAQ,EAAG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC;IACpC,QAAQ,EAAG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,SAAS,EAAE,oBAAoB,CAA8B;IACvE,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,qBAAqB,EAAE,oBAAoB,CAAC;IAC5C,aAAa,EAAE,aAAa,CAAC;IAC7B,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,gBAAgB,CAAC;gBAEV,IAAI,EAAE,WAAW,EACd,OAAO,EAAE,OAAO,EACT,qBAAqB,EAAE,oBAAoB,EAClD,aAAa,EAAE,aAAa,EACnC,MAAM,EAAE,OAAO,EACT,YAAY,CAAC,EAAE,gBAAgB;IAoIvD,SAAS,CAAC,iCAAiC,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS;IAMxE,SAAS,CAAC,gCAAgC;CAK3C"}
|
package/es/e2-editor.js
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
var _dec, _class;
|
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
7
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
8
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
9
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
10
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
11
|
+
import { DisposableCollection } from '@difizen/mana-app';
|
|
12
|
+
import { inject, singleton } from '@difizen/mana-app';
|
|
13
|
+
import * as monaco from '@difizen/monaco-editor-core';
|
|
14
|
+
import { EditorHanlerRegistry } from "./editor-handler-registry.js";
|
|
15
|
+
import { MonacoEnvironment } from "./monaco-environment.js";
|
|
16
|
+
import { ThemeRegistry } from "./theme-registry.js";
|
|
17
|
+
export var EditorNode = Symbol('EditorNode');
|
|
18
|
+
export var MonacoOptions = Symbol('MonacoOptions');
|
|
19
|
+
export var LazyCallback = Symbol('LazyCallback');
|
|
20
|
+
export var IsDiff = Symbol('IsDiff');
|
|
21
|
+
/**
|
|
22
|
+
* E2 Editor
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
export var E2Editor = (_dec = singleton(), _dec(_class = /*#__PURE__*/function () {
|
|
26
|
+
function E2Editor(node, options, editorHandlerRegistry, themeRegistry, isDiff, lazycallback) {
|
|
27
|
+
var _this = this;
|
|
28
|
+
_classCallCheck(this, E2Editor);
|
|
29
|
+
this.toDispose = new DisposableCollection();
|
|
30
|
+
this.node = node;
|
|
31
|
+
this.options = options;
|
|
32
|
+
this.editorHandlerRegistry = editorHandlerRegistry;
|
|
33
|
+
this.themeRegistry = themeRegistry;
|
|
34
|
+
this.isDiff = isDiff;
|
|
35
|
+
this.lazyCallback = lazycallback;
|
|
36
|
+
if (MonacoEnvironment.lazy) {
|
|
37
|
+
// 资源懒加载场景
|
|
38
|
+
if (!isDiff) {
|
|
39
|
+
var model = options.model;
|
|
40
|
+
if (!model) {
|
|
41
|
+
if (options.uri) {
|
|
42
|
+
model = monaco.editor.getModel(options.uri);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
if (!model) {
|
|
46
|
+
model = monaco.editor.createModel(options.value || '', options.language, options.uri);
|
|
47
|
+
}
|
|
48
|
+
this.model = model;
|
|
49
|
+
var language = this.model.getLanguageId();
|
|
50
|
+
this.codeEditor = monaco.editor.create(node, _objectSpread(_objectSpread({}, options), {}, {
|
|
51
|
+
model: this.model
|
|
52
|
+
}));
|
|
53
|
+
this.handleEditorLanguageFeatureBefore(language);
|
|
54
|
+
MonacoEnvironment.initModule().then(function () {
|
|
55
|
+
// 设置方言和主题
|
|
56
|
+
var codeEditor = _this.codeEditor;
|
|
57
|
+
// 为了触发onCreate事件
|
|
58
|
+
codeEditor.setModel(monaco.editor.createModel(codeEditor.getValue() || '', language));
|
|
59
|
+
_this.language = options.language;
|
|
60
|
+
monaco.editor.setTheme(options.theme || '');
|
|
61
|
+
// 调用回调函数
|
|
62
|
+
_this.handleEditorLanguageFeatureAfter();
|
|
63
|
+
if (_this.lazyCallback) {
|
|
64
|
+
_this.lazyCallback(_this.codeEditor);
|
|
65
|
+
}
|
|
66
|
+
return;
|
|
67
|
+
}).catch(console.error);
|
|
68
|
+
} else {
|
|
69
|
+
this.modified = monaco.editor.createModel(options.modified || '');
|
|
70
|
+
this.original = monaco.editor.createModel(options.original || '');
|
|
71
|
+
this.codeEditor = monaco.editor.createDiffEditor(node, _objectSpread({}, options));
|
|
72
|
+
this.codeEditor.setModel({
|
|
73
|
+
original: this.original,
|
|
74
|
+
modified: this.modified
|
|
75
|
+
});
|
|
76
|
+
this.handleEditorLanguageFeatureBefore(options.language);
|
|
77
|
+
MonacoEnvironment.initModule().then(function () {
|
|
78
|
+
monaco.editor.setModelLanguage(_this.modified, options.language);
|
|
79
|
+
monaco.editor.setModelLanguage(_this.original, options.language);
|
|
80
|
+
_this.language = _this.original.getLanguageId();
|
|
81
|
+
monaco.editor.setTheme(options.theme || '');
|
|
82
|
+
// 调用回调函数
|
|
83
|
+
_this.handleEditorLanguageFeatureAfter();
|
|
84
|
+
if (_this.lazyCallback) {
|
|
85
|
+
_this.lazyCallback(_this.codeEditor);
|
|
86
|
+
}
|
|
87
|
+
return;
|
|
88
|
+
}).catch(console.error);
|
|
89
|
+
}
|
|
90
|
+
} else {
|
|
91
|
+
// create前钩子函数调用
|
|
92
|
+
this.handleEditorLanguageFeatureBefore(options.language);
|
|
93
|
+
if (!isDiff) {
|
|
94
|
+
var _model = options.model;
|
|
95
|
+
if (!_model) {
|
|
96
|
+
if (options.uri) {
|
|
97
|
+
_model = monaco.editor.getModel(options.uri);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
if (!_model) {
|
|
101
|
+
_model = monaco.editor.createModel(options.value || '', options.language, options.uri);
|
|
102
|
+
}
|
|
103
|
+
this.model = _model;
|
|
104
|
+
this.codeEditor = monaco.editor.create(node, _objectSpread(_objectSpread({}, options), {}, {
|
|
105
|
+
model: this.model
|
|
106
|
+
}));
|
|
107
|
+
this.toDispose.push(this.model.onDidChangeLanguage(function (e) {
|
|
108
|
+
_this.language = e.newLanguage;
|
|
109
|
+
}));
|
|
110
|
+
this.language = this.model.getLanguageId();
|
|
111
|
+
} else {
|
|
112
|
+
this.modified = monaco.editor.createModel(options.modified || '', options.language);
|
|
113
|
+
this.original = monaco.editor.createModel(options.original || '', options.language);
|
|
114
|
+
this.codeEditor = monaco.editor.createDiffEditor(node, _objectSpread({}, options));
|
|
115
|
+
this.codeEditor.setModel({
|
|
116
|
+
original: this.original,
|
|
117
|
+
modified: this.modified
|
|
118
|
+
});
|
|
119
|
+
this.toDispose.push(this.modified.onDidChangeLanguage(function (e) {
|
|
120
|
+
_this.language = e.newLanguage;
|
|
121
|
+
}));
|
|
122
|
+
this.language = this.modified.getLanguageId();
|
|
123
|
+
}
|
|
124
|
+
this.handleEditorLanguageFeatureAfter();
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
E2Editor = inject(LazyCallback)(E2Editor, undefined, 5) || E2Editor;
|
|
128
|
+
E2Editor = inject(IsDiff)(E2Editor, undefined, 4) || E2Editor;
|
|
129
|
+
E2Editor = inject(ThemeRegistry)(E2Editor, undefined, 3) || E2Editor;
|
|
130
|
+
E2Editor = inject(EditorHanlerRegistry)(E2Editor, undefined, 2) || E2Editor;
|
|
131
|
+
E2Editor = inject(MonacoOptions)(E2Editor, undefined, 1) || E2Editor;
|
|
132
|
+
E2Editor = inject(EditorNode)(E2Editor, undefined, 0) || E2Editor;
|
|
133
|
+
_createClass(E2Editor, [{
|
|
134
|
+
key: "handleEditorLanguageFeatureBefore",
|
|
135
|
+
value: function handleEditorLanguageFeatureBefore(language) {
|
|
136
|
+
if (language) {
|
|
137
|
+
this.editorHandlerRegistry.handleBefore(language);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}, {
|
|
141
|
+
key: "handleEditorLanguageFeatureAfter",
|
|
142
|
+
value: function handleEditorLanguageFeatureAfter() {
|
|
143
|
+
if (this.language) {
|
|
144
|
+
this.editorHandlerRegistry.handleAfter(this.language, this.codeEditor);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}], [{
|
|
148
|
+
key: "createMonacoModel",
|
|
149
|
+
value: function createMonacoModel(value, language, uri) {
|
|
150
|
+
return monaco.editor.createModel(value, language, uri);
|
|
151
|
+
}
|
|
152
|
+
}, {
|
|
153
|
+
key: "createMonacoEditor",
|
|
154
|
+
value: function createMonacoEditor(node, options) {
|
|
155
|
+
return monaco.editor.create(node, options);
|
|
156
|
+
}
|
|
157
|
+
}, {
|
|
158
|
+
key: "createMonacoDiffEditor",
|
|
159
|
+
value: function createMonacoDiffEditor(node, options) {
|
|
160
|
+
return monaco.editor.createDiffEditor(node, options);
|
|
161
|
+
}
|
|
162
|
+
}]);
|
|
163
|
+
return E2Editor;
|
|
164
|
+
}()) || _class);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EditorHandlerContribution } from '@difizen/libro-cofine-editor-contribution';
|
|
2
|
+
import type { Contribution } from '@difizen/mana-app';
|
|
3
|
+
import * as monaco from '@difizen/monaco-editor-core';
|
|
4
|
+
export declare class EditorHanlerRegistry {
|
|
5
|
+
contributions: EditorHandlerContribution[];
|
|
6
|
+
effected: EditorHandlerContribution[];
|
|
7
|
+
provider: Contribution.Provider<EditorHandlerContribution>;
|
|
8
|
+
constructor(provider: Contribution.Provider<EditorHandlerContribution>);
|
|
9
|
+
handleAfter(languege: string, editor: monaco.editor.IStandaloneCodeEditor | monaco.editor.IStandaloneDiffEditor): void;
|
|
10
|
+
handleBefore(languege: string): void;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=editor-handler-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-handler-registry.d.ts","sourceRoot":"","sources":["../../src/editor-handler-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AACtF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AAEtD,qBACa,oBAAoB;IAC/B,aAAa,EAAE,yBAAyB,EAAE,CAAC;IAC3C,QAAQ,EAAE,yBAAyB,EAAE,CAAM;IAC3C,QAAQ,EAAE,YAAY,CAAC,QAAQ,CAAC,yBAAyB,CAAC,CAAC;gBAGzD,QAAQ,EAAE,YAAY,CAAC,QAAQ,CAAC,yBAAyB,CAAC;IAM5D,WAAW,CACT,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAAC,qBAAqB,GAChF,IAAI;IAaP,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;CAYrC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
var _dec, _class;
|
|
3
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
4
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
5
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
+
import { EditorHandlerContribution } from '@difizen/libro-cofine-editor-contribution';
|
|
9
|
+
import { contrib, singleton } from '@difizen/mana-app';
|
|
10
|
+
import * as monaco from '@difizen/monaco-editor-core';
|
|
11
|
+
export var EditorHanlerRegistry = (_dec = singleton(), _dec(_class = /*#__PURE__*/function () {
|
|
12
|
+
function EditorHanlerRegistry(provider) {
|
|
13
|
+
_classCallCheck(this, EditorHanlerRegistry);
|
|
14
|
+
this.effected = [];
|
|
15
|
+
this.provider = provider;
|
|
16
|
+
this.contributions = provider.getContributions();
|
|
17
|
+
}
|
|
18
|
+
EditorHanlerRegistry = contrib(EditorHandlerContribution)(EditorHanlerRegistry, undefined, 0) || EditorHanlerRegistry;
|
|
19
|
+
_createClass(EditorHanlerRegistry, [{
|
|
20
|
+
key: "handleAfter",
|
|
21
|
+
value: function handleAfter(languege, editor) {
|
|
22
|
+
var _this = this;
|
|
23
|
+
this.effected.forEach(function (contribution) {
|
|
24
|
+
return contribution.dispose();
|
|
25
|
+
});
|
|
26
|
+
this.effected = [];
|
|
27
|
+
this.contributions = this.provider.getContributions({
|
|
28
|
+
cache: false
|
|
29
|
+
});
|
|
30
|
+
var canHanleList = this.contributions.filter(function (handler) {
|
|
31
|
+
return handler.canHandle(languege);
|
|
32
|
+
});
|
|
33
|
+
canHanleList.forEach(function (contribution) {
|
|
34
|
+
contribution.afterCreate(editor, monaco);
|
|
35
|
+
_this.effected.push(contribution);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}, {
|
|
39
|
+
key: "handleBefore",
|
|
40
|
+
value: function handleBefore(languege) {
|
|
41
|
+
var _this2 = this;
|
|
42
|
+
this.contributions = this.provider.getContributions({
|
|
43
|
+
cache: false
|
|
44
|
+
});
|
|
45
|
+
this.effected.forEach(function (contribution) {
|
|
46
|
+
return contribution.dispose();
|
|
47
|
+
});
|
|
48
|
+
this.effected = [];
|
|
49
|
+
var canHanleList = this.contributions.filter(function (handler) {
|
|
50
|
+
return handler.canHandle(languege);
|
|
51
|
+
});
|
|
52
|
+
canHanleList.forEach(function (contribution) {
|
|
53
|
+
contribution.beforeCreate(monaco);
|
|
54
|
+
_this2.effected.push(contribution);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}]);
|
|
58
|
+
return EditorHanlerRegistry;
|
|
59
|
+
}()) || _class);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type monaco from '@difizen/monaco-editor-core';
|
|
2
|
+
import type { E2Editor } from './e2-editor.js';
|
|
3
|
+
export declare const EditorProvider: unique symbol;
|
|
4
|
+
export type Options = monaco.editor.IStandaloneEditorConstructionOptions & monaco.editor.IDiffEditorConstructionOptions & {
|
|
5
|
+
modified?: string;
|
|
6
|
+
original?: string;
|
|
7
|
+
} & {
|
|
8
|
+
uri?: monaco.Uri;
|
|
9
|
+
};
|
|
10
|
+
export interface EditorProvider {
|
|
11
|
+
create: (node: HTMLElement, options: Options, callback?: LazyCallbackType) => E2Editor<monaco.editor.IStandaloneCodeEditor>;
|
|
12
|
+
createDiff: (node: HTMLElement, options: Options, callback?: LazyCallbackType) => E2Editor<monaco.editor.IStandaloneDiffEditor>;
|
|
13
|
+
}
|
|
14
|
+
export type LazyCallbackType = (editor: monaco.editor.IStandaloneCodeEditor | monaco.editor.IStandaloneDiffEditor) => void;
|
|
15
|
+
//# sourceMappingURL=editor-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-provider.d.ts","sourceRoot":"","sources":["../../src/editor-provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AAEtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,eAAO,MAAM,cAAc,eAA2B,CAAC;AACvD,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,oCAAoC,GACtE,MAAM,CAAC,MAAM,CAAC,8BAA8B,GAAG;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG;IACF,GAAG,CAAC,EAAE,MAAM,CAAC,GAAG,CAAC;CAClB,CAAC;AAEJ,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,CACN,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,OAAO,EAChB,QAAQ,CAAC,EAAE,gBAAgB,KACxB,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;IACnD,UAAU,EAAE,CACV,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,OAAO,EAChB,QAAQ,CAAC,EAAE,gBAAgB,KACxB,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;CACpD;AAED,MAAM,MAAM,gBAAgB,GAAG,CAC7B,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAAC,qBAAqB,KAC9E,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export var EditorProvider = Symbol('EditorProvider');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor.worker.d.ts","sourceRoot":"","sources":["../../src/editor.worker.ts"],"names":[],"mappings":"AAIA,wBAAgB,UAAU,CAAC,aAAa,EAAE,GAAG,QAc5C"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SimpleWorkerServer } from '@difizen/monaco-editor-core/esm/vs/base/common/worker/simpleWorker.js';
|
|
2
|
+
import { EditorSimpleWorker } from '@difizen/monaco-editor-core/esm/vs/editor/common/services/editorSimpleWorker.js';
|
|
3
|
+
var initialized = false;
|
|
4
|
+
export function initialize(foreignModule) {
|
|
5
|
+
if (initialized) {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
initialized = true;
|
|
9
|
+
var simpleWorker = new SimpleWorkerServer(function (msg) {
|
|
10
|
+
globalThis.postMessage(msg);
|
|
11
|
+
}, function (host) {
|
|
12
|
+
return new EditorSimpleWorker(host, foreignModule);
|
|
13
|
+
});
|
|
14
|
+
globalThis.onmessage = function (e) {
|
|
15
|
+
simpleWorker.onmessage(e.data);
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
globalThis.onmessage = function (e) {
|
|
19
|
+
// Ignore first message in this case and initialize if not yet initialized
|
|
20
|
+
if (!initialized) {
|
|
21
|
+
initialize(null);
|
|
22
|
+
}
|
|
23
|
+
};
|
package/es/global.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare module '@difizen/monaco-editor-core/esm/vs/base/common/worker/simpleWorker.js';
|
|
2
|
+
declare module '@difizen/monaco-editor-core/esm/vs/editor/common/services/editorSimpleWorker.js';
|
|
3
|
+
declare module '*.json';
|
|
4
|
+
interface Window {
|
|
5
|
+
_Monaco: any;
|
|
6
|
+
MonacoEnvironment: any;
|
|
7
|
+
}
|
package/es/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type monaco from '@difizen/monaco-editor-core';
|
|
2
|
+
import type { E2Editor } from './e2-editor.js';
|
|
3
|
+
export { EditorHandlerContribution, LanguageOptionsRegistry, LanguageWorkerContribution, LanguageWorkerRegistry, } from '@difizen/libro-cofine-editor-contribution';
|
|
4
|
+
export type { E2Editor } from './e2-editor.js';
|
|
5
|
+
export { EditorHanlerRegistry } from './editor-handler-registry.js';
|
|
6
|
+
export { EditorProvider } from './editor-provider.js';
|
|
7
|
+
export { InitializeContribution } from './initialize-provider.js';
|
|
8
|
+
export { MonacoEnvironment } from './monaco-environment.js';
|
|
9
|
+
export { MonacoLoaderConfig } from './monaco-loader.js';
|
|
10
|
+
export { SnippetSuggestContribution, SnippetSuggestRegistry, } from './snippets-suggest-registry.js';
|
|
11
|
+
export { MixedThemeRegistry, ThemeContribution, ThemeRegistry, } from './theme-registry.js';
|
|
12
|
+
export type { MixedTheme, ITextmateThemeSetting, IRawThemeSetting, IRawTheme, } from './theme-registry.js';
|
|
13
|
+
export declare class Editor {
|
|
14
|
+
editor: E2Editor<monaco.editor.IStandaloneCodeEditor>;
|
|
15
|
+
codeEditor: monaco.editor.IStandaloneCodeEditor;
|
|
16
|
+
constructor(node: HTMLElement, options?: monaco.editor.IStandaloneEditorConstructionOptions);
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AAEtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAI/C,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACvB,0BAA0B,EAC1B,sBAAsB,GACvB,MAAM,2CAA2C,CAAC;AACnD,YAAY,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,GACvB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,GACd,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,UAAU,EACV,qBAAqB,EACrB,gBAAgB,EAChB,SAAS,GACV,MAAM,qBAAqB,CAAC;AAC7B,qBAAa,MAAM;IACjB,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;IACtD,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAAC;gBAE9C,IAAI,EAAE,WAAW,EACjB,OAAO,GAAE,MAAM,CAAC,MAAM,CAAC,oCAAyC;CAOnE"}
|
package/es/index.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
3
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
5
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
7
|
+
import { EditorProvider } from "./editor-provider.js";
|
|
8
|
+
import { MonacoEnvironment } from "./monaco-environment.js";
|
|
9
|
+
export { EditorHandlerContribution, LanguageOptionsRegistry, LanguageWorkerContribution, LanguageWorkerRegistry } from '@difizen/libro-cofine-editor-contribution';
|
|
10
|
+
export { EditorHanlerRegistry } from "./editor-handler-registry.js";
|
|
11
|
+
export { EditorProvider } from "./editor-provider.js";
|
|
12
|
+
export { InitializeContribution } from "./initialize-provider.js";
|
|
13
|
+
export { MonacoEnvironment } from "./monaco-environment.js";
|
|
14
|
+
export { MonacoLoaderConfig } from "./monaco-loader.js";
|
|
15
|
+
export { SnippetSuggestContribution, SnippetSuggestRegistry } from "./snippets-suggest-registry.js";
|
|
16
|
+
export { MixedThemeRegistry, ThemeContribution, ThemeRegistry } from "./theme-registry.js";
|
|
17
|
+
export var Editor = /*#__PURE__*/_createClass(function Editor(node) {
|
|
18
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
19
|
+
_classCallCheck(this, Editor);
|
|
20
|
+
var editorProvider = MonacoEnvironment.container.get(EditorProvider);
|
|
21
|
+
this.editor = editorProvider.create(node, options);
|
|
22
|
+
this.codeEditor = this.editor.codeEditor;
|
|
23
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Contribution } from '@difizen/mana-app';
|
|
2
|
+
import { DefaultContributionProvider, Syringe } from '@difizen/mana-app';
|
|
3
|
+
import type monaco from '@difizen/monaco-editor-core';
|
|
4
|
+
export declare const InitializeContribution: Syringe.DefinedToken;
|
|
5
|
+
export interface InitializeContribution {
|
|
6
|
+
initialized?: boolean;
|
|
7
|
+
onInitialize?: (coreMonaco: typeof monaco) => void | Promise<void>;
|
|
8
|
+
awaysInitialized?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare class InitializeProvider {
|
|
11
|
+
provider: Contribution.Provider<InitializeContribution>;
|
|
12
|
+
constructor(provider: Contribution.Provider<InitializeContribution>);
|
|
13
|
+
initialize(coreMonaco: typeof monaco): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
export declare class InitializeContributionProvider extends DefaultContributionProvider<InitializeContribution> {
|
|
16
|
+
getContributions(): InitializeContribution[];
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=initialize-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initialize-provider.d.ts","sourceRoot":"","sources":["../../src/initialize-provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAEL,2BAA2B,EAE3B,OAAO,EACR,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AAEtD,eAAO,MAAM,sBAAsB,sBAAgD,CAAC;AACpF,MAAM,WAAW,sBAAsB;IACrC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnE,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AACD,qBACa,kBAAkB;IAC7B,QAAQ,EAAE,YAAY,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAC;gBAGtD,QAAQ,EAAE,YAAY,CAAC,QAAQ,CAAC,sBAAsB,CAAC;IAKnD,UAAU,CAAC,UAAU,EAAE,OAAO,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAqB3D;AAED,qBAAa,8BAA+B,SAAQ,2BAA2B,CAAC,sBAAsB,CAAC;IAC5F,gBAAgB;CAI1B"}
|