import React from 'react'; /** * Common languages get autocomplete; `(string & {})` keeps the union open so * any Prism-supported language id still type-checks — needed because AI * responses (e.g. from the FDM assistant) can fence code in any language, * not just the handful used elsewhere in this design system. */ type CodeLanguage = 'typescript' | 'tsx' | 'javascript' | 'jsx' | 'css' | 'bash' | 'shell' | 'python' | 'json' | 'yaml' | 'sql' | 'markdown' | 'html' | 'text' | (string & {}); /** * Props for the CodeBlock component. */ interface CodeBlockProps { /** The code string to be displayed */ code: string; /** Programming language for syntax highlighting */ language?: CodeLanguage; /** Optional filename to display in the header */ filename?: string; /** Whether to show line numbers */ showLineNumbers?: boolean; } /** * Enhanced Syntax Highlighter component with "Copy to Clipboard" functionality. * * @description * Uses `react-syntax-highlighter` with a custom "Elegant" theme inspired by Xertica's * design tokens. It includes a fallback mechanism for the Clipboard API and * optionally displays a header with the filename and language. * * @ai-rules * 1. Theme: Uses a custom `elegantTheme` that maps to system CSS variables. Avoid overriding these colors manually. * 2. Clipboard: The copy functionality is robust with multiple fallback methods. * 3. Content: Ensure `code` is passed as a raw string without pre-formatting indentation if possible. */ export declare const CodeBlock: ({ code, language, filename, showLineNumbers, }: CodeBlockProps) => React.JSX.Element; export {};