@fsegurai/codemirror-theme-nord 6.2.0-beta.2 → 6.2.0-beta.4
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/dist/index.cjs +33 -33
- package/dist/index.js +1 -1
- package/package.json +3 -2
package/dist/index.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var view = require('@codemirror/view');
|
|
4
4
|
var language = require('@codemirror/language');
|
|
5
5
|
var highlight = require('@lezer/highlight');
|
|
6
|
-
var
|
|
6
|
+
var codemirrorThemeUtils = require('@fsegurai/codemirror-theme-utils');
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Enhanced Nord theme color definitions
|
|
@@ -52,17 +52,17 @@ const nordTheme = view.EditorView.theme({
|
|
|
52
52
|
'&': {
|
|
53
53
|
color: base04,
|
|
54
54
|
backgroundColor: background,
|
|
55
|
-
fontSize:
|
|
56
|
-
fontFamily:
|
|
55
|
+
fontSize: codemirrorThemeUtils.generalContent.fontSize,
|
|
56
|
+
fontFamily: codemirrorThemeUtils.generalContent.fontFamily,
|
|
57
57
|
},
|
|
58
58
|
// Content and cursor
|
|
59
59
|
'.cm-content': {
|
|
60
60
|
caretColor: cursor,
|
|
61
|
-
lineHeight:
|
|
61
|
+
lineHeight: codemirrorThemeUtils.generalContent.lineHeight,
|
|
62
62
|
},
|
|
63
63
|
'.cm-cursor, .cm-dropCursor': {
|
|
64
64
|
borderLeftColor: cursor,
|
|
65
|
-
borderLeftWidth:
|
|
65
|
+
borderLeftWidth: codemirrorThemeUtils.generalCursor.borderLeftWidth,
|
|
66
66
|
},
|
|
67
67
|
'.cm-fat-cursor': {
|
|
68
68
|
backgroundColor: `${cursor}99`,
|
|
@@ -81,7 +81,7 @@ const nordTheme = view.EditorView.theme({
|
|
|
81
81
|
backgroundColor: '#5e81ac80',
|
|
82
82
|
outline: `1px solid ${base07}`,
|
|
83
83
|
color: base04,
|
|
84
|
-
borderRadius:
|
|
84
|
+
borderRadius: codemirrorThemeUtils.generalSearchField.borderRadius,
|
|
85
85
|
'& span': {
|
|
86
86
|
color: base04,
|
|
87
87
|
},
|
|
@@ -89,15 +89,15 @@ const nordTheme = view.EditorView.theme({
|
|
|
89
89
|
'.cm-searchMatch.cm-searchMatch-selected': {
|
|
90
90
|
backgroundColor: base09,
|
|
91
91
|
color: base06,
|
|
92
|
-
padding:
|
|
92
|
+
padding: codemirrorThemeUtils.generalSearchField.padding,
|
|
93
93
|
'& span': {
|
|
94
94
|
color: base06,
|
|
95
95
|
},
|
|
96
96
|
},
|
|
97
97
|
'.cm-search.cm-panel.cm-textfield': {
|
|
98
98
|
color: base04,
|
|
99
|
-
borderRadius:
|
|
100
|
-
padding:
|
|
99
|
+
borderRadius: codemirrorThemeUtils.generalSearchField.borderRadius,
|
|
100
|
+
padding: codemirrorThemeUtils.generalSearchField.padding,
|
|
101
101
|
},
|
|
102
102
|
// Panels
|
|
103
103
|
'.cm-panels': {
|
|
@@ -114,9 +114,9 @@ const nordTheme = view.EditorView.theme({
|
|
|
114
114
|
'.cm-panel button': {
|
|
115
115
|
backgroundColor: tooltipBackground,
|
|
116
116
|
color: base04,
|
|
117
|
-
border:
|
|
118
|
-
borderRadius:
|
|
119
|
-
padding:
|
|
117
|
+
border: codemirrorThemeUtils.generalPanel.border,
|
|
118
|
+
borderRadius: codemirrorThemeUtils.generalPanel.borderRadius,
|
|
119
|
+
padding: codemirrorThemeUtils.generalPanel.padding,
|
|
120
120
|
},
|
|
121
121
|
'.cm-panel button:hover': {
|
|
122
122
|
backgroundColor: base02,
|
|
@@ -124,27 +124,27 @@ const nordTheme = view.EditorView.theme({
|
|
|
124
124
|
// Line highlighting
|
|
125
125
|
'.cm-activeLine': {
|
|
126
126
|
backgroundColor: highlightBackground,
|
|
127
|
-
borderRadius:
|
|
127
|
+
borderRadius: codemirrorThemeUtils.generalLine.borderRadius,
|
|
128
128
|
zIndex: 1,
|
|
129
129
|
},
|
|
130
130
|
// Gutters
|
|
131
131
|
'.cm-gutters': {
|
|
132
132
|
backgroundColor: darkBackground,
|
|
133
133
|
color: base03,
|
|
134
|
-
border:
|
|
134
|
+
border: codemirrorThemeUtils.generalGutter.border,
|
|
135
135
|
borderRight: `1px solid ${base02}`,
|
|
136
|
-
paddingRight:
|
|
136
|
+
paddingRight: codemirrorThemeUtils.generalGutter.paddingRight,
|
|
137
137
|
},
|
|
138
138
|
'.cm-activeLineGutter': {
|
|
139
139
|
backgroundColor: base01,
|
|
140
140
|
color: base04,
|
|
141
|
-
fontWeight:
|
|
141
|
+
fontWeight: codemirrorThemeUtils.generalGutter.fontWeight,
|
|
142
142
|
},
|
|
143
143
|
'.cm-lineNumbers': {
|
|
144
|
-
fontSize:
|
|
144
|
+
fontSize: codemirrorThemeUtils.generalGutter.fontSize,
|
|
145
145
|
},
|
|
146
146
|
'.cm-foldGutter': {
|
|
147
|
-
fontSize:
|
|
147
|
+
fontSize: codemirrorThemeUtils.generalGutter.fontSize,
|
|
148
148
|
},
|
|
149
149
|
'.cm-foldGutter .cm-gutterElement': {
|
|
150
150
|
color: base03,
|
|
@@ -157,8 +157,8 @@ const nordTheme = view.EditorView.theme({
|
|
|
157
157
|
'.cm-tooltip': {
|
|
158
158
|
backgroundColor: tooltipBackground,
|
|
159
159
|
border: `1px solid ${base03}`,
|
|
160
|
-
borderRadius:
|
|
161
|
-
padding:
|
|
160
|
+
borderRadius: codemirrorThemeUtils.generalTooltip.borderRadius,
|
|
161
|
+
padding: codemirrorThemeUtils.generalTooltip.padding,
|
|
162
162
|
boxShadow: '0 2px 8px rgba(0, 0, 0, 0.3)',
|
|
163
163
|
},
|
|
164
164
|
'.cm-tooltip-autocomplete': {
|
|
@@ -167,17 +167,17 @@ const nordTheme = view.EditorView.theme({
|
|
|
167
167
|
border: 'none',
|
|
168
168
|
},
|
|
169
169
|
'& > ul > li': {
|
|
170
|
-
padding:
|
|
171
|
-
lineHeight:
|
|
170
|
+
padding: codemirrorThemeUtils.generalTooltip.padding,
|
|
171
|
+
lineHeight: codemirrorThemeUtils.generalTooltip.lineHeight,
|
|
172
172
|
},
|
|
173
173
|
'& > ul > li[aria-selected]': {
|
|
174
174
|
backgroundColor: base02,
|
|
175
175
|
color: base06,
|
|
176
|
-
borderRadius:
|
|
176
|
+
borderRadius: codemirrorThemeUtils.generalTooltip.borderRadiusSelected,
|
|
177
177
|
},
|
|
178
178
|
'& > ul > li > span.cm-completionIcon': {
|
|
179
179
|
color: base03,
|
|
180
|
-
paddingRight:
|
|
180
|
+
paddingRight: codemirrorThemeUtils.generalTooltip.paddingRight,
|
|
181
181
|
},
|
|
182
182
|
'& > ul > li > span.cm-completionDetail': {
|
|
183
183
|
color: base03,
|
|
@@ -214,27 +214,27 @@ const nordTheme = view.EditorView.theme({
|
|
|
214
214
|
'.cm-matchingBracket': {
|
|
215
215
|
backgroundColor: activeBracketBg,
|
|
216
216
|
outline: `1px solid ${activeBracketBorder}`,
|
|
217
|
-
borderRadius:
|
|
217
|
+
borderRadius: codemirrorThemeUtils.generalMatching.borderRadius,
|
|
218
218
|
},
|
|
219
219
|
'.cm-nonmatchingBracket': {
|
|
220
220
|
backgroundColor: `${base0B}40`,
|
|
221
221
|
outline: `1px solid ${invalid}`,
|
|
222
|
-
borderRadius:
|
|
222
|
+
borderRadius: codemirrorThemeUtils.generalMatching.borderRadius,
|
|
223
223
|
},
|
|
224
224
|
// Selection matches
|
|
225
225
|
'.cm-selectionMatch': {
|
|
226
226
|
backgroundColor: selectionMatch,
|
|
227
227
|
outline: `1px solid ${base02}50`,
|
|
228
|
-
borderRadius:
|
|
228
|
+
borderRadius: codemirrorThemeUtils.generalMatching.borderRadius,
|
|
229
229
|
},
|
|
230
230
|
// Fold placeholder
|
|
231
231
|
'.cm-foldPlaceholder': {
|
|
232
232
|
backgroundColor: tooltipBackground,
|
|
233
233
|
color: base03,
|
|
234
234
|
border: `1px dotted ${base03}70`,
|
|
235
|
-
borderRadius:
|
|
236
|
-
padding:
|
|
237
|
-
margin:
|
|
235
|
+
borderRadius: codemirrorThemeUtils.generalPlaceholder.borderRadius,
|
|
236
|
+
padding: codemirrorThemeUtils.generalPlaceholder.padding,
|
|
237
|
+
margin: codemirrorThemeUtils.generalPlaceholder.margin,
|
|
238
238
|
},
|
|
239
239
|
// Focus outline
|
|
240
240
|
'&.cm-focused': {
|
|
@@ -243,15 +243,15 @@ const nordTheme = view.EditorView.theme({
|
|
|
243
243
|
},
|
|
244
244
|
// Scrollbars
|
|
245
245
|
'& .cm-scroller::-webkit-scrollbar': {
|
|
246
|
-
width:
|
|
247
|
-
height:
|
|
246
|
+
width: codemirrorThemeUtils.generalScroller.width,
|
|
247
|
+
height: codemirrorThemeUtils.generalScroller.height,
|
|
248
248
|
},
|
|
249
249
|
'& .cm-scroller::-webkit-scrollbar-track': {
|
|
250
250
|
background: darkBackground,
|
|
251
251
|
},
|
|
252
252
|
'& .cm-scroller::-webkit-scrollbar-thumb': {
|
|
253
253
|
backgroundColor: base02,
|
|
254
|
-
borderRadius:
|
|
254
|
+
borderRadius: codemirrorThemeUtils.generalScroller.borderRadius,
|
|
255
255
|
border: `3px solid ${darkBackground}`,
|
|
256
256
|
},
|
|
257
257
|
'& .cm-scroller::-webkit-scrollbar-thumb:hover': {
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EditorView } from '@codemirror/view';
|
|
2
2
|
import { HighlightStyle, syntaxHighlighting } from '@codemirror/language';
|
|
3
3
|
import { tags } from '@lezer/highlight';
|
|
4
|
-
import { generalScroller, generalPlaceholder, generalMatching, generalTooltip, generalGutter, generalLine, generalPanel, generalSearchField, generalCursor, generalContent } from '
|
|
4
|
+
import { generalScroller, generalPlaceholder, generalMatching, generalTooltip, generalGutter, generalLine, generalPanel, generalSearchField, generalCursor, generalContent } from '@fsegurai/codemirror-theme-utils';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Enhanced Nord theme color definitions
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fsegurai/codemirror-theme-nord",
|
|
3
3
|
"description": "Nord theme for the CodeMirror code editor",
|
|
4
|
-
"version": "6.2.0-beta.
|
|
4
|
+
"version": "6.2.0-beta.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
7
7
|
"exports": {
|
|
@@ -34,7 +34,8 @@
|
|
|
34
34
|
"@lezer/highlight": "^1.0.0",
|
|
35
35
|
"@codemirror/language": "^6.0.0",
|
|
36
36
|
"@codemirror/state": "^6.0.0",
|
|
37
|
-
"@codemirror/view": "^6.0.0"
|
|
37
|
+
"@codemirror/view": "^6.0.0",
|
|
38
|
+
"@fsegurai/codemirror-theme-utils": "6.2.0-beta.3"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
41
|
"@codemirror/buildhelper": "^1.0.2"
|