import type { Metadata } from "next"; import { type PageMetaFields } from "@pantheon-systems/puck-css/seo"; export type { PageMetaFields }; /** * Site-wide fallbacks from the site's SeoMetadata payload, for the fields a * site can sensibly default. They resolve below the page's own values. */ export interface SiteMetaDefaults { ogImage?: string; ogLocale?: string; } /** * Head-side metadata inputs. Title, description, and canonical are derived from * the page (root props, request path); siteName and the site defaults arrive * from the site's SeoMetadata payload. */ export interface PageHeadMetadata { title?: string; description?: string; canonicalUrl?: string; siteName?: string; siteDefaults?: SiteMetaDefaults; meta?: PageMetaFields; } /** * Maps head metadata to the page's `` Metadata. Next replaces (not * deep-merges) a page's openGraph over the layout's, so og:type and the env * og:site_name fallback must be declared here. A relative canonical is emitted * only when NEXT_PUBLIC_SITE_URL is configured to resolve it — otherwise Next * would resolve it against a localhost default, and a wrong canonical is worse * than none. An empty title is treated as absent. * * Social tags resolve as: page value → site default (og:image, og:locale) → * derived from title/description → omit. There is no separate template tier: * a template's defaults are copied into the page's own `_meta` at create time, * so by the time they reach here they are page values and outrank the site * default. A field the template left empty is copied in as an empty string, * which is falsy, so it still falls through to the site tier. */ export declare function buildPageMetadata({ seo, path, }: { seo?: PageHeadMetadata; path: string; }): Metadata;