@shikijs/core 1.18.0 → 1.19.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.
- package/dist/index.d.mts +22 -10
- package/dist/index.d.ts +22 -10
- package/dist/index.mjs +39 -22
- package/dist/shared/core.afb6276c.mjs +10 -0
- package/dist/wasm-inlined.mjs +3 -0
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { CreatedBundledHighlighterOptions, CreateHighlighterFactory, LanguageInput, ThemeInput, HighlighterCoreOptions, CodeToHastOptions, CodeToTokensOptions, TokensResult, RequireKeys, CodeToTokensBaseOptions, ThemedToken, CodeToTokensWithThemesOptions, ThemedTokenWithVariants, BundledHighlighterOptions, HighlighterGeneric, GrammarState, HighlighterCore, ShikiInternal, LoadWasmOptions, ShikiTransformerContextCommon, CodeToHastRenderOptions, ShikiTransformerContextSource, ThemeRegistrationResolved, TokenizeWithThemeOptions, ThemeRegistrationAny, ShikiTransformer, MaybeArray, PlainTextLanguage, SpecialLanguage, SpecialTheme, MaybeGetter, TokenStyles, Position } from '@shikijs/types';
|
|
1
|
+
import { CreatedBundledHighlighterOptions, CreateHighlighterFactory, LanguageInput, ThemeInput, HighlighterCoreOptions, CodeToHastOptions, CodeToTokensOptions, TokensResult, RequireKeys, CodeToTokensBaseOptions, ThemedToken, CodeToTokensWithThemesOptions, ThemedTokenWithVariants, BundledHighlighterOptions, HighlighterGeneric, GrammarState, HighlighterCore, ShikiInternal, RegexEngine, LoadWasmOptions, ShikiTransformerContextCommon, CodeToHastRenderOptions, ShikiTransformerContextSource, ThemeRegistrationResolved, TokenizeWithThemeOptions, ThemeRegistrationAny, ShikiTransformer, MaybeArray, PlainTextLanguage, SpecialLanguage, SpecialTheme, MaybeGetter, TokenStyles, Position } from '@shikijs/types';
|
|
2
2
|
export * from '@shikijs/types';
|
|
3
3
|
import { Root, Element } from 'hast';
|
|
4
|
-
|
|
4
|
+
import { JavaScriptRegexEngineOptions } from '@shikijs/engine-javascript';
|
|
5
|
+
export { defaultJavaScriptRegexConstructor } from '@shikijs/engine-javascript';
|
|
5
6
|
import { IGrammar } from '@shikijs/vscode-textmate';
|
|
6
7
|
export { FontStyle, EncodedTokenMetadata as StackElementMetadata } from '@shikijs/vscode-textmate';
|
|
7
|
-
export { createWasmOnigEngine, loadWasm } from '@shikijs/engine-oniguruma';
|
|
8
8
|
export { toHtml as hastToHtml } from 'hast-util-to-html';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -122,11 +122,10 @@ declare function getShikiInternal(options?: HighlighterCoreOptions): Promise<Shi
|
|
|
122
122
|
*/
|
|
123
123
|
declare function createShikiInternalSync(options: HighlighterCoreOptions<true>): ShikiInternal;
|
|
124
124
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
declare function setDefaultWasmLoader(_loader: LoadWasmOptions): void;
|
|
125
|
+
declare function createJavaScriptRegexEngine(options?: JavaScriptRegexEngineOptions): RegexEngine;
|
|
126
|
+
|
|
127
|
+
declare function createWasmOnigEngine(options?: LoadWasmOptions | null): Promise<RegexEngine>;
|
|
128
|
+
declare function loadWasm(options: LoadWasmOptions): Promise<void>;
|
|
130
129
|
|
|
131
130
|
declare function codeToHast(internal: ShikiInternal, code: string, options: CodeToHastOptions, transformerContext?: ShikiTransformerContextCommon): Root;
|
|
132
131
|
declare function tokensToHast(tokens: ThemedToken[][], options: CodeToHastRenderOptions, transformerContext: ShikiTransformerContextSource): Root;
|
|
@@ -219,7 +218,7 @@ declare function resolveColorReplacements(theme: ThemeRegistrationAny | string,
|
|
|
219
218
|
declare function applyColorReplacements(color: string, replacements?: Record<string, string | undefined>): string;
|
|
220
219
|
declare function applyColorReplacements(color?: string | undefined, replacements?: Record<string, string | undefined>): string | undefined;
|
|
221
220
|
declare function getTokenStyleObject(token: TokenStyles): Record<string, string>;
|
|
222
|
-
declare function stringifyTokenStyle(token: Record<string, string>): string;
|
|
221
|
+
declare function stringifyTokenStyle(token: string | Record<string, string>): string;
|
|
223
222
|
/**
|
|
224
223
|
* Creates a converter between index and position in a code block.
|
|
225
224
|
*
|
|
@@ -231,4 +230,17 @@ declare function createPositionConverter(code: string): {
|
|
|
231
230
|
posToIndex: (line: number, character: number) => number;
|
|
232
231
|
};
|
|
233
232
|
|
|
234
|
-
|
|
233
|
+
/**
|
|
234
|
+
* Enable runtime warning for deprecated APIs, for the future versions of Shiki.
|
|
235
|
+
*
|
|
236
|
+
* Disabled by default, will be enabled in Shiki v2.
|
|
237
|
+
*
|
|
238
|
+
* @experimental The accuracy of the warning messages is not yet guaranteed.
|
|
239
|
+
*/
|
|
240
|
+
declare function enableDeprecationWarnings(value?: boolean): void;
|
|
241
|
+
/**
|
|
242
|
+
* @internal
|
|
243
|
+
*/
|
|
244
|
+
declare function warnDeprecated(message: string): void;
|
|
245
|
+
|
|
246
|
+
export { type ShorthandsBundle, addClassToHast, applyColorReplacements, codeToHast, codeToHtml, codeToTokens, codeToTokensBase, codeToTokensWithThemes, createHighlighterCore, createHighlighterCoreSync, createJavaScriptRegexEngine, createPositionConverter, createShikiInternal, createShikiInternalSync, createSingletonShorthands, createWasmOnigEngine, createdBundledHighlighter, enableDeprecationWarnings, getHighlighterCore, getShikiInternal, getSingletonHighlighterCore, getTokenStyleObject, isNoneTheme, isPlainLang, isSpecialLang, isSpecialTheme, loadWasm, makeSingletonHighlighter, makeSingletonHighlighterCore, normalizeGetter, normalizeTheme, resolveColorReplacements, splitLines, splitToken, splitTokens, stringifyTokenStyle, toArray, tokenizeAnsiWithTheme, tokenizeWithTheme, tokensToHast, transformerDecorations, warnDeprecated };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { CreatedBundledHighlighterOptions, CreateHighlighterFactory, LanguageInput, ThemeInput, HighlighterCoreOptions, CodeToHastOptions, CodeToTokensOptions, TokensResult, RequireKeys, CodeToTokensBaseOptions, ThemedToken, CodeToTokensWithThemesOptions, ThemedTokenWithVariants, BundledHighlighterOptions, HighlighterGeneric, GrammarState, HighlighterCore, ShikiInternal, LoadWasmOptions, ShikiTransformerContextCommon, CodeToHastRenderOptions, ShikiTransformerContextSource, ThemeRegistrationResolved, TokenizeWithThemeOptions, ThemeRegistrationAny, ShikiTransformer, MaybeArray, PlainTextLanguage, SpecialLanguage, SpecialTheme, MaybeGetter, TokenStyles, Position } from '@shikijs/types';
|
|
1
|
+
import { CreatedBundledHighlighterOptions, CreateHighlighterFactory, LanguageInput, ThemeInput, HighlighterCoreOptions, CodeToHastOptions, CodeToTokensOptions, TokensResult, RequireKeys, CodeToTokensBaseOptions, ThemedToken, CodeToTokensWithThemesOptions, ThemedTokenWithVariants, BundledHighlighterOptions, HighlighterGeneric, GrammarState, HighlighterCore, ShikiInternal, RegexEngine, LoadWasmOptions, ShikiTransformerContextCommon, CodeToHastRenderOptions, ShikiTransformerContextSource, ThemeRegistrationResolved, TokenizeWithThemeOptions, ThemeRegistrationAny, ShikiTransformer, MaybeArray, PlainTextLanguage, SpecialLanguage, SpecialTheme, MaybeGetter, TokenStyles, Position } from '@shikijs/types';
|
|
2
2
|
export * from '@shikijs/types';
|
|
3
3
|
import { Root, Element } from 'hast';
|
|
4
|
-
|
|
4
|
+
import { JavaScriptRegexEngineOptions } from '@shikijs/engine-javascript';
|
|
5
|
+
export { defaultJavaScriptRegexConstructor } from '@shikijs/engine-javascript';
|
|
5
6
|
import { IGrammar } from '@shikijs/vscode-textmate';
|
|
6
7
|
export { FontStyle, EncodedTokenMetadata as StackElementMetadata } from '@shikijs/vscode-textmate';
|
|
7
|
-
export { createWasmOnigEngine, loadWasm } from '@shikijs/engine-oniguruma';
|
|
8
8
|
export { toHtml as hastToHtml } from 'hast-util-to-html';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -122,11 +122,10 @@ declare function getShikiInternal(options?: HighlighterCoreOptions): Promise<Shi
|
|
|
122
122
|
*/
|
|
123
123
|
declare function createShikiInternalSync(options: HighlighterCoreOptions<true>): ShikiInternal;
|
|
124
124
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
declare function setDefaultWasmLoader(_loader: LoadWasmOptions): void;
|
|
125
|
+
declare function createJavaScriptRegexEngine(options?: JavaScriptRegexEngineOptions): RegexEngine;
|
|
126
|
+
|
|
127
|
+
declare function createWasmOnigEngine(options?: LoadWasmOptions | null): Promise<RegexEngine>;
|
|
128
|
+
declare function loadWasm(options: LoadWasmOptions): Promise<void>;
|
|
130
129
|
|
|
131
130
|
declare function codeToHast(internal: ShikiInternal, code: string, options: CodeToHastOptions, transformerContext?: ShikiTransformerContextCommon): Root;
|
|
132
131
|
declare function tokensToHast(tokens: ThemedToken[][], options: CodeToHastRenderOptions, transformerContext: ShikiTransformerContextSource): Root;
|
|
@@ -219,7 +218,7 @@ declare function resolveColorReplacements(theme: ThemeRegistrationAny | string,
|
|
|
219
218
|
declare function applyColorReplacements(color: string, replacements?: Record<string, string | undefined>): string;
|
|
220
219
|
declare function applyColorReplacements(color?: string | undefined, replacements?: Record<string, string | undefined>): string | undefined;
|
|
221
220
|
declare function getTokenStyleObject(token: TokenStyles): Record<string, string>;
|
|
222
|
-
declare function stringifyTokenStyle(token: Record<string, string>): string;
|
|
221
|
+
declare function stringifyTokenStyle(token: string | Record<string, string>): string;
|
|
223
222
|
/**
|
|
224
223
|
* Creates a converter between index and position in a code block.
|
|
225
224
|
*
|
|
@@ -231,4 +230,17 @@ declare function createPositionConverter(code: string): {
|
|
|
231
230
|
posToIndex: (line: number, character: number) => number;
|
|
232
231
|
};
|
|
233
232
|
|
|
234
|
-
|
|
233
|
+
/**
|
|
234
|
+
* Enable runtime warning for deprecated APIs, for the future versions of Shiki.
|
|
235
|
+
*
|
|
236
|
+
* Disabled by default, will be enabled in Shiki v2.
|
|
237
|
+
*
|
|
238
|
+
* @experimental The accuracy of the warning messages is not yet guaranteed.
|
|
239
|
+
*/
|
|
240
|
+
declare function enableDeprecationWarnings(value?: boolean): void;
|
|
241
|
+
/**
|
|
242
|
+
* @internal
|
|
243
|
+
*/
|
|
244
|
+
declare function warnDeprecated(message: string): void;
|
|
245
|
+
|
|
246
|
+
export { type ShorthandsBundle, addClassToHast, applyColorReplacements, codeToHast, codeToHtml, codeToTokens, codeToTokensBase, codeToTokensWithThemes, createHighlighterCore, createHighlighterCoreSync, createJavaScriptRegexEngine, createPositionConverter, createShikiInternal, createShikiInternalSync, createSingletonShorthands, createWasmOnigEngine, createdBundledHighlighter, enableDeprecationWarnings, getHighlighterCore, getShikiInternal, getSingletonHighlighterCore, getTokenStyleObject, isNoneTheme, isPlainLang, isSpecialLang, isSpecialTheme, loadWasm, makeSingletonHighlighter, makeSingletonHighlighterCore, normalizeGetter, normalizeTheme, resolveColorReplacements, splitLines, splitToken, splitTokens, stringifyTokenStyle, toArray, tokenizeAnsiWithTheme, tokenizeWithTheme, tokensToHast, transformerDecorations, warnDeprecated };
|
package/dist/index.mjs
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import { ShikiError as ShikiError$1 } from '@shikijs/types';
|
|
2
2
|
export * from '@shikijs/types';
|
|
3
|
+
import { createWasmOnigEngine as createWasmOnigEngine$1, loadWasm as loadWasm$1, getDefaultWasmLoader } from '@shikijs/engine-oniguruma';
|
|
4
|
+
import { w as warnDeprecated } from './shared/core.afb6276c.mjs';
|
|
5
|
+
export { e as enableDeprecationWarnings } from './shared/core.afb6276c.mjs';
|
|
3
6
|
import { FontStyle, INITIAL, EncodedTokenMetadata, Registry as Registry$1, Theme } from '@shikijs/vscode-textmate';
|
|
4
7
|
export { FontStyle, EncodedTokenMetadata as StackElementMetadata } from '@shikijs/vscode-textmate';
|
|
5
8
|
import { toHtml } from 'hast-util-to-html';
|
|
6
9
|
export { toHtml as hastToHtml } from 'hast-util-to-html';
|
|
7
|
-
import {
|
|
8
|
-
export {
|
|
9
|
-
export { createJavaScriptRegexEngine, defaultJavaScriptRegexConstructor } from '@shikijs/engine-javascript';
|
|
10
|
+
import { createJavaScriptRegexEngine as createJavaScriptRegexEngine$1 } from '@shikijs/engine-javascript';
|
|
11
|
+
export { defaultJavaScriptRegexConstructor } from '@shikijs/engine-javascript';
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
function createWasmOnigEngine(options) {
|
|
14
|
+
warnDeprecated("import `createWasmOnigEngine` from `@shikijs/engine-oniguruma` or `shiki/engine/oniguruma` instead");
|
|
15
|
+
return createWasmOnigEngine$1(options);
|
|
14
16
|
}
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
+
function loadWasm(options) {
|
|
18
|
+
warnDeprecated("import `loadWasm` from `@shikijs/engine-oniguruma` or `shiki/engine/oniguruma` instead");
|
|
19
|
+
return loadWasm$1(options);
|
|
17
20
|
}
|
|
18
21
|
|
|
19
22
|
function toArray(x) {
|
|
@@ -131,6 +134,8 @@ function getTokenStyleObject(token) {
|
|
|
131
134
|
return styles;
|
|
132
135
|
}
|
|
133
136
|
function stringifyTokenStyle(token) {
|
|
137
|
+
if (typeof token === "string")
|
|
138
|
+
return token;
|
|
134
139
|
return Object.entries(token).map(([key, value]) => `${key}:${value}`).join(";");
|
|
135
140
|
}
|
|
136
141
|
function createPositionConverter(code) {
|
|
@@ -1039,23 +1044,20 @@ function mergeToken(merged, variantsOrder, cssVariablePrefix, defaultColor) {
|
|
|
1039
1044
|
};
|
|
1040
1045
|
const styles = variantsOrder.map((t) => getTokenStyleObject(merged.variants[t]));
|
|
1041
1046
|
const styleKeys = new Set(styles.flatMap((t) => Object.keys(t)));
|
|
1042
|
-
const mergedStyles =
|
|
1047
|
+
const mergedStyles = {};
|
|
1048
|
+
styles.forEach((cur, idx) => {
|
|
1043
1049
|
for (const key of styleKeys) {
|
|
1044
1050
|
const value = cur[key] || "inherit";
|
|
1045
1051
|
if (idx === 0 && defaultColor) {
|
|
1046
|
-
|
|
1052
|
+
mergedStyles[key] = value;
|
|
1047
1053
|
} else {
|
|
1048
1054
|
const keyName = key === "color" ? "" : key === "background-color" ? "-bg" : `-${key}`;
|
|
1049
1055
|
const varKey = cssVariablePrefix + variantsOrder[idx] + (key === "color" ? "" : keyName);
|
|
1050
|
-
|
|
1051
|
-
acc[key] += `;${varKey}:${value}`;
|
|
1052
|
-
else
|
|
1053
|
-
acc[key] = `${varKey}:${value}`;
|
|
1056
|
+
mergedStyles[varKey] = value;
|
|
1054
1057
|
}
|
|
1055
1058
|
}
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
token.htmlStyle = defaultColor ? stringifyTokenStyle(mergedStyles) : Object.values(mergedStyles).join(";");
|
|
1059
|
+
});
|
|
1060
|
+
token.htmlStyle = mergedStyles;
|
|
1059
1061
|
return token;
|
|
1060
1062
|
}
|
|
1061
1063
|
|
|
@@ -1181,14 +1183,18 @@ function tokensToHast(tokens, options, transformerContext) {
|
|
|
1181
1183
|
let tokenNode = {
|
|
1182
1184
|
type: "element",
|
|
1183
1185
|
tagName: "span",
|
|
1184
|
-
properties: {
|
|
1186
|
+
properties: {
|
|
1187
|
+
...token.htmlAttrs
|
|
1188
|
+
},
|
|
1185
1189
|
children: [{ type: "text", value: token.content }]
|
|
1186
1190
|
};
|
|
1187
|
-
|
|
1191
|
+
if (typeof token.htmlStyle === "string")
|
|
1192
|
+
warnDeprecated("`htmlStyle` as a string is deprecated. Use an object instead.");
|
|
1193
|
+
const style = stringifyTokenStyle(token.htmlStyle || getTokenStyleObject(token));
|
|
1188
1194
|
if (style)
|
|
1189
1195
|
tokenNode.properties.style = style;
|
|
1190
1196
|
for (const transformer of transformers)
|
|
1191
|
-
tokenNode = transformer?.span?.call(context, tokenNode, idx + 1, col, lineNode) || tokenNode;
|
|
1197
|
+
tokenNode = transformer?.span?.call(context, tokenNode, idx + 1, col, lineNode, token) || tokenNode;
|
|
1192
1198
|
if (structure === "inline")
|
|
1193
1199
|
root.children.push(tokenNode);
|
|
1194
1200
|
else if (structure === "classic")
|
|
@@ -1694,6 +1700,9 @@ function createShikiInternalSync(options) {
|
|
|
1694
1700
|
}
|
|
1695
1701
|
|
|
1696
1702
|
async function createShikiInternal(options = {}) {
|
|
1703
|
+
if (options.loadWasm) {
|
|
1704
|
+
warnDeprecated("`loadWasm` option is deprecated. Use `engine: createWasmOnigEngine(loadWasm)` instead.");
|
|
1705
|
+
}
|
|
1697
1706
|
const [
|
|
1698
1707
|
themes,
|
|
1699
1708
|
langs,
|
|
@@ -1701,7 +1710,7 @@ async function createShikiInternal(options = {}) {
|
|
|
1701
1710
|
] = await Promise.all([
|
|
1702
1711
|
resolveThemes(options.themes || []),
|
|
1703
1712
|
resolveLangs(options.langs || []),
|
|
1704
|
-
options.engine || createWasmOnigEngine(options.loadWasm || getDefaultWasmLoader())
|
|
1713
|
+
options.engine || createWasmOnigEngine$1(options.loadWasm || getDefaultWasmLoader())
|
|
1705
1714
|
]);
|
|
1706
1715
|
return createShikiInternalSync({
|
|
1707
1716
|
...options,
|
|
@@ -1712,6 +1721,7 @@ async function createShikiInternal(options = {}) {
|
|
|
1712
1721
|
});
|
|
1713
1722
|
}
|
|
1714
1723
|
function getShikiInternal(options = {}) {
|
|
1724
|
+
warnDeprecated("`getShikiInternal` is deprecated. Use `createShikiInternal` instead.");
|
|
1715
1725
|
return createShikiInternal(options);
|
|
1716
1726
|
}
|
|
1717
1727
|
|
|
@@ -1764,6 +1774,7 @@ function makeSingletonHighlighterCore(createHighlighter) {
|
|
|
1764
1774
|
}
|
|
1765
1775
|
const getSingletonHighlighterCore = /* @__PURE__ */ makeSingletonHighlighterCore(createHighlighterCore);
|
|
1766
1776
|
function getHighlighterCore(options = {}) {
|
|
1777
|
+
warnDeprecated("`getHighlighterCore` is deprecated. Use `createHighlighterCore` or `getSingletonHighlighterCore` instead.");
|
|
1767
1778
|
return createHighlighterCore(options);
|
|
1768
1779
|
}
|
|
1769
1780
|
|
|
@@ -1772,6 +1783,7 @@ function createdBundledHighlighter(arg1, arg2, arg3) {
|
|
|
1772
1783
|
let bundledThemes;
|
|
1773
1784
|
let engine;
|
|
1774
1785
|
if (arg2) {
|
|
1786
|
+
warnDeprecated("`createdBundledHighlighter` signature with `bundledLanguages` and `bundledThemes` is deprecated. Use the options object signature instead.");
|
|
1775
1787
|
bundledLanguages = arg1;
|
|
1776
1788
|
bundledThemes = arg2;
|
|
1777
1789
|
engine = () => createWasmOnigEngine(arg3);
|
|
@@ -1896,4 +1908,9 @@ function createSingletonShorthands(createHighlighter) {
|
|
|
1896
1908
|
};
|
|
1897
1909
|
}
|
|
1898
1910
|
|
|
1899
|
-
|
|
1911
|
+
function createJavaScriptRegexEngine(options) {
|
|
1912
|
+
warnDeprecated("import `createJavaScriptRegexEngine` from `@shikijs/engine-javascript` or `shiki/engine/javascript` instead");
|
|
1913
|
+
return createJavaScriptRegexEngine$1(options);
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1916
|
+
export { addClassToHast, applyColorReplacements, codeToHast, codeToHtml, codeToTokens, codeToTokensBase, codeToTokensWithThemes, createHighlighterCore, createHighlighterCoreSync, createJavaScriptRegexEngine, createPositionConverter, createShikiInternal, createShikiInternalSync, createSingletonShorthands, createWasmOnigEngine, createdBundledHighlighter, getHighlighterCore, getShikiInternal, getSingletonHighlighterCore, getTokenStyleObject, isNoneTheme, isPlainLang, isSpecialLang, isSpecialTheme, loadWasm, makeSingletonHighlighter, makeSingletonHighlighterCore, normalizeGetter, normalizeTheme, resolveColorReplacements, splitLines, splitToken, splitTokens, stringifyTokenStyle, toArray, tokenizeAnsiWithTheme, tokenizeWithTheme, tokensToHast, transformerDecorations, warnDeprecated };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
let emitDeprecation = false;
|
|
2
|
+
function enableDeprecationWarnings(value = true) {
|
|
3
|
+
emitDeprecation = value;
|
|
4
|
+
}
|
|
5
|
+
function warnDeprecated(message) {
|
|
6
|
+
if (emitDeprecation)
|
|
7
|
+
console.trace(`[SHIKI DEPRECATE]: ${message}`);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { enableDeprecationWarnings as e, warnDeprecated as w };
|
package/dist/wasm-inlined.mjs
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
|
+
import { w as warnDeprecated } from './shared/core.afb6276c.mjs';
|
|
1
2
|
export * from '@shikijs/engine-oniguruma/wasm-inlined';
|
|
2
3
|
export { default } from '@shikijs/engine-oniguruma/wasm-inlined';
|
|
4
|
+
|
|
5
|
+
warnDeprecated("Import from `@shikijs/engine-oniguruma/wasm-inlined` instead");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shikijs/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.19.0",
|
|
5
5
|
"description": "Core of Shiki",
|
|
6
6
|
"author": "Pine Wu <octref@gmail.com>; Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
"@shikijs/vscode-textmate": "^9.2.2",
|
|
64
64
|
"@types/hast": "^3.0.4",
|
|
65
65
|
"hast-util-to-html": "^9.0.3",
|
|
66
|
-
"@shikijs/engine-
|
|
67
|
-
"@shikijs/
|
|
68
|
-
"@shikijs/
|
|
66
|
+
"@shikijs/engine-javascript": "1.19.0",
|
|
67
|
+
"@shikijs/engine-oniguruma": "1.19.0",
|
|
68
|
+
"@shikijs/types": "1.19.0"
|
|
69
69
|
},
|
|
70
70
|
"scripts": {
|
|
71
71
|
"build": "unbuild",
|