shiki 2.3.0 → 2.3.2

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.
@@ -1,634 +0,0 @@
1
- import { CodeToHastOptions, CodeToTokensOptions, TokensResult, RequireKeys, CodeToTokensBaseOptions, ThemedToken, CodeToTokensWithThemesOptions, ThemedTokenWithVariants, BundledHighlighterOptions, HighlighterGeneric, GrammarState, ThemeRegistration, HighlighterCoreOptions, HighlighterCore, Position as Position$1, ShikiInternal, CreateHighlighterFactory, LoadWasmOptions, RegexEngine, CreatedBundledHighlighterOptions, LanguageInput, ThemeInput, TokenStyles, PlainTextLanguage, SpecialLanguage, SpecialTheme, MaybeGetter, ThemeRegistrationAny, ThemeRegistrationResolved, TokenizeWithThemeOptions, MaybeArray, Grammar, CodeToHastRenderOptions, ShikiTransformerContextSource, ShikiTransformer, ShikiTransformerContextCommon } from '@shikijs/types';
2
- import { JavaScriptRegexEngineOptions } from '@shikijs/engine-javascript';
3
-
4
- // ## Interfaces
5
-
6
- /**
7
- * Info associated with nodes by the ecosystem.
8
- *
9
- * This space is guaranteed to never be specified by unist or specifications
10
- * implementing unist.
11
- * But you can use it in utilities and plugins to store data.
12
- *
13
- * This type can be augmented to register custom data.
14
- * For example:
15
- *
16
- * ```ts
17
- * declare module 'unist' {
18
- * interface Data {
19
- * // `someNode.data.myId` is typed as `number | undefined`
20
- * myId?: number | undefined
21
- * }
22
- * }
23
- * ```
24
- */
25
- interface Data$1 {}
26
-
27
- /**
28
- * One place in a source file.
29
- */
30
- interface Point {
31
- /**
32
- * Line in a source file (1-indexed integer).
33
- */
34
- line: number;
35
-
36
- /**
37
- * Column in a source file (1-indexed integer).
38
- */
39
- column: number;
40
- /**
41
- * Character in a source file (0-indexed integer).
42
- */
43
- offset?: number | undefined;
44
- }
45
-
46
- /**
47
- * Position of a node in a source document.
48
- *
49
- * A position is a range between two points.
50
- */
51
- interface Position {
52
- /**
53
- * Place of the first character of the parsed source region.
54
- */
55
- start: Point;
56
-
57
- /**
58
- * Place of the first character after the parsed source region.
59
- */
60
- end: Point;
61
- }
62
-
63
- /**
64
- * Abstract unist node.
65
- *
66
- * The syntactic unit in unist syntax trees are called nodes.
67
- *
68
- * This interface is supposed to be extended.
69
- * If you can use {@link Literal} or {@link Parent}, you should.
70
- * But for example in markdown, a `thematicBreak` (`***`), is neither literal
71
- * nor parent, but still a node.
72
- */
73
- interface Node$1 {
74
- /**
75
- * Node type.
76
- */
77
- type: string;
78
-
79
- /**
80
- * Info from the ecosystem.
81
- */
82
- data?: Data$1 | undefined;
83
-
84
- /**
85
- * Position of a node in a source document.
86
- *
87
- * Nodes that are generated (not in the original source document) must not
88
- * have a position.
89
- */
90
- position?: Position | undefined;
91
- }
92
-
93
- // ## Interfaces
94
-
95
- /**
96
- * Info associated with hast nodes by the ecosystem.
97
- *
98
- * This space is guaranteed to never be specified by unist or hast.
99
- * But you can use it in utilities and plugins to store data.
100
- *
101
- * This type can be augmented to register custom data.
102
- * For example:
103
- *
104
- * ```ts
105
- * declare module 'hast' {
106
- * interface Data {
107
- * // `someNode.data.myId` is typed as `number | undefined`
108
- * myId?: number | undefined
109
- * }
110
- * }
111
- * ```
112
- */
113
- interface Data extends Data$1 {}
114
-
115
- /**
116
- * Info associated with an element.
117
- */
118
- interface Properties {
119
- [PropertyName: string]: boolean | number | string | null | undefined | Array<string | number>;
120
- }
121
-
122
- // ## Content maps
123
-
124
- /**
125
- * Union of registered hast nodes that can occur in {@link Element}.
126
- *
127
- * To register mote custom hast nodes, add them to {@link ElementContentMap}.
128
- * They will be automatically added here.
129
- */
130
- type ElementContent = ElementContentMap[keyof ElementContentMap];
131
-
132
- /**
133
- * Registry of all hast nodes that can occur as children of {@link Element}.
134
- *
135
- * For a union of all {@link Element} children, see {@link ElementContent}.
136
- */
137
- interface ElementContentMap {
138
- comment: Comment;
139
- element: Element;
140
- text: Text;
141
- }
142
-
143
- /**
144
- * Union of registered hast nodes that can occur in {@link Root}.
145
- *
146
- * To register custom hast nodes, add them to {@link RootContentMap}.
147
- * They will be automatically added here.
148
- */
149
- type RootContent = RootContentMap[keyof RootContentMap];
150
-
151
- /**
152
- * Registry of all hast nodes that can occur as children of {@link Root}.
153
- *
154
- * > 👉 **Note**: {@link Root} does not need to be an entire document.
155
- * > it can also be a fragment.
156
- *
157
- * For a union of all {@link Root} children, see {@link RootContent}.
158
- */
159
- interface RootContentMap {
160
- comment: Comment;
161
- doctype: Doctype;
162
- element: Element;
163
- text: Text;
164
- }
165
-
166
- /**
167
- * Union of registered hast nodes.
168
- *
169
- * To register custom hast nodes, add them to {@link RootContentMap} and other
170
- * places where relevant.
171
- * They will be automatically added here.
172
- */
173
- type Nodes = Root | RootContent;
174
-
175
- // ## Abstract nodes
176
-
177
- /**
178
- * Abstract hast node.
179
- *
180
- * This interface is supposed to be extended.
181
- * If you can use {@link Literal} or {@link Parent}, you should.
182
- * But for example in HTML, a `Doctype` is neither literal nor parent, but
183
- * still a node.
184
- *
185
- * To register custom hast nodes, add them to {@link RootContentMap} and other
186
- * places where relevant (such as {@link ElementContentMap}).
187
- *
188
- * For a union of all registered hast nodes, see {@link Nodes}.
189
- */
190
- interface Node extends Node$1 {
191
- /**
192
- * Info from the ecosystem.
193
- */
194
- data?: Data | undefined;
195
- }
196
-
197
- /**
198
- * Abstract hast node that contains the smallest possible value.
199
- *
200
- * This interface is supposed to be extended if you make custom hast nodes.
201
- *
202
- * For a union of all registered hast literals, see {@link Literals}.
203
- */
204
- interface Literal extends Node {
205
- /**
206
- * Plain-text value.
207
- */
208
- value: string;
209
- }
210
-
211
- /**
212
- * Abstract hast node that contains other hast nodes (*children*).
213
- *
214
- * This interface is supposed to be extended if you make custom hast nodes.
215
- *
216
- * For a union of all registered hast parents, see {@link Parents}.
217
- */
218
- interface Parent extends Node {
219
- /**
220
- * List of children.
221
- */
222
- children: RootContent[];
223
- }
224
-
225
- // ## Concrete nodes
226
-
227
- /**
228
- * HTML comment.
229
- */
230
- interface Comment extends Literal {
231
- /**
232
- * Node type of HTML comments in hast.
233
- */
234
- type: "comment";
235
- /**
236
- * Data associated with the comment.
237
- */
238
- data?: CommentData | undefined;
239
- }
240
-
241
- /**
242
- * Info associated with hast comments by the ecosystem.
243
- */
244
- interface CommentData extends Data {}
245
-
246
- /**
247
- * HTML document type.
248
- */
249
- interface Doctype extends Node$1 {
250
- /**
251
- * Node type of HTML document types in hast.
252
- */
253
- type: "doctype";
254
- /**
255
- * Data associated with the doctype.
256
- */
257
- data?: DoctypeData | undefined;
258
- }
259
-
260
- /**
261
- * Info associated with hast doctypes by the ecosystem.
262
- */
263
- interface DoctypeData extends Data {}
264
-
265
- /**
266
- * HTML element.
267
- */
268
- interface Element extends Parent {
269
- /**
270
- * Node type of elements.
271
- */
272
- type: "element";
273
- /**
274
- * Tag name (such as `'body'`) of the element.
275
- */
276
- tagName: string;
277
- /**
278
- * Info associated with the element.
279
- */
280
- properties: Properties;
281
- /**
282
- * Children of element.
283
- */
284
- children: ElementContent[];
285
- /**
286
- * When the `tagName` field is `'template'`, a `content` field can be
287
- * present.
288
- */
289
- content?: Root | undefined;
290
- /**
291
- * Data associated with the element.
292
- */
293
- data?: ElementData | undefined;
294
- }
295
-
296
- /**
297
- * Info associated with hast elements by the ecosystem.
298
- */
299
- interface ElementData extends Data {}
300
-
301
- /**
302
- * Document fragment or a whole document.
303
- *
304
- * Should be used as the root of a tree and must not be used as a child.
305
- *
306
- * Can also be used as the value for the content field on a `'template'` element.
307
- */
308
- interface Root extends Parent {
309
- /**
310
- * Node type of hast root.
311
- */
312
- type: "root";
313
- /**
314
- * Children of root.
315
- */
316
- children: RootContent[];
317
- /**
318
- * Data associated with the hast root.
319
- */
320
- data?: RootData | undefined;
321
- }
322
-
323
- /**
324
- * Info associated with hast root nodes by the ecosystem.
325
- */
326
- interface RootData extends Data {}
327
-
328
- /**
329
- * HTML character data (plain text).
330
- */
331
- interface Text extends Literal {
332
- /**
333
- * Node type of HTML character data (plain text) in hast.
334
- */
335
- type: "text";
336
- /**
337
- * Data associated with the text.
338
- */
339
- data?: TextData | undefined;
340
- }
341
-
342
- /**
343
- * Info associated with hast texts by the ecosystem.
344
- */
345
- interface TextData extends Data {}
346
-
347
- /**
348
- * Create a `createHighlighter` function with bundled themes, languages, and engine.
349
- *
350
- * @example
351
- * ```ts
352
- * const createHighlighter = createdBundledHighlighter({
353
- * langs: {
354
- * typescript: () => import('@shikijs/langs/typescript'),
355
- * // ...
356
- * },
357
- * themes: {
358
- * nord: () => import('@shikijs/themes/nord'),
359
- * // ...
360
- * },
361
- * engine: () => createOnigurumaEngine(), // or createJavaScriptRegexEngine()
362
- * })
363
- * ```
364
- *
365
- * @param options
366
- */
367
- declare function createdBundledHighlighter<BundledLangs extends string, BundledThemes extends string>(options: CreatedBundledHighlighterOptions<BundledLangs, BundledThemes>): CreateHighlighterFactory<BundledLangs, BundledThemes>;
368
- /**
369
- * Create a `createHighlighter` function with bundled themes and languages.
370
- *
371
- * @deprecated Use `createdBundledHighlighter({ langs, themes, engine })` signature instead.
372
- */
373
- declare function createdBundledHighlighter<BundledLangs extends string, BundledThemes extends string>(bundledLanguages: Record<BundledLangs, LanguageInput>, bundledThemes: Record<BundledThemes, ThemeInput>, loadWasm: HighlighterCoreOptions['loadWasm']): CreateHighlighterFactory<BundledLangs, BundledThemes>;
374
- interface ShorthandsBundle<L extends string, T extends string> {
375
- /**
376
- * Shorthand for `codeToHtml` with auto-loaded theme and language.
377
- * A singleton highlighter it maintained internally.
378
- *
379
- * Differences from `highlighter.codeToHtml()`, this function is async.
380
- */
381
- codeToHtml: (code: string, options: CodeToHastOptions<L, T>) => Promise<string>;
382
- /**
383
- * Shorthand for `codeToHtml` with auto-loaded theme and language.
384
- * A singleton highlighter it maintained internally.
385
- *
386
- * Differences from `highlighter.codeToHtml()`, this function is async.
387
- */
388
- codeToHast: (code: string, options: CodeToHastOptions<L, T>) => Promise<Root>;
389
- /**
390
- * Shorthand for `codeToTokens` with auto-loaded theme and language.
391
- * A singleton highlighter it maintained internally.
392
- *
393
- * Differences from `highlighter.codeToTokens()`, this function is async.
394
- */
395
- codeToTokens: (code: string, options: CodeToTokensOptions<L, T>) => Promise<TokensResult>;
396
- /**
397
- * Shorthand for `codeToTokensBase` with auto-loaded theme and language.
398
- * A singleton highlighter it maintained internally.
399
- *
400
- * Differences from `highlighter.codeToTokensBase()`, this function is async.
401
- */
402
- codeToTokensBase: (code: string, options: RequireKeys<CodeToTokensBaseOptions<L, T>, 'theme' | 'lang'>) => Promise<ThemedToken[][]>;
403
- /**
404
- * Shorthand for `codeToTokensWithThemes` with auto-loaded theme and language.
405
- * A singleton highlighter it maintained internally.
406
- *
407
- * Differences from `highlighter.codeToTokensWithThemes()`, this function is async.
408
- */
409
- codeToTokensWithThemes: (code: string, options: RequireKeys<CodeToTokensWithThemesOptions<L, T>, 'themes' | 'lang'>) => Promise<ThemedTokenWithVariants[][]>;
410
- /**
411
- * Get the singleton highlighter.
412
- */
413
- getSingletonHighlighter: (options?: Partial<BundledHighlighterOptions<L, T>>) => Promise<HighlighterGeneric<L, T>>;
414
- /**
415
- * Shorthand for `getLastGrammarState` with auto-loaded theme and language.
416
- * A singleton highlighter it maintained internally.
417
- */
418
- getLastGrammarState: ((element: ThemedToken[][] | Root) => GrammarState) | ((code: string, options: CodeToTokensBaseOptions<L, T>) => Promise<GrammarState>);
419
- }
420
- declare function makeSingletonHighlighter<L extends string, T extends string>(createHighlighter: CreateHighlighterFactory<L, T>): (options?: Partial<BundledHighlighterOptions<L, T>>) => Promise<HighlighterGeneric<L, T>>;
421
- declare function createSingletonShorthands<L extends string, T extends string>(createHighlighter: CreateHighlighterFactory<L, T>): ShorthandsBundle<L, T>;
422
-
423
- /**
424
- * Create a Shiki core highlighter instance, with no languages or themes bundled.
425
- * Wasm and each language and theme must be loaded manually.
426
- *
427
- * @see http://shiki.style/guide/bundles#fine-grained-bundle
428
- */
429
- declare function createHighlighterCore(options: HighlighterCoreOptions<false>): Promise<HighlighterCore>;
430
- /**
431
- * Create a Shiki core highlighter instance, with no languages or themes bundled.
432
- * Wasm and each language and theme must be loaded manually.
433
- *
434
- * Synchronous version of `createHighlighterCore`, which requires to provide the engine and all themes and languages upfront.
435
- *
436
- * @see http://shiki.style/guide/bundles#fine-grained-bundle
437
- */
438
- declare function createHighlighterCoreSync(options: HighlighterCoreOptions<true>): HighlighterCore;
439
- declare function makeSingletonHighlighterCore(createHighlighter: typeof createHighlighterCore): (options: HighlighterCoreOptions) => Promise<HighlighterCore>;
440
- declare const getSingletonHighlighterCore: (options: HighlighterCoreOptions) => Promise<HighlighterCore>;
441
- /**
442
- * @deprecated Use `createHighlighterCore` or `getSingletonHighlighterCore` instead.
443
- */
444
- declare function getHighlighterCore(options: HighlighterCoreOptions): Promise<HighlighterCore>;
445
-
446
- /**
447
- * Get the minimal shiki context for rendering.
448
- */
449
- declare function createShikiInternal(options: HighlighterCoreOptions): Promise<ShikiInternal>;
450
- /**
451
- * @deprecated Use `createShikiInternal` instead.
452
- */
453
- declare function getShikiInternal(options: HighlighterCoreOptions): Promise<ShikiInternal>;
454
-
455
- /**
456
- * Get the minimal shiki context for rendering.
457
- *
458
- * Synchronous version of `createShikiInternal`, which requires to provide the engine and all themes and languages upfront.
459
- */
460
- declare function createShikiInternalSync(options: HighlighterCoreOptions<true>): ShikiInternal;
461
-
462
- /**
463
- * @deprecated Import `createJavaScriptRegexEngine` from `@shikijs/engine-javascript` or `shiki/engine/javascript` instead.
464
- */
465
- declare function createJavaScriptRegexEngine(options?: JavaScriptRegexEngineOptions): RegexEngine;
466
- /**
467
- * @deprecated Import `defaultJavaScriptRegexConstructor` from `@shikijs/engine-javascript` or `shiki/engine/javascript` instead.
468
- */
469
- declare function defaultJavaScriptRegexConstructor(pattern: string): RegExp;
470
-
471
- /**
472
- * @deprecated Import `createOnigurumaEngine` from `@shikijs/engine-oniguruma` or `shiki/engine/oniguruma` instead.
473
- */
474
- declare function createOnigurumaEngine(options?: LoadWasmOptions | null): Promise<RegexEngine>;
475
- /**
476
- * @deprecated Import `createOnigurumaEngine` from `@shikijs/engine-oniguruma` or `shiki/engine/oniguruma` instead.
477
- */
478
- declare function createWasmOnigEngine(options?: LoadWasmOptions | null): Promise<RegexEngine>;
479
- /**
480
- * @deprecated Import `loadWasm` from `@shikijs/engine-oniguruma` or `shiki/engine/oniguruma` instead.
481
- */
482
- declare function loadWasm(options: LoadWasmOptions): Promise<void>;
483
-
484
- declare function codeToHast(internal: ShikiInternal, code: string, options: CodeToHastOptions, transformerContext?: ShikiTransformerContextCommon): Root;
485
- declare function tokensToHast(tokens: ThemedToken[][], options: CodeToHastRenderOptions, transformerContext: ShikiTransformerContextSource, grammarState?: GrammarState | undefined): Root;
486
-
487
- /**
488
- * Get highlighted code in HTML.
489
- */
490
- declare function codeToHtml(internal: ShikiInternal, code: string, options: CodeToHastOptions): string;
491
-
492
- /**
493
- * High-level code-to-tokens API.
494
- *
495
- * It will use `codeToTokensWithThemes` or `codeToTokensBase` based on the options.
496
- */
497
- declare function codeToTokens(internal: ShikiInternal, code: string, options: CodeToTokensOptions): TokensResult;
498
-
499
- declare function tokenizeAnsiWithTheme(theme: ThemeRegistrationResolved, fileContents: string, options?: TokenizeWithThemeOptions): ThemedToken[][];
500
-
501
- /**
502
- * Code to tokens, with a simple theme.
503
- */
504
- declare function codeToTokensBase(internal: ShikiInternal, code: string, options?: CodeToTokensBaseOptions): ThemedToken[][];
505
- declare function tokenizeWithTheme(code: string, grammar: Grammar, theme: ThemeRegistrationResolved, colorMap: string[], options: TokenizeWithThemeOptions): ThemedToken[][];
506
-
507
- /**
508
- * Get tokens with multiple themes
509
- */
510
- declare function codeToTokensWithThemes(internal: ShikiInternal, code: string, options: CodeToTokensWithThemesOptions): ThemedTokenWithVariants[][];
511
-
512
- /**
513
- * Normalize a textmate theme to shiki theme
514
- */
515
- declare function normalizeTheme(rawTheme: ThemeRegistrationAny): ThemeRegistrationResolved;
516
-
517
- interface CssVariablesThemeOptions {
518
- /**
519
- * Theme name. Need to unique if multiple css variables themes are created
520
- *
521
- * @default 'css-variables'
522
- */
523
- name?: string;
524
- /**
525
- * Prefix for css variables
526
- *
527
- * @default '--shiki-'
528
- */
529
- variablePrefix?: string;
530
- /**
531
- * Default value for css variables, the key is without the prefix
532
- *
533
- * @example `{ 'token-comment': '#888' }` will generate `var(--shiki-token-comment, #888)` for comments
534
- */
535
- variableDefaults?: Record<string, string>;
536
- /**
537
- * Enable font style
538
- *
539
- * @default true
540
- */
541
- fontStyle?: boolean;
542
- }
543
- /**
544
- * A factory function to create a css-variable-based theme
545
- *
546
- * @see https://shiki.style/guide/theme-colors#css-variables-theme
547
- */
548
- declare function createCssVariablesTheme(options?: CssVariablesThemeOptions): ThemeRegistration;
549
-
550
- /**
551
- * A built-in transformer to add decorations to the highlighted code.
552
- */
553
- declare function transformerDecorations(): ShikiTransformer;
554
-
555
- declare function toArray<T>(x: MaybeArray<T>): T[];
556
- /**
557
- * Split a string into lines, each line preserves the line ending.
558
- */
559
- declare function splitLines(code: string, preserveEnding?: boolean): [string, number][];
560
- /**
561
- * Check if the language is plaintext that is ignored by Shiki.
562
- *
563
- * Hard-coded plain text languages: `plaintext`, `txt`, `text`, `plain`.
564
- */
565
- declare function isPlainLang(lang: string | null | undefined): lang is PlainTextLanguage;
566
- /**
567
- * Check if the language is specially handled or bypassed by Shiki.
568
- *
569
- * Hard-coded languages: `ansi` and plaintexts like `plaintext`, `txt`, `text`, `plain`.
570
- */
571
- declare function isSpecialLang(lang: any): lang is SpecialLanguage;
572
- /**
573
- * Check if the theme is specially handled or bypassed by Shiki.
574
- *
575
- * Hard-coded themes: `none`.
576
- */
577
- declare function isNoneTheme(theme: string | ThemeInput | null | undefined): theme is 'none';
578
- /**
579
- * Check if the theme is specially handled or bypassed by Shiki.
580
- *
581
- * Hard-coded themes: `none`.
582
- */
583
- declare function isSpecialTheme(theme: string | ThemeInput | null | undefined): theme is SpecialTheme;
584
- /**
585
- * Utility to append class to a hast node
586
- *
587
- * If the `property.class` is a string, it will be splitted by space and converted to an array.
588
- */
589
- declare function addClassToHast(node: Element, className: string | string[]): Element;
590
- /**
591
- * Split a token into multiple tokens by given offsets.
592
- *
593
- * The offsets are relative to the token, and should be sorted.
594
- */
595
- declare function splitToken<T extends Pick<ThemedToken, 'content' | 'offset'>>(token: T, offsets: number[]): T[];
596
- /**
597
- * Split 2D tokens array by given breakpoints.
598
- */
599
- declare function splitTokens<T extends Pick<ThemedToken, 'content' | 'offset'>>(tokens: T[][], breakpoints: number[] | Set<number>): T[][];
600
- /**
601
- * Normalize a getter to a promise.
602
- */
603
- declare function normalizeGetter<T>(p: MaybeGetter<T>): Promise<T>;
604
- declare function resolveColorReplacements(theme: ThemeRegistrationAny | string, options?: TokenizeWithThemeOptions): Record<string, string | undefined>;
605
- declare function applyColorReplacements(color: string, replacements?: Record<string, string | undefined>): string;
606
- declare function applyColorReplacements(color?: string | undefined, replacements?: Record<string, string | undefined>): string | undefined;
607
- declare function getTokenStyleObject(token: TokenStyles): Record<string, string>;
608
- declare function stringifyTokenStyle(token: string | Record<string, string>): string;
609
- /**
610
- * Creates a converter between index and position in a code block.
611
- *
612
- * Overflow/underflow are unchecked.
613
- */
614
- declare function createPositionConverter(code: string): {
615
- lines: string[];
616
- indexToPos: (index: number) => Position$1;
617
- posToIndex: (line: number, character: number) => number;
618
- };
619
-
620
- type DeprecationTarget = 3;
621
- /**
622
- * Enable runtime warning for deprecated APIs, for the future versions of Shiki.
623
- *
624
- * You can pass a major version to only warn for deprecations that will be removed in that version.
625
- *
626
- * By default, deprecation warning is set to 3 since Shiki v2.0.0
627
- */
628
- declare function enableDeprecationWarnings(emitDeprecation?: DeprecationTarget | boolean, emitError?: boolean): void;
629
- /**
630
- * @internal
631
- */
632
- declare function warnDeprecated(message: string, version?: DeprecationTarget): void;
633
-
634
- export { splitToken as A, splitTokens as B, type CssVariablesThemeOptions as C, stringifyTokenStyle as D, toArray as E, tokenizeAnsiWithTheme as F, tokenizeWithTheme as G, tokensToHast as H, transformerDecorations as I, warnDeprecated as J, createJavaScriptRegexEngine as K, createOnigurumaEngine as L, defaultJavaScriptRegexConstructor as M, loadWasm as N, type RootContent as O, type Nodes as P, codeToHast as Q, type Root as R, type ShorthandsBundle as S, codeToHtml as T, codeToTokens as U, codeToTokensBase as V, codeToTokensWithThemes as W, addClassToHast as a, applyColorReplacements as b, createCssVariablesTheme as c, createHighlighterCore as d, createHighlighterCoreSync as e, createPositionConverter as f, createShikiInternal as g, createShikiInternalSync as h, createSingletonShorthands as i, createWasmOnigEngine as j, createdBundledHighlighter as k, enableDeprecationWarnings as l, getHighlighterCore as m, getShikiInternal as n, getSingletonHighlighterCore as o, getTokenStyleObject as p, isNoneTheme as q, isPlainLang as r, isSpecialLang as s, isSpecialTheme as t, makeSingletonHighlighter as u, makeSingletonHighlighterCore as v, normalizeGetter as w, normalizeTheme as x, resolveColorReplacements as y, splitLines as z };