@fsegurai/codemirror-theme-solarized-dark 6.2.0-beta.4 → 6.2.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/dist/index.cjs CHANGED
@@ -3,7 +3,107 @@
3
3
  var view = require('@codemirror/view');
4
4
  var language = require('@codemirror/language');
5
5
  var highlight = require('@lezer/highlight');
6
- var codemirrorThemeUtils = require('@fsegurai/codemirror-theme-utils');
6
+
7
+ // 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
+ borderRadious: '3px'};
21
+ const generalGutter = {
22
+ border: 'none',
23
+ paddingRight: '8px',
24
+ fontSize: '0.9em',
25
+ fontWeight: '500',
26
+ };
27
+ const generalPanel = {
28
+ border: 'none',
29
+ borderRadius: '4px',
30
+ padding: '2px 10px',
31
+ };
32
+ const generalLine = {
33
+ borderRadius: '2px',
34
+ };
35
+ const generalMatching = {
36
+ borderRadius: '2px',
37
+ };
38
+ const generalPlaceholder = {
39
+ borderRadius: '4px',
40
+ padding: '0 5px',
41
+ margin: '0 2px',
42
+ };
43
+ const generalScroller = {
44
+ width: '12px',
45
+ height: '12px',
46
+ borderRadius: '6px',
47
+ };
48
+ const generalSearchField = {
49
+ borderRadius: '4px',
50
+ padding: '2px 6px',
51
+ };
52
+ const generalTooltip = {
53
+ borderRadius: '4px',
54
+ borderRadiusSelected: '3px',
55
+ lineHeight: '1.3',
56
+ padding: '4px 8px',
57
+ paddingRight: '8px',
58
+ };
59
+ /**
60
+ * Function to apply merge revert styles for a theme
61
+ * @param styles Styles for the merge revert buttons
62
+ * @param styles.backgroundColor Background color of the revert area
63
+ * @param styles.borderColor Border color of the revert area
64
+ * @param styles.buttonColor Color of the revert buttons
65
+ * @param styles.buttonHoverColor Hover color of the revert buttons
66
+ */
67
+ function applyMergeRevertStyles(styles) {
68
+ // Create a stylesheet
69
+ const styleEl = document.createElement('style');
70
+ styleEl.id = 'cm-merge-revert-styles';
71
+ // Define CSS with the theme-specific values
72
+ styleEl.textContent = `
73
+ .cm-merge-revert {
74
+ display: flex;
75
+ flex-direction: column;
76
+ align-items: center;
77
+ justify-content: flex-start;
78
+ padding: 4px;
79
+ background-color: ${styles.backgroundColor};
80
+ border-left: 1px solid ${styles.borderColor};
81
+ border-right: 1px solid ${styles.borderColor};
82
+ width: 32px;
83
+ }
84
+
85
+ .cm-merge-revert button {
86
+ width: 100%;
87
+ height: auto;
88
+ background-color: transparent;
89
+ border: none;
90
+ color: ${styles.buttonColor};
91
+ cursor: pointer;
92
+ margin: 0 auto;
93
+ font-size: 20px;
94
+ }
95
+
96
+ .cm-merge-revert button:hover {
97
+ background-color: ${styles.buttonHoverColor};
98
+ }
99
+ `;
100
+ // Remove any existing merge styles
101
+ const existingStyle = document.getElementById('cm-merge-revert-styles');
102
+ if (existingStyle)
103
+ existingStyle.remove();
104
+ // Add the new styles
105
+ document.head.appendChild(styleEl);
106
+ }
7
107
 
8
108
  /**
9
109
  * Enhanced Solarized Dark theme color definitions
@@ -11,37 +111,41 @@ var codemirrorThemeUtils = require('@fsegurai/codemirror-theme-utils');
11
111
  * Colors organized by function with visual color blocks
12
112
  */
13
113
  // Base colors from Solarized palette
14
- const base00 = '#002b36'; // Background - dark blue
15
- const base01 = '#073642'; // Lighter background (popups, statuslines)
16
- const base02 = '#586e75'; // Selection background
17
- const base03 = '#657b83'; // Comments, invisibles
18
- const base04 = '#839496'; // Body text
19
- const base05 = '#93a1a1'; // Default foreground
20
- const base06 = '#eee8d5'; // Light foreground
21
- const base07 = '#fdf6e3'; // Light background
114
+ const base00 = '#002b36', // Background - dark blue
115
+ base01 = '#073642', // Lighter background (popups, statuslines)
116
+ base02 = '#586e75', // Selection background
117
+ base03 = '#657b83', // Comments, invisibles
118
+ base04 = '#839496', // Body text
119
+ base05 = '#93a1a1', // Default foreground
120
+ base06 = '#eee8d5', // Light foreground
121
+ base07 = '#fdf6e3', // Light background
22
122
  // Accent colors from Solarized palette
23
- const base_red = '#dc322f'; // Red
24
- const base_orange = '#cb4b16'; // Orange
25
- const base_yellow = '#b58900'; // Yellow
26
- const base_green = '#859900'; // Green
27
- const base_cyan = '#2aa198'; // Cyan
28
- const base_blue = '#268bd2'; // Blue
29
- const base_violet = '#6c71c4'; // Violet
30
- const base_magenta = '#d33682'; // Magenta
123
+ base08 = '#dc322f', // Red
124
+ base09 = '#cb4b16', // Orange
125
+ base0A = '#b58900', // Yellow
126
+ base0B = '#859900', // Green
127
+ base0C = '#2aa198', // Cyan
128
+ base0D = '#268bd2', // Blue
129
+ base0E = '#6c71c4', // Violet
130
+ base0F = '#d33682'; // Magenta
31
131
  // UI specific colors
32
- const invalid = '#d30102'; // Bright red for errors
33
- const darkBackground = '#00252f'; // Darker background for panels
34
- const highlightBackground = '#99eeff0f'; // Active line highlight
35
- const background = base00; // Main editor background
36
- const tooltipBackground = base01; // Tooltip background
37
- const selection = '#02B8FF3F'; // Selection background with opacity
38
- const selectionMatch = '#586e7580'; // Selection match with opacity
39
- const cursor = base04; // Cursor color
40
- const activeBracketBg = '#586e7540'; // Active bracket background with opacity
41
- const activeBracketBorder = base_blue; // Active bracket border - blue
42
- const diagnosticWarning = base_yellow; // Warning color - yellow
43
- const linkColor = base_blue; // Link color - blue
44
- // const visitedLinkColor = base_violet; // Visited link color - violet
132
+ const invalid = '#d30102', // Bright red for errors
133
+ darkBackground = '#00252f', // Darker background for panels
134
+ highlightBackground = '#99eeff0f', // Active line highlight
135
+ background = base00, // Main editor background
136
+ tooltipBackground = base01, // Tooltip background
137
+ selection = '#02B8FF3F', // Selection background with opacity
138
+ selectionMatch = '#586e7580', // Selection match with opacity
139
+ cursor = base04, // Cursor color
140
+ activeBracketBg = '#586e7540', // Active bracket background with opacity
141
+ activeBracketBorder = base0D, // Active bracket border - blue
142
+ diagnosticWarning = base0A, // Warning color - yellow
143
+ linkColor = base0D; // Link color - blue
144
+ // Diff/merge specific colors
145
+ const addedBackground = '#2aa19820', // Solarized cyan with transparency for insertions
146
+ removedBackground = '#dc322f20', // Solarized red with transparency for deletions
147
+ addedText = '#859900', // Solarized green for added text
148
+ removedText = '#dc322f'; // Solarized red for removed text
45
149
  /**
46
150
  * Enhanced editor theme styles for Solarized Dark
47
151
  */
@@ -50,17 +154,17 @@ const solarizedDarkTheme = view.EditorView.theme({
50
154
  '&': {
51
155
  color: base05,
52
156
  backgroundColor: background,
53
- fontSize: codemirrorThemeUtils.generalContent.fontSize,
54
- fontFamily: codemirrorThemeUtils.generalContent.fontFamily,
157
+ fontSize: generalContent.fontSize,
158
+ fontFamily: generalContent.fontFamily,
55
159
  },
56
160
  // Content and cursor
57
161
  '.cm-content': {
58
162
  caretColor: cursor,
59
- lineHeight: codemirrorThemeUtils.generalContent.lineHeight,
163
+ lineHeight: generalContent.lineHeight,
60
164
  },
61
165
  '.cm-cursor, .cm-dropCursor': {
62
166
  borderLeftColor: cursor,
63
- borderLeftWidth: codemirrorThemeUtils.generalCursor.borderLeftWidth,
167
+ borderLeftWidth: generalCursor.borderLeftWidth,
64
168
  },
65
169
  '.cm-fat-cursor': {
66
170
  backgroundColor: `${cursor}99`,
@@ -77,25 +181,25 @@ const solarizedDarkTheme = view.EditorView.theme({
77
181
  // Search functionality
78
182
  '.cm-searchMatch': {
79
183
  backgroundColor: '#586e7599',
80
- outline: `1px solid ${base_blue}`,
184
+ outline: `1px solid ${base0D}`,
81
185
  color: base06,
82
- borderRadius: codemirrorThemeUtils.generalSearchField.borderRadius,
186
+ borderRadius: generalSearchField.borderRadius,
83
187
  '& span': {
84
188
  color: base06,
85
189
  },
86
190
  },
87
191
  '.cm-searchMatch.cm-searchMatch-selected': {
88
- backgroundColor: base_blue,
192
+ backgroundColor: base0D,
89
193
  color: base07,
90
- padding: codemirrorThemeUtils.generalSearchField.padding,
194
+ padding: generalSearchField.padding,
91
195
  '& span': {
92
196
  color: base07,
93
197
  },
94
198
  },
95
199
  '.cm-search.cm-panel.cm-textfield': {
96
200
  color: base05,
97
- borderRadius: codemirrorThemeUtils.generalSearchField.borderRadius,
98
- padding: codemirrorThemeUtils.generalSearchField.padding,
201
+ borderRadius: generalSearchField.borderRadius,
202
+ padding: generalSearchField.padding,
99
203
  },
100
204
  // Panels
101
205
  '.cm-panels': {
@@ -112,9 +216,9 @@ const solarizedDarkTheme = view.EditorView.theme({
112
216
  '.cm-panel button': {
113
217
  backgroundColor: tooltipBackground,
114
218
  color: base05,
115
- border: codemirrorThemeUtils.generalPanel.border,
116
- borderRadius: codemirrorThemeUtils.generalPanel.borderRadius,
117
- padding: codemirrorThemeUtils.generalPanel.padding,
219
+ border: generalPanel.border,
220
+ borderRadius: generalPanel.borderRadius,
221
+ padding: generalPanel.padding,
118
222
  },
119
223
  '.cm-panel button:hover': {
120
224
  backgroundColor: highlightBackground,
@@ -122,27 +226,27 @@ const solarizedDarkTheme = view.EditorView.theme({
122
226
  // Line highlighting
123
227
  '.cm-activeLine': {
124
228
  backgroundColor: highlightBackground,
125
- borderRadius: codemirrorThemeUtils.generalLine.borderRadius,
229
+ borderRadius: generalLine.borderRadius,
126
230
  zIndex: 1,
127
231
  },
128
232
  // Gutters
129
233
  '.cm-gutters': {
130
234
  backgroundColor: darkBackground,
131
235
  color: base02,
132
- border: codemirrorThemeUtils.generalGutter.border,
236
+ border: generalGutter.border,
133
237
  borderRight: `1px solid ${base01}`,
134
- paddingRight: codemirrorThemeUtils.generalGutter.paddingRight,
238
+ paddingRight: generalGutter.paddingRight,
135
239
  },
136
240
  '.cm-activeLineGutter': {
137
241
  backgroundColor: base01,
138
242
  color: base05,
139
- fontWeight: codemirrorThemeUtils.generalGutter.fontWeight,
243
+ fontWeight: generalGutter.fontWeight,
140
244
  },
141
245
  '.cm-lineNumbers': {
142
- fontSize: codemirrorThemeUtils.generalGutter.fontSize,
246
+ fontSize: generalGutter.fontSize,
143
247
  },
144
248
  '.cm-foldGutter': {
145
- fontSize: codemirrorThemeUtils.generalGutter.fontSize,
249
+ fontSize: generalGutter.fontSize,
146
250
  },
147
251
  '.cm-foldGutter .cm-gutterElement': {
148
252
  color: base02,
@@ -151,12 +255,51 @@ const solarizedDarkTheme = view.EditorView.theme({
151
255
  '.cm-foldGutter .cm-gutterElement:hover': {
152
256
  color: base04,
153
257
  },
258
+ // Diff/Merge View Styles
259
+ // Inserted/Added Content
260
+ '.cm-insertedLine': {
261
+ textDecoration: generalDiff.insertedTextDecoration,
262
+ backgroundColor: addedBackground,
263
+ color: addedText,
264
+ padding: generalDiff.insertedLinePadding,
265
+ borderRadius: generalDiff.borderRadious,
266
+ },
267
+ 'ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))': {
268
+ textDecoration: generalDiff.insertedTextDecoration,
269
+ backgroundColor: `${addedBackground} !important`,
270
+ color: addedText,
271
+ padding: generalDiff.insertedLinePadding,
272
+ borderRadius: generalDiff.borderRadious,
273
+ border: `1px solid ${addedText}40`,
274
+ },
275
+ 'ins.cm-insertedLine .cm-changedText': {
276
+ background: 'transparent !important',
277
+ },
278
+ // Deleted/Removed Content
279
+ '.cm-deletedLine': {
280
+ textDecoration: generalDiff.deletedTextDecoration,
281
+ backgroundColor: removedBackground,
282
+ color: removedText,
283
+ padding: generalDiff.insertedLinePadding,
284
+ borderRadius: generalDiff.borderRadious,
285
+ },
286
+ 'del.cm-deletedLine, del, del:not(:has(.cm-deletedText))': {
287
+ textDecoration: generalDiff.deletedTextDecoration,
288
+ backgroundColor: `${removedBackground} !important`,
289
+ color: removedText,
290
+ padding: generalDiff.insertedLinePadding,
291
+ borderRadius: generalDiff.borderRadious,
292
+ border: `1px solid ${removedText}40`,
293
+ },
294
+ 'del .cm-deletedText, del .cm-changedText': {
295
+ background: 'transparent !important',
296
+ },
154
297
  // Tooltips and autocomplete
155
298
  '.cm-tooltip': {
156
299
  backgroundColor: tooltipBackground,
157
300
  border: `1px solid ${base02}`,
158
- borderRadius: codemirrorThemeUtils.generalTooltip.borderRadius,
159
- padding: codemirrorThemeUtils.generalTooltip.padding,
301
+ borderRadius: generalTooltip.borderRadius,
302
+ padding: generalTooltip.padding,
160
303
  boxShadow: '0 2px 8px rgba(0, 0, 0, 0.3)',
161
304
  },
162
305
  '.cm-tooltip-autocomplete': {
@@ -165,17 +308,17 @@ const solarizedDarkTheme = view.EditorView.theme({
165
308
  border: 'none',
166
309
  },
167
310
  '& > ul > li': {
168
- padding: codemirrorThemeUtils.generalTooltip.padding,
169
- lineHeight: codemirrorThemeUtils.generalTooltip.lineHeight,
311
+ padding: generalTooltip.padding,
312
+ lineHeight: generalTooltip.lineHeight,
170
313
  },
171
314
  '& > ul > li[aria-selected]': {
172
315
  backgroundColor: selection,
173
316
  color: base06,
174
- borderRadius: codemirrorThemeUtils.generalTooltip.borderRadiusSelected,
317
+ borderRadius: generalTooltip.borderRadiusSelected,
175
318
  },
176
319
  '& > ul > li > span.cm-completionIcon': {
177
320
  color: base03,
178
- paddingRight: codemirrorThemeUtils.generalTooltip.paddingRight,
321
+ paddingRight: generalTooltip.paddingRight,
179
322
  },
180
323
  '& > ul > li > span.cm-completionDetail': {
181
324
  color: base03,
@@ -193,7 +336,7 @@ const solarizedDarkTheme = view.EditorView.theme({
193
336
  // Diagnostics styling
194
337
  '.cm-diagnostic': {
195
338
  '&-error': {
196
- borderLeft: `3px solid ${base_red}`,
339
+ borderLeft: `3px solid ${base08}`,
197
340
  },
198
341
  '&-warning': {
199
342
  borderLeft: `3px solid ${diagnosticWarning}`,
@@ -203,7 +346,7 @@ const solarizedDarkTheme = view.EditorView.theme({
203
346
  },
204
347
  },
205
348
  '.cm-lintPoint-error': {
206
- borderBottom: `2px wavy ${base_red}`,
349
+ borderBottom: `2px wavy ${base08}`,
207
350
  },
208
351
  '.cm-lintPoint-warning': {
209
352
  borderBottom: `2px wavy ${diagnosticWarning}`,
@@ -212,44 +355,44 @@ const solarizedDarkTheme = view.EditorView.theme({
212
355
  '.cm-matchingBracket': {
213
356
  backgroundColor: activeBracketBg,
214
357
  outline: `1px solid ${activeBracketBorder}`,
215
- borderRadius: codemirrorThemeUtils.generalMatching.borderRadius,
358
+ borderRadius: generalMatching.borderRadius,
216
359
  },
217
360
  '.cm-nonmatchingBracket': {
218
- backgroundColor: `${base_red}40`,
361
+ backgroundColor: `${base08}40`,
219
362
  outline: `1px solid ${invalid}`,
220
- borderRadius: codemirrorThemeUtils.generalMatching.borderRadius,
363
+ borderRadius: generalMatching.borderRadius,
221
364
  },
222
365
  // Selection matches
223
366
  '.cm-selectionMatch': {
224
367
  backgroundColor: selectionMatch,
225
368
  outline: `1px solid ${base02}50`,
226
- borderRadius: codemirrorThemeUtils.generalMatching.borderRadius,
369
+ borderRadius: generalMatching.borderRadius,
227
370
  },
228
371
  // Fold placeholder
229
372
  '.cm-foldPlaceholder': {
230
373
  backgroundColor: tooltipBackground,
231
374
  color: base03,
232
375
  border: `1px dotted ${base02}70`,
233
- borderRadius: codemirrorThemeUtils.generalPlaceholder.borderRadius,
234
- padding: codemirrorThemeUtils.generalPlaceholder.padding,
235
- margin: codemirrorThemeUtils.generalPlaceholder.margin,
376
+ borderRadius: generalPlaceholder.borderRadius,
377
+ padding: generalPlaceholder.padding,
378
+ margin: generalPlaceholder.margin,
236
379
  },
237
380
  // Focus outline
238
381
  '&.cm-focused': {
239
382
  outline: 'none',
240
- boxShadow: `0 0 0 2px ${background}, 0 0 0 3px ${base_blue}40`,
383
+ boxShadow: `0 0 0 2px ${background}, 0 0 0 3px ${base0D}40`,
241
384
  },
242
385
  // Scrollbars
243
386
  '& .cm-scroller::-webkit-scrollbar': {
244
- width: codemirrorThemeUtils.generalScroller.width,
245
- height: codemirrorThemeUtils.generalScroller.height,
387
+ width: generalScroller.width,
388
+ height: generalScroller.height,
246
389
  },
247
390
  '& .cm-scroller::-webkit-scrollbar-track': {
248
391
  background: darkBackground,
249
392
  },
250
393
  '& .cm-scroller::-webkit-scrollbar-thumb': {
251
394
  backgroundColor: base01,
252
- borderRadius: codemirrorThemeUtils.generalScroller.borderRadius,
395
+ borderRadius: generalScroller.borderRadius,
253
396
  border: `3px solid ${darkBackground}`,
254
397
  },
255
398
  '& .cm-scroller::-webkit-scrollbar-thumb:hover': {
@@ -266,54 +409,54 @@ const solarizedDarkTheme = view.EditorView.theme({
266
409
  */
267
410
  const solarizedDarkHighlightStyle = language.HighlightStyle.define([
268
411
  // Keywords and control flow
269
- { tag: highlight.tags.keyword, color: base_green, fontWeight: 'bold' },
270
- { tag: highlight.tags.controlKeyword, color: base_green, fontWeight: 'bold' },
271
- { tag: highlight.tags.moduleKeyword, color: base_green, fontWeight: 'bold' },
412
+ { tag: highlight.tags.keyword, color: base0B, fontWeight: 'bold' },
413
+ { tag: highlight.tags.controlKeyword, color: base0B, fontWeight: 'bold' },
414
+ { tag: highlight.tags.moduleKeyword, color: base0B, fontWeight: 'bold' },
272
415
  // Names and variables
273
- { tag: [highlight.tags.name, highlight.tags.deleted, highlight.tags.character, highlight.tags.macroName], color: base_cyan },
416
+ { tag: [highlight.tags.name, highlight.tags.deleted, highlight.tags.character, highlight.tags.macroName], color: base0C },
274
417
  { tag: [highlight.tags.variableName], color: base05 },
275
- { tag: [highlight.tags.propertyName], color: base_cyan, fontStyle: 'normal' },
418
+ { tag: [highlight.tags.propertyName], color: base0C, fontStyle: 'normal' },
276
419
  // Classes and types
277
- { tag: [highlight.tags.typeName], color: base_orange },
278
- { tag: [highlight.tags.className], color: base_orange, fontStyle: 'italic' },
279
- { tag: [highlight.tags.namespace], color: base_magenta, fontStyle: 'italic' },
420
+ { tag: [highlight.tags.typeName], color: base09 },
421
+ { tag: [highlight.tags.className], color: base09, fontStyle: 'italic' },
422
+ { tag: [highlight.tags.namespace], color: base0F, fontStyle: 'italic' },
280
423
  // Operators and punctuation
281
- { tag: [highlight.tags.operator, highlight.tags.operatorKeyword], color: base_violet },
282
- { tag: [highlight.tags.bracket], color: base_magenta },
283
- { tag: [highlight.tags.brace], color: base_magenta },
424
+ { tag: [highlight.tags.operator, highlight.tags.operatorKeyword], color: base0E },
425
+ { tag: [highlight.tags.bracket], color: base0F },
426
+ { tag: [highlight.tags.brace], color: base0F },
284
427
  { tag: [highlight.tags.punctuation], color: base04 },
285
428
  // Functions and parameters
286
- { tag: [highlight.tags.function(highlight.tags.variableName)], color: base_blue },
287
- { tag: [highlight.tags.labelName], color: base_magenta },
288
- { tag: [highlight.tags.definition(highlight.tags.function(highlight.tags.variableName))], color: base_blue },
289
- { tag: [highlight.tags.definition(highlight.tags.variableName)], color: base_cyan },
429
+ { tag: [highlight.tags.function(highlight.tags.variableName)], color: base0D },
430
+ { tag: [highlight.tags.labelName], color: base0F },
431
+ { tag: [highlight.tags.definition(highlight.tags.function(highlight.tags.variableName))], color: base0D },
432
+ { tag: [highlight.tags.definition(highlight.tags.variableName)], color: base0C },
290
433
  // Constants and literals
291
- { tag: highlight.tags.number, color: base_magenta },
292
- { tag: highlight.tags.changed, color: base_magenta },
434
+ { tag: highlight.tags.number, color: base0F },
435
+ { tag: highlight.tags.changed, color: base0F },
293
436
  { tag: highlight.tags.annotation, color: invalid, fontStyle: 'italic' },
294
- { tag: highlight.tags.modifier, color: base_magenta, fontStyle: 'italic' },
295
- { tag: highlight.tags.self, color: base_magenta },
437
+ { tag: highlight.tags.modifier, color: base0F, fontStyle: 'italic' },
438
+ { tag: highlight.tags.self, color: base0F },
296
439
  {
297
440
  tag: [highlight.tags.color, highlight.tags.constant(highlight.tags.name), highlight.tags.standard(highlight.tags.name)],
298
- color: base_yellow,
441
+ color: base0A,
299
442
  },
300
- { tag: [highlight.tags.atom, highlight.tags.bool, highlight.tags.special(highlight.tags.variableName)], color: base_magenta },
443
+ { tag: [highlight.tags.atom, highlight.tags.bool, highlight.tags.special(highlight.tags.variableName)], color: base0F },
301
444
  // Strings and regex
302
- { tag: [highlight.tags.processingInstruction, highlight.tags.inserted], color: base_green },
445
+ { tag: [highlight.tags.processingInstruction, highlight.tags.inserted], color: base0B },
303
446
  { tag: [highlight.tags.special(highlight.tags.string), highlight.tags.regexp], color: invalid },
304
- { tag: highlight.tags.string, color: base_yellow },
447
+ { tag: highlight.tags.string, color: base0A },
305
448
  // Punctuation and structure
306
- { tag: highlight.tags.definition(highlight.tags.typeName), color: base_orange, fontWeight: 'bold' },
307
- { tag: [highlight.tags.definition(highlight.tags.name), highlight.tags.separator], color: base_cyan },
449
+ { tag: highlight.tags.definition(highlight.tags.typeName), color: base09, fontWeight: 'bold' },
450
+ { tag: [highlight.tags.definition(highlight.tags.name), highlight.tags.separator], color: base0C },
308
451
  // Comments and documentation
309
- { tag: highlight.tags.meta, color: base_red },
452
+ { tag: highlight.tags.meta, color: base08 },
310
453
  { tag: highlight.tags.comment, fontStyle: 'italic', color: base02 },
311
454
  { tag: highlight.tags.docComment, fontStyle: 'italic', color: base02 },
312
455
  // HTML/XML elements
313
- { tag: [highlight.tags.tagName], color: base_blue },
456
+ { tag: [highlight.tags.tagName], color: base0D },
314
457
  { tag: [highlight.tags.attributeName], color: base05 },
315
458
  // Markdown and text formatting
316
- { tag: [highlight.tags.heading], fontWeight: 'bold', color: base_yellow },
459
+ { tag: [highlight.tags.heading], fontWeight: 'bold', color: base0A },
317
460
  { tag: highlight.tags.heading1, color: base07 },
318
461
  { tag: highlight.tags.heading2, color: base06 },
319
462
  { tag: highlight.tags.heading3, color: base06 },
@@ -321,18 +464,18 @@ const solarizedDarkHighlightStyle = language.HighlightStyle.define([
321
464
  { tag: highlight.tags.heading5, color: base06 },
322
465
  { tag: highlight.tags.heading6, color: base06 },
323
466
  { tag: [highlight.tags.strong], fontWeight: 'bold', color: base06 },
324
- { tag: [highlight.tags.emphasis], fontStyle: 'italic', color: base_green },
467
+ { tag: [highlight.tags.emphasis], fontStyle: 'italic', color: base0B },
325
468
  // Links and URLs
326
469
  {
327
470
  tag: [highlight.tags.link],
328
- color: base_cyan,
471
+ color: base0C,
329
472
  fontWeight: '500',
330
473
  textDecoration: 'underline',
331
474
  textUnderlinePosition: 'under',
332
475
  },
333
476
  {
334
477
  tag: [highlight.tags.url],
335
- color: base_yellow,
478
+ color: base0A,
336
479
  textDecoration: 'underline',
337
480
  textUnderlineOffset: '2px',
338
481
  },
@@ -341,18 +484,18 @@ const solarizedDarkHighlightStyle = language.HighlightStyle.define([
341
484
  tag: [highlight.tags.invalid],
342
485
  color: base02,
343
486
  textDecoration: 'underline wavy',
344
- borderBottom: `1px dotted ${base_red}`,
487
+ borderBottom: `1px dotted ${base08}`,
345
488
  },
346
489
  { tag: [highlight.tags.strikethrough], color: invalid, textDecoration: 'line-through' },
347
490
  // Enhanced syntax highlighting
348
- { tag: highlight.tags.constant(highlight.tags.name), color: base_yellow },
349
- { tag: highlight.tags.deleted, color: base_red },
350
- { tag: highlight.tags.squareBracket, color: base_red },
491
+ { tag: highlight.tags.constant(highlight.tags.name), color: base0A },
492
+ { tag: highlight.tags.deleted, color: base08 },
493
+ { tag: highlight.tags.squareBracket, color: base08 },
351
494
  { tag: highlight.tags.angleBracket, color: base02 },
352
495
  // Additional specific styles
353
496
  { tag: highlight.tags.monospace, color: base05 },
354
- { tag: [highlight.tags.contentSeparator], color: base_yellow },
355
- { tag: highlight.tags.quote, color: base_green },
497
+ { tag: [highlight.tags.contentSeparator], color: base0A },
498
+ { tag: highlight.tags.quote, color: base0B },
356
499
  ]);
357
500
  /**
358
501
  * Combined Solarized Dark theme extension
@@ -361,7 +504,16 @@ const solarizedDark = [
361
504
  solarizedDarkTheme,
362
505
  language.syntaxHighlighting(solarizedDarkHighlightStyle),
363
506
  ];
507
+ /**
508
+ * Solarized Dark merge revert styles configuration
509
+ */
510
+ const solarizedDarkMergeStyles = {
511
+ backgroundColor: darkBackground,
512
+ borderColor: base02,
513
+ buttonColor: base05,
514
+ buttonHoverColor: base01,
515
+ };
364
516
 
517
+ exports.applyMergeRevertStyles = applyMergeRevertStyles;
365
518
  exports.solarizedDark = solarizedDark;
366
- exports.solarizedDarkHighlightStyle = solarizedDarkHighlightStyle;
367
- exports.solarizedDarkTheme = solarizedDarkTheme;
519
+ exports.solarizedDarkMergeStyles = solarizedDarkMergeStyles;
package/dist/index.d.cts CHANGED
@@ -1,17 +1,28 @@
1
1
  import { Extension } from '@codemirror/state';
2
- import { HighlightStyle } from '@codemirror/language';
3
2
 
3
+ interface IMergeRevertStyles {
4
+ backgroundColor: string;
5
+ borderColor: string;
6
+ buttonColor: string;
7
+ buttonHoverColor: string;
8
+ }
4
9
  /**
5
- * Enhanced editor theme styles for Solarized Dark
10
+ * Function to apply merge revert styles for a theme
11
+ * @param styles Styles for the merge revert buttons
12
+ * @param styles.backgroundColor Background color of the revert area
13
+ * @param styles.borderColor Border color of the revert area
14
+ * @param styles.buttonColor Color of the revert buttons
15
+ * @param styles.buttonHoverColor Hover color of the revert buttons
6
16
  */
7
- declare const solarizedDarkTheme: Extension;
8
- /**
9
- * Enhanced syntax highlighting for Solarized Dark theme
10
- */
11
- declare const solarizedDarkHighlightStyle: HighlightStyle;
17
+ declare function applyMergeRevertStyles(styles: IMergeRevertStyles): void;
18
+
12
19
  /**
13
20
  * Combined Solarized Dark theme extension
14
21
  */
15
22
  declare const solarizedDark: Extension;
23
+ /**
24
+ * Solarized Dark merge revert styles configuration
25
+ */
26
+ declare const solarizedDarkMergeStyles: IMergeRevertStyles;
16
27
 
17
- export { solarizedDark, solarizedDarkHighlightStyle, solarizedDarkTheme };
28
+ export { applyMergeRevertStyles, solarizedDark, solarizedDarkMergeStyles };
package/dist/index.d.ts CHANGED
@@ -1,17 +1,28 @@
1
1
  import { Extension } from '@codemirror/state';
2
- import { HighlightStyle } from '@codemirror/language';
3
2
 
3
+ interface IMergeRevertStyles {
4
+ backgroundColor: string;
5
+ borderColor: string;
6
+ buttonColor: string;
7
+ buttonHoverColor: string;
8
+ }
4
9
  /**
5
- * Enhanced editor theme styles for Solarized Dark
10
+ * Function to apply merge revert styles for a theme
11
+ * @param styles Styles for the merge revert buttons
12
+ * @param styles.backgroundColor Background color of the revert area
13
+ * @param styles.borderColor Border color of the revert area
14
+ * @param styles.buttonColor Color of the revert buttons
15
+ * @param styles.buttonHoverColor Hover color of the revert buttons
6
16
  */
7
- declare const solarizedDarkTheme: Extension;
8
- /**
9
- * Enhanced syntax highlighting for Solarized Dark theme
10
- */
11
- declare const solarizedDarkHighlightStyle: HighlightStyle;
17
+ declare function applyMergeRevertStyles(styles: IMergeRevertStyles): void;
18
+
12
19
  /**
13
20
  * Combined Solarized Dark theme extension
14
21
  */
15
22
  declare const solarizedDark: Extension;
23
+ /**
24
+ * Solarized Dark merge revert styles configuration
25
+ */
26
+ declare const solarizedDarkMergeStyles: IMergeRevertStyles;
16
27
 
17
- export { solarizedDark, solarizedDarkHighlightStyle, solarizedDarkTheme };
28
+ export { applyMergeRevertStyles, solarizedDark, solarizedDarkMergeStyles };
package/dist/index.js CHANGED
@@ -1,7 +1,107 @@
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 '@fsegurai/codemirror-theme-utils';
4
+
5
+ // 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
+ borderRadious: '3px'};
19
+ const generalGutter = {
20
+ border: 'none',
21
+ paddingRight: '8px',
22
+ fontSize: '0.9em',
23
+ fontWeight: '500',
24
+ };
25
+ const generalPanel = {
26
+ border: 'none',
27
+ borderRadius: '4px',
28
+ padding: '2px 10px',
29
+ };
30
+ const generalLine = {
31
+ borderRadius: '2px',
32
+ };
33
+ const generalMatching = {
34
+ borderRadius: '2px',
35
+ };
36
+ const generalPlaceholder = {
37
+ borderRadius: '4px',
38
+ padding: '0 5px',
39
+ margin: '0 2px',
40
+ };
41
+ const generalScroller = {
42
+ width: '12px',
43
+ height: '12px',
44
+ borderRadius: '6px',
45
+ };
46
+ const generalSearchField = {
47
+ borderRadius: '4px',
48
+ padding: '2px 6px',
49
+ };
50
+ const generalTooltip = {
51
+ borderRadius: '4px',
52
+ borderRadiusSelected: '3px',
53
+ lineHeight: '1.3',
54
+ padding: '4px 8px',
55
+ paddingRight: '8px',
56
+ };
57
+ /**
58
+ * Function to apply merge revert styles for a theme
59
+ * @param styles Styles for the merge revert buttons
60
+ * @param styles.backgroundColor Background color of the revert area
61
+ * @param styles.borderColor Border color of the revert area
62
+ * @param styles.buttonColor Color of the revert buttons
63
+ * @param styles.buttonHoverColor Hover color of the revert buttons
64
+ */
65
+ function applyMergeRevertStyles(styles) {
66
+ // Create a stylesheet
67
+ const styleEl = document.createElement('style');
68
+ styleEl.id = 'cm-merge-revert-styles';
69
+ // Define CSS with the theme-specific values
70
+ styleEl.textContent = `
71
+ .cm-merge-revert {
72
+ display: flex;
73
+ flex-direction: column;
74
+ align-items: center;
75
+ justify-content: flex-start;
76
+ padding: 4px;
77
+ background-color: ${styles.backgroundColor};
78
+ border-left: 1px solid ${styles.borderColor};
79
+ border-right: 1px solid ${styles.borderColor};
80
+ width: 32px;
81
+ }
82
+
83
+ .cm-merge-revert button {
84
+ width: 100%;
85
+ height: auto;
86
+ background-color: transparent;
87
+ border: none;
88
+ color: ${styles.buttonColor};
89
+ cursor: pointer;
90
+ margin: 0 auto;
91
+ font-size: 20px;
92
+ }
93
+
94
+ .cm-merge-revert button:hover {
95
+ background-color: ${styles.buttonHoverColor};
96
+ }
97
+ `;
98
+ // Remove any existing merge styles
99
+ const existingStyle = document.getElementById('cm-merge-revert-styles');
100
+ if (existingStyle)
101
+ existingStyle.remove();
102
+ // Add the new styles
103
+ document.head.appendChild(styleEl);
104
+ }
5
105
 
6
106
  /**
7
107
  * Enhanced Solarized Dark theme color definitions
@@ -9,37 +109,41 @@ import { generalScroller, generalPlaceholder, generalMatching, generalTooltip, g
9
109
  * Colors organized by function with visual color blocks
10
110
  */
11
111
  // Base colors from Solarized palette
12
- const base00 = '#002b36'; // Background - dark blue
13
- const base01 = '#073642'; // Lighter background (popups, statuslines)
14
- const base02 = '#586e75'; // Selection background
15
- const base03 = '#657b83'; // Comments, invisibles
16
- const base04 = '#839496'; // Body text
17
- const base05 = '#93a1a1'; // Default foreground
18
- const base06 = '#eee8d5'; // Light foreground
19
- const base07 = '#fdf6e3'; // Light background
112
+ const base00 = '#002b36', // Background - dark blue
113
+ base01 = '#073642', // Lighter background (popups, statuslines)
114
+ base02 = '#586e75', // Selection background
115
+ base03 = '#657b83', // Comments, invisibles
116
+ base04 = '#839496', // Body text
117
+ base05 = '#93a1a1', // Default foreground
118
+ base06 = '#eee8d5', // Light foreground
119
+ base07 = '#fdf6e3', // Light background
20
120
  // Accent colors from Solarized palette
21
- const base_red = '#dc322f'; // Red
22
- const base_orange = '#cb4b16'; // Orange
23
- const base_yellow = '#b58900'; // Yellow
24
- const base_green = '#859900'; // Green
25
- const base_cyan = '#2aa198'; // Cyan
26
- const base_blue = '#268bd2'; // Blue
27
- const base_violet = '#6c71c4'; // Violet
28
- const base_magenta = '#d33682'; // Magenta
121
+ base08 = '#dc322f', // Red
122
+ base09 = '#cb4b16', // Orange
123
+ base0A = '#b58900', // Yellow
124
+ base0B = '#859900', // Green
125
+ base0C = '#2aa198', // Cyan
126
+ base0D = '#268bd2', // Blue
127
+ base0E = '#6c71c4', // Violet
128
+ base0F = '#d33682'; // Magenta
29
129
  // UI specific colors
30
- const invalid = '#d30102'; // Bright red for errors
31
- const darkBackground = '#00252f'; // Darker background for panels
32
- const highlightBackground = '#99eeff0f'; // Active line highlight
33
- const background = base00; // Main editor background
34
- const tooltipBackground = base01; // Tooltip background
35
- const selection = '#02B8FF3F'; // Selection background with opacity
36
- const selectionMatch = '#586e7580'; // Selection match with opacity
37
- const cursor = base04; // Cursor color
38
- const activeBracketBg = '#586e7540'; // Active bracket background with opacity
39
- const activeBracketBorder = base_blue; // Active bracket border - blue
40
- const diagnosticWarning = base_yellow; // Warning color - yellow
41
- const linkColor = base_blue; // Link color - blue
42
- // const visitedLinkColor = base_violet; // Visited link color - violet
130
+ const invalid = '#d30102', // Bright red for errors
131
+ darkBackground = '#00252f', // Darker background for panels
132
+ highlightBackground = '#99eeff0f', // Active line highlight
133
+ background = base00, // Main editor background
134
+ tooltipBackground = base01, // Tooltip background
135
+ selection = '#02B8FF3F', // Selection background with opacity
136
+ selectionMatch = '#586e7580', // Selection match with opacity
137
+ cursor = base04, // Cursor color
138
+ activeBracketBg = '#586e7540', // Active bracket background with opacity
139
+ activeBracketBorder = base0D, // Active bracket border - blue
140
+ diagnosticWarning = base0A, // Warning color - yellow
141
+ linkColor = base0D; // Link color - blue
142
+ // Diff/merge specific colors
143
+ const addedBackground = '#2aa19820', // Solarized cyan with transparency for insertions
144
+ removedBackground = '#dc322f20', // Solarized red with transparency for deletions
145
+ addedText = '#859900', // Solarized green for added text
146
+ removedText = '#dc322f'; // Solarized red for removed text
43
147
  /**
44
148
  * Enhanced editor theme styles for Solarized Dark
45
149
  */
@@ -75,7 +179,7 @@ const solarizedDarkTheme = /*@__PURE__*/EditorView.theme({
75
179
  // Search functionality
76
180
  '.cm-searchMatch': {
77
181
  backgroundColor: '#586e7599',
78
- outline: `1px solid ${base_blue}`,
182
+ outline: `1px solid ${base0D}`,
79
183
  color: base06,
80
184
  borderRadius: generalSearchField.borderRadius,
81
185
  '& span': {
@@ -83,7 +187,7 @@ const solarizedDarkTheme = /*@__PURE__*/EditorView.theme({
83
187
  },
84
188
  },
85
189
  '.cm-searchMatch.cm-searchMatch-selected': {
86
- backgroundColor: base_blue,
190
+ backgroundColor: base0D,
87
191
  color: base07,
88
192
  padding: generalSearchField.padding,
89
193
  '& span': {
@@ -149,6 +253,45 @@ const solarizedDarkTheme = /*@__PURE__*/EditorView.theme({
149
253
  '.cm-foldGutter .cm-gutterElement:hover': {
150
254
  color: base04,
151
255
  },
256
+ // Diff/Merge View Styles
257
+ // Inserted/Added Content
258
+ '.cm-insertedLine': {
259
+ textDecoration: generalDiff.insertedTextDecoration,
260
+ backgroundColor: addedBackground,
261
+ color: addedText,
262
+ padding: generalDiff.insertedLinePadding,
263
+ borderRadius: generalDiff.borderRadious,
264
+ },
265
+ 'ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))': {
266
+ textDecoration: generalDiff.insertedTextDecoration,
267
+ backgroundColor: `${addedBackground} !important`,
268
+ color: addedText,
269
+ padding: generalDiff.insertedLinePadding,
270
+ borderRadius: generalDiff.borderRadious,
271
+ border: `1px solid ${addedText}40`,
272
+ },
273
+ 'ins.cm-insertedLine .cm-changedText': {
274
+ background: 'transparent !important',
275
+ },
276
+ // Deleted/Removed Content
277
+ '.cm-deletedLine': {
278
+ textDecoration: generalDiff.deletedTextDecoration,
279
+ backgroundColor: removedBackground,
280
+ color: removedText,
281
+ padding: generalDiff.insertedLinePadding,
282
+ borderRadius: generalDiff.borderRadious,
283
+ },
284
+ 'del.cm-deletedLine, del, del:not(:has(.cm-deletedText))': {
285
+ textDecoration: generalDiff.deletedTextDecoration,
286
+ backgroundColor: `${removedBackground} !important`,
287
+ color: removedText,
288
+ padding: generalDiff.insertedLinePadding,
289
+ borderRadius: generalDiff.borderRadious,
290
+ border: `1px solid ${removedText}40`,
291
+ },
292
+ 'del .cm-deletedText, del .cm-changedText': {
293
+ background: 'transparent !important',
294
+ },
152
295
  // Tooltips and autocomplete
153
296
  '.cm-tooltip': {
154
297
  backgroundColor: tooltipBackground,
@@ -191,7 +334,7 @@ const solarizedDarkTheme = /*@__PURE__*/EditorView.theme({
191
334
  // Diagnostics styling
192
335
  '.cm-diagnostic': {
193
336
  '&-error': {
194
- borderLeft: `3px solid ${base_red}`,
337
+ borderLeft: `3px solid ${base08}`,
195
338
  },
196
339
  '&-warning': {
197
340
  borderLeft: `3px solid ${diagnosticWarning}`,
@@ -201,7 +344,7 @@ const solarizedDarkTheme = /*@__PURE__*/EditorView.theme({
201
344
  },
202
345
  },
203
346
  '.cm-lintPoint-error': {
204
- borderBottom: `2px wavy ${base_red}`,
347
+ borderBottom: `2px wavy ${base08}`,
205
348
  },
206
349
  '.cm-lintPoint-warning': {
207
350
  borderBottom: `2px wavy ${diagnosticWarning}`,
@@ -213,7 +356,7 @@ const solarizedDarkTheme = /*@__PURE__*/EditorView.theme({
213
356
  borderRadius: generalMatching.borderRadius,
214
357
  },
215
358
  '.cm-nonmatchingBracket': {
216
- backgroundColor: `${base_red}40`,
359
+ backgroundColor: `${base08}40`,
217
360
  outline: `1px solid ${invalid}`,
218
361
  borderRadius: generalMatching.borderRadius,
219
362
  },
@@ -235,7 +378,7 @@ const solarizedDarkTheme = /*@__PURE__*/EditorView.theme({
235
378
  // Focus outline
236
379
  '&.cm-focused': {
237
380
  outline: 'none',
238
- boxShadow: `0 0 0 2px ${background}, 0 0 0 3px ${base_blue}40`,
381
+ boxShadow: `0 0 0 2px ${background}, 0 0 0 3px ${base0D}40`,
239
382
  },
240
383
  // Scrollbars
241
384
  '& .cm-scroller::-webkit-scrollbar': {
@@ -264,54 +407,54 @@ const solarizedDarkTheme = /*@__PURE__*/EditorView.theme({
264
407
  */
265
408
  const solarizedDarkHighlightStyle = /*@__PURE__*/HighlightStyle.define([
266
409
  // Keywords and control flow
267
- { tag: tags.keyword, color: base_green, fontWeight: 'bold' },
268
- { tag: tags.controlKeyword, color: base_green, fontWeight: 'bold' },
269
- { tag: tags.moduleKeyword, color: base_green, fontWeight: 'bold' },
410
+ { tag: tags.keyword, color: base0B, fontWeight: 'bold' },
411
+ { tag: tags.controlKeyword, color: base0B, fontWeight: 'bold' },
412
+ { tag: tags.moduleKeyword, color: base0B, fontWeight: 'bold' },
270
413
  // Names and variables
271
- { tag: [tags.name, tags.deleted, tags.character, tags.macroName], color: base_cyan },
414
+ { tag: [tags.name, tags.deleted, tags.character, tags.macroName], color: base0C },
272
415
  { tag: [tags.variableName], color: base05 },
273
- { tag: [tags.propertyName], color: base_cyan, fontStyle: 'normal' },
416
+ { tag: [tags.propertyName], color: base0C, fontStyle: 'normal' },
274
417
  // Classes and types
275
- { tag: [tags.typeName], color: base_orange },
276
- { tag: [tags.className], color: base_orange, fontStyle: 'italic' },
277
- { tag: [tags.namespace], color: base_magenta, fontStyle: 'italic' },
418
+ { tag: [tags.typeName], color: base09 },
419
+ { tag: [tags.className], color: base09, fontStyle: 'italic' },
420
+ { tag: [tags.namespace], color: base0F, fontStyle: 'italic' },
278
421
  // Operators and punctuation
279
- { tag: [tags.operator, tags.operatorKeyword], color: base_violet },
280
- { tag: [tags.bracket], color: base_magenta },
281
- { tag: [tags.brace], color: base_magenta },
422
+ { tag: [tags.operator, tags.operatorKeyword], color: base0E },
423
+ { tag: [tags.bracket], color: base0F },
424
+ { tag: [tags.brace], color: base0F },
282
425
  { tag: [tags.punctuation], color: base04 },
283
426
  // Functions and parameters
284
- { tag: [/*@__PURE__*/tags.function(tags.variableName)], color: base_blue },
285
- { tag: [tags.labelName], color: base_magenta },
286
- { tag: [/*@__PURE__*/tags.definition(/*@__PURE__*/tags.function(tags.variableName))], color: base_blue },
287
- { tag: [/*@__PURE__*/tags.definition(tags.variableName)], color: base_cyan },
427
+ { tag: [/*@__PURE__*/tags.function(tags.variableName)], color: base0D },
428
+ { tag: [tags.labelName], color: base0F },
429
+ { tag: [/*@__PURE__*/tags.definition(/*@__PURE__*/tags.function(tags.variableName))], color: base0D },
430
+ { tag: [/*@__PURE__*/tags.definition(tags.variableName)], color: base0C },
288
431
  // Constants and literals
289
- { tag: tags.number, color: base_magenta },
290
- { tag: tags.changed, color: base_magenta },
432
+ { tag: tags.number, color: base0F },
433
+ { tag: tags.changed, color: base0F },
291
434
  { tag: tags.annotation, color: invalid, fontStyle: 'italic' },
292
- { tag: tags.modifier, color: base_magenta, fontStyle: 'italic' },
293
- { tag: tags.self, color: base_magenta },
435
+ { tag: tags.modifier, color: base0F, fontStyle: 'italic' },
436
+ { tag: tags.self, color: base0F },
294
437
  {
295
438
  tag: [tags.color, /*@__PURE__*/tags.constant(tags.name), /*@__PURE__*/tags.standard(tags.name)],
296
- color: base_yellow,
439
+ color: base0A,
297
440
  },
298
- { tag: [tags.atom, tags.bool, /*@__PURE__*/tags.special(tags.variableName)], color: base_magenta },
441
+ { tag: [tags.atom, tags.bool, /*@__PURE__*/tags.special(tags.variableName)], color: base0F },
299
442
  // Strings and regex
300
- { tag: [tags.processingInstruction, tags.inserted], color: base_green },
443
+ { tag: [tags.processingInstruction, tags.inserted], color: base0B },
301
444
  { tag: [/*@__PURE__*/tags.special(tags.string), tags.regexp], color: invalid },
302
- { tag: tags.string, color: base_yellow },
445
+ { tag: tags.string, color: base0A },
303
446
  // Punctuation and structure
304
- { tag: /*@__PURE__*/tags.definition(tags.typeName), color: base_orange, fontWeight: 'bold' },
305
- { tag: [/*@__PURE__*/tags.definition(tags.name), tags.separator], color: base_cyan },
447
+ { tag: /*@__PURE__*/tags.definition(tags.typeName), color: base09, fontWeight: 'bold' },
448
+ { tag: [/*@__PURE__*/tags.definition(tags.name), tags.separator], color: base0C },
306
449
  // Comments and documentation
307
- { tag: tags.meta, color: base_red },
450
+ { tag: tags.meta, color: base08 },
308
451
  { tag: tags.comment, fontStyle: 'italic', color: base02 },
309
452
  { tag: tags.docComment, fontStyle: 'italic', color: base02 },
310
453
  // HTML/XML elements
311
- { tag: [tags.tagName], color: base_blue },
454
+ { tag: [tags.tagName], color: base0D },
312
455
  { tag: [tags.attributeName], color: base05 },
313
456
  // Markdown and text formatting
314
- { tag: [tags.heading], fontWeight: 'bold', color: base_yellow },
457
+ { tag: [tags.heading], fontWeight: 'bold', color: base0A },
315
458
  { tag: tags.heading1, color: base07 },
316
459
  { tag: tags.heading2, color: base06 },
317
460
  { tag: tags.heading3, color: base06 },
@@ -319,18 +462,18 @@ const solarizedDarkHighlightStyle = /*@__PURE__*/HighlightStyle.define([
319
462
  { tag: tags.heading5, color: base06 },
320
463
  { tag: tags.heading6, color: base06 },
321
464
  { tag: [tags.strong], fontWeight: 'bold', color: base06 },
322
- { tag: [tags.emphasis], fontStyle: 'italic', color: base_green },
465
+ { tag: [tags.emphasis], fontStyle: 'italic', color: base0B },
323
466
  // Links and URLs
324
467
  {
325
468
  tag: [tags.link],
326
- color: base_cyan,
469
+ color: base0C,
327
470
  fontWeight: '500',
328
471
  textDecoration: 'underline',
329
472
  textUnderlinePosition: 'under',
330
473
  },
331
474
  {
332
475
  tag: [tags.url],
333
- color: base_yellow,
476
+ color: base0A,
334
477
  textDecoration: 'underline',
335
478
  textUnderlineOffset: '2px',
336
479
  },
@@ -339,18 +482,18 @@ const solarizedDarkHighlightStyle = /*@__PURE__*/HighlightStyle.define([
339
482
  tag: [tags.invalid],
340
483
  color: base02,
341
484
  textDecoration: 'underline wavy',
342
- borderBottom: `1px dotted ${base_red}`,
485
+ borderBottom: `1px dotted ${base08}`,
343
486
  },
344
487
  { tag: [tags.strikethrough], color: invalid, textDecoration: 'line-through' },
345
488
  // Enhanced syntax highlighting
346
- { tag: /*@__PURE__*/tags.constant(tags.name), color: base_yellow },
347
- { tag: tags.deleted, color: base_red },
348
- { tag: tags.squareBracket, color: base_red },
489
+ { tag: /*@__PURE__*/tags.constant(tags.name), color: base0A },
490
+ { tag: tags.deleted, color: base08 },
491
+ { tag: tags.squareBracket, color: base08 },
349
492
  { tag: tags.angleBracket, color: base02 },
350
493
  // Additional specific styles
351
494
  { tag: tags.monospace, color: base05 },
352
- { tag: [tags.contentSeparator], color: base_yellow },
353
- { tag: tags.quote, color: base_green },
495
+ { tag: [tags.contentSeparator], color: base0A },
496
+ { tag: tags.quote, color: base0B },
354
497
  ]);
355
498
  /**
356
499
  * Combined Solarized Dark theme extension
@@ -359,5 +502,14 @@ const solarizedDark = [
359
502
  solarizedDarkTheme,
360
503
  /*@__PURE__*/syntaxHighlighting(solarizedDarkHighlightStyle),
361
504
  ];
505
+ /**
506
+ * Solarized Dark merge revert styles configuration
507
+ */
508
+ const solarizedDarkMergeStyles = {
509
+ backgroundColor: darkBackground,
510
+ borderColor: base02,
511
+ buttonColor: base05,
512
+ buttonHoverColor: base01,
513
+ };
362
514
 
363
- export { solarizedDark, solarizedDarkHighlightStyle, solarizedDarkTheme };
515
+ export { applyMergeRevertStyles, solarizedDark, solarizedDarkMergeStyles };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fsegurai/codemirror-theme-solarized-dark",
3
3
  "description": "Solarized Dark theme for the CodeMirror code editor",
4
- "version": "6.2.0-beta.4",
4
+ "version": "6.2.0",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
7
7
  "exports": {
@@ -17,6 +17,8 @@
17
17
  },
18
18
  "keywords": [
19
19
  "editor",
20
+ "diff",
21
+ "diff-editor",
20
22
  "code",
21
23
  "codemirror",
22
24
  "theme",
@@ -36,8 +38,7 @@
36
38
  "@lezer/highlight": "^1.0.0",
37
39
  "@codemirror/language": "^6.0.0",
38
40
  "@codemirror/state": "^6.0.0",
39
- "@codemirror/view": "^6.0.0",
40
- "@fsegurai/codemirror-theme-utils": "6.2.0-beta.3"
41
+ "@codemirror/view": "^6.0.0"
41
42
  },
42
43
  "devDependencies": {
43
44
  "@codemirror/buildhelper": "^1.0.2"