@uiw/codemirror-theme-sublime 4.22.2 → 4.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cjs/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { CreateThemeOptions } from '@uiw/codemirror-themes';
1
+ import { type CreateThemeOptions } from '@uiw/codemirror-themes';
2
2
  export declare const defaultSettingsSublime: CreateThemeOptions['settings'];
3
+ export declare const sublimeDarkStyle: CreateThemeOptions['styles'];
3
4
  export declare function sublimeInit(options?: Partial<CreateThemeOptions>): import("@codemirror/state").Extension;
4
5
  export declare const sublime: import("@codemirror/state").Extension;
package/cjs/index.js CHANGED
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.sublime = exports.defaultSettingsSublime = void 0;
7
+ exports.sublimeDarkStyle = exports.sublime = exports.defaultSettingsSublime = void 0;
8
8
  exports.sublimeInit = sublimeInit;
9
9
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
10
10
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
@@ -20,6 +20,42 @@ var defaultSettingsSublime = exports.defaultSettingsSublime = {
20
20
  gutterForeground: '#FFFFFF70',
21
21
  lineHighlight: '#00000059'
22
22
  };
23
+ var sublimeDarkStyle = exports.sublimeDarkStyle = [{
24
+ tag: [_highlight.tags.meta, _highlight.tags.comment],
25
+ color: '#A2A9B5'
26
+ }, {
27
+ tag: [_highlight.tags.attributeName, _highlight.tags.keyword],
28
+ color: '#B78FBA'
29
+ }, {
30
+ tag: _highlight.tags["function"](_highlight.tags.variableName),
31
+ color: '#5AB0B0'
32
+ }, {
33
+ tag: [_highlight.tags.string, _highlight.tags.regexp, _highlight.tags.attributeValue],
34
+ color: '#99C592'
35
+ }, {
36
+ tag: _highlight.tags.operator,
37
+ color: '#f47954'
38
+ },
39
+ // { tag: t.moduleKeyword, color: 'red' },
40
+ {
41
+ tag: [_highlight.tags.tagName, _highlight.tags.modifier],
42
+ color: '#E35F63'
43
+ }, {
44
+ tag: [_highlight.tags.number, _highlight.tags.definition(_highlight.tags.tagName), _highlight.tags.className, _highlight.tags.definition(_highlight.tags.variableName)],
45
+ color: '#fbac52'
46
+ }, {
47
+ tag: [_highlight.tags.atom, _highlight.tags.bool, _highlight.tags.special(_highlight.tags.variableName)],
48
+ color: '#E35F63'
49
+ }, {
50
+ tag: _highlight.tags.variableName,
51
+ color: '#539ac4'
52
+ }, {
53
+ tag: [_highlight.tags.propertyName, _highlight.tags.typeName],
54
+ color: '#629ccd'
55
+ }, {
56
+ tag: _highlight.tags.propertyName,
57
+ color: '#36b7b5'
58
+ }];
23
59
  function sublimeInit(options) {
24
60
  var _ref = options || {},
25
61
  _ref$theme = _ref.theme,
@@ -31,42 +67,7 @@ function sublimeInit(options) {
31
67
  return (0, _codemirrorThemes.createTheme)({
32
68
  theme: theme,
33
69
  settings: (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, defaultSettingsSublime), settings),
34
- styles: [{
35
- tag: [_highlight.tags.meta, _highlight.tags.comment],
36
- color: '#A2A9B5'
37
- }, {
38
- tag: [_highlight.tags.attributeName, _highlight.tags.keyword],
39
- color: '#B78FBA'
40
- }, {
41
- tag: _highlight.tags["function"](_highlight.tags.variableName),
42
- color: '#5AB0B0'
43
- }, {
44
- tag: [_highlight.tags.string, _highlight.tags.regexp, _highlight.tags.attributeValue],
45
- color: '#99C592'
46
- }, {
47
- tag: _highlight.tags.operator,
48
- color: '#f47954'
49
- },
50
- // { tag: t.moduleKeyword, color: 'red' },
51
- {
52
- tag: [_highlight.tags.tagName, _highlight.tags.modifier],
53
- color: '#E35F63'
54
- }, {
55
- tag: [_highlight.tags.number, _highlight.tags.definition(_highlight.tags.tagName), _highlight.tags.className, _highlight.tags.definition(_highlight.tags.variableName)],
56
- color: '#fbac52'
57
- }, {
58
- tag: [_highlight.tags.atom, _highlight.tags.bool, _highlight.tags.special(_highlight.tags.variableName)],
59
- color: '#E35F63'
60
- }, {
61
- tag: _highlight.tags.variableName,
62
- color: '#539ac4'
63
- }, {
64
- tag: [_highlight.tags.propertyName, _highlight.tags.typeName],
65
- color: '#629ccd'
66
- }, {
67
- tag: _highlight.tags.propertyName,
68
- color: '#36b7b5'
69
- }].concat((0, _toConsumableArray2["default"])(styles))
70
+ styles: [].concat(sublimeDarkStyle, (0, _toConsumableArray2["default"])(styles))
70
71
  });
71
72
  }
72
73
  var sublime = exports.sublime = sublimeInit();
package/esm/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { CreateThemeOptions } from '@uiw/codemirror-themes';
1
+ import { type CreateThemeOptions } from '@uiw/codemirror-themes';
2
2
  export declare const defaultSettingsSublime: CreateThemeOptions['settings'];
3
+ export declare const sublimeDarkStyle: CreateThemeOptions['styles'];
3
4
  export declare function sublimeInit(options?: Partial<CreateThemeOptions>): import("@codemirror/state").Extension;
4
5
  export declare const sublime: import("@codemirror/state").Extension;
package/esm/index.js CHANGED
@@ -11,6 +11,42 @@ export var defaultSettingsSublime = {
11
11
  gutterForeground: '#FFFFFF70',
12
12
  lineHighlight: '#00000059'
13
13
  };
14
+ export var sublimeDarkStyle = [{
15
+ tag: [t.meta, t.comment],
16
+ color: '#A2A9B5'
17
+ }, {
18
+ tag: [t.attributeName, t.keyword],
19
+ color: '#B78FBA'
20
+ }, {
21
+ tag: t.function(t.variableName),
22
+ color: '#5AB0B0'
23
+ }, {
24
+ tag: [t.string, t.regexp, t.attributeValue],
25
+ color: '#99C592'
26
+ }, {
27
+ tag: t.operator,
28
+ color: '#f47954'
29
+ },
30
+ // { tag: t.moduleKeyword, color: 'red' },
31
+ {
32
+ tag: [t.tagName, t.modifier],
33
+ color: '#E35F63'
34
+ }, {
35
+ tag: [t.number, t.definition(t.tagName), t.className, t.definition(t.variableName)],
36
+ color: '#fbac52'
37
+ }, {
38
+ tag: [t.atom, t.bool, t.special(t.variableName)],
39
+ color: '#E35F63'
40
+ }, {
41
+ tag: t.variableName,
42
+ color: '#539ac4'
43
+ }, {
44
+ tag: [t.propertyName, t.typeName],
45
+ color: '#629ccd'
46
+ }, {
47
+ tag: t.propertyName,
48
+ color: '#36b7b5'
49
+ }];
14
50
  export function sublimeInit(options) {
15
51
  var {
16
52
  theme = 'dark',
@@ -20,42 +56,7 @@ export function sublimeInit(options) {
20
56
  return createTheme({
21
57
  theme: theme,
22
58
  settings: _extends({}, defaultSettingsSublime, settings),
23
- styles: [{
24
- tag: [t.meta, t.comment],
25
- color: '#A2A9B5'
26
- }, {
27
- tag: [t.attributeName, t.keyword],
28
- color: '#B78FBA'
29
- }, {
30
- tag: t.function(t.variableName),
31
- color: '#5AB0B0'
32
- }, {
33
- tag: [t.string, t.regexp, t.attributeValue],
34
- color: '#99C592'
35
- }, {
36
- tag: t.operator,
37
- color: '#f47954'
38
- },
39
- // { tag: t.moduleKeyword, color: 'red' },
40
- {
41
- tag: [t.tagName, t.modifier],
42
- color: '#E35F63'
43
- }, {
44
- tag: [t.number, t.definition(t.tagName), t.className, t.definition(t.variableName)],
45
- color: '#fbac52'
46
- }, {
47
- tag: [t.atom, t.bool, t.special(t.variableName)],
48
- color: '#E35F63'
49
- }, {
50
- tag: t.variableName,
51
- color: '#539ac4'
52
- }, {
53
- tag: [t.propertyName, t.typeName],
54
- color: '#629ccd'
55
- }, {
56
- tag: t.propertyName,
57
- color: '#36b7b5'
58
- }, ...styles]
59
+ styles: [...sublimeDarkStyle, ...styles]
59
60
  });
60
61
  }
61
62
  export var sublime = sublimeInit();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uiw/codemirror-theme-sublime",
3
- "version": "4.22.2",
3
+ "version": "4.23.0",
4
4
  "description": "Theme sublime for CodeMirror.",
5
5
  "homepage": "https://uiwjs.github.io/react-codemirror/#/theme/data/sublime",
6
6
  "funding": "https://jaywcjlove.github.io/#/sponsor",
@@ -22,7 +22,7 @@
22
22
  "cjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@uiw/codemirror-themes": "4.22.2"
25
+ "@uiw/codemirror-themes": "4.23.0"
26
26
  },
27
27
  "keywords": [
28
28
  "codemirror",
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { tags as t } from '@lezer/highlight';
2
- import { createTheme, CreateThemeOptions } from '@uiw/codemirror-themes';
2
+ import { createTheme, type CreateThemeOptions } from '@uiw/codemirror-themes';
3
3
 
4
4
  export const defaultSettingsSublime: CreateThemeOptions['settings'] = {
5
5
  background: '#303841',
@@ -12,6 +12,21 @@ export const defaultSettingsSublime: CreateThemeOptions['settings'] = {
12
12
  lineHighlight: '#00000059',
13
13
  };
14
14
 
15
+ export const sublimeDarkStyle: CreateThemeOptions['styles'] = [
16
+ { tag: [t.meta, t.comment], color: '#A2A9B5' },
17
+ { tag: [t.attributeName, t.keyword], color: '#B78FBA' },
18
+ { tag: t.function(t.variableName), color: '#5AB0B0' },
19
+ { tag: [t.string, t.regexp, t.attributeValue], color: '#99C592' },
20
+ { tag: t.operator, color: '#f47954' },
21
+ // { tag: t.moduleKeyword, color: 'red' },
22
+ { tag: [t.tagName, t.modifier], color: '#E35F63' },
23
+ { tag: [t.number, t.definition(t.tagName), t.className, t.definition(t.variableName)], color: '#fbac52' },
24
+ { tag: [t.atom, t.bool, t.special(t.variableName)], color: '#E35F63' },
25
+ { tag: t.variableName, color: '#539ac4' },
26
+ { tag: [t.propertyName, t.typeName], color: '#629ccd' },
27
+ { tag: t.propertyName, color: '#36b7b5' },
28
+ ];
29
+
15
30
  export function sublimeInit(options?: Partial<CreateThemeOptions>) {
16
31
  const { theme = 'dark', settings = {}, styles = [] } = options || {};
17
32
  return createTheme({
@@ -20,21 +35,7 @@ export function sublimeInit(options?: Partial<CreateThemeOptions>) {
20
35
  ...defaultSettingsSublime,
21
36
  ...settings,
22
37
  },
23
- styles: [
24
- { tag: [t.meta, t.comment], color: '#A2A9B5' },
25
- { tag: [t.attributeName, t.keyword], color: '#B78FBA' },
26
- { tag: t.function(t.variableName), color: '#5AB0B0' },
27
- { tag: [t.string, t.regexp, t.attributeValue], color: '#99C592' },
28
- { tag: t.operator, color: '#f47954' },
29
- // { tag: t.moduleKeyword, color: 'red' },
30
- { tag: [t.tagName, t.modifier], color: '#E35F63' },
31
- { tag: [t.number, t.definition(t.tagName), t.className, t.definition(t.variableName)], color: '#fbac52' },
32
- { tag: [t.atom, t.bool, t.special(t.variableName)], color: '#E35F63' },
33
- { tag: t.variableName, color: '#539ac4' },
34
- { tag: [t.propertyName, t.typeName], color: '#629ccd' },
35
- { tag: t.propertyName, color: '#36b7b5' },
36
- ...styles,
37
- ],
38
+ styles: [...sublimeDarkStyle, ...styles],
38
39
  });
39
40
  }
40
41