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