Skip to content

Commit 934cb75

Browse files
committedAug 26, 2023
feat(theme): add monokai-dimmed theme.
1 parent 9dcbacc commit 934cb75

File tree

14 files changed

+929
-31
lines changed

14 files changed

+929
-31
lines changed
 

‎.github/workflows/ci.yml

+7
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,13 @@ jobs:
253253
env:
254254
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
255255

256+
- name: 📦 @uiw/codemirror-theme-monokai-dimmed publish to NPM
257+
run: npm publish --access public
258+
working-directory: ./themes/monokai-dimmed/
259+
continue-on-error: true
260+
env:
261+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
262+
256263
- name: 📦 @uiw/codemirror-theme-noctis-lilac publish to NPM
257264
run: npm publish --access public
258265
working-directory: ./themes/noctis-lilac/

‎themes/_scripts/data/monokai-dimmed.json

+647
Large diffs are not rendered by default.

‎themes/_scripts/main.mjs

+4
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ const getString = (obj) => `export const config = ${JSON.stringify(obj, null, 2)
123123
await FS.writeFile(themePath, getString(monokai));
124124
console.log(`🎉 File \x1b[32;1m${themePath}\x1b[0m created.`);
125125

126+
const monokaiDimmed = format(require('./data/monokai-dimmed.json'));
127+
themePath = '../monokai-dimmed/src/color.ts';
128+
await FS.writeFile(themePath, getString(monokaiDimmed));
129+
console.log(`🎉 File \x1b[32;1m${themePath}\x1b[0m created.`);
126130
// const themeSolarizedDark = format(require('./data/solarized.dark.json'), true)
127131
// console.log('~~~::', themeSolarizedDark);
128132
// const themeSolarizedLight = format(require('./data/solarized.light.json'))

‎themes/all/README.md

+35-29
Original file line numberDiff line numberDiff line change
@@ -89,37 +89,37 @@ export * from '@uiw/codemirror-theme-xcode';
8989

9090
## Themes
9191

92-
**abcdef**
92+
### abcdef
9393

9494
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/abcdef">
9595
<img width="436" alt="codemirror-theme-abcdef" src="https://user-images.githubusercontent.com/1680273/176573508-705562ad-16ec-4b16-994e-f235a9331a3f.png">
9696
</a>
9797

98-
**abyss**
98+
### abyss
9999

100100
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/abyss">
101101
<img width="436" alt="codemirror-theme-abyss" src="https://github.com/uiwjs/react-codemirror/assets/1680273/b1b59053-d370-485e-9dcc-2987b39197a1">
102102
</a>
103103

104-
**android studio**
104+
### android studio
105105

106106
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/xcode/light">
107107
<img width="436" alt="codemirror-theme-androidstudio" src="https://user-images.githubusercontent.com/1680273/177484354-0a4fa43e-de96-409f-83e2-61808f2347e6.png">
108108
</a>
109109

110-
**atom one**
110+
### atom one
111111

112112
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/xcode/light">
113113
<img width="436" alt="codemirror-theme-androidstudio" src="https://user-images.githubusercontent.com/1680273/181795374-7a25cb90-5d77-4f86-9cbc-b1e12dc939d3.png">
114114
</a>
115115

116-
**aura**
116+
### aura
117117

118118
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/aura">
119119
<img width="436" alt="codemirror-theme-aura" src="https://user-images.githubusercontent.com/1680273/206092773-8140fc6b-119f-4271-a821-7dc6bcbc1c63.png">
120120
</a>
121121

122-
**basic**
122+
### basic
123123

124124
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/basic/dark">
125125
<img width="436" alt="codemirror-theme-basic dark" src="https://github.com/uiwjs/react-codemirror/assets/1680273/977c1271-eca1-4f61-ad90-3a89f4ea4871">
@@ -129,31 +129,31 @@ export * from '@uiw/codemirror-theme-xcode';
129129
<img width="436" alt="codemirror-theme-basic light" src="https://github.com/uiwjs/react-codemirror/assets/1680273/e5b43612-5190-4d5b-ab7a-0f5d369ad7e4">
130130
</a>
131131

132-
**bbedit**
132+
### bbedit
133133

134134
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/bbedit">
135135
<img width="436" alt="codemirror-theme-bbedit" src="https://user-images.githubusercontent.com/1680273/183550552-df398e5b-fab2-4ce5-bdd0-5e3612e3e5d9.png">
136136
</a>
137137

138-
**bespin**
138+
### bespin
139139

140140
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/bespin">
141141
<img width="436" alt="codemirror-theme-bespin" src="https://user-images.githubusercontent.com/1680273/176573408-0fd54981-471a-4ef8-91d4-8ad4b159c1e0.png">
142142
</a>
143143

144-
**darcula**
144+
### darcula
145145

146146
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/darcula">
147147
<img width="436" alt="codemirror-theme-darcula" src="https://user-images.githubusercontent.com/1680273/176573321-3015b1b4-3455-497f-ad16-dd2090d7848d.png">
148148
</a>
149149

150-
**dracula**
150+
### dracula
151151

152152
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/dracula">
153153
<img width="436" alt="codemirror-theme-dracula" src="https://user-images.githubusercontent.com/1680273/176573236-43928ba2-0eb1-4b59-9495-d39b6e3df81c.png">
154154
</a>
155155

156-
**duotone**
156+
### duotone
157157

158158
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/duotone/dark">
159159
<img width="436" alt="codemirror-theme-duotone dark" src="https://user-images.githubusercontent.com/1680273/176572959-adfc1284-4c70-48df-8aeb-9a47ff76b2f2.png">
@@ -163,13 +163,13 @@ export * from '@uiw/codemirror-theme-xcode';
163163
<img width="436" alt="codemirror-theme-duotone light" src="https://user-images.githubusercontent.com/1680273/176573139-5c22ed62-6000-40da-b080-59c83e6181e2.png">
164164
</a>
165165

166-
**eclipse**
166+
### eclipse
167167

168168
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/eclipse">
169169
<img width="436" alt="codemirror-theme-eclipse" src="https://user-images.githubusercontent.com/1680273/176572785-4f56f11a-018b-4f86-9088-e6f71f745cfb.png">
170170
</a>
171171

172-
**github**
172+
### github
173173

174174
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/github/dark">
175175
<img width="436" alt="codemirror-theme-github dark" src="https://user-images.githubusercontent.com/1680273/177048035-644af599-aaf1-41d8-86ea-9ea8c3a1a0c5.png">
@@ -179,7 +179,7 @@ export * from '@uiw/codemirror-theme-xcode';
179179
<img width="436" alt="codemirror-theme-github light" src="https://user-images.githubusercontent.com/1680273/177048005-32794f23-8bff-4059-babf-21316d886e65.png">
180180
</a>
181181

182-
**gruvbox**
182+
### gruvbox
183183

184184
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/gruvbox/dark">
185185
<img width="436" alt="codemirror-theme-gruvbox-dark" src="https://user-images.githubusercontent.com/1680273/206087857-d0a85219-34ad-4e79-9cdf-183f67e1085d.png">
@@ -189,13 +189,13 @@ export * from '@uiw/codemirror-theme-xcode';
189189
<img width="436" alt="codemirror-theme-eclipse" src="https://user-images.githubusercontent.com/1680273/206087911-49db6624-ab8c-434e-9b8a-84132fe206f9.png">
190190
</a>
191191

192-
**kimbie**
192+
### kimbie
193193

194194
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/kimbie">
195195
<img width="436" alt="codemirror-theme-kimbie" src="https://github.com/uiwjs/react-codemirror/assets/1680273/859e75f6-cc7c-4182-ac92-dbf3168784b0">
196196
</a>
197197

198-
**material**
198+
### material
199199

200200
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/material/dark">
201201
<img width="436" alt="codemirror-theme-material" src="https://user-images.githubusercontent.com/1680273/205537793-79f9c99c-831a-4ce3-8189-78b42896656f.png">
@@ -205,43 +205,49 @@ export * from '@uiw/codemirror-theme-xcode';
205205
<img width="436" alt="codemirror-theme-material" src="https://user-images.githubusercontent.com/1680273/206124615-b3896e2c-d299-4609-b1d9-523ea1cf9f5b.png">
206206
</a>
207207

208-
**monokai**
208+
### monokai
209209

210210
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/monokai">
211211
<img width="436" alt="codemirror-theme-monokai" src="https://github.com/uiwjs/react-codemirror/assets/1680273/07df9125-6d96-413b-b863-1eef945b99e3">
212212
</a>
213213

214-
**noctis-lilac**
214+
### monokai-dimmed
215+
216+
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/monokai-dimmed">
217+
<img width="436" alt="codemirror-theme-monokai-dimmed" src="https://github.com/uiwjs/react-codemirror/assets/1680273/1b61ce79-b0b6-4fad-9707-b31804c625a2">
218+
</a>
219+
220+
### noctis-lilac
215221

216222
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/noctis-lilac">
217223
<img width="436" alt="codemirror-theme-noctis-lilac" src="https://user-images.githubusercontent.com/1680273/206088068-55e9a25b-eb77-4e1a-91bb-f39cbba84981.png">
218224
</a>
219225

220-
**nord**
226+
### nord
221227

222228
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/nord">
223229
<img width="436" alt="codemirror-theme-nord" src="https://user-images.githubusercontent.com/1680273/205498304-956bc719-1472-40f0-9c3f-21ac5b9f97a6.png">
224230
</a>
225231

226-
**okaidia**
232+
### okaidia
227233

228234
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/okaidia">
229235
<img width="436" alt="codemirror-theme-okaidia" src="https://user-images.githubusercontent.com/1680273/176572694-b9aface9-9646-4e0e-a211-a8aa92dabc31.png">
230236
</a>
231237

232-
**quietlight**
238+
### quietlight
233239

234240
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/quietlight">
235241
<img width="436" alt="codemirror-theme-okaidia" src="https://github.com/uiwjs/react-codemirror/assets/1680273/3137facb-8db7-4805-bd5c-9818d5ff49ae">
236242
</a>
237243

238-
**red**
244+
### red
239245

240246
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/red">
241247
<img width="436" alt="codemirror-theme-red" src="https://github.com/uiwjs/react-codemirror/assets/1680273/aef0a618-8c74-4466-9a04-35e368f582a7">
242248
</a>
243249

244-
**solarized**
250+
### solarized
245251

246252
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/solarized/light">
247253
<img width="436" alt="codemirror-theme-solarized" src="https://user-images.githubusercontent.com/1680273/205544435-a080d1d4-6da9-4f1d-aa10-5f2207d31176.png">
@@ -251,37 +257,37 @@ export * from '@uiw/codemirror-theme-xcode';
251257
<img width="436" alt="codemirror-theme-solarized" src="https://user-images.githubusercontent.com/1680273/205547403-96db62c3-d061-4dee-88d0-c86ed17e7489.png">
252258
</a>
253259

254-
**sublime**
260+
### sublime
255261

256262
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/sublime">
257263
<img width="436" alt="codemirror-theme-sublime" src="https://user-images.githubusercontent.com/1680273/176572314-cc296f81-0763-485c-8fa2-7d61b24ad09b.png">
258264
</a>
259265

260-
**tokyo-night**
266+
### tokyo-night
261267

262268
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/tokyo-night">
263269
<img width="436" alt="codemirror-theme-tokyo-night" src="https://user-images.githubusercontent.com/1680273/206094521-c3a51de1-8cb7-4f01-a9bd-6cfd04a3aa0d.png">
264270
</a>
265271

266-
**tokyo-night-day**
272+
### tokyo-night-day
267273

268274
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/tokyo-night-day">
269275
<img width="436" alt="codemirror-theme-tokyo-night-day" src="https://user-images.githubusercontent.com/1680273/206104544-ca4db2e0-caac-4804-9321-c269fe660245.png">
270276
</a>
271277

272-
**tokyo-night-storm**
278+
### tokyo-night-storm
273279

274280
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/tokyo-night-storm">
275281
<img width="436" alt="codemirror-theme-tokyo-night-storm" src="https://user-images.githubusercontent.com/1680273/206097179-8a490b97-87da-4285-a9bc-b0c9f510e7ed.png">
276282
</a>
277283

278-
**vscode**
284+
### vscode
279285

280286
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/vscode/dark">
281287
<img width="436" alt="codemirror-theme-vscode dark" src="https://user-images.githubusercontent.com/1680273/202690670-385808e2-6346-4e36-a3d6-6d9fc1f216dc.png">
282288
</a>
283289

284-
**xcode**
290+
### xcode
285291

286292
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/xcode/dark">
287293
<img width="436" alt="codemirror-theme-xcode dark" src="https://user-images.githubusercontent.com/1680273/206087681-537b9c1f-0dce-42a4-854d-036147935e82.png">

‎themes/all/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"@uiw/codemirror-theme-kimbie": "4.21.10",
3939
"@uiw/codemirror-theme-material": "4.21.10",
4040
"@uiw/codemirror-theme-monokai": "4.21.10",
41+
"@uiw/codemirror-theme-monokai-dimmed": "4.21.10",
4142
"@uiw/codemirror-theme-noctis-lilac": "4.21.10",
4243
"@uiw/codemirror-theme-nord": "4.21.10",
4344
"@uiw/codemirror-theme-okaidia": "4.21.10",

‎themes/all/src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export * from '@uiw/codemirror-theme-gruvbox-dark';
1414
export * from '@uiw/codemirror-theme-kimbie';
1515
export * from '@uiw/codemirror-theme-material';
1616
export * from '@uiw/codemirror-theme-monokai';
17+
export * from '@uiw/codemirror-theme-monokai-dimmed';
1718
export * from '@uiw/codemirror-theme-noctis-lilac';
1819
export * from '@uiw/codemirror-theme-nord';
1920
export * from '@uiw/codemirror-theme-okaidia';

‎themes/monokai-dimmed/README.md

+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
<!--rehype:ignore:start-->
2+
3+
# MonokaiDimmed Theme
4+
5+
<!--rehype:ignore:end-->
6+
7+
[![npm version](https://img.shields.io/npm/v/@uiw/codemirror-theme-monokai-dimmed.svg)](https://www.npmjs.com/package/@uiw/codemirror-theme-monokai-dimmed)
8+
9+
MonokaiDimmed theme for cm6, generated from [vscode themes](https://github.com/microsoft/vscode/blob/main/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json).
10+
11+
<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/monokai-dimmed">
12+
<img width="436" alt="codemirror-theme-monokai-dimmed" src="https://github.com/uiwjs/react-codemirror/assets/1680273/1b61ce79-b0b6-4fad-9707-b31804c625a2">
13+
</a>
14+
15+
## Install
16+
17+
```bash
18+
npm install @uiw/codemirror-theme-monokai-dimmed --save
19+
```
20+
21+
```jsx
22+
import { monokaiDimmed, monokaiDimmedInit } from '@uiw/codemirror-theme-monokai-dimmed';
23+
24+
<CodeMirror theme={monokaiDimmed} />
25+
<CodeMirror
26+
theme={monokaiDimmedInit({
27+
settings: {
28+
caret: '#c6c6c6',
29+
fontFamily: 'monospace',
30+
}
31+
})}
32+
/>
33+
```
34+
35+
## API
36+
37+
```tsx
38+
import { CreateThemeOptions } from '@uiw/codemirror-themes';
39+
export declare const defaultSettingsQuietlight: CreateThemeOptions['settings'];
40+
export declare const monokaiDimmedInit: (
41+
options?: Partial<CreateThemeOptions>,
42+
) => import('@codemirror/state').Extension;
43+
export declare const monokaiDimmed: import('@codemirror/state').Extension;
44+
```
45+
46+
## Usage
47+
48+
```jsx
49+
import CodeMirror from '@uiw/react-codemirror';
50+
import { monokaiDimmed } from '@uiw/codemirror-theme-monokai-dimmed';
51+
import { javascript } from '@codemirror/lang-javascript';
52+
53+
function App() {
54+
return (
55+
<CodeMirror
56+
value="console.log('hello world!');"
57+
height="200px"
58+
theme={monokaiDimmed}
59+
extensions={[javascript({ jsx: true })]}
60+
onChange={(value, viewUpdate) => {
61+
console.log('value:', value);
62+
}}
63+
/>
64+
);
65+
}
66+
export default App;
67+
```
68+
69+
```js
70+
import { EditorView } from '@codemirror/view';
71+
import { EditorState } from '@codemirror/state';
72+
import { javascript } from '@codemirror/lang-javascript';
73+
import { monokaiDimmed } from '@uiw/codemirror-theme-monokai-dimmed';
74+
75+
const state = EditorState.create({
76+
doc: 'my source code',
77+
extensions: [monokaiDimmed, javascript({ jsx: true })],
78+
});
79+
80+
const view = new EditorView({
81+
parent: document.querySelector('#editor'),
82+
state,
83+
});
84+
```
85+
86+
## Contributors
87+
88+
As always, thanks to our amazing contributors!
89+
90+
<a href="https://github.com/uiwjs/react-codemirror/graphs/contributors">
91+
<img src="https://uiwjs.github.io/react-codemirror/CONTRIBUTORS.svg" />
92+
</a>
93+
94+
Made with [github-action-contributors](https://github.com/jaywcjlove/github-action-contributors).
95+
96+
## License
97+
98+
Licensed under the MIT License.

‎themes/monokai-dimmed/package.json

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"name": "@uiw/codemirror-theme-monokai-dimmed",
3+
"version": "4.21.10",
4+
"description": "Theme monokai-dimmed for CodeMirror.",
5+
"homepage": "https://uiwjs.github.io/react-codemirror/#/theme/data/monokai-dimmed",
6+
"author": "kenny wong <wowohoo@qq.com>",
7+
"license": "MIT",
8+
"main": "./cjs/index.js",
9+
"module": "./esm/index.js",
10+
"scripts": {
11+
"watch": "tsbb watch src/*.ts --use-babel",
12+
"build": "tsbb build src/*.ts --use-babel"
13+
},
14+
"repository": {
15+
"type": "git",
16+
"url": "https://github.com/uiwjs/react-codemirror.git"
17+
},
18+
"files": [
19+
"src",
20+
"esm",
21+
"cjs"
22+
],
23+
"dependencies": {
24+
"@uiw/codemirror-themes": "4.21.10"
25+
},
26+
"keywords": [
27+
"codemirror",
28+
"codemirror-theme",
29+
"codemirror6",
30+
"theme",
31+
"monokai",
32+
"monokai-dimmed",
33+
"syntax",
34+
"ide",
35+
"code"
36+
]
37+
}

‎themes/monokai-dimmed/src/color.ts

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
export const config = {
2+
background: '#1e1e1e',
3+
foreground: '#c5c8c6',
4+
selection: '#676b7180',
5+
cursor: '#c07020',
6+
dropdownBackground: '#525252',
7+
activeLine: '#303030',
8+
matchingBracket: '#303030',
9+
keyword: '#676867',
10+
storage: '#676867',
11+
variable: '#c7444a',
12+
parameter: '#6089B4',
13+
function: '#9872A2',
14+
string: '#D0B344',
15+
constant: null,
16+
type: '#C7444A',
17+
class: '#CE6700',
18+
number: '#6089B4',
19+
comment: '#9A9B99',
20+
heading: '#D0B344',
21+
invalid: '#FF0B00',
22+
regexp: '#D0B344',
23+
tag: '#6089B4',
24+
};

‎themes/monokai-dimmed/src/index.ts

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import { tags as t } from '@lezer/highlight';
2+
import { createTheme, CreateThemeOptions } from '@uiw/codemirror-themes';
3+
import { config } from './color';
4+
5+
export const defaultSettingsMonokaiDimmed: CreateThemeOptions['settings'] = {
6+
background: config.background,
7+
foreground: config.foreground,
8+
caret: config.cursor,
9+
selection: config.selection,
10+
selectionMatch: config.selection,
11+
gutterBackground: config.background,
12+
gutterForeground: config.foreground,
13+
lineHighlight: config.activeLine,
14+
};
15+
16+
export const monokaiDimmedInit = (options?: Partial<CreateThemeOptions>) => {
17+
const { theme = 'dark', settings = {}, styles = [] } = options || {};
18+
return createTheme({
19+
theme: theme,
20+
settings: {
21+
...defaultSettingsMonokaiDimmed,
22+
...settings,
23+
},
24+
styles: [
25+
{ tag: t.keyword, color: config.keyword },
26+
{ tag: [t.name, t.deleted, t.character, t.macroName], color: config.variable },
27+
{ tag: [t.propertyName], color: config.function },
28+
{ tag: [t.processingInstruction, t.string, t.inserted, t.special(t.string)], color: config.string },
29+
{ tag: [t.function(t.variableName), t.labelName], color: config.function },
30+
{ tag: [t.color, t.constant(t.name), t.standard(t.name)], color: config.constant },
31+
{ tag: [t.definition(t.name), t.separator], color: config.variable },
32+
{ tag: [t.className], color: config.class },
33+
{ tag: [t.number, t.changed, t.annotation, t.modifier, t.self, t.namespace], color: config.number },
34+
{ tag: [t.typeName], color: config.type, fontStyle: config.type },
35+
{ tag: [t.operator, t.operatorKeyword], color: config.keyword },
36+
{ tag: [t.url, t.escape, t.regexp, t.link], color: config.regexp },
37+
{ tag: [t.meta, t.comment], color: config.comment },
38+
{ tag: t.tagName, color: config.tag },
39+
{ tag: t.strong, fontWeight: 'bold' },
40+
{ tag: t.emphasis, fontStyle: 'italic' },
41+
{ tag: t.link, textDecoration: 'underline' },
42+
{ tag: t.heading, fontWeight: 'bold', color: config.heading },
43+
{ tag: [t.atom, t.bool, t.special(t.variableName)], color: config.variable },
44+
{ tag: t.invalid, color: config.invalid },
45+
{ tag: t.strikethrough, textDecoration: 'line-through' },
46+
...styles,
47+
],
48+
});
49+
};
50+
51+
export const monokaiDimmed = monokaiDimmedInit();

‎themes/monokai-dimmed/tsconfig.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "../../tsconfig",
3+
"include": ["src"],
4+
"compilerOptions": {
5+
"outDir": "./cjs",
6+
"baseUrl": ".",
7+
"noEmit": false
8+
}
9+
}

‎www/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
"@kkt/raw-modules": "^7.2.0",
1717
"@kkt/scope-plugin-options": "^7.2.0",
1818
"@types/katex": "^0.16.0",
19-
"@types/react": "~18.0.9",
20-
"@types/react-dom": "~18.0.3",
19+
"@types/react": "^18.2.0",
20+
"@types/react-dom": "^18.2.0",
2121
"@types/styled-components": "^5.1.25",
2222
"kkt": "^7.2.0",
2323
"source-map-explorer": "~2.5.2"
@@ -61,6 +61,7 @@
6161
"@uiw/codemirror-theme-kimbie": "4.21.10",
6262
"@uiw/codemirror-theme-material": "4.21.10",
6363
"@uiw/codemirror-theme-monokai": "4.21.10",
64+
"@uiw/codemirror-theme-monokai-dimmed": "4.21.10",
6465
"@uiw/codemirror-theme-noctis-lilac": "4.21.10",
6566
"@uiw/codemirror-theme-nord": "4.21.10",
6667
"@uiw/codemirror-theme-okaidia": "4.21.10",

‎www/src/pages/theme/themes/Datas.ts

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { eclipse } from '@uiw/codemirror-theme-eclipse';
1111
import { bespin } from '@uiw/codemirror-theme-bespin';
1212
import { materialLight, materialDark } from '@uiw/codemirror-theme-material';
1313
import { monokai } from '@uiw/codemirror-theme-monokai';
14+
import { monokaiDimmed } from '@uiw/codemirror-theme-monokai-dimmed';
1415
import { noctisLilac } from '@uiw/codemirror-theme-noctis-lilac';
1516
import { vscodeDark } from '@uiw/codemirror-theme-vscode';
1617
import { duotoneLight, duotoneDark } from '@uiw/codemirror-theme-duotone';
@@ -51,6 +52,7 @@ export const themeData = {
5152
materialLight,
5253
materialDark,
5354
monokai,
55+
monokaiDimmed,
5456
noctisLilac,
5557
nord,
5658
okaidia,

‎www/src/router.tsx

+10
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,16 @@ export const routes: MenuRouteObject[] = [
419419
/>
420420
),
421421
},
422+
{
423+
path: 'data/monokai-dimmed',
424+
label: 'Monokai Dimmed',
425+
element: (
426+
<Preview
427+
themePkg="@uiw/codemirror-theme-monokai-dimmed"
428+
path={() => import('@uiw/codemirror-theme-monokai-dimmed/README.md')}
429+
/>
430+
),
431+
},
422432
{
423433
path: 'data/kimbie',
424434
element: <Navigate to="dark" replace />,

0 commit comments

Comments
 (0)
Please sign in to comment.