@uiw/codemirror-theme-xcode
Version:
Theme xcode for CodeMirror.
108 lines • 2.65 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 _ref = options || {},
_ref$theme = _ref.theme,
theme = _ref$theme === void 0 ? 'light' : _ref$theme,
_ref$settings = _ref.settings,
settings = _ref$settings === void 0 ? {} : _ref$settings,
_ref$styles = _ref.styles,
styles = _ref$styles === void 0 ? [] : _ref$styles;
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 _ref2 = options || {},
_ref2$theme = _ref2.theme,
theme = _ref2$theme === void 0 ? 'dark' : _ref2$theme,
_ref2$settings = _ref2.settings,
settings = _ref2$settings === void 0 ? {} : _ref2$settings,
_ref2$styles = _ref2.styles,
styles = _ref2$styles === void 0 ? [] : _ref2$styles;
return createTheme({
theme: theme,
settings: _extends({}, defaultSettingsXcodeDark, settings),
styles: [...xcodeDarkStyle, ...styles]
});
};
export var xcodeDark = xcodeDarkInit();