@difizen/libro-jupyter 0.3.54 → 0.3.56
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":"jupyter-code-cell-view.d.ts","sourceRoot":"","sources":["../../src/cell/jupyter-code-cell-view.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EACV,qBAAqB,EACrB,kBAAkB,EAElB,eAAe,EAEhB,MAAM,4BAA4B,CAAC;AAUpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEzE,qBAEa,mBAAoB,SAAQ,iBAAiB;IACxD,UAAkB,OAAO,EAAE,gBAAgB,CAAC;IAE5C,IAAa,MAAM,IAGQ,gBAAgB,CAD1C;IACD,IAAa,MAAM,CAAC,KAAK,EAAE,gBAAgB,EAG1C;IAGO,KAAK,EAAE,oBAAoB,CAAC;IAE3B,cAAc,aAQrB;cAEiB,eAAe,IAAI,qBAAqB;IAU5C,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"jupyter-code-cell-view.d.ts","sourceRoot":"","sources":["../../src/cell/jupyter-code-cell-view.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EACV,qBAAqB,EACrB,kBAAkB,EAElB,eAAe,EAEhB,MAAM,4BAA4B,CAAC;AAUpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEzE,qBAEa,mBAAoB,SAAQ,iBAAiB;IACxD,UAAkB,OAAO,EAAE,gBAAgB,CAAC;IAE5C,IAAa,MAAM,IAGQ,gBAAgB,CAD1C;IACD,IAAa,MAAM,CAAC,KAAK,EAAE,gBAAgB,EAG1C;IAGO,KAAK,EAAE,oBAAoB,CAAC;IAE3B,cAAc,aAQrB;cAEiB,eAAe,IAAI,qBAAqB;IAU5C,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAgE3C,eAAe,EAAE,eAAe,CAqB9B;IAEF,kBAAkB,EAAE,kBAAkB,CA8BpC;IAEa,GAAG;CA0FnB"}
|
|
@@ -180,8 +180,7 @@ export var JupyterCodeCellView = (_dec = transient(), _dec2 = view('jupyter-code
|
|
|
180
180
|
if (msgId) {
|
|
181
181
|
if (kernelConnection.status === 'idle') {
|
|
182
182
|
delete execution['libro_execution_msg_id'];
|
|
183
|
-
|
|
184
|
-
this.parent.model.saveNotebookContent();
|
|
183
|
+
this.model.metadata = _objectSpread({}, this.model.metadata);
|
|
185
184
|
this.model.kernelExecuting = false;
|
|
186
185
|
} else {
|
|
187
186
|
this.model.kernelExecuting = true;
|
|
@@ -191,8 +190,7 @@ export var JupyterCodeCellView = (_dec = transient(), _dec2 = view('jupyter-code
|
|
|
191
190
|
if (msg.header.msg_type === 'status' && msg.content.execution_state === 'idle') {
|
|
192
191
|
_this2.model.kernelExecuting = false;
|
|
193
192
|
delete execution['libro_execution_msg_id'];
|
|
194
|
-
|
|
195
|
-
_this2.parent.model.saveNotebookContent();
|
|
193
|
+
_this2.model.metadata = _objectSpread({}, _this2.model.metadata);
|
|
196
194
|
_disposable.dispose();
|
|
197
195
|
}
|
|
198
196
|
}
|
|
@@ -202,8 +200,7 @@ export var JupyterCodeCellView = (_dec = transient(), _dec2 = view('jupyter-code
|
|
|
202
200
|
if (status === 'idle') {
|
|
203
201
|
_this2.model.kernelExecuting = false;
|
|
204
202
|
delete execution['libro_execution_msg_id'];
|
|
205
|
-
|
|
206
|
-
_this2.parent.model.saveNotebookContent();
|
|
203
|
+
_this2.model.metadata = _objectSpread({}, _this2.model.metadata);
|
|
207
204
|
_disposable.dispose();
|
|
208
205
|
statusDisposable.dispose();
|
|
209
206
|
}
|
|
@@ -237,7 +234,6 @@ export var JupyterCodeCellView = (_dec = transient(), _dec2 = view('jupyter-code
|
|
|
237
234
|
key: "run",
|
|
238
235
|
value: function () {
|
|
239
236
|
var _run = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
240
|
-
var _this3 = this;
|
|
241
237
|
var libroModel, kernelConnection, cellContent, cellModel, future, startTimeStr, msgPromise, endTimeStr;
|
|
242
238
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
243
239
|
while (1) switch (_context4.prev = _context4.next) {
|
|
@@ -266,8 +262,7 @@ export var JupyterCodeCellView = (_dec = transient(), _dec2 = view('jupyter-code
|
|
|
266
262
|
cellModel.metadata.execution = {};
|
|
267
263
|
}
|
|
268
264
|
cellModel.metadata.execution['libro_execution_msg_id'] = future.msg.header.msg_id;
|
|
269
|
-
|
|
270
|
-
this.parent.model.saveNotebookContent();
|
|
265
|
+
cellModel.metadata = _objectSpread({}, cellModel.metadata);
|
|
271
266
|
|
|
272
267
|
// Handle iopub messages
|
|
273
268
|
future.onIOPub = function (msg) {
|
|
@@ -278,8 +273,7 @@ export var JupyterCodeCellView = (_dec = transient(), _dec2 = view('jupyter-code
|
|
|
278
273
|
to_execute: new Date().toISOString(),
|
|
279
274
|
libro_execution_msg_id: future.msg.header.msg_id
|
|
280
275
|
};
|
|
281
|
-
|
|
282
|
-
_this3.parent.model.saveNotebookContent();
|
|
276
|
+
cellModel.metadata = _objectSpread({}, cellModel.metadata);
|
|
283
277
|
cellModel.kernelExecuting = true;
|
|
284
278
|
startTimeStr = msg.header.date;
|
|
285
279
|
var meta = cellModel.metadata.execution;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@difizen/libro-jupyter",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.56",
|
|
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.
|
|
41
|
-
"@difizen/libro-code-editor": "^0.3.
|
|
42
|
-
"@difizen/libro-codemirror": "^0.3.
|
|
43
|
-
"@difizen/libro-cofine-editor": "^0.3.
|
|
44
|
-
"@difizen/libro-common": "^0.3.
|
|
45
|
-
"@difizen/libro-core": "^0.3.
|
|
46
|
-
"@difizen/libro-kernel": "^0.3.
|
|
47
|
-
"@difizen/libro-l10n": "^0.3.
|
|
48
|
-
"@difizen/libro-language-client": "^0.3.
|
|
49
|
-
"@difizen/libro-lsp": "^0.3.
|
|
50
|
-
"@difizen/libro-markdown-cell": "^0.3.
|
|
51
|
-
"@difizen/libro-output": "^0.3.
|
|
52
|
-
"@difizen/libro-raw-cell": "^0.3.
|
|
53
|
-
"@difizen/libro-rendermime": "^0.3.
|
|
54
|
-
"@difizen/libro-search": "^0.3.
|
|
55
|
-
"@difizen/libro-search-code-cell": "^0.3.
|
|
40
|
+
"@difizen/libro-code-cell": "^0.3.56",
|
|
41
|
+
"@difizen/libro-code-editor": "^0.3.56",
|
|
42
|
+
"@difizen/libro-codemirror": "^0.3.56",
|
|
43
|
+
"@difizen/libro-cofine-editor": "^0.3.56",
|
|
44
|
+
"@difizen/libro-common": "^0.3.56",
|
|
45
|
+
"@difizen/libro-core": "^0.3.56",
|
|
46
|
+
"@difizen/libro-kernel": "^0.3.56",
|
|
47
|
+
"@difizen/libro-l10n": "^0.3.56",
|
|
48
|
+
"@difizen/libro-language-client": "^0.3.56",
|
|
49
|
+
"@difizen/libro-lsp": "^0.3.56",
|
|
50
|
+
"@difizen/libro-markdown-cell": "^0.3.56",
|
|
51
|
+
"@difizen/libro-output": "^0.3.56",
|
|
52
|
+
"@difizen/libro-raw-cell": "^0.3.56",
|
|
53
|
+
"@difizen/libro-rendermime": "^0.3.56",
|
|
54
|
+
"@difizen/libro-search": "^0.3.56",
|
|
55
|
+
"@difizen/libro-search-code-cell": "^0.3.56",
|
|
56
56
|
"@difizen/mana-app": "latest",
|
|
57
57
|
"@difizen/mana-l10n": "latest",
|
|
58
58
|
"classnames": "^2.3.2",
|
|
@@ -67,8 +67,7 @@ export class JupyterCodeCellView extends LibroCodeCellView {
|
|
|
67
67
|
if (msgId) {
|
|
68
68
|
if (kernelConnection.status === 'idle') {
|
|
69
69
|
delete execution['libro_execution_msg_id'];
|
|
70
|
-
|
|
71
|
-
this.parent.model.saveNotebookContent();
|
|
70
|
+
this.model.metadata = { ...this.model.metadata };
|
|
72
71
|
this.model.kernelExecuting = false;
|
|
73
72
|
} else {
|
|
74
73
|
this.model.kernelExecuting = true;
|
|
@@ -82,8 +81,7 @@ export class JupyterCodeCellView extends LibroCodeCellView {
|
|
|
82
81
|
) {
|
|
83
82
|
this.model.kernelExecuting = false;
|
|
84
83
|
delete execution['libro_execution_msg_id'];
|
|
85
|
-
|
|
86
|
-
this.parent.model.saveNotebookContent();
|
|
84
|
+
this.model.metadata = { ...this.model.metadata };
|
|
87
85
|
disposable.dispose();
|
|
88
86
|
}
|
|
89
87
|
}
|
|
@@ -95,8 +93,7 @@ export class JupyterCodeCellView extends LibroCodeCellView {
|
|
|
95
93
|
if (status === 'idle') {
|
|
96
94
|
this.model.kernelExecuting = false;
|
|
97
95
|
delete execution['libro_execution_msg_id'];
|
|
98
|
-
|
|
99
|
-
this.parent.model.saveNotebookContent();
|
|
96
|
+
this.model.metadata = { ...this.model.metadata };
|
|
100
97
|
disposable.dispose();
|
|
101
98
|
statusDisposable.dispose();
|
|
102
99
|
}
|
|
@@ -210,8 +207,7 @@ export class JupyterCodeCellView extends LibroCodeCellView {
|
|
|
210
207
|
}
|
|
211
208
|
(cellModel.metadata.execution as any)['libro_execution_msg_id'] =
|
|
212
209
|
future.msg.header.msg_id;
|
|
213
|
-
|
|
214
|
-
this.parent.model.saveNotebookContent();
|
|
210
|
+
cellModel.metadata = { ...cellModel.metadata };
|
|
215
211
|
|
|
216
212
|
// Handle iopub messages
|
|
217
213
|
future.onIOPub = (msg: any) => {
|
|
@@ -222,8 +218,7 @@ export class JupyterCodeCellView extends LibroCodeCellView {
|
|
|
222
218
|
to_execute: new Date().toISOString(),
|
|
223
219
|
libro_execution_msg_id: future.msg.header.msg_id,
|
|
224
220
|
} as ExecutionMeta;
|
|
225
|
-
|
|
226
|
-
this.parent.model.saveNotebookContent();
|
|
221
|
+
cellModel.metadata = { ...cellModel.metadata };
|
|
227
222
|
cellModel.kernelExecuting = true;
|
|
228
223
|
startTimeStr = msg.header.date as string;
|
|
229
224
|
const meta = cellModel.metadata.execution as ExecutionMeta;
|