Skip to content

Commit

Permalink
Update Tomorrow themes and add Night Owl
Browse files Browse the repository at this point in the history
  • Loading branch information
brijeshb42 committed Jun 30, 2019
1 parent 01c4f0b commit e5c6948
Show file tree
Hide file tree
Showing 10 changed files with 1,092 additions and 169 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "monaco-themes",
"version": "0.3.2",
"version": "0.3.3",
"description": "Themes for monaco editor in web browser",
"main": "src/index.js",
"scripts": {
Expand Down
12 changes: 7 additions & 5 deletions scripts/download.js
Expand Up @@ -14,6 +14,7 @@ const themeMap = {
'Clouds Midnight': 'https://raw.githubusercontent.com/ajaxorg/ace/master/tool/tmthemes/Clouds%20Midnight.tmTheme',
'Clouds': 'https://raw.githubusercontent.com/ajaxorg/ace/master/tool/tmthemes/Clouds.tmTheme',
'Cobalt': 'https://github.com/JetBrains/colorSchemeTool/raw/master/tmThemes/Cobalt.tmTheme',
// 'Cobalt2': 'https://github.com/wesbos/cobalt2/raw/master/cobalt2.tmTheme',
'Dawn': 'https://github.com/JetBrains/colorSchemeTool/raw/master/tmThemes/Dawn.tmTheme',
'Dreamweaver': 'https://github.com/ajaxorg/ace/raw/master/tool/tmthemes/Dreamweaver.tmTheme',
'Eiffel': 'https://github.com/JetBrains/colorSchemeTool/raw/master/tmThemes/Eiffel.tmTheme',
Expand All @@ -28,6 +29,7 @@ const themeMap = {
'Merbivore': 'https://github.com/ajaxorg/ace/raw/master/tool/tmthemes/Merbivore.tmTheme',
'Monokai': 'https://github.com/cj/sublime/raw/master/Color%20Scheme%20-%20Default/Monokai.tmTheme',
'Monokai Bright': 'https://github.com/JetBrains/colorSchemeTool/raw/master/tmThemes/Monokai%20Bright.tmTheme',
'Night Owl': 'https://github.com/batpigandme/night-owlish/raw/master/tmTheme/night-owlish.tmTheme',
'Oceanic Next': 'https://github.com/voronianski/oceanic-next-color-scheme/raw/master/Oceanic%20Next.tmTheme',
'Pastels on Dark': 'https://github.com/JetBrains/colorSchemeTool/raw/master/tmThemes/Pastels%20on%20Dark.tmTheme',
'Slush and Poppies': 'https://github.com/JetBrains/colorSchemeTool/raw/master/tmThemes/Slush%20%26%20Poppies.tmTheme',
Expand All @@ -36,11 +38,11 @@ const themeMap = {
'SpaceCadet': 'https://github.com/JetBrains/colorSchemeTool/raw/master/tmThemes/SpaceCadet.tmTheme',
'Sunburst': 'https://github.com/filmgirl/TextMate-Themes/raw/master/Sunburst.tmTheme',
'Textmate (Mac Classic)': 'https://github.com/textmate/themes.tmbundle/raw/master/Themes/Mac%20Classic.tmTheme',
'Tomorrow-Night-Blue': 'https://github.com/filmgirl/TextMate-Themes/raw/master/Tomorrow-Night-Blue.tmTheme',
'Tomorrow-Night-Bright': 'https://github.com/filmgirl/TextMate-Themes/raw/master/Tomorrow-Night-Bright.tmTheme',
'Tomorrow-Night-Eighties': 'https://github.com/filmgirl/TextMate-Themes/raw/master/Tomorrow-Night-Eighties.tmTheme',
'Tomorrow-Night': 'https://github.com/filmgirl/TextMate-Themes/raw/master/Tomorrow%20Night.tmTheme',
'Tomorrow': 'https://github.com/filmgirl/TextMate-Themes/raw/master/Tomorrow.tmTheme',
'Tomorrow-Night-Blue': 'https://github.com/chriskempson/tomorrow-theme/raw/master/textmate2/Tomorrow%20Theme.tmbundle/Themes/Tomorrow-Night-Blue.tmTheme',
'Tomorrow-Night-Bright': 'https://github.com/chriskempson/tomorrow-theme/raw/master/textmate2/Tomorrow%20Theme.tmbundle/Themes/Tomorrow-Night-Bright.tmTheme',
'Tomorrow-Night-Eighties': 'https://github.com/chriskempson/tomorrow-theme/raw/master/textmate2/Tomorrow%20Theme.tmbundle/Themes/Tomorrow-Night-Eighties.tmTheme',
'Tomorrow-Night': 'https://github.com/chriskempson/tomorrow-theme/raw/master/textmate2/Tomorrow%20Theme.tmbundle/Themes/Tomorrow-Night.tmTheme',
'Tomorrow': 'https://github.com/chriskempson/tomorrow-theme/raw/master/textmate2/Tomorrow%20Theme.tmbundle/Themes/Tomorrow.tmTheme',
'Twilight': 'https://github.com/JetBrains/colorSchemeTool/raw/master/tmThemes/Twilight.tmTheme',
'Upstream Sunburst': 'https://github.com/filmgirl/TextMate-Themes/raw/master/Upstream%20Sunburst.tmTheme',
'Vibrant Ink': 'https://github.com/filmgirl/TextMate-Themes/raw/master/Vibrant%20Ink.tmTheme',
Expand Down
21 changes: 20 additions & 1 deletion src/index.js
Expand Up @@ -49,6 +49,14 @@ var COLOR_MAP = [
tm: 'background',
mn: 'editor.background',
},
// {
// tm: 'foreground',
// mn: 'editorSuggestWidget.foreground',
// },
// {
// tm: 'background',
// mn: 'editorSuggestWidget.background',
// },
{
tm: 'selection',
mn: 'editor.selectionBackground',
Expand Down Expand Up @@ -134,15 +142,18 @@ ansiColorMap.forEach((color) => {
});
});

var GUTTER_COLOR_MAP = [
];


/**
* @param {string} rawTmThemeString - The contents read from a tmTheme file.
* @returns {IStandaloneThemeData} A monaco compatible theme definition. See https://microsoft.github.io/monaco-editor/api/interfaces/monaco.editor.istandalonethemedata.html
*/
exports.parseTmTheme = function parseTmTheme(rawTmThemeString) {
var rawData = plist.parse(rawTmThemeString);
var data = {};
var globalSettings = rawData.settings[0].settings;
var gutterSettings = rawData.gutterSettings;
var rules = [];

rawData.settings.forEach(setting => {
Expand Down Expand Up @@ -195,6 +206,14 @@ exports.parseTmTheme = function parseTmTheme(rawTmThemeString) {
}
});

if (gutterSettings) {
GUTTER_COLOR_MAP.forEach((obj) => {
if (gutterSettings[obj.tm]) {
globalColors[obj.mn] = parseColor(gutterSettings[obj.tm]);
}
});
}

return {
base: (darkness(globalColors['editor.background']) < 0.5) ? 'vs-dark' : 'vs',
inherit: true,
Expand Down

0 comments on commit e5c6948

Please sign in to comment.