@difizen/libro-core 0.0.2-alpha.0 → 0.1.1

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 (70) hide show
  1. package/README.md +279 -2
  2. package/es/add-cell/libro-add-cell-slot-contribution.js +2 -2
  3. package/es/add-cell/libro-add-cell-view.js +2 -2
  4. package/es/cell/libro-cell-contribution.js +1 -1
  5. package/es/cell/libro-cell-model.js +6 -6
  6. package/es/cell/libro-cell-service.js +4 -4
  7. package/es/cell/libro-cell-view.js +7 -7
  8. package/es/cell/libro-edit-cell-view.js +3 -3
  9. package/es/cell/libro-executable-cell-view.js +2 -2
  10. package/es/collapse-service.js +1 -1
  11. package/es/command/document-commands.js +1 -1
  12. package/es/command/kernel-command.d.ts.map +1 -1
  13. package/es/command/kernel-command.js +1 -3
  14. package/es/command/libro-command-contribution.js +4 -4
  15. package/es/command/libro-command-register.js +2 -2
  16. package/es/command/notebook-commands.d.ts.map +1 -1
  17. package/es/command/notebook-commands.js +2 -11
  18. package/es/components/dnd-cell-item-render.js +7 -7
  19. package/es/components/dnd-component/custom-drag-layer.js +4 -4
  20. package/es/components/dnd-component/default-dnd-content.d.ts.map +1 -1
  21. package/es/components/dnd-component/default-dnd-content.js +7 -7
  22. package/es/components/dnd-component/dnd-list.d.ts +2 -2
  23. package/es/components/dnd-component/dnd-list.d.ts.map +1 -1
  24. package/es/components/dnd-component/dnd-list.js +8 -8
  25. package/es/components/libro-component.js +1 -1
  26. package/es/configuration/libro-configuration-contribution.js +3 -3
  27. package/es/configuration/libro-configuration.d.ts +1 -1
  28. package/es/configuration/libro-configuration.d.ts.map +1 -1
  29. package/es/configuration/libro-configuration.js +7 -7
  30. package/es/content/libro-content-contribution.js +1 -1
  31. package/es/content/libro-content-service.js +1 -1
  32. package/es/libro-context-key.js +1 -1
  33. package/es/libro-keybind-registry.js +1 -1
  34. package/es/libro-model.js +7 -7
  35. package/es/libro-service.js +4 -4
  36. package/es/libro-view-tracker.js +1 -1
  37. package/es/libro-view.d.ts.map +1 -1
  38. package/es/libro-view.js +34 -36
  39. package/es/module.d.ts.map +1 -1
  40. package/es/module.js +2 -2
  41. package/es/output/output-area.js +4 -4
  42. package/es/output/output-contribution.js +1 -1
  43. package/es/output/output-model.js +1 -1
  44. package/es/slot/libro-slot-manager.js +2 -2
  45. package/es/slot/libro-slot-protocol.d.ts +1 -1
  46. package/es/slot/libro-slot-protocol.d.ts.map +1 -1
  47. package/es/slot/libro-slot-view.js +1 -1
  48. package/es/theme/libro-color-registry.d.ts.map +1 -1
  49. package/es/theme/libro-color-registry.js +70 -70
  50. package/es/toolbar/change-cell-to-selector.js +1 -1
  51. package/es/toolbar/libro-toolbar.js +1 -1
  52. package/es/toolbar/restart-clear-outputs-contribution.js +1 -1
  53. package/es/toolbar/restart-clear-outputs-modal.js +1 -1
  54. package/es/toolbar/save-icon.js +2 -2
  55. package/es/toolbar/shutdown-contribution.js +1 -1
  56. package/es/toolbar/shutdown-modal.js +1 -1
  57. package/package.json +9 -9
  58. package/src/command/document-commands.ts +1 -1
  59. package/src/command/kernel-command.ts +1 -3
  60. package/src/command/notebook-commands.ts +2 -11
  61. package/src/components/dnd-cell-item-render.tsx +5 -5
  62. package/src/components/dnd-component/default-dnd-content.tsx +1 -1
  63. package/src/components/dnd-component/dnd-list.tsx +8 -5
  64. package/src/configuration/libro-configuration-contribution.ts +2 -2
  65. package/src/configuration/libro-configuration.ts +7 -7
  66. package/src/index.spec.ts +12 -0
  67. package/src/libro-view.tsx +2 -3
  68. package/src/module.ts +2 -1
  69. package/src/slot/libro-slot-protocol.ts +1 -1
  70. package/src/theme/libro-color-registry.ts +57 -57
@@ -1,11 +1,11 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
2
  var _dec, _class;
3
3
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4
4
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
5
5
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
6
6
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
7
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
- import { Color, ColorContribution } from '@difizen/mana-app';
8
+ import { ColorContribution } from '@difizen/mana-app';
9
9
  import { singleton } from '@difizen/mana-app';
10
10
  export var LibroColorRegistry = (_dec = singleton({
11
11
  contrib: ColorContribution
@@ -35,15 +35,15 @@ export var LibroColorRegistry = (_dec = singleton({
35
35
  }, {
36
36
  id: 'libro.background',
37
37
  defaults: {
38
- dark: '#1f2022',
39
- light: '#ffffff'
38
+ dark: '#1F2022',
39
+ light: '#FFFFFF'
40
40
  },
41
41
  description: ''
42
42
  }, {
43
43
  id: 'libro.popover.background.color',
44
44
  defaults: {
45
- dark: '#2f3032',
46
- light: '#ffffff'
45
+ dark: '#2F3032',
46
+ light: '#FFFFFF'
47
47
  },
48
48
  description: ''
49
49
  }, {
@@ -56,8 +56,8 @@ export var LibroColorRegistry = (_dec = singleton({
56
56
  }, {
57
57
  id: 'libro.dropdown.icon.color',
58
58
  defaults: {
59
- dark: Color.rgba(255, 255, 255, 0.3),
60
- light: Color.rgba(0, 0, 0, 0.2)
59
+ dark: '#FFFFFF4D',
60
+ light: '#00000033'
61
61
  },
62
62
  description: ''
63
63
  }, {
@@ -70,14 +70,14 @@ export var LibroColorRegistry = (_dec = singleton({
70
70
  }, {
71
71
  id: 'libro.text.default.color',
72
72
  defaults: {
73
- dark: '#e3e4e6',
73
+ dark: '#E3E4E6',
74
74
  light: '#000000'
75
75
  },
76
76
  description: ''
77
77
  }, {
78
78
  id: 'libro.text.tertiary.color',
79
79
  defaults: {
80
- dark: '#bdc0c4',
80
+ dark: '#BDC0C4',
81
81
  light: '#B8BABA'
82
82
  },
83
83
  description: ''
@@ -85,14 +85,14 @@ export var LibroColorRegistry = (_dec = singleton({
85
85
  id: 'libro.output.background',
86
86
  defaults: {
87
87
  dark: '#292A2D',
88
- light: '#fff'
88
+ light: '#FFFFFF'
89
89
  },
90
90
  description: ''
91
91
  }, {
92
92
  id: 'libro.toptoolbar.border.color',
93
93
  defaults: {
94
- dark: Color.rgba(255, 255, 255, 0.1),
95
- light: Color.rgba(0, 0, 0, 0.1)
94
+ dark: '#FFFFFF1A',
95
+ light: '#0000001A'
96
96
  },
97
97
  description: ''
98
98
  }, {
@@ -105,49 +105,49 @@ export var LibroColorRegistry = (_dec = singleton({
105
105
  }, {
106
106
  id: 'libro.toptoolbar.disabled.icon.color',
107
107
  defaults: {
108
- dark: Color.rgba(255, 255, 255, 0.3),
109
- light: Color.rgba(0, 0, 0, 0.25)
108
+ dark: '#FFFFFF4D',
109
+ light: '#00000040'
110
110
  },
111
111
  description: ''
112
112
  }, {
113
113
  id: 'libro.toptoolbar.text.color',
114
114
  defaults: {
115
- dark: '#f5f5f5',
115
+ dark: '#F5F5F5',
116
116
  light: '#000000'
117
117
  },
118
118
  description: ''
119
119
  }, {
120
120
  id: 'libro.bottom.btn.background.color',
121
121
  defaults: {
122
- dark: Color.rgba(255, 255, 255, 0.04),
123
- light: Color.rgba(255, 255, 255, 1)
122
+ dark: '#FFFFFF0A',
123
+ light: '#FFFFFF'
124
124
  },
125
125
  description: ''
126
126
  }, {
127
127
  id: 'libro.bottom.btn.border.color',
128
128
  defaults: {
129
129
  dark: '#505559',
130
- light: Color.rgba(0, 10, 26, 0.16)
130
+ light: '#000A1A29'
131
131
  },
132
132
  description: ''
133
133
  }, {
134
134
  id: 'libro.bottom.btn.icon.color',
135
135
  defaults: {
136
136
  dark: '#505559',
137
- light: Color.rgba(82, 89, 100, 0.85)
137
+ light: '#525964D9'
138
138
  },
139
139
  description: ''
140
140
  }, {
141
141
  id: 'libro.bottom.btn.text.color',
142
142
  defaults: {
143
143
  dark: '#E3E4E6',
144
- light: Color.rgba(0, 10, 26, 0.68)
144
+ light: '#000A1AAD'
145
145
  },
146
146
  description: ''
147
147
  }, {
148
148
  id: 'libro.default.btn.background.color',
149
149
  defaults: {
150
- dark: Color.rgba(255, 255, 255, 0.1),
150
+ dark: '#FFFFFF1A',
151
151
  light: '#FFFFFF'
152
152
  },
153
153
  description: ''
@@ -155,7 +155,7 @@ export var LibroColorRegistry = (_dec = singleton({
155
155
  id: 'libro.default.btn.text.color',
156
156
  defaults: {
157
157
  dark: '#E3E4E6',
158
- light: Color.rgba(0, 10, 26, 0.68)
158
+ light: '#000A1AAD'
159
159
  },
160
160
  description: ''
161
161
  }, {
@@ -176,21 +176,21 @@ export var LibroColorRegistry = (_dec = singleton({
176
176
  id: 'libro.toolbar.menu.label.color',
177
177
  defaults: {
178
178
  dark: '#BDC0C4',
179
- light: Color.rgba(0, 0, 0, 0.65)
179
+ light: '#000000A6'
180
180
  },
181
181
  description: ''
182
182
  }, {
183
183
  id: 'libro.toolbar.menu.disabled.label.color',
184
184
  defaults: {
185
- dark: '#878c93',
186
- light: Color.rgba(0, 0, 0, 0.25)
185
+ dark: '#878C93',
186
+ light: '#00000040'
187
187
  },
188
188
  description: ''
189
189
  }, {
190
190
  id: 'libro.toolbar.menu.keybind.color',
191
191
  defaults: {
192
- dark: '#878c93',
193
- light: Color.rgba(0, 0, 0, 0.45)
192
+ dark: '#878C93',
193
+ light: '#00000073'
194
194
  },
195
195
  description: ''
196
196
  }, {
@@ -203,29 +203,29 @@ export var LibroColorRegistry = (_dec = singleton({
203
203
  }, {
204
204
  id: 'libro.sidetoolbar.border.color',
205
205
  defaults: {
206
- dark: Color.rgba(255, 255, 255, 0.08),
207
- light: Color.rgba(0, 0, 0, 0.1)
206
+ dark: '#FFFFFF14',
207
+ light: '#0000001A'
208
208
  },
209
209
  description: ''
210
210
  }, {
211
211
  id: 'libro.close.color',
212
212
  defaults: {
213
- dark: Color.rgba(255, 255, 255, 0.45),
214
- light: Color.rgba(0, 0, 0, 0.45)
213
+ dark: '#FFFFFF73',
214
+ light: '#00000073'
215
215
  },
216
216
  description: ''
217
217
  }, {
218
218
  id: 'libro.modal.title.color',
219
219
  defaults: {
220
220
  dark: '#EDEEEF',
221
- light: Color.rgba(0, 0, 0, 0.85)
221
+ light: '#000000D9'
222
222
  },
223
223
  description: ''
224
224
  }, {
225
225
  id: 'libro.modal.content.color',
226
226
  defaults: {
227
- dark: '#e3e4e6',
228
- light: '#000a1a'
227
+ dark: '#E3E4E6',
228
+ light: '#000A1A'
229
229
  },
230
230
  description: ''
231
231
  }, {
@@ -246,7 +246,7 @@ export var LibroColorRegistry = (_dec = singleton({
246
246
  id: 'libro.tip.font.color',
247
247
  defaults: {
248
248
  dark: '#D6D8DA',
249
- light: Color.rgba(0, 0, 0, 0.5)
249
+ light: '#00000080'
250
250
  },
251
251
  description: ''
252
252
  }, {
@@ -266,29 +266,29 @@ export var LibroColorRegistry = (_dec = singleton({
266
266
  }, {
267
267
  id: 'libro.error.color',
268
268
  defaults: {
269
- dark: '#cf4c52',
270
- light: '#ed1345'
269
+ dark: '#CF4C52',
270
+ light: '#ED1345'
271
271
  },
272
272
  description: ''
273
273
  }, {
274
274
  id: 'libro.cell.border.color',
275
275
  defaults: {
276
- dark: '#3b3c42',
276
+ dark: '#3B3C42',
277
277
  light: '#D6DEE6'
278
278
  },
279
279
  description: ''
280
280
  }, {
281
281
  id: 'libro.cell.active.border.color',
282
282
  defaults: {
283
- dark: '#378edf',
284
- light: '#3490ed'
283
+ dark: '#378EDF',
284
+ light: '#3490ED'
285
285
  },
286
286
  description: ''
287
287
  }, {
288
288
  id: 'libro.cell.active.border.shadow.color',
289
289
  defaults: {
290
- dark: Color.rgba(73, 162, 250, 0.25),
291
- light: Color.rgba(53, 146, 238, 0.25)
290
+ dark: '#49A2FA40',
291
+ light: '#3592EE40'
292
292
  },
293
293
  description: ''
294
294
  }, {
@@ -301,8 +301,8 @@ export var LibroColorRegistry = (_dec = singleton({
301
301
  }, {
302
302
  id: 'libro.cell.header.title',
303
303
  defaults: {
304
- dark: '#d6d8da',
305
- light: '#000a1a'
304
+ dark: '#D6D8DA',
305
+ light: '#000A1A'
306
306
  },
307
307
  description: ''
308
308
  }, {
@@ -316,27 +316,27 @@ export var LibroColorRegistry = (_dec = singleton({
316
316
  id: 'libro.input.border.color',
317
317
  defaults: {
318
318
  dark: '#505559',
319
- light: Color.rgba(0, 0, 0, 0.15)
319
+ light: '#00000026'
320
320
  },
321
321
  description: ''
322
322
  }, {
323
323
  id: 'libro.input.background.color',
324
324
  defaults: {
325
- dark: Color.rgba(255, 255, 255, 0.04),
325
+ dark: '#FFFFFF0A',
326
326
  light: '#FFFFFF'
327
327
  },
328
328
  description: ''
329
329
  }, {
330
330
  id: 'libro.input.group.btn.background.color',
331
331
  defaults: {
332
- dark: Color.rgba(0, 0, 0, 0.02),
333
- light: Color.rgba(0, 0, 0, 0.02)
332
+ dark: '#00000005',
333
+ light: '#00000005'
334
334
  },
335
335
  description: ''
336
336
  }, {
337
337
  id: 'libro.table.innner.border.color',
338
338
  defaults: {
339
- dark: '#1affffff',
339
+ dark: '#1AFFFF',
340
340
  light: '#E5EBF1'
341
341
  },
342
342
  description: ''
@@ -350,71 +350,71 @@ export var LibroColorRegistry = (_dec = singleton({
350
350
  }, {
351
351
  id: 'libro.editor.keyword.color',
352
352
  defaults: {
353
- dark: '#109b67',
353
+ dark: '#109B67',
354
354
  light: '#098658'
355
355
  },
356
356
  description: ''
357
357
  }, {
358
358
  id: 'libro.editor.number.color',
359
359
  defaults: {
360
- dark: '#109b67',
360
+ dark: '#109B67',
361
361
  light: '#098658'
362
362
  },
363
363
  description: ''
364
364
  }, {
365
365
  id: 'libro.editor.variable.2.color',
366
366
  defaults: {
367
- dark: '#5da4ea',
367
+ dark: '#5DA4EA',
368
368
  light: '#2060A0'
369
369
  },
370
370
  description: ''
371
371
  }, {
372
372
  id: 'libro.editor.punctuation.color',
373
373
  defaults: {
374
- dark: '#5da4ea',
374
+ dark: '#5DA4EA',
375
375
  light: '#2060A0'
376
376
  },
377
377
  description: ''
378
378
  }, {
379
379
  id: 'libro.editor.property.color',
380
380
  defaults: {
381
- dark: '#5da4ea',
381
+ dark: '#5DA4EA',
382
382
  light: '#2060A0'
383
383
  },
384
384
  description: ''
385
385
  }, {
386
386
  id: 'libro.editor.operator.color',
387
387
  defaults: {
388
- dark: 'e12ee1',
388
+ dark: 'E12EE1',
389
389
  light: '#C700C7'
390
390
  },
391
391
  description: ''
392
392
  }, {
393
393
  id: 'libro.editor.meta.color',
394
394
  defaults: {
395
- dark: '#e12ee1',
395
+ dark: '#E12EE1',
396
396
  light: '#C700C7'
397
397
  },
398
398
  description: ''
399
399
  }, {
400
400
  id: 'libro.editor.builtin.color',
401
401
  defaults: {
402
- dark: '#109b67',
402
+ dark: '#109B67',
403
403
  light: '#098658'
404
404
  },
405
405
  description: ''
406
406
  }, {
407
407
  id: 'libro.editor.variable.color',
408
408
  defaults: {
409
- dark: '#e3e4e6',
409
+ dark: '#E3E4E6',
410
410
  light: '#212121'
411
411
  },
412
412
  description: ''
413
413
  }, {
414
414
  id: 'libro.editor.def.color',
415
415
  defaults: {
416
- dark: '#187dff',
417
- light: '#003cff'
416
+ dark: '#187DFF',
417
+ light: '#003CFF'
418
418
  },
419
419
  description: ''
420
420
  }, {
@@ -427,21 +427,21 @@ export var LibroColorRegistry = (_dec = singleton({
427
427
  }, {
428
428
  id: 'libro.editor.string.color',
429
429
  defaults: {
430
- dark: '#ff5b48',
431
- light: '#c03030'
430
+ dark: '#FF5B48',
431
+ light: '#C03030'
432
432
  },
433
433
  description: ''
434
434
  }, {
435
435
  id: 'libro.editor.activeline.color',
436
436
  defaults: {
437
- dark: Color.rgba(229, 232, 240, 0.1),
438
- light: Color.rgba(229, 232, 240, 0.5)
437
+ dark: '#E5E8F01A',
438
+ light: '#E5E8F080'
439
439
  },
440
440
  description: ''
441
441
  }, {
442
442
  id: 'libro.editor.selectionMatch.color',
443
443
  defaults: {
444
- dark: '#99ff7780',
444
+ dark: '#99FF7780',
445
445
  light: '#DDE6FF'
446
446
  },
447
447
  description: ''
@@ -455,7 +455,7 @@ export var LibroColorRegistry = (_dec = singleton({
455
455
  }, {
456
456
  id: 'libro.editor.gutter.number.color',
457
457
  defaults: {
458
- dark: '#a8aebf',
458
+ dark: '#A8EABF',
459
459
  light: '#A4AECB'
460
460
  },
461
461
  description: ''
@@ -469,15 +469,15 @@ export var LibroColorRegistry = (_dec = singleton({
469
469
  }, {
470
470
  id: 'libro.editor.cursor.color',
471
471
  defaults: {
472
- dark: '#ffffff',
472
+ dark: '#FFFFFF',
473
473
  light: '#000000'
474
474
  },
475
475
  description: ''
476
476
  }, {
477
477
  id: 'libro.editor.indent.marker.bg.color',
478
478
  defaults: {
479
- dark: '#42444d',
480
- light: '#d6dbeb'
479
+ dark: '#42444D',
480
+ light: '#D6DBEB'
481
481
  },
482
482
  description: ''
483
483
  }, {
@@ -30,7 +30,7 @@ export var ToolItemSelectInner = function ToolItemSelectInner() {
30
30
  };
31
31
  return /*#__PURE__*/_jsx(_Fragment, {
32
32
  children: /*#__PURE__*/_jsx(Select, {
33
- value: curCell === null || curCell === void 0 ? void 0 : (_curCell$model = curCell.model) === null || _curCell$model === void 0 ? void 0 : _curCell$model.type,
33
+ value: curCell === null || curCell === void 0 || (_curCell$model = curCell.model) === null || _curCell$model === void 0 ? void 0 : _curCell$model.type,
34
34
  size: 'small',
35
35
  style: widthStyle,
36
36
  onChange: handleChange,
@@ -1,4 +1,4 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
2
  var _dec, _class;
3
3
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4
4
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
@@ -1,4 +1,4 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
2
  var _dec, _class;
3
3
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4
4
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
@@ -7,7 +7,7 @@ export var RestartClearOutputModalComponent = function RestartClearOutputModalCo
7
7
  close = _ref.close,
8
8
  data = _ref.data;
9
9
  var handleRestart = useCallback(function () {
10
- data === null || data === void 0 ? void 0 : data.restartClearOutput();
10
+ data === null || data === void 0 || data.restartClearOutput();
11
11
  close();
12
12
  // eslint-disable-next-line react-hooks/exhaustive-deps
13
13
  }, [data]);
@@ -2,7 +2,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
2
2
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
3
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
4
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
5
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
7
  import { SaveOutlined, CheckOutlined, CloseOutlined, LoadingOutlined } from '@ant-design/icons';
8
8
  import { useInject, ViewInstance } from '@difizen/mana-app';
@@ -29,7 +29,7 @@ export var SaveIcon = function SaveIcon() {
29
29
  }
30
30
  return function () {
31
31
  var _toDispose;
32
- (_toDispose = toDispose) === null || _toDispose === void 0 ? void 0 : _toDispose.dispose();
32
+ (_toDispose = toDispose) === null || _toDispose === void 0 || _toDispose.dispose();
33
33
  };
34
34
  }, [handleSave, libroView]);
35
35
  if (saved !== undefined) {
@@ -1,4 +1,4 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
2
  var _dec, _class;
3
3
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4
4
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
@@ -7,7 +7,7 @@ export var ShutdownModalComponent = function ShutdownModalComponent(_ref) {
7
7
  close = _ref.close,
8
8
  data = _ref.data;
9
9
  var handleShutdown = useCallback(function () {
10
- data === null || data === void 0 ? void 0 : data.closeAndShutdown();
10
+ data === null || data === void 0 || data.closeAndShutdown();
11
11
  close();
12
12
  // eslint-disable-next-line react-hooks/exhaustive-deps
13
13
  }, [data]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@difizen/libro-core",
3
- "version": "0.0.2-alpha.0",
3
+ "version": "0.1.1",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "libro",
@@ -33,22 +33,22 @@
33
33
  "src"
34
34
  ],
35
35
  "dependencies": {
36
- "@difizen/mana-app": "alpha",
37
- "@difizen/mana-react": "alpha",
38
- "@difizen/mana-l10n": "alpha",
36
+ "@difizen/mana-app": "latest",
37
+ "@difizen/mana-react": "latest",
38
+ "@difizen/mana-l10n": "latest",
39
39
  "@ant-design/icons": "^5.1.0",
40
- "@difizen/libro-code-editor": "^0.0.2-alpha.0",
41
- "@difizen/libro-common": "^0.0.2-alpha.0",
42
- "@difizen/libro-shared-model": "^0.0.2-alpha.0",
40
+ "@difizen/libro-code-editor": "^0.1.1",
41
+ "@difizen/libro-common": "^0.1.1",
42
+ "@difizen/libro-shared-model": "^0.1.1",
43
43
  "classnames": "^2.3.2",
44
44
  "dnd-core": "^16.0.1",
45
45
  "react-dnd": "^16.0.1",
46
46
  "react-dnd-html5-backend": "^16.0.1",
47
- "uuid": "^8.3.2"
47
+ "uuid": "^9.0.0"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@types/react": "^18.2.25",
51
- "@types/uuid": "^8.3.4"
51
+ "@types/uuid": "^9.0.2"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "antd": "^5.8.6",
@@ -12,7 +12,7 @@ export const DocumentCommands: Record<
12
12
  keybind: 'ctrlcmd+s',
13
13
  },
14
14
  OpenSettings: {
15
- id: 'document.notebook.open_setting',
15
+ id: 'document:setting',
16
16
  icon: SettingOutlined,
17
17
  },
18
18
  };
@@ -31,9 +31,7 @@ export const KernelCommands: Record<string, Command & { keybind?: string }> = {
31
31
  id: 'notebook:shutdown-kernel',
32
32
  label: `Shutdown Kernel`,
33
33
  },
34
- ShowKernelStatus: {
35
- id: 'notebook:show-kernel-status',
36
- },
34
+ // TODO: remove this command
37
35
  ShowKernelStatusAndSelector: {
38
36
  id: 'notebook:show-kernel-status-and-selector',
39
37
  },
@@ -107,7 +107,7 @@ export const NotebookCommands: Record<
107
107
  },
108
108
  CloseAndShutdown: {
109
109
  id: 'notebook:close-and-shutdown',
110
- label: `Close and Shut Down Notebook`,
110
+ label: `Close editor and shut down kernel`,
111
111
  icon: PoweroffOutlined,
112
112
  },
113
113
  // TODO: 确定命令含义
@@ -123,16 +123,6 @@ export const NotebookCommands: Record<
123
123
  icon: CopyOutlined,
124
124
  when: 'commandMode',
125
125
  },
126
- // TODO: 确定命令含义
127
- CopyToClipboard: {
128
- id: 'notebook:copy-to-clipboard',
129
- label: `Copy Output to Clipboard`,
130
- },
131
- // TODO: 确定命令含义
132
- CreateOutputView: {
133
- id: 'notebook:create-output-view',
134
- label: `Create New View for Cell Output`,
135
- },
136
126
  CutCell: {
137
127
  id: 'notebook:cut-cell',
138
128
  label: `Cut Cells`,
@@ -340,6 +330,7 @@ export const NotebookCommands: Record<
340
330
  icon: SnippetsOutlined,
341
331
  when: 'commandMode',
342
332
  },
333
+ // TODO: register keybind
343
334
  Redo: {
344
335
  id: 'notebook:redo',
345
336
  label: `Redo`,
@@ -20,7 +20,7 @@ import { CellCollapsible } from '../collapse-service.js';
20
20
  import {
21
21
  CellSideToolbarVisible,
22
22
  CellTopToolbarSetting,
23
- CollapserClickActive,
23
+ CollapserActive,
24
24
  } from '../configuration/libro-configuration.js';
25
25
  import type { CellView, DndItemProps } from '../libro-protocol.js';
26
26
  import { LibroToolbarArea, isCellView } from '../libro-protocol.js';
@@ -71,7 +71,7 @@ const CellInput: React.FC<{ cell: CellView }> = forwardRef(function CellInput(
71
71
  ) {
72
72
  const { cell } = props;
73
73
  const inputCollapserRef = useRef<HTMLDivElement>(null);
74
- const [collapserClickActive] = useConfigurationValue(CollapserClickActive);
74
+ const [collapserClickActive] = useConfigurationValue(CollapserActive);
75
75
  const handleCellInputCollapser = () => {
76
76
  if (collapserClickActive) {
77
77
  cell.hasInputHidden = !cell.hasInputHidden;
@@ -156,7 +156,7 @@ const CellOutput: React.FC<{ cell: CellView }> = forwardRef(function CellOutput(
156
156
  ) {
157
157
  const { cell } = props;
158
158
  const outputCollapserRef = useRef<HTMLDivElement>(null);
159
- const [collapserClickActive] = useConfigurationValue(CollapserClickActive);
159
+ const [collapserActive] = useConfigurationValue(CollapserActive);
160
160
  if (!ExecutableCellView.is(cell)) {
161
161
  return null;
162
162
  }
@@ -168,7 +168,7 @@ const CellOutput: React.FC<{ cell: CellView }> = forwardRef(function CellOutput(
168
168
  return null;
169
169
  }
170
170
  const handleCellOutputCollapser = () => {
171
- if (ExecutableCellModel.is(cell.model) && collapserClickActive) {
171
+ if (ExecutableCellModel.is(cell.model) && collapserActive) {
172
172
  cell.model.hasOutputHidden = !cell.model.hasOutputHidden;
173
173
  }
174
174
  };
@@ -188,7 +188,7 @@ const CellOutput: React.FC<{ cell: CellView }> = forwardRef(function CellOutput(
188
188
  const HideCellContent: React.FC<{ cell: CellView }> = (props: { cell: CellView }) => {
189
189
  const { cell } = props;
190
190
  const cellCollapserRef = useRef<HTMLDivElement>(null);
191
- const [collapserClickActive] = useConfigurationValue(CollapserClickActive);
191
+ const [collapserClickActive] = useConfigurationValue(CollapserActive);
192
192
 
193
193
  const handleCellCollapser = () => {
194
194
  if (collapserClickActive) {