import type { BaseProps } from '@astryxdesign/core';
import type { TokenLine } from '@astryxdesign/core/CodeBlock';
export interface CodeEditorProps extends Omit<BaseProps<HTMLDivElement>, 'onChange'> {
    /** Ref forwarded to the root element */
    ref?: React.Ref<HTMLDivElement>;
    /** Controlled value */
    value: string;
    /** Change handler */
    onChange: (value: string) => void;
    /** Language for highlighting. @default "plaintext" */
    language?: string;
    /** Label for the code editor — used as the accessible name of the editable region. */
    label: string;
    /** Show line numbers. @default false */
    hasLineNumbers?: boolean;
    /** Read-only mode. @default false */
    isReadOnly?: boolean;
    /** Placeholder when empty */
    placeholder?: string;
    /** Max height before scrolling */
    maxHeight?: number | string;
    /** Text size. @default "md" */
    size?: 'sm' | 'md';
    /** Custom tokenizer */
    tokenizer?: (code: string, language: string) => TokenLine[];
    /**
     * Hint exposed to assistive technology (via aria-describedby) explaining
     * how to move focus out of the editor. English default — the lab package
     * has no i18n catalog yet, so override this prop to localize.
     * @default 'Press Escape then Tab to move focus out of the editor.'
     */
    escapeHint?: string;
}
/**
 * An editable code input using contentEditable="plaintext-only".
 *
 * Uses CSS Custom Highlight API for syntax coloring. Supports
 * auto-indent, tab insertion, Shift+Tab outdent, and bracket auto-closing.
 *
 * Because Tab is captured for indentation, pressing Escape arms a one-shot
 * "tab moves focus" mode so keyboard users can leave the editor (WCAG 2.1.2).
 * The escape is advertised to assistive technology via a visually hidden
 * aria-describedby hint (see `escapeHint`).
 *
 * @example
 * ```
 * const [code, setCode] = useState('');
 * <CodeEditor
 *   label="Source code"
 *   value={code}
 *   onChange={setCode}
 *   language="typescript"
 *   hasLineNumbers
 * />
 * ```
 */
export declare function CodeEditor({ value, onChange, language, hasLineNumbers, isReadOnly, placeholder, maxHeight, size, tokenizer: customTokenizer, label, escapeHint, xstyle, className, style, ref, ...props }: CodeEditorProps): import("react").JSX.Element;
export declare namespace CodeEditor {
    var displayName: string;
}
//# sourceMappingURL=CodeEditor.d.ts.map