@difizen/libro-code-editor 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.
Files changed (48) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +0 -0
  3. package/es/code-editor-info-manager.d.ts +8 -0
  4. package/es/code-editor-info-manager.d.ts.map +1 -0
  5. package/es/code-editor-info-manager.js +32 -0
  6. package/es/code-editor-manager.d.ts +60 -0
  7. package/es/code-editor-manager.d.ts.map +1 -0
  8. package/es/code-editor-manager.js +126 -0
  9. package/es/code-editor-model.d.ts +80 -0
  10. package/es/code-editor-model.d.ts.map +1 -0
  11. package/es/code-editor-model.js +108 -0
  12. package/es/code-editor-protocol.d.ts +475 -0
  13. package/es/code-editor-protocol.d.ts.map +1 -0
  14. package/es/code-editor-protocol.js +113 -0
  15. package/es/code-editor-settings.d.ts +34 -0
  16. package/es/code-editor-settings.d.ts.map +1 -0
  17. package/es/code-editor-settings.js +225 -0
  18. package/es/code-editor-state-manager.d.ts +14 -0
  19. package/es/code-editor-state-manager.d.ts.map +1 -0
  20. package/es/code-editor-state-manager.js +82 -0
  21. package/es/code-editor-view.d.ts +123 -0
  22. package/es/code-editor-view.d.ts.map +1 -0
  23. package/es/code-editor-view.js +420 -0
  24. package/es/index.d.ts +9 -0
  25. package/es/index.d.ts.map +1 -0
  26. package/es/index.js +8 -0
  27. package/es/language-specs.d.ts +38 -0
  28. package/es/language-specs.d.ts.map +1 -0
  29. package/es/language-specs.js +58 -0
  30. package/es/mimetype.d.ts +33 -0
  31. package/es/mimetype.d.ts.map +1 -0
  32. package/es/mimetype.js +11 -0
  33. package/es/module.d.ts +3 -0
  34. package/es/module.d.ts.map +1 -0
  35. package/es/module.js +10 -0
  36. package/package.json +60 -0
  37. package/src/code-editor-info-manager.ts +25 -0
  38. package/src/code-editor-manager.ts +71 -0
  39. package/src/code-editor-model.ts +120 -0
  40. package/src/code-editor-protocol.ts +681 -0
  41. package/src/code-editor-settings.ts +214 -0
  42. package/src/code-editor-state-manager.ts +54 -0
  43. package/src/code-editor-view.tsx +434 -0
  44. package/src/index.spec.ts +10 -0
  45. package/src/index.ts +8 -0
  46. package/src/language-specs.ts +69 -0
  47. package/src/mimetype.ts +37 -0
  48. package/src/module.ts +22 -0
@@ -0,0 +1,225 @@
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 _defaultConfig$fontSi, _defaultConfig$lineHe, _defaultConfig$tabSiz, _dec, _class;
3
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
4
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
5
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
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 { inject, singleton, ApplicationContribution, DisposableCollection, Emitter, ConfigurationContribution, ConfigurationService } from '@difizen/mana-app';
12
+ import { l10n } from '@difizen/mana-l10n';
13
+ import { defaultConfig } from "./code-editor-protocol.js";
14
+ Object.typedKeys = Object.keys;
15
+ var LibroUserSettingStorage = {
16
+ id: '__libro.user.storage__',
17
+ priority: 100
18
+ };
19
+ var FontSize = {
20
+ id: 'libro.user.codeeditor.fontsize',
21
+ description: l10n.t('代码编辑区域字体大小'),
22
+ title: l10n.t('代码字号'),
23
+ type: 'inputnumber',
24
+ defaultValue: (_defaultConfig$fontSi = defaultConfig.fontSize) !== null && _defaultConfig$fontSi !== void 0 ? _defaultConfig$fontSi : 13,
25
+ schema: {
26
+ type: 'number'
27
+ },
28
+ storage: LibroUserSettingStorage
29
+ };
30
+ var LineHeight = {
31
+ id: 'libro.user.codeeditor.lineheight',
32
+ description: l10n.t('代码编辑区域字体行高'),
33
+ title: l10n.t('代码行高'),
34
+ type: 'inputnumber',
35
+ defaultValue: (_defaultConfig$lineHe = defaultConfig.lineHeight) !== null && _defaultConfig$lineHe !== void 0 ? _defaultConfig$lineHe : 20,
36
+ schema: {
37
+ type: 'number'
38
+ },
39
+ storage: LibroUserSettingStorage
40
+ };
41
+ var TabSize = {
42
+ id: 'libro.user.codeeditor.tabsize',
43
+ description: l10n.t('tab转换为几个空格大小'),
44
+ title: l10n.t('tab大小'),
45
+ type: 'inputnumber',
46
+ defaultValue: (_defaultConfig$tabSiz = defaultConfig.tabSize) !== null && _defaultConfig$tabSiz !== void 0 ? _defaultConfig$tabSiz : 4,
47
+ schema: {
48
+ type: 'number'
49
+ },
50
+ storage: LibroUserSettingStorage
51
+ };
52
+ var InsertSpaces = {
53
+ id: 'libro.user.codeeditor.insertspaces',
54
+ description: l10n.t('输入tab是否转换为空格'),
55
+ title: l10n.t('tab转空格'),
56
+ type: 'checkbox',
57
+ defaultValue: defaultConfig.insertSpaces,
58
+ schema: {
59
+ type: 'boolean'
60
+ },
61
+ storage: LibroUserSettingStorage
62
+ };
63
+ var LineWarp = {
64
+ id: 'libro.user.codeeditor.linewarp',
65
+ description: l10n.t("\u81EA\u52A8\u6362\u884C\u7B56\u7565:\n - \"off\", lines will never wrap.\n - \"on\", lines will wrap at the viewport border.\n - \"wordWrapColumn\", lines will wrap at 'wordWrapColumn'.\n - \"bounded\", lines will wrap at minimum between viewport width and wordWrapColumn."),
66
+ title: l10n.t('自动换行'),
67
+ type: 'select',
68
+ defaultValue: defaultConfig.lineWrap,
69
+ schema: {
70
+ type: 'string',
71
+ enum: ['off', 'on', 'wordWrapColumn', 'bounded']
72
+ },
73
+ storage: LibroUserSettingStorage
74
+ };
75
+ var WordWrapColumn = {
76
+ id: 'libro.user.codeeditor.wordWrapColumn',
77
+ description: l10n.t('开启自动换行后,自动换行的列数'),
78
+ title: l10n.t('自动换行列数'),
79
+ type: 'inputnumber',
80
+ defaultValue: defaultConfig.wordWrapColumn,
81
+ schema: {
82
+ type: 'number'
83
+ },
84
+ storage: LibroUserSettingStorage
85
+ };
86
+ var LSPEnabled = {
87
+ id: 'libro.user.codeeditor.lspenabled',
88
+ description: l10n.t('开启语言服务后,编辑器能提供更多辅助编码能力,包括:自动提示、代码诊断、hover提示、格式化、代码跳转、重命名等等'),
89
+ title: l10n.t('开启语言服务'),
90
+ type: 'checkbox',
91
+ defaultValue: defaultConfig.lspEnabled,
92
+ schema: {
93
+ type: 'boolean'
94
+ },
95
+ storage: LibroUserSettingStorage
96
+ };
97
+ export var CodeEditorSetting = {
98
+ fontSize: FontSize,
99
+ tabSize: TabSize,
100
+ insertSpaces: InsertSpaces,
101
+ lineHeight: LineHeight,
102
+ lineWrap: LineWarp,
103
+ wordWrapColumn: WordWrapColumn,
104
+ lspEnabled: LSPEnabled
105
+ };
106
+ export var CodeEditorSettings = (_dec = singleton({
107
+ contrib: [ConfigurationContribution, ApplicationContribution]
108
+ }), _dec(_class = /*#__PURE__*/function () {
109
+ function CodeEditorSettings(configurationService) {
110
+ _classCallCheck(this, CodeEditorSettings);
111
+ this.codeEditorSettingsChangeEmitter = new Emitter();
112
+ this.onCodeEditorSettingsChange = this.codeEditorSettingsChangeEmitter.event;
113
+ this.toDispose = new DisposableCollection();
114
+ this.isDisposed = false;
115
+ this.configurationService = configurationService;
116
+ }
117
+ CodeEditorSettings = inject(ConfigurationService)(CodeEditorSettings, undefined, 0) || CodeEditorSettings;
118
+ _createClass(CodeEditorSettings, [{
119
+ key: "registerConfigurations",
120
+ value: function registerConfigurations() {
121
+ return [FontSize, TabSize, InsertSpaces, LineHeight, LineWarp, WordWrapColumn, LSPEnabled];
122
+ }
123
+ }, {
124
+ key: "onStart",
125
+ value: function () {
126
+ var _onStart = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
127
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
128
+ while (1) switch (_context.prev = _context.next) {
129
+ case 0:
130
+ _context.next = 2;
131
+ return this.fetchUserEditorSettings();
132
+ case 2:
133
+ this.useSettings = _context.sent;
134
+ this.handleEditorSettingsChange();
135
+ case 4:
136
+ case "end":
137
+ return _context.stop();
138
+ }
139
+ }, _callee, this);
140
+ }));
141
+ function onStart() {
142
+ return _onStart.apply(this, arguments);
143
+ }
144
+ return onStart;
145
+ }()
146
+ }, {
147
+ key: "getUserEditorSettings",
148
+ value: function getUserEditorSettings() {
149
+ return this.useSettings;
150
+ }
151
+ }, {
152
+ key: "fetchUserEditorSettings",
153
+ value: function () {
154
+ var _fetchUserEditorSettings = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
155
+ var _this = this;
156
+ var result;
157
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
158
+ while (1) switch (_context3.prev = _context3.next) {
159
+ case 0:
160
+ result = {};
161
+ Object.typedKeys(CodeEditorSetting).forEach( /*#__PURE__*/function () {
162
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(key) {
163
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
164
+ while (1) switch (_context2.prev = _context2.next) {
165
+ case 0:
166
+ _context2.next = 2;
167
+ return _this.configurationService.get(CodeEditorSetting[key]);
168
+ case 2:
169
+ result[key] = _context2.sent;
170
+ case 3:
171
+ case "end":
172
+ return _context2.stop();
173
+ }
174
+ }, _callee2);
175
+ }));
176
+ return function (_x) {
177
+ return _ref.apply(this, arguments);
178
+ };
179
+ }());
180
+ return _context3.abrupt("return", result);
181
+ case 3:
182
+ case "end":
183
+ return _context3.stop();
184
+ }
185
+ }, _callee3);
186
+ }));
187
+ function fetchUserEditorSettings() {
188
+ return _fetchUserEditorSettings.apply(this, arguments);
189
+ }
190
+ return fetchUserEditorSettings;
191
+ }()
192
+ }, {
193
+ key: "handleEditorSettingsChange",
194
+ value: function handleEditorSettingsChange() {
195
+ var _this2 = this;
196
+ this.toDispose.push(this.configurationService.onConfigurationValueChange(function (e) {
197
+ // const ids = Object.values(CodeEditorSetting).map(item => item.id);
198
+ var match = Object.entries(CodeEditorSetting).find(function (item) {
199
+ return item[1].id === e.key;
200
+ });
201
+ if (match) {
202
+ _this2.codeEditorSettingsChangeEmitter.fire({
203
+ key: match[0],
204
+ value: e.value
205
+ });
206
+ }
207
+ }));
208
+ }
209
+ }, {
210
+ key: "disposed",
211
+ get: function get() {
212
+ return this.isDisposed;
213
+ }
214
+ }, {
215
+ key: "dispose",
216
+ value: function dispose() {
217
+ if (this.disposed) {
218
+ return;
219
+ }
220
+ this.toDispose.dispose();
221
+ this.isDisposed = true;
222
+ }
223
+ }]);
224
+ return CodeEditorSettings;
225
+ }()) || _class);
@@ -0,0 +1,14 @@
1
+ import type { Contribution } from '@difizen/mana-app';
2
+ import type { IModel } from './code-editor-model.js';
3
+ import type { EditorState, IEditorStateOptions } from './code-editor-protocol.js';
4
+ import { CodeEditorContribution } from './code-editor-protocol.js';
5
+ export declare class CodeEditorStateManager {
6
+ protected readonly codeEditorProvider: Contribution.Provider<CodeEditorContribution>;
7
+ protected stateCache: Map<string, EditorState>;
8
+ constructor(codeEditorProvider: Contribution.Provider<CodeEditorContribution>);
9
+ protected findCodeEditorProvider(model: IModel): CodeEditorContribution<any>;
10
+ getOrCreateEditorState(option: IEditorStateOptions): Promise<EditorState>;
11
+ updateEditorState(id: string, state: EditorState): void;
12
+ removeEditorState(id: string): void;
13
+ }
14
+ //# sourceMappingURL=code-editor-state-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code-editor-state-manager.d.ts","sourceRoot":"","sources":["../src/code-editor-state-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAKtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,qBACa,sBAAsB;IACjC,SAAS,CAAC,QAAQ,CAAC,kBAAkB,EAAE,YAAY,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAC;IACrF,SAAS,CAAC,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAa;gBAIzD,kBAAkB,EAAE,YAAY,CAAC,QAAQ,CAAC,sBAAsB,CAAC;IAKnE,SAAS,CAAC,sBAAsB,CAAC,KAAK,EAAE,MAAM;IASxC,sBAAsB,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,WAAW,CAAC;IAgB/E,iBAAiB,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW;IAIhD,iBAAiB,CAAC,EAAE,EAAE,MAAM;CAG7B"}
@@ -0,0 +1,82 @@
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 _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
4
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
5
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
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 { Priority } from '@difizen/mana-app';
12
+ import { contrib } from '@difizen/mana-app';
13
+ import { singleton } from '@difizen/mana-app';
14
+ import { CodeEditorContribution } from "./code-editor-protocol.js";
15
+ export var CodeEditorStateManager = (_dec = singleton(), _dec(_class = /*#__PURE__*/function () {
16
+ function CodeEditorStateManager(codeEditorProvider) {
17
+ _classCallCheck(this, CodeEditorStateManager);
18
+ this.stateCache = new Map();
19
+ this.codeEditorProvider = codeEditorProvider;
20
+ }
21
+ CodeEditorStateManager = contrib(CodeEditorContribution)(CodeEditorStateManager, undefined, 0) || CodeEditorStateManager;
22
+ _createClass(CodeEditorStateManager, [{
23
+ key: "findCodeEditorProvider",
24
+ value: function findCodeEditorProvider(model) {
25
+ var prioritized = Priority.sortSync(this.codeEditorProvider.getContributions(), function (contribution) {
26
+ return contribution.canHandle(model.mimeType);
27
+ });
28
+ var sorted = prioritized.map(function (c) {
29
+ return c.value;
30
+ });
31
+ return sorted[0];
32
+ }
33
+ }, {
34
+ key: "getOrCreateEditorState",
35
+ value: function () {
36
+ var _getOrCreateEditorState = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(option) {
37
+ var _this$findCodeEditorP;
38
+ var _state, factory, state;
39
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
40
+ while (1) switch (_context.prev = _context.next) {
41
+ case 0:
42
+ if (!this.stateCache.has(option.uuid)) {
43
+ _context.next = 3;
44
+ break;
45
+ }
46
+ _state = this.stateCache.get(option.uuid);
47
+ return _context.abrupt("return", _state);
48
+ case 3:
49
+ factory = (_this$findCodeEditorP = this.findCodeEditorProvider(option.model)) === null || _this$findCodeEditorP === void 0 ? void 0 : _this$findCodeEditorP.stateFactory;
50
+ if (factory) {
51
+ _context.next = 6;
52
+ break;
53
+ }
54
+ throw new Error("no code editor state factory registered for mimetype: ".concat(option.model.mimeType));
55
+ case 6:
56
+ state = factory(option);
57
+ this.stateCache.set(option.uuid, state);
58
+ return _context.abrupt("return", state);
59
+ case 9:
60
+ case "end":
61
+ return _context.stop();
62
+ }
63
+ }, _callee, this);
64
+ }));
65
+ function getOrCreateEditorState(_x) {
66
+ return _getOrCreateEditorState.apply(this, arguments);
67
+ }
68
+ return getOrCreateEditorState;
69
+ }()
70
+ }, {
71
+ key: "updateEditorState",
72
+ value: function updateEditorState(id, state) {
73
+ this.stateCache.set(id, state);
74
+ }
75
+ }, {
76
+ key: "removeEditorState",
77
+ value: function removeEditorState(id) {
78
+ this.stateCache.delete(id);
79
+ }
80
+ }]);
81
+ return CodeEditorStateManager;
82
+ }()) || _class);
@@ -0,0 +1,123 @@
1
+ /// <reference types="react" resolution-mode="require"/>
2
+ import { Emitter, BaseView, ThemeService } from '@difizen/mana-app';
3
+ import { CodeEditorInfoManager } from './code-editor-info-manager.js';
4
+ import type { IModel } from './code-editor-model.js';
5
+ import type { CompletionProvider, IEditorConfig, IEditor, IEditorSelectionStyle, TooltipProvider, CodeEditorFactory } from './code-editor-protocol.js';
6
+ import { CodeEditorSettings } from './code-editor-settings.js';
7
+ import { CodeEditorStateManager } from './code-editor-state-manager.js';
8
+ export declare const CodeEditorRender: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("react").RefAttributes<HTMLDivElement>>>;
9
+ export type CodeEditorViewStatus = 'init' | 'ready' | 'disposed';
10
+ /**
11
+ * A widget which hosts a code editor.
12
+ */
13
+ export declare class CodeEditorView extends BaseView {
14
+ protected readonly themeService: ThemeService;
15
+ protected readonly codeEditorSettings: CodeEditorSettings;
16
+ protected readonly codeEditorStateManager: CodeEditorStateManager;
17
+ codeEditorInfoManager: CodeEditorInfoManager;
18
+ view: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("react").RefAttributes<HTMLDivElement>>>;
19
+ protected classlist: string[];
20
+ protected options: CodeEditorViewOptions;
21
+ protected modalChangeEmitter: Emitter<any>;
22
+ protected editorHostRef: React.RefObject<HTMLDivElement> | null | undefined;
23
+ get onModalChange(): import("@difizen/mana-app").Event<any>;
24
+ /**
25
+ * Get the editor wrapped by the widget.
26
+ */
27
+ editor: IEditor;
28
+ editorStatus: CodeEditorViewStatus;
29
+ protected editorStatusChangeEmitter: Emitter<{
30
+ status: CodeEditorViewStatus;
31
+ prevState: CodeEditorViewStatus;
32
+ }>;
33
+ onEditorStatusChange: import("@difizen/mana-app").Event<{
34
+ status: CodeEditorViewStatus;
35
+ prevState: CodeEditorViewStatus;
36
+ }>;
37
+ /**
38
+ * Construct a new code editor widget.
39
+ */
40
+ constructor(options: CodeEditorViewOptions, codeEditorInfoManager: CodeEditorInfoManager);
41
+ protected getEditorHost(): import("react").RefObject<HTMLDivElement> | null | undefined;
42
+ onViewMount(): Promise<void>;
43
+ removeChildNodes: (parent: any) => void;
44
+ onViewUnmount: () => void;
45
+ onViewResize(): void;
46
+ /**
47
+ * Get the model used by the widget.
48
+ */
49
+ get model(): IModel;
50
+ /**
51
+ * Dispose of the resources held by the widget.
52
+ */
53
+ dispose(): void;
54
+ protected onViewActive: () => void;
55
+ /**
56
+ * A message handler invoked on a `'resize'` message.
57
+ */
58
+ protected onResize(): void;
59
+ addClass(classname: string): void;
60
+ removeClass(classname: string): void;
61
+ /**
62
+ * Handle a change in model selections.
63
+ */
64
+ protected _onSelectionsChanged(): void;
65
+ /**
66
+ * Handle the `'lm-dragenter'` event for the widget.
67
+ */
68
+ protected _evtDragEnter: (event: DragEvent) => void;
69
+ /**
70
+ * Handle the `'lm-dragleave'` event for the widget.
71
+ */
72
+ protected _evtDragLeave: (event: DragEvent) => void;
73
+ /**
74
+ * Handle the `'lm-dragover'` event for the widget.
75
+ */
76
+ protected _evtDragOver: (event: DragEvent) => void;
77
+ /**
78
+ * Handle the `'lm-drop'` event for the widget.
79
+ */
80
+ protected _evtDrop: (event: DragEvent) => void;
81
+ }
82
+ /**
83
+ * The namespace for the `CodeEditorWrapper` statics.
84
+ */
85
+ /**
86
+ * The options used to initialize a code editor widget.
87
+ */
88
+ export interface CodeEditorViewOptions<Config extends IEditorConfig = IEditorConfig> {
89
+ /**
90
+ * A code editor factory.
91
+ *
92
+ * #### Notes
93
+ * The widget needs a factory and a model instead of a `CodeEditor.IEditor`
94
+ * object because it needs to provide its own node as the host.
95
+ */
96
+ factory?: CodeEditorFactory;
97
+ /**
98
+ * where to mount the editor
99
+ */
100
+ editorHostId?: string;
101
+ /**
102
+ * The model used to initialize the code editor.
103
+ */
104
+ model: IModel;
105
+ /**
106
+ * The desired uuid for the editor.
107
+ * editor share id with cell.
108
+ */
109
+ uuid: string;
110
+ /**
111
+ * The configuration options for the editor.
112
+ */
113
+ config?: Partial<Config>;
114
+ /**
115
+ * The default selection style for the editor.
116
+ */
117
+ selectionStyle?: IEditorSelectionStyle;
118
+ tooltipProvider?: TooltipProvider;
119
+ completionProvider?: CompletionProvider;
120
+ autoFocus?: boolean;
121
+ [key: string]: any;
122
+ }
123
+ //# sourceMappingURL=code-editor-view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code-editor-view.d.ts","sourceRoot":"","sources":["../src/code-editor-view.tsx"],"names":[],"mappings":"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"}