@difizen/libro-jupyter 0.0.2-alpha.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 (267) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -0
  3. package/es/add-between-cell/add-between-cell-command-contribution.d.ts +14 -0
  4. package/es/add-between-cell/add-between-cell-command-contribution.d.ts.map +1 -0
  5. package/es/add-between-cell/add-between-cell-command-contribution.js +97 -0
  6. package/es/add-between-cell/add-between-cell.d.ts +5 -0
  7. package/es/add-between-cell/add-between-cell.d.ts.map +1 -0
  8. package/es/add-between-cell/add-between-cell.js +243 -0
  9. package/es/add-between-cell/index.d.ts +3 -0
  10. package/es/add-between-cell/index.d.ts.map +1 -0
  11. package/es/add-between-cell/index.js +2 -0
  12. package/es/add-between-cell/index.less +103 -0
  13. package/es/add-between-cell/module.d.ts +3 -0
  14. package/es/add-between-cell/module.d.ts.map +1 -0
  15. package/es/add-between-cell/module.js +8 -0
  16. package/es/cell/index.d.ts +3 -0
  17. package/es/cell/index.d.ts.map +1 -0
  18. package/es/cell/index.js +2 -0
  19. package/es/cell/jupyter-code-cell-model.d.ts +12 -0
  20. package/es/cell/jupyter-code-cell-model.d.ts.map +1 -0
  21. package/es/cell/jupyter-code-cell-model.js +56 -0
  22. package/es/cell/jupyter-code-cell-view.d.ts +18 -0
  23. package/es/cell/jupyter-code-cell-view.d.ts.map +1 -0
  24. package/es/cell/jupyter-code-cell-view.js +280 -0
  25. package/es/command/command-contribution.d.ts +10 -0
  26. package/es/command/command-contribution.d.ts.map +1 -0
  27. package/es/command/command-contribution.js +161 -0
  28. package/es/command/index.d.ts +3 -0
  29. package/es/command/index.d.ts.map +1 -0
  30. package/es/command/index.js +2 -0
  31. package/es/command/keybinding-contribution.d.ts +8 -0
  32. package/es/command/keybinding-contribution.d.ts.map +1 -0
  33. package/es/command/keybinding-contribution.js +37 -0
  34. package/es/components/cell-execution-tip.d.ts +6 -0
  35. package/es/components/cell-execution-tip.d.ts.map +1 -0
  36. package/es/components/cell-execution-tip.js +69 -0
  37. package/es/components/cell-input-bottom-blank.d.ts +5 -0
  38. package/es/components/cell-input-bottom-blank.d.ts.map +1 -0
  39. package/es/components/cell-input-bottom-blank.js +21 -0
  40. package/es/components/icons.d.ts +5 -0
  41. package/es/components/icons.d.ts.map +1 -0
  42. package/es/components/icons.js +154 -0
  43. package/es/components/index.d.ts +4 -0
  44. package/es/components/index.d.ts.map +1 -0
  45. package/es/components/index.js +3 -0
  46. package/es/components/index.less +82 -0
  47. package/es/config/config-contribution.d.ts +10 -0
  48. package/es/config/config-contribution.d.ts.map +1 -0
  49. package/es/config/config-contribution.js +50 -0
  50. package/es/config/config.d.ts +3 -0
  51. package/es/config/config.d.ts.map +1 -0
  52. package/es/config/config.js +11 -0
  53. package/es/config/index.d.ts +2 -0
  54. package/es/config/index.d.ts.map +1 -0
  55. package/es/config/index.js +1 -0
  56. package/es/configuration/index.d.ts +3 -0
  57. package/es/configuration/index.d.ts.map +1 -0
  58. package/es/configuration/index.js +2 -0
  59. package/es/configuration/libro-configuration-contribution.d.ts +5 -0
  60. package/es/configuration/libro-configuration-contribution.d.ts.map +1 -0
  61. package/es/configuration/libro-configuration-contribution.js +24 -0
  62. package/es/configuration/libro-configuration.d.ts +3 -0
  63. package/es/configuration/libro-configuration.d.ts.map +1 -0
  64. package/es/configuration/libro-configuration.js +12 -0
  65. package/es/contents/content-contribution.d.ts +7 -0
  66. package/es/contents/content-contribution.d.ts.map +1 -0
  67. package/es/contents/content-contribution.js +63 -0
  68. package/es/contents/index.d.ts +2 -0
  69. package/es/contents/index.d.ts.map +1 -0
  70. package/es/contents/index.js +1 -0
  71. package/es/file/file-name-alias.d.ts +7 -0
  72. package/es/file/file-name-alias.d.ts.map +1 -0
  73. package/es/file/file-name-alias.js +26 -0
  74. package/es/file/file-protocol.d.ts +8 -0
  75. package/es/file/file-protocol.d.ts.map +1 -0
  76. package/es/file/file-protocol.js +7 -0
  77. package/es/file/file-service.d.ts +31 -0
  78. package/es/file/file-service.d.ts.map +1 -0
  79. package/es/file/file-service.js +329 -0
  80. package/es/file/file-tree-label-provider.d.ts +13 -0
  81. package/es/file/file-tree-label-provider.d.ts.map +1 -0
  82. package/es/file/file-tree-label-provider.js +62 -0
  83. package/es/file/file-view/index.d.ts +14 -0
  84. package/es/file/file-view/index.d.ts.map +1 -0
  85. package/es/file/file-view/index.js +101 -0
  86. package/es/file/file-view/index.less +5 -0
  87. package/es/file/index.d.ts +7 -0
  88. package/es/file/index.d.ts.map +1 -0
  89. package/es/file/index.js +6 -0
  90. package/es/file/module.d.ts +3 -0
  91. package/es/file/module.d.ts.map +1 -0
  92. package/es/file/module.js +8 -0
  93. package/es/file/navigatable-view.d.ts +24 -0
  94. package/es/file/navigatable-view.d.ts.map +1 -0
  95. package/es/file/navigatable-view.js +151 -0
  96. package/es/file/open-handler-contribution.d.ts +11 -0
  97. package/es/file/open-handler-contribution.d.ts.map +1 -0
  98. package/es/file/open-handler-contribution.js +102 -0
  99. package/es/index.d.ts +32 -0
  100. package/es/index.d.ts.map +1 -0
  101. package/es/index.js +31 -0
  102. package/es/keybind-instructions/index.d.ts +6 -0
  103. package/es/keybind-instructions/index.d.ts.map +1 -0
  104. package/es/keybind-instructions/index.js +5 -0
  105. package/es/keybind-instructions/index.less +177 -0
  106. package/es/keybind-instructions/keybind-instructions-contribution.d.ts +11 -0
  107. package/es/keybind-instructions/keybind-instructions-contribution.d.ts.map +1 -0
  108. package/es/keybind-instructions/keybind-instructions-contribution.js +84 -0
  109. package/es/keybind-instructions/keybind-instructions-icon.d.ts +3 -0
  110. package/es/keybind-instructions/keybind-instructions-icon.d.ts.map +1 -0
  111. package/es/keybind-instructions/keybind-instructions-icon.js +23 -0
  112. package/es/keybind-instructions/keybind-instructions-items.d.ts +14 -0
  113. package/es/keybind-instructions/keybind-instructions-items.d.ts.map +1 -0
  114. package/es/keybind-instructions/keybind-instructions-items.js +589 -0
  115. package/es/keybind-instructions/keybind-instructions-view.d.ts +16 -0
  116. package/es/keybind-instructions/keybind-instructions-view.d.ts.map +1 -0
  117. package/es/keybind-instructions/keybind-instructions-view.js +224 -0
  118. package/es/keybind-instructions/module.d.ts +3 -0
  119. package/es/keybind-instructions/module.d.ts.map +1 -0
  120. package/es/keybind-instructions/module.js +5 -0
  121. package/es/libro-jupyter-file-service.d.ts +106 -0
  122. package/es/libro-jupyter-file-service.d.ts.map +1 -0
  123. package/es/libro-jupyter-file-service.js +127 -0
  124. package/es/libro-jupyter-model.d.ts +49 -0
  125. package/es/libro-jupyter-model.d.ts.map +1 -0
  126. package/es/libro-jupyter-model.js +505 -0
  127. package/es/libro-jupyter-protocol.d.ts +38 -0
  128. package/es/libro-jupyter-protocol.d.ts.map +1 -0
  129. package/es/libro-jupyter-protocol.js +9 -0
  130. package/es/libro-jupyter-server-launch-manager.d.ts +11 -0
  131. package/es/libro-jupyter-server-launch-manager.d.ts.map +1 -0
  132. package/es/libro-jupyter-server-launch-manager.js +59 -0
  133. package/es/libro-jupyter-view.d.ts +10 -0
  134. package/es/libro-jupyter-view.d.ts.map +1 -0
  135. package/es/libro-jupyter-view.js +42 -0
  136. package/es/module.d.ts +3 -0
  137. package/es/module.d.ts.map +1 -0
  138. package/es/module.js +48 -0
  139. package/es/output/index.d.ts +2 -0
  140. package/es/output/index.d.ts.map +1 -0
  141. package/es/output/index.js +1 -0
  142. package/es/output/libro-jupyter-outputarea.d.ts +8 -0
  143. package/es/output/libro-jupyter-outputarea.d.ts.map +1 -0
  144. package/es/output/libro-jupyter-outputarea.js +77 -0
  145. package/es/rendermime/assets/plotly.svg +31 -0
  146. package/es/rendermime/index.d.ts +5 -0
  147. package/es/rendermime/index.d.ts.map +1 -0
  148. package/es/rendermime/index.js +4 -0
  149. package/es/rendermime/index.less +22 -0
  150. package/es/rendermime/module.d.ts +3 -0
  151. package/es/rendermime/module.d.ts.map +1 -0
  152. package/es/rendermime/module.js +3 -0
  153. package/es/rendermime/plotly-render.d.ts +7 -0
  154. package/es/rendermime/plotly-render.d.ts.map +1 -0
  155. package/es/rendermime/plotly-render.js +30 -0
  156. package/es/rendermime/plotly-renderers.d.ts +58 -0
  157. package/es/rendermime/plotly-renderers.d.ts.map +1 -0
  158. package/es/rendermime/plotly-renderers.js +211 -0
  159. package/es/rendermime/plotly-rendermime-contribution.d.ts +12 -0
  160. package/es/rendermime/plotly-rendermime-contribution.d.ts.map +1 -0
  161. package/es/rendermime/plotly-rendermime-contribution.js +22 -0
  162. package/es/theme/color-registry.d.ts +6 -0
  163. package/es/theme/color-registry.d.ts.map +1 -0
  164. package/es/theme/color-registry.js +393 -0
  165. package/es/theme/index.d.ts +2 -0
  166. package/es/theme/index.d.ts.map +1 -0
  167. package/es/theme/index.js +1 -0
  168. package/es/toolbar/index.d.ts +6 -0
  169. package/es/toolbar/index.d.ts.map +1 -0
  170. package/es/toolbar/index.js +5 -0
  171. package/es/toolbar/index.less +194 -0
  172. package/es/toolbar/kernel-selector-dropdown.d.ts +13 -0
  173. package/es/toolbar/kernel-selector-dropdown.d.ts.map +1 -0
  174. package/es/toolbar/kernel-selector-dropdown.js +165 -0
  175. package/es/toolbar/kernel-status-and-selector.d.ts +18 -0
  176. package/es/toolbar/kernel-status-and-selector.d.ts.map +1 -0
  177. package/es/toolbar/kernel-status-and-selector.js +164 -0
  178. package/es/toolbar/run-selector.d.ts +3 -0
  179. package/es/toolbar/run-selector.d.ts.map +1 -0
  180. package/es/toolbar/run-selector.js +98 -0
  181. package/es/toolbar/save-file-error-contribution.d.ts +5 -0
  182. package/es/toolbar/save-file-error-contribution.d.ts.map +1 -0
  183. package/es/toolbar/save-file-error-contribution.js +23 -0
  184. package/es/toolbar/save-file-error.d.ts +5 -0
  185. package/es/toolbar/save-file-error.d.ts.map +1 -0
  186. package/es/toolbar/save-file-error.js +27 -0
  187. package/es/toolbar/side-toolbar-run-selector.d.ts +3 -0
  188. package/es/toolbar/side-toolbar-run-selector.d.ts.map +1 -0
  189. package/es/toolbar/side-toolbar-run-selector.js +67 -0
  190. package/es/toolbar/toolbar-contribution.d.ts +9 -0
  191. package/es/toolbar/toolbar-contribution.d.ts.map +1 -0
  192. package/es/toolbar/toolbar-contribution.js +67 -0
  193. package/es/typings/index.d.ts +31 -0
  194. package/es/utils/index.d.ts +11 -0
  195. package/es/utils/index.d.ts.map +1 -0
  196. package/es/utils/index.js +47 -0
  197. package/package.json +75 -0
  198. package/src/add-between-cell/add-between-cell-command-contribution.ts +63 -0
  199. package/src/add-between-cell/add-between-cell.tsx +201 -0
  200. package/src/add-between-cell/index.less +103 -0
  201. package/src/add-between-cell/index.ts +2 -0
  202. package/src/add-between-cell/module.ts +13 -0
  203. package/src/cell/index.ts +2 -0
  204. package/src/cell/jupyter-code-cell-model.ts +36 -0
  205. package/src/cell/jupyter-code-cell-view.tsx +221 -0
  206. package/src/command/command-contribution.ts +163 -0
  207. package/src/command/index.ts +2 -0
  208. package/src/command/keybinding-contribution.ts +25 -0
  209. package/src/components/cell-execution-tip.tsx +107 -0
  210. package/src/components/cell-input-bottom-blank.tsx +24 -0
  211. package/src/components/icons.tsx +117 -0
  212. package/src/components/index.less +82 -0
  213. package/src/components/index.ts +3 -0
  214. package/src/config/config-contribution.ts +21 -0
  215. package/src/config/config.ts +14 -0
  216. package/src/config/index.ts +1 -0
  217. package/src/configuration/index.ts +2 -0
  218. package/src/configuration/libro-configuration-contribution.ts +11 -0
  219. package/src/configuration/libro-configuration.ts +14 -0
  220. package/src/contents/content-contribution.ts +32 -0
  221. package/src/contents/index.ts +1 -0
  222. package/src/file/file-name-alias.ts +15 -0
  223. package/src/file/file-protocol.ts +7 -0
  224. package/src/file/file-service.ts +179 -0
  225. package/src/file/file-tree-label-provider.ts +42 -0
  226. package/src/file/file-view/index.less +5 -0
  227. package/src/file/file-view/index.tsx +90 -0
  228. package/src/file/index.ts +6 -0
  229. package/src/file/module.ts +19 -0
  230. package/src/file/navigatable-view.tsx +93 -0
  231. package/src/file/open-handler-contribution.ts +44 -0
  232. package/src/index.ts +32 -0
  233. package/src/keybind-instructions/index.less +177 -0
  234. package/src/keybind-instructions/index.ts +5 -0
  235. package/src/keybind-instructions/keybind-instructions-contribution.ts +47 -0
  236. package/src/keybind-instructions/keybind-instructions-icon.tsx +28 -0
  237. package/src/keybind-instructions/keybind-instructions-items.tsx +597 -0
  238. package/src/keybind-instructions/keybind-instructions-view.tsx +239 -0
  239. package/src/keybind-instructions/module.ts +11 -0
  240. package/src/libro-jupyter-file-service.ts +158 -0
  241. package/src/libro-jupyter-model.ts +289 -0
  242. package/src/libro-jupyter-protocol.ts +59 -0
  243. package/src/libro-jupyter-server-launch-manager.ts +36 -0
  244. package/src/libro-jupyter-view.tsx +24 -0
  245. package/src/module.ts +105 -0
  246. package/src/output/index.ts +1 -0
  247. package/src/output/libro-jupyter-outputarea.tsx +71 -0
  248. package/src/rendermime/assets/plotly.svg +31 -0
  249. package/src/rendermime/index.less +13 -0
  250. package/src/rendermime/index.ts +4 -0
  251. package/src/rendermime/module.ts +7 -0
  252. package/src/rendermime/plotly-render.tsx +35 -0
  253. package/src/rendermime/plotly-renderers.ts +191 -0
  254. package/src/rendermime/plotly-rendermime-contribution.ts +15 -0
  255. package/src/theme/color-registry.ts +301 -0
  256. package/src/theme/index.ts +1 -0
  257. package/src/toolbar/index.less +194 -0
  258. package/src/toolbar/index.ts +5 -0
  259. package/src/toolbar/kernel-selector-dropdown.tsx +204 -0
  260. package/src/toolbar/kernel-status-and-selector.tsx +195 -0
  261. package/src/toolbar/run-selector.tsx +110 -0
  262. package/src/toolbar/save-file-error-contribution.ts +10 -0
  263. package/src/toolbar/save-file-error.tsx +35 -0
  264. package/src/toolbar/side-toolbar-run-selector.tsx +77 -0
  265. package/src/toolbar/toolbar-contribution.tsx +62 -0
  266. package/src/typings/index.d.ts +31 -0
  267. package/src/utils/index.ts +65 -0
@@ -0,0 +1,37 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ var _dec, _dec2, _class, _class2, _descriptor;
3
+ 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 }); }
4
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5
+ 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); } }
6
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
7
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
8
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
9
+ function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
10
+ function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }
11
+ import { NotebookCommands, DocumentCommands, LibroCommandRegister } from '@difizen/libro-core';
12
+ import { inject, KeybindingRegistry, singleton, KeybindingContribution } from '@difizen/mana-app';
13
+ export var LibroJupyterKeybindingContribution = (_dec = singleton({
14
+ contrib: KeybindingContribution
15
+ }), _dec2 = inject(LibroCommandRegister), _dec(_class = (_class2 = /*#__PURE__*/function () {
16
+ function LibroJupyterKeybindingContribution(keybindRegistry) {
17
+ _classCallCheck(this, LibroJupyterKeybindingContribution);
18
+ _initializerDefineProperty(this, "libroCommand", _descriptor, this);
19
+ // 快捷键命中时默认阻止事件冒泡
20
+ keybindRegistry.preventDefault = true;
21
+ keybindRegistry.stopPropagation = true;
22
+ }
23
+ LibroJupyterKeybindingContribution = inject(KeybindingRegistry)(LibroJupyterKeybindingContribution, undefined, 0) || LibroJupyterKeybindingContribution;
24
+ _createClass(LibroJupyterKeybindingContribution, [{
25
+ key: "registerKeybindings",
26
+ value: function registerKeybindings(keybindings) {
27
+ this.libroCommand.registerKeybinds(keybindings, NotebookCommands);
28
+ this.libroCommand.registerKeybinds(keybindings, DocumentCommands);
29
+ }
30
+ }]);
31
+ return LibroJupyterKeybindingContribution;
32
+ }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "libroCommand", [_dec2], {
33
+ configurable: true,
34
+ enumerable: true,
35
+ writable: true,
36
+ initializer: null
37
+ })), _class2)) || _class);
@@ -0,0 +1,6 @@
1
+ import type { CellView } from '@difizen/libro-core';
2
+ import './index.less';
3
+ export declare function CellExecutionTip({ cell }: {
4
+ cell: CellView;
5
+ }): import("react/jsx-runtime").JSX.Element | null;
6
+ //# sourceMappingURL=cell-execution-tip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cell-execution-tip.d.ts","sourceRoot":"","sources":["../../src/components/cell-execution-tip.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAmBpD,OAAO,cAAc,CAAC;AAEtB,wBAAgB,gBAAgB,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,kDAoF5D"}
@@ -0,0 +1,69 @@
1
+ import { LoadingOutlined } from '@ant-design/icons';
2
+ import { ExecutableCellView, CheckCircleOutlined, ExecutableCellModel } from '@difizen/libro-core';
3
+ import { useObserve } from '@difizen/mana-app';
4
+ import classnames from 'classnames';
5
+ import moment from 'moment';
6
+ import { formatTime, parseExecutionInfoFromModel, isWaitingExecute } from "../utils/index.js";
7
+ import { InfoCircle } from "./icons.js";
8
+ import "./index.less";
9
+ import { jsx as _jsx } from "react/jsx-runtime";
10
+ import { jsxs as _jsxs } from "react/jsx-runtime";
11
+ export function CellExecutionTip(_ref) {
12
+ var cell = _ref.cell;
13
+ var observableCell = useObserve(cell);
14
+ if (!ExecutableCellView.is(cell)) {
15
+ return null;
16
+ }
17
+ if (!ExecutableCellModel.is(observableCell.model)) {
18
+ return null;
19
+ }
20
+ var isHidden = observableCell.model.hasOutputHidden;
21
+ var kernelExecuting = cell.model.kernelExecuting;
22
+ var executionInfo = parseExecutionInfoFromModel(cell.model);
23
+ var output = cell.outputArea.outputs;
24
+ var existOutput = output && output.length !== 0;
25
+ var waitingExecute = isWaitingExecute(observableCell.model);
26
+ if (!executionInfo) {
27
+ return null;
28
+ }
29
+ var executeStartTime = executionInfo.executeStartTime,
30
+ executeFinishTime = executionInfo.executeFinishTime;
31
+ if (executeStartTime && executeFinishTime && observableCell.model.executeCount) {
32
+ return isHidden ? /*#__PURE__*/_jsxs("div", {
33
+ className: "libro-cell-execution-tip-hide-output",
34
+ children: [/*#__PURE__*/_jsx("div", {
35
+ className: "libro-cell-execution-tip-border"
36
+ }), /*#__PURE__*/_jsx(CheckCircleOutlined, {})]
37
+ }) : /*#__PURE__*/_jsxs("div", {
38
+ className: classnames("libro-cell-execution-tip", !existOutput && 'libro-cell-execution-tip-without-output'),
39
+ children: [/*#__PURE__*/_jsx("div", {
40
+ className: "libro-cell-execution-tip-border"
41
+ }), /*#__PURE__*/_jsx(CheckCircleOutlined, {}), /*#__PURE__*/_jsx("p", {
42
+ children: 'The execution took in ' + formatTime(Number(new Date(executeFinishTime).getTime()) - Number(new Date(executeStartTime).getTime())) + ', finished at ' + moment(new Date(executeFinishTime).getTime()).format('hh:mm a') + '.'
43
+ })]
44
+ });
45
+ } else if (kernelExecuting) {
46
+ return /*#__PURE__*/_jsxs("div", {
47
+ className: classnames("libro-cell-execution-tip", !existOutput && 'libro-cell-execution-tip-without-output'),
48
+ children: [/*#__PURE__*/_jsx("div", {
49
+ className: "libro-cell-execution-tip-border"
50
+ }), /*#__PURE__*/_jsx(LoadingOutlined, {
51
+ style: {
52
+ color: 'rgba(24,144,255,1)'
53
+ }
54
+ }), /*#__PURE__*/_jsx("p", {
55
+ children: 'It takes ' + formatTime(Date.now() - Number(new Date(executeStartTime).getTime())) + '.'
56
+ })]
57
+ });
58
+ } else if (waitingExecute) {
59
+ return /*#__PURE__*/_jsxs("div", {
60
+ className: classnames("libro-cell-execution-tip", waitingExecute && 'libro-cell-execution-tip-without-output'),
61
+ children: [/*#__PURE__*/_jsx("div", {
62
+ className: "libro-cell-execution-tip-border"
63
+ }), /*#__PURE__*/_jsx(InfoCircle, {}), /*#__PURE__*/_jsx("p", {
64
+ children: 'execution queued.'
65
+ })]
66
+ });
67
+ }
68
+ return null;
69
+ }
@@ -0,0 +1,5 @@
1
+ import type { CellView } from '@difizen/libro-core';
2
+ export declare function CellInputBottomBlank({ cell }: {
3
+ cell: CellView;
4
+ }): import("react/jsx-runtime").JSX.Element | null;
5
+ //# sourceMappingURL=cell-input-bottom-blank.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cell-input-bottom-blank.d.ts","sourceRoot":"","sources":["../../src/components/cell-input-bottom-blank.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAKpD,wBAAgB,oBAAoB,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,kDAiBhE"}
@@ -0,0 +1,21 @@
1
+ import { LibroExecutableCellView } from '@difizen/libro-core';
2
+ import { useObserve } from '@difizen/mana-app';
3
+ import { isWaitingExecute } from "../utils/index.js";
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ export function CellInputBottomBlank(_ref) {
6
+ var cell = _ref.cell;
7
+ var observableCell = useObserve(cell);
8
+ if (!(cell instanceof LibroExecutableCellView)) {
9
+ return null;
10
+ }
11
+ var outputs = observableCell.outputArea.outputs;
12
+ var hasNoneOutput = (!outputs || outputs.length === 0) && observableCell.model.executeCount;
13
+
14
+ // 有output时 或者 没有被执行过,不显示input底部的空白
15
+ if (hasNoneOutput || isWaitingExecute(observableCell.model)) {
16
+ return /*#__PURE__*/_jsx("div", {
17
+ className: "libro-cell-bottom-blank"
18
+ });
19
+ }
20
+ return null;
21
+ }
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ export declare const InfoCircle: React.FC;
3
+ export declare const WarningIcon: React.FC;
4
+ export declare const Location: React.FC;
5
+ //# sourceMappingURL=icons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../src/components/icons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EA4C9B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAuC/B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EA2B5B,CAAC"}
@@ -0,0 +1,154 @@
1
+ import React from 'react';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { jsxs as _jsxs } from "react/jsx-runtime";
4
+ export var InfoCircle = function InfoCircle() {
5
+ return /*#__PURE__*/_jsxs("svg", {
6
+ version: "1.1",
7
+ width: "15px",
8
+ height: "15px",
9
+ viewBox: "0 0 14.0 14.0",
10
+ xmlns: "http://www.w3.org/2000/svg",
11
+ xmlnsXlink: "http://www.w3.org/1999/xlink",
12
+ children: [/*#__PURE__*/_jsxs("defs", {
13
+ children: [/*#__PURE__*/_jsx("clipPath", {
14
+ id: "i0",
15
+ children: /*#__PURE__*/_jsx("path", {
16
+ d: "M1840,0 L1840,900 L0,900 L0,0 L1840,0 Z"
17
+ })
18
+ }), /*#__PURE__*/_jsx("clipPath", {
19
+ id: "i1",
20
+ children: /*#__PURE__*/_jsx("path", {
21
+ d: "M980,0 C982.209139,-4.05812251e-16 984,1.790861 984,4 L984,126 C984,128.209139 982.209139,130 980,130 L4,130 C1.790861,130 2.705415e-16,128.209139 0,126 L0,4 C-2.705415e-16,1.790861 1.790861,4.05812251e-16 4,0 L980,0 Z"
22
+ })
23
+ }), /*#__PURE__*/_jsx("clipPath", {
24
+ id: "i2",
25
+ children: /*#__PURE__*/_jsx("path", {
26
+ d: "M6.125,0 C9.50742188,0 12.25,2.74257813 12.25,6.125 C12.25,9.50742188 9.50742188,12.25 6.125,12.25 C2.74257813,12.25 0,9.50742188 0,6.125 C0,2.74257813 2.74257813,0 6.125,0 Z M6.49414062,5.11328125 L5.75585938,5.11328125 C5.68818359,5.11328125 5.6328125,5.16796875 5.6328125,5.23632812 L5.6328125,9.36523438 C5.6328125,9.43359375 5.68818359,9.48828125 5.75585938,9.48828125 L6.49414062,9.48828125 C6.56181641,9.48828125 6.6171875,9.43359375 6.6171875,9.36523438 L6.6171875,5.23632812 C6.6171875,5.16796875 6.56181641,5.11328125 6.49414062,5.11328125 Z M6.125,2.76171875 C5.71740723,2.76171875 5.38671875,3.09240723 5.38671875,3.5 C5.38671875,3.90759277 5.71740723,4.23828125 6.125,4.23828125 C6.53259277,4.23828125 6.86328125,3.90759277 6.86328125,3.5 C6.86328125,3.09240723 6.53259277,2.76171875 6.125,2.76171875 Z"
27
+ })
28
+ })]
29
+ }), /*#__PURE__*/_jsx("g", {
30
+ transform: "translate(-366.0 -681.0)",
31
+ children: /*#__PURE__*/_jsx("g", {
32
+ clipPath: "url(#i0)",
33
+ children: /*#__PURE__*/_jsx("g", {
34
+ transform: "translate(334.0 579.0)",
35
+ children: /*#__PURE__*/_jsx("g", {
36
+ clipPath: "url(#i1)",
37
+ children: /*#__PURE__*/_jsx("g", {
38
+ transform: "translate(0.0 94.0)",
39
+ children: /*#__PURE__*/_jsx("g", {
40
+ transform: "translate(32.0 8.0)",
41
+ children: /*#__PURE__*/_jsx("g", {
42
+ transform: "translate(0.5185185185185182 0.5185185185185182)",
43
+ children: /*#__PURE__*/_jsx("g", {
44
+ transform: "translate(0.35648148148148184 0.35648148148148184)",
45
+ children: /*#__PURE__*/_jsx("g", {
46
+ clipPath: "url(#i2)",
47
+ children: /*#__PURE__*/_jsx("polygon", {
48
+ points: "0,0 12.25,0 12.25,12.25 0,12.25 0,0",
49
+ stroke: "none",
50
+ fill: "#1890FF"
51
+ })
52
+ })
53
+ })
54
+ })
55
+ })
56
+ })
57
+ })
58
+ })
59
+ })
60
+ })]
61
+ });
62
+ };
63
+ export var WarningIcon = function WarningIcon() {
64
+ return /*#__PURE__*/_jsx("svg", {
65
+ width: "14px",
66
+ height: "14px",
67
+ viewBox: "0 0 12 12",
68
+ version: "1.1",
69
+ xmlns: "http://www.w3.org/2000/svg",
70
+ xmlnsXlink: "http://www.w3.org/1999/xlink",
71
+ children: /*#__PURE__*/_jsx("g", {
72
+ id: "0417",
73
+ stroke: "none",
74
+ strokeWidth: "1",
75
+ fill: "none",
76
+ fillRule: "evenodd",
77
+ children: /*#__PURE__*/_jsxs("g", {
78
+ id: "2.0-chart-cell\u521D\u59CB\u5316",
79
+ transform: "translate(-521.000000, -233.000000)",
80
+ children: [/*#__PURE__*/_jsx("rect", {
81
+ fill: "#FFFFFF",
82
+ x: "0",
83
+ y: "0",
84
+ width: "1840",
85
+ height: "900"
86
+ }), /*#__PURE__*/_jsx("g", {
87
+ id: "\u7F16\u7EC4-31",
88
+ transform: "translate(286.000000, -434.000000)",
89
+ fill: "#000A1A",
90
+ fillOpacity: "0.26",
91
+ children: /*#__PURE__*/_jsx("g", {
92
+ id: "\u7F16\u7EC4-7",
93
+ transform: "translate(0.000000, 655.000000)",
94
+ children: /*#__PURE__*/_jsx("g", {
95
+ id: "\u77E9\u5F62\u5907\u4EFD-2",
96
+ transform: "translate(45.000000, 0.000000)",
97
+ children: /*#__PURE__*/_jsx("g", {
98
+ id: "General/Details\u5907\u4EFD",
99
+ transform: "translate(16.000000, 7.000000)",
100
+ children: /*#__PURE__*/_jsx("g", {
101
+ id: "\u7F16\u7EC4-8",
102
+ transform: "translate(135.000000, 0.000000)",
103
+ children: /*#__PURE__*/_jsx("g", {
104
+ id: "1.\u901A\u7528/2.Icon\u56FE\u6807/Fill/Warning-Circle-Fill",
105
+ transform: "translate(39.750000, 5.750000)",
106
+ children: /*#__PURE__*/_jsx("path", {
107
+ d: "M5.25,0 C2.35078125,0 0,2.35078125 0,5.25 C0,8.14921875 2.35078125,10.5 5.25,10.5 C8.14921875,10.5 10.5,8.14921875 10.5,5.25 C10.5,2.35078125 8.14921875,0 5.25,0 Z M4.875,2.71875 C4.875,2.6671875 4.9171875,2.625 4.96875,2.625 L5.53125,2.625 C5.5828125,2.625 5.625,2.6671875 5.625,2.71875 L5.625,5.90625 C5.625,5.9578125 5.5828125,6 5.53125,6 L4.96875,6 C4.9171875,6 4.875,5.9578125 4.875,5.90625 L4.875,2.71875 Z M5.25,7.875 C4.93945312,7.875 4.6875,7.62304688 4.6875,7.3125 C4.6875,7.00195312 4.93945312,6.75 5.25,6.75 C5.56054688,6.75 5.8125,7.00195312 5.8125,7.3125 C5.8125,7.62304688 5.56054688,7.875 5.25,7.875 Z",
108
+ id: "warning-circle-filled"
109
+ })
110
+ })
111
+ })
112
+ })
113
+ })
114
+ })
115
+ })]
116
+ })
117
+ })
118
+ });
119
+ };
120
+ export var Location = function Location() {
121
+ return /*#__PURE__*/_jsx("svg", {
122
+ width: "17px",
123
+ height: "20px",
124
+ viewBox: "0 0 17 20",
125
+ version: "1.1",
126
+ xmlns: "http://www.w3.org/2000/svg",
127
+ xmlnsXlink: "http://www.w3.org/1999/xlink",
128
+ children: /*#__PURE__*/_jsx("g", {
129
+ id: "\u9875\u9762-1",
130
+ stroke: "none",
131
+ strokeWidth: "1",
132
+ fill: "none",
133
+ fillRule: "evenodd",
134
+ children: /*#__PURE__*/_jsx("g", {
135
+ id: "2.0-kernel-\u542F\u52A8\u524D",
136
+ transform: "translate(-738.000000, -80.000000)",
137
+ fill: "#7B7B7B",
138
+ fillRule: "nonzero",
139
+ children: /*#__PURE__*/_jsx("g", {
140
+ id: "\u7F16\u7EC4-24",
141
+ transform: "translate(637.000000, 80.000000)",
142
+ children: /*#__PURE__*/_jsx("g", {
143
+ id: "location",
144
+ transform: "translate(99.000000, 0.000000)",
145
+ children: /*#__PURE__*/_jsx("path", {
146
+ d: "M18.0602315,4.99157209 C17.6377121,4.01618159 17.0331498,3.14192606 16.2645241,2.39127992 C15.4958984,1.64063378 14.6036633,1.05405102 13.6080458,0.64276885 C12.5787167,0.215754579 11.4864592,0 10.3604899,0 C9.23452073,0 8.14226318,0.215754579 7.11293404,0.640521407 C6.11731655,1.05180357 5.22508147,1.64063378 4.45645578,2.38903248 C3.68783009,3.13967862 3.08326778,4.01618159 2.6607484,4.98932464 C2.22249691,6.00067423 2,7.07495224 2,8.18069446 C2,9.76738959 2.37981796,11.3473424 3.12596921,12.8711091 C3.72603663,14.0959658 4.56433307,15.2893584 5.62063153,16.4243173 C7.42532869,18.3616137 9.31767614,19.5460164 9.85481515,19.8629059 C10.0098888,19.9550511 10.1851893,20 10.3582425,20 C10.5335431,20 10.7065962,19.9550511 10.8616699,19.8629059 C11.3988089,19.5460164 13.2911563,18.3616137 15.0958535,16.4243173 C16.1521519,15.2916058 16.9904484,14.0959658 17.5905158,12.8711091 C18.3411619,11.3495898 18.7209799,9.77188448 18.7209799,8.1829419 C18.7209799,7.07719969 18.498483,6.00292168 18.0602315,4.99157209 Z M10.3604899,18.2762108 C8.87942465,17.334532 3.61815934,13.6060231 3.61815934,8.1829419 C3.61815934,6.43218339 4.31711428,4.78705473 5.58691988,3.5464659 C6.86122036,2.30362962 8.55579279,1.61815934 10.3604899,1.61815934 C12.1651871,1.61815934 13.8597595,2.30362962 15.13406,3.54871334 C16.4038656,4.78705473 17.1028205,6.43218339 17.1028205,8.1829419 C17.1028205,13.6060231 11.8415552,17.334532 10.3604899,18.2762108 Z M10.3604899,4.40498932 C8.17597483,4.40498932 6.40498932,6.17597483 6.40498932,8.36048994 C6.40498932,10.5450051 8.17597483,12.3159906 10.3604899,12.3159906 C12.5450051,12.3159906 14.3159906,10.5450051 14.3159906,8.36048994 C14.3159906,6.17597483 12.5450051,4.40498932 10.3604899,4.40498932 Z M12.1404652,10.1404652 C11.6640072,10.6146758 11.0324756,10.8776267 10.3604899,10.8776267 C9.68850433,10.8776267 9.05697269,10.6146758 8.58051466,10.1404652 C8.10630408,9.66400719 7.84335319,9.03247556 7.84335319,8.36048994 C7.84335319,7.68850433 8.10630408,7.05697269 8.58051466,6.58051466 C9.05697269,6.10405664 9.68850433,5.84335319 10.3604899,5.84335319 C11.0324756,5.84335319 11.6640072,6.10405664 12.1404652,6.58051466 C12.6169232,7.05697269 12.8776267,7.68850433 12.8776267,8.36048994 C12.8776267,9.03247556 12.6169232,9.66400719 12.1404652,10.1404652 Z",
147
+ id: "locate"
148
+ })
149
+ })
150
+ })
151
+ })
152
+ })
153
+ });
154
+ };
@@ -0,0 +1,4 @@
1
+ export * from './cell-execution-tip.js';
2
+ export * from './cell-input-bottom-blank.js';
3
+ export * from './icons.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,YAAY,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./cell-execution-tip.js";
2
+ export * from "./cell-input-bottom-blank.js";
3
+ export * from "./icons.js";
@@ -0,0 +1,82 @@
1
+ .libro-cell-execution-tip {
2
+ position: absolute;
3
+ bottom: -15px;
4
+ left: 40px;
5
+ z-index: 10;
6
+ width: calc(100% - 50px);
7
+ max-width: 400px;
8
+ height: 30px;
9
+ background-color: transparent;
10
+
11
+ > svg,
12
+ > span {
13
+ margin-top: 7px;
14
+ margin-left: 8px;
15
+ }
16
+
17
+ > svg {
18
+ position: absolute;
19
+ color: var(--mana-libro-execution-tip-success-color);
20
+ }
21
+
22
+ p {
23
+ width: calc(100% - 56px);
24
+ white-space: nowrap;
25
+ overflow: hidden;
26
+ text-overflow: ellipsis;
27
+ position: absolute;
28
+ top: 4px;
29
+ left: 26px;
30
+ color: var(--mana-libro-tip-font-color) !important;
31
+ font-weight: 400;
32
+ font-size: 12px;
33
+ font-family: 'AlibabaPuHuiTi_2_55_Regular';
34
+ line-height: 20px;
35
+ }
36
+ }
37
+
38
+ .libro-cell-execution-tip-without-output {
39
+ bottom: 5px;
40
+ }
41
+
42
+ .libro-cell-bottom-blank {
43
+ height: 20px;
44
+ border-top: 1px solid var(--mana-color-border);
45
+
46
+ > div {
47
+ margin: 0;
48
+ }
49
+
50
+ background: var(--mana-libro-output-background);
51
+ }
52
+
53
+ .libro-cell-execution-tip-hide-output {
54
+ position: absolute;
55
+ bottom: -15px;
56
+ left: 40px;
57
+ z-index: 1000;
58
+ width: 30px;
59
+ height: 30px;
60
+ // background-color: var(--mana-color-bg-container);
61
+ > svg,
62
+ > span {
63
+ margin-top: 7px;
64
+ margin-left: 8px;
65
+ }
66
+
67
+ > svg {
68
+ position: absolute;
69
+ color: var(--mana-libro-execution-tip-success-color);
70
+ }
71
+ }
72
+
73
+ .libro-cell-execution-tip-border {
74
+ position: absolute;
75
+ background: var(--mana-libro-output-background);
76
+ width: 100%;
77
+ height: 16px;
78
+ border: 1px solid var(--mana-libro-code-border-color);
79
+ border-bottom: unset;
80
+ border-top-left-radius: 25px;
81
+ border-top-right-radius: 25px;
82
+ }
@@ -0,0 +1,10 @@
1
+ import { ConfigurationContribution, ConfigurationService } from '@difizen/mana-app';
2
+ import { ApplicationContribution } from '@difizen/mana-app';
3
+ export declare class LibroSettingContribution implements ConfigurationContribution {
4
+ registerConfigurations(): import("@difizen/mana-app").ConfigurationNode<boolean>[];
5
+ }
6
+ export declare class ConfigAppContribution implements ApplicationContribution {
7
+ configurationService: ConfigurationService;
8
+ onViewStart(): void;
9
+ }
10
+ //# sourceMappingURL=config-contribution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-contribution.d.ts","sourceRoot":"","sources":["../../src/config/config-contribution.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACpF,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAK5D,qBACa,wBAAyB,YAAW,yBAAyB;IACxE,sBAAsB;CAGvB;AACD,qBACa,qBAAsB,YAAW,uBAAuB;IACrC,oBAAoB,EAAE,oBAAoB,CAAC;IACzE,WAAW;CAIZ"}
@@ -0,0 +1,50 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ var _dec, _class, _dec2, _dec3, _class2, _class3, _descriptor;
3
+ 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 }); }
4
+ 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; }
5
+ 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.'); }
6
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
7
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
8
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
9
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
10
+ 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); }
11
+ import { AutoInsertWhenNoCell, EnterEditModeWhenAddCell } from '@difizen/libro-core';
12
+ import { ConfigurationContribution, ConfigurationService } from '@difizen/mana-app';
13
+ import { ApplicationContribution } from '@difizen/mana-app';
14
+ import { inject, singleton } from '@difizen/mana-app';
15
+ import { LibroAutosaveSetting } from "./config.js";
16
+ export var LibroSettingContribution = (_dec = singleton({
17
+ contrib: ConfigurationContribution
18
+ }), _dec(_class = /*#__PURE__*/function () {
19
+ function LibroSettingContribution() {
20
+ _classCallCheck(this, LibroSettingContribution);
21
+ }
22
+ _createClass(LibroSettingContribution, [{
23
+ key: "registerConfigurations",
24
+ value: function registerConfigurations() {
25
+ return [LibroAutosaveSetting];
26
+ }
27
+ }]);
28
+ return LibroSettingContribution;
29
+ }()) || _class);
30
+ export var ConfigAppContribution = (_dec2 = singleton({
31
+ contrib: ApplicationContribution
32
+ }), _dec3 = inject(ConfigurationService), _dec2(_class2 = (_class3 = /*#__PURE__*/function () {
33
+ function ConfigAppContribution() {
34
+ _classCallCheck(this, ConfigAppContribution);
35
+ _initializerDefineProperty(this, "configurationService", _descriptor, this);
36
+ }
37
+ _createClass(ConfigAppContribution, [{
38
+ key: "onViewStart",
39
+ value: function onViewStart() {
40
+ this.configurationService.set(AutoInsertWhenNoCell, true);
41
+ this.configurationService.set(EnterEditModeWhenAddCell, false);
42
+ }
43
+ }]);
44
+ return ConfigAppContribution;
45
+ }(), (_descriptor = _applyDecoratedDescriptor(_class3.prototype, "configurationService", [_dec3], {
46
+ configurable: true,
47
+ enumerable: true,
48
+ writable: true,
49
+ initializer: null
50
+ })), _class3)) || _class2);
@@ -0,0 +1,3 @@
1
+ import type { ConfigurationNode } from '@difizen/mana-app';
2
+ export declare const LibroAutosaveSetting: ConfigurationNode<boolean>;
3
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAG3D,eAAO,MAAM,oBAAoB,EAAE,iBAAiB,CAAC,OAAO,CAU3D,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { l10n } from '@difizen/mana-l10n';
2
+ export var LibroAutosaveSetting = {
3
+ id: 'libro.autosave',
4
+ description: l10n.t('是否自动保存修改'),
5
+ title: 'checkbox',
6
+ type: 'checkbox',
7
+ defaultValue: false,
8
+ schema: {
9
+ type: 'boolean'
10
+ }
11
+ };
@@ -0,0 +1,2 @@
1
+ export * from './config-contribution.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
@@ -0,0 +1 @@
1
+ export * from "./config-contribution.js";
@@ -0,0 +1,3 @@
1
+ export * from './libro-configuration.js';
2
+ export * from './libro-configuration-contribution.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/configuration/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,uCAAuC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./libro-configuration.js";
2
+ export * from "./libro-configuration-contribution.js";
@@ -0,0 +1,5 @@
1
+ import { ConfigurationContribution } from '@difizen/mana-app';
2
+ export declare class LibroConfigurationContribution implements ConfigurationContribution {
3
+ registerConfigurations(): import("@difizen/mana-app").ConfigurationNode<string>[];
4
+ }
5
+ //# sourceMappingURL=libro-configuration-contribution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"libro-configuration-contribution.d.ts","sourceRoot":"","sources":["../../src/configuration/libro-configuration-contribution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAK9D,qBACa,8BAA+B,YAAW,yBAAyB;IAC9E,sBAAsB;CAGvB"}
@@ -0,0 +1,24 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ var _dec, _class;
3
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
5
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
6
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
+ import { ConfigurationContribution } from '@difizen/mana-app';
9
+ import { singleton } from '@difizen/mana-app';
10
+ import { LibroJupyterConfiguration } from "./libro-configuration.js";
11
+ export var LibroConfigurationContribution = (_dec = singleton({
12
+ contrib: ConfigurationContribution
13
+ }), _dec(_class = /*#__PURE__*/function () {
14
+ function LibroConfigurationContribution() {
15
+ _classCallCheck(this, LibroConfigurationContribution);
16
+ }
17
+ _createClass(LibroConfigurationContribution, [{
18
+ key: "registerConfigurations",
19
+ value: function registerConfigurations() {
20
+ return [LibroJupyterConfiguration['OpenSlot']];
21
+ }
22
+ }]);
23
+ return LibroConfigurationContribution;
24
+ }()) || _class);
@@ -0,0 +1,3 @@
1
+ import type { ConfigurationNode } from '@difizen/mana-app';
2
+ export declare const LibroJupyterConfiguration: Record<string, ConfigurationNode<string>>;
3
+ //# sourceMappingURL=libro-configuration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"libro-configuration.d.ts","sourceRoot":"","sources":["../../src/configuration/libro-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAW/E,CAAC"}
@@ -0,0 +1,12 @@
1
+ export var LibroJupyterConfiguration = {
2
+ OpenSlot: {
3
+ id: 'libro.jupyter.open.slot',
4
+ description: '文件默认打开位置',
5
+ title: '文件默认打开位置',
6
+ type: 'checkbox',
7
+ defaultValue: 'main',
8
+ schema: {
9
+ type: 'string'
10
+ }
11
+ }
12
+ };
@@ -0,0 +1,7 @@
1
+ import type { NotebookModel, NotebookOption } from '@difizen/libro-core';
2
+ import { ContentContribution } from '@difizen/libro-core';
3
+ export declare class LibroJupyterContentContribution implements ContentContribution {
4
+ canHandle: () => number;
5
+ loadContent(options: NotebookOption, model: NotebookModel): Promise<any>;
6
+ }
7
+ //# sourceMappingURL=content-contribution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-contribution.d.ts","sourceRoot":"","sources":["../../src/contents/content-contribution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAM1D,qBACa,+BAAgC,YAAW,mBAAmB;IACzE,SAAS,eAEP;IACI,WAAW,CAAC,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,aAAa;CAmBhE"}