@fsegurai/codemirror-theme-solarized-dark 6.1.4 → 6.2.0-beta
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 +27 -27
- package/dist/index.cjs +293 -113
- package/dist/index.d.cts +6 -7
- package/dist/index.d.ts +6 -7
- package/dist/index.js +293 -113
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img alt="CodeMirror 6 Themes Logo" src="https://raw.githubusercontent.com/fsegurai/codemirror-themes/main/
|
|
2
|
+
<img alt="CodeMirror 6 Themes Logo" src="https://raw.githubusercontent.com/fsegurai/codemirror-themes/main/public/codemirror-themes.png">
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
@@ -69,32 +69,32 @@ Read the [CodeMirror documentation](https://codemirror.net/6/examples/styling/)
|
|
|
69
69
|
|
|
70
70
|
### Available Themes
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
- [
|
|
75
|
-
- [
|
|
76
|
-
- [
|
|
77
|
-
- [
|
|
78
|
-
- [
|
|
79
|
-
- [
|
|
80
|
-
|
|
81
|
-
- [
|
|
82
|
-
- [
|
|
83
|
-
- [
|
|
84
|
-
- [
|
|
85
|
-
- [
|
|
86
|
-
- [
|
|
87
|
-
- [
|
|
88
|
-
- [
|
|
89
|
-
- [
|
|
90
|
-
- [
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
- [
|
|
94
|
-
|
|
95
|
-
- [
|
|
96
|
-
|
|
97
|
-
|
|
72
|
+
| Theme | Package | Version |
|
|
73
|
+
|-------------------|----------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------|
|
|
74
|
+
| All - Bundle | [@fsegurai/codemirror-theme-bundle](https://www.npmjs.com/package/@fsegurai/codemirror-theme-bundle) |  |
|
|
75
|
+
| Abcdef | [@fsegurai/codemirror-theme-abcdef](https://www.npmjs.com/package/@fsegurai/codemirror-theme-abcdef) |  |
|
|
76
|
+
| Abyss | [@fsegurai/codemirror-theme-abyss](https://www.npmjs.com/package/@fsegurai/codemirror-theme-abyss) |  |
|
|
77
|
+
| Android Studio | [@fsegurai/codemirror-theme-android-studio](https://www.npmjs.com/package/@fsegurai/codemirror-theme-android-studio) |  |
|
|
78
|
+
| Andromeda | [@fsegurai/codemirror-theme-andromeda](https://www.npmjs.com/package/@fsegurai/codemirror-theme-andromeda) |  |
|
|
79
|
+
| Basic Light | [@fsegurai/codemirror-theme-basic-light](https://www.npmjs.com/package/@fsegurai/codemirror-theme-basic-light) |  |
|
|
80
|
+
| Basic Dark | [@fsegurai/codemirror-theme-basic-dark](https://www.npmjs.com/package/@fsegurai/codemirror-theme-basic-dark) |  |
|
|
81
|
+
| Forest | [@fsegurai/codemirror-theme-forest](https://www.npmjs.com/package/@fsegurai/codemirror-theme-forest) |  |
|
|
82
|
+
| GitHub Light | [@fsegurai/codemirror-theme-github-light](https://www.npmjs.com/package/@fsegurai/codemirror-theme-github-light) |  |
|
|
83
|
+
| GitHub Dark | [@fsegurai/codemirror-theme-github-dark](https://www.npmjs.com/package/@fsegurai/codemirror-theme-github-dark) |  |
|
|
84
|
+
| Gruvbox Light | [@fsegurai/codemirror-theme-gruvbox-light](https://www.npmjs.com/package/@fsegurai/codemirror-theme-gruvbox-light) |  |
|
|
85
|
+
| Gruvbox Dark | [@fsegurai/codemirror-theme-gruvbox-dark](https://www.npmjs.com/package/@fsegurai/codemirror-theme-gruvbox-dark) |  |
|
|
86
|
+
| Material Light | [@fsegurai/codemirror-theme-material-light](https://www.npmjs.com/package/@fsegurai/codemirror-theme-material-light) |  |
|
|
87
|
+
| Material Dark | [@fsegurai/codemirror-theme-material-dark](https://www.npmjs.com/package/@fsegurai/codemirror-theme-material-dark) |  |
|
|
88
|
+
| Monokai | [@fsegurai/codemirror-theme-monokai](https://www.npmjs.com/package/@fsegurai/codemirror-theme-monokai) |  |
|
|
89
|
+
| Nord | [@fsegurai/codemirror-theme-nord](https://www.npmjs.com/package/@fsegurai/codemirror-theme-nord) |  |
|
|
90
|
+
| Palenight | [@fsegurai/codemirror-theme-palenight](https://www.npmjs.com/package/@fsegurai/codemirror-theme-palenight) |  |
|
|
91
|
+
| Solarized Light | [@fsegurai/codemirror-theme-solarized-light](https://www.npmjs.com/package/@fsegurai/codemirror-theme-solarized-light) |  |
|
|
92
|
+
| Solarized Dark | [@fsegurai/codemirror-theme-solarized-dark](https://www.npmjs.com/package/@fsegurai/codemirror-theme-solarized-dark) |  |
|
|
93
|
+
| Tokyo Night Storm | [@fsegurai/codemirror-theme-tokyo-night-storm](https://www.npmjs.com/package/@fsegurai/codemirror-theme-tokyo-night-storm) |  |
|
|
94
|
+
| Tokyo Night Day | [@fsegurai/codemirror-theme-tokyo-night-day](https://www.npmjs.com/package/@fsegurai/codemirror-theme-tokyo-night-day) |  |
|
|
95
|
+
| Volcano | [@fsegurai/codemirror-theme-volcano](https://www.npmjs.com/package/@fsegurai/codemirror-theme-volcano) |  |
|
|
96
|
+
| VS Code Dark | [@fsegurai/codemirror-theme-vscode-dark](https://www.npmjs.com/package/@fsegurai/codemirror-theme-vscode-dark) |  |
|
|
97
|
+
| VS Code Light | [@fsegurai/codemirror-theme-vscode-light](https://www.npmjs.com/package/@fsegurai/codemirror-theme-vscode-light) |  |
|
|
98
98
|
|
|
99
99
|
### Demo Application
|
|
100
100
|
|
package/dist/index.cjs
CHANGED
|
@@ -3,64 +3,184 @@
|
|
|
3
3
|
var view = require('@codemirror/view');
|
|
4
4
|
var language = require('@codemirror/language');
|
|
5
5
|
var highlight = require('@lezer/highlight');
|
|
6
|
+
var _utils = require('@utils');
|
|
6
7
|
|
|
7
|
-
const base00 = '#002b36', base01 = '#073642', base02 = '#586e75', base03 = '#657b83', base04 = '#839496', base05 = '#93a1a1', base06 = '#eee8d5', base07 = '#fdf6e3', base_red = '#dc322f', base_orange = '#cb4b16', base_yellow = '#b58900', base_green = '#859900', base_cyan = '#2aa198', base_blue = '#268bd2', base_violet = '#6c71c4', base_magenta = '#d33682';
|
|
8
|
-
const invalid = '#d30102', stone = base04, darkBackground = '#00252f', highlightBackground = '#173541', background = base00, tooltipBackground = base01, selection = '#02b8ff57', cursor = base04;
|
|
9
8
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
* Enhanced Solarized Dark theme color definitions
|
|
10
|
+
* ---------------------------------------------
|
|
11
|
+
* Colors organized by function with visual color blocks
|
|
12
|
+
*/
|
|
13
|
+
// 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
|
|
22
|
+
// 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
|
|
31
|
+
// 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
|
|
45
|
+
/**
|
|
46
|
+
* Enhanced editor theme styles for Solarized Dark
|
|
47
|
+
*/
|
|
12
48
|
const solarizedDarkTheme = view.EditorView.theme({
|
|
49
|
+
// Base editor styles
|
|
13
50
|
'&': {
|
|
14
51
|
color: base05,
|
|
15
52
|
backgroundColor: background,
|
|
53
|
+
fontSize: _utils.generalContent.fontSize,
|
|
54
|
+
fontFamily: _utils.generalContent.fontFamily,
|
|
16
55
|
},
|
|
56
|
+
// Content and cursor
|
|
17
57
|
'.cm-content': {
|
|
18
58
|
caretColor: cursor,
|
|
59
|
+
lineHeight: _utils.generalContent.lineHeight,
|
|
60
|
+
},
|
|
61
|
+
'.cm-cursor, .cm-dropCursor': {
|
|
62
|
+
borderLeftColor: cursor,
|
|
63
|
+
borderLeftWidth: _utils.generalCursor.borderLeftWidth,
|
|
64
|
+
},
|
|
65
|
+
'.cm-fat-cursor': {
|
|
66
|
+
backgroundColor: `${cursor}99`,
|
|
67
|
+
color: background,
|
|
19
68
|
},
|
|
20
|
-
|
|
69
|
+
// Selection
|
|
21
70
|
'&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection': {
|
|
22
71
|
backgroundColor: selection,
|
|
23
|
-
color: '#FFFFFF',
|
|
24
72
|
},
|
|
25
|
-
|
|
26
|
-
'.cm-
|
|
27
|
-
|
|
73
|
+
// Make sure selection appears above active line
|
|
74
|
+
'.cm-selectionLayer': {
|
|
75
|
+
zIndex: 100,
|
|
76
|
+
},
|
|
77
|
+
// Search functionality
|
|
28
78
|
'.cm-searchMatch': {
|
|
29
|
-
backgroundColor: '#
|
|
30
|
-
outline:
|
|
31
|
-
color:
|
|
79
|
+
backgroundColor: '#586e7599',
|
|
80
|
+
outline: `1px solid ${base_blue}`,
|
|
81
|
+
color: base06,
|
|
82
|
+
borderRadius: _utils.generalSearchField.borderRadius,
|
|
83
|
+
'& span': {
|
|
84
|
+
color: base06,
|
|
85
|
+
},
|
|
32
86
|
},
|
|
33
87
|
'.cm-searchMatch.cm-searchMatch-selected': {
|
|
34
|
-
backgroundColor:
|
|
35
|
-
color:
|
|
88
|
+
backgroundColor: base_blue,
|
|
89
|
+
color: base07,
|
|
90
|
+
padding: _utils.generalSearchField.padding,
|
|
91
|
+
'& span': {
|
|
92
|
+
color: base07,
|
|
93
|
+
},
|
|
36
94
|
},
|
|
37
|
-
'.cm-
|
|
38
|
-
color:
|
|
95
|
+
'.cm-search.cm-panel.cm-textfield': {
|
|
96
|
+
color: base05,
|
|
97
|
+
borderRadius: _utils.generalSearchField.borderRadius,
|
|
98
|
+
padding: _utils.generalSearchField.padding,
|
|
39
99
|
},
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
100
|
+
// Panels
|
|
101
|
+
'.cm-panels': {
|
|
102
|
+
backgroundColor: darkBackground,
|
|
103
|
+
color: base04,
|
|
104
|
+
borderRadius: '4px',
|
|
105
|
+
},
|
|
106
|
+
'.cm-panels.cm-panels-top': {
|
|
107
|
+
borderBottom: `1px solid ${base01}`,
|
|
43
108
|
},
|
|
44
|
-
'
|
|
45
|
-
|
|
109
|
+
'.cm-panels.cm-panels-bottom': {
|
|
110
|
+
borderTop: `1px solid ${base01}`,
|
|
46
111
|
},
|
|
112
|
+
'.cm-panel button': {
|
|
113
|
+
backgroundColor: tooltipBackground,
|
|
114
|
+
color: base05,
|
|
115
|
+
border: _utils.generalPanel.border,
|
|
116
|
+
borderRadius: _utils.generalPanel.borderRadius,
|
|
117
|
+
padding: _utils.generalPanel.padding,
|
|
118
|
+
},
|
|
119
|
+
'.cm-panel button:hover': {
|
|
120
|
+
backgroundColor: highlightBackground,
|
|
121
|
+
},
|
|
122
|
+
// Line highlighting
|
|
123
|
+
'.cm-activeLine': {
|
|
124
|
+
backgroundColor: highlightBackground,
|
|
125
|
+
borderRadius: _utils.generalLine.borderRadius,
|
|
126
|
+
zIndex: 1,
|
|
127
|
+
},
|
|
128
|
+
// Gutters
|
|
47
129
|
'.cm-gutters': {
|
|
48
130
|
backgroundColor: darkBackground,
|
|
49
|
-
color:
|
|
50
|
-
border:
|
|
131
|
+
color: base02,
|
|
132
|
+
border: _utils.generalGutter.border,
|
|
133
|
+
borderRight: `1px solid ${base01}`,
|
|
134
|
+
paddingRight: _utils.generalGutter.paddingRight,
|
|
51
135
|
},
|
|
52
136
|
'.cm-activeLineGutter': {
|
|
53
|
-
backgroundColor:
|
|
54
|
-
color:
|
|
137
|
+
backgroundColor: base01,
|
|
138
|
+
color: base05,
|
|
139
|
+
fontWeight: _utils.generalGutter.fontWeight,
|
|
55
140
|
},
|
|
56
|
-
'.cm-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
141
|
+
'.cm-lineNumbers': {
|
|
142
|
+
fontSize: _utils.generalGutter.fontSize,
|
|
143
|
+
},
|
|
144
|
+
'.cm-foldGutter': {
|
|
145
|
+
fontSize: _utils.generalGutter.fontSize,
|
|
146
|
+
},
|
|
147
|
+
'.cm-foldGutter .cm-gutterElement': {
|
|
148
|
+
color: base02,
|
|
149
|
+
cursor: 'pointer',
|
|
60
150
|
},
|
|
151
|
+
'.cm-foldGutter .cm-gutterElement:hover': {
|
|
152
|
+
color: base04,
|
|
153
|
+
},
|
|
154
|
+
// Tooltips and autocomplete
|
|
61
155
|
'.cm-tooltip': {
|
|
62
|
-
border: 'none',
|
|
63
156
|
backgroundColor: tooltipBackground,
|
|
157
|
+
border: `1px solid ${base02}`,
|
|
158
|
+
borderRadius: _utils.generalTooltip.borderRadius,
|
|
159
|
+
padding: _utils.generalTooltip.padding,
|
|
160
|
+
boxShadow: '0 2px 8px rgba(0, 0, 0, 0.3)',
|
|
161
|
+
},
|
|
162
|
+
'.cm-tooltip-autocomplete': {
|
|
163
|
+
'& > ul': {
|
|
164
|
+
backgroundColor: tooltipBackground,
|
|
165
|
+
border: 'none',
|
|
166
|
+
},
|
|
167
|
+
'& > ul > li': {
|
|
168
|
+
padding: _utils.generalTooltip.padding,
|
|
169
|
+
lineHeight: _utils.generalTooltip.lineHeight,
|
|
170
|
+
},
|
|
171
|
+
'& > ul > li[aria-selected]': {
|
|
172
|
+
backgroundColor: selection,
|
|
173
|
+
color: base06,
|
|
174
|
+
borderRadius: _utils.generalTooltip.borderRadiusSelected,
|
|
175
|
+
},
|
|
176
|
+
'& > ul > li > span.cm-completionIcon': {
|
|
177
|
+
color: base03,
|
|
178
|
+
paddingRight: _utils.generalTooltip.paddingRight,
|
|
179
|
+
},
|
|
180
|
+
'& > ul > li > span.cm-completionDetail': {
|
|
181
|
+
color: base03,
|
|
182
|
+
fontStyle: 'italic',
|
|
183
|
+
},
|
|
64
184
|
},
|
|
65
185
|
'.cm-tooltip .cm-tooltip-arrow:before': {
|
|
66
186
|
borderTopColor: 'transparent',
|
|
@@ -70,113 +190,173 @@ const solarizedDarkTheme = view.EditorView.theme({
|
|
|
70
190
|
borderTopColor: tooltipBackground,
|
|
71
191
|
borderBottomColor: tooltipBackground,
|
|
72
192
|
},
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
193
|
+
// Diagnostics styling
|
|
194
|
+
'.cm-diagnostic': {
|
|
195
|
+
'&-error': {
|
|
196
|
+
borderLeft: `3px solid ${base_red}`,
|
|
77
197
|
},
|
|
198
|
+
'&-warning': {
|
|
199
|
+
borderLeft: `3px solid ${diagnosticWarning}`,
|
|
200
|
+
},
|
|
201
|
+
'&-info': {
|
|
202
|
+
borderLeft: `3px solid ${linkColor}`,
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
'.cm-lintPoint-error': {
|
|
206
|
+
borderBottom: `2px wavy ${base_red}`,
|
|
207
|
+
},
|
|
208
|
+
'.cm-lintPoint-warning': {
|
|
209
|
+
borderBottom: `2px wavy ${diagnosticWarning}`,
|
|
210
|
+
},
|
|
211
|
+
// Matching brackets
|
|
212
|
+
'.cm-matchingBracket': {
|
|
213
|
+
backgroundColor: activeBracketBg,
|
|
214
|
+
outline: `1px solid ${activeBracketBorder}`,
|
|
215
|
+
borderRadius: _utils.generalMatching.borderRadius,
|
|
216
|
+
},
|
|
217
|
+
'.cm-nonmatchingBracket': {
|
|
218
|
+
backgroundColor: `${base_red}40`,
|
|
219
|
+
outline: `1px solid ${invalid}`,
|
|
220
|
+
borderRadius: _utils.generalMatching.borderRadius,
|
|
221
|
+
},
|
|
222
|
+
// Selection matches
|
|
223
|
+
'.cm-selectionMatch': {
|
|
224
|
+
backgroundColor: selectionMatch,
|
|
225
|
+
outline: `1px solid ${base02}50`,
|
|
226
|
+
borderRadius: _utils.generalMatching.borderRadius,
|
|
227
|
+
},
|
|
228
|
+
// Fold placeholder
|
|
229
|
+
'.cm-foldPlaceholder': {
|
|
230
|
+
backgroundColor: tooltipBackground,
|
|
231
|
+
color: base03,
|
|
232
|
+
border: `1px dotted ${base02}70`,
|
|
233
|
+
borderRadius: _utils.generalPlaceholder.borderRadius,
|
|
234
|
+
padding: _utils.generalPlaceholder.padding,
|
|
235
|
+
margin: _utils.generalPlaceholder.margin,
|
|
236
|
+
},
|
|
237
|
+
// Focus outline
|
|
238
|
+
'&.cm-focused': {
|
|
239
|
+
outline: 'none',
|
|
240
|
+
boxShadow: `0 0 0 2px ${background}, 0 0 0 3px ${base_blue}40`,
|
|
241
|
+
},
|
|
242
|
+
// Scrollbars
|
|
243
|
+
'& .cm-scroller::-webkit-scrollbar': {
|
|
244
|
+
width: _utils.generalScroller.width,
|
|
245
|
+
height: _utils.generalScroller.height,
|
|
246
|
+
},
|
|
247
|
+
'& .cm-scroller::-webkit-scrollbar-track': {
|
|
248
|
+
background: darkBackground,
|
|
249
|
+
},
|
|
250
|
+
'& .cm-scroller::-webkit-scrollbar-thumb': {
|
|
251
|
+
backgroundColor: base01,
|
|
252
|
+
borderRadius: _utils.generalScroller.borderRadius,
|
|
253
|
+
border: `3px solid ${darkBackground}`,
|
|
254
|
+
},
|
|
255
|
+
'& .cm-scroller::-webkit-scrollbar-thumb:hover': {
|
|
256
|
+
backgroundColor: base02,
|
|
257
|
+
},
|
|
258
|
+
// Ghost text
|
|
259
|
+
'.cm-ghostText': {
|
|
260
|
+
opacity: '0.5',
|
|
261
|
+
color: base03,
|
|
78
262
|
},
|
|
79
263
|
}, { dark: true });
|
|
80
264
|
/**
|
|
81
|
-
|
|
82
|
-
*/
|
|
265
|
+
* Enhanced syntax highlighting for Solarized Dark theme
|
|
266
|
+
*/
|
|
83
267
|
const solarizedDarkHighlightStyle = language.HighlightStyle.define([
|
|
84
|
-
|
|
85
|
-
{
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
268
|
+
// 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' },
|
|
272
|
+
// Names and variables
|
|
273
|
+
{ tag: [highlight.tags.name, highlight.tags.deleted, highlight.tags.character, highlight.tags.macroName], color: base_cyan },
|
|
89
274
|
{ tag: [highlight.tags.variableName], color: base05 },
|
|
275
|
+
{ tag: [highlight.tags.propertyName], color: base_cyan, fontStyle: 'normal' },
|
|
276
|
+
// 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' },
|
|
280
|
+
// 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 },
|
|
284
|
+
{ tag: [highlight.tags.punctuation], color: base04 },
|
|
285
|
+
// Functions and parameters
|
|
90
286
|
{ tag: [highlight.tags.function(highlight.tags.variableName)], color: base_blue },
|
|
91
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 },
|
|
290
|
+
// Constants and literals
|
|
291
|
+
{ tag: highlight.tags.number, color: base_magenta },
|
|
292
|
+
{ tag: highlight.tags.changed, color: base_magenta },
|
|
293
|
+
{ 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 },
|
|
92
296
|
{
|
|
93
297
|
tag: [highlight.tags.color, highlight.tags.constant(highlight.tags.name), highlight.tags.standard(highlight.tags.name)],
|
|
94
298
|
color: base_yellow,
|
|
95
299
|
},
|
|
300
|
+
{ tag: [highlight.tags.atom, highlight.tags.bool, highlight.tags.special(highlight.tags.variableName)], color: base_magenta },
|
|
301
|
+
// Strings and regex
|
|
302
|
+
{ tag: [highlight.tags.processingInstruction, highlight.tags.inserted], color: base_green },
|
|
303
|
+
{ tag: [highlight.tags.special(highlight.tags.string), highlight.tags.regexp], color: invalid },
|
|
304
|
+
{ tag: highlight.tags.string, color: base_yellow },
|
|
305
|
+
// Punctuation and structure
|
|
306
|
+
{ tag: highlight.tags.definition(highlight.tags.typeName), color: base_orange, fontWeight: 'bold' },
|
|
96
307
|
{ tag: [highlight.tags.definition(highlight.tags.name), highlight.tags.separator], color: base_cyan },
|
|
97
|
-
|
|
98
|
-
{
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
{
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
},
|
|
114
|
-
|
|
115
|
-
tag: [highlight.tags.tagName],
|
|
116
|
-
color: base_blue,
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
tag: [highlight.tags.squareBracket],
|
|
120
|
-
color: base_red,
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
tag: [highlight.tags.angleBracket],
|
|
124
|
-
color: base02,
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
tag: [highlight.tags.attributeName],
|
|
128
|
-
color: base05,
|
|
129
|
-
},
|
|
308
|
+
// Comments and documentation
|
|
309
|
+
{ tag: highlight.tags.meta, color: base_red },
|
|
310
|
+
{ tag: highlight.tags.comment, fontStyle: 'italic', color: base02 },
|
|
311
|
+
{ tag: highlight.tags.docComment, fontStyle: 'italic', color: base02 },
|
|
312
|
+
// HTML/XML elements
|
|
313
|
+
{ tag: [highlight.tags.tagName], color: base_blue },
|
|
314
|
+
{ tag: [highlight.tags.attributeName], color: base05 },
|
|
315
|
+
// Markdown and text formatting
|
|
316
|
+
{ tag: [highlight.tags.heading], fontWeight: 'bold', color: base_yellow },
|
|
317
|
+
{ tag: highlight.tags.heading1, color: base07 },
|
|
318
|
+
{ tag: highlight.tags.heading2, color: base06 },
|
|
319
|
+
{ tag: highlight.tags.heading3, color: base06 },
|
|
320
|
+
{ tag: highlight.tags.heading4, color: base06 },
|
|
321
|
+
{ tag: highlight.tags.heading5, color: base06 },
|
|
322
|
+
{ tag: highlight.tags.heading6, color: base06 },
|
|
323
|
+
{ tag: [highlight.tags.strong], fontWeight: 'bold', color: base06 },
|
|
324
|
+
{ tag: [highlight.tags.emphasis], fontStyle: 'italic', color: base_green },
|
|
325
|
+
// Links and URLs
|
|
130
326
|
{
|
|
131
|
-
tag: [highlight.tags.
|
|
132
|
-
color: invalid,
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
tag: [highlight.tags.quote],
|
|
136
|
-
color: base_green,
|
|
137
|
-
},
|
|
138
|
-
{ tag: [highlight.tags.string], color: base_yellow },
|
|
139
|
-
{
|
|
140
|
-
tag: highlight.tags.link,
|
|
327
|
+
tag: [highlight.tags.link],
|
|
141
328
|
color: base_cyan,
|
|
329
|
+
fontWeight: '500',
|
|
142
330
|
textDecoration: 'underline',
|
|
143
331
|
textUnderlinePosition: 'under',
|
|
144
332
|
},
|
|
145
333
|
{
|
|
146
|
-
tag: [highlight.tags.url
|
|
334
|
+
tag: [highlight.tags.url],
|
|
147
335
|
color: base_yellow,
|
|
336
|
+
textDecoration: 'underline',
|
|
337
|
+
textUnderlineOffset: '2px',
|
|
148
338
|
},
|
|
149
|
-
|
|
150
|
-
{ tag: [highlight.tags.comment], color: base02, fontStyle: 'italic' },
|
|
151
|
-
{ tag: highlight.tags.strong, fontWeight: 'bold', color: base06 },
|
|
152
|
-
{ tag: highlight.tags.emphasis, fontStyle: 'italic', color: base_green },
|
|
153
|
-
{ tag: highlight.tags.strikethrough, textDecoration: 'line-through' },
|
|
154
|
-
{ tag: highlight.tags.heading, fontWeight: 'bold', color: base_yellow },
|
|
155
|
-
{ tag: highlight.tags.heading1, fontWeight: 'bold', color: base07 },
|
|
156
|
-
{
|
|
157
|
-
tag: [highlight.tags.heading2, highlight.tags.heading3, highlight.tags.heading4],
|
|
158
|
-
fontWeight: 'bold',
|
|
159
|
-
color: base06,
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
tag: [highlight.tags.heading5, highlight.tags.heading6],
|
|
163
|
-
color: base06,
|
|
164
|
-
},
|
|
165
|
-
{ tag: [highlight.tags.atom, highlight.tags.bool, highlight.tags.special(highlight.tags.variableName)], color: base_magenta },
|
|
166
|
-
{
|
|
167
|
-
tag: [highlight.tags.processingInstruction, highlight.tags.inserted, highlight.tags.contentSeparator],
|
|
168
|
-
color: base_red,
|
|
169
|
-
},
|
|
339
|
+
// Special states
|
|
170
340
|
{
|
|
171
|
-
tag: [highlight.tags.
|
|
172
|
-
color:
|
|
173
|
-
|
|
174
|
-
|
|
341
|
+
tag: [highlight.tags.invalid],
|
|
342
|
+
color: base02,
|
|
343
|
+
textDecoration: 'underline wavy',
|
|
344
|
+
borderBottom: `1px dotted ${base_red}`,
|
|
345
|
+
},
|
|
346
|
+
{ tag: [highlight.tags.strikethrough], color: invalid, textDecoration: 'line-through' },
|
|
347
|
+
// 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 },
|
|
351
|
+
{ tag: highlight.tags.angleBracket, color: base02 },
|
|
352
|
+
// Additional specific styles
|
|
353
|
+
{ tag: highlight.tags.monospace, color: base05 },
|
|
354
|
+
{ tag: [highlight.tags.contentSeparator], color: base_yellow },
|
|
355
|
+
{ tag: highlight.tags.quote, color: base_green },
|
|
175
356
|
]);
|
|
176
357
|
/**
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
*/
|
|
358
|
+
* Combined Solarized Dark theme extension
|
|
359
|
+
*/
|
|
180
360
|
const solarizedDark = [
|
|
181
361
|
solarizedDarkTheme,
|
|
182
362
|
language.syntaxHighlighting(solarizedDarkHighlightStyle),
|
package/dist/index.d.cts
CHANGED
|
@@ -2,17 +2,16 @@ import { Extension } from '@codemirror/state';
|
|
|
2
2
|
import { HighlightStyle } from '@codemirror/language';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
|
|
6
|
-
*/
|
|
5
|
+
* Enhanced editor theme styles for Solarized Dark
|
|
6
|
+
*/
|
|
7
7
|
declare const solarizedDarkTheme: Extension;
|
|
8
8
|
/**
|
|
9
|
-
|
|
10
|
-
*/
|
|
9
|
+
* Enhanced syntax highlighting for Solarized Dark theme
|
|
10
|
+
*/
|
|
11
11
|
declare const solarizedDarkHighlightStyle: HighlightStyle;
|
|
12
12
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
*/
|
|
13
|
+
* Combined Solarized Dark theme extension
|
|
14
|
+
*/
|
|
16
15
|
declare const solarizedDark: Extension;
|
|
17
16
|
|
|
18
17
|
export { solarizedDark, solarizedDarkHighlightStyle, solarizedDarkTheme };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,17 +2,16 @@ import { Extension } from '@codemirror/state';
|
|
|
2
2
|
import { HighlightStyle } from '@codemirror/language';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
|
|
6
|
-
*/
|
|
5
|
+
* Enhanced editor theme styles for Solarized Dark
|
|
6
|
+
*/
|
|
7
7
|
declare const solarizedDarkTheme: Extension;
|
|
8
8
|
/**
|
|
9
|
-
|
|
10
|
-
*/
|
|
9
|
+
* Enhanced syntax highlighting for Solarized Dark theme
|
|
10
|
+
*/
|
|
11
11
|
declare const solarizedDarkHighlightStyle: HighlightStyle;
|
|
12
12
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
*/
|
|
13
|
+
* Combined Solarized Dark theme extension
|
|
14
|
+
*/
|
|
16
15
|
declare const solarizedDark: Extension;
|
|
17
16
|
|
|
18
17
|
export { solarizedDark, solarizedDarkHighlightStyle, solarizedDarkTheme };
|
package/dist/index.js
CHANGED
|
@@ -1,64 +1,184 @@
|
|
|
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 '@utils';
|
|
4
5
|
|
|
5
|
-
const base00 = '#002b36', base01 = '#073642', base02 = '#586e75', base03 = '#657b83', base04 = '#839496', base05 = '#93a1a1', base06 = '#eee8d5', base07 = '#fdf6e3', base_red = '#dc322f', base_orange = '#cb4b16', base_yellow = '#b58900', base_green = '#859900', base_cyan = '#2aa198', base_blue = '#268bd2', base_violet = '#6c71c4', base_magenta = '#d33682';
|
|
6
|
-
const invalid = '#d30102', stone = base04, darkBackground = '#00252f', highlightBackground = '#173541', background = base00, tooltipBackground = base01, selection = '#02b8ff57', cursor = base04;
|
|
7
6
|
/**
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
* Enhanced Solarized Dark theme color definitions
|
|
8
|
+
* ---------------------------------------------
|
|
9
|
+
* Colors organized by function with visual color blocks
|
|
10
|
+
*/
|
|
11
|
+
// 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
|
|
20
|
+
// 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
|
|
29
|
+
// 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
|
|
43
|
+
/**
|
|
44
|
+
* Enhanced editor theme styles for Solarized Dark
|
|
45
|
+
*/
|
|
10
46
|
const solarizedDarkTheme = /*@__PURE__*/EditorView.theme({
|
|
47
|
+
// Base editor styles
|
|
11
48
|
'&': {
|
|
12
49
|
color: base05,
|
|
13
50
|
backgroundColor: background,
|
|
51
|
+
fontSize: generalContent.fontSize,
|
|
52
|
+
fontFamily: generalContent.fontFamily,
|
|
14
53
|
},
|
|
54
|
+
// Content and cursor
|
|
15
55
|
'.cm-content': {
|
|
16
56
|
caretColor: cursor,
|
|
57
|
+
lineHeight: generalContent.lineHeight,
|
|
58
|
+
},
|
|
59
|
+
'.cm-cursor, .cm-dropCursor': {
|
|
60
|
+
borderLeftColor: cursor,
|
|
61
|
+
borderLeftWidth: generalCursor.borderLeftWidth,
|
|
62
|
+
},
|
|
63
|
+
'.cm-fat-cursor': {
|
|
64
|
+
backgroundColor: `${cursor}99`,
|
|
65
|
+
color: background,
|
|
17
66
|
},
|
|
18
|
-
|
|
67
|
+
// Selection
|
|
19
68
|
'&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection': {
|
|
20
69
|
backgroundColor: selection,
|
|
21
|
-
color: '#FFFFFF',
|
|
22
70
|
},
|
|
23
|
-
|
|
24
|
-
'.cm-
|
|
25
|
-
|
|
71
|
+
// Make sure selection appears above active line
|
|
72
|
+
'.cm-selectionLayer': {
|
|
73
|
+
zIndex: 100,
|
|
74
|
+
},
|
|
75
|
+
// Search functionality
|
|
26
76
|
'.cm-searchMatch': {
|
|
27
|
-
backgroundColor: '#
|
|
28
|
-
outline:
|
|
29
|
-
color:
|
|
77
|
+
backgroundColor: '#586e7599',
|
|
78
|
+
outline: `1px solid ${base_blue}`,
|
|
79
|
+
color: base06,
|
|
80
|
+
borderRadius: generalSearchField.borderRadius,
|
|
81
|
+
'& span': {
|
|
82
|
+
color: base06,
|
|
83
|
+
},
|
|
30
84
|
},
|
|
31
85
|
'.cm-searchMatch.cm-searchMatch-selected': {
|
|
32
|
-
backgroundColor:
|
|
33
|
-
color:
|
|
86
|
+
backgroundColor: base_blue,
|
|
87
|
+
color: base07,
|
|
88
|
+
padding: generalSearchField.padding,
|
|
89
|
+
'& span': {
|
|
90
|
+
color: base07,
|
|
91
|
+
},
|
|
34
92
|
},
|
|
35
|
-
'.cm-
|
|
36
|
-
color:
|
|
93
|
+
'.cm-search.cm-panel.cm-textfield': {
|
|
94
|
+
color: base05,
|
|
95
|
+
borderRadius: generalSearchField.borderRadius,
|
|
96
|
+
padding: generalSearchField.padding,
|
|
37
97
|
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
98
|
+
// Panels
|
|
99
|
+
'.cm-panels': {
|
|
100
|
+
backgroundColor: darkBackground,
|
|
101
|
+
color: base04,
|
|
102
|
+
borderRadius: '4px',
|
|
103
|
+
},
|
|
104
|
+
'.cm-panels.cm-panels-top': {
|
|
105
|
+
borderBottom: `1px solid ${base01}`,
|
|
41
106
|
},
|
|
42
|
-
'
|
|
43
|
-
|
|
107
|
+
'.cm-panels.cm-panels-bottom': {
|
|
108
|
+
borderTop: `1px solid ${base01}`,
|
|
44
109
|
},
|
|
110
|
+
'.cm-panel button': {
|
|
111
|
+
backgroundColor: tooltipBackground,
|
|
112
|
+
color: base05,
|
|
113
|
+
border: generalPanel.border,
|
|
114
|
+
borderRadius: generalPanel.borderRadius,
|
|
115
|
+
padding: generalPanel.padding,
|
|
116
|
+
},
|
|
117
|
+
'.cm-panel button:hover': {
|
|
118
|
+
backgroundColor: highlightBackground,
|
|
119
|
+
},
|
|
120
|
+
// Line highlighting
|
|
121
|
+
'.cm-activeLine': {
|
|
122
|
+
backgroundColor: highlightBackground,
|
|
123
|
+
borderRadius: generalLine.borderRadius,
|
|
124
|
+
zIndex: 1,
|
|
125
|
+
},
|
|
126
|
+
// Gutters
|
|
45
127
|
'.cm-gutters': {
|
|
46
128
|
backgroundColor: darkBackground,
|
|
47
|
-
color:
|
|
48
|
-
border:
|
|
129
|
+
color: base02,
|
|
130
|
+
border: generalGutter.border,
|
|
131
|
+
borderRight: `1px solid ${base01}`,
|
|
132
|
+
paddingRight: generalGutter.paddingRight,
|
|
49
133
|
},
|
|
50
134
|
'.cm-activeLineGutter': {
|
|
51
|
-
backgroundColor:
|
|
52
|
-
color:
|
|
135
|
+
backgroundColor: base01,
|
|
136
|
+
color: base05,
|
|
137
|
+
fontWeight: generalGutter.fontWeight,
|
|
53
138
|
},
|
|
54
|
-
'.cm-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
139
|
+
'.cm-lineNumbers': {
|
|
140
|
+
fontSize: generalGutter.fontSize,
|
|
141
|
+
},
|
|
142
|
+
'.cm-foldGutter': {
|
|
143
|
+
fontSize: generalGutter.fontSize,
|
|
144
|
+
},
|
|
145
|
+
'.cm-foldGutter .cm-gutterElement': {
|
|
146
|
+
color: base02,
|
|
147
|
+
cursor: 'pointer',
|
|
58
148
|
},
|
|
149
|
+
'.cm-foldGutter .cm-gutterElement:hover': {
|
|
150
|
+
color: base04,
|
|
151
|
+
},
|
|
152
|
+
// Tooltips and autocomplete
|
|
59
153
|
'.cm-tooltip': {
|
|
60
|
-
border: 'none',
|
|
61
154
|
backgroundColor: tooltipBackground,
|
|
155
|
+
border: `1px solid ${base02}`,
|
|
156
|
+
borderRadius: generalTooltip.borderRadius,
|
|
157
|
+
padding: generalTooltip.padding,
|
|
158
|
+
boxShadow: '0 2px 8px rgba(0, 0, 0, 0.3)',
|
|
159
|
+
},
|
|
160
|
+
'.cm-tooltip-autocomplete': {
|
|
161
|
+
'& > ul': {
|
|
162
|
+
backgroundColor: tooltipBackground,
|
|
163
|
+
border: 'none',
|
|
164
|
+
},
|
|
165
|
+
'& > ul > li': {
|
|
166
|
+
padding: generalTooltip.padding,
|
|
167
|
+
lineHeight: generalTooltip.lineHeight,
|
|
168
|
+
},
|
|
169
|
+
'& > ul > li[aria-selected]': {
|
|
170
|
+
backgroundColor: selection,
|
|
171
|
+
color: base06,
|
|
172
|
+
borderRadius: generalTooltip.borderRadiusSelected,
|
|
173
|
+
},
|
|
174
|
+
'& > ul > li > span.cm-completionIcon': {
|
|
175
|
+
color: base03,
|
|
176
|
+
paddingRight: generalTooltip.paddingRight,
|
|
177
|
+
},
|
|
178
|
+
'& > ul > li > span.cm-completionDetail': {
|
|
179
|
+
color: base03,
|
|
180
|
+
fontStyle: 'italic',
|
|
181
|
+
},
|
|
62
182
|
},
|
|
63
183
|
'.cm-tooltip .cm-tooltip-arrow:before': {
|
|
64
184
|
borderTopColor: 'transparent',
|
|
@@ -68,113 +188,173 @@ const solarizedDarkTheme = /*@__PURE__*/EditorView.theme({
|
|
|
68
188
|
borderTopColor: tooltipBackground,
|
|
69
189
|
borderBottomColor: tooltipBackground,
|
|
70
190
|
},
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
191
|
+
// Diagnostics styling
|
|
192
|
+
'.cm-diagnostic': {
|
|
193
|
+
'&-error': {
|
|
194
|
+
borderLeft: `3px solid ${base_red}`,
|
|
75
195
|
},
|
|
196
|
+
'&-warning': {
|
|
197
|
+
borderLeft: `3px solid ${diagnosticWarning}`,
|
|
198
|
+
},
|
|
199
|
+
'&-info': {
|
|
200
|
+
borderLeft: `3px solid ${linkColor}`,
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
'.cm-lintPoint-error': {
|
|
204
|
+
borderBottom: `2px wavy ${base_red}`,
|
|
205
|
+
},
|
|
206
|
+
'.cm-lintPoint-warning': {
|
|
207
|
+
borderBottom: `2px wavy ${diagnosticWarning}`,
|
|
208
|
+
},
|
|
209
|
+
// Matching brackets
|
|
210
|
+
'.cm-matchingBracket': {
|
|
211
|
+
backgroundColor: activeBracketBg,
|
|
212
|
+
outline: `1px solid ${activeBracketBorder}`,
|
|
213
|
+
borderRadius: generalMatching.borderRadius,
|
|
214
|
+
},
|
|
215
|
+
'.cm-nonmatchingBracket': {
|
|
216
|
+
backgroundColor: `${base_red}40`,
|
|
217
|
+
outline: `1px solid ${invalid}`,
|
|
218
|
+
borderRadius: generalMatching.borderRadius,
|
|
219
|
+
},
|
|
220
|
+
// Selection matches
|
|
221
|
+
'.cm-selectionMatch': {
|
|
222
|
+
backgroundColor: selectionMatch,
|
|
223
|
+
outline: `1px solid ${base02}50`,
|
|
224
|
+
borderRadius: generalMatching.borderRadius,
|
|
225
|
+
},
|
|
226
|
+
// Fold placeholder
|
|
227
|
+
'.cm-foldPlaceholder': {
|
|
228
|
+
backgroundColor: tooltipBackground,
|
|
229
|
+
color: base03,
|
|
230
|
+
border: `1px dotted ${base02}70`,
|
|
231
|
+
borderRadius: generalPlaceholder.borderRadius,
|
|
232
|
+
padding: generalPlaceholder.padding,
|
|
233
|
+
margin: generalPlaceholder.margin,
|
|
234
|
+
},
|
|
235
|
+
// Focus outline
|
|
236
|
+
'&.cm-focused': {
|
|
237
|
+
outline: 'none',
|
|
238
|
+
boxShadow: `0 0 0 2px ${background}, 0 0 0 3px ${base_blue}40`,
|
|
239
|
+
},
|
|
240
|
+
// Scrollbars
|
|
241
|
+
'& .cm-scroller::-webkit-scrollbar': {
|
|
242
|
+
width: generalScroller.width,
|
|
243
|
+
height: generalScroller.height,
|
|
244
|
+
},
|
|
245
|
+
'& .cm-scroller::-webkit-scrollbar-track': {
|
|
246
|
+
background: darkBackground,
|
|
247
|
+
},
|
|
248
|
+
'& .cm-scroller::-webkit-scrollbar-thumb': {
|
|
249
|
+
backgroundColor: base01,
|
|
250
|
+
borderRadius: generalScroller.borderRadius,
|
|
251
|
+
border: `3px solid ${darkBackground}`,
|
|
252
|
+
},
|
|
253
|
+
'& .cm-scroller::-webkit-scrollbar-thumb:hover': {
|
|
254
|
+
backgroundColor: base02,
|
|
255
|
+
},
|
|
256
|
+
// Ghost text
|
|
257
|
+
'.cm-ghostText': {
|
|
258
|
+
opacity: '0.5',
|
|
259
|
+
color: base03,
|
|
76
260
|
},
|
|
77
261
|
}, { dark: true });
|
|
78
262
|
/**
|
|
79
|
-
|
|
80
|
-
*/
|
|
263
|
+
* Enhanced syntax highlighting for Solarized Dark theme
|
|
264
|
+
*/
|
|
81
265
|
const solarizedDarkHighlightStyle = /*@__PURE__*/HighlightStyle.define([
|
|
82
|
-
|
|
83
|
-
{
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
266
|
+
// 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' },
|
|
270
|
+
// Names and variables
|
|
271
|
+
{ tag: [tags.name, tags.deleted, tags.character, tags.macroName], color: base_cyan },
|
|
87
272
|
{ tag: [tags.variableName], color: base05 },
|
|
273
|
+
{ tag: [tags.propertyName], color: base_cyan, fontStyle: 'normal' },
|
|
274
|
+
// 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' },
|
|
278
|
+
// 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 },
|
|
282
|
+
{ tag: [tags.punctuation], color: base04 },
|
|
283
|
+
// Functions and parameters
|
|
88
284
|
{ tag: [/*@__PURE__*/tags.function(tags.variableName)], color: base_blue },
|
|
89
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 },
|
|
288
|
+
// Constants and literals
|
|
289
|
+
{ tag: tags.number, color: base_magenta },
|
|
290
|
+
{ tag: tags.changed, color: base_magenta },
|
|
291
|
+
{ tag: tags.annotation, color: invalid, fontStyle: 'italic' },
|
|
292
|
+
{ tag: tags.modifier, color: base_magenta, fontStyle: 'italic' },
|
|
293
|
+
{ tag: tags.self, color: base_magenta },
|
|
90
294
|
{
|
|
91
295
|
tag: [tags.color, /*@__PURE__*/tags.constant(tags.name), /*@__PURE__*/tags.standard(tags.name)],
|
|
92
296
|
color: base_yellow,
|
|
93
297
|
},
|
|
298
|
+
{ tag: [tags.atom, tags.bool, /*@__PURE__*/tags.special(tags.variableName)], color: base_magenta },
|
|
299
|
+
// Strings and regex
|
|
300
|
+
{ tag: [tags.processingInstruction, tags.inserted], color: base_green },
|
|
301
|
+
{ tag: [/*@__PURE__*/tags.special(tags.string), tags.regexp], color: invalid },
|
|
302
|
+
{ tag: tags.string, color: base_yellow },
|
|
303
|
+
// Punctuation and structure
|
|
304
|
+
{ tag: /*@__PURE__*/tags.definition(tags.typeName), color: base_orange, fontWeight: 'bold' },
|
|
94
305
|
{ tag: [/*@__PURE__*/tags.definition(tags.name), tags.separator], color: base_cyan },
|
|
95
|
-
|
|
96
|
-
{
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
{
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
},
|
|
112
|
-
|
|
113
|
-
tag: [tags.tagName],
|
|
114
|
-
color: base_blue,
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
tag: [tags.squareBracket],
|
|
118
|
-
color: base_red,
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
tag: [tags.angleBracket],
|
|
122
|
-
color: base02,
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
tag: [tags.attributeName],
|
|
126
|
-
color: base05,
|
|
127
|
-
},
|
|
306
|
+
// Comments and documentation
|
|
307
|
+
{ tag: tags.meta, color: base_red },
|
|
308
|
+
{ tag: tags.comment, fontStyle: 'italic', color: base02 },
|
|
309
|
+
{ tag: tags.docComment, fontStyle: 'italic', color: base02 },
|
|
310
|
+
// HTML/XML elements
|
|
311
|
+
{ tag: [tags.tagName], color: base_blue },
|
|
312
|
+
{ tag: [tags.attributeName], color: base05 },
|
|
313
|
+
// Markdown and text formatting
|
|
314
|
+
{ tag: [tags.heading], fontWeight: 'bold', color: base_yellow },
|
|
315
|
+
{ tag: tags.heading1, color: base07 },
|
|
316
|
+
{ tag: tags.heading2, color: base06 },
|
|
317
|
+
{ tag: tags.heading3, color: base06 },
|
|
318
|
+
{ tag: tags.heading4, color: base06 },
|
|
319
|
+
{ tag: tags.heading5, color: base06 },
|
|
320
|
+
{ tag: tags.heading6, color: base06 },
|
|
321
|
+
{ tag: [tags.strong], fontWeight: 'bold', color: base06 },
|
|
322
|
+
{ tag: [tags.emphasis], fontStyle: 'italic', color: base_green },
|
|
323
|
+
// Links and URLs
|
|
128
324
|
{
|
|
129
|
-
tag: [tags.
|
|
130
|
-
color: invalid,
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
tag: [tags.quote],
|
|
134
|
-
color: base_green,
|
|
135
|
-
},
|
|
136
|
-
{ tag: [tags.string], color: base_yellow },
|
|
137
|
-
{
|
|
138
|
-
tag: tags.link,
|
|
325
|
+
tag: [tags.link],
|
|
139
326
|
color: base_cyan,
|
|
327
|
+
fontWeight: '500',
|
|
140
328
|
textDecoration: 'underline',
|
|
141
329
|
textUnderlinePosition: 'under',
|
|
142
330
|
},
|
|
143
331
|
{
|
|
144
|
-
tag: [tags.url
|
|
332
|
+
tag: [tags.url],
|
|
145
333
|
color: base_yellow,
|
|
334
|
+
textDecoration: 'underline',
|
|
335
|
+
textUnderlineOffset: '2px',
|
|
146
336
|
},
|
|
147
|
-
|
|
148
|
-
{ tag: [tags.comment], color: base02, fontStyle: 'italic' },
|
|
149
|
-
{ tag: tags.strong, fontWeight: 'bold', color: base06 },
|
|
150
|
-
{ tag: tags.emphasis, fontStyle: 'italic', color: base_green },
|
|
151
|
-
{ tag: tags.strikethrough, textDecoration: 'line-through' },
|
|
152
|
-
{ tag: tags.heading, fontWeight: 'bold', color: base_yellow },
|
|
153
|
-
{ tag: tags.heading1, fontWeight: 'bold', color: base07 },
|
|
154
|
-
{
|
|
155
|
-
tag: [tags.heading2, tags.heading3, tags.heading4],
|
|
156
|
-
fontWeight: 'bold',
|
|
157
|
-
color: base06,
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
tag: [tags.heading5, tags.heading6],
|
|
161
|
-
color: base06,
|
|
162
|
-
},
|
|
163
|
-
{ tag: [tags.atom, tags.bool, /*@__PURE__*/tags.special(tags.variableName)], color: base_magenta },
|
|
164
|
-
{
|
|
165
|
-
tag: [tags.processingInstruction, tags.inserted, tags.contentSeparator],
|
|
166
|
-
color: base_red,
|
|
167
|
-
},
|
|
337
|
+
// Special states
|
|
168
338
|
{
|
|
169
|
-
tag: [tags.
|
|
170
|
-
color:
|
|
171
|
-
|
|
172
|
-
|
|
339
|
+
tag: [tags.invalid],
|
|
340
|
+
color: base02,
|
|
341
|
+
textDecoration: 'underline wavy',
|
|
342
|
+
borderBottom: `1px dotted ${base_red}`,
|
|
343
|
+
},
|
|
344
|
+
{ tag: [tags.strikethrough], color: invalid, textDecoration: 'line-through' },
|
|
345
|
+
// 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 },
|
|
349
|
+
{ tag: tags.angleBracket, color: base02 },
|
|
350
|
+
// Additional specific styles
|
|
351
|
+
{ tag: tags.monospace, color: base05 },
|
|
352
|
+
{ tag: [tags.contentSeparator], color: base_yellow },
|
|
353
|
+
{ tag: tags.quote, color: base_green },
|
|
173
354
|
]);
|
|
174
355
|
/**
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
*/
|
|
356
|
+
* Combined Solarized Dark theme extension
|
|
357
|
+
*/
|
|
178
358
|
const solarizedDark = [
|
|
179
359
|
solarizedDarkTheme,
|
|
180
360
|
/*@__PURE__*/syntaxHighlighting(solarizedDarkHighlightStyle),
|
package/package.json
CHANGED