import { type AnchorHTMLAttributes, type ReactNode, type Ref } from 'react';
import type { RouteHref } from './route-types.js';
/** When to warm the target route's bundle. */
export type LinkPrefetch = boolean | 'hover' | 'viewport' | 'none';
/**
* Props for {@link Link}.
*
* Every anchor attribute is forwarded, so `className`, `aria-*`, `rel`, and
* `target` behave exactly as they do on a plain ``.
*/
export interface LinkProps extends Omit, 'href'> {
/**
* Destination URL. Relative paths resolve against the current document.
*
* Narrowed to the project's real routes once `.ruvyxa/types/routes.d.ts` is
* generated and included by `tsconfig.json`; plain `string` otherwise. Wrap a
* URL computed at runtime in `route()` to satisfy the narrowed type.
*/
href: RouteHref;
/** Replace the current history entry instead of pushing a new one. */
replace?: boolean;
/** Scroll to the top after navigating. Defaults to `true`. */
scroll?: boolean;
/** Animate this navigation with the browser View Transitions API when available. */
viewTransition?: boolean;
/**
* Warm the destination bundle ahead of the click.
*
* `"hover"` (the default) waits for pointer or keyboard focus. `"viewport"`
* warms as soon as the link is scrolled into view. `false` and `"none"`
* disable it.
*/
prefetch?: LinkPrefetch;
children?: ReactNode;
ref?: Ref;
}
/**
* Navigate between Ruvyxa routes without a document load.
*
* Renders a real ``, so the link is crawlable, middle-clickable, and
* still works before hydration or with JavaScript disabled. Client-side
* navigation is a progressive enhancement layered on top of that.
*
* @example
* ```tsx
* import { Link } from "@ruvyxa/react"
*
* export default function Nav() {
* return (
*
* )
* }
* ```
*/
export declare function Link({ href, replace, scroll, viewTransition, prefetch, children, onClick, onMouseEnter, onFocus, target, ref, ...rest }: Readonly): import("react").JSX.Element;
//# sourceMappingURL=link.d.ts.map