@fsegurai/codemirror-theme-solarized-dark 6.2.5 → 6.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/README.md +40 -32
  2. package/dist/index.cjs +670 -380
  3. package/dist/index.js +670 -380
  4. package/package.json +12 -3
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { EditorView } from '@codemirror/view';
2
1
  import { HighlightStyle, syntaxHighlighting } from '@codemirror/language';
2
+ import { EditorView } from '@codemirror/view';
3
3
  import { tags } from '@lezer/highlight';
4
4
 
5
5
  // Helper module for styling options
@@ -8,9 +8,6 @@ const generalContent = {
8
8
  fontFamily: 'JetBrains Mono, Consolas, monospace',
9
9
  lineHeight: '1.6',
10
10
  };
11
- const generalCursor = {
12
- borderLeftWidth: '2px',
13
- };
14
11
  const generalDiff = {
15
12
  insertedTextDecoration: 'none',
16
13
  deletedTextDecoration: 'line-through',
@@ -20,11 +17,9 @@ const generalGutter = {
20
17
  border: 'none',
21
18
  paddingRight: '8px',
22
19
  fontSize: '0.9em',
23
- fontWeight: '500',
24
20
  lineHeight: '1.78', // Adjusted to compensate for 0.9em fontSize (1.6 / 0.9 ≈ 1.78)
25
21
  };
26
22
  const generalPanel = {
27
- border: 'none',
28
23
  borderRadius: '4px',
29
24
  padding: '2px 10px',
30
25
  };
@@ -104,6 +99,498 @@ function applyMergeRevertStyles(styles) {
104
99
  document.head.appendChild(styleEl);
105
100
  }
106
101
 
102
+ // Shared theme core: every theme package describes a palette (`ThemeDefinition`) and this module turns it into the
103
+ // CodeMirror extension. Generated into each package by `bun run generate:helpers`; edit only the copy in
104
+ // `packages/.helper/utils/`.
105
+ /** Parent of every fine role: an omitted fine role resolves to its parent. */
106
+ const ROLE_PARENTS = {
107
+ controlKeyword: 'keyword',
108
+ moduleKeyword: 'keyword',
109
+ definitionKeyword: 'keyword',
110
+ operatorKeyword: 'operator',
111
+ modifier: 'keyword',
112
+ arithmeticOperator: 'operator',
113
+ logicOperator: 'operator',
114
+ compareOperator: 'operator',
115
+ bitwiseOperator: 'operator',
116
+ updateOperator: 'operator',
117
+ derefOperator: 'operator',
118
+ definitionOperator: 'operator',
119
+ typeOperator: 'operator',
120
+ controlOperator: 'operator',
121
+ separator: 'punctuation',
122
+ bracket: 'punctuation',
123
+ paren: 'bracket',
124
+ brace: 'bracket',
125
+ squareBracket: 'bracket',
126
+ angleBracket: 'bracket',
127
+ character: 'name',
128
+ macroName: 'name',
129
+ variable: 'name',
130
+ localVariable: 'variable',
131
+ variableDefinition: 'variable',
132
+ nameDefinition: 'variableDefinition',
133
+ functionDefinition: 'function',
134
+ self: 'variable',
135
+ label: 'name',
136
+ propertyDefinition: 'property',
137
+ method: 'property',
138
+ methodDefinition: 'method',
139
+ specialProperty: 'property',
140
+ typeDefinition: 'type',
141
+ className: 'type',
142
+ namespace: 'type',
143
+ standardTag: 'tag',
144
+ annotation: 'meta',
145
+ documentMeta: 'meta',
146
+ processingInstruction: 'meta',
147
+ attributeValue: 'string',
148
+ literal: 'string',
149
+ docString: 'string',
150
+ regexp: 'string',
151
+ specialString: 'regexp',
152
+ escape: 'string',
153
+ unit: 'number',
154
+ atom: 'constant',
155
+ bool: 'atom',
156
+ null: 'constant',
157
+ constantName: 'constant',
158
+ standardName: 'constant',
159
+ color: 'standardName',
160
+ specialVariable: 'constant',
161
+ docComment: 'comment',
162
+ headingLevel: 'heading',
163
+ heading1: 'headingLevel',
164
+ heading2: 'headingLevel',
165
+ heading3: 'headingLevel',
166
+ heading4: 'headingLevel',
167
+ heading5: 'headingLevel',
168
+ heading6: 'headingLevel',
169
+ list: 'name',
170
+ quote: 'string',
171
+ monospace: 'string',
172
+ contentSeparator: 'punctuation',
173
+ };
174
+ /**
175
+ * Canonical tag → role table shared by every theme: every Lezer base tag and the modifier combinations that the
176
+ * official grammars emit. Each tag appears once, so no rule is shadowed by a later one.
177
+ */
178
+ const SYNTAX_TAGS = [
179
+ ['keyword', [tags.keyword]],
180
+ ['controlKeyword', [tags.controlKeyword]],
181
+ ['moduleKeyword', [tags.moduleKeyword]],
182
+ ['definitionKeyword', [tags.definitionKeyword]],
183
+ ['operatorKeyword', [tags.operatorKeyword]],
184
+ ['modifier', [tags.modifier]],
185
+ ['operator', [tags.operator]],
186
+ ['arithmeticOperator', [tags.arithmeticOperator]],
187
+ ['logicOperator', [tags.logicOperator]],
188
+ ['compareOperator', [tags.compareOperator]],
189
+ ['bitwiseOperator', [tags.bitwiseOperator]],
190
+ ['updateOperator', [tags.updateOperator]],
191
+ ['derefOperator', [tags.derefOperator]],
192
+ ['definitionOperator', [tags.definitionOperator]],
193
+ ['typeOperator', [tags.typeOperator]],
194
+ ['controlOperator', [tags.controlOperator]],
195
+ ['punctuation', [tags.punctuation, /*@__PURE__*/tags.function(tags.punctuation)]],
196
+ ['separator', [tags.separator]],
197
+ ['bracket', [tags.bracket]],
198
+ ['paren', [tags.paren]],
199
+ ['brace', [tags.brace, /*@__PURE__*/tags.special(tags.brace)]],
200
+ ['squareBracket', [tags.squareBracket]],
201
+ ['angleBracket', [tags.angleBracket]],
202
+ ['name', [tags.name, /*@__PURE__*/tags.special(tags.name)]],
203
+ ['character', [tags.character]],
204
+ ['macroName', [tags.macroName]],
205
+ ['variable', [tags.variableName, /*@__PURE__*/tags.standard(tags.variableName)]],
206
+ ['localVariable', [/*@__PURE__*/tags.local(tags.variableName)]],
207
+ ['variableDefinition', [/*@__PURE__*/tags.definition(tags.variableName)]],
208
+ ['nameDefinition', [/*@__PURE__*/tags.definition(tags.name)]],
209
+ ['function', [/*@__PURE__*/tags.function(tags.variableName)]],
210
+ ['functionDefinition', [/*@__PURE__*/tags.definition(/*@__PURE__*/tags.function(tags.variableName))]],
211
+ ['self', [tags.self]],
212
+ ['label', [tags.labelName]],
213
+ ['property', [tags.propertyName]],
214
+ ['propertyDefinition', [/*@__PURE__*/tags.definition(tags.propertyName)]],
215
+ ['method', [/*@__PURE__*/tags.function(tags.propertyName)]],
216
+ ['methodDefinition', [/*@__PURE__*/tags.definition(/*@__PURE__*/tags.function(tags.propertyName))]],
217
+ ['specialProperty', [/*@__PURE__*/tags.special(tags.propertyName), /*@__PURE__*/tags.definition(/*@__PURE__*/tags.special(tags.propertyName))]],
218
+ ['type', [tags.typeName, /*@__PURE__*/tags.standard(tags.typeName)]],
219
+ ['typeDefinition', [/*@__PURE__*/tags.definition(tags.typeName)]],
220
+ ['className', [tags.className, /*@__PURE__*/tags.definition(tags.className), /*@__PURE__*/tags.constant(tags.className)]],
221
+ ['namespace', [tags.namespace]],
222
+ ['tag', [tags.tagName]],
223
+ ['standardTag', [/*@__PURE__*/tags.standard(tags.tagName)]],
224
+ ['attribute', [tags.attributeName, /*@__PURE__*/tags.special(tags.attributeName)]],
225
+ ['attributeValue', [tags.attributeValue]],
226
+ ['literal', [tags.literal]],
227
+ ['string', [tags.string]],
228
+ ['docString', [tags.docString]],
229
+ ['regexp', [tags.regexp]],
230
+ ['specialString', [/*@__PURE__*/tags.special(tags.string), /*@__PURE__*/tags.special(tags.docString)]],
231
+ ['escape', [tags.escape]],
232
+ ['number', [tags.number, tags.integer, tags.float]],
233
+ ['unit', [tags.unit]],
234
+ ['atom', [tags.atom]],
235
+ ['bool', [tags.bool]],
236
+ ['null', [tags.null]],
237
+ ['constantName', [/*@__PURE__*/tags.constant(tags.name)]],
238
+ ['standardName', [/*@__PURE__*/tags.standard(tags.name)]],
239
+ ['color', [tags.color]],
240
+ ['specialVariable', [/*@__PURE__*/tags.special(tags.variableName)]],
241
+ ['comment', [tags.comment, tags.lineComment, tags.blockComment]],
242
+ ['docComment', [tags.docComment]],
243
+ ['meta', [tags.meta]],
244
+ ['documentMeta', [tags.documentMeta]],
245
+ ['processingInstruction', [tags.processingInstruction]],
246
+ ['annotation', [tags.annotation]],
247
+ ['content', [tags.content, /*@__PURE__*/tags.special(tags.content)]],
248
+ ['heading', [tags.heading]],
249
+ ['heading1', [tags.heading1]],
250
+ ['heading2', [tags.heading2]],
251
+ ['heading3', [tags.heading3]],
252
+ ['heading4', [tags.heading4]],
253
+ ['heading5', [tags.heading5]],
254
+ ['heading6', [tags.heading6]],
255
+ ['list', [tags.list]],
256
+ ['quote', [tags.quote]],
257
+ ['monospace', [tags.monospace]],
258
+ ['contentSeparator', [tags.contentSeparator]],
259
+ ['link', [tags.link]],
260
+ ['url', [tags.url]],
261
+ ['emphasis', [tags.emphasis]],
262
+ ['strong', [tags.strong]],
263
+ ['strikethrough', [tags.strikethrough]],
264
+ ['invalid', [tags.invalid]],
265
+ ['inserted', [tags.inserted]],
266
+ ['deleted', [tags.deleted]],
267
+ ['changed', [tags.changed]],
268
+ ];
269
+ /** Inline SVG image (same encoding as `@codemirror/lint`), used to draw lint markers in the theme colors. */
270
+ function svg(content, attrs = 'viewBox="0 0 40 40"') {
271
+ return `url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${attrs}>${encodeURIComponent(content)}</svg>')`;
272
+ }
273
+ /** Wavy underline of a lint range. */
274
+ function lintUnderline(color) {
275
+ return svg(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${color}" fill="none" stroke-width=".7"/>`, 'width="6" height="3"');
276
+ }
277
+ /**
278
+ * Canonical UI template: the same selectors for every theme, only palette values differ. Rules of equal specificity
279
+ * keep the order of the original theme files (later rules win).
280
+ */
281
+ function uiTemplate(ui) {
282
+ return {
283
+ '&': {
284
+ color: ui.foreground,
285
+ backgroundColor: ui.background,
286
+ border: ui.border,
287
+ fontSize: generalContent.fontSize,
288
+ fontFamily: generalContent.fontFamily,
289
+ },
290
+ '.cm-content': { caretColor: ui.cursor, lineHeight: generalContent.lineHeight },
291
+ '.cm-cursor, .cm-dropCursor': {
292
+ borderLeftColor: ui.cursor,
293
+ borderLeftWidth: ui.cursorWidth,
294
+ boxShadow: ui.cursorShadow,
295
+ },
296
+ '.cm-cursor-secondary': { borderLeftColor: ui.cursor, opacity: '0.6' },
297
+ '.cm-fat-cursor': {
298
+ backgroundColor: ui.fatCursor.background,
299
+ color: ui.background,
300
+ border: ui.fatCursor.border,
301
+ boxShadow: ui.cursorShadow,
302
+ },
303
+ '&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection': { backgroundColor: ui.selection, color: ui.selectionForeground, outline: ui.selectionOutline },
304
+ '&:not(.cm-focused) .cm-selectionBackground': { backgroundColor: ui.selectionInactive },
305
+ '.cm-selectionLayer': { zIndex: 100 },
306
+ '.cm-searchMatch': {
307
+ backgroundColor: ui.searchMatch.background,
308
+ outline: `${ui.outlineWidth} solid ${ui.searchMatch.outline}`,
309
+ color: ui.searchMatch.foreground,
310
+ borderRadius: generalSearchField.borderRadius,
311
+ boxShadow: ui.searchMatch.shadow,
312
+ },
313
+ '.cm-searchMatch span': { color: ui.searchMatch.foreground },
314
+ '.cm-searchMatch.cm-searchMatch-selected': {
315
+ backgroundColor: ui.searchMatch.selectedBackground,
316
+ color: ui.searchMatch.selectedForeground,
317
+ padding: generalSearchField.padding,
318
+ outline: ui.searchMatch.selectedOutline,
319
+ boxShadow: ui.searchMatch.selectedShadow,
320
+ },
321
+ '.cm-searchMatch.cm-searchMatch-selected span': { color: ui.searchMatch.selectedForeground },
322
+ '.cm-search.cm-panel.cm-textfield': {
323
+ color: ui.panel.foreground,
324
+ borderRadius: generalSearchField.borderRadius,
325
+ padding: generalSearchField.padding,
326
+ },
327
+ '.cm-textfield': {
328
+ backgroundColor: ui.panel.inputBackground,
329
+ color: ui.panel.foreground,
330
+ border: ui.panel.inputBorder,
331
+ borderRadius: generalSearchField.borderRadius,
332
+ padding: generalSearchField.padding,
333
+ },
334
+ '.cm-panels': {
335
+ backgroundColor: ui.panel.background,
336
+ color: ui.panel.foreground,
337
+ border: ui.panel.outline,
338
+ borderRadius: generalPanel.borderRadius,
339
+ boxShadow: ui.panel.shadow,
340
+ },
341
+ '.cm-panels.cm-panels-top': { borderBottom: `${ui.panel.borderWidth} solid ${ui.panel.border}` },
342
+ '.cm-panels.cm-panels-bottom': { borderTop: `${ui.panel.borderWidth} solid ${ui.panel.border}` },
343
+ '.cm-panel.cm-gotoLine': { color: ui.panel.foreground, padding: generalPanel.padding },
344
+ '.cm-panel button, .cm-button': {
345
+ backgroundColor: ui.panel.buttonBackground,
346
+ backgroundImage: 'none',
347
+ color: ui.panel.buttonForeground,
348
+ border: ui.panel.buttonBorder,
349
+ borderRadius: generalPanel.borderRadius,
350
+ padding: generalPanel.padding,
351
+ },
352
+ '.cm-panel button:hover, .cm-button:hover': {
353
+ backgroundColor: ui.panel.buttonHoverBackground,
354
+ color: ui.panel.buttonHoverForeground,
355
+ border: ui.panel.buttonHoverBorder,
356
+ boxShadow: ui.panel.buttonHoverShadow,
357
+ },
358
+ '.cm-activeLine': {
359
+ backgroundColor: ui.activeLine,
360
+ borderLeft: ui.activeLineBorder.left,
361
+ borderRight: ui.activeLineBorder.right,
362
+ borderRadius: generalLine.borderRadius,
363
+ zIndex: 1,
364
+ },
365
+ '.cm-gutters': {
366
+ backgroundColor: ui.gutter.background,
367
+ color: ui.gutter.foreground,
368
+ border: generalGutter.border,
369
+ borderRight: `${ui.outlineWidth} solid ${ui.gutter.border}`,
370
+ paddingRight: generalGutter.paddingRight,
371
+ },
372
+ '.cm-activeLineGutter': {
373
+ backgroundColor: ui.gutter.activeBackground,
374
+ color: ui.gutter.activeForeground,
375
+ fontWeight: ui.gutter.activeFontWeight,
376
+ border: ui.gutter.activeBorder,
377
+ },
378
+ '.cm-lineNumbers': { fontSize: generalGutter.fontSize, lineHeight: generalGutter.lineHeight },
379
+ '.cm-foldGutter': { fontSize: generalGutter.fontSize, lineHeight: generalGutter.lineHeight },
380
+ '.cm-foldGutter .cm-gutterElement': { color: ui.gutter.foreground, cursor: 'pointer' },
381
+ '.cm-foldGutter .cm-gutterElement:hover': { color: ui.gutter.foldHover },
382
+ '.cm-gutter-lint': { color: ui.gutter.foreground },
383
+ '.cm-lint-marker': { width: '1em', height: '1em' },
384
+ '.cm-lint-marker-error': {
385
+ content: svg(`<circle cx="20" cy="20" r="15" fill="${ui.diagnostic.error}" stroke="${ui.background}" stroke-width="4"/>`),
386
+ },
387
+ '.cm-lint-marker-warning': {
388
+ content: svg(`<path fill="${ui.diagnostic.warning}" stroke="${ui.background}" stroke-width="4" stroke-linejoin="round" d="M20 6L37 35L3 35Z"/>`),
389
+ },
390
+ '.cm-lint-marker-info': {
391
+ content: svg(`<path fill="${ui.diagnostic.info}" stroke="${ui.background}" stroke-width="4" stroke-linejoin="round" d="M5 5L35 5L35 35L5 35Z"/>`),
392
+ },
393
+ '.cm-changeGutter': { backgroundColor: ui.gutter.background },
394
+ '.cm-merge-b .cm-changedLineGutter, .cm-inlineChangedLineGutter': { background: ui.diff.insertedForeground },
395
+ '.cm-merge-a .cm-changedLineGutter, .cm-deletedLineGutter': { background: ui.diff.deletedForeground },
396
+ '.cm-insertedLine': {
397
+ textDecoration: generalDiff.insertedTextDecoration,
398
+ backgroundColor: ui.diff.insertedBackground,
399
+ color: ui.diff.insertedForeground,
400
+ padding: generalDiff.insertedLinePadding,
401
+ borderRadius: generalDiff.borderRadius,
402
+ },
403
+ 'ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))': {
404
+ textDecoration: generalDiff.insertedTextDecoration,
405
+ backgroundColor: `${ui.diff.insertedBackground} !important`,
406
+ color: ui.diff.insertedForeground,
407
+ padding: generalDiff.insertedLinePadding,
408
+ borderRadius: generalDiff.borderRadius,
409
+ border: ui.diff.insertedBorder,
410
+ },
411
+ 'ins.cm-insertedLine .cm-changedText': { background: 'transparent !important' },
412
+ '.cm-deletedLine': {
413
+ textDecoration: generalDiff.deletedTextDecoration,
414
+ backgroundColor: ui.diff.deletedBackground,
415
+ color: ui.diff.deletedForeground,
416
+ padding: generalDiff.insertedLinePadding,
417
+ borderRadius: generalDiff.borderRadius,
418
+ },
419
+ // Merge view deletions only: `del` decorations, inline deletion widgets and the lines of deleted chunks. `:where()`
420
+ // keeps the specificity of the former bare `del` selector without styling other `del` elements.
421
+ 'del.cm-deletedLine, del.cm-deletedText, :where(.cm-deletedChunk) del, :where(.cm-deletedChunk) del:not(:has(.cm-deletedText))': {
422
+ textDecoration: generalDiff.deletedTextDecoration,
423
+ backgroundColor: `${ui.diff.deletedBackground} !important`,
424
+ color: ui.diff.deletedForeground,
425
+ padding: generalDiff.insertedLinePadding,
426
+ borderRadius: generalDiff.borderRadius,
427
+ border: ui.diff.deletedBorder,
428
+ },
429
+ ':where(.cm-deletedChunk) del .cm-deletedText, :where(.cm-deletedChunk) del .cm-changedText, del:where(.cm-deletedLine) .cm-deletedText, del:where(.cm-deletedLine) .cm-changedText': { background: 'transparent !important' },
430
+ '.cm-merge-b .cm-changedLine, .cm-inlineChangedLine': { backgroundColor: ui.diff.insertedBackground },
431
+ '.cm-merge-a .cm-changedLine, .cm-deletedChunk': { backgroundColor: ui.diff.deletedBackground },
432
+ '.cm-collapsedLines': {
433
+ background: ui.foldPlaceholder.background,
434
+ color: ui.foldPlaceholder.foreground,
435
+ },
436
+ '.cm-mergeSpacer': { background: ui.merge.backgroundColor },
437
+ '.cm-tooltip': {
438
+ backgroundColor: ui.tooltip.background,
439
+ color: ui.tooltip.foreground,
440
+ border: `${ui.outlineWidth} solid ${ui.tooltip.border}`,
441
+ borderRadius: generalTooltip.borderRadius,
442
+ padding: generalTooltip.padding,
443
+ boxShadow: ui.tooltip.shadow,
444
+ },
445
+ '.cm-tooltip-autocomplete > ul': { backgroundColor: ui.tooltip.listBackground, border: ui.tooltip.listBorder },
446
+ '.cm-tooltip-autocomplete > ul > li': { padding: generalTooltip.padding, lineHeight: generalTooltip.lineHeight },
447
+ '.cm-tooltip-autocomplete > ul > li:hover': { backgroundColor: ui.tooltip.hoverBackground },
448
+ '.cm-tooltip-autocomplete > ul > li[aria-selected]': {
449
+ backgroundColor: ui.tooltip.selectedBackground,
450
+ color: ui.tooltip.selectedForeground,
451
+ border: ui.tooltip.selectedBorder,
452
+ borderRadius: generalTooltip.borderRadiusSelected,
453
+ },
454
+ '.cm-tooltip-autocomplete > ul > li > span.cm-completionIcon': {
455
+ color: ui.tooltip.icon,
456
+ paddingRight: generalTooltip.paddingRight,
457
+ },
458
+ '.cm-tooltip-autocomplete > ul > li > span.cm-completionDetail': { color: ui.tooltip.detail, fontStyle: 'italic' },
459
+ '.cm-completionMatchedText': {
460
+ color: 'inherit',
461
+ fontWeight: 'bold',
462
+ textDecoration: 'underline',
463
+ textDecorationColor: ui.matchingBracket.outline,
464
+ },
465
+ '.cm-completionInfo': {
466
+ backgroundColor: ui.tooltip.background,
467
+ color: ui.tooltip.foreground,
468
+ border: `${ui.outlineWidth} solid ${ui.tooltip.border}`,
469
+ padding: generalTooltip.padding,
470
+ },
471
+ '.cm-tooltip .cm-tooltip-arrow:before': { borderTopColor: 'transparent', borderBottomColor: 'transparent' },
472
+ '.cm-tooltip .cm-tooltip-arrow:after': {
473
+ borderTopColor: ui.tooltip.background,
474
+ borderBottomColor: ui.tooltip.background,
475
+ },
476
+ '.cm-tooltip-lint': { color: ui.tooltip.foreground, padding: '0' },
477
+ '.cm-tooltip-section:not(:first-child)': { borderTop: `1px solid ${ui.tooltip.border}` },
478
+ '.cm-diagnostic-error': {
479
+ borderLeft: `${ui.diagnostic.borderWidth} solid ${ui.diagnostic.error}`,
480
+ backgroundColor: ui.diagnostic.errorBackground,
481
+ },
482
+ '.cm-diagnostic-warning': {
483
+ borderLeft: `${ui.diagnostic.borderWidth} solid ${ui.diagnostic.warning}`,
484
+ backgroundColor: ui.diagnostic.warningBackground,
485
+ },
486
+ '.cm-diagnostic-info': {
487
+ borderLeft: `${ui.diagnostic.borderWidth} solid ${ui.diagnostic.info}`,
488
+ backgroundColor: ui.diagnostic.infoBackground,
489
+ },
490
+ '.cm-diagnostic-hint': { borderLeft: `${ui.diagnostic.borderWidth} solid ${ui.diagnostic.hint}` },
491
+ '.cm-diagnosticAction': {
492
+ backgroundColor: ui.panel.buttonBackground,
493
+ color: ui.panel.buttonForeground,
494
+ border: ui.panel.buttonBorder,
495
+ borderRadius: generalPanel.borderRadius,
496
+ },
497
+ '.cm-lintRange-error': { backgroundImage: lintUnderline(ui.diagnostic.error) },
498
+ '.cm-lintRange-warning': { backgroundImage: lintUnderline(ui.diagnostic.warning) },
499
+ '.cm-lintRange-info': { backgroundImage: lintUnderline(ui.diagnostic.info) },
500
+ '.cm-lintRange-hint': { backgroundImage: lintUnderline(ui.diagnostic.hint) },
501
+ '.cm-lintPoint-error': { borderBottom: `${ui.diagnostic.underlineWidth} wavy ${ui.diagnostic.error}` },
502
+ '.cm-lintPoint-warning': { borderBottom: `${ui.diagnostic.underlineWidth} wavy ${ui.diagnostic.warning}` },
503
+ '.cm-lintPoint-info': { borderBottom: `${ui.diagnostic.underlineWidth} wavy ${ui.diagnostic.info}` },
504
+ '.cm-matchingBracket': {
505
+ backgroundColor: ui.matchingBracket.background,
506
+ outline: `${ui.outlineWidth} solid ${ui.matchingBracket.outline}`,
507
+ borderRadius: generalMatching.borderRadius,
508
+ boxShadow: ui.matchingBracket.shadow,
509
+ },
510
+ '.cm-nonmatchingBracket': {
511
+ backgroundColor: ui.nonMatchingBracket.background,
512
+ outline: `${ui.outlineWidth} solid ${ui.nonMatchingBracket.outline}`,
513
+ borderRadius: generalMatching.borderRadius,
514
+ },
515
+ '.cm-selectionMatch': {
516
+ backgroundColor: ui.selectionMatch.background,
517
+ outline: `${ui.outlineWidth} solid ${ui.selectionMatch.outline}`,
518
+ borderRadius: generalMatching.borderRadius,
519
+ },
520
+ '.cm-snippetField': {
521
+ backgroundColor: ui.selectionMatch.background,
522
+ outline: `1px dashed ${ui.selectionMatch.outline}`,
523
+ borderRadius: generalMatching.borderRadius,
524
+ },
525
+ '.cm-snippetFieldPosition': { borderLeft: `1px dotted ${ui.cursor}` },
526
+ '.cm-foldPlaceholder': {
527
+ backgroundColor: ui.foldPlaceholder.background,
528
+ color: ui.foldPlaceholder.foreground,
529
+ border: `${ui.outlineWidth} ${ui.foldPlaceholder.borderStyle} ${ui.foldPlaceholder.border}`,
530
+ borderRadius: generalPlaceholder.borderRadius,
531
+ padding: generalPlaceholder.padding,
532
+ margin: generalPlaceholder.margin,
533
+ },
534
+ // Transparent outline: invisible normally, repainted with the system color in forced-colors mode (drops box-shadow).
535
+ '&.cm-focused': { outline: '2px solid transparent', boxShadow: ui.focusRing },
536
+ '& .cm-scroller::-webkit-scrollbar': { width: generalScroller.width, height: generalScroller.height },
537
+ '& .cm-scroller::-webkit-scrollbar-track': { background: ui.scrollbar.track, border: ui.scrollbar.trackBorder },
538
+ '& .cm-scroller::-webkit-scrollbar-thumb': {
539
+ backgroundColor: ui.scrollbar.thumb,
540
+ borderRadius: generalScroller.borderRadius,
541
+ border: ui.scrollbar.thumbBorder,
542
+ },
543
+ '& .cm-scroller::-webkit-scrollbar-thumb:hover': {
544
+ backgroundColor: ui.scrollbar.thumbHover,
545
+ boxShadow: ui.scrollbar.thumbHoverShadow,
546
+ },
547
+ '.cm-ghostText': { opacity: ui.ghostTextOpacity, color: ui.ghostText },
548
+ '.cm-placeholder': { color: ui.ghostText },
549
+ '.cm-specialChar': { color: ui.specialChar },
550
+ '.cm-trailingSpace': { backgroundColor: ui.diff.deletedBackground },
551
+ '.cm-highlightSpace': {
552
+ backgroundImage: `radial-gradient(circle at 50% 55%, ${ui.gutter.foreground} 20%, transparent 0)`,
553
+ },
554
+ '.cm-crosshair': { cursor: 'crosshair' },
555
+ };
556
+ }
557
+ /** Drops `null` declarations and selectors left without declarations. */
558
+ function emittedRules(spec) {
559
+ const result = {};
560
+ for (const [selector, declarations] of Object.entries(spec)) {
561
+ const emitted = Object.entries(declarations).filter((entry) => entry[1] !== null);
562
+ if (emitted.length > 0)
563
+ result[selector] = Object.fromEntries(emitted);
564
+ }
565
+ return result;
566
+ }
567
+ /** Style of a role, falling back through `ROLE_PARENTS` for omitted fine roles. */
568
+ function resolveRole(syntax, role) {
569
+ let current = role;
570
+ while (current) {
571
+ const style = syntax[current];
572
+ if (style)
573
+ return style;
574
+ current = ROLE_PARENTS[current];
575
+ }
576
+ return {};
577
+ }
578
+ /** Highlight rules of a theme: one rule per entry of the canonical table. */
579
+ function highlightRules(definition) {
580
+ return SYNTAX_TAGS.map(([role, tagList]) => (Object.assign({ tag: [...tagList] }, resolveRole(definition.syntax, role))));
581
+ }
582
+ /** Builds the editor theme, the syntax highlighting and the merge view styles of a theme definition. */
583
+ function defineTheme(definition) {
584
+ const theme = EditorView.theme(emittedRules(uiTemplate(definition.ui)), { dark: definition.dark });
585
+ const highlightStyle = HighlightStyle.define(highlightRules(definition));
586
+ return {
587
+ extension: [theme, syntaxHighlighting(highlightStyle)],
588
+ theme,
589
+ highlightStyle,
590
+ mergeStyles: Object.assign({}, definition.ui.merge),
591
+ };
592
+ }
593
+
107
594
  /**
108
595
  * Enhanced Solarized Dark theme color definitions
109
596
  * ---------------------------------------------
@@ -112,407 +599,210 @@ function applyMergeRevertStyles(styles) {
112
599
  // Base colors from Solarized palette
113
600
  const base00 = '#002b36', // Background - dark blue
114
601
  base01 = '#073642', // Lighter background (popups, statuslines)
115
- base02 = '#586e75', // Selection background
602
+ base02 = '#8ba2aa', // Selection background
116
603
  base03 = '#657b83', // Comments, invisibles
117
- base04 = '#839496', // Body text
118
- base05 = '#93a1a1', // Default foreground
604
+ base04 = '#91a2a4', // Body text
605
+ base05 = '#a0afaf', // Default foreground
119
606
  base06 = '#eee8d5', // Light foreground
120
607
  base07 = '#fdf6e3', // Light background
121
608
  // Accent colors from Solarized palette
122
- base08 = '#dc322f', // Red
123
- base09 = '#cb4b16', // Orange
124
- base0A = '#b58900', // Yellow
125
- base0B = '#859900', // Green
126
- base0C = '#2aa198', // Cyan
127
- base0D = '#268bd2', // Blue
128
- base0E = '#6c71c4', // Violet
129
- base0F = '#d33682'; // Magenta
609
+ base08 = '#fb7569', // Red
610
+ base09 = '#fb7748', // Orange
611
+ base0A = '#c49823', // Yellow
612
+ base0B = '#93a823', // Green
613
+ base0C = '#3cafa5', // Cyan
614
+ base0D = '#45a5ee', // Blue
615
+ base0E = '#9097ed', // Violet
616
+ base0F = '#fd6baa'; // Magenta
130
617
  // UI specific colors
131
- const invalid = '#d30102', // Bright red for errors
618
+ const invalid = '#fb7565', // Bright red for errors
132
619
  darkBackground = '#00252f', // Darker background for panels
133
620
  highlightBackground = '#99eeff0f', // Active line highlight
134
- background = base00, // Main editor background
135
- tooltipBackground = base01, // Tooltip background
136
621
  selection = '#02B8FF3F', // Selection background with opacity
137
622
  selectionMatch = '#586e7580', // Selection match with opacity
138
- cursor = base04, // Cursor color
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
623
+ activeBracketBg = '#586e7540'; // Active bracket background with opacity
143
624
  // Diff/merge specific colors
144
625
  const addedBackground = '#2aa19820', // Solarized cyan 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
148
- /**
149
- * Enhanced editor theme styles for Solarized Dark
150
- */
151
- const solarizedDarkTheme = /*@__PURE__*/EditorView.theme({
152
- // Base editor styles
153
- '&': {
154
- color: base05,
155
- backgroundColor: background,
156
- fontSize: generalContent.fontSize,
157
- fontFamily: generalContent.fontFamily,
158
- },
159
- // Content and cursor
160
- '.cm-content': {
161
- caretColor: cursor,
162
- lineHeight: generalContent.lineHeight,
163
- },
164
- '.cm-cursor, .cm-dropCursor': {
165
- borderLeftColor: cursor,
166
- borderLeftWidth: generalCursor.borderLeftWidth,
167
- },
168
- '.cm-fat-cursor': {
169
- backgroundColor: `${cursor}99`,
170
- color: background,
171
- },
172
- // Selection
173
- '&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection': {
174
- backgroundColor: selection,
175
- },
176
- // Make sure selection appears above active line
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,
626
+ removedBackground = '#dc322f20'; // Solarized red with transparency for deletions
627
+ const theme = /*@__PURE__*/defineTheme({
628
+ dark: true,
629
+ ui: {
630
+ background: base00,
631
+ foreground: base05,
632
+ border: 'none',
633
+ cursor: base04,
634
+ cursorWidth: '2px',
635
+ cursorShadow: 'none',
636
+ fatCursor: { background: `${base04}99`, border: 'none' },
637
+ selection: '#02b8ff1d',
638
+ selectionInactive: '#02b8ff1d',
639
+ selectionForeground: null,
640
+ selectionOutline: 'none',
641
+ activeLine: '#99eeff07',
642
+ activeLineBorder: { left: 'none', right: 'none' },
643
+ ghostText: base03,
644
+ ghostTextOpacity: '0.5',
645
+ specialChar: base08,
646
+ focusRing: `0 0 0 2px ${base00}, 0 0 0 4px ${base0D}`,
647
+ outlineWidth: '1px',
648
+ searchMatch: {
649
+ background: `${base02}99`,
650
+ outline: base0D,
651
+ foreground: base06,
652
+ shadow: 'none',
653
+ selectedBackground: base0D,
654
+ selectedForeground: base07,
655
+ selectedOutline: `1px solid ${base0D}`,
656
+ selectedShadow: 'none',
188
657
  },
189
- },
190
- '.cm-searchMatch.cm-searchMatch-selected': {
191
- backgroundColor: base0D,
192
- color: base07,
193
- padding: generalSearchField.padding,
194
- '& span': {
195
- color: base07,
658
+ selectionMatch: { background: selectionMatch, outline: `${base02}50` },
659
+ matchingBracket: { background: activeBracketBg, outline: base0D, shadow: 'none' },
660
+ nonMatchingBracket: { background: `${base08}40`, outline: invalid },
661
+ panel: {
662
+ background: darkBackground,
663
+ foreground: base04,
664
+ border: base01,
665
+ borderWidth: '1px',
666
+ outline: 'none',
667
+ shadow: 'none',
668
+ buttonBackground: base01,
669
+ buttonForeground: base05,
670
+ buttonBorder: 'none',
671
+ buttonHoverBackground: highlightBackground,
672
+ buttonHoverForeground: base05,
673
+ buttonHoverBorder: 'none',
674
+ buttonHoverShadow: 'none',
675
+ inputBackground: base00,
676
+ inputBorder: `1px solid ${base01}`,
196
677
  },
197
- },
198
- '.cm-search.cm-panel.cm-textfield': {
199
- color: base05,
200
- borderRadius: generalSearchField.borderRadius,
201
- padding: generalSearchField.padding,
202
- },
203
- // Panels
204
- '.cm-panels': {
205
- backgroundColor: darkBackground,
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',
678
+ gutter: {
679
+ background: darkBackground,
680
+ foreground: base02,
681
+ border: base01,
682
+ activeBackground: base01,
683
+ activeForeground: base05,
684
+ activeFontWeight: '500',
685
+ activeBorder: 'none',
686
+ foldHover: base04,
310
687
  },
311
- '& > ul > li': {
312
- padding: generalTooltip.padding,
313
- lineHeight: generalTooltip.lineHeight,
688
+ foldPlaceholder: { background: base01, foreground: base03, border: `${base02}70`, borderStyle: 'dotted' },
689
+ tooltip: {
690
+ background: base01,
691
+ foreground: base05,
692
+ border: base02,
693
+ shadow: '0 2px 8px rgba(0, 0, 0, 0.3)',
694
+ listBackground: base01,
695
+ listBorder: 'none',
696
+ hoverBackground: 'transparent',
697
+ selectedBackground: selection,
698
+ selectedForeground: base06,
699
+ selectedBorder: 'none',
700
+ icon: base03,
701
+ detail: base03,
314
702
  },
315
- '& > ul > li[aria-selected]': {
316
- backgroundColor: selection,
317
- color: base06,
318
- borderRadius: generalTooltip.borderRadiusSelected,
703
+ diff: {
704
+ insertedBackground: addedBackground,
705
+ insertedForeground: base0B,
706
+ insertedBorder: `1px solid ${base0B}40`,
707
+ deletedBackground: removedBackground,
708
+ deletedForeground: base08,
709
+ deletedBorder: `1px solid ${base08}40`,
319
710
  },
320
- '& > ul > li > span.cm-completionIcon': {
321
- color: base03,
322
- paddingRight: generalTooltip.paddingRight,
711
+ diagnostic: {
712
+ error: base08,
713
+ warning: base0A,
714
+ info: base0D,
715
+ hint: base0D,
716
+ errorBackground: 'transparent',
717
+ warningBackground: 'transparent',
718
+ infoBackground: 'transparent',
719
+ borderWidth: '3px',
720
+ underlineWidth: '2px',
323
721
  },
324
- '& > ul > li > span.cm-completionDetail': {
325
- color: base03,
326
- fontStyle: 'italic',
722
+ scrollbar: {
723
+ track: darkBackground,
724
+ trackBorder: 'none',
725
+ thumb: base01,
726
+ thumbBorder: `3px solid ${darkBackground}`,
727
+ thumbHover: base02,
728
+ thumbHoverShadow: 'none',
327
729
  },
328
- },
329
- '.cm-tooltip .cm-tooltip-arrow:before': {
330
- borderTopColor: 'transparent',
331
- borderBottomColor: 'transparent',
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}`,
730
+ merge: {
731
+ backgroundColor: darkBackground,
732
+ borderColor: base02,
733
+ buttonColor: base05,
734
+ buttonHoverColor: base01,
341
735
  },
342
- '&-warning': {
343
- borderLeft: `3px solid ${diagnosticWarning}`,
736
+ },
737
+ syntax: {
738
+ keyword: { color: base0B, fontWeight: 'bold' },
739
+ definitionKeyword: { color: base0B },
740
+ modifier: { color: base0F, fontStyle: 'italic' },
741
+ separator: { color: base0C },
742
+ operator: { color: base0E },
743
+ punctuation: { color: base04 },
744
+ bracket: { color: base0F },
745
+ angleBracket: { color: base02 },
746
+ squareBracket: { color: base08 },
747
+ name: { color: base0C },
748
+ variable: { color: base05 },
749
+ localVariable: { color: base0C },
750
+ variableDefinition: { color: base0C },
751
+ function: { color: base0D },
752
+ self: { color: base0F },
753
+ label: { color: base0F },
754
+ property: { color: base0C, fontStyle: 'normal' },
755
+ type: { color: base09 },
756
+ typeDefinition: { color: base09, fontWeight: 'bold' },
757
+ className: { color: base09, fontStyle: 'italic' },
758
+ namespace: { color: base0F, fontStyle: 'italic' },
759
+ tag: { color: base0D },
760
+ attribute: { color: base05 },
761
+ content: { color: base05 },
762
+ string: { color: base0A },
763
+ regexp: { color: invalid },
764
+ constantName: { color: base0A },
765
+ standardName: { color: base0A },
766
+ number: { color: base0F },
767
+ constant: { color: base0F },
768
+ comment: { fontStyle: 'italic', color: base02 },
769
+ meta: { color: base08 },
770
+ processingInstruction: { color: base0B },
771
+ annotation: { color: invalid, fontStyle: 'italic' },
772
+ heading: { fontWeight: 'bold', color: base0A },
773
+ headingLevel: { color: base06 },
774
+ heading1: { color: base07 },
775
+ list: { color: base0A },
776
+ quote: { color: base0B },
777
+ monospace: { color: base05 },
778
+ contentSeparator: { color: base0A },
779
+ link: {
780
+ color: base0C,
781
+ fontWeight: '500',
782
+ textDecoration: 'underline',
783
+ textUnderlinePosition: 'under',
344
784
  },
345
- '&-info': {
346
- borderLeft: `3px solid ${linkColor}`,
785
+ url: { color: base0A, textDecoration: 'underline', textUnderlineOffset: '2px' },
786
+ emphasis: { fontStyle: 'italic', color: base0B },
787
+ strong: { fontWeight: 'bold', color: base06 },
788
+ strikethrough: { color: invalid, textDecoration: 'line-through' },
789
+ invalid: {
790
+ color: base02,
791
+ textDecoration: 'underline wavy',
792
+ borderBottom: `1px dotted ${base08}`,
347
793
  },
794
+ inserted: { color: base0B },
795
+ deleted: { color: base08 },
796
+ changed: { color: base0F },
348
797
  },
349
- '.cm-lintPoint-error': {
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
- ]);
798
+ });
501
799
  /**
502
800
  * Combined Solarized Dark theme extension
503
801
  */
504
- const solarizedDark = [
505
- solarizedDarkTheme,
506
- /*@__PURE__*/syntaxHighlighting(solarizedDarkHighlightStyle),
507
- ];
802
+ const solarizedDark = theme.extension;
508
803
  /**
509
804
  * Solarized Dark merge revert styles configuration
510
805
  */
511
- const solarizedDarkMergeStyles = {
512
- backgroundColor: darkBackground,
513
- borderColor: base02,
514
- buttonColor: base05,
515
- buttonHoverColor: base01,
516
- };
806
+ const solarizedDarkMergeStyles = theme.mergeStyles;
517
807
 
518
808
  export { applyMergeRevertStyles, solarizedDark, solarizedDarkMergeStyles };