@difizen/libro-jupyter 0.3.20 → 0.3.21

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';
23
+ import { LibroCodeCellView } from '@difizen/libro-code-cell';
24
24
  import { KernelError } from '@difizen/libro-kernel';
25
25
  import { transient } from '@difizen/mana-app';
26
- import { view, ViewInstance } from '@difizen/mana-app';
27
- import { getOrigin, useInject } from '@difizen/mana-app';
26
+ import { view } from '@difizen/mana-app';
27
+ import { getOrigin } from '@difizen/mana-app';
28
28
  import { l10n } from '@difizen/mana-l10n';
29
- import { forwardRef } from 'react';
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() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@difizen/libro-jupyter",
3
- "version": "0.3.20",
3
+ "version": "0.3.21",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "libro"
@@ -37,28 +37,28 @@
37
37
  "dependencies": {
38
38
  "@ant-design/colors": "^7.0.0",
39
39
  "@ant-design/icons": "^5.1.0",
40
- "@difizen/libro-code-cell": "^0.3.20",
41
- "@difizen/libro-code-editor": "^0.3.20",
42
- "@difizen/libro-codemirror": "^0.3.20",
43
- "@difizen/libro-cofine-editor": "^0.3.20",
44
- "@difizen/libro-common": "^0.3.20",
45
- "@difizen/libro-core": "^0.3.20",
46
- "@difizen/libro-kernel": "^0.3.20",
47
- "@difizen/libro-l10n": "^0.3.20",
48
- "@difizen/libro-language-client": "^0.3.20",
49
- "@difizen/libro-lsp": "^0.3.20",
50
- "@difizen/libro-markdown-cell": "^0.3.20",
51
- "@difizen/libro-output": "^0.3.20",
52
- "@difizen/libro-raw-cell": "^0.3.20",
53
- "@difizen/libro-rendermime": "^0.3.20",
54
- "@difizen/libro-search": "^0.3.20",
55
- "@difizen/libro-search-code-cell": "^0.3.20",
40
+ "@difizen/libro-code-cell": "^0.3.21",
41
+ "@difizen/libro-code-editor": "^0.3.21",
42
+ "@difizen/libro-codemirror": "^0.3.21",
43
+ "@difizen/libro-cofine-editor": "^0.3.21",
44
+ "@difizen/libro-common": "^0.3.21",
45
+ "@difizen/libro-core": "^0.3.21",
46
+ "@difizen/libro-kernel": "^0.3.21",
47
+ "@difizen/libro-l10n": "^0.3.21",
48
+ "@difizen/libro-language-client": "^0.3.21",
49
+ "@difizen/libro-lsp": "^0.3.21",
50
+ "@difizen/libro-markdown-cell": "^0.3.21",
51
+ "@difizen/libro-output": "^0.3.21",
52
+ "@difizen/libro-raw-cell": "^0.3.21",
53
+ "@difizen/libro-rendermime": "^0.3.21",
54
+ "@difizen/libro-search": "^0.3.21",
55
+ "@difizen/libro-search-code-cell": "^0.3.21",
56
56
  "@difizen/mana-app": "latest",
57
57
  "@difizen/mana-l10n": "latest",
58
- "uuid": "^9.0.0",
59
58
  "classnames": "^2.3.2",
60
59
  "moment": "^2.29.4",
61
- "plotly.js": "^2.35.0"
60
+ "plotly.js": "^2.35.0",
61
+ "uuid": "^9.0.0"
62
62
  },
63
63
  "peerDependencies": {
64
64
  "antd": "^5.8.6",
@@ -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,
@@ -9,10 +9,9 @@ import type {
9
9
  import type { KernelMessage } from '@difizen/libro-kernel';
10
10
  import { KernelError } from '@difizen/libro-kernel';
11
11
  import { transient } from '@difizen/mana-app';
12
- import { view, ViewInstance } from '@difizen/mana-app';
13
- import { getOrigin, useInject } from '@difizen/mana-app';
12
+ import { view } from '@difizen/mana-app';
13
+ import { getOrigin } from '@difizen/mana-app';
14
14
  import { l10n } from '@difizen/mana-l10n';
15
- import { forwardRef } from 'react';
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 = () => {