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