@fsegurai/codemirror-theme-palenight 6.2.7 → 6.4.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 +168 -436
  3. package/dist/index.js +168 -436
  4. package/package.json +4 -1
package/dist/index.js CHANGED
@@ -1,60 +1,6 @@
1
- import { HighlightStyle, syntaxHighlighting } from '@codemirror/language';
2
- import { EditorView } from '@codemirror/view';
3
- import { tags } from '@lezer/highlight';
1
+ import { defineTheme } from '@fsegurai/codemirror-theme-core';
4
2
 
5
3
  // Helper module for styling options
6
- const generalContent = {
7
- fontSize: '14px',
8
- fontFamily: 'JetBrains Mono, Consolas, monospace',
9
- lineHeight: '1.6',
10
- };
11
- const generalCursor = {
12
- borderLeftWidth: '2px',
13
- };
14
- const generalDiff = {
15
- insertedTextDecoration: 'none',
16
- deletedTextDecoration: 'line-through',
17
- insertedLinePadding: '1px 3px',
18
- borderRadius: '3px'};
19
- const generalGutter = {
20
- border: 'none',
21
- paddingRight: '8px',
22
- fontSize: '0.9em',
23
- fontWeight: '500',
24
- lineHeight: '1.78', // Adjusted to compensate for 0.9em fontSize (1.6 / 0.9 ≈ 1.78)
25
- };
26
- const generalPanel = {
27
- border: 'none',
28
- borderRadius: '4px',
29
- padding: '2px 10px',
30
- };
31
- const generalLine = {
32
- borderRadius: '2px',
33
- };
34
- const generalMatching = {
35
- borderRadius: '2px',
36
- };
37
- const generalPlaceholder = {
38
- borderRadius: '4px',
39
- padding: '0 5px',
40
- margin: '0 2px',
41
- };
42
- const generalScroller = {
43
- width: '12px',
44
- height: '12px',
45
- borderRadius: '6px',
46
- };
47
- const generalSearchField = {
48
- borderRadius: '4px',
49
- padding: '2px 6px',
50
- };
51
- const generalTooltip = {
52
- borderRadius: '4px',
53
- borderRadiusSelected: '3px',
54
- lineHeight: '1.3',
55
- padding: '4px 8px',
56
- paddingRight: '8px',
57
- };
58
4
  /**
59
5
  * Function to apply merge revert styles for a theme
60
6
  * @param styles Styles for the merge revert buttons
@@ -111,9 +57,9 @@ function applyMergeRevertStyles(styles) {
111
57
  */
112
58
  // Base colors
113
59
  const base00 = '#292D3E', // Background - deep indigo
114
- base01 = '#A6ACCD', // Foreground - lavender blue
60
+ base01 = '#adb4d5', // Foreground - lavender blue
115
61
  base02 = '#444267', // Selection background - muted indigo
116
- base03 = '#676E95', // Comments, invisible - steel blue
62
+ base03 = '#9ca5ce', // Comments, invisible - steel blue
117
63
  base04 = '#BFC7D5', // Cursor - lighter lavender
118
64
  // Accent colors
119
65
  base05 = '#C3E88D', // Strings - light green
@@ -122,407 +68,193 @@ base07 = '#C792EA', // Classes, Types - purple
122
68
  base08 = '#F78C6C', // Numbers, Constants - orange
123
69
  base09 = '#FFCB6B', // Classes, Attributes - yellow
124
70
  base0A = '#89DDFF', // Punctuation, Operators - light blue
125
- base0B = '#FF5370', // Tags, Errors - red
126
- base0C = '#BB80B3', // Special elements - mauve
71
+ base0B = '#fe7f8d', // Tags, Errors - red
72
+ base0C = '#cf93c7', // Special elements - mauve
127
73
  base0D = '#80CBC4'; // Properties - seafoam
128
74
  // UI specific colors
129
- const invalid = '#FF5370', // Error color - red
130
- darkBackground = '#202331', // Darker background for panels and gutter
75
+ const darkBackground = '#202331', // Darker background for panels and gutter
131
76
  highlightBackground = '#2e324817', // Active line background
132
- background = base00, // Main editor background
133
77
  tooltipBackground = '#343A50', // Tooltip background
134
- selection = base02, // Selection background
135
78
  selectionMatch = '#444267AA', // Selection match with opacity
136
- cursor = base04, // Cursor color
137
- activeBracketBg = '#2E3248', // Active bracket background
138
- activeBracketBorder = base06, // Active bracket border - sky blue
139
- diagnosticWarning = base09, // Warning color - yellow
140
- linkColor = base06, // Link color - sky blue
141
- visitedLinkColor = base07; // Visited link color - purple
79
+ activeBracketBg = '#2E3248'; // Active bracket background
142
80
  // Diff/merge specific colors
143
81
  const addedBackground = '#2c3c2e80', // Dark green with transparency for insertions
144
- removedBackground = '#3e2e3180', // Dark red with transparency for deletions
145
- addedText = '#C3E88D', // Palenight green for added text
146
- removedText = '#FF5370'; // Palenight red for removed text
147
- /**
148
- * Enhanced editor theme styles for Palenight
149
- */
150
- const palenightTheme = /*@__PURE__*/EditorView.theme({
151
- // Base editor styles
152
- '&': {
153
- color: base01,
154
- backgroundColor: background,
155
- fontSize: generalContent.fontSize,
156
- fontFamily: generalContent.fontFamily,
157
- },
158
- // Content and cursor
159
- '.cm-content': {
160
- caretColor: cursor,
161
- lineHeight: generalContent.lineHeight,
162
- },
163
- '.cm-cursor, .cm-dropCursor': {
164
- borderLeftColor: cursor,
165
- borderLeftWidth: generalCursor.borderLeftWidth,
166
- },
167
- '.cm-fat-cursor': {
168
- backgroundColor: `${cursor}99`,
169
- color: background,
170
- },
171
- // Selection
172
- '&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection': {
173
- backgroundColor: selection,
174
- },
175
- // Make sure selection appears above active line
176
- '.cm-selectionLayer': {
177
- zIndex: 100,
178
- },
179
- // Search functionality
180
- '.cm-searchMatch': {
181
- backgroundColor: '#444267CC',
182
- outline: `1px solid ${base06}`,
183
- color: base01,
184
- borderRadius: generalSearchField.borderRadius,
185
- '& span': {
186
- color: base01,
187
- },
188
- },
189
- '.cm-searchMatch.cm-searchMatch-selected': {
190
- backgroundColor: base06,
191
- color: background,
192
- padding: generalSearchField.padding,
193
- '& span': {
194
- color: background,
82
+ removedBackground = '#3e2e3180'; // Dark red with transparency for deletions
83
+ const theme = /*@__PURE__*/defineTheme({
84
+ name: 'Palenight',
85
+ dark: true,
86
+ ui: {
87
+ background: base00,
88
+ foreground: base01,
89
+ border: 'none',
90
+ cursor: base04,
91
+ cursorWidth: '2px',
92
+ cursorShadow: 'none',
93
+ fatCursor: { background: `${base04}99`, border: 'none' },
94
+ selection: '#3b385d',
95
+ selectionInactive: '#3b385d',
96
+ selectionForeground: null,
97
+ selectionOutline: 'none',
98
+ activeLine: highlightBackground,
99
+ activeLineBorder: { left: 'none', right: 'none' },
100
+ ghostText: base03,
101
+ ghostTextOpacity: '0.5',
102
+ specialChar: base0B,
103
+ focusRing: `0 0 0 2px ${base00}, 0 0 0 4px ${base06}`,
104
+ outlineWidth: '1px',
105
+ searchMatch: {
106
+ background: `${base02}CC`,
107
+ outline: base06,
108
+ foreground: base01,
109
+ shadow: 'none',
110
+ selectedBackground: base06,
111
+ selectedForeground: base00,
112
+ selectedOutline: `1px solid ${base06}`,
113
+ selectedShadow: 'none',
195
114
  },
196
- },
197
- '.cm-search.cm-panel.cm-textfield': {
198
- color: base01,
199
- borderRadius: generalSearchField.borderRadius,
200
- padding: generalSearchField.padding,
201
- },
202
- // Panels
203
- '.cm-panels': {
204
- backgroundColor: darkBackground,
205
- color: base01,
206
- borderRadius: '4px',
207
- },
208
- '.cm-panels.cm-panels-top': {
209
- borderBottom: `1px solid ${base02}`,
210
- },
211
- '.cm-panels.cm-panels-bottom': {
212
- borderTop: `1px solid ${base02}`,
213
- },
214
- '.cm-panel button': {
215
- backgroundColor: tooltipBackground,
216
- color: base01,
217
- border: generalPanel.border,
218
- borderRadius: generalPanel.borderRadius,
219
- padding: generalPanel.padding,
220
- },
221
- '.cm-panel button:hover': {
222
- backgroundColor: '#3A4058',
223
- },
224
- // Line highlighting
225
- '.cm-activeLine': {
226
- backgroundColor: highlightBackground,
227
- borderRadius: generalLine.borderRadius,
228
- zIndex: 1,
229
- },
230
- // Gutters
231
- '.cm-gutters': {
232
- backgroundColor: darkBackground,
233
- color: base03,
234
- border: generalGutter.border,
235
- borderRight: '1px solid #3A405880',
236
- paddingRight: generalGutter.paddingRight,
237
- },
238
- '.cm-activeLineGutter': {
239
- backgroundColor: '#2A2D40',
240
- color: base01,
241
- fontWeight: generalGutter.fontWeight,
242
- },
243
- '.cm-lineNumbers': {
244
- fontSize: generalGutter.fontSize,
245
- lineHeight: generalGutter.lineHeight,
246
- },
247
- '.cm-foldGutter': {
248
- fontSize: generalGutter.fontSize,
249
- lineHeight: generalGutter.lineHeight,
250
- },
251
- '.cm-foldGutter .cm-gutterElement': {
252
- color: base03,
253
- cursor: 'pointer',
254
- },
255
- '.cm-foldGutter .cm-gutterElement:hover': {
256
- color: base01,
257
- },
258
- // Diff/Merge View Styles
259
- // Inserted/Added Content
260
- '.cm-insertedLine': {
261
- textDecoration: generalDiff.insertedTextDecoration,
262
- backgroundColor: addedBackground,
263
- color: addedText,
264
- padding: generalDiff.insertedLinePadding,
265
- borderRadius: generalDiff.borderRadius,
266
- },
267
- 'ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))': {
268
- textDecoration: generalDiff.insertedTextDecoration,
269
- backgroundColor: `${addedBackground} !important`,
270
- color: addedText,
271
- padding: generalDiff.insertedLinePadding,
272
- borderRadius: generalDiff.borderRadius,
273
- border: `1px solid ${addedText}40`,
274
- },
275
- 'ins.cm-insertedLine .cm-changedText': {
276
- background: 'transparent !important',
277
- },
278
- // Deleted/Removed Content
279
- '.cm-deletedLine': {
280
- textDecoration: generalDiff.deletedTextDecoration,
281
- backgroundColor: removedBackground,
282
- color: removedText,
283
- padding: generalDiff.insertedLinePadding,
284
- borderRadius: generalDiff.borderRadius,
285
- },
286
- 'del.cm-deletedLine, del, del:not(:has(.cm-deletedText))': {
287
- textDecoration: generalDiff.deletedTextDecoration,
288
- backgroundColor: `${removedBackground} !important`,
289
- color: removedText,
290
- padding: generalDiff.insertedLinePadding,
291
- borderRadius: generalDiff.borderRadius,
292
- border: `1px solid ${removedText}40`,
293
- },
294
- 'del .cm-deletedText, del .cm-changedText': {
295
- background: 'transparent !important',
296
- },
297
- // Tooltips and autocomplete
298
- '.cm-tooltip': {
299
- backgroundColor: tooltipBackground,
300
- border: '1px solid #3A4058',
301
- borderRadius: generalTooltip.borderRadius,
302
- padding: generalTooltip.padding,
303
- boxShadow: '0 2px 8px rgba(0, 0, 0, 0.4)',
304
- },
305
- '.cm-tooltip-autocomplete': {
306
- '& > ul': {
307
- backgroundColor: tooltipBackground,
308
- border: 'none',
115
+ selectionMatch: { background: selectionMatch, outline: `${base03}50` },
116
+ matchingBracket: { background: activeBracketBg, outline: base06, shadow: 'none' },
117
+ nonMatchingBracket: { background: `${base0B}40`, outline: base0B },
118
+ panel: {
119
+ background: darkBackground,
120
+ foreground: base01,
121
+ border: base02,
122
+ borderWidth: '1px',
123
+ outline: 'none',
124
+ shadow: 'none',
125
+ buttonBackground: tooltipBackground,
126
+ buttonForeground: base01,
127
+ buttonBorder: 'none',
128
+ buttonHoverBackground: '#3A4058',
129
+ buttonHoverForeground: base01,
130
+ buttonHoverBorder: 'none',
131
+ buttonHoverShadow: 'none',
132
+ inputBackground: base00,
133
+ inputBorder: `1px solid ${base02}`,
309
134
  },
310
- '& > ul > li': {
311
- padding: generalTooltip.padding,
312
- lineHeight: generalTooltip.lineHeight,
135
+ gutter: {
136
+ background: darkBackground,
137
+ foreground: base03,
138
+ border: '#3A405880',
139
+ activeBackground: '#2A2D40',
140
+ activeForeground: base01,
141
+ activeFontWeight: '500',
142
+ activeBorder: 'none',
143
+ foldHover: base01,
313
144
  },
314
- '& > ul > li[aria-selected]': {
315
- backgroundColor: selection,
316
- color: base04,
317
- borderRadius: generalTooltip.borderRadiusSelected,
145
+ foldPlaceholder: {
146
+ background: tooltipBackground,
147
+ foreground: base03,
148
+ border: `${base03}70`,
149
+ borderStyle: 'dotted',
318
150
  },
319
- '& > ul > li > span.cm-completionIcon': {
320
- color: base03,
321
- paddingRight: generalTooltip.paddingRight,
151
+ tooltip: {
152
+ background: tooltipBackground,
153
+ foreground: base01,
154
+ border: '#3A4058',
155
+ shadow: '0 2px 8px rgba(0, 0, 0, 0.4)',
156
+ listBackground: tooltipBackground,
157
+ listBorder: 'none',
158
+ hoverBackground: 'transparent',
159
+ selectedBackground: base02,
160
+ selectedForeground: base04,
161
+ selectedBorder: 'none',
162
+ icon: base03,
163
+ detail: base03,
322
164
  },
323
- '& > ul > li > span.cm-completionDetail': {
324
- color: base03,
325
- fontStyle: 'italic',
165
+ diff: {
166
+ insertedBackground: addedBackground,
167
+ insertedForeground: base05,
168
+ insertedBorder: `1px solid ${base05}40`,
169
+ deletedBackground: removedBackground,
170
+ deletedForeground: base0B,
171
+ deletedBorder: `1px solid ${base0B}40`,
326
172
  },
327
- },
328
- '.cm-tooltip .cm-tooltip-arrow:before': {
329
- borderTopColor: 'transparent',
330
- borderBottomColor: 'transparent',
331
- },
332
- '.cm-tooltip .cm-tooltip-arrow:after': {
333
- borderTopColor: tooltipBackground,
334
- borderBottomColor: tooltipBackground,
335
- },
336
- // Diagnostics styling
337
- '.cm-diagnostic': {
338
- '&-error': {
339
- borderLeft: `3px solid ${invalid}`,
173
+ diagnostic: {
174
+ error: base0B,
175
+ warning: base09,
176
+ info: base06,
177
+ hint: base06,
178
+ errorBackground: 'transparent',
179
+ warningBackground: 'transparent',
180
+ infoBackground: 'transparent',
181
+ borderWidth: '3px',
182
+ underlineWidth: '2px',
340
183
  },
341
- '&-warning': {
342
- borderLeft: `3px solid ${diagnosticWarning}`,
184
+ scrollbar: {
185
+ track: darkBackground,
186
+ trackBorder: 'none',
187
+ thumb: base02,
188
+ thumbBorder: `3px solid ${darkBackground}`,
189
+ thumbHover: '#515580',
190
+ thumbHoverShadow: 'none',
343
191
  },
344
- '&-info': {
345
- borderLeft: `3px solid ${linkColor}`,
192
+ merge: {
193
+ backgroundColor: darkBackground,
194
+ borderColor: '#3A4058',
195
+ buttonColor: base01,
196
+ buttonHoverColor: '#3A4058',
346
197
  },
347
198
  },
348
- '.cm-lintPoint-error': {
349
- borderBottom: `2px wavy ${invalid}`,
350
- },
351
- '.cm-lintPoint-warning': {
352
- borderBottom: `2px wavy ${diagnosticWarning}`,
353
- },
354
- // Matching brackets
355
- '.cm-matchingBracket': {
356
- backgroundColor: activeBracketBg,
357
- outline: `1px solid ${activeBracketBorder}`,
358
- borderRadius: generalMatching.borderRadius,
359
- },
360
- '.cm-nonmatchingBracket': {
361
- backgroundColor: `${invalid}40`,
362
- outline: `1px solid ${invalid}`,
363
- borderRadius: generalMatching.borderRadius,
364
- },
365
- // Selection matches
366
- '.cm-selectionMatch': {
367
- backgroundColor: selectionMatch,
368
- outline: `1px solid ${base03}50`,
369
- borderRadius: generalMatching.borderRadius,
370
- },
371
- // Fold placeholder
372
- '.cm-foldPlaceholder': {
373
- backgroundColor: tooltipBackground,
374
- color: base03,
375
- border: `1px dotted ${base03}70`,
376
- borderRadius: generalPlaceholder.borderRadius,
377
- padding: generalPlaceholder.padding,
378
- margin: generalPlaceholder.margin,
379
- },
380
- // Focus outline
381
- '&.cm-focused': {
382
- outline: 'none',
383
- boxShadow: `0 0 0 2px ${background}, 0 0 0 3px ${base06}40`,
384
- },
385
- // Scrollbars
386
- '& .cm-scroller::-webkit-scrollbar': {
387
- width: generalScroller.width,
388
- height: generalScroller.height,
389
- },
390
- '& .cm-scroller::-webkit-scrollbar-track': {
391
- background: darkBackground,
392
- },
393
- '& .cm-scroller::-webkit-scrollbar-thumb': {
394
- backgroundColor: base02,
395
- borderRadius: generalScroller.borderRadius,
396
- border: `3px solid ${darkBackground}`,
397
- },
398
- '& .cm-scroller::-webkit-scrollbar-thumb:hover': {
399
- backgroundColor: '#515580',
400
- },
401
- // Ghost text
402
- '.cm-ghostText': {
403
- opacity: '0.5',
404
- color: base03,
405
- },
406
- }, { dark: true });
407
- /**
408
- * Enhanced syntax highlighting for Palenight theme
409
- */
410
- const palenightHighlightStyle = /*@__PURE__*/HighlightStyle.define([
411
- // Keywords and control flow
412
- { tag: tags.keyword, color: base06, fontWeight: 'bold' },
413
- { tag: tags.controlKeyword, color: base06, fontWeight: 'bold' },
414
- { tag: tags.moduleKeyword, color: base06, fontWeight: 'bold' },
415
- // Names and variables
416
- { tag: [tags.name, tags.deleted, tags.character, tags.macroName], color: base01 },
417
- { tag: [tags.variableName], color: base01 },
418
- { tag: [tags.propertyName], color: base0D, fontStyle: 'normal' },
419
- // Classes and types
420
- { tag: [tags.typeName], color: base07 },
421
- { tag: [tags.className], color: base09, fontStyle: 'italic' },
422
- { tag: [tags.namespace], color: base09, fontStyle: 'italic' },
423
- // Operators and punctuation
424
- { tag: [tags.operator, tags.operatorKeyword], color: base0A },
425
- { tag: [tags.bracket], color: base0A },
426
- { tag: [tags.brace], color: base0A },
427
- { tag: [tags.punctuation], color: base0A },
428
- // Functions and parameters
429
- { tag: [/*@__PURE__*/tags.function(tags.variableName), tags.labelName], color: base06 },
430
- { tag: [/*@__PURE__*/tags.definition(/*@__PURE__*/tags.function(tags.variableName))], color: base06 },
431
- { tag: [/*@__PURE__*/tags.definition(tags.variableName)], color: base08 },
432
- // Constants and literals
433
- { tag: tags.number, color: base08 },
434
- { tag: tags.changed, color: base08 },
435
- { tag: tags.annotation, color: invalid, fontStyle: 'italic' },
436
- { tag: tags.modifier, color: base0C, fontStyle: 'italic' },
437
- { tag: tags.self, color: base07 },
438
- { tag: [tags.color, /*@__PURE__*/tags.constant(tags.name), /*@__PURE__*/tags.standard(tags.name)], color: base08 },
439
- { tag: [tags.atom, tags.bool, /*@__PURE__*/tags.special(tags.variableName)], color: base0C },
440
- // Strings and regex
441
- { tag: [tags.processingInstruction, tags.inserted], color: base05 },
442
- { tag: [/*@__PURE__*/tags.special(tags.string), tags.regexp], color: base05 },
443
- { tag: tags.string, color: base05 },
444
- // Punctuation and structure
445
- { tag: /*@__PURE__*/tags.definition(tags.typeName), color: base07, fontWeight: 'bold' },
446
- { tag: [/*@__PURE__*/tags.definition(tags.name), tags.separator], color: base0A },
447
- // Comments and documentation
448
- { tag: tags.meta, color: base03 },
449
- { tag: tags.comment, fontStyle: 'italic', color: base03 },
450
- { tag: tags.docComment, fontStyle: 'italic', color: base03 },
451
- // HTML/XML elements
452
- { tag: [tags.tagName], color: base0B },
453
- { tag: [tags.attributeName], color: base09 },
454
- // Markdown and text formatting
455
- { tag: [tags.heading], fontWeight: 'bold', color: base09 },
456
- { tag: [tags.strong], fontWeight: 'bold', color: base09 },
457
- { tag: [tags.emphasis], fontStyle: 'italic', color: base05 },
458
- // Links and URLs
459
- {
460
- tag: [tags.link],
461
- color: visitedLinkColor,
462
- fontWeight: '500',
463
- textDecoration: 'underline',
464
- textUnderlinePosition: 'under',
465
- },
466
- {
467
- tag: [tags.url],
468
- color: linkColor,
469
- textDecoration: 'underline',
470
- textUnderlineOffset: '2px',
471
- },
472
- // Special states
473
- {
474
- tag: [tags.invalid],
475
- color: base01,
476
- textDecoration: 'underline wavy',
477
- borderBottom: `1px wavy ${invalid}`,
478
- },
479
- { tag: [tags.strikethrough], color: invalid, textDecoration: 'line-through' },
480
- // Enhanced syntax highlighting
481
- { tag: /*@__PURE__*/tags.constant(tags.name), color: base08 },
482
- { tag: tags.deleted, color: invalid },
483
- { tag: tags.squareBracket, color: base0A },
484
- { tag: tags.angleBracket, color: base0A },
485
- // Additional specific styles
486
- { tag: tags.monospace, color: base01 },
487
- { tag: [tags.contentSeparator], color: base09 },
488
- { tag: tags.quote, color: base03 },
489
- { tag: tags.integer, color: base08 },
490
- { tag: tags.float, color: base08 },
491
- { tag: tags.null, color: base08 },
492
- { tag: tags.attributeValue, color: base05 },
493
- { tag: tags.escape, color: base05 },
494
- { tag: tags.paren, color: base0A },
495
- { tag: tags.lineComment, color: base03, fontStyle: 'italic' },
496
- { tag: tags.blockComment, color: base03, fontStyle: 'italic' },
497
- { tag: tags.definitionKeyword, color: base06 },
498
- { tag: tags.arithmeticOperator, color: base0A },
499
- { tag: tags.logicOperator, color: base0A },
500
- { tag: tags.compareOperator, color: base0A },
501
- { tag: tags.bitwiseOperator, color: base0A },
502
- { tag: tags.updateOperator, color: base0A },
503
- { tag: tags.derefOperator, color: base0A },
504
- { tag: /*@__PURE__*/tags.local(tags.variableName), color: base08 },
505
- { tag: tags.list, color: base09 },
506
- { tag: tags.unit, color: base08 },
507
- { tag: tags.heading1, color: base09 },
508
- { tag: tags.heading2, color: base09 },
509
- { tag: tags.heading3, color: base09 },
510
- { tag: tags.heading4, color: base09 },
511
- { tag: tags.heading5, color: base09 },
512
- { tag: tags.heading6, color: base09 },
513
- ]);
199
+ syntax: {
200
+ keyword: { color: base06, fontWeight: 'bold' },
201
+ definitionKeyword: { color: base06 },
202
+ modifier: { color: base0C, fontStyle: 'italic' },
203
+ operator: { color: base0A },
204
+ punctuation: { color: base0A },
205
+ name: { color: base01 },
206
+ localVariable: { color: base08 },
207
+ variableDefinition: { color: base08 },
208
+ nameDefinition: { color: base0A },
209
+ function: { color: base06 },
210
+ self: { color: base07 },
211
+ label: { color: base06 },
212
+ property: { color: base0D, fontStyle: 'normal' },
213
+ type: { color: base07 },
214
+ typeDefinition: { color: base07, fontWeight: 'bold' },
215
+ className: { color: base09, fontStyle: 'italic' },
216
+ namespace: { color: base09, fontStyle: 'italic' },
217
+ tag: { color: base0B },
218
+ attribute: { color: base09 },
219
+ content: { color: base01 },
220
+ string: { color: base05 },
221
+ number: { color: base08 },
222
+ constant: { color: base08 },
223
+ comment: { fontStyle: 'italic', color: base03 },
224
+ meta: { color: base03 },
225
+ processingInstruction: { color: base05 },
226
+ atom: { color: base0C },
227
+ specialVariable: { color: base0C },
228
+ annotation: { color: base0B, fontStyle: 'italic' },
229
+ heading: { fontWeight: 'bold', color: base09 },
230
+ headingLevel: { color: base09 },
231
+ list: { color: base09 },
232
+ quote: { color: base03 },
233
+ monospace: { color: base01 },
234
+ contentSeparator: { color: base09 },
235
+ link: {
236
+ color: base07,
237
+ fontWeight: '500',
238
+ textDecoration: 'underline',
239
+ textUnderlinePosition: 'under',
240
+ },
241
+ url: { color: base06, textDecoration: 'underline', textUnderlineOffset: '2px' },
242
+ emphasis: { fontStyle: 'italic', color: base05 },
243
+ strong: { fontWeight: 'bold', color: base09 },
244
+ strikethrough: { color: base0B, textDecoration: 'line-through' },
245
+ invalid: { color: base01, textDecoration: 'underline wavy', borderBottom: `1px wavy ${base0B}` },
246
+ inserted: { color: base05 },
247
+ deleted: { color: base0B },
248
+ changed: { color: base08 },
249
+ },
250
+ });
514
251
  /**
515
252
  * Combined Palenight theme extension
516
253
  */
517
- const palenight = [palenightTheme, /*@__PURE__*/syntaxHighlighting(palenightHighlightStyle)];
254
+ const palenight = theme.extension;
518
255
  /**
519
256
  * Palenight merge revert styles configuration
520
257
  */
521
- const palenightMergeStyles = {
522
- backgroundColor: darkBackground,
523
- borderColor: '#3A4058',
524
- buttonColor: base01,
525
- buttonHoverColor: '#3A4058',
526
- };
258
+ const palenightMergeStyles = theme.mergeStyles;
527
259
 
528
260
  export { applyMergeRevertStyles, palenight, palenightMergeStyles };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fsegurai/codemirror-theme-palenight",
3
- "version": "6.2.7",
3
+ "version": "6.4.0",
4
4
  "description": "Palenight theme for the CodeMirror editor",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -47,6 +47,9 @@
47
47
  "@codemirror/state": "^6.0.0",
48
48
  "@codemirror/view": "^6.0.0"
49
49
  },
50
+ "dependencies": {
51
+ "@fsegurai/codemirror-theme-core": "6.0.0"
52
+ },
50
53
  "devDependencies": {
51
54
  "@codemirror/buildhelper": "^1.0.2"
52
55
  },