@shikijs/core 1.1.6 → 1.2.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 CHANGED
@@ -2,7 +2,7 @@ import { HighlighterCore, HighlighterGeneric, ShikiInternal } from './types.mjs'
2
2
  import { H as HighlighterCoreOptions, B as BundledHighlighterOptions, L as LanguageInput, T as ThemeInput, C as CodeToHastOptions, h as Root, i as CodeToTokensOptions, j as TokensResult, k as RequireKeys, l as CodeToTokensBaseOptions, m as ThemedToken, n as CodeToTokensWithThemesOptions, o as ThemedTokenWithVariants, M as MaybeArray, P as PlainTextLanguage, p as SpecialLanguage, q as SpecialTheme, E as Element, r as TokenStyles, s as Position, c as IGrammar, t as ThemeRegistrationResolved, u as TokenizeWithThemeOptions, v as ShikiTransformerContextCommon, w as CodeToHastRenderOptions, x as ShikiTransformerContextSource, N as Nodes$1, y as RootContent$1, z as ThemeRegistrationAny, A as ShikiTransformer } from './chunk-tokens.mjs';
3
3
  export { D as AnsiLanguage, a7 as Awaitable, K as BundledLanguageInfo, a0 as BundledThemeInfo, X as CodeOptionsMeta, U as CodeOptionsMultipleThemes, Q as CodeOptionsSingleTheme, V as CodeOptionsThemes, W as CodeToHastOptionsCommon, Y as CodeToHastRenderOptionsCommon, ac as DecorationItem, ab as DecorationOptions, ae as DecorationTransformType, O as DynamicImportLanguageRegistration, $ as DynamicImportThemeRegistration, F as FontStyle, J as LanguageRegistration, a8 as MaybeGetter, a9 as MaybeModule, af as Offset, ag as OffsetOrPosition, b as RawGrammar, a as RawTheme, g as RawThemeSetting, G as ResolveBundleKey, ad as ResolvedDecorationItem, ah as ResolvedPosition, a6 as ShikiTransformerContext, a5 as ShikiTransformerContextMeta, aa as StringLiteralUnion, _ as ThemeRegistration, Z as ThemeRegistrationRaw, a2 as ThemedTokenExplanation, a1 as ThemedTokenScopeExplanation, a3 as TokenBase, a4 as TransformerOptions } from './chunk-tokens.mjs';
4
4
  import { L as LoadWasmOptions } from './chunk-index.mjs';
5
- export { l as loadWasm } from './chunk-index.mjs';
5
+ export { W as WebAssemblyInstantiator, l as loadWasm } from './chunk-index.mjs';
6
6
 
7
7
  /**
8
8
  * Create a Shiki core highlighter instance, with no languages or themes bundled.
package/dist/index.mjs CHANGED
@@ -122,7 +122,7 @@ function splitTokens(tokens, breakpoints) {
122
122
  });
123
123
  }
124
124
  function applyColorReplacements(color, replacements) {
125
- return replacements?.[color.toLowerCase()] || color;
125
+ return replacements?.[color?.toLowerCase()] || color;
126
126
  }
127
127
  function getTokenStyleObject(token) {
128
128
  const styles = {};
package/dist/types.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { T as ThemeInput, q as SpecialTheme, L as LanguageInput, p as SpecialLanguage, z as ThemeRegistrationAny, t as ThemeRegistrationResolved, J as LanguageRegistration, c as IGrammar, C as CodeToHastOptions, G as ResolveBundleKey, h as Root, i as CodeToTokensOptions, j as TokensResult, l as CodeToTokensBaseOptions, m as ThemedToken, n as CodeToTokensWithThemesOptions, o as ThemedTokenWithVariants } from './chunk-tokens.mjs';
2
2
  export { D as AnsiLanguage, a7 as Awaitable, B as BundledHighlighterOptions, K as BundledLanguageInfo, a0 as BundledThemeInfo, X as CodeOptionsMeta, U as CodeOptionsMultipleThemes, Q as CodeOptionsSingleTheme, V as CodeOptionsThemes, W as CodeToHastOptionsCommon, w as CodeToHastRenderOptions, Y as CodeToHastRenderOptionsCommon, ac as DecorationItem, ab as DecorationOptions, ae as DecorationTransformType, O as DynamicImportLanguageRegistration, $ as DynamicImportThemeRegistration, F as FontStyle, H as HighlighterCoreOptions, M as MaybeArray, a8 as MaybeGetter, a9 as MaybeModule, af as Offset, ag as OffsetOrPosition, P as PlainTextLanguage, s as Position, b as RawGrammar, a as RawTheme, g as RawThemeSetting, k as RequireKeys, ad as ResolvedDecorationItem, ah as ResolvedPosition, A as ShikiTransformer, a6 as ShikiTransformerContext, v as ShikiTransformerContextCommon, a5 as ShikiTransformerContextMeta, x as ShikiTransformerContextSource, aa as StringLiteralUnion, _ as ThemeRegistration, Z as ThemeRegistrationRaw, a2 as ThemedTokenExplanation, a1 as ThemedTokenScopeExplanation, a3 as TokenBase, r as TokenStyles, u as TokenizeWithThemeOptions, a4 as TransformerOptions } from './chunk-tokens.mjs';
3
- import './chunk-index.mjs';
3
+ export { W as WebAssemblyInstantiator } from './chunk-index.mjs';
4
4
 
5
5
  /**
6
6
  * Internal context of Shiki, core textmate logic
@@ -1,5 +1,6 @@
1
1
  import { W as WebAssemblyInstantiator } from './chunk-index.mjs';
2
2
 
3
- declare const getWasm: WebAssemblyInstantiator;
3
+ declare const wasmBinary: ArrayBuffer;
4
+ declare const getWasmInstance: WebAssemblyInstantiator;
4
5
 
5
- export { getWasm as default };
6
+ export { getWasmInstance as default, getWasmInstance, wasmBinary };