UNPKG

@tanstack/highlight

Version:

Tiny class-based syntax highlighting for documentation.

25 lines (24 loc) • 1.08 kB
import type { Highlighter, HighlightDecoration, RenderedCodeBlockData } from './core.js'; import { rehypeHighlightCodeBlocks, type RehypeHighlightOptions } from './rehype.js'; export type HighlightedCodeBlockProps = RenderedCodeBlockData & { className?: string; dangerouslySetInnerHTML: { __html: string; }; }; export type CreateHighlightedCodeBlockPropsOptions = { className?: string; code: string; decorations?: ReadonlyArray<HighlightDecoration>; highlighter: Highlighter; lang?: string; lineNumbers?: boolean; title?: string; }; export type OctaneMdxHighlightOptions = RehypeHighlightOptions; export type OctaneMdxHighlightPlugin = [ plugin: typeof rehypeHighlightCodeBlocks, options: OctaneMdxHighlightOptions ]; export declare function createHighlightedCodeBlockProps({ className, code, decorations, highlighter, lang, lineNumbers, title, }: CreateHighlightedCodeBlockPropsOptions): HighlightedCodeBlockProps; export declare function createOctaneMdxHighlight(options: OctaneMdxHighlightOptions): OctaneMdxHighlightPlugin;