@difizen/libro-lab 0.2.35 → 0.2.38
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/lab-command.d.ts.map +1 -1
- package/es/command/lab-command.js +31 -35
- package/es/command/lab-menu-contribution.d.ts.map +1 -1
- package/es/command/lab-menu-contribution.js +197 -39
- package/es/command/menu-bar-view.d.ts.map +1 -1
- package/es/command/menu-bar-view.js +6 -1
- package/es/common/icon.d.ts.map +1 -1
- package/es/common/icon.js +21 -36
- package/es/editor-viewer/empty-icon.d.ts +3 -0
- package/es/editor-viewer/empty-icon.d.ts.map +1 -0
- package/es/editor-viewer/empty-icon.js +495 -0
- package/es/editor-viewer/empty.svg +136 -0
- package/es/editor-viewer/libro-default-viewer.d.ts.map +1 -1
- package/es/editor-viewer/libro-default-viewer.js +4 -6
- package/es/kernel-and-terminal-panel/collapse/index.d.ts.map +1 -1
- package/es/kernel-and-terminal-panel/collapse/index.js +10 -9
- package/es/kernel-and-terminal-panel/kernel-and-terminal-panel-view.d.ts.map +1 -1
- package/es/kernel-and-terminal-panel/kernel-and-terminal-panel-view.js +6 -1
- package/es/kernel-and-terminal-panel/panel-command.d.ts.map +1 -1
- package/es/kernel-and-terminal-panel/panel-command.js +3 -2
- package/es/kernel-manager/index.d.ts.map +1 -1
- package/es/kernel-manager/index.js +7 -2
- package/es/lang-switcher/index.d.ts +7 -0
- package/es/lang-switcher/index.d.ts.map +1 -0
- package/es/lang-switcher/index.js +58 -0
- package/es/layout/footer/current-file-footer-view.d.ts.map +1 -1
- package/es/layout/footer/current-file-footer-view.js +2 -1
- package/es/layout/footer/status-footer-view.d.ts.map +1 -1
- package/es/layout/footer/status-footer-view.js +12 -11
- package/es/layout/layout-service.d.ts +2 -0
- package/es/layout/layout-service.d.ts.map +1 -1
- package/es/layout/layout-service.js +15 -4
- package/es/layout/layout.d.ts.map +1 -1
- package/es/layout/layout.js +3 -2
- package/es/module.d.ts.map +1 -1
- package/es/module.js +14 -1
- package/es/toc/libro-toc-panel-view.d.ts.map +1 -1
- package/es/toc/libro-toc-panel-view.js +7 -2
- package/es/welcome/entry-point-view.d.ts.map +1 -1
- package/es/welcome/entry-point-view.js +5 -4
- package/es/welcome/welcome-view.d.ts.map +1 -1
- package/es/welcome/welcome-view.js +8 -3
- package/package.json +13 -11
- package/src/command/lab-command.ts +31 -35
- package/src/command/{lab-menu-contribution.ts → lab-menu-contribution.tsx} +47 -39
- package/src/command/menu-bar-view.tsx +2 -1
- package/src/common/icon.tsx +0 -8
- package/src/editor-viewer/empty-icon.tsx +425 -0
- package/src/editor-viewer/empty.svg +136 -0
- package/src/editor-viewer/libro-default-viewer.tsx +7 -7
- package/src/kernel-and-terminal-panel/collapse/index.tsx +11 -10
- package/src/kernel-and-terminal-panel/kernel-and-terminal-panel-view.tsx +5 -1
- package/src/kernel-and-terminal-panel/panel-command.tsx +3 -2
- package/src/kernel-manager/index.tsx +3 -2
- package/src/lang-switcher/index.tsx +36 -0
- package/src/layout/footer/current-file-footer-view.tsx +2 -1
- package/src/layout/footer/status-footer-view.tsx +13 -13
- package/src/layout/layout-service.ts +7 -0
- package/src/layout/layout.tsx +3 -2
- package/src/module.tsx +17 -0
- package/src/toc/libro-toc-panel-view.tsx +3 -2
- package/src/welcome/entry-point-view.tsx +40 -37
- package/src/welcome/welcome-view.tsx +8 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lab-command.d.ts","sourceRoot":"","sources":["../../src/command/lab-command.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"lab-command.d.ts","sourceRoot":"","sources":["../../src/command/lab-command.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0IvB,CAAC"}
|
|
@@ -3,10 +3,6 @@ export var LabCommands = {
|
|
|
3
3
|
id: 'libro-lab-header-menu-help-about',
|
|
4
4
|
label: '关于'
|
|
5
5
|
},
|
|
6
|
-
// OpenTerminal: {
|
|
7
|
-
// id: 'libro-lab-header-menu-terminal-open',
|
|
8
|
-
// label: '新建终端',
|
|
9
|
-
// },
|
|
10
6
|
Save: {
|
|
11
7
|
id: 'libro-lab-save',
|
|
12
8
|
label: '保存',
|
|
@@ -18,126 +14,126 @@ export var LabCommands = {
|
|
|
18
14
|
},
|
|
19
15
|
RedoCellAction: {
|
|
20
16
|
id: 'libro-lab-header-menu-edit-redo-cell-action',
|
|
21
|
-
label:
|
|
17
|
+
label: '恢复 Cell 操作'
|
|
22
18
|
},
|
|
23
19
|
UndoCellAction: {
|
|
24
20
|
id: 'libro-lab-header-menu-edit-undo-cell-action',
|
|
25
|
-
label:
|
|
21
|
+
label: '撤销 Cell 操作'
|
|
26
22
|
},
|
|
27
23
|
CutCell: {
|
|
28
24
|
id: 'libro-lab-header-menu-edit-cut-cell',
|
|
29
|
-
label:
|
|
25
|
+
label: '剪切 Cell'
|
|
30
26
|
},
|
|
31
27
|
CopyCell: {
|
|
32
28
|
id: 'libro-lab-header-menu-edit-copy-cell',
|
|
33
|
-
label:
|
|
29
|
+
label: '复制 Cell'
|
|
34
30
|
},
|
|
35
31
|
PasteCellAbove: {
|
|
36
32
|
id: 'libro-lab-header-menu-edit-paste-cell-above',
|
|
37
|
-
label:
|
|
33
|
+
label: '在上方粘贴 Cell'
|
|
38
34
|
},
|
|
39
35
|
PasteCellBelow: {
|
|
40
36
|
id: 'libro-lab-header-menu-edit-paste-cell-below',
|
|
41
|
-
label:
|
|
37
|
+
label: '在下方粘贴 Cell'
|
|
42
38
|
},
|
|
43
39
|
PasteAndReplaceCell: {
|
|
44
40
|
id: 'libro-lab-header-menu-edit-paste-and-replace-cell',
|
|
45
|
-
label:
|
|
41
|
+
label: '粘贴 Cell 并替换'
|
|
46
42
|
},
|
|
47
43
|
DeleteCell: {
|
|
48
44
|
id: 'libro-lab-header-menu-edit-delete-cell',
|
|
49
|
-
label:
|
|
45
|
+
label: '删除 Cell'
|
|
50
46
|
},
|
|
51
47
|
SelectAll: {
|
|
52
48
|
id: 'libro-lab-header-menu-edit-select-all',
|
|
53
|
-
label:
|
|
49
|
+
label: '选择所有 Cell'
|
|
54
50
|
},
|
|
55
51
|
DeselectAll: {
|
|
56
52
|
id: 'libro-lab-header-menu-edit-deselect-all',
|
|
57
|
-
label:
|
|
53
|
+
label: '取消选择所有 Cell'
|
|
58
54
|
},
|
|
59
55
|
MoveCellUp: {
|
|
60
56
|
id: 'libro-lab-header-menu-edit-move-cell-up',
|
|
61
|
-
label:
|
|
57
|
+
label: '上移 Cell'
|
|
62
58
|
},
|
|
63
59
|
MoveCellDown: {
|
|
64
60
|
id: 'libro-lab-header-menu-edit-move-cell-down',
|
|
65
|
-
label:
|
|
61
|
+
label: '下移 Cell'
|
|
66
62
|
},
|
|
67
63
|
SplitCellAntCursor: {
|
|
68
64
|
id: 'libro-lab-header-menu-edit-split-cell-at-cursor',
|
|
69
|
-
label:
|
|
65
|
+
label: '切分 Cell'
|
|
70
66
|
},
|
|
71
67
|
MergeCellAbove: {
|
|
72
68
|
id: 'libro-lab-header-menu-edit-merge-cell-above',
|
|
73
|
-
label:
|
|
69
|
+
label: '合并上方 Cell'
|
|
74
70
|
},
|
|
75
71
|
MergeCellBelow: {
|
|
76
72
|
id: 'libro-lab-header-menu-edit-merge-cell-below',
|
|
77
|
-
label:
|
|
73
|
+
label: '合并下方 Cell'
|
|
78
74
|
},
|
|
79
75
|
MergeCells: {
|
|
80
76
|
id: 'libro-lab-header-menu-edit-merge-cells',
|
|
81
|
-
label:
|
|
77
|
+
label: '合并选中 Cell'
|
|
82
78
|
},
|
|
83
79
|
ClearCellOutput: {
|
|
84
80
|
id: 'libro-lab-header-menu-edit-clear-cell-outputs',
|
|
85
|
-
label:
|
|
81
|
+
label: '清空输出'
|
|
86
82
|
},
|
|
87
83
|
ClearAllCellOutput: {
|
|
88
84
|
id: 'libro-lab-header-menu-edit-clear-all-cell-outputs',
|
|
89
|
-
label:
|
|
85
|
+
label: '清空所有输出'
|
|
90
86
|
},
|
|
91
87
|
HideOrShowCellCode: {
|
|
92
88
|
id: 'libro-lab-header-menu-view-hide-or-show-cell-code',
|
|
93
|
-
label:
|
|
89
|
+
label: '隐藏/显示所选 Cell 代码'
|
|
94
90
|
},
|
|
95
91
|
HideOrShowOutputs: {
|
|
96
92
|
id: 'libro-lab-header-menu-view-hide-or-show-outputs',
|
|
97
|
-
label:
|
|
93
|
+
label: '隐藏/显示所选 Cell 输出'
|
|
98
94
|
},
|
|
99
95
|
EnableOutputScrolling: {
|
|
100
96
|
id: 'libro-lab-header-menu-view-enable-output-scrolling',
|
|
101
|
-
label:
|
|
97
|
+
label: '固定输出高度'
|
|
102
98
|
},
|
|
103
99
|
DisableOutputScrolling: {
|
|
104
100
|
id: 'libro-lab-header-menu-view-disable-output-scrolling',
|
|
105
|
-
label:
|
|
101
|
+
label: '取消固定输出高度'
|
|
106
102
|
},
|
|
107
103
|
RestartAndRunToSelected: {
|
|
108
104
|
id: 'libro-lab-header-menu-run-restart-and-run-to-selected',
|
|
109
|
-
label: '
|
|
105
|
+
label: '重启并运行至选中 Cell'
|
|
110
106
|
},
|
|
111
107
|
RestartRunAll: {
|
|
112
108
|
id: 'libro-lab-header-menu-run-restart-run-all',
|
|
113
|
-
label: '
|
|
109
|
+
label: '重启并运行全部 Cell'
|
|
114
110
|
},
|
|
115
111
|
RunAllAbove: {
|
|
116
112
|
id: 'libro-lab-header-menu-run-all-above',
|
|
117
|
-
label:
|
|
113
|
+
label: '运行之前所有 Cell'
|
|
118
114
|
},
|
|
119
115
|
RunAllBelow: {
|
|
120
116
|
id: 'libro-lab-header-menu-run-all-below',
|
|
121
|
-
label:
|
|
117
|
+
label: '运行当前及之后 Cell'
|
|
122
118
|
},
|
|
123
119
|
RunAllCells: {
|
|
124
120
|
id: 'libro-lab-header-menu-run-all-cells',
|
|
125
|
-
label:
|
|
121
|
+
label: '运行全部 Cell'
|
|
126
122
|
},
|
|
127
123
|
RunCell: {
|
|
128
124
|
id: 'libro-lab-header-menu-run-cell',
|
|
129
|
-
label:
|
|
125
|
+
label: '运行选中 Cell'
|
|
130
126
|
},
|
|
131
127
|
RunCellAndInsertBelow: {
|
|
132
128
|
id: 'libro-lab-header-menu-run-cell-and-insert-below',
|
|
133
|
-
label:
|
|
129
|
+
label: '运行选中并向下插入一个 Cell'
|
|
134
130
|
},
|
|
135
131
|
RunCellAndSelectNext: {
|
|
136
132
|
id: 'libro-lab-header-menu-run-cell-and-select-next',
|
|
137
|
-
label:
|
|
133
|
+
label: '运行并选中下一个 Cell'
|
|
138
134
|
},
|
|
139
135
|
ToggleBottom: {
|
|
140
136
|
id: 'libro-lab-toggle-bottom',
|
|
141
|
-
label:
|
|
137
|
+
label: '切换底部面板'
|
|
142
138
|
}
|
|
143
139
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lab-menu-contribution.d.ts","sourceRoot":"","sources":["../../src/command/lab-menu-contribution.
|
|
1
|
+
{"version":3,"file":"lab-menu-contribution.d.ts","sourceRoot":"","sources":["../../src/command/lab-menu-contribution.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,YAAY,EAEb,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAoB,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EACL,mBAAmB,EACnB,eAAe,EAGf,gBAAgB,EAEhB,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAI5D,yBAAiB,QAAQ,CAAC;IACjB,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,OACX,YAAW,gBAAgB,EAAE,mBAAmB,EAAE,sBAAsB;IAE/C,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,mBAAmB,CAAC,WAAW,EAAE,kBAAkB;IAOnD,aAAa,CAAC,IAAI,EAAE,YAAY;IAyLhC,gBAAgB,CAAC,QAAQ,EAAE,eAAe;CAknB3C"}
|
|
@@ -22,9 +22,11 @@ import { TerminalCommands, TerminalManager } from '@difizen/libro-terminal';
|
|
|
22
22
|
import { KeybindingContribution } from '@difizen/mana-app';
|
|
23
23
|
import { Saveable } from '@difizen/mana-app';
|
|
24
24
|
import { CommandContribution, CommandRegistry, inject, MAIN_MENU_BAR, MenuContribution, singleton, ViewManager } from '@difizen/mana-app';
|
|
25
|
+
import { l10n } from '@difizen/mana-l10n';
|
|
25
26
|
import { LibroLabLayoutSlots } from "../layout/index.js";
|
|
26
27
|
import { LayoutService } from "../layout/layout-service.js";
|
|
27
28
|
import { LabCommands } from "./lab-command.js";
|
|
29
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
28
30
|
export var LabMenus;
|
|
29
31
|
(function (_LabMenus) {
|
|
30
32
|
var FILE = _LabMenus.FILE = [].concat(_toConsumableArray(MAIN_MENU_BAR), ['1_file']);
|
|
@@ -57,87 +59,163 @@ export var LabMenu = (_dec = singleton({
|
|
|
57
59
|
key: "registerMenus",
|
|
58
60
|
value: function registerMenus(menu) {
|
|
59
61
|
menu.registerSubmenu(LabMenus.FILE, {
|
|
60
|
-
label:
|
|
62
|
+
label: function label() {
|
|
63
|
+
return /*#__PURE__*/_jsx("div", {
|
|
64
|
+
children: l10n.t('文件')
|
|
65
|
+
});
|
|
66
|
+
}
|
|
61
67
|
});
|
|
62
68
|
menu.registerSubmenu(LabMenus.EDIT, {
|
|
63
|
-
label:
|
|
69
|
+
label: function label() {
|
|
70
|
+
return /*#__PURE__*/_jsx("div", {
|
|
71
|
+
children: l10n.t('编辑')
|
|
72
|
+
});
|
|
73
|
+
}
|
|
64
74
|
});
|
|
65
75
|
menu.registerSubmenu(LabMenus.VIEW, {
|
|
66
|
-
label:
|
|
76
|
+
label: function label() {
|
|
77
|
+
return /*#__PURE__*/_jsx("div", {
|
|
78
|
+
children: l10n.t('视图')
|
|
79
|
+
});
|
|
80
|
+
}
|
|
67
81
|
});
|
|
68
82
|
menu.registerSubmenu(LabMenus.RUN, {
|
|
69
|
-
label:
|
|
83
|
+
label: function label() {
|
|
84
|
+
return /*#__PURE__*/_jsx("div", {
|
|
85
|
+
children: l10n.t('运行')
|
|
86
|
+
});
|
|
87
|
+
}
|
|
70
88
|
});
|
|
71
89
|
menu.registerSubmenu(LabMenus.TERMINAL, {
|
|
72
|
-
label:
|
|
90
|
+
label: function label() {
|
|
91
|
+
return /*#__PURE__*/_jsx("div", {
|
|
92
|
+
children: l10n.t('终端')
|
|
93
|
+
});
|
|
94
|
+
}
|
|
73
95
|
});
|
|
74
96
|
menu.registerSubmenu(LabMenus.HELP, {
|
|
75
|
-
label:
|
|
97
|
+
label: function label() {
|
|
98
|
+
return /*#__PURE__*/_jsx("div", {
|
|
99
|
+
children: l10n.t('帮助')
|
|
100
|
+
});
|
|
101
|
+
}
|
|
76
102
|
});
|
|
77
103
|
menu.registerMenuAction(LabMenus.TERMINAL, {
|
|
78
104
|
id: TerminalCommands['OpenTerminal'].id,
|
|
79
105
|
command: TerminalCommands['OpenTerminal'].id,
|
|
80
|
-
label:
|
|
106
|
+
label: function label() {
|
|
107
|
+
return /*#__PURE__*/_jsx("div", {
|
|
108
|
+
children: TerminalCommands['OpenTerminal'].label && l10n.t(TerminalCommands['OpenTerminal'].label)
|
|
109
|
+
});
|
|
110
|
+
}
|
|
81
111
|
});
|
|
82
112
|
menu.registerMenuAction(LabMenus.HELP, {
|
|
83
113
|
id: LabCommands.About.id,
|
|
84
114
|
command: LabCommands.About.id,
|
|
85
|
-
label:
|
|
115
|
+
label: function label() {
|
|
116
|
+
return /*#__PURE__*/_jsx("div", {
|
|
117
|
+
children: l10n.t(LabCommands.About.label)
|
|
118
|
+
});
|
|
119
|
+
}
|
|
86
120
|
});
|
|
87
121
|
menu.registerMenuAction(LabMenus.FILE, {
|
|
88
122
|
id: LabCommands.Save.id,
|
|
89
123
|
command: LabCommands.Save.id,
|
|
90
|
-
label:
|
|
124
|
+
label: function label() {
|
|
125
|
+
return /*#__PURE__*/_jsx("div", {
|
|
126
|
+
children: l10n.t(LabCommands.Save.label)
|
|
127
|
+
});
|
|
128
|
+
}
|
|
91
129
|
});
|
|
92
130
|
menu.registerMenuAction(LabMenus.FILE, {
|
|
93
131
|
id: LabCommands.CreateFile.id,
|
|
94
132
|
command: LabCommands.CreateFile.id,
|
|
95
|
-
label:
|
|
133
|
+
label: function label() {
|
|
134
|
+
return /*#__PURE__*/_jsx("div", {
|
|
135
|
+
children: l10n.t(LabCommands.CreateFile.label)
|
|
136
|
+
});
|
|
137
|
+
}
|
|
96
138
|
});
|
|
97
139
|
menu.registerMenuAction(LabMenus.EDIT, {
|
|
98
140
|
id: LabCommands.UndoCellAction.id,
|
|
99
141
|
command: LabCommands.UndoCellAction.id,
|
|
100
|
-
label:
|
|
142
|
+
label: function label() {
|
|
143
|
+
return /*#__PURE__*/_jsx("div", {
|
|
144
|
+
children: l10n.t(LabCommands.UndoCellAction.label)
|
|
145
|
+
});
|
|
146
|
+
}
|
|
101
147
|
});
|
|
102
148
|
menu.registerMenuAction(LabMenus.EDIT, {
|
|
103
149
|
id: LabCommands.RedoCellAction.id,
|
|
104
150
|
command: LabCommands.RedoCellAction.id,
|
|
105
|
-
label:
|
|
151
|
+
label: function label() {
|
|
152
|
+
return /*#__PURE__*/_jsx("div", {
|
|
153
|
+
children: l10n.t(LabCommands.RedoCellAction.label)
|
|
154
|
+
});
|
|
155
|
+
}
|
|
106
156
|
});
|
|
107
157
|
menu.registerMenuAction(LabMenus.EDIT, {
|
|
108
158
|
id: LabCommands.CutCell.id,
|
|
109
159
|
command: LabCommands.CutCell.id,
|
|
110
|
-
label:
|
|
160
|
+
label: function label() {
|
|
161
|
+
return /*#__PURE__*/_jsx("div", {
|
|
162
|
+
children: l10n.t(LabCommands.CutCell.label)
|
|
163
|
+
});
|
|
164
|
+
}
|
|
111
165
|
});
|
|
112
166
|
menu.registerMenuAction(LabMenus.EDIT, {
|
|
113
167
|
id: LabCommands.CopyCell.id,
|
|
114
168
|
command: LabCommands.CopyCell.id,
|
|
115
|
-
label:
|
|
169
|
+
label: function label() {
|
|
170
|
+
return /*#__PURE__*/_jsx("div", {
|
|
171
|
+
children: l10n.t(LabCommands.CopyCell.label)
|
|
172
|
+
});
|
|
173
|
+
}
|
|
116
174
|
});
|
|
117
175
|
menu.registerMenuAction(LabMenus.EDIT, {
|
|
118
176
|
id: LabCommands.PasteCellBelow.id,
|
|
119
177
|
command: LabCommands.PasteCellBelow.id,
|
|
120
|
-
label:
|
|
178
|
+
label: function label() {
|
|
179
|
+
return /*#__PURE__*/_jsx("div", {
|
|
180
|
+
children: l10n.t(LabCommands.PasteCellBelow.label)
|
|
181
|
+
});
|
|
182
|
+
}
|
|
121
183
|
});
|
|
122
184
|
menu.registerMenuAction(LabMenus.EDIT, {
|
|
123
185
|
id: LabCommands.PasteCellAbove.id,
|
|
124
186
|
command: LabCommands.PasteCellAbove.id,
|
|
125
|
-
label:
|
|
187
|
+
label: function label() {
|
|
188
|
+
return /*#__PURE__*/_jsx("div", {
|
|
189
|
+
children: l10n.t(LabCommands.PasteCellAbove.label)
|
|
190
|
+
});
|
|
191
|
+
}
|
|
126
192
|
});
|
|
127
193
|
menu.registerMenuAction(LabMenus.EDIT, {
|
|
128
194
|
id: LabCommands.PasteAndReplaceCell.id,
|
|
129
195
|
command: LabCommands.PasteAndReplaceCell.id,
|
|
130
|
-
label:
|
|
196
|
+
label: function label() {
|
|
197
|
+
return /*#__PURE__*/_jsx("div", {
|
|
198
|
+
children: l10n.t(LabCommands.PasteAndReplaceCell.label)
|
|
199
|
+
});
|
|
200
|
+
}
|
|
131
201
|
});
|
|
132
202
|
menu.registerMenuAction(LabMenus.EDIT, {
|
|
133
203
|
id: LabCommands.DeleteCell.id,
|
|
134
204
|
command: LabCommands.DeleteCell.id,
|
|
135
|
-
label:
|
|
205
|
+
label: function label() {
|
|
206
|
+
return /*#__PURE__*/_jsx("div", {
|
|
207
|
+
children: l10n.t(LabCommands.DeleteCell.label)
|
|
208
|
+
});
|
|
209
|
+
}
|
|
136
210
|
});
|
|
137
211
|
menu.registerMenuAction(LabMenus.EDIT, {
|
|
138
212
|
id: LabCommands.SelectAll.id,
|
|
139
213
|
command: LabCommands.SelectAll.id,
|
|
140
|
-
label:
|
|
214
|
+
label: function label() {
|
|
215
|
+
return /*#__PURE__*/_jsx("div", {
|
|
216
|
+
children: l10n.t(LabCommands.SelectAll.label)
|
|
217
|
+
});
|
|
218
|
+
}
|
|
141
219
|
});
|
|
142
220
|
// menu.registerMenuAction(HeaderMenus.EDIT, {
|
|
143
221
|
// id: LabCommands.DeselectAll.id,
|
|
@@ -147,102 +225,182 @@ export var LabMenu = (_dec = singleton({
|
|
|
147
225
|
menu.registerMenuAction(LabMenus.EDIT, {
|
|
148
226
|
id: LabCommands.MoveCellUp.id,
|
|
149
227
|
command: LabCommands.MoveCellUp.id,
|
|
150
|
-
label:
|
|
228
|
+
label: function label() {
|
|
229
|
+
return /*#__PURE__*/_jsx("div", {
|
|
230
|
+
children: l10n.t(LabCommands.MoveCellUp.label)
|
|
231
|
+
});
|
|
232
|
+
}
|
|
151
233
|
});
|
|
152
234
|
menu.registerMenuAction(LabMenus.EDIT, {
|
|
153
235
|
id: LabCommands.MoveCellDown.id,
|
|
154
236
|
command: LabCommands.MoveCellDown.id,
|
|
155
|
-
label:
|
|
237
|
+
label: function label() {
|
|
238
|
+
return /*#__PURE__*/_jsx("div", {
|
|
239
|
+
children: l10n.t(LabCommands.MoveCellDown.label)
|
|
240
|
+
});
|
|
241
|
+
}
|
|
156
242
|
});
|
|
157
243
|
menu.registerMenuAction(LabMenus.EDIT, {
|
|
158
244
|
id: LabCommands.SplitCellAntCursor.id,
|
|
159
245
|
command: LabCommands.SplitCellAntCursor.id,
|
|
160
|
-
label:
|
|
246
|
+
label: function label() {
|
|
247
|
+
return /*#__PURE__*/_jsx("div", {
|
|
248
|
+
children: l10n.t(LabCommands.SplitCellAntCursor.label)
|
|
249
|
+
});
|
|
250
|
+
}
|
|
161
251
|
});
|
|
162
252
|
menu.registerMenuAction(LabMenus.EDIT, {
|
|
163
253
|
id: LabCommands.MergeCells.id,
|
|
164
254
|
command: LabCommands.MergeCells.id,
|
|
165
|
-
label:
|
|
255
|
+
label: function label() {
|
|
256
|
+
return /*#__PURE__*/_jsx("div", {
|
|
257
|
+
children: l10n.t(LabCommands.MergeCells.label)
|
|
258
|
+
});
|
|
259
|
+
}
|
|
166
260
|
});
|
|
167
261
|
menu.registerMenuAction(LabMenus.EDIT, {
|
|
168
262
|
id: LabCommands.MergeCellAbove.id,
|
|
169
263
|
command: LabCommands.MergeCellAbove.id,
|
|
170
|
-
label:
|
|
264
|
+
label: function label() {
|
|
265
|
+
return /*#__PURE__*/_jsx("div", {
|
|
266
|
+
children: l10n.t(LabCommands.MergeCellAbove.label)
|
|
267
|
+
});
|
|
268
|
+
}
|
|
171
269
|
});
|
|
172
270
|
menu.registerMenuAction(LabMenus.EDIT, {
|
|
173
271
|
id: LabCommands.MergeCellBelow.id,
|
|
174
272
|
command: LabCommands.MergeCellBelow.id,
|
|
175
|
-
label:
|
|
273
|
+
label: function label() {
|
|
274
|
+
return /*#__PURE__*/_jsx("div", {
|
|
275
|
+
children: l10n.t(LabCommands.MergeCellBelow.label)
|
|
276
|
+
});
|
|
277
|
+
}
|
|
176
278
|
});
|
|
177
279
|
menu.registerMenuAction(LabMenus.EDIT, {
|
|
178
280
|
id: LabCommands.ClearCellOutput.id,
|
|
179
281
|
command: LabCommands.ClearCellOutput.id,
|
|
180
|
-
label:
|
|
282
|
+
label: function label() {
|
|
283
|
+
return /*#__PURE__*/_jsx("div", {
|
|
284
|
+
children: l10n.t(LabCommands.ClearCellOutput.label)
|
|
285
|
+
});
|
|
286
|
+
}
|
|
181
287
|
});
|
|
182
288
|
menu.registerMenuAction(LabMenus.EDIT, {
|
|
183
289
|
id: LabCommands.ClearAllCellOutput.id,
|
|
184
290
|
command: LabCommands.ClearAllCellOutput.id,
|
|
185
|
-
label:
|
|
291
|
+
label: function label() {
|
|
292
|
+
return /*#__PURE__*/_jsx("div", {
|
|
293
|
+
children: l10n.t(LabCommands.ClearAllCellOutput.label)
|
|
294
|
+
});
|
|
295
|
+
}
|
|
186
296
|
});
|
|
187
297
|
menu.registerMenuAction(LabMenus.VIEW, {
|
|
188
298
|
id: LabCommands.HideOrShowCellCode.id,
|
|
189
299
|
command: LabCommands.HideOrShowCellCode.id,
|
|
190
|
-
label:
|
|
300
|
+
label: function label() {
|
|
301
|
+
return /*#__PURE__*/_jsx("div", {
|
|
302
|
+
children: l10n.t(LabCommands.HideOrShowCellCode.label)
|
|
303
|
+
});
|
|
304
|
+
}
|
|
191
305
|
});
|
|
192
306
|
menu.registerMenuAction(LabMenus.VIEW, {
|
|
193
307
|
id: LabCommands.HideOrShowOutputs.id,
|
|
194
308
|
command: LabCommands.HideOrShowOutputs.id,
|
|
195
|
-
label:
|
|
309
|
+
label: function label() {
|
|
310
|
+
return /*#__PURE__*/_jsx("div", {
|
|
311
|
+
children: l10n.t(LabCommands.HideOrShowOutputs.label)
|
|
312
|
+
});
|
|
313
|
+
}
|
|
196
314
|
});
|
|
197
315
|
menu.registerMenuAction(LabMenus.VIEW, {
|
|
198
316
|
id: LabCommands.EnableOutputScrolling.id,
|
|
199
317
|
command: LabCommands.EnableOutputScrolling.id,
|
|
200
|
-
label:
|
|
318
|
+
label: function label() {
|
|
319
|
+
return /*#__PURE__*/_jsx("div", {
|
|
320
|
+
children: l10n.t(LabCommands.EnableOutputScrolling.label)
|
|
321
|
+
});
|
|
322
|
+
}
|
|
201
323
|
});
|
|
202
324
|
menu.registerMenuAction(LabMenus.VIEW, {
|
|
203
325
|
id: LabCommands.DisableOutputScrolling.id,
|
|
204
326
|
command: LabCommands.DisableOutputScrolling.id,
|
|
205
|
-
label:
|
|
327
|
+
label: function label() {
|
|
328
|
+
return /*#__PURE__*/_jsx("div", {
|
|
329
|
+
children: l10n.t(LabCommands.DisableOutputScrolling.label)
|
|
330
|
+
});
|
|
331
|
+
}
|
|
206
332
|
});
|
|
207
333
|
menu.registerMenuAction(LabMenus.RUN, {
|
|
208
334
|
id: LabCommands.RunCell.id,
|
|
209
335
|
command: LabCommands.RunCell.id,
|
|
210
|
-
label:
|
|
336
|
+
label: function label() {
|
|
337
|
+
return /*#__PURE__*/_jsx("div", {
|
|
338
|
+
children: l10n.t(LabCommands.RunCell.label)
|
|
339
|
+
});
|
|
340
|
+
}
|
|
211
341
|
});
|
|
212
342
|
menu.registerMenuAction(LabMenus.RUN, {
|
|
213
343
|
id: LabCommands.RunAllAbove.id,
|
|
214
344
|
command: LabCommands.RunAllAbove.id,
|
|
215
|
-
label:
|
|
345
|
+
label: function label() {
|
|
346
|
+
return /*#__PURE__*/_jsx("div", {
|
|
347
|
+
children: l10n.t(LabCommands.RunAllAbove.label)
|
|
348
|
+
});
|
|
349
|
+
}
|
|
216
350
|
});
|
|
217
351
|
menu.registerMenuAction(LabMenus.RUN, {
|
|
218
352
|
id: LabCommands.RunAllBelow.id,
|
|
219
353
|
command: LabCommands.RunAllBelow.id,
|
|
220
|
-
label:
|
|
354
|
+
label: function label() {
|
|
355
|
+
return /*#__PURE__*/_jsx("div", {
|
|
356
|
+
children: l10n.t(LabCommands.RunAllBelow.label)
|
|
357
|
+
});
|
|
358
|
+
}
|
|
221
359
|
});
|
|
222
360
|
menu.registerMenuAction(LabMenus.RUN, {
|
|
223
361
|
id: LabCommands.RunAllCells.id,
|
|
224
362
|
command: LabCommands.RunAllCells.id,
|
|
225
|
-
label:
|
|
363
|
+
label: function label() {
|
|
364
|
+
return /*#__PURE__*/_jsx("div", {
|
|
365
|
+
children: l10n.t(LabCommands.RunAllCells.label)
|
|
366
|
+
});
|
|
367
|
+
}
|
|
226
368
|
});
|
|
227
369
|
menu.registerMenuAction(LabMenus.RUN, {
|
|
228
370
|
id: LabCommands.RunCellAndSelectNext.id,
|
|
229
371
|
command: LabCommands.RunCellAndSelectNext.id,
|
|
230
|
-
label:
|
|
372
|
+
label: function label() {
|
|
373
|
+
return /*#__PURE__*/_jsx("div", {
|
|
374
|
+
children: l10n.t(LabCommands.RunCellAndSelectNext.label)
|
|
375
|
+
});
|
|
376
|
+
}
|
|
231
377
|
});
|
|
232
378
|
menu.registerMenuAction(LabMenus.RUN, {
|
|
233
379
|
id: LabCommands.RunCellAndInsertBelow.id,
|
|
234
380
|
command: LabCommands.RunCellAndInsertBelow.id,
|
|
235
|
-
label:
|
|
381
|
+
label: function label() {
|
|
382
|
+
return /*#__PURE__*/_jsx("div", {
|
|
383
|
+
children: l10n.t(LabCommands.RunCellAndInsertBelow.label)
|
|
384
|
+
});
|
|
385
|
+
}
|
|
236
386
|
});
|
|
237
387
|
menu.registerMenuAction(LabMenus.RUN, {
|
|
238
388
|
id: LabCommands.RestartRunAll.id,
|
|
239
389
|
command: LabCommands.RestartRunAll.id,
|
|
240
|
-
label:
|
|
390
|
+
label: function label() {
|
|
391
|
+
return /*#__PURE__*/_jsx("div", {
|
|
392
|
+
children: l10n.t(LabCommands.RestartRunAll.label)
|
|
393
|
+
});
|
|
394
|
+
}
|
|
241
395
|
});
|
|
242
396
|
menu.registerMenuAction(LabMenus.RUN, {
|
|
243
397
|
id: LabCommands.RestartAndRunToSelected.id,
|
|
244
398
|
command: LabCommands.RestartAndRunToSelected.id,
|
|
245
|
-
label:
|
|
399
|
+
label: function label() {
|
|
400
|
+
return /*#__PURE__*/_jsx("div", {
|
|
401
|
+
children: l10n.t(LabCommands.RestartAndRunToSelected.label)
|
|
402
|
+
});
|
|
403
|
+
}
|
|
246
404
|
});
|
|
247
405
|
}
|
|
248
406
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-bar-view.d.ts","sourceRoot":"","sources":["../../src/command/menu-bar-view.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,QAAQ,EAMT,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"menu-bar-view.d.ts","sourceRoot":"","sources":["../../src/command/menu-bar-view.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,QAAQ,EAMT,MAAM,mBAAmB,CAAC;AAI3B,eAAO,MAAM,oBAAoB,mFAE/B,CAAC;AAEH,qBAEa,WAAY,SAAQ,QAAQ;IAC9B,IAAI,oFAAwB;IAErC,KAAK,SAAK;;CAOX"}
|
|
@@ -17,6 +17,7 @@ function _applyDecoratedDescriptor(target, property, decorators, descriptor, con
|
|
|
17
17
|
function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }
|
|
18
18
|
import { MacCommandOutlined } from '@ant-design/icons';
|
|
19
19
|
import { BaseView, MAIN_MENU_BAR, MenuBarRender, prop, singleton, view } from '@difizen/mana-app';
|
|
20
|
+
import { l10n } from '@difizen/mana-l10n';
|
|
20
21
|
import { forwardRef } from 'react';
|
|
21
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
23
|
export var ManaMenubarComponent = /*#__PURE__*/forwardRef(function GithubLinkComponent() {
|
|
@@ -34,7 +35,11 @@ export var MenuBarView = (_dec = singleton(), _dec2 = view('MenuBarView'), _dec3
|
|
|
34
35
|
_this.view = ManaMenubarComponent;
|
|
35
36
|
_initializerDefineProperty(_this, "count", _descriptor, _assertThisInitialized(_this));
|
|
36
37
|
_this.title.icon = MacCommandOutlined;
|
|
37
|
-
_this.title.label =
|
|
38
|
+
_this.title.label = function () {
|
|
39
|
+
return /*#__PURE__*/_jsx("div", {
|
|
40
|
+
children: l10n.t('菜单')
|
|
41
|
+
});
|
|
42
|
+
};
|
|
38
43
|
_this.id = 'menu-bar';
|
|
39
44
|
return _this;
|
|
40
45
|
}
|
package/es/common/icon.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../src/common/icon.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../src/common/icon.tsx"],"names":[],"mappings":"AACA,OAAO,cAAc,CAAC;AAEtB,UAAU,MAAM;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AACD,wBAAgB,IAAI,CAAC,KAAK,EAAE,MAAM,2CAiCjC;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,2CAmCpC;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,2CA6BrC;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,2CA8EzC;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,2CAyC3C;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,2CA6CxC;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,2CAsCrC;AAED,wBAAgB,iBAAiB,4CA2ChC;AAED,wBAAgB,UAAU,4CAkDzB;AAED,wBAAgB,eAAe,4CAmD9B;AAED,wBAAgB,aAAa,4CAsD5B;AAED,wBAAgB,eAAe,4CAE9B;AAED,wBAAgB,UAAU,4CA0CzB"}
|