@difizen/libro-core 1.0.2 → 1.0.4
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/es/cell/libro-executable-cell-view.d.ts +4 -3
- package/es/cell/libro-executable-cell-view.d.ts.map +1 -1
- package/es/cell/libro-executable-cell-view.js +17 -2
- package/es/index.less +1 -0
- package/es/libro-model.d.ts +2 -1
- package/es/libro-model.d.ts.map +1 -1
- package/es/libro-model.js +53 -45
- package/es/libro-protocol.d.ts +2 -0
- package/es/libro-protocol.d.ts.map +1 -1
- package/es/libro-setting-contribution.d.ts.map +1 -1
- package/es/libro-setting-contribution.js +2 -2
- package/es/libro-setting.d.ts +1 -0
- package/es/libro-setting.d.ts.map +1 -1
- package/es/libro-setting.js +10 -0
- package/es/libro-view.d.ts +10 -0
- package/es/libro-view.d.ts.map +1 -1
- package/es/libro-view.js +46 -12
- package/es/output/output-area.d.ts +3 -1
- package/es/output/output-area.d.ts.map +1 -1
- package/es/output/output-area.js +83 -30
- package/es/output/output-model.d.ts +3 -1
- package/es/output/output-model.d.ts.map +1 -1
- package/es/output/output-model.js +11 -1
- package/es/output/output-protocol.d.ts +5 -2
- package/es/output/output-protocol.d.ts.map +1 -1
- package/es/toolbar/index.less +10 -10
- package/package.json +5 -5
- package/src/cell/libro-executable-cell-view.ts +25 -2
- package/src/index.less +1 -0
- package/src/libro-model.ts +8 -5
- package/src/libro-protocol.ts +3 -0
- package/src/libro-setting-contribution.ts +2 -0
- package/src/libro-setting.ts +11 -0
- package/src/libro-view.tsx +61 -10
- package/src/output/output-area.tsx +80 -21
- package/src/output/output-model.tsx +11 -1
- package/src/output/output-protocol.ts +8 -2
- package/src/toolbar/index.less +10 -10
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ConfigurationService } from '@difizen/libro-common/app';
|
|
1
2
|
import type { CellModel } from '../libro-protocol.js';
|
|
2
3
|
import type { CellViewOptions } from '../libro-protocol.js';
|
|
3
4
|
import type { BaseOutputArea } from '../output/index.js';
|
|
@@ -5,7 +6,7 @@ import type { LibroCell } from './libro-cell-protocol.js';
|
|
|
5
6
|
import { CellService } from './libro-cell-protocol.js';
|
|
6
7
|
import { EditorCellView, LibroEditorCellView } from './libro-edit-cell-view.js';
|
|
7
8
|
import { ExecutableCellModel } from './libro-executable-cell-model.js';
|
|
8
|
-
interface ExecutableCellView extends EditorCellView {
|
|
9
|
+
export interface ExecutableCellView extends EditorCellView {
|
|
9
10
|
run: () => Promise<boolean>;
|
|
10
11
|
clearExecution: () => void;
|
|
11
12
|
outputArea: BaseOutputArea;
|
|
@@ -22,7 +23,8 @@ export declare abstract class LibroEditableExecutableCellView extends LibroEdito
|
|
|
22
23
|
model: CellModel & ExecutableCellModel;
|
|
23
24
|
outputArea: BaseOutputArea;
|
|
24
25
|
noEditorAreaHeight: number;
|
|
25
|
-
|
|
26
|
+
isLargeOutputDisplay?: boolean;
|
|
27
|
+
constructor(options: CellViewOptions, cellService: CellService, configurationService: ConfigurationService);
|
|
26
28
|
clearExecution: () => void;
|
|
27
29
|
hasCellHidden(): boolean;
|
|
28
30
|
outputWatch(): void;
|
|
@@ -32,5 +34,4 @@ export declare abstract class LibroEditableExecutableCellView extends LibroEdito
|
|
|
32
34
|
* @deprecated use LibroEditableExecutableCellView instead.
|
|
33
35
|
*/
|
|
34
36
|
export declare const LibroExecutableCellView: typeof LibroEditableExecutableCellView;
|
|
35
|
-
export {};
|
|
36
37
|
//# sourceMappingURL=libro-executable-cell-view.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"libro-executable-cell-view.d.ts","sourceRoot":"","sources":["../../src/cell/libro-executable-cell-view.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"libro-executable-cell-view.d.ts","sourceRoot":"","sources":["../../src/cell/libro-executable-cell-view.ts"],"names":[],"mappings":"AACA,OAAO,EAAS,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAIxE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAEvE,MAAM,WAAW,kBAAmB,SAAQ,cAAc;IACxD,GAAG,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAC5B,cAAc,EAAE,MAAM,IAAI,CAAC;IAE3B,UAAU,EAAE,cAAc,CAAC;IAE3B,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,eAAO,MAAM,kBAAkB;cACnB,OAAO,GAAG,EAAE,GAAG,CAAC,GAAG,SAAS;CAYvC,CAAC;AAEF;;;GAGG;AACH,8BAAsB,+BACpB,SAAQ,mBACR,YAAW,kBAAkB;IAErB,KAAK,EAAE,SAAS,GAAG,mBAAmB,CAAC;IAE/C,UAAU,EAAE,cAAc,CAAC;IAEnB,kBAAkB,EAAE,MAAM,CAAC;IAEnC,oBAAoB,CAAC,EAAE,OAAO,CAAC;gBAGT,OAAO,EAAE,eAAe,EACvB,WAAW,EAAE,WAAW,EACf,oBAAoB,EAAE,oBAAoB;IAsB1E,cAAc,EAAE,MAAM,IAAI,CAExB;IAGO,aAAa;IAUtB,WAAW;IAQF,MAAM,IAAI,SAAS;CAW7B;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB,wCAAkC,CAAC"}
|
|
@@ -16,9 +16,10 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
16
16
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
17
17
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
18
18
|
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); }
|
|
19
|
-
import { watch } from '@difizen/libro-common/app';
|
|
19
|
+
import { watch, ConfigurationService } from '@difizen/libro-common/app';
|
|
20
20
|
import { ViewOption } from '@difizen/libro-common/app';
|
|
21
21
|
import { inject } from '@difizen/libro-common/app';
|
|
22
|
+
import { LargeOutputDisplay } from "../libro-setting.js";
|
|
22
23
|
import { CellService } from "./libro-cell-protocol.js";
|
|
23
24
|
import { EditorCellView, LibroEditorCellView } from "./libro-edit-cell-view.js";
|
|
24
25
|
import { ExecutableCellModel } from "./libro-executable-cell-model.js";
|
|
@@ -37,17 +38,28 @@ export var ExecutableCellView = {
|
|
|
37
38
|
export var LibroEditableExecutableCellView = /*#__PURE__*/function (_LibroEditorCellView) {
|
|
38
39
|
_inherits(LibroEditableExecutableCellView, _LibroEditorCellView);
|
|
39
40
|
var _super = _createSuper(LibroEditableExecutableCellView);
|
|
40
|
-
function LibroEditableExecutableCellView(options, cellService) {
|
|
41
|
+
function LibroEditableExecutableCellView(options, cellService, configurationService) {
|
|
41
42
|
var _this;
|
|
42
43
|
_classCallCheck(this, LibroEditableExecutableCellView);
|
|
43
44
|
_this = _super.call(this, options, cellService);
|
|
44
45
|
_this.outputArea = void 0;
|
|
46
|
+
_this.isLargeOutputDisplay = void 0;
|
|
45
47
|
_this.clearExecution = function () {
|
|
46
48
|
//
|
|
47
49
|
};
|
|
50
|
+
var localIsLargeOutputDisplay = localStorage.getItem('is-libro-large-output-display');
|
|
51
|
+
configurationService.get(LargeOutputDisplay).then(function (value) {
|
|
52
|
+
var _this$options$cell$me;
|
|
53
|
+
_this.isLargeOutputDisplay = localIsLargeOutputDisplay !== null ? localIsLargeOutputDisplay === 'true' : (_this$options$cell$me = _this.options.cell.metadata['isLargeOutputDisplay']) !== null && _this$options$cell$me !== void 0 ? _this$options$cell$me : true;
|
|
54
|
+
_this.isLargeOutputDisplay = _this.isLargeOutputDisplay && value;
|
|
55
|
+
return;
|
|
56
|
+
}).catch(function () {
|
|
57
|
+
//
|
|
58
|
+
});
|
|
48
59
|
_this.outputWatch();
|
|
49
60
|
return _this;
|
|
50
61
|
}
|
|
62
|
+
LibroEditableExecutableCellView = inject(ConfigurationService)(LibroEditableExecutableCellView, undefined, 2) || LibroEditableExecutableCellView;
|
|
51
63
|
LibroEditableExecutableCellView = inject(CellService)(LibroEditableExecutableCellView, undefined, 1) || LibroEditableExecutableCellView;
|
|
52
64
|
LibroEditableExecutableCellView = inject(ViewOption)(LibroEditableExecutableCellView, undefined, 0) || LibroEditableExecutableCellView;
|
|
53
65
|
_createClass(LibroEditableExecutableCellView, [{
|
|
@@ -74,6 +86,9 @@ export var LibroEditableExecutableCellView = /*#__PURE__*/function (_LibroEditor
|
|
|
74
86
|
value: function toJSON() {
|
|
75
87
|
var _meta$source, _this$outputArea$toJS, _this$outputArea;
|
|
76
88
|
var meta = _get(_getPrototypeOf(LibroEditableExecutableCellView.prototype), "toJSON", this).call(this);
|
|
89
|
+
if (this.isLargeOutputDisplay !== undefined) {
|
|
90
|
+
meta.metadata['isLargeOutputDisplay'] = this.isLargeOutputDisplay;
|
|
91
|
+
}
|
|
77
92
|
return _objectSpread(_objectSpread({}, meta), {}, {
|
|
78
93
|
source: (_meta$source = meta.source) !== null && _meta$source !== void 0 ? _meta$source : this.options.cell.source,
|
|
79
94
|
outputs: (_this$outputArea$toJS = (_this$outputArea = this.outputArea) === null || _this$outputArea === void 0 ? void 0 : _this$outputArea.toJSON()) !== null && _this$outputArea$toJS !== void 0 ? _this$outputArea$toJS : []
|
package/es/index.less
CHANGED
package/es/libro-model.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { INotebookContent, INotebookMetadata } from '@difizen/libro-common';
|
|
2
|
-
import type { CellTypeAdaptor, ISharedNotebook, NotebookChange } from '@difizen/libro-shared-model';
|
|
3
2
|
import { ConfigurationService } from '@difizen/libro-common/app';
|
|
4
3
|
import { Emitter } from '@difizen/libro-common/app';
|
|
4
|
+
import type { CellTypeAdaptor, ISharedNotebook, NotebookChange } from '@difizen/libro-shared-model';
|
|
5
5
|
import { LibroContentService } from './content/index.js';
|
|
6
6
|
import { NotebookOption } from './libro-protocol.js';
|
|
7
7
|
import type { CellOptions, CellViewChange, DndListModel, NotebookModel, CellView, MouseMode, ICellContentChange } from './libro-protocol.js';
|
|
@@ -42,6 +42,7 @@ export declare class LibroModel implements NotebookModel, DndListModel {
|
|
|
42
42
|
inputEditable: boolean;
|
|
43
43
|
outputEditable: boolean;
|
|
44
44
|
cellsEditable: boolean;
|
|
45
|
+
noEditorMode: boolean;
|
|
45
46
|
get executable(): boolean;
|
|
46
47
|
set executable(value: boolean);
|
|
47
48
|
savable: boolean;
|
package/es/libro-model.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"libro-model.d.ts","sourceRoot":"","sources":["../src/libro-model.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,
|
|
1
|
+
{"version":3,"file":"libro-model.d.ts","sourceRoot":"","sources":["../src/libro-model.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAa,oBAAoB,E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,OAAO;IAClC,UAAU,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO;IAkBnC;;;;OAIG;IACH,SAAS,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ;IAQxD,SAAS,CAAC,YAAY,QAAS,MAAM,GAAG,MAAM,GAAG,QAAQ,aAmBvD;IACF,YAAY,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,GAAG,OAAO;IACzD,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO;IAC/D,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO;IAgBzD,aAAa,CAAC,MAAM,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,MAAM;IAwCrD;;;;;OAKG;IACH,SAAS,CAAC,gBAAgB,CACxB,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,EAClC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ;IAmBpC;;OAEG;IACH,gBAAgB;IAQhB,aAAa;IAWb,IAAI;IAIJ,IAAI;CAGL"}
|
package/es/libro-model.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
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, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _dec28, _dec29, _dec30, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21, _descriptor22, _descriptor23, _descriptor24, _descriptor25, _descriptor26, _descriptor27, _descriptor28, _descriptor29;
|
|
2
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _dec28, _dec29, _dec30, _dec31, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21, _descriptor22, _descriptor23, _descriptor24, _descriptor25, _descriptor26, _descriptor27, _descriptor28, _descriptor29, _descriptor30;
|
|
3
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
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
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); }); }; }
|
|
@@ -19,17 +19,17 @@ function _applyDecoratedDescriptor(target, property, decorators, descriptor, con
|
|
|
19
19
|
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.'); }
|
|
20
20
|
/* eslint-disable @typescript-eslint/unified-signatures */
|
|
21
21
|
|
|
22
|
-
import { createMutex, YNotebook } from '@difizen/libro-shared-model';
|
|
23
22
|
import { getOrigin, ConfigurationService } from '@difizen/libro-common/app';
|
|
24
23
|
import { Emitter } from '@difizen/libro-common/app';
|
|
25
24
|
import { prop } from '@difizen/libro-common/app';
|
|
26
25
|
import { inject, transient } from '@difizen/libro-common/app';
|
|
26
|
+
import { createMutex, YNotebook } from '@difizen/libro-shared-model';
|
|
27
27
|
import { v4 } from 'uuid';
|
|
28
28
|
import { LibroContentService } from "./content/index.js";
|
|
29
29
|
import { isCellView, NotebookOption } from "./libro-protocol.js";
|
|
30
30
|
import { EnterEditModeWhenAddCell } from "./libro-setting.js";
|
|
31
31
|
import { VirtualizedManagerHelper } from "./virtualized-manager-helper.js";
|
|
32
|
-
export var LibroModel = (_dec = transient(), _dec2 = inject(NotebookOption), _dec3 = inject(LibroContentService), _dec4 = inject(VirtualizedManagerHelper), _dec5 = inject(ConfigurationService), _dec6 = prop(), _dec7 = prop(), _dec8 = prop(), _dec9 = prop(), _dec10 = prop(), _dec11 = prop(), _dec12 = prop(), _dec13 = prop(), _dec14 = prop(), _dec15 = prop(), _dec16 = prop(), _dec17 = prop(), _dec18 = prop(), _dec19 = prop(), _dec20 = prop(), _dec21 = prop(), _dec22 = prop(), _dec23 = prop(), _dec24 = prop(), _dec25 = prop(), _dec26 = prop(), _dec27 = prop(), _dec28 = prop(), _dec29 = prop(), _dec30 = prop(), _dec(_class = (_class2 = /*#__PURE__*/function () {
|
|
32
|
+
export var LibroModel = (_dec = transient(), _dec2 = inject(NotebookOption), _dec3 = inject(LibroContentService), _dec4 = inject(VirtualizedManagerHelper), _dec5 = inject(ConfigurationService), _dec6 = prop(), _dec7 = prop(), _dec8 = prop(), _dec9 = prop(), _dec10 = prop(), _dec11 = prop(), _dec12 = prop(), _dec13 = prop(), _dec14 = prop(), _dec15 = prop(), _dec16 = prop(), _dec17 = prop(), _dec18 = prop(), _dec19 = prop(), _dec20 = prop(), _dec21 = prop(), _dec22 = prop(), _dec23 = prop(), _dec24 = prop(), _dec25 = prop(), _dec26 = prop(), _dec27 = prop(), _dec28 = prop(), _dec29 = prop(), _dec30 = prop(), _dec31 = prop(), _dec(_class = (_class2 = /*#__PURE__*/function () {
|
|
33
33
|
function LibroModel() {
|
|
34
34
|
var _this = this;
|
|
35
35
|
_classCallCheck(this, LibroModel);
|
|
@@ -59,34 +59,35 @@ export var LibroModel = (_dec = transient(), _dec2 = inject(NotebookOption), _de
|
|
|
59
59
|
_initializerDefineProperty(this, "inputEditable", _descriptor6, this);
|
|
60
60
|
_initializerDefineProperty(this, "outputEditable", _descriptor7, this);
|
|
61
61
|
_initializerDefineProperty(this, "cellsEditable", _descriptor8, this);
|
|
62
|
-
_initializerDefineProperty(this, "
|
|
63
|
-
_initializerDefineProperty(this, "
|
|
64
|
-
_initializerDefineProperty(this, "
|
|
65
|
-
_initializerDefineProperty(this, "
|
|
66
|
-
_initializerDefineProperty(this, "
|
|
67
|
-
_initializerDefineProperty(this, "
|
|
68
|
-
_initializerDefineProperty(this, "
|
|
69
|
-
_initializerDefineProperty(this, "
|
|
70
|
-
_initializerDefineProperty(this, "
|
|
71
|
-
_initializerDefineProperty(this, "
|
|
72
|
-
_initializerDefineProperty(this, "
|
|
73
|
-
_initializerDefineProperty(this, "
|
|
74
|
-
_initializerDefineProperty(this, "
|
|
75
|
-
_initializerDefineProperty(this, "
|
|
62
|
+
_initializerDefineProperty(this, "noEditorMode", _descriptor9, this);
|
|
63
|
+
_initializerDefineProperty(this, "savable", _descriptor10, this);
|
|
64
|
+
_initializerDefineProperty(this, "runnable", _descriptor11, this);
|
|
65
|
+
_initializerDefineProperty(this, "commandMode", _descriptor12, this);
|
|
66
|
+
_initializerDefineProperty(this, "isEditMode", _descriptor13, this);
|
|
67
|
+
_initializerDefineProperty(this, "dndAreaNullEnable", _descriptor14, this);
|
|
68
|
+
_initializerDefineProperty(this, "dirty", _descriptor15, this);
|
|
69
|
+
_initializerDefineProperty(this, "cells", _descriptor16, this);
|
|
70
|
+
_initializerDefineProperty(this, "active", _descriptor17, this);
|
|
71
|
+
_initializerDefineProperty(this, "activeIndex", _descriptor18, this);
|
|
72
|
+
_initializerDefineProperty(this, "hover", _descriptor19, this);
|
|
73
|
+
_initializerDefineProperty(this, "isInitialized", _descriptor20, this);
|
|
74
|
+
_initializerDefineProperty(this, "executeCount", _descriptor21, this);
|
|
75
|
+
_initializerDefineProperty(this, "mouseMode", _descriptor22, this);
|
|
76
|
+
_initializerDefineProperty(this, "selections", _descriptor23, this);
|
|
76
77
|
this.deletedCells = [];
|
|
77
78
|
this.metadata = {};
|
|
78
|
-
_initializerDefineProperty(this, "customParams",
|
|
79
|
-
_initializerDefineProperty(this, "libroViewClass",
|
|
80
|
-
_initializerDefineProperty(this, "canUndo",
|
|
81
|
-
_initializerDefineProperty(this, "canRedo",
|
|
79
|
+
_initializerDefineProperty(this, "customParams", _descriptor24, this);
|
|
80
|
+
_initializerDefineProperty(this, "libroViewClass", _descriptor25, this);
|
|
81
|
+
_initializerDefineProperty(this, "canUndo", _descriptor26, this);
|
|
82
|
+
_initializerDefineProperty(this, "canRedo", _descriptor27, this);
|
|
82
83
|
/**
|
|
83
84
|
* 默认为true,可以在metadata修改
|
|
84
85
|
*/
|
|
85
|
-
_initializerDefineProperty(this, "trusted",
|
|
86
|
+
_initializerDefineProperty(this, "trusted", _descriptor28, this);
|
|
86
87
|
// 字体大小
|
|
87
|
-
_initializerDefineProperty(this, "fontSize",
|
|
88
|
+
_initializerDefineProperty(this, "fontSize", _descriptor29, this);
|
|
88
89
|
// 主题
|
|
89
|
-
_initializerDefineProperty(this, "theme",
|
|
90
|
+
_initializerDefineProperty(this, "theme", _descriptor30, this);
|
|
90
91
|
this.cellViewCache = new Map();
|
|
91
92
|
this.nbformat_minor = 4;
|
|
92
93
|
this.nbformat = 4;
|
|
@@ -800,143 +801,150 @@ export var LibroModel = (_dec = transient(), _dec2 = inject(NotebookOption), _de
|
|
|
800
801
|
initializer: function initializer() {
|
|
801
802
|
return true;
|
|
802
803
|
}
|
|
803
|
-
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
804
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "noEditorMode", [_dec10], {
|
|
805
|
+
configurable: true,
|
|
806
|
+
enumerable: true,
|
|
807
|
+
writable: true,
|
|
808
|
+
initializer: function initializer() {
|
|
809
|
+
return false;
|
|
810
|
+
}
|
|
811
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "savable", [_dec11], {
|
|
804
812
|
configurable: true,
|
|
805
813
|
enumerable: true,
|
|
806
814
|
writable: true,
|
|
807
815
|
initializer: function initializer() {
|
|
808
816
|
return true;
|
|
809
817
|
}
|
|
810
|
-
}),
|
|
818
|
+
}), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "runnable", [_dec12], {
|
|
811
819
|
configurable: true,
|
|
812
820
|
enumerable: true,
|
|
813
821
|
writable: true,
|
|
814
822
|
initializer: function initializer() {
|
|
815
823
|
return true;
|
|
816
824
|
}
|
|
817
|
-
}),
|
|
825
|
+
}), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "commandMode", [_dec13], {
|
|
818
826
|
configurable: true,
|
|
819
827
|
enumerable: true,
|
|
820
828
|
writable: true,
|
|
821
829
|
initializer: function initializer() {
|
|
822
830
|
return true;
|
|
823
831
|
}
|
|
824
|
-
}),
|
|
832
|
+
}), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "isEditMode", [_dec14], {
|
|
825
833
|
configurable: true,
|
|
826
834
|
enumerable: true,
|
|
827
835
|
writable: true,
|
|
828
836
|
initializer: function initializer() {
|
|
829
837
|
return true;
|
|
830
838
|
}
|
|
831
|
-
}),
|
|
839
|
+
}), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "dndAreaNullEnable", [_dec15], {
|
|
832
840
|
configurable: true,
|
|
833
841
|
enumerable: true,
|
|
834
842
|
writable: true,
|
|
835
843
|
initializer: function initializer() {
|
|
836
844
|
return false;
|
|
837
845
|
}
|
|
838
|
-
}),
|
|
846
|
+
}), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "dirty", [_dec16], {
|
|
839
847
|
configurable: true,
|
|
840
848
|
enumerable: true,
|
|
841
849
|
writable: true,
|
|
842
850
|
initializer: function initializer() {
|
|
843
851
|
return false;
|
|
844
852
|
}
|
|
845
|
-
}),
|
|
853
|
+
}), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "cells", [_dec17], {
|
|
846
854
|
configurable: true,
|
|
847
855
|
enumerable: true,
|
|
848
856
|
writable: true,
|
|
849
857
|
initializer: function initializer() {
|
|
850
858
|
return [];
|
|
851
859
|
}
|
|
852
|
-
}),
|
|
860
|
+
}), _descriptor17 = _applyDecoratedDescriptor(_class2.prototype, "active", [_dec18], {
|
|
853
861
|
configurable: true,
|
|
854
862
|
enumerable: true,
|
|
855
863
|
writable: true,
|
|
856
864
|
initializer: null
|
|
857
|
-
}),
|
|
865
|
+
}), _descriptor18 = _applyDecoratedDescriptor(_class2.prototype, "activeIndex", [_dec19], {
|
|
858
866
|
configurable: true,
|
|
859
867
|
enumerable: true,
|
|
860
868
|
writable: true,
|
|
861
869
|
initializer: function initializer() {
|
|
862
870
|
return 0;
|
|
863
871
|
}
|
|
864
|
-
}),
|
|
872
|
+
}), _descriptor19 = _applyDecoratedDescriptor(_class2.prototype, "hover", [_dec20], {
|
|
865
873
|
configurable: true,
|
|
866
874
|
enumerable: true,
|
|
867
875
|
writable: true,
|
|
868
876
|
initializer: function initializer() {
|
|
869
877
|
return undefined;
|
|
870
878
|
}
|
|
871
|
-
}),
|
|
879
|
+
}), _descriptor20 = _applyDecoratedDescriptor(_class2.prototype, "isInitialized", [_dec21], {
|
|
872
880
|
configurable: true,
|
|
873
881
|
enumerable: true,
|
|
874
882
|
writable: true,
|
|
875
883
|
initializer: function initializer() {
|
|
876
884
|
return false;
|
|
877
885
|
}
|
|
878
|
-
}),
|
|
886
|
+
}), _descriptor21 = _applyDecoratedDescriptor(_class2.prototype, "executeCount", [_dec22], {
|
|
879
887
|
configurable: true,
|
|
880
888
|
enumerable: true,
|
|
881
889
|
writable: true,
|
|
882
890
|
initializer: function initializer() {
|
|
883
891
|
return 0;
|
|
884
892
|
}
|
|
885
|
-
}),
|
|
893
|
+
}), _descriptor22 = _applyDecoratedDescriptor(_class2.prototype, "mouseMode", [_dec23], {
|
|
886
894
|
configurable: true,
|
|
887
895
|
enumerable: true,
|
|
888
896
|
writable: true,
|
|
889
897
|
initializer: null
|
|
890
|
-
}),
|
|
898
|
+
}), _descriptor23 = _applyDecoratedDescriptor(_class2.prototype, "selections", [_dec24], {
|
|
891
899
|
configurable: true,
|
|
892
900
|
enumerable: true,
|
|
893
901
|
writable: true,
|
|
894
902
|
initializer: function initializer() {
|
|
895
903
|
return [];
|
|
896
904
|
}
|
|
897
|
-
}),
|
|
905
|
+
}), _descriptor24 = _applyDecoratedDescriptor(_class2.prototype, "customParams", [_dec25], {
|
|
898
906
|
configurable: true,
|
|
899
907
|
enumerable: true,
|
|
900
908
|
writable: true,
|
|
901
909
|
initializer: function initializer() {
|
|
902
910
|
return {};
|
|
903
911
|
}
|
|
904
|
-
}),
|
|
912
|
+
}), _descriptor25 = _applyDecoratedDescriptor(_class2.prototype, "libroViewClass", [_dec26], {
|
|
905
913
|
configurable: true,
|
|
906
914
|
enumerable: true,
|
|
907
915
|
writable: true,
|
|
908
916
|
initializer: function initializer() {
|
|
909
917
|
return '';
|
|
910
918
|
}
|
|
911
|
-
}),
|
|
919
|
+
}), _descriptor26 = _applyDecoratedDescriptor(_class2.prototype, "canUndo", [_dec27], {
|
|
912
920
|
configurable: true,
|
|
913
921
|
enumerable: true,
|
|
914
922
|
writable: true,
|
|
915
923
|
initializer: function initializer() {
|
|
916
924
|
return false;
|
|
917
925
|
}
|
|
918
|
-
}),
|
|
926
|
+
}), _descriptor27 = _applyDecoratedDescriptor(_class2.prototype, "canRedo", [_dec28], {
|
|
919
927
|
configurable: true,
|
|
920
928
|
enumerable: true,
|
|
921
929
|
writable: true,
|
|
922
930
|
initializer: function initializer() {
|
|
923
931
|
return false;
|
|
924
932
|
}
|
|
925
|
-
}),
|
|
933
|
+
}), _descriptor28 = _applyDecoratedDescriptor(_class2.prototype, "trusted", [_dec29], {
|
|
926
934
|
configurable: true,
|
|
927
935
|
enumerable: true,
|
|
928
936
|
writable: true,
|
|
929
937
|
initializer: function initializer() {
|
|
930
938
|
return true;
|
|
931
939
|
}
|
|
932
|
-
}),
|
|
940
|
+
}), _descriptor29 = _applyDecoratedDescriptor(_class2.prototype, "fontSize", [_dec30], {
|
|
933
941
|
configurable: true,
|
|
934
942
|
enumerable: true,
|
|
935
943
|
writable: true,
|
|
936
944
|
initializer: function initializer() {
|
|
937
945
|
return 12;
|
|
938
946
|
}
|
|
939
|
-
}),
|
|
947
|
+
}), _descriptor30 = _applyDecoratedDescriptor(_class2.prototype, "theme", [_dec31], {
|
|
940
948
|
configurable: true,
|
|
941
949
|
enumerable: true,
|
|
942
950
|
writable: true,
|
package/es/libro-protocol.d.ts
CHANGED
|
@@ -71,6 +71,7 @@ export interface BaseNotebookModel {
|
|
|
71
71
|
active?: CellView | undefined;
|
|
72
72
|
activeIndex: number;
|
|
73
73
|
dndAreaNullEnable: boolean;
|
|
74
|
+
noEditorMode: boolean;
|
|
74
75
|
/**
|
|
75
76
|
* Controlling whether the cell input is editable
|
|
76
77
|
*/
|
|
@@ -205,6 +206,7 @@ export interface CellView extends View {
|
|
|
205
206
|
cellViewTopPos?: number;
|
|
206
207
|
noEditorAreaHeight: number;
|
|
207
208
|
editorStatus?: EditorStatus;
|
|
209
|
+
isLargeOutputDisplay?: boolean;
|
|
208
210
|
calcEditorAreaHeight?: () => number;
|
|
209
211
|
calcEditorOffset?: () => number;
|
|
210
212
|
renderEditorIntoVirtualized?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"libro-protocol.d.ts","sourceRoot":"","sources":["../src/libro-protocol.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,MAAM,EAAE,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ribution.d.ts","sourceRoot":"","sources":["../src/libro-setting-contribution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"libro-setting-contribution.d.ts","sourceRoot":"","sources":["../src/libro-setting-contribution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAcjF,qBACa,wBAAyB,YAAW,yBAAyB;IACxE,sBAAsB;CAavB"}
|
|
@@ -6,7 +6,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
6
6
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
7
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
8
|
import { singleton, ConfigurationContribution } from '@difizen/libro-common/app';
|
|
9
|
-
import { AutoInsertWhenNoCell, CellSideToolbarVisible, CellTopToolbarSetting, CollapserClickActive, EnterEditModeWhenAddCell, HeaderToolbarVisible, MultiSelectionWhenShiftClick, RightContentFixed } from "./libro-setting.js";
|
|
9
|
+
import { AutoInsertWhenNoCell, CellSideToolbarVisible, CellTopToolbarSetting, CollapserClickActive, EnterEditModeWhenAddCell, HeaderToolbarVisible, LargeOutputDisplay, MultiSelectionWhenShiftClick, RightContentFixed } from "./libro-setting.js";
|
|
10
10
|
export var LibroSettingContribution = (_dec = singleton({
|
|
11
11
|
contrib: ConfigurationContribution
|
|
12
12
|
}), _dec(_class = /*#__PURE__*/function () {
|
|
@@ -16,7 +16,7 @@ export var LibroSettingContribution = (_dec = singleton({
|
|
|
16
16
|
_createClass(LibroSettingContribution, [{
|
|
17
17
|
key: "registerConfigurations",
|
|
18
18
|
value: function registerConfigurations() {
|
|
19
|
-
return [HeaderToolbarVisible, CellTopToolbarSetting, CellSideToolbarVisible, AutoInsertWhenNoCell, EnterEditModeWhenAddCell, CollapserClickActive, MultiSelectionWhenShiftClick, RightContentFixed];
|
|
19
|
+
return [HeaderToolbarVisible, CellTopToolbarSetting, CellSideToolbarVisible, AutoInsertWhenNoCell, EnterEditModeWhenAddCell, CollapserClickActive, MultiSelectionWhenShiftClick, RightContentFixed, LargeOutputDisplay];
|
|
20
20
|
}
|
|
21
21
|
}]);
|
|
22
22
|
return LibroSettingContribution;
|
package/es/libro-setting.d.ts
CHANGED
|
@@ -10,4 +10,5 @@ export declare const RightContentFixed: ConfigurationNode<boolean>;
|
|
|
10
10
|
export declare const OutputScrollBtnVisiable: ConfigurationNode<boolean>;
|
|
11
11
|
export declare const SupportCodeFormat: ConfigurationNode<boolean>;
|
|
12
12
|
export declare const SpmReporter: ConfigurationNode<boolean>;
|
|
13
|
+
export declare const LargeOutputDisplay: ConfigurationNode<boolean>;
|
|
13
14
|
//# sourceMappingURL=libro-setting.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"libro-setting.d.ts","sourceRoot":"","sources":["../src/libro-setting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAGnE,eAAO,MAAM,oBAAoB,EAAE,iBAAiB,CAAC,OAAO,CAS3D,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,iBAAiB,CAAC,OAAO,CAS5D,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,iBAAiB,CAAC,OAAO,CAS7D,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,iBAAiB,CAAC,OAAO,CAS3D,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,iBAAiB,CAAC,OAAO,CAS/D,CAAC;AACF,eAAO,MAAM,oBAAoB,EAAE,iBAAiB,CAAC,OAAO,CAS3D,CAAC;AACF,eAA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zD,CAAC"}
|
package/es/libro-setting.js
CHANGED
|
@@ -108,4 +108,14 @@ export var SpmReporter = {
|
|
|
108
108
|
schema: {
|
|
109
109
|
type: 'boolean'
|
|
110
110
|
}
|
|
111
|
+
};
|
|
112
|
+
export var LargeOutputDisplay = {
|
|
113
|
+
id: 'libro.output.large.display',
|
|
114
|
+
description: l10n.t('是否优化长文本 output 显示'),
|
|
115
|
+
title: 'Output',
|
|
116
|
+
type: 'checkbox',
|
|
117
|
+
defaultValue: true,
|
|
118
|
+
schema: {
|
|
119
|
+
type: 'boolean'
|
|
120
|
+
}
|
|
111
121
|
};
|
package/es/libro-view.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { IModelContentChange } from '@difizen/libro-code-editor';
|
|
2
|
+
import type { MultilineString } from '@difizen/libro-common';
|
|
2
3
|
import { BaseView, ViewManager, Deferred, DisposableCollection, Emitter, ConfigurationService } from '@difizen/libro-common/app';
|
|
3
4
|
import type { FC, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
4
5
|
import { CellService } from './cell/index.js';
|
|
@@ -61,12 +62,21 @@ export declare class LibroView extends BaseView implements NotebookView {
|
|
|
61
62
|
get onRunCell(): import("@difizen/libro-common/app").Event<CellView>;
|
|
62
63
|
cellScrollEmitter: Emitter<void>;
|
|
63
64
|
get onCellScroll(): import("@difizen/libro-common/app").Event<void>;
|
|
65
|
+
outputRenderTabEmitter: Emitter<{
|
|
66
|
+
mimeType: string;
|
|
67
|
+
data: MultilineString | null;
|
|
68
|
+
}>;
|
|
69
|
+
get onOutputRenderTab(): import("@difizen/libro-common/app").Event<{
|
|
70
|
+
mimeType: string;
|
|
71
|
+
data: MultilineString | null;
|
|
72
|
+
}>;
|
|
64
73
|
protected initializedDefer: Deferred<void>;
|
|
65
74
|
get initialized(): Promise<void>;
|
|
66
75
|
constructor(options: NotebookOption, collapseServiceFactory: CollapseServiceFactory, notebookService: NotebookService, virtualizedManagerHelper: VirtualizedManagerHelper);
|
|
67
76
|
initView(): void;
|
|
68
77
|
initialize(): Promise<void>;
|
|
69
78
|
view: ForwardRefExoticComponent<RefAttributes<HTMLDivElement>>;
|
|
79
|
+
addLargeFileWarning: () => void;
|
|
70
80
|
onViewMount: () => void;
|
|
71
81
|
onViewUnmount: () => void;
|
|
72
82
|
getCellViewByOption(option: CellOptions): Promise<CellView>;
|
package/es/libro-view.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"libro-view.d.ts","sourceRoot":"","sources":["../src/libro-view.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"libro-view.d.ts","sourceRoot":"","sources":["../src/libro-view.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAM7D,OAAO,EAKL,QAAQ,EAIR,WAAW,EAEX,QAAQ,EAER,oBAAoB,EACpB,OAAO,EAIP,oBAAoB,EAErB,MAAM,2BAA2B,CAAC;AAGnC,OAAO,KAAK,EAAE,EAAE,EAAE,yBAAyB,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAI1E,OAAO,EACL,WAAW,EAIZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAG7D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,EAAE,eAAe,EAAyB,MAAM,qBAAqB,CAAC;AAC7E,OAAO,KAAK,EACV,WAAW,EACX,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,cAAc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