import type * as React from 'react'; import type { ClipboardProps } from '../clipboard/types.cjs'; import { type PrimitivePropsWithRef } from '../utils/primitive.cjs'; /** Public configuration for the CodeBlock component and its native attributes. */ export interface CodeBlockProps extends Omit, 'children'> { /** Exact source text displayed and copied without interpretation. */ value: string; /** * Optional language name displayed above the source text. * @default undefined */ language?: string | undefined; /** * Localized accessible name of the focusable code region, independent of the copy control. * @default undefined — uses the language followed by "code", or "Code"; an empty string uses the same fallback. */ regionLabel?: string | undefined; /** Allow long lines to wrap within the frame. @default false */ wrap?: boolean | undefined; /** Display the keyboard accessible clipboard copy control. @default true */ copyable?: boolean | undefined; /** Accessible label assigned to the clipboard copy control. @default 'Copy code' */ copyLabel?: string | undefined; /** Feedback announced after the clipboard write succeeds. @default 'Copied to clipboard' */ copiedLabel?: string | undefined; /** Feedback announced after the clipboard write fails. @default 'Copy failed' */ errorLabel?: string | undefined; /** * Reports the exact source after a successful copy. * @default undefined */ onCopySuccess?: ClipboardProps['onCopySuccess']; /** * Reports failure after all clipboard write methods fail. * @default undefined */ onCopyError?: ClipboardProps['onCopyError']; } /** Safely escaped code with Clipboard success and failure feedback. */ export declare function CodeBlock({ value, language, regionLabel, wrap, copyable, copyLabel, copiedLabel, errorLabel, onCopySuccess, onCopyError, ...props }: CodeBlockProps): React.ReactNode;