@@ -3,10 +3,10 @@ import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
33
44let debounce = ( func , wait , immediate ) => {
55 var timeout ;
6- return function ( ) {
6+ return function ( ) {
77 var context = this ,
88 args = arguments ;
9- var later = function ( ) {
9+ var later = function ( ) {
1010 timeout = null ;
1111 if ( ! immediate ) func . apply ( context , args ) ;
1212 } ;
@@ -29,30 +29,30 @@ export class EditorElement extends LitElement {
2929 height: 100%;
3030 display: flex;
3131 flex-direction: column;
32- background-color: rgb(37, 37, 38 );
32+ background-color: rgb(243, 243, 243 );
3333 }
3434
35- .tab-root {
36- height: 38px;
37- }
35+
3836
3937 .editor-root {
4038 flex-basis: 100%;
4139 }
4240
4341 .tab {
44- background-color: rgb(45, 45, 45);
45- color: rgba(255, 255, 255, 0.25);
46- font-family: 'Segoe UI', 'Segoe UI Web (West European)', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto,
47- 'Helvetica Neue', sans-serif;
48- font-size: 12px;
49- padding: 14px 18px;
42+ background-color: rgb(236,236,236);
43+ color: #616161;
44+ font-family: -apple-system,BlinkMacSystemFont,sans-serif;
45+ font-size: 11px;
46+ padding: 8px 18px;
5047 display: inline-block;
48+ cursor: pointer;
49+ user-select: none;
50+ margin: 0px -2px 0px 0px;
5151 }
5252
5353 .tab.selected {
54- background-color: rgb(30, 30, 30) ;
55- color: white ;
54+ background-color: white ;
55+ color: rgb(51, 51, 51) ;
5656 font-weight: 400;
5757 }
5858 ` ;
@@ -94,7 +94,7 @@ export class EditorElement extends LitElement {
9494 this . files [ this . currentType ] = this . editor . getValue ( ) ;
9595 let event = new CustomEvent ( 'fileUpdated' ) ;
9696 this . dispatchEvent ( event ) ;
97- } , 500 ) ;
97+ } , 1000 ) ;
9898
9999 this . setupEditor ( this . editorRoot ) ;
100100 this . appendChild ( this . editorRoot ) ;
@@ -123,7 +123,6 @@ export class EditorElement extends LitElement {
123123
124124 this . editor = monaco . editor . create ( htmlElement , {
125125 model : this . currentEditorState . model ,
126- theme : 'vs-dark' ,
127126 scrollBeyondLastLine : false ,
128127 minimap : {
129128 enabled : false
@@ -188,17 +187,11 @@ export class EditorElement extends LitElement {
188187 return html `
189188 < div class ="root ">
190189 < div class ="tab-root ">
191- ${ this . fileTypes . map (
192- type =>
193- html `
194- < div
195- @click ="${ _ => this . showTab ( type ) } "
196- class ="tab ${ type === this . currentType ? 'selected' : '' } "
197- >
198- ${ type }
199- </ button >
200- `
201- ) }
190+ ${ this . fileTypes . map ( type => html `
191+ < div @click ="${ _ => this . showTab ( type ) } "
192+ class ="tab ${ type === this . currentType ? 'selected' : '' } ">
193+ ${ type }
194+ </ div > ` ) }
202195 </ div >
203196 < div class ="editor-root ">
204197 < slot name ="editor "> </ slot >
0 commit comments