@difizen/libro-jupyter 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.
Files changed (48) hide show
  1. package/es/config/config.js +13 -13
  2. package/es/file/file-command.d.ts.map +1 -1
  3. package/es/file/file-command.js +74 -10
  4. package/es/file/file-create-modal.d.ts.map +1 -1
  5. package/es/file/file-create-modal.js +11 -10
  6. package/es/file/file-createdir-modal.d.ts.map +1 -1
  7. package/es/file/file-createdir-modal.js +9 -8
  8. package/es/file/file-icon.d.ts.map +1 -1
  9. package/es/file/file-icon.js +3 -5
  10. package/es/file/file-rename-modal.d.ts.map +1 -1
  11. package/es/file/file-rename-modal.js +6 -5
  12. package/es/file/file-service.d.ts.map +1 -1
  13. package/es/file/file-service.js +3 -2
  14. package/es/file/file-view/index.d.ts.map +1 -1
  15. package/es/file/file-view/index.js +8 -3
  16. package/es/file/utils.d.ts.map +1 -1
  17. package/es/file/utils.js +5 -4
  18. package/es/keybind-instructions/keybind-instructions-items.js +33 -31
  19. package/es/keybind-instructions/keybind-instructions-view.d.ts.map +1 -1
  20. package/es/keybind-instructions/keybind-instructions-view.js +48 -48
  21. package/es/libro-jupyter-protocol.d.ts.map +1 -1
  22. package/es/libro-jupyter-protocol.js +12 -13
  23. package/es/toolbar/index.less +1 -1
  24. package/es/toolbar/kernel-status-and-selector.d.ts.map +1 -1
  25. package/es/toolbar/kernel-status-and-selector.js +3 -3
  26. package/es/toolbar/run-selector.d.ts.map +1 -1
  27. package/es/toolbar/run-selector.js +1 -1
  28. package/es/toolbar/side-toolbar-run-selector.d.ts.map +1 -1
  29. package/es/toolbar/side-toolbar-run-selector.js +38 -38
  30. package/es/toolbar/toolbar-contribution.js +9 -7
  31. package/package.json +17 -17
  32. package/src/config/config.ts +13 -13
  33. package/src/file/file-command.tsx +24 -8
  34. package/src/file/file-create-modal.tsx +14 -11
  35. package/src/file/file-createdir-modal.tsx +9 -8
  36. package/src/file/file-icon.tsx +0 -1
  37. package/src/file/file-rename-modal.tsx +6 -5
  38. package/src/file/file-service.ts +3 -2
  39. package/src/file/file-view/index.tsx +6 -3
  40. package/src/file/utils.ts +5 -4
  41. package/src/keybind-instructions/keybind-instructions-items.tsx +31 -31
  42. package/src/keybind-instructions/keybind-instructions-view.tsx +66 -63
  43. package/src/libro-jupyter-protocol.ts +12 -13
  44. package/src/toolbar/index.less +1 -1
  45. package/src/toolbar/kernel-status-and-selector.tsx +3 -4
  46. package/src/toolbar/run-selector.tsx +3 -2
  47. package/src/toolbar/side-toolbar-run-selector.tsx +38 -40
  48. package/src/toolbar/toolbar-contribution.tsx +2 -2
@@ -14,7 +14,9 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
14
14
  export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_createClass(function LibroKeybindItems() {
15
15
  _classCallCheck(this, LibroKeybindItems);
16
16
  this.commandModeActionColumns = [{
17
- title: l10n.t('命令态操作'),
17
+ title: function title() {
18
+ return l10n.t('命令态操作');
19
+ },
18
20
  dataIndex: 'actionDescription',
19
21
  width: '125px'
20
22
  }, {
@@ -42,7 +44,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
42
44
  })
43
45
  }, {
44
46
  key: '2',
45
- actionDescription: l10n.t('运行选中cell'),
47
+ actionDescription: l10n.t('运行选中 Cell'),
46
48
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
47
49
  children: [/*#__PURE__*/_jsx(Tag, {
48
50
  children: isMacintosh ? 'Cmd' : 'Ctrl'
@@ -52,7 +54,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
52
54
  })
53
55
  }, {
54
56
  key: '3',
55
- actionDescription: l10n.t('运行并选择下一个cell'),
57
+ actionDescription: l10n.t('运行并选择下一个 Cell'),
56
58
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
57
59
  children: [/*#__PURE__*/_jsx(Tag, {
58
60
  children: "Shift"
@@ -62,7 +64,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
62
64
  })
63
65
  }, {
64
66
  key: '4',
65
- actionDescription: l10n.t('运行并新增cell'),
67
+ actionDescription: l10n.t('运行并新增 Cell'),
66
68
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
67
69
  children: [/*#__PURE__*/_jsx(Tag, {
68
70
  children: isMacintosh ? 'Option' : 'Alt'
@@ -72,7 +74,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
72
74
  })
73
75
  }, {
74
76
  key: '5',
75
- actionDescription: l10n.t('隐藏Code'),
77
+ actionDescription: l10n.t('隐藏 Code'),
76
78
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
77
79
  children: [/*#__PURE__*/_jsx(Tag, {
78
80
  children: isMacintosh ? 'Cmd' : 'Ctrl'
@@ -82,7 +84,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
82
84
  })
83
85
  }, {
84
86
  key: '6',
85
- actionDescription: l10n.t('隐藏Output'),
87
+ actionDescription: l10n.t('隐藏 Output'),
86
88
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
87
89
  children: [/*#__PURE__*/_jsx(Tag, {
88
90
  children: isMacintosh ? 'Cmd' : 'Ctrl'
@@ -92,7 +94,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
92
94
  })
93
95
  }, {
94
96
  key: '7',
95
- actionDescription: l10n.t('切分cell'),
97
+ actionDescription: l10n.t('切分 Cell'),
96
98
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
97
99
  children: [/*#__PURE__*/_jsx(Tag, {
98
100
  children: isMacintosh ? 'Cmd' : 'Ctrl'
@@ -283,7 +285,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
283
285
  })
284
286
  }, {
285
287
  key: '2',
286
- actionDescription: l10n.t('运行选中cell'),
288
+ actionDescription: l10n.t('运行选中 Cell'),
287
289
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
288
290
  children: [/*#__PURE__*/_jsx(Tag, {
289
291
  children: isMacintosh ? 'Cmd' : 'Ctrl'
@@ -293,7 +295,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
293
295
  })
294
296
  }, {
295
297
  key: '3',
296
- actionDescription: l10n.t('运行并选择下一个cell'),
298
+ actionDescription: l10n.t('运行并选择下一个 Cell'),
297
299
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
298
300
  children: [/*#__PURE__*/_jsx(Tag, {
299
301
  children: "Shift"
@@ -303,7 +305,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
303
305
  })
304
306
  }, {
305
307
  key: '4',
306
- actionDescription: l10n.t('运行并新增cell'),
308
+ actionDescription: l10n.t('运行并新增 Cell'),
307
309
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
308
310
  children: [/*#__PURE__*/_jsx(Tag, {
309
311
  children: isMacintosh ? 'Option' : 'Alt'
@@ -313,7 +315,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
313
315
  })
314
316
  }, {
315
317
  key: '5',
316
- actionDescription: l10n.t('选中上个cell'),
318
+ actionDescription: l10n.t('选中上个 Cell'),
317
319
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
318
320
  children: [/*#__PURE__*/_jsx(Tag, {
319
321
  children: "Up"
@@ -323,7 +325,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
323
325
  })
324
326
  }, {
325
327
  key: '6',
326
- actionDescription: l10n.t('隐藏Code'),
328
+ actionDescription: l10n.t('隐藏 Code'),
327
329
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
328
330
  children: [/*#__PURE__*/_jsx(Tag, {
329
331
  children: isMacintosh ? 'Cmd' : 'Ctrl'
@@ -333,7 +335,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
333
335
  })
334
336
  }, {
335
337
  key: '7',
336
- actionDescription: l10n.t('隐藏Output'),
338
+ actionDescription: l10n.t('隐藏 Output'),
337
339
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
338
340
  children: [/*#__PURE__*/_jsx(Tag, {
339
341
  children: isMacintosh ? 'Cmd' : 'Ctrl'
@@ -343,7 +345,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
343
345
  })
344
346
  }, {
345
347
  key: '8',
346
- actionDescription: l10n.t('选中下个cell'),
348
+ actionDescription: l10n.t('选中下个 Cell'),
347
349
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
348
350
  children: [/*#__PURE__*/_jsx(Tag, {
349
351
  children: "Down"
@@ -353,7 +355,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
353
355
  })
354
356
  }, {
355
357
  key: '9',
356
- actionDescription: l10n.t('向上新增cell'),
358
+ actionDescription: l10n.t('向上新增 Cell'),
357
359
  keybind: /*#__PURE__*/_jsx(_Fragment, {
358
360
  children: /*#__PURE__*/_jsx(Tag, {
359
361
  children: "A"
@@ -361,7 +363,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
361
363
  })
362
364
  }, {
363
365
  key: '10',
364
- actionDescription: l10n.t('向下新增cell'),
366
+ actionDescription: l10n.t('向下新增 Cell'),
365
367
  keybind: /*#__PURE__*/_jsx(_Fragment, {
366
368
  children: /*#__PURE__*/_jsx(Tag, {
367
369
  children: "B"
@@ -369,7 +371,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
369
371
  })
370
372
  }, {
371
373
  key: '11',
372
- actionDescription: l10n.t('删除选中cell'),
374
+ actionDescription: l10n.t('删除选中 Cell'),
373
375
  keybind: /*#__PURE__*/_jsx(_Fragment, {
374
376
  children: /*#__PURE__*/_jsx(Tag, {
375
377
  children: "D D"
@@ -377,7 +379,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
377
379
  })
378
380
  }, {
379
381
  key: '12',
380
- actionDescription: l10n.t('复制cell'),
382
+ actionDescription: l10n.t('复制 Cell'),
381
383
  keybind: /*#__PURE__*/_jsx(_Fragment, {
382
384
  children: /*#__PURE__*/_jsx(Tag, {
383
385
  children: "C"
@@ -385,7 +387,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
385
387
  })
386
388
  }, {
387
389
  key: '13',
388
- actionDescription: l10n.t('剪切cell'),
390
+ actionDescription: l10n.t('剪切 Cell'),
389
391
  keybind: /*#__PURE__*/_jsx(_Fragment, {
390
392
  children: /*#__PURE__*/_jsx(Tag, {
391
393
  children: "X"
@@ -393,7 +395,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
393
395
  })
394
396
  }, {
395
397
  key: '14',
396
- actionDescription: l10n.t('粘贴cell'),
398
+ actionDescription: l10n.t('粘贴 Cell'),
397
399
  keybind: /*#__PURE__*/_jsx(_Fragment, {
398
400
  children: /*#__PURE__*/_jsx(Tag, {
399
401
  children: "V"
@@ -401,7 +403,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
401
403
  })
402
404
  }, {
403
405
  key: '15',
404
- actionDescription: l10n.t('上移cell'),
406
+ actionDescription: l10n.t('上移 Cell'),
405
407
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
406
408
  children: [/*#__PURE__*/_jsx(Tag, {
407
409
  children: isMacintosh ? 'Cmd' : 'Ctrl'
@@ -413,7 +415,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
413
415
  })
414
416
  }, {
415
417
  key: '16',
416
- actionDescription: l10n.t('下移cell'),
418
+ actionDescription: l10n.t('下移 Cell'),
417
419
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
418
420
  children: [/*#__PURE__*/_jsx(Tag, {
419
421
  children: isMacintosh ? 'Cmd' : 'Ctrl'
@@ -425,7 +427,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
425
427
  })
426
428
  }, {
427
429
  key: '17',
428
- actionDescription: l10n.t('合并选中cell'),
430
+ actionDescription: l10n.t('合并选中 Cell'),
429
431
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
430
432
  children: [/*#__PURE__*/_jsx(Tag, {
431
433
  children: "Shift"
@@ -435,7 +437,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
435
437
  })
436
438
  }, {
437
439
  key: '18',
438
- actionDescription: l10n.t('向下合并cell'),
440
+ actionDescription: l10n.t('向下合并 Cell'),
439
441
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
440
442
  children: [/*#__PURE__*/_jsx(Tag, {
441
443
  children: isMacintosh ? 'Cmd' : 'Ctrl'
@@ -447,7 +449,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
447
449
  })
448
450
  }, {
449
451
  key: '19',
450
- actionDescription: l10n.t('向上合并cell'),
452
+ actionDescription: l10n.t('向上合并 Cell'),
451
453
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
452
454
  children: [/*#__PURE__*/_jsx(Tag, {
453
455
  children: isMacintosh ? 'Cmd' : 'Ctrl'
@@ -475,7 +477,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
475
477
  })
476
478
  }, {
477
479
  key: '22',
478
- actionDescription: l10n.t('转为Code Cell'),
480
+ actionDescription: l10n.t('转为 Code Cell'),
479
481
  keybind: /*#__PURE__*/_jsx(_Fragment, {
480
482
  children: /*#__PURE__*/_jsx(Tag, {
481
483
  children: "Y"
@@ -483,7 +485,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
483
485
  })
484
486
  }, {
485
487
  key: '23',
486
- actionDescription: l10n.t('转为Markdown Cell'),
488
+ actionDescription: l10n.t('转为 Markdown Cell'),
487
489
  keybind: /*#__PURE__*/_jsx(_Fragment, {
488
490
  children: /*#__PURE__*/_jsx(Tag, {
489
491
  children: "M"
@@ -539,7 +541,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
539
541
  })
540
542
  }, {
541
543
  key: '30',
542
- actionDescription: l10n.t('向上多选Cell'),
544
+ actionDescription: l10n.t('向上多选 Cell'),
543
545
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
544
546
  children: [/*#__PURE__*/_jsx(Tag, {
545
547
  children: "Shift"
@@ -553,7 +555,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
553
555
  })
554
556
  }, {
555
557
  key: '31',
556
- actionDescription: l10n.t('向下多选Cell'),
558
+ actionDescription: l10n.t('向下多选 Cell'),
557
559
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
558
560
  children: [/*#__PURE__*/_jsx(Tag, {
559
561
  children: "Shift"
@@ -567,7 +569,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
567
569
  })
568
570
  }, {
569
571
  key: '32',
570
- actionDescription: l10n.t('选中当前及之前cell'),
572
+ actionDescription: l10n.t('选中当前及之前 Cell'),
571
573
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
572
574
  children: [/*#__PURE__*/_jsx(Tag, {
573
575
  children: "Shift"
@@ -577,7 +579,7 @@ export var LibroKeybindItems = (_dec = singleton(), _dec(_class = /*#__PURE__*/_
577
579
  })
578
580
  }, {
579
581
  key: '33',
580
- actionDescription: l10n.t('选中当前及之后cell'),
582
+ actionDescription: l10n.t('选中当前及之后 Cell'),
581
583
  keybind: /*#__PURE__*/_jsxs(_Fragment, {
582
584
  children: [/*#__PURE__*/_jsx(Tag, {
583
585
  children: "Shift"
@@ -1 +1 @@
1
- {"version":3,"file":"keybind-instructions-view.d.ts","sourceRoot":"","sources":["../../src/keybind-instructions/keybind-instructions-view.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAKpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAEhE,OAAO,cAAc,CAAC;AAsCtB,qBACa,yBAA0B,YAAW,UAAU;IACjC,UAAU,EAAE,eAAe,CAAC;IACrD,yBAAyB,UAAS;IAC1B,qBAAqB,EAAE,QAAQ,EAAE,CAAM;IACvC,kBAAkB,EAAE,QAAQ,EAAE,CAAM;IAE5C,OAAO;CAIR;AAiED,eAAO,MAAM,2BAA2B,iHAqHtC,CAAC;AAEH,eAAO,MAAM,sBAAsB,EAAE,SAGpC,CAAC"}
1
+ {"version":3,"file":"keybind-instructions-view.d.ts","sourceRoot":"","sources":["../../src/keybind-instructions/keybind-instructions-view.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAKpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAEhE,OAAO,cAAc,CAAC;AAsCtB,qBACa,yBAA0B,YAAW,UAAU;IACjC,UAAU,EAAE,eAAe,CAAC;IACrD,yBAAyB,UAAS;IAC1B,qBAAqB,EAAE,QAAQ,EAAE,CAAM;IACvC,kBAAkB,EAAE,QAAQ,EAAE,CAAM;IAE5C,OAAO;CAIR;AAID,eAAO,MAAM,2BAA2B,iHAqLtC,CAAC;AAEH,eAAO,MAAM,sBAAsB,EAAE,SAGpC,CAAC"}
@@ -83,52 +83,6 @@ export var KeybindInstrutionsService = (_dec = singleton(), _dec2 = inject(Libro
83
83
  return [];
84
84
  }
85
85
  })), _class2)) || _class);
86
- var magicColumns = [{
87
- title: '关键字',
88
- dataIndex: 'value',
89
- key: 'value'
90
- }, {
91
- title: '含义',
92
- dataIndex: 'description',
93
- key: 'description'
94
- }];
95
- var magics = [{
96
- key: '1',
97
- value: '%timeit',
98
- description: '测试单行语句的执行时间'
99
- }, {
100
- key: '2',
101
- value: '%%timeit',
102
- description: '测试整个块中代码的执行时间'
103
- }, {
104
- key: '3',
105
- value: '%run',
106
- description: '调用外部python脚本'
107
- }, {
108
- key: '4',
109
- value: '%pwd',
110
- description: '查看当前工作目录'
111
- }, {
112
- key: '5',
113
- value: '%ls',
114
- description: '查看目录文件列表'
115
- }, {
116
- key: '6',
117
- value: '%reset',
118
- description: '清除全部变量'
119
- }, {
120
- key: '7',
121
- value: '%who',
122
- description: '查看所有全局变量的名称,若给定类型参数,只返回该类型的变量列表'
123
- }, {
124
- key: '8',
125
- value: '%whos',
126
- description: '显示所有的全局变量名称、类型、值/信息'
127
- }, {
128
- key: '9',
129
- value: '%env',
130
- description: '列出全部环境变量'
131
- }];
132
86
  export var KeybindInstrutionsComponent = /*#__PURE__*/forwardRef(function KeybindInstrutionsComponent(props, ref) {
133
87
  var visible = props.visible,
134
88
  close = props.close;
@@ -150,6 +104,52 @@ export var KeybindInstrutionsComponent = /*#__PURE__*/forwardRef(function Keybin
150
104
  getSearchResult(value, libroKeybindItems.commandModeData, keybindInstrutionsService.searchCommandModeData);
151
105
  getSearchResult(value, libroKeybindItems.editModeData, keybindInstrutionsService.searchEditModeData);
152
106
  };
107
+ var magicColumns = [{
108
+ title: l10n.t('关键字'),
109
+ dataIndex: 'value',
110
+ key: 'value'
111
+ }, {
112
+ title: l10n.t('含义'),
113
+ dataIndex: 'description',
114
+ key: 'description'
115
+ }];
116
+ var magics = [{
117
+ key: '1',
118
+ value: '%timeit',
119
+ description: "".concat(l10n.t('测试单行语句的运行时间'))
120
+ }, {
121
+ key: '2',
122
+ value: '%%timeit',
123
+ description: l10n.t('测试整个块中代码的运行时间')
124
+ }, {
125
+ key: '3',
126
+ value: '%run',
127
+ description: l10n.t('调用外部 python 脚本')
128
+ }, {
129
+ key: '4',
130
+ value: '%pwd',
131
+ description: l10n.t('查看当前工作目录')
132
+ }, {
133
+ key: '5',
134
+ value: '%ls',
135
+ description: l10n.t('查看目录文件列表')
136
+ }, {
137
+ key: '6',
138
+ value: '%reset',
139
+ description: l10n.t('清除全部变量')
140
+ }, {
141
+ key: '7',
142
+ value: '%who',
143
+ description: l10n.t('查看所有全局变量的名称,若给定类型参数,只返回该类型的变量列表')
144
+ }, {
145
+ key: '8',
146
+ value: '%whos',
147
+ description: l10n.t('显示所有的全局变量名称、类型、值/信息')
148
+ }, {
149
+ key: '9',
150
+ value: '%env',
151
+ description: l10n.t('列出全部环境变量')
152
+ }];
153
153
  var commandModeDataSource = getOrigin(keybindInstrutionsService.searchCommandModeData.length > 0 ? keybindInstrutionsService.searchCommandModeData : libroKeybindItems.commandModeData);
154
154
  var editModeDataSource = getOrigin(keybindInstrutionsService.searchEditModeData.length > 0 ? keybindInstrutionsService.searchEditModeData : libroKeybindItems.editModeData);
155
155
  return /*#__PURE__*/_jsx(ConfigProvider, {
@@ -160,7 +160,7 @@ export var KeybindInstrutionsComponent = /*#__PURE__*/forwardRef(function Keybin
160
160
  className: "libro-keybind-instructions-command",
161
161
  ref: ref,
162
162
  children: /*#__PURE__*/_jsxs(Drawer, {
163
- title: "\u5FEB\u6377\u952E",
163
+ title: l10n.t('快捷键'),
164
164
  placement: "right",
165
165
  onClose: handleClose,
166
166
  width: "330px",
@@ -177,7 +177,7 @@ export var KeybindInstrutionsComponent = /*#__PURE__*/forwardRef(function Keybin
177
177
  label: l10n.t('快捷键'),
178
178
  value: 'keybind'
179
179
  }, {
180
- label: 'Magic 命令',
180
+ label: l10n.t('Magic 命令'),
181
181
  value: 'magic'
182
182
  }]
183
183
  }), segment === 'magic' &&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IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,aAAa;;;;;CAKzB,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAmB7D,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAuDrD,CAAC"}
@@ -1,6 +1,5 @@
1
1
  import { blue, gold, green, red } from '@ant-design/colors';
2
2
  import { ExecutableCellModel } from '@difizen/libro-core';
3
- import { l10n } from '@difizen/mana-l10n';
4
3
  export var ExecutedWithKernelCellModel = {
5
4
  is: function is(arg) {
6
5
  return ExecutableCellModel.is(arg) && 'kernelExecuting' in arg && typeof arg.kernelExecuting === 'boolean';
@@ -21,19 +20,19 @@ export var jupyterServiceStatus = {
21
20
  category: 'JupyterService',
22
21
  color: statusToColor.blocking,
23
22
  text: 'loading',
24
- text_zh: l10n.t('加载中')
23
+ text_zh: '加载中'
25
24
  },
26
25
  failed: {
27
26
  category: 'JupyterService',
28
27
  color: statusToColor.error,
29
28
  text: 'failed',
30
- text_zh: l10n.t('加载失败')
29
+ text_zh: '加载失败'
31
30
  },
32
31
  loaded: {
33
32
  category: 'JupyterService',
34
33
  color: statusToColor.canRunImmediate,
35
34
  text: 'loaded',
36
- text_zh: l10n.t('加载完成')
35
+ text_zh: '加载完成'
37
36
  }
38
37
  };
39
38
  export var kernelStatus = {
@@ -41,54 +40,54 @@ export var kernelStatus = {
41
40
  category: 'Kernel',
42
41
  color: statusToColor.blocking,
43
42
  text: 'connecting',
44
- text_zh: l10n.t('正在连接')
43
+ text_zh: '正在连接'
45
44
  },
46
45
  unknown: {
47
46
  category: 'Kernel',
48
47
  color: statusToColor.blocking,
49
48
  text: 'unknown',
50
- text_zh: l10n.t('未知')
49
+ text_zh: '未知'
51
50
  },
52
51
  starting: {
53
52
  category: 'Kernel',
54
53
  color: statusToColor.blocking,
55
54
  text: 'starting',
56
- text_zh: l10n.t('启动中')
55
+ text_zh: '启动中'
57
56
  },
58
57
  idle: {
59
58
  category: 'Kernel',
60
59
  color: statusToColor.canRunImmediate,
61
60
  text: 'idle',
62
- text_zh: l10n.t('空闲')
61
+ text_zh: '空闲'
63
62
  },
64
63
  busy: {
65
64
  category: 'Kernel',
66
65
  color: statusToColor.canRun,
67
66
  text: 'busy',
68
- text_zh: l10n.t('忙碌')
67
+ text_zh: '忙碌'
69
68
  },
70
69
  terminating: {
71
70
  category: 'Kernel',
72
71
  color: statusToColor.blocking,
73
72
  text: 'terminating',
74
- text_zh: l10n.t('终止中')
73
+ text_zh: '终止中'
75
74
  },
76
75
  restarting: {
77
76
  category: 'Kernel',
78
77
  color: statusToColor.blocking,
79
78
  text: 'restarting',
80
- text_zh: l10n.t('重启中')
79
+ text_zh: '重启中'
81
80
  },
82
81
  autorestarting: {
83
82
  category: 'Kernel',
84
83
  color: statusToColor.blocking,
85
84
  text: 'autorestarting',
86
- text_zh: l10n.t('自动重启中')
85
+ text_zh: '自动重启中'
87
86
  },
88
87
  dead: {
89
88
  category: 'Kernel',
90
89
  color: statusToColor.error,
91
90
  text: 'dead',
92
- text_zh: l10n.t('死亡')
91
+ text_zh: '死亡'
93
92
  }
94
93
  };
@@ -148,7 +148,7 @@
148
148
  }
149
149
 
150
150
  .libro-run-menu-container {
151
- width: 220px;
151
+ width: 330px;
152
152
  background-color: var(--mana-libro-popover-background-color) !important;
153
153
  .@{ant-prefix}-dropdown-menu-item:hover {
154
154
  background-color: var(--mana-libro-menu-hover-color) !important;
@@ -1 +1 @@
1
- {"version":3,"file":"kernel-status-and-selector.d.ts","sourceRoot":"","sources":["../../src/toolbar/kernel-status-and-selector.tsx"],"names":[],"mappings":";AASA,OAAO,cAAc,CAAC;AAMtB,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EA2DxC,CAAC"}
1
+ {"version":3,"file":"kernel-status-and-selector.d.ts","sourceRoot":"","sources":["../../src/toolbar/kernel-status-and-selector.tsx"],"names":[],"mappings":";AAQA,OAAO,cAAc,CAAC;AAMtB,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EA2DxC,CAAC"}
@@ -28,15 +28,15 @@ export var KernelStatusSelector = function KernelStatusSelector() {
28
28
  className: "libro-kernel-status-and-selector",
29
29
  children: [/*#__PURE__*/_jsx("span", {
30
30
  className: "kernel",
31
- children: "kernel\uFF1A"
31
+ children: l10n.t('kernel:')
32
32
  }), /*#__PURE__*/_jsx(KernelSelector, {}), showBadge && (isKernelBusy ? /*#__PURE__*/_jsx(Badge, {
33
33
  className: "libro-kernel-badge",
34
34
  color: kernelStatus['busy'].color,
35
- text: kernelStatus['busy'].text_zh
35
+ text: l10n.t(kernelStatus['busy'].text_zh)
36
36
  }, "libro-kernel-badge") : /*#__PURE__*/_jsx(Badge, {
37
37
  className: "libro-kernel-badge",
38
38
  color: color,
39
- text: text_zh
39
+ text: l10n.t(text_zh)
40
40
  }, "libro-kernel-badge"))]
41
41
  })
42
42
  });
@@ -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,EAgH/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,EAiH/B,CAAC"}
@@ -30,7 +30,7 @@ export var RunSelector = function RunSelector() {
30
30
  var configService = useInject(ConfigurationService);
31
31
  var isRunVisible = ExecutableCellModel.is(curCell === null || curCell === void 0 ? void 0 : curCell.model) && !(curCell !== null && curCell !== void 0 && curCell.model.executing) ? true : false;
32
32
  var isKernelPrepared = kernelPrepared(libroServerManager, libroModel);
33
- var _useState = useState('kernel准备中,无法执行'),
33
+ var _useState = useState(l10n.t('kernel准备中,无法执行')),
34
34
  _useState2 = _slicedToArray(_useState, 2),
35
35
  kernelUnreadyBtnText = _useState2[0],
36
36
  setKernelUnreadyBtnText = _useState2[1];
@@ -1 +1 @@
1
- {"version":3,"file":"side-toolbar-run-selector.d.ts","sourceRoot":"","sources":["../../src/toolbar/side-toolbar-run-selector.tsx"],"names":[],"mappings":";AAmDA,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EA+C1C,CAAC"}
1
+ {"version":3,"file":"side-toolbar-run-selector.d.ts","sourceRoot":"","sources":["../../src/toolbar/side-toolbar-run-selector.tsx"],"names":[],"mappings":";AAaA,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAmF1C,CAAC"}
@@ -16,50 +16,50 @@ import { kernelPrepared } from "../utils/index.js";
16
16
  import { jsx as _jsx } from "react/jsx-runtime";
17
17
  import { Fragment as _Fragment } from "react/jsx-runtime";
18
18
  import { jsxs as _jsxs } from "react/jsx-runtime";
19
- var items = [{
20
- id: NotebookCommands['RunCell'].id,
21
- label: /*#__PURE__*/_jsxs(_Fragment, {
22
- children: [/*#__PURE__*/_jsx("span", {
23
- className: "libro-menu-item-label",
24
- children: l10n.t('运行 Cell')
25
- }), /*#__PURE__*/_jsx("span", {
26
- className: "libro-menu-item-keybind",
27
- children: "Cmd + Enter"
28
- })]
29
- }),
30
- group: 'runCell1'
31
- }, {
32
- id: NotebookCommands['RunAllAbove'].id,
33
- label: /*#__PURE__*/_jsxs(_Fragment, {
34
- children: [/*#__PURE__*/_jsx("span", {
35
- className: "libro-menu-item-label",
36
- children: l10n.t('运行上方所有 Cell')
37
- }), /*#__PURE__*/_jsx("span", {
38
- className: "libro-menu-item-keybind",
39
- children: "Cmd + F8"
40
- })]
41
- }),
42
- group: 'runCell2'
43
- }, {
44
- id: NotebookCommands['RunAllBelow'].id,
45
- label: /*#__PURE__*/_jsxs(_Fragment, {
46
- children: [/*#__PURE__*/_jsx("span", {
47
- className: "libro-menu-item-label",
48
- children: l10n.t('运行当前及下方所有 Cell')
49
- }), /*#__PURE__*/_jsx("span", {
50
- className: "libro-menu-item-keybind",
51
- children: "Cmd + F10"
52
- })]
53
- }),
54
- group: 'runCell2'
55
- }];
56
19
  export var SideToolbarRunSelector = function SideToolbarRunSelector() {
57
20
  var libroView = useInject(ViewInstance);
58
21
  var libroServerManager = useInject(ServerManager);
59
22
  var configService = useInject(ConfigurationService);
60
23
  var libroModel = libroView ? libroView.model : undefined;
24
+ var items = [{
25
+ id: NotebookCommands['RunCell'].id,
26
+ label: /*#__PURE__*/_jsxs(_Fragment, {
27
+ children: [/*#__PURE__*/_jsx("span", {
28
+ className: "libro-menu-item-label",
29
+ children: l10n.t('运行 Cell')
30
+ }), /*#__PURE__*/_jsx("span", {
31
+ className: "libro-menu-item-keybind",
32
+ children: "Cmd + Enter"
33
+ })]
34
+ }),
35
+ group: 'runCell1'
36
+ }, {
37
+ id: NotebookCommands['RunAllAbove'].id,
38
+ label: /*#__PURE__*/_jsxs(_Fragment, {
39
+ children: [/*#__PURE__*/_jsx("span", {
40
+ className: "libro-menu-item-label",
41
+ children: l10n.t('运行之前所有 Cell')
42
+ }), /*#__PURE__*/_jsx("span", {
43
+ className: "libro-menu-item-keybind",
44
+ children: "Cmd + F8"
45
+ })]
46
+ }),
47
+ group: 'runCell2'
48
+ }, {
49
+ id: NotebookCommands['RunAllBelow'].id,
50
+ label: /*#__PURE__*/_jsxs(_Fragment, {
51
+ children: [/*#__PURE__*/_jsx("span", {
52
+ className: "libro-menu-item-label",
53
+ children: l10n.t('运行当前及之后 Cell')
54
+ }), /*#__PURE__*/_jsx("span", {
55
+ className: "libro-menu-item-keybind",
56
+ children: "Cmd + F10"
57
+ })]
58
+ }),
59
+ group: 'runCell2'
60
+ }];
61
61
  var isKernelPrepared = kernelPrepared(libroServerManager, libroModel);
62
- var _useState = useState('kernel准备中,无法执行'),
62
+ var _useState = useState(l10n.t('kernel准备中,无法运行')),
63
63
  _useState2 = _slicedToArray(_useState, 2),
64
64
  kernelUnreadyBtnText = _useState2[0],
65
65
  setKernelUnreadyBtnText = _useState2[1];