import type { ReactNode } from "react"; import type { GeistdocsVersionConfig, GeistdocsVersionsConfig } from "./config"; import { type GeistdocsVersionPaths } from "./internal/version-paths.js"; export type { GeistdocsVersionPaths } from "./internal/version-paths.js"; export interface GeistdocsRouteSelectItem { description?: string; /** * Landing path (relative to `routePrefix`) when neither the switched path * nor any of its ancestors exist in `paths`. */ fallbackPath?: string; href?: string; icon?: ReactNode; id: string; label: string; /** * Paths (relative to `routePrefix`) that exist for this item. When * provided, switching falls back to the nearest existing ancestor instead * of landing on a page that doesn't exist in the target version. */ paths?: readonly string[]; routePrefix?: string; } interface ResolveRouteHrefOptions { currentItem?: Item; item: Item; pathname: string; } interface ResolveVersionHrefOptions { currentVersion?: GeistdocsVersionConfig; pathname: string; version: GeistdocsVersionConfig; } interface GeistdocsRouteSelectProps { ariaLabel?: string; className?: string; current?: string; getDescription?: (context: { active: boolean; item: Item; }) => ReactNode; items: Item[]; renderIcon?: (context: { active: boolean; item: Item; }) => ReactNode; } interface GeistdocsVersionSelectProps { className?: string; current?: string; /** * Existing paths per version ID, relative to each version's `routePrefix`. * Compute server-side with `collectVersionSwitchPaths` (or * `collectVersionPaths`) from `@vercel/geistdocs/source`. When provided, * switching to a version that lacks the current page lands on the nearest * existing ancestor (or the version's `fallbackPath`) instead of a 404. */ paths?: Record; versions: GeistdocsVersionConfig[] | GeistdocsVersionsConfig; } export declare const resolveRouteHref: ({ currentItem, item, pathname, }: ResolveRouteHrefOptions) => string; export declare const resolveVersionHref: ({ currentVersion, pathname, version, }: ResolveVersionHrefOptions) => string; export declare const GeistdocsRouteSelect: ({ ariaLabel, className, current, getDescription, items, renderIcon, }: GeistdocsRouteSelectProps) => import("react/jsx-runtime").JSX.Element | null; export declare const GeistdocsVersionSelect: ({ className, current, paths, versions, }: GeistdocsVersionSelectProps) => import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=versions.d.ts.map