shiki-themes
Advanced tools
Comparing version 0.2.6 to 0.2.7
@@ -93,3 +93,2 @@ { | ||
"source.css.less entity.other.attribute-name.id", | ||
"entity.other.attribute-name.attribute.scss", | ||
"entity.other.attribute-name.scss" | ||
@@ -96,0 +95,0 @@ ], |
@@ -94,3 +94,2 @@ { | ||
"source.css.less entity.other.attribute-name.id", | ||
"entity.other.attribute-name.attribute.scss", | ||
"entity.other.attribute-name.scss" | ||
@@ -607,3 +606,3 @@ ], | ||
"sideBarSectionHeader.border": "#61616130", | ||
"tab.lastPinnedBorder": "#81818130", | ||
"tab.lastPinnedBorder": "#61616130", | ||
"notebook.focusedCellBackground": "#c8ddf150", | ||
@@ -610,0 +609,0 @@ "notebook.cellBorderColor": "#dae3e9", |
@@ -71,3 +71,3 @@ { | ||
"terminal.ansiBrightRed": "#d6656a", | ||
"terminal.ansiBrightWhite": "#ffffff", | ||
"terminal.ansiBrightWhite": "#7E7E7E", | ||
"terminal.ansiBrightYellow": "#e7c547", | ||
@@ -74,0 +74,0 @@ "terminal.ansiCyan": "#4dbf99", |
@@ -32,3 +32,4 @@ { | ||
"tab.inactiveForeground": "#ccccc7", | ||
"widget.shadow": "#000000", | ||
"tab.lastPinnedBorder": "#414339", | ||
"widget.shadow": "#00000098", | ||
"progressBar.background": "#75715E", | ||
@@ -50,3 +51,2 @@ "badge.background": "#75715E", | ||
"activityBar.foreground": "#f8f8f2", | ||
"activityBar.dropBackground": "#414339", | ||
"sideBar.background": "#1e1f1c", | ||
@@ -283,3 +283,3 @@ "sideBarSectionHeader.background": "#272822", | ||
"fontStyle": "", | ||
"foreground": "#F8F8F0" | ||
"foreground": "#F44747" | ||
} | ||
@@ -291,3 +291,3 @@ }, | ||
"settings": { | ||
"foreground": "#F8F8F0" | ||
"foreground": "#F44747" | ||
} | ||
@@ -294,0 +294,0 @@ }, |
@@ -216,3 +216,5 @@ { | ||
"scope": "invalid", | ||
"settings": {} | ||
"settings": { | ||
"foreground": "#D30102" | ||
} | ||
}, | ||
@@ -371,2 +373,3 @@ { | ||
"tab.border": "#003847", | ||
"tab.lastPinnedBorder": "#2AA19844", | ||
"activityBar.background": "#003847", | ||
@@ -373,0 +376,0 @@ "panel.border": "#2b2b4a", |
@@ -219,3 +219,5 @@ { | ||
"scope": "invalid", | ||
"settings": {} | ||
"settings": { | ||
"foreground": "#cd3131" | ||
} | ||
}, | ||
@@ -362,5 +364,5 @@ { | ||
"tab.activeModifiedBorder": "#cb4b16", | ||
"tab.lastPinnedBorder": "#FDF6E3", | ||
"activityBar.background": "#DDD6C1", | ||
"activityBar.foreground": "#584c27", | ||
"activityBar.dropBackground": "#EEE8D5", | ||
"activityBarBadge.background": "#B58900", | ||
@@ -367,0 +369,0 @@ "panel.border": "#DDD6C1", |
@@ -65,13 +65,9 @@ "use strict"; | ||
*/ | ||
var editorBackground = { light: '#fffffe', dark: '#1E1E1E' }; | ||
var editorForeground = { light: '#333333', dark: '#BBBBBB' }; | ||
var VSCODE_FALLBACK_EDITOR_FG = { light: '#333333', dark: '#bbbbbb' }; | ||
var VSCODE_FALLBACK_EDITOR_BG = { light: '#fffffe', dark: '#1e1e1e' }; | ||
function getThemeDefaultColors(theme) { | ||
var _a, _b; | ||
var fg = editorForeground.dark; | ||
var bg = editorBackground.dark; | ||
if (theme.type === 'light') { | ||
fg = editorForeground.light; | ||
bg = editorBackground.light; | ||
} | ||
var _a, _b, _c, _d; | ||
var fg, bg; | ||
/** | ||
* First try: | ||
* Theme might contain a global `tokenColor` without `name` or `scope` | ||
@@ -92,8 +88,23 @@ * Used as default value for foreground/background | ||
} | ||
if (theme.colors && theme.colors['editor.foreground']) { | ||
/** | ||
* Second try: | ||
* If there's no global `tokenColor` without `name` or `scope` | ||
* Use `editor.foreground` and `editor.background` | ||
*/ | ||
if (!fg && ((_c = theme) === null || _c === void 0 ? void 0 : _c.colors['editor.foreground'])) { | ||
fg = theme.colors['editor.foreground']; | ||
} | ||
if (theme.colors && theme.colors['editor.background']) { | ||
if (!bg && ((_d = theme) === null || _d === void 0 ? void 0 : _d.colors['editor.background'])) { | ||
bg = theme.colors['editor.background']; | ||
} | ||
/** | ||
* Last try: | ||
* If there's no fg/bg color specified in theme, use default | ||
*/ | ||
if (!fg) { | ||
fg = theme.type === 'light' ? VSCODE_FALLBACK_EDITOR_FG.light : VSCODE_FALLBACK_EDITOR_FG.dark; | ||
} | ||
if (!bg) { | ||
bg = theme.type === 'light' ? VSCODE_FALLBACK_EDITOR_BG.light : VSCODE_FALLBACK_EDITOR_BG.dark; | ||
} | ||
return { | ||
@@ -100,0 +111,0 @@ fg: fg, |
{ | ||
"name": "shiki-themes", | ||
"version": "0.2.6", | ||
"version": "0.2.7", | ||
"description": "Themes for shiki", | ||
@@ -21,3 +21,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "4a0dd37dc6980d1c5d13580e5166c67d0027211d" | ||
"gitHead": "c11ea269bc8cf9acc87506c3ec510a597f12b3e0" | ||
} |
@@ -95,15 +95,10 @@ import { IRawTheme, IRawThemeSetting } from 'vscode-textmate' | ||
*/ | ||
const editorBackground = { light: '#fffffe', dark: '#1E1E1E' } | ||
const editorForeground = { light: '#333333', dark: '#BBBBBB' } | ||
const VSCODE_FALLBACK_EDITOR_FG = { light: '#333333', dark: '#bbbbbb' } | ||
const VSCODE_FALLBACK_EDITOR_BG = { light: '#fffffe', dark: '#1e1e1e' } | ||
function getThemeDefaultColors(theme: IRawTheme & { type?: string }): { fg: string; bg: string } { | ||
let fg = editorForeground.dark | ||
let bg = editorBackground.dark | ||
let fg, bg | ||
if (theme.type === 'light') { | ||
fg = editorForeground.light | ||
bg = editorBackground.light | ||
} | ||
/** | ||
* First try: | ||
* Theme might contain a global `tokenColor` without `name` or `scope` | ||
@@ -126,9 +121,25 @@ * Used as default value for foreground/background | ||
if ((<any>theme).colors && (<any>theme).colors['editor.foreground']) { | ||
/** | ||
* Second try: | ||
* If there's no global `tokenColor` without `name` or `scope` | ||
* Use `editor.foreground` and `editor.background` | ||
*/ | ||
if (!fg && (<any>theme)?.colors['editor.foreground']) { | ||
fg = (<any>theme).colors['editor.foreground'] | ||
} | ||
if ((<any>theme).colors && (<any>theme).colors['editor.background']) { | ||
if (!bg && (<any>theme)?.colors['editor.background']) { | ||
bg = (<any>theme).colors['editor.background'] | ||
} | ||
/** | ||
* Last try: | ||
* If there's no fg/bg color specified in theme, use default | ||
*/ | ||
if (!fg) { | ||
fg = theme.type === 'light' ? VSCODE_FALLBACK_EDITOR_FG.light : VSCODE_FALLBACK_EDITOR_FG.dark | ||
} | ||
if (!bg) { | ||
bg = theme.type === 'light' ? VSCODE_FALLBACK_EDITOR_BG.light : VSCODE_FALLBACK_EDITOR_BG.dark | ||
} | ||
return { | ||
@@ -135,0 +146,0 @@ fg, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
SPDX disjunction
LicenseSPDX disjunction for an artifact's license information
Found 1 instance in 1 package
SPDX disjunction
LicenseSPDX disjunction for an artifact's license information
Found 1 instance in 1 package
11751
513525
37