@difizen/libro-jupyter 0.2.27 → 0.2.29

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,EAAkB,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,KAAK,EACV,qBAAqB,EACrB,kBAAkB,EAElB,eAAe,EAEhB,MAAM,4BAA4B,CAAC;AAYpC,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;IAe5C,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAkB3C,eAAe,EAAE,eAAe,CAqB9B;IAEF,kBAAkB,EAAE,kBAAkB,CA8BpC;IAEa,GAAG;CA8EnB"}
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;CAmBhE"}
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 = 13;
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 13:
51
+ case 14:
51
52
  case "end":
52
53
  return _context.stop();
53
54
  }
@@ -1,4 +1,4 @@
1
- export interface IProps {
1
+ interface IProps {
2
2
  className?: string;
3
3
  width?: string;
4
4
  height?: string;
@@ -8,4 +8,5 @@ export declare function SQLIcon(props: IProps): import("react/jsx-runtime").JSX.
8
8
  export declare function JSONIcon(props: IProps): import("react/jsx-runtime").JSX.Element;
9
9
  export declare function PythonIcon(props: IProps): import("react/jsx-runtime").JSX.Element;
10
10
  export declare function MoreIcon(prop: IProps): import("react/jsx-runtime").JSX.Element;
11
+ export {};
11
12
  //# sourceMappingURL=file-icon.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"file-icon.d.ts","sourceRoot":"","sources":["../../src/file/file-icon.tsx"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,2CA6BzC;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,2CA6BpC;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,2CA8DrC;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,2CA8CvC;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,2CAiUpC"}
1
+ {"version":3,"file":"file-icon.d.ts","sourceRoot":"","sources":["../../src/file/file-icon.tsx"],"names":[],"mappings":"AAAA,UAAU,MAAM;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,2CA6BzC;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,2CA6BpC;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,2CA8DrC;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,2CA8CvC;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,2CAiUpC"}
@@ -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,YAwDpC,CAAC;AAEJ,eAAO,MAAM,kBAAkB,YAK9B,CAAC"}
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(JupyterWorkspaceService, LibroJupyterFileService, LibroJupyterCommandContribution, LibroJupyterKeybindingContribution, LibroJupyterToolbarContribution, ConfigAppContribution, SaveFileErrorContribution, LibroKeybindRegistry, LibroJupyterContentContribution, LibroJupyterContentSaveContribution, LibroJupyterOutputArea, LibroJupyterColorContribution, LibroJupyterSettingContribution, JupyterServerLaunchManager, LibroJupyterView, {
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.27",
3
+ "version": "0.2.29",
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.27",
35
- "@difizen/libro-code-editor": "^0.2.27",
36
- "@difizen/libro-code-cell": "^0.2.27",
37
- "@difizen/libro-codemirror": "^0.2.27",
38
- "@difizen/libro-rendermime": "^0.2.27",
39
- "@difizen/libro-common": "^0.2.27",
40
- "@difizen/libro-core": "^0.2.27",
41
- "@difizen/libro-kernel": "^0.2.27",
42
- "@difizen/libro-l10n": "^0.2.27",
43
- "@difizen/libro-output": "^0.2.27",
44
- "@difizen/libro-search": "^0.2.27",
45
- "@difizen/libro-search-code-cell": "^0.2.27",
46
- "@difizen/libro-lsp": "^0.2.27",
47
- "@difizen/libro-markdown-cell": "^0.2.27",
48
- "@difizen/libro-raw-cell": "^0.2.27",
49
- "@difizen/libro-language-client": "^0.2.27",
34
+ "@difizen/libro-cofine-editor": "^0.2.29",
35
+ "@difizen/libro-code-editor": "^0.2.29",
36
+ "@difizen/libro-code-cell": "^0.2.29",
37
+ "@difizen/libro-codemirror": "^0.2.29",
38
+ "@difizen/libro-rendermime": "^0.2.29",
39
+ "@difizen/libro-common": "^0.2.29",
40
+ "@difizen/libro-core": "^0.2.29",
41
+ "@difizen/libro-kernel": "^0.2.29",
42
+ "@difizen/libro-l10n": "^0.2.29",
43
+ "@difizen/libro-output": "^0.2.29",
44
+ "@difizen/libro-search": "^0.2.29",
45
+ "@difizen/libro-search-code-cell": "^0.2.29",
46
+ "@difizen/libro-lsp": "^0.2.29",
47
+ "@difizen/libro-markdown-cell": "^0.2.29",
48
+ "@difizen/libro-raw-cell": "^0.2.29",
49
+ "@difizen/libro-language-client": "^0.2.29",
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) {
@@ -1,4 +1,4 @@
1
- export interface IProps {
1
+ interface IProps {
2
2
  className?: string;
3
3
  width?: string;
4
4
  height?: string;
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().dependOn(
123
- LibroE2EditorModule,
124
- CodeMirrorEditorModule,
125
- LibroJupyterNoEditorModule,
126
- LibroLanguageClientModule,
127
- );
121
+ export const LibroJupyterModule = ManaModule.create()
122
+ .register(JupyterWorkspaceService)
123
+ .dependOn(
124
+ LibroE2EditorModule,
125
+ CodeMirrorEditorModule,
126
+ LibroJupyterNoEditorModule,
127
+ LibroLanguageClientModule,
128
+ );