ideacode 1.3.4 → 1.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui/theme.js +14 -1
- package/package.json +1 -1
package/dist/ui/theme.js
CHANGED
|
@@ -83,6 +83,19 @@ function isDarkMode() {
|
|
|
83
83
|
return true;
|
|
84
84
|
return n <= 7;
|
|
85
85
|
}
|
|
86
|
+
function hasTrueColor() {
|
|
87
|
+
const colorterm = (process.env.COLORTERM ?? "").toLowerCase();
|
|
88
|
+
if (colorterm.includes("truecolor") || colorterm.includes("24bit"))
|
|
89
|
+
return true;
|
|
90
|
+
const term = (process.env.TERM ?? "").toLowerCase();
|
|
91
|
+
return term.includes("direct");
|
|
92
|
+
}
|
|
93
|
+
function resolveFooterHintColor(base) {
|
|
94
|
+
const inTmux = Boolean(process.env.TMUX);
|
|
95
|
+
if (inTmux && !hasTrueColor())
|
|
96
|
+
return "#5a5a5a";
|
|
97
|
+
return base;
|
|
98
|
+
}
|
|
86
99
|
const theme = isDarkMode() ? THEME_DARK : THEME_LIGHT;
|
|
87
100
|
export { theme };
|
|
88
101
|
export const colors = {
|
|
@@ -125,6 +138,6 @@ export const inkColors = {
|
|
|
125
138
|
textPrimary: theme.colors.text.primary,
|
|
126
139
|
textSecondary: theme.colors.text.secondary,
|
|
127
140
|
textDisabled: theme.colors.text.disabled,
|
|
128
|
-
footerHint: theme.colors.text.footerHint,
|
|
141
|
+
footerHint: resolveFooterHintColor(theme.colors.text.footerHint),
|
|
129
142
|
};
|
|
130
143
|
export const icons = theme.icons;
|