export interface ShikiCodeBlockProps { className?: string; code: string; /** * When true, show a collapsed preview with expand/collapse controls. * Default false keeps the previous always-open behavior. */ collapsible?: boolean; /** Start expanded when {@link collapsible} is true. Default false. */ defaultOpen?: boolean; label?: string; language?: string; /** Max height class for the open/always-on body. */ maxHeightClassName?: string; /** CSS max-height for the closed preview (collapsible only). */ maxHeightWhenClosed?: string; } /** * Shiki embeds theme background-color on `
`. That paints a
* hard theme plate (often dark) inside HeroUI cards and, during AnimatedHeight
* reflows, reads as the whole card background flipping. Strip background*
* declarations so tokens sit on the host surface.
*/
export declare function stripShikiBackgroundStyles(html: string): string;
/**
* Shiki normally escapes source text, but its result is still rendered through
* `dangerouslySetInnerHTML`. Keep that boundary safe if a grammar or future
* Shiki change emits hostile markup.
*/
export declare function sanitizeShikiHtml(html: string): string;
export declare function formatCodeJson(value: unknown): string;
export declare function ShikiCodeBlock({ className, code, collapsible, defaultOpen, label, language, maxHeightClassName, maxHeightWhenClosed, }: ShikiCodeBlockProps): import("react").JSX.Element | null;
/** Alias used by showcase pages for a collapsible highlighted snippet. */
export type FoldedCodeBlockProps = Omit & {
title: string;
lang?: string;
language?: string;
};
export declare function FoldedCodeBlock({ title, lang, language, defaultOpen, maxHeightWhenClosed, maxHeightClassName, ...rest }: FoldedCodeBlockProps): import("react").JSX.Element;