@difizen/libro-lab 0.2.35-next.0 → 0.2.36

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.
Files changed (63) hide show
  1. package/es/command/lab-command.d.ts.map +1 -1
  2. package/es/command/lab-command.js +31 -35
  3. package/es/command/lab-menu-contribution.d.ts.map +1 -1
  4. package/es/command/lab-menu-contribution.js +197 -39
  5. package/es/command/menu-bar-view.d.ts.map +1 -1
  6. package/es/command/menu-bar-view.js +6 -1
  7. package/es/common/icon.d.ts.map +1 -1
  8. package/es/common/icon.js +21 -36
  9. package/es/editor-viewer/empty-icon.d.ts +3 -0
  10. package/es/editor-viewer/empty-icon.d.ts.map +1 -0
  11. package/es/editor-viewer/empty-icon.js +495 -0
  12. package/es/editor-viewer/empty.svg +136 -0
  13. package/es/editor-viewer/libro-default-viewer.d.ts.map +1 -1
  14. package/es/editor-viewer/libro-default-viewer.js +4 -6
  15. package/es/kernel-and-terminal-panel/collapse/index.d.ts.map +1 -1
  16. package/es/kernel-and-terminal-panel/collapse/index.js +10 -9
  17. package/es/kernel-and-terminal-panel/kernel-and-terminal-panel-view.d.ts.map +1 -1
  18. package/es/kernel-and-terminal-panel/kernel-and-terminal-panel-view.js +6 -1
  19. package/es/kernel-and-terminal-panel/panel-command.d.ts.map +1 -1
  20. package/es/kernel-and-terminal-panel/panel-command.js +3 -2
  21. package/es/kernel-manager/index.d.ts.map +1 -1
  22. package/es/kernel-manager/index.js +7 -2
  23. package/es/lang-switcher/index.d.ts +7 -0
  24. package/es/lang-switcher/index.d.ts.map +1 -0
  25. package/es/lang-switcher/index.js +58 -0
  26. package/es/layout/footer/current-file-footer-view.d.ts.map +1 -1
  27. package/es/layout/footer/current-file-footer-view.js +2 -1
  28. package/es/layout/footer/status-footer-view.d.ts.map +1 -1
  29. package/es/layout/footer/status-footer-view.js +12 -11
  30. package/es/layout/layout-service.d.ts +2 -0
  31. package/es/layout/layout-service.d.ts.map +1 -1
  32. package/es/layout/layout-service.js +15 -4
  33. package/es/layout/layout.d.ts.map +1 -1
  34. package/es/layout/layout.js +3 -2
  35. package/es/module.d.ts.map +1 -1
  36. package/es/module.js +14 -1
  37. package/es/toc/libro-toc-panel-view.d.ts.map +1 -1
  38. package/es/toc/libro-toc-panel-view.js +7 -2
  39. package/es/welcome/entry-point-view.d.ts.map +1 -1
  40. package/es/welcome/entry-point-view.js +5 -4
  41. package/es/welcome/welcome-view.d.ts.map +1 -1
  42. package/es/welcome/welcome-view.js +8 -3
  43. package/package.json +13 -11
  44. package/src/command/lab-command.ts +31 -35
  45. package/src/command/{lab-menu-contribution.ts → lab-menu-contribution.tsx} +47 -39
  46. package/src/command/menu-bar-view.tsx +2 -1
  47. package/src/common/icon.tsx +0 -8
  48. package/src/editor-viewer/empty-icon.tsx +425 -0
  49. package/src/editor-viewer/empty.svg +136 -0
  50. package/src/editor-viewer/libro-default-viewer.tsx +7 -7
  51. package/src/kernel-and-terminal-panel/collapse/index.tsx +11 -10
  52. package/src/kernel-and-terminal-panel/kernel-and-terminal-panel-view.tsx +5 -1
  53. package/src/kernel-and-terminal-panel/panel-command.tsx +3 -2
  54. package/src/kernel-manager/index.tsx +3 -2
  55. package/src/lang-switcher/index.tsx +36 -0
  56. package/src/layout/footer/current-file-footer-view.tsx +2 -1
  57. package/src/layout/footer/status-footer-view.tsx +13 -13
  58. package/src/layout/layout-service.ts +7 -0
  59. package/src/layout/layout.tsx +3 -2
  60. package/src/module.tsx +17 -0
  61. package/src/toc/libro-toc-panel-view.tsx +3 -2
  62. package/src/welcome/entry-point-view.tsx +40 -37
  63. 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8IvB,CAAC"}
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: "\u6062\u590D\u5355\u5143\u683C\u64CD\u4F5C"
17
+ label: '恢复 Cell 操作'
22
18
  },
23
19
  UndoCellAction: {
24
20
  id: 'libro-lab-header-menu-edit-undo-cell-action',
25
- label: "\u64A4\u9500\u5355\u5143\u683C\u64CD\u4F5C"
21
+ label: '撤销 Cell 操作'
26
22
  },
27
23
  CutCell: {
28
24
  id: 'libro-lab-header-menu-edit-cut-cell',
29
- label: "\u526A\u5207\u5355\u5143\u683C"
25
+ label: '剪切 Cell'
30
26
  },
31
27
  CopyCell: {
32
28
  id: 'libro-lab-header-menu-edit-copy-cell',
33
- label: "\u590D\u5236\u5355\u5143\u683C"
29
+ label: '复制 Cell'
34
30
  },
35
31
  PasteCellAbove: {
36
32
  id: 'libro-lab-header-menu-edit-paste-cell-above',
37
- label: "\u5728\u4E0A\u65B9\u7C98\u8D34\u5355\u5143\u683C"
33
+ label: '在上方粘贴 Cell'
38
34
  },
39
35
  PasteCellBelow: {
40
36
  id: 'libro-lab-header-menu-edit-paste-cell-below',
41
- label: "\u5728\u4E0B\u65B9\u7C98\u8D34\u5355\u5143\u683C"
37
+ label: '在下方粘贴 Cell'
42
38
  },
43
39
  PasteAndReplaceCell: {
44
40
  id: 'libro-lab-header-menu-edit-paste-and-replace-cell',
45
- label: "\u7C98\u8D34\u5355\u5143\u683C\u5E76\u66FF\u6362"
41
+ label: '粘贴 Cell 并替换'
46
42
  },
47
43
  DeleteCell: {
48
44
  id: 'libro-lab-header-menu-edit-delete-cell',
49
- label: "\u5220\u9664\u5355\u5143\u683C"
45
+ label: '删除 Cell'
50
46
  },
51
47
  SelectAll: {
52
48
  id: 'libro-lab-header-menu-edit-select-all',
53
- label: "\u9009\u62E9\u6240\u6709\u5355\u5143\u683C"
49
+ label: '选择所有 Cell'
54
50
  },
55
51
  DeselectAll: {
56
52
  id: 'libro-lab-header-menu-edit-deselect-all',
57
- label: "\u53D6\u6D88\u9009\u62E9\u6240\u6709\u5355\u5143\u683C"
53
+ label: '取消选择所有 Cell'
58
54
  },
59
55
  MoveCellUp: {
60
56
  id: 'libro-lab-header-menu-edit-move-cell-up',
61
- label: "\u4E0A\u79FB\u5355\u5143\u683C"
57
+ label: '上移 Cell'
62
58
  },
63
59
  MoveCellDown: {
64
60
  id: 'libro-lab-header-menu-edit-move-cell-down',
65
- label: "\u4E0B\u79FB\u5355\u5143\u683C"
61
+ label: '下移 Cell'
66
62
  },
67
63
  SplitCellAntCursor: {
68
64
  id: 'libro-lab-header-menu-edit-split-cell-at-cursor',
69
- label: "\u5207\u5206\u5355\u5143\u683C"
65
+ label: '切分 Cell'
70
66
  },
71
67
  MergeCellAbove: {
72
68
  id: 'libro-lab-header-menu-edit-merge-cell-above',
73
- label: "\u5408\u5E76\u4E0A\u65B9\u5355\u5143\u683C"
69
+ label: '合并上方 Cell'
74
70
  },
75
71
  MergeCellBelow: {
76
72
  id: 'libro-lab-header-menu-edit-merge-cell-below',
77
- label: "\u5408\u5E76\u4E0B\u65B9\u5355\u5143\u683C"
73
+ label: '合并下方 Cell'
78
74
  },
79
75
  MergeCells: {
80
76
  id: 'libro-lab-header-menu-edit-merge-cells',
81
- label: "\u5408\u5E76\u9009\u4E2D\u5355\u5143\u683C"
77
+ label: '合并选中 Cell'
82
78
  },
83
79
  ClearCellOutput: {
84
80
  id: 'libro-lab-header-menu-edit-clear-cell-outputs',
85
- label: "\u6E05\u7A7A\u8F93\u51FA"
81
+ label: '清空输出'
86
82
  },
87
83
  ClearAllCellOutput: {
88
84
  id: 'libro-lab-header-menu-edit-clear-all-cell-outputs',
89
- label: "\u6E05\u7A7A\u6240\u6709\u8F93\u51FA"
85
+ label: '清空所有输出'
90
86
  },
91
87
  HideOrShowCellCode: {
92
88
  id: 'libro-lab-header-menu-view-hide-or-show-cell-code',
93
- label: "\u9690\u85CF/\u663E\u793A\u6240\u9009\u5355\u5143\u683C\u4EE3\u7801"
89
+ label: '隐藏/显示所选 Cell 代码'
94
90
  },
95
91
  HideOrShowOutputs: {
96
92
  id: 'libro-lab-header-menu-view-hide-or-show-outputs',
97
- label: "\u9690\u85CF/\u663E\u793A\u6240\u9009\u5355\u5143\u683C\u8F93\u51FA"
93
+ label: '隐藏/显示所选 Cell 输出'
98
94
  },
99
95
  EnableOutputScrolling: {
100
96
  id: 'libro-lab-header-menu-view-enable-output-scrolling',
101
- label: "\u56FA\u5B9A\u8F93\u51FA\u9AD8\u5EA6"
97
+ label: '固定输出高度'
102
98
  },
103
99
  DisableOutputScrolling: {
104
100
  id: 'libro-lab-header-menu-view-disable-output-scrolling',
105
- label: "\u53D6\u6D88\u56FA\u5B9A\u8F93\u51FA\u9AD8\u5EA6"
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: "\u6267\u884C\u4E0A\u65B9\u6240\u6709\u5355\u5143\u683C"
113
+ label: '运行之前所有 Cell'
118
114
  },
119
115
  RunAllBelow: {
120
116
  id: 'libro-lab-header-menu-run-all-below',
121
- label: "\u6267\u884C\u4E0B\u65B9\u6240\u6709\u5355\u5143\u683C"
117
+ label: '运行当前及之后 Cell'
122
118
  },
123
119
  RunAllCells: {
124
120
  id: 'libro-lab-header-menu-run-all-cells',
125
- label: "\u6267\u884C\u5168\u90E8\u5355\u5143\u683C"
121
+ label: '运行全部 Cell'
126
122
  },
127
123
  RunCell: {
128
124
  id: 'libro-lab-header-menu-run-cell',
129
- label: "\u6267\u884C\u9009\u4E2D\u5355\u5143\u683C"
125
+ label: '运行选中 Cell'
130
126
  },
131
127
  RunCellAndInsertBelow: {
132
128
  id: 'libro-lab-header-menu-run-cell-and-insert-below',
133
- label: "\u6267\u884C\u9009\u4E2D\u5E76\u5411\u4E0B\u63D2\u5165\u4E00\u4E2A\u5355\u5143\u683C"
129
+ label: '运行选中并向下插入一个 Cell'
134
130
  },
135
131
  RunCellAndSelectNext: {
136
132
  id: 'libro-lab-header-menu-run-cell-and-select-next',
137
- label: "\u6267\u884C\u5E76\u9009\u4E2D\u4E0B\u4E00\u4E2A\u5355\u5143\u683C"
133
+ label: '运行并选中下一个 Cell'
138
134
  },
139
135
  ToggleBottom: {
140
136
  id: 'libro-lab-toggle-bottom',
141
- label: "\u5207\u6362\u5E95\u90E8\u9762\u677F"
137
+ label: '切换底部面板'
142
138
  }
143
139
  };
@@ -1 +1 @@
1
- {"version":3,"file":"lab-menu-contribution.d.ts","sourceRoot":"","sources":["../../src/command/lab-menu-contribution.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,YAAY,EAEb,MAAM,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AAC;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: TerminalCommands['OpenTerminal'].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: LabCommands.About.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: LabCommands.Save.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: LabCommands.CreateFile.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: LabCommands.UndoCellAction.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: LabCommands.RedoCellAction.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: LabCommands.CutCell.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: LabCommands.CopyCell.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: LabCommands.PasteCellBelow.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: LabCommands.PasteCellAbove.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: LabCommands.PasteAndReplaceCell.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: LabCommands.DeleteCell.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: LabCommands.SelectAll.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: LabCommands.MoveCellUp.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: LabCommands.MoveCellDown.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: LabCommands.SplitCellAntCursor.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: LabCommands.MergeCells.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: LabCommands.MergeCellAbove.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: LabCommands.MergeCellBelow.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: LabCommands.ClearCellOutput.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: LabCommands.ClearAllCellOutput.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: LabCommands.HideOrShowCellCode.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: LabCommands.HideOrShowOutputs.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: LabCommands.EnableOutputScrolling.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: LabCommands.DisableOutputScrolling.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: LabCommands.RunCell.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: LabCommands.RunAllAbove.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: LabCommands.RunAllBelow.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: LabCommands.RunAllCells.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: LabCommands.RunCellAndSelectNext.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: LabCommands.RunCellAndInsertBelow.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: LabCommands.RestartRunAll.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: LabCommands.RestartAndRunToSelected.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;AAG3B,eAAO,MAAM,oBAAoB,mFAE/B,CAAC;AAEH,qBAEa,WAAY,SAAQ,QAAQ;IAC9B,IAAI,oFAAwB;IAErC,KAAK,SAAK;;CAOX"}
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
  }
@@ -1 +1 @@
1
- {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../src/common/icon.tsx"],"names":[],"mappings":"AAEA,OAAO,cAAc,CAAC;AAEtB,UAAU,MAAM;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,C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