/** * PuckDataCapture * * Captures Puck's actual current data after each React render and writes * it to an external ref. This is necessary because Puck's onChange fires * with data from the PREVIOUS render cycle (React state lags the DOM), * so onChange data is always one keystroke behind. * * By reading via usePuck after React commits, we get the true current state. * The ref is read by the realtime throttle callback at send time. * * Must be rendered inside the Puck component tree (e.g., via a plugin override). */ import type { PuckData } from '@pantheon-systems/css-client'; export interface PuckDataCaptureProps { /** Ref to write the latest Puck data to */ dataRef: React.MutableRefObject; /** Optional callback when data changes (for triggering deferred sync) */ onDataChange?: (data: PuckData) => void; } export declare function PuckDataCapture({ dataRef, onDataChange }: PuckDataCaptureProps): null;