import type { NavigationOptions, NavigationTarget, Params, Router, SearchParams, State } from "@real-router/core"; /** * Resolved navigation channels for a `` — the single `{ name, params, * search }` shape every adapter feeds into `buildHref` / `navigateWithHash` / * the active-route source, regardless of which prop form the consumer used. */ export interface ResolvedLinkTarget { name: string; params: Params | undefined; search: SearchParams | undefined; } /** * Collapses a ``'s two prop forms (RFC-4 M2 B2, #1548) into one channel * triple: * * - **Descriptor** — `to={{ name, params?, search? }}` (a `NavigationTarget`). * - **Channel props** — `routeName` + `routeParams?` + `routeSearch?`. * * The forms are mutually exclusive: the TS union on each adapter's `LinkProps` * rejects mixing them at compile time, and this helper is the runtime backstop — * when `to` is present it **wins**, and a `dev`-visible `console.warn` fires if * channel props were also supplied (a JS consumer, an object spread, or an * adapter without a strict union can still slip both through). `routeOptions` / * `hash` are separate props under BOTH forms (hash is not part of * `NavigationTarget` — #532), so they are resolved by the caller, not here. */ export declare function resolveLinkTarget(to: NavigationTarget | undefined, routeName: string, routeParams: Params | undefined, routeSearch: SearchParams | undefined): ResolvedLinkTarget; export declare function shouldNavigate(evt: MouseEvent): boolean; /** * Builds an href for a `` element. * * - Prefers the URL plugin's `buildUrl` (browser-plugin, navigation-plugin, * hash-plugin) when present. * - Falls back to `router.buildPath` for runtimes without a URL plugin * (memory-plugin, console UIs, NativeScript). In that fallback the hash * is appended manually so the rendered href is still correct. * - The optional 4th argument is the decoded hash fragment (no leading "#"; * `` is accepted defensively — leading "#" stripped), * passed positionally to mirror `navigateWithHash(router, name, params, hash)` * (#1442). Previous 3-arg call sites continue to work unchanged. */ export declare function buildHref(router: Router, routeName: string, routeParams: Params, routeSearch?: SearchParams, hash?: string): string | undefined; export declare function navigateWithHash(router: Router, routeName: string, routeParams: Params, routeSearch: SearchParams | undefined, hash: string | undefined, extraOptions?: NavigationOptions): Promise; export declare function buildActiveClassName(isActive: boolean, activeClassName: string | undefined, baseClassName: string | undefined): string | undefined; /** * One-level structural equality using `Object.is` per key. * * **String-keyed properties only (Mini-sprint E.3 — audit-5 §4.2 #3).** * Implementation walks `Object.keys()` which by spec returns only * enumerable own STRING keys. Symbol-keyed properties — created via * `obj[Symbol("brand")] = value` or `{ [Symbol(...)]: value }` — are * NOT compared. Two records that differ only in a Symbol-keyed value * will compare as equal. * * This is intentional: route params and Link options are documented as * string-keyed primitives (string | number | boolean) — Symbol-keyed * metadata (e.g. brand markers, private state) doesn't belong in a * cache-key comparison. Switching to `Reflect.ownKeys()` would extend * the contract to symbols at the cost of one extra allocation per call * (Reflect.ownKeys composes string-keys + symbol-keys arrays). If a * consumer relies on symbol-keyed metadata for navigation * disambiguation, they should encode it into a string key instead. * * Mirrors React's `shallowEqual` (packages/shared/shallowEqual.js) in * both the string-keys-only semantics and the `hasOwnProperty` guard * below. */ export declare function shallowEqual(prev: object | undefined, next: object | undefined): boolean; export declare function applyLinkA11y(element: HTMLElement | null | undefined): void;