@difizen/libro-jupyter 0.3.6 → 0.3.7

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@difizen/libro-jupyter",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
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.6",
41
- "@difizen/libro-code-editor": "^0.3.6",
42
- "@difizen/libro-codemirror": "^0.3.6",
43
- "@difizen/libro-cofine-editor": "^0.3.6",
44
- "@difizen/libro-common": "^0.3.6",
45
- "@difizen/libro-core": "^0.3.6",
46
- "@difizen/libro-kernel": "^0.3.6",
47
- "@difizen/libro-l10n": "^0.3.6",
48
- "@difizen/libro-language-client": "^0.3.6",
49
- "@difizen/libro-lsp": "^0.3.6",
50
- "@difizen/libro-markdown-cell": "^0.3.6",
51
- "@difizen/libro-output": "^0.3.6",
52
- "@difizen/libro-raw-cell": "^0.3.6",
53
- "@difizen/libro-rendermime": "^0.3.6",
54
- "@difizen/libro-search": "^0.3.6",
55
- "@difizen/libro-search-code-cell": "^0.3.6",
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",
56
56
  "@difizen/mana-app": "latest",
57
57
  "@difizen/mana-l10n": "latest",
58
58
  "classnames": "^2.3.2",
@@ -7,6 +7,7 @@ import {
7
7
  LibroView,
8
8
  NotebookCommands,
9
9
  ExecutableCellView,
10
+ LibroCellView,
10
11
  } from '@difizen/libro-core';
11
12
  import type { CommandRegistry } from '@difizen/mana-app';
12
13
  import {
@@ -86,8 +87,18 @@ export class LibroJupyterCommandContribution implements CommandContribution {
86
87
  command,
87
88
  NotebookCommands['SideToolbarRunSelect'],
88
89
  {
89
- execute: () => {
90
- //
90
+ execute: async (cell, libro) => {
91
+ if (
92
+ !cell ||
93
+ !libro ||
94
+ !(cell instanceof LibroCellView) ||
95
+ !(libro instanceof LibroView)
96
+ ) {
97
+ return;
98
+ }
99
+ if ((libro.model as LibroModel).executable) {
100
+ libro.runCell(cell);
101
+ }
91
102
  },
92
103
  isVisible: (cell, libro, path) => {
93
104
  if (
@@ -149,6 +149,6 @@ export const kernelStatus: Record<string, ServerStatus> = {
149
149
  category: 'Kernel',
150
150
  color: statusToColor.error,
151
151
  text: 'dead',
152
- text_zh: '死亡',
152
+ text_zh: '终止',
153
153
  },
154
154
  };