diff --git a/.changeset/three-suns-smoke.md b/.changeset/three-suns-smoke.md new file mode 100644 index 0000000..ba78f00 --- /dev/null +++ b/.changeset/three-suns-smoke.md @@ -0,0 +1,5 @@ +--- +"@code-hike/lighter": patch +--- + +Add more colors diff --git a/lib/dist/index.cjs.js b/lib/dist/index.cjs.js index 338708d..7101154 100644 --- a/lib/dist/index.cjs.js +++ b/lib/dist/index.cjs.js @@ -489,6 +489,10 @@ const colorNamesToKeys = { listSelectionForeground: "list.inactiveSelectionForeground", listHoverBackground: "list.hoverBackground", listHoverForeground: "list.hoverForeground", + tabsBorder: "editorGroupHeader.tabsBorder", + activeTabTopBorder: "tab.activeBorderTop", + hoverTabBackground: "tab.hoverBackground", + hoverTabForeground: "tab.hoverForeground", }; function getColors(theme) { const colors = {}; @@ -590,6 +594,10 @@ const defaults = { "list.inactiveSelectionForeground": { dark: undefined, light: undefined }, "list.hoverBackground": { dark: "#2A2D2E", light: "#F0F0F0" }, "list.hoverForeground": { dark: undefined, light: undefined }, + "editorGroupHeader.tabsBorder": { hc: contrastBorder }, + "tab.activeBorderTop": { hc: contrastBorder }, + "tab.hoverBackground": "tab.inactiveBackground", + "tab.hoverForeground": "tab.inactiveForeground", }; async function loadTheme(theme) { diff --git a/lib/dist/index.d.ts b/lib/dist/index.d.ts index 7579bf8..e3e43d9 100644 --- a/lib/dist/index.d.ts +++ b/lib/dist/index.d.ts @@ -58,6 +58,10 @@ declare function getThemeColors(theme: FinalTheme): { listSelectionForeground: string; listHoverBackground: string; listHoverForeground: string; + tabsBorder: string; + activeTabTopBorder: string; + hoverTabBackground: string; + hoverTabForeground: string; colorScheme: "dark" | "light"; }; @@ -143,6 +147,10 @@ declare function highlight(code: string, alias: LanguageAlias, themeOrThemeName? listSelectionForeground: string; listHoverBackground: string; listHoverForeground: string; + tabsBorder: string; + activeTabTopBorder: string; + hoverTabBackground: string; + hoverTabForeground: string; colorScheme: "dark" | "light"; }; }>; @@ -178,6 +186,10 @@ declare function annotatedHighlight(code: string, alias: LanguageAlias, themeOrT listSelectionForeground: string; listHoverBackground: string; listHoverForeground: string; + tabsBorder: string; + activeTabTopBorder: string; + hoverTabBackground: string; + hoverTabForeground: string; colorScheme: "dark" | "light"; }; }>; diff --git a/lib/dist/index.esm.mjs b/lib/dist/index.esm.mjs index 8517972..96d26da 100644 --- a/lib/dist/index.esm.mjs +++ b/lib/dist/index.esm.mjs @@ -467,6 +467,10 @@ const colorNamesToKeys = { listSelectionForeground: "list.inactiveSelectionForeground", listHoverBackground: "list.hoverBackground", listHoverForeground: "list.hoverForeground", + tabsBorder: "editorGroupHeader.tabsBorder", + activeTabTopBorder: "tab.activeBorderTop", + hoverTabBackground: "tab.hoverBackground", + hoverTabForeground: "tab.hoverForeground", }; function getColors(theme) { const colors = {}; @@ -568,6 +572,10 @@ const defaults = { "list.inactiveSelectionForeground": { dark: undefined, light: undefined }, "list.hoverBackground": { dark: "#2A2D2E", light: "#F0F0F0" }, "list.hoverForeground": { dark: undefined, light: undefined }, + "editorGroupHeader.tabsBorder": { hc: contrastBorder }, + "tab.activeBorderTop": { hc: contrastBorder }, + "tab.hoverBackground": "tab.inactiveBackground", + "tab.hoverForeground": "tab.inactiveForeground", }; async function loadTheme(theme) { diff --git a/lib/src/theme-colors.ts b/lib/src/theme-colors.ts index 6c35760..41a0152 100644 --- a/lib/src/theme-colors.ts +++ b/lib/src/theme-colors.ts @@ -35,6 +35,10 @@ const colorNamesToKeys = { listSelectionForeground: "list.inactiveSelectionForeground", listHoverBackground: "list.hoverBackground", listHoverForeground: "list.hoverForeground", + tabsBorder: "editorGroupHeader.tabsBorder", + activeTabTopBorder: "tab.activeBorderTop", + hoverTabBackground: "tab.hoverBackground", + hoverTabForeground: "tab.hoverForeground", }; function getColors(theme: FinalTheme) { @@ -142,4 +146,8 @@ const defaults = { "list.inactiveSelectionForeground": { dark: undefined, light: undefined }, "list.hoverBackground": { dark: "#2A2D2E", light: "#F0F0F0" }, "list.hoverForeground": { dark: undefined, light: undefined }, + "editorGroupHeader.tabsBorder": { hc: contrastBorder }, + "tab.activeBorderTop": { hc: contrastBorder }, + "tab.hoverBackground": "tab.inactiveBackground", + "tab.hoverForeground": "tab.inactiveForeground", }; diff --git a/test/test.js b/test/test.js index 92c7c99..22f0085 100644 --- a/test/test.js +++ b/test/test.js @@ -21,7 +21,7 @@ async function run() { const result = await annotatedHighlight(newCode, alias, theme, annotations); // console.log(JSON.stringify(result.lines)); - console.log(JSON.stringify(result.lines, null, 1)); + console.log(JSON.stringify(result.colors, null, 1)); } run();