@difizen/libro-jupyter 0.3.7 → 0.3.8

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.
@@ -1 +1 @@
1
- {"version":3,"file":"command-contribution.d.ts","sourceRoot":"","sources":["../../src/command/command-contribution.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,oBAAoB,EACpB,YAAY,EAKb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EACL,mBAAmB,EAEnB,YAAY,EAEb,MAAM,mBAAmB,CAAC;AAK3B,qBACa,+BAAgC,YAAW,mBAAmB;IACnD,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACtC,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,oBAAoB,CAAC;IAC9D,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IAEpE,gBAAgB,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;CAoIjD"}
1
+ {"version":3,"file":"command-contribution.d.ts","sourceRoot":"","sources":["../../src/command/command-contribution.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,oBAAoB,EACpB,YAAY,EAMb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EACL,mBAAmB,EAEnB,YAAY,EAEb,MAAM,mBAAmB,CAAC;AAK3B,qBACa,+BAAgC,YAAW,mBAAmB;IACnD,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACtC,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,oBAAoB,CAAC;IAC9D,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IAEpE,gBAAgB,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;CA8IjD"}
@@ -11,7 +11,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
11
11
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
12
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
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 { KernelCommands, LibroCommandRegister, LibroService, LibroToolbarArea, LibroView, NotebookCommands, ExecutableCellView } from '@difizen/libro-core';
14
+ import { KernelCommands, LibroCommandRegister, LibroService, LibroToolbarArea, LibroView, NotebookCommands, ExecutableCellView, LibroCellView } from '@difizen/libro-core';
15
15
  import { CommandContribution, inject, ModalService, singleton } from '@difizen/mana-app';
16
16
  import { LibroJupyterModel } from "../libro-jupyter-model.js";
17
17
  import { ExecutedWithKernelCellModel } from "../libro-jupyter-protocol.js";
@@ -80,9 +80,31 @@ export var LibroJupyterCommandContribution = (_dec = singleton({
80
80
  }
81
81
  });
82
82
  this.libroCommand.registerLibroCommand(command, NotebookCommands['SideToolbarRunSelect'], {
83
- execute: function execute() {
84
- //
85
- },
83
+ execute: function () {
84
+ var _execute2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(cell, libro) {
85
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
86
+ while (1) switch (_context2.prev = _context2.next) {
87
+ case 0:
88
+ if (!(!cell || !libro || !(cell instanceof LibroCellView) || !(libro instanceof LibroView))) {
89
+ _context2.next = 2;
90
+ break;
91
+ }
92
+ return _context2.abrupt("return");
93
+ case 2:
94
+ if (libro.model.executable) {
95
+ libro.runCell(cell);
96
+ }
97
+ case 3:
98
+ case "end":
99
+ return _context2.stop();
100
+ }
101
+ }, _callee2);
102
+ }));
103
+ function execute(_x3, _x4) {
104
+ return _execute2.apply(this, arguments);
105
+ }
106
+ return execute;
107
+ }(),
86
108
  isVisible: function isVisible(cell, libro, path) {
87
109
  if (!cell || !libro || !ExecutableCellView.is(cell) || !(libro instanceof LibroView)) {
88
110
  return false;
@@ -98,27 +120,27 @@ export var LibroJupyterCommandContribution = (_dec = singleton({
98
120
  });
99
121
  this.libroCommand.registerLibroCommand(command, NotebookCommands['SelectLastRunCell'], {
100
122
  execute: function () {
101
- var _execute2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(cell, libro) {
102
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
103
- while (1) switch (_context2.prev = _context2.next) {
123
+ var _execute3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(cell, libro) {
124
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
125
+ while (1) switch (_context3.prev = _context3.next) {
104
126
  case 0:
105
127
  if (!(!libro || !(libro instanceof LibroView))) {
106
- _context2.next = 2;
128
+ _context3.next = 2;
107
129
  break;
108
130
  }
109
- return _context2.abrupt("return");
131
+ return _context3.abrupt("return");
110
132
  case 2:
111
133
  if (libro.model instanceof LibroJupyterModel) {
112
134
  libro.model.findRunningCell();
113
135
  }
114
136
  case 3:
115
137
  case "end":
116
- return _context2.stop();
138
+ return _context3.stop();
117
139
  }
118
- }, _callee2);
140
+ }, _callee3);
119
141
  }));
120
- function execute(_x3, _x4) {
121
- return _execute2.apply(this, arguments);
142
+ function execute(_x5, _x6) {
143
+ return _execute3.apply(this, arguments);
122
144
  }
123
145
  return execute;
124
146
  }(),
@@ -88,6 +88,6 @@ export var kernelStatus = {
88
88
  category: 'Kernel',
89
89
  color: statusToColor.error,
90
90
  text: 'dead',
91
- text_zh: '死亡'
91
+ text_zh: '终止'
92
92
  }
93
93
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@difizen/libro-jupyter",
3
- "version": "0.3.7",
3
+ "version": "0.3.8",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "libro"
@@ -37,22 +37,22 @@
37
37
  "dependencies": {
38
38
  "@ant-design/colors": "^7.0.0",
39
39
  "@ant-design/icons": "^5.1.0",
40
- "@difizen/libro-code-cell": "^0.3.7",
41
- "@difizen/libro-code-editor": "^0.3.7",
42
- "@difizen/libro-codemirror": "^0.3.7",
43
- "@difizen/libro-cofine-editor": "^0.3.7",
44
- "@difizen/libro-common": "^0.3.7",
45
- "@difizen/libro-core": "^0.3.7",
46
- "@difizen/libro-kernel": "^0.3.7",
47
- "@difizen/libro-l10n": "^0.3.7",
48
- "@difizen/libro-language-client": "^0.3.7",
49
- "@difizen/libro-lsp": "^0.3.7",
50
- "@difizen/libro-markdown-cell": "^0.3.7",
51
- "@difizen/libro-output": "^0.3.7",
52
- "@difizen/libro-raw-cell": "^0.3.7",
53
- "@difizen/libro-rendermime": "^0.3.7",
54
- "@difizen/libro-search": "^0.3.7",
55
- "@difizen/libro-search-code-cell": "^0.3.7",
40
+ "@difizen/libro-code-cell": "^0.3.8",
41
+ "@difizen/libro-code-editor": "^0.3.8",
42
+ "@difizen/libro-codemirror": "^0.3.8",
43
+ "@difizen/libro-cofine-editor": "^0.3.8",
44
+ "@difizen/libro-common": "^0.3.8",
45
+ "@difizen/libro-core": "^0.3.8",
46
+ "@difizen/libro-kernel": "^0.3.8",
47
+ "@difizen/libro-l10n": "^0.3.8",
48
+ "@difizen/libro-language-client": "^0.3.8",
49
+ "@difizen/libro-lsp": "^0.3.8",
50
+ "@difizen/libro-markdown-cell": "^0.3.8",
51
+ "@difizen/libro-output": "^0.3.8",
52
+ "@difizen/libro-raw-cell": "^0.3.8",
53
+ "@difizen/libro-rendermime": "^0.3.8",
54
+ "@difizen/libro-search": "^0.3.8",
55
+ "@difizen/libro-search-code-cell": "^0.3.8",
56
56
  "@difizen/mana-app": "latest",
57
57
  "@difizen/mana-l10n": "latest",
58
58
  "classnames": "^2.3.2",