import type { ReactNode } from 'react' import type { AnalyticsProps } from '../analytics/Analytics.js' import type { ConsentCookieMap } from '../consent/useConsent.js' import type { LightboxProviderProps } from '../lightbox/LightboxProvider.js' import type { PageStatsProps } from '../stats/PageStats.js' import type { SiteShell } from './createContentHelpers.js' import { Analytics } from '../analytics/Analytics.js' import { ConsentProvider } from '../consent/ConsentContext.js' import { CookieBanner } from '../consent/CookieBanner.js' import { CookieButton } from '../consent/CookieButton.js' import { LightboxProvider } from '../lightbox/LightboxProvider.js' import { JsonLdGraph } from '../seo/JsonLdGraph.js' import { PageStats } from '../stats/PageStats.js' import { MediaPreconnect } from '../storage/MediaPreconnect.js' import { ThemeScript } from '../theme/ThemeScript.js' import { TurnstileProvider } from '../turnstile/TurnstileProvider.js' export type SiteProvidersProps = { /** `defer` etc. for ; `false` = no analytics tags at all. */ analytics?: false | Omit /** The cookie banner. Default ``; pass your own configured one (`equalChoice`, classNames) or `false`. */ banner?: false | ReactNode children: ReactNode /** The "cookie settings" button. Default ``; your own or `false`. */ cookieButton?: false | ReactNode /** Extra cookies per category to delete when consent is withdrawn. */ cookieMap?: ConsentCookieMap /** More site-wide JSON-LD nodes next to shell.jsonLd (e.g. buildNavigationJsonLd). */ jsonLd?: (null | Record | undefined)[] /** * One shared image lightbox for the site: mounts around the * page, so every and `RenderRichText lightbox` uses it. * `true` (texts from shell.lightboxTexts = Notifications → Lightbox) or * `{ texts, classNames, icons, loop, unstyled }`. Default off. For renderImage / renderDialog (functions) mount the provider * yourself in a client component. */ lightbox?: boolean | Omit /** Consent log endpoint, e.g. '/api/ipal/consent' (ipalKit consentLog: true). */ logEndpoint?: string /** * CSP nonce for a nonce-based policy (createProxy `csp`): read it in the layout * with `(await headers()).get('x-nonce')`. Goes on the theme script and on the * analytics tags the plugin injects (GTM passes it on to its own tags). */ nonce?: null | string /** to the media origin (R2_PUBLIC_URL). Default true. */ preconnect?: boolean /** getSiteShell(locale) from lib/content. */ shell: SiteShell /** * Built-in statistics (ipalKit stats: true): mounts . `true` or * `{ locale, endpoint }`. Default off. */ stats?: boolean | PageStatsProps /** * Light / dark theme from Site Settings → Theme: renders first, * so the theme is on before the first paint. Put first in * and add `suppressHydrationWarning` to . Default false. */ theme?: boolean } /** * The wiring every [locale] layout repeats — consent, Turnstile, analytics, * site JSON-LD, media preconnect — in the right order (Analytics inside the * consent provider, forms inside Turnstile). Renders no markup of its own: * , , header, footer and
stay in the layout. * * const shell = await getSiteShell(locale) * * }> *
{children}