@fsegurai/codemirror-theme-github-light 6.2.7 → 6.3.0

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