@adecore/terminal 0.44.0 → 0.44.2
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/terminal.css +4 -1
- package/dist/theme.js +5 -1
- package/package.json +1 -1
- package/src/terminal.css +4 -1
- package/src/theme.ts +6 -1
package/dist/terminal.css
CHANGED
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
/* What `TerminalView` draws with, read as literal colors on every theme change. The cursor follows the
|
|
5
5
|
accent; the sixteen colors are the ones a program asks for by number. The selectors are the ones
|
|
6
|
-
the theme of @adecore/ui uses, so an app overrides both in one rule.
|
|
6
|
+
the theme of @adecore/ui uses, so an app overrides both in one rule.
|
|
7
|
+
|
|
8
|
+
`--term-font` is not declared here: an app sets it on `<html>` (inline) to give its terminals a font
|
|
9
|
+
family apart from `--font-mono`, and the terminal follows `--font-mono` while it is unset or empty. */
|
|
7
10
|
:root, [data-theme="light"] {
|
|
8
11
|
--term-bg: #fbfbfc;
|
|
9
12
|
--term-fg: #27272a;
|
package/dist/theme.js
CHANGED
|
@@ -17,4 +17,8 @@ export const readTerminalTheme = () => {
|
|
|
17
17
|
}
|
|
18
18
|
return theme;
|
|
19
19
|
};
|
|
20
|
-
|
|
20
|
+
/* `--term-font` is the terminal's own font; without it the terminal follows the code font of the page. */
|
|
21
|
+
export const readTerminalFont = () => {
|
|
22
|
+
const style = getComputedStyle(document.documentElement);
|
|
23
|
+
return token(style, '--term-font') || token(style, '--font-mono');
|
|
24
|
+
};
|
package/package.json
CHANGED
package/src/terminal.css
CHANGED
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
/* What `TerminalView` draws with, read as literal colors on every theme change. The cursor follows the
|
|
5
5
|
accent; the sixteen colors are the ones a program asks for by number. The selectors are the ones
|
|
6
|
-
the theme of @adecore/ui uses, so an app overrides both in one rule.
|
|
6
|
+
the theme of @adecore/ui uses, so an app overrides both in one rule.
|
|
7
|
+
|
|
8
|
+
`--term-font` is not declared here: an app sets it on `<html>` (inline) to give its terminals a font
|
|
9
|
+
family apart from `--font-mono`, and the terminal follows `--font-mono` while it is unset or empty. */
|
|
7
10
|
:root, [data-theme="light"] {
|
|
8
11
|
--term-bg: #fbfbfc;
|
|
9
12
|
--term-fg: #27272a;
|
package/src/theme.ts
CHANGED
|
@@ -29,4 +29,9 @@ export const readTerminalTheme = (): ITheme => {
|
|
|
29
29
|
return theme;
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
/* `--term-font` is the terminal's own font; without it the terminal follows the code font of the page. */
|
|
33
|
+
export const readTerminalFont = (): string => {
|
|
34
|
+
const style = getComputedStyle(document.documentElement);
|
|
35
|
+
|
|
36
|
+
return token(style, '--term-font') || token(style, '--font-mono');
|
|
37
|
+
};
|