From e754070a59aafcc3660185b744cb43da3584e4a1 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Mon, 27 Jan 2025 00:03:37 +0100 Subject: [PATCH] abcdef + androidstudio --- packages/codemirror/themes.mjs | 30 +++-------- packages/codemirror/themes/abcdef.mjs | 52 ++++++++++++++++++++ packages/codemirror/themes/androidstudio.mjs | 38 ++++++++++++++ 3 files changed, 97 insertions(+), 23 deletions(-) create mode 100644 packages/codemirror/themes/abcdef.mjs create mode 100644 packages/codemirror/themes/androidstudio.mjs diff --git a/packages/codemirror/themes.mjs b/packages/codemirror/themes.mjs index 20804632..08d4b8b1 100644 --- a/packages/codemirror/themes.mjs +++ b/packages/codemirror/themes.mjs @@ -37,6 +37,8 @@ import whitescreen, { settings as whitescreenSettings } from './themes/whitescre import teletext, { settings as teletextSettings } from './themes/teletext'; import algoboy, { settings as algoboySettings } from './themes/algoboy'; import terminal, { settings as terminalSettings } from './themes/terminal'; +import abcdef, { settings as abcdefSettings } from './themes/abcdef'; +import androidstudio, { settings as androidstudioSettings } from './themes/androidstudio'; import { setTheme } from '@strudel/draw'; export const themes = { @@ -47,9 +49,9 @@ export const themes = { teletext, algoboy, terminal, - /* abcdef, + abcdef, androidstudio, - atomone, + /*atomone, aura, bespin, darcula, @@ -88,27 +90,9 @@ export const settings = { teletext: teletextSettings, algoboy: algoboySettings, terminal: terminalSettings, - /* abcdef: { - background: '#0f0f0f', - lineBackground: '#0f0f0f99', - foreground: '#defdef', - caret: '#00FF00', - selection: '#515151', - selectionMatch: '#515151', - gutterBackground: '#555', - gutterForeground: '#FFFFFF', - lineHighlight: '#314151', - }, - androidstudio: { - background: '#282b2e', - lineBackground: '#282b2e99', - foreground: '#a9b7c6', - caret: '#00FF00', - selection: '#343739', - selectionMatch: '#343739', - lineHighlight: '#343739', - }, - atomone: { + abcdef: abcdefSettings, + androidstudio: androidstudioSettings, + /*atomone: { background: '#272C35', lineBackground: '#272C3599', foreground: '#9d9b97', diff --git a/packages/codemirror/themes/abcdef.mjs b/packages/codemirror/themes/abcdef.mjs new file mode 100644 index 00000000..a184ea72 --- /dev/null +++ b/packages/codemirror/themes/abcdef.mjs @@ -0,0 +1,52 @@ +/** + * @name abcdef + * @author codemirror.net + * https://codemirror.net/5/theme/abcdef.css + */ +import { tags as t } from '@lezer/highlight'; +import { createTheme } from './theme-helper.mjs'; + +export const settings = { + background: '#0f0f0f', + lineBackground: '#0f0f0f99', + foreground: '#defdef', + caret: '#00FF00', + selection: '#515151', + selectionMatch: '#515151', + gutterBackground: '#555', + gutterForeground: '#FFFFFF', + lineHighlight: '#314151', +}; + +export default createTheme({ + theme: 'dark', + settings: { + background: '#0f0f0f', + foreground: '#defdef', + caret: '#00FF00', + selection: '#515151', + selectionMatch: '#515151', + gutterBackground: '#555', + gutterForeground: '#FFFFFF', + lineHighlight: '#0a6bcb3d', + }, + styles: [ + { tag: t.keyword, color: 'darkgoldenrod', fontWeight: 'bold' }, + { tag: t.atom, color: '#77F' }, + { tag: t.comment, color: '#7a7b7c', fontStyle: 'italic' }, + { tag: t.number, color: 'violet' }, + { tag: t.definition(t.variableName), color: '#fffabc' }, + { tag: t.variableName, color: '#abcdef' }, + { tag: t.function(t.variableName), color: '#fffabc' }, + { tag: t.typeName, color: '#FFDD44' }, + { tag: t.tagName, color: '#def' }, + { tag: t.string, color: '#2b4' }, + { tag: t.meta, color: '#C9F' }, + // { tag: t.qualifier, color: '#FFF700' }, + // { tag: t.builtin, color: '#30aabc' }, + { tag: t.bracket, color: '#8a8a8a' }, + { tag: t.attributeName, color: '#DDFF00' }, + { tag: t.heading, color: 'aquamarine', fontWeight: 'bold' }, + { tag: t.link, color: 'blueviolet', fontWeight: 'bold' }, + ], +}); diff --git a/packages/codemirror/themes/androidstudio.mjs b/packages/codemirror/themes/androidstudio.mjs new file mode 100644 index 00000000..6a1655ce --- /dev/null +++ b/packages/codemirror/themes/androidstudio.mjs @@ -0,0 +1,38 @@ +/** + * @name androidstudio + */ +import { tags as t } from '@lezer/highlight'; +import { createTheme } from './theme-helper.mjs'; + +export const settings = { + background: '#282b2e', + lineBackground: '#282b2e99', + foreground: '#a9b7c6', + caret: '#00FF00', + selection: '#343739', + selectionMatch: '#343739', + lineHighlight: '#343739', +}; + +export default createTheme({ + theme: 'dark', + settings: { + background: '#282b2e', + foreground: '#a9b7c6', + caret: '#00FF00', + selection: '#4e5254', + selectionMatch: '#4e5254', + lineHighlight: '#7f85891f', + }, + styles: [ + { tag: [t.keyword, t.deleted, t.className], color: '#cc7832' }, + { tag: [t.number, t.literal, t.derefOperator], color: '#6897bb' }, + { tag: [t.link, t.variableName], color: '#629755' }, + { tag: [t.comment, t.quote], color: 'grey' }, + { tag: [t.meta, t.documentMeta], color: '#bbb529' }, + { tag: [t.string, t.propertyName, t.attributeValue], color: '#6a8759' }, + { tag: [t.heading, t.typeName], color: '#ffc66d' }, + { tag: [t.attributeName], color: '#a9b7c6' }, + { tag: [t.emphasis], fontStyle: 'italic' }, + ], +});