@worktile/theia 13.0.3 → 13.0.6

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 (39) hide show
  1. package/components/toolbar/toolbar.component.scss +8 -1
  2. package/esm2020/components/column-resize/column-resize.directive.mjs +3 -2
  3. package/esm2020/components/column-resize/overlay-handle.component.mjs +1 -1
  4. package/esm2020/components/conversion-hint/conversion-hint.component.mjs +3 -3
  5. package/esm2020/components/table-select/table-select.component.mjs +3 -3
  6. package/esm2020/components/toolbar-dropdown/toolbar-dropdown.component.mjs +1 -1
  7. package/esm2020/components/toolbar-group/toolbar-group.component.mjs +1 -1
  8. package/esm2020/components/toolbar-item/toolbar-item.component.mjs +1 -1
  9. package/esm2020/interfaces/toolbar.mjs +1 -1
  10. package/esm2020/plugins/code/code.component.mjs +6 -6
  11. package/esm2020/plugins/color/toolbar-item.component.mjs +1 -1
  12. package/esm2020/plugins/image/image.component.mjs +8 -9
  13. package/esm2020/plugins/link/edit/link-edit.component.mjs +3 -3
  14. package/esm2020/plugins/link/link.component.mjs +1 -1
  15. package/esm2020/plugins/list/queries/get-start-list-item.mjs +2 -2
  16. package/esm2020/plugins/list/queries/is-selection-in-same-list-item.mjs +1 -1
  17. package/esm2020/plugins/table/components/insert-mark/insert-mark.component.mjs +4 -4
  18. package/esm2020/plugins/table/components/table.component.mjs +3 -3
  19. package/esm2020/plugins/table/components/td/td.component.mjs +2 -2
  20. package/esm2020/plugins/table/components/toolbar/table-toolbar.component.mjs +5 -8
  21. package/esm2020/plugins/table/table.service.mjs +6 -6
  22. package/esm2020/plugins/table/toolbar-item.component.mjs +1 -1
  23. package/esm2020/plugins/table/utils/normalize-table.mjs +2 -2
  24. package/esm2020/plugins/todo-item/todo-item.component.mjs +3 -4
  25. package/esm2020/plugins/vertical-align/toolbar-item.component.mjs +1 -1
  26. package/esm2020/utils/fragment.mjs +3 -3
  27. package/esm2020/utils/is-clean-empty-paragraph.mjs +1 -1
  28. package/fesm2015/worktile-theia.mjs +42 -45
  29. package/fesm2015/worktile-theia.mjs.map +1 -1
  30. package/fesm2020/worktile-theia.mjs +42 -45
  31. package/fesm2020/worktile-theia.mjs.map +1 -1
  32. package/package.json +1 -1
  33. package/plugins/code/code.component.scss +18 -0
  34. package/plugins/table/components/table.component.scss +42 -59
  35. package/plugins/table/utils/normalize-table.d.ts +1 -1
  36. package/plugins/todo-item/todo-item.component.scss +1 -1
  37. package/styles/editor.scss +8 -18
  38. package/styles/mixins.scss +6 -25
  39. package/styles/typo.scss +0 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@worktile/theia",
3
- "version": "13.0.3",
3
+ "version": "13.0.6",
4
4
  "description": "theia editor",
5
5
  "author": "YanDong <nanianqiumo@foxmail.com>",
6
6
  "homepage": "https://github.com/atinc/theia#readme",
@@ -89,3 +89,21 @@
89
89
  }
90
90
  }
91
91
 
92
+ .the-code-block-operation {
93
+ position: absolute;
94
+ top: -10px;
95
+ left: 0;
96
+ z-index: 10;
97
+ min-width: 298px; // must assign min-width in table
98
+ padding: 5px 10px;
99
+ background: variables.$white;
100
+ box-shadow: variables.$box-shadow;
101
+ transform: translateY(-100%);
102
+
103
+ .thy-select-custom {
104
+ width: 115px;
105
+ .form-control {
106
+ border: none;
107
+ }
108
+ }
109
+ }
@@ -16,7 +16,7 @@ $control-corner-width: 12px;
16
16
 
17
17
  .slate-element-table {
18
18
  display: block;
19
- .the-temp-table {
19
+ .the-table {
20
20
  border-spacing: 0;
21
21
  word-wrap: break-word;
22
22
  box-sizing: border-box;
@@ -92,12 +92,12 @@ $control-corner-width: 12px;
92
92
  }
93
93
 
94
94
 
95
- .the-temp-table-container {
95
+ .the-table-container {
96
96
  position: relative;
97
97
  box-sizing: border-box;
98
98
  margin: 0 auto 16px;
99
99
 
100
- .the-temp-table-wrapper {
100
+ .the-table-wrapper {
101
101
  padding-top: 10px;
102
102
  margin-top: -10px;
103
103
  padding-bottom: 15px;
@@ -107,7 +107,7 @@ $control-corner-width: 12px;
107
107
  overflow: auto;
108
108
  }
109
109
 
110
- .the-temp-table-row-controls-wrapper {
110
+ .the-table-row-controls-wrapper {
111
111
  position: absolute;
112
112
  left: -$control-width;
113
113
  top: 23px;
@@ -115,18 +115,18 @@ $control-corner-width: 12px;
115
115
  z-index: 1;
116
116
  }
117
117
 
118
- &.the-temp-table-selection-hide ::selection {
118
+ &.the-table-selection-hide ::selection {
119
119
  background: transparent;
120
120
  }
121
121
  }
122
122
 
123
- .the-temp-table-with-controls {
124
- .the-temp-table-row-controls,
125
- .the-temp-table-controls-insert-wrapper {
123
+ .the-table-with-controls {
124
+ .the-table-row-controls,
125
+ .the-table-controls-insert-wrapper {
126
126
  display: block;
127
127
  }
128
128
 
129
- .the-temp-table-col-controls-wrapper .the-temp-table-col-controls {
129
+ .the-table-col-controls-wrapper .the-table-col-controls {
130
130
  background: variables.$gray-100;
131
131
  border-right: $controls-border;
132
132
  border-top: $controls-border;
@@ -136,17 +136,17 @@ $control-corner-width: 12px;
136
136
  border-left: $controls-border;
137
137
  }
138
138
  &:last-child {
139
- .the-temp-table-controls-insert-wrapper {
139
+ .the-table-controls-insert-wrapper {
140
140
  right: 0;
141
141
  &:after {
142
142
  left: 9px;
143
143
  }
144
144
  }
145
- .the-temp-table-controls-insert-wrapper:hover {
145
+ .the-table-controls-insert-wrapper:hover {
146
146
  &:after {
147
147
  left: 0;
148
148
  }
149
- .the-temp-table-controls-insert-line[data-dot-type='column'] {
149
+ .the-table-controls-insert-line[data-dot-type='column'] {
150
150
  left: $dot-size;
151
151
  }
152
152
  }
@@ -182,12 +182,12 @@ $control-corner-width: 12px;
182
182
  }
183
183
  }
184
184
 
185
- .the-temp-table-corner-controls {
185
+ .the-table-corner-controls {
186
186
  width: 100%;
187
187
  height: $control-corner-width;
188
188
  position: relative;
189
189
  visibility: hidden;
190
- .the-temp-table-corner-button {
190
+ .the-table-corner-button {
191
191
  position: absolute;
192
192
  top: 0;
193
193
  left: 0;
@@ -202,32 +202,32 @@ $control-corner-width: 12px;
202
202
  cursor: pointer;
203
203
  }
204
204
 
205
- .the-temp-table-corner-controls-insert-row-marker .the-temp-table-controls-insert-wrapper {
205
+ .the-table-corner-controls-insert-row-marker .the-table-controls-insert-wrapper {
206
206
  left: -$dot-size;
207
207
  top: 2px;
208
208
  }
209
209
 
210
- .the-temp-table-corner-controls-insert-column-marker .the-temp-table-controls-insert-wrapper {
210
+ .the-table-corner-controls-insert-column-marker .the-table-controls-insert-wrapper {
211
211
  left: 2px;
212
212
  top: -$dot-size;
213
213
  }
214
214
 
215
215
  &.active {
216
216
  z-index: 1;
217
- .the-temp-table-corner-button {
217
+ .the-table-corner-button {
218
218
  @include mixins.controlSelected;
219
219
  }
220
220
  }
221
221
 
222
222
  &.dangerous {
223
223
  z-index: 1;
224
- .the-temp-table-corner-button {
224
+ .the-table-corner-button {
225
225
  @include mixins.controlDangerous;
226
226
  }
227
227
  }
228
228
  }
229
229
 
230
- .the-temp-table-controls-insert-wrapper {
230
+ .the-table-controls-insert-wrapper {
231
231
  width: $dot-size;
232
232
  height: $dot-size;
233
233
  position: absolute;
@@ -281,7 +281,7 @@ $control-corner-width: 12px;
281
281
  }
282
282
  }
283
283
 
284
- .the-temp-table-controls-insert-line {
284
+ .the-table-controls-insert-line {
285
285
  position: absolute;
286
286
  background-color: variables.$primary;
287
287
  z-index: $dot-zIndex;
@@ -300,22 +300,22 @@ $control-corner-width: 12px;
300
300
  }
301
301
  }
302
302
 
303
- .the-temp-table-row-controls {
303
+ .the-table-row-controls {
304
304
  width: $control-width;
305
305
  box-sizing: border-box;
306
306
  display: none;
307
307
  z-index: 11;
308
308
  position: relative;
309
309
 
310
- .the-temp-table-row-controls-inner {
310
+ .the-table-row-controls-inner {
311
311
  display: flex;
312
312
  flex-direction: column;
313
313
  }
314
314
 
315
- .the-temp-table-row-controls-button-wrap {
315
+ .the-table-row-controls-button-wrap {
316
316
  position: relative;
317
317
  margin-top: -1px;
318
- .the-temp-table-controls-button {
318
+ .the-table-controls-button {
319
319
  display: block;
320
320
  outline: none;
321
321
  background-color: variables.$gray-100;
@@ -330,8 +330,8 @@ $control-corner-width: 12px;
330
330
 
331
331
  &.active {
332
332
  z-index: 1;
333
- .the-temp-table-controls-button,
334
- .the-temp-table-numbered-controls-button {
333
+ .the-table-controls-button,
334
+ .the-table-numbered-controls-button {
335
335
  @include mixins.controlSelected;
336
336
  }
337
337
  }
@@ -339,39 +339,30 @@ $control-corner-width: 12px;
339
339
  &.dangerous {
340
340
  z-index: 1;
341
341
 
342
- .the-temp-table-controls-button,
343
- .the-temp-table-numbered-controls-button {
342
+ .the-table-controls-button,
343
+ .the-table-numbered-controls-button {
344
344
  @include mixins.controlDangerous;
345
345
  }
346
346
  }
347
347
  }
348
348
 
349
- .the-temp-table-controls-insert-wrapper {
349
+ .the-table-controls-insert-wrapper {
350
350
  bottom: -$dot-shadow-top;
351
351
  left: -$dot-size;
352
352
  top: auto;
353
353
  }
354
354
 
355
- .the-temp-table-row-controls-button-wrap {
355
+ .the-table-row-controls-button-wrap {
356
356
  position: relative;
357
357
  margin-top: -1px;
358
358
  }
359
359
  }
360
360
 
361
- .the-temp-table-toolbar-wrap {
362
- display: block;
363
- border-radius: 5px;
364
- z-index: 10;
365
-
366
- @include mixins.the-toolbar-layout();
367
- @include mixins.the-custom-action();
368
- }
369
-
370
- .the-temp-table-col-controls-wrapper {
361
+ .the-table-col-controls-wrapper {
371
362
  height: $control-width;
372
363
  line-height: $control-width;
373
364
 
374
- .the-temp-table-col-controls {
365
+ .the-table-col-controls {
375
366
  padding: 0;
376
367
  margin: 0;
377
368
  border: 0;
@@ -379,15 +370,7 @@ $control-corner-width: 12px;
379
370
  border-top: 1px solid transparent;
380
371
  }
381
372
  }
382
- .table-options {
383
- background: transparent;
384
- margin-right: 5px;
385
- color: variables.$gray-700;
386
- &:hover {
387
- background: rgba(variables.$primary, 0.1);
388
- color: variables.$primary;
389
- }
390
- }
373
+
391
374
  .table-options-active {
392
375
  background: rgba(variables.$primary, 0.1);
393
376
  color: variables.$primary;
@@ -398,27 +381,27 @@ $control-corner-width: 12px;
398
381
  }
399
382
  }
400
383
 
401
- .the-temp-numbered-column-container {
384
+ .the-numbered-column-container {
402
385
  padding-left: 44px;
403
386
 
404
- .the-temp-table-row-controls {
387
+ .the-table-row-controls {
405
388
  display: block;
406
389
  top: 0px;
407
390
  width: 45px;
408
391
  margin-left: 10px;
409
392
  cursor: pointer;
410
- .the-temp-table-numbered-controls-button {
393
+ .the-table-numbered-controls-button {
411
394
  background-color: variables.$gray-100;
412
395
  border: $controls-border;
413
396
  border-right: none;
414
397
  }
415
398
  }
416
- .the-temp-table-focus {
417
- .the-temp-table-row-controls {
399
+ .the-table-focus {
400
+ .the-table-row-controls {
418
401
  width: 55px;
419
402
  margin-left: 0;
420
403
  }
421
- .the-temp-table-corner-controls-insert-column-marker .the-temp-table-controls-insert-wrapper {
404
+ .the-table-corner-controls-insert-column-marker .the-table-controls-insert-wrapper {
422
405
  left: 46px;
423
406
  }
424
407
  }
@@ -432,18 +415,18 @@ $control-corner-width: 12px;
432
415
  }
433
416
 
434
417
  .safari{
435
- .the-temp-table-row-controls{
418
+ .the-table-row-controls{
436
419
  top: 1px;
437
420
  }
438
421
  }
439
422
 
440
423
 
441
424
  .the-editor-readonly{
442
- .the-temp-table-row-controls, .the-temp-table-col-controls{
425
+ .the-table-row-controls, .the-table-col-controls{
443
426
  cursor: default;
444
427
  }
445
428
  .safari{
446
- .the-temp-table-row-controls{
429
+ .the-table-row-controls{
447
430
  top: 0px;
448
431
  }
449
432
  }
@@ -1,2 +1,2 @@
1
- import { TableElement } from "../../../custom-types";
1
+ import { TableElement } from '../../../custom-types';
2
2
  export declare const normalizeTable: (table: TableElement) => TableElement;
@@ -1,4 +1,4 @@
1
- .the-temp-check-item {
1
+ .the-check-item {
2
2
  height: auto;
3
3
  line-height: 24px;
4
4
  padding-left: 2em;
@@ -33,7 +33,7 @@
33
33
  cursor: inherit;
34
34
  }
35
35
  }
36
- .the-temp-check-item {
36
+ .the-check-item {
37
37
  input[type='checkbox'] {
38
38
  cursor: auto;
39
39
  }
@@ -49,7 +49,7 @@
49
49
  }
50
50
 
51
51
  .the-editor-disabled {
52
- .the-temp-check-item {
52
+ .the-check-item {
53
53
  input[type='checkbox'] {
54
54
  cursor: auto;
55
55
  }
@@ -67,6 +67,8 @@
67
67
  &.max-height {
68
68
  overflow-y: scroll;
69
69
  }
70
+
71
+ @include mixins.the-toolbar-divider-spacing();
70
72
  }
71
73
  }
72
74
  .the-editor-typo{
@@ -205,25 +207,13 @@
205
207
  ul[the-level="#{$i}"] {
206
208
  padding-left: $i * 2em;
207
209
  }
208
- .the-temp-check-item[the-level="#{$i}"] {
210
+ .the-check-item[the-level="#{$i}"] {
209
211
  padding-left: calc(#{$i * 2em} + 2em);
210
212
  }
211
213
  }
212
214
  }
213
215
 
214
- .the-code-block-operation {
215
- @include mixins.the-toolbar-layout();
216
- display: flex;
217
- transform: translateY(-100%);
218
- left: 0;
219
- top: -10px;
220
- z-index: 10;
221
- min-width: 298px; // must assign min-width in table
222
- .thy-select-custom {
223
- width: 115px;
224
- .form-control {
225
- border: none;
226
- }
227
- }
216
+ .the-block-toolbar-popover .thy-popover-container {
217
+ padding: 5px 10px;
218
+ @include mixins.the-toolbar-divider-spacing();
228
219
  }
229
-
@@ -1,5 +1,4 @@
1
1
  @use 'ngx-tethys/styles/variables.scss';
2
- @use "ngx-tethys/styles/basic.scss" as thyBasic;
3
2
  @use './variables.scss' as theVariables;
4
3
 
5
4
  @mixin controlSelected {
@@ -23,13 +22,6 @@
23
22
  }
24
23
  }
25
24
 
26
- @mixin the-toolbar-layout {
27
- position: absolute;
28
- padding: 5px 10px;
29
- background: variables.$white;
30
- box-shadow: variables.$box-shadow;
31
- }
32
-
33
25
  @mixin the-toolbar-active {
34
26
  .thy-action.thy-popover-origin-active,
35
27
  .the-toolbar-dropdown-container.thy-popover-origin-active .thy-action {
@@ -41,30 +33,19 @@
41
33
  }
42
34
 
43
35
  @mixin the-toolbar-divider-spacing {
44
- & + .thy-divider {
45
- margin-left: #{theVariables.$thy-action-margin-right} !important;
46
- }
47
- }
48
-
49
- @mixin the-custom-action() {
50
- .thy-action {
51
- position: relative;
52
- color: variables.$gray-700;
53
- cursor: pointer;
54
-
55
- &.action-danger {
56
- @include thyBasic.action-variant(variables.$action-color, variables.$danger, rgba(variables.$danger, 0.1));
36
+ .the-toolbar-item,
37
+ .the-toolbar-dropdown-container {
38
+ &:not(:last-child) {
39
+ margin-right: theVariables.$thy-action-margin-right;
57
40
  }
58
41
  }
59
42
 
60
43
  .thy-action,
61
44
  .the-toolbar-item,
62
45
  .the-toolbar-dropdown-container {
63
- &:not(:last-child) {
64
- margin-right: theVariables.$thy-action-margin-right;
46
+ & + .thy-divider {
47
+ margin-left: #{theVariables.$thy-action-margin-right} !important;
65
48
  }
66
-
67
- @include the-toolbar-divider-spacing();
68
49
  }
69
50
  }
70
51
 
package/styles/typo.scss CHANGED
@@ -1,7 +1,6 @@
1
1
  @use 'sass:math';
2
2
  @use 'ngx-tethys/styles/variables.scss';
3
3
  @use './variables.scss' as theVariables;
4
- @use './mixins.scss' as mixins;
5
4
 
6
5
  .the-editor-typo {
7
6
  display: flow-root;
@@ -144,8 +143,6 @@
144
143
  background: theVariables.$selection-background;
145
144
  }
146
145
 
147
- @include mixins.the-custom-action();
148
-
149
146
  // 处理 block-card 图文混排
150
147
  .slate-block,
151
148
  .slate-block-card {