Skip to content

Commit 6a2bf01

Browse files
committed
feat(theme): add tomorrow-night-blue theme.
1 parent 934cb75 commit 6a2bf01

File tree

28 files changed

+719
-242
lines changed

28 files changed

+719
-242
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,13 @@ jobs:
316316
env:
317317
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
318318

319+
- name: 📦 @uiw/codemirror-theme-tomorrow-night-blue publish to NPM
320+
run: npm publish --access public
321+
working-directory: ./themes/tomorrow-night-blue/
322+
continue-on-error: true
323+
env:
324+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
325+
319326
- name: 📦 @uiw/codemirror-theme-vscode publish to NPM
320327
run: npm publish --access public
321328
working-directory: ./themes/vscode/

core/README.md

Lines changed: 34 additions & 33 deletions
Large diffs are not rendered by default.
Lines changed: 290 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,290 @@
1+
{
2+
"type": "dark",
3+
"colors": {
4+
"focusBorder": "#bbdaff",
5+
"errorForeground": "#a92049",
6+
"input.background": "#001733",
7+
"dropdown.background": "#001733",
8+
"quickInputList.focusBackground": "#ffffff60",
9+
"list.activeSelectionBackground": "#ffffff60",
10+
"list.inactiveSelectionBackground": "#ffffff40",
11+
"list.hoverBackground": "#ffffff30",
12+
"list.highlightForeground": "#bbdaff",
13+
"pickerGroup.foreground": "#bbdaff",
14+
"editor.background": "#002451",
15+
"editor.foreground": "#ffffff",
16+
"editor.selectionBackground": "#003f8e",
17+
"minimap.selectionHighlight": "#003f8e",
18+
"editor.lineHighlightBackground": "#00346e",
19+
"editorLineNumber.activeForeground": "#949494",
20+
"editorCursor.foreground": "#ffffff",
21+
"editorWhitespace.foreground": "#404f7d",
22+
"editorWidget.background": "#001c40",
23+
"editorHoverWidget.background": "#001c40",
24+
"editorHoverWidget.border": "#ffffff44",
25+
"editorGroup.border": "#404f7d",
26+
"editorGroupHeader.tabsBackground": "#001733",
27+
"editorGroup.dropBackground": "#25375daa",
28+
"peekViewResult.background": "#001c40",
29+
"tab.inactiveBackground": "#001c40",
30+
"tab.lastPinnedBorder": "#007acc80",
31+
"debugToolBar.background": "#001c40",
32+
"titleBar.activeBackground": "#001126",
33+
"statusBar.background": "#001126",
34+
"statusBarItem.remoteBackground": "#0e639c",
35+
"ports.iconRunningProcessForeground": "#bbdaff",
36+
"statusBar.noFolderBackground": "#001126",
37+
"statusBar.debuggingBackground": "#001126",
38+
"activityBar.background": "#001733",
39+
"activityBarItem.profilesBackground": "#003271",
40+
"progressBar.background": "#bbdaffcc",
41+
"badge.background": "#bbdaffcc",
42+
"badge.foreground": "#001733",
43+
"sideBar.background": "#001c40",
44+
"terminal.ansiBlack": "#111111",
45+
"terminal.ansiRed": "#ff9da4",
46+
"terminal.ansiGreen": "#d1f1a9",
47+
"terminal.ansiYellow": "#ffeead",
48+
"terminal.ansiBlue": "#bbdaff",
49+
"terminal.ansiMagenta": "#ebbbff",
50+
"terminal.ansiCyan": "#99ffff",
51+
"terminal.ansiWhite": "#cccccc",
52+
"terminal.ansiBrightBlack": "#333333",
53+
"terminal.ansiBrightRed": "#ff7882",
54+
"terminal.ansiBrightGreen": "#b8f171",
55+
"terminal.ansiBrightYellow": "#ffe580",
56+
"terminal.ansiBrightBlue": "#80baff",
57+
"terminal.ansiBrightMagenta": "#d778ff",
58+
"terminal.ansiBrightCyan": "#78ffff",
59+
"terminal.ansiBrightWhite": "#ffffff"
60+
},
61+
"tokenColors": [
62+
{
63+
"settings": {
64+
"background": "#002451",
65+
"foreground": "#FFFFFF"
66+
}
67+
},
68+
{
69+
"scope": [
70+
"meta.embedded",
71+
"source.groovy.embedded",
72+
"meta.jsx.children",
73+
"string meta.image.inline.markdown",
74+
"variable.legacy.builtin.python"
75+
],
76+
"settings": {
77+
"foreground": "#FFFFFF"
78+
}
79+
},
80+
{
81+
"name": "Comment",
82+
"scope": "comment",
83+
"settings": {
84+
"foreground": "#7285B7"
85+
}
86+
},
87+
{
88+
"name": "Foreground, Operator",
89+
"scope": "keyword.operator.class, keyword.operator, constant.other, source.php.embedded.line",
90+
"settings": {
91+
"fontStyle": "",
92+
"foreground": "#FFFFFF"
93+
}
94+
},
95+
{
96+
"name": "Variable, String Link, Regular Expression, Tag Name, GitGutter deleted",
97+
"scope": "variable, support.other.variable, string.other.link, string.regexp, entity.name.tag, entity.other.attribute-name, meta.tag, declaration.tag, markup.deleted.git_gutter",
98+
"settings": {
99+
"foreground": "#FF9DA4"
100+
}
101+
},
102+
{
103+
"name": "Number, Constant, Function Argument, Tag Attribute, Embedded",
104+
"scope": "constant.numeric, constant.language, support.constant, constant.character, variable.parameter, punctuation.section.embedded, keyword.other.unit",
105+
"settings": {
106+
"fontStyle": "",
107+
"foreground": "#FFC58F"
108+
}
109+
},
110+
{
111+
"name": "Class, Support",
112+
"scope": "entity.name.class, entity.name.type, entity.name.namespace, entity.name.scope-resolution, support.type, support.class",
113+
"settings": {
114+
"fontStyle": "",
115+
"foreground": "#FFEEAD"
116+
}
117+
},
118+
{
119+
"name": "String, Symbols, Inherited Class, Markup Heading, GitGutter inserted",
120+
"scope": "string, constant.other.symbol, entity.other.inherited-class, markup.heading, markup.inserted.git_gutter",
121+
"settings": {
122+
"fontStyle": "",
123+
"foreground": "#D1F1A9"
124+
}
125+
},
126+
{
127+
"name": "Operator, Misc",
128+
"scope": "keyword.operator, constant.other.color",
129+
"settings": {
130+
"foreground": "#99FFFF"
131+
}
132+
},
133+
{
134+
"name": "Function, Special Method, Block Level, GitGutter changed",
135+
"scope": "entity.name.function, meta.function-call, support.function, keyword.other.special-method, meta.block-level, markup.changed.git_gutter",
136+
"settings": {
137+
"fontStyle": "",
138+
"foreground": "#BBDAFF"
139+
}
140+
},
141+
{
142+
"name": "Keyword, Storage",
143+
"scope": "keyword, storage, storage.type, entity.name.tag.css",
144+
"settings": {
145+
"fontStyle": "",
146+
"foreground": "#EBBBFF"
147+
}
148+
},
149+
{
150+
"name": "Invalid",
151+
"scope": "invalid",
152+
"settings": {
153+
"fontStyle": "",
154+
"foreground": "#a92049"
155+
}
156+
},
157+
{
158+
"name": "Separator",
159+
"scope": "meta.separator",
160+
"settings": {
161+
"foreground": "#FFFFFF"
162+
}
163+
},
164+
{
165+
"name": "Deprecated",
166+
"scope": "invalid.deprecated",
167+
"settings": {
168+
"fontStyle": "",
169+
"foreground": "#cd9731"
170+
}
171+
},
172+
{
173+
"name": "Diff foreground",
174+
"scope": "markup.inserted.diff, markup.deleted.diff, meta.diff.header.to-file, meta.diff.header.from-file",
175+
"settings": {
176+
"foreground": "#FFFFFF"
177+
}
178+
},
179+
{
180+
"name": "Diff insertion",
181+
"scope": "markup.inserted.diff, meta.diff.header.to-file",
182+
"settings": {
183+
"foreground": "#718c00"
184+
}
185+
},
186+
{
187+
"name": "Diff deletion",
188+
"scope": "markup.deleted.diff, meta.diff.header.from-file",
189+
"settings": {
190+
"foreground": "#c82829"
191+
}
192+
},
193+
{
194+
"name": "Diff header",
195+
"scope": "meta.diff.header.from-file, meta.diff.header.to-file",
196+
"settings": {
197+
"foreground": "#4271ae"
198+
}
199+
},
200+
{
201+
"name": "Diff range",
202+
"scope": "meta.diff.range",
203+
"settings": {
204+
"fontStyle": "italic",
205+
"foreground": "#3e999f"
206+
}
207+
},
208+
{
209+
"name": "Markup Quote",
210+
"scope": "markup.quote",
211+
"settings": {
212+
"foreground": "#FFC58F"
213+
}
214+
},
215+
{
216+
"name": "Markup Lists",
217+
"scope": "markup.list",
218+
"settings": {
219+
"foreground": "#BBDAFF"
220+
}
221+
},
222+
{
223+
"name": "Markup Styling",
224+
"scope": "markup.bold, markup.italic",
225+
"settings": {
226+
"foreground": "#FFC58F"
227+
}
228+
},
229+
{
230+
"name": "Markup: Strong",
231+
"scope": "markup.bold",
232+
"settings": {
233+
"fontStyle": "bold"
234+
}
235+
},
236+
{
237+
"name": "Markup: Emphasis",
238+
"scope": "markup.italic",
239+
"settings": {
240+
"fontStyle": "italic"
241+
}
242+
},
243+
{
244+
"scope": "markup.strikethrough",
245+
"settings": {
246+
"fontStyle": "strikethrough"
247+
}
248+
},
249+
{
250+
"name": "Markup Inline",
251+
"scope": "markup.inline.raw",
252+
"settings": {
253+
"fontStyle": "",
254+
"foreground": "#FF9DA4"
255+
}
256+
},
257+
{
258+
"name": "Markup Headings",
259+
"scope": "markup.heading",
260+
"settings": {
261+
"fontStyle": "bold"
262+
}
263+
},
264+
{
265+
"scope": "token.info-token",
266+
"settings": {
267+
"foreground": "#6796e6"
268+
}
269+
},
270+
{
271+
"scope": "token.warn-token",
272+
"settings": {
273+
"foreground": "#cd9731"
274+
}
275+
},
276+
{
277+
"scope": "token.error-token",
278+
"settings": {
279+
"foreground": "#f44747"
280+
}
281+
},
282+
{
283+
"scope": "token.debug-token",
284+
"settings": {
285+
"foreground": "#b267e6"
286+
}
287+
}
288+
],
289+
"semanticHighlighting": true
290+
}

themes/_scripts/main.mjs

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import FS from 'node:fs/promises';
44
const require = createRequire(import.meta.url);
55

66
const includes = (data, ...arg) => {
7-
const scope = typeof data.scope === 'string' ? data.scope.split(' ').filter(Boolean) : data.scope || [];
7+
const isComma = typeof data.scope === 'string' && data.scope.includes(',');
8+
const scope = typeof data.scope === 'string' ? data.scope.split(isComma ? ',' : ' ').filter(Boolean).map(t => t.trim()) : data.scope || [];
89
const isInclude = !![scope||[]].flat().find(elm => arg.includes(elm));
910
return isInclude ? getForeground(data.settings.foreground) : undefined;
1011
}
@@ -17,7 +18,8 @@ function format(data = {}, dark = false) {
1718
// Layout
1819
background: colors['editor.background'],
1920
foreground: colors['editor.foreground'] || colors['input.foreground'],
20-
selection: colors['editor.selectionBackground'],
21+
selection: colors['editor.wordHighlightBackground'] || colors['editor.selectionBackground'],
22+
selectionMatch: colors['editor.wordHighlightStrongBackground'] || colors['editor.selectionBackground'],
2123
cursor: colors['editorCursor.foreground'] || colors['foreground'],
2224
dropdownBackground: colors['dropdown.background'],
2325
dropdownBorder: colors['dropdown.border'] || colors['foreground'],
@@ -127,6 +129,22 @@ const getString = (obj) => `export const config = ${JSON.stringify(obj, null, 2)
127129
themePath = '../monokai-dimmed/src/color.ts';
128130
await FS.writeFile(themePath, getString(monokaiDimmed));
129131
console.log(`🎉 File \x1b[32;1m${themePath}\x1b[0m created.`);
132+
133+
const solarizedDark = format(require('./data/solarized.dark.json'));
134+
themePath = '../solarized/src/dark-color.ts';
135+
await FS.writeFile(themePath, getString(solarizedDark));
136+
console.log(`🎉 File \x1b[32;1m${themePath}\x1b[0m created.`);
137+
138+
const solarizedLight = format(require('./data/solarized.light.json'));
139+
themePath = '../solarized/src/light-color.ts';
140+
await FS.writeFile(themePath, getString(solarizedLight));
141+
console.log(`🎉 File \x1b[32;1m${themePath}\x1b[0m created.`);
142+
143+
const tomorrowNightBlue = format(require('./data/tomorrow-night-blue.json'));
144+
themePath = '../tomorrow-night-blue/src/color.ts';
145+
await FS.writeFile(themePath, getString(tomorrowNightBlue));
146+
console.log(`🎉 File \x1b[32;1m${themePath}\x1b[0m created.`);
147+
130148
// const themeSolarizedDark = format(require('./data/solarized.dark.json'), true)
131149
// console.log('~~~::', themeSolarizedDark);
132150
// const themeSolarizedLight = format(require('./data/solarized.light.json'))

themes/abyss/src/color.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ export const config = {
22
background: '#000c18',
33
foreground: '#6688cc',
44
selection: '#770811',
5+
selectionMatch: '#770811',
56
cursor: '#ddbb88',
67
dropdownBackground: '#181f2f',
78
activeLine: '#082050',

themes/abyss/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const defaultSettingsAbyss: CreateThemeOptions['settings'] = {
77
foreground: config.foreground,
88
caret: config.cursor,
99
selection: config.selection,
10-
selectionMatch: config.selection,
10+
selectionMatch: config.selectionMatch,
1111
gutterBackground: config.background,
1212
gutterForeground: config.foreground,
1313
lineHighlight: config.activeLine,

themes/all/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,12 @@ export * from '@uiw/codemirror-theme-xcode';
281281
<img width="436" alt="codemirror-theme-tokyo-night-storm" src="https://user-images.githubusercontent.com/1680273/206097179-8a490b97-87da-4285-a9bc-b0c9f510e7ed.png">
282282
</a>
283283

284+
### tomorrow-night-blue
285+
286+
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/tomorrow-night-blue">
287+
<img width="436" alt="codemirror-theme-tomorrow-night-blue" src="https://github.com/uiwjs/react-codemirror/assets/1680273/dcc31c7a-70d7-4c4d-bf9f-a7e8212030d8">
288+
</a>
289+
284290
### vscode
285291

286292
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/vscode/dark">

themes/all/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"@uiw/codemirror-theme-tokyo-night": "4.21.10",
5050
"@uiw/codemirror-theme-tokyo-night-day": "4.21.10",
5151
"@uiw/codemirror-theme-tokyo-night-storm": "4.21.10",
52+
"@uiw/codemirror-theme-tomorrow-night-blue": "4.21.10",
5253
"@uiw/codemirror-theme-vscode": "4.21.10",
5354
"@uiw/codemirror-theme-xcode": "4.21.10",
5455
"@uiw/codemirror-themes": "4.21.10"

themes/all/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,6 @@ export * from '@uiw/codemirror-theme-sublime';
2525
export * from '@uiw/codemirror-theme-tokyo-night';
2626
export * from '@uiw/codemirror-theme-tokyo-night-storm';
2727
export * from '@uiw/codemirror-theme-tokyo-night-day';
28+
export * from '@uiw/codemirror-theme-tomorrow-night-blue';
2829
export * from '@uiw/codemirror-theme-vscode';
2930
export * from '@uiw/codemirror-theme-xcode';

0 commit comments

Comments
 (0)