@difizen/libro-core 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-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 +6 -2
- 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 +1 -2
- package/es/command/document-commands.d.ts.map +1 -1
- package/es/command/document-commands.js +3 -2
- package/es/command/kernel-command.d.ts.map +1 -1
- 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.map +1 -1
- 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 +5 -3
- 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-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/{configuration/libro-configuration-contribution.d.ts → libro-setting-contribution.d.ts} +2 -2
- 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/{configuration/libro-configuration.d.ts → libro-setting.d.ts} +3 -2
- 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 +3 -0
- package/es/material-from-designer.d.ts.map +1 -1
- 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.map +1 -1
- 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/configuration/libro-configuration-contribution.d.ts.map +0 -1
- package/es/configuration/libro-configuration.d.ts.map +0 -1
|
@@ -23,11 +23,20 @@ export class LibroCellView extends BaseView implements CellView {
|
|
|
23
23
|
protected override toDispose = new DisposableCollection();
|
|
24
24
|
options: CellViewOptions;
|
|
25
25
|
|
|
26
|
+
@prop()
|
|
27
|
+
noEditorAreaHeight = 0;
|
|
28
|
+
|
|
29
|
+
@prop()
|
|
30
|
+
cellViewTopPos = 0;
|
|
31
|
+
|
|
32
|
+
@prop()
|
|
33
|
+
renderEditorIntoVirtualized = false;
|
|
34
|
+
|
|
26
35
|
@prop()
|
|
27
36
|
model: CellModel;
|
|
28
37
|
protected cellService: CellService;
|
|
29
38
|
override view: ViewComponent = LibroCellComponent;
|
|
30
|
-
parent
|
|
39
|
+
parent: NotebookView;
|
|
31
40
|
|
|
32
41
|
@prop()
|
|
33
42
|
override className?: string | undefined = 'libro-cell-view-container';
|
|
@@ -49,7 +58,6 @@ export class LibroCellView extends BaseView implements CellView {
|
|
|
49
58
|
this.cellService = cellService;
|
|
50
59
|
this.options = options;
|
|
51
60
|
this.hasInputHidden = false;
|
|
52
|
-
|
|
53
61
|
const model = cellService.getModelFromCache(options.parentId, options.modelId);
|
|
54
62
|
if (!model) {
|
|
55
63
|
console.warn('cell model does not exist');
|
|
@@ -63,11 +71,13 @@ export class LibroCellView extends BaseView implements CellView {
|
|
|
63
71
|
this.toDispose.push(
|
|
64
72
|
watch(this.model, 'value', () => {
|
|
65
73
|
this.parent.model.onChange?.();
|
|
74
|
+
this.parent.model.onSourceChange?.();
|
|
66
75
|
}),
|
|
67
76
|
);
|
|
68
77
|
this.toDispose.push(
|
|
69
78
|
watch(this.model, 'type', () => {
|
|
70
79
|
this.parent.model.onChange?.();
|
|
80
|
+
this.parent.model.onSourceChange?.();
|
|
71
81
|
}),
|
|
72
82
|
);
|
|
73
83
|
if (ExecutableCellModel.is(this.model)) {
|
|
@@ -79,6 +89,11 @@ export class LibroCellView extends BaseView implements CellView {
|
|
|
79
89
|
}
|
|
80
90
|
}
|
|
81
91
|
|
|
92
|
+
// 计算编辑器区相对于编辑器区垂直方向的偏移量
|
|
93
|
+
calcEditorOffset() {
|
|
94
|
+
return 16 + 1;
|
|
95
|
+
}
|
|
96
|
+
|
|
82
97
|
hasCellHidden() {
|
|
83
98
|
return this.hasInputHidden;
|
|
84
99
|
}
|
|
@@ -88,7 +103,7 @@ export class LibroCellView extends BaseView implements CellView {
|
|
|
88
103
|
}
|
|
89
104
|
|
|
90
105
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
91
|
-
shouldEnterEditorMode(
|
|
106
|
+
shouldEnterEditorMode(e: React.FocusEvent<HTMLElement>) {
|
|
92
107
|
return false;
|
|
93
108
|
}
|
|
94
109
|
|
|
@@ -96,17 +111,14 @@ export class LibroCellView extends BaseView implements CellView {
|
|
|
96
111
|
//
|
|
97
112
|
}
|
|
98
113
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
99
|
-
focus(
|
|
114
|
+
focus(isEdit: boolean) {
|
|
100
115
|
//
|
|
101
116
|
}
|
|
102
117
|
|
|
103
118
|
disposed = false;
|
|
104
119
|
override dispose() {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
super.dispose();
|
|
108
|
-
}
|
|
109
|
-
this.disposed = true;
|
|
120
|
+
this.toDispose.dispose();
|
|
121
|
+
super.dispose();
|
|
110
122
|
}
|
|
111
123
|
toJSON(): LibroCell {
|
|
112
124
|
const meta = { ...(this.model.toJSON() as LibroCell) };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { IEditor
|
|
1
|
+
import type { IEditor } from '@difizen/libro-code-editor';
|
|
2
2
|
import { prop } from '@difizen/mana-app';
|
|
3
|
+
import type { ReactNode } from 'react';
|
|
3
4
|
|
|
4
|
-
import type { CellView } from '../libro-protocol.js';
|
|
5
|
+
import type { CellView, EditorStatus } from '../libro-protocol.js';
|
|
5
6
|
import { isCellView } from '../libro-protocol.js';
|
|
6
7
|
|
|
7
8
|
import { LibroCellView } from './libro-cell-view.js';
|
|
@@ -12,11 +13,8 @@ export interface EditorCellView extends CellView {
|
|
|
12
13
|
redo: () => void;
|
|
13
14
|
|
|
14
15
|
undo: () => void;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
start: number;
|
|
18
|
-
end: number;
|
|
19
|
-
};
|
|
16
|
+
|
|
17
|
+
renderEditor: () => ReactNode;
|
|
20
18
|
}
|
|
21
19
|
|
|
22
20
|
export const EditorCellView = {
|
|
@@ -44,8 +42,11 @@ export abstract class LibroEditorCellView
|
|
|
44
42
|
@prop()
|
|
45
43
|
editor: IEditor | undefined;
|
|
46
44
|
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
@prop()
|
|
46
|
+
editorStatus: EditorStatus;
|
|
47
|
+
|
|
48
|
+
renderEditor: () => ReactNode;
|
|
49
|
+
|
|
49
50
|
get wrapperCls() {
|
|
50
51
|
return '';
|
|
51
52
|
}
|
|
@@ -14,6 +14,8 @@ interface ExecutableCellView extends EditorCellView {
|
|
|
14
14
|
clearExecution: () => void;
|
|
15
15
|
|
|
16
16
|
outputArea: BaseOutputArea;
|
|
17
|
+
|
|
18
|
+
noEditorAreaHeight: number;
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
export const ExecutableCellView = {
|
|
@@ -40,7 +42,9 @@ export abstract class LibroExecutableCellView
|
|
|
40
42
|
{
|
|
41
43
|
declare model: CellModel & ExecutableCellModel;
|
|
42
44
|
|
|
43
|
-
|
|
45
|
+
outputArea: BaseOutputArea;
|
|
46
|
+
|
|
47
|
+
declare noEditorAreaHeight: number;
|
|
44
48
|
|
|
45
49
|
constructor(
|
|
46
50
|
@inject(ViewOption) options: CellViewOptions,
|
|
@@ -54,6 +58,7 @@ export abstract class LibroExecutableCellView
|
|
|
54
58
|
//
|
|
55
59
|
};
|
|
56
60
|
|
|
61
|
+
// TODO: 性能!
|
|
57
62
|
override hasCellHidden() {
|
|
58
63
|
if (
|
|
59
64
|
!ExecutableCellModel.is(this.model) ||
|
package/src/collapse-service.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { SaveOutlined, SettingOutlined } from '@ant-design/icons';
|
|
2
2
|
import type { Command } from '@difizen/mana-app';
|
|
3
3
|
|
|
4
|
-
export const DocumentCommands: Record<
|
|
5
|
-
string,
|
|
6
|
-
Command & { keybind?: string | string[] | undefined; when?: string | undefined }
|
|
7
|
-
> = {
|
|
4
|
+
export const DocumentCommands: Record<string, Command & { keybind?: string }> = {
|
|
8
5
|
Save: {
|
|
9
6
|
id: 'document:save',
|
|
10
7
|
icon: SaveOutlined,
|
|
@@ -12,7 +9,8 @@ export const DocumentCommands: Record<
|
|
|
12
9
|
keybind: 'ctrlcmd+s',
|
|
13
10
|
},
|
|
14
11
|
OpenSettings: {
|
|
15
|
-
id: 'document
|
|
12
|
+
id: 'document.notebook.open_setting',
|
|
16
13
|
icon: SettingOutlined,
|
|
14
|
+
label: 'Setting',
|
|
17
15
|
},
|
|
18
16
|
};
|
|
@@ -31,6 +31,9 @@ export const KernelCommands: Record<string, Command & { keybind?: string }> = {
|
|
|
31
31
|
id: 'notebook:shutdown-kernel',
|
|
32
32
|
label: `Shutdown Kernel`,
|
|
33
33
|
},
|
|
34
|
+
ShowKernelStatus: {
|
|
35
|
+
id: 'notebook:show-kernel-status',
|
|
36
|
+
},
|
|
34
37
|
// TODO: remove this command
|
|
35
38
|
ShowKernelStatusAndSelector: {
|
|
36
39
|
id: 'notebook:show-kernel-status-and-selector',
|