--- // ReadingProgress — scroll-position bar. One instance per page. // // Renders the same markup the legacy `full-guide/index.html` line 13 // carried: `
`. // The scroll listener is registered with `{ passive: true }`, matching // app.js line 406 and the rule in `.agents/rules/animation.md` that a // passive listener is required for any handler bound to a frequently // fired event like scroll. Animating `width` here is fine — the bar // is a 3px element at the very top of the viewport, so layout cost // is negligible compared to the alternative of subscribing to // IntersectionObserver and computing progress from a single sentinel // per section. // // Language: this island does not read language. It has no string // labels and the same progress semantics apply to EN and PT. interface Props { // Optional override selector. Defaults to `.reading-progress span` // to match the legacy app.js query, in case a page renders the bar // with a different class name. target?: string; } const { target = '.reading-progress span' } = Astro.props; ---