@difizen/libro-jupyter 0.2.28 → 0.2.30
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/es/cell/jupyter-code-cell-view.d.ts.map +1 -1
- package/es/cell/jupyter-code-cell-view.js +0 -6
- package/es/contents/content-contribution.d.ts.map +1 -1
- package/es/contents/content-contribution.js +3 -2
- package/es/module.d.ts.map +1 -1
- package/es/module.js +2 -2
- package/package.json +17 -17
- package/src/cell/jupyter-code-cell-view.tsx +0 -6
- package/src/contents/content-contribution.ts +1 -0
- package/src/module.ts +8 -7
|
@@ -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,EAAkB,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,KAAK,EACV,qBAAqB,EACrB,kBAAkB,EAElB,eAAe,EAEhB,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"jupyter-code-cell-view.d.ts","sourceRoot":"","sources":["../../src/cell/jupyter-code-cell-view.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAkB,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,KAAK,EACV,qBAAqB,EACrB,kBAAkB,EAElB,eAAe,EAEhB,MAAM,4BAA4B,CAAC;AAWpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAkBzE,qBAEa,mBAAoB,SAAQ,iBAAiB;IACxD,UAAkB,OAAO,EAAE,gBAAgB,CAAC;IAE5C,IAAa,MAAM,IAGQ,gBAAgB,CAD1C;IACD,IAAa,MAAM,CAAC,KAAK,EAAE,gBAAgB,EAG1C;IAEQ,IAAI,2FAA4B;IACjC,KAAK,EAAE,oBAAoB,CAAC;IAE3B,cAAc,aAQrB;cAEiB,eAAe,IAAI,qBAAqB;IAU5C,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAkB3C,eAAe,EAAE,eAAe,CAqB9B;IAEF,kBAAkB,EAAE,kBAAkB,CA8BpC;IAEa,GAAG;CA8EnB"}
|
|
@@ -21,7 +21,6 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
21
21
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
22
22
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
23
23
|
import { CellEditorMemo, LibroCodeCellView } from '@difizen/libro-code-cell';
|
|
24
|
-
import { getCellURI } from '@difizen/libro-common';
|
|
25
24
|
import { KernelError } from '@difizen/libro-kernel';
|
|
26
25
|
import { transient } from '@difizen/mana-app';
|
|
27
26
|
import { view, ViewInstance } from '@difizen/mana-app';
|
|
@@ -165,14 +164,9 @@ export var JupyterCodeCellView = (_dec = transient(), _dec2 = view('jupyter-code
|
|
|
165
164
|
key: "getEditorOption",
|
|
166
165
|
value: function getEditorOption() {
|
|
167
166
|
var options = _get(_getPrototypeOf(JupyterCodeCellView.prototype), "getEditorOption", this).call(this);
|
|
168
|
-
var uri = getCellURI(this.parent.model.filePath, this.model.id);
|
|
169
167
|
return _objectSpread(_objectSpread({}, options), {}, {
|
|
170
|
-
uuid: uri.toString(),
|
|
171
168
|
tooltipProvider: this.tooltipProvider,
|
|
172
169
|
completionProvider: this.completionProvider
|
|
173
|
-
// lspProvider: (this.parent.model as LibroJupyterModel).lspEnabled
|
|
174
|
-
// ? this.lspProvider
|
|
175
|
-
// : undefined,
|
|
176
170
|
});
|
|
177
171
|
}
|
|
178
172
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-contribution.d.ts","sourceRoot":"","sources":["../../src/contents/content-contribution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAM1D,qBACa,+BAAgC,YAAW,mBAAmB;IACzE,SAAS,eAEP;IACI,WAAW,CAAC,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,aAAa;
|
|
1
|
+
{"version":3,"file":"content-contribution.d.ts","sourceRoot":"","sources":["../../src/contents/content-contribution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAM1D,qBACa,+BAAgC,YAAW,mBAAmB;IACzE,SAAS,eAEP;IACI,WAAW,CAAC,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,aAAa;CAoBhE"}
|
|
@@ -36,18 +36,19 @@ export var LibroJupyterContentContribution = (_dec = singleton({
|
|
|
36
36
|
case 5:
|
|
37
37
|
currentFileContents = _context.sent;
|
|
38
38
|
if (!currentFileContents) {
|
|
39
|
-
_context.next =
|
|
39
|
+
_context.next = 14;
|
|
40
40
|
break;
|
|
41
41
|
}
|
|
42
42
|
currentFileContents.content.nbformat_minor = 5;
|
|
43
43
|
jupyterModel.currentFileContents = currentFileContents;
|
|
44
44
|
jupyterModel.filePath = currentFileContents.path;
|
|
45
|
+
jupyterModel.id = currentFileContents.path; // use file path as id, will be passed to editor and lsp
|
|
45
46
|
jupyterModel.lastModified = jupyterModel.currentFileContents.last_modified;
|
|
46
47
|
if (jupyterModel.executable) {
|
|
47
48
|
jupyterModel.startKernelConnection();
|
|
48
49
|
}
|
|
49
50
|
return _context.abrupt("return", jupyterModel.currentFileContents.content);
|
|
50
|
-
case
|
|
51
|
+
case 14:
|
|
51
52
|
case "end":
|
|
52
53
|
return _context.stop();
|
|
53
54
|
}
|
package/es/module.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAiC/C;;GAEG;AACH,eAAO,MAAM,0BAA0B,
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAiC/C;;GAEG;AACH,eAAO,MAAM,0BAA0B,YAuDpC,CAAC;AAEJ,eAAO,MAAM,kBAAkB,YAO5B,CAAC"}
|
package/es/module.js
CHANGED
|
@@ -34,7 +34,7 @@ import { WidgetModule } from "./widget/index.js";
|
|
|
34
34
|
/**
|
|
35
35
|
* 去除editor和lsp依赖的jupyter module,在opensumi场景使用
|
|
36
36
|
*/
|
|
37
|
-
export var LibroJupyterNoEditorModule = ManaModule.create().register(
|
|
37
|
+
export var LibroJupyterNoEditorModule = ManaModule.create().register(LibroJupyterFileService, LibroJupyterCommandContribution, LibroJupyterKeybindingContribution, LibroJupyterToolbarContribution, ConfigAppContribution, SaveFileErrorContribution, LibroKeybindRegistry, LibroJupyterContentContribution, LibroJupyterContentSaveContribution, LibroJupyterOutputArea, LibroJupyterColorContribution, LibroJupyterSettingContribution, JupyterServerLaunchManager, LibroJupyterView, {
|
|
38
38
|
token: CellExecutionTimeProvider,
|
|
39
39
|
useValue: CellExecutionTip
|
|
40
40
|
}, {
|
|
@@ -55,4 +55,4 @@ export var LibroJupyterNoEditorModule = ManaModule.create().register(JupyterWork
|
|
|
55
55
|
}).dependOn(LibroModule, CodeCellModule, MarkdownCellModule, RawCellModule, StreamOutputModule, ErrorOutputModule, DisplayDataOutputModule, LibroToolbarModule, LibroKernelManageModule, LibroSearchModule, SearchCodeCellModule, LibroAddCellModule,
|
|
56
56
|
// custom module
|
|
57
57
|
LibroBetweenCellModule, KeybindInstructionsModule, PlotlyModule, LibroJupyterFileModule, WidgetModule);
|
|
58
|
-
export var LibroJupyterModule = ManaModule.create().dependOn(LibroE2EditorModule, CodeMirrorEditorModule, LibroJupyterNoEditorModule, LibroLanguageClientModule);
|
|
58
|
+
export var LibroJupyterModule = ManaModule.create().register(JupyterWorkspaceService).dependOn(LibroE2EditorModule, CodeMirrorEditorModule, LibroJupyterNoEditorModule, LibroLanguageClientModule);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@difizen/libro-jupyter",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.30",
|
|
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.30",
|
|
35
|
+
"@difizen/libro-code-editor": "^0.2.30",
|
|
36
|
+
"@difizen/libro-code-cell": "^0.2.30",
|
|
37
|
+
"@difizen/libro-codemirror": "^0.2.30",
|
|
38
|
+
"@difizen/libro-rendermime": "^0.2.30",
|
|
39
|
+
"@difizen/libro-common": "^0.2.30",
|
|
40
|
+
"@difizen/libro-core": "^0.2.30",
|
|
41
|
+
"@difizen/libro-kernel": "^0.2.30",
|
|
42
|
+
"@difizen/libro-l10n": "^0.2.30",
|
|
43
|
+
"@difizen/libro-output": "^0.2.30",
|
|
44
|
+
"@difizen/libro-search": "^0.2.30",
|
|
45
|
+
"@difizen/libro-search-code-cell": "^0.2.30",
|
|
46
|
+
"@difizen/libro-lsp": "^0.2.30",
|
|
47
|
+
"@difizen/libro-markdown-cell": "^0.2.30",
|
|
48
|
+
"@difizen/libro-raw-cell": "^0.2.30",
|
|
49
|
+
"@difizen/libro-language-client": "^0.2.30",
|
|
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 type {
|
|
|
6
6
|
TooltipProvider,
|
|
7
7
|
TooltipProviderOption,
|
|
8
8
|
} from '@difizen/libro-code-editor';
|
|
9
|
-
import { getCellURI } from '@difizen/libro-common';
|
|
10
9
|
import type { KernelMessage } from '@difizen/libro-kernel';
|
|
11
10
|
import { KernelError } from '@difizen/libro-kernel';
|
|
12
11
|
import { transient } from '@difizen/mana-app';
|
|
@@ -65,16 +64,11 @@ export class JupyterCodeCellView extends LibroCodeCellView {
|
|
|
65
64
|
|
|
66
65
|
protected override getEditorOption(): CodeEditorViewOptions {
|
|
67
66
|
const options = super.getEditorOption();
|
|
68
|
-
const uri = getCellURI(this.parent.model.filePath, this.model.id);
|
|
69
67
|
|
|
70
68
|
return {
|
|
71
69
|
...options,
|
|
72
|
-
uuid: uri.toString(),
|
|
73
70
|
tooltipProvider: this.tooltipProvider,
|
|
74
71
|
completionProvider: this.completionProvider,
|
|
75
|
-
// lspProvider: (this.parent.model as LibroJupyterModel).lspEnabled
|
|
76
|
-
// ? this.lspProvider
|
|
77
|
-
// : undefined,
|
|
78
72
|
};
|
|
79
73
|
}
|
|
80
74
|
|
|
@@ -20,6 +20,7 @@ export class LibroJupyterContentContribution implements ContentContribution {
|
|
|
20
20
|
currentFileContents.content.nbformat_minor = 5;
|
|
21
21
|
jupyterModel.currentFileContents = currentFileContents;
|
|
22
22
|
jupyterModel.filePath = currentFileContents.path;
|
|
23
|
+
jupyterModel.id = currentFileContents.path; // use file path as id, will be passed to editor and lsp
|
|
23
24
|
jupyterModel.lastModified = jupyterModel.currentFileContents.last_modified;
|
|
24
25
|
|
|
25
26
|
if (jupyterModel.executable) {
|
package/src/module.ts
CHANGED
|
@@ -63,7 +63,6 @@ import { WidgetModule } from './widget/index.js';
|
|
|
63
63
|
*/
|
|
64
64
|
export const LibroJupyterNoEditorModule = ManaModule.create()
|
|
65
65
|
.register(
|
|
66
|
-
JupyterWorkspaceService,
|
|
67
66
|
LibroJupyterFileService,
|
|
68
67
|
LibroJupyterCommandContribution,
|
|
69
68
|
LibroJupyterKeybindingContribution,
|
|
@@ -119,9 +118,11 @@ export const LibroJupyterNoEditorModule = ManaModule.create()
|
|
|
119
118
|
WidgetModule,
|
|
120
119
|
);
|
|
121
120
|
|
|
122
|
-
export const LibroJupyterModule = ManaModule.create()
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
121
|
+
export const LibroJupyterModule = ManaModule.create()
|
|
122
|
+
.register(JupyterWorkspaceService)
|
|
123
|
+
.dependOn(
|
|
124
|
+
LibroE2EditorModule,
|
|
125
|
+
CodeMirrorEditorModule,
|
|
126
|
+
LibroJupyterNoEditorModule,
|
|
127
|
+
LibroLanguageClientModule,
|
|
128
|
+
);
|