@uiw/codemirror-theme-tokyo-night
Advanced tools
Comparing version 4.22.2 to 4.23.0
@@ -1,4 +0,5 @@ | ||
import { CreateThemeOptions } from '@uiw/codemirror-themes'; | ||
import { type CreateThemeOptions } from '@uiw/codemirror-themes'; | ||
export declare const defaultSettingsTokyoNight: CreateThemeOptions['settings']; | ||
export declare const tokyoNightStyle: CreateThemeOptions['styles']; | ||
export declare const tokyoNightInit: (options?: Partial<CreateThemeOptions>) => import("@codemirror/state").Extension; | ||
export declare const tokyoNight: import("@codemirror/state").Extension; |
127
cjs/index.js
@@ -7,3 +7,3 @@ "use strict"; | ||
}); | ||
exports.tokyoNightInit = exports.tokyoNight = exports.defaultSettingsTokyoNight = void 0; | ||
exports.tokyoNightStyle = exports.tokyoNightInit = exports.tokyoNight = exports.defaultSettingsTokyoNight = void 0; | ||
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray")); | ||
@@ -24,2 +24,64 @@ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2")); | ||
}; | ||
var tokyoNightStyle = exports.tokyoNightStyle = [{ | ||
tag: _highlight.tags.keyword, | ||
color: '#bb9af7' | ||
}, { | ||
tag: [_highlight.tags.name, _highlight.tags.deleted, _highlight.tags.character, _highlight.tags.macroName], | ||
color: '#c0caf5' | ||
}, { | ||
tag: [_highlight.tags.propertyName], | ||
color: '#7aa2f7' | ||
}, { | ||
tag: [_highlight.tags.processingInstruction, _highlight.tags.string, _highlight.tags.inserted, _highlight.tags.special(_highlight.tags.string)], | ||
color: '#9ece6a' | ||
}, { | ||
tag: [_highlight.tags["function"](_highlight.tags.variableName), _highlight.tags.labelName], | ||
color: '#7aa2f7' | ||
}, { | ||
tag: [_highlight.tags.color, _highlight.tags.constant(_highlight.tags.name), _highlight.tags.standard(_highlight.tags.name)], | ||
color: '#bb9af7' | ||
}, { | ||
tag: [_highlight.tags.definition(_highlight.tags.name), _highlight.tags.separator], | ||
color: '#c0caf5' | ||
}, { | ||
tag: [_highlight.tags.className], | ||
color: '#c0caf5' | ||
}, { | ||
tag: [_highlight.tags.number, _highlight.tags.changed, _highlight.tags.annotation, _highlight.tags.modifier, _highlight.tags.self, _highlight.tags.namespace], | ||
color: '#ff9e64' | ||
}, { | ||
tag: [_highlight.tags.typeName], | ||
color: '#0db9d7' | ||
}, { | ||
tag: [_highlight.tags.operator, _highlight.tags.operatorKeyword], | ||
color: '#bb9af7' | ||
}, { | ||
tag: [_highlight.tags.url, _highlight.tags.escape, _highlight.tags.regexp, _highlight.tags.link], | ||
color: '#b4f9f8' | ||
}, { | ||
tag: [_highlight.tags.meta, _highlight.tags.comment], | ||
color: '#444b6a' | ||
}, { | ||
tag: _highlight.tags.strong, | ||
fontWeight: 'bold' | ||
}, { | ||
tag: _highlight.tags.emphasis, | ||
fontStyle: 'italic' | ||
}, { | ||
tag: _highlight.tags.link, | ||
textDecoration: 'underline' | ||
}, { | ||
tag: _highlight.tags.heading, | ||
fontWeight: 'bold', | ||
color: '#89ddff' | ||
}, { | ||
tag: [_highlight.tags.atom, _highlight.tags.bool, _highlight.tags.special(_highlight.tags.variableName)], | ||
color: '#c0caf5' | ||
}, { | ||
tag: _highlight.tags.invalid, | ||
color: '#ff5370' | ||
}, { | ||
tag: _highlight.tags.strikethrough, | ||
textDecoration: 'line-through' | ||
}]; | ||
var tokyoNightInit = exports.tokyoNightInit = function tokyoNightInit(options) { | ||
@@ -36,66 +98,5 @@ var _ref = options || {}, | ||
settings: (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, defaultSettingsTokyoNight), settings), | ||
styles: [{ | ||
tag: _highlight.tags.keyword, | ||
color: '#bb9af7' | ||
}, { | ||
tag: [_highlight.tags.name, _highlight.tags.deleted, _highlight.tags.character, _highlight.tags.macroName], | ||
color: '#c0caf5' | ||
}, { | ||
tag: [_highlight.tags.propertyName], | ||
color: '#7aa2f7' | ||
}, { | ||
tag: [_highlight.tags.processingInstruction, _highlight.tags.string, _highlight.tags.inserted, _highlight.tags.special(_highlight.tags.string)], | ||
color: '#9ece6a' | ||
}, { | ||
tag: [_highlight.tags["function"](_highlight.tags.variableName), _highlight.tags.labelName], | ||
color: '#7aa2f7' | ||
}, { | ||
tag: [_highlight.tags.color, _highlight.tags.constant(_highlight.tags.name), _highlight.tags.standard(_highlight.tags.name)], | ||
color: '#bb9af7' | ||
}, { | ||
tag: [_highlight.tags.definition(_highlight.tags.name), _highlight.tags.separator], | ||
color: '#c0caf5' | ||
}, { | ||
tag: [_highlight.tags.className], | ||
color: '#c0caf5' | ||
}, { | ||
tag: [_highlight.tags.number, _highlight.tags.changed, _highlight.tags.annotation, _highlight.tags.modifier, _highlight.tags.self, _highlight.tags.namespace], | ||
color: '#ff9e64' | ||
}, { | ||
tag: [_highlight.tags.typeName], | ||
color: '#0db9d7' | ||
}, { | ||
tag: [_highlight.tags.operator, _highlight.tags.operatorKeyword], | ||
color: '#bb9af7' | ||
}, { | ||
tag: [_highlight.tags.url, _highlight.tags.escape, _highlight.tags.regexp, _highlight.tags.link], | ||
color: '#b4f9f8' | ||
}, { | ||
tag: [_highlight.tags.meta, _highlight.tags.comment], | ||
color: '#444b6a' | ||
}, { | ||
tag: _highlight.tags.strong, | ||
fontWeight: 'bold' | ||
}, { | ||
tag: _highlight.tags.emphasis, | ||
fontStyle: 'italic' | ||
}, { | ||
tag: _highlight.tags.link, | ||
textDecoration: 'underline' | ||
}, { | ||
tag: _highlight.tags.heading, | ||
fontWeight: 'bold', | ||
color: '#89ddff' | ||
}, { | ||
tag: [_highlight.tags.atom, _highlight.tags.bool, _highlight.tags.special(_highlight.tags.variableName)], | ||
color: '#c0caf5' | ||
}, { | ||
tag: _highlight.tags.invalid, | ||
color: '#ff5370' | ||
}, { | ||
tag: _highlight.tags.strikethrough, | ||
textDecoration: 'line-through' | ||
}].concat((0, _toConsumableArray2["default"])(styles)) | ||
styles: [].concat(tokyoNightStyle, (0, _toConsumableArray2["default"])(styles)) | ||
}); | ||
}; | ||
var tokyoNight = exports.tokyoNight = tokyoNightInit(); |
@@ -1,4 +0,5 @@ | ||
import { CreateThemeOptions } from '@uiw/codemirror-themes'; | ||
import { type CreateThemeOptions } from '@uiw/codemirror-themes'; | ||
export declare const defaultSettingsTokyoNight: CreateThemeOptions['settings']; | ||
export declare const tokyoNightStyle: CreateThemeOptions['styles']; | ||
export declare const tokyoNightInit: (options?: Partial<CreateThemeOptions>) => import("@codemirror/state").Extension; | ||
export declare const tokyoNight: import("@codemirror/state").Extension; |
125
esm/index.js
@@ -15,2 +15,64 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
}; | ||
export var tokyoNightStyle = [{ | ||
tag: t.keyword, | ||
color: '#bb9af7' | ||
}, { | ||
tag: [t.name, t.deleted, t.character, t.macroName], | ||
color: '#c0caf5' | ||
}, { | ||
tag: [t.propertyName], | ||
color: '#7aa2f7' | ||
}, { | ||
tag: [t.processingInstruction, t.string, t.inserted, t.special(t.string)], | ||
color: '#9ece6a' | ||
}, { | ||
tag: [t.function(t.variableName), t.labelName], | ||
color: '#7aa2f7' | ||
}, { | ||
tag: [t.color, t.constant(t.name), t.standard(t.name)], | ||
color: '#bb9af7' | ||
}, { | ||
tag: [t.definition(t.name), t.separator], | ||
color: '#c0caf5' | ||
}, { | ||
tag: [t.className], | ||
color: '#c0caf5' | ||
}, { | ||
tag: [t.number, t.changed, t.annotation, t.modifier, t.self, t.namespace], | ||
color: '#ff9e64' | ||
}, { | ||
tag: [t.typeName], | ||
color: '#0db9d7' | ||
}, { | ||
tag: [t.operator, t.operatorKeyword], | ||
color: '#bb9af7' | ||
}, { | ||
tag: [t.url, t.escape, t.regexp, t.link], | ||
color: '#b4f9f8' | ||
}, { | ||
tag: [t.meta, t.comment], | ||
color: '#444b6a' | ||
}, { | ||
tag: t.strong, | ||
fontWeight: 'bold' | ||
}, { | ||
tag: t.emphasis, | ||
fontStyle: 'italic' | ||
}, { | ||
tag: t.link, | ||
textDecoration: 'underline' | ||
}, { | ||
tag: t.heading, | ||
fontWeight: 'bold', | ||
color: '#89ddff' | ||
}, { | ||
tag: [t.atom, t.bool, t.special(t.variableName)], | ||
color: '#c0caf5' | ||
}, { | ||
tag: t.invalid, | ||
color: '#ff5370' | ||
}, { | ||
tag: t.strikethrough, | ||
textDecoration: 'line-through' | ||
}]; | ||
export var tokyoNightInit = options => { | ||
@@ -25,66 +87,5 @@ var { | ||
settings: _extends({}, defaultSettingsTokyoNight, settings), | ||
styles: [{ | ||
tag: t.keyword, | ||
color: '#bb9af7' | ||
}, { | ||
tag: [t.name, t.deleted, t.character, t.macroName], | ||
color: '#c0caf5' | ||
}, { | ||
tag: [t.propertyName], | ||
color: '#7aa2f7' | ||
}, { | ||
tag: [t.processingInstruction, t.string, t.inserted, t.special(t.string)], | ||
color: '#9ece6a' | ||
}, { | ||
tag: [t.function(t.variableName), t.labelName], | ||
color: '#7aa2f7' | ||
}, { | ||
tag: [t.color, t.constant(t.name), t.standard(t.name)], | ||
color: '#bb9af7' | ||
}, { | ||
tag: [t.definition(t.name), t.separator], | ||
color: '#c0caf5' | ||
}, { | ||
tag: [t.className], | ||
color: '#c0caf5' | ||
}, { | ||
tag: [t.number, t.changed, t.annotation, t.modifier, t.self, t.namespace], | ||
color: '#ff9e64' | ||
}, { | ||
tag: [t.typeName], | ||
color: '#0db9d7' | ||
}, { | ||
tag: [t.operator, t.operatorKeyword], | ||
color: '#bb9af7' | ||
}, { | ||
tag: [t.url, t.escape, t.regexp, t.link], | ||
color: '#b4f9f8' | ||
}, { | ||
tag: [t.meta, t.comment], | ||
color: '#444b6a' | ||
}, { | ||
tag: t.strong, | ||
fontWeight: 'bold' | ||
}, { | ||
tag: t.emphasis, | ||
fontStyle: 'italic' | ||
}, { | ||
tag: t.link, | ||
textDecoration: 'underline' | ||
}, { | ||
tag: t.heading, | ||
fontWeight: 'bold', | ||
color: '#89ddff' | ||
}, { | ||
tag: [t.atom, t.bool, t.special(t.variableName)], | ||
color: '#c0caf5' | ||
}, { | ||
tag: t.invalid, | ||
color: '#ff5370' | ||
}, { | ||
tag: t.strikethrough, | ||
textDecoration: 'line-through' | ||
}, ...styles] | ||
styles: [...tokyoNightStyle, ...styles] | ||
}); | ||
}; | ||
export var tokyoNight = tokyoNightInit(); |
{ | ||
"name": "@uiw/codemirror-theme-tokyo-night", | ||
"version": "4.22.2", | ||
"version": "4.23.0", | ||
"description": "Theme tokyo-night for CodeMirror.", | ||
@@ -25,3 +25,3 @@ "homepage": "https://uiwjs.github.io/react-codemirror/#/theme/data/tokyo-night", | ||
"dependencies": { | ||
"@uiw/codemirror-themes": "4.22.2" | ||
"@uiw/codemirror-themes": "4.23.0" | ||
}, | ||
@@ -28,0 +28,0 @@ "keywords": [ |
import { tags as t } from '@lezer/highlight'; | ||
import { createTheme, CreateThemeOptions } from '@uiw/codemirror-themes'; | ||
import { createTheme, type CreateThemeOptions } from '@uiw/codemirror-themes'; | ||
@@ -16,2 +16,25 @@ export const defaultSettingsTokyoNight: CreateThemeOptions['settings'] = { | ||
export const tokyoNightStyle: CreateThemeOptions['styles'] = [ | ||
{ tag: t.keyword, color: '#bb9af7' }, | ||
{ tag: [t.name, t.deleted, t.character, t.macroName], color: '#c0caf5' }, | ||
{ tag: [t.propertyName], color: '#7aa2f7' }, | ||
{ tag: [t.processingInstruction, t.string, t.inserted, t.special(t.string)], color: '#9ece6a' }, | ||
{ tag: [t.function(t.variableName), t.labelName], color: '#7aa2f7' }, | ||
{ tag: [t.color, t.constant(t.name), t.standard(t.name)], color: '#bb9af7' }, | ||
{ tag: [t.definition(t.name), t.separator], color: '#c0caf5' }, | ||
{ tag: [t.className], color: '#c0caf5' }, | ||
{ tag: [t.number, t.changed, t.annotation, t.modifier, t.self, t.namespace], color: '#ff9e64' }, | ||
{ tag: [t.typeName], color: '#0db9d7' }, | ||
{ tag: [t.operator, t.operatorKeyword], color: '#bb9af7' }, | ||
{ tag: [t.url, t.escape, t.regexp, t.link], color: '#b4f9f8' }, | ||
{ tag: [t.meta, t.comment], color: '#444b6a' }, | ||
{ tag: t.strong, fontWeight: 'bold' }, | ||
{ tag: t.emphasis, fontStyle: 'italic' }, | ||
{ tag: t.link, textDecoration: 'underline' }, | ||
{ tag: t.heading, fontWeight: 'bold', color: '#89ddff' }, | ||
{ tag: [t.atom, t.bool, t.special(t.variableName)], color: '#c0caf5' }, | ||
{ tag: t.invalid, color: '#ff5370' }, | ||
{ tag: t.strikethrough, textDecoration: 'line-through' }, | ||
]; | ||
export const tokyoNightInit = (options?: Partial<CreateThemeOptions>) => { | ||
@@ -25,25 +48,3 @@ const { theme = 'dark', settings = {}, styles = [] } = options || {}; | ||
}, | ||
styles: [ | ||
{ tag: t.keyword, color: '#bb9af7' }, | ||
{ tag: [t.name, t.deleted, t.character, t.macroName], color: '#c0caf5' }, | ||
{ tag: [t.propertyName], color: '#7aa2f7' }, | ||
{ tag: [t.processingInstruction, t.string, t.inserted, t.special(t.string)], color: '#9ece6a' }, | ||
{ tag: [t.function(t.variableName), t.labelName], color: '#7aa2f7' }, | ||
{ tag: [t.color, t.constant(t.name), t.standard(t.name)], color: '#bb9af7' }, | ||
{ tag: [t.definition(t.name), t.separator], color: '#c0caf5' }, | ||
{ tag: [t.className], color: '#c0caf5' }, | ||
{ tag: [t.number, t.changed, t.annotation, t.modifier, t.self, t.namespace], color: '#ff9e64' }, | ||
{ tag: [t.typeName], color: '#0db9d7' }, | ||
{ tag: [t.operator, t.operatorKeyword], color: '#bb9af7' }, | ||
{ tag: [t.url, t.escape, t.regexp, t.link], color: '#b4f9f8' }, | ||
{ tag: [t.meta, t.comment], color: '#444b6a' }, | ||
{ tag: t.strong, fontWeight: 'bold' }, | ||
{ tag: t.emphasis, fontStyle: 'italic' }, | ||
{ tag: t.link, textDecoration: 'underline' }, | ||
{ tag: t.heading, fontWeight: 'bold', color: '#89ddff' }, | ||
{ tag: [t.atom, t.bool, t.special(t.variableName)], color: '#c0caf5' }, | ||
{ tag: t.invalid, color: '#ff5370' }, | ||
{ tag: t.strikethrough, textDecoration: 'line-through' }, | ||
...styles, | ||
], | ||
styles: [...tokyoNightStyle, ...styles], | ||
}); | ||
@@ -50,0 +51,0 @@ }; |
242
12504
+ Added@uiw/codemirror-themes@4.23.0(transitive)
- Removed@uiw/codemirror-themes@4.22.2(transitive)