@opensumi/ide-design 2.27.3-rc-1714116491.0 → 2.27.3-rc-1714982362.0

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 (65) hide show
  1. package/lib/browser/design.contribution.d.ts +4 -1
  2. package/lib/browser/design.contribution.d.ts.map +1 -1
  3. package/lib/browser/design.contribution.js +23 -1
  4. package/lib/browser/design.contribution.js.map +1 -1
  5. package/lib/browser/index.d.ts.map +1 -1
  6. package/lib/browser/index.js +2 -1
  7. package/lib/browser/index.js.map +1 -1
  8. package/lib/browser/menu-bar/logo.svg +1 -0
  9. package/lib/browser/menu-bar/menu-bar.contribution.d.ts +8 -0
  10. package/lib/browser/menu-bar/menu-bar.contribution.d.ts.map +1 -0
  11. package/lib/browser/menu-bar/menu-bar.contribution.js +45 -0
  12. package/lib/browser/menu-bar/menu-bar.contribution.js.map +1 -0
  13. package/lib/browser/menu-bar/menu-bar.module.less +107 -0
  14. package/lib/browser/menu-bar/menu-bar.view.d.ts +3 -0
  15. package/lib/browser/menu-bar/menu-bar.view.d.ts.map +1 -0
  16. package/lib/browser/menu-bar/menu-bar.view.js +110 -0
  17. package/lib/browser/menu-bar/menu-bar.view.js.map +1 -0
  18. package/lib/browser/override/editor-tab.service.js +3 -3
  19. package/lib/browser/override/editor-tab.service.js.map +1 -1
  20. package/lib/browser/override/menu.service.js +10 -10
  21. package/lib/browser/override/menu.service.js.map +1 -1
  22. package/lib/browser/style/design.module.less +190 -38
  23. package/lib/browser/style/global.less +22 -4
  24. package/lib/browser/style/images/design-background-dark.png +0 -0
  25. package/lib/browser/style/images/design-background-light.png +0 -0
  26. package/lib/browser/theme/default-theme.d.ts +1 -0
  27. package/lib/browser/theme/default-theme.d.ts.map +1 -1
  28. package/lib/browser/theme/default-theme.js +1 -0
  29. package/lib/browser/theme/default-theme.js.map +1 -1
  30. package/lib/browser/theme/light-theme.d.ts +1 -0
  31. package/lib/browser/theme/light-theme.d.ts.map +1 -1
  32. package/lib/browser/theme/light-theme.js +1 -0
  33. package/lib/browser/theme/light-theme.js.map +1 -1
  34. package/lib/common/constants.d.ts +4 -0
  35. package/lib/common/constants.d.ts.map +1 -0
  36. package/lib/common/constants.js +7 -0
  37. package/lib/common/constants.js.map +1 -0
  38. package/lib/common/index.d.ts +2 -0
  39. package/lib/common/index.d.ts.map +1 -0
  40. package/lib/common/index.js +5 -0
  41. package/lib/common/index.js.map +1 -0
  42. package/lib/index.d.ts +1 -0
  43. package/lib/index.d.ts.map +1 -1
  44. package/lib/index.js +3 -0
  45. package/lib/index.js.map +1 -1
  46. package/package.json +6 -6
  47. package/src/browser/design.contribution.ts +31 -1
  48. package/src/browser/index.ts +2 -1
  49. package/src/browser/menu-bar/logo.svg +1 -0
  50. package/src/browser/menu-bar/menu-bar.contribution.tsx +48 -0
  51. package/src/browser/menu-bar/menu-bar.module.less +107 -0
  52. package/src/browser/menu-bar/menu-bar.view.tsx +152 -0
  53. package/src/browser/override/editor-tab.service.tsx +1 -1
  54. package/src/browser/override/menu.service.tsx +1 -1
  55. package/src/browser/style/design.module.less +190 -38
  56. package/src/browser/style/global.less +22 -4
  57. package/src/browser/style/images/design-background-dark.png +0 -0
  58. package/src/browser/style/images/design-background-light.png +0 -0
  59. package/src/browser/theme/default-theme.ts +1 -0
  60. package/src/browser/theme/light-theme.ts +1 -0
  61. package/src/common/constants.ts +3 -0
  62. package/src/common/index.ts +1 -0
  63. package/src/index.ts +1 -0
  64. package/lib/browser/override/override.module.less +0 -135
  65. package/src/browser/override/override.module.less +0 -135
@@ -1,6 +1,6 @@
1
1
  :global(.design-dark) {
2
2
  .design-box-panel {
3
- background-image: url('https://mdn.alipayobjects.com/huamei_htww6h/afts/img/A*hLI-SqEx-YkAAAAAAAAAAAAADhl8AQ/original');
3
+ background-image: url('./images/design-background-dark.png');
4
4
  background-repeat: no-repeat;
5
5
  background-size: cover;
6
6
  }
@@ -8,10 +8,27 @@
8
8
 
9
9
  :global(.design-light) {
10
10
  .design-box-panel {
11
- background-image: url('https://mdn.alipayobjects.com/huamei_aj2sia/afts/img/A*6wRWRLd0RCMAAAAAAAAAAAAADoSNAQ/original');
11
+ background-image: url('./images/design-background-light.png');
12
12
  background-repeat: no-repeat;
13
13
  background-size: cover;
14
14
  }
15
+
16
+ .editor_tab_block_container {
17
+ > div:first-child {
18
+ &::before {
19
+ filter: grayscale(0);
20
+ }
21
+ }
22
+ }
23
+ }
24
+
25
+ :global(.design-dark),
26
+ :global(.design-light) {
27
+ :global(.design_bottom_slot) {
28
+ .design-panel_title_bar {
29
+ background-color: var(--design-title-background);
30
+ }
31
+ }
15
32
  }
16
33
 
17
34
  :global(#opensumi-quickpick) {
@@ -119,12 +136,24 @@
119
136
  .design-close_tab {
120
137
  display: block;
121
138
  }
139
+
140
+ &.design-kt_editor_tab_dirty {
141
+ .design-close_tab {
142
+ display: none;
143
+ }
144
+
145
+ &:hover {
146
+ .design-close_tab {
147
+ display: block;
148
+ }
149
+ }
150
+ }
122
151
  }
123
152
 
124
153
  &.design-kt_editor_tab_current_prev {
125
154
  background-color: var(--panel-background);
126
155
 
127
- div[class*='design-editor_tab_block_container__'] {
156
+ .design-editor_tab_block_container {
128
157
  border-radius: 0 0 12px 0;
129
158
  background-color: var(--editorGroupHeader-tabsBackground);
130
159
  }
@@ -133,7 +162,7 @@
133
162
  &.design-kt_editor_tab_current_next {
134
163
  background-color: var(--panel-background);
135
164
 
136
- div[class*='design-editor_tab_block_container__'] {
165
+ .design-editor_tab_block_container {
137
166
  background-color: var(--editorGroupHeader-tabsBackground);
138
167
  border-radius: 0 0 0 12px;
139
168
 
@@ -254,6 +283,70 @@
254
283
  }
255
284
  }
256
285
 
286
+ .design-editor_tab_block_container {
287
+ display: flex;
288
+ align-items: center;
289
+ height: 36px;
290
+ border-radius: 12px 12px 0 0;
291
+ padding: 0 8px;
292
+ margin-right: 0 !important;
293
+
294
+ &::before {
295
+ content: '';
296
+ position: absolute;
297
+ left: 0;
298
+ top: 12px;
299
+ display: inline-block;
300
+ width: 1px;
301
+ height: 12px;
302
+ background-color: var(--editorGroup-border);
303
+ }
304
+
305
+ > div:first-child {
306
+ margin-right: 4px !important;
307
+ flex-shrink: 0;
308
+ flex-grow: 0;
309
+
310
+ &::before {
311
+ font-size: 14px;
312
+ background-size: 14px;
313
+ background-position: 2px;
314
+ filter: grayscale(1);
315
+ color: var(--design-icon-foreground);
316
+ }
317
+ }
318
+
319
+ &.active {
320
+ background-color: var(--tab-activeBackground);
321
+ color: var(--tab-activeForeground);
322
+
323
+ &::before {
324
+ content: none;
325
+ }
326
+
327
+ div:first-child {
328
+ &::before {
329
+ filter: grayscale(0);
330
+ }
331
+ }
332
+ }
333
+
334
+ .design-tab_right {
335
+ &:hover {
336
+ background-color: initial !important;
337
+ transform: scale(1) !important;
338
+ }
339
+
340
+ .design-close_tab {
341
+ color: var(--design-icon-foreground);
342
+
343
+ &:hover {
344
+ color: var(--design-text-foreground);
345
+ }
346
+ }
347
+ }
348
+ }
349
+
257
350
  /**
258
351
  * ---------------- Override editor navigation bar style ---------------------
259
352
  */
@@ -289,31 +382,10 @@
289
382
  background-color: var(--panel-background);
290
383
  }
291
384
 
292
- div[class*='design-editor_tab_block_container__'] {
293
- .design-tab_right {
294
- &:hover {
295
- background-color: initial !important;
296
- transform: scale(1) !important;
297
- }
298
-
299
- .design-close_tab {
300
- color: var(--design-icon-foreground);
301
-
302
- &:hover {
303
- color: var(--design-text-foreground);
304
- }
305
- }
306
- }
307
- }
308
-
309
385
  /**
310
386
  * ---------------- Override editor panel bottom tabbar style ---------------------
311
387
  */
312
388
  :global(.design_bottom_slot) {
313
- .design-tab_bar {
314
- height: 100%;
315
- }
316
-
317
389
  .design-tab_panel {
318
390
  &::before {
319
391
  content: none;
@@ -327,7 +399,6 @@ div[class*='design-editor_tab_block_container__'] {
327
399
 
328
400
  .design-bottom_bar_container {
329
401
  width: 100%;
330
- height: 32px;
331
402
  }
332
403
 
333
404
  .design-variable_repl_bar {
@@ -498,15 +569,6 @@ div[class*='design-editor_tab_block_container__'] {
498
569
  }
499
570
  }
500
571
 
501
- :global(.design-dark),
502
- :global(.design-light) {
503
- :global(.design_bottom_slot) {
504
- .design-panel_title_bar {
505
- background-color: var(--design-title-background);
506
- }
507
- }
508
- }
509
-
510
572
  :global(.design_left_slot) {
511
573
  margin-right: 1px;
512
574
  }
@@ -541,6 +603,9 @@ div[class*='design-editor_tab_block_container__'] {
541
603
 
542
604
  &::-webkit-scrollbar {
543
605
  width: 4px;
606
+ &:hover {
607
+ width: 10px;
608
+ }
544
609
  }
545
610
  }
546
611
 
@@ -580,8 +645,8 @@ div[class*='design-editor_tab_block_container__'] {
580
645
  }
581
646
 
582
647
  &:hover {
583
- color: var(--design-text-hoverForeground);
584
- background-color: var(--activityBar-activeBorder);
648
+ background-color: var(--badge-background);
649
+ color: var(--badge-foreground);
585
650
  border-radius: 4px;
586
651
  opacity: 1;
587
652
  }
@@ -608,7 +673,7 @@ div[class*='design-editor_tab_block_container__'] {
608
673
  color: var(--design-text-placeholderForeground);
609
674
  }
610
675
 
611
- div[class*='mod_selected___'] {
676
+ div[class*='mod_selected'] {
612
677
  .design-opened_editor_node_overflow_wrap {
613
678
  color: var(--design-text-highlightForeground) !important;
614
679
  }
@@ -717,5 +782,92 @@ div[class*='design-editor_tab_block_container__'] {
717
782
  &::-webkit-scrollbar {
718
783
  width: 4px;
719
784
  height: 4px;
785
+
786
+ &:hover {
787
+ width: 10px;
788
+ }
789
+ }
790
+ }
791
+
792
+ /**
793
+ * ---------------- Override menu actions styles ---------------------
794
+ */
795
+ .menuAction__sub_menu_action_container {
796
+ display: flex;
797
+ justify-content: space-between;
798
+ align-items: center;
799
+ width: 100%;
800
+ user-select: none;
801
+ padding-left: 12px;
802
+ padding-right: 12px;
803
+ min-width: 150px;
804
+
805
+ .icon {
806
+ filter: grayscale(1);
807
+
808
+ span {
809
+ margin-right: 8px;
810
+ }
811
+ }
812
+
813
+ .extraDesc,
814
+ .shortcut {
815
+ justify-content: right;
816
+ text-align: center;
817
+ color: var(--kt-menu-descriptionForeground);
818
+ font-size: 12px;
819
+ }
820
+
821
+ .icon,
822
+ .submenuIcon {
823
+ text-align: center;
824
+ display: flex;
825
+ justify-content: center;
826
+ align-items: center;
827
+
828
+ :global(.kt-icon) {
829
+ color: var(--design-text-foreground);
830
+ }
831
+ }
832
+
833
+ .label {
834
+ flex: 1;
835
+ padding-right: 16px;
836
+ }
837
+
838
+ &.disabled {
839
+ .shortcut {
840
+ color: var(--kt-menu-disableForeground);
841
+ }
842
+ }
843
+
844
+ &:not(.disabled):hover {
845
+ background: var(--menu-selectionBackground) !important;
846
+ color: var(--menu-selectionForeground) !important;
847
+
848
+ .shortcut {
849
+ color: var(--menu-selectionForeground);
850
+ }
851
+ }
852
+
853
+ &:focus {
854
+ .shortcut {
855
+ color: var(--menu-selectionForeground);
856
+ }
857
+ }
858
+
859
+ .label {
860
+ font-size: 12px;
861
+ display: flex;
862
+ align-items: center;
863
+ // stop Flexbox removing trailing whitespace
864
+ // see https://www.mattstobbs.com/flexbox-removing-trailing-whitespace/
865
+ white-space: pre-wrap;
866
+ }
867
+
868
+ .submenuIcon {
869
+ span {
870
+ font-size: 16px;
871
+ }
720
872
  }
721
873
  }
@@ -35,6 +35,9 @@
35
35
  &::-webkit-scrollbar {
36
36
  width: 4px;
37
37
  margin: 20px;
38
+ &:hover {
39
+ width: 10px;
40
+ }
38
41
  }
39
42
  }
40
43
 
@@ -100,10 +103,8 @@
100
103
  .kt-popover-content {
101
104
  box-shadow: 0px 9px 28px 8px var(--design-boxShadow-primary), 0px 3px 6px -4px var(--design-boxShadow-secondary),
102
105
  0px 6px 16px 0px var(--design-boxShadow-tertiary);
103
- padding: 5px 8px;
104
106
  border-radius: 6px;
105
107
  line-height: 18px;
106
- margin-top: -3px;
107
108
 
108
109
  .kt-popover-title {
109
110
  margin-bottom: 0;
@@ -146,9 +147,15 @@ html {
146
147
 
147
148
  .vertical {
148
149
  width: 4px !important;
150
+ &:hover {
151
+ width: 10px !important;
152
+ }
149
153
 
150
154
  .slider {
151
155
  width: 4px !important;
156
+ &:hover {
157
+ width: 10px !important;
158
+ }
152
159
  left: unset !important;
153
160
  right: 0;
154
161
  border-radius: 4px !important;
@@ -157,10 +164,15 @@ html {
157
164
 
158
165
  .horizontal {
159
166
  height: 4px !important;
160
-
167
+ &:hover {
168
+ height: 10px !important;
169
+ }
161
170
  .slider {
162
171
  border-radius: 4px !important;
163
172
  height: 4px !important;
173
+ &:hover {
174
+ height: 10px !important;
175
+ }
164
176
  }
165
177
  }
166
178
  }
@@ -175,6 +187,9 @@ html {
175
187
  .xterm .xterm-viewport {
176
188
  &::-webkit-scrollbar {
177
189
  width: 4px;
190
+ &:hover {
191
+ width: 10px;
192
+ }
178
193
  }
179
194
  }
180
195
 
@@ -280,6 +295,9 @@ html {
280
295
 
281
296
  &::-webkit-scrollbar {
282
297
  width: 4px !important;
298
+ &:hover {
299
+ width: 10px;
300
+ }
283
301
  }
284
302
  }
285
303
  }
@@ -295,7 +313,7 @@ html {
295
313
  }
296
314
 
297
315
  /**
298
- * layout 面板
316
+ * layout 面板
299
317
  **/
300
318
  .design-slot_resize_horizontal {
301
319
  width: 2px;
@@ -784,6 +784,7 @@ export default {
784
784
  'quickInput.background': '#222830',
785
785
  'list.focusBackground': '#ffffff1f',
786
786
  'textLink.foreground': '#3c8dff',
787
+ 'editorStickyScroll.background': '#151b21',
787
788
  },
788
789
  semanticHighlighting: true,
789
790
  semanticTokenColors: {
@@ -804,6 +804,7 @@ export default {
804
804
  'quickInput.background': '#fff',
805
805
  'list.focusBackground': '#151b5814',
806
806
  'textLink.foreground': '#3c8dff',
807
+ 'editorStickyScroll.background': '#fff',
807
808
  },
808
809
  semanticHighlighting: true,
809
810
  semanticTokenColors: {
@@ -0,0 +1,3 @@
1
+ export const DESIGN_MENUBAR_CONTAINER_VIEW_ID = 'design_menubar';
2
+ export const DESIGN_MENU_BAR_RIGHT = 'design_menu_bar_right';
3
+ export const DESIGN_MENU_BAR_LEFT = 'design_menu_bar_left';
@@ -0,0 +1 @@
1
+ export * from './constants';
package/src/index.ts CHANGED
@@ -0,0 +1 @@
1
+ export * from './common';
@@ -1,135 +0,0 @@
1
- .design-editor_tab_block_container {
2
- display: flex;
3
- align-items: center;
4
- height: 36px;
5
- border-radius: 12px 12px 0 0;
6
- padding: 0 8px;
7
- margin-right: 0 !important;
8
-
9
- &::before {
10
- content: '';
11
- position: absolute;
12
- left: 0;
13
- top: 12px;
14
- display: inline-block;
15
- width: 1px;
16
- height: 12px;
17
- background-color: var(--editorGroup-border);
18
- }
19
-
20
- > div:first-child {
21
- margin-right: 4px !important;
22
- flex-shrink: 0;
23
- flex-grow: 0;
24
-
25
- &::before {
26
- font-size: 14px;
27
- background-size: 14px;
28
- background-position: 2px;
29
- filter: grayscale(1);
30
- color: var(--design-icon-foreground);
31
- }
32
- }
33
-
34
- &.active {
35
- background-color: var(--tab-activeBackground);
36
- color: var(--tab-activeForeground);
37
-
38
- &::before {
39
- content: none;
40
- }
41
-
42
- div:first-child {
43
- &::before {
44
- filter: grayscale(0);
45
- }
46
- }
47
- }
48
- }
49
-
50
- .menuAction__sub_menu_action_container {
51
- display: flex;
52
- justify-content: space-between;
53
- align-items: center;
54
- width: 100%;
55
- user-select: none;
56
- padding-left: 12px;
57
- padding-right: 12px;
58
- min-width: 150px;
59
-
60
- .icon {
61
- filter: grayscale(1);
62
-
63
- span {
64
- margin-right: 8px;
65
- }
66
- }
67
-
68
- .extraDesc,
69
- .shortcut {
70
- justify-content: right;
71
- text-align: center;
72
- color: var(--kt-menu-descriptionForeground);
73
- font-size: 12px;
74
- }
75
-
76
- .icon,
77
- .submenuIcon {
78
- text-align: center;
79
- display: flex;
80
- justify-content: center;
81
- align-items: center;
82
-
83
- :global(.kt-icon) {
84
- color: var(--design-text-foreground);
85
- }
86
- }
87
-
88
- .label {
89
- flex: 1;
90
- padding-right: 16px;
91
- }
92
-
93
- &.disabled {
94
- .shortcut {
95
- color: var(--kt-menu-disableForeground);
96
- }
97
- }
98
-
99
- &:not(.disabled):hover {
100
- .shortcut {
101
- color: var(--menu-selectionForeground);
102
- }
103
- }
104
-
105
- &:focus {
106
- .shortcut {
107
- color: var(--menu-selectionForeground);
108
- }
109
- }
110
-
111
- .label {
112
- font-size: 12px;
113
- display: flex;
114
- align-items: center;
115
- // stop Flexbox removing trailing whitespace
116
- // see https://www.mattstobbs.com/flexbox-removing-trailing-whitespace/
117
- white-space: pre-wrap;
118
- }
119
-
120
- .submenuIcon {
121
- span {
122
- font-size: 16px;
123
- }
124
- }
125
- }
126
-
127
- :global(.design-light) {
128
- .editor_tab_block_container {
129
- > div:first-child {
130
- &::before {
131
- filter: grayscale(0);
132
- }
133
- }
134
- }
135
- }
@@ -1,135 +0,0 @@
1
- .design-editor_tab_block_container {
2
- display: flex;
3
- align-items: center;
4
- height: 36px;
5
- border-radius: 12px 12px 0 0;
6
- padding: 0 8px;
7
- margin-right: 0 !important;
8
-
9
- &::before {
10
- content: '';
11
- position: absolute;
12
- left: 0;
13
- top: 12px;
14
- display: inline-block;
15
- width: 1px;
16
- height: 12px;
17
- background-color: var(--editorGroup-border);
18
- }
19
-
20
- > div:first-child {
21
- margin-right: 4px !important;
22
- flex-shrink: 0;
23
- flex-grow: 0;
24
-
25
- &::before {
26
- font-size: 14px;
27
- background-size: 14px;
28
- background-position: 2px;
29
- filter: grayscale(1);
30
- color: var(--design-icon-foreground);
31
- }
32
- }
33
-
34
- &.active {
35
- background-color: var(--tab-activeBackground);
36
- color: var(--tab-activeForeground);
37
-
38
- &::before {
39
- content: none;
40
- }
41
-
42
- div:first-child {
43
- &::before {
44
- filter: grayscale(0);
45
- }
46
- }
47
- }
48
- }
49
-
50
- .menuAction__sub_menu_action_container {
51
- display: flex;
52
- justify-content: space-between;
53
- align-items: center;
54
- width: 100%;
55
- user-select: none;
56
- padding-left: 12px;
57
- padding-right: 12px;
58
- min-width: 150px;
59
-
60
- .icon {
61
- filter: grayscale(1);
62
-
63
- span {
64
- margin-right: 8px;
65
- }
66
- }
67
-
68
- .extraDesc,
69
- .shortcut {
70
- justify-content: right;
71
- text-align: center;
72
- color: var(--kt-menu-descriptionForeground);
73
- font-size: 12px;
74
- }
75
-
76
- .icon,
77
- .submenuIcon {
78
- text-align: center;
79
- display: flex;
80
- justify-content: center;
81
- align-items: center;
82
-
83
- :global(.kt-icon) {
84
- color: var(--design-text-foreground);
85
- }
86
- }
87
-
88
- .label {
89
- flex: 1;
90
- padding-right: 16px;
91
- }
92
-
93
- &.disabled {
94
- .shortcut {
95
- color: var(--kt-menu-disableForeground);
96
- }
97
- }
98
-
99
- &:not(.disabled):hover {
100
- .shortcut {
101
- color: var(--menu-selectionForeground);
102
- }
103
- }
104
-
105
- &:focus {
106
- .shortcut {
107
- color: var(--menu-selectionForeground);
108
- }
109
- }
110
-
111
- .label {
112
- font-size: 12px;
113
- display: flex;
114
- align-items: center;
115
- // stop Flexbox removing trailing whitespace
116
- // see https://www.mattstobbs.com/flexbox-removing-trailing-whitespace/
117
- white-space: pre-wrap;
118
- }
119
-
120
- .submenuIcon {
121
- span {
122
- font-size: 16px;
123
- }
124
- }
125
- }
126
-
127
- :global(.design-light) {
128
- .editor_tab_block_container {
129
- > div:first-child {
130
- &::before {
131
- filter: grayscale(0);
132
- }
133
- }
134
- }
135
- }