/** Pages with a section-nav STRIP on top of the global hub header * (dev-center roadmap/delivery/tickets, FAQ category-pill nav). * Anchor lands BELOW both layers. */ export declare const STICKY_HEADER_OFFSET_PX = 96; /** Pages with only the global hub header (docs, blog, vendor detail). * Anchor lands BELOW the header bar. */ export declare const HUB_HEADER_OFFSET_PX = 80; /** * Take only the FIRST hash segment from a fragment that may contain extra * `#` characters. `'' → ''`, `'#a' → '#a'`, `'#a#b' → '#a'`. * * No real DOM id contains `#`, so a multi-fragment hash is always a bug at * the composer site; `navigateSamePageHash` + `useScrollToHash` both call * this so URL bar and `getElementById` stay in sync. */ export declare function normalizeHashFragment(hash: string): string; /** * Resolve the DOM element a hash fragment id points at — THE hash resolver; * `navigateSamePageHash`, `useScrollToHash` and the markdown link renderer * all go through this one, so a fragment that resolves for a deep link * resolves for an in-body click too. * * Three passes, cheapest first: * 1. the raw id (ordinary anchors — the overwhelming common case); * 2. the percent-decoded form — href composers like `buildTicketOpenHref` * encode the id into the fragment while rows render the raw id, so * `#ticket-a%2Fb` must still find `id="ticket-a/b"`. A malformed escape * sequence just falls through; * 3. a NORMALIZED match against the document's headings — doc bodies are * authored on GitHub, whose slugger keeps the hyphen left behind by a * stripped emoji (`## 📚 Table of Contents` → `#-table-of-contents`) * while our ids trim it. Without this every in-body TOC link in every * GitHub-authored doc resolves to nothing and clicking one does nothing. * See `utils/anchor-id`. */ export declare function getHashTargetElement(id: string): HTMLElement | null; export interface NavigateSamePageHashOptions { /** Pixels to subtract for sticky chrome. */ headerOffset?: number; /** `'push'` (default) — new history entry; `'replace'` — overwrite * current entry (use for TOC-style in-page navigators). */ history?: 'push' | 'replace'; } /** * Same-page hash navigation primitive: pushState + synthetic `hashchange` * + anchoring-proof smooth scroll. Replaces `router.push` for hash CTAs * (Next.js suppresses smooth-scroll during navigation; `router.push` on * an exact-URL match is a no-op). Returns `true` when the helper claimed * the nav (same pathname + search); `false` for cross-page targets so * callers fall through to `router.push`. * * `target` accepts an origin-stripped path (`/x#anchor`) or a bare hash * (`#anchor`); bare-hash callers don't need to reconstruct `pathname + * search` themselves. */ export declare function navigateSamePageHash(target: string, options?: NavigateSamePageHashOptions): boolean; //# sourceMappingURL=same-page-hash-nav.d.ts.map