@uiw/codemirror-theme-xcode
Version:
Theme xcode for CodeMirror.
104 lines • 2.21 kB
JavaScript
import _extends from "@babel/runtime/helpers/extends";
/**
* @name Xcode
*/
import { tags as t } from '@lezer/highlight';
import { createTheme } from '@uiw/codemirror-themes';
export var defaultSettingsXcodeLight = {
background: '#fff',
foreground: '#3D3D3D',
selection: '#BBDFFF',
selectionMatch: '#BBDFFF',
gutterBackground: '#fff',
gutterForeground: '#AFAFAF',
lineHighlight: '#d5e6ff69'
};
export var xcodeLightStyle = [{
tag: [t.comment, t.quote],
color: '#707F8D'
}, {
tag: [t.typeName, t.typeOperator],
color: '#aa0d91'
}, {
tag: [t.keyword],
color: '#aa0d91',
fontWeight: 'bold'
}, {
tag: [t.string, t.meta],
color: '#D23423'
}, {
tag: [t.name],
color: '#032f62'
}, {
tag: [t.typeName],
color: '#522BB2'
}, {
tag: [t.variableName],
color: '#23575C'
}, {
tag: [t.definition(t.variableName)],
color: '#327A9E'
}, {
tag: [t.regexp, t.link],
color: '#0e0eff'
}];
export function xcodeLightInit(options) {
var {
theme = 'light',
settings = {},
styles = []
} = options || {};
return createTheme({
theme: theme,
settings: _extends({}, defaultSettingsXcodeLight, settings),
styles: [...xcodeLightStyle, ...styles]
});
}
export var xcodeLight = xcodeLightInit();
export var defaultSettingsXcodeDark = {
background: '#292A30',
foreground: '#CECFD0',
caret: '#fff',
selection: '#727377',
selectionMatch: '#727377',
lineHighlight: '#ffffff0f'
};
export var xcodeDarkStyle = [{
tag: [t.comment, t.quote],
color: '#7F8C98'
}, {
tag: [t.keyword],
color: '#FF7AB2',
fontWeight: 'bold'
}, {
tag: [t.string, t.meta],
color: '#FF8170'
}, {
tag: [t.typeName],
color: '#DABAFF'
}, {
tag: [t.definition(t.variableName)],
color: '#6BDFFF'
}, {
tag: [t.name],
color: '#6BAA9F'
}, {
tag: [t.variableName],
color: '#ACF2E4'
}, {
tag: [t.regexp, t.link],
color: '#FF8170'
}];
export var xcodeDarkInit = options => {
var {
theme = 'dark',
settings = {},
styles = []
} = options || {};
return createTheme({
theme: theme,
settings: _extends({}, defaultSettingsXcodeDark, settings),
styles: [...xcodeDarkStyle, ...styles]
});
};
export var xcodeDark = xcodeDarkInit();