/** * Delivery-render flag: the host rides `deliveryRender: true` on its * `lightdash:sdk:ready` message during delivery/preview capture renders * (absent on interactive loads). Apps gate all-tab data mounting on it. */ export type DeliveryRenderStore = { getValue: () => boolean; setValue: (next: boolean) => void; subscribe: (listener: () => void) => () => void; }; /** * Minimal external store: synchronous reads for useSyncExternalStore. * Exported for tests — app code uses `useDeliveryRender`. */ export declare function createDeliveryRenderStore(): DeliveryRenderStore; /** * Listen for the flag riding on the host's `lightdash:sdk:ready`. Called by * `createPostMessageTransport()`; a no-op outside the browser (SSR/tests that * never create a postMessage transport keep the default `false`). One * listener per bundle — re-mounting replaces the previous listener rather * than stacking. */ export declare function mountDeliveryRender(targetWindow: Window): () => void; /** * True inside delivery/preview capture renders. Gate DATA fetching on this — * mount every tab's/slide's data hooks and show only the active one — never * mount all tabs unconditionally on interactive loads. * * const deliveryRender = useDeliveryRender(); * return (deliveryRender || activeTab === 'summary') && ; */ export declare function useDeliveryRender(): boolean; /** * Non-hook accessor for event handlers and other post-boot code. Do NOT call * at module init: the flag arrives from the host after the iframe loads, so * a read before then always returns false. Components should use the hook, * which re-renders when the flag arrives. */ export declare function isDeliveryRender(): boolean; /** * Test-only seam: drops the listener and the shared store so the next mount * re-reads the default `false`. */ export declare function resetDeliveryRenderState(): void;