import React from 'react'; /** * Inline-edit primitive. Renders a plain `{children}` in production * storefront; activates a `contenteditable` element with focus-preserving * imperative DOM management inside the page-builder iframe. * * Design notes: * - SSR-safe: first render always uses the production path. Page-builder * mode is detected after `useEffect` runs post-hydration, so there's no * hydration mismatch. * - React doesn't reconcile contenteditable contents — we drive `innerText` * imperatively via `useLayoutEffect`. The sync is skipped while the user * is focused so preview-data round-trips don't disrupt typing. * - Plain text only. Paste handler strips formatting. Children must be a * string (a future widget that wants rich text uses a different field). */ interface EditableProps { /** Path under the widget's settings, e.g. "settings.heading" or "settings.slides.0.heading". */ fieldPath: string; /** Allow line breaks. Default false — Enter blurs. */ multiline?: boolean; /** Tag to render. Default 'span'. */ as?: React.ElementType; className?: string; /** Current text. Must be a string. */ children?: string; /** Focus the element on mount (used by click-to-edit wrappers like * `EditableMarkdown`, which mount us in direct response to a click). */ focusOnMount?: boolean; /** Called after the element blurs and its pending edit has flushed. */ onBlur?: () => void; } export declare function Editable({ fieldPath, multiline, as: Tag, className, children, focusOnMount, onBlur }: EditableProps): React.ReactElement; export {};