@fsegurai/codemirror-theme-nord 6.0.3 → 6.0.6

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
@@ -25,14 +25,16 @@ base0D = '#ebcb8b', // yellow
25
25
  base0E = '#a3be8c', // green
26
26
  base0F = '#b48ead'; // purple
27
27
  const invalid = '#d30102', darkBackground = '#252a33', highlightBackground = base03, background = base00, tooltipBackground = base01, selection = base03, selectionMatch = '#4c566a80', cursor = base04;
28
- /// The editor theme styles for Nord.
28
+ /**
29
+ The editor theme styles for Nord.
30
+ */
29
31
  const nordTheme = view.EditorView.theme({
30
32
  '&': {
31
33
  color: base04,
32
- backgroundColor: background
34
+ backgroundColor: background,
33
35
  },
34
36
  '.cm-content': {
35
- caretColor: cursor
37
+ caretColor: cursor,
36
38
  },
37
39
  '.cm-cursor, .cm-dropCursor': { borderLeftColor: cursor },
38
40
  '&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection': { backgroundColor: selection },
@@ -41,122 +43,124 @@ const nordTheme = view.EditorView.theme({
41
43
  '.cm-panels.cm-panels-bottom': { borderTop: '2px solid black' },
42
44
  '.cm-searchMatch': {
43
45
  backgroundColor: 'transparent',
44
- outline: `1px solid ${base07}`
46
+ outline: `1px solid ${base07}`,
45
47
  },
46
48
  '.cm-searchMatch.cm-searchMatch-selected': {
47
49
  backgroundColor: base04,
48
- color: base00
50
+ color: base00,
49
51
  },
50
52
  '.cm-activeLine': { backgroundColor: selectionMatch },
51
53
  '.cm-selectionMatch': {
52
- backgroundColor: base05
54
+ backgroundColor: base05,
53
55
  },
54
56
  '&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket': {
55
- outline: `1px solid ${base07}`
57
+ outline: `1px solid ${base07}`,
56
58
  },
57
59
  '&.cm-focused .cm-matchingBracket': {
58
60
  backgroundColor: base06,
59
- color: base02
61
+ color: base02,
60
62
  },
61
63
  '.cm-gutters': {
62
64
  backgroundColor: base00,
63
65
  color: base03,
64
- border: 'none'
66
+ border: 'none',
65
67
  },
66
68
  '.cm-activeLineGutter': {
67
69
  backgroundColor: highlightBackground,
68
- color: base04
70
+ color: base04,
69
71
  },
70
72
  '.cm-foldPlaceholder': {
71
73
  backgroundColor: 'transparent',
72
74
  border: 'none',
73
- color: '#ddd'
75
+ color: '#ddd',
74
76
  },
75
77
  '.cm-tooltip': {
76
78
  border: 'none',
77
- backgroundColor: tooltipBackground
79
+ backgroundColor: tooltipBackground,
78
80
  },
79
81
  '.cm-tooltip .cm-tooltip-arrow:before': {
80
82
  borderTopColor: 'transparent',
81
- borderBottomColor: 'transparent'
83
+ borderBottomColor: 'transparent',
82
84
  },
83
85
  '.cm-tooltip .cm-tooltip-arrow:after': {
84
86
  borderTopColor: tooltipBackground,
85
- borderBottomColor: tooltipBackground
87
+ borderBottomColor: tooltipBackground,
86
88
  },
87
89
  '.cm-tooltip-autocomplete': {
88
90
  '& > ul > li[aria-selected]': {
89
91
  backgroundColor: highlightBackground,
90
- color: base03
91
- }
92
- }
92
+ color: base03,
93
+ },
94
+ },
93
95
  }, { dark: true });
94
- /// The highlighting style for code in the Nord theme.
96
+ /**
97
+ The highlighting style for code in the Nord theme.
98
+ */
95
99
  const nordHighlightStyle = language.HighlightStyle.define([
96
100
  { tag: highlight.tags.keyword, color: base0A },
97
101
  {
98
102
  tag: [highlight.tags.name, highlight.tags.deleted, highlight.tags.character, highlight.tags.propertyName, highlight.tags.macroName],
99
- color: base08
103
+ color: base08,
100
104
  },
101
105
  { tag: [highlight.tags.variableName], color: base07 },
102
106
  { tag: [highlight.tags.function(highlight.tags.variableName)], color: base07 },
103
107
  { tag: [highlight.tags.labelName], color: base09 },
104
108
  {
105
109
  tag: [highlight.tags.color, highlight.tags.constant(highlight.tags.name), highlight.tags.standard(highlight.tags.name)],
106
- color: base0A
110
+ color: base0A,
107
111
  },
108
112
  { tag: [highlight.tags.definition(highlight.tags.name), highlight.tags.separator], color: base0E },
109
113
  { tag: [highlight.tags.brace], color: base07 },
110
114
  {
111
115
  tag: [highlight.tags.annotation],
112
- color: invalid
116
+ color: invalid,
113
117
  },
114
118
  {
115
119
  tag: [highlight.tags.number, highlight.tags.changed, highlight.tags.annotation, highlight.tags.modifier, highlight.tags.self, highlight.tags.namespace],
116
- color: base0F
120
+ color: base0F,
117
121
  },
118
122
  {
119
123
  tag: [highlight.tags.typeName, highlight.tags.className],
120
- color: base0D
124
+ color: base0D,
121
125
  },
122
126
  {
123
127
  tag: [highlight.tags.operator, highlight.tags.operatorKeyword],
124
- color: base0E
128
+ color: base0E,
125
129
  },
126
130
  {
127
131
  tag: [highlight.tags.tagName],
128
- color: base0F
132
+ color: base0F,
129
133
  },
130
134
  {
131
135
  tag: [highlight.tags.squareBracket],
132
- color: base0b
136
+ color: base0b,
133
137
  },
134
138
  {
135
139
  tag: [highlight.tags.angleBracket],
136
- color: base0C
140
+ color: base0C,
137
141
  },
138
142
  {
139
143
  tag: [highlight.tags.attributeName],
140
- color: base0D
144
+ color: base0D,
141
145
  },
142
146
  {
143
147
  tag: [highlight.tags.regexp],
144
- color: base0A
148
+ color: base0A,
145
149
  },
146
150
  {
147
151
  tag: [highlight.tags.quote],
148
- color: base0F
152
+ color: base0F,
149
153
  },
150
154
  { tag: [highlight.tags.string], color: base0E },
151
155
  {
152
156
  tag: highlight.tags.link,
153
157
  color: base0E,
154
158
  textDecoration: 'underline',
155
- textUnderlinePosition: 'under'
159
+ textUnderlinePosition: 'under',
156
160
  },
157
161
  {
158
162
  tag: [highlight.tags.url, highlight.tags.escape, highlight.tags.special(highlight.tags.string)],
159
- color: base07
163
+ color: base07,
160
164
  },
161
165
  { tag: [highlight.tags.meta], color: base08 },
162
166
  { tag: [highlight.tags.monospace], color: base04, fontStyle: 'italic' },
@@ -170,28 +174,30 @@ const nordHighlightStyle = language.HighlightStyle.define([
170
174
  {
171
175
  tag: [highlight.tags.heading2, highlight.tags.heading3, highlight.tags.heading4],
172
176
  fontWeight: 'bold',
173
- color: base0A
177
+ color: base0A,
174
178
  },
175
179
  {
176
180
  tag: [highlight.tags.heading5, highlight.tags.heading6],
177
- color: base0A
181
+ color: base0A,
178
182
  },
179
183
  { tag: [highlight.tags.atom, highlight.tags.bool, highlight.tags.special(highlight.tags.variableName)], color: base0C },
180
184
  {
181
185
  tag: [highlight.tags.processingInstruction, highlight.tags.inserted],
182
- color: base07
186
+ color: base07,
183
187
  },
184
188
  {
185
189
  tag: [highlight.tags.contentSeparator],
186
- color: base0D
190
+ color: base0D,
187
191
  },
188
- { tag: highlight.tags.invalid, color: base02, borderBottom: `1px dotted ${invalid}` }
192
+ { tag: highlight.tags.invalid, color: base02, borderBottom: `1px dotted ${invalid}` },
189
193
  ]);
190
- /// Extension to enable the Nord theme (both the editor theme and
191
- /// the highlight style).
194
+ /**
195
+ Extension to enable the Nord theme (both the editor theme and
196
+ the highlight style).
197
+ */
192
198
  const nord = [
193
199
  nordTheme,
194
- language.syntaxHighlighting(nordHighlightStyle)
200
+ language.syntaxHighlighting(nordHighlightStyle),
195
201
  ];
196
202
 
197
203
  exports.nord = nord;
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
@@ -23,14 +23,16 @@ base0D = '#ebcb8b', // yellow
23
23
  base0E = '#a3be8c', // green
24
24
  base0F = '#b48ead'; // purple
25
25
  const invalid = '#d30102', darkBackground = '#252a33', highlightBackground = base03, background = base00, tooltipBackground = base01, selection = base03, selectionMatch = '#4c566a80', cursor = base04;
26
- /// The editor theme styles for Nord.
26
+ /**
27
+ The editor theme styles for Nord.
28
+ */
27
29
  const nordTheme = /*@__PURE__*/EditorView.theme({
28
30
  '&': {
29
31
  color: base04,
30
- backgroundColor: background
32
+ backgroundColor: background,
31
33
  },
32
34
  '.cm-content': {
33
- caretColor: cursor
35
+ caretColor: cursor,
34
36
  },
35
37
  '.cm-cursor, .cm-dropCursor': { borderLeftColor: cursor },
36
38
  '&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection': { backgroundColor: selection },
@@ -39,122 +41,124 @@ const nordTheme = /*@__PURE__*/EditorView.theme({
39
41
  '.cm-panels.cm-panels-bottom': { borderTop: '2px solid black' },
40
42
  '.cm-searchMatch': {
41
43
  backgroundColor: 'transparent',
42
- outline: `1px solid ${base07}`
44
+ outline: `1px solid ${base07}`,
43
45
  },
44
46
  '.cm-searchMatch.cm-searchMatch-selected': {
45
47
  backgroundColor: base04,
46
- color: base00
48
+ color: base00,
47
49
  },
48
50
  '.cm-activeLine': { backgroundColor: selectionMatch },
49
51
  '.cm-selectionMatch': {
50
- backgroundColor: base05
52
+ backgroundColor: base05,
51
53
  },
52
54
  '&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket': {
53
- outline: `1px solid ${base07}`
55
+ outline: `1px solid ${base07}`,
54
56
  },
55
57
  '&.cm-focused .cm-matchingBracket': {
56
58
  backgroundColor: base06,
57
- color: base02
59
+ color: base02,
58
60
  },
59
61
  '.cm-gutters': {
60
62
  backgroundColor: base00,
61
63
  color: base03,
62
- border: 'none'
64
+ border: 'none',
63
65
  },
64
66
  '.cm-activeLineGutter': {
65
67
  backgroundColor: highlightBackground,
66
- color: base04
68
+ color: base04,
67
69
  },
68
70
  '.cm-foldPlaceholder': {
69
71
  backgroundColor: 'transparent',
70
72
  border: 'none',
71
- color: '#ddd'
73
+ color: '#ddd',
72
74
  },
73
75
  '.cm-tooltip': {
74
76
  border: 'none',
75
- backgroundColor: tooltipBackground
77
+ backgroundColor: tooltipBackground,
76
78
  },
77
79
  '.cm-tooltip .cm-tooltip-arrow:before': {
78
80
  borderTopColor: 'transparent',
79
- borderBottomColor: 'transparent'
81
+ borderBottomColor: 'transparent',
80
82
  },
81
83
  '.cm-tooltip .cm-tooltip-arrow:after': {
82
84
  borderTopColor: tooltipBackground,
83
- borderBottomColor: tooltipBackground
85
+ borderBottomColor: tooltipBackground,
84
86
  },
85
87
  '.cm-tooltip-autocomplete': {
86
88
  '& > ul > li[aria-selected]': {
87
89
  backgroundColor: highlightBackground,
88
- color: base03
89
- }
90
- }
90
+ color: base03,
91
+ },
92
+ },
91
93
  }, { dark: true });
92
- /// The highlighting style for code in the Nord theme.
94
+ /**
95
+ The highlighting style for code in the Nord theme.
96
+ */
93
97
  const nordHighlightStyle = /*@__PURE__*/HighlightStyle.define([
94
98
  { tag: tags.keyword, color: base0A },
95
99
  {
96
100
  tag: [tags.name, tags.deleted, tags.character, tags.propertyName, tags.macroName],
97
- color: base08
101
+ color: base08,
98
102
  },
99
103
  { tag: [tags.variableName], color: base07 },
100
104
  { tag: [/*@__PURE__*/tags.function(tags.variableName)], color: base07 },
101
105
  { tag: [tags.labelName], color: base09 },
102
106
  {
103
107
  tag: [tags.color, /*@__PURE__*/tags.constant(tags.name), /*@__PURE__*/tags.standard(tags.name)],
104
- color: base0A
108
+ color: base0A,
105
109
  },
106
110
  { tag: [/*@__PURE__*/tags.definition(tags.name), tags.separator], color: base0E },
107
111
  { tag: [tags.brace], color: base07 },
108
112
  {
109
113
  tag: [tags.annotation],
110
- color: invalid
114
+ color: invalid,
111
115
  },
112
116
  {
113
117
  tag: [tags.number, tags.changed, tags.annotation, tags.modifier, tags.self, tags.namespace],
114
- color: base0F
118
+ color: base0F,
115
119
  },
116
120
  {
117
121
  tag: [tags.typeName, tags.className],
118
- color: base0D
122
+ color: base0D,
119
123
  },
120
124
  {
121
125
  tag: [tags.operator, tags.operatorKeyword],
122
- color: base0E
126
+ color: base0E,
123
127
  },
124
128
  {
125
129
  tag: [tags.tagName],
126
- color: base0F
130
+ color: base0F,
127
131
  },
128
132
  {
129
133
  tag: [tags.squareBracket],
130
- color: base0b
134
+ color: base0b,
131
135
  },
132
136
  {
133
137
  tag: [tags.angleBracket],
134
- color: base0C
138
+ color: base0C,
135
139
  },
136
140
  {
137
141
  tag: [tags.attributeName],
138
- color: base0D
142
+ color: base0D,
139
143
  },
140
144
  {
141
145
  tag: [tags.regexp],
142
- color: base0A
146
+ color: base0A,
143
147
  },
144
148
  {
145
149
  tag: [tags.quote],
146
- color: base0F
150
+ color: base0F,
147
151
  },
148
152
  { tag: [tags.string], color: base0E },
149
153
  {
150
154
  tag: tags.link,
151
155
  color: base0E,
152
156
  textDecoration: 'underline',
153
- textUnderlinePosition: 'under'
157
+ textUnderlinePosition: 'under',
154
158
  },
155
159
  {
156
160
  tag: [tags.url, tags.escape, /*@__PURE__*/tags.special(tags.string)],
157
- color: base07
161
+ color: base07,
158
162
  },
159
163
  { tag: [tags.meta], color: base08 },
160
164
  { tag: [tags.monospace], color: base04, fontStyle: 'italic' },
@@ -168,28 +172,30 @@ const nordHighlightStyle = /*@__PURE__*/HighlightStyle.define([
168
172
  {
169
173
  tag: [tags.heading2, tags.heading3, tags.heading4],
170
174
  fontWeight: 'bold',
171
- color: base0A
175
+ color: base0A,
172
176
  },
173
177
  {
174
178
  tag: [tags.heading5, tags.heading6],
175
- color: base0A
179
+ color: base0A,
176
180
  },
177
181
  { tag: [tags.atom, tags.bool, /*@__PURE__*/tags.special(tags.variableName)], color: base0C },
178
182
  {
179
183
  tag: [tags.processingInstruction, tags.inserted],
180
- color: base07
184
+ color: base07,
181
185
  },
182
186
  {
183
187
  tag: [tags.contentSeparator],
184
- color: base0D
188
+ color: base0D,
185
189
  },
186
- { tag: tags.invalid, color: base02, borderBottom: `1px dotted ${invalid}` }
190
+ { tag: tags.invalid, color: base02, borderBottom: `1px dotted ${invalid}` },
187
191
  ]);
188
- /// Extension to enable the Nord theme (both the editor theme and
189
- /// the highlight style).
192
+ /**
193
+ Extension to enable the Nord theme (both the editor theme and
194
+ the highlight style).
195
+ */
190
196
  const nord = [
191
197
  nordTheme,
192
- /*@__PURE__*/syntaxHighlighting(nordHighlightStyle)
198
+ /*@__PURE__*/syntaxHighlighting(nordHighlightStyle),
193
199
  ];
194
200
 
195
201
  export { nord, nordHighlightStyle, nordTheme };
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.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-nord",
3
+ "description": "Nord theme for the CodeMirror code editor",
4
+ "version": "6.0.6",
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
+ }