@difizen/libro-core 0.1.0 → 0.1.2
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-cell/index.less +1 -1
- package/es/add-cell/libro-add-cell-slot-contribution.d.ts +1 -2
- package/es/add-cell/libro-add-cell-slot-contribution.d.ts.map +1 -1
- package/es/add-cell/libro-add-cell-slot-contribution.js +12 -6
- package/es/add-cell/libro-add-cell-view.d.ts +4 -4
- package/es/add-cell/libro-add-cell-view.d.ts.map +1 -1
- package/es/add-cell/libro-add-cell-view.js +4 -6
- package/es/cell/libro-cell-contribution.d.ts +1 -2
- package/es/cell/libro-cell-contribution.d.ts.map +1 -1
- package/es/cell/libro-cell-contribution.js +14 -8
- package/es/cell/libro-cell-model.d.ts +9 -0
- package/es/cell/libro-cell-model.d.ts.map +1 -1
- package/es/cell/libro-cell-model.js +53 -11
- package/es/cell/libro-cell-protocol.d.ts +2 -0
- package/es/cell/libro-cell-protocol.d.ts.map +1 -1
- package/es/cell/libro-cell-view.d.ts +39 -3
- package/es/cell/libro-cell-view.d.ts.map +1 -1
- package/es/cell/libro-cell-view.js +54 -24
- package/es/cell/libro-edit-cell-view.d.ts +6 -12
- package/es/cell/libro-edit-cell-view.d.ts.map +1 -1
- package/es/cell/libro-edit-cell-view.js +9 -4
- package/es/cell/libro-executable-cell-view.d.ts +2 -0
- package/es/cell/libro-executable-cell-view.d.ts.map +1 -1
- package/es/cell/libro-executable-cell-view.js +4 -1
- package/es/collapse-service.d.ts +1 -1
- package/es/collapse-service.d.ts.map +1 -1
- package/es/collapse-service.js +1 -1
- package/es/command/document-commands.d.ts +5 -0
- package/es/command/document-commands.d.ts.map +1 -0
- package/es/command/document-commands.js +3 -2
- package/es/command/kernel-command.d.ts +5 -0
- package/es/command/kernel-command.d.ts.map +1 -0
- package/es/command/kernel-command.js +3 -0
- package/es/command/libro-command-contribution.d.ts +0 -1
- package/es/command/libro-command-contribution.d.ts.map +1 -1
- package/es/command/libro-command-contribution.js +179 -129
- package/es/command/libro-command-register.d.ts +0 -1
- package/es/command/libro-command-register.d.ts.map +1 -1
- package/es/command/libro-command-register.js +13 -7
- package/es/command/notebook-commands.d.ts +6 -0
- package/es/command/notebook-commands.d.ts.map +1 -0
- package/es/command/notebook-commands.js +17 -4
- package/es/components/cell-protocol.d.ts +5 -5
- package/es/components/cell-protocol.d.ts.map +1 -1
- package/es/components/dnd-cell-item-render.d.ts +6 -2
- package/es/components/dnd-cell-item-render.d.ts.map +1 -1
- package/es/components/dnd-cell-item-render.js +194 -89
- package/es/components/dnd-component/custom-drag-layer.d.ts +1 -1
- package/es/components/dnd-component/custom-drag-layer.d.ts.map +1 -1
- package/es/components/dnd-component/custom-drag-layer.js +3 -4
- package/es/components/dnd-component/default-dnd-content.d.ts +2 -1
- package/es/components/dnd-component/default-dnd-content.d.ts.map +1 -1
- package/es/components/dnd-component/default-dnd-content.js +100 -44
- package/es/components/dnd-component/dnd-context.js +1 -1
- package/es/components/dnd-component/dnd-list.d.ts +9 -5
- package/es/components/dnd-component/dnd-list.d.ts.map +1 -1
- package/es/components/dnd-component/dnd-list.js +93 -26
- package/es/components/dnd-component/index.d.ts +1 -1
- package/es/components/dnd-component/index.d.ts.map +1 -1
- package/es/components/dnd-component/index.js +2 -2
- package/es/components/dnd-component/index.less +8 -0
- package/es/components/dnd-component/overscanIndices-getter.d.ts +22 -0
- package/es/components/dnd-component/overscanIndices-getter.d.ts.map +1 -0
- package/es/components/dnd-component/overscanIndices-getter.js +58 -0
- package/es/components/dnd-component/virtualized-manager.d.ts +19 -0
- package/es/components/dnd-component/virtualized-manager.d.ts.map +1 -0
- package/es/components/dnd-component/virtualized-manager.js +60 -0
- package/es/components/index.d.ts +2 -2
- package/es/components/index.d.ts.map +1 -1
- package/es/components/index.js +2 -2
- package/es/components/libro-virtualized-render.d.ts +15 -0
- package/es/components/libro-virtualized-render.d.ts.map +1 -0
- package/es/components/libro-virtualized-render.js +174 -0
- package/es/content/index.d.ts +1 -0
- package/es/content/index.d.ts.map +1 -1
- package/es/content/index.js +2 -1
- package/es/content/libro-content-contribution.d.ts +2 -2
- package/es/content/libro-content-contribution.d.ts.map +1 -1
- package/es/content/libro-content-contribution.js +2 -3
- package/es/content/libro-content-module.d.ts.map +1 -1
- package/es/content/libro-content-module.js +3 -2
- package/es/content/libro-content-protocol.d.ts +5 -0
- package/es/content/libro-content-protocol.d.ts.map +1 -1
- package/es/content/libro-content-protocol.js +2 -1
- package/es/content/libro-content-service.d.ts +6 -4
- package/es/content/libro-content-service.d.ts.map +1 -1
- package/es/content/libro-content-service.js +36 -8
- package/es/content/libro-save-content-contribution.d.ts +6 -0
- package/es/content/libro-save-content-contribution.d.ts.map +1 -0
- package/es/content/libro-save-content-contribution.js +27 -0
- package/es/formatter/index.d.ts +6 -0
- package/es/formatter/index.d.ts.map +1 -0
- package/es/formatter/index.js +5 -0
- package/es/formatter/libro-formatter-json-contribution.d.ts +18 -0
- package/es/formatter/libro-formatter-json-contribution.d.ts.map +1 -0
- package/es/formatter/libro-formatter-json-contribution.js +41 -0
- package/es/formatter/libro-formatter-manager.d.ts +16 -0
- package/es/formatter/libro-formatter-manager.d.ts.map +1 -0
- package/es/formatter/libro-formatter-manager.js +86 -0
- package/es/formatter/libro-formatter-module.d.ts +3 -0
- package/es/formatter/libro-formatter-module.d.ts.map +1 -0
- package/es/formatter/libro-formatter-module.js +7 -0
- package/es/formatter/libro-formatter-protocol.d.ts +37 -0
- package/es/formatter/libro-formatter-protocol.d.ts.map +1 -0
- package/es/formatter/libro-formatter-protocol.js +18 -0
- package/es/formatter/libro-formatter-string-contribution.d.ts +18 -0
- package/es/formatter/libro-formatter-string-contribution.d.ts.map +1 -0
- package/es/formatter/libro-formatter-string-contribution.js +41 -0
- package/es/formatter/libro-formatter-trans-default-contribution.d.ts +7 -0
- package/es/formatter/libro-formatter-trans-default-contribution.d.ts.map +1 -0
- package/es/formatter/libro-formatter-trans-default-contribution.js +19 -0
- package/es/index.d.ts +5 -1
- package/es/index.d.ts.map +1 -1
- package/es/index.js +6 -2
- package/es/index.less +135 -58
- package/es/libro-context-key.d.ts.map +1 -1
- package/es/libro-keybind-registry.d.ts +5 -0
- package/es/libro-keybind-registry.d.ts.map +1 -0
- package/es/libro-model.d.ts +13 -2
- package/es/libro-model.d.ts.map +1 -1
- package/es/libro-model.js +149 -70
- package/es/libro-protocol.d.ts +44 -2
- package/es/libro-protocol.d.ts.map +1 -1
- package/es/libro-protocol.js +16 -3
- package/es/libro-service.d.ts +1 -1
- package/es/libro-service.d.ts.map +1 -1
- package/es/libro-service.js +29 -20
- package/es/libro-setting-contribution.d.ts +5 -0
- package/es/libro-setting-contribution.d.ts.map +1 -0
- package/es/{configuration/libro-configuration-contribution.js → libro-setting-contribution.js} +8 -9
- package/es/libro-setting.d.ts +11 -0
- package/es/libro-setting.d.ts.map +1 -0
- package/es/{configuration/libro-configuration.js → libro-setting.js} +17 -7
- package/es/libro-view.d.ts +21 -8
- package/es/libro-view.d.ts.map +1 -1
- package/es/libro-view.js +477 -338
- package/es/material-from-designer.d.ts +30 -0
- package/es/material-from-designer.d.ts.map +1 -0
- package/es/material-from-designer.js +112 -1
- package/es/module.d.ts.map +1 -1
- package/es/module.js +20 -5
- package/es/output/output-area.d.ts +3 -4
- package/es/output/output-area.d.ts.map +1 -1
- package/es/output/output-area.js +23 -16
- package/es/output/output-contribution.d.ts +0 -1
- package/es/output/output-contribution.d.ts.map +1 -1
- package/es/output/output-contribution.js +14 -9
- package/es/output/output-model.d.ts +2 -2
- package/es/output/output-model.d.ts.map +1 -1
- package/es/output/output-model.js +2 -2
- package/es/output/output-protocol.d.ts.map +1 -1
- package/es/output/output-protocol.js +0 -2
- package/es/settings/index.d.ts +5 -0
- package/es/settings/index.d.ts.map +1 -0
- package/es/settings/index.js +4 -0
- package/es/settings/index.less +3 -0
- package/es/settings/module.d.ts +3 -0
- package/es/settings/module.d.ts.map +1 -0
- package/es/settings/module.js +4 -0
- package/es/settings/setting-editor/configuration-panel-view.d.ts +13 -0
- package/es/settings/setting-editor/configuration-panel-view.d.ts.map +1 -0
- package/es/settings/setting-editor/configuration-panel-view.js +115 -0
- package/es/settings/setting-editor/configuration-render-contribution.d.ts +6 -0
- package/es/settings/setting-editor/configuration-render-contribution.d.ts.map +1 -0
- package/es/settings/setting-editor/configuration-render-contribution.js +77 -0
- package/es/settings/setting-editor/default-node-render.d.ts +9 -0
- package/es/settings/setting-editor/default-node-render.d.ts.map +1 -0
- package/es/settings/setting-editor/default-node-render.js +79 -0
- package/es/settings/setting-editor/index.d.ts +7 -0
- package/es/settings/setting-editor/index.d.ts.map +1 -0
- package/es/settings/setting-editor/index.js +6 -0
- package/es/settings/setting-editor/index.less +12 -0
- package/es/settings/setting-editor/module.d.ts +3 -0
- package/es/settings/setting-editor/module.d.ts.map +1 -0
- package/es/settings/setting-editor/module.js +7 -0
- package/es/settings/setting-editor/setting-editor-view.d.ts +15 -0
- package/es/settings/setting-editor/setting-editor-view.d.ts.map +1 -0
- package/es/settings/setting-editor/setting-editor-view.js +169 -0
- package/es/settings/setting-editor/setting-tree-service.d.ts +9 -0
- package/es/settings/setting-editor/setting-tree-service.d.ts.map +1 -0
- package/es/settings/setting-editor/setting-tree-service.js +118 -0
- package/es/settings/setting-editor/setting-tree-view.d.ts +19 -0
- package/es/settings/setting-editor/setting-tree-view.d.ts.map +1 -0
- package/es/settings/setting-editor/setting-tree-view.js +88 -0
- package/es/settings/settings-contribution.d.ts +7 -0
- package/es/settings/settings-contribution.d.ts.map +1 -0
- package/es/settings/settings-contribution.js +36 -0
- package/es/settings/settings-modal.d.ts +5 -0
- package/es/settings/settings-modal.d.ts.map +1 -0
- package/es/settings/settings-modal.js +53 -0
- package/es/settings/settings-modal.less +3 -0
- package/es/settings/settings-protocol.d.ts +4 -0
- package/es/settings/settings-protocol.d.ts.map +1 -0
- package/es/settings/settings-protocol.js +5 -0
- package/es/slot/libro-slot-manager.d.ts +2 -2
- package/es/slot/libro-slot-manager.d.ts.map +1 -1
- package/es/slot/libro-slot-manager.js +14 -8
- package/es/slot/libro-slot-view.d.ts +3 -3
- package/es/slot/libro-slot-view.d.ts.map +1 -1
- package/es/slot/libro-slot-view.js +2 -2
- package/es/theme/libro-color-registry.d.ts +6 -0
- package/es/theme/libro-color-registry.d.ts.map +1 -0
- package/es/theme/libro-color-registry.js +7 -0
- package/es/toolbar/all-outputs-scroll-icon.d.ts +3 -0
- package/es/toolbar/all-outputs-scroll-icon.d.ts.map +1 -0
- package/es/toolbar/all-outputs-scroll-icon.js +10 -0
- package/es/toolbar/libro-toolbar.d.ts +2 -1
- package/es/toolbar/libro-toolbar.d.ts.map +1 -1
- package/es/toolbar/libro-toolbar.js +44 -8
- package/es/toolbar/restart-clear-outputs-modal.d.ts +1 -2
- package/es/toolbar/restart-clear-outputs-modal.d.ts.map +1 -1
- package/es/toolbar/restart-clear-outputs-modal.js +2 -2
- package/es/toolbar/shutdown-modal.d.ts +1 -2
- package/es/toolbar/shutdown-modal.d.ts.map +1 -1
- package/es/toolbar/shutdown-modal.js +2 -2
- package/es/toolbar/side-toolar-more-select.d.ts.map +1 -1
- package/es/toolbar/side-toolar-more-select.js +2 -2
- package/es/virtualized-manager-helper.d.ts +11 -0
- package/es/virtualized-manager-helper.d.ts.map +1 -0
- package/es/virtualized-manager-helper.js +51 -0
- package/es/virtualized-manager.d.ts +19 -0
- package/es/virtualized-manager.d.ts.map +1 -0
- package/es/virtualized-manager.js +61 -0
- package/package.json +9 -6
- package/src/add-cell/index.less +1 -1
- package/src/add-cell/libro-add-cell-slot-contribution.ts +1 -4
- package/src/add-cell/libro-add-cell-view.tsx +13 -6
- package/src/cell/libro-cell-contribution.ts +2 -6
- package/src/cell/libro-cell-model.ts +57 -4
- package/src/cell/libro-cell-protocol.ts +2 -0
- package/src/cell/libro-cell-view.tsx +21 -9
- package/src/cell/libro-edit-cell-view.tsx +10 -9
- package/src/cell/libro-executable-cell-view.ts +6 -1
- package/src/collapse-service.ts +1 -1
- package/src/command/document-commands.ts +3 -5
- package/src/command/kernel-command.ts +3 -0
- package/src/command/libro-command-contribution.ts +107 -91
- package/src/command/libro-command-register.ts +1 -4
- package/src/command/notebook-commands.ts +16 -3
- package/src/components/cell-protocol.ts +5 -5
- package/src/components/dnd-cell-item-render.tsx +239 -92
- package/src/components/dnd-component/custom-drag-layer.tsx +5 -6
- package/src/components/dnd-component/default-dnd-content.tsx +113 -42
- package/src/components/dnd-component/dnd-context.tsx +1 -1
- package/src/components/dnd-component/dnd-list.tsx +135 -43
- package/src/components/dnd-component/index.less +8 -0
- package/src/components/dnd-component/index.tsx +1 -1
- package/src/components/dnd-component/overscanIndices-getter.ts +92 -0
- package/src/components/dnd-component/virtualized-manager.ts +34 -0
- package/src/components/index.ts +2 -2
- package/src/components/libro-virtualized-render.tsx +178 -0
- package/src/content/index.ts +1 -0
- package/src/content/libro-content-contribution.ts +2 -3
- package/src/content/libro-content-module.ts +11 -3
- package/src/content/libro-content-protocol.ts +6 -0
- package/src/content/libro-content-service.ts +26 -8
- package/src/content/libro-save-content-contribution.ts +12 -0
- package/src/formatter/index.ts +5 -0
- package/src/formatter/libro-formatter-json-contribution.ts +42 -0
- package/src/formatter/libro-formatter-manager.ts +85 -0
- package/src/formatter/libro-formatter-module.ts +19 -0
- package/src/formatter/libro-formatter-protocol.ts +63 -0
- package/src/formatter/libro-formatter-string-contribution.ts +41 -0
- package/src/formatter/libro-formatter-trans-default-contribution.ts +15 -0
- package/src/index.less +135 -58
- package/src/index.tsx +6 -1
- package/src/libro-context-key.ts +3 -3
- package/src/libro-model.ts +87 -23
- package/src/libro-protocol.ts +81 -4
- package/src/libro-service.ts +4 -13
- package/src/{configuration/libro-configuration-contribution.ts → libro-setting-contribution.ts} +7 -8
- package/src/{configuration/libro-configuration.ts → libro-setting.ts} +18 -7
- package/src/libro-view.tsx +273 -141
- package/src/material-from-designer.tsx +93 -1
- package/src/module.ts +29 -7
- package/src/output/output-area.tsx +18 -12
- package/src/output/output-contribution.ts +2 -6
- package/src/output/output-model.tsx +3 -3
- package/src/output/output-protocol.ts +0 -1
- package/src/settings/index.less +3 -0
- package/src/settings/index.ts +4 -0
- package/src/settings/module.ts +8 -0
- package/src/settings/setting-editor/configuration-panel-view.tsx +89 -0
- package/src/settings/setting-editor/configuration-render-contribution.ts +81 -0
- package/src/settings/setting-editor/default-node-render.tsx +65 -0
- package/src/settings/setting-editor/index.less +12 -0
- package/src/settings/setting-editor/index.ts +6 -0
- package/src/settings/setting-editor/module.ts +17 -0
- package/src/settings/setting-editor/setting-editor-view.tsx +93 -0
- package/src/settings/setting-editor/setting-tree-service.ts +82 -0
- package/src/settings/setting-editor/setting-tree-view.tsx +95 -0
- package/src/settings/settings-contribution.tsx +24 -0
- package/src/settings/settings-modal.less +3 -0
- package/src/settings/settings-modal.tsx +50 -0
- package/src/settings/settings-protocol.ts +7 -0
- package/src/slot/libro-slot-manager.ts +1 -3
- package/src/slot/libro-slot-view.tsx +2 -5
- package/src/theme/libro-color-registry.ts +6 -0
- package/src/toolbar/all-outputs-scroll-icon.tsx +19 -0
- package/src/toolbar/libro-toolbar.tsx +30 -5
- package/src/toolbar/restart-clear-outputs-modal.tsx +3 -3
- package/src/toolbar/shutdown-modal.tsx +3 -3
- package/src/toolbar/side-toolar-more-select.tsx +2 -1
- package/src/virtualized-manager-helper.ts +29 -0
- package/src/virtualized-manager.ts +34 -0
package/es/libro-protocol.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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); }
|
|
1
2
|
/* eslint-disable @typescript-eslint/unified-signatures */
|
|
2
3
|
|
|
3
|
-
import { View } from '@difizen/mana-app';
|
|
4
4
|
export var LibroContextKeys = {
|
|
5
5
|
active: 'active',
|
|
6
6
|
focus: 'focus',
|
|
@@ -19,11 +19,21 @@ export var NotebookOption = Symbol('NotebookOption');
|
|
|
19
19
|
* 默认可 json 序列化
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
+
export var PerformaceStatisticOption = Symbol('PerformaceStatisticOption');
|
|
22
23
|
export var ModelFactory = Symbol('ModelFactory');
|
|
23
24
|
export var NotebookModel = Symbol('NotebookModel');
|
|
25
|
+
export var EditorStatus = /*#__PURE__*/function (EditorStatus) {
|
|
26
|
+
EditorStatus["NOTLOADED"] = "not loaded";
|
|
27
|
+
EditorStatus["LOADING"] = "loading";
|
|
28
|
+
EditorStatus["LOADED"] = "loaded";
|
|
29
|
+
return EditorStatus;
|
|
30
|
+
}({});
|
|
24
31
|
export var notebookViewFactoryId = 'notebook-view-factory';
|
|
32
|
+
function isView(data) {
|
|
33
|
+
return !!data && _typeof(data) === 'object' && 'id' in data && 'view' in data && typeof data['view'] === 'function';
|
|
34
|
+
}
|
|
25
35
|
export function isCellView(view) {
|
|
26
|
-
return
|
|
36
|
+
return isView(view) && 'model' in view && 'parent' in view && 'run' in view && 'toJSON' in view;
|
|
27
37
|
}
|
|
28
38
|
export var CellOptions = Symbol('CellOptions');
|
|
29
39
|
export var CellViewOptions = Symbol('CellViewOptions');
|
|
@@ -31,4 +41,7 @@ export var NotebookService = Symbol('NotebookService');
|
|
|
31
41
|
//#region Protocol for drag & drop
|
|
32
42
|
export var DragAreaKey = Symbol('DragAreaKey');
|
|
33
43
|
|
|
34
|
-
//#endregion
|
|
44
|
+
//#endregion
|
|
45
|
+
|
|
46
|
+
export var VirtualizedManagerOption = Symbol('VirtualizedManagerOption');
|
|
47
|
+
export var VirtualizedManagerOptionFactory = Symbol('VirtualizedManagerOptionFactory');
|
package/es/libro-service.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export declare class LibroService implements NotebookService {
|
|
|
9
9
|
protected libroViewTracker: LibroViewTracker;
|
|
10
10
|
protected themeService: ThemeService;
|
|
11
11
|
themeMode: string;
|
|
12
|
-
constructor(themeService: ThemeService
|
|
12
|
+
constructor(themeService: ThemeService);
|
|
13
13
|
protected _active?: NotebookView;
|
|
14
14
|
protected onActiveChangedEmitter: Emitter<NotebookView | undefined>;
|
|
15
15
|
get onActiveChanged(): import("@difizen/mana-app").Event<import("./libro-view.js").LibroView | undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"libro-service.d.ts","sourceRoot":"","sources":["../src/libro-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAI9D,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAEL,YAAY,EACZ,eAAe,EAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,qBACa,YAAa,YAAW,eAAe;
|
|
1
|
+
{"version":3,"file":"libro-service.d.ts","sourceRoot":"","sources":["../src/libro-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAI9D,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAEL,YAAY,EACZ,eAAe,EAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,qBACa,YAAa,YAAW,eAAe;IAC5B,SAAS,CAAC,iBAAiB,EAAE,YAAY,CAAC;IAC3C,SAAS,CAAC,WAAW,EAAE,WAAW,CAAC;IAC9B,SAAS,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IACvE,SAAS,CAAC,YAAY,EAAE,YAAY,CAAC;IAErC,SAAS,EAAE,MAAM,CAAC;gBACgB,YAAY,EAAE,YAAY;IAQpD,SAAS,CAAC,OAAO,CAAC,EAAE,YAAY,CAAC;IACzC,SAAS,CAAC,sBAAsB,EAAE,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAAiB;IACpF,IAAI,eAAe,uFAElB;IACD,IAAI,MAAM,IAAI,YAAY,GAAG,SAAS,CAErC;IACD,IAAI,MAAM,CAAC,KAAK,EAAE,YAAY,GAAG,SAAS,EAGzC;IAEO,SAAS,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC;IACxC,SAAS,CAAC,qBAAqB,EAAE,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAAiB;IACnF,IAAI,cAAc,uFAEjB;IAED,SAAS,CAAC,4BAA4B,EAAE,OAAO,CAAC,YAAY,CAAC,CAAiB;IAC9E,IAAI,qBAAqB,2EAExB;IAED,IAAI,KAAK,IAAI,YAAY,GAAG,SAAS,CAEpC;IACD,IAAI,KAAK,CAAC,KAAK,EAAE,YAAY,GAAG,SAAS,EAGxC;IAED,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED,YAAY,IAAI,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC;IAIzC,wBAAwB,CAAC,QAAQ,EAAE,YAAY;IAM/C,SAAS,CAAC,SAAS,UAAS;IAE5B,gBAAgB,CAAC,OAAO,EAAE,cAAc;IAWlC,eAAe,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC;IAerE,SAAS,CAAC,IAAI,CAAC,EAAE,YAAY,GAAG,IAAI;IAKpC,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI;CAGrC"}
|
package/es/libro-service.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, _descriptor4;
|
|
2
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7;
|
|
3
3
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
4
4
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
5
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -22,33 +22,27 @@ import { notebookViewFactoryId, ModelFactory, NotebookService } from "./libro-pr
|
|
|
22
22
|
import { LibroViewTracker } from "./libro-view-tracker.js";
|
|
23
23
|
export var LibroService = (_dec = singleton({
|
|
24
24
|
contrib: NotebookService
|
|
25
|
-
}), _dec2 =
|
|
26
|
-
function LibroService(themeService
|
|
25
|
+
}), _dec2 = inject(ModelFactory), _dec3 = inject(ViewManager), _dec4 = inject(LibroViewTracker), _dec5 = prop(), _dec6 = prop(), _dec7 = prop(), _dec8 = prop(), _dec(_class = (_class2 = /*#__PURE__*/function () {
|
|
26
|
+
function LibroService(themeService) {
|
|
27
27
|
var _this = this;
|
|
28
28
|
_classCallCheck(this, LibroService);
|
|
29
|
-
this
|
|
30
|
-
this
|
|
31
|
-
this
|
|
29
|
+
_initializerDefineProperty(this, "libroModelFactory", _descriptor, this);
|
|
30
|
+
_initializerDefineProperty(this, "viewManager", _descriptor2, this);
|
|
31
|
+
_initializerDefineProperty(this, "libroViewTracker", _descriptor3, this);
|
|
32
32
|
this.themeService = void 0;
|
|
33
|
-
_initializerDefineProperty(this, "themeMode",
|
|
34
|
-
_initializerDefineProperty(this, "_active",
|
|
33
|
+
_initializerDefineProperty(this, "themeMode", _descriptor4, this);
|
|
34
|
+
_initializerDefineProperty(this, "_active", _descriptor5, this);
|
|
35
35
|
this.onActiveChangedEmitter = new Emitter();
|
|
36
|
-
_initializerDefineProperty(this, "_focus",
|
|
36
|
+
_initializerDefineProperty(this, "_focus", _descriptor6, this);
|
|
37
37
|
this.onFocusChangedEmitter = new Emitter();
|
|
38
38
|
this.onNotebookViewCreatedEmitter = new Emitter();
|
|
39
|
-
_initializerDefineProperty(this, "_hasFocus",
|
|
39
|
+
_initializerDefineProperty(this, "_hasFocus", _descriptor7, this);
|
|
40
40
|
this.themeService = themeService;
|
|
41
41
|
this.themeMode = this.themeService.getCurrentTheme().type;
|
|
42
42
|
this.themeService.onDidColorThemeChange(function (e) {
|
|
43
43
|
_this.themeMode = e.newTheme.type;
|
|
44
44
|
});
|
|
45
|
-
this.libroModelFactory = libroModelFactory;
|
|
46
|
-
this.viewManager = viewManager;
|
|
47
|
-
this.libroViewTracker = libroViewTracker;
|
|
48
45
|
}
|
|
49
|
-
LibroService = inject(LibroViewTracker)(LibroService, undefined, 3) || LibroService;
|
|
50
|
-
LibroService = inject(ViewManager)(LibroService, undefined, 2) || LibroService;
|
|
51
|
-
LibroService = inject(ModelFactory)(LibroService, undefined, 1) || LibroService;
|
|
52
46
|
LibroService = inject(ThemeService)(LibroService, undefined, 0) || LibroService;
|
|
53
47
|
_createClass(LibroService, [{
|
|
54
48
|
key: "onActiveChanged",
|
|
@@ -155,22 +149,37 @@ export var LibroService = (_dec = singleton({
|
|
|
155
149
|
}
|
|
156
150
|
}]);
|
|
157
151
|
return LibroService;
|
|
158
|
-
}(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "
|
|
152
|
+
}(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "libroModelFactory", [_dec2], {
|
|
159
153
|
configurable: true,
|
|
160
154
|
enumerable: true,
|
|
161
155
|
writable: true,
|
|
162
156
|
initializer: null
|
|
163
|
-
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
157
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "viewManager", [_dec3], {
|
|
164
158
|
configurable: true,
|
|
165
159
|
enumerable: true,
|
|
166
160
|
writable: true,
|
|
167
161
|
initializer: null
|
|
168
|
-
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
162
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "libroViewTracker", [_dec4], {
|
|
169
163
|
configurable: true,
|
|
170
164
|
enumerable: true,
|
|
171
165
|
writable: true,
|
|
172
166
|
initializer: null
|
|
173
|
-
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
167
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "themeMode", [_dec5], {
|
|
168
|
+
configurable: true,
|
|
169
|
+
enumerable: true,
|
|
170
|
+
writable: true,
|
|
171
|
+
initializer: null
|
|
172
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "_active", [_dec6], {
|
|
173
|
+
configurable: true,
|
|
174
|
+
enumerable: true,
|
|
175
|
+
writable: true,
|
|
176
|
+
initializer: null
|
|
177
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "_focus", [_dec7], {
|
|
178
|
+
configurable: true,
|
|
179
|
+
enumerable: true,
|
|
180
|
+
writable: true,
|
|
181
|
+
initializer: null
|
|
182
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "_hasFocus", [_dec8], {
|
|
174
183
|
configurable: true,
|
|
175
184
|
enumerable: true,
|
|
176
185
|
writable: true,
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ConfigurationContribution } from '@difizen/mana-app';
|
|
2
|
+
export declare class LibroSettingContribution implements ConfigurationContribution {
|
|
3
|
+
registerConfigurations(): import("@difizen/mana-app").ConfigurationNode<boolean>[];
|
|
4
|
+
}
|
|
5
|
+
//# sourceMappingURL=libro-setting-contribution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"libro-setting-contribution.d.ts","sourceRoot":"","sources":["../src/libro-setting-contribution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAazE,qBACa,wBAAyB,YAAW,yBAAyB;IACxE,sBAAsB;CAYvB"}
|
package/es/{configuration/libro-configuration-contribution.js → libro-setting-contribution.js}
RENAMED
|
@@ -5,20 +5,19 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
5
5
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
6
6
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
7
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
-
import { ConfigurationContribution } from '@difizen/mana-app';
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
export var LibroConfigurationContribution = (_dec = singleton({
|
|
8
|
+
import { singleton, ConfigurationContribution } from '@difizen/mana-app';
|
|
9
|
+
import { AutoInsertWhenNoCell, CellSideToolbarVisible, CellTopToolbarSetting, CollapserClickActive, EnterEditModeWhenAddCell, HeaderToolbarVisible, MultiSelectionWhenShiftClick, RightContentFixed } from "./libro-setting.js";
|
|
10
|
+
export var LibroSettingContribution = (_dec = singleton({
|
|
12
11
|
contrib: ConfigurationContribution
|
|
13
12
|
}), _dec(_class = /*#__PURE__*/function () {
|
|
14
|
-
function
|
|
15
|
-
_classCallCheck(this,
|
|
13
|
+
function LibroSettingContribution() {
|
|
14
|
+
_classCallCheck(this, LibroSettingContribution);
|
|
16
15
|
}
|
|
17
|
-
_createClass(
|
|
16
|
+
_createClass(LibroSettingContribution, [{
|
|
18
17
|
key: "registerConfigurations",
|
|
19
18
|
value: function registerConfigurations() {
|
|
20
|
-
return [HeaderToolbarVisible, CellTopToolbarSetting, CellSideToolbarVisible, AutoInsertWhenNoCell, EnterEditModeWhenAddCell,
|
|
19
|
+
return [HeaderToolbarVisible, CellTopToolbarSetting, CellSideToolbarVisible, AutoInsertWhenNoCell, EnterEditModeWhenAddCell, CollapserClickActive, MultiSelectionWhenShiftClick, RightContentFixed];
|
|
21
20
|
}
|
|
22
21
|
}]);
|
|
23
|
-
return
|
|
22
|
+
return LibroSettingContribution;
|
|
24
23
|
}()) || _class);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ConfigurationNode } from '@difizen/mana-app';
|
|
2
|
+
export declare const HeaderToolbarVisible: ConfigurationNode<boolean>;
|
|
3
|
+
export declare const CellTopToolbarSetting: ConfigurationNode<boolean>;
|
|
4
|
+
export declare const CellSideToolbarVisible: ConfigurationNode<boolean>;
|
|
5
|
+
export declare const AutoInsertWhenNoCell: ConfigurationNode<boolean>;
|
|
6
|
+
export declare const EnterEditModeWhenAddCell: ConfigurationNode<boolean>;
|
|
7
|
+
export declare const CollapserClickActive: ConfigurationNode<boolean>;
|
|
8
|
+
export declare const MultiSelectionWhenShiftClick: ConfigurationNode<boolean>;
|
|
9
|
+
export declare const RightContentFixed: ConfigurationNode<boolean>;
|
|
10
|
+
export declare const OutputScrollBtnVisiable: ConfigurationNode<boolean>;
|
|
11
|
+
//# sourceMappingURL=libro-setting.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"libro-setting.d.ts","sourceRoot":"","sources":["../src/libro-setting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAG3D,eAAO,MAAM,oBAAoB,EAAE,iBAAiB,CAAC,OAAO,CAS3D,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,iBAAiB,CAAC,OAAO,CAS5D,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,iBAAiB,CAAC,OAAO,CAS7D,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,iBAAiB,CAAC,OAAO,CAS3D,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,iBAAiB,CAAC,OAAO,CAS/D,CAAC;AACF,eAAO,MAAM,oBAAoB,EAAE,iBAAiB,CAAC,OAAO,CAS3D,CAAC;AACF,eAAO,MAAM,4BAA4B,EAAE,iBAAiB,CAAC,OAAO,CASnE,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,iBAAiB,CAAC,OAAO,CASxD,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,iBAAiB,CAAC,OAAO,CAS9D,CAAC"}
|
|
@@ -10,7 +10,7 @@ export var HeaderToolbarVisible = {
|
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
export var CellTopToolbarSetting = {
|
|
13
|
-
id: 'libro.cell.
|
|
13
|
+
id: 'libro.cell.toptoolbar',
|
|
14
14
|
description: l10n.t('是否显示cell顶部工具栏'),
|
|
15
15
|
title: l10n.t('cell顶部工具栏'),
|
|
16
16
|
type: 'checkbox',
|
|
@@ -20,7 +20,7 @@ export var CellTopToolbarSetting = {
|
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
export var CellSideToolbarVisible = {
|
|
23
|
-
id: 'libro.cell.
|
|
23
|
+
id: 'libro.cell.sidetoolbar',
|
|
24
24
|
description: l10n.t('是否显示cell侧边工具栏'),
|
|
25
25
|
title: l10n.t('cell侧边工具栏'),
|
|
26
26
|
type: 'checkbox',
|
|
@@ -30,7 +30,7 @@ export var CellSideToolbarVisible = {
|
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
export var AutoInsertWhenNoCell = {
|
|
33
|
-
id: 'libro.command.
|
|
33
|
+
id: 'libro.command.insertcellbelow',
|
|
34
34
|
description: l10n.t('没有cell时是否默认创建cell'),
|
|
35
35
|
title: l10n.t('默认创建cell'),
|
|
36
36
|
type: 'checkbox',
|
|
@@ -40,7 +40,7 @@ export var AutoInsertWhenNoCell = {
|
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
export var EnterEditModeWhenAddCell = {
|
|
43
|
-
id: 'libro.command.
|
|
43
|
+
id: 'libro.command.entereditmodewhenaddcell',
|
|
44
44
|
description: l10n.t('增加cell操作默认进入编辑态'),
|
|
45
45
|
title: l10n.t('默认进入编辑态'),
|
|
46
46
|
type: 'checkbox',
|
|
@@ -49,8 +49,8 @@ export var EnterEditModeWhenAddCell = {
|
|
|
49
49
|
type: 'boolean'
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
|
-
export var
|
|
53
|
-
id: 'libro.command.
|
|
52
|
+
export var CollapserClickActive = {
|
|
53
|
+
id: 'libro.command.collapserclickactive',
|
|
54
54
|
description: l10n.t('点击左侧长条是否可以隐藏与显示cell'),
|
|
55
55
|
title: l10n.t('默认点击长条可以隐藏与显示cell'),
|
|
56
56
|
type: 'checkbox',
|
|
@@ -60,7 +60,7 @@ export var CollapserActive = {
|
|
|
60
60
|
}
|
|
61
61
|
};
|
|
62
62
|
export var MultiSelectionWhenShiftClick = {
|
|
63
|
-
id: 'libro.command.
|
|
63
|
+
id: 'libro.command.multiselectionwhenshiftclick',
|
|
64
64
|
description: l10n.t('按住shift键并点击拖拽区域可以进行多选'),
|
|
65
65
|
title: l10n.t('默认按住shift键并点击拖拽区域可以进行多选'),
|
|
66
66
|
type: 'checkbox',
|
|
@@ -78,4 +78,14 @@ export var RightContentFixed = {
|
|
|
78
78
|
schema: {
|
|
79
79
|
type: 'boolean'
|
|
80
80
|
}
|
|
81
|
+
};
|
|
82
|
+
export var OutputScrollBtnVisiable = {
|
|
83
|
+
id: 'libro.cell.output.scroll.button.visiable',
|
|
84
|
+
description: l10n.t('cell输出区域高度固定按钮是否显示'),
|
|
85
|
+
title: l10n.t('cell输出区域高度固定按钮是否显示'),
|
|
86
|
+
type: 'checkbox',
|
|
87
|
+
defaultValue: true,
|
|
88
|
+
schema: {
|
|
89
|
+
type: 'boolean'
|
|
90
|
+
}
|
|
81
91
|
};
|
package/es/libro-view.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { ConfigurationService } from '@difizen/mana-app';
|
|
2
|
-
import { Deferred, DisposableCollection, Emitter } from '@difizen/mana-app';
|
|
3
|
-
import { ViewManager, BaseView } from '@difizen/mana-app';
|
|
1
|
+
import { BaseView, ViewManager, Deferred, DisposableCollection, Emitter, ConfigurationService } from '@difizen/mana-app';
|
|
4
2
|
import type { FC, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
5
3
|
import { CellService } from './cell/index.js';
|
|
4
|
+
import type { LibroCell } from './cell/index.js';
|
|
6
5
|
import { CollapseServiceFactory } from './collapse-service.js';
|
|
7
6
|
import type { CollapseService } from './collapse-service.js';
|
|
8
7
|
import { LirboContextKey } from './libro-context-key.js';
|
|
@@ -10,14 +9,20 @@ import { NotebookService } from './libro-protocol.js';
|
|
|
10
9
|
import type { CellOptions, CellView, DndContentProps, DndItemProps, NotebookView, NotebookModel, NotebookOption } from './libro-protocol.js';
|
|
11
10
|
import { LibroService } from './libro-service.js';
|
|
12
11
|
import { LibroSlotManager } from './slot/index.js';
|
|
12
|
+
import { VirtualizedManagerHelper } from './virtualized-manager-helper.js';
|
|
13
|
+
import type { VirtualizedManager } from './virtualized-manager.js';
|
|
13
14
|
import './index.less';
|
|
15
|
+
export interface ClipboardType {
|
|
16
|
+
action: 'copy' | 'cut';
|
|
17
|
+
cells: LibroCell[];
|
|
18
|
+
}
|
|
14
19
|
export declare const LibroContentComponent: import("react").NamedExoticComponent<object>;
|
|
15
20
|
export declare const LibroRender: ForwardRefExoticComponent<RefAttributes<HTMLDivElement>>;
|
|
16
21
|
export declare class LibroView extends BaseView implements NotebookView {
|
|
17
22
|
protected toDispose: DisposableCollection;
|
|
18
23
|
model: NotebookModel;
|
|
19
|
-
headerRender: FC
|
|
20
|
-
loadingRender: FC
|
|
24
|
+
headerRender: FC<any>;
|
|
25
|
+
loadingRender: FC<any>;
|
|
21
26
|
dndContentRender: FC<DndContentProps>;
|
|
22
27
|
dndItemRender: ForwardRefExoticComponent<DndItemProps & RefAttributes<HTMLDivElement>>;
|
|
23
28
|
protected onCellCreateEmitter: Emitter<CellView>;
|
|
@@ -30,19 +35,24 @@ export declare class LibroView extends BaseView implements NotebookView {
|
|
|
30
35
|
contextKey: LirboContextKey;
|
|
31
36
|
protected viewManager: ViewManager;
|
|
32
37
|
protected configurationService: ConfigurationService;
|
|
38
|
+
protected virtualizedManager: VirtualizedManager;
|
|
39
|
+
protected virtualizedManagerHelper: VirtualizedManagerHelper;
|
|
33
40
|
protected notebookService: NotebookService;
|
|
34
41
|
protected collapseService: CollapseService;
|
|
35
42
|
isDragging: boolean;
|
|
36
43
|
collapserVisible: boolean;
|
|
44
|
+
outputsScroll: boolean;
|
|
37
45
|
get hasModal(): boolean;
|
|
38
46
|
saving?: boolean;
|
|
39
47
|
onSaveEmitter: Emitter<boolean>;
|
|
40
48
|
get onSave(): import("@difizen/mana-app").Event<boolean>;
|
|
41
49
|
runCellEmitter: Emitter<CellView>;
|
|
42
50
|
get onRunCell(): import("@difizen/mana-app").Event<CellView>;
|
|
51
|
+
cellScrollEmitter: Emitter<void>;
|
|
52
|
+
get onCellScroll(): import("@difizen/mana-app").Event<void>;
|
|
43
53
|
protected initializedDefer: Deferred<void>;
|
|
44
54
|
get initialized(): Promise<void>;
|
|
45
|
-
constructor(options: NotebookOption, collapseServiceFactory: CollapseServiceFactory, notebookService: NotebookService);
|
|
55
|
+
constructor(options: NotebookOption, collapseServiceFactory: CollapseServiceFactory, notebookService: NotebookService, virtualizedManagerHelper: VirtualizedManagerHelper);
|
|
46
56
|
initView(): void;
|
|
47
57
|
initialize(): Promise<void>;
|
|
48
58
|
view: ForwardRefExoticComponent<RefAttributes<HTMLDivElement>>;
|
|
@@ -51,10 +61,11 @@ export declare class LibroView extends BaseView implements NotebookView {
|
|
|
51
61
|
getCellViewByOption(option: CellOptions): Promise<CellView>;
|
|
52
62
|
focus: () => void;
|
|
53
63
|
insertCells: (options: CellOptions[], position?: number) => Promise<void>;
|
|
54
|
-
selectCell: (cell
|
|
64
|
+
selectCell: (cell?: CellView) => void;
|
|
55
65
|
addCell: (option: CellOptions, position?: number) => Promise<void>;
|
|
56
66
|
addCellAbove: (option: CellOptions, position?: number) => Promise<void>;
|
|
57
67
|
get activeCell(): CellView | undefined;
|
|
68
|
+
get activeCellIndex(): number;
|
|
58
69
|
findCellIndex: (cell: CellView) => number;
|
|
59
70
|
deleteCell: (cell: CellView) => void;
|
|
60
71
|
executeCellRun(cell: CellView): Promise<boolean>;
|
|
@@ -71,7 +82,7 @@ export declare class LibroView extends BaseView implements NotebookView {
|
|
|
71
82
|
getNextVisibleCell(cell: CellView): CellView | undefined;
|
|
72
83
|
copyCell: (cell: CellView) => void;
|
|
73
84
|
cutCell: (cell: CellView) => void;
|
|
74
|
-
pasteCell: (cell: CellView) => void
|
|
85
|
+
pasteCell: (cell: CellView) => Promise<void>;
|
|
75
86
|
pasteCellAbove: (cell: CellView) => void;
|
|
76
87
|
invertCell: (cell: CellView, type: string) => Promise<void>;
|
|
77
88
|
clearOutputs: (cell: CellView) => void;
|
|
@@ -128,6 +139,8 @@ export declare class LibroView extends BaseView implements NotebookView {
|
|
|
128
139
|
};
|
|
129
140
|
enableOutputScrolling: (cell: CellView) => void;
|
|
130
141
|
disableOutputScrolling: (cell: CellView) => void;
|
|
142
|
+
disableAllOutputScrolling: () => void;
|
|
143
|
+
enableAllOutputScrolling: () => void;
|
|
131
144
|
disposed: boolean;
|
|
132
145
|
dispose(): void;
|
|
133
146
|
enterCommandMode: (isInLibro: boolean) => void;
|
package/es/libro-view.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"libro-view.d.ts","sourceRoot":"","sources":["../src/libro-view.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"libro-view.d.ts","sourceRoot":"","sources":["../src/libro-view.tsx"],"names":[],"mappings":"AAMA,OAAO,EAKL,QAAQ,EAIR,WAAW,EAEX,QAAQ,EAER,oBAAoB,EACpB,OAAO,EAIP,oBAAoB,EAErB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,EAAE,EAAE,yBAAyB,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAI1E,OAAO,EACL,WAAW,EAIZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAS7D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,EAAE,eAAe,EAAyB,MAAM,qBAAqB,CAAC;AAC7E,OAAO,KAAK,EACV,WAAW,EACX,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,cAAc,EACf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAOlD,OAAO,EAAE,gBAAgB,EAAiB,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,cAAc,CAAC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