import { type ElementType, type ReactElement, type ReactNode } from "react"; import type { Docs } from "../../docs/docs.js"; import { type DocsHeroAction, type DocsHeroVariant } from "./DocsHero.js"; /** * Props for {@link DocsIndex}. */ export interface DocsIndexProps { /** The configured `Docs` instance. The topics, the dates and the SEO are derived from it. */ docs: Docs; /** Which language's docs to list. Defaults to the docs' default locale. */ lang?: string; /** Element used for every link. Defaults to `"a"`; pass `next/link` for client-side nav. */ linkComponent?: ElementType; /** Hero heading. Defaults to the localized `"Documentation"` label; the brand is not used. */ title?: string; /** Hero subtitle. Defaults to the site `description`. */ description?: string; /** Hero call-to-action buttons. None by default - the index does not invent a destination. */ actions?: DocsHeroAction[]; /** How the hero is framed - `"plain"` (the default) or the gradient `"card"`. */ heroVariant?: DocsHeroVariant; /** Replaces the built-in hero entirely (e.g. your own heading + search box). */ header?: ReactNode; /** Rendered between the hero and the topic grid - the slot for your own "start here" band. */ children?: ReactNode; /** Set `false` to drop the hero's article/topic/updated fact row. */ showStats?: boolean; /** Set `false` to drop the topic grid's filter box. */ filter?: boolean; /** How many pages each topic card lists. Defaults to `3`. */ pagesPerTopic?: number; /** How many rows the recently-updated list shows. Defaults to `5`; `0` drops the section. */ recentCount?: number; /** Accent cycle for the topic cards. */ accents?: string[]; /** * Optional override for how a page's `icon` name is rendered on a topic card. Receives the * front-matter `icon` value (or `undefined`) and returns the icon node. Defaults to the * built-in icon set. Resolved to an ELEMENT here, before it reaches the client-side grid. */ renderIcon?: (name: string | undefined) => ReactNode; } /** * The packaged docs landing page: {@link DocsHero}, then anything you pass as `children`, then * {@link DocsTopicGrid} and {@link DocsRecentlyUpdated} - every section wired from one `Docs` * instance, in the arrangement the components were designed for. * * This is the CONVENIENCE path, not the only one. Each section is exported on its own and takes * plain data, so a consumer who wants their own order, their own extra bands, or only one of the * three composes them directly and never renders this. Use `children` for the common case of one * hand-built band (a "start here" row) between the hero and the topics. * * Topics come from the nav tree: one card per GROUP, or per TAB when its groups are unlabelled * (the shape a small corpus with no `group:` front-matter has). The card's icon is its first * page's, and its blurb is the tab/group config `description`. * * @param props - see {@link DocsIndexProps}. * @returns the docs index page. */ export declare function DocsIndex({ docs, lang, linkComponent, title, description, actions, heroVariant, header, children, showStats, filter, pagesPerTopic, recentCount, accents, renderIcon, }: DocsIndexProps): ReactElement;