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