@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.
- package/README.md +279 -2
- package/es/add-cell/libro-add-cell-slot-contribution.js +2 -2
- package/es/add-cell/libro-add-cell-view.js +2 -2
- package/es/cell/libro-cell-contribution.js +1 -1
- package/es/cell/libro-cell-model.js +6 -6
- package/es/cell/libro-cell-service.js +4 -4
- package/es/cell/libro-cell-view.js +7 -7
- package/es/cell/libro-edit-cell-view.js +3 -3
- package/es/cell/libro-executable-cell-view.js +2 -2
- package/es/collapse-service.js +1 -1
- package/es/command/document-commands.js +1 -1
- package/es/command/kernel-command.d.ts.map +1 -1
- package/es/command/kernel-command.js +1 -3
- package/es/command/libro-command-contribution.js +4 -4
- package/es/command/libro-command-register.js +2 -2
- package/es/command/notebook-commands.d.ts.map +1 -1
- package/es/command/notebook-commands.js +2 -11
- package/es/components/dnd-cell-item-render.js +7 -7
- package/es/components/dnd-component/custom-drag-layer.js +4 -4
- package/es/components/dnd-component/default-dnd-content.d.ts.map +1 -1
- package/es/components/dnd-component/default-dnd-content.js +7 -7
- package/es/components/dnd-component/dnd-list.d.ts +2 -2
- package/es/components/dnd-component/dnd-list.d.ts.map +1 -1
- package/es/components/dnd-component/dnd-list.js +8 -8
- package/es/components/libro-component.js +1 -1
- package/es/configuration/libro-configuration-contribution.js +3 -3
- package/es/configuration/libro-configuration.d.ts +1 -1
- package/es/configuration/libro-configuration.d.ts.map +1 -1
- package/es/configuration/libro-configuration.js +7 -7
- package/es/content/libro-content-contribution.js +1 -1
- package/es/content/libro-content-service.js +1 -1
- package/es/libro-context-key.js +1 -1
- package/es/libro-keybind-registry.js +1 -1
- package/es/libro-model.js +7 -7
- package/es/libro-service.js +4 -4
- package/es/libro-view-tracker.js +1 -1
- package/es/libro-view.d.ts.map +1 -1
- package/es/libro-view.js +34 -36
- package/es/module.d.ts.map +1 -1
- package/es/module.js +2 -2
- package/es/output/output-area.js +4 -4
- package/es/output/output-contribution.js +1 -1
- package/es/output/output-model.js +1 -1
- package/es/slot/libro-slot-manager.js +2 -2
- package/es/slot/libro-slot-protocol.d.ts +1 -1
- package/es/slot/libro-slot-protocol.d.ts.map +1 -1
- package/es/slot/libro-slot-view.js +1 -1
- package/es/theme/libro-color-registry.d.ts.map +1 -1
- package/es/theme/libro-color-registry.js +70 -70
- package/es/toolbar/change-cell-to-selector.js +1 -1
- package/es/toolbar/libro-toolbar.js +1 -1
- package/es/toolbar/restart-clear-outputs-contribution.js +1 -1
- package/es/toolbar/restart-clear-outputs-modal.js +1 -1
- package/es/toolbar/save-icon.js +2 -2
- package/es/toolbar/shutdown-contribution.js +1 -1
- package/es/toolbar/shutdown-modal.js +1 -1
- package/package.json +9 -9
- package/src/command/document-commands.ts +1 -1
- package/src/command/kernel-command.ts +1 -3
- package/src/command/notebook-commands.ts +2 -11
- package/src/components/dnd-cell-item-render.tsx +5 -5
- package/src/components/dnd-component/default-dnd-content.tsx +1 -1
- package/src/components/dnd-component/dnd-list.tsx +8 -5
- package/src/configuration/libro-configuration-contribution.ts +2 -2
- package/src/configuration/libro-configuration.ts +7 -7
- package/src/index.spec.ts +12 -0
- package/src/libro-view.tsx +2 -3
- package/src/module.ts +2 -1
- package/src/slot/libro-slot-protocol.ts +1 -1
- package/src/theme/libro-color-registry.ts +57 -57
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
function _typeof(
|
|
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 {
|
|
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: '#
|
|
39
|
-
light: '#
|
|
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: '#
|
|
46
|
-
light: '#
|
|
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:
|
|
60
|
-
light:
|
|
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: '#
|
|
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: '#
|
|
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: '#
|
|
88
|
+
light: '#FFFFFF'
|
|
89
89
|
},
|
|
90
90
|
description: ''
|
|
91
91
|
}, {
|
|
92
92
|
id: 'libro.toptoolbar.border.color',
|
|
93
93
|
defaults: {
|
|
94
|
-
dark:
|
|
95
|
-
light:
|
|
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:
|
|
109
|
-
light:
|
|
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: '#
|
|
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:
|
|
123
|
-
light:
|
|
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:
|
|
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:
|
|
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:
|
|
144
|
+
light: '#000A1AAD'
|
|
145
145
|
},
|
|
146
146
|
description: ''
|
|
147
147
|
}, {
|
|
148
148
|
id: 'libro.default.btn.background.color',
|
|
149
149
|
defaults: {
|
|
150
|
-
dark:
|
|
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:
|
|
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:
|
|
179
|
+
light: '#000000A6'
|
|
180
180
|
},
|
|
181
181
|
description: ''
|
|
182
182
|
}, {
|
|
183
183
|
id: 'libro.toolbar.menu.disabled.label.color',
|
|
184
184
|
defaults: {
|
|
185
|
-
dark: '#
|
|
186
|
-
light:
|
|
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: '#
|
|
193
|
-
light:
|
|
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:
|
|
207
|
-
light:
|
|
206
|
+
dark: '#FFFFFF14',
|
|
207
|
+
light: '#0000001A'
|
|
208
208
|
},
|
|
209
209
|
description: ''
|
|
210
210
|
}, {
|
|
211
211
|
id: 'libro.close.color',
|
|
212
212
|
defaults: {
|
|
213
|
-
dark:
|
|
214
|
-
light:
|
|
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:
|
|
221
|
+
light: '#000000D9'
|
|
222
222
|
},
|
|
223
223
|
description: ''
|
|
224
224
|
}, {
|
|
225
225
|
id: 'libro.modal.content.color',
|
|
226
226
|
defaults: {
|
|
227
|
-
dark: '#
|
|
228
|
-
light: '#
|
|
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:
|
|
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: '#
|
|
270
|
-
light: '#
|
|
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: '#
|
|
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: '#
|
|
284
|
-
light: '#
|
|
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:
|
|
291
|
-
light:
|
|
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: '#
|
|
305
|
-
light: '#
|
|
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:
|
|
319
|
+
light: '#00000026'
|
|
320
320
|
},
|
|
321
321
|
description: ''
|
|
322
322
|
}, {
|
|
323
323
|
id: 'libro.input.background.color',
|
|
324
324
|
defaults: {
|
|
325
|
-
dark:
|
|
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:
|
|
333
|
-
light:
|
|
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: '#
|
|
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: '#
|
|
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: '#
|
|
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: '#
|
|
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: '#
|
|
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: '#
|
|
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: '
|
|
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: '#
|
|
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: '#
|
|
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: '#
|
|
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: '#
|
|
417
|
-
light: '#
|
|
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: '#
|
|
431
|
-
light: '#
|
|
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:
|
|
438
|
-
light:
|
|
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: '#
|
|
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: '#
|
|
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: '#
|
|
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: '#
|
|
480
|
-
light: '#
|
|
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
|
|
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(
|
|
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(
|
|
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
|
|
10
|
+
data === null || data === void 0 || data.restartClearOutput();
|
|
11
11
|
close();
|
|
12
12
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
13
13
|
}, [data]);
|
package/es/toolbar/save-icon.js
CHANGED
|
@@ -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(
|
|
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
|
|
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(
|
|
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
|
|
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.
|
|
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": "
|
|
37
|
-
"@difizen/mana-react": "
|
|
38
|
-
"@difizen/mana-l10n": "
|
|
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.
|
|
41
|
-
"@difizen/libro-common": "^0.
|
|
42
|
-
"@difizen/libro-shared-model": "^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": "^
|
|
47
|
+
"uuid": "^9.0.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/react": "^18.2.25",
|
|
51
|
-
"@types/uuid": "^
|
|
51
|
+
"@types/uuid": "^9.0.2"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"antd": "^5.8.6",
|
|
@@ -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
|
-
|
|
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
|
|
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
|
-
|
|
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(
|
|
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 [
|
|
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) &&
|
|
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(
|
|
191
|
+
const [collapserClickActive] = useConfigurationValue(CollapserActive);
|
|
192
192
|
|
|
193
193
|
const handleCellCollapser = () => {
|
|
194
194
|
if (collapserClickActive) {
|