@difizen/libro-jupyter 1.0.2 → 1.0.4

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,4 +1,3 @@
1
- /// <reference types="react" resolution-mode="require"/>
2
1
  import { LibroCodeCellView } from '@difizen/libro-code-cell';
3
2
  import type { CodeEditorViewOptions, CompletionProvider, TooltipProvider } from '@difizen/libro-code-editor';
4
3
  import type { LibroJupyterView } from '../libro-jupyter-view.js';
@@ -7,7 +6,6 @@ export declare class JupyterCodeCellView extends LibroCodeCellView {
7
6
  protected _parent: LibroJupyterView;
8
7
  get parent(): LibroJupyterView;
9
8
  set parent(value: LibroJupyterView);
10
- view: import("react").ForwardRefExoticComponent<import("react").RefAttributes<HTMLDivElement>>;
11
9
  model: JupyterCodeCellModel;
12
10
  clearExecution: () => void;
13
11
  protected getEditorOption(): CodeEditorViewOptions;
@@ -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;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"}
1
+ {"version":3,"file":"jupyter-code-cell-view.d.ts","sourceRoot":"","sources":["../../src/cell/jupyter-code-cell-view.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EACV,qBAAqB,EACrB,kBAAkB,EAElB,eAAe,EAEhB,MAAM,4BAA4B,CAAC;AAUpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEzE,qBAEa,mBAAoB,SAAQ,iBAAiB;IACxD,UAAkB,OAAO,EAAE,gBAAgB,CAAC;IAE5C,IAAa,MAAM,IAGQ,gBAAgB,CAD1C;IACD,IAAa,MAAM,CAAC,KAAK,EAAE,gBAAgB,EAG1C;IAGO,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"}
@@ -20,25 +20,13 @@ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) ===
20
20
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
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
- import { CellEditorMemo, LibroCodeCellView } from '@difizen/libro-code-cell';
24
- import { KernelError } from '@difizen/libro-kernel';
23
+ import { LibroCodeCellView } from '@difizen/libro-code-cell';
25
24
  import { transient } from '@difizen/libro-common/app';
26
- import { view, ViewInstance } from '@difizen/libro-common/app';
27
- import { getOrigin, useInject } from '@difizen/libro-common/app';
25
+ import { view } from '@difizen/libro-common/app';
26
+ import { getOrigin } from '@difizen/libro-common/app';
28
27
  import { l10n } from '@difizen/libro-common/l10n';
29
- import { forwardRef } from 'react';
28
+ import { KernelError } from '@difizen/libro-kernel';
30
29
  import { LibroJupyterModel } from "../libro-jupyter-model.js";
31
- import { jsx as _jsx } from "react/jsx-runtime";
32
- var JupyterCodeCellComponent = /*#__PURE__*/forwardRef(function JupyterCodeCellComponent(props, ref) {
33
- var instance = useInject(ViewInstance);
34
- return /*#__PURE__*/_jsx("div", {
35
- className: instance.className,
36
- ref: ref,
37
- tabIndex: 10,
38
- onBlur: instance.blur,
39
- children: /*#__PURE__*/_jsx(CellEditorMemo, {})
40
- });
41
- });
42
30
  export var JupyterCodeCellView = (_dec = transient(), _dec2 = view('jupyter-code-cell-view'), _dec(_class = _dec2(_class = /*#__PURE__*/function (_LibroCodeCellView) {
43
31
  _inherits(JupyterCodeCellView, _LibroCodeCellView);
44
32
  var _super = _createSuper(JupyterCodeCellView);
@@ -49,7 +37,6 @@ export var JupyterCodeCellView = (_dec = transient(), _dec2 = view('jupyter-code
49
37
  args[_key] = arguments[_key];
50
38
  }
51
39
  _this = _super.call.apply(_super, [this].concat(args));
52
- _this.view = JupyterCodeCellComponent;
53
40
  _this.clearExecution = function () {
54
41
  _this.model.clearExecution();
55
42
  Promise.resolve().then(function () {
@@ -160,6 +147,8 @@ export var JupyterCodeCellView = (_dec = transient(), _dec2 = view('jupyter-code
160
147
  this._parent = value;
161
148
  this.parentDefer.resolve(this.parent);
162
149
  }
150
+
151
+ // override view = JupyterCodeCellComponent;
163
152
  }, {
164
153
  key: "getEditorOption",
165
154
  value: function getEditorOption() {
@@ -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;CAehE"}
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;CAgBhE"}
@@ -36,15 +36,16 @@ export var LibroJupyterContentContribution = (_dec = singleton({
36
36
  case 5:
37
37
  currentFileContents = _context.sent;
38
38
  if (!currentFileContents) {
39
- _context.next = 12;
39
+ _context.next = 13;
40
40
  break;
41
41
  }
42
+ model.options['fileSize'] = currentFileContents.size;
42
43
  currentFileContents.content.nbformat_minor = 5;
43
44
  jupyterModel.currentFileContents = currentFileContents;
44
45
  jupyterModel.filePath = currentFileContents.path;
45
46
  jupyterModel.lastModified = jupyterModel.currentFileContents.last_modified;
46
47
  return _context.abrupt("return", jupyterModel.currentFileContents.content);
47
- case 12:
48
+ case 13:
48
49
  case "end":
49
50
  return _context.stop();
50
51
  }
@@ -18,7 +18,6 @@ export declare class LibroNavigatableView extends BaseView implements Navigatabl
18
18
  autoSaveDelay: number;
19
19
  get onDirtyChanged(): import("@difizen/libro-common/app").Event<void>;
20
20
  autoSave: 'on' | 'off';
21
- fileSize?: number;
22
21
  dirty: boolean;
23
22
  libroView?: LibroView;
24
23
  protected defer: Deferred<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"navigatable-view.d.ts","sourceRoot":"","sources":["../../src/file/navigatable-view.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAoB,MAAM,qBAAqB,CAAC;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAc,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EACL,QAAQ,EAER,aAAa,EAUb,QAAQ,EACR,GAAG,EACH,eAAe,EACf,OAAO,EACR,MAAM,2BAA2B,CAAC;AAKnC,eAAO,MAAM,oBAAoB,mFAQ/B,CAAC;AAEH,eAAO,MAAM,6BAA6B,mCAAmC,CAAC;AAC9E,qBAEa,oBACX,SAAQ,QACR,YAAW,eAAe,EAAE,QAAQ;IAEd,SAAS,CAAC,YAAY,EAAE,YAAY,CAAC;IAElC,eAAe,EAAE,eAAe,CAAC;IAE1D,SAAS,CAAC,QAAQ,CAAC,mBAAmB,uBAA8B;IAE3D,IAAI,oFAAwB;IAErC,OAAO,4CAA+B;IAE9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAE1B,YAAY,gBAAuB;IAEnC,aAAa,SAAQ;IAErB,IAAI,cAAc,oDAEjB;IAED,QAAQ,EAAE,IAAI,GAAG,KAAK,CAAS;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,KAAK,EAAE,OAAO,CAAC;IAGf,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB,SAAS,CAAC,KAAK,iBAAwB;IAEvC,IAAI,KAAK,kBAER;gBAGqB,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,EAC1C,aAAa,EAAE,aAAa,EACrB,oBAAoB,EAAE,oBAAoB;IA4B3D,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3C,IAAI,aAQF;IAEF,SAAS,CAAC,UAAU,IAAI,IAAI;cAYZ,oBAAoB;IA0BpC,cAAc,IAAI,GAAG,GAAG,SAAS;IAIjC,eAAe,CAAC,WAAW,EAAE,GAAG,GAAG,GAAG,GAAG,SAAS;CAKnD"}
1
+ {"version":3,"file":"navigatable-view.d.ts","sourceRoot":"","sources":["../../src/file/navigatable-view.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAoB,MAAM,qBAAqB,CAAC;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAc,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EACL,QAAQ,EAER,aAAa,EAUb,QAAQ,EACR,GAAG,EACH,eAAe,EACf,OAAO,EACR,MAAM,2BAA2B,CAAC;AAKnC,eAAO,MAAM,oBAAoB,mFAQ/B,CAAC;AAEH,eAAO,MAAM,6BAA6B,mCAAmC,CAAC;AAC9E,qBAEa,oBACX,SAAQ,QACR,YAAW,eAAe,EAAE,QAAQ;IAEd,SAAS,CAAC,YAAY,EAAE,YAAY,CAAC;IAElC,eAAe,EAAE,eAAe,CAAC;IAE1D,SAAS,CAAC,QAAQ,CAAC,mBAAmB,uBAA8B;IAE3D,IAAI,oFAAwB;IAErC,OAAO,4CAA+B;IAE9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAE1B,YAAY,gBAAuB;IAEnC,aAAa,SAAQ;IAErB,IAAI,cAAc,oDAEjB;IAED,QAAQ,EAAE,IAAI,GAAG,KAAK,CAAS;IAG/B,KAAK,EAAE,OAAO,CAAC;IAGf,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB,SAAS,CAAC,KAAK,iBAAwB;IAEvC,IAAI,KAAK,kBAER;gBAGqB,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,EAC1C,aAAa,EAAE,aAAa,EACrB,oBAAoB,EAAE,oBAAoB;IA2B3D,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3C,IAAI,aAQF;IAEF,SAAS,CAAC,UAAU,IAAI,IAAI;cAYZ,oBAAoB;IAyBpC,cAAc,IAAI,GAAG,GAAG,SAAS;IAIjC,eAAe,CAAC,WAAW,EAAE,GAAG,GAAG,GAAG,GAAG,SAAS;CAKnD"}
@@ -51,7 +51,6 @@ export var LibroNavigatableView = (_dec = transient(), _dec2 = view(LibroNavigat
51
51
  _this.dirtyEmitter = new Emitter();
52
52
  _this.autoSaveDelay = 1000;
53
53
  _this.autoSave = 'off';
54
- _this.fileSize = void 0;
55
54
  _initializerDefineProperty(_this, "dirty", _descriptor4, _assertThisInitialized(_this));
56
55
  _initializerDefineProperty(_this, "libroView", _descriptor5, _assertThisInitialized(_this));
57
56
  _this.defer = new Deferred();
@@ -63,7 +62,6 @@ export var LibroNavigatableView = (_dec = transient(), _dec2 = view(LibroNavigat
63
62
  _this.filePath = options.path;
64
63
  _this.dirty = false;
65
64
  _this.title.caption = options.path;
66
- _this.fileSize = options['fileSize'];
67
65
  var uri = new URI(options.path);
68
66
  var uriRef = URIIconReference.create('file', new VScodeURI(options.path));
69
67
  var iconClass = labelProvider.getIcon(uriRef);
@@ -143,8 +141,7 @@ export var LibroNavigatableView = (_dec = transient(), _dec2 = view(LibroNavigat
143
141
  _context2.next = 2;
144
142
  return this.libroService.getOrCreateView({
145
143
  id: this.filePath,
146
- resource: this.filePath,
147
- fileSize: this.fileSize
144
+ resource: this.filePath
148
145
  });
149
146
  case 2:
150
147
  libroView = _context2.sent;
@@ -1 +1 @@
1
- {"version":3,"file":"keybind-instructions-contribution.d.ts","sourceRoot":"","sources":["../../src/keybind-instructions/keybind-instructions-contribution.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAA+B,MAAM,qBAAqB,CAAC;AACxF,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAWrF,qBACa,+BACX,YAAW,mBAAmB,EAAE,mBAAmB,EAAE,iBAAiB;IAExC,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,oBAAoB,CAAC;IAEpF,gBAAgB,CAAC,OAAO,EAAE,eAAe;IAazC,oBAAoB,CAAC,QAAQ,EAAE,eAAe;IAU9C,aAAa;CAGd"}
1
+ {"version":3,"file":"keybind-instructions-contribution.d.ts","sourceRoot":"","sources":["../../src/keybind-instructions/keybind-instructions-contribution.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAA+B,MAAM,qBAAqB,CAAC;AACxF,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAWrF,qBACa,+BACX,YAAW,mBAAmB,EAAE,mBAAmB,EAAE,iBAAiB;IAExC,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,oBAAoB,CAAC;IAEpF,gBAAgB,CAAC,OAAO,EAAE,eAAe;IAazC,oBAAoB,CAAC,QAAQ,EAAE,eAAe;IAc9C,aAAa;CAGd"}
@@ -69,7 +69,11 @@ export var KeybindInstructionsContribution = (_dec = singleton({
69
69
  order: 'l',
70
70
  tooltip: function tooltip() {
71
71
  return /*#__PURE__*/_jsx("div", {
72
- children: l10n.t('查看快捷键')
72
+ className: "libro-tooltip",
73
+ children: /*#__PURE__*/_jsx("span", {
74
+ className: "libro-tooltip-text",
75
+ children: l10n.t('查看快捷键')
76
+ })
73
77
  });
74
78
  }
75
79
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@difizen/libro-jupyter",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
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.2",
41
- "@difizen/libro-code-editor": "^1.0.2",
42
- "@difizen/libro-codemirror": "^1.0.2",
43
- "@difizen/libro-cofine-editor": "^1.0.2",
44
- "@difizen/libro-common": "^1.0.2",
45
- "@difizen/libro-core": "^1.0.2",
46
- "@difizen/libro-kernel": "^1.0.2",
47
- "@difizen/libro-l10n": "^1.0.2",
48
- "@difizen/libro-language-client": "^1.0.2",
49
- "@difizen/libro-lsp": "^1.0.2",
50
- "@difizen/libro-markdown-cell": "^1.0.2",
51
- "@difizen/libro-output": "^1.0.2",
52
- "@difizen/libro-raw-cell": "^1.0.2",
53
- "@difizen/libro-rendermime": "^1.0.2",
54
- "@difizen/libro-search": "^1.0.2",
55
- "@difizen/libro-search-code-cell": "^1.0.2",
40
+ "@difizen/libro-code-cell": "^1.0.4",
41
+ "@difizen/libro-code-editor": "^1.0.4",
42
+ "@difizen/libro-codemirror": "^1.0.4",
43
+ "@difizen/libro-cofine-editor": "^1.0.4",
44
+ "@difizen/libro-common": "^1.0.4",
45
+ "@difizen/libro-core": "^1.0.4",
46
+ "@difizen/libro-kernel": "^1.0.4",
47
+ "@difizen/libro-l10n": "^1.0.4",
48
+ "@difizen/libro-language-client": "^1.0.4",
49
+ "@difizen/libro-lsp": "^1.0.4",
50
+ "@difizen/libro-markdown-cell": "^1.0.4",
51
+ "@difizen/libro-output": "^1.0.4",
52
+ "@difizen/libro-raw-cell": "^1.0.4",
53
+ "@difizen/libro-rendermime": "^1.0.4",
54
+ "@difizen/libro-search": "^1.0.4",
55
+ "@difizen/libro-search-code-cell": "^1.0.4",
56
56
  "uuid": "^9.0.0",
57
57
  "classnames": "^2.3.2",
58
58
  "moment": "^2.29.4",
@@ -1,4 +1,4 @@
1
- import { CellEditorMemo, LibroCodeCellView } from '@difizen/libro-code-cell';
1
+ import { LibroCodeCellView } from '@difizen/libro-code-cell';
2
2
  import type {
3
3
  CodeEditorViewOptions,
4
4
  CompletionProvider,
@@ -6,13 +6,12 @@ import type {
6
6
  TooltipProvider,
7
7
  TooltipProviderOption,
8
8
  } from '@difizen/libro-code-editor';
9
- import type { KernelMessage } from '@difizen/libro-kernel';
10
- import { KernelError } from '@difizen/libro-kernel';
11
9
  import { transient } from '@difizen/libro-common/app';
12
- import { view, ViewInstance } from '@difizen/libro-common/app';
13
- import { getOrigin, useInject } from '@difizen/libro-common/app';
10
+ import { view } from '@difizen/libro-common/app';
11
+ import { getOrigin } from '@difizen/libro-common/app';
14
12
  import { l10n } from '@difizen/libro-common/l10n';
15
- import { forwardRef } from 'react';
13
+ import { KernelError } from '@difizen/libro-kernel';
14
+ import type { KernelMessage } from '@difizen/libro-kernel';
16
15
 
17
16
  import { LibroJupyterModel } from '../libro-jupyter-model.js';
18
17
  import type { ExecutionMeta } from '../libro-jupyter-protocol.js';
@@ -20,22 +19,6 @@ import type { LibroJupyterView } from '../libro-jupyter-view.js';
20
19
 
21
20
  import type { JupyterCodeCellModel } from './jupyter-code-cell-model.js';
22
21
 
23
- const JupyterCodeCellComponent = forwardRef<HTMLDivElement>(
24
- function JupyterCodeCellComponent(props, ref) {
25
- const instance = useInject<JupyterCodeCellView>(ViewInstance);
26
- return (
27
- <div
28
- className={instance.className}
29
- ref={ref}
30
- tabIndex={10}
31
- onBlur={instance.blur}
32
- >
33
- <CellEditorMemo />
34
- </div>
35
- );
36
- },
37
- );
38
-
39
22
  @transient()
40
23
  @view('jupyter-code-cell-view')
41
24
  export class JupyterCodeCellView extends LibroCodeCellView {
@@ -49,7 +32,7 @@ export class JupyterCodeCellView extends LibroCodeCellView {
49
32
  this.parentDefer.resolve(this.parent);
50
33
  }
51
34
 
52
- override view = JupyterCodeCellComponent;
35
+ // override view = JupyterCodeCellComponent;
53
36
  declare model: JupyterCodeCellModel;
54
37
 
55
38
  override clearExecution = () => {
@@ -17,6 +17,7 @@ export class LibroJupyterContentContribution implements ContentContribution {
17
17
 
18
18
  const currentFileContents = await jupyterModel.fileService.read(filePath);
19
19
  if (currentFileContents) {
20
+ model.options['fileSize'] = currentFileContents.size;
20
21
  currentFileContents.content.nbformat_minor = 5;
21
22
  jupyterModel.currentFileContents = currentFileContents;
22
23
  jupyterModel.filePath = currentFileContents.path;
@@ -63,7 +63,6 @@ export class LibroNavigatableView
63
63
  }
64
64
 
65
65
  autoSave: 'on' | 'off' = 'off';
66
- fileSize?: number;
67
66
 
68
67
  @prop()
69
68
  dirty: boolean;
@@ -86,7 +85,6 @@ export class LibroNavigatableView
86
85
  this.filePath = options.path;
87
86
  this.dirty = false;
88
87
  this.title.caption = options.path;
89
- this.fileSize = options['fileSize'];
90
88
  const uri = new URI(options.path);
91
89
  const uriRef = URIIconReference.create('file', new VScodeURI(options.path));
92
90
  const iconClass = labelProvider.getIcon(uriRef);
@@ -138,7 +136,6 @@ export class LibroNavigatableView
138
136
  const libroView = await this.libroService.getOrCreateView({
139
137
  id: this.filePath,
140
138
  resource: this.filePath,
141
- fileSize: this.fileSize,
142
139
  });
143
140
  if (!libroView) {
144
141
  return;
@@ -37,7 +37,11 @@ export class KeybindInstructionsContribution
37
37
  icon: KeybindInstructionsIcon,
38
38
  command: KeybindInstructionsCommand.id,
39
39
  order: 'l',
40
- tooltip: () => <div>{l10n.t('查看快捷键')}</div>,
40
+ tooltip: () => (
41
+ <div className="libro-tooltip">
42
+ <span className="libro-tooltip-text">{l10n.t('查看快捷键')}</span>
43
+ </div>
44
+ ),
41
45
  });
42
46
  }
43
47