import * as React from 'react'; import { ComponentType } from 'react'; interface MdxLivePreviewProps { source: string; components: Record>; onError?: (error: Error | null) => void; } /** * Renders runtime-compiled MDX inside the given component scope, isolating * runtime throws in an error boundary. Compile errors are surfaced via onError * while the last good render stays on screen. */ declare function MdxLivePreview({ source, components, onError }: MdxLivePreviewProps): React.JSX.Element; interface MdxSourceEditorProps { value: string; onChange: (next: string) => void; className?: string; } /** * Editable MDX surface — a textarea layered over shiki-highlighted output. * Sibling of the read-only MdxSourceView; the panel chooses which to show. */ declare function MdxSourceEditor({ value, onChange, className }: MdxSourceEditorProps): React.JSX.Element; interface MdxSourceViewProps { source: string; /** 1-based, inclusive line range to highlight + scroll into view. */ activeRange?: { startLine: number; endLine: number; }; className?: string; } /** * Read-only, syntax-highlighted view of MDX source. Presentation-only — no * docking/positioning. MDX is highlighted as `tsx` (JSX superset). When * `activeRange` is set, those lines get a subtle highlight band and are * scrolled into view. * * Phase-2 seam: a future editable `MdxSourceEditor` replaces this surface inside * the same panel shell without changing the source plumbing. */ declare function MdxSourceView({ source, activeRange, className }: MdxSourceViewProps): React.JSX.Element; export { MdxLivePreview, MdxSourceEditor, MdxSourceView }; export type { MdxLivePreviewProps, MdxSourceEditorProps, MdxSourceViewProps };