import { ChangeEvent, CSSProperties, TextareaHTMLAttributes } from 'react'; import { CommandLanguage } from './commandHighlight'; type NativeTextareaProps = Omit, 'onChange' | 'value' | 'defaultValue' | 'style'>; export interface CommandEditorProps extends NativeTextareaProps { /** Controlled value. Omit (with `defaultValue`) for uncontrolled usage. */ value?: string; defaultValue?: string; onChange?: (event: ChangeEvent) => void; /** Highlight language. Defaults to shell. */ language?: CommandLanguage; /** Extra classes for the bordered wrapper (e.g. a different background). */ className?: string; rows?: number; /** Inline styles forwarded to the textarea (e.g. minHeight). */ style?: CSSProperties; } /** * A drop-in replacement for a command/script `` that renders live * syntax highlighting. It overlays a transparent textarea (the real input, * which keeps native editing, selection, IME and a11y) on top of a `` that * paints the highlighted tokens. The two layers share an identical box model so * the colored text sits exactly under the caret. * * Works controlled (`value` + `onChange`) or uncontrolled (`defaultValue` + a * forwarded `ref`, so callers that read `ref.current.value` keep working). */ export declare const CommandEditor: import('react').ForwardRefExoticComponent>; export {};
` that * paints the highlighted tokens. The two layers share an identical box model so * the colored text sits exactly under the caret. * * Works controlled (`value` + `onChange`) or uncontrolled (`defaultValue` + a * forwarded `ref`, so callers that read `ref.current.value` keep working). */ export declare const CommandEditor: import('react').ForwardRefExoticComponent>; export {};