@fsegurai/codemirror-theme-basic-light 6.0.3 → 6.0.5

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/README.md CHANGED
@@ -1,28 +1,28 @@
1
- <!-- NOTE: README.md is generated from src/README.md -->
2
-
3
- # @fsegurai/codemirror-theme-basic-light [![NPM version](https://img.shields.io/npm/v/@fsegurai/codemirror-theme-basic-light.svg)](https://www.npmjs.org/package/@fsegurai/codemirror-theme-basic-light)
4
-
5
- [ [**WEBSITE**](https://codemirror.net/6/) | [**ISSUES**](https://github.com/codemirror/codemirror.next/issues) | [**DEMO**](https://fsegurai.github.io/codemirror-themes/) ]
6
-
7
- This package implements the Basic Light theme for the
8
- [CodeMirror](https://codemirror.net/6/) code editor.
9
-
10
- The [project page](https://codemirror.net/6/) has more information, a
11
- number of [examples](https://codemirror.net/6/examples/) and the
12
- [documentation](https://codemirror.net/6/docs/).
13
-
14
- This code is released under an
15
- [MIT license](https://github.com/fsegurai/cm6-themes/tree/main/LICENSE).
16
-
17
- We aim to be an inclusive, welcoming community. To make that explicit,
18
- we have a [code of
19
- conduct](http://contributor-covenant.org/version/1/1/0/) that applies
20
- to communication around the project.
21
-
22
- ## API Reference
23
-
24
- @basicLight
25
-
26
- @basicLightTheme
27
-
1
+ <!-- NOTE: README.md is generated from src/README.md -->
2
+
3
+ # @fsegurai/codemirror-theme-basic-light [![NPM version](https://img.shields.io/npm/v/@fsegurai/codemirror-theme-basic-light.svg)](https://www.npmjs.org/package/@fsegurai/codemirror-theme-basic-light)
4
+
5
+ [ [**WEBSITE**](https://codemirror.net/6/) | [**ISSUES**](https://github.com/codemirror/codemirror.next/issues) | [**DEMO**](https://fsegurai.github.io/codemirror-themes/) ]
6
+
7
+ This package implements the Basic Light theme for the
8
+ [CodeMirror](https://codemirror.net/6/) code editor.
9
+
10
+ The [project page](https://codemirror.net/6/) has more information, a
11
+ number of [examples](https://codemirror.net/6/examples/) and the
12
+ [documentation](https://codemirror.net/6/docs/).
13
+
14
+ This code is released under an
15
+ [MIT license](https://github.com/fsegurai/cm6-themes/tree/main/LICENSE).
16
+
17
+ We aim to be an inclusive, welcoming community. To make that explicit,
18
+ we have a [code of
19
+ conduct](http://contributor-covenant.org/version/1/1/0/) that applies
20
+ to communication around the project.
21
+
22
+ ## API Reference
23
+
24
+ @basicLight
25
+
26
+ @basicLightTheme
27
+
28
28
  @basicLightHighlightStyle
package/dist/index.cjs CHANGED
@@ -22,8 +22,10 @@ base0C = '#d08770', // orange
22
22
  base0D = '#ebcb8b', // yellow
23
23
  base0E = '#a3be8c', // green
24
24
  base0F = '#b48ead'; // purple
25
- const invalid = '#d30102', darkBackground = base06, background = '#ffffff', tooltipBackground = base05, selection = darkBackground, selectionMatch = base06, cursor = base01;
26
- /// The editor theme styles for Basic Light.
25
+ const invalid = '#d30102', darkBackground = base06, highlightBackground = '#7692a033', background = '#ffffff', tooltipBackground = base05, selection = '#6dceff85', selectionMatch = '#02b8ff57', cursor = base01;
26
+ /**
27
+ The editor theme styles for Basic Light.
28
+ */
27
29
  const basicLightTheme = view.EditorView.theme({
28
30
  '&': {
29
31
  color: base00,
@@ -33,7 +35,10 @@ const basicLightTheme = view.EditorView.theme({
33
35
  caretColor: cursor
34
36
  },
35
37
  '.cm-cursor, .cm-dropCursor': { borderLeftColor: cursor },
36
- '&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection': { backgroundColor: selection },
38
+ '&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection': {
39
+ backgroundColor: selection,
40
+ color: '#00008b'
41
+ },
37
42
  '.cm-panels': { backgroundColor: darkBackground, color: base03 },
38
43
  '.cm-panels.cm-panels-top': { borderBottom: '2px solid black' },
39
44
  '.cm-panels.cm-panels-bottom': { borderTop: '2px solid black' },
@@ -44,8 +49,9 @@ const basicLightTheme = view.EditorView.theme({
44
49
  '.cm-searchMatch.cm-searchMatch-selected': {
45
50
  backgroundColor: base05
46
51
  },
52
+ '.cm-activeLine': { backgroundColor: highlightBackground },
47
53
  '.cm-selectionMatch': {
48
- backgroundColor: selectionMatch,
54
+ backgroundColor: selectionMatch
49
55
  },
50
56
  '&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket': {
51
57
  outline: `1px solid ${base03}`
@@ -58,6 +64,10 @@ const basicLightTheme = view.EditorView.theme({
58
64
  color: base00,
59
65
  border: 'none'
60
66
  },
67
+ '.cm-activeLineGutter': {
68
+ backgroundColor: selection,
69
+ color: '#00008b'
70
+ },
61
71
  '.cm-foldPlaceholder': {
62
72
  backgroundColor: 'transparent',
63
73
  border: 'none',
@@ -81,7 +91,9 @@ const basicLightTheme = view.EditorView.theme({
81
91
  }
82
92
  }
83
93
  }, { dark: false });
84
- /// The highlighting style for code in the Basic Light theme.
94
+ /**
95
+ The highlighting style for code in the Basic Light theme.
96
+ */
85
97
  const basicLightHighlightStyle = language.HighlightStyle.define([
86
98
  { tag: highlight.tags.keyword, color: base0A },
87
99
  {
@@ -176,8 +188,10 @@ const basicLightHighlightStyle = language.HighlightStyle.define([
176
188
  },
177
189
  { tag: highlight.tags.invalid, color: base02, borderBottom: `1px dotted ${invalid}` }
178
190
  ]);
179
- /// Extension to enable the Basic Light theme (both the editor theme and
180
- /// the highlight style).
191
+ /**
192
+ Extension to enable the Basic Light theme (both the editor theme and
193
+ the highlight style).
194
+ */
181
195
  const basicLight = [
182
196
  basicLightTheme,
183
197
  language.syntaxHighlighting(basicLightHighlightStyle)
package/dist/index.d.cts CHANGED
@@ -1,8 +1,18 @@
1
1
  import { Extension } from '@codemirror/state';
2
2
  import { HighlightStyle } from '@codemirror/language';
3
3
 
4
+ /**
5
+ The editor theme styles for Basic Light.
6
+ */
4
7
  declare const basicLightTheme: Extension;
8
+ /**
9
+ The highlighting style for code in the Basic Light theme.
10
+ */
5
11
  declare const basicLightHighlightStyle: HighlightStyle;
12
+ /**
13
+ Extension to enable the Basic Light theme (both the editor theme and
14
+ the highlight style).
15
+ */
6
16
  declare const basicLight: Extension;
7
17
 
8
18
  export { basicLight, basicLightHighlightStyle, basicLightTheme };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,18 @@
1
1
  import { Extension } from '@codemirror/state';
2
2
  import { HighlightStyle } from '@codemirror/language';
3
3
 
4
+ /**
5
+ The editor theme styles for Basic Light.
6
+ */
4
7
  declare const basicLightTheme: Extension;
8
+ /**
9
+ The highlighting style for code in the Basic Light theme.
10
+ */
5
11
  declare const basicLightHighlightStyle: HighlightStyle;
12
+ /**
13
+ Extension to enable the Basic Light theme (both the editor theme and
14
+ the highlight style).
15
+ */
6
16
  declare const basicLight: Extension;
7
17
 
8
18
  export { basicLight, basicLightHighlightStyle, basicLightTheme };
package/dist/index.js CHANGED
@@ -20,8 +20,10 @@ base0C = '#d08770', // orange
20
20
  base0D = '#ebcb8b', // yellow
21
21
  base0E = '#a3be8c', // green
22
22
  base0F = '#b48ead'; // purple
23
- const invalid = '#d30102', darkBackground = base06, background = '#ffffff', tooltipBackground = base05, selection = darkBackground, selectionMatch = base06, cursor = base01;
24
- /// The editor theme styles for Basic Light.
23
+ const invalid = '#d30102', darkBackground = base06, highlightBackground = '#7692a033', background = '#ffffff', tooltipBackground = base05, selection = '#6dceff85', selectionMatch = '#02b8ff57', cursor = base01;
24
+ /**
25
+ The editor theme styles for Basic Light.
26
+ */
25
27
  const basicLightTheme = /*@__PURE__*/EditorView.theme({
26
28
  '&': {
27
29
  color: base00,
@@ -31,7 +33,10 @@ const basicLightTheme = /*@__PURE__*/EditorView.theme({
31
33
  caretColor: cursor
32
34
  },
33
35
  '.cm-cursor, .cm-dropCursor': { borderLeftColor: cursor },
34
- '&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection': { backgroundColor: selection },
36
+ '&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection': {
37
+ backgroundColor: selection,
38
+ color: '#00008b'
39
+ },
35
40
  '.cm-panels': { backgroundColor: darkBackground, color: base03 },
36
41
  '.cm-panels.cm-panels-top': { borderBottom: '2px solid black' },
37
42
  '.cm-panels.cm-panels-bottom': { borderTop: '2px solid black' },
@@ -42,8 +47,9 @@ const basicLightTheme = /*@__PURE__*/EditorView.theme({
42
47
  '.cm-searchMatch.cm-searchMatch-selected': {
43
48
  backgroundColor: base05
44
49
  },
50
+ '.cm-activeLine': { backgroundColor: highlightBackground },
45
51
  '.cm-selectionMatch': {
46
- backgroundColor: selectionMatch,
52
+ backgroundColor: selectionMatch
47
53
  },
48
54
  '&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket': {
49
55
  outline: `1px solid ${base03}`
@@ -56,6 +62,10 @@ const basicLightTheme = /*@__PURE__*/EditorView.theme({
56
62
  color: base00,
57
63
  border: 'none'
58
64
  },
65
+ '.cm-activeLineGutter': {
66
+ backgroundColor: selection,
67
+ color: '#00008b'
68
+ },
59
69
  '.cm-foldPlaceholder': {
60
70
  backgroundColor: 'transparent',
61
71
  border: 'none',
@@ -79,7 +89,9 @@ const basicLightTheme = /*@__PURE__*/EditorView.theme({
79
89
  }
80
90
  }
81
91
  }, { dark: false });
82
- /// The highlighting style for code in the Basic Light theme.
92
+ /**
93
+ The highlighting style for code in the Basic Light theme.
94
+ */
83
95
  const basicLightHighlightStyle = /*@__PURE__*/HighlightStyle.define([
84
96
  { tag: tags.keyword, color: base0A },
85
97
  {
@@ -174,8 +186,10 @@ const basicLightHighlightStyle = /*@__PURE__*/HighlightStyle.define([
174
186
  },
175
187
  { tag: tags.invalid, color: base02, borderBottom: `1px dotted ${invalid}` }
176
188
  ]);
177
- /// Extension to enable the Basic Light theme (both the editor theme and
178
- /// the highlight style).
189
+ /**
190
+ Extension to enable the Basic Light theme (both the editor theme and
191
+ the highlight style).
192
+ */
179
193
  const basicLight = [
180
194
  basicLightTheme,
181
195
  /*@__PURE__*/syntaxHighlighting(basicLightHighlightStyle)
package/package.json CHANGED
@@ -1,45 +1,45 @@
1
- {
2
- "name": "@fsegurai/codemirror-theme-basic-light",
3
- "description": "Basic Light theme for the CodeMirror code editor",
4
- "version": "6.0.3",
5
- "type": "module",
6
- "main": "dist/index.cjs",
7
- "exports": {
8
- "import": "./dist/index.js",
9
- "require": "./dist/index.cjs"
10
- },
11
- "types": "dist/index.d.ts",
12
- "module": "dist/index.js",
13
- "sideEffects": false,
14
- "scripts": {
15
- "test": "cm-runtests",
16
- "prepare": "cm-buildhelper src/index.ts"
17
- },
18
- "keywords": [
19
- "editor",
20
- "code",
21
- "codemirror"
22
- ],
23
- "author": {
24
- "name": "Fabián Segura",
25
- "url": "https://www.fsegurai.com/"
26
- },
27
- "license": "MIT",
28
- "repository": {
29
- "type": "git",
30
- "url": "git+https://github.com/fsegurai/codemirror-themes.git"
31
- },
32
- "bugs": {
33
- "url": "https://github.com/fsegurai/codemirror-themes/issues"
34
- },
35
- "homepage": "https://github.com/fsegurai/codemirror-themes#readme",
36
- "peerDependencies": {
37
- "@lezer/highlight": "^1.0.0",
38
- "@codemirror/language": "^6.0.0",
39
- "@codemirror/state": "^6.0.0",
40
- "@codemirror/view": "^6.0.0"
41
- },
42
- "devDependencies": {
43
- "@codemirror/buildhelper": "^1.0.1"
44
- }
45
- }
1
+ {
2
+ "name": "@fsegurai/codemirror-theme-basic-light",
3
+ "description": "Basic Light theme for the CodeMirror code editor",
4
+ "version": "6.0.5",
5
+ "type": "module",
6
+ "main": "dist/index.cjs",
7
+ "exports": {
8
+ "import": "./dist/index.js",
9
+ "require": "./dist/index.cjs"
10
+ },
11
+ "types": "dist/index.d.ts",
12
+ "module": "dist/index.js",
13
+ "sideEffects": false,
14
+ "scripts": {
15
+ "test": "cm-runtests",
16
+ "prepare": "cm-buildhelper src/index.ts"
17
+ },
18
+ "keywords": [
19
+ "editor",
20
+ "code",
21
+ "codemirror"
22
+ ],
23
+ "author": {
24
+ "name": "Fabián Segura",
25
+ "url": "https://www.fsegurai.com/"
26
+ },
27
+ "license": "MIT",
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "git+https://github.com/fsegurai/codemirror-themes.git"
31
+ },
32
+ "bugs": {
33
+ "url": "https://github.com/fsegurai/codemirror-themes/issues"
34
+ },
35
+ "homepage": "https://github.com/fsegurai/codemirror-themes#readme",
36
+ "peerDependencies": {
37
+ "@lezer/highlight": "^1.0.0",
38
+ "@codemirror/language": "^6.0.0",
39
+ "@codemirror/state": "^6.0.0",
40
+ "@codemirror/view": "^6.0.0"
41
+ },
42
+ "devDependencies": {
43
+ "@codemirror/buildhelper": "^1.0.2"
44
+ }
45
+ }