@shikijs/types 3.16.0 → 3.17.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.
Files changed (2) hide show
  1. package/dist/index.d.mts +10 -4
  2. package/package.json +1 -1
package/dist/index.d.mts CHANGED
@@ -47,7 +47,7 @@ interface Grammar extends IGrammar {
47
47
  name: string;
48
48
  }
49
49
 
50
- type PlainTextLanguage = 'text' | 'plaintext' | 'txt';
50
+ type PlainTextLanguage = 'text' | 'plaintext' | 'txt' | 'plain';
51
51
  type AnsiLanguage = 'ansi';
52
52
  type SpecialLanguage = PlainTextLanguage | AnsiLanguage;
53
53
  type LanguageInput = MaybeGetter<MaybeArray<LanguageRegistration>>;
@@ -63,6 +63,7 @@ interface LanguageRegistration extends IRawGrammar {
63
63
  * languages for each parent language.
64
64
  */
65
65
  embeddedLangs?: string[];
66
+ embeddedLanguages?: string[];
66
67
  /**
67
68
  * A list of languages that embed the current language.
68
69
  * Unlike `embeddedLangs`, the embedded languages will not be loaded automatically.
@@ -617,7 +618,7 @@ interface CodeOptionsMultipleThemes<Themes extends string = string> {
617
618
  * <span style="color:#111;--shiki-dark:#fff;">code</span>
618
619
  * ```
619
620
  *
620
- * @see https://github.com/shikijs/shiki#lightdark-dual-themes
621
+ * @see https://shiki.style/guide/dual-themes
621
622
  */
622
623
  themes: Partial<Record<string, ThemeRegistrationAny | StringLiteralUnion<Themes>>>;
623
624
  /**
@@ -846,11 +847,16 @@ type HighlighterCore = HighlighterGeneric<never, never>;
846
847
  /**
847
848
  * Options for creating a bundled highlighter.
848
849
  */
849
- interface CreatedBundledHighlighterOptions<BundledLangs extends string, BundledThemes extends string> {
850
+ interface CreateBundledHighlighterOptions<BundledLangs extends string, BundledThemes extends string> {
850
851
  langs: Record<BundledLangs, LanguageInput>;
851
852
  themes: Record<BundledThemes, ThemeInput>;
852
853
  engine: () => Awaitable<RegexEngine>;
853
854
  }
855
+ /**
856
+ * @deprecated Use `CreateBundledHighlighterOptions` instead.
857
+ */
858
+ interface CreatedBundledHighlighterOptions<BundledLangs extends string, BundledThemes extends string> extends CreateBundledHighlighterOptions<BundledLangs, BundledThemes> {
859
+ }
854
860
 
855
861
  type CreateHighlighterFactory<L extends string, T extends string> = (options: BundledHighlighterOptions<L, T>) => Promise<HighlighterGeneric<L, T>>;
856
862
 
@@ -859,4 +865,4 @@ declare class ShikiError extends Error {
859
865
  }
860
866
 
861
867
  export { ShikiError };
862
- export type { AnsiLanguage, Awaitable, BundledHighlighterOptions, BundledLanguageInfo, BundledThemeInfo, CodeOptionsMeta, CodeOptionsMultipleThemes, CodeOptionsSingleTheme, CodeOptionsThemes, CodeToHastOptions, CodeToHastOptionsCommon, CodeToHastRenderOptions, CodeToHastRenderOptionsCommon, CodeToTokensBaseOptions, CodeToTokensOptions, CodeToTokensWithThemesOptions, CreateHighlighterFactory, CreatedBundledHighlighterOptions, DecorationItem, DecorationOptions, DecorationTransformType, DynamicImportLanguageRegistration, DynamicImportThemeRegistration, Grammar, GrammarState, GrammarStateMapKey, HighlighterCore, HighlighterCoreOptions, HighlighterGeneric, LanguageInput, LanguageRegistration, LoadWasmOptions, LoadWasmOptionsPlain, MaybeArray, MaybeGetter, MaybeModule, Offset, OffsetOrPosition, OnigurumaLoadOptions, PatternScanner, PlainTextLanguage, Position, RegexEngine, RegexEngineString, RequireKeys, ResolveBundleKey, ResolvedDecorationItem, ResolvedPosition, ShikiInternal, ShikiTransformer, ShikiTransformerContext, ShikiTransformerContextCommon, ShikiTransformerContextMeta, ShikiTransformerContextSource, SpecialLanguage, SpecialTheme, StringLiteralUnion, ThemeInput, ThemeRegistration, ThemeRegistrationAny, ThemeRegistrationRaw, ThemeRegistrationResolved, ThemedToken, ThemedTokenExplanation, ThemedTokenScopeExplanation, ThemedTokenWithVariants, TokenBase, TokenStyles, TokenizeWithThemeOptions, TokensResult, TransformerOptions, WebAssemblyInstance, WebAssemblyInstantiator };
868
+ export type { AnsiLanguage, Awaitable, BundledHighlighterOptions, BundledLanguageInfo, BundledThemeInfo, CodeOptionsMeta, CodeOptionsMultipleThemes, CodeOptionsSingleTheme, CodeOptionsThemes, CodeToHastOptions, CodeToHastOptionsCommon, CodeToHastRenderOptions, CodeToHastRenderOptionsCommon, CodeToTokensBaseOptions, CodeToTokensOptions, CodeToTokensWithThemesOptions, CreateBundledHighlighterOptions, CreateHighlighterFactory, CreatedBundledHighlighterOptions, DecorationItem, DecorationOptions, DecorationTransformType, DynamicImportLanguageRegistration, DynamicImportThemeRegistration, Grammar, GrammarState, GrammarStateMapKey, HighlighterCore, HighlighterCoreOptions, HighlighterGeneric, LanguageInput, LanguageRegistration, LoadWasmOptions, LoadWasmOptionsPlain, MaybeArray, MaybeGetter, MaybeModule, Offset, OffsetOrPosition, OnigurumaLoadOptions, PatternScanner, PlainTextLanguage, Position, RegexEngine, RegexEngineString, RequireKeys, ResolveBundleKey, ResolvedDecorationItem, ResolvedPosition, ShikiInternal, ShikiTransformer, ShikiTransformerContext, ShikiTransformerContextCommon, ShikiTransformerContextMeta, ShikiTransformerContextSource, SpecialLanguage, SpecialTheme, StringLiteralUnion, ThemeInput, ThemeRegistration, ThemeRegistrationAny, ThemeRegistrationRaw, ThemeRegistrationResolved, ThemedToken, ThemedTokenExplanation, ThemedTokenScopeExplanation, ThemedTokenWithVariants, TokenBase, TokenStyles, TokenizeWithThemeOptions, TokensResult, TransformerOptions, WebAssemblyInstance, WebAssemblyInstantiator };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shikijs/types",
3
3
  "type": "module",
4
- "version": "3.16.0",
4
+ "version": "3.17.0",
5
5
  "description": "Type definitions for Shiki",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",