PageSourceSearch

https://roceteer.com/assets/SectionNav-CPMAY9xk.js

js roceteer.com collected 2026-10-03 23:15:00 UTC 2,473 bytes, 1 lines download raw bytes

1import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{Y as t,p as n}from"./link-CoamKpRa.js";import{m as r}from"./button-BII5k2rH.js";import{K as i}from"./index-Dv1jwPhd.js";var a=e(t(),1),o=n(),s=128,c=({items:e})=>{let[t,n]=(0,a.useState)(e[0]?.id??``),[c,l]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let t=()=>{let t=e[0]?.id??``;for(let n of e){let e=document.getElementById(n.id);e&&e.getBoundingClientRect().top<=152&&(t=n.id)}n(t)};return t(),window.addEventListener(`scroll`,t,{passive:!0}),()=>window.removeEventListener(`scroll`,t)},[e]);let u=(e,t)=>{let n=document.getElementById(t);if(!n)return;e.preventDefault(),l(!1);let r=n.getBoundingClientRect().top+window.scrollY-s;window.scrollTo({top:r,behavior:`smooth`}),window.history.replaceState&&window.history.replaceState(null,``,`#${t}`)},d=e.find(e=>e.id===t)?.label??`On this page`;return(0,o.jsx)(`nav`,{"aria-label":`On this page`,className:`sticky top-20 md:top-24 z-30 mb-6 bg-background/95 py-2 backdrop-blur-md px-4 md:px-6`,children:(0,o.jsxs)(`div`,{className:`mx-auto max-w-6xl`,children:[(0,o.jsx)(`div`,{className:`hidden md:flex items-center gap-1 overflow-x-auto rounded-full border border-border/40 bg-background px-3 py-1.5`,children:e.map(e=>(0,o.jsx)(`a`,{href:`#${e.id}`,onClick:t=>u(t,e.id),"aria-current":t===e.id?`true`:void 0,className:r(`whitespace-nowrap rounded-full px-3 py-1.5 font-mono text-[0.68rem] uppercase tracking-[0.16em] transition-colors`,t===e.id?`text-primary`:`text-muted-foreground hover:text-foreground`),children:e.label},e.id))}),(0,o.jsxs)(`div`,{className:`md:hidden`,children:[(0,o.jsxs)(`button`,{type:`button`,onClick:()=>l(e=>!e),"aria-expanded":c,className:`flex w-full items-center justify-between rounded-2xl border border-border/40 bg-background/90 px-4 py-3 text-sm backdrop-blur-md`,children:[(0,o.jsxs)(`span`,{className:`truncate`,children:[(0,o.jsx)(`span`,{className:`text-muted-foreground`,children:`On this page · `}),(0,o.jsx)(`span`,{className:`text-primary`,children:d})]}),(0,o.jsx)(i,{className:r(`ml-3 h-4 w-4 shrink-0 transition-transform`,c&&`rotate-180`)})]}),c&&(0,o.jsx)(`ul`,{className:`mt-2 overflow-hidden rounded-2xl border border-border/40 bg-background/95 backdrop-blur-md`,children:e.map(e=>(0,o.jsx)(`li`,{children:(0,o.jsx)(`a`,{href:`#${e.id}`,onClick:t=>u(t,e.id),className:r(`block px-4 py-3 text-sm transition-colors`,t===e.id?`text-primary`:`text-foreground/80`),children:e.label})},e.id))})]})]})})};export{c as t};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.