Skip to content

Commit 3e7707d

Browse files
committed
feat: export theme default settings. (#457)
1 parent 1b94f57 commit 3e7707d

File tree

25 files changed

+360
-240
lines changed

25 files changed

+360
-240
lines changed

themes/abcdef/src/index.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,23 @@
66
import { tags as t } from '@lezer/highlight';
77
import { createTheme, CreateThemeOptions } from '@uiw/codemirror-themes';
88

9+
export const defaultSettingsAbcdef: CreateThemeOptions['settings'] = {
10+
background: '#0f0f0f',
11+
foreground: '#defdef',
12+
caret: '#00FF00',
13+
selection: '#515151',
14+
selectionMatch: '#515151',
15+
gutterBackground: '#555',
16+
gutterForeground: '#FFFFFF',
17+
lineHighlight: '#314151',
18+
};
19+
920
export const abcdefInit = (options?: Partial<CreateThemeOptions>) => {
1021
const { theme = 'dark', settings = {}, styles = [] } = options || {};
1122
return createTheme({
1223
theme: theme,
1324
settings: {
14-
background: '#0f0f0f',
15-
foreground: '#defdef',
16-
caret: '#00FF00',
17-
selection: '#515151',
18-
selectionMatch: '#515151',
19-
gutterBackground: '#555',
20-
gutterForeground: '#FFFFFF',
21-
lineHighlight: '#314151',
25+
...defaultSettingsAbcdef,
2226
...settings,
2327
},
2428
styles: [

themes/androidstudio/src/index.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,21 @@
44
import { tags as t } from '@lezer/highlight';
55
import { createTheme, CreateThemeOptions } from '@uiw/codemirror-themes';
66

7+
export const defaultSettingsAndroidstudio: CreateThemeOptions['settings'] = {
8+
background: '#282b2e',
9+
foreground: '#a9b7c6',
10+
caret: '#00FF00',
11+
selection: '#343739',
12+
selectionMatch: '#343739',
13+
lineHighlight: '#343739',
14+
};
15+
716
export const androidstudioInit = (options?: Partial<CreateThemeOptions>) => {
817
const { theme = 'dark', settings = {}, styles = [] } = options || {};
918
return createTheme({
1019
theme: theme,
1120
settings: {
12-
background: '#282b2e',
13-
foreground: '#a9b7c6',
14-
caret: '#00FF00',
15-
selection: '#343739',
16-
selectionMatch: '#343739',
17-
lineHighlight: '#343739',
21+
...defaultSettingsAndroidstudio,
1822
...settings,
1923
},
2024
styles: [

themes/atomone/src/index.ts

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,24 @@
77
import { tags as t } from '@lezer/highlight';
88
import { createTheme, CreateThemeOptions } from '@uiw/codemirror-themes';
99

10+
export const defaultSettingsAtomone: CreateThemeOptions['settings'] = {
11+
background: '#272C35',
12+
foreground: '#9d9b97',
13+
caret: '#797977',
14+
selection: '#ffffff30',
15+
selectionMatch: '#2B323D',
16+
gutterBackground: '#272C35',
17+
gutterForeground: '#465063',
18+
gutterBorder: 'transparent',
19+
lineHighlight: '#2B323D',
20+
};
21+
1022
export const atomoneInit = (options?: Partial<CreateThemeOptions>) => {
1123
const { theme = 'light', settings = {}, styles = [] } = options || {};
1224
return createTheme({
1325
theme: theme,
1426
settings: {
15-
background: '#272C35',
16-
foreground: '#9d9b97',
17-
caret: '#797977',
18-
selection: '#ffffff30',
19-
selectionMatch: '#2B323D',
20-
gutterBackground: '#272C35',
21-
gutterForeground: '#465063',
22-
gutterBorder: 'transparent',
23-
lineHighlight: '#2B323D',
27+
...defaultSettingsAtomone,
2428
...settings,
2529
},
2630
styles: [

themes/aura/src/index.ts

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
import { tags as t } from '@lezer/highlight';
22
import { createTheme, CreateThemeOptions } from '@uiw/codemirror-themes';
33

4+
export const defaultSettingsAura: CreateThemeOptions['settings'] = {
5+
background: '#21202e',
6+
foreground: '#edecee',
7+
caret: '#a277ff',
8+
selection: '#3d375e7f',
9+
selectionMatch: '#3d375e7f',
10+
gutterBackground: '#21202e',
11+
gutterForeground: '#edecee',
12+
gutterBorder: 'transparent',
13+
lineHighlight: '#a394f033',
14+
};
15+
416
export const auraInit = (options?: Partial<CreateThemeOptions>) => {
517
const { theme = 'dark', settings = {}, styles = [] } = options || {};
618
return createTheme({
719
theme: theme,
820
settings: {
9-
background: '#21202e',
10-
foreground: '#edecee',
11-
caret: '#a277ff',
12-
selection: '#3d375e7f',
13-
selectionMatch: '#3d375e7f',
14-
gutterBackground: '#21202e',
15-
gutterForeground: '#edecee',
16-
gutterBorder: 'transparent',
17-
lineHighlight: '#a394f033',
21+
...defaultSettingsAura,
1822
...settings,
1923
},
2024
styles: [

themes/bbedit/src/index.ts

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
import { tags as t } from '@lezer/highlight';
22
import { createTheme, CreateThemeOptions } from '@uiw/codemirror-themes';
33

4+
export const defaultSettingsBbedit: CreateThemeOptions['settings'] = {
5+
background: '#FFFFFF',
6+
foreground: '#000000',
7+
caret: '#FBAC52',
8+
selection: '#FFD420',
9+
selectionMatch: '#FFD420',
10+
gutterBackground: '#f5f5f5',
11+
gutterForeground: '#4D4D4C',
12+
gutterBorder: 'transparent',
13+
lineHighlight: '#00000012',
14+
};
15+
416
export const bbeditInit = (options?: Partial<CreateThemeOptions>) => {
517
const { theme = 'light', settings = {}, styles = [] } = options || {};
618
return createTheme({
719
theme: theme,
820
settings: {
9-
background: '#FFFFFF',
10-
foreground: '#000000',
11-
caret: '#FBAC52',
12-
selection: '#FFD420',
13-
selectionMatch: '#FFD420',
14-
gutterBackground: '#f5f5f5',
15-
gutterForeground: '#4D4D4C',
16-
gutterBorder: 'transparent',
17-
lineHighlight: '#00000012',
21+
...defaultSettingsBbedit,
1822
...settings,
1923
},
2024
styles: [

themes/bespin/src/index.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,23 @@
88
import { tags as t } from '@lezer/highlight';
99
import { createTheme, CreateThemeOptions } from '@uiw/codemirror-themes';
1010

11+
export const defaultSettingsBespin: CreateThemeOptions['settings'] = {
12+
background: '#28211c',
13+
foreground: '#9d9b97',
14+
caret: '#797977',
15+
selection: '#36312e',
16+
selectionMatch: '#4f382b',
17+
gutterBackground: '#28211c',
18+
gutterForeground: '#666666',
19+
lineHighlight: 'rgba(255, 255, 255, 0.1)',
20+
};
21+
1122
export const bespinInit = (options?: Partial<CreateThemeOptions>) => {
1223
const { theme = 'dark', settings = {}, styles = [] } = options || {};
1324
return createTheme({
1425
theme: theme,
1526
settings: {
16-
background: '#28211c',
17-
foreground: '#9d9b97',
18-
caret: '#797977',
19-
selection: '#36312e',
20-
selectionMatch: '#4f382b',
21-
gutterBackground: '#28211c',
22-
gutterForeground: '#666666',
23-
lineHighlight: 'rgba(255, 255, 255, 0.1)',
27+
...defaultSettingsBespin,
2428
...settings,
2529
},
2630
styles: [

themes/darcula/src/index.ts

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,24 @@
77
import { tags as t } from '@lezer/highlight';
88
import { createTheme, CreateThemeOptions } from '@uiw/codemirror-themes';
99

10+
export const defaultSettingsDarcula: CreateThemeOptions['settings'] = {
11+
background: '#2B2B2B',
12+
foreground: '#f8f8f2',
13+
caret: '#FFFFFF',
14+
selection: 'rgba(255, 255, 255, 0.1)',
15+
selectionMatch: 'rgba(255, 255, 255, 0.2)',
16+
gutterBackground: 'rgba(255, 255, 255, 0.1)',
17+
gutterForeground: '#999',
18+
gutterBorder: 'transparent',
19+
lineHighlight: 'rgba(255, 255, 255, 0.1)',
20+
};
21+
1022
export const darculaInit = (options?: Partial<CreateThemeOptions>) => {
1123
const { theme = 'light', settings = {}, styles = [] } = options || {};
1224
return createTheme({
1325
theme: theme,
1426
settings: {
15-
background: '#2B2B2B',
16-
foreground: '#f8f8f2',
17-
caret: '#FFFFFF',
18-
selection: 'rgba(255, 255, 255, 0.1)',
19-
selectionMatch: 'rgba(255, 255, 255, 0.2)',
20-
gutterBackground: 'rgba(255, 255, 255, 0.1)',
21-
gutterForeground: '#999',
22-
gutterBorder: 'transparent',
23-
lineHighlight: 'rgba(255, 255, 255, 0.1)',
27+
...defaultSettingsDarcula,
2428
...settings,
2529
},
2630
styles: [

themes/dracula/src/index.ts

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,24 @@
77
import { tags as t } from '@lezer/highlight';
88
import { createTheme, CreateThemeOptions } from '@uiw/codemirror-themes';
99

10+
export const defaultSettingsDracula: CreateThemeOptions['settings'] = {
11+
background: '#282a36',
12+
foreground: '#f8f8f2',
13+
caret: '#f8f8f0',
14+
selection: 'rgba(255, 255, 255, 0.1)',
15+
selectionMatch: 'rgba(255, 255, 255, 0.2)',
16+
gutterBackground: '#282a36',
17+
gutterForeground: '#6D8A88',
18+
gutterBorder: 'transparent',
19+
lineHighlight: 'rgba(255, 255, 255, 0.1)',
20+
};
21+
1022
export const draculaInit = (options?: Partial<CreateThemeOptions>) => {
1123
const { theme = 'light', settings = {}, styles = [] } = options || {};
1224
return createTheme({
1325
theme: theme,
1426
settings: {
15-
background: '#282a36',
16-
foreground: '#f8f8f2',
17-
caret: '#f8f8f0',
18-
selection: 'rgba(255, 255, 255, 0.1)',
19-
selectionMatch: 'rgba(255, 255, 255, 0.2)',
20-
gutterBackground: '#282a36',
21-
gutterForeground: '#6D8A88',
22-
gutterBorder: 'transparent',
23-
lineHighlight: 'rgba(255, 255, 255, 0.1)',
27+
...defaultSettingsDracula,
2428
...settings,
2529
},
2630
styles: [

themes/duotone/src/index.ts

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,24 @@
66
import { tags as t } from '@lezer/highlight';
77
import { createTheme, CreateThemeOptions } from '@uiw/codemirror-themes';
88

9+
export const defaultSettingsDuotoneLight: CreateThemeOptions['settings'] = {
10+
background: '#faf8f5',
11+
foreground: '#b29762',
12+
caret: '#93abdc',
13+
selection: '#e3dcce',
14+
selectionMatch: '#e3dcce',
15+
gutterBackground: '#faf8f5',
16+
gutterForeground: '#cdc4b1',
17+
gutterBorder: 'transparent',
18+
lineHighlight: '#EFEFEF',
19+
};
20+
921
export const duotoneLightInit = (options?: Partial<CreateThemeOptions>) => {
1022
const { theme = 'light', settings = {}, styles = [] } = options || {};
1123
return createTheme({
1224
theme: theme,
1325
settings: {
14-
background: '#faf8f5',
15-
foreground: '#b29762',
16-
caret: '#93abdc',
17-
selection: '#e3dcce',
18-
selectionMatch: '#e3dcce',
19-
gutterBackground: '#faf8f5',
20-
gutterForeground: '#cdc4b1',
21-
gutterBorder: 'transparent',
22-
lineHighlight: '#EFEFEF',
26+
...defaultSettingsDuotoneLight,
2327
...settings,
2428
},
2529
styles: [
@@ -37,18 +41,22 @@ export const duotoneLightInit = (options?: Partial<CreateThemeOptions>) => {
3741

3842
export const duotoneLight = duotoneLightInit();
3943

44+
export const defaultSettingsDuotoneDark: CreateThemeOptions['settings'] = {
45+
background: '#2a2734',
46+
foreground: '#6c6783',
47+
caret: '#ffad5c',
48+
selection: 'rgba(255, 255, 255, 0.1)',
49+
gutterBackground: '#2a2734',
50+
gutterForeground: '#545167',
51+
lineHighlight: '#36334280',
52+
};
53+
4054
export const duotoneDarkInit = (options?: Partial<CreateThemeOptions>) => {
4155
const { theme = 'light', settings = {}, styles = [] } = options || {};
4256
return createTheme({
4357
theme: theme,
4458
settings: {
45-
background: '#2a2734',
46-
foreground: '#6c6783',
47-
caret: '#ffad5c',
48-
selection: 'rgba(255, 255, 255, 0.1)',
49-
gutterBackground: '#2a2734',
50-
gutterForeground: '#545167',
51-
lineHighlight: '#36334280',
59+
...defaultSettingsDuotoneDark,
5260
...settings,
5361
},
5462
styles: [

themes/eclipse/src/index.ts

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
import { tags as t } from '@lezer/highlight';
22
import { createTheme, CreateThemeOptions } from '@uiw/codemirror-themes';
33

4+
export const defaultSettingsEclipse: CreateThemeOptions['settings'] = {
5+
background: '#fff',
6+
foreground: '#000',
7+
caret: '#FFFFFF',
8+
selection: '#d7d4f0',
9+
selectionMatch: '#d7d4f0',
10+
gutterBackground: '#f7f7f7',
11+
gutterForeground: '#999',
12+
lineHighlight: '#e8f2ff',
13+
gutterBorder: 'transparent',
14+
};
15+
416
export const eclipseInit = (options?: Partial<CreateThemeOptions>) => {
517
const { theme = 'light', settings = {}, styles = [] } = options || {};
618
return createTheme({
719
theme: theme,
820
settings: {
9-
background: '#fff',
10-
foreground: '#000',
11-
caret: '#FFFFFF',
12-
selection: '#d7d4f0',
13-
selectionMatch: '#d7d4f0',
14-
gutterBackground: '#f7f7f7',
15-
gutterForeground: '#999',
16-
lineHighlight: '#e8f2ff',
17-
gutterBorder: 'transparent',
21+
...defaultSettingsEclipse,
1822
...settings,
1923
},
2024
styles: [

0 commit comments

Comments
 (0)