diff options
| author | Taylor Mullen <[email protected]> | 2025-04-22 18:57:47 -0700 |
|---|---|---|
| committer | N. Taylor Mullen <[email protected]> | 2025-04-22 22:08:13 -0700 |
| commit | 4c2a5045a0d209cfda5723a4dc84fe59670b558e (patch) | |
| tree | 2a874aa35a524f683a39f89d5fc288b0a09596f7 /packages/cli/src/ui/themes/dracula.ts | |
| parent | e163e024996ff8bb1152284322831c4f35696801 (diff) | |
Add theming support.
- Added a number of common themes to our support matrix:
- AtomOneDark
- Dracula
- VS
- GitHub
- GoogleCode
- XCode
- ... Admittedly these all were randomly picked, we could probably curate these better...
- Added a new `ThemeDialog` UI that can be accessed via `/theme`. It shows your currentlyt available themes and allows you to change them freely. It does **not**:
- Save the theme between sessions
- Allow you to hit escape
- Show a preview prior to selection.
- These themes are from reacts highlight js library.
Fixes https://b.corp.google.com/issues/412797985
Diffstat (limited to 'packages/cli/src/ui/themes/dracula.ts')
| -rw-r--r-- | packages/cli/src/ui/themes/dracula.ts | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/packages/cli/src/ui/themes/dracula.ts b/packages/cli/src/ui/themes/dracula.ts new file mode 100644 index 00000000..0b55435a --- /dev/null +++ b/packages/cli/src/ui/themes/dracula.ts @@ -0,0 +1,99 @@ +/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import { Theme } from './theme.js'; + +export const Dracula: Theme = new Theme('Dracula', { + hljs: { + display: 'block', + overflowX: 'auto', + padding: '0.5em', + background: '#282a36', + color: '#f8f8f2', + }, + 'hljs-keyword': { + color: '#8be9fd', + fontWeight: 'bold', + }, + 'hljs-selector-tag': { + color: '#8be9fd', + fontWeight: 'bold', + }, + 'hljs-literal': { + color: '#8be9fd', + fontWeight: 'bold', + }, + 'hljs-section': { + color: '#8be9fd', + fontWeight: 'bold', + }, + 'hljs-link': { + color: '#8be9fd', + }, + 'hljs-function .hljs-keyword': { + color: '#ff79c6', + }, + 'hljs-subst': { + color: '#f8f8f2', + }, + 'hljs-string': { + color: '#f1fa8c', + }, + 'hljs-title': { + color: '#f1fa8c', + fontWeight: 'bold', + }, + 'hljs-name': { + color: '#f1fa8c', + fontWeight: 'bold', + }, + 'hljs-type': { + color: '#f1fa8c', + fontWeight: 'bold', + }, + 'hljs-attribute': { + color: '#f1fa8c', + }, + 'hljs-symbol': { + color: '#f1fa8c', + }, + 'hljs-bullet': { + color: '#f1fa8c', + }, + 'hljs-addition': { + color: '#f1fa8c', + }, + 'hljs-variable': { + color: '#f1fa8c', + }, + 'hljs-template-tag': { + color: '#f1fa8c', + }, + 'hljs-template-variable': { + color: '#f1fa8c', + }, + 'hljs-comment': { + color: '#6272a4', + }, + 'hljs-quote': { + color: '#6272a4', + }, + 'hljs-deletion': { + color: '#6272a4', + }, + 'hljs-meta': { + color: '#6272a4', + }, + 'hljs-doctag': { + fontWeight: 'bold', + }, + 'hljs-strong': { + fontWeight: 'bold', + }, + 'hljs-emphasis': { + fontStyle: 'italic', + }, +}); |
