@difizen/libro-lab 0.1.9 → 0.1.11
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/command/index.d.ts +5 -0
- package/es/command/index.d.ts.map +1 -0
- package/es/command/index.js +4 -0
- package/es/{menu/menu-command.d.ts → command/lab-command.d.ts} +6 -6
- package/es/command/lab-command.d.ts.map +1 -0
- package/es/{menu/menu-command.js → command/lab-command.js} +9 -5
- package/es/{menu/menu-contribution.d.ts → command/lab-menu-contribution.d.ts} +3 -3
- package/es/command/lab-menu-contribution.d.ts.map +1 -0
- package/es/{menu/menu-contribution.js → command/lab-menu-contribution.js} +242 -241
- package/es/command/menu-bar-view.d.ts.map +1 -0
- package/es/{menu → command}/menu-bar-view.js +2 -2
- package/es/command/module.d.ts.map +1 -0
- package/es/{menu → command}/module.js +2 -2
- package/es/config/config-contribution.js +2 -2
- package/es/editor-viewer/code-editor-open-handler.d.ts.map +1 -1
- package/es/editor-viewer/code-editor-open-handler.js +4 -4
- package/es/editor-viewer/code-editor-viewer.d.ts +1 -0
- package/es/editor-viewer/code-editor-viewer.d.ts.map +1 -1
- package/es/editor-viewer/code-editor-viewer.js +8 -2
- package/es/editor-viewer/index.less +16 -0
- package/es/editor-viewer/libro-default-open-handler.d.ts +11 -0
- package/es/editor-viewer/libro-default-open-handler.d.ts.map +1 -0
- package/es/editor-viewer/libro-default-open-handler.js +97 -0
- package/es/editor-viewer/libro-default-viewer.d.ts +14 -0
- package/es/editor-viewer/libro-default-viewer.d.ts.map +1 -0
- package/es/editor-viewer/libro-default-viewer.js +78 -0
- package/es/editor-viewer/module.d.ts.map +1 -1
- package/es/editor-viewer/module.js +3 -1
- package/es/editor-viewer/protocol.d.ts +2 -0
- package/es/editor-viewer/protocol.d.ts.map +1 -1
- package/es/editor-viewer/protocol.js +3 -1
- package/es/github-link/index.js +2 -2
- package/es/image-viewer/open-handler.js +2 -2
- package/es/image-viewer/viewer.js +2 -2
- package/es/index.d.ts +1 -1
- package/es/index.d.ts.map +1 -1
- package/es/index.js +1 -1
- package/es/index.less +17 -5
- package/es/kernel-manager/index.js +2 -2
- package/es/lab-app.d.ts.map +1 -1
- package/es/lab-app.js +6 -4
- package/es/layout/brand/brand.js +2 -2
- package/es/layout/container.js +2 -2
- package/es/layout/content-bottom-tab-view.js +2 -2
- package/es/layout/footer/current-file-footer-view.js +2 -2
- package/es/layout/footer/footer-view.js +2 -2
- package/es/layout/footer/status-footer-view.js +2 -2
- package/es/layout/layout-service.d.ts +2 -1
- package/es/layout/layout-service.d.ts.map +1 -1
- package/es/layout/layout-service.js +59 -25
- package/es/layout/layout.js +3 -4
- package/es/layout/main.js +2 -2
- package/es/layout/saveable-tab-view.js +2 -2
- package/es/layout/side-tab-view.js +2 -2
- package/es/module.d.ts.map +1 -1
- package/es/module.js +1 -1
- package/es/toc/libro-toc-panel-view.js +2 -2
- package/es/welcome/entry-point-view.d.ts.map +1 -1
- package/es/welcome/entry-point-view.js +4 -4
- package/es/welcome/welcome-view.js +2 -2
- package/package.json +8 -8
- package/src/command/index.ts +4 -0
- package/src/{menu/menu-command.ts → command/lab-command.ts} +9 -5
- package/src/{menu/menu-contribution.ts → command/lab-menu-contribution.ts} +228 -230
- package/src/{menu → command}/module.ts +2 -2
- package/src/editor-viewer/code-editor-open-handler.ts +2 -5
- package/src/editor-viewer/code-editor-viewer.tsx +7 -0
- package/src/editor-viewer/index.less +16 -0
- package/src/editor-viewer/libro-default-open-handler.ts +34 -0
- package/src/editor-viewer/libro-default-viewer.tsx +60 -0
- package/src/editor-viewer/module.ts +8 -1
- package/src/editor-viewer/protocol.ts +25 -0
- package/src/index.less +17 -5
- package/src/index.ts +1 -1
- package/src/lab-app.ts +6 -1
- package/src/layout/layout-service.ts +25 -3
- package/src/module.tsx +1 -1
- package/src/welcome/entry-point-view.tsx +2 -2
- package/es/menu/index.d.ts +0 -5
- package/es/menu/index.d.ts.map +0 -1
- package/es/menu/index.js +0 -4
- package/es/menu/menu-bar-view.d.ts.map +0 -1
- package/es/menu/menu-command.d.ts.map +0 -1
- package/es/menu/menu-contribution.d.ts.map +0 -1
- package/es/menu/module.d.ts.map +0 -1
- package/src/menu/index.ts +0 -4
- /package/es/{menu → command}/menu-bar-view.d.ts +0 -0
- /package/es/{menu → command}/module.d.ts +0 -0
- /package/src/{menu → command}/menu-bar-view.tsx +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createSlotPreference, HeaderArea, ManaModule } from '@difizen/mana-app';
|
|
2
2
|
|
|
3
|
+
import { LabMenu } from './lab-menu-contribution.js';
|
|
3
4
|
import { MenuBarView } from './menu-bar-view.js';
|
|
4
|
-
import { HeaderMenu } from './menu-contribution.js';
|
|
5
5
|
|
|
6
6
|
export const LibroLabHeaderMenuModule = ManaModule.create().register(
|
|
7
|
-
|
|
7
|
+
LabMenu,
|
|
8
8
|
MenuBarView,
|
|
9
9
|
createSlotPreference({
|
|
10
10
|
slot: HeaderArea.middle,
|
|
@@ -5,7 +5,7 @@ import { Priority } from '@difizen/mana-app';
|
|
|
5
5
|
import { NavigatableViewOpenHandler, OpenHandler, singleton } from '@difizen/mana-app';
|
|
6
6
|
|
|
7
7
|
import type { CodeEditorViewer } from './code-editor-viewer.js';
|
|
8
|
-
import { CodeEditorViewerFactory } from './protocol.js';
|
|
8
|
+
import { CodeEditorViewerFactory, textFileTypes } from './protocol.js';
|
|
9
9
|
|
|
10
10
|
@singleton({ contrib: OpenHandler })
|
|
11
11
|
export class CodeEditorViewerOpenHandler extends NavigatableViewOpenHandler<CodeEditorViewer> {
|
|
@@ -14,10 +14,7 @@ export class CodeEditorViewerOpenHandler extends NavigatableViewOpenHandler<Code
|
|
|
14
14
|
id = CodeEditorViewerFactory;
|
|
15
15
|
|
|
16
16
|
canHandle(uri: URI, options?: ViewOpenHandlerOptions) {
|
|
17
|
-
if (
|
|
18
|
-
uri.scheme === 'file' &&
|
|
19
|
-
!['.tar', '.zip', '.7z', '.gz', 'rar'].includes(uri.path.ext)
|
|
20
|
-
) {
|
|
17
|
+
if (uri.scheme === 'file' && textFileTypes.includes(uri.path.ext)) {
|
|
21
18
|
return 100;
|
|
22
19
|
}
|
|
23
20
|
return Priority.IDLE;
|
|
@@ -170,6 +170,13 @@ export class CodeEditorViewer extends BaseView implements NavigatableView, Savea
|
|
|
170
170
|
return new URI(this.filePath);
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
+
override onViewResize = () => {
|
|
174
|
+
if (!this.e2Editor) {
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
this.e2Editor.codeEditor.layout();
|
|
178
|
+
};
|
|
179
|
+
|
|
173
180
|
createMoveToUri(resourceUri: URI): URI | undefined {
|
|
174
181
|
this.filePath = resourceUri.path.toString();
|
|
175
182
|
return resourceUri;
|
|
@@ -1,3 +1,19 @@
|
|
|
1
1
|
.libro-lab-editor-viewer {
|
|
2
2
|
height: 100%;
|
|
3
3
|
}
|
|
4
|
+
|
|
5
|
+
.libro-lab-default-viewer {
|
|
6
|
+
display: flex;
|
|
7
|
+
height: 100%;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.libro-lab-default-viewer-text {
|
|
14
|
+
font-size: 18px;
|
|
15
|
+
color: #000000d8;
|
|
16
|
+
line-height: 26px;
|
|
17
|
+
text-align: center;
|
|
18
|
+
font-weight: 500;
|
|
19
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { LibroJupyterConfiguration } from '@difizen/libro-jupyter';
|
|
2
|
+
import type { URI, ViewOpenHandlerOptions } from '@difizen/mana-app';
|
|
3
|
+
import { ConfigurationService, inject } from '@difizen/mana-app';
|
|
4
|
+
import { NavigatableViewOpenHandler, OpenHandler, singleton } from '@difizen/mana-app';
|
|
5
|
+
import { LibroDefaultViewerFactory } from './protocol.js';
|
|
6
|
+
import type { LibroDefaultViewer } from './libro-default-viewer.js';
|
|
7
|
+
|
|
8
|
+
@singleton({ contrib: OpenHandler })
|
|
9
|
+
export class LibroDefaultViewerOpenHandler extends NavigatableViewOpenHandler<LibroDefaultViewer> {
|
|
10
|
+
@inject(ConfigurationService) protected configurationService: ConfigurationService;
|
|
11
|
+
|
|
12
|
+
id = LibroDefaultViewerFactory;
|
|
13
|
+
|
|
14
|
+
canHandle() {
|
|
15
|
+
return 100;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
override async open(uri: URI, options: ViewOpenHandlerOptions = {}) {
|
|
19
|
+
const { viewOptions, ...extra } = options;
|
|
20
|
+
const slot = await this.configurationService.get(
|
|
21
|
+
LibroJupyterConfiguration['OpenSlot'],
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
return super.open(uri, {
|
|
25
|
+
slot,
|
|
26
|
+
viewOptions: {
|
|
27
|
+
path: uri.path.toString(),
|
|
28
|
+
...viewOptions,
|
|
29
|
+
},
|
|
30
|
+
reveal: true,
|
|
31
|
+
...extra,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { NavigatableView } from '@difizen/mana-app';
|
|
2
|
+
import {
|
|
3
|
+
inject,
|
|
4
|
+
LabelProvider,
|
|
5
|
+
prop,
|
|
6
|
+
URI,
|
|
7
|
+
URIIconReference,
|
|
8
|
+
ViewOption,
|
|
9
|
+
} from '@difizen/mana-app';
|
|
10
|
+
import { BaseView, transient, view } from '@difizen/mana-app';
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import './index.less';
|
|
13
|
+
|
|
14
|
+
import type { EditorOption } from './protocol.js';
|
|
15
|
+
import { LibroDefaultViewerFactory } from './protocol.js';
|
|
16
|
+
|
|
17
|
+
const DefaultViewerComponent: React.FC = () => {
|
|
18
|
+
return (
|
|
19
|
+
<div className="libro-lab-default-viewer">
|
|
20
|
+
<img
|
|
21
|
+
src="https://mdn.alipayobjects.com/huamei_xt20ge/afts/img/A*BcWvQL6qB0cAAAAAAAAAAAAADiuUAQ/original"
|
|
22
|
+
width={322}
|
|
23
|
+
height={228}
|
|
24
|
+
></img>
|
|
25
|
+
<div className="libro-lab-default-viewer-text">当前文件类型暂不支持查看</div>
|
|
26
|
+
</div>
|
|
27
|
+
);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
@transient()
|
|
31
|
+
@view(LibroDefaultViewerFactory)
|
|
32
|
+
export class LibroDefaultViewer extends BaseView implements NavigatableView {
|
|
33
|
+
override view = DefaultViewerComponent;
|
|
34
|
+
|
|
35
|
+
@prop() filePath?: string;
|
|
36
|
+
|
|
37
|
+
constructor(
|
|
38
|
+
@inject(ViewOption)
|
|
39
|
+
options: EditorOption,
|
|
40
|
+
@inject(LabelProvider) labelProvider: LabelProvider,
|
|
41
|
+
) {
|
|
42
|
+
super();
|
|
43
|
+
this.title.caption = options.path;
|
|
44
|
+
this.filePath = options.path;
|
|
45
|
+
const uri = URI.withScheme(new URI(options.path), 'file');
|
|
46
|
+
const uriRef = URIIconReference.create('file', new URI(options.path));
|
|
47
|
+
const iconClass = labelProvider.getIcon(uriRef);
|
|
48
|
+
this.title.icon = <div className={iconClass} />;
|
|
49
|
+
this.title.label = uri.path.base;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
getResourceUri(): URI | undefined {
|
|
53
|
+
return new URI(this.filePath);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
createMoveToUri(resourceUri: URI): URI | undefined {
|
|
57
|
+
this.filePath = resourceUri.path.toString();
|
|
58
|
+
return resourceUri;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -2,7 +2,14 @@ import { ManaModule } from '@difizen/mana-app';
|
|
|
2
2
|
|
|
3
3
|
import { CodeEditorViewerOpenHandler } from './code-editor-open-handler.js';
|
|
4
4
|
import { CodeEditorViewer } from './code-editor-viewer.js';
|
|
5
|
+
import { LibroDefaultViewerOpenHandler } from './libro-default-open-handler.js';
|
|
6
|
+
import { LibroDefaultViewer } from './libro-default-viewer.js';
|
|
5
7
|
|
|
6
8
|
export const CodeEditorViewerModule = ManaModule.create(
|
|
7
9
|
'CodeEditorViewerModule',
|
|
8
|
-
).register(
|
|
10
|
+
).register(
|
|
11
|
+
CodeEditorViewer,
|
|
12
|
+
LibroDefaultViewer,
|
|
13
|
+
CodeEditorViewerOpenHandler,
|
|
14
|
+
LibroDefaultViewerOpenHandler,
|
|
15
|
+
);
|
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
export const CodeEditorViewerFactory = 'libro-lab-editor-viewer';
|
|
2
2
|
|
|
3
|
+
export const LibroDefaultViewerFactory = 'libro-lab-default-viewer';
|
|
4
|
+
|
|
5
|
+
export const textFileTypes: string[] = [
|
|
6
|
+
'.py',
|
|
7
|
+
'.txt',
|
|
8
|
+
'.sh',
|
|
9
|
+
'.tex',
|
|
10
|
+
'.html',
|
|
11
|
+
'.xml',
|
|
12
|
+
'.log',
|
|
13
|
+
'.ini',
|
|
14
|
+
'.yaml',
|
|
15
|
+
'.yml',
|
|
16
|
+
'.js',
|
|
17
|
+
'.ts',
|
|
18
|
+
'.csv',
|
|
19
|
+
'.css',
|
|
20
|
+
'.conf',
|
|
21
|
+
'.bat',
|
|
22
|
+
'.json',
|
|
23
|
+
'.jsonl',
|
|
24
|
+
'.md',
|
|
25
|
+
'',
|
|
26
|
+
];
|
|
27
|
+
|
|
3
28
|
export interface EditorOption {
|
|
4
29
|
path: string;
|
|
5
30
|
loadType?: string;
|
package/src/index.less
CHANGED
|
@@ -5,13 +5,17 @@
|
|
|
5
5
|
background-color: #f0f2f51f;
|
|
6
6
|
min-width: 40px;
|
|
7
7
|
box-shadow:
|
|
8
|
-
1px 0 0 0
|
|
9
|
-
2px 0 0 0
|
|
8
|
+
1px 0 0 0 #000a1a02,
|
|
9
|
+
2px 0 0 0 #ffffff0c;
|
|
10
10
|
|
|
11
11
|
.mana-tabs-ink-bar {
|
|
12
12
|
display: none;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
.mana-tabs-tab:hover {
|
|
16
|
+
background-color: unset;
|
|
17
|
+
}
|
|
18
|
+
|
|
15
19
|
.mana-tabs-tab {
|
|
16
20
|
width: 40px;
|
|
17
21
|
height: 40px;
|
|
@@ -32,12 +36,20 @@
|
|
|
32
36
|
}
|
|
33
37
|
}
|
|
34
38
|
|
|
39
|
+
.mana-tabs-tab-btn:hover {
|
|
40
|
+
background-color: #000a1a1f;
|
|
41
|
+
|
|
42
|
+
.mana-tab-icon {
|
|
43
|
+
color: #00000059;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
35
47
|
.mana-tabs-tab-active {
|
|
36
48
|
.mana-tabs-tab-btn {
|
|
37
49
|
background-color: #000a1a1f;
|
|
38
50
|
|
|
39
51
|
.mana-tab-icon {
|
|
40
|
-
color: #
|
|
52
|
+
color: #000a1a7f;
|
|
41
53
|
}
|
|
42
54
|
}
|
|
43
55
|
}
|
|
@@ -70,9 +82,9 @@
|
|
|
70
82
|
|
|
71
83
|
.default-folder-icon,
|
|
72
84
|
.default-file-icon {
|
|
73
|
-
color:
|
|
85
|
+
color: #00000072;
|
|
74
86
|
}
|
|
75
87
|
|
|
76
88
|
.mana-tree-node-segment-grow {
|
|
77
|
-
color:
|
|
89
|
+
color: #000000a5;
|
|
78
90
|
}
|
package/src/index.ts
CHANGED
|
@@ -3,7 +3,7 @@ export * from './lab-app.js';
|
|
|
3
3
|
export * from './github-link/index.js';
|
|
4
4
|
export * from './config/index.js';
|
|
5
5
|
export * from './layout/index.js';
|
|
6
|
-
export * from './
|
|
6
|
+
export * from './command/index.js';
|
|
7
7
|
export * from './toc/index.js';
|
|
8
8
|
export * from './welcome/index.js';
|
|
9
9
|
export * from './kernel-manager/index.js';
|
package/src/lab-app.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LibroService,
|
|
3
|
-
ServerConnection,
|
|
4
3
|
LibroJupyterConfiguration,
|
|
4
|
+
ServerConnection,
|
|
5
5
|
ServerManager,
|
|
6
6
|
} from '@difizen/libro-jupyter';
|
|
7
|
+
import { terminalDefaultSlot } from '@difizen/libro-terminal';
|
|
7
8
|
import type { FileTreeView } from '@difizen/mana-app';
|
|
8
9
|
import {
|
|
9
10
|
ConfigurationService,
|
|
@@ -37,6 +38,10 @@ export class LibroLabApp implements ApplicationContribution {
|
|
|
37
38
|
LibroJupyterConfiguration['OpenSlot'],
|
|
38
39
|
LibroLabLayoutSlots.content,
|
|
39
40
|
);
|
|
41
|
+
this.configurationService.set(
|
|
42
|
+
terminalDefaultSlot,
|
|
43
|
+
LibroLabLayoutSlots.contentBottom,
|
|
44
|
+
);
|
|
40
45
|
this.serverManager.ready
|
|
41
46
|
.then(() => {
|
|
42
47
|
this.layoutService.setAreaVisible(LibroLabLayoutSlots.navigator, true);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LibroNavigatableView, LibroService } from '@difizen/libro-jupyter';
|
|
2
|
-
import type { View, ViewOpenHandlerOptions } from '@difizen/mana-app';
|
|
2
|
+
import type { View, ViewOpenHandlerOptions, ViewOpenOption } from '@difizen/mana-app';
|
|
3
3
|
import { observable } from '@difizen/mana-app';
|
|
4
4
|
import {
|
|
5
5
|
DefaultSlotView,
|
|
@@ -13,7 +13,6 @@ import type { LibroLabLayoutSlotsType, StatusType } from './protocol.js';
|
|
|
13
13
|
import { LibroLabLayoutSlots } from './protocol.js';
|
|
14
14
|
|
|
15
15
|
export type VisibilityMap = Record<LibroLabLayoutSlotsType, boolean>;
|
|
16
|
-
|
|
17
16
|
@singleton()
|
|
18
17
|
export class LayoutService {
|
|
19
18
|
protected readonly slotViewManager: SlotViewManager;
|
|
@@ -26,6 +25,9 @@ export class LayoutService {
|
|
|
26
25
|
this.slotViewManager = slotViewManager;
|
|
27
26
|
this.libroService = libroService;
|
|
28
27
|
this.onOpenSlotActiveChange();
|
|
28
|
+
this.slotViewManager.onViewAdded((args) => {
|
|
29
|
+
this.onViewAdded(args.slot, args.view, args.option);
|
|
30
|
+
});
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
@prop()
|
|
@@ -50,8 +52,27 @@ export class LayoutService {
|
|
|
50
52
|
this.visibilityMap[slot] = visible;
|
|
51
53
|
}
|
|
52
54
|
|
|
55
|
+
protected onViewAdded(
|
|
56
|
+
slot: string,
|
|
57
|
+
view: View | undefined,
|
|
58
|
+
option: ViewOpenOption | undefined,
|
|
59
|
+
) {
|
|
60
|
+
if (!view) {
|
|
61
|
+
// TODO: hide slot
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
if (Object.keys(this.visibilityMap).includes(slot)) {
|
|
65
|
+
if (option?.reveal) {
|
|
66
|
+
this.setAreaVisible(slot as LibroLabLayoutSlotsType, true);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
53
71
|
async addView(view: View, option?: ViewOpenHandlerOptions): Promise<void> {
|
|
54
72
|
const { slot = LibroLabLayoutSlots.main, ...viewOpenOption } = option || {};
|
|
73
|
+
if (option?.reveal) {
|
|
74
|
+
this.setAreaVisible(slot, true);
|
|
75
|
+
}
|
|
55
76
|
await this.slotViewManager.addView(view, slot, viewOpenOption);
|
|
56
77
|
}
|
|
57
78
|
|
|
@@ -82,9 +103,10 @@ export class LayoutService {
|
|
|
82
103
|
);
|
|
83
104
|
observable(slotView);
|
|
84
105
|
if (slotView instanceof DefaultSlotView) {
|
|
85
|
-
slotView.onActiveChange(() => {
|
|
106
|
+
slotView.onActiveChange(async () => {
|
|
86
107
|
const active = slotView.active;
|
|
87
108
|
if (active instanceof LibroNavigatableView) {
|
|
109
|
+
await active.ready;
|
|
88
110
|
active.libroView?.focus();
|
|
89
111
|
this.libroService.active = active.libroView;
|
|
90
112
|
} else {
|
package/src/module.tsx
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
HeaderArea,
|
|
10
10
|
} from '@difizen/mana-app';
|
|
11
11
|
|
|
12
|
+
import { LibroLabHeaderMenuModule } from './command/module.js';
|
|
12
13
|
import { LabConfigAppContribution } from './config/config-contribution.js';
|
|
13
14
|
import { CodeEditorViewerModule } from './editor-viewer/index.js';
|
|
14
15
|
import { GithubLinkView } from './github-link/index.js';
|
|
@@ -24,7 +25,6 @@ import {
|
|
|
24
25
|
import { SaveableTabView } from './layout/saveable-tab-view.js';
|
|
25
26
|
import './index.less';
|
|
26
27
|
import { LibroLabSideTabView } from './layout/side-tab-view.js';
|
|
27
|
-
import { LibroLabHeaderMenuModule } from './menu/module.js';
|
|
28
28
|
import { LibroLabTocModule } from './toc/module.js';
|
|
29
29
|
import { EntryPointView } from './welcome/entry-point-view.js';
|
|
30
30
|
import { WelcomeView } from './welcome/index.js';
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
FileCreateModal,
|
|
7
7
|
FileView,
|
|
8
8
|
} from '@difizen/libro-jupyter';
|
|
9
|
+
import { TerminalCommands } from '@difizen/libro-terminal';
|
|
9
10
|
import {
|
|
10
11
|
CommandRegistry,
|
|
11
12
|
ModalService,
|
|
@@ -19,7 +20,6 @@ import { Col, Row } from 'antd';
|
|
|
19
20
|
import { forwardRef, useEffect, useState } from 'react';
|
|
20
21
|
|
|
21
22
|
import { TerminalIcon } from '../common/icon.js';
|
|
22
|
-
import { MenuCommands } from '../menu/index.js';
|
|
23
23
|
|
|
24
24
|
import './index.less';
|
|
25
25
|
|
|
@@ -123,7 +123,7 @@ export const EntryPointComponent = forwardRef(function EntryPointComponent() {
|
|
|
123
123
|
<div
|
|
124
124
|
className="libro-lab-entry-point-item"
|
|
125
125
|
onClick={() => {
|
|
126
|
-
commandRegistry.executeCommand(
|
|
126
|
+
commandRegistry.executeCommand(TerminalCommands['OpenTerminal'].id);
|
|
127
127
|
}}
|
|
128
128
|
>
|
|
129
129
|
<TerminalIcon />
|
package/es/menu/index.d.ts
DELETED
package/es/menu/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/menu/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC"}
|
package/es/menu/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"menu-bar-view.d.ts","sourceRoot":"","sources":["../../src/menu/menu-bar-view.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,QAAQ,EAMT,MAAM,mBAAmB,CAAC;AAG3B,eAAO,MAAM,oBAAoB,mFAE/B,CAAC;AAEH,qBAEa,WAAY,SAAQ,QAAQ;IAC9B,IAAI,oFAAwB;IAErC,KAAK,SAAK;;CAOX"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"menu-command.d.ts","sourceRoot":"","sources":["../../src/menu/menu-command.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyIxB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"menu-contribution.d.ts","sourceRoot":"","sources":["../../src/menu/menu-contribution.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,YAAY,EAEb,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAqB,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EACL,mBAAmB,EACnB,eAAe,EAGf,gBAAgB,EAEhB,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAK5D,yBAAiB,WAAW,CAAC;IACpB,MAAM,IAAI,UAA+B,CAAC;IAC1C,MAAM,IAAI,UAA+B,CAAC;IAC1C,MAAM,IAAI,UAA+B,CAAC;IAC1C,MAAM,GAAG,UAA8B,CAAC;IACxC,MAAM,QAAQ,UAAmC,CAAC;IAClD,MAAM,IAAI,UAA+B,CAAC;CAClD;AAED,qBACa,UAAW,YAAW,gBAAgB,EAAE,mBAAmB;IAC7C,SAAS,CAAC,eAAe,EAAE,eAAe,CAAC;IAC9C,SAAS,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,SAAS,CAAC,aAAa,EAAE,aAAa,CAAC;IACrC,eAAe,EAAE,eAAe,CAAC;IACrC,WAAW,EAAE,WAAW,CAAC;IAE9C,aAAa,CAAC,IAAI,EAAE,YAAY;IAkLhC,gBAAgB,CAAC,QAAQ,EAAE,eAAe;CAgmB3C"}
|
package/es/menu/module.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../src/menu/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAKjF,eAAO,MAAM,wBAAwB,YAOpC,CAAC"}
|
package/src/menu/index.ts
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|