//#region src/shiki.d.ts type Token = { content: string; color?: string; htmlStyle?: Record; }; /** What the preset needs of a Shiki highlighter: a `HighlighterCore` from `shiki/core` fits it. */ type ShikiHighlighter = { codeToTokens(code: string, options: { lang: string; themes: { light: string; dark?: string; }; }): { tokens: Token[][]; }; }; type ShikiOptions = { /** * Your Shiki, with the fence's language loaded, or `undefined` to leave the block plain. It's called for each fenced * block with a language that fits the remaining budget, so load each grammar once. Blocks past the limits skip it * and report a limit issue without checking whether the language is supported. */ highlighter: (language: string) => ShikiHighlighter | undefined | Promise; /** Theme names your highlighter has loaded. The dark one goes in `--shiki-dark`, which typeset and comark-code's styles follow. */ themes: { light: string; dark?: string; }; /** How many code blocks a document highlights. The ones after show without colors. */ maxBlocks?: number; /** How many characters of code a document highlights, over all its blocks. A block past it shows without colors. */ maxSource?: number; }; //#endregion export { ShikiOptions as n, ShikiHighlighter as t };