@difizen/libro-cofine-editor 0.1.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.
- package/LICENSE +21 -0
- package/README.md +3 -0
- package/es/editor-contribution.d.ts +10 -0
- package/es/editor-contribution.d.ts.map +1 -0
- package/es/editor-contribution.js +31 -0
- package/es/index.d.ts +7 -0
- package/es/index.d.ts.map +1 -0
- package/es/index.js +6 -0
- package/es/index.less +32 -0
- package/es/language/lsp/completion-provider.d.ts +13 -0
- package/es/language/lsp/completion-provider.d.ts.map +1 -0
- package/es/language/lsp/completion-provider.js +290 -0
- package/es/language/lsp/diagnostic-provider.d.ts +22 -0
- package/es/language/lsp/diagnostic-provider.d.ts.map +1 -0
- package/es/language/lsp/diagnostic-provider.js +161 -0
- package/es/language/lsp/format-provider.d.ts +9 -0
- package/es/language/lsp/format-provider.d.ts.map +1 -0
- package/es/language/lsp/format-provider.js +139 -0
- package/es/language/lsp/hover-provider.d.ts +8 -0
- package/es/language/lsp/hover-provider.d.ts.map +1 -0
- package/es/language/lsp/hover-provider.js +136 -0
- package/es/language/lsp/language-feature-provider.d.ts +17 -0
- package/es/language/lsp/language-feature-provider.d.ts.map +1 -0
- package/es/language/lsp/language-feature-provider.js +89 -0
- package/es/language/lsp/lsp-contribution.d.ts +25 -0
- package/es/language/lsp/lsp-contribution.d.ts.map +1 -0
- package/es/language/lsp/lsp-contribution.js +213 -0
- package/es/language/lsp/module.d.ts +2 -0
- package/es/language/lsp/module.d.ts.map +1 -0
- package/es/language/lsp/module.js +3 -0
- package/es/language/lsp/semantic-highlight-provider.d.ts +9 -0
- package/es/language/lsp/semantic-highlight-provider.d.ts.map +1 -0
- package/es/language/lsp/semantic-highlight-provider.js +41 -0
- package/es/language/lsp/signature-help-provider.d.ts +8 -0
- package/es/language/lsp/signature-help-provider.d.ts.map +1 -0
- package/es/language/lsp/signature-help-provider.js +108 -0
- package/es/language/lsp/type-concerters.d.ts +7 -0
- package/es/language/lsp/type-concerters.d.ts.map +1 -0
- package/es/language/lsp/type-concerters.js +37 -0
- package/es/language/python/data/MagicPython.tmLanguage.json +4213 -0
- package/es/language/python/data/MagicRegExp.tmLanguage.json +497 -0
- package/es/language/python/data/configurations/python.json +135 -0
- package/es/language/python/data/snippets/python.snippets.json +223 -0
- package/es/language/python/module.d.ts +2 -0
- package/es/language/python/module.d.ts.map +1 -0
- package/es/language/python/module.js +3 -0
- package/es/language/python/python-builtin.d.ts +86 -0
- package/es/language/python/python-builtin.d.ts.map +1 -0
- package/es/language/python/python-builtin.js +569 -0
- package/es/language/python/python-language-feature.d.ts +26 -0
- package/es/language/python/python-language-feature.d.ts.map +1 -0
- package/es/language/python/python-language-feature.js +174 -0
- package/es/language-specs.d.ts +33 -0
- package/es/language-specs.d.ts.map +1 -0
- package/es/language-specs.js +115 -0
- package/es/libro-e2-editor.d.ts +277 -0
- package/es/libro-e2-editor.d.ts.map +1 -0
- package/es/libro-e2-editor.js +720 -0
- package/es/libro-e2-preload.d.ts +5 -0
- package/es/libro-e2-preload.d.ts.map +1 -0
- package/es/libro-e2-preload.js +57 -0
- package/es/libro-sql-api.d.ts +8 -0
- package/es/libro-sql-api.d.ts.map +1 -0
- package/es/libro-sql-api.js +26 -0
- package/es/module.d.ts +3 -0
- package/es/module.d.ts.map +1 -0
- package/es/module.js +44 -0
- package/es/placeholder.d.ts +31 -0
- package/es/placeholder.d.ts.map +1 -0
- package/es/placeholder.js +101 -0
- package/es/theme/data/jupyter_dark.json +406 -0
- package/es/theme/data/jupyter_hc_dark.json +385 -0
- package/es/theme/data/jupyter_hc_light.json +386 -0
- package/es/theme/data/jupyter_light.json +386 -0
- package/es/theme/data/libro_dark.json +186 -0
- package/es/theme/data/libro_light.json +170 -0
- package/es/theme/libro-python-theme-contribution.d.ts +6 -0
- package/es/theme/libro-python-theme-contribution.d.ts.map +1 -0
- package/es/theme/libro-python-theme-contribution.js +49 -0
- package/es/theme/module.d.ts +2 -0
- package/es/theme/module.d.ts.map +1 -0
- package/es/theme/module.js +3 -0
- package/es/types.d.ts +10 -0
- package/es/types.d.ts.map +1 -0
- package/es/types.js +3 -0
- package/package.json +67 -0
- package/src/editor-contribution.ts +30 -0
- package/src/index.less +32 -0
- package/src/index.spec.ts +8 -0
- package/src/index.ts +6 -0
- package/src/language/lsp/completion-provider.ts +214 -0
- package/src/language/lsp/diagnostic-provider.ts +148 -0
- package/src/language/lsp/format-provider.ts +87 -0
- package/src/language/lsp/hover-provider.ts +98 -0
- package/src/language/lsp/language-feature-provider.ts +69 -0
- package/src/language/lsp/lsp-contribution.ts +159 -0
- package/src/language/lsp/module.ts +5 -0
- package/src/language/lsp/semantic-highlight-provider.ts +26 -0
- package/src/language/lsp/signature-help-provider.ts +65 -0
- package/src/language/lsp/type-concerters.ts +72 -0
- package/src/language/python/data/MagicPython.tmLanguage.json +4213 -0
- package/src/language/python/data/MagicRegExp.tmLanguage.json +497 -0
- package/src/language/python/data/configurations/python.json +135 -0
- package/src/language/python/data/snippets/python.snippets.json +223 -0
- package/src/language/python/module.ts +5 -0
- package/src/language/python/python-builtin.ts +891 -0
- package/src/language/python/python-language-feature.ts +163 -0
- package/src/language-specs.ts +99 -0
- package/src/libro-e2-editor.ts +922 -0
- package/src/libro-e2-preload.ts +23 -0
- package/src/libro-sql-api.ts +20 -0
- package/src/module.ts +44 -0
- package/src/placeholder.ts +100 -0
- package/src/theme/data/jupyter_dark.json +406 -0
- package/src/theme/data/jupyter_hc_dark.json +385 -0
- package/src/theme/data/jupyter_hc_light.json +386 -0
- package/src/theme/data/jupyter_light.json +386 -0
- package/src/theme/data/libro_dark.json +186 -0
- package/src/theme/data/libro_light.json +170 -0
- package/src/theme/libro-python-theme-contribution.ts +36 -0
- package/src/theme/module.ts +5 -0
- package/src/types.ts +11 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
var _dec, _class;
|
|
2
|
+
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; }
|
|
3
|
+
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); } }
|
|
4
|
+
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); }); }; }
|
|
5
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
6
|
+
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); } }
|
|
7
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
8
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
9
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
10
|
+
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); }
|
|
11
|
+
import { InitializeContribution, LanguageOptionsRegistry, SnippetSuggestContribution } from '@difizen/libro-cofine-editor-core';
|
|
12
|
+
import { LanguageGrammarDefinitionContribution } from '@difizen/libro-cofine-textmate';
|
|
13
|
+
import { inject, singleton } from '@difizen/mana-app';
|
|
14
|
+
import { languages } from '@difizen/monaco-editor-core';
|
|
15
|
+
import * as monaco from '@difizen/monaco-editor-core';
|
|
16
|
+
import pythonGrammar from "./data/MagicPython.tmLanguage.json";
|
|
17
|
+
import regExpGrammar from "./data/MagicRegExp.tmLanguage.json";
|
|
18
|
+
import snippetsJson from "./data/snippets/python.snippets.json";
|
|
19
|
+
export function isPythonLanguageOption(data) {
|
|
20
|
+
return data && _typeof(data) === 'object' && 'lspHost' in data;
|
|
21
|
+
}
|
|
22
|
+
var langRegisted = false;
|
|
23
|
+
var grammerRegisted = false;
|
|
24
|
+
export var PythonContribution = (_dec = singleton({
|
|
25
|
+
contrib: [LanguageGrammarDefinitionContribution, SnippetSuggestContribution, InitializeContribution]
|
|
26
|
+
}), _dec(_class = /*#__PURE__*/function () {
|
|
27
|
+
function PythonContribution(optionsResgistry) {
|
|
28
|
+
_classCallCheck(this, PythonContribution);
|
|
29
|
+
this.id = 'python';
|
|
30
|
+
this.config = {
|
|
31
|
+
comments: {
|
|
32
|
+
lineComment: '#'
|
|
33
|
+
},
|
|
34
|
+
brackets: [['{', '}'], ['[', ']'], ['(', ')']],
|
|
35
|
+
autoClosingPairs: [{
|
|
36
|
+
open: '[',
|
|
37
|
+
close: ']'
|
|
38
|
+
}, {
|
|
39
|
+
open: '{',
|
|
40
|
+
close: '}'
|
|
41
|
+
}, {
|
|
42
|
+
open: '(',
|
|
43
|
+
close: ')'
|
|
44
|
+
}, {
|
|
45
|
+
open: "'",
|
|
46
|
+
close: "'",
|
|
47
|
+
notIn: ['string', 'comment']
|
|
48
|
+
}, {
|
|
49
|
+
open: '"',
|
|
50
|
+
close: '"',
|
|
51
|
+
notIn: ['string']
|
|
52
|
+
}],
|
|
53
|
+
surroundingPairs: [{
|
|
54
|
+
open: '{',
|
|
55
|
+
close: '}'
|
|
56
|
+
}, {
|
|
57
|
+
open: '[',
|
|
58
|
+
close: ']'
|
|
59
|
+
}, {
|
|
60
|
+
open: '(',
|
|
61
|
+
close: ')'
|
|
62
|
+
}, {
|
|
63
|
+
open: '"',
|
|
64
|
+
close: '"'
|
|
65
|
+
}, {
|
|
66
|
+
open: "'",
|
|
67
|
+
close: "'"
|
|
68
|
+
}],
|
|
69
|
+
folding: {
|
|
70
|
+
markers: {
|
|
71
|
+
start: new RegExp('^\\s*#pragma\\s+region\\b'),
|
|
72
|
+
end: new RegExp('^\\s*#pragma\\s+endregion\\b')
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
onEnterRules: [{
|
|
76
|
+
beforeText: /^\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async).*?:\s*$/,
|
|
77
|
+
action: {
|
|
78
|
+
indentAction: languages.IndentAction.Indent
|
|
79
|
+
}
|
|
80
|
+
}]
|
|
81
|
+
};
|
|
82
|
+
this.isDisposed = false;
|
|
83
|
+
this.optionsResgistry = optionsResgistry;
|
|
84
|
+
}
|
|
85
|
+
PythonContribution = inject(LanguageOptionsRegistry)(PythonContribution, undefined, 0) || PythonContribution;
|
|
86
|
+
_createClass(PythonContribution, [{
|
|
87
|
+
key: "onInitialize",
|
|
88
|
+
value: function onInitialize() {
|
|
89
|
+
var _this = this;
|
|
90
|
+
monaco.languages.register({
|
|
91
|
+
id: this.id,
|
|
92
|
+
extensions: ['.py', '.rpy', '.pyw', '.cpy', '.gyp', '.gypi', '.snakefile', '.smk'],
|
|
93
|
+
aliases: ['Python', 'py'],
|
|
94
|
+
firstLine: '^#!\\s*/.*\\bpython[0-9.-]*\\b'
|
|
95
|
+
});
|
|
96
|
+
monaco.languages.onLanguage(this.id, function () {
|
|
97
|
+
_this.registerLanguageFeature();
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}, {
|
|
101
|
+
key: "registerLanguageFeature",
|
|
102
|
+
value: function registerLanguageFeature() {
|
|
103
|
+
if (langRegisted) {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
langRegisted = true;
|
|
107
|
+
monaco.languages.setLanguageConfiguration(this.id, this.config);
|
|
108
|
+
}
|
|
109
|
+
}, {
|
|
110
|
+
key: "registerSnippetSuggest",
|
|
111
|
+
value: function registerSnippetSuggest(registry) {
|
|
112
|
+
registry.fromJSON(snippetsJson, {
|
|
113
|
+
language: [this.id],
|
|
114
|
+
source: 'Python Language'
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}, {
|
|
118
|
+
key: "registerTextmateLanguage",
|
|
119
|
+
value: function registerTextmateLanguage(registry) {
|
|
120
|
+
if (grammerRegisted) {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
grammerRegisted = true;
|
|
124
|
+
registry.registerTextmateGrammarScope('source.python', {
|
|
125
|
+
getGrammarDefinition: function getGrammarDefinition() {
|
|
126
|
+
return _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
|
+
return _context.abrupt("return", {
|
|
131
|
+
format: 'json',
|
|
132
|
+
content: pythonGrammar
|
|
133
|
+
});
|
|
134
|
+
case 1:
|
|
135
|
+
case "end":
|
|
136
|
+
return _context.stop();
|
|
137
|
+
}
|
|
138
|
+
}, _callee);
|
|
139
|
+
}))();
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
registry.registerTextmateGrammarScope('source.regexp.python', {
|
|
143
|
+
getGrammarDefinition: function getGrammarDefinition() {
|
|
144
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
145
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
146
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
147
|
+
case 0:
|
|
148
|
+
return _context2.abrupt("return", {
|
|
149
|
+
format: 'json',
|
|
150
|
+
content: regExpGrammar
|
|
151
|
+
});
|
|
152
|
+
case 1:
|
|
153
|
+
case "end":
|
|
154
|
+
return _context2.stop();
|
|
155
|
+
}
|
|
156
|
+
}, _callee2);
|
|
157
|
+
}))();
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
registry.mapLanguageIdToTextmateGrammar(this.id, 'source.python');
|
|
161
|
+
}
|
|
162
|
+
}, {
|
|
163
|
+
key: "disposed",
|
|
164
|
+
get: function get() {
|
|
165
|
+
return this.isDisposed;
|
|
166
|
+
}
|
|
167
|
+
}, {
|
|
168
|
+
key: "dispose",
|
|
169
|
+
value: function dispose() {
|
|
170
|
+
this.isDisposed = false;
|
|
171
|
+
}
|
|
172
|
+
}]);
|
|
173
|
+
return PythonContribution;
|
|
174
|
+
}()) || _class);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Contribution } from '@difizen/mana-app';
|
|
2
|
+
import { ApplicationContribution } from '@difizen/mana-app';
|
|
3
|
+
import { Syringe } from '@difizen/mana-app';
|
|
4
|
+
import type { LibroE2Editor, LibroE2EditorConfig } from './libro-e2-editor.js';
|
|
5
|
+
import { LibroSQLRequestAPI } from './libro-sql-api.js';
|
|
6
|
+
export declare const LanguageSpecContribution: Syringe.DefinedToken;
|
|
7
|
+
export interface LanguageSpecContribution {
|
|
8
|
+
registerLanguageSpec: (register: LanguageSpecRegistry) => void;
|
|
9
|
+
}
|
|
10
|
+
export interface LanguageSpec {
|
|
11
|
+
name: string;
|
|
12
|
+
language: string;
|
|
13
|
+
mime: string;
|
|
14
|
+
ext: string[];
|
|
15
|
+
loadModule?: (container: Syringe.Container) => Promise<void>;
|
|
16
|
+
beforeEditorInit?: () => Promise<void>;
|
|
17
|
+
editorConfig?: Partial<LibroE2EditorConfig>;
|
|
18
|
+
afterEditorInit?: (editor: LibroE2Editor) => Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
export declare class LanguageSpecRegistry implements ApplicationContribution {
|
|
21
|
+
get languageSpecs(): LanguageSpec[];
|
|
22
|
+
protected languageSpecsData: LanguageSpec[];
|
|
23
|
+
protected readonly languageSpecProvider: Contribution.Provider<LanguageSpecContribution>;
|
|
24
|
+
constructor(languageSpecProvider: Contribution.Provider<LanguageSpecContribution>);
|
|
25
|
+
initialize(): void;
|
|
26
|
+
registerLanguageSpec(spec: LanguageSpec): void;
|
|
27
|
+
hasLanguage(spec: LanguageSpec): boolean;
|
|
28
|
+
}
|
|
29
|
+
export declare class LibroLanguageSpecs implements LanguageSpecContribution {
|
|
30
|
+
protected readonly dataphinAPI: LibroSQLRequestAPI;
|
|
31
|
+
registerLanguageSpec: (register: LanguageSpecRegistry) => void;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=language-specs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"language-specs.d.ts","sourceRoot":"","sources":["../src/language-specs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAA8B,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAExE,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,eAAO,MAAM,wBAAwB,sBAAkD,CAAC;AACxF,MAAM,WAAW,wBAAwB;IACvC,oBAAoB,EAAE,CAAC,QAAQ,EAAE,oBAAoB,KAAK,IAAI,CAAC;CAChE;AACD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,EAAE,CAAC;IACd,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7D,gBAAgB,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,YAAY,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC5C,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5D;AAED,qBACa,oBAAqB,YAAW,uBAAuB;IAClE,IAAI,aAAa,IAAI,YAAY,EAAE,CAElC;IACD,SAAS,CAAC,iBAAiB,EAAE,YAAY,EAAE,CAAM;IAEjD,SAAS,CAAC,QAAQ,CAAC,oBAAoB,EAAE,YAAY,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAAC;gBAIvF,oBAAoB,EAAE,YAAY,CAAC,QAAQ,CAAC,wBAAwB,CAAC;IAKvE,UAAU;IAMV,oBAAoB,CAAC,IAAI,EAAE,YAAY;IAWvC,WAAW,CAAC,IAAI,EAAE,YAAY;CAK/B;AAED,qBACa,kBAAmB,YAAW,wBAAwB;IAEjE,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,kBAAkB,CAAC;IAEnD,oBAAoB,aAAc,oBAAoB,UA8BpD;CACH"}
|
|
@@ -0,0 +1,115 @@
|
|
|
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, _dec2, _dec3, _class3, _class4, _descriptor;
|
|
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 _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
|
|
7
|
+
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
|
|
8
|
+
function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }
|
|
9
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
10
|
+
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); } }
|
|
11
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
12
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
13
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
14
|
+
import { ApplicationContribution } from '@difizen/mana-app';
|
|
15
|
+
import { contrib, inject, singleton, Syringe } from '@difizen/mana-app';
|
|
16
|
+
import { LibroSQLRequestAPI } from "./libro-sql-api.js";
|
|
17
|
+
export var LanguageSpecContribution = Syringe.defineToken('LanguageSpecContribution');
|
|
18
|
+
export var LanguageSpecRegistry = (_dec = singleton({
|
|
19
|
+
contrib: [ApplicationContribution]
|
|
20
|
+
}), _dec(_class = /*#__PURE__*/function () {
|
|
21
|
+
function LanguageSpecRegistry(languageSpecProvider) {
|
|
22
|
+
_classCallCheck(this, LanguageSpecRegistry);
|
|
23
|
+
this.languageSpecsData = [];
|
|
24
|
+
this.languageSpecProvider = languageSpecProvider;
|
|
25
|
+
}
|
|
26
|
+
LanguageSpecRegistry = contrib(LanguageSpecContribution)(LanguageSpecRegistry, undefined, 0) || LanguageSpecRegistry;
|
|
27
|
+
_createClass(LanguageSpecRegistry, [{
|
|
28
|
+
key: "languageSpecs",
|
|
29
|
+
get: function get() {
|
|
30
|
+
return this.languageSpecsData;
|
|
31
|
+
}
|
|
32
|
+
}, {
|
|
33
|
+
key: "initialize",
|
|
34
|
+
value: function initialize() {
|
|
35
|
+
var _this = this;
|
|
36
|
+
this.languageSpecProvider.getContributions().forEach(function (item) {
|
|
37
|
+
item.registerLanguageSpec(_this);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}, {
|
|
41
|
+
key: "registerLanguageSpec",
|
|
42
|
+
value: function registerLanguageSpec(spec) {
|
|
43
|
+
var index = this.languageSpecsData.findIndex(function (item) {
|
|
44
|
+
return item.language === spec.language;
|
|
45
|
+
});
|
|
46
|
+
if (index >= 0) {
|
|
47
|
+
this.languageSpecsData.splice(index, 1, spec);
|
|
48
|
+
} else {
|
|
49
|
+
this.languageSpecsData.push(spec);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}, {
|
|
53
|
+
key: "hasLanguage",
|
|
54
|
+
value: function hasLanguage(spec) {
|
|
55
|
+
return this.languageSpecsData.findIndex(function (item) {
|
|
56
|
+
return item.language === spec.language;
|
|
57
|
+
}) > 0;
|
|
58
|
+
}
|
|
59
|
+
}]);
|
|
60
|
+
return LanguageSpecRegistry;
|
|
61
|
+
}()) || _class);
|
|
62
|
+
export var LibroLanguageSpecs = (_dec2 = singleton({
|
|
63
|
+
contrib: [LanguageSpecContribution]
|
|
64
|
+
}), _dec3 = inject(LibroSQLRequestAPI), _dec2(_class3 = (_class4 = /*#__PURE__*/_createClass(function LibroLanguageSpecs() {
|
|
65
|
+
_classCallCheck(this, LibroLanguageSpecs);
|
|
66
|
+
_initializerDefineProperty(this, "dataphinAPI", _descriptor, this);
|
|
67
|
+
this.registerLanguageSpec = function (register) {
|
|
68
|
+
register.registerLanguageSpec({
|
|
69
|
+
name: 'Python',
|
|
70
|
+
language: 'python',
|
|
71
|
+
ext: ['.py'],
|
|
72
|
+
mime: 'text/x-python',
|
|
73
|
+
editorConfig: {}
|
|
74
|
+
});
|
|
75
|
+
register.registerLanguageSpec({
|
|
76
|
+
name: 'SQL',
|
|
77
|
+
mime: 'application/vnd.libro.sql+json',
|
|
78
|
+
language: 'sql-odps',
|
|
79
|
+
ext: ['.sql'],
|
|
80
|
+
editorConfig: {},
|
|
81
|
+
beforeEditorInit: function () {
|
|
82
|
+
var _beforeEditorInit = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
83
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
84
|
+
while (1) switch (_context.prev = _context.next) {
|
|
85
|
+
case 0:
|
|
86
|
+
case "end":
|
|
87
|
+
return _context.stop();
|
|
88
|
+
}
|
|
89
|
+
}, _callee);
|
|
90
|
+
}));
|
|
91
|
+
function beforeEditorInit() {
|
|
92
|
+
return _beforeEditorInit.apply(this, arguments);
|
|
93
|
+
}
|
|
94
|
+
return beforeEditorInit;
|
|
95
|
+
}()
|
|
96
|
+
});
|
|
97
|
+
register.registerLanguageSpec({
|
|
98
|
+
name: 'Markdown',
|
|
99
|
+
language: 'markdown',
|
|
100
|
+
mime: 'text/x-markdown',
|
|
101
|
+
ext: ['md', 'markdown', 'mkd']
|
|
102
|
+
});
|
|
103
|
+
register.registerLanguageSpec({
|
|
104
|
+
name: 'Prompt',
|
|
105
|
+
language: 'markdown',
|
|
106
|
+
mime: 'application/vnd.libro.prompt+json',
|
|
107
|
+
ext: ['md', 'markdown', 'mkd']
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
}), (_descriptor = _applyDecoratedDescriptor(_class4.prototype, "dataphinAPI", [_dec3], {
|
|
111
|
+
configurable: true,
|
|
112
|
+
enumerable: true,
|
|
113
|
+
writable: true,
|
|
114
|
+
initializer: null
|
|
115
|
+
})), _class4)) || _class3);
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import type { CodeEditorFactory, CompletionProvider, ICoordinate, IEditor, IEditorConfig, IEditorOptions, IModel, IPosition, IRange, SearchMatch, TooltipProvider } from '@difizen/libro-code-editor';
|
|
2
|
+
import type { E2Editor } from '@difizen/libro-cofine-editor-core';
|
|
3
|
+
import type { LSPProvider } from '@difizen/libro-lsp';
|
|
4
|
+
import { CommandRegistry, ThemeService } from '@difizen/mana-app';
|
|
5
|
+
import { DisposableCollection, Emitter } from '@difizen/mana-app';
|
|
6
|
+
import 'resize-observer-polyfill';
|
|
7
|
+
import { LSPContribution } from './language/lsp/lsp-contribution.js';
|
|
8
|
+
import { LanguageSpecRegistry } from './language-specs.js';
|
|
9
|
+
import { PlaceholderContentWidget } from './placeholder.js';
|
|
10
|
+
import type { MonacoEditorOptions, MonacoEditorType, MonacoMatch } from './types.js';
|
|
11
|
+
import './index.less';
|
|
12
|
+
export interface LibroE2EditorConfig extends IEditorConfig {
|
|
13
|
+
/**
|
|
14
|
+
* The mode to use.
|
|
15
|
+
*/
|
|
16
|
+
mode?: string;
|
|
17
|
+
/**
|
|
18
|
+
* content mimetype
|
|
19
|
+
*/
|
|
20
|
+
mimetype?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Whether to use the context-sensitive indentation that the mode provides
|
|
23
|
+
* (or just indent the same as the line before).
|
|
24
|
+
*/
|
|
25
|
+
smartIndent?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Configures whether the editor should re-indent the current line when a
|
|
28
|
+
* character is typed that might change its proper indentation
|
|
29
|
+
* (only works if the mode supports indentation).
|
|
30
|
+
*/
|
|
31
|
+
electricChars?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Configures the keymap to use. The default is "default", which is the
|
|
34
|
+
* only keymap defined in codemirror.js itself.
|
|
35
|
+
* Extra keymaps are found in the CodeMirror keymap directory.
|
|
36
|
+
*/
|
|
37
|
+
keyMap?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Can be used to specify extra keybindings for the editor, alongside the
|
|
40
|
+
* ones defined by keyMap. Should be either null, or a valid keymap value.
|
|
41
|
+
*/
|
|
42
|
+
/**
|
|
43
|
+
* Can be used to add extra gutters (beyond or instead of the line number
|
|
44
|
+
* gutter).
|
|
45
|
+
* Should be an array of CSS class names, each of which defines a width
|
|
46
|
+
* (and optionally a background),
|
|
47
|
+
* and which will be used to draw the background of the gutters.
|
|
48
|
+
* May include the CodeMirror-linenumbers class, in order to explicitly
|
|
49
|
+
* set the position of the line number gutter
|
|
50
|
+
* (it will default to be to the right of all other gutters).
|
|
51
|
+
* These class names are the keys passed to setGutterMarker.
|
|
52
|
+
*/
|
|
53
|
+
gutters?: string[];
|
|
54
|
+
/**
|
|
55
|
+
* Determines whether the gutter scrolls along with the content
|
|
56
|
+
* horizontally (false)
|
|
57
|
+
* or whether it stays fixed during horizontal scrolling (true,
|
|
58
|
+
* the default).
|
|
59
|
+
*/
|
|
60
|
+
fixedGutter?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Whether the cursor should be drawn when a selection is active.
|
|
63
|
+
*/
|
|
64
|
+
showCursorWhenSelecting?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* When fixedGutter is on, and there is a horizontal scrollbar, by default
|
|
67
|
+
* the gutter will be visible to the left of this scrollbar. If this
|
|
68
|
+
* option is set to true, it will be covered by an element with class
|
|
69
|
+
* CodeMirror-gutter-filler.
|
|
70
|
+
*/
|
|
71
|
+
coverGutterNextToScrollbar?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Controls whether drag-and-drop is enabled.
|
|
74
|
+
*/
|
|
75
|
+
dragDrop?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Explicitly set the line separator for the editor.
|
|
78
|
+
* By default (value null), the document will be split on CRLFs as well as
|
|
79
|
+
* lone CRs and LFs, and a single LF will be used as line separator in all
|
|
80
|
+
* output (such as getValue). When a specific string is given, lines will
|
|
81
|
+
* only be split on that string, and output will, by default, use that
|
|
82
|
+
* same separator.
|
|
83
|
+
*/
|
|
84
|
+
lineSeparator?: string | null;
|
|
85
|
+
/**
|
|
86
|
+
* Chooses a scrollbar implementation. The default is "native", showing
|
|
87
|
+
* native scrollbars. The core library also provides the "null" style,
|
|
88
|
+
* which completely hides the scrollbars. Addons can implement additional
|
|
89
|
+
* scrollbar models.
|
|
90
|
+
*/
|
|
91
|
+
scrollbarStyle?: string;
|
|
92
|
+
/**
|
|
93
|
+
* When enabled, which is the default, doing copy or cut when there is no
|
|
94
|
+
* selection will copy or cut the whole lines that have cursors on them.
|
|
95
|
+
*/
|
|
96
|
+
lineWiseCopyCut?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Whether to scroll past the end of the buffer.
|
|
99
|
+
*/
|
|
100
|
+
scrollPastEnd?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Whether to give the wrapper of the line that contains the cursor the class
|
|
103
|
+
* cm-activeLine.
|
|
104
|
+
*/
|
|
105
|
+
styleActiveLine?: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Whether to causes the selected text to be marked with the CSS class
|
|
108
|
+
* CodeMirror-selectedtext. Useful to change the colour of the selection
|
|
109
|
+
* (in addition to the background).
|
|
110
|
+
*/
|
|
111
|
+
styleSelectedText?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Defines the mouse cursor appearance when hovering over the selection.
|
|
114
|
+
* It can be set to a string, like "pointer", or to true,
|
|
115
|
+
* in which case the "default" (arrow) cursor will be used.
|
|
116
|
+
*/
|
|
117
|
+
selectionPointer?: boolean | string;
|
|
118
|
+
highlightActiveLineGutter?: boolean;
|
|
119
|
+
highlightSpecialChars?: boolean;
|
|
120
|
+
history?: boolean;
|
|
121
|
+
drawSelection?: boolean;
|
|
122
|
+
dropCursor?: boolean;
|
|
123
|
+
allowMultipleSelections?: boolean;
|
|
124
|
+
autocompletion?: boolean;
|
|
125
|
+
rectangularSelection?: boolean;
|
|
126
|
+
crosshairCursor?: boolean;
|
|
127
|
+
highlightSelectionMatches?: boolean;
|
|
128
|
+
foldGutter?: boolean;
|
|
129
|
+
syntaxHighlighting?: boolean;
|
|
130
|
+
/**
|
|
131
|
+
* 是否从kernel获取completion
|
|
132
|
+
*/
|
|
133
|
+
jupyterKernelCompletion?: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* 是否从kernel获取tooltip
|
|
136
|
+
*/
|
|
137
|
+
jupyterKernelTooltip?: boolean;
|
|
138
|
+
indentationMarkers?: boolean;
|
|
139
|
+
hyperLink?: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* 是否开启tab触发completion和tooltip
|
|
142
|
+
*/
|
|
143
|
+
tabEditorFunction?: boolean;
|
|
144
|
+
lspCompletion?: boolean;
|
|
145
|
+
lspTooltip?: boolean;
|
|
146
|
+
lspLint?: boolean;
|
|
147
|
+
placeholder?: HTMLElement | string;
|
|
148
|
+
}
|
|
149
|
+
export declare const LibroE2EditorOptions: unique symbol;
|
|
150
|
+
export interface LibroE2EditorOptions extends IEditorOptions {
|
|
151
|
+
lspProvider?: LSPProvider;
|
|
152
|
+
/**
|
|
153
|
+
* The configuration options for the editor.
|
|
154
|
+
*/
|
|
155
|
+
config?: Partial<LibroE2EditorConfig>;
|
|
156
|
+
}
|
|
157
|
+
export declare const libroE2DefaultConfig: Required<LibroE2EditorConfig>;
|
|
158
|
+
export declare const LibroE2EditorFactory: unique symbol;
|
|
159
|
+
export type LibroE2EditorFactory = CodeEditorFactory;
|
|
160
|
+
export declare const E2EditorClassname = "libro-e2-editor";
|
|
161
|
+
export declare const LibroE2URIScheme = "libro-e2";
|
|
162
|
+
export declare class LibroE2Editor implements IEditor {
|
|
163
|
+
protected readonly themeService: ThemeService;
|
|
164
|
+
protected readonly languageSpecRegistry: LanguageSpecRegistry;
|
|
165
|
+
protected readonly commandRegistry: CommandRegistry;
|
|
166
|
+
protected lspContribution: LSPContribution;
|
|
167
|
+
protected defaultLineHeight: number;
|
|
168
|
+
protected toDispose: DisposableCollection;
|
|
169
|
+
/**
|
|
170
|
+
* The DOM node that hosts the editor.
|
|
171
|
+
*/
|
|
172
|
+
readonly host: HTMLElement;
|
|
173
|
+
/**
|
|
174
|
+
* The DOM node that hosts the monaco editor.
|
|
175
|
+
*/
|
|
176
|
+
readonly editorHost: HTMLElement;
|
|
177
|
+
protected placeholder: PlaceholderContentWidget;
|
|
178
|
+
protected oldDeltaDecorations: string[];
|
|
179
|
+
protected _config: LibroE2EditorConfig;
|
|
180
|
+
private resizeObserver;
|
|
181
|
+
protected _uuid: string;
|
|
182
|
+
/**
|
|
183
|
+
* The uuid of this editor;
|
|
184
|
+
*/
|
|
185
|
+
get uuid(): string;
|
|
186
|
+
set uuid(value: string);
|
|
187
|
+
protected _model: IModel;
|
|
188
|
+
/**
|
|
189
|
+
* Returns a model for this editor.
|
|
190
|
+
*/
|
|
191
|
+
get model(): IModel;
|
|
192
|
+
protected _editor?: E2Editor<MonacoEditorType>;
|
|
193
|
+
get editor(): E2Editor<MonacoEditorType> | undefined;
|
|
194
|
+
get monacoEditor(): MonacoEditorType | undefined;
|
|
195
|
+
get lineCount(): number;
|
|
196
|
+
lspProvider?: LSPProvider;
|
|
197
|
+
completionProvider?: CompletionProvider;
|
|
198
|
+
tooltipProvider?: TooltipProvider;
|
|
199
|
+
protected isLayouting: boolean;
|
|
200
|
+
constructor(options: LibroE2EditorOptions, themeService: ThemeService, languageSpecRegistry: LanguageSpecRegistry);
|
|
201
|
+
get languageSpec(): import("./language-specs.js").LanguageSpec | undefined;
|
|
202
|
+
get theme(): string;
|
|
203
|
+
protected toMonacoOptions(editorConfig: Partial<LibroE2EditorConfig>): MonacoEditorOptions;
|
|
204
|
+
protected createEditor(host: HTMLElement, config: LibroE2EditorConfig): Promise<void>;
|
|
205
|
+
protected inspectResize(): void;
|
|
206
|
+
protected getEditorNode(): HTMLDivElement;
|
|
207
|
+
protected updateEditorSize(): void;
|
|
208
|
+
/**
|
|
209
|
+
* 解决e2与libro快捷键冲突
|
|
210
|
+
* @param commandRegistry
|
|
211
|
+
*/
|
|
212
|
+
protected handleCommand(commandRegistry: CommandRegistry): void;
|
|
213
|
+
protected onValueChange(): void;
|
|
214
|
+
protected onSelectionChange(): void;
|
|
215
|
+
protected onThemeChange: () => void;
|
|
216
|
+
/**
|
|
217
|
+
* Handles a mime type change.
|
|
218
|
+
* 切换语言
|
|
219
|
+
* cell 切换没走这里
|
|
220
|
+
*/
|
|
221
|
+
protected onMimeTypeChanged(): void;
|
|
222
|
+
/**
|
|
223
|
+
* Handles a cursor activity event.
|
|
224
|
+
*/
|
|
225
|
+
protected onCursorActivity(): void;
|
|
226
|
+
getOption<K extends keyof LibroE2EditorConfig>(option: K): LibroE2EditorConfig[K];
|
|
227
|
+
/**
|
|
228
|
+
*
|
|
229
|
+
* @param option
|
|
230
|
+
* @param value
|
|
231
|
+
*/
|
|
232
|
+
setOption: <K extends keyof LibroE2EditorConfig>(option: K, value: LibroE2EditorConfig[K]) => void;
|
|
233
|
+
getLine: (line: number) => string | undefined;
|
|
234
|
+
getOffsetAt: (position: IPosition) => number;
|
|
235
|
+
undo: () => void;
|
|
236
|
+
redo: () => void;
|
|
237
|
+
focus: () => void;
|
|
238
|
+
hasFocus: () => boolean;
|
|
239
|
+
blur: () => void;
|
|
240
|
+
resizeToFit: () => void;
|
|
241
|
+
getPositionForCoordinate: (coordinate: ICoordinate) => null;
|
|
242
|
+
protected modalChangeEmitter: Emitter<boolean>;
|
|
243
|
+
get onModalChange(): import("@difizen/mana-app").Event<boolean>;
|
|
244
|
+
protected toMonacoRange(range: IRange): {
|
|
245
|
+
startLineNumber: number;
|
|
246
|
+
startColumn: number;
|
|
247
|
+
endLineNumber: number;
|
|
248
|
+
endColumn: number;
|
|
249
|
+
};
|
|
250
|
+
getSelectionValue: (range?: IRange | undefined) => string | undefined;
|
|
251
|
+
getPositionAt: (offset: number) => IPosition | undefined;
|
|
252
|
+
protected toMonacoMatch(match: SearchMatch): MonacoMatch;
|
|
253
|
+
replaceSelection: (text: string, range: IRange) => void;
|
|
254
|
+
replaceSelections: (edits: {
|
|
255
|
+
text: string;
|
|
256
|
+
range: IRange;
|
|
257
|
+
}[]) => void;
|
|
258
|
+
getCursorPosition: () => IPosition;
|
|
259
|
+
setCursorPosition: (position: IPosition) => void;
|
|
260
|
+
getSelection: () => {
|
|
261
|
+
start: IPosition;
|
|
262
|
+
end: IPosition;
|
|
263
|
+
};
|
|
264
|
+
setSelection: (selection: IRange) => void;
|
|
265
|
+
getSelections: () => IRange[];
|
|
266
|
+
setSelections: (selections: IRange[]) => void;
|
|
267
|
+
revealSelection: (selection: IRange) => void;
|
|
268
|
+
highlightMatches: (matches: SearchMatch[], currentIndex: number | undefined) => void;
|
|
269
|
+
protected _isDisposed: boolean;
|
|
270
|
+
/**
|
|
271
|
+
* Tests whether the editor is disposed.
|
|
272
|
+
*/
|
|
273
|
+
get disposed(): boolean;
|
|
274
|
+
dispose(): void;
|
|
275
|
+
protected disposeResizeObserver: () => void;
|
|
276
|
+
}
|
|
277
|
+
//# sourceMappingURL=libro-e2-editor.d.ts.map
|
|
@@ -0,0 +1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