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