@fsegurai/codemirror-theme-gruvbox-light 6.2.7 → 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 +653 -388
  3. package/dist/index.js +653 -388
  4. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -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 Gruvbox Light theme color definitions
109
596
  * --------------------------------------------
@@ -113,8 +600,8 @@ function applyMergeRevertStyles(styles) {
113
600
  const base00 = '#3c3836', // Main foreground (text)
114
601
  base01 = '#504945', // Secondary foreground
115
602
  base02 = '#665c54', // Tertiary foreground
116
- base03 = '#7c6f64', // Quaternary foreground
117
- base04 = '#928374', // Comments, invisibles, line highlighting
603
+ base03 = '#6b5e54', // Quaternary foreground
604
+ base04 = '#6a5c4e', // Comments, invisibles, line highlighting
118
605
  // Light/background shades
119
606
  base05 = '#fbf1c7', // Main background
120
607
  base06 = '#ebdbb2', // Secondary background
@@ -123,407 +610,185 @@ base08 = '#bdae93', // Quaternary background
123
610
  base09 = '#a89984', // Quinary background (not defined above)
124
611
  // Accent colors
125
612
  base0A = '#9d0006', // Keywords, storage, operator
126
- base0B = '#79740e', // Strings, tag attributes
127
- base0C = '#b57614', // Functions, tag names
613
+ base0B = '#65600d', // Strings, tag attributes
614
+ base0C = '#845408', // Functions, tag names
128
615
  base0D = '#076678', // Variables
129
616
  base0E = '#8f3f71', // Numbers, special constants
130
- base0F = '#427b58', // Types
131
- base10 = '#af3a03'; // Cursor, constants
617
+ base0F = '#306947', // Types
618
+ base10 = '#a63b0f'; // Cursor, constants
132
619
  // UI specific colors
133
- const invalid = base0A, darkBackground = base06, highlightBackground = '#ffc42e25', // Line highlight with transparency
134
- background = base05, tooltipBackground = base06, selection = darkBackground, selectionMatch = '#ffc42e40', // Selection match background
135
- cursor = base10, // Cursor color
136
- activeBracketBg = '#d5c4a180', // Active bracket background
137
- activeBracketBorder = base10, // Active bracket border
138
- diagnosticWarning = base0C, // Warning color
139
- linkColor = base0D, // Link color
140
- visitedLinkColor = base0E; // Visited link color
620
+ const highlightBackground = '#ffc42e25', // Line highlight with transparency
621
+ selectionMatch = '#ffc42e40', // Selection match background
622
+ activeBracketBg = '#d5c4a180'; // Active bracket background
141
623
  // Diff/merge specific colors
142
624
  const addedBackground = '#d8e5bc80', // Light base0B with transparency for insertions
143
- removedBackground = '#f7cfcf80', // Light base0A with transparency for deletions
144
- addedText = '#79740e', // Gruvbox base0B for added text
145
- removedText = '#9d0006'; // Gruvbox base0A for removed text
146
- /**
147
- * Enhanced editor theme styles for Gruvbox Light
148
- */
149
- const gruvboxLightTheme = /*@__PURE__*/EditorView.theme({
150
- // Base editor styles
151
- '&': {
152
- color: base00,
153
- backgroundColor: background,
154
- fontSize: generalContent.fontSize,
155
- fontFamily: generalContent.fontFamily,
156
- },
157
- // Content and cursor
158
- '.cm-content': {
159
- caretColor: cursor,
160
- lineHeight: generalContent.lineHeight,
161
- },
162
- '.cm-cursor, .cm-dropCursor': {
163
- borderLeftColor: cursor,
164
- borderLeftWidth: generalCursor.borderLeftWidth,
165
- },
166
- '.cm-fat-cursor': {
167
- backgroundColor: `${cursor}99`,
168
- color: base05,
169
- },
170
- // Selection
171
- '&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection': {
172
- backgroundColor: selection,
173
- color: base00,
174
- },
175
- // Make sure selection appears above active line
176
- '.cm-selectionLayer': {
177
- zIndex: 100,
178
- },
179
- // Search functionality
180
- '.cm-searchMatch': {
181
- backgroundColor: '#ffc42e80',
182
- outline: `1px solid ${base10}`,
183
- color: base00,
184
- borderRadius: generalSearchField.borderRadius,
185
- '& span': {
186
- color: base00,
625
+ removedBackground = '#f7cfcf80'; // Light base0A with transparency for deletions
626
+ const theme = /*@__PURE__*/defineTheme({
627
+ dark: false,
628
+ ui: {
629
+ background: base05,
630
+ foreground: base00,
631
+ border: 'none',
632
+ cursor: base10,
633
+ cursorWidth: '2px',
634
+ cursorShadow: 'none',
635
+ fatCursor: { background: `${base10}99`, border: 'none' },
636
+ selection: '#e7d7ae',
637
+ selectionInactive: '#e7d7ae',
638
+ selectionForeground: base00,
639
+ selectionOutline: 'none',
640
+ activeLine: highlightBackground,
641
+ activeLineBorder: { left: 'none', right: 'none' },
642
+ ghostText: base04,
643
+ ghostTextOpacity: '0.5',
644
+ specialChar: base0A,
645
+ focusRing: `0 0 0 2px ${base05}, 0 0 0 4px ${base10}`,
646
+ outlineWidth: '1px',
647
+ searchMatch: {
648
+ background: '#ffc42e80',
649
+ outline: base10,
650
+ foreground: base00,
651
+ shadow: 'none',
652
+ selectedBackground: base10,
653
+ selectedForeground: base05,
654
+ selectedOutline: `1px solid ${base10}`,
655
+ selectedShadow: 'none',
187
656
  },
188
- },
189
- '.cm-searchMatch.cm-searchMatch-selected': {
190
- backgroundColor: base10,
191
- color: base05,
192
- padding: generalSearchField.padding,
193
- '& span': {
194
- color: base05,
657
+ selectionMatch: { background: selectionMatch, outline: base08 },
658
+ matchingBracket: { background: activeBracketBg, outline: base10, shadow: 'none' },
659
+ nonMatchingBracket: { background: '#fb492740', outline: base0A },
660
+ panel: {
661
+ background: base06,
662
+ foreground: base01,
663
+ border: base08,
664
+ borderWidth: '1px',
665
+ outline: 'none',
666
+ shadow: 'none',
667
+ buttonBackground: base05,
668
+ buttonForeground: base00,
669
+ buttonBorder: 'none',
670
+ buttonHoverBackground: base07,
671
+ buttonHoverForeground: base00,
672
+ buttonHoverBorder: 'none',
673
+ buttonHoverShadow: 'none',
674
+ inputBackground: base05,
675
+ inputBorder: `1px solid ${base08}`,
195
676
  },
196
- },
197
- '.cm-search.cm-panel.cm-textfield': {
198
- color: base00,
199
- borderRadius: generalSearchField.borderRadius,
200
- padding: generalSearchField.padding,
201
- },
202
- // Panels
203
- '.cm-panels': {
204
- backgroundColor: base06,
205
- color: base01,
206
- borderRadius: '0 0 4px 4px',
207
- },
208
- '.cm-panels.cm-panels-top': {
209
- borderBottom: `1px solid ${base08}`,
210
- },
211
- '.cm-panels.cm-panels-bottom': {
212
- borderTop: `1px solid ${base08}`,
213
- },
214
- '.cm-panel button': {
215
- backgroundColor: base05,
216
- color: base00,
217
- border: generalPanel.border,
218
- borderRadius: generalPanel.borderRadius,
219
- padding: generalPanel.padding,
220
- },
221
- '.cm-panel button:hover': {
222
- backgroundColor: base07,
223
- },
224
- // Line highlighting
225
- '.cm-activeLine': {
226
- backgroundColor: highlightBackground,
227
- borderRadius: generalLine.borderRadius,
228
- zIndex: 1,
229
- },
230
- // Gutters
231
- '.cm-gutters': {
232
- backgroundColor: base06,
233
- color: base03,
234
- border: generalGutter.border,
235
- borderRight: `1px solid ${base08}`,
236
- paddingRight: generalGutter.paddingRight,
237
- },
238
- '.cm-activeLineGutter': {
239
- backgroundColor: base07,
240
- color: base00,
241
- fontWeight: generalGutter.fontWeight,
242
- },
243
- '.cm-lineNumbers': {
244
- fontSize: generalGutter.fontSize,
245
- lineHeight: generalGutter.lineHeight,
246
- },
247
- '.cm-foldGutter': {
248
- fontSize: generalGutter.fontSize,
249
- lineHeight: generalGutter.lineHeight,
250
- },
251
- '.cm-foldGutter .cm-gutterElement': {
252
- color: base03,
253
- cursor: 'pointer',
254
- },
255
- '.cm-foldGutter .cm-gutterElement:hover': {
256
- color: base00,
257
- },
258
- // Diff/Merge View Styles
259
- // Inserted/Added Content
260
- '.cm-insertedLine': {
261
- textDecoration: generalDiff.insertedTextDecoration,
262
- backgroundColor: addedBackground,
263
- color: addedText,
264
- padding: generalDiff.insertedLinePadding,
265
- borderRadius: generalDiff.borderRadius,
266
- },
267
- 'ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))': {
268
- textDecoration: generalDiff.insertedTextDecoration,
269
- backgroundColor: `${addedBackground} !important`,
270
- color: addedText,
271
- padding: generalDiff.insertedLinePadding,
272
- borderRadius: generalDiff.borderRadius,
273
- border: `1px solid ${addedText}40`,
274
- },
275
- 'ins.cm-insertedLine .cm-changedText': {
276
- background: 'transparent !important',
277
- },
278
- // Deleted/Removed Content
279
- '.cm-deletedLine': {
280
- textDecoration: generalDiff.deletedTextDecoration,
281
- backgroundColor: removedBackground,
282
- color: removedText,
283
- padding: generalDiff.insertedLinePadding,
284
- borderRadius: generalDiff.borderRadius,
285
- },
286
- 'del.cm-deletedLine, del, del:not(:has(.cm-deletedText))': {
287
- textDecoration: generalDiff.deletedTextDecoration,
288
- backgroundColor: `${removedBackground} !important`,
289
- color: removedText,
290
- padding: generalDiff.insertedLinePadding,
291
- borderRadius: generalDiff.borderRadius,
292
- border: `1px solid ${removedText}40`,
293
- },
294
- 'del .cm-deletedText, del .cm-changedText': {
295
- background: 'transparent !important',
296
- },
297
- // Tooltips and autocomplete
298
- '.cm-tooltip': {
299
- backgroundColor: tooltipBackground,
300
- border: `1px solid ${base08}`,
301
- borderRadius: generalTooltip.borderRadius,
302
- padding: generalTooltip.padding,
303
- boxShadow: '0 1px 5px rgba(0, 0, 0, 0.1)',
304
- },
305
- '.cm-tooltip-autocomplete': {
306
- '& > ul': {
307
- backgroundColor: tooltipBackground,
308
- border: 'none',
677
+ gutter: {
678
+ background: base06,
679
+ foreground: base03,
680
+ border: base08,
681
+ activeBackground: base07,
682
+ activeForeground: base00,
683
+ activeFontWeight: '500',
684
+ activeBorder: 'none',
685
+ foldHover: base00,
309
686
  },
310
- '& > ul > li': {
311
- padding: generalTooltip.padding,
312
- lineHeight: generalTooltip.lineHeight,
687
+ foldPlaceholder: { background: 'transparent', foreground: base02, border: base08, borderStyle: 'dotted' },
688
+ tooltip: {
689
+ background: base06,
690
+ foreground: base00,
691
+ border: base08,
692
+ shadow: '0 1px 5px rgba(0, 0, 0, 0.1)',
693
+ listBackground: base06,
694
+ listBorder: 'none',
695
+ hoverBackground: `${base10}15`,
696
+ selectedBackground: `${base10}30`,
697
+ selectedForeground: base00,
698
+ selectedBorder: 'none',
699
+ icon: base03,
700
+ detail: base03,
313
701
  },
314
- '& > ul > li[aria-selected]': {
315
- backgroundColor: `${base10}30`,
316
- color: base00,
317
- borderRadius: generalTooltip.borderRadiusSelected,
702
+ diff: {
703
+ insertedBackground: addedBackground,
704
+ insertedForeground: base0B,
705
+ insertedBorder: `1px solid ${base0B}40`,
706
+ deletedBackground: removedBackground,
707
+ deletedForeground: base0A,
708
+ deletedBorder: `1px solid ${base0A}40`,
318
709
  },
319
- '& > ul > li:hover': {
320
- backgroundColor: `${base10}15`,
710
+ diagnostic: {
711
+ error: base0A,
712
+ warning: base0C,
713
+ info: base0D,
714
+ hint: base0D,
715
+ errorBackground: 'transparent',
716
+ warningBackground: 'transparent',
717
+ infoBackground: 'transparent',
718
+ borderWidth: '3px',
719
+ underlineWidth: '2px',
321
720
  },
322
- '& > ul > li > span.cm-completionIcon': {
323
- color: base03,
324
- paddingRight: generalTooltip.paddingRight,
721
+ scrollbar: {
722
+ track: base05,
723
+ trackBorder: 'none',
724
+ thumb: base08,
725
+ thumbBorder: `3px solid ${base05}`,
726
+ thumbHover: base09,
727
+ thumbHoverShadow: 'none',
325
728
  },
326
- '& > ul > li > span.cm-completionDetail': {
327
- color: base03,
328
- fontStyle: 'italic',
729
+ merge: {
730
+ backgroundColor: base06,
731
+ borderColor: base08,
732
+ buttonColor: base00,
733
+ buttonHoverColor: base07,
329
734
  },
330
735
  },
331
- '.cm-tooltip .cm-tooltip-arrow:before': {
332
- borderTopColor: 'transparent',
333
- borderBottomColor: 'transparent',
334
- },
335
- '.cm-tooltip .cm-tooltip-arrow:after': {
336
- borderTopColor: tooltipBackground,
337
- borderBottomColor: tooltipBackground,
338
- },
339
- // Diagnostics styling
340
- '.cm-diagnostic': {
341
- '&-error': {
342
- borderLeft: `3px solid ${invalid}`,
343
- },
344
- '&-warning': {
345
- borderLeft: `3px solid ${diagnosticWarning}`,
736
+ syntax: {
737
+ keyword: { color: base0A, fontWeight: 'bold' },
738
+ definitionKeyword: { color: base0A },
739
+ modifier: { color: base0E, fontStyle: 'italic' },
740
+ functionDefinition: { color: base0D },
741
+ operator: { color: base00 },
742
+ punctuation: { color: base04 },
743
+ name: { color: base0D },
744
+ function: { color: base0C },
745
+ self: { color: base0E },
746
+ label: { color: base0C },
747
+ property: { color: base0F, fontStyle: 'normal' },
748
+ type: { color: base0F },
749
+ typeDefinition: { color: base0F, fontWeight: 'bold' },
750
+ className: { color: base0C, fontStyle: 'italic' },
751
+ namespace: { color: base0D, fontStyle: 'italic' },
752
+ tag: { color: base0A },
753
+ attribute: { color: base0C },
754
+ content: { color: base00 },
755
+ string: { color: base0B },
756
+ number: { color: base0E },
757
+ constant: { color: base10 },
758
+ comment: { fontStyle: 'italic', color: base04 },
759
+ meta: { color: base04 },
760
+ processingInstruction: { color: base0B },
761
+ null: { color: base0E },
762
+ annotation: { color: base0A, fontStyle: 'italic' },
763
+ heading: { fontWeight: 'bold', color: base0C },
764
+ headingLevel: { color: base0C },
765
+ list: { color: base0C },
766
+ quote: { color: base04 },
767
+ monospace: { color: base00 },
768
+ contentSeparator: { color: base0D },
769
+ link: {
770
+ color: base0E,
771
+ fontWeight: '500',
772
+ textDecoration: 'underline',
773
+ textUnderlinePosition: 'under',
346
774
  },
347
- '&-info': {
348
- borderLeft: `3px solid ${linkColor}`,
349
- },
350
- },
351
- '.cm-lintPoint-error': {
352
- borderBottom: `2px wavy ${invalid}`,
353
- },
354
- '.cm-lintPoint-warning': {
355
- borderBottom: `2px wavy ${diagnosticWarning}`,
356
- },
357
- // Matching brackets
358
- '.cm-matchingBracket': {
359
- backgroundColor: activeBracketBg,
360
- outline: `1px solid ${activeBracketBorder}`,
361
- borderRadius: generalMatching.borderRadius,
362
- },
363
- '.cm-nonmatchingBracket': {
364
- backgroundColor: '#fb492740',
365
- outline: `1px solid ${invalid}`,
366
- borderRadius: generalMatching.borderRadius,
367
- },
368
- // Selection matches
369
- '.cm-selectionMatch': {
370
- backgroundColor: selectionMatch,
371
- outline: `1px solid ${base08}`,
372
- borderRadius: generalMatching.borderRadius,
373
- },
374
- // Fold placeholder
375
- '.cm-foldPlaceholder': {
376
- backgroundColor: 'transparent',
377
- color: base02,
378
- border: `1px dotted ${base08}`,
379
- borderRadius: generalPlaceholder.borderRadius,
380
- padding: generalPlaceholder.padding,
381
- margin: generalPlaceholder.margin,
382
- },
383
- // Focus outline
384
- '&.cm-focused': {
385
- outline: 'none',
386
- boxShadow: `0 0 0 2px ${base05}, 0 0 0 3px ${base10}40`,
387
- },
388
- // Scrollbars
389
- '& .cm-scroller::-webkit-scrollbar': {
390
- width: generalScroller.width,
391
- height: generalScroller.height,
392
- },
393
- '& .cm-scroller::-webkit-scrollbar-track': {
394
- background: base05,
395
- },
396
- '& .cm-scroller::-webkit-scrollbar-thumb': {
397
- backgroundColor: base08,
398
- borderRadius: generalScroller.borderRadius,
399
- border: `3px solid ${base05}`,
400
- },
401
- '& .cm-scroller::-webkit-scrollbar-thumb:hover': {
402
- backgroundColor: base09,
403
- },
404
- // Ghost text
405
- '.cm-ghostText': {
406
- opacity: '0.5',
407
- color: base04,
408
- },
409
- }, { dark: false });
410
- /**
411
- * Enhanced syntax highlighting for Gruvbox Light theme
412
- */
413
- const gruvboxLightHighlightStyle = /*@__PURE__*/HighlightStyle.define([
414
- // Keywords and control flow
415
- { tag: tags.keyword, color: base0A, fontWeight: 'bold' },
416
- { tag: tags.controlKeyword, color: base0A, fontWeight: 'bold' },
417
- { tag: tags.moduleKeyword, color: base0A, fontWeight: 'bold' },
418
- // Names and variables
419
- { tag: [tags.name, tags.deleted, tags.character, tags.macroName], color: base0D },
420
- { tag: [tags.variableName], color: base0D },
421
- { tag: [tags.propertyName], color: base0F, fontStyle: 'normal' },
422
- // Classes and types
423
- { tag: [tags.typeName], color: base0F },
424
- { tag: [tags.className], color: base0C, fontStyle: 'italic' },
425
- { tag: [tags.namespace], color: base0D, fontStyle: 'italic' },
426
- // Operators and punctuation
427
- { tag: [tags.operator, tags.operatorKeyword], color: base00 },
428
- { tag: [tags.bracket], color: base04 },
429
- { tag: [tags.brace], color: base04 },
430
- { tag: [tags.punctuation], color: base04 },
431
- // Functions and parameters
432
- { tag: [/*@__PURE__*/tags.function(tags.variableName), tags.labelName], color: base0C },
433
- { tag: [/*@__PURE__*/tags.definition(tags.variableName)], color: base0D },
434
- // Constants and literals
435
- { tag: tags.number, color: base0E },
436
- { tag: tags.changed, color: base0E },
437
- { tag: tags.annotation, color: invalid, fontStyle: 'italic' },
438
- { tag: tags.modifier, color: base0E, fontStyle: 'italic' },
439
- { tag: tags.self, color: base0E },
440
- { tag: [tags.color, /*@__PURE__*/tags.constant(tags.name), /*@__PURE__*/tags.standard(tags.name)], color: base10 },
441
- { tag: [tags.atom, tags.bool, /*@__PURE__*/tags.special(tags.variableName)], color: base10 },
442
- // Strings and regex
443
- { tag: [tags.processingInstruction, tags.inserted], color: base0B },
444
- { tag: [/*@__PURE__*/tags.special(tags.string), tags.regexp], color: base0B },
445
- { tag: tags.string, color: base0B },
446
- // Punctuation and structure
447
- { tag: /*@__PURE__*/tags.definition(tags.typeName), color: base0F, fontWeight: 'bold' },
448
- // Comments and documentation
449
- { tag: tags.meta, color: base04 },
450
- { tag: tags.comment, fontStyle: 'italic', color: base04 },
451
- { tag: tags.docComment, fontStyle: 'italic', color: base04 },
452
- // HTML/XML elements
453
- { tag: [tags.tagName], color: base0A },
454
- { tag: [tags.attributeName], color: base0C },
455
- // Markdown and text formatting
456
- { tag: [tags.heading], fontWeight: 'bold', color: base0C },
457
- { tag: [tags.strong], fontWeight: 'bold', color: base0C },
458
- { tag: [tags.emphasis], fontStyle: 'italic', color: base0B },
459
- // Links and URLs
460
- {
461
- tag: [tags.link],
462
- color: visitedLinkColor,
463
- fontWeight: '500',
464
- textDecoration: 'underline',
465
- textUnderlinePosition: 'under',
466
- },
467
- {
468
- tag: [tags.url],
469
- color: linkColor,
470
- textDecoration: 'underline',
471
- textUnderlineOffset: '2px',
472
- },
473
- // Special states
474
- {
475
- tag: [tags.invalid],
476
- color: base00,
477
- textDecoration: 'underline wavy',
478
- borderBottom: `1px wavy ${invalid}`,
479
- },
480
- { tag: [tags.strikethrough], color: invalid, textDecoration: 'line-through' },
481
- // Enhanced syntax highlighting
482
- { tag: /*@__PURE__*/tags.constant(tags.name), color: base10 },
483
- { tag: tags.deleted, color: invalid },
484
- { tag: tags.squareBracket, color: base04 },
485
- { tag: tags.angleBracket, color: base04 },
486
- // Additional specific styles
487
- { tag: tags.monospace, color: base00 },
488
- { tag: [tags.contentSeparator], color: base0D },
489
- { tag: tags.quote, color: base04 },
490
- { tag: tags.integer, color: base0E },
491
- { tag: tags.float, color: base0E },
492
- { tag: tags.null, color: base0E },
493
- { tag: tags.attributeValue, color: base0B },
494
- { tag: tags.escape, color: base0B },
495
- { tag: tags.paren, color: base04 },
496
- { tag: tags.lineComment, color: base04, fontStyle: 'italic' },
497
- { tag: tags.blockComment, color: base04, fontStyle: 'italic' },
498
- { tag: tags.definitionKeyword, color: base0A },
499
- { tag: tags.arithmeticOperator, color: base00 },
500
- { tag: tags.logicOperator, color: base00 },
501
- { tag: tags.compareOperator, color: base00 },
502
- { tag: tags.bitwiseOperator, color: base00 },
503
- { tag: tags.updateOperator, color: base00 },
504
- { tag: tags.derefOperator, color: base00 },
505
- { tag: /*@__PURE__*/tags.local(tags.variableName), color: base0D },
506
- { tag: tags.list, color: base0C },
507
- { tag: tags.unit, color: base0E },
508
- { tag: tags.heading1, color: base0C },
509
- { tag: tags.heading2, color: base0C },
510
- { tag: tags.heading3, color: base0C },
511
- { tag: tags.heading4, color: base0C },
512
- { tag: tags.heading5, color: base0C },
513
- { tag: tags.heading6, color: base0C },
514
- ]);
775
+ url: { color: base0D, textDecoration: 'underline', textUnderlineOffset: '2px' },
776
+ emphasis: { fontStyle: 'italic', color: base0B },
777
+ strong: { fontWeight: 'bold', color: base0C },
778
+ strikethrough: { color: base0A, textDecoration: 'line-through' },
779
+ invalid: { color: base00, textDecoration: 'underline wavy', borderBottom: `1px wavy ${base0A}` },
780
+ inserted: { color: base0B },
781
+ deleted: { color: base0A },
782
+ changed: { color: base0E },
783
+ },
784
+ });
515
785
  /**
516
786
  * Combined Gruvbox Light theme extension
517
787
  */
518
- const gruvboxLight = [gruvboxLightTheme, /*@__PURE__*/syntaxHighlighting(gruvboxLightHighlightStyle)];
788
+ const gruvboxLight = theme.extension;
519
789
  /**
520
790
  * Gruvbox Light merge revert styles configuration
521
791
  */
522
- const gruvboxLightMergeStyles = {
523
- backgroundColor: tooltipBackground,
524
- borderColor: base08,
525
- buttonColor: base00,
526
- buttonHoverColor: base07,
527
- };
792
+ const gruvboxLightMergeStyles = theme.mergeStyles;
528
793
 
529
794
  export { applyMergeRevertStyles, gruvboxLight, gruvboxLightMergeStyles };