Skip to content

Commit 8dccafa

Browse files
committed
feat(theme): add andromeda theme.
1 parent 84613ee commit 8dccafa

File tree

15 files changed

+601
-5
lines changed

15 files changed

+601
-5
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,13 @@ jobs:
172172
env:
173173
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
174174

175+
- name: 📦 @uiw/codemirror-theme-andromeda publish to NPM
176+
run: npm publish --access public
177+
working-directory: ./themes/andromeda/
178+
continue-on-error: true
179+
env:
180+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
181+
175182
- name: 📦 @uiw/codemirror-theme-atomone publish to NPM
176183
run: npm publish --access public
177184
working-directory: ./themes/atomone/

core/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ npm install @uiw/react-codemirror --save
5959
| `@uiw/codemirror-theme-abcdef` | [![npm version](https://img.shields.io/npm/v/@uiw/codemirror-theme-abcdef.svg)](https://www.npmjs.com/package/@uiw/codemirror-theme-abcdef) [![NPM Downloads](https://img.shields.io/npm/dm/@uiw/codemirror-theme-abcdef.svg?style=flat)](https://www.npmjs.com/package/@uiw/codemirror-theme-abcdef) | [`#preview`](https://uiwjs.github.io/react-codemirror/#/theme/data/abcdef) |
6060
| `@uiw/codemirror-theme-abyss` | [![npm version](https://img.shields.io/npm/v/@uiw/codemirror-theme-abyss.svg)](https://www.npmjs.com/package/@uiw/codemirror-theme-abyss) [![NPM Downloads](https://img.shields.io/npm/dm/@uiw/codemirror-theme-abyss.svg?style=flat)](https://www.npmjs.com/package/@uiw/codemirror-theme-abyss) | [`#preview`](https://uiwjs.github.io/react-codemirror/#/theme/data/abyss) |
6161
| `@uiw/codemirror-theme-androidstudio` | [![npm version](https://img.shields.io/npm/v/@uiw/codemirror-theme-androidstudio.svg)](https://www.npmjs.com/package/@uiw/codemirror-theme-androidstudio) [![NPM Downloads](https://img.shields.io/npm/dm/@uiw/codemirror-theme-androidstudio.svg?style=flat)](https://www.npmjs.com/package/@uiw/codemirror-theme-androidstudio) | [`#preview`](https://uiwjs.github.io/react-codemirror/#/theme/data/androidstudio) |
62+
| `@uiw/codemirror-theme-andromeda` | [![npm version](https://img.shields.io/npm/v/@uiw/codemirror-theme-andromeda.svg)](https://www.npmjs.com/package/@uiw/codemirror-theme-andromeda) [![NPM Downloads](https://img.shields.io/npm/dm/@uiw/codemirror-theme-andromeda.svg?style=flat)](https://www.npmjs.com/package/@uiw/codemirror-theme-andromeda) | [`#preview`](https://uiwjs.github.io/react-codemirror/#/theme/data/andromeda) |
6263
| `@uiw/codemirror-theme-atomone` | [![npm version](https://img.shields.io/npm/v/@uiw/codemirror-theme-atomone.svg)](https://www.npmjs.com/package/@uiw/codemirror-theme-atomone) [![NPM Downloads](https://img.shields.io/npm/dm/@uiw/codemirror-theme-atomone.svg?style=flat)](https://www.npmjs.com/package/@uiw/codemirror-theme-atomone) | [`#preview`](https://uiwjs.github.io/react-codemirror/#/theme/data/atomone) |
6364
| `@uiw/codemirror-theme-aura` | [![npm version](https://img.shields.io/npm/v/@uiw/codemirror-theme-aura.svg)](https://www.npmjs.com/package/@uiw/codemirror-theme-aura) [![NPM Downloads](https://img.shields.io/npm/dm/@uiw/codemirror-theme-aura.svg?style=flat)](https://www.npmjs.com/package/@uiw/codemirror-theme-aura) | [`#preview`](https://uiwjs.github.io/react-codemirror/#/theme/data/aura) |
6465
| `@uiw/codemirror-theme-basic` | [![npm version](https://img.shields.io/npm/v/@uiw/codemirror-theme-basic.svg)](https://www.npmjs.com/package/@uiw/codemirror-theme-basic) [![NPM Downloads](https://img.shields.io/npm/dm/@uiw/codemirror-theme-basic.svg?style=flat)](https://www.npmjs.com/package/@uiw/codemirror-theme-basic) | [`#preview`](https://uiwjs.github.io/react-codemirror/#/theme/data/bbedit) |

themes/_scripts/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ Not perfect themes for [cm6](https://github.com/codemirror/dev/), generated from
1313
- [theme-solarized-dark](https://github.com/microsoft/vscode/tree/main/extensions/theme-solarized-dark)
1414
- [theme-solarized-light](https://github.com/microsoft/vscode/tree/main/extensions/theme-solarized-light)
1515
- [theme-tomorrow-night-blue](https://github.com/microsoft/vscode/tree/main/extensions/theme-tomorrow-night-blue)
16+
- [Andromeda](https://github.com/EliverLara/Andromeda/blob/master/themes/Andromeda-color-theme.json)
Lines changed: 344 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,344 @@
1+
{
2+
"name": "Andromeda",
3+
"type": "dark",
4+
"colors": {
5+
"focusBorder": "#746f77",
6+
"foreground": "#D5CED9",
7+
"widget.shadow": "#14151A",
8+
"selection.background": "#746f77",
9+
"errorForeground": "#FC644D",
10+
11+
"button.background": "#00e8c5cc",
12+
"button.hoverBackground": "#07d4b6cc",
13+
14+
"dropdown.background": "#2b303b",
15+
"dropdown.border": "#363c49",
16+
17+
"input.background": "#2b303b",
18+
"input.placeholderForeground": "#746f77",
19+
"inputOption.activeBorder": "#C668BA",
20+
"inputValidation.errorBackground": "#D65343",
21+
"inputValidation.errorBorder": "#D65343",
22+
"inputValidation.infoBackground": "#3A6395",
23+
"inputValidation.infoBorder": "#3A6395",
24+
"inputValidation.warningBackground": "#DE9237",
25+
"inputValidation.warningBorder": "#DE9237",
26+
27+
"scrollbar.shadow": "#23262E",
28+
"scrollbarSlider.activeBackground": "#3A3F4CCC",
29+
"scrollbarSlider.background": "#3A3F4C77",
30+
"scrollbarSlider.hoverBackground": "#3A3F4CAA",
31+
32+
"badge.background": "#00b0ff",
33+
"badge.foreground": "#20232B",
34+
35+
"progressBar.background": "#C668BA",
36+
37+
"list.activeSelectionBackground": "#23262E",
38+
"list.activeSelectionForeground": "#00e8c6",
39+
"list.dropBackground": "#3a404e",
40+
"list.focusBackground": "#282b35",
41+
"list.focusForeground": "#eee",
42+
"list.hoverBackground": "#23262E",
43+
"list.hoverForeground": "#eee",
44+
"list.inactiveSelectionBackground": "#23262E",
45+
"list.inactiveSelectionForeground": "#00e8c6",
46+
47+
"activityBar.background": "#23262E",
48+
"activityBar.dropBackground": "#3a404e",
49+
"activityBar.foreground": "#BAAFC0",
50+
"activityBarBadge.background": "#00b0ff",
51+
"activityBarBadge.foreground": "#20232B",
52+
53+
"sideBar.background": "#23262E",
54+
"sideBarSectionHeader.background": "#23262E",
55+
"sideBarTitle.foreground": "#00e8c6",
56+
"sideBar.foreground": "#999999",
57+
58+
"editorGroup.background": "#23262E",
59+
"editorGroup.dropBackground": "#495061d7",
60+
"editorGroupHeader.tabsBackground": "#23262E",
61+
"tab.activeBackground": "#23262e",
62+
"tab.inactiveBackground": "#23262E",
63+
"tab.activeForeground": "#00e8c6",
64+
"tab.inactiveForeground": "#746f77",
65+
66+
"editor.background": "#23262E",
67+
"editor.foreground": "#D5CED9",
68+
"editorLineNumber.foreground": "#746f77",
69+
"editorCursor.foreground": "#FFF",
70+
"editor.selectionBackground": "#3D4352",
71+
"editor.selectionHighlightBackground": "#4F435580",
72+
"editor.wordHighlightBackground": "#4F4355",
73+
"editor.wordHighlightStrongBackground": "#db45a280",
74+
"editor.findMatchBackground": "#f39d1256",
75+
"editor.findMatchHighlightBackground": "#59b8b377",
76+
"editor.findMatchBorder": "#f39d12b6",
77+
"editor.hoverHighlightBackground": "#373941",
78+
"editor.lineHighlightBackground": "#2e323d",
79+
"editor.lineHighlightBorder": "#2e323d",
80+
"editorLink.activeForeground": "#3B79C7",
81+
"editor.rangeHighlightBackground": "#372F3C",
82+
"editorWhitespace.foreground": "#333844",
83+
"editorIndentGuide.background": "#333844",
84+
"editorIndentGuide.activeBackground": "#585C66",
85+
"editorRuler.foreground": "#4F4355",
86+
"editorCodeLens.foreground": "#746f77",
87+
"editorBracketMatch.background": "#746f77",
88+
"editorBracketMatch.border": "#746f77",
89+
"editorOverviewRuler.border": "#1B1D23",
90+
"editorError.foreground": "#FC644D",
91+
"editorWarning.foreground": "#FF9F2E",
92+
"editorGutter.modifiedBackground": "#5BC0EBBB",
93+
"editorGutter.addedBackground": "#9BC53DBB",
94+
"editorGutter.deletedBackground": "#FC644DBB",
95+
96+
"diffEditor.insertedTextBackground": "#29BF1220",
97+
"diffEditor.removedTextBackground": "#F21B3F20",
98+
99+
"editorWidget.background": "#20232A",
100+
"editorSuggestWidget.background": "#20232A",
101+
"editorSuggestWidget.border": "#372F3C",
102+
"editorSuggestWidget.selectedBackground": "#373941",
103+
"editorHoverWidget.background": "#373941",
104+
"editorHoverWidget.border": "#00e8c5cc",
105+
"debugExceptionWidget.background": "#FF9F2E60",
106+
"debugExceptionWidget.border": "#FF9F2E60",
107+
108+
"minimapSlider.background": "#58607460",
109+
"minimapSlider.hoverBackground": "#60698060",
110+
"minimapSlider.activeBackground": "#60698060",
111+
112+
"peekView.border": "#23262E",
113+
"peekViewEditor.background": "#1A1C22",
114+
"peekViewEditor.matchHighlightBackground": "#FF9F2E60",
115+
"peekViewResult.background": "#1A1C22",
116+
"peekViewResult.matchHighlightBackground": "#FF9F2E60",
117+
"peekViewResult.selectionBackground": "#23262E",
118+
"peekViewTitle.background": "#1A1C22",
119+
"peekViewTitleDescription.foreground": "#746f77",
120+
121+
"merge.currentHeaderBackground": "#F92672",
122+
"merge.currentContentBackground": "#F9267240",
123+
"merge.incomingHeaderBackground": "#3B79C7BB",
124+
"merge.incomingContentBackground": "#3B79C740",
125+
126+
"panel.background": "#23262E",
127+
"panel.border": "#1B1D23",
128+
"panelTitle.activeBorder": "#23262E",
129+
"panelTitle.inactiveForeground": "#746f77",
130+
131+
"statusBar.background": "#23262E",
132+
"statusBar.debuggingBackground": "#FC644D",
133+
"statusBar.noFolderBackground": "#23262E",
134+
"statusBarItem.activeBackground": "#00e8c5cc",
135+
"statusBarItem.hoverBackground": "#07d4b5b0",
136+
"statusBarItem.prominentBackground": "#07d4b5b0",
137+
"statusBarItem.prominentHoverBackground": "#00e8c5cc",
138+
139+
"terminal.ansiRed": "#ee5d43",
140+
"terminal.ansiGreen": "#96E072",
141+
"terminal.ansiYellow": "#FFE66D",
142+
"terminal.ansiBlue": "#7cb7ff",
143+
"terminal.ansiMagenta": "#ff00aa",
144+
"terminal.ansiCyan": "#00e8c6",
145+
"terminal.ansiBrightRed": "#ee5d43",
146+
"terminal.ansiBrightGreen": "#96E072",
147+
"terminal.ansiBrightYellow": "#FFE66D",
148+
"terminal.ansiBrightBlue": "#7cb7ff",
149+
"terminal.ansiBrightMagenta": "#ff00aa",
150+
"terminal.ansiBrightCyan": "#00e8c6",
151+
"terminalCursor.background": "#23262E",
152+
"terminalCursor.foreground": "#FFE66D",
153+
154+
"titleBar.activeBackground": "#23262E",
155+
156+
"notification.background": "#2d313b",
157+
"notification.buttonBackground": "#00e8c5cc",
158+
"notification.buttonHoverBackground": "#07d4b5b0",
159+
"notification.infoBackground": "#00b0ff",
160+
"notification.warningBackground": "#FF9F2E",
161+
"notification.errorBackground": "#FC644D",
162+
163+
"extensionButton.prominentBackground": "#07d4b6cc",
164+
"extensionButton.prominentHoverBackground": "#07d4b5b0",
165+
166+
"pickerGroup.border": "#4F4355",
167+
"pickerGroup.foreground": "#746f77",
168+
169+
"debugToolBar.background": "#20232A",
170+
171+
"walkThrough.embeddedEditorBackground": "#23262E",
172+
173+
"gitDecoration.ignoredResourceForeground": "#555555"
174+
},
175+
"tokenColors": [
176+
{
177+
"settings": {
178+
"foreground": "#D5CED9",
179+
"background": "#23262E"
180+
}
181+
},
182+
{
183+
"name": "Comment color",
184+
"scope": ["comment", "markup.quote.markdown", "meta.diff", "meta.diff.header"],
185+
"settings": {
186+
"foreground": "#A0A1A7cc"
187+
}
188+
},
189+
{
190+
"name": "Text Color",
191+
"scope": [
192+
"meta.template.expression.js",
193+
"constant.name.attribute.tag.jade",
194+
"punctuation.definition.metadata.markdown",
195+
"punctuation.definition.string.end.markdown",
196+
"punctuation.definition.string.begin.markdown"
197+
],
198+
"settings": {
199+
"foreground": "#D5CED9"
200+
}
201+
},
202+
{
203+
"name": "Cyan",
204+
"scope": [
205+
"variable",
206+
"support.variable",
207+
"entity.name.tag.yaml",
208+
"constant.character.entity.html",
209+
"source.css entity.name.tag.reference",
210+
"beginning.punctuation.definition.list.markdown",
211+
"source.css entity.other.attribute-name.parent-selector",
212+
"meta.structure.dictionary.json support.type.property-name"
213+
],
214+
"settings": {
215+
"foreground": "#00e8c6"
216+
}
217+
},
218+
{
219+
"name": "Orange",
220+
"scope": [
221+
"markup.bold",
222+
"constant.numeric",
223+
"meta.group.regexp",
224+
"constant.other.php",
225+
"support.constant.ext.php",
226+
"constant.other.class.php",
227+
"support.constant.core.php",
228+
"fenced_code.block.language",
229+
"constant.other.caps.python",
230+
"entity.other.attribute-name",
231+
"support.type.exception.python",
232+
"source.css keyword.other.unit",
233+
"variable.other.object.property.js.jsx",
234+
"variable.other.object.js"
235+
],
236+
"settings": {
237+
"foreground": "#f39c12"
238+
}
239+
},
240+
{
241+
"name": "Yellow",
242+
"scope": [
243+
"markup.list",
244+
"text.xml string",
245+
"entity.name.type",
246+
"support.function",
247+
"entity.other.attribute-name",
248+
"meta.at-rule.extend",
249+
"entity.name.function",
250+
"entity.other.inherited-class",
251+
"entity.other.keyframe-offset.css",
252+
"text.html.markdown string.quoted",
253+
"meta.function-call.generic.python",
254+
"meta.at-rule.extend support.constant",
255+
"entity.other.attribute-name.class.jade",
256+
"source.css entity.other.attribute-name",
257+
"text.xml punctuation.definition.string"
258+
],
259+
"settings": {
260+
"foreground": "#FFE66D"
261+
}
262+
},
263+
{
264+
"name": "Pink",
265+
"scope": ["markup.heading", "variable.language.this.js", "variable.language.special.self.python"],
266+
"settings": {
267+
"foreground": "#ff00aa"
268+
}
269+
},
270+
{
271+
"name": "Hot Pink",
272+
"scope": [
273+
"punctuation.definition.interpolation",
274+
"punctuation.section.embedded.end.php",
275+
"punctuation.section.embedded.end.ruby",
276+
"punctuation.section.embedded.begin.php",
277+
"punctuation.section.embedded.begin.ruby",
278+
"punctuation.definition.template-expression",
279+
"entity.name.tag"
280+
],
281+
"settings": {
282+
"foreground": "#f92672"
283+
}
284+
},
285+
{
286+
"name": "Purple",
287+
"scope": ["storage", "keyword", "meta.link", "meta.image", "markup.italic", "source.js support.type"],
288+
"settings": {
289+
"foreground": "#c74ded"
290+
}
291+
},
292+
{
293+
"name": "Blue",
294+
"scope": ["string.regexp", "markup.changed"],
295+
"settings": {
296+
"foreground": "#7cb7ff"
297+
}
298+
},
299+
{
300+
"name": "Red",
301+
"scope": [
302+
"constant",
303+
"support.class",
304+
"keyword.operator",
305+
"support.constant",
306+
"text.html.markdown string",
307+
"source.css support.function",
308+
"source.php support.function",
309+
"support.function.magic.python",
310+
"entity.other.attribute-name.id",
311+
"markup.deleted"
312+
],
313+
"settings": {
314+
"foreground": "#ee5d43"
315+
}
316+
},
317+
{
318+
"name": "Green",
319+
"scope": [
320+
"string",
321+
"text.html.php string",
322+
"markup.inline.raw",
323+
"markup.inserted",
324+
"punctuation.definition.string",
325+
"punctuation.definition.markdown",
326+
"text.html meta.embedded source.js string",
327+
"text.html.php punctuation.definition.string",
328+
"text.html meta.embedded source.js punctuation.definition.string",
329+
"text.html punctuation.definition.string",
330+
"text.html string"
331+
],
332+
"settings": {
333+
"foreground": "#96E072"
334+
}
335+
},
336+
{
337+
"name": "Font Underline",
338+
"scope": ["entity.other.inherited-class"],
339+
"settings": {
340+
"fontStyle": "underline"
341+
}
342+
}
343+
]
344+
}

themes/_scripts/main.mjs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function format(data = {}, dark = false) {
1616
const conf = {
1717
// name: data.name,
1818
// Layout
19-
background: colors['editor.background'],
19+
background: colors['activeBackground'] || colors['editor.background'],
2020
foreground: colors['editor.foreground'] || colors['input.foreground'],
2121
selection: colors['editor.wordHighlightBackground'] || colors['editor.selectionBackground'],
2222
selectionMatch: colors['editor.wordHighlightStrongBackground'] || colors['editor.selectionBackground'],
@@ -145,8 +145,9 @@ const getString = (obj) => `export const config = ${JSON.stringify(obj, null, 2)
145145
await FS.writeFile(themePath, getString(tomorrowNightBlue));
146146
console.log(`🎉 File \x1b[32;1m${themePath}\x1b[0m created.`);
147147

148-
// const themeSolarizedDark = format(require('./data/solarized.dark.json'), true)
149-
// console.log('~~~::', themeSolarizedDark);
150-
// const themeSolarizedLight = format(require('./data/solarized.light.json'))
151-
// console.log('~~~::', themeSolarizedLight);
148+
const andromeda = format(require('./data/andromeda.json'));
149+
themePath = '../andromeda/src/color.ts';
150+
await FS.writeFile(themePath, getString(andromeda));
151+
console.log(`🎉 File \x1b[32;1m${themePath}\x1b[0m created.`);
152+
152153
})()

0 commit comments

Comments
 (0)