@shikijs/types 3.18.0 → 3.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.
Files changed (2) hide show
  1. package/dist/index.d.mts +11 -2
  2. package/package.json +1 -1
package/dist/index.d.mts CHANGED
@@ -448,7 +448,7 @@ interface TokensResult {
448
448
  * Custom style string to be applied to the root `<pre>` element.
449
449
  * When specified, `fg` and `bg` will be ignored.
450
450
  */
451
- rootStyle?: string;
451
+ rootStyle?: string | false;
452
452
  /**
453
453
  * The last grammar state of the code snippet.
454
454
  */
@@ -665,8 +665,17 @@ interface CodeOptionsMultipleThemes<Themes extends string = string> {
665
665
  }
666
666
  type CodeOptionsThemes<Themes extends string = string> = CodeOptionsSingleTheme<Themes> | CodeOptionsMultipleThemes<Themes>;
667
667
  type CodeToHastOptions<Languages extends string = string, Themes extends string = string> = CodeToHastOptionsCommon<Languages> & CodeOptionsThemes<Themes> & CodeOptionsMeta;
668
- interface CodeToHastOptionsCommon<Languages extends string = string> extends TransformerOptions, DecorationOptions, Pick<TokenizeWithThemeOptions, 'colorReplacements' | 'tokenizeMaxLineLength' | 'tokenizeTimeLimit' | 'grammarState' | 'grammarContextCode'> {
668
+ interface CodeToHastOptionsCommon<Languages extends string = string> extends TransformerOptions, DecorationOptions, Pick<TokenizeWithThemeOptions, 'colorReplacements' | 'tokenizeMaxLineLength' | 'tokenizeTimeLimit' | 'grammarState' | 'grammarContextCode' | 'includeExplanation'> {
669
+ /**
670
+ * The grammar name for the code.
671
+ */
669
672
  lang: StringLiteralUnion<Languages | SpecialLanguage>;
673
+ /**
674
+ * Custom style string to be applied to the root `<pre>` element.
675
+ *
676
+ * When set to `false`, no style will be applied.
677
+ */
678
+ rootStyle?: string | false;
670
679
  /**
671
680
  * Merge whitespace tokens to saving extra `<span>`.
672
681
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shikijs/types",
3
3
  "type": "module",
4
- "version": "3.18.0",
4
+ "version": "3.19.0",
5
5
  "description": "Type definitions for Shiki",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",