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