@difizen/libro-jupyter 0.3.55 → 0.3.57
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
|
}
|
package/es/utils/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAI3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAI3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EACV,YAAY,EAEb,MAAM,8BAA8B,CAAC;AAOtC,eAAO,MAAM,aAAa,eAAe,CAAC;AAC1C,eAAO,MAAM,mBAAmB,gCAAgC,CAAC;AACjE,eAAO,MAAM,mBAAmB,4BAA4B,CAAC;AAE7D,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED,eAAO,MAAM,gBAAgB,UAAW,SAAS,YAIhD,CAAC;AAEF,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAgBhD;AAED,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,SAAS,GACf,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAgBpC;AAED,wBAAgB,YAAY,CAAC,UAAU,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAMpE;AAED,eAAO,MAAM,oBAAoB,kBAChB,aAAa,GAAG,SAAS,cAC5B,iBAAiB,GAAG,SAAS,KACxC,YAwBF,CAAC;AAGF,eAAO,MAAM,cAAc,uBACL,aAAa,cACrB,iBAAiB,GAAG,SAAS,YAW1C,CAAC"}
|
package/es/utils/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { l10n } from '@difizen/mana-l10n';
|
|
2
2
|
import { duration } from 'moment';
|
|
3
3
|
import { LibroJupyterModel } from "../libro-jupyter-model.js";
|
|
4
|
-
import { jupyterServiceStatus, kernelStatus, statusToColor
|
|
4
|
+
import { jupyterServiceStatus, kernelStatus, statusToColor } from "../libro-jupyter-protocol.js";
|
|
5
5
|
export var EXECUTE_INPUT = 'to_execute'; // 用户点击执行按钮的时间
|
|
6
6
|
export var EXECUTE_REPLY_START = 'shell.execute_reply.started'; // Kernel 开始执行任务时间在 metadata 中的 key
|
|
7
7
|
export var EXECUTE_REPLY_REPLY = 'shell.execute_reply.end'; // Kernel 结束执行任务时间在 metadata 中的 key
|
|
@@ -63,16 +63,7 @@ export var getServiceStatusInfo = function getServiceStatusInfo(serverManager, l
|
|
|
63
63
|
text_zh: l10n.t('无内核')
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
|
-
|
|
67
|
-
if (status === 'unknown') {
|
|
68
|
-
var hasRunningCell = libroModel.cells.some(function (cell) {
|
|
69
|
-
return ExecutedWithKernelCellModel.is(cell.model) && cell.model.kernelExecuting;
|
|
70
|
-
});
|
|
71
|
-
if (hasRunningCell) {
|
|
72
|
-
status = 'busy';
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
return kernelStatus[status];
|
|
66
|
+
return kernelStatus[libroModel.kernelConnection.status];
|
|
76
67
|
};
|
|
77
68
|
|
|
78
69
|
// 判断服务未启动、kernel正在连接 -> return false
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@difizen/libro-jupyter",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.57",
|
|
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.57",
|
|
41
|
+
"@difizen/libro-code-editor": "^0.3.57",
|
|
42
|
+
"@difizen/libro-codemirror": "^0.3.57",
|
|
43
|
+
"@difizen/libro-cofine-editor": "^0.3.57",
|
|
44
|
+
"@difizen/libro-common": "^0.3.57",
|
|
45
|
+
"@difizen/libro-core": "^0.3.57",
|
|
46
|
+
"@difizen/libro-kernel": "^0.3.57",
|
|
47
|
+
"@difizen/libro-l10n": "^0.3.57",
|
|
48
|
+
"@difizen/libro-language-client": "^0.3.57",
|
|
49
|
+
"@difizen/libro-lsp": "^0.3.57",
|
|
50
|
+
"@difizen/libro-markdown-cell": "^0.3.57",
|
|
51
|
+
"@difizen/libro-output": "^0.3.57",
|
|
52
|
+
"@difizen/libro-raw-cell": "^0.3.57",
|
|
53
|
+
"@difizen/libro-rendermime": "^0.3.57",
|
|
54
|
+
"@difizen/libro-search": "^0.3.57",
|
|
55
|
+
"@difizen/libro-search-code-cell": "^0.3.57",
|
|
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
|
}
|
package/src/utils/index.ts
CHANGED
|
@@ -4,12 +4,14 @@ import { l10n } from '@difizen/mana-l10n';
|
|
|
4
4
|
import { duration } from 'moment';
|
|
5
5
|
|
|
6
6
|
import { LibroJupyterModel } from '../libro-jupyter-model.js';
|
|
7
|
-
import type {
|
|
7
|
+
import type {
|
|
8
|
+
ServerStatus,
|
|
9
|
+
ExecutedWithKernelCellModel,
|
|
10
|
+
} from '../libro-jupyter-protocol.js';
|
|
8
11
|
import {
|
|
9
12
|
jupyterServiceStatus,
|
|
10
13
|
kernelStatus,
|
|
11
14
|
statusToColor,
|
|
12
|
-
ExecutedWithKernelCellModel,
|
|
13
15
|
} from '../libro-jupyter-protocol.js';
|
|
14
16
|
|
|
15
17
|
export const EXECUTE_INPUT = 'to_execute'; // 用户点击执行按钮的时间
|
|
@@ -98,18 +100,7 @@ export const getServiceStatusInfo = (
|
|
|
98
100
|
};
|
|
99
101
|
}
|
|
100
102
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
if (status === 'unknown') {
|
|
104
|
-
const hasRunningCell = libroModel.cells.some((cell) => {
|
|
105
|
-
return ExecutedWithKernelCellModel.is(cell.model) && cell.model.kernelExecuting;
|
|
106
|
-
});
|
|
107
|
-
if (hasRunningCell) {
|
|
108
|
-
status = 'busy';
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
return kernelStatus[status];
|
|
103
|
+
return kernelStatus[libroModel.kernelConnection.status];
|
|
113
104
|
};
|
|
114
105
|
|
|
115
106
|
// 判断服务未启动、kernel正在连接 -> return false
|