import { ReactNode } from 'react'; import type { SettingsContextProps } from '@10up/headless-core/react'; import type { SWRConfiguration } from 'swr'; /** * The props supported by {@link HeadlessApp}. */ export type HeadlessAppProps = { /** * Supported settings by the framework. Such as custom image component, custom link component etc. * * @see {@link SettingsContextProps} */ settings: SettingsContextProps; /** * Pass any configuration to the SWR library. Globally. * * These settings can be overriden at the hook level. */ swrConfig: SWRConfiguration; /** * The page props from next.js. It should contain `fallback`, `themeJson` and other props. * * Those props are added when using `fetchHookData` and `addHookData` * * @see {@link fetchHookData} * @see {@link addHookData} */ pageProps: any; /** * If true, will make the Yoast component use the `yoast_head` raw html to populate meta tags * instead of `yoast_head_json`. * * `yoast_head` is the default and preferable option. */ useYoastHtml?: boolean; children?: ReactNode; }; /** * The HeadlessApp component is the top level component for the Headless framework. * * Should be used in `pages/_app.js` * * ## Usage * * ```tsx * import { HeadlessApp } from "@10up/headless-next"; * * const MyApp = ({ Component, pageProps }) => { * const { fallback = {}, themeJson = {}, ...props } = pageProps; * * return ( * * * * * * ); * }; * * export default MyApp; * ``` * * @param props Component props. See {@link HeadlessAppProps} * * @category React Components */ export declare function HeadlessApp({ settings, children, pageProps, swrConfig, useYoastHtml, }: HeadlessAppProps): JSX.Element;