@difizen/libro-jupyter 0.2.12 → 0.2.14
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,
|
|
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"}
|
|
@@ -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,
|
|
14
|
+
import { KernelCommands, LibroCommandRegister, LibroService, LibroToolbarArea, LibroView, NotebookCommands, ExecutableCellView } 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";
|
|
@@ -67,13 +67,10 @@ export var LibroJupyterCommandContribution = (_dec = singleton({
|
|
|
67
67
|
//
|
|
68
68
|
},
|
|
69
69
|
isVisible: function isVisible(cell, libro, path) {
|
|
70
|
-
if (!
|
|
70
|
+
if (!libro || !(libro instanceof LibroView) || path !== LibroToolbarArea.HeaderCenter) {
|
|
71
71
|
return false;
|
|
72
72
|
}
|
|
73
|
-
|
|
74
|
-
return false;
|
|
75
|
-
}
|
|
76
|
-
return !!cell;
|
|
73
|
+
return (libro === null || libro === void 0 ? void 0 : libro.model).executable;
|
|
77
74
|
},
|
|
78
75
|
isEnabled: function isEnabled(cell, libro) {
|
|
79
76
|
if (!libro || !(libro instanceof LibroView)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@difizen/libro-jupyter",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.14",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"libro"
|
|
@@ -31,22 +31,22 @@
|
|
|
31
31
|
"src"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@difizen/libro-cofine-editor": "^0.2.
|
|
35
|
-
"@difizen/libro-code-editor": "^0.2.
|
|
36
|
-
"@difizen/libro-code-cell": "^0.2.
|
|
37
|
-
"@difizen/libro-codemirror": "^0.2.
|
|
38
|
-
"@difizen/libro-rendermime": "^0.2.
|
|
39
|
-
"@difizen/libro-common": "^0.2.
|
|
40
|
-
"@difizen/libro-core": "^0.2.
|
|
41
|
-
"@difizen/libro-kernel": "^0.2.
|
|
42
|
-
"@difizen/libro-l10n": "^0.2.
|
|
43
|
-
"@difizen/libro-output": "^0.2.
|
|
44
|
-
"@difizen/libro-search": "^0.2.
|
|
45
|
-
"@difizen/libro-search-code-cell": "^0.2.
|
|
46
|
-
"@difizen/libro-lsp": "^0.2.
|
|
47
|
-
"@difizen/libro-markdown-cell": "^0.2.
|
|
48
|
-
"@difizen/libro-raw-cell": "^0.2.
|
|
49
|
-
"@difizen/libro-language-client": "^0.2.
|
|
34
|
+
"@difizen/libro-cofine-editor": "^0.2.14",
|
|
35
|
+
"@difizen/libro-code-editor": "^0.2.14",
|
|
36
|
+
"@difizen/libro-code-cell": "^0.2.14",
|
|
37
|
+
"@difizen/libro-codemirror": "^0.2.14",
|
|
38
|
+
"@difizen/libro-rendermime": "^0.2.14",
|
|
39
|
+
"@difizen/libro-common": "^0.2.14",
|
|
40
|
+
"@difizen/libro-core": "^0.2.14",
|
|
41
|
+
"@difizen/libro-kernel": "^0.2.14",
|
|
42
|
+
"@difizen/libro-l10n": "^0.2.14",
|
|
43
|
+
"@difizen/libro-output": "^0.2.14",
|
|
44
|
+
"@difizen/libro-search": "^0.2.14",
|
|
45
|
+
"@difizen/libro-search-code-cell": "^0.2.14",
|
|
46
|
+
"@difizen/libro-lsp": "^0.2.14",
|
|
47
|
+
"@difizen/libro-markdown-cell": "^0.2.14",
|
|
48
|
+
"@difizen/libro-raw-cell": "^0.2.14",
|
|
49
|
+
"@difizen/libro-language-client": "^0.2.14",
|
|
50
50
|
"@difizen/mana-app": "latest",
|
|
51
51
|
"@difizen/mana-l10n": "latest",
|
|
52
52
|
"@ant-design/colors": "^7.0.0",
|
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
LibroToolbarArea,
|
|
7
7
|
LibroView,
|
|
8
8
|
NotebookCommands,
|
|
9
|
-
LibroCellView,
|
|
10
9
|
ExecutableCellView,
|
|
11
10
|
} from '@difizen/libro-core';
|
|
12
11
|
import type { CommandRegistry } from '@difizen/mana-app';
|
|
@@ -63,20 +62,13 @@ export class LibroJupyterCommandContribution implements CommandContribution {
|
|
|
63
62
|
},
|
|
64
63
|
isVisible: (cell, libro, path) => {
|
|
65
64
|
if (
|
|
66
|
-
!cell ||
|
|
67
65
|
!libro ||
|
|
68
|
-
!(
|
|
69
|
-
|
|
70
|
-
) {
|
|
71
|
-
return false;
|
|
72
|
-
}
|
|
73
|
-
if (
|
|
74
|
-
path !== LibroToolbarArea.HeaderCenter ||
|
|
75
|
-
!(libro?.model as LibroModel).executable
|
|
66
|
+
!(libro instanceof LibroView) ||
|
|
67
|
+
path !== LibroToolbarArea.HeaderCenter
|
|
76
68
|
) {
|
|
77
69
|
return false;
|
|
78
70
|
}
|
|
79
|
-
return
|
|
71
|
+
return (libro?.model as LibroModel).executable;
|
|
80
72
|
},
|
|
81
73
|
isEnabled: (cell, libro) => {
|
|
82
74
|
if (!libro || !(libro instanceof LibroView)) {
|