import * as react from 'react'; import { HTMLAttributes, ReactNode } from 'react'; interface IndexListItem { /** Row marker — `"01"`, `"1."`. Rendered tabular so the column aligns. */ num?: ReactNode; /** The row's subject, and the link text when `href` is set. */ title: ReactNode; /** Secondary text after the title. */ meta?: ReactNode; /** Trailing value, pushed to the far end — a year, a count. */ value?: ReactNode; /** Makes the whole row clickable. See the note on nested anchors. */ href?: string; /** Stable key. Defaults to the index. */ id?: string; } interface IndexListProps extends Omit, "children"> { items: IndexListItem[]; /** * Render an `` for `href`. Pass your router's link (Inertia `Link`, * `next/link`) to keep client-side navigation. It receives `href`, * `className` and `children`. */ linkAs?: React.ElementType; } /** * A flush-left numbered index — `num · title · meta · trailing value`, each row * optionally a single clickable target. * * Thirteen gallery styles build this, and the sandbox uses a `stretched-link` * treatment in twenty-four places. * * ## Exactly one anchor per row, by construction * * The row is `relative` and the title's `` carries `after:absolute * after:inset-0`, so the anchor's own pseudo-element covers the row. The * alternative — wrapping the row in an `` and putting more links inside — * produces nested anchors, which is issue #418: the browser silently * restructures that DOM, so the server HTML and the client tree disagree and * hydration blows up. A test asserts one anchor per row for that reason. * * The link text stays the title rather than becoming an `aria-label` on an * invisible overlay, so the accessible name is the thing you would say out loud. */ declare const IndexList: react.ForwardRefExoticComponent>; export { IndexList, type IndexListItem, type IndexListProps };