@difizen/libro-jupyter 0.2.35-next.0 → 0.2.35

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.
@@ -1 +1 @@
1
- {"version":3,"file":"add-between-cell.d.ts","sourceRoot":"","sources":["../../src/add-between-cell/add-between-cell.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAA0B,MAAM,qBAAqB,CAAC;AAUvF,OAAO,cAAc,CAAC;AA0BtB,eAAO,MAAM,6BAA6B,EAAE,mBA+J3C,CAAC;AAEF,eAAO,MAAM,8BAA8B,EAAE,mBAW5C,CAAC"}
1
+ {"version":3,"file":"add-between-cell.d.ts","sourceRoot":"","sources":["../../src/add-between-cell/add-between-cell.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAA0B,MAAM,qBAAqB,CAAC;AAUvF,OAAO,cAAc,CAAC;AA0BtB,eAAO,MAAM,6BAA6B,EAAE,mBAkK3C,CAAC;AAEF,eAAO,MAAM,8BAA8B,EAAE,mBAW5C,CAAC"}
@@ -112,8 +112,6 @@ export var LibroCommonBetweenCellContent = /*#__PURE__*/forwardRef(function Libr
112
112
  }, []);
113
113
  var items = cellsMeta.filter(function (item) {
114
114
  return item.type !== 'raw';
115
- }).sort(function (a, b) {
116
- return a.order.localeCompare(b.order);
117
115
  }).map(function (item) {
118
116
  return {
119
117
  label: item.name,
@@ -142,6 +140,7 @@ export var LibroCommonBetweenCellContent = /*#__PURE__*/forwardRef(function Libr
142
140
  });
143
141
  return /*#__PURE__*/_jsxs("div", {
144
142
  className: "libro-add-between-cell",
143
+ tabIndex: 0,
145
144
  children: [/*#__PURE__*/_jsx(Popover, {
146
145
  content: /*#__PURE__*/_jsx(Menu, {
147
146
  items: items
@@ -155,20 +154,24 @@ export var LibroCommonBetweenCellContent = /*#__PURE__*/forwardRef(function Libr
155
154
  overlayClassName: "libro-add-cell-menu",
156
155
  destroyTooltipOnHide: true,
157
156
  open: menuVisible,
157
+ arrow: false,
158
158
  children: /*#__PURE__*/_jsx("div", {
159
159
  tabIndex: 10,
160
160
  className: "libro-add-between-cell-anchor",
161
161
  style: {
162
162
  position: 'absolute',
163
- top: position.top + 5,
164
- left: position.left + 5,
163
+ top: position.top - 10,
164
+ left: position.left + 0,
165
165
  width: 1,
166
166
  height: 1,
167
167
  zIndex: 1000
168
168
  },
169
169
  ref: anchorRef,
170
170
  onBlur: function onBlur(e) {
171
- var _anchorRef$current3;
171
+ var _e$relatedTarget, _anchorRef$current3;
172
+ if ((_e$relatedTarget = e.relatedTarget) !== null && _e$relatedTarget !== void 0 && _e$relatedTarget.classList.contains('libro-add-between-cell')) {
173
+ return;
174
+ }
172
175
  if (!((_anchorRef$current3 = anchorRef.current) !== null && _anchorRef$current3 !== void 0 && _anchorRef$current3.contains(e.relatedTarget))) {
173
176
  setMenuVisible(false);
174
177
  }
@@ -195,8 +198,6 @@ export var LibroCommonBetweenCellContent = /*#__PURE__*/forwardRef(function Libr
195
198
  closeTooltip();
196
199
  setGutterVisible(true);
197
200
  setMenuVisible(true);
198
-
199
- // TODO: 位置不准确
200
201
  setPosition({
201
202
  top: e.nativeEvent.offsetY,
202
203
  left: e.nativeEvent.offsetX
@@ -57,6 +57,7 @@
57
57
  height: 4px;
58
58
  background-color: var(--mana-libro-add-between-divider-color);
59
59
  border-radius: 2px;
60
+ pointer-events: none;
60
61
  }
61
62
 
62
63
  .libro-add-between-cell-icon {
@@ -0,0 +1,5 @@
1
+ import type { CellView } from '@difizen/libro-core';
2
+ export declare function CellOutputBottomBlank({ cell }: {
3
+ cell: CellView;
4
+ }): import("react/jsx-runtime").JSX.Element | null;
5
+ //# sourceMappingURL=cell-output-bottom-blank.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cell-output-bottom-blank.d.ts","sourceRoot":"","sources":["../../src/components/cell-output-bottom-blank.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAMpD,wBAAgB,qBAAqB,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,kDAsBjE"}
@@ -0,0 +1,21 @@
1
+ import { LibroEditableExecutableCellView, LibroOutputArea } from '@difizen/libro-core';
2
+ import { useObserve } from '@difizen/mana-app';
3
+ import { isWaitingExecute } from "../utils/index.js";
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ export function CellOutputBottomBlank(_ref) {
6
+ var cell = _ref.cell;
7
+ var observableCell = useObserve(cell);
8
+ if (!(cell instanceof LibroEditableExecutableCellView) || !(observableCell.outputArea instanceof LibroOutputArea)) {
9
+ return null;
10
+ }
11
+ var outputs = observableCell.outputArea.outputs;
12
+ var hasNoneOutput = !outputs || outputs.length === 0;
13
+
14
+ // 有output时 或者 没有被执行过,不显示input底部的空白
15
+ if (hasNoneOutput && (observableCell.model.executeCount || isWaitingExecute(observableCell.model))) {
16
+ return /*#__PURE__*/_jsx("div", {
17
+ className: "libro-cell-bottom-blank"
18
+ });
19
+ }
20
+ return null;
21
+ }
@@ -1,6 +1,6 @@
1
1
  .libro-cell-execution-tip {
2
2
  position: absolute;
3
- bottom: -15px;
3
+ top: -15px;
4
4
  left: 40px;
5
5
  z-index: 10;
6
6
  width: calc(100% - 50px);
@@ -36,10 +36,6 @@
36
36
  }
37
37
  }
38
38
 
39
- .libro-cell-execution-tip-without-output {
40
- bottom: 5px;
41
- }
42
-
43
39
  .libro-cell-bottom-blank {
44
40
  height: 20px;
45
41
  border-top: 1px solid var(--mana-color-border);
@@ -109,7 +109,6 @@
109
109
 
110
110
  .libro-keybind-instructions-icon {
111
111
  width: 18px;
112
- height: 18px;
113
112
  line-height: 22px;
114
113
  }
115
114
 
@@ -5,7 +5,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
5
5
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
6
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
7
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
8
- import { singleton } from '@difizen/mana-app';
8
+ import { isMacintosh, singleton } from '@difizen/mana-app';
9
9
  import { l10n } from '@difizen/mana-l10n';
10
10
  import { Tag } from 'antd';
11
11
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -35,7 +35,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
35
35
  actionDescription: l10n.t('保存文件'),
36
36
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
37
37
  children: [/*#__PURE__*/_jsx(Tag, {
38
- children: "Cmd"
38
+ children: isMacintosh ? 'Cmd' : 'Ctrl'
39
39
  }), /*#__PURE__*/_jsx(Tag, {
40
40
  children: "S"
41
41
  })]
@@ -45,7 +45,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
45
45
  actionDescription: l10n.t('运行选中cell'),
46
46
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
47
47
  children: [/*#__PURE__*/_jsx(Tag, {
48
- children: "Cmd"
48
+ children: isMacintosh ? 'Cmd' : 'Ctrl'
49
49
  }), /*#__PURE__*/_jsx(Tag, {
50
50
  children: "Enter"
51
51
  })]
@@ -65,7 +65,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
65
65
  actionDescription: l10n.t('运行并新增cell'),
66
66
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
67
67
  children: [/*#__PURE__*/_jsx(Tag, {
68
- children: "Alt"
68
+ children: isMacintosh ? 'Option' : 'Alt'
69
69
  }), /*#__PURE__*/_jsx(Tag, {
70
70
  children: "Enter"
71
71
  })]
@@ -75,7 +75,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
75
75
  actionDescription: l10n.t('隐藏Code'),
76
76
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
77
77
  children: [/*#__PURE__*/_jsx(Tag, {
78
- children: "Cmd"
78
+ children: isMacintosh ? 'Cmd' : 'Ctrl'
79
79
  }), /*#__PURE__*/_jsx(Tag, {
80
80
  children: "'"
81
81
  })]
@@ -85,7 +85,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
85
85
  actionDescription: l10n.t('隐藏Output'),
86
86
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
87
87
  children: [/*#__PURE__*/_jsx(Tag, {
88
- children: "Cmd"
88
+ children: isMacintosh ? 'Cmd' : 'Ctrl'
89
89
  }), /*#__PURE__*/_jsx(Tag, {
90
90
  children: "O"
91
91
  })]
@@ -95,7 +95,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
95
95
  actionDescription: l10n.t('切分cell'),
96
96
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
97
97
  children: [/*#__PURE__*/_jsx(Tag, {
98
- children: "Cmd"
98
+ children: isMacintosh ? 'Cmd' : 'Ctrl'
99
99
  }), /*#__PURE__*/_jsx(Tag, {
100
100
  children: "Shift"
101
101
  }), /*#__PURE__*/_jsx(Tag, {
@@ -107,7 +107,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
107
107
  actionDescription: l10n.t('选中当前所在行'),
108
108
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
109
109
  children: [/*#__PURE__*/_jsx(Tag, {
110
- children: "Command"
110
+ children: isMacintosh ? 'Cmd' : 'Ctrl'
111
111
  }), /*#__PURE__*/_jsx(Tag, {
112
112
  children: "L"
113
113
  }), ' ']
@@ -117,7 +117,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
117
117
  actionDescription: l10n.t('全选'),
118
118
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
119
119
  children: [/*#__PURE__*/_jsx(Tag, {
120
- children: "Cmd"
120
+ children: isMacintosh ? 'Cmd' : 'Ctrl'
121
121
  }), /*#__PURE__*/_jsx(Tag, {
122
122
  children: "A"
123
123
  })]
@@ -127,7 +127,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
127
127
  actionDescription: l10n.t('光标移至行首'),
128
128
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
129
129
  children: [/*#__PURE__*/_jsx(Tag, {
130
- children: "Cmd"
130
+ children: isMacintosh ? 'Cmd' : 'Ctrl'
131
131
  }), /*#__PURE__*/_jsx(Tag, {
132
132
  children: "Left"
133
133
  })]
@@ -137,7 +137,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
137
137
  actionDescription: l10n.t('光标移至行尾'),
138
138
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
139
139
  children: [/*#__PURE__*/_jsx(Tag, {
140
- children: "Cmd"
140
+ children: isMacintosh ? 'Cmd' : 'Ctrl'
141
141
  }), /*#__PURE__*/_jsx(Tag, {
142
142
  children: "Right"
143
143
  })]
@@ -147,7 +147,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
147
147
  actionDescription: l10n.t('光标移至文档首'),
148
148
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
149
149
  children: [/*#__PURE__*/_jsx(Tag, {
150
- children: "Cmd"
150
+ children: isMacintosh ? 'Cmd' : 'Ctrl'
151
151
  }), /*#__PURE__*/_jsx(Tag, {
152
152
  children: "Up"
153
153
  })]
@@ -157,7 +157,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
157
157
  actionDescription: l10n.t('光标移至文档尾'),
158
158
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
159
159
  children: [/*#__PURE__*/_jsx(Tag, {
160
- children: "Cmd"
160
+ children: isMacintosh ? 'Cmd' : 'Ctrl'
161
161
  }), /*#__PURE__*/_jsx(Tag, {
162
162
  children: "Down"
163
163
  })]
@@ -167,7 +167,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
167
167
  actionDescription: l10n.t('向上移动当前所在行'),
168
168
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
169
169
  children: [/*#__PURE__*/_jsx(Tag, {
170
- children: "Alt"
170
+ children: isMacintosh ? 'Option' : 'Alt'
171
171
  }), /*#__PURE__*/_jsx(Tag, {
172
172
  children: "Up"
173
173
  })]
@@ -177,7 +177,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
177
177
  actionDescription: l10n.t('向下移动当前所在行'),
178
178
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
179
179
  children: [/*#__PURE__*/_jsx(Tag, {
180
- children: "Alt"
180
+ children: isMacintosh ? 'Option' : 'Alt'
181
181
  }), /*#__PURE__*/_jsx(Tag, {
182
182
  children: "Down"
183
183
  })]
@@ -189,7 +189,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
189
189
  children: [/*#__PURE__*/_jsx(Tag, {
190
190
  children: "Shift"
191
191
  }), /*#__PURE__*/_jsx(Tag, {
192
- children: "Alt"
192
+ children: isMacintosh ? 'Option' : 'Alt'
193
193
  }), /*#__PURE__*/_jsx(Tag, {
194
194
  children: "Up"
195
195
  })]
@@ -201,7 +201,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
201
201
  children: [/*#__PURE__*/_jsx(Tag, {
202
202
  children: "Shift"
203
203
  }), /*#__PURE__*/_jsx(Tag, {
204
- children: "Alt"
204
+ children: isMacintosh ? 'Option' : 'Alt'
205
205
  }), /*#__PURE__*/_jsx(Tag, {
206
206
  children: "Down"
207
207
  })]
@@ -211,7 +211,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
211
211
  actionDescription: l10n.t('删除光标至行首内容'),
212
212
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
213
213
  children: [/*#__PURE__*/_jsx(Tag, {
214
- children: "Cmd"
214
+ children: isMacintosh ? 'Cmd' : 'Ctrl'
215
215
  }), /*#__PURE__*/_jsx(Tag, {
216
216
  children: "Backspace"
217
217
  })]
@@ -221,7 +221,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
221
221
  actionDescription: l10n.t('删除光标至行尾内容'),
222
222
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
223
223
  children: [/*#__PURE__*/_jsx(Tag, {
224
- children: "Cmd"
224
+ children: isMacintosh ? 'Cmd' : 'Ctrl'
225
225
  }), /*#__PURE__*/_jsx(Tag, {
226
226
  children: "Delete"
227
227
  })]
@@ -231,7 +231,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
231
231
  actionDescription: l10n.t('撤销'),
232
232
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
233
233
  children: [/*#__PURE__*/_jsx(Tag, {
234
- children: "Cmd"
234
+ children: isMacintosh ? 'Cmd' : 'Ctrl'
235
235
  }), /*#__PURE__*/_jsx(Tag, {
236
236
  children: "Z"
237
237
  })]
@@ -241,7 +241,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
241
241
  actionDescription: l10n.t('恢复'),
242
242
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
243
243
  children: [/*#__PURE__*/_jsx(Tag, {
244
- children: "Cmd"
244
+ children: isMacintosh ? 'Cmd' : 'Ctrl'
245
245
  }), /*#__PURE__*/_jsx(Tag, {
246
246
  children: "Shift"
247
247
  }), /*#__PURE__*/_jsx(Tag, {
@@ -253,7 +253,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
253
253
  actionDescription: l10n.t('撤销选中'),
254
254
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
255
255
  children: [/*#__PURE__*/_jsx(Tag, {
256
- children: "Cmd"
256
+ children: isMacintosh ? 'Cmd' : 'Ctrl'
257
257
  }), /*#__PURE__*/_jsx(Tag, {
258
258
  children: "U"
259
259
  }), ' ']
@@ -263,7 +263,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
263
263
  actionDescription: l10n.t('恢复选中'),
264
264
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
265
265
  children: [/*#__PURE__*/_jsx(Tag, {
266
- children: "Cmd"
266
+ children: isMacintosh ? 'Cmd' : 'Ctrl'
267
267
  }), /*#__PURE__*/_jsx(Tag, {
268
268
  children: "Shift"
269
269
  }), /*#__PURE__*/_jsx(Tag, {
@@ -276,7 +276,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
276
276
  actionDescription: l10n.t('保存文件'),
277
277
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
278
278
  children: [/*#__PURE__*/_jsx(Tag, {
279
- children: "Cmd"
279
+ children: isMacintosh ? 'Cmd' : 'Ctrl'
280
280
  }), /*#__PURE__*/_jsx(Tag, {
281
281
  children: "S"
282
282
  })]
@@ -286,7 +286,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
286
286
  actionDescription: l10n.t('运行选中cell'),
287
287
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
288
288
  children: [/*#__PURE__*/_jsx(Tag, {
289
- children: "Cmd"
289
+ children: isMacintosh ? 'Cmd' : 'Ctrl'
290
290
  }), /*#__PURE__*/_jsx(Tag, {
291
291
  children: "Enter"
292
292
  })]
@@ -306,7 +306,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
306
306
  actionDescription: l10n.t('运行并新增cell'),
307
307
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
308
308
  children: [/*#__PURE__*/_jsx(Tag, {
309
- children: "Alt"
309
+ children: isMacintosh ? 'Option' : 'Alt'
310
310
  }), /*#__PURE__*/_jsx(Tag, {
311
311
  children: "Enter"
312
312
  })]
@@ -326,7 +326,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
326
326
  actionDescription: l10n.t('隐藏Code'),
327
327
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
328
328
  children: [/*#__PURE__*/_jsx(Tag, {
329
- children: "Cmd"
329
+ children: isMacintosh ? 'Cmd' : 'Ctrl'
330
330
  }), /*#__PURE__*/_jsx(Tag, {
331
331
  children: "'"
332
332
  })]
@@ -336,7 +336,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
336
336
  actionDescription: l10n.t('隐藏Output'),
337
337
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
338
338
  children: [/*#__PURE__*/_jsx(Tag, {
339
- children: "Cmd"
339
+ children: isMacintosh ? 'Cmd' : 'Ctrl'
340
340
  }), /*#__PURE__*/_jsx(Tag, {
341
341
  children: "O"
342
342
  })]
@@ -404,7 +404,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
404
404
  actionDescription: l10n.t('上移cell'),
405
405
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
406
406
  children: [/*#__PURE__*/_jsx(Tag, {
407
- children: "Cmd"
407
+ children: isMacintosh ? 'Cmd' : 'Ctrl'
408
408
  }), /*#__PURE__*/_jsx(Tag, {
409
409
  children: "Shift"
410
410
  }), /*#__PURE__*/_jsx(Tag, {
@@ -416,7 +416,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
416
416
  actionDescription: l10n.t('下移cell'),
417
417
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
418
418
  children: [/*#__PURE__*/_jsx(Tag, {
419
- children: "Cmd"
419
+ children: isMacintosh ? 'Cmd' : 'Ctrl'
420
420
  }), /*#__PURE__*/_jsx(Tag, {
421
421
  children: "Shift"
422
422
  }), /*#__PURE__*/_jsx(Tag, {
@@ -438,7 +438,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
438
438
  actionDescription: l10n.t('向下合并cell'),
439
439
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
440
440
  children: [/*#__PURE__*/_jsx(Tag, {
441
- children: "Cmd"
441
+ children: isMacintosh ? 'Cmd' : 'Ctrl'
442
442
  }), /*#__PURE__*/_jsx(Tag, {
443
443
  children: "Shift"
444
444
  }), /*#__PURE__*/_jsx(Tag, {
@@ -450,7 +450,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
450
450
  actionDescription: l10n.t('向上合并cell'),
451
451
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
452
452
  children: [/*#__PURE__*/_jsx(Tag, {
453
- children: "Cmd"
453
+ children: isMacintosh ? 'Cmd' : 'Ctrl'
454
454
  }), /*#__PURE__*/_jsx(Tag, {
455
455
  children: "Backspace"
456
456
  })]
@@ -1 +1 @@
1
- {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAiC/C;;GAEG;AACH,eAAO,MAAM,0BAA0B,YAuDpC,CAAC;AAEJ,eAAO,MAAM,kBAAkB,YAO5B,CAAC"}
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAkC/C;;GAEG;AACH,eAAO,MAAM,0BAA0B,YAuDpC,CAAC;AAEJ,eAAO,MAAM,kBAAkB,YAO5B,CAAC"}
package/es/module.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { CodeCellModule, LibroCodeCellModel, LibroCodeCellView } from '@difizen/libro-code-cell';
2
2
  import { CodeMirrorEditorModule } from '@difizen/libro-codemirror';
3
3
  import { LibroE2EditorModule } from '@difizen/libro-cofine-editor';
4
- import { CellExecutionTimeProvider, CellInputBottonBlankProvider, LibroAddCellModule, LibroKeybindRegistry, LibroModel, LibroModule, LibroToolbarModule } from '@difizen/libro-core';
4
+ import { CellExecutionTimeProvider, CellOutputBottomBlankProvider, LibroAddCellModule, LibroKeybindRegistry, LibroModel, LibroModule, LibroToolbarModule } from '@difizen/libro-core';
5
5
  import { LibroKernelManageModule } from '@difizen/libro-kernel';
6
6
  import { LibroLanguageClientModule } from '@difizen/libro-language-client';
7
7
  import { MarkdownCellModule } from '@difizen/libro-markdown-cell';
@@ -13,7 +13,8 @@ import { ManaModule } from '@difizen/mana-app';
13
13
  import { LibroBetweenCellModule } from "./add-between-cell/index.js";
14
14
  import { JupyterCodeCellModel, JupyterCodeCellView } from "./cell/index.js";
15
15
  import { LibroJupyterCommandContribution, LibroJupyterKeybindingContribution } from "./command/index.js";
16
- import { CellExecutionTip, CellInputBottomBlank } from "./components/index.js";
16
+ import { CellOutputBottomBlank } from "./components/cell-output-bottom-blank.js";
17
+ import { CellExecutionTip } from "./components/index.js";
17
18
  import { ConfigAppContribution, LibroJupyterSettingContribution } from "./config/index.js";
18
19
  import { LibroJupyterContentContribution } from "./contents/index.js";
19
20
  import { LibroJupyterContentSaveContribution } from "./contents/save-content-contribution.js";
@@ -38,8 +39,8 @@ export var LibroJupyterNoEditorModule = ManaModule.create().register(LibroJupyte
38
39
  token: CellExecutionTimeProvider,
39
40
  useValue: CellExecutionTip
40
41
  }, {
41
- token: CellInputBottonBlankProvider,
42
- useValue: CellInputBottomBlank
42
+ token: CellOutputBottomBlankProvider,
43
+ useValue: CellOutputBottomBlank
43
44
  }, {
44
45
  token: KernelStatusAndSelectorProvider,
45
46
  useValue: KernelStatusSelector
@@ -1 +1 @@
1
- {"version":3,"file":"run-selector.d.ts","sourceRoot":"","sources":["../../src/toolbar/run-selector.tsx"],"names":[],"mappings":";AAqBA,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EA8G/B,CAAC"}
1
+ {"version":3,"file":"run-selector.d.ts","sourceRoot":"","sources":["../../src/toolbar/run-selector.tsx"],"names":[],"mappings":";AAqBA,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAgH/B,CAAC"}
@@ -62,7 +62,7 @@ export var RunSelector = function RunSelector() {
62
62
  label: /*#__PURE__*/_jsxs(_Fragment, {
63
63
  children: [/*#__PURE__*/_jsx("span", {
64
64
  className: "libro-run-menu-label",
65
- children: l10n.t('运行当前Cell')
65
+ children: l10n.t('运行当前 Cell')
66
66
  }), /*#__PURE__*/_jsx("span", {
67
67
  className: "libro-run-menu-keybind",
68
68
  children: "Cmd + Enter"
@@ -84,7 +84,7 @@ export var RunSelector = function RunSelector() {
84
84
  label: /*#__PURE__*/_jsxs(_Fragment, {
85
85
  children: [/*#__PURE__*/_jsx("span", {
86
86
  className: "libro-run-menu-label",
87
- children: l10n.t('运行之前所有cell')
87
+ children: l10n.t('运行之前所有 Cell')
88
88
  }), /*#__PURE__*/_jsx("span", {
89
89
  className: "libro-run-menu-keybind",
90
90
  children: "Cmd + F8"
@@ -95,7 +95,7 @@ export var RunSelector = function RunSelector() {
95
95
  label: /*#__PURE__*/_jsxs(_Fragment, {
96
96
  children: [/*#__PURE__*/_jsx("span", {
97
97
  className: "libro-run-menu-label",
98
- children: l10n.t('运行当前及之后cell')
98
+ children: l10n.t('运行当前及之后 Cell')
99
99
  }), /*#__PURE__*/_jsx("span", {
100
100
  className: "libro-run-menu-keybind",
101
101
  children: "Cmd + F10"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@difizen/libro-jupyter",
3
- "version": "0.2.35-next.0",
3
+ "version": "0.2.35",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "libro"
@@ -33,22 +33,22 @@
33
33
  "dependencies": {
34
34
  "@ant-design/colors": "^7.0.0",
35
35
  "@ant-design/icons": "^5.1.0",
36
- "@difizen/libro-code-cell": "^0.2.35-next.0",
37
- "@difizen/libro-code-editor": "^0.2.35-next.0",
38
- "@difizen/libro-codemirror": "^0.2.35-next.0",
39
- "@difizen/libro-cofine-editor": "^0.2.35-next.0",
40
- "@difizen/libro-common": "^0.2.35-next.0",
41
- "@difizen/libro-core": "^0.2.35-next.0",
42
- "@difizen/libro-kernel": "^0.2.35-next.0",
43
- "@difizen/libro-l10n": "^0.2.35-next.0",
44
- "@difizen/libro-language-client": "^0.2.35-next.0",
45
- "@difizen/libro-lsp": "^0.2.35-next.0",
46
- "@difizen/libro-markdown-cell": "^0.2.35-next.0",
47
- "@difizen/libro-output": "^0.2.35-next.0",
48
- "@difizen/libro-raw-cell": "^0.2.35-next.0",
49
- "@difizen/libro-rendermime": "^0.2.35-next.0",
50
- "@difizen/libro-search": "^0.2.35-next.0",
51
- "@difizen/libro-search-code-cell": "^0.2.35-next.0",
36
+ "@difizen/libro-code-cell": "^0.2.35",
37
+ "@difizen/libro-code-editor": "^0.2.35",
38
+ "@difizen/libro-codemirror": "^0.2.35",
39
+ "@difizen/libro-cofine-editor": "^0.2.35",
40
+ "@difizen/libro-common": "^0.2.35",
41
+ "@difizen/libro-core": "^0.2.35",
42
+ "@difizen/libro-kernel": "^0.2.35",
43
+ "@difizen/libro-l10n": "^0.2.35",
44
+ "@difizen/libro-language-client": "^0.2.35",
45
+ "@difizen/libro-lsp": "^0.2.35",
46
+ "@difizen/libro-markdown-cell": "^0.2.35",
47
+ "@difizen/libro-output": "^0.2.35",
48
+ "@difizen/libro-raw-cell": "^0.2.35",
49
+ "@difizen/libro-rendermime": "^0.2.35",
50
+ "@difizen/libro-search": "^0.2.35",
51
+ "@difizen/libro-search-code-cell": "^0.2.35",
52
52
  "@difizen/mana-app": "latest",
53
53
  "@difizen/mana-l10n": "latest",
54
54
  "classnames": "^2.3.2",
@@ -89,7 +89,6 @@ export const LibroCommonBetweenCellContent: BetweenCellProvider = forwardRef(
89
89
 
90
90
  const items: MenuProps['items'] = cellsMeta
91
91
  .filter((item) => item.type !== 'raw')
92
- .sort((a, b) => a.order.localeCompare(b.order))
93
92
  .map((item) => {
94
93
  return {
95
94
  label: item.name,
@@ -108,7 +107,7 @@ export const LibroCommonBetweenCellContent: BetweenCellProvider = forwardRef(
108
107
  });
109
108
 
110
109
  return (
111
- <div className="libro-add-between-cell">
110
+ <div className="libro-add-between-cell" tabIndex={0}>
112
111
  <Popover
113
112
  content={<Menu items={items} />}
114
113
  trigger="click"
@@ -117,20 +116,25 @@ export const LibroCommonBetweenCellContent: BetweenCellProvider = forwardRef(
117
116
  overlayClassName="libro-add-cell-menu"
118
117
  destroyTooltipOnHide
119
118
  open={menuVisible}
119
+ arrow={false}
120
120
  >
121
121
  <div
122
122
  tabIndex={10}
123
123
  className="libro-add-between-cell-anchor"
124
124
  style={{
125
125
  position: 'absolute',
126
- top: position.top + 5,
127
- left: position.left + 5,
126
+ top: position.top - 10,
127
+ left: position.left + 0,
128
128
  width: 1,
129
129
  height: 1,
130
130
  zIndex: 1000,
131
131
  }}
132
132
  ref={anchorRef}
133
133
  onBlur={(e) => {
134
+ if (e.relatedTarget?.classList.contains('libro-add-between-cell')) {
135
+ return;
136
+ }
137
+
134
138
  if (!anchorRef.current?.contains(e.relatedTarget)) {
135
139
  setMenuVisible(false);
136
140
  }
@@ -159,7 +163,6 @@ export const LibroCommonBetweenCellContent: BetweenCellProvider = forwardRef(
159
163
  setGutterVisible(true);
160
164
  setMenuVisible(true);
161
165
 
162
- // TODO: 位置不准确
163
166
  setPosition({ top: e.nativeEvent.offsetY, left: e.nativeEvent.offsetX });
164
167
  anchorRef.current?.focus();
165
168
  }}
@@ -57,6 +57,7 @@
57
57
  height: 4px;
58
58
  background-color: var(--mana-libro-add-between-divider-color);
59
59
  border-radius: 2px;
60
+ pointer-events: none;
60
61
  }
61
62
 
62
63
  .libro-add-between-cell-icon {
@@ -0,0 +1,29 @@
1
+ import type { CellView } from '@difizen/libro-core';
2
+ import { LibroEditableExecutableCellView, LibroOutputArea } from '@difizen/libro-core';
3
+ import { useObserve } from '@difizen/mana-app';
4
+
5
+ import { isWaitingExecute } from '../utils/index.js';
6
+
7
+ export function CellOutputBottomBlank({ cell }: { cell: CellView }) {
8
+ const observableCell = useObserve(cell) as LibroEditableExecutableCellView;
9
+
10
+ if (
11
+ !(cell instanceof LibroEditableExecutableCellView) ||
12
+ !(observableCell.outputArea instanceof LibroOutputArea)
13
+ ) {
14
+ return null;
15
+ }
16
+
17
+ const outputs = observableCell.outputArea.outputs;
18
+ const hasNoneOutput = !outputs || outputs.length === 0;
19
+
20
+ // 有output时 或者 没有被执行过,不显示input底部的空白
21
+ if (
22
+ hasNoneOutput &&
23
+ (observableCell.model.executeCount || isWaitingExecute(observableCell.model))
24
+ ) {
25
+ return <div className="libro-cell-bottom-blank" />;
26
+ }
27
+
28
+ return null;
29
+ }
@@ -1,6 +1,6 @@
1
1
  .libro-cell-execution-tip {
2
2
  position: absolute;
3
- bottom: -15px;
3
+ top: -15px;
4
4
  left: 40px;
5
5
  z-index: 10;
6
6
  width: calc(100% - 50px);
@@ -36,10 +36,6 @@
36
36
  }
37
37
  }
38
38
 
39
- .libro-cell-execution-tip-without-output {
40
- bottom: 5px;
41
- }
42
-
43
39
  .libro-cell-bottom-blank {
44
40
  height: 20px;
45
41
  border-top: 1px solid var(--mana-color-border);
@@ -109,7 +109,6 @@
109
109
 
110
110
  .libro-keybind-instructions-icon {
111
111
  width: 18px;
112
- height: 18px;
113
112
  line-height: 22px;
114
113
  }
115
114
 
@@ -1,4 +1,4 @@
1
- import { singleton } from '@difizen/mana-app';
1
+ import { isMacintosh, singleton } from '@difizen/mana-app';
2
2
  import { l10n } from '@difizen/mana-l10n';
3
3
  import { Tag } from 'antd';
4
4
  import type { ColumnsType } from 'antd/es/table';
@@ -42,7 +42,7 @@ export class LibroKeybindItems {
42
42
  actionDescription: l10n.t('保存文件'),
43
43
  keybind: (
44
44
  <>
45
- <Tag>Cmd</Tag>
45
+ <Tag>{isMacintosh ? 'Cmd' : 'Ctrl'}</Tag>
46
46
  <Tag>S</Tag>
47
47
  </>
48
48
  ),
@@ -52,7 +52,7 @@ export class LibroKeybindItems {
52
52
  actionDescription: l10n.t('运行选中cell'),
53
53
  keybind: (
54
54
  <>
55
- <Tag>Cmd</Tag>
55
+ <Tag>{isMacintosh ? 'Cmd' : 'Ctrl'}</Tag>
56
56
  <Tag>Enter</Tag>
57
57
  </>
58
58
  ),
@@ -72,7 +72,7 @@ export class LibroKeybindItems {
72
72
  actionDescription: l10n.t('运行并新增cell'),
73
73
  keybind: (
74
74
  <>
75
- <Tag>Alt</Tag>
75
+ <Tag>{isMacintosh ? 'Option' : 'Alt'}</Tag>
76
76
  <Tag>Enter</Tag>
77
77
  </>
78
78
  ),
@@ -82,7 +82,7 @@ export class LibroKeybindItems {
82
82
  actionDescription: l10n.t('隐藏Code'),
83
83
  keybind: (
84
84
  <>
85
- <Tag>Cmd</Tag>
85
+ <Tag>{isMacintosh ? 'Cmd' : 'Ctrl'}</Tag>
86
86
  <Tag>&apos;</Tag>
87
87
  </>
88
88
  ),
@@ -92,7 +92,7 @@ export class LibroKeybindItems {
92
92
  actionDescription: l10n.t('隐藏Output'),
93
93
  keybind: (
94
94
  <>
95
- <Tag>Cmd</Tag>
95
+ <Tag>{isMacintosh ? 'Cmd' : 'Ctrl'}</Tag>
96
96
  <Tag>O</Tag>
97
97
  </>
98
98
  ),
@@ -102,7 +102,7 @@ export class LibroKeybindItems {
102
102
  actionDescription: l10n.t('切分cell'),
103
103
  keybind: (
104
104
  <>
105
- <Tag>Cmd</Tag>
105
+ <Tag>{isMacintosh ? 'Cmd' : 'Ctrl'}</Tag>
106
106
  <Tag>Shift</Tag>
107
107
  <Tag>-</Tag>
108
108
  </>
@@ -113,7 +113,7 @@ export class LibroKeybindItems {
113
113
  actionDescription: l10n.t('选中当前所在行'),
114
114
  keybind: (
115
115
  <>
116
- <Tag>Command</Tag>
116
+ <Tag>{isMacintosh ? 'Cmd' : 'Ctrl'}</Tag>
117
117
  <Tag>L</Tag>{' '}
118
118
  </>
119
119
  ),
@@ -123,7 +123,7 @@ export class LibroKeybindItems {
123
123
  actionDescription: l10n.t('全选'),
124
124
  keybind: (
125
125
  <>
126
- <Tag>Cmd</Tag>
126
+ <Tag>{isMacintosh ? 'Cmd' : 'Ctrl'}</Tag>
127
127
  <Tag>A</Tag>
128
128
  </>
129
129
  ),
@@ -133,7 +133,7 @@ export class LibroKeybindItems {
133
133
  actionDescription: l10n.t('光标移至行首'),
134
134
  keybind: (
135
135
  <>
136
- <Tag>Cmd</Tag>
136
+ <Tag>{isMacintosh ? 'Cmd' : 'Ctrl'}</Tag>
137
137
  <Tag>Left</Tag>
138
138
  </>
139
139
  ),
@@ -143,7 +143,7 @@ export class LibroKeybindItems {
143
143
  actionDescription: l10n.t('光标移至行尾'),
144
144
  keybind: (
145
145
  <>
146
- <Tag>Cmd</Tag>
146
+ <Tag>{isMacintosh ? 'Cmd' : 'Ctrl'}</Tag>
147
147
  <Tag>Right</Tag>
148
148
  </>
149
149
  ),
@@ -153,7 +153,7 @@ export class LibroKeybindItems {
153
153
  actionDescription: l10n.t('光标移至文档首'),
154
154
  keybind: (
155
155
  <>
156
- <Tag>Cmd</Tag>
156
+ <Tag>{isMacintosh ? 'Cmd' : 'Ctrl'}</Tag>
157
157
  <Tag>Up</Tag>
158
158
  </>
159
159
  ),
@@ -163,7 +163,7 @@ export class LibroKeybindItems {
163
163
  actionDescription: l10n.t('光标移至文档尾'),
164
164
  keybind: (
165
165
  <>
166
- <Tag>Cmd</Tag>
166
+ <Tag>{isMacintosh ? 'Cmd' : 'Ctrl'}</Tag>
167
167
  <Tag>Down</Tag>
168
168
  </>
169
169
  ),
@@ -173,7 +173,7 @@ export class LibroKeybindItems {
173
173
  actionDescription: l10n.t('向上移动当前所在行'),
174
174
  keybind: (
175
175
  <>
176
- <Tag>Alt</Tag>
176
+ <Tag>{isMacintosh ? 'Option' : 'Alt'}</Tag>
177
177
  <Tag>Up</Tag>
178
178
  </>
179
179
  ),
@@ -183,7 +183,7 @@ export class LibroKeybindItems {
183
183
  actionDescription: l10n.t('向下移动当前所在行'),
184
184
  keybind: (
185
185
  <>
186
- <Tag>Alt</Tag>
186
+ <Tag>{isMacintosh ? 'Option' : 'Alt'}</Tag>
187
187
  <Tag>Down</Tag>
188
188
  </>
189
189
  ),
@@ -194,7 +194,7 @@ export class LibroKeybindItems {
194
194
  keybind: (
195
195
  <>
196
196
  <Tag>Shift</Tag>
197
- <Tag>Alt</Tag>
197
+ <Tag>{isMacintosh ? 'Option' : 'Alt'}</Tag>
198
198
  <Tag>Up</Tag>
199
199
  </>
200
200
  ),
@@ -205,7 +205,7 @@ export class LibroKeybindItems {
205
205
  keybind: (
206
206
  <>
207
207
  <Tag>Shift</Tag>
208
- <Tag>Alt</Tag>
208
+ <Tag>{isMacintosh ? 'Option' : 'Alt'}</Tag>
209
209
  <Tag>Down</Tag>
210
210
  </>
211
211
  ),
@@ -215,7 +215,7 @@ export class LibroKeybindItems {
215
215
  actionDescription: l10n.t('删除光标至行首内容'),
216
216
  keybind: (
217
217
  <>
218
- <Tag>Cmd</Tag>
218
+ <Tag>{isMacintosh ? 'Cmd' : 'Ctrl'}</Tag>
219
219
  <Tag>Backspace</Tag>
220
220
  </>
221
221
  ),
@@ -225,7 +225,7 @@ export class LibroKeybindItems {
225
225
  actionDescription: l10n.t('删除光标至行尾内容'),
226
226
  keybind: (
227
227
  <>
228
- <Tag>Cmd</Tag>
228
+ <Tag>{isMacintosh ? 'Cmd' : 'Ctrl'}</Tag>
229
229
  <Tag>Delete</Tag>
230
230
  </>
231
231
  ),
@@ -235,7 +235,7 @@ export class LibroKeybindItems {
235
235
  actionDescription: l10n.t('撤销'),
236
236
  keybind: (
237
237
  <>
238
- <Tag>Cmd</Tag>
238
+ <Tag>{isMacintosh ? 'Cmd' : 'Ctrl'}</Tag>
239
239
  <Tag>Z</Tag>
240
240
  </>
241
241
  ),
@@ -245,7 +245,7 @@ export class LibroKeybindItems {
245
245
  actionDescription: l10n.t('恢复'),
246
246
  keybind: (
247
247
  <>
248
- <Tag>Cmd</Tag>
248
+ <Tag>{isMacintosh ? 'Cmd' : 'Ctrl'}</Tag>
249
249
  <Tag>Shift</Tag>
250
250
  <Tag>Z</Tag>
251
251
  </>
@@ -256,7 +256,7 @@ export class LibroKeybindItems {
256
256
  actionDescription: l10n.t('撤销选中'),
257
257
  keybind: (
258
258
  <>
259
- <Tag>Cmd</Tag>
259
+ <Tag>{isMacintosh ? 'Cmd' : 'Ctrl'}</Tag>
260
260
  <Tag>U</Tag>{' '}
261
261
  </>
262
262
  ),
@@ -266,7 +266,7 @@ export class LibroKeybindItems {
266
266
  actionDescription: l10n.t('恢复选中'),
267
267
  keybind: (
268
268
  <>
269
- <Tag>Cmd</Tag>
269
+ <Tag>{isMacintosh ? 'Cmd' : 'Ctrl'}</Tag>
270
270
  <Tag>Shift</Tag>
271
271
  <Tag>U</Tag>
272
272
  </>
@@ -280,7 +280,7 @@ export class LibroKeybindItems {
280
280
  actionDescription: l10n.t('保存文件'),
281
281
  keybind: (
282
282
  <>
283
- <Tag>Cmd</Tag>
283
+ <Tag>{isMacintosh ? 'Cmd' : 'Ctrl'}</Tag>
284
284
  <Tag>S</Tag>
285
285
  </>
286
286
  ),
@@ -290,7 +290,7 @@ export class LibroKeybindItems {
290
290
  actionDescription: l10n.t('运行选中cell'),
291
291
  keybind: (
292
292
  <>
293
- <Tag>Cmd</Tag>
293
+ <Tag>{isMacintosh ? 'Cmd' : 'Ctrl'}</Tag>
294
294
  <Tag>Enter</Tag>
295
295
  </>
296
296
  ),
@@ -310,7 +310,7 @@ export class LibroKeybindItems {
310
310
  actionDescription: l10n.t('运行并新增cell'),
311
311
  keybind: (
312
312
  <>
313
- <Tag>Alt</Tag>
313
+ <Tag>{isMacintosh ? 'Option' : 'Alt'}</Tag>
314
314
  <Tag>Enter</Tag>
315
315
  </>
316
316
  ),
@@ -329,7 +329,7 @@ export class LibroKeybindItems {
329
329
  actionDescription: l10n.t('隐藏Code'),
330
330
  keybind: (
331
331
  <>
332
- <Tag>Cmd</Tag>
332
+ <Tag>{isMacintosh ? 'Cmd' : 'Ctrl'}</Tag>
333
333
  <Tag>&apos;</Tag>
334
334
  </>
335
335
  ),
@@ -339,7 +339,7 @@ export class LibroKeybindItems {
339
339
  actionDescription: l10n.t('隐藏Output'),
340
340
  keybind: (
341
341
  <>
342
- <Tag>Cmd</Tag>
342
+ <Tag>{isMacintosh ? 'Cmd' : 'Ctrl'}</Tag>
343
343
  <Tag>O</Tag>
344
344
  </>
345
345
  ),
@@ -412,7 +412,7 @@ export class LibroKeybindItems {
412
412
  actionDescription: l10n.t('上移cell'),
413
413
  keybind: (
414
414
  <>
415
- <Tag>Cmd</Tag>
415
+ <Tag>{isMacintosh ? 'Cmd' : 'Ctrl'}</Tag>
416
416
  <Tag>Shift</Tag>
417
417
  <Tag>Up</Tag>
418
418
  </>
@@ -423,7 +423,7 @@ export class LibroKeybindItems {
423
423
  actionDescription: l10n.t('下移cell'),
424
424
  keybind: (
425
425
  <>
426
- <Tag>Cmd</Tag>
426
+ <Tag>{isMacintosh ? 'Cmd' : 'Ctrl'}</Tag>
427
427
  <Tag>Shift</Tag>
428
428
  <Tag>Down</Tag>
429
429
  </>
@@ -444,7 +444,7 @@ export class LibroKeybindItems {
444
444
  actionDescription: l10n.t('向下合并cell'),
445
445
  keybind: (
446
446
  <>
447
- <Tag>Cmd</Tag>
447
+ <Tag>{isMacintosh ? 'Cmd' : 'Ctrl'}</Tag>
448
448
  <Tag>Shift</Tag>
449
449
  <Tag>M</Tag>
450
450
  </>
@@ -455,7 +455,7 @@ export class LibroKeybindItems {
455
455
  actionDescription: l10n.t('向上合并cell'),
456
456
  keybind: (
457
457
  <>
458
- <Tag>Cmd</Tag>
458
+ <Tag>{isMacintosh ? 'Cmd' : 'Ctrl'}</Tag>
459
459
  <Tag>Backspace</Tag>
460
460
  </>
461
461
  ),
package/src/module.ts CHANGED
@@ -7,7 +7,7 @@ import { CodeMirrorEditorModule } from '@difizen/libro-codemirror';
7
7
  import { LibroE2EditorModule } from '@difizen/libro-cofine-editor';
8
8
  import {
9
9
  CellExecutionTimeProvider,
10
- CellInputBottonBlankProvider,
10
+ CellOutputBottomBlankProvider,
11
11
  LibroAddCellModule,
12
12
  LibroKeybindRegistry,
13
13
  LibroModel,
@@ -33,7 +33,8 @@ import {
33
33
  LibroJupyterCommandContribution,
34
34
  LibroJupyterKeybindingContribution,
35
35
  } from './command/index.js';
36
- import { CellExecutionTip, CellInputBottomBlank } from './components/index.js';
36
+ import { CellOutputBottomBlank } from './components/cell-output-bottom-blank.js';
37
+ import { CellExecutionTip } from './components/index.js';
37
38
  import {
38
39
  ConfigAppContribution,
39
40
  LibroJupyterSettingContribution,
@@ -82,8 +83,8 @@ export const LibroJupyterNoEditorModule = ManaModule.create()
82
83
  useValue: CellExecutionTip,
83
84
  },
84
85
  {
85
- token: CellInputBottonBlankProvider,
86
- useValue: CellInputBottomBlank,
86
+ token: CellOutputBottomBlankProvider,
87
+ useValue: CellOutputBottomBlank,
87
88
  },
88
89
  {
89
90
  token: KernelStatusAndSelectorProvider,
@@ -72,7 +72,7 @@ export const RunSelector: React.FC = () => {
72
72
  key: 'runCell',
73
73
  label: (
74
74
  <>
75
- <span className="libro-run-menu-label">{l10n.t('运行当前Cell')}</span>
75
+ <span className="libro-run-menu-label">{l10n.t('运行当前 Cell')}</span>
76
76
  <span className="libro-run-menu-keybind">Cmd + Enter</span>
77
77
  </>
78
78
  ),
@@ -92,7 +92,9 @@ export const RunSelector: React.FC = () => {
92
92
  key: 'runAllAbove',
93
93
  label: (
94
94
  <>
95
- <span className="libro-run-menu-label">{l10n.t('运行之前所有cell')}</span>
95
+ <span className="libro-run-menu-label">
96
+ {l10n.t('运行之前所有 Cell')}
97
+ </span>
96
98
  <span className="libro-run-menu-keybind">Cmd + F8</span>
97
99
  </>
98
100
  ),
@@ -102,7 +104,7 @@ export const RunSelector: React.FC = () => {
102
104
  label: (
103
105
  <>
104
106
  <span className="libro-run-menu-label">
105
- {l10n.t('运行当前及之后cell')}
107
+ {l10n.t('运行当前及之后 Cell')}
106
108
  </span>
107
109
  <span className="libro-run-menu-keybind">Cmd + F10</span>
108
110
  </>