@fsegurai/codemirror-theme-nord 6.0.2 → 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-nord [![NPM version](https://img.shields.io/npm/v/@fsegurai/codemirror-theme-nord.svg)](https://www.npmjs.org/package/@fsegurai/codemirror-theme-nord)
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 Nord 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
- @nord
25
-
26
- @nordTheme
27
-
1
+ <!-- NOTE: README.md is generated from src/README.md -->
2
+
3
+ # @fsegurai/codemirror-theme-nord [![NPM version](https://img.shields.io/npm/v/@fsegurai/codemirror-theme-nord.svg)](https://www.npmjs.org/package/@fsegurai/codemirror-theme-nord)
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 Nord 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
+ @nord
25
+
26
+ @nordTheme
27
+
28
28
  @nordHighlightStyle
package/dist/index.cjs CHANGED
@@ -24,8 +24,10 @@ base0C = '#d08770', // orange
24
24
  base0D = '#ebcb8b', // yellow
25
25
  base0E = '#a3be8c', // green
26
26
  base0F = '#b48ead'; // purple
27
- const invalid = '#d30102', darkBackground = '#252a33', highlightBackground = base03, background = base00, tooltipBackground = base01, selection = base03, cursor = base04;
28
- /// The editor theme styles for Nord.
27
+ const invalid = '#d30102', darkBackground = '#252a33', highlightBackground = base03, background = base00, tooltipBackground = base01, selection = base03, selectionMatch = '#4c566a80', cursor = base04;
28
+ /**
29
+ The editor theme styles for Nord.
30
+ */
29
31
  const nordTheme = view.EditorView.theme({
30
32
  '&': {
31
33
  color: base04,
@@ -47,10 +49,9 @@ const nordTheme = view.EditorView.theme({
47
49
  backgroundColor: base04,
48
50
  color: base00
49
51
  },
50
- '.cm-activeLine': { backgroundColor: highlightBackground },
52
+ '.cm-activeLine': { backgroundColor: selectionMatch },
51
53
  '.cm-selectionMatch': {
52
- backgroundColor: base05,
53
- color: base01
54
+ backgroundColor: base05
54
55
  },
55
56
  '&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket': {
56
57
  outline: `1px solid ${base07}`
@@ -92,7 +93,9 @@ const nordTheme = view.EditorView.theme({
92
93
  }
93
94
  }
94
95
  }, { dark: true });
95
- /// The highlighting style for code in the Nord theme.
96
+ /**
97
+ The highlighting style for code in the Nord theme.
98
+ */
96
99
  const nordHighlightStyle = language.HighlightStyle.define([
97
100
  { tag: highlight.tags.keyword, color: base0A },
98
101
  {
@@ -188,8 +191,10 @@ const nordHighlightStyle = language.HighlightStyle.define([
188
191
  },
189
192
  { tag: highlight.tags.invalid, color: base02, borderBottom: `1px dotted ${invalid}` }
190
193
  ]);
191
- /// Extension to enable the Nord theme (both the editor theme and
192
- /// the highlight style).
194
+ /**
195
+ Extension to enable the Nord theme (both the editor theme and
196
+ the highlight style).
197
+ */
193
198
  const nord = [
194
199
  nordTheme,
195
200
  language.syntaxHighlighting(nordHighlightStyle)
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 Nord.
6
+ */
4
7
  declare const nordTheme: Extension;
8
+ /**
9
+ The highlighting style for code in the Nord theme.
10
+ */
5
11
  declare const nordHighlightStyle: HighlightStyle;
12
+ /**
13
+ Extension to enable the Nord theme (both the editor theme and
14
+ the highlight style).
15
+ */
6
16
  declare const nord: Extension;
7
17
 
8
18
  export { nord, nordHighlightStyle, nordTheme };
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 Nord.
6
+ */
4
7
  declare const nordTheme: Extension;
8
+ /**
9
+ The highlighting style for code in the Nord theme.
10
+ */
5
11
  declare const nordHighlightStyle: HighlightStyle;
12
+ /**
13
+ Extension to enable the Nord theme (both the editor theme and
14
+ the highlight style).
15
+ */
6
16
  declare const nord: Extension;
7
17
 
8
18
  export { nord, nordHighlightStyle, nordTheme };
package/dist/index.js 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 = '#252a33', highlightBackground = base03, background = base00, tooltipBackground = base01, selection = base03, cursor = base04;
26
- /// The editor theme styles for Nord.
25
+ const invalid = '#d30102', darkBackground = '#252a33', highlightBackground = base03, background = base00, tooltipBackground = base01, selection = base03, selectionMatch = '#4c566a80', cursor = base04;
26
+ /**
27
+ The editor theme styles for Nord.
28
+ */
27
29
  const nordTheme = /*@__PURE__*/EditorView.theme({
28
30
  '&': {
29
31
  color: base04,
@@ -45,10 +47,9 @@ const nordTheme = /*@__PURE__*/EditorView.theme({
45
47
  backgroundColor: base04,
46
48
  color: base00
47
49
  },
48
- '.cm-activeLine': { backgroundColor: highlightBackground },
50
+ '.cm-activeLine': { backgroundColor: selectionMatch },
49
51
  '.cm-selectionMatch': {
50
- backgroundColor: base05,
51
- color: base01
52
+ backgroundColor: base05
52
53
  },
53
54
  '&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket': {
54
55
  outline: `1px solid ${base07}`
@@ -90,7 +91,9 @@ const nordTheme = /*@__PURE__*/EditorView.theme({
90
91
  }
91
92
  }
92
93
  }, { dark: true });
93
- /// The highlighting style for code in the Nord theme.
94
+ /**
95
+ The highlighting style for code in the Nord theme.
96
+ */
94
97
  const nordHighlightStyle = /*@__PURE__*/HighlightStyle.define([
95
98
  { tag: tags.keyword, color: base0A },
96
99
  {
@@ -186,8 +189,10 @@ const nordHighlightStyle = /*@__PURE__*/HighlightStyle.define([
186
189
  },
187
190
  { tag: tags.invalid, color: base02, borderBottom: `1px dotted ${invalid}` }
188
191
  ]);
189
- /// Extension to enable the Nord theme (both the editor theme and
190
- /// the highlight style).
192
+ /**
193
+ Extension to enable the Nord theme (both the editor theme and
194
+ the highlight style).
195
+ */
191
196
  const nord = [
192
197
  nordTheme,
193
198
  /*@__PURE__*/syntaxHighlighting(nordHighlightStyle)
package/package.json CHANGED
@@ -1,45 +1,45 @@
1
- {
2
- "name": "@fsegurai/codemirror-theme-nord",
3
- "description": "Nord theme for the CodeMirror code editor",
4
- "version": "6.0.2",
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-nord",
3
+ "description": "Nord 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
+ }