@shikijs/core 1.14.1 → 1.15.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.
@@ -1,30 +1,3 @@
1
- import { F as FontStyle } from './chunk-tokens.mjs';
2
- export { c as IGrammar, d as IGrammarConfiguration, I as INITIAL, e as IOnigLib, b as IRawGrammar, a as IRawTheme, g as IRawThemeSetting, R as Registry, f as RegistryOptions, S as StateStack, T as Theme } from './chunk-tokens.mjs';
3
- import './chunk-index.mjs';
1
+ export { I as IGrammar, ag as IGrammarConfiguration, ad as INITIAL, E as IRawGrammar, F as IRawTheme, J as IRawThemeSetting, aa as PatternScanner, l as RegexEngine, ab as RegexEngineString, ac as Registry, ah as RegistryOptions, ak as StackElementMetadata, aj as StandardTokenType, ae as StateStack, ai as TemporaryStandardTokenType, af as Theme } from './chunk-tokens.mjs';
4
2
  import 'hast';
5
-
6
- declare const enum TemporaryStandardTokenType {
7
- Other = 0,
8
- Comment = 1,
9
- String = 2,
10
- RegEx = 4,
11
- MetaEmbedded = 8
12
- }
13
- declare const enum StandardTokenType {
14
- Other = 0,
15
- Comment = 1,
16
- String = 2,
17
- RegEx = 4
18
- }
19
- declare class StackElementMetadata {
20
- static toBinaryStr(metadata: number): string;
21
- static getLanguageId(metadata: number): number;
22
- static getTokenType(metadata: number): number;
23
- static getFontStyle(metadata: number): number;
24
- static getForeground(metadata: number): number;
25
- static getBackground(metadata: number): number;
26
- static containsBalancedBrackets(metadata: number): boolean;
27
- static set(metadata: number, languageId: number, tokenType: TemporaryStandardTokenType, fontStyle: FontStyle, foreground: number, background: number): number;
28
- }
29
-
30
- export { StackElementMetadata, StandardTokenType, TemporaryStandardTokenType };
3
+ import './chunk-engines.mjs';
package/dist/types.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Root } from 'hast';
2
- import { c as IGrammar, h as ThemeInput, q as SpecialTheme, L as LanguageInput, p as SpecialLanguage, r as ThemeRegistrationAny, v as ThemeRegistrationResolved, E as LanguageRegistration, C as CodeToHastOptions, D as ResolveBundleKey, i as CodeToTokensOptions, j as TokensResult, l as CodeToTokensBaseOptions, m as ThemedToken, n as CodeToTokensWithThemesOptions, o as ThemedTokenWithVariants, G as GrammarState } from './chunk-tokens.mjs';
3
- export { A as AnsiLanguage, a5 as Awaitable, B as BundledHighlighterOptions, J as BundledLanguageInfo, _ as BundledThemeInfo, V as CodeOptionsMeta, O as CodeOptionsMultipleThemes, N as CodeOptionsSingleTheme, Q as CodeOptionsThemes, U as CodeToHastOptionsCommon, x as CodeToHastRenderOptions, W as CodeToHastRenderOptionsCommon, aa as DecorationItem, a9 as DecorationOptions, ac as DecorationTransformType, K as DynamicImportLanguageRegistration, Z as DynamicImportThemeRegistration, F as FontStyle, H as HighlighterCoreOptions, M as MaybeArray, a6 as MaybeGetter, a7 as MaybeModule, ad as Offset, ae as OffsetOrPosition, P as PlainTextLanguage, u as Position, b as RawGrammar, a as RawTheme, g as RawThemeSetting, k as RequireKeys, ab as ResolvedDecorationItem, af as ResolvedPosition, z as ShikiTransformer, a4 as ShikiTransformerContext, w as ShikiTransformerContextCommon, a3 as ShikiTransformerContextMeta, y as ShikiTransformerContextSource, a8 as StringLiteralUnion, Y as ThemeRegistration, X as ThemeRegistrationRaw, a0 as ThemedTokenExplanation, $ as ThemedTokenScopeExplanation, a1 as TokenBase, t as TokenStyles, s as TokenizeWithThemeOptions, a2 as TransformerOptions } from './chunk-tokens.mjs';
4
- export { W as WebAssemblyInstantiator } from './chunk-index.mjs';
2
+ import { I as IGrammar, T as ThemeInput, g as SpecialTheme, L as LanguageInput, S as SpecialLanguage, h as ThemeRegistrationAny, m as ThemeRegistrationResolved, s as LanguageRegistration, C as CodeToHastOptions, r as ResolveBundleKey, a as CodeToTokensOptions, b as TokensResult, c as CodeToTokensBaseOptions, d as ThemedToken, e as CodeToTokensWithThemesOptions, f as ThemedTokenWithVariants, G as GrammarState } from './chunk-tokens.mjs';
3
+ export { A as AnsiLanguage, $ as Awaitable, B as BundledHighlighterOptions, t as BundledLanguageInfo, Q as BundledThemeInfo, y as CodeOptionsMeta, v as CodeOptionsMultipleThemes, u as CodeOptionsSingleTheme, w as CodeOptionsThemes, x as CodeToHastOptionsCommon, o as CodeToHastRenderOptions, z as CodeToHastRenderOptionsCommon, a4 as DecorationItem, a3 as DecorationOptions, a6 as DecorationTransformType, D as DynamicImportLanguageRegistration, O as DynamicImportThemeRegistration, X as FontStyle, H as HighlighterCoreOptions, M as MaybeArray, a0 as MaybeGetter, a1 as MaybeModule, a7 as Offset, a8 as OffsetOrPosition, P as PlainTextLanguage, k as Position, E as RawGrammar, F as RawTheme, J as RawThemeSetting, R as RequireKeys, a5 as ResolvedDecorationItem, a9 as ResolvedPosition, q as ShikiTransformer, _ as ShikiTransformerContext, n as ShikiTransformerContextCommon, Z as ShikiTransformerContextMeta, p as ShikiTransformerContextSource, a2 as StringLiteralUnion, N as ThemeRegistration, K as ThemeRegistrationRaw, V as ThemedTokenExplanation, U as ThemedTokenScopeExplanation, W as TokenBase, j as TokenStyles, i as TokenizeWithThemeOptions, Y as TransformerOptions } from './chunk-tokens.mjs';
4
+ export { L as LoadWasmOptions, a as WebAssemblyInstance, W as WebAssemblyInstantiator } from './chunk-engines.mjs';
5
5
 
6
6
  interface Grammar extends IGrammar {
7
7
  name: string;
@@ -1,4 +1,4 @@
1
- import { W as WebAssemblyInstantiator } from './chunk-index.mjs';
1
+ import { W as WebAssemblyInstantiator } from './chunk-engines.mjs';
2
2
 
3
3
  declare const wasmBinary: ArrayBuffer;
4
4
  declare const getWasmInstance: WebAssemblyInstantiator;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shikijs/core",
3
3
  "type": "module",
4
- "version": "1.14.1",
4
+ "version": "1.15.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,7 +63,8 @@
63
63
  "@types/hast": "^3.0.4"
64
64
  },
65
65
  "devDependencies": {
66
- "hast-util-to-html": "^9.0.1",
66
+ "hast-util-to-html": "^9.0.2",
67
+ "oniguruma-to-js": "^0.2.3",
67
68
  "vscode-oniguruma": "^1.7.0"
68
69
  },
69
70
  "scripts": {