@difizen/libro-lab 0.0.2-alpha.0 → 0.1.0

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 (92) hide show
  1. package/es/github-link/index.js +43 -0
  2. package/es/index.d.ts +1 -1
  3. package/es/index.d.ts.map +1 -1
  4. package/es/index.js +1 -0
  5. package/es/index.less +69 -0
  6. package/es/kernel-manager/index.js +40 -0
  7. package/es/lab-app.d.ts +12 -0
  8. package/es/lab-app.d.ts.map +1 -0
  9. package/es/lab-app.js +103 -0
  10. package/es/layout/brand/index.js +46 -0
  11. package/es/layout/brand/index.less +16 -0
  12. package/es/layout/brand/logo.js +41 -0
  13. package/es/layout/container.js +54 -0
  14. package/es/layout/editor-tab-view.d.ts +7 -0
  15. package/es/layout/editor-tab-view.d.ts.map +1 -0
  16. package/es/layout/editor-tab-view.js +78 -0
  17. package/es/layout/footer/current-file-footer-view.d.ts +11 -0
  18. package/es/layout/footer/current-file-footer-view.d.ts.map +1 -0
  19. package/es/layout/footer/current-file-footer-view.js +66 -0
  20. package/es/layout/footer/footer-view.js +60 -0
  21. package/es/layout/footer/index.less +17 -0
  22. package/es/layout/index.d.ts +5 -0
  23. package/es/layout/index.d.ts.map +1 -0
  24. package/es/layout/index.js +4 -0
  25. package/es/layout/index.less +59 -0
  26. package/es/layout/layout-service.js +99 -0
  27. package/es/layout/layout.js +59 -0
  28. package/es/layout/main.d.ts +8 -0
  29. package/es/layout/main.d.ts.map +1 -0
  30. package/es/layout/main.js +80 -0
  31. package/es/layout/module.d.ts +3 -0
  32. package/es/layout/module.d.ts.map +1 -0
  33. package/es/layout/module.js +41 -0
  34. package/es/layout/protocol.js +9 -0
  35. package/es/menu/menu-bar-view.js +49 -0
  36. package/es/menu/menu-command.js +138 -0
  37. package/es/menu/menu-contribution.d.ts +18 -0
  38. package/es/menu/menu-contribution.d.ts.map +1 -0
  39. package/es/menu/menu-contribution.js +991 -0
  40. package/es/menu/module.d.ts +3 -0
  41. package/es/menu/module.d.ts.map +1 -0
  42. package/es/menu/module.js +7 -0
  43. package/es/module.d.ts +4 -0
  44. package/es/module.d.ts.map +1 -0
  45. package/es/module.js +55 -0
  46. package/es/toc/index.less +25 -0
  47. package/es/toc/libro-toc-icons.d.ts +7 -0
  48. package/es/toc/libro-toc-icons.d.ts.map +1 -0
  49. package/es/toc/libro-toc-icons.js +38 -0
  50. package/es/toc/libro-toc-panel-view.d.ts +18 -0
  51. package/es/toc/libro-toc-panel-view.d.ts.map +1 -0
  52. package/es/toc/libro-toc-panel-view.js +103 -0
  53. package/es/toc/module.d.ts +3 -0
  54. package/es/toc/module.d.ts.map +1 -0
  55. package/es/toc/module.js +13 -0
  56. package/es/welcome/index.js +47 -0
  57. package/es/welcome/index.less +21 -0
  58. package/es/welcome/welcome-icon.js +66 -0
  59. package/package.json +9 -3
  60. package/src/github-link/index.tsx +27 -0
  61. package/src/index.less +69 -0
  62. package/src/index.spec.ts +10 -0
  63. package/src/index.ts +1 -0
  64. package/src/kernel-manager/index.tsx +22 -0
  65. package/src/lab-app.ts +44 -0
  66. package/src/layout/brand/index.less +16 -0
  67. package/src/layout/brand/index.tsx +22 -0
  68. package/src/layout/brand/logo.tsx +39 -0
  69. package/src/layout/container.tsx +28 -0
  70. package/src/layout/editor-tab-view.tsx +67 -0
  71. package/src/layout/footer/current-file-footer-view.tsx +44 -0
  72. package/src/layout/footer/footer-view.tsx +30 -0
  73. package/src/layout/footer/index.less +17 -0
  74. package/src/layout/index.less +59 -0
  75. package/src/layout/index.tsx +4 -0
  76. package/src/layout/layout-service.ts +64 -0
  77. package/src/layout/layout.tsx +37 -0
  78. package/src/layout/main.tsx +68 -0
  79. package/src/layout/module.ts +62 -0
  80. package/src/layout/protocol.tsx +12 -0
  81. package/src/menu/menu-bar-view.tsx +28 -0
  82. package/src/menu/menu-command.ts +138 -0
  83. package/src/menu/menu-contribution.ts +658 -0
  84. package/src/menu/module.ts +13 -0
  85. package/src/module.tsx +88 -0
  86. package/src/toc/index.less +25 -0
  87. package/src/toc/libro-toc-icons.tsx +35 -0
  88. package/src/toc/libro-toc-panel-view.tsx +87 -0
  89. package/src/toc/module.ts +21 -0
  90. package/src/welcome/index.less +21 -0
  91. package/src/welcome/index.tsx +30 -0
  92. package/src/welcome/welcome-icon.tsx +64 -0
@@ -0,0 +1,43 @@
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, _class;
3
+ 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); } }
4
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
5
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
+ 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); }
7
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
8
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
9
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
10
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
11
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
12
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
13
+ 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; } }
14
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
15
+ import { GithubFilled } from '@ant-design/icons';
16
+ import { singleton, view } from '@difizen/mana-app';
17
+ import { BaseView } from '@difizen/mana-app';
18
+ import { forwardRef } from 'react';
19
+ import { jsx as _jsx } from "react/jsx-runtime";
20
+ export var GithubLinkComponent = /*#__PURE__*/forwardRef(function GithubLinkComponent() {
21
+ return /*#__PURE__*/_jsx("a", {
22
+ href: "https://github.com/difizen/libro",
23
+ target: "_blank",
24
+ rel: "noreferrer",
25
+ style: {
26
+ fontSize: 24
27
+ },
28
+ children: /*#__PURE__*/_jsx(GithubFilled, {})
29
+ });
30
+ });
31
+ export var GithubLinkView = (_dec = singleton(), _dec2 = view('github-link'), _dec(_class = _dec2(_class = /*#__PURE__*/function (_BaseView) {
32
+ _inherits(GithubLinkView, _BaseView);
33
+ var _super = _createSuper(GithubLinkView);
34
+ function GithubLinkView() {
35
+ var _this;
36
+ _classCallCheck(this, GithubLinkView);
37
+ _this = _super.call(this);
38
+ _this.view = GithubLinkComponent;
39
+ _this.link = '';
40
+ return _this;
41
+ }
42
+ return _createClass(GithubLinkView);
43
+ }(BaseView)) || _class) || _class);
package/es/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export {};
1
+ export * from './module.js';
2
2
  //# sourceMappingURL=index.d.ts.map
package/es/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
package/es/index.js CHANGED
@@ -0,0 +1 @@
1
+ export * from "./module.js";
package/es/index.less ADDED
@@ -0,0 +1,69 @@
1
+ #libro-lab-content-layout-left {
2
+ .mana-side-tab-view {
3
+ .mana-tabs-left {
4
+ .mana-tabs-nav {
5
+ background-color: #f0f2f51f;
6
+ min-width: 40px;
7
+ box-shadow:
8
+ 1px 0 0 0 rgba(0, 10, 26, 0.84%),
9
+ 2px 0 0 0 rgba(255, 255, 255, 4.8%);
10
+
11
+ .mana-tabs-ink-bar {
12
+ display: none;
13
+ }
14
+
15
+ .mana-tabs-tab {
16
+ width: 40px;
17
+ height: 40px;
18
+
19
+ &-btn {
20
+ width: 24px;
21
+ height: 24px;
22
+ border-radius: 4px;
23
+ display: flex;
24
+ align-items: center;
25
+ justify-content: center;
26
+
27
+ .mana-tab-icon {
28
+ .anticon {
29
+ font-size: 16px;
30
+ }
31
+ }
32
+ }
33
+ }
34
+
35
+ .mana-tabs-tab-active {
36
+ .mana-tabs-tab-btn {
37
+ background-color: #000a1a1f;
38
+
39
+ .mana-tab-icon {
40
+ color: #1890ff;
41
+ }
42
+ }
43
+ }
44
+ }
45
+
46
+ .mana-tabs-content-holder {
47
+ background-image: linear-gradient(269deg, #c8c8cd1f 0%, #ffffff1f 100%);
48
+ border-left: none;
49
+ background-color: unset;
50
+
51
+ .mana-tab-side-pane-content {
52
+ height: calc(100% - 32px);
53
+ }
54
+ }
55
+ }
56
+ }
57
+ }
58
+
59
+ #libro-lab-content-layout-main {
60
+ background-color: #f8f8fb;
61
+
62
+ .mana-tabs-nav {
63
+ background-color: #f8f8fb;
64
+ }
65
+ }
66
+
67
+ #libro-lab-content-layout-main-container {
68
+ overflow: auto;
69
+ }
@@ -0,0 +1,40 @@
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, _class;
3
+ 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); } }
4
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
5
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
+ 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); }
7
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
8
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
9
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
10
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
11
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
12
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
13
+ 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; } }
14
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
15
+ import { CodeFilled } from '@ant-design/icons';
16
+ import { singleton, view } from '@difizen/mana-app';
17
+ import { BaseView } from '@difizen/mana-app';
18
+ import { forwardRef } from 'react';
19
+
20
+ // import './index.less';
21
+ import { jsx as _jsx } from "react/jsx-runtime";
22
+ export var KernelManagerComponent = /*#__PURE__*/forwardRef(function KernelManagerComponent() {
23
+ return /*#__PURE__*/_jsx("span", {
24
+ children: "\u6682\u65E0\u6587\u4EF6"
25
+ });
26
+ });
27
+ export var KernelManagerView = (_dec = singleton(), _dec2 = view('kernel-manager'), _dec(_class = _dec2(_class = /*#__PURE__*/function (_BaseView) {
28
+ _inherits(KernelManagerView, _BaseView);
29
+ var _super = _createSuper(KernelManagerView);
30
+ function KernelManagerView() {
31
+ var _this;
32
+ _classCallCheck(this, KernelManagerView);
33
+ _this = _super.call(this);
34
+ _this.view = KernelManagerComponent;
35
+ _this.title.icon = /*#__PURE__*/_jsx(CodeFilled, {});
36
+ _this.title.label = 'Kernel 管理';
37
+ return _this;
38
+ }
39
+ return _createClass(KernelManagerView);
40
+ }(BaseView)) || _class) || _class);
@@ -0,0 +1,12 @@
1
+ import { LibroService, ServerConnection } from '@difizen/libro-jupyter';
2
+ import { ConfigurationService, ApplicationContribution, SlotViewManager, ViewManager } from '@difizen/mana-app';
3
+ export declare class LibroLabApp implements ApplicationContribution {
4
+ serverConnection: ServerConnection;
5
+ libroService: LibroService;
6
+ slotViewManager: SlotViewManager;
7
+ viewManager: ViewManager;
8
+ configurationService: ConfigurationService;
9
+ onStart(): Promise<void>;
10
+ protected initialWorkspace(): Promise<void>;
11
+ }
12
+ //# sourceMappingURL=lab-app.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lab-app.d.ts","sourceRoot":"","sources":["../src/lab-app.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,gBAAgB,EAEjB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,oBAAoB,EAGpB,uBAAuB,EACvB,eAAe,EACf,WAAW,EAGZ,MAAM,mBAAmB,CAAC;AAI3B,qBACa,WAAY,YAAW,uBAAuB;IAC/B,gBAAgB,EAAE,gBAAgB,CAAC;IACvC,YAAY,EAAE,YAAY,CAAC;IACxB,eAAe,EAAE,eAAe,CAAC;IACrC,WAAW,EAAE,WAAW,CAAC;IAChB,oBAAoB,EAAE,oBAAoB,CAAC;IAEnE,OAAO;cAQG,gBAAgB;CAQjC"}
package/es/lab-app.js ADDED
@@ -0,0 +1,103 @@
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, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5;
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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
8
+ 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); } }
9
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
10
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
11
+ 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); }
12
+ 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; }
13
+ 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.'); }
14
+ import { LibroService, ServerConnection, LibroJupyterConfiguration } from '@difizen/libro-jupyter';
15
+ import { ConfigurationService, FileTreeViewFactory, URI, ApplicationContribution, SlotViewManager, ViewManager, inject, singleton } from '@difizen/mana-app';
16
+ import { LibroLabLayoutSlots } from "./layout/index.js";
17
+ export var LibroLabApp = (_dec = singleton({
18
+ contrib: ApplicationContribution
19
+ }), _dec2 = inject(ServerConnection), _dec3 = inject(LibroService), _dec4 = inject(SlotViewManager), _dec5 = inject(ViewManager), _dec6 = inject(ConfigurationService), _dec(_class = (_class2 = /*#__PURE__*/function () {
20
+ function LibroLabApp() {
21
+ _classCallCheck(this, LibroLabApp);
22
+ _initializerDefineProperty(this, "serverConnection", _descriptor, this);
23
+ _initializerDefineProperty(this, "libroService", _descriptor2, this);
24
+ _initializerDefineProperty(this, "slotViewManager", _descriptor3, this);
25
+ _initializerDefineProperty(this, "viewManager", _descriptor4, this);
26
+ _initializerDefineProperty(this, "configurationService", _descriptor5, this);
27
+ }
28
+ _createClass(LibroLabApp, [{
29
+ key: "onStart",
30
+ value: function () {
31
+ var _onStart = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
32
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
33
+ while (1) switch (_context.prev = _context.next) {
34
+ case 0:
35
+ this.configurationService.set(LibroJupyterConfiguration['OpenSlot'], LibroLabLayoutSlots.content);
36
+ _context.next = 3;
37
+ return this.initialWorkspace();
38
+ case 3:
39
+ case "end":
40
+ return _context.stop();
41
+ }
42
+ }, _callee, this);
43
+ }));
44
+ function onStart() {
45
+ return _onStart.apply(this, arguments);
46
+ }
47
+ return onStart;
48
+ }()
49
+ }, {
50
+ key: "initialWorkspace",
51
+ value: function () {
52
+ var _initialWorkspace = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
53
+ var view;
54
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
55
+ while (1) switch (_context2.prev = _context2.next) {
56
+ case 0:
57
+ _context2.next = 2;
58
+ return this.viewManager.getOrCreateView(FileTreeViewFactory);
59
+ case 2:
60
+ view = _context2.sent;
61
+ if (view) {
62
+ view.model.rootVisible = false;
63
+ view.model.location = new URI('/');
64
+ }
65
+ case 4:
66
+ case "end":
67
+ return _context2.stop();
68
+ }
69
+ }, _callee2, this);
70
+ }));
71
+ function initialWorkspace() {
72
+ return _initialWorkspace.apply(this, arguments);
73
+ }
74
+ return initialWorkspace;
75
+ }()
76
+ }]);
77
+ return LibroLabApp;
78
+ }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "serverConnection", [_dec2], {
79
+ configurable: true,
80
+ enumerable: true,
81
+ writable: true,
82
+ initializer: null
83
+ }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "libroService", [_dec3], {
84
+ configurable: true,
85
+ enumerable: true,
86
+ writable: true,
87
+ initializer: null
88
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "slotViewManager", [_dec4], {
89
+ configurable: true,
90
+ enumerable: true,
91
+ writable: true,
92
+ initializer: null
93
+ }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "viewManager", [_dec5], {
94
+ configurable: true,
95
+ enumerable: true,
96
+ writable: true,
97
+ initializer: null
98
+ }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "configurationService", [_dec6], {
99
+ configurable: true,
100
+ enumerable: true,
101
+ writable: true,
102
+ initializer: null
103
+ })), _class2)) || _class);
@@ -0,0 +1,46 @@
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, _class;
3
+ 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); } }
4
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
5
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
+ 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); }
7
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
8
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
9
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
10
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
11
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
12
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
13
+ 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; } }
14
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
15
+ import { BaseView, view, singleton } from '@difizen/mana-app';
16
+ import * as React from 'react';
17
+ import { Logo } from "./logo.js";
18
+ import "./index.less";
19
+ import { jsx as _jsx } from "react/jsx-runtime";
20
+ import { jsxs as _jsxs } from "react/jsx-runtime";
21
+ export var Brand = /*#__PURE__*/React.forwardRef(function Brand(_props, ref) {
22
+ return /*#__PURE__*/_jsxs("div", {
23
+ className: "libro-lab-brand",
24
+ ref: ref,
25
+ children: [/*#__PURE__*/_jsx(Logo, {
26
+ className: "libro-lab-brand-logo"
27
+ }), /*#__PURE__*/_jsx("label", {
28
+ children: "libro lab"
29
+ })]
30
+ });
31
+ });
32
+ export var BrandView = (_dec = singleton(), _dec2 = view('libro-brand-view'), _dec(_class = _dec2(_class = /*#__PURE__*/function (_BaseView) {
33
+ _inherits(BrandView, _BaseView);
34
+ var _super = _createSuper(BrandView);
35
+ function BrandView() {
36
+ var _this;
37
+ _classCallCheck(this, BrandView);
38
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
39
+ args[_key] = arguments[_key];
40
+ }
41
+ _this = _super.call.apply(_super, [this].concat(args));
42
+ _this.view = Brand;
43
+ return _this;
44
+ }
45
+ return _createClass(BrandView);
46
+ }(BaseView)) || _class) || _class);
@@ -0,0 +1,16 @@
1
+ .libro-lab-brand {
2
+ display: flex;
3
+ align-items: center;
4
+ height: 100%;
5
+ width: 100%;
6
+ padding: 0 22px;
7
+
8
+ &-logo {
9
+ height: 16px;
10
+ }
11
+
12
+ label {
13
+ font-size: 16px;
14
+ margin-left: 8px;
15
+ }
16
+ }
@@ -0,0 +1,41 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { jsxs as _jsxs } from "react/jsx-runtime";
3
+ export function Logo(props) {
4
+ var _props$className = props.className,
5
+ className = _props$className === void 0 ? '' : _props$className;
6
+ return /*#__PURE__*/_jsx("svg", {
7
+ viewBox: "0 0 154 116",
8
+ className: className,
9
+ version: "1.1",
10
+ xmlns: "http://www.w3.org/2000/svg",
11
+ xmlnsXlink: "http://www.w3.org/1999/xlink",
12
+ children: /*#__PURE__*/_jsx("g", {
13
+ id: "\u9875\u9762-1",
14
+ stroke: "none",
15
+ strokeWidth: "1",
16
+ fill: "none",
17
+ fillRule: "evenodd",
18
+ children: /*#__PURE__*/_jsx("g", {
19
+ id: "\u753B\u677F\u5907\u4EFD-6",
20
+ transform: "translate(-119.000000, -152.000000)",
21
+ children: /*#__PURE__*/_jsxs("g", {
22
+ id: "Libro-logo",
23
+ transform: "translate(119.000000, 152.000000)",
24
+ children: [/*#__PURE__*/_jsx("path", {
25
+ d: "M128.970588,66 C142.793951,66 154,77.1926795 154,90.9995493 C154,104.806419 142.793951,115.999099 128.970588,115.999099 C128.473758,115.999099 127.980309,115.98464 127.49064,115.956121 L127.697007,115.999674 L80,115.999099 L93.1090651,98.1074032 L108.158627,77.1069733 C112.649045,70.4093826 120.294268,66 128.970588,66 Z",
26
+ id: "\u5F62\u72B6\u7ED3\u5408",
27
+ fill: "#155DE2"
28
+ }), /*#__PURE__*/_jsx("path", {
29
+ d: "M104.481034,0 L147,0 L147,0 L59.3397468,116 L0,116 L78.0248494,13.1382037 C84.3029962,4.8615911 94.0927023,-5.19712172e-15 104.481034,0 Z",
30
+ id: "\u77E9\u5F62",
31
+ fill: "#155DE2"
32
+ }), /*#__PURE__*/_jsx("path", {
33
+ d: "M65.667264,51.1430655 C65.667264,84.8453007 91.2203312,112.576275 123.999729,115.999972 L0,115.997535 L75.3014571,17.0042341 C69.1915639,26.9341621 65.667264,38.6268332 65.667264,51.1430655 Z",
34
+ id: "\u5F62\u72B6\u7ED3\u5408",
35
+ fill: "#12D8C6"
36
+ })]
37
+ })
38
+ })
39
+ })
40
+ });
41
+ }
@@ -0,0 +1,54 @@
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, _class;
3
+ 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); } }
4
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
5
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
+ 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); }
7
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
8
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
9
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
10
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
11
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
12
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
13
+ 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; } }
14
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
15
+ import { singleton, Slot, view } from '@difizen/mana-app';
16
+ import { BaseView } from '@difizen/mana-app';
17
+ import { BoxPanel } from '@difizen/mana-react';
18
+ import { forwardRef } from 'react';
19
+ import "./index.less";
20
+ import { LibroLabLayoutSlots } from "./protocol.js";
21
+ import { jsx as _jsx } from "react/jsx-runtime";
22
+ import { jsxs as _jsxs } from "react/jsx-runtime";
23
+ export var LibroLabLayoutContainerComponent = /*#__PURE__*/forwardRef(function LibroLabLayoutContainerComponent() {
24
+ return /*#__PURE__*/_jsxs(BoxPanel, {
25
+ direction: "top-to-bottom",
26
+ children: [/*#__PURE__*/_jsx(BoxPanel.Pane, {
27
+ className: "libro-lab-layout-main",
28
+ flex: 1,
29
+ children: /*#__PURE__*/_jsx(Slot, {
30
+ name: LibroLabLayoutSlots.main
31
+ })
32
+ }), /*#__PURE__*/_jsx(BoxPanel.Pane, {
33
+ className: "libro-lab-layout-footer",
34
+ children: /*#__PURE__*/_jsx(Slot, {
35
+ name: LibroLabLayoutSlots.footer
36
+ })
37
+ })]
38
+ });
39
+ });
40
+ export var LibroLabLayoutContainerView = (_dec = singleton(), _dec2 = view('libro-lab-layout-container'), _dec(_class = _dec2(_class = /*#__PURE__*/function (_BaseView) {
41
+ _inherits(LibroLabLayoutContainerView, _BaseView);
42
+ var _super = _createSuper(LibroLabLayoutContainerView);
43
+ function LibroLabLayoutContainerView() {
44
+ var _this;
45
+ _classCallCheck(this, LibroLabLayoutContainerView);
46
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
47
+ args[_key] = arguments[_key];
48
+ }
49
+ _this = _super.call.apply(_super, [this].concat(args));
50
+ _this.view = LibroLabLayoutContainerComponent;
51
+ return _this;
52
+ }
53
+ return _createClass(LibroLabLayoutContainerView);
54
+ }(BaseView)) || _class) || _class);
@@ -0,0 +1,7 @@
1
+ import type { View } from '@difizen/mana-app';
2
+ import { CardTabView } from '@difizen/mana-app';
3
+ export declare class EditorTabView extends CardTabView {
4
+ protected renderTab(item: View): import("react/jsx-runtime").JSX.Element;
5
+ protected renderTail(item: View): import("react/jsx-runtime").JSX.Element;
6
+ }
7
+ //# sourceMappingURL=editor-tab-view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-tab-view.d.ts","sourceRoot":"","sources":["../../src/layout/editor-tab-view.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EACL,WAAW,EAKZ,MAAM,mBAAmB,CAAC;AAK3B,qBAEa,aAAc,SAAQ,WAAW;cACzB,SAAS,CAAC,IAAI,EAAE,IAAI;IAwBvC,SAAS,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI;CAyBhC"}
@@ -0,0 +1,78 @@
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, _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
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
9
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
10
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
11
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
12
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
13
+ 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; } }
14
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
15
+ import { CloseOutlined } from '@ant-design/icons';
16
+ import { EditorView } from '@difizen/libro-jupyter';
17
+ import { CardTabView, MenuRender, transient, view, ViewContext } from '@difizen/mana-app';
18
+ import { Dropdown } from '@difizen/mana-react';
19
+ import { Badge } from 'antd';
20
+ import classnames from 'classnames';
21
+ import { jsx as _jsx } from "react/jsx-runtime";
22
+ import { jsxs as _jsxs } from "react/jsx-runtime";
23
+ export var EditorTabView = (_dec = transient(), _dec2 = view('LibroLabEditorTab'), _dec(_class = _dec2(_class = /*#__PURE__*/function (_CardTabView) {
24
+ _inherits(EditorTabView, _CardTabView);
25
+ var _super = _createSuper(EditorTabView);
26
+ function EditorTabView() {
27
+ _classCallCheck(this, EditorTabView);
28
+ return _super.apply(this, arguments);
29
+ }
30
+ _createClass(EditorTabView, [{
31
+ key: "renderTab",
32
+ value: function renderTab(item) {
33
+ return /*#__PURE__*/_jsx(ViewContext, {
34
+ view: item,
35
+ children: /*#__PURE__*/_jsx(Dropdown, {
36
+ trigger: ['contextMenu'],
37
+ overlay: /*#__PURE__*/_jsx(MenuRender, {
38
+ menuPath: ['tab-bar-context-menu'],
39
+ data: undefined
40
+ }),
41
+ children: /*#__PURE__*/_jsxs("div", {
42
+ title: item.title.caption,
43
+ className: classnames('mana-tab-title', item.title.className),
44
+ children: [item.title.icon && /*#__PURE__*/_jsx("span", {
45
+ className: "mana-tab-icon",
46
+ children: this.renderTitleIcon(item.title.icon)
47
+ }), this.renderTitleLabel(item.title.label), this.renderTail(item)]
48
+ })
49
+ })
50
+ });
51
+ }
52
+ }, {
53
+ key: "renderTail",
54
+ value: function renderTail(item) {
55
+ var _this = this;
56
+ var isDirty = EditorView.is(item) && item.dirty;
57
+ return /*#__PURE__*/_jsx("div", {
58
+ className: "libro-lab-editor-tab-tail",
59
+ children: isDirty ? /*#__PURE__*/_jsx("div", {
60
+ className: "libro-lab-editor-tab-dirty",
61
+ children: /*#__PURE__*/_jsx(Badge, {
62
+ status: "default"
63
+ })
64
+ }) : item.title.closable && /*#__PURE__*/_jsx(CloseOutlined, {
65
+ onClick: function onClick(e) {
66
+ e.stopPropagation();
67
+ _this.close(item);
68
+ if (_this.children.length > 0) {
69
+ _this.active = _this.children[_this.children.length - 1];
70
+ }
71
+ },
72
+ className: "mana-tab-close"
73
+ })
74
+ });
75
+ }
76
+ }]);
77
+ return EditorTabView;
78
+ }(CardTabView)) || _class) || _class);
@@ -0,0 +1,11 @@
1
+ import { LibroNavigatableView } from '@difizen/libro-jupyter';
2
+ import { BaseView } from '@difizen/mana-app';
3
+ import * as React from 'react';
4
+ import { LayoutService } from '../layout-service.js';
5
+ import './index.less';
6
+ export declare class LibroLabCurrentFileFooterView extends BaseView {
7
+ view: React.ForwardRefExoticComponent<React.RefAttributes<HTMLDivElement>>;
8
+ protected layoutService: LayoutService;
9
+ get libroNavigatableView(): LibroNavigatableView | undefined;
10
+ }
11
+ //# sourceMappingURL=current-file-footer-view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"current-file-footer-view.d.ts","sourceRoot":"","sources":["../../../src/layout/footer/current-file-footer-view.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EACL,QAAQ,EAMT,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,cAAc,CAAC;AAiBtB,qBAEa,6BAA8B,SAAQ,QAAQ;IAChD,IAAI,uEAA8B;IACpB,SAAS,CAAC,aAAa,EAAE,aAAa,CAAC;IAE9D,IAAI,oBAAoB,qCAMvB;CACF"}