shiki 2.4.1 → 2.4.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.
- package/dist/core-unwasm.d.mts +25 -20
- package/dist/core.d.mts +1 -1
- package/dist/engine-javascript.d.mts +88 -1
- package/dist/engine-oniguruma.d.mts +1 -87
- package/dist/index.d.mts +74 -1
- package/package.json +7 -7
package/dist/core-unwasm.d.mts
CHANGED
|
@@ -474,11 +474,15 @@ declare function createCssVariablesTheme(options?: CssVariablesThemeOptions): Th
|
|
|
474
474
|
*/
|
|
475
475
|
declare function transformerDecorations(): ShikiTransformer;
|
|
476
476
|
|
|
477
|
+
declare function resolveColorReplacements(theme: ThemeRegistrationAny | string, options?: TokenizeWithThemeOptions): Record<string, string | undefined>;
|
|
478
|
+
declare function applyColorReplacements(color: string, replacements?: Record<string, string | undefined>): string;
|
|
479
|
+
declare function applyColorReplacements(color?: string | undefined, replacements?: Record<string, string | undefined>): string | undefined;
|
|
480
|
+
|
|
477
481
|
declare function toArray<T>(x: MaybeArray<T>): T[];
|
|
478
482
|
/**
|
|
479
|
-
*
|
|
483
|
+
* Normalize a getter to a promise.
|
|
480
484
|
*/
|
|
481
|
-
declare function
|
|
485
|
+
declare function normalizeGetter<T>(p: MaybeGetter<T>): Promise<T>;
|
|
482
486
|
/**
|
|
483
487
|
* Check if the language is plaintext that is ignored by Shiki.
|
|
484
488
|
*
|
|
@@ -503,31 +507,18 @@ declare function isNoneTheme(theme: string | ThemeInput | null | undefined): the
|
|
|
503
507
|
* Hard-coded themes: `none`.
|
|
504
508
|
*/
|
|
505
509
|
declare function isSpecialTheme(theme: string | ThemeInput | null | undefined): theme is SpecialTheme;
|
|
510
|
+
|
|
506
511
|
/**
|
|
507
512
|
* Utility to append class to a hast node
|
|
508
513
|
*
|
|
509
514
|
* If the `property.class` is a string, it will be splitted by space and converted to an array.
|
|
510
515
|
*/
|
|
511
516
|
declare function addClassToHast(node: Element, className: string | string[]): Element;
|
|
517
|
+
|
|
512
518
|
/**
|
|
513
|
-
* Split a
|
|
514
|
-
*
|
|
515
|
-
* The offsets are relative to the token, and should be sorted.
|
|
516
|
-
*/
|
|
517
|
-
declare function splitToken<T extends Pick<ThemedToken, 'content' | 'offset'>>(token: T, offsets: number[]): T[];
|
|
518
|
-
/**
|
|
519
|
-
* Split 2D tokens array by given breakpoints.
|
|
520
|
-
*/
|
|
521
|
-
declare function splitTokens<T extends Pick<ThemedToken, 'content' | 'offset'>>(tokens: T[][], breakpoints: number[] | Set<number>): T[][];
|
|
522
|
-
/**
|
|
523
|
-
* Normalize a getter to a promise.
|
|
519
|
+
* Split a string into lines, each line preserves the line ending.
|
|
524
520
|
*/
|
|
525
|
-
declare function
|
|
526
|
-
declare function resolveColorReplacements(theme: ThemeRegistrationAny | string, options?: TokenizeWithThemeOptions): Record<string, string | undefined>;
|
|
527
|
-
declare function applyColorReplacements(color: string, replacements?: Record<string, string | undefined>): string;
|
|
528
|
-
declare function applyColorReplacements(color?: string | undefined, replacements?: Record<string, string | undefined>): string | undefined;
|
|
529
|
-
declare function getTokenStyleObject(token: TokenStyles): Record<string, string>;
|
|
530
|
-
declare function stringifyTokenStyle(token: string | Record<string, string>): string;
|
|
521
|
+
declare function splitLines(code: string, preserveEnding?: boolean): [string, number][];
|
|
531
522
|
/**
|
|
532
523
|
* Creates a converter between index and position in a code block.
|
|
533
524
|
*
|
|
@@ -545,6 +536,20 @@ declare function createPositionConverter(code: string): {
|
|
|
545
536
|
*/
|
|
546
537
|
declare function guessEmbeddedLanguages(code: string, _lang: string | undefined, highlighter?: HighlighterGeneric<any, any>): string[];
|
|
547
538
|
|
|
539
|
+
/**
|
|
540
|
+
* Split a token into multiple tokens by given offsets.
|
|
541
|
+
*
|
|
542
|
+
* The offsets are relative to the token, and should be sorted.
|
|
543
|
+
*/
|
|
544
|
+
declare function splitToken<T extends Pick<ThemedToken, 'content' | 'offset'>>(token: T, offsets: number[]): T[];
|
|
545
|
+
/**
|
|
546
|
+
* Split 2D tokens array by given breakpoints.
|
|
547
|
+
*/
|
|
548
|
+
declare function splitTokens<T extends Pick<ThemedToken, 'content' | 'offset'>>(tokens: T[][], breakpoints: number[] | Set<number>): T[][];
|
|
549
|
+
declare function flatTokenVariants(merged: ThemedTokenWithVariants, variantsOrder: string[], cssVariablePrefix: string, defaultColor: string | boolean): ThemedToken;
|
|
550
|
+
declare function getTokenStyleObject(token: TokenStyles): Record<string, string>;
|
|
551
|
+
declare function stringifyTokenStyle(token: string | Record<string, string>): string;
|
|
552
|
+
|
|
548
553
|
type DeprecationTarget = 3;
|
|
549
554
|
/**
|
|
550
555
|
* Enable runtime warning for deprecated APIs, for the future versions of Shiki.
|
|
@@ -559,4 +564,4 @@ declare function enableDeprecationWarnings(emitDeprecation?: DeprecationTarget |
|
|
|
559
564
|
*/
|
|
560
565
|
declare function warnDeprecated(message: string, version?: DeprecationTarget): void;
|
|
561
566
|
|
|
562
|
-
export { type CreateSingletonShorthandsOptions, type CssVariablesThemeOptions, FontStyle, type ShorthandsBundle, EncodedTokenMetadata as StackElementMetadata, addClassToHast, applyColorReplacements, codeToHast, codeToHtml, codeToTokens, codeToTokensBase, codeToTokensWithThemes, createCssVariablesTheme, createHighlighterCore, createHighlighterCoreSync, createJavaScriptRegexEngine, createOnigurumaEngine, createPositionConverter, createShikiInternal, createShikiInternalSync, createSingletonShorthands, createWasmOnigEngine, createdBundledHighlighter, defaultJavaScriptRegexConstructor, enableDeprecationWarnings, getHighlighterCore, getShikiInternal, getSingletonHighlighterCore, getTokenStyleObject, guessEmbeddedLanguages, toHtml as hastToHtml, isNoneTheme, isPlainLang, isSpecialLang, isSpecialTheme, loadWasm, makeSingletonHighlighter, makeSingletonHighlighterCore, normalizeGetter, normalizeTheme, resolveColorReplacements, splitLines, splitToken, splitTokens, stringifyTokenStyle, toArray, tokenizeAnsiWithTheme, tokenizeWithTheme, tokensToHast, transformerDecorations, warnDeprecated };
|
|
567
|
+
export { type CreateSingletonShorthandsOptions, type CssVariablesThemeOptions, FontStyle, type ShorthandsBundle, EncodedTokenMetadata as StackElementMetadata, addClassToHast, applyColorReplacements, codeToHast, codeToHtml, codeToTokens, codeToTokensBase, codeToTokensWithThemes, createCssVariablesTheme, createHighlighterCore, createHighlighterCoreSync, createJavaScriptRegexEngine, createOnigurumaEngine, createPositionConverter, createShikiInternal, createShikiInternalSync, createSingletonShorthands, createWasmOnigEngine, createdBundledHighlighter, defaultJavaScriptRegexConstructor, enableDeprecationWarnings, flatTokenVariants, getHighlighterCore, getShikiInternal, getSingletonHighlighterCore, getTokenStyleObject, guessEmbeddedLanguages, toHtml as hastToHtml, isNoneTheme, isPlainLang, isSpecialLang, isSpecialTheme, loadWasm, makeSingletonHighlighter, makeSingletonHighlighterCore, normalizeGetter, normalizeTheme, resolveColorReplacements, splitLines, splitToken, splitTokens, stringifyTokenStyle, toArray, tokenizeAnsiWithTheme, tokenizeWithTheme, tokensToHast, transformerDecorations, warnDeprecated };
|
package/dist/core.d.mts
CHANGED
|
@@ -1 +1,88 @@
|
|
|
1
|
-
|
|
1
|
+
import { PatternScanner, RegexEngineString, RegexEngine } from '@shikijs/types';
|
|
2
|
+
import { IOnigMatch } from '@shikijs/vscode-textmate';
|
|
3
|
+
|
|
4
|
+
type ToRegExpOptions = {
|
|
5
|
+
accuracy?: "default" | "strict";
|
|
6
|
+
avoidSubclass?: boolean;
|
|
7
|
+
flags?: string;
|
|
8
|
+
global?: boolean;
|
|
9
|
+
hasIndices?: boolean;
|
|
10
|
+
lazyCompileLength?: number;
|
|
11
|
+
rules?: {
|
|
12
|
+
allowOrphanBackrefs?: boolean;
|
|
13
|
+
asciiWordBoundaries?: boolean;
|
|
14
|
+
captureGroup?: boolean;
|
|
15
|
+
recursionLimit?: number;
|
|
16
|
+
singleline?: boolean;
|
|
17
|
+
};
|
|
18
|
+
target?: "auto" | "ES2025" | "ES2024" | "ES2018";
|
|
19
|
+
verbose?: boolean;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
interface JavaScriptRegexScannerOptions {
|
|
23
|
+
/**
|
|
24
|
+
* Whether to allow invalid regex patterns.
|
|
25
|
+
*
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
forgiving?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Cache for regex patterns.
|
|
31
|
+
*/
|
|
32
|
+
cache?: Map<string, RegExp | Error> | null;
|
|
33
|
+
/**
|
|
34
|
+
* Custom pattern to RegExp constructor.
|
|
35
|
+
*
|
|
36
|
+
* By default `oniguruma-to-es` is used.
|
|
37
|
+
*/
|
|
38
|
+
regexConstructor?: (pattern: string) => RegExp;
|
|
39
|
+
}
|
|
40
|
+
declare class JavaScriptScanner implements PatternScanner {
|
|
41
|
+
patterns: (string | RegExp)[];
|
|
42
|
+
options: JavaScriptRegexScannerOptions;
|
|
43
|
+
regexps: (RegExp | null)[];
|
|
44
|
+
constructor(patterns: (string | RegExp)[], options?: JavaScriptRegexScannerOptions);
|
|
45
|
+
findNextMatchSync(string: string | RegexEngineString, startPosition: number, _options: number): IOnigMatch | null;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
interface JavaScriptRegexEngineOptions extends JavaScriptRegexScannerOptions {
|
|
49
|
+
/**
|
|
50
|
+
* The target ECMAScript version.
|
|
51
|
+
*
|
|
52
|
+
* Oniguruma-To-ES uses RegExp features from later versions of ECMAScript to add support for a
|
|
53
|
+
* few more grammars. If using target `ES2024` or later, the RegExp `v` flag is used which
|
|
54
|
+
* requires Node.js 20+ or Chrome 112+.
|
|
55
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/unicodeSets
|
|
56
|
+
*
|
|
57
|
+
* For maximum compatibility, you can set it to `ES2018` which uses the RegExp `u` flag.
|
|
58
|
+
*
|
|
59
|
+
* Set to `auto` to automatically detect the latest version supported by the environment.
|
|
60
|
+
*
|
|
61
|
+
* @default 'auto'
|
|
62
|
+
*/
|
|
63
|
+
target?: 'auto' | 'ES2025' | 'ES2024' | 'ES2018';
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* The default regex constructor for the JavaScript RegExp engine.
|
|
67
|
+
*/
|
|
68
|
+
declare function defaultJavaScriptRegexConstructor(pattern: string, options?: ToRegExpOptions): RegExp;
|
|
69
|
+
/**
|
|
70
|
+
* Use the modern JavaScript RegExp engine to implement the OnigScanner.
|
|
71
|
+
*
|
|
72
|
+
* As Oniguruma supports some features that can't be emulated using native JavaScript regexes, some
|
|
73
|
+
* patterns are not supported. Errors will be thrown when parsing TextMate grammars with
|
|
74
|
+
* unsupported patterns, and when the grammar includes patterns that use invalid Oniguruma syntax.
|
|
75
|
+
* Set `forgiving` to `true` to ignore these errors and skip any unsupported or invalid patterns.
|
|
76
|
+
*/
|
|
77
|
+
declare function createJavaScriptRegexEngine(options?: JavaScriptRegexEngineOptions): RegexEngine;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Raw JavaScript regex engine that only supports precompiled grammars.
|
|
81
|
+
*
|
|
82
|
+
* This further simplifies the engine by excluding the regex compilation step.
|
|
83
|
+
*
|
|
84
|
+
* Zero dependencies.
|
|
85
|
+
*/
|
|
86
|
+
declare function createJavaScriptRawEngine(): RegexEngine;
|
|
87
|
+
|
|
88
|
+
export { type JavaScriptRegexEngineOptions, type JavaScriptRegexScannerOptions, JavaScriptScanner, createJavaScriptRawEngine, createJavaScriptRegexEngine, defaultJavaScriptRegexConstructor };
|
|
@@ -1,87 +1 @@
|
|
|
1
|
-
|
|
2
|
-
start: number;
|
|
3
|
-
end: number;
|
|
4
|
-
length: number;
|
|
5
|
-
}
|
|
6
|
-
interface IOnigMatch {
|
|
7
|
-
index: number;
|
|
8
|
-
captureIndices: IOnigCaptureIndex[];
|
|
9
|
-
}
|
|
10
|
-
declare const enum FindOption {
|
|
11
|
-
None = 0,
|
|
12
|
-
/**
|
|
13
|
-
* equivalent of ONIG_OPTION_NOT_BEGIN_STRING: (str) isn't considered as begin of string (* fail \A)
|
|
14
|
-
*/
|
|
15
|
-
NotBeginString = 1,
|
|
16
|
-
/**
|
|
17
|
-
* equivalent of ONIG_OPTION_NOT_END_STRING: (end) isn't considered as end of string (* fail \z, \Z)
|
|
18
|
-
*/
|
|
19
|
-
NotEndString = 2,
|
|
20
|
-
/**
|
|
21
|
-
* equivalent of ONIG_OPTION_NOT_BEGIN_POSITION: (start) isn't considered as start position of search (* fail \G)
|
|
22
|
-
*/
|
|
23
|
-
NotBeginPosition = 4,
|
|
24
|
-
/**
|
|
25
|
-
* used for debugging purposes.
|
|
26
|
-
*/
|
|
27
|
-
DebugCall = 8
|
|
28
|
-
}
|
|
29
|
-
interface OnigScanner {
|
|
30
|
-
findNextMatchSync(string: string | OnigString, startPosition: number, options: OrMask<FindOption>): IOnigMatch | null;
|
|
31
|
-
dispose?(): void;
|
|
32
|
-
}
|
|
33
|
-
interface OnigString {
|
|
34
|
-
readonly content: string;
|
|
35
|
-
dispose?(): void;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* A union of given const enum values.
|
|
40
|
-
*/
|
|
41
|
-
type OrMask<T extends number> = number;
|
|
42
|
-
|
|
43
|
-
type Awaitable<T> = T | Promise<T>;
|
|
44
|
-
|
|
45
|
-
interface PatternScanner extends OnigScanner {
|
|
46
|
-
}
|
|
47
|
-
interface RegexEngineString extends OnigString {
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Engine for RegExp matching and scanning.
|
|
51
|
-
*/
|
|
52
|
-
interface RegexEngine {
|
|
53
|
-
createScanner: (patterns: (string | RegExp)[]) => PatternScanner;
|
|
54
|
-
createString: (s: string) => RegexEngineString;
|
|
55
|
-
}
|
|
56
|
-
interface WebAssemblyInstantiator {
|
|
57
|
-
(importObject: Record<string, Record<string, WebAssembly.ImportValue>> | undefined): Promise<WebAssemblyInstance>;
|
|
58
|
-
}
|
|
59
|
-
type WebAssemblyInstance = WebAssembly.WebAssemblyInstantiatedSource | WebAssembly.Instance | WebAssembly.Instance['exports'];
|
|
60
|
-
type OnigurumaLoadOptions = {
|
|
61
|
-
instantiator: WebAssemblyInstantiator;
|
|
62
|
-
} | {
|
|
63
|
-
default: WebAssemblyInstantiator;
|
|
64
|
-
} | {
|
|
65
|
-
data: ArrayBufferView | ArrayBuffer | Response;
|
|
66
|
-
};
|
|
67
|
-
type LoadWasmOptionsPlain = OnigurumaLoadOptions | WebAssemblyInstantiator | ArrayBufferView | ArrayBuffer | Response;
|
|
68
|
-
type LoadWasmOptions = Awaitable<LoadWasmOptionsPlain> | (() => Awaitable<LoadWasmOptionsPlain>);
|
|
69
|
-
|
|
70
|
-
declare function loadWasm(options: LoadWasmOptions): Promise<void>;
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Set the default wasm loader for `loadWasm`.
|
|
74
|
-
* @internal
|
|
75
|
-
*/
|
|
76
|
-
declare function setDefaultWasmLoader(_loader: LoadWasmOptions): void;
|
|
77
|
-
/**
|
|
78
|
-
* @internal
|
|
79
|
-
*/
|
|
80
|
-
declare function getDefaultWasmLoader(): LoadWasmOptions | undefined;
|
|
81
|
-
declare function createOnigurumaEngine(options?: LoadWasmOptions | null): Promise<RegexEngine>;
|
|
82
|
-
/**
|
|
83
|
-
* @deprecated Use `createOnigurumaEngine` instead.
|
|
84
|
-
*/
|
|
85
|
-
declare function createWasmOnigEngine(options?: LoadWasmOptions | null): Promise<RegexEngine>;
|
|
86
|
-
|
|
87
|
-
export { createOnigurumaEngine, createWasmOnigEngine, getDefaultWasmLoader, loadWasm, setDefaultWasmLoader };
|
|
1
|
+
export * from '@shikijs/engine-oniguruma';
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export { Highlighter, codeToHast, codeToHtml, codeToTokens, codeToTokensBase, codeToTokensWithThemes, createHighlighter, getHighlighter, getLastGrammarState, getSingletonHighlighter } from './bundle-full.mjs';
|
|
2
2
|
export { BuiltinLanguage, BuiltinTheme } from './types.mjs';
|
|
3
3
|
export { createJavaScriptRegexEngine, defaultJavaScriptRegexConstructor } from '@shikijs/engine-javascript';
|
|
4
|
-
export { createOnigurumaEngine, loadWasm } from './engine-oniguruma.mjs';
|
|
5
4
|
export { g as getWasmInlined } from './types/wasm-dynamic.mjs';
|
|
6
5
|
export * from '@shikijs/core';
|
|
7
6
|
export { BundledLanguage, bundledLanguages, bundledLanguagesAlias, bundledLanguagesBase, bundledLanguagesInfo } from './langs.mjs';
|
|
@@ -9,3 +8,77 @@ export { BundledTheme, bundledThemes, bundledThemesInfo } from './themes.mjs';
|
|
|
9
8
|
import './types/index.d.mjs';
|
|
10
9
|
import '@shikijs/types';
|
|
11
10
|
import '@shikijs/core/types';
|
|
11
|
+
|
|
12
|
+
interface IOnigCaptureIndex {
|
|
13
|
+
start: number;
|
|
14
|
+
end: number;
|
|
15
|
+
length: number;
|
|
16
|
+
}
|
|
17
|
+
interface IOnigMatch {
|
|
18
|
+
index: number;
|
|
19
|
+
captureIndices: IOnigCaptureIndex[];
|
|
20
|
+
}
|
|
21
|
+
declare const enum FindOption {
|
|
22
|
+
None = 0,
|
|
23
|
+
/**
|
|
24
|
+
* equivalent of ONIG_OPTION_NOT_BEGIN_STRING: (str) isn't considered as begin of string (* fail \A)
|
|
25
|
+
*/
|
|
26
|
+
NotBeginString = 1,
|
|
27
|
+
/**
|
|
28
|
+
* equivalent of ONIG_OPTION_NOT_END_STRING: (end) isn't considered as end of string (* fail \z, \Z)
|
|
29
|
+
*/
|
|
30
|
+
NotEndString = 2,
|
|
31
|
+
/**
|
|
32
|
+
* equivalent of ONIG_OPTION_NOT_BEGIN_POSITION: (start) isn't considered as start position of search (* fail \G)
|
|
33
|
+
*/
|
|
34
|
+
NotBeginPosition = 4,
|
|
35
|
+
/**
|
|
36
|
+
* used for debugging purposes.
|
|
37
|
+
*/
|
|
38
|
+
DebugCall = 8
|
|
39
|
+
}
|
|
40
|
+
interface OnigScanner {
|
|
41
|
+
findNextMatchSync(string: string | OnigString, startPosition: number, options: OrMask<FindOption>): IOnigMatch | null;
|
|
42
|
+
dispose?(): void;
|
|
43
|
+
}
|
|
44
|
+
interface OnigString {
|
|
45
|
+
readonly content: string;
|
|
46
|
+
dispose?(): void;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* A union of given const enum values.
|
|
51
|
+
*/
|
|
52
|
+
type OrMask<T extends number> = number;
|
|
53
|
+
|
|
54
|
+
type Awaitable<T> = T | Promise<T>;
|
|
55
|
+
|
|
56
|
+
interface PatternScanner extends OnigScanner {
|
|
57
|
+
}
|
|
58
|
+
interface RegexEngineString extends OnigString {
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Engine for RegExp matching and scanning.
|
|
62
|
+
*/
|
|
63
|
+
interface RegexEngine {
|
|
64
|
+
createScanner: (patterns: (string | RegExp)[]) => PatternScanner;
|
|
65
|
+
createString: (s: string) => RegexEngineString;
|
|
66
|
+
}
|
|
67
|
+
interface WebAssemblyInstantiator {
|
|
68
|
+
(importObject: Record<string, Record<string, WebAssembly.ImportValue>> | undefined): Promise<WebAssemblyInstance>;
|
|
69
|
+
}
|
|
70
|
+
type WebAssemblyInstance = WebAssembly.WebAssemblyInstantiatedSource | WebAssembly.Instance | WebAssembly.Instance['exports'];
|
|
71
|
+
type OnigurumaLoadOptions = {
|
|
72
|
+
instantiator: WebAssemblyInstantiator;
|
|
73
|
+
} | {
|
|
74
|
+
default: WebAssemblyInstantiator;
|
|
75
|
+
} | {
|
|
76
|
+
data: ArrayBufferView | ArrayBuffer | Response;
|
|
77
|
+
};
|
|
78
|
+
type LoadWasmOptionsPlain = OnigurumaLoadOptions | WebAssemblyInstantiator | ArrayBufferView | ArrayBuffer | Response;
|
|
79
|
+
type LoadWasmOptions = Awaitable<LoadWasmOptionsPlain> | (() => Awaitable<LoadWasmOptionsPlain>);
|
|
80
|
+
|
|
81
|
+
declare function loadWasm(options: LoadWasmOptions): Promise<void>;
|
|
82
|
+
declare function createOnigurumaEngine(options?: LoadWasmOptions | null): Promise<RegexEngine>;
|
|
83
|
+
|
|
84
|
+
export { createOnigurumaEngine, loadWasm };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shiki",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.4.
|
|
4
|
+
"version": "2.4.2",
|
|
5
5
|
"description": "A beautiful Syntax Highlighter.",
|
|
6
6
|
"author": "Pine Wu <octref@gmail.com>; Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -119,12 +119,12 @@
|
|
|
119
119
|
"dependencies": {
|
|
120
120
|
"@shikijs/vscode-textmate": "^10.0.2",
|
|
121
121
|
"@types/hast": "^3.0.4",
|
|
122
|
-
"@shikijs/
|
|
123
|
-
"@shikijs/
|
|
124
|
-
"@shikijs/engine-oniguruma": "2.4.
|
|
125
|
-
"@shikijs/
|
|
126
|
-
"@shikijs/
|
|
127
|
-
"@shikijs/
|
|
122
|
+
"@shikijs/engine-javascript": "2.4.2",
|
|
123
|
+
"@shikijs/core": "2.4.2",
|
|
124
|
+
"@shikijs/engine-oniguruma": "2.4.2",
|
|
125
|
+
"@shikijs/themes": "2.4.2",
|
|
126
|
+
"@shikijs/langs": "2.4.2",
|
|
127
|
+
"@shikijs/types": "2.4.2"
|
|
128
128
|
},
|
|
129
129
|
"devDependencies": {
|
|
130
130
|
"rollup-plugin-copy": "^3.5.0",
|