/** * `` — render a document's canonical `PageSection[]` as a public * page body, and `` — render a post's header from its template * config + the post's own field values. * * SSR-first: both are plain components safe to render in React Server * Components. Each section is wrapped in a `
` carrying its background, * padding, and optional anchor id; the inner content comes from the resolved * renderer (see {@link getSectionRenderer}). */ import type { ReactNode } from 'react'; import { type PostHeaderConfig } from '@prenta/core/page-sections'; import type { PostContext, PublicSection, RenderOptions, SectionRendererMap } from './types.js'; import { type PublicTheme } from '@prenta/core/appearance'; export interface SectionsProps { /** The document's `data.sections` array. */ sections: PublicSection[]; /** Per-request post context (for post-oriented sections). */ ctx?: PostContext; /** * Per-render renderer overrides keyed by section type. Highest precedence — * beats globally registered renderers and the built-in defaults. */ renderers?: SectionRendererMap; /** Rendering options (e.g. an HTML sanitizer). */ options?: RenderOptions; /** * Site theme. Set fields override the stylesheet defaults on this stack. * Omit it, or pass an empty object, to keep the built-in palette. */ theme?: PublicTheme; } /** Render the visible sections of a document as a public page body. */ export declare function Sections({ sections, ctx, renderers, options, theme }: SectionsProps): ReactNode; export interface PostHeaderProps { config: PostHeaderConfig; ctx: PostContext; /** Rendering options (e.g. a `next/image`-backed image renderer). */ options?: RenderOptions; /** Site theme. Same tokens as {@link Sections}. */ theme?: PublicTheme; } /** * Public post header, driven by the post type's template `header` config * (layout + which fields to show) plus the post's own field values. */ export declare function PostHeader({ config, ctx, options, theme }: PostHeaderProps): ReactNode; //# sourceMappingURL=Sections.d.ts.map