@@ -23,8 +23,8 @@ const ThreeColorRegEx = /^#?([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])$/;
2323// These are based on the colors generated by 'Default Light+' and are only set when we
2424// are ignoring themes.
2525//tslint:disable:no-multiline-string object-literal-key-quotes
26- const DefaultCssVars : { [ key : string ] : string } = {
27- 'light' : `
26+ const DefaultCssVars : { [ key : string ] : string } = {
27+ 'light' : `
2828 :root {
2929 --override-widget-background: #f3f3f3;
3030 --override-foreground: #000000;
@@ -38,7 +38,7 @@ const DefaultCssVars: { [key: string] : string } = {
3838 --override-peek-background: #f2f8fc;
3939 }
4040` ,
41- 'dark' : `
41+ 'dark' : `
4242 :root {
4343 --override-widget-background: #1e1e1e;
4444 --override-foreground: #d4d4d4;
@@ -56,25 +56,25 @@ const DefaultCssVars: { [key: string] : string } = {
5656
5757// These colors below should match colors that come from either the Default Light+ theme or the Default Dark+ theme.
5858// They are used when we can't find a theme json file.
59- const DefaultColors : { [ key : string ] : string } = {
60- 'light.comment' : '#008000' ,
59+ const DefaultColors : { [ key : string ] : string } = {
60+ 'light.comment' : '#008000' ,
6161 'light.constant.numeric' : '#09885a' ,
62- 'light.string' : '#a31515' ,
63- 'light.keyword.control' : '#AF00DB' ,
62+ 'light.string' : '#a31515' ,
63+ 'light.keyword.control' : '#AF00DB' ,
6464 'light.keyword.operator' : '#000000' ,
65- 'light.variable' : '#001080' ,
65+ 'light.variable' : '#001080' ,
6666 'light.entity.name.type' : '#267f99' ,
6767 'light.support.function' : '#795E26' ,
68- 'light.punctuation' : '#000000' ,
69- 'dark.comment' : '#6A9955' ,
70- 'dark.constant.numeric' : '#b5cea8' ,
71- 'dark.string' : '#ce9178' ,
72- 'dark.keyword.control' : '#C586C0' ,
73- 'dark.keyword.operator' : '#d4d4d4' ,
74- 'dark.variable' : '#9CDCFE' ,
75- 'dark.entity.name.type' : '#4EC9B0' ,
76- 'dark.support.function' : '#DCDCAA' ,
77- 'dark.punctuation' : '#1e1e1e'
68+ 'light.punctuation' : '#000000' ,
69+ 'dark.comment' : '#6A9955' ,
70+ 'dark.constant.numeric' : '#b5cea8' ,
71+ 'dark.string' : '#ce9178' ,
72+ 'dark.keyword.control' : '#C586C0' ,
73+ 'dark.keyword.operator' : '#d4d4d4' ,
74+ 'dark.variable' : '#9CDCFE' ,
75+ 'dark.entity.name.type' : '#4EC9B0' ,
76+ 'dark.support.function' : '#DCDCAA' ,
77+ 'dark.punctuation' : '#1e1e1e'
7878} ;
7979
8080interface IApplyThemeArgs {
@@ -105,11 +105,11 @@ export class CodeCssGenerator implements ICodeCssGenerator {
105105 return this . applyThemeData ( isDark , theme , '' , this . generateCss . bind ( this ) ) ;
106106 }
107107
108- public generateMonacoTheme ( isDark : boolean , theme : string ) : Promise < JSONObject > {
108+ public generateMonacoTheme ( isDark : boolean , theme : string ) : Promise < JSONObject > {
109109 return this . applyThemeData ( isDark , theme , { } , this . generateMonacoThemeObject . bind ( this ) ) ;
110110 }
111111
112- private async applyThemeData < T > ( isDark : boolean , theme : string , defaultT : T , applier : ( args : IApplyThemeArgs ) => T ) : Promise < T > {
112+ private async applyThemeData < T > ( isDark : boolean , theme : string , defaultT : T , applier : ( args : IApplyThemeArgs ) => T ) : Promise < T > {
113113 let result = defaultT ;
114114 try {
115115 // First compute our current theme.
@@ -132,8 +132,8 @@ export class CodeCssGenerator implements ICodeCssGenerator {
132132 result = applier ( { tokenColors, baseColors, fontFamily, fontSize, isDark : isDarkUpdated , defaultStyle : ignoreTheme ? LightTheme : undefined } ) ;
133133 } else if ( tokenColors === null && fontFamily && fontSize ) {
134134 // No colors found. See if we can figure out what type of theme we have
135- const style = isDark ? DarkTheme : LightTheme ;
136- result = applier ( { fontFamily, fontSize, isDark : isDarkUpdated , defaultStyle : style } ) ;
135+ const style = isDark ? DarkTheme : LightTheme ;
136+ result = applier ( { fontFamily, fontSize, isDark : isDarkUpdated , defaultStyle : style } ) ;
137137 }
138138 }
139139 } catch ( err ) {
@@ -144,14 +144,14 @@ export class CodeCssGenerator implements ICodeCssGenerator {
144144 return result ;
145145 }
146146
147- private getScopes ( entry : any ) : JSONArray {
147+ private getScopes ( entry : any ) : JSONArray {
148148 if ( entry && entry . scope ) {
149149 return Array . isArray ( entry . scope ) ? entry . scope as JSONArray : entry . scope . toString ( ) . split ( ',' ) ;
150150 }
151151 return [ ] ;
152152 }
153153
154- private matchTokenColor ( tokenColors : JSONArray , scope : string ) : number {
154+ private matchTokenColor ( tokenColors : JSONArray , scope : string ) : number {
155155 return tokenColors . findIndex ( ( entry : any ) => {
156156 const scopeArray = this . getScopes ( entry ) ;
157157 if ( scopeArray . find ( v => v !== null && v !== undefined && v . toString ( ) . trim ( ) === scope ) ) {
@@ -184,7 +184,7 @@ export class CodeCssGenerator implements ICodeCssGenerator {
184184 return { color : this . getDefaultColor ( defaultStyle , scope ) , fontStyle : 'normal' } ;
185185 }
186186
187- private getDefaultColor ( style : string | undefined , scope : string ) : string {
187+ private getDefaultColor ( style : string | undefined , scope : string ) : string {
188188 return style ? DefaultColors [ `${ style } .${ scope } ` ] : 'var(--override-foreground, var(--vscode-editor-foreground))' ;
189189 }
190190
@@ -210,14 +210,14 @@ export class CodeCssGenerator implements ICodeCssGenerator {
210210 --code-font-size: ${ args . fontSize } px;
211211 }
212212
213- ${ args . defaultStyle ? DefaultCssVars [ args . defaultStyle ] : undefined }
213+ ${ args . defaultStyle ? DefaultCssVars [ args . defaultStyle ] : undefined }
214214` ;
215215 }
216216
217217 // Based on this data here:
218218 // https://github.com/Microsoft/vscode/blob/master/src/vs/editor/standalone/common/themes.ts#L13
219219 // tslint:disable: max-func-body-length
220- private generateMonacoThemeObject ( args : IApplyThemeArgs ) : monacoEditor . editor . IStandaloneThemeData {
220+ private generateMonacoThemeObject ( args : IApplyThemeArgs ) : monacoEditor . editor . IStandaloneThemeData {
221221 const result : monacoEditor . editor . IStandaloneThemeData = {
222222 base : args . isDark ? 'vs-dark' : 'vs' ,
223223 inherit : false ,
@@ -295,7 +295,7 @@ export class CodeCssGenerator implements ICodeCssGenerator {
295295 } ) ;
296296 } else {
297297 // Otherwise use our default values.
298- result . base = args . defaultStyle === DarkTheme ? 'vs-dark' : 'vs' ;
298+ result . base = args . defaultStyle === DarkTheme ? 'vs-dark' : 'vs' ;
299299 result . inherit = true ;
300300
301301 if ( args . defaultStyle ) {
@@ -325,8 +325,8 @@ export class CodeCssGenerator implements ICodeCssGenerator {
325325 return [ ...colors1 , ...colors2 ] ;
326326 }
327327
328- private mergeBaseColors = ( colors1 : JSONObject , colors2 : JSONObject ) : JSONObject => {
329- return { ...colors1 , ...colors2 } ;
328+ private mergeBaseColors = ( colors1 : JSONObject , colors2 : JSONObject ) : JSONObject => {
329+ return { ...colors1 , ...colors2 } ;
330330 }
331331
332332 private readTokenColors = async ( themeFile : string ) : Promise < JSONArray > => {
0 commit comments