@difizen/libro-jupyter 0.1.1 → 0.1.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/add-between-cell/add-between-cell.d.ts.map +1 -1
- package/es/add-between-cell/add-between-cell.js +7 -7
- package/es/add-between-cell/index.less +6 -0
- package/es/cell/jupyter-code-cell-model.d.ts +2 -2
- package/es/cell/jupyter-code-cell-model.d.ts.map +1 -1
- package/es/cell/jupyter-code-cell-model.js +7 -3
- package/es/cell/jupyter-code-cell-view.d.ts +9 -4
- package/es/cell/jupyter-code-cell-view.d.ts.map +1 -1
- package/es/cell/jupyter-code-cell-view.js +137 -100
- package/es/command/command-contribution.d.ts.map +1 -1
- package/es/command/command-contribution.js +9 -9
- package/es/components/cell-execution-tip.d.ts.map +1 -1
- package/es/components/cell-execution-tip.js +14 -1
- package/es/components/cell-input-bottom-blank.d.ts.map +1 -1
- package/es/components/cell-input-bottom-blank.js +4 -4
- package/es/config/config-contribution.d.ts +2 -2
- package/es/config/config-contribution.d.ts.map +1 -1
- package/es/config/config-contribution.js +7 -7
- package/es/config/config.d.ts +6 -1
- package/es/config/config.d.ts.map +1 -1
- package/es/config/config.js +15 -1
- package/es/config/index.d.ts +1 -0
- package/es/config/index.d.ts.map +1 -1
- package/es/config/index.js +2 -1
- package/es/file/file-command.d.ts.map +1 -1
- package/es/file/file-command.js +6 -2
- package/es/file/navigatable-view.d.ts +7 -2
- package/es/file/navigatable-view.d.ts.map +1 -1
- package/es/file/navigatable-view.js +41 -6
- package/es/file/open-handler-contribution.js +1 -1
- package/es/index.d.ts +17 -15
- package/es/index.d.ts.map +1 -1
- package/es/index.js +17 -15
- package/es/keybind-instructions/index.less +2 -2
- package/es/keybind-instructions/keybind-instructions-contribution.js +2 -2
- package/es/libro-jupyter-model.d.ts +8 -4
- package/es/libro-jupyter-model.d.ts.map +1 -1
- package/es/libro-jupyter-model.js +24 -17
- package/es/libro-jupyter-protocol.d.ts +4 -0
- package/es/libro-jupyter-protocol.d.ts.map +1 -1
- package/es/libro-jupyter-protocol.js +2 -1
- package/es/libro-jupyter-server-launch-manager.d.ts +3 -1
- package/es/libro-jupyter-server-launch-manager.d.ts.map +1 -1
- package/es/libro-jupyter-server-launch-manager.js +9 -2
- package/es/libro-jupyter-view.d.ts +2 -1
- package/es/libro-jupyter-view.d.ts.map +1 -1
- package/es/libro-jupyter-view.js +4 -2
- package/es/module.d.ts.map +1 -1
- package/es/module.js +12 -10
- package/es/output/libro-jupyter-outputarea.d.ts +3 -0
- package/es/output/libro-jupyter-outputarea.d.ts.map +1 -1
- package/es/output/libro-jupyter-outputarea.js +49 -4
- package/es/rendermime/index.less +12 -1
- package/es/rendermime/plotly-renderers.d.ts +15 -14
- package/es/rendermime/plotly-renderers.d.ts.map +1 -1
- package/es/rendermime/plotly-renderers.js +1 -3
- package/es/toolbar/kernel-selector-dropdown.d.ts.map +1 -1
- package/es/toolbar/kernel-selector-dropdown.js +2 -6
- package/es/typings/index.d.ts +7 -2
- package/package.json +16 -14
- package/src/add-between-cell/add-between-cell.tsx +17 -8
- package/src/add-between-cell/index.less +6 -0
- package/src/cell/jupyter-code-cell-model.ts +6 -4
- package/src/cell/jupyter-code-cell-view.tsx +81 -48
- package/src/command/command-contribution.ts +13 -9
- package/src/components/cell-execution-tip.tsx +8 -2
- package/src/components/cell-input-bottom-blank.tsx +10 -5
- package/src/config/config-contribution.ts +3 -3
- package/src/config/config.ts +17 -2
- package/src/config/index.ts +1 -0
- package/src/file/file-command.tsx +5 -2
- package/src/file/navigatable-view.tsx +39 -1
- package/src/file/open-handler-contribution.ts +1 -1
- package/src/index.spec.ts +1 -5
- package/src/index.ts +17 -16
- package/src/keybind-instructions/index.less +2 -2
- package/src/keybind-instructions/keybind-instructions-contribution.ts +2 -2
- package/src/libro-jupyter-model.ts +34 -20
- package/src/libro-jupyter-protocol.ts +5 -0
- package/src/libro-jupyter-server-launch-manager.ts +11 -2
- package/src/libro-jupyter-view.tsx +4 -1
- package/src/module.ts +23 -15
- package/src/output/libro-jupyter-outputarea.tsx +31 -3
- package/src/rendermime/index.less +12 -1
- package/src/rendermime/plotly-render.tsx +1 -1
- package/src/rendermime/plotly-renderers.ts +15 -17
- package/src/toolbar/kernel-selector-dropdown.tsx +2 -6
- package/src/typings/index.d.ts +7 -2
- package/es/configuration/index.d.ts +0 -3
- package/es/configuration/index.d.ts.map +0 -1
- package/es/configuration/index.js +0 -2
- package/es/configuration/libro-configuration-contribution.d.ts +0 -5
- package/es/configuration/libro-configuration-contribution.d.ts.map +0 -1
- package/es/configuration/libro-configuration-contribution.js +0 -24
- package/es/configuration/libro-configuration.d.ts +0 -3
- package/es/configuration/libro-configuration.d.ts.map +0 -1
- package/es/configuration/libro-configuration.js +0 -12
- package/src/configuration/index.ts +0 -2
- package/src/configuration/libro-configuration-contribution.ts +0 -11
- package/src/configuration/libro-configuration.ts +0 -14
|
@@ -1,8 +1,15 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
1
7
|
import { LoadingOutlined } from '@ant-design/icons';
|
|
2
8
|
import { ExecutableCellView, CheckCircleOutlined, ExecutableCellModel } from '@difizen/libro-core';
|
|
3
9
|
import { useObserve } from '@difizen/mana-app';
|
|
4
10
|
import classnames from 'classnames';
|
|
5
11
|
import moment from 'moment';
|
|
12
|
+
import { useState } from 'react';
|
|
6
13
|
import { formatTime, parseExecutionInfoFromModel, isWaitingExecute } from "../utils/index.js";
|
|
7
14
|
import { InfoCircle } from "./icons.js";
|
|
8
15
|
import "./index.less";
|
|
@@ -10,6 +17,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
10
17
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
18
|
export function CellExecutionTip(_ref) {
|
|
12
19
|
var cell = _ref.cell;
|
|
20
|
+
var _useState = useState(),
|
|
21
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
22
|
+
setCurrentTime = _useState2[1];
|
|
13
23
|
var observableCell = useObserve(cell);
|
|
14
24
|
if (!ExecutableCellView.is(cell)) {
|
|
15
25
|
return null;
|
|
@@ -43,6 +53,9 @@ export function CellExecutionTip(_ref) {
|
|
|
43
53
|
})]
|
|
44
54
|
});
|
|
45
55
|
} else if (kernelExecuting) {
|
|
56
|
+
setTimeout(function () {
|
|
57
|
+
setCurrentTime(Date.now());
|
|
58
|
+
}, 100);
|
|
46
59
|
return /*#__PURE__*/_jsxs("div", {
|
|
47
60
|
className: classnames("libro-cell-execution-tip", !existOutput && 'libro-cell-execution-tip-without-output'),
|
|
48
61
|
children: [/*#__PURE__*/_jsx("div", {
|
|
@@ -57,7 +70,7 @@ export function CellExecutionTip(_ref) {
|
|
|
57
70
|
});
|
|
58
71
|
} else if (waitingExecute) {
|
|
59
72
|
return /*#__PURE__*/_jsxs("div", {
|
|
60
|
-
className: classnames("libro-cell-execution-tip",
|
|
73
|
+
className: classnames("libro-cell-execution-tip", !existOutput && 'libro-cell-execution-tip-without-output'),
|
|
61
74
|
children: [/*#__PURE__*/_jsx("div", {
|
|
62
75
|
className: "libro-cell-execution-tip-border"
|
|
63
76
|
}), /*#__PURE__*/_jsx(InfoCircle, {}), /*#__PURE__*/_jsx("p", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell-input-bottom-blank.d.ts","sourceRoot":"","sources":["../../src/components/cell-input-bottom-blank.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cell-input-bottom-blank.d.ts","sourceRoot":"","sources":["../../src/components/cell-input-bottom-blank.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAMpD,wBAAgB,oBAAoB,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,kDAsBhE"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { LibroExecutableCellView } from '@difizen/libro-core';
|
|
1
|
+
import { LibroExecutableCellView, LibroOutputArea } from '@difizen/libro-core';
|
|
2
2
|
import { useObserve } from '@difizen/mana-app';
|
|
3
3
|
import { isWaitingExecute } from "../utils/index.js";
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
5
|
export function CellInputBottomBlank(_ref) {
|
|
6
6
|
var cell = _ref.cell;
|
|
7
7
|
var observableCell = useObserve(cell);
|
|
8
|
-
if (!(cell instanceof LibroExecutableCellView)) {
|
|
8
|
+
if (!(cell instanceof LibroExecutableCellView) || !(observableCell.outputArea instanceof LibroOutputArea)) {
|
|
9
9
|
return null;
|
|
10
10
|
}
|
|
11
11
|
var outputs = observableCell.outputArea.outputs;
|
|
12
|
-
var hasNoneOutput =
|
|
12
|
+
var hasNoneOutput = !outputs || outputs.length === 0;
|
|
13
13
|
|
|
14
14
|
// 有output时 或者 没有被执行过,不显示input底部的空白
|
|
15
|
-
if (hasNoneOutput || isWaitingExecute(observableCell.model)) {
|
|
15
|
+
if (hasNoneOutput && (observableCell.model.executeCount || isWaitingExecute(observableCell.model))) {
|
|
16
16
|
return /*#__PURE__*/_jsx("div", {
|
|
17
17
|
className: "libro-cell-bottom-blank"
|
|
18
18
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ConfigurationContribution, ConfigurationService } from '@difizen/mana-app';
|
|
2
2
|
import { ApplicationContribution } from '@difizen/mana-app';
|
|
3
|
-
export declare class
|
|
4
|
-
registerConfigurations(): import("@difizen/mana-app").ConfigurationNode<boolean>[];
|
|
3
|
+
export declare class LibroJupyterSettingContribution implements ConfigurationContribution {
|
|
4
|
+
registerConfigurations(): (import("@difizen/mana-app").ConfigurationNode<boolean> | import("@difizen/mana-app").ConfigurationNode<string>)[];
|
|
5
5
|
}
|
|
6
6
|
export declare class ConfigAppContribution implements ApplicationContribution {
|
|
7
7
|
configurationService: ConfigurationService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-contribution.d.ts","sourceRoot":"","sources":["../../src/config/config-contribution.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACpF,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAK5D,qBACa,
|
|
1
|
+
{"version":3,"file":"config-contribution.d.ts","sourceRoot":"","sources":["../../src/config/config-contribution.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACpF,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAK5D,qBACa,+BAAgC,YAAW,yBAAyB;IAC/E,sBAAsB;CAGvB;AACD,qBACa,qBAAsB,YAAW,uBAAuB;IACrC,oBAAoB,EAAE,oBAAoB,CAAC;IACzE,WAAW;CAIZ"}
|
|
@@ -12,20 +12,20 @@ import { AutoInsertWhenNoCell, EnterEditModeWhenAddCell } from '@difizen/libro-c
|
|
|
12
12
|
import { ConfigurationContribution, ConfigurationService } from '@difizen/mana-app';
|
|
13
13
|
import { ApplicationContribution } from '@difizen/mana-app';
|
|
14
14
|
import { inject, singleton } from '@difizen/mana-app';
|
|
15
|
-
import {
|
|
16
|
-
export var
|
|
15
|
+
import { LibroJupyterConfiguration } from "./config.js";
|
|
16
|
+
export var LibroJupyterSettingContribution = (_dec = singleton({
|
|
17
17
|
contrib: ConfigurationContribution
|
|
18
18
|
}), _dec(_class = /*#__PURE__*/function () {
|
|
19
|
-
function
|
|
20
|
-
_classCallCheck(this,
|
|
19
|
+
function LibroJupyterSettingContribution() {
|
|
20
|
+
_classCallCheck(this, LibroJupyterSettingContribution);
|
|
21
21
|
}
|
|
22
|
-
_createClass(
|
|
22
|
+
_createClass(LibroJupyterSettingContribution, [{
|
|
23
23
|
key: "registerConfigurations",
|
|
24
24
|
value: function registerConfigurations() {
|
|
25
|
-
return [
|
|
25
|
+
return [LibroJupyterConfiguration.AutoSave, LibroJupyterConfiguration.OpenSlot];
|
|
26
26
|
}
|
|
27
27
|
}]);
|
|
28
|
-
return
|
|
28
|
+
return LibroJupyterSettingContribution;
|
|
29
29
|
}()) || _class);
|
|
30
30
|
export var ConfigAppContribution = (_dec2 = singleton({
|
|
31
31
|
contrib: ApplicationContribution
|
package/es/config/config.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import type { ConfigurationNode } from '@difizen/mana-app';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const LibroConfigAutoSave: ConfigurationNode<boolean>;
|
|
3
|
+
export declare const LibroConfigOpenSlot: ConfigurationNode<string>;
|
|
4
|
+
export declare const LibroJupyterConfiguration: {
|
|
5
|
+
AutoSave: ConfigurationNode<boolean>;
|
|
6
|
+
OpenSlot: ConfigurationNode<string>;
|
|
7
|
+
};
|
|
3
8
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAG3D,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAG3D,eAAO,MAAM,mBAAmB,EAAE,iBAAiB,CAAC,OAAO,CAS1D,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,iBAAiB,CAAC,MAAM,CASzD,CAAC;AAEF,eAAO,MAAM,yBAAyB;;;CAGrC,CAAC"}
|
package/es/config/config.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { l10n } from '@difizen/mana-l10n';
|
|
2
|
-
export var
|
|
2
|
+
export var LibroConfigAutoSave = {
|
|
3
3
|
id: 'libro.autosave',
|
|
4
4
|
description: l10n.t('是否自动保存修改'),
|
|
5
5
|
title: 'checkbox',
|
|
@@ -8,4 +8,18 @@ export var LibroAutosaveSetting = {
|
|
|
8
8
|
schema: {
|
|
9
9
|
type: 'boolean'
|
|
10
10
|
}
|
|
11
|
+
};
|
|
12
|
+
export var LibroConfigOpenSlot = {
|
|
13
|
+
id: 'libro.jupyter.open.slot',
|
|
14
|
+
description: '文件默认打开位置',
|
|
15
|
+
title: '文件默认打开位置',
|
|
16
|
+
type: 'checkbox',
|
|
17
|
+
defaultValue: 'main',
|
|
18
|
+
schema: {
|
|
19
|
+
type: 'string'
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
export var LibroJupyterConfiguration = {
|
|
23
|
+
AutoSave: LibroConfigAutoSave,
|
|
24
|
+
OpenSlot: LibroConfigOpenSlot
|
|
11
25
|
};
|
package/es/config/index.d.ts
CHANGED
package/es/config/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC"}
|
package/es/config/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from "./config-contribution.js";
|
|
1
|
+
export * from "./config-contribution.js";
|
|
2
|
+
export * from "./config.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-command.d.ts","sourceRoot":"","sources":["../../src/file/file-command.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,eAAe,EACf,QAAQ,EACR,YAAY,EACZ,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EACL,mBAAmB,EACnB,YAAY,
|
|
1
|
+
{"version":3,"file":"file-command.d.ts","sourceRoot":"","sources":["../../src/file/file-command.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,eAAe,EACf,QAAQ,EACR,YAAY,EACZ,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EACL,mBAAmB,EACnB,YAAY,EAEZ,gBAAgB,EAChB,YAAY,EACZ,aAAa,EAEb,mBAAmB,EAEpB,MAAM,mBAAmB,CAAC;AAM3B,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,OAAO,cAAc,CAAC;AAgDtB,eAAO,MAAM,uBAAuB,EAAE,QAAqC,CAAC;AAE5E,qBAGa,uBACX,YAAW,mBAAmB,EAAE,gBAAgB,EAAE,mBAAmB;IAErE,SAAS,CAAC,WAAW,EAAE,WAAW,CAAC;IACP,WAAW,EAAE,kBAAkB,CAAC;IACtC,YAAY,EAAE,YAAY,CAAC;IAC1B,SAAS,CAAC,WAAW,EAAE,aAAa,CAAC;IAC5D,QAAQ,EAAE,QAAQ,CAAC;IACnB,UAAU,EAAE,MAAM,GAAG,KAAK,CAAC;IAC3B,cAAc,EAAE,YAAY,CAAC;gBAEI,WAAW,EAAE,WAAW;IAazD,aAAa,CAAC,IAAI,EAAE,YAAY;IA+ChC,gBAAgB,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;IAsKhD,oBAAoB,CAAC,eAAe,EAAE,eAAe,GAAG,IAAI;CAQ7D"}
|
package/es/file/file-command.js
CHANGED
|
@@ -14,7 +14,7 @@ function _initializerWarningHelper(descriptor, context) { throw new Error('Decor
|
|
|
14
14
|
import pathUtil from 'path';
|
|
15
15
|
import { ReloadOutlined } from '@ant-design/icons';
|
|
16
16
|
import { ViewManager } from '@difizen/mana-app';
|
|
17
|
-
import { CommandContribution, FileStatNode,
|
|
17
|
+
import { CommandContribution, FileStatNode, inject, MenuContribution, ModalService, OpenerService, singleton, ToolbarContribution, URI } from '@difizen/mana-app';
|
|
18
18
|
import { message, Modal } from 'antd';
|
|
19
19
|
import { FileCreateModal } from "./file-create-modal.js";
|
|
20
20
|
import { FileDirCreateModal } from "./file-createdir-modal.js";
|
|
@@ -64,6 +64,10 @@ var FileCommands = {
|
|
|
64
64
|
REFRESH: {
|
|
65
65
|
id: 'fileTree.command.refresh',
|
|
66
66
|
label: '刷新'
|
|
67
|
+
},
|
|
68
|
+
REMOVE: {
|
|
69
|
+
id: 'fileTree.command.remove',
|
|
70
|
+
label: '删除'
|
|
67
71
|
}
|
|
68
72
|
};
|
|
69
73
|
export var FileTreeContextMenuPath = ['file-tree-context-menu'];
|
|
@@ -167,7 +171,7 @@ export var FileCommandContribution = (_dec = singleton({
|
|
|
167
171
|
return FileStatNode.is(node) && node.fileStat.isFile;
|
|
168
172
|
}
|
|
169
173
|
});
|
|
170
|
-
command.registerHandler(
|
|
174
|
+
command.registerHandler(FileCommands.REMOVE.id, {
|
|
171
175
|
execute: function execute(node) {
|
|
172
176
|
if (FileStatNode.is(node)) {
|
|
173
177
|
var filePath = node.uri.path.toString();
|
|
@@ -2,27 +2,32 @@
|
|
|
2
2
|
import type { LibroView } from '@difizen/libro-core';
|
|
3
3
|
import { LibroService } from '@difizen/libro-core';
|
|
4
4
|
import type { NavigatableView, Saveable } from '@difizen/mana-app';
|
|
5
|
+
import { ConfigurationService } from '@difizen/mana-app';
|
|
6
|
+
import { DisposableCollection } from '@difizen/mana-app';
|
|
5
7
|
import { BaseView, LabelProvider, Deferred, URI, CommandRegistry, Emitter } from '@difizen/mana-app';
|
|
6
8
|
export declare const LibroEditorComponent: import("react").ForwardRefExoticComponent<import("react").RefAttributes<unknown>>;
|
|
7
9
|
export declare const LibroNavigatableViewFactoryId = "libro-navigatable-view-factory";
|
|
8
10
|
export declare class LibroNavigatableView extends BaseView implements NavigatableView, Saveable {
|
|
9
11
|
protected libroService: LibroService;
|
|
10
12
|
commandRegistry: CommandRegistry;
|
|
13
|
+
protected readonly toDisposeOnAutoSave: DisposableCollection;
|
|
11
14
|
view: import("react").ForwardRefExoticComponent<import("react").RefAttributes<unknown>>;
|
|
12
15
|
codeRef: import("react").RefObject<HTMLDivElement>;
|
|
13
16
|
filePath?: string;
|
|
14
17
|
dirtyEmitter: Emitter<void>;
|
|
18
|
+
autoSaveDelay: number;
|
|
15
19
|
get onDirtyChanged(): import("@difizen/mana-app").Event<void>;
|
|
16
|
-
|
|
20
|
+
autoSave: 'on' | 'off';
|
|
17
21
|
dirty: boolean;
|
|
18
22
|
libroView?: LibroView;
|
|
19
23
|
protected defer: Deferred<void>;
|
|
20
24
|
get ready(): Promise<void>;
|
|
21
25
|
constructor(options: {
|
|
22
26
|
path: string;
|
|
23
|
-
}, labelProvider: LabelProvider);
|
|
27
|
+
}, labelProvider: LabelProvider, configurationService: ConfigurationService);
|
|
24
28
|
onViewMount(): Promise<void>;
|
|
25
29
|
save: () => void;
|
|
30
|
+
protected doAutoSave(): void;
|
|
26
31
|
protected getOrCreateLibroView(): Promise<void>;
|
|
27
32
|
getResourceUri(): URI | undefined;
|
|
28
33
|
createMoveToUri(resourceUri: URI): URI | undefined;
|
|
@@ -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,mBAAmB,CAAC;AACnE,OAAO,EACL,QAAQ,EAER,aAAa,EAUb,QAAQ,EACR,GAAG,EACH,eAAe,EACf,OAAO,EACR,MAAM,mBAAmB,CAAC;
|
|
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,mBAAmB,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAc,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EACL,QAAQ,EAER,aAAa,EAUb,QAAQ,EACR,GAAG,EACH,eAAe,EACf,OAAO,EACR,MAAM,mBAAmB,CAAC;AAK3B,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,4CAEjB;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,CAAA;KAAE,EACtB,aAAa,EAAE,aAAa,EACrB,oBAAoB,EAAE,oBAAoB;IA2B3D,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3C,IAAI,aAMF;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"}
|
|
@@ -19,8 +19,11 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
19
19
|
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; }
|
|
20
20
|
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.'); }
|
|
21
21
|
import { LibroService, DocumentCommands } from '@difizen/libro-core';
|
|
22
|
+
import { ConfigurationService } from '@difizen/mana-app';
|
|
23
|
+
import { Disposable, DisposableCollection } from '@difizen/mana-app';
|
|
22
24
|
import { BaseView, inject, LabelProvider, prop, transient, URI as VScodeURI, URIIconReference, useInject, view, ViewInstance, ViewOption, ViewRender, Deferred, URI, CommandRegistry, Emitter } from '@difizen/mana-app';
|
|
23
25
|
import { createRef, forwardRef } from 'react';
|
|
26
|
+
import { LibroConfigAutoSave } from "../config/config.js";
|
|
24
27
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
28
|
export var LibroEditorComponent = /*#__PURE__*/forwardRef(function LibroEditorComponent() {
|
|
26
29
|
var instance = useInject(ViewInstance);
|
|
@@ -35,16 +38,18 @@ export var LibroNavigatableViewFactoryId = 'libro-navigatable-view-factory';
|
|
|
35
38
|
export var LibroNavigatableView = (_dec = transient(), _dec2 = view(LibroNavigatableViewFactoryId), _dec3 = inject(LibroService), _dec4 = inject(CommandRegistry), _dec5 = prop(), _dec6 = prop(), _dec7 = prop(), _dec(_class = _dec2(_class = (_class2 = /*#__PURE__*/function (_BaseView) {
|
|
36
39
|
_inherits(LibroNavigatableView, _BaseView);
|
|
37
40
|
var _super = _createSuper(LibroNavigatableView);
|
|
38
|
-
function LibroNavigatableView(options, labelProvider) {
|
|
41
|
+
function LibroNavigatableView(options, labelProvider, configurationService) {
|
|
39
42
|
var _this;
|
|
40
43
|
_classCallCheck(this, LibroNavigatableView);
|
|
41
44
|
_this = _super.call(this);
|
|
42
45
|
_initializerDefineProperty(_this, "libroService", _descriptor, _assertThisInitialized(_this));
|
|
43
46
|
_initializerDefineProperty(_this, "commandRegistry", _descriptor2, _assertThisInitialized(_this));
|
|
47
|
+
_this.toDisposeOnAutoSave = new DisposableCollection();
|
|
44
48
|
_this.view = LibroEditorComponent;
|
|
45
49
|
_this.codeRef = /*#__PURE__*/createRef();
|
|
46
50
|
_initializerDefineProperty(_this, "filePath", _descriptor3, _assertThisInitialized(_this));
|
|
47
51
|
_this.dirtyEmitter = new Emitter();
|
|
52
|
+
_this.autoSaveDelay = 1000;
|
|
48
53
|
_this.autoSave = 'off';
|
|
49
54
|
_initializerDefineProperty(_this, "dirty", _descriptor4, _assertThisInitialized(_this));
|
|
50
55
|
_initializerDefineProperty(_this, "libroView", _descriptor5, _assertThisInitialized(_this));
|
|
@@ -62,8 +67,20 @@ export var LibroNavigatableView = (_dec = transient(), _dec2 = view(LibroNavigat
|
|
|
62
67
|
className: iconClass
|
|
63
68
|
});
|
|
64
69
|
_this.title.label = uri.displayName;
|
|
70
|
+
configurationService.get(LibroConfigAutoSave).then(function (value) {
|
|
71
|
+
if (value) {
|
|
72
|
+
_this.autoSave = 'on';
|
|
73
|
+
return;
|
|
74
|
+
} else {
|
|
75
|
+
_this.autoSave = 'off';
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
}).catch(function () {
|
|
79
|
+
//
|
|
80
|
+
});
|
|
65
81
|
return _this;
|
|
66
82
|
}
|
|
83
|
+
LibroNavigatableView = inject(ConfigurationService)(LibroNavigatableView, undefined, 2) || LibroNavigatableView;
|
|
67
84
|
LibroNavigatableView = inject(LabelProvider)(LibroNavigatableView, undefined, 1) || LibroNavigatableView;
|
|
68
85
|
LibroNavigatableView = inject(ViewOption)(LibroNavigatableView, undefined, 0) || LibroNavigatableView;
|
|
69
86
|
_createClass(LibroNavigatableView, [{
|
|
@@ -95,11 +112,26 @@ export var LibroNavigatableView = (_dec = transient(), _dec2 = view(LibroNavigat
|
|
|
95
112
|
}
|
|
96
113
|
return onViewMount;
|
|
97
114
|
}()
|
|
115
|
+
}, {
|
|
116
|
+
key: "doAutoSave",
|
|
117
|
+
value: function doAutoSave() {
|
|
118
|
+
var _this2 = this;
|
|
119
|
+
this.toDisposeOnAutoSave.dispose();
|
|
120
|
+
var handle = window.setTimeout(function () {
|
|
121
|
+
_this2.save();
|
|
122
|
+
if (_this2.libroView) {
|
|
123
|
+
_this2.libroView.model.dirty = false;
|
|
124
|
+
}
|
|
125
|
+
}, this.autoSaveDelay);
|
|
126
|
+
this.toDisposeOnAutoSave.push(Disposable.create(function () {
|
|
127
|
+
return window.clearTimeout(handle);
|
|
128
|
+
}));
|
|
129
|
+
}
|
|
98
130
|
}, {
|
|
99
131
|
key: "getOrCreateLibroView",
|
|
100
132
|
value: function () {
|
|
101
133
|
var _getOrCreateLibroView = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
102
|
-
var
|
|
134
|
+
var _this3 = this;
|
|
103
135
|
var libroView;
|
|
104
136
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
105
137
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -119,12 +151,15 @@ export var LibroNavigatableView = (_dec = transient(), _dec2 = view(LibroNavigat
|
|
|
119
151
|
case 5:
|
|
120
152
|
this.libroView = libroView;
|
|
121
153
|
this.libroView.model.onContentChanged(function () {
|
|
122
|
-
|
|
123
|
-
|
|
154
|
+
_this3.dirty = true;
|
|
155
|
+
_this3.dirtyEmitter.fire();
|
|
156
|
+
if (_this3.autoSave === 'on') {
|
|
157
|
+
_this3.doAutoSave();
|
|
158
|
+
}
|
|
124
159
|
});
|
|
125
160
|
this.libroView.onSave(function () {
|
|
126
|
-
|
|
127
|
-
|
|
161
|
+
_this3.dirty = false;
|
|
162
|
+
_this3.dirtyEmitter.fire();
|
|
128
163
|
});
|
|
129
164
|
_context2.next = 10;
|
|
130
165
|
return this.libroView.initialized;
|
|
@@ -28,7 +28,7 @@ function _applyDecoratedDescriptor(target, property, decorators, descriptor, con
|
|
|
28
28
|
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.'); }
|
|
29
29
|
import { ConfigurationService, inject } from '@difizen/mana-app';
|
|
30
30
|
import { NavigatableViewOpenHandler, OpenHandler, singleton, Priority } from '@difizen/mana-app';
|
|
31
|
-
import { LibroJupyterConfiguration } from "../
|
|
31
|
+
import { LibroJupyterConfiguration } from "../config/index.js";
|
|
32
32
|
import { LibroNavigatableViewFactoryId } from "./navigatable-view.js";
|
|
33
33
|
export var LibroJupyterOpenHandler = (_dec = singleton({
|
|
34
34
|
contrib: OpenHandler
|
package/es/index.d.ts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
+
export * from '@difizen/libro-code-cell';
|
|
2
|
+
export * from '@difizen/libro-code-editor';
|
|
3
|
+
export * from '@difizen/libro-common';
|
|
1
4
|
export * from '@difizen/libro-core';
|
|
5
|
+
export * from '@difizen/libro-cofine-editor';
|
|
2
6
|
export * from '@difizen/libro-kernel';
|
|
3
|
-
export * from '@difizen/libro-
|
|
7
|
+
export * from '@difizen/libro-l10n';
|
|
8
|
+
export * from '@difizen/libro-lsp';
|
|
9
|
+
export * from '@difizen/libro-markdown-cell';
|
|
4
10
|
export * from '@difizen/libro-output';
|
|
5
|
-
export * from '@difizen/libro-
|
|
6
|
-
export * from '@difizen/libro-codemirror
|
|
11
|
+
export * from '@difizen/libro-raw-cell';
|
|
12
|
+
export * from '@difizen/libro-codemirror';
|
|
7
13
|
export * from '@difizen/libro-rendermime';
|
|
8
|
-
export * from '@difizen/libro-l10n';
|
|
9
14
|
export * from '@difizen/libro-search';
|
|
10
|
-
export * from '@difizen/libro-search-
|
|
11
|
-
export * from '@difizen/libro-code-editor';
|
|
12
|
-
export * from '@difizen/libro-codemirror';
|
|
13
|
-
export * from '@difizen/libro-codemirror-raw-cell';
|
|
14
|
-
export * from './module.js';
|
|
15
|
+
export * from '@difizen/libro-search-code-cell';
|
|
15
16
|
export * from './add-between-cell/index.js';
|
|
16
17
|
export * from './cell/index.js';
|
|
17
18
|
export * from './command/index.js';
|
|
@@ -19,15 +20,16 @@ export * from './components/index.js';
|
|
|
19
20
|
export * from './config/index.js';
|
|
20
21
|
export * from './contents/index.js';
|
|
21
22
|
export * from './keybind-instructions/index.js';
|
|
23
|
+
export * from './libro-jupyter-file-service.js';
|
|
24
|
+
export * from './libro-jupyter-model.js';
|
|
25
|
+
export * from './libro-jupyter-protocol.js';
|
|
26
|
+
export * from './libro-jupyter-server-launch-manager.js';
|
|
27
|
+
export * from './module.js';
|
|
22
28
|
export * from './output/index.js';
|
|
23
29
|
export * from './rendermime/index.js';
|
|
24
30
|
export * from './theme/index.js';
|
|
25
31
|
export * from './toolbar/index.js';
|
|
26
|
-
export * from './libro-jupyter-protocol.js';
|
|
27
|
-
export * from './libro-jupyter-model.js';
|
|
28
|
-
export * from './libro-jupyter-view.js';
|
|
29
|
-
export * from './libro-jupyter-file-service.js';
|
|
30
|
-
export * from './libro-jupyter-server-launch-manager.js';
|
|
31
32
|
export * from './file/index.js';
|
|
32
|
-
export * from './
|
|
33
|
+
export * from './libro-jupyter-view.js';
|
|
34
|
+
export * from './config/index.js';
|
|
33
35
|
//# sourceMappingURL=index.d.ts.map
|
package/es/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0CAA0C,CAAC;AACzD,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC"}
|
package/es/index.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
+
export * from '@difizen/libro-code-cell';
|
|
2
|
+
export * from '@difizen/libro-code-editor';
|
|
3
|
+
export * from '@difizen/libro-common';
|
|
1
4
|
export * from '@difizen/libro-core';
|
|
5
|
+
export * from '@difizen/libro-cofine-editor';
|
|
2
6
|
export * from '@difizen/libro-kernel';
|
|
3
|
-
export * from '@difizen/libro-
|
|
7
|
+
export * from '@difizen/libro-l10n';
|
|
8
|
+
export * from '@difizen/libro-lsp';
|
|
9
|
+
export * from '@difizen/libro-markdown-cell';
|
|
4
10
|
export * from '@difizen/libro-output';
|
|
5
|
-
export * from '@difizen/libro-
|
|
6
|
-
export * from '@difizen/libro-codemirror
|
|
11
|
+
export * from '@difizen/libro-raw-cell';
|
|
12
|
+
export * from '@difizen/libro-codemirror';
|
|
7
13
|
export * from '@difizen/libro-rendermime';
|
|
8
|
-
export * from '@difizen/libro-l10n';
|
|
9
14
|
export * from '@difizen/libro-search';
|
|
10
|
-
export * from '@difizen/libro-search-
|
|
11
|
-
export * from '@difizen/libro-code-editor';
|
|
12
|
-
export * from '@difizen/libro-codemirror';
|
|
13
|
-
export * from '@difizen/libro-codemirror-raw-cell';
|
|
14
|
-
export * from "./module.js";
|
|
15
|
+
export * from '@difizen/libro-search-code-cell';
|
|
15
16
|
export * from "./add-between-cell/index.js";
|
|
16
17
|
export * from "./cell/index.js";
|
|
17
18
|
export * from "./command/index.js";
|
|
@@ -19,14 +20,15 @@ export * from "./components/index.js";
|
|
|
19
20
|
export * from "./config/index.js";
|
|
20
21
|
export * from "./contents/index.js";
|
|
21
22
|
export * from "./keybind-instructions/index.js";
|
|
23
|
+
export * from "./libro-jupyter-file-service.js";
|
|
24
|
+
export * from "./libro-jupyter-model.js";
|
|
25
|
+
export * from "./libro-jupyter-protocol.js";
|
|
26
|
+
export * from "./libro-jupyter-server-launch-manager.js";
|
|
27
|
+
export * from "./module.js";
|
|
22
28
|
export * from "./output/index.js";
|
|
23
29
|
export * from "./rendermime/index.js";
|
|
24
30
|
export * from "./theme/index.js";
|
|
25
31
|
export * from "./toolbar/index.js";
|
|
26
|
-
export * from "./libro-jupyter-protocol.js";
|
|
27
|
-
export * from "./libro-jupyter-model.js";
|
|
28
|
-
export * from "./libro-jupyter-view.js";
|
|
29
|
-
export * from "./libro-jupyter-file-service.js";
|
|
30
|
-
export * from "./libro-jupyter-server-launch-manager.js";
|
|
31
32
|
export * from "./file/index.js";
|
|
32
|
-
export * from "./
|
|
33
|
+
export * from "./libro-jupyter-view.js";
|
|
34
|
+
export * from "./config/index.js";
|
|
@@ -86,9 +86,9 @@
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
.libro-keybind-instructions-icon {
|
|
89
|
-
display: flex;
|
|
90
89
|
width: 18px;
|
|
91
90
|
height: 18px;
|
|
91
|
+
line-height: 22px;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
.libro-edit-mode-keybind-instructions-table {
|
|
@@ -126,8 +126,8 @@
|
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
.libro-keybind-search-match {
|
|
129
|
-
background-color: var(--mana-libro-search-match-background-color);
|
|
130
129
|
color: rgba(0, 10, 26, 89%);
|
|
130
|
+
background-color: var(--mana-libro-search-match-background-color);
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
.libro-command-mode-keybind-instructions-table,
|
|
@@ -33,7 +33,7 @@ export var KeybindInstructionsContribution = (_dec = singleton({
|
|
|
33
33
|
value: function registerCommands(command) {
|
|
34
34
|
this.libroCommand.registerLibroCommand(command, KeybindInstructionsCommand, {
|
|
35
35
|
execute: function () {
|
|
36
|
-
var _execute = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(
|
|
36
|
+
var _execute = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(cell, libro) {
|
|
37
37
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
38
38
|
while (1) switch (_context.prev = _context.next) {
|
|
39
39
|
case 0:
|
|
@@ -53,7 +53,7 @@ export var KeybindInstructionsContribution = (_dec = singleton({
|
|
|
53
53
|
}
|
|
54
54
|
return execute;
|
|
55
55
|
}(),
|
|
56
|
-
isVisible: function isVisible(
|
|
56
|
+
isVisible: function isVisible(cell, libro, path) {
|
|
57
57
|
return path === LibroToolbarArea.HeaderRight;
|
|
58
58
|
}
|
|
59
59
|
});
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { LibroModel } from '@difizen/libro-core';
|
|
2
|
-
import type {
|
|
3
|
-
import {
|
|
1
|
+
import { LibroModel, VirtualizedManagerHelper } from '@difizen/libro-core';
|
|
2
|
+
import type { VirtualizedManager } from '@difizen/libro-core';
|
|
3
|
+
import { ContentsManager, ExecutableNotebookModel, LibroKernelConnectionManager, ServerConnection, ServerManager } from '@difizen/libro-kernel';
|
|
4
|
+
import type { IKernelConnection } from '@difizen/libro-kernel';
|
|
5
|
+
import type { IContentsCheckpointModel, IContentsModel } from '@difizen/libro-kernel';
|
|
4
6
|
import { ModalService } from '@difizen/mana-app';
|
|
5
7
|
import { Deferred } from '@difizen/mana-app';
|
|
6
8
|
import { LibroFileService } from './libro-jupyter-protocol.js';
|
|
7
9
|
type IModel = IContentsModel;
|
|
8
10
|
export declare class LibroJupyterModel extends LibroModel implements ExecutableNotebookModel {
|
|
11
|
+
static is: (arg: Record<any, any> | undefined) => arg is LibroJupyterModel;
|
|
9
12
|
protected libroFileService: LibroFileService;
|
|
10
13
|
get fileService(): LibroFileService;
|
|
11
14
|
currentFileContents: IModel;
|
|
@@ -18,7 +21,8 @@ export declare class LibroJupyterModel extends LibroModel implements ExecutableN
|
|
|
18
21
|
protected serverConnection: ServerConnection;
|
|
19
22
|
protected readonly contentsManager: ContentsManager;
|
|
20
23
|
protected readonly modalService: ModalService;
|
|
21
|
-
|
|
24
|
+
protected virtualizedManager: VirtualizedManager;
|
|
25
|
+
constructor(libroFileService: LibroFileService, kernelConnectionManager: LibroKernelConnectionManager, serverManager: ServerManager, serverConnection: ServerConnection, contentsManager: ContentsManager, modalService: ModalService, virtualizedManagerHelper: VirtualizedManagerHelper);
|
|
22
26
|
get isKernelIdle(): boolean | undefined;
|
|
23
27
|
get kernelSelection(): string;
|
|
24
28
|
set kernelSelection(value: string);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"libro-jupyter-model.d.ts","sourceRoot":"","sources":["../src/libro-jupyter-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"libro-jupyter-model.d.ts","sourceRoot":"","sources":["../src/libro-jupyter-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,4BAA4B,EAC5B,gBAAgB,EAChB,aAAa,EACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACtF,OAAO,EAAa,YAAY,EAAQ,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI7C,OAAO,EAEL,gBAAgB,EACjB,MAAM,6BAA6B,CAAC;AAIrC,KAAK,MAAM,GAAG,cAAc,CAAC;AAC7B,qBACa,iBAAkB,SAAQ,UAAW,YAAW,uBAAuB;IAClF,MAAM,CAAC,EAAE,QAAS,OAAO,GAAG,EAAE,GAAG,CAAC,GAAG,SAAS,8BAS5C;IAEF,SAAS,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAE7C,IAAI,WAAW,qBAEd;IAGD,mBAAmB,EAAE,MAAM,CAAC;IAE5B,SAAS,CAAC,YAAY,EAAE,MAAM,CAAC;IAE/B,SAAS,CAAC,YAAY,EAAE,MAAM,CAAC;IAE/B,gBAAgB,CAAC,EAAE,iBAAiB,CAAC;IAGrC,UAAU,UAAQ;IAElB,SAAS,CAAC,uBAAuB,EAAE,4BAA4B,CAAC;IAChE,SAAS,CAAC,aAAa,EAAE,aAAa,CAAC;IACvC,SAAS,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAC7C,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IACpD,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IAC9C,SAAS,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;gBAGrB,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;IAcpD,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;IAI3C,qBAAqB;IA2BN,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC;IAuD1C,MAAM;IAcT,SAAS;IAQT,QAAQ;IAUR,OAAO;IAkBP,SAAS;IAQf,eAAe;CAiBhB"}
|