@difizen/libro-jupyter 1.0.5 → 1.0.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.
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { INotebookContent } from '@difizen/libro-common';
|
|
2
|
+
import { ModalService } from '@difizen/libro-common/app';
|
|
3
|
+
import { Deferred } from '@difizen/libro-common/app';
|
|
2
4
|
import type { VirtualizedManager } from '@difizen/libro-core';
|
|
3
5
|
import { LibroModel, VirtualizedManagerHelper } from '@difizen/libro-core';
|
|
4
6
|
import { ContentsManager, LibroKernelConnectionManager, ServerConnection, ServerManager } from '@difizen/libro-kernel';
|
|
5
7
|
import type { IKernelConnection, ExecutableNotebookModel } from '@difizen/libro-kernel';
|
|
6
8
|
import type { IContentsCheckpointModel, IContentsModel } from '@difizen/libro-kernel';
|
|
7
|
-
import { ModalService } from '@difizen/libro-common/app';
|
|
8
|
-
import { Deferred } from '@difizen/libro-common/app';
|
|
9
9
|
import { LibroFileService } from './libro-jupyter-protocol.js';
|
|
10
10
|
type IModel = IContentsModel;
|
|
11
11
|
export declare class LibroJupyterModel extends LibroModel implements ExecutableNotebookModel {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"libro-jupyter-model.d.ts","sourceRoot":"","sources":["../src/libro-jupyter-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EACL,eAAe,EAEf,4BAA4B,EAC5B,gBAAgB,EAChB,aAAa,EACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AACxF,OAAO,KAAK,EAAE,wBA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AAgB,CAAC;IAC7C,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IACpD,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;gBAGlB,gBAAgB,EAAE,gBAAgB,EAE5D,uBAAuB,EAAE,4BAA4B,EAC9B,aAAa,EAAE,aAAa,EACzB,gBAAgB,EAAE,gBAAgB,EACnC,eAAe,EAAE,eAAe,EACnC,YAAY,EAAE,YAAY,EAEhD,wBAAwB,EAAE,wBAAwB;IA6BpD,IAAI,YAAY,wBAEf;IAED,IAAI,eAAe,IAIQ,MAAM,CAFhC;IAED,IAAI,eAAe,CAAC,KAAK,EAAE,MAAM,EAEhC;IAED,IAAI,mBAAmB,IAIQ,MAAM,CAFpC;IAED,IAAI,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAEpC;IACD,SAAS,CAAC,UAAU,8BAAqC;IACzD,IAAI,OAAO,+BAEV;IAGD,gBAAgB,EAAE,OAAO,GAAG,SAAS,CAAC;IAGtC,QAAQ,SAAM;IAEd,SAAS,CAAC,aAAa,SAAM;IAE7B,IAAI,YAAY,IAIQ,MAAM,CAF7B;IAED,IAAI,YAAY,CAAC,KAAK,EAAE,MAAM,EAE7B;IAED,qBAAqB,EAAE,wBAAwB,CAAC;IAE1C,gBAAgB;IAMhB,eAAe;IAIf,iBAAiB,CAAC,YAAY,EAAE,MAAM;IAItC,gBAAgB,CAAC,YAAY,EAAE,MAAM;IAI5B,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAS/D,qBAAqB;IA2BZ,MAAM;IAcT,SAAS;IAQT,QAAQ;IAUC,OAAO;IAmBhB,SAAS;IAQf,eAAe;CAYhB"}
|
|
@@ -23,12 +23,12 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
23
23
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
24
24
|
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; }
|
|
25
25
|
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.'); }
|
|
26
|
-
import { LibroModel, VirtualizedManagerHelper } from '@difizen/libro-core';
|
|
27
|
-
import { ContentsManager, isDisplayDataMsg, LibroKernelConnectionManager, ServerConnection, ServerManager } from '@difizen/libro-kernel';
|
|
28
26
|
import { getOrigin, ModalService, prop } from '@difizen/libro-common/app';
|
|
29
27
|
import { Deferred } from '@difizen/libro-common/app';
|
|
30
28
|
import { inject, transient } from '@difizen/libro-common/app';
|
|
31
29
|
import { l10n } from '@difizen/libro-common/l10n';
|
|
30
|
+
import { LibroModel, VirtualizedManagerHelper } from '@difizen/libro-core';
|
|
31
|
+
import { ContentsManager, isDisplayDataMsg, LibroKernelConnectionManager, ServerConnection, ServerManager } from '@difizen/libro-kernel';
|
|
32
32
|
import { ExecutedWithKernelCellModel, libroArgsMimetype, LibroFileService } from "./libro-jupyter-protocol.js";
|
|
33
33
|
import { getDefaultKernel } from "./utils/index.js";
|
|
34
34
|
export var LibroJupyterModel = (_dec = transient(), _dec2 = prop(), _dec3 = prop(), _dec4 = prop(), _dec5 = prop(), _dec6 = prop(), _dec7 = prop(), _dec8 = prop(), _dec(_class = (_class2 = /*#__PURE__*/function (_LibroModel) {
|
|
@@ -219,7 +219,7 @@ export var LibroJupyterModel = (_dec = transient(), _dec2 = prop(), _dec3 = prop
|
|
|
219
219
|
return _get(_getPrototypeOf(LibroJupyterModel.prototype), "loadNotebookContent", this).call(this);
|
|
220
220
|
case 2:
|
|
221
221
|
content = _context5.sent;
|
|
222
|
-
this.id = this.
|
|
222
|
+
this.id = this.filePath; // use file path as id, will be passed to editor and lsp
|
|
223
223
|
if (this.executable && !this.kernelConnecting) {
|
|
224
224
|
this.startKernelConnection();
|
|
225
225
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@difizen/libro-jupyter",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.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": "^1.0.
|
|
41
|
-
"@difizen/libro-code-editor": "^1.0.
|
|
42
|
-
"@difizen/libro-codemirror": "^1.0.
|
|
43
|
-
"@difizen/libro-cofine-editor": "^1.0.
|
|
44
|
-
"@difizen/libro-common": "^1.0.
|
|
45
|
-
"@difizen/libro-core": "^1.0.
|
|
46
|
-
"@difizen/libro-kernel": "^1.0.
|
|
47
|
-
"@difizen/libro-l10n": "^1.0.
|
|
48
|
-
"@difizen/libro-language-client": "^1.0.
|
|
49
|
-
"@difizen/libro-lsp": "^1.0.
|
|
50
|
-
"@difizen/libro-markdown-cell": "^1.0.
|
|
51
|
-
"@difizen/libro-output": "^1.0.
|
|
52
|
-
"@difizen/libro-raw-cell": "^1.0.
|
|
53
|
-
"@difizen/libro-rendermime": "^1.0.
|
|
54
|
-
"@difizen/libro-search": "^1.0.
|
|
55
|
-
"@difizen/libro-search-code-cell": "^1.0.
|
|
40
|
+
"@difizen/libro-code-cell": "^1.0.7",
|
|
41
|
+
"@difizen/libro-code-editor": "^1.0.7",
|
|
42
|
+
"@difizen/libro-codemirror": "^1.0.7",
|
|
43
|
+
"@difizen/libro-cofine-editor": "^1.0.7",
|
|
44
|
+
"@difizen/libro-common": "^1.0.7",
|
|
45
|
+
"@difizen/libro-core": "^1.0.7",
|
|
46
|
+
"@difizen/libro-kernel": "^1.0.7",
|
|
47
|
+
"@difizen/libro-l10n": "^1.0.7",
|
|
48
|
+
"@difizen/libro-language-client": "^1.0.7",
|
|
49
|
+
"@difizen/libro-lsp": "^1.0.7",
|
|
50
|
+
"@difizen/libro-markdown-cell": "^1.0.7",
|
|
51
|
+
"@difizen/libro-output": "^1.0.7",
|
|
52
|
+
"@difizen/libro-raw-cell": "^1.0.7",
|
|
53
|
+
"@difizen/libro-rendermime": "^1.0.7",
|
|
54
|
+
"@difizen/libro-search": "^1.0.7",
|
|
55
|
+
"@difizen/libro-search-code-cell": "^1.0.7",
|
|
56
56
|
"uuid": "^9.0.0",
|
|
57
57
|
"classnames": "^2.3.2",
|
|
58
58
|
"moment": "^2.29.4",
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { INotebookContent } from '@difizen/libro-common';
|
|
2
|
+
import { getOrigin, ModalService, prop } from '@difizen/libro-common/app';
|
|
3
|
+
import { Deferred } from '@difizen/libro-common/app';
|
|
4
|
+
import { inject, transient } from '@difizen/libro-common/app';
|
|
5
|
+
import { l10n } from '@difizen/libro-common/l10n';
|
|
2
6
|
import type { VirtualizedManager } from '@difizen/libro-core';
|
|
3
7
|
import { LibroModel, VirtualizedManagerHelper } from '@difizen/libro-core';
|
|
4
8
|
import {
|
|
@@ -10,10 +14,6 @@ import {
|
|
|
10
14
|
} from '@difizen/libro-kernel';
|
|
11
15
|
import type { IKernelConnection, ExecutableNotebookModel } from '@difizen/libro-kernel';
|
|
12
16
|
import type { IContentsCheckpointModel, IContentsModel } from '@difizen/libro-kernel';
|
|
13
|
-
import { getOrigin, ModalService, prop } from '@difizen/libro-common/app';
|
|
14
|
-
import { Deferred } from '@difizen/libro-common/app';
|
|
15
|
-
import { inject, transient } from '@difizen/libro-common/app';
|
|
16
|
-
import { l10n } from '@difizen/libro-common/l10n';
|
|
17
17
|
|
|
18
18
|
import {
|
|
19
19
|
ExecutedWithKernelCellModel,
|
|
@@ -150,7 +150,7 @@ export class LibroJupyterModel extends LibroModel implements ExecutableNotebookM
|
|
|
150
150
|
|
|
151
151
|
override async loadNotebookContent(): Promise<INotebookContent> {
|
|
152
152
|
const content = await super.loadNotebookContent();
|
|
153
|
-
this.id = this.
|
|
153
|
+
this.id = this.filePath; // use file path as id, will be passed to editor and lsp
|
|
154
154
|
if (this.executable && !this.kernelConnecting) {
|
|
155
155
|
this.startKernelConnection();
|
|
156
156
|
}
|