@mantine/code-highlight 7.17.1 → 8.0.0-alpha.1

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 (86) hide show
  1. package/cjs/CodeHighlight/CodeHighlight.cjs +168 -0
  2. package/cjs/CodeHighlight/CodeHighlight.cjs.map +1 -0
  3. package/cjs/CodeHighlight/CodeHighlight.context.cjs +12 -0
  4. package/cjs/CodeHighlight/CodeHighlight.context.cjs.map +1 -0
  5. package/cjs/CodeHighlight/CodeHighlightControl/CodeHighlightControl.cjs +48 -0
  6. package/cjs/CodeHighlight/CodeHighlightControl/CodeHighlightControl.cjs.map +1 -0
  7. package/cjs/CodeHighlight/CopyCodeButton/CopyCodeButton.cjs +28 -0
  8. package/cjs/CodeHighlight/CopyCodeButton/CopyCodeButton.cjs.map +1 -0
  9. package/cjs/CodeHighlight/CopyCodeButton/CopyIcon.cjs +32 -0
  10. package/cjs/CodeHighlight/CopyCodeButton/CopyIcon.cjs.map +1 -0
  11. package/cjs/CodeHighlight/ExpandCodeButton/ExpandCodeButton.cjs +26 -0
  12. package/cjs/CodeHighlight/ExpandCodeButton/ExpandCodeButton.cjs.map +1 -0
  13. package/cjs/CodeHighlight/ExpandCodeButton/ExpandIcon.cjs +39 -0
  14. package/cjs/CodeHighlight/ExpandCodeButton/ExpandIcon.cjs.map +1 -0
  15. package/cjs/CodeHighlight/InlineCodeHighlight.cjs +40 -0
  16. package/cjs/CodeHighlight/InlineCodeHighlight.cjs.map +1 -0
  17. package/cjs/CodeHighlight.module.css.cjs +2 -2
  18. package/cjs/CodeHighlightProvider/CodeHighlightProvider.cjs +35 -0
  19. package/cjs/CodeHighlightProvider/CodeHighlightProvider.cjs.map +1 -0
  20. package/cjs/CodeHighlightProvider/adapters/highlight-js-adapter.cjs +17 -0
  21. package/cjs/CodeHighlightProvider/adapters/highlight-js-adapter.cjs.map +1 -0
  22. package/cjs/CodeHighlightProvider/adapters/plain-text-adapter.cjs +8 -0
  23. package/cjs/CodeHighlightProvider/adapters/plain-text-adapter.cjs.map +1 -0
  24. package/cjs/CodeHighlightProvider/adapters/shiki-adapter.cjs +42 -0
  25. package/cjs/CodeHighlightProvider/adapters/shiki-adapter.cjs.map +1 -0
  26. package/cjs/CodeHighlightProvider/adapters/shiki-themes.cjs +1240 -0
  27. package/cjs/CodeHighlightProvider/adapters/shiki-themes.cjs.map +1 -0
  28. package/cjs/CodeHighlightTabs/CodeHighlightTabs.cjs +127 -0
  29. package/cjs/CodeHighlightTabs/CodeHighlightTabs.cjs.map +1 -0
  30. package/cjs/CodeHighlightTabs/FileIcon.cjs +17 -0
  31. package/cjs/CodeHighlightTabs/FileIcon.cjs.map +1 -0
  32. package/cjs/index.cjs +16 -4
  33. package/cjs/index.cjs.map +1 -1
  34. package/esm/CodeHighlight/CodeHighlight.context.mjs +9 -0
  35. package/esm/CodeHighlight/CodeHighlight.context.mjs.map +1 -0
  36. package/esm/CodeHighlight/CodeHighlight.mjs +162 -0
  37. package/esm/CodeHighlight/CodeHighlight.mjs.map +1 -0
  38. package/esm/CodeHighlight/CodeHighlightControl/CodeHighlightControl.mjs +46 -0
  39. package/esm/CodeHighlight/CodeHighlightControl/CodeHighlightControl.mjs.map +1 -0
  40. package/esm/CodeHighlight/CopyCodeButton/CopyCodeButton.mjs +26 -0
  41. package/esm/CodeHighlight/CopyCodeButton/CopyCodeButton.mjs.map +1 -0
  42. package/esm/CodeHighlight/CopyCodeButton/CopyIcon.mjs +30 -0
  43. package/esm/CodeHighlight/CopyCodeButton/CopyIcon.mjs.map +1 -0
  44. package/esm/CodeHighlight/ExpandCodeButton/ExpandCodeButton.mjs +24 -0
  45. package/esm/CodeHighlight/ExpandCodeButton/ExpandCodeButton.mjs.map +1 -0
  46. package/esm/CodeHighlight/ExpandCodeButton/ExpandIcon.mjs +37 -0
  47. package/esm/CodeHighlight/ExpandCodeButton/ExpandIcon.mjs.map +1 -0
  48. package/esm/CodeHighlight/InlineCodeHighlight.mjs +38 -0
  49. package/esm/CodeHighlight/InlineCodeHighlight.mjs.map +1 -0
  50. package/esm/CodeHighlight.module.css.mjs +2 -2
  51. package/esm/CodeHighlightProvider/CodeHighlightProvider.mjs +30 -0
  52. package/esm/CodeHighlightProvider/CodeHighlightProvider.mjs.map +1 -0
  53. package/esm/CodeHighlightProvider/adapters/highlight-js-adapter.mjs +15 -0
  54. package/esm/CodeHighlightProvider/adapters/highlight-js-adapter.mjs.map +1 -0
  55. package/esm/CodeHighlightProvider/adapters/plain-text-adapter.mjs +6 -0
  56. package/esm/CodeHighlightProvider/adapters/plain-text-adapter.mjs.map +1 -0
  57. package/esm/CodeHighlightProvider/adapters/shiki-adapter.mjs +39 -0
  58. package/esm/CodeHighlightProvider/adapters/shiki-adapter.mjs.map +1 -0
  59. package/esm/CodeHighlightProvider/adapters/shiki-themes.mjs +1237 -0
  60. package/esm/CodeHighlightProvider/adapters/shiki-themes.mjs.map +1 -0
  61. package/esm/CodeHighlightTabs/CodeHighlightTabs.mjs +125 -0
  62. package/esm/CodeHighlightTabs/CodeHighlightTabs.mjs.map +1 -0
  63. package/esm/CodeHighlightTabs/FileIcon.mjs +15 -0
  64. package/esm/CodeHighlightTabs/FileIcon.mjs.map +1 -0
  65. package/esm/index.mjs +8 -3
  66. package/esm/index.mjs.map +1 -1
  67. package/lib/CodeHighlight/CodeHighlight.context.d.ts +11 -0
  68. package/lib/CodeHighlight/CodeHighlight.d.ts +66 -0
  69. package/lib/CodeHighlight/CodeHighlightControl/CodeHighlightControl.d.ts +33 -0
  70. package/lib/CodeHighlight/CopyCodeButton/CopyCodeButton.d.ts +10 -0
  71. package/lib/CodeHighlight/CopyCodeButton/CopyIcon.d.ts +8 -0
  72. package/lib/CodeHighlight/ExpandCodeButton/ExpandCodeButton.d.ts +11 -0
  73. package/lib/CodeHighlight/ExpandCodeButton/ExpandIcon.d.ts +8 -0
  74. package/lib/CodeHighlight/InlineCodeHighlight.d.ts +29 -0
  75. package/lib/CodeHighlightProvider/CodeHighlightProvider.d.ts +32 -0
  76. package/lib/CodeHighlightProvider/adapters/highlight-js-adapter.d.ts +2 -0
  77. package/lib/CodeHighlightProvider/adapters/plain-text-adapter.d.ts +2 -0
  78. package/lib/CodeHighlightProvider/adapters/shiki-adapter.d.ts +7 -0
  79. package/lib/CodeHighlightProvider/adapters/shiki-themes.d.ts +430 -0
  80. package/lib/CodeHighlightTabs/CodeHighlightTabs.d.ts +34 -0
  81. package/lib/CodeHighlightTabs/FileIcon.d.ts +9 -0
  82. package/lib/index.d.mts +12 -6
  83. package/lib/index.d.ts +12 -6
  84. package/package.json +4 -4
  85. package/styles.css +214 -190
  86. package/styles.layer.css +214 -190
@@ -0,0 +1,430 @@
1
+ export declare const light: {
2
+ colors: {
3
+ 'activityBar.activeBorder': string;
4
+ 'activityBar.background': string;
5
+ 'activityBar.border': string;
6
+ 'activityBar.foreground': string;
7
+ 'activityBar.inactiveForeground': string;
8
+ 'activityBarBadge.background': string;
9
+ 'activityBarBadge.foreground': string;
10
+ 'badge.background': string;
11
+ 'badge.foreground': string;
12
+ 'breadcrumb.activeSelectionForeground': string;
13
+ 'breadcrumb.focusForeground': string;
14
+ 'breadcrumb.foreground': string;
15
+ 'breadcrumbPicker.background': string;
16
+ 'button.background': string;
17
+ 'button.foreground': string;
18
+ 'button.hoverBackground': string;
19
+ 'button.secondaryBackground': string;
20
+ 'button.secondaryForeground': string;
21
+ 'button.secondaryHoverBackground': string;
22
+ 'checkbox.background': string;
23
+ 'checkbox.border': string;
24
+ 'debugConsole.errorForeground': string;
25
+ 'debugConsole.infoForeground': string;
26
+ 'debugConsole.sourceForeground': string;
27
+ 'debugConsole.warningForeground': string;
28
+ 'debugConsoleInputIcon.foreground': string;
29
+ 'debugIcon.breakpointForeground': string;
30
+ 'debugTokenExpression.boolean': string;
31
+ 'debugTokenExpression.error': string;
32
+ 'debugTokenExpression.name': string;
33
+ 'debugTokenExpression.number': string;
34
+ 'debugTokenExpression.string': string;
35
+ 'debugTokenExpression.value': string;
36
+ 'debugToolBar.background': string;
37
+ descriptionForeground: string;
38
+ 'diffEditor.insertedLineBackground': string;
39
+ 'diffEditor.insertedTextBackground': string;
40
+ 'diffEditor.removedLineBackground': string;
41
+ 'diffEditor.removedTextBackground': string;
42
+ 'dropdown.background': string;
43
+ 'dropdown.border': string;
44
+ 'dropdown.foreground': string;
45
+ 'dropdown.listBackground': string;
46
+ 'editor.background': string;
47
+ 'editor.findMatchBackground': string;
48
+ 'editor.findMatchHighlightBackground': string;
49
+ 'editor.focusedStackFrameHighlightBackground': string;
50
+ 'editor.foldBackground': string;
51
+ 'editor.foreground': string;
52
+ 'editor.lineHighlightBackground': string;
53
+ 'editor.linkedEditingBackground': string;
54
+ 'editor.selectionHighlightBackground': string;
55
+ 'editor.stackFrameHighlightBackground': string;
56
+ 'editor.wordHighlightBackground': string;
57
+ 'editor.wordHighlightBorder': string;
58
+ 'editor.wordHighlightStrongBackground': string;
59
+ 'editor.wordHighlightStrongBorder': string;
60
+ 'editorBracketHighlight.foreground1': string;
61
+ 'editorBracketHighlight.foreground2': string;
62
+ 'editorBracketHighlight.foreground3': string;
63
+ 'editorBracketHighlight.foreground4': string;
64
+ 'editorBracketHighlight.foreground5': string;
65
+ 'editorBracketHighlight.foreground6': string;
66
+ 'editorBracketHighlight.unexpectedBracket.foreground': string;
67
+ 'editorBracketMatch.background': string;
68
+ 'editorBracketMatch.border': string;
69
+ 'editorCursor.foreground': string;
70
+ 'editorGroup.border': string;
71
+ 'editorGroupHeader.tabsBackground': string;
72
+ 'editorGroupHeader.tabsBorder': string;
73
+ 'editorGutter.addedBackground': string;
74
+ 'editorGutter.deletedBackground': string;
75
+ 'editorGutter.modifiedBackground': string;
76
+ 'editorIndentGuide.activeBackground': string;
77
+ 'editorIndentGuide.background': string;
78
+ 'editorInlayHint.background': string;
79
+ 'editorInlayHint.foreground': string;
80
+ 'editorInlayHint.paramBackground': string;
81
+ 'editorInlayHint.paramForeground': string;
82
+ 'editorInlayHint.typeBackground': string;
83
+ 'editorInlayHint.typeForeground': string;
84
+ 'editorLineNumber.activeForeground': string;
85
+ 'editorLineNumber.foreground': string;
86
+ 'editorOverviewRuler.border': string;
87
+ 'editorWhitespace.foreground': string;
88
+ 'editorWidget.background': string;
89
+ errorForeground: string;
90
+ focusBorder: string;
91
+ foreground: string;
92
+ 'gitDecoration.addedResourceForeground': string;
93
+ 'gitDecoration.conflictingResourceForeground': string;
94
+ 'gitDecoration.deletedResourceForeground': string;
95
+ 'gitDecoration.ignoredResourceForeground': string;
96
+ 'gitDecoration.modifiedResourceForeground': string;
97
+ 'gitDecoration.submoduleResourceForeground': string;
98
+ 'gitDecoration.untrackedResourceForeground': string;
99
+ 'icon.foreground': string;
100
+ 'input.background': string;
101
+ 'input.border': string;
102
+ 'input.foreground': string;
103
+ 'input.placeholderForeground': string;
104
+ 'keybindingLabel.foreground': string;
105
+ 'list.activeSelectionBackground': string;
106
+ 'list.activeSelectionForeground': string;
107
+ 'list.focusBackground': string;
108
+ 'list.focusForeground': string;
109
+ 'list.highlightForeground': string;
110
+ 'list.hoverBackground': string;
111
+ 'list.hoverForeground': string;
112
+ 'list.inactiveFocusBackground': string;
113
+ 'list.inactiveSelectionBackground': string;
114
+ 'list.inactiveSelectionForeground': string;
115
+ 'minimapSlider.activeBackground': string;
116
+ 'minimapSlider.background': string;
117
+ 'minimapSlider.hoverBackground': string;
118
+ 'notificationCenterHeader.background': string;
119
+ 'notificationCenterHeader.foreground': string;
120
+ 'notifications.background': string;
121
+ 'notifications.border': string;
122
+ 'notifications.foreground': string;
123
+ 'notificationsErrorIcon.foreground': string;
124
+ 'notificationsInfoIcon.foreground': string;
125
+ 'notificationsWarningIcon.foreground': string;
126
+ 'panel.background': string;
127
+ 'panel.border': string;
128
+ 'panelInput.border': string;
129
+ 'panelTitle.activeBorder': string;
130
+ 'panelTitle.activeForeground': string;
131
+ 'panelTitle.inactiveForeground': string;
132
+ 'pickerGroup.border': string;
133
+ 'pickerGroup.foreground': string;
134
+ 'progressBar.background': string;
135
+ 'quickInput.background': string;
136
+ 'quickInput.foreground': string;
137
+ 'scrollbar.shadow': string;
138
+ 'scrollbarSlider.activeBackground': string;
139
+ 'scrollbarSlider.background': string;
140
+ 'scrollbarSlider.hoverBackground': string;
141
+ 'settings.headerForeground': string;
142
+ 'settings.modifiedItemIndicator': string;
143
+ 'sideBar.background': string;
144
+ 'sideBar.border': string;
145
+ 'sideBar.foreground': string;
146
+ 'sideBarSectionHeader.background': string;
147
+ 'sideBarSectionHeader.border': string;
148
+ 'sideBarSectionHeader.foreground': string;
149
+ 'sideBarTitle.foreground': string;
150
+ 'statusBar.background': string;
151
+ 'statusBar.border': string;
152
+ 'statusBar.debuggingBackground': string;
153
+ 'statusBar.debuggingForeground': string;
154
+ 'statusBar.focusBorder': string;
155
+ 'statusBar.foreground': string;
156
+ 'statusBar.noFolderBackground': string;
157
+ 'statusBarItem.activeBackground': string;
158
+ 'statusBarItem.focusBorder': string;
159
+ 'statusBarItem.hoverBackground': string;
160
+ 'statusBarItem.prominentBackground': string;
161
+ 'statusBarItem.remoteBackground': string;
162
+ 'statusBarItem.remoteForeground': string;
163
+ 'symbolIcon.arrayForeground': string;
164
+ 'symbolIcon.booleanForeground': string;
165
+ 'symbolIcon.classForeground': string;
166
+ 'symbolIcon.colorForeground': string;
167
+ 'symbolIcon.constantForeground': string;
168
+ 'symbolIcon.constructorForeground': string;
169
+ 'symbolIcon.enumeratorForeground': string;
170
+ 'symbolIcon.enumeratorMemberForeground': string;
171
+ 'symbolIcon.eventForeground': string;
172
+ 'symbolIcon.fieldForeground': string;
173
+ 'symbolIcon.fileForeground': string;
174
+ 'symbolIcon.folderForeground': string;
175
+ 'symbolIcon.functionForeground': string;
176
+ 'symbolIcon.interfaceForeground': string;
177
+ 'symbolIcon.keyForeground': string;
178
+ 'symbolIcon.keywordForeground': string;
179
+ 'symbolIcon.methodForeground': string;
180
+ 'symbolIcon.moduleForeground': string;
181
+ 'symbolIcon.namespaceForeground': string;
182
+ 'symbolIcon.nullForeground': string;
183
+ 'symbolIcon.numberForeground': string;
184
+ 'symbolIcon.objectForeground': string;
185
+ 'symbolIcon.operatorForeground': string;
186
+ 'symbolIcon.packageForeground': string;
187
+ 'symbolIcon.propertyForeground': string;
188
+ 'symbolIcon.referenceForeground': string;
189
+ 'symbolIcon.snippetForeground': string;
190
+ 'symbolIcon.stringForeground': string;
191
+ 'symbolIcon.structForeground': string;
192
+ 'symbolIcon.textForeground': string;
193
+ 'symbolIcon.typeParameterForeground': string;
194
+ 'symbolIcon.unitForeground': string;
195
+ 'symbolIcon.variableForeground': string;
196
+ 'tab.activeBackground': string;
197
+ 'tab.activeBorder': string;
198
+ 'tab.activeBorderTop': string;
199
+ 'tab.activeForeground': string;
200
+ 'tab.border': string;
201
+ 'tab.hoverBackground': string;
202
+ 'tab.inactiveBackground': string;
203
+ 'tab.inactiveForeground': string;
204
+ 'tab.unfocusedActiveBorder': string;
205
+ 'tab.unfocusedActiveBorderTop': string;
206
+ 'tab.unfocusedHoverBackground': string;
207
+ 'terminal.ansiBlack': string;
208
+ 'terminal.ansiBlue': string;
209
+ 'terminal.ansiBrightBlack': string;
210
+ 'terminal.ansiBrightBlue': string;
211
+ 'terminal.ansiBrightCyan': string;
212
+ 'terminal.ansiBrightGreen': string;
213
+ 'terminal.ansiBrightMagenta': string;
214
+ 'terminal.ansiBrightRed': string;
215
+ 'terminal.ansiBrightWhite': string;
216
+ 'terminal.ansiBrightYellow': string;
217
+ 'terminal.ansiCyan': string;
218
+ 'terminal.ansiGreen': string;
219
+ 'terminal.ansiMagenta': string;
220
+ 'terminal.ansiRed': string;
221
+ 'terminal.ansiWhite': string;
222
+ 'terminal.ansiYellow': string;
223
+ 'terminal.foreground': string;
224
+ 'textBlockQuote.background': string;
225
+ 'textBlockQuote.border': string;
226
+ 'textCodeBlock.background': string;
227
+ 'textLink.activeForeground': string;
228
+ 'textLink.foreground': string;
229
+ 'textPreformat.foreground': string;
230
+ 'textSeparator.foreground': string;
231
+ 'titleBar.activeBackground': string;
232
+ 'titleBar.activeForeground': string;
233
+ 'titleBar.border': string;
234
+ 'titleBar.inactiveBackground': string;
235
+ 'titleBar.inactiveForeground': string;
236
+ 'tree.indentGuidesStroke': string;
237
+ 'welcomePage.buttonBackground': string;
238
+ 'welcomePage.buttonHoverBackground': string;
239
+ };
240
+ displayName: string;
241
+ semanticHighlighting: boolean;
242
+ tokenColors: ({
243
+ scope: string[];
244
+ settings: {
245
+ foreground: string;
246
+ fontStyle?: undefined;
247
+ background?: undefined;
248
+ content?: undefined;
249
+ };
250
+ } | {
251
+ scope: string;
252
+ settings: {
253
+ foreground: string;
254
+ fontStyle?: undefined;
255
+ background?: undefined;
256
+ content?: undefined;
257
+ };
258
+ } | {
259
+ scope: string;
260
+ settings: {
261
+ fontStyle: string;
262
+ foreground: string;
263
+ background?: undefined;
264
+ content?: undefined;
265
+ };
266
+ } | {
267
+ scope: string;
268
+ settings: {
269
+ background: string;
270
+ content: string;
271
+ fontStyle: string;
272
+ foreground: string;
273
+ };
274
+ } | {
275
+ scope: string[];
276
+ settings: {
277
+ fontStyle: string;
278
+ foreground: string;
279
+ background?: undefined;
280
+ content?: undefined;
281
+ };
282
+ } | {
283
+ scope: string[];
284
+ settings: {
285
+ fontStyle: string;
286
+ foreground?: undefined;
287
+ background?: undefined;
288
+ content?: undefined;
289
+ };
290
+ } | {
291
+ scope: string[];
292
+ settings: {
293
+ background: string;
294
+ foreground: string;
295
+ fontStyle?: undefined;
296
+ content?: undefined;
297
+ };
298
+ })[];
299
+ type: string;
300
+ };
301
+ export declare const dark: {
302
+ type: string;
303
+ colors: {
304
+ 'dropdown.background': string;
305
+ 'list.activeSelectionBackground': string;
306
+ 'quickInputList.focusBackground': string;
307
+ 'list.inactiveSelectionBackground': string;
308
+ 'list.hoverBackground': string;
309
+ 'list.highlightForeground': string;
310
+ 'button.background': string;
311
+ 'editor.background': string;
312
+ 'editor.foreground': string;
313
+ 'editor.selectionBackground': string;
314
+ 'minimap.selectionHighlight': string;
315
+ 'editor.selectionHighlightBackground': string;
316
+ 'editor.lineHighlightBackground': string;
317
+ 'editorLineNumber.activeForeground': string;
318
+ 'editor.wordHighlightBackground': string;
319
+ 'editor.wordHighlightStrongBackground': string;
320
+ 'editorCursor.foreground': string;
321
+ 'editorWhitespace.foreground': string;
322
+ 'editorIndentGuide.background': string;
323
+ 'editorIndentGuide.activeBackground': string;
324
+ 'editorGroupHeader.tabsBackground': string;
325
+ 'tab.inactiveBackground': string;
326
+ 'tab.border': string;
327
+ 'tab.inactiveForeground': string;
328
+ 'tab.lastPinnedBorder': string;
329
+ 'peekView.border': string;
330
+ 'panelTitle.activeForeground': string;
331
+ 'statusBar.background': string;
332
+ 'statusBar.debuggingBackground': string;
333
+ 'statusBar.noFolderBackground': string;
334
+ 'titleBar.activeBackground': string;
335
+ 'statusBarItem.remoteBackground': string;
336
+ 'ports.iconRunningProcessForeground': string;
337
+ 'activityBar.background': string;
338
+ 'activityBar.foreground': string;
339
+ 'activityBarBadge.background': string;
340
+ 'sideBar.background': string;
341
+ 'sideBarSectionHeader.background': string;
342
+ 'menu.background': string;
343
+ 'menu.foreground': string;
344
+ 'pickerGroup.foreground': string;
345
+ 'inputOption.activeBorder': string;
346
+ focusBorder: string;
347
+ 'terminal.ansiBlack': string;
348
+ 'terminal.ansiRed': string;
349
+ 'terminal.ansiGreen': string;
350
+ 'terminal.ansiYellow': string;
351
+ 'terminal.ansiBlue': string;
352
+ 'terminal.ansiMagenta': string;
353
+ 'terminal.ansiCyan': string;
354
+ 'terminal.ansiWhite': string;
355
+ 'terminal.ansiBrightBlack': string;
356
+ 'terminal.ansiBrightRed': string;
357
+ 'terminal.ansiBrightGreen': string;
358
+ 'terminal.ansiBrightYellow': string;
359
+ 'terminal.ansiBrightBlue': string;
360
+ 'terminal.ansiBrightMagenta': string;
361
+ 'terminal.ansiBrightCyan': string;
362
+ 'terminal.ansiBrightWhite': string;
363
+ 'terminal.inactiveSelectionBackground': string;
364
+ };
365
+ tokenColors: ({
366
+ settings: {
367
+ foreground: string;
368
+ fontStyle?: undefined;
369
+ };
370
+ scope?: undefined;
371
+ name?: undefined;
372
+ } | {
373
+ scope: string[];
374
+ settings: {
375
+ foreground: string;
376
+ fontStyle?: undefined;
377
+ };
378
+ name?: undefined;
379
+ } | {
380
+ name: string;
381
+ scope: string;
382
+ settings: {
383
+ fontStyle: string;
384
+ foreground: string;
385
+ };
386
+ } | {
387
+ name: string;
388
+ scope: string[];
389
+ settings: {
390
+ fontStyle: string;
391
+ foreground: string;
392
+ };
393
+ } | {
394
+ name: string;
395
+ scope: string;
396
+ settings: {
397
+ foreground: string;
398
+ fontStyle?: undefined;
399
+ };
400
+ } | {
401
+ name: string;
402
+ scope: string[];
403
+ settings: {
404
+ foreground: string;
405
+ fontStyle?: undefined;
406
+ };
407
+ } | {
408
+ name: string;
409
+ scope: string;
410
+ settings: {
411
+ fontStyle: string;
412
+ foreground?: undefined;
413
+ };
414
+ } | {
415
+ scope: string;
416
+ settings: {
417
+ fontStyle: string;
418
+ foreground?: undefined;
419
+ };
420
+ name?: undefined;
421
+ } | {
422
+ scope: string;
423
+ settings: {
424
+ foreground: string;
425
+ fontStyle?: undefined;
426
+ };
427
+ name?: undefined;
428
+ })[];
429
+ semanticHighlighting: boolean;
430
+ };
@@ -0,0 +1,34 @@
1
+ import { BoxProps, ElementProps, Factory, StylesApiProps } from '@mantine/core';
2
+ import { CodeHighlightSettings, CodeHighlightStylesNames } from '../CodeHighlight/CodeHighlight';
3
+ /** Available shiki languages for default Mantine shiki instance.
4
+ * Should be used only with *.mantine.dev projects */
5
+ export type CodeHighlightDefaultLanguage = 'tsx' | 'scss' | 'html' | 'bash' | 'json';
6
+ export interface CodeHighlightTabsCode {
7
+ language?: CodeHighlightDefaultLanguage | (string & {});
8
+ code: string;
9
+ fileName?: string;
10
+ icon?: React.ReactNode;
11
+ }
12
+ export type CodeHighlightTabsStylesNames = 'root' | 'files' | 'file' | 'fileIcon' | 'filesScrollarea' | CodeHighlightStylesNames;
13
+ export interface CodeHighlightTabsProps extends CodeHighlightSettings, BoxProps, StylesApiProps<CodeHighlightTabsFactory>, ElementProps<'div'> {
14
+ /** Code to highlight with meta data (file name and icon) */
15
+ code: CodeHighlightTabsCode[];
16
+ /** Function that returns icon based on file name */
17
+ getFileIcon?: (fileName: string) => React.ReactNode;
18
+ /** Default active tab index */
19
+ defaultActiveTab?: number;
20
+ /** Index of controlled active tab state */
21
+ activeTab?: number;
22
+ /** Called when tab changes */
23
+ onTabChange?: (tab: number) => void;
24
+ }
25
+ export type CodeHighlightTabsFactory = Factory<{
26
+ props: CodeHighlightTabsProps;
27
+ ref: HTMLDivElement;
28
+ stylesNames: CodeHighlightTabsStylesNames;
29
+ }>;
30
+ export declare const CodeHighlightTabs: import("@mantine/core").MantineComponent<{
31
+ props: CodeHighlightTabsProps;
32
+ ref: HTMLDivElement;
33
+ stylesNames: CodeHighlightTabsStylesNames;
34
+ }>;
@@ -0,0 +1,9 @@
1
+ interface FileIconProps {
2
+ fileName: string | undefined;
3
+ getFileIcon?: ((fileName: string) => React.ReactNode) | undefined;
4
+ fileIcon: React.ReactNode | undefined;
5
+ className?: string;
6
+ style?: React.CSSProperties;
7
+ }
8
+ export declare function FileIcon({ fileIcon, fileName, getFileIcon, className, style }: FileIconProps): import("react/jsx-runtime").JSX.Element | null;
9
+ export {};
package/lib/index.d.mts CHANGED
@@ -1,6 +1,12 @@
1
- export { CodeHighlightTabs } from './CodeHighlightTabs';
2
- export { CodeHighlight } from './CodeHighlight';
3
- export { InlineCodeHighlight } from './InlineCodeHighlight';
4
- export type { CodeHighlightTabsFactory, CodeHighlightTabsStylesNames, CodeHighlightTabsProps, CodeHighlightTabsCode, CodeHighlightTabsCssVariables, } from './CodeHighlightTabs';
5
- export type { CodeHighlightFactory, CodeHighlightProps, CodeHighlightStylesNames, } from './CodeHighlight';
6
- export type { InlineCodeHighlightFactory, InlineCodeHighlightProps, InlineCodeHighlightStylesNames, } from './InlineCodeHighlight';
1
+ export { CodeHighlight } from './CodeHighlight/CodeHighlight';
2
+ export { InlineCodeHighlight } from './CodeHighlight/InlineCodeHighlight';
3
+ export { CodeHighlightTabs } from './CodeHighlightTabs/CodeHighlightTabs';
4
+ export { CodeHighlightControl } from './CodeHighlight/CodeHighlightControl/CodeHighlightControl';
5
+ export { CodeHighlightAdapterProvider, useHighlight, } from './CodeHighlightProvider/CodeHighlightProvider';
6
+ export { createHighlightJsAdapter } from './CodeHighlightProvider/adapters/highlight-js-adapter';
7
+ export { createShikiAdapter, stripShikiCodeBlocks, } from './CodeHighlightProvider/adapters/shiki-adapter';
8
+ export { plainTextAdapter } from './CodeHighlightProvider/adapters/plain-text-adapter';
9
+ export type { CodeHighlightFactory, CodeHighlightCssVariables, CodeHighlightProps, CodeHighlightStylesNames, } from './CodeHighlight/CodeHighlight';
10
+ export type { CodeHighlightTabsCode, CodeHighlightTabsProps, CodeHighlightTabsStylesNames, CodeHighlightTabsFactory, CodeHighlightDefaultLanguage, } from './CodeHighlightTabs/CodeHighlightTabs';
11
+ export type { InlineCodeHighlightProps, InlineCodeHighlightCssVariables, InlineCodeHighlightFactory, InlineCodeHighlightStylesNames, } from './CodeHighlight/InlineCodeHighlight';
12
+ export type { CodeHighlightControlProps } from './CodeHighlight/CodeHighlightControl/CodeHighlightControl';
package/lib/index.d.ts CHANGED
@@ -1,6 +1,12 @@
1
- export { CodeHighlightTabs } from './CodeHighlightTabs';
2
- export { CodeHighlight } from './CodeHighlight';
3
- export { InlineCodeHighlight } from './InlineCodeHighlight';
4
- export type { CodeHighlightTabsFactory, CodeHighlightTabsStylesNames, CodeHighlightTabsProps, CodeHighlightTabsCode, CodeHighlightTabsCssVariables, } from './CodeHighlightTabs';
5
- export type { CodeHighlightFactory, CodeHighlightProps, CodeHighlightStylesNames, } from './CodeHighlight';
6
- export type { InlineCodeHighlightFactory, InlineCodeHighlightProps, InlineCodeHighlightStylesNames, } from './InlineCodeHighlight';
1
+ export { CodeHighlight } from './CodeHighlight/CodeHighlight';
2
+ export { InlineCodeHighlight } from './CodeHighlight/InlineCodeHighlight';
3
+ export { CodeHighlightTabs } from './CodeHighlightTabs/CodeHighlightTabs';
4
+ export { CodeHighlightControl } from './CodeHighlight/CodeHighlightControl/CodeHighlightControl';
5
+ export { CodeHighlightAdapterProvider, useHighlight, } from './CodeHighlightProvider/CodeHighlightProvider';
6
+ export { createHighlightJsAdapter } from './CodeHighlightProvider/adapters/highlight-js-adapter';
7
+ export { createShikiAdapter, stripShikiCodeBlocks, } from './CodeHighlightProvider/adapters/shiki-adapter';
8
+ export { plainTextAdapter } from './CodeHighlightProvider/adapters/plain-text-adapter';
9
+ export type { CodeHighlightFactory, CodeHighlightCssVariables, CodeHighlightProps, CodeHighlightStylesNames, } from './CodeHighlight/CodeHighlight';
10
+ export type { CodeHighlightTabsCode, CodeHighlightTabsProps, CodeHighlightTabsStylesNames, CodeHighlightTabsFactory, CodeHighlightDefaultLanguage, } from './CodeHighlightTabs/CodeHighlightTabs';
11
+ export type { InlineCodeHighlightProps, InlineCodeHighlightCssVariables, InlineCodeHighlightFactory, InlineCodeHighlightStylesNames, } from './CodeHighlight/InlineCodeHighlight';
12
+ export type { CodeHighlightControlProps } from './CodeHighlight/CodeHighlightControl/CodeHighlightControl';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mantine/code-highlight",
3
- "version": "7.17.1",
3
+ "version": "8.0.0-alpha.1",
4
4
  "description": "Code highlight with Mantine theme",
5
5
  "homepage": "https://mantine.dev/x/code-highlight/",
6
6
  "license": "MIT",
@@ -45,8 +45,8 @@
45
45
  "directory": "packages/@mantine/code-highlight"
46
46
  },
47
47
  "peerDependencies": {
48
- "@mantine/core": "7.17.1",
49
- "@mantine/hooks": "7.17.1",
48
+ "@mantine/core": "8.0.0-alpha.1",
49
+ "@mantine/hooks": "8.0.0-alpha.1",
50
50
  "react": "^18.x || ^19.x",
51
51
  "react-dom": "^18.x || ^19.x"
52
52
  },
@@ -58,7 +58,7 @@
58
58
  "@mantine-tests/core": "workspace:*",
59
59
  "@mantine/core": "workspace:*",
60
60
  "@mantine/hooks": "workspace:*",
61
- "react": "^19.0.0",
61
+ "react": "19.0.0",
62
62
  "react-dom": "19.0.0"
63
63
  }
64
64
  }