@fsegurai/codemirror-theme-nord 6.2.7 → 6.4.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/README.md +40 -32
- package/dist/index.cjs +173 -440
- package/dist/index.js +173 -440
- package/package.json +4 -1
package/dist/index.js
CHANGED
|
@@ -1,60 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { EditorView } from '@codemirror/view';
|
|
3
|
-
import { tags } from '@lezer/highlight';
|
|
1
|
+
import { defineTheme } from '@fsegurai/codemirror-theme-core';
|
|
4
2
|
|
|
5
3
|
// Helper module for styling options
|
|
6
|
-
const generalContent = {
|
|
7
|
-
fontSize: '14px',
|
|
8
|
-
fontFamily: 'JetBrains Mono, Consolas, monospace',
|
|
9
|
-
lineHeight: '1.6',
|
|
10
|
-
};
|
|
11
|
-
const generalCursor = {
|
|
12
|
-
borderLeftWidth: '2px',
|
|
13
|
-
};
|
|
14
|
-
const generalDiff = {
|
|
15
|
-
insertedTextDecoration: 'none',
|
|
16
|
-
deletedTextDecoration: 'line-through',
|
|
17
|
-
insertedLinePadding: '1px 3px',
|
|
18
|
-
borderRadius: '3px'};
|
|
19
|
-
const generalGutter = {
|
|
20
|
-
border: 'none',
|
|
21
|
-
paddingRight: '8px',
|
|
22
|
-
fontSize: '0.9em',
|
|
23
|
-
fontWeight: '500',
|
|
24
|
-
lineHeight: '1.78', // Adjusted to compensate for 0.9em fontSize (1.6 / 0.9 ≈ 1.78)
|
|
25
|
-
};
|
|
26
|
-
const generalPanel = {
|
|
27
|
-
border: 'none',
|
|
28
|
-
borderRadius: '4px',
|
|
29
|
-
padding: '2px 10px',
|
|
30
|
-
};
|
|
31
|
-
const generalLine = {
|
|
32
|
-
borderRadius: '2px',
|
|
33
|
-
};
|
|
34
|
-
const generalMatching = {
|
|
35
|
-
borderRadius: '2px',
|
|
36
|
-
};
|
|
37
|
-
const generalPlaceholder = {
|
|
38
|
-
borderRadius: '4px',
|
|
39
|
-
padding: '0 5px',
|
|
40
|
-
margin: '0 2px',
|
|
41
|
-
};
|
|
42
|
-
const generalScroller = {
|
|
43
|
-
width: '12px',
|
|
44
|
-
height: '12px',
|
|
45
|
-
borderRadius: '6px',
|
|
46
|
-
};
|
|
47
|
-
const generalSearchField = {
|
|
48
|
-
borderRadius: '4px',
|
|
49
|
-
padding: '2px 6px',
|
|
50
|
-
};
|
|
51
|
-
const generalTooltip = {
|
|
52
|
-
borderRadius: '4px',
|
|
53
|
-
borderRadiusSelected: '3px',
|
|
54
|
-
lineHeight: '1.3',
|
|
55
|
-
padding: '4px 8px',
|
|
56
|
-
paddingRight: '8px',
|
|
57
|
-
};
|
|
58
4
|
/**
|
|
59
5
|
* Function to apply merge revert styles for a theme
|
|
60
6
|
* @param styles Styles for the merge revert buttons
|
|
@@ -113,419 +59,206 @@ function applyMergeRevertStyles(styles) {
|
|
|
113
59
|
const base00 = '#2e3440', // Background - deep navy blue
|
|
114
60
|
base01 = '#3b4252', // Lighter background (popups, statuslines)
|
|
115
61
|
base02 = '#434c5e', // Selection background
|
|
116
|
-
base03 = '#
|
|
62
|
+
base03 = '#acb8cf', // Comments, invisibles
|
|
117
63
|
// Snow Storm
|
|
118
64
|
base04 = '#d8dee9', // Foreground - light blue-grey
|
|
119
65
|
base05 = '#eceff4', // Light background
|
|
120
66
|
// Frost
|
|
121
|
-
base06 = '#
|
|
67
|
+
base06 = '#92c0be', // Moss green - function names
|
|
122
68
|
base07 = '#88c0d0', // Ice blue - classes, attributes
|
|
123
|
-
base08 = '#
|
|
124
|
-
base09 = '#
|
|
69
|
+
base08 = '#9abbdc', // Water blue - methods
|
|
70
|
+
base09 = '#96bbe9', // Deep blue - keywords
|
|
125
71
|
// Aurora
|
|
126
|
-
base0A = '#
|
|
127
|
-
base0B = '#
|
|
72
|
+
base0A = '#fb9ea4', // Red - errors, brackets
|
|
73
|
+
base0B = '#f1a58d', // Orange - numbers, constants
|
|
128
74
|
base0C = '#ebcb8b', // Yellow - types, classes
|
|
129
|
-
base0D = '#
|
|
130
|
-
base0E = '#
|
|
75
|
+
base0D = '#a5c08e', // Green - strings
|
|
76
|
+
base0E = '#d3accc'; // Purple - operators, special characters
|
|
131
77
|
// UI specific colors
|
|
132
78
|
const invalid = '#d30102', // Bright red for errors
|
|
133
79
|
darkBackground = '#252a33', // Darker background for panels
|
|
134
80
|
highlightBackground = '#3b425277', // Active line highlight with opacity
|
|
135
|
-
background = base00, // Main editor background
|
|
136
|
-
tooltipBackground = base01, // Tooltip background
|
|
137
|
-
selection = base02, // Selection background
|
|
138
81
|
selectionMatch = '#4c566a80', // Selection match with opacity
|
|
139
|
-
|
|
140
|
-
activeBracketBg = '#4c566a55', // Active bracket background with opacity
|
|
141
|
-
activeBracketBorder = base07, // Active bracket border - ice blue
|
|
142
|
-
diagnosticWarning = base0C, // Warning color - yellow
|
|
143
|
-
linkColor = base08, // Link color - water blue
|
|
144
|
-
visitedLinkColor = base0E; // Visited link color - purple
|
|
82
|
+
activeBracketBg = '#4c566a55'; // Active bracket background with opacity
|
|
145
83
|
// Diff/merge specific colors
|
|
146
84
|
const addedBackground = '#3b4a3880', // Dark green with transparency for insertions
|
|
147
|
-
removedBackground = '#4a393a80'
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
'.cm-selectionLayer': {
|
|
180
|
-
zIndex: 100,
|
|
181
|
-
},
|
|
182
|
-
// Search functionality
|
|
183
|
-
'.cm-searchMatch': {
|
|
184
|
-
backgroundColor: '#5e81ac80',
|
|
185
|
-
outline: `1px solid ${base06}`,
|
|
186
|
-
color: base04,
|
|
187
|
-
borderRadius: generalSearchField.borderRadius,
|
|
188
|
-
'& span': {
|
|
189
|
-
color: base04,
|
|
85
|
+
removedBackground = '#4a393a80'; // Dark red with transparency for deletions
|
|
86
|
+
const theme = /*@__PURE__*/defineTheme({
|
|
87
|
+
name: 'Nord',
|
|
88
|
+
dark: true,
|
|
89
|
+
ui: {
|
|
90
|
+
background: base00,
|
|
91
|
+
foreground: base04,
|
|
92
|
+
border: 'none',
|
|
93
|
+
cursor: base04,
|
|
94
|
+
cursorWidth: '2px',
|
|
95
|
+
cursorShadow: 'none',
|
|
96
|
+
fatCursor: { background: `${base04}99`, border: 'none' },
|
|
97
|
+
selection: '#40495b',
|
|
98
|
+
selectionInactive: '#40495b',
|
|
99
|
+
selectionForeground: null,
|
|
100
|
+
selectionOutline: 'none',
|
|
101
|
+
activeLine: highlightBackground,
|
|
102
|
+
activeLineBorder: { left: 'none', right: 'none' },
|
|
103
|
+
ghostText: base03,
|
|
104
|
+
ghostTextOpacity: '0.5',
|
|
105
|
+
specialChar: base0A,
|
|
106
|
+
focusRing: `0 0 0 2px ${base00}, 0 0 0 4px ${base07}`,
|
|
107
|
+
outlineWidth: '1px',
|
|
108
|
+
searchMatch: {
|
|
109
|
+
background: `${base09}80`,
|
|
110
|
+
outline: base06,
|
|
111
|
+
foreground: base04,
|
|
112
|
+
shadow: 'none',
|
|
113
|
+
selectedBackground: base08,
|
|
114
|
+
selectedForeground: base05,
|
|
115
|
+
selectedOutline: `1px solid ${base06}`,
|
|
116
|
+
selectedShadow: 'none',
|
|
190
117
|
},
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
118
|
+
selectionMatch: { background: selectionMatch, outline: `${base02}50` },
|
|
119
|
+
matchingBracket: { background: activeBracketBg, outline: base07, shadow: 'none' },
|
|
120
|
+
nonMatchingBracket: { background: `${base0A}40`, outline: invalid },
|
|
121
|
+
panel: {
|
|
122
|
+
background: darkBackground,
|
|
123
|
+
foreground: base04,
|
|
124
|
+
border: base03,
|
|
125
|
+
borderWidth: '1px',
|
|
126
|
+
outline: 'none',
|
|
127
|
+
shadow: 'none',
|
|
128
|
+
buttonBackground: base01,
|
|
129
|
+
buttonForeground: base04,
|
|
130
|
+
buttonBorder: 'none',
|
|
131
|
+
buttonHoverBackground: base02,
|
|
132
|
+
buttonHoverForeground: base04,
|
|
133
|
+
buttonHoverBorder: 'none',
|
|
134
|
+
buttonHoverShadow: 'none',
|
|
135
|
+
inputBackground: base00,
|
|
136
|
+
inputBorder: `1px solid ${base03}`,
|
|
198
137
|
},
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
color: base04,
|
|
209
|
-
borderRadius: '4px',
|
|
210
|
-
},
|
|
211
|
-
'.cm-panels.cm-panels-top': {
|
|
212
|
-
borderBottom: `1px solid ${base03}`,
|
|
213
|
-
},
|
|
214
|
-
'.cm-panels.cm-panels-bottom': {
|
|
215
|
-
borderTop: `1px solid ${base03}`,
|
|
216
|
-
},
|
|
217
|
-
'.cm-panel button': {
|
|
218
|
-
backgroundColor: tooltipBackground,
|
|
219
|
-
color: base04,
|
|
220
|
-
border: generalPanel.border,
|
|
221
|
-
borderRadius: generalPanel.borderRadius,
|
|
222
|
-
padding: generalPanel.padding,
|
|
223
|
-
},
|
|
224
|
-
'.cm-panel button:hover': {
|
|
225
|
-
backgroundColor: base02,
|
|
226
|
-
},
|
|
227
|
-
// Line highlighting
|
|
228
|
-
'.cm-activeLine': {
|
|
229
|
-
backgroundColor: highlightBackground,
|
|
230
|
-
borderRadius: generalLine.borderRadius,
|
|
231
|
-
zIndex: 1,
|
|
232
|
-
},
|
|
233
|
-
// Gutters
|
|
234
|
-
'.cm-gutters': {
|
|
235
|
-
backgroundColor: darkBackground,
|
|
236
|
-
color: base03,
|
|
237
|
-
border: generalGutter.border,
|
|
238
|
-
borderRight: `1px solid ${base02}`,
|
|
239
|
-
paddingRight: generalGutter.paddingRight,
|
|
240
|
-
},
|
|
241
|
-
'.cm-activeLineGutter': {
|
|
242
|
-
backgroundColor: base01,
|
|
243
|
-
color: base04,
|
|
244
|
-
fontWeight: generalGutter.fontWeight,
|
|
245
|
-
},
|
|
246
|
-
'.cm-lineNumbers': {
|
|
247
|
-
fontSize: generalGutter.fontSize,
|
|
248
|
-
lineHeight: generalGutter.lineHeight,
|
|
249
|
-
},
|
|
250
|
-
'.cm-foldGutter': {
|
|
251
|
-
fontSize: generalGutter.fontSize,
|
|
252
|
-
lineHeight: generalGutter.lineHeight,
|
|
253
|
-
},
|
|
254
|
-
'.cm-foldGutter .cm-gutterElement': {
|
|
255
|
-
color: base03,
|
|
256
|
-
cursor: 'pointer',
|
|
257
|
-
},
|
|
258
|
-
'.cm-foldGutter .cm-gutterElement:hover': {
|
|
259
|
-
color: base04,
|
|
260
|
-
},
|
|
261
|
-
// Diff/Merge View Styles
|
|
262
|
-
// Inserted/Added Content
|
|
263
|
-
'.cm-insertedLine': {
|
|
264
|
-
textDecoration: generalDiff.insertedTextDecoration,
|
|
265
|
-
backgroundColor: addedBackground,
|
|
266
|
-
color: addedText,
|
|
267
|
-
padding: generalDiff.insertedLinePadding,
|
|
268
|
-
borderRadius: generalDiff.borderRadius,
|
|
269
|
-
},
|
|
270
|
-
'ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))': {
|
|
271
|
-
textDecoration: generalDiff.insertedTextDecoration,
|
|
272
|
-
backgroundColor: `${addedBackground} !important`,
|
|
273
|
-
color: addedText,
|
|
274
|
-
padding: generalDiff.insertedLinePadding,
|
|
275
|
-
borderRadius: generalDiff.borderRadius,
|
|
276
|
-
border: `1px solid ${addedText}40`,
|
|
277
|
-
},
|
|
278
|
-
'ins.cm-insertedLine .cm-changedText': {
|
|
279
|
-
background: 'transparent !important',
|
|
280
|
-
},
|
|
281
|
-
// Deleted/Removed Content
|
|
282
|
-
'.cm-deletedLine': {
|
|
283
|
-
textDecoration: generalDiff.deletedTextDecoration,
|
|
284
|
-
backgroundColor: removedBackground,
|
|
285
|
-
color: removedText,
|
|
286
|
-
padding: generalDiff.insertedLinePadding,
|
|
287
|
-
borderRadius: generalDiff.borderRadius,
|
|
288
|
-
},
|
|
289
|
-
'del.cm-deletedLine, del, del:not(:has(.cm-deletedText))': {
|
|
290
|
-
textDecoration: generalDiff.deletedTextDecoration,
|
|
291
|
-
backgroundColor: `${removedBackground} !important`,
|
|
292
|
-
color: removedText,
|
|
293
|
-
padding: generalDiff.insertedLinePadding,
|
|
294
|
-
borderRadius: generalDiff.borderRadius,
|
|
295
|
-
border: `1px solid ${removedText}40`,
|
|
296
|
-
},
|
|
297
|
-
'del .cm-deletedText, del .cm-changedText': {
|
|
298
|
-
background: 'transparent !important',
|
|
299
|
-
},
|
|
300
|
-
// Tooltips and autocomplete
|
|
301
|
-
'.cm-tooltip': {
|
|
302
|
-
backgroundColor: tooltipBackground,
|
|
303
|
-
border: `1px solid ${base03}`,
|
|
304
|
-
borderRadius: generalTooltip.borderRadius,
|
|
305
|
-
padding: generalTooltip.padding,
|
|
306
|
-
boxShadow: '0 2px 8px rgba(0, 0, 0, 0.3)',
|
|
307
|
-
},
|
|
308
|
-
'.cm-tooltip-autocomplete': {
|
|
309
|
-
'& > ul': {
|
|
310
|
-
backgroundColor: tooltipBackground,
|
|
311
|
-
border: 'none',
|
|
312
|
-
},
|
|
313
|
-
'& > ul > li': {
|
|
314
|
-
padding: generalTooltip.padding,
|
|
315
|
-
lineHeight: generalTooltip.lineHeight,
|
|
138
|
+
gutter: {
|
|
139
|
+
background: darkBackground,
|
|
140
|
+
foreground: base03,
|
|
141
|
+
border: base02,
|
|
142
|
+
activeBackground: base01,
|
|
143
|
+
activeForeground: base04,
|
|
144
|
+
activeFontWeight: '500',
|
|
145
|
+
activeBorder: 'none',
|
|
146
|
+
foldHover: base04,
|
|
316
147
|
},
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
148
|
+
foldPlaceholder: { background: base01, foreground: base03, border: `${base03}70`, borderStyle: 'dotted' },
|
|
149
|
+
tooltip: {
|
|
150
|
+
background: base01,
|
|
151
|
+
foreground: base04,
|
|
152
|
+
border: base03,
|
|
153
|
+
shadow: '0 2px 8px rgba(0, 0, 0, 0.3)',
|
|
154
|
+
listBackground: base01,
|
|
155
|
+
listBorder: 'none',
|
|
156
|
+
hoverBackground: 'transparent',
|
|
157
|
+
selectedBackground: base02,
|
|
158
|
+
selectedForeground: base05,
|
|
159
|
+
selectedBorder: 'none',
|
|
160
|
+
icon: base03,
|
|
161
|
+
detail: base03,
|
|
321
162
|
},
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
163
|
+
diff: {
|
|
164
|
+
insertedBackground: addedBackground,
|
|
165
|
+
insertedForeground: base0D,
|
|
166
|
+
insertedBorder: `1px solid ${base0D}40`,
|
|
167
|
+
deletedBackground: removedBackground,
|
|
168
|
+
deletedForeground: base0A,
|
|
169
|
+
deletedBorder: `1px solid ${base0A}40`,
|
|
325
170
|
},
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
171
|
+
diagnostic: {
|
|
172
|
+
error: base0A,
|
|
173
|
+
warning: base0C,
|
|
174
|
+
info: base08,
|
|
175
|
+
hint: base08,
|
|
176
|
+
errorBackground: 'transparent',
|
|
177
|
+
warningBackground: 'transparent',
|
|
178
|
+
infoBackground: 'transparent',
|
|
179
|
+
borderWidth: '3px',
|
|
180
|
+
underlineWidth: '2px',
|
|
329
181
|
},
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
borderBottomColor: tooltipBackground,
|
|
338
|
-
},
|
|
339
|
-
// Diagnostics styling
|
|
340
|
-
'.cm-diagnostic': {
|
|
341
|
-
'&-error': {
|
|
342
|
-
borderLeft: `3px solid ${base0A}`,
|
|
182
|
+
scrollbar: {
|
|
183
|
+
track: darkBackground,
|
|
184
|
+
trackBorder: 'none',
|
|
185
|
+
thumb: base02,
|
|
186
|
+
thumbBorder: `3px solid ${darkBackground}`,
|
|
187
|
+
thumbHover: base03,
|
|
188
|
+
thumbHoverShadow: 'none',
|
|
343
189
|
},
|
|
344
|
-
|
|
345
|
-
|
|
190
|
+
merge: {
|
|
191
|
+
backgroundColor: darkBackground,
|
|
192
|
+
borderColor: base03,
|
|
193
|
+
buttonColor: base04,
|
|
194
|
+
buttonHoverColor: base02,
|
|
346
195
|
},
|
|
347
|
-
'&-info': {
|
|
348
|
-
borderLeft: `3px solid ${linkColor}`,
|
|
349
|
-
},
|
|
350
|
-
},
|
|
351
|
-
'.cm-lintPoint-error': {
|
|
352
|
-
borderBottom: `2px wavy ${base0A}`,
|
|
353
|
-
},
|
|
354
|
-
'.cm-lintPoint-warning': {
|
|
355
|
-
borderBottom: `2px wavy ${diagnosticWarning}`,
|
|
356
|
-
},
|
|
357
|
-
// Matching brackets
|
|
358
|
-
'.cm-matchingBracket': {
|
|
359
|
-
backgroundColor: activeBracketBg,
|
|
360
|
-
outline: `1px solid ${activeBracketBorder}`,
|
|
361
|
-
borderRadius: generalMatching.borderRadius,
|
|
362
|
-
},
|
|
363
|
-
'.cm-nonmatchingBracket': {
|
|
364
|
-
backgroundColor: `${base0A}40`,
|
|
365
|
-
outline: `1px solid ${invalid}`,
|
|
366
|
-
borderRadius: generalMatching.borderRadius,
|
|
367
|
-
},
|
|
368
|
-
// Selection matches
|
|
369
|
-
'.cm-selectionMatch': {
|
|
370
|
-
backgroundColor: selectionMatch,
|
|
371
|
-
outline: `1px solid ${base02}50`,
|
|
372
|
-
borderRadius: generalMatching.borderRadius,
|
|
373
196
|
},
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
color:
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
color: base03,
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
{ tag: [/*@__PURE__*/tags.function(tags.variableName), tags.labelName], color: base06 },
|
|
433
|
-
{ tag: [/*@__PURE__*/tags.definition(/*@__PURE__*/tags.function(tags.variableName))], color: base06 },
|
|
434
|
-
{ tag: [/*@__PURE__*/tags.definition(tags.variableName)], color: base0B },
|
|
435
|
-
// Constants and literals
|
|
436
|
-
{ tag: tags.number, color: base0B },
|
|
437
|
-
{ tag: tags.changed, color: base0E },
|
|
438
|
-
{ tag: tags.annotation, color: base0A, fontStyle: 'italic' },
|
|
439
|
-
{ tag: tags.modifier, color: base0E, fontStyle: 'italic' },
|
|
440
|
-
{ tag: tags.self, color: base0E },
|
|
441
|
-
{ tag: [tags.color, /*@__PURE__*/tags.constant(tags.name), /*@__PURE__*/tags.standard(tags.name)], color: base0B },
|
|
442
|
-
{ tag: [tags.atom, tags.bool, /*@__PURE__*/tags.special(tags.variableName)], color: base0E },
|
|
443
|
-
// Strings and regex
|
|
444
|
-
{ tag: [tags.processingInstruction, tags.inserted], color: base06 },
|
|
445
|
-
{ tag: [/*@__PURE__*/tags.special(tags.string), tags.regexp], color: base0E },
|
|
446
|
-
{ tag: tags.string, color: base0D },
|
|
447
|
-
// Punctuation and structure
|
|
448
|
-
{ tag: /*@__PURE__*/tags.definition(tags.typeName), color: base0C, fontWeight: 'bold' },
|
|
449
|
-
{ tag: [/*@__PURE__*/tags.definition(tags.name), tags.separator], color: base0D },
|
|
450
|
-
// Comments and documentation
|
|
451
|
-
{ tag: tags.meta, color: base03 },
|
|
452
|
-
{ tag: tags.comment, fontStyle: 'italic', color: base03 },
|
|
453
|
-
{ tag: tags.docComment, fontStyle: 'italic', color: base03 },
|
|
454
|
-
// HTML/XML elements
|
|
455
|
-
{ tag: [tags.tagName], color: base0A },
|
|
456
|
-
{ tag: [tags.attributeName], color: base0C },
|
|
457
|
-
// Markdown and text formatting
|
|
458
|
-
{ tag: [tags.heading], fontWeight: 'bold', color: base08 },
|
|
459
|
-
{ tag: [tags.strong], fontWeight: 'bold', color: base07 },
|
|
460
|
-
{ tag: [tags.emphasis], fontStyle: 'italic', color: base0C },
|
|
461
|
-
// Links and URLs
|
|
462
|
-
{
|
|
463
|
-
tag: [tags.link],
|
|
464
|
-
color: visitedLinkColor,
|
|
465
|
-
fontWeight: '500',
|
|
466
|
-
textDecoration: 'underline',
|
|
467
|
-
textUnderlinePosition: 'under',
|
|
468
|
-
},
|
|
469
|
-
{
|
|
470
|
-
tag: [tags.url],
|
|
471
|
-
color: linkColor,
|
|
472
|
-
textDecoration: 'underline',
|
|
473
|
-
textUnderlineOffset: '2px',
|
|
474
|
-
},
|
|
475
|
-
// Special states
|
|
476
|
-
{
|
|
477
|
-
tag: [tags.invalid],
|
|
478
|
-
color: base04,
|
|
479
|
-
textDecoration: 'underline wavy',
|
|
480
|
-
borderBottom: `1px wavy ${base0A}`,
|
|
481
|
-
},
|
|
482
|
-
{ tag: [tags.strikethrough], color: base0A, textDecoration: 'line-through' },
|
|
483
|
-
// Enhanced syntax highlighting
|
|
484
|
-
{ tag: /*@__PURE__*/tags.constant(tags.name), color: base0B },
|
|
485
|
-
{ tag: tags.deleted, color: base0A },
|
|
486
|
-
{ tag: tags.squareBracket, color: base0A },
|
|
487
|
-
{ tag: tags.angleBracket, color: base0B },
|
|
488
|
-
// Additional specific styles
|
|
489
|
-
{ tag: tags.monospace, color: base04, fontStyle: 'italic' },
|
|
490
|
-
{ tag: [tags.contentSeparator], color: base08 },
|
|
491
|
-
{ tag: tags.quote, color: base0E },
|
|
492
|
-
{ tag: tags.integer, color: base0B },
|
|
493
|
-
{ tag: tags.float, color: base0B },
|
|
494
|
-
{ tag: tags.null, color: base0B },
|
|
495
|
-
{ tag: tags.attributeValue, color: base0D },
|
|
496
|
-
{ tag: tags.escape, color: base0D },
|
|
497
|
-
{ tag: tags.paren, color: base04 },
|
|
498
|
-
{ tag: tags.lineComment, color: base03, fontStyle: 'italic' },
|
|
499
|
-
{ tag: tags.blockComment, color: base03, fontStyle: 'italic' },
|
|
500
|
-
{ tag: tags.definitionKeyword, color: base09 },
|
|
501
|
-
{ tag: tags.arithmeticOperator, color: base0E },
|
|
502
|
-
{ tag: tags.logicOperator, color: base0E },
|
|
503
|
-
{ tag: tags.compareOperator, color: base0E },
|
|
504
|
-
{ tag: tags.bitwiseOperator, color: base0E },
|
|
505
|
-
{ tag: tags.updateOperator, color: base0E },
|
|
506
|
-
{ tag: tags.derefOperator, color: base0E },
|
|
507
|
-
{ tag: /*@__PURE__*/tags.local(tags.variableName), color: base0B },
|
|
508
|
-
{ tag: tags.list, color: base08 },
|
|
509
|
-
{ tag: tags.unit, color: base0B },
|
|
510
|
-
{ tag: tags.heading1, color: base08 },
|
|
511
|
-
{ tag: tags.heading2, color: base08 },
|
|
512
|
-
{ tag: tags.heading3, color: base08 },
|
|
513
|
-
{ tag: tags.heading4, color: base08 },
|
|
514
|
-
{ tag: tags.heading5, color: base08 },
|
|
515
|
-
{ tag: tags.heading6, color: base08 },
|
|
516
|
-
]);
|
|
197
|
+
syntax: {
|
|
198
|
+
keyword: { color: base09, fontWeight: 'bold' },
|
|
199
|
+
definitionKeyword: { color: base09 },
|
|
200
|
+
modifier: { color: base0E, fontStyle: 'italic' },
|
|
201
|
+
separator: { color: base0D },
|
|
202
|
+
angleBracket: { color: base0B },
|
|
203
|
+
squareBracket: { color: base0A },
|
|
204
|
+
brace: { color: base06 },
|
|
205
|
+
operator: { color: base0E },
|
|
206
|
+
punctuation: { color: base04 },
|
|
207
|
+
name: { color: base07 },
|
|
208
|
+
variable: { color: base04 },
|
|
209
|
+
localVariable: { color: base0B },
|
|
210
|
+
variableDefinition: { color: base0B },
|
|
211
|
+
nameDefinition: { color: base0D },
|
|
212
|
+
function: { color: base06 },
|
|
213
|
+
self: { color: base0E },
|
|
214
|
+
label: { color: base06 },
|
|
215
|
+
property: { color: base07, fontStyle: 'normal' },
|
|
216
|
+
type: { color: base0C },
|
|
217
|
+
typeDefinition: { color: base0C, fontWeight: 'bold' },
|
|
218
|
+
className: { color: base0C, fontStyle: 'italic' },
|
|
219
|
+
namespace: { color: base08, fontStyle: 'italic' },
|
|
220
|
+
tag: { color: base0A },
|
|
221
|
+
attribute: { color: base0C },
|
|
222
|
+
content: { color: base04 },
|
|
223
|
+
string: { color: base0D },
|
|
224
|
+
regexp: { color: base0E },
|
|
225
|
+
atom: { color: base0E },
|
|
226
|
+
specialVariable: { color: base0E },
|
|
227
|
+
number: { color: base0B },
|
|
228
|
+
constant: { color: base0B },
|
|
229
|
+
comment: { fontStyle: 'italic', color: base03 },
|
|
230
|
+
meta: { color: base03 },
|
|
231
|
+
processingInstruction: { color: base06 },
|
|
232
|
+
annotation: { color: base0A, fontStyle: 'italic' },
|
|
233
|
+
heading: { fontWeight: 'bold', color: base08 },
|
|
234
|
+
headingLevel: { color: base08 },
|
|
235
|
+
list: { color: base08 },
|
|
236
|
+
quote: { color: base0E },
|
|
237
|
+
monospace: { color: base04, fontStyle: 'italic' },
|
|
238
|
+
contentSeparator: { color: base08 },
|
|
239
|
+
link: {
|
|
240
|
+
color: base0E,
|
|
241
|
+
fontWeight: '500',
|
|
242
|
+
textDecoration: 'underline',
|
|
243
|
+
textUnderlinePosition: 'under',
|
|
244
|
+
},
|
|
245
|
+
url: { color: base08, textDecoration: 'underline', textUnderlineOffset: '2px' },
|
|
246
|
+
emphasis: { fontStyle: 'italic', color: base0C },
|
|
247
|
+
strong: { fontWeight: 'bold', color: base07 },
|
|
248
|
+
strikethrough: { color: base0A, textDecoration: 'line-through' },
|
|
249
|
+
invalid: { color: base04, textDecoration: 'underline wavy', borderBottom: `1px wavy ${base0A}` },
|
|
250
|
+
inserted: { color: base06 },
|
|
251
|
+
deleted: { color: base0A },
|
|
252
|
+
changed: { color: base0E },
|
|
253
|
+
},
|
|
254
|
+
});
|
|
517
255
|
/**
|
|
518
256
|
* Combined Nord theme extension
|
|
519
257
|
*/
|
|
520
|
-
const nord =
|
|
258
|
+
const nord = theme.extension;
|
|
521
259
|
/**
|
|
522
260
|
* Nord merge revert styles configuration
|
|
523
261
|
*/
|
|
524
|
-
const nordMergeStyles =
|
|
525
|
-
backgroundColor: darkBackground,
|
|
526
|
-
borderColor: base03,
|
|
527
|
-
buttonColor: base04,
|
|
528
|
-
buttonHoverColor: base02,
|
|
529
|
-
};
|
|
262
|
+
const nordMergeStyles = theme.mergeStyles;
|
|
530
263
|
|
|
531
264
|
export { applyMergeRevertStyles, nord, nordMergeStyles };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fsegurai/codemirror-theme-nord",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.4.0",
|
|
4
4
|
"description": "Nord theme for the CodeMirror editor",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -47,6 +47,9 @@
|
|
|
47
47
|
"@codemirror/state": "^6.0.0",
|
|
48
48
|
"@codemirror/view": "^6.0.0"
|
|
49
49
|
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@fsegurai/codemirror-theme-core": "6.0.0"
|
|
52
|
+
},
|
|
50
53
|
"devDependencies": {
|
|
51
54
|
"@codemirror/buildhelper": "^1.0.2"
|
|
52
55
|
},
|