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