@difizen/libro-jupyter 0.2.41-next.2 → 0.2.41-next.3
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/components/index.less +4 -2
- package/es/widget/widget-render.d.ts.map +1 -1
- package/es/widget/widget-render.js +20 -13
- package/es/widget/widget-rendermime-contribution.d.ts.map +1 -1
- package/es/widget/widget-rendermime-contribution.js +1 -1
- package/es/widget/widget-view.d.ts.map +1 -1
- package/es/widget/widget-view.js +10 -3
- package/package.json +17 -17
package/es/components/index.less
CHANGED
|
@@ -37,11 +37,13 @@
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.libro-cell-bottom-blank {
|
|
40
|
+
height: 20px;
|
|
41
|
+
border-radius: 4px;
|
|
42
|
+
background: var(--mana-libro-output-background);
|
|
43
|
+
|
|
40
44
|
> div {
|
|
41
45
|
margin: 0;
|
|
42
46
|
}
|
|
43
|
-
|
|
44
|
-
background: var(--mana-libro-output-background);
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
.libro-cell-execution-tip-hide-output {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widget-render.d.ts","sourceRoot":"","sources":["../../src/widget/widget-render.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAmB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"widget-render.d.ts","sourceRoot":"","sources":["../../src/widget/widget-render.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAmB,MAAM,qBAAqB,CAAC;AAU3E,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,cAAc,CAAC;AAsBtB,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,KAAK,EAAE,cAAc,CAAA;CAAE,CAgC5D,CAAC"}
|
|
@@ -1,10 +1,25 @@
|
|
|
1
1
|
import { RenderMimeRegistry } from '@difizen/libro-rendermime';
|
|
2
|
-
import { getOrigin, useInject, ViewInstance, ViewRender } from '@difizen/mana-app';
|
|
2
|
+
import { getOrigin, useInject, useObserve, ViewInstance, ViewRender } from '@difizen/mana-app';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import "./index.less";
|
|
5
5
|
import { LibroJupyterModel } from "../libro-jupyter-model.js";
|
|
6
6
|
import { LibroWidgetManager } from "./widget-manager.js";
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
var WidgetViewRender = function WidgetViewRender(props) {
|
|
9
|
+
var widgetView = useObserve(props.view);
|
|
10
|
+
if (widgetView.isCommClosed) {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
return /*#__PURE__*/_jsx("div", {
|
|
14
|
+
className: "libro-widget-render-container",
|
|
15
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
16
|
+
className: "libro-widget-render",
|
|
17
|
+
children: /*#__PURE__*/_jsx(ViewRender, {
|
|
18
|
+
view: widgetView
|
|
19
|
+
})
|
|
20
|
+
})
|
|
21
|
+
});
|
|
22
|
+
};
|
|
8
23
|
export var WidgetRender = function WidgetRender(props) {
|
|
9
24
|
var model = props.model;
|
|
10
25
|
|
|
@@ -17,23 +32,15 @@ export var WidgetRender = function WidgetRender(props) {
|
|
|
17
32
|
return null;
|
|
18
33
|
}
|
|
19
34
|
var widgets = widgetManager.getOrCreateWidgets(getOrigin(libro.model.kernelConnection));
|
|
35
|
+
var widgetView = undefined;
|
|
20
36
|
var mimeType = defaultRenderMime.preferredMimeType(model);
|
|
21
37
|
if (mimeType) {
|
|
22
38
|
var model_id = JSON.parse(JSON.stringify(model.data[mimeType])).model_id;
|
|
23
39
|
if (model_id) {
|
|
24
|
-
|
|
40
|
+
widgetView = widgets.getModel(model_id);
|
|
25
41
|
widgetView.setCell(getOrigin(output.cell));
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
return /*#__PURE__*/_jsx("div", {
|
|
30
|
-
className: "libro-widget-render-container",
|
|
31
|
-
children: /*#__PURE__*/_jsx("div", {
|
|
32
|
-
className: "libro-widget-render",
|
|
33
|
-
children: /*#__PURE__*/_jsx(ViewRender, {
|
|
34
|
-
view: widgetView
|
|
35
|
-
})
|
|
36
|
-
})
|
|
42
|
+
return /*#__PURE__*/_jsx(WidgetViewRender, {
|
|
43
|
+
view: widgetView
|
|
37
44
|
});
|
|
38
45
|
}
|
|
39
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widget-rendermime-contribution.d.ts","sourceRoot":"","sources":["../../src/widget/widget-rendermime-contribution.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAKnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAGzD,qBACa,2BAA4B,YAAW,sBAAsB;IAC5C,kBAAkB,EAAE,kBAAkB,CAAC;IACnE,SAAS,UAAW,cAAc,YAiBhC;IACF,UAAU,SAAoB;IAC9B,IAAI,UAAQ;IACZ,SAAS,WAAgD;IACzD,UAAU,
|
|
1
|
+
{"version":3,"file":"widget-rendermime-contribution.d.ts","sourceRoot":"","sources":["../../src/widget/widget-rendermime-contribution.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAKnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAGzD,qBACa,2BAA4B,YAAW,sBAAsB;IAC5C,kBAAkB,EAAE,kBAAkB,CAAC;IACnE,SAAS,UAAW,cAAc,YAiBhC;IACF,UAAU,SAAoB;IAC9B,IAAI,UAAQ;IACZ,SAAS,WAAgD;IACzD,UAAU,UAAQ;IAClB,MAAM;;OAAgB;CACvB"}
|
|
@@ -40,7 +40,7 @@ export var LibroWidgetMimeContribution = (_dec = singleton({
|
|
|
40
40
|
this.renderType = 'widgetRenderer';
|
|
41
41
|
this.safe = true;
|
|
42
42
|
this.mimeTypes = ['application/vnd.jupyter.widget-view+json'];
|
|
43
|
-
this.allowClear =
|
|
43
|
+
this.allowClear = true;
|
|
44
44
|
this.render = WidgetRender;
|
|
45
45
|
}), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "libroWidgetManager", [_dec2], {
|
|
46
46
|
configurable: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widget-view.d.ts","sourceRoot":"","sources":["../../src/widget/widget-view.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAuB,MAAM,uBAAuB,CAAC;AACxF,OAAO,KAAK,EAAE,QAAQ,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AAErF,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAKL,QAAQ,EAGT,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAMnE,OAAO,KAAK,EACV,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,WAAW,EACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD,eAAO,MAAM,oBAAoB,0FAIhC,CAAC;AAEF,qBAEa,UAAW,SAAQ,QAAS,YAAW,WAAW;IACpD,IAAI,EAAE,aAAa,CAAwB;IACpD,eAAe,EAAE,eAAe,CAAC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,aAAa,CAAC,aAAa,KAAK,OAAO,CA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AAC,GAAG,EAAE,aAAa,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAW5D,gBAAgB,aAEd;IACF;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI;IAUhC;;;OAGG;IACH,MAAM,IAAI,MAAM;IAIhB,UAAU,IAAI,MAAM;IAIpB;;OAEG;IACH,IAAI,SACI,SAAS,cACH,UAAU,YACZ,WAAW,EAAE,GAAG,eAAe,EAAE,wBAM3C;IAEF,IAAI,EAAE,YAAY,CAAC;IACX,OAAO,CAAC,EAAE,QAAQ,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IAEf,YAAY,UAAS;IAErB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B"}
|
package/es/widget/widget-view.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3;
|
|
2
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
|
|
3
3
|
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
|
|
4
4
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5
5
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
@@ -27,7 +27,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
27
27
|
export var LibroWidgetComponent = /*#__PURE__*/forwardRef(function LibroWidgetComponent() {
|
|
28
28
|
return /*#__PURE__*/_jsx(_Fragment, {});
|
|
29
29
|
});
|
|
30
|
-
export var WidgetView = (_dec = transient(), _dec2 = view('libro-widget-view'), _dec3 = inject(LibroWidgetManager), _dec4 = prop(), _dec5 = prop(), _dec(_class = _dec2(_class = (_class2 = /*#__PURE__*/function (_BaseView) {
|
|
30
|
+
export var WidgetView = (_dec = transient(), _dec2 = view('libro-widget-view'), _dec3 = inject(LibroWidgetManager), _dec4 = prop(), _dec5 = prop(), _dec6 = prop(), _dec(_class = _dec2(_class = (_class2 = /*#__PURE__*/function (_BaseView) {
|
|
31
31
|
_inherits(WidgetView, _BaseView);
|
|
32
32
|
var _super = _createSuper(WidgetView);
|
|
33
33
|
function WidgetView(props, libroContextKey) {
|
|
@@ -69,7 +69,7 @@ export var WidgetView = (_dec = transient(), _dec2 = view('libro-widget-view'),
|
|
|
69
69
|
_this.state_change = void 0;
|
|
70
70
|
_this.name = void 0;
|
|
71
71
|
_this.module = void 0;
|
|
72
|
-
_this
|
|
72
|
+
_initializerDefineProperty(_this, "isCommClosed", _descriptor4, _assertThisInitialized(_this));
|
|
73
73
|
_this.model_module = void 0;
|
|
74
74
|
_this.model_name = void 0;
|
|
75
75
|
_this.model_module_version = void 0;
|
|
@@ -270,4 +270,11 @@ export var WidgetView = (_dec = transient(), _dec2 = view('libro-widget-view'),
|
|
|
270
270
|
enumerable: true,
|
|
271
271
|
writable: true,
|
|
272
272
|
initializer: null
|
|
273
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "isCommClosed", [_dec6], {
|
|
274
|
+
configurable: true,
|
|
275
|
+
enumerable: true,
|
|
276
|
+
writable: true,
|
|
277
|
+
initializer: function initializer() {
|
|
278
|
+
return false;
|
|
279
|
+
}
|
|
273
280
|
})), _class2)) || _class) || _class);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@difizen/libro-jupyter",
|
|
3
|
-
"version": "0.2.41-next.
|
|
3
|
+
"version": "0.2.41-next.3",
|
|
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": "0.2.41-next.
|
|
41
|
-
"@difizen/libro-code-editor": "0.2.41-next.
|
|
42
|
-
"@difizen/libro-codemirror": "0.2.41-next.
|
|
43
|
-
"@difizen/libro-cofine-editor": "0.2.41-next.
|
|
44
|
-
"@difizen/libro-common": "0.2.41-next.
|
|
45
|
-
"@difizen/libro-core": "0.2.41-next.
|
|
46
|
-
"@difizen/libro-kernel": "0.2.41-next.
|
|
47
|
-
"@difizen/libro-l10n": "0.2.41-next.
|
|
48
|
-
"@difizen/libro-language-client": "0.2.41-next.
|
|
49
|
-
"@difizen/libro-lsp": "0.2.41-next.
|
|
50
|
-
"@difizen/libro-markdown-cell": "0.2.41-next.
|
|
51
|
-
"@difizen/libro-output": "0.2.41-next.
|
|
52
|
-
"@difizen/libro-raw-cell": "0.2.41-next.
|
|
53
|
-
"@difizen/libro-rendermime": "0.2.41-next.
|
|
54
|
-
"@difizen/libro-search": "0.2.41-next.
|
|
55
|
-
"@difizen/libro-search-code-cell": "0.2.41-next.
|
|
40
|
+
"@difizen/libro-code-cell": "0.2.41-next.3",
|
|
41
|
+
"@difizen/libro-code-editor": "0.2.41-next.3",
|
|
42
|
+
"@difizen/libro-codemirror": "0.2.41-next.3",
|
|
43
|
+
"@difizen/libro-cofine-editor": "0.2.41-next.3",
|
|
44
|
+
"@difizen/libro-common": "0.2.41-next.3",
|
|
45
|
+
"@difizen/libro-core": "0.2.41-next.3",
|
|
46
|
+
"@difizen/libro-kernel": "0.2.41-next.3",
|
|
47
|
+
"@difizen/libro-l10n": "0.2.41-next.3",
|
|
48
|
+
"@difizen/libro-language-client": "0.2.41-next.3",
|
|
49
|
+
"@difizen/libro-lsp": "0.2.41-next.3",
|
|
50
|
+
"@difizen/libro-markdown-cell": "0.2.41-next.3",
|
|
51
|
+
"@difizen/libro-output": "0.2.41-next.3",
|
|
52
|
+
"@difizen/libro-raw-cell": "0.2.41-next.3",
|
|
53
|
+
"@difizen/libro-rendermime": "0.2.41-next.3",
|
|
54
|
+
"@difizen/libro-search": "0.2.41-next.3",
|
|
55
|
+
"@difizen/libro-search-code-cell": "0.2.41-next.3",
|
|
56
56
|
"@difizen/mana-app": "latest",
|
|
57
57
|
"@difizen/mana-l10n": "latest",
|
|
58
58
|
"classnames": "^2.3.2",
|