@difizen/libro-code-editor 0.1.1 → 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.
Files changed (42) hide show
  1. package/es/code-editor-info-manager.d.ts +7 -0
  2. package/es/code-editor-info-manager.d.ts.map +1 -0
  3. package/es/code-editor-info-manager.js +32 -0
  4. package/es/code-editor-manager.d.ts +67 -0
  5. package/es/code-editor-manager.d.ts.map +1 -0
  6. package/es/code-editor-manager.js +130 -0
  7. package/es/{model.d.ts → code-editor-model.d.ts} +2 -2
  8. package/es/code-editor-model.d.ts.map +1 -0
  9. package/es/{model.js → code-editor-model.js} +1 -3
  10. package/es/{code-editor.d.ts → code-editor-protocol.d.ts} +70 -145
  11. package/es/code-editor-protocol.d.ts.map +1 -0
  12. package/es/{code-editor.js → code-editor-protocol.js} +17 -15
  13. package/es/code-editor-settings.d.ts +34 -0
  14. package/es/code-editor-settings.d.ts.map +1 -0
  15. package/es/code-editor-settings.js +225 -0
  16. package/es/code-editor-view.d.ts +26 -14
  17. package/es/code-editor-view.d.ts.map +1 -1
  18. package/es/code-editor-view.js +108 -72
  19. package/es/index.d.ts +5 -3
  20. package/es/index.d.ts.map +1 -1
  21. package/es/index.js +6 -4
  22. package/es/mimetype.d.ts.map +1 -1
  23. package/es/mimetype.js +3 -0
  24. package/es/module.d.ts.map +1 -1
  25. package/es/module.js +5 -2
  26. package/package.json +4 -5
  27. package/src/code-editor-info-manager.ts +25 -0
  28. package/src/code-editor-manager.ts +86 -0
  29. package/src/{model.ts → code-editor-model.ts} +4 -4
  30. package/src/{code-editor.ts → code-editor-protocol.ts} +136 -189
  31. package/src/code-editor-settings.ts +214 -0
  32. package/src/code-editor-view.tsx +93 -49
  33. package/src/index.spec.ts +1 -3
  34. package/src/index.ts +5 -3
  35. package/src/mimetype.ts +3 -0
  36. package/src/module.ts +13 -2
  37. package/es/code-editor.d.ts.map +0 -1
  38. package/es/completer/completer-protocol.d.ts +0 -210
  39. package/es/completer/completer-protocol.d.ts.map +0 -1
  40. package/es/completer/completer-protocol.js +0 -34
  41. package/es/model.d.ts.map +0 -1
  42. package/src/completer/completer-protocol.ts +0 -259
@@ -0,0 +1,7 @@
1
+ export declare class CodeEditorInfoManager {
2
+ editorHostRefMap: Map<string, any>;
3
+ constructor();
4
+ setEditorHostRef(id: string, ref: any): void;
5
+ getEditorHostRef(id: string): any;
6
+ }
7
+ //# sourceMappingURL=code-editor-info-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code-editor-info-manager.d.ts","sourceRoot":"","sources":["../src/code-editor-info-manager.ts"],"names":[],"mappings":"AAEA,qBACa,qBAAqB;IAChC,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;;IAMnC,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG;IAQrC,gBAAgB,CAAC,EAAE,EAAE,MAAM;CAM5B"}
@@ -0,0 +1,32 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _dec, _class;
3
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
5
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
6
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
+ 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); }
8
+ import { singleton } from '@difizen/mana-app';
9
+ export var CodeEditorInfoManager = (_dec = singleton(), _dec(_class = /*#__PURE__*/function () {
10
+ function CodeEditorInfoManager() {
11
+ _classCallCheck(this, CodeEditorInfoManager);
12
+ this.editorHostRefMap = new Map();
13
+ }
14
+ _createClass(CodeEditorInfoManager, [{
15
+ key: "setEditorHostRef",
16
+ value: function setEditorHostRef(id, ref) {
17
+ if (!this.editorHostRefMap) {
18
+ this.editorHostRefMap = new Map();
19
+ }
20
+ this.editorHostRefMap.set(id, ref);
21
+ }
22
+ }, {
23
+ key: "getEditorHostRef",
24
+ value: function getEditorHostRef(id) {
25
+ if (!this.editorHostRefMap) {
26
+ return undefined;
27
+ }
28
+ return this.editorHostRefMap.get(id);
29
+ }
30
+ }]);
31
+ return CodeEditorInfoManager;
32
+ }()) || _class);
@@ -0,0 +1,67 @@
1
+ import type { Contribution } from '@difizen/mana-app';
2
+ import { ViewManager, Syringe } 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 { IEditor, IEditorConfig, IEditorOptions } from './code-editor-protocol.js';
6
+ import { CodeEditorSettings } from './code-editor-settings.js';
7
+ import type { CodeEditorViewOptions } from './code-editor-view.js';
8
+ import { CodeEditorView } from './code-editor-view.js';
9
+ /**
10
+ * A factory used to create a code editor.
11
+ */
12
+ export type CodeEditorFactory = (options: IEditorOptions) => IEditor;
13
+ export declare const CodeEditorContribution: Syringe.DefinedToken;
14
+ export interface CodeEditorContribution {
15
+ canHandle(mime: string): number;
16
+ factory: CodeEditorFactory;
17
+ defaultConfig: IEditorConfig;
18
+ }
19
+ export declare class CodeEditorManager {
20
+ protected readonly codeEditorProvider: Contribution.Provider<CodeEditorContribution>;
21
+ protected readonly viewManager: ViewManager;
22
+ protected codeEditorInfoManager: CodeEditorInfoManager;
23
+ protected readonly codeEditorSettings: CodeEditorSettings;
24
+ setEditorHostRef(id: string, ref: any): void;
25
+ protected findCodeEditorProvider(model: IModel): CodeEditorContribution;
26
+ /**
27
+ * 获取默认配置
28
+ * @param model
29
+ * @returns
30
+ */
31
+ getEditorDefaultConfig(model: IModel): IEditorConfig;
32
+ /**
33
+ * 用户配置+默认配置(还有一部分配置在cell中指定)
34
+ * @param model
35
+ * @returns
36
+ */
37
+ getUserEditorConfig(model: IModel): {
38
+ theme: import("./code-editor-protocol.js").EditorTheme;
39
+ cursorBlinkRate: number;
40
+ fontFamily: string | null;
41
+ fontSize: number | null;
42
+ lineHeight: number | null;
43
+ lineNumbers: boolean;
44
+ lineWrap: "wordWrapColumn" | "off" | "on" | "bounded";
45
+ readOnly: boolean;
46
+ editable: boolean;
47
+ tabSize: number;
48
+ insertSpaces: boolean;
49
+ matchBrackets: boolean;
50
+ autoClosingBrackets: boolean;
51
+ handlePaste?: boolean | undefined;
52
+ wordWrapColumn: number;
53
+ rulers: number[];
54
+ codeFolding: boolean;
55
+ showTrailingSpace: boolean;
56
+ foldGutter?: boolean | undefined;
57
+ styleActiveLine?: boolean | undefined;
58
+ highlightActiveLineGutter?: boolean | undefined;
59
+ placeholder?: string | HTMLElement | undefined;
60
+ lspEnabled: boolean;
61
+ paddingTop: number;
62
+ paddingBottom: number;
63
+ scrollBarHeight: number;
64
+ };
65
+ getOrCreateEditorView(option: CodeEditorViewOptions): Promise<CodeEditorView>;
66
+ }
67
+ //# sourceMappingURL=code-editor-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code-editor-manager.d.ts","sourceRoot":"","sources":["../src/code-editor-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CA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IAO3B,qBAAqB,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,cAAc,CAAC;CAcpF"}
@@ -0,0 +1,130 @@
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, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
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 ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
7
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
9
+ 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 }); }
10
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
11
+ 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); } }
12
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
13
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
14
+ 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); }
15
+ 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; }
16
+ 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.'); }
17
+ import { Priority, ViewManager, contrib, inject, singleton, Syringe } from '@difizen/mana-app';
18
+ import { CodeEditorInfoManager } from "./code-editor-info-manager.js";
19
+ import { CodeEditorSettings } from "./code-editor-settings.js";
20
+ import { CodeEditorView } from "./code-editor-view.js";
21
+
22
+ /**
23
+ * A factory used to create a code editor.
24
+ */
25
+
26
+ export var CodeEditorContribution = Syringe.defineToken('CodeEditorContribution');
27
+ export var CodeEditorManager = (_dec = singleton(), _dec2 = contrib(CodeEditorContribution), _dec3 = inject(ViewManager), _dec4 = inject(CodeEditorInfoManager), _dec5 = inject(CodeEditorSettings), _dec(_class = (_class2 = /*#__PURE__*/function () {
28
+ function CodeEditorManager() {
29
+ _classCallCheck(this, CodeEditorManager);
30
+ _initializerDefineProperty(this, "codeEditorProvider", _descriptor, this);
31
+ _initializerDefineProperty(this, "viewManager", _descriptor2, this);
32
+ _initializerDefineProperty(this, "codeEditorInfoManager", _descriptor3, this);
33
+ _initializerDefineProperty(this, "codeEditorSettings", _descriptor4, this);
34
+ }
35
+ _createClass(CodeEditorManager, [{
36
+ key: "setEditorHostRef",
37
+ value: function setEditorHostRef(id, ref) {
38
+ this.codeEditorInfoManager.setEditorHostRef(id, ref);
39
+ }
40
+ }, {
41
+ key: "findCodeEditorProvider",
42
+ value: function findCodeEditorProvider(model) {
43
+ var prioritized = Priority.sortSync(this.codeEditorProvider.getContributions(), function (contribution) {
44
+ return contribution.canHandle(model.mimeType);
45
+ });
46
+ var sorted = prioritized.map(function (c) {
47
+ return c.value;
48
+ });
49
+ return sorted[0];
50
+ }
51
+
52
+ /**
53
+ * 获取默认配置
54
+ * @param model
55
+ * @returns
56
+ */
57
+ }, {
58
+ key: "getEditorDefaultConfig",
59
+ value: function getEditorDefaultConfig(model) {
60
+ var _this$findCodeEditorP;
61
+ return (_this$findCodeEditorP = this.findCodeEditorProvider(model)) === null || _this$findCodeEditorP === void 0 ? void 0 : _this$findCodeEditorP.defaultConfig;
62
+ }
63
+
64
+ /**
65
+ * 用户配置+默认配置(还有一部分配置在cell中指定)
66
+ * @param model
67
+ * @returns
68
+ */
69
+ }, {
70
+ key: "getUserEditorConfig",
71
+ value: function getUserEditorConfig(model) {
72
+ return _objectSpread(_objectSpread({}, this.getEditorDefaultConfig(model)), this.codeEditorSettings.getUserEditorSettings());
73
+ }
74
+ }, {
75
+ key: "getOrCreateEditorView",
76
+ value: function () {
77
+ var _getOrCreateEditorView = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(option) {
78
+ var _this$findCodeEditorP2;
79
+ var factory, editorView;
80
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
81
+ while (1) switch (_context.prev = _context.next) {
82
+ case 0:
83
+ factory = (_this$findCodeEditorP2 = this.findCodeEditorProvider(option.model)) === null || _this$findCodeEditorP2 === void 0 ? void 0 : _this$findCodeEditorP2.factory;
84
+ if (factory) {
85
+ _context.next = 3;
86
+ break;
87
+ }
88
+ throw new Error("no code editor found for mimetype: ".concat(option.model.mimeType));
89
+ case 3:
90
+ _context.next = 5;
91
+ return this.viewManager.getOrCreateView(CodeEditorView, _objectSpread({
92
+ factory: factory
93
+ }, option));
94
+ case 5:
95
+ editorView = _context.sent;
96
+ return _context.abrupt("return", editorView);
97
+ case 7:
98
+ case "end":
99
+ return _context.stop();
100
+ }
101
+ }, _callee, this);
102
+ }));
103
+ function getOrCreateEditorView(_x) {
104
+ return _getOrCreateEditorView.apply(this, arguments);
105
+ }
106
+ return getOrCreateEditorView;
107
+ }()
108
+ }]);
109
+ return CodeEditorManager;
110
+ }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "codeEditorProvider", [_dec2], {
111
+ configurable: true,
112
+ enumerable: true,
113
+ writable: true,
114
+ initializer: null
115
+ }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "viewManager", [_dec3], {
116
+ configurable: true,
117
+ enumerable: true,
118
+ writable: true,
119
+ initializer: null
120
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "codeEditorInfoManager", [_dec4], {
121
+ configurable: true,
122
+ enumerable: true,
123
+ writable: true,
124
+ initializer: null
125
+ }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "codeEditorSettings", [_dec5], {
126
+ configurable: true,
127
+ enumerable: true,
128
+ writable: true,
129
+ initializer: null
130
+ })), _class2)) || _class);
@@ -1,7 +1,7 @@
1
1
  import type { CellType } from '@difizen/libro-common';
2
2
  import type { Disposable, Event } from '@difizen/mana-app';
3
3
  import { Emitter } from '@difizen/mana-app';
4
- import type { ITextSelection } from './code-editor.js';
4
+ import type { ITextSelection } from './code-editor-protocol.js';
5
5
  export interface IModelOptions {
6
6
  /**
7
7
  * A unique identifier for the model.
@@ -77,4 +77,4 @@ export declare class Model implements IModel {
77
77
  protected _sharedModelSwitchedEmitter: Emitter<boolean>;
78
78
  protected _sharedModelSwitched: Event<boolean>;
79
79
  }
80
- //# sourceMappingURL=model.d.ts.map
80
+ //# sourceMappingURL=code-editor-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code-editor-model.d.ts","sourceRoot":"","sources":["../src/code-editor-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAmB,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEhE,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,MAAO,SAAQ,UAAU;IACxC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,UAAU,EAAE,cAAc,EAAE,CAAC;CAC9B;AAED;;GAEG;AACH,qBACa,KAAM,YAAW,MAAM;IAClC,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IAEH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;OAKG;IAEH,QAAQ,EAAE,MAAM,CAAC;IAGjB,IAAI,EAAE,QAAQ,CAAU;IAExB;;OAEG;IAEH,UAAU,EAAE,cAAc,EAAE,CAAC;IAE7B;;OAEG;gBACS,OAAO,CAAC,EAAE,aAAa;IAUnC;;OAEG;IACH,IAAI,mBAAmB,IAAI,KAAK,CAAC,OAAO,CAAC,CAExC;IAED;;OAEG;IACH,IAAI,UAAU,IAAI,OAAO,CAExB;IAED;;OAEG;IACH,OAAO,IAAI,IAAI;IAOf,SAAS,CAAC,WAAW,UAAS;IAE9B,SAAS,CAAC,2BAA2B,mBAA0B;IAC/D,SAAS,CAAC,oBAAoB,iBAA0C;CACzE"}
@@ -8,9 +8,7 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
8
8
  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); }
9
9
  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; }
10
10
  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.'); }
11
- import { prop } from '@difizen/mana-app';
12
- import { Emitter } from '@difizen/mana-app';
13
- import { transient } from '@difizen/mana-app';
11
+ import { prop, transient, Emitter } from '@difizen/mana-app';
14
12
  import { v4 } from 'uuid';
15
13
 
16
14
  /**
@@ -1,41 +1,16 @@
1
1
  import type { JSONObject } from '@difizen/libro-common';
2
- import type { Disposable, Event } from '@difizen/mana-app';
3
- import type { DidChangeConfigurationParams, ServerCapabilities } from 'vscode-languageserver-protocol';
4
- import type { IModel } from './model.js';
2
+ import type { Disposable, Event, ThemeType } from '@difizen/mana-app';
3
+ import type { IModel } from './code-editor-model.js';
5
4
  /**
6
- * Code editor accessor.
7
- */
8
- export interface ILSPEditor {
9
- /**
10
- * CodeEditor getter.
11
- *
12
- * It will return `null` if the editor is not yet instantiated;
13
- * e.g. to support windowed notebook.
14
- */
15
- getEditor(): IEditor | null;
16
- /**
17
- * Promise getter that resolved when the editor is instantiated.
18
- */
19
- ready(): Promise<IEditor>;
20
- /**
21
- * Reveal the code editor in viewport.
22
- *
23
- * ### Notes
24
- * The promise will resolve when the editor is instantiated and in
25
- * the viewport.
26
- */
27
- reveal(): Promise<IEditor>;
28
- }
29
- /**
30
- * A zero-based position in the editor.
5
+ * A one-based position in the editor.
31
6
  */
32
7
  export interface IPosition extends JSONObject {
33
8
  /**
34
- * The cursor line number.
9
+ * The cursor line number. one-based.
35
10
  */
36
11
  readonly line: number;
37
12
  /**
38
- * The cursor column number.
13
+ * The cursor column number. one-based.
39
14
  */
40
15
  readonly column: number;
41
16
  }
@@ -123,6 +98,10 @@ export interface ISelectionOwner {
123
98
  * The uuid of this selection owner.
124
99
  */
125
100
  uuid: string;
101
+ /**
102
+ * Return selection value, if no range, return primary position value
103
+ */
104
+ getSelectionValue: (range?: IRange) => string | undefined;
126
105
  /**
127
106
  * Returns the primary position of the cursor, never `null`.
128
107
  */
@@ -164,6 +143,23 @@ export interface ISelectionOwner {
164
143
  * document.
165
144
  */
166
145
  setSelections: (selections: IRange[]) => void;
146
+ /**
147
+ * Replaces selection with the given text.
148
+ */
149
+ replaceSelection: (text: string, range: IRange) => void;
150
+ /**
151
+ * Replaces selection with the given text.
152
+ */
153
+ replaceSelections: (edits: {
154
+ text: string;
155
+ range: IRange;
156
+ }[]) => void;
157
+ /**
158
+ * highlight search matches
159
+ * @param matches
160
+ * @param currentIndex
161
+ */
162
+ highlightMatches: (matches: SearchMatch[], currentIndex: number | undefined) => void;
167
163
  }
168
164
  /**
169
165
  * A keydown handler type.
@@ -212,12 +208,12 @@ export interface IEditor extends ISelectionOwner, Disposable {
212
208
  * @returns The value of the line.
213
209
  *
214
210
  * #### Notes
215
- * Lines are 0-based, and accessing a line out of range returns
211
+ * Lines are 1-based, and accessing a line out of range returns
216
212
  * `undefined`.
217
213
  */
218
214
  getLine: (line: number) => string | undefined;
219
215
  /**
220
- * Find an offset for the given position.
216
+ * Find an zero-based offset for the given position.
221
217
  *
222
218
  * @param position - The position of interest.
223
219
  *
@@ -225,6 +221,15 @@ export interface IEditor extends ISelectionOwner, Disposable {
225
221
  * editor contents.
226
222
  */
227
223
  getOffsetAt: (position: IPosition) => number;
224
+ /**
225
+ * Find a position for the given offset.
226
+ *
227
+ * @param offset - The offset of interest.
228
+ *
229
+ * @returns The position at the offset, clamped to the extent of the
230
+ * editor contents.
231
+ */
232
+ getPositionAt: (offset: number) => IPosition | undefined;
228
233
  /**
229
234
  * Undo one edit (if any undo events are stored).
230
235
  */
@@ -249,6 +254,12 @@ export interface IEditor extends ISelectionOwner, Disposable {
249
254
  * Resize the editor to fit its host node.
250
255
  */
251
256
  resizeToFit: () => void;
257
+ /**
258
+ * Reveals the given selection in the editor.
259
+ *
260
+ * @param position - The desired selection to reveal.
261
+ */
262
+ revealSelection: (selection: IRange) => void;
252
263
  /**
253
264
  * Get the cursor position given window coordinates.
254
265
  *
@@ -259,15 +270,14 @@ export interface IEditor extends ISelectionOwner, Disposable {
259
270
  */
260
271
  getPositionForCoordinate: (coordinate: ICoordinate) => IPosition | null;
261
272
  onModalChange: Event<boolean>;
273
+ dispose: () => void;
262
274
  }
263
- /**
264
- * A factory used to create a code editor.
265
- */
266
- export type CodeEditorFactory = (options: IEditorOptions) => IEditor;
275
+ export type EditorTheme = Record<ThemeType, string>;
267
276
  /**
268
277
  * The configuration options for an editor.
269
278
  */
270
279
  export interface IEditorConfig {
280
+ theme: EditorTheme;
271
281
  /**
272
282
  * Half-period in milliseconds used for cursor blinking.
273
283
  * By setting this to zero, blinking can be disabled.
@@ -346,11 +356,15 @@ export interface IEditorConfig {
346
356
  styleActiveLine?: boolean;
347
357
  highlightActiveLineGutter?: boolean;
348
358
  placeholder?: HTMLElement | string;
359
+ lspEnabled: boolean;
360
+ paddingTop: number;
361
+ paddingBottom: number;
362
+ scrollBarHeight: number;
349
363
  }
350
364
  /**
351
365
  * The default configuration options for an editor.
352
366
  */
353
- export declare const defaultConfig: IEditorConfig;
367
+ export declare const defaultConfig: Required<IEditorConfig>;
354
368
  export type TooltipProviderOption = {
355
369
  cursorPosition: number;
356
370
  };
@@ -365,107 +379,6 @@ export type CompletionReply = {
365
379
  metadata: JSONObject;
366
380
  };
367
381
  export type CompletionProvider = (option: CompletionProviderOption) => Promise<CompletionReply>;
368
- export type LSPProviderResult = {
369
- virtualDocument: IVirtualDocument;
370
- lspConnection: ILspConnection;
371
- editor: ILSPEditor;
372
- };
373
- export type LSPProvider = () => Promise<LSPProviderResult>;
374
- export interface Position {
375
- /**
376
- * Line number
377
- */
378
- line: number;
379
- /**
380
- * Position of character in line
381
- */
382
- ch: number;
383
- }
384
- /**
385
- * is_* attributes are there only to enforce strict interface type checking
386
- */
387
- export interface ISourcePosition extends Position {
388
- isSource: true;
389
- }
390
- export interface IEditorPosition extends Position {
391
- isEditor: true;
392
- }
393
- export interface IVirtualPosition extends Position {
394
- isVirtual: true;
395
- }
396
- export interface IRootPosition extends ISourcePosition {
397
- isRoot: true;
398
- }
399
- export interface IVirtualDocument {
400
- uri: string;
401
- /**
402
- * Get the corresponding editor of the virtual line.
403
- */
404
- getEditorAtVirtualLine: (pos: IVirtualPosition) => ILSPEditor;
405
- transformEditorToVirtual: (editor: ILSPEditor, position: IEditorPosition) => IVirtualPosition | null;
406
- ttransformVirtualToEditor: (virtualPosition: IVirtualPosition) => IEditorPosition | null;
407
- }
408
- export interface IDocumentInfo {
409
- /**
410
- * URI of the virtual document.
411
- */
412
- uri: string;
413
- /**
414
- * Version of the virtual document.
415
- */
416
- version: number;
417
- /**
418
- * Text content of the document.
419
- */
420
- text: string;
421
- /**
422
- * Language id of the document.
423
- */
424
- languageId: string;
425
- }
426
- export interface ILspConnection {
427
- /**
428
- * Is the language server is connected?
429
- */
430
- isConnected: boolean;
431
- /**
432
- * Is the language server is initialized?
433
- */
434
- isInitialized: boolean;
435
- /**
436
- * Is the language server is connected and initialized?
437
- */
438
- isReady: boolean;
439
- /**
440
- * Initialize a connection over a web socket that speaks the LSP protocol
441
- */
442
- connect(socket: WebSocket): void;
443
- /**
444
- * Close the connection
445
- */
446
- close(): void;
447
- /**
448
- * The initialize request tells the server which options the client supports
449
- */
450
- sendInitialize(): void;
451
- /**
452
- * Inform the server that the document was opened
453
- */
454
- sendOpen(documentInfo: IDocumentInfo): void;
455
- /**
456
- * Sends the full text of the document to the server
457
- */
458
- sendChange(documentInfo: IDocumentInfo): void;
459
- /**
460
- * Send save notification to the server.
461
- */
462
- sendSaved(documentInfo: IDocumentInfo): void;
463
- /**
464
- * Send configuration change to the server.
465
- */
466
- sendConfigurationChange(settings: DidChangeConfigurationParams): void;
467
- provides(provider: keyof ServerCapabilities): boolean;
468
- }
469
382
  /**
470
383
  * The options used to initialize an editor.
471
384
  */
@@ -481,17 +394,29 @@ export interface IEditorOptions {
481
394
  /**
482
395
  * The desired uuid for the editor.
483
396
  */
484
- uuid?: string | undefined;
397
+ uuid?: string;
485
398
  /**
486
399
  * The default selection style for the editor.
487
400
  */
488
- selectionStyle?: Partial<IEditorSelectionStyle> | undefined;
401
+ selectionStyle?: Partial<IEditorSelectionStyle>;
489
402
  /**
490
403
  * The configuration options for the editor.
491
404
  */
492
- config?: Partial<IEditorConfig> | undefined;
493
- tooltipProvider?: TooltipProvider | undefined;
494
- completionProvider?: CompletionProvider | undefined;
495
- lspProvider?: LSPProvider | undefined;
405
+ config?: Partial<IEditorConfig>;
406
+ tooltipProvider?: TooltipProvider;
407
+ completionProvider?: CompletionProvider;
408
+ }
409
+ /**
410
+ * Base search match interface
411
+ */
412
+ export interface SearchMatch {
413
+ /**
414
+ * Text of the exact match itself
415
+ */
416
+ readonly text: string;
417
+ /**
418
+ * Start location of the match (in a text, this is the column)
419
+ */
420
+ position: number;
496
421
  }
497
- //# sourceMappingURL=code-editor.d.ts.map
422
+ //# sourceMappingURL=code-editor-protocol.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code-editor-protocol.d.ts","sourceRoot":"","sources":["../src/code-editor-protocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEtE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,UAAU;IAC3C;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AACD;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,eAAe,CAAC;AAC1C;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB;;;;;;OAMG;IACH,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAE1B;;;;;;OAMG;IACH,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;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