/** Reactive `window.scrollY > threshold`, evaluated after mount (passive listener). */ export function useScrolledPast(threshold: number) { const past = ref(false); const on = () => (past.value = window.scrollY > threshold); onMounted(() => { on(); window.addEventListener("scroll", on, { passive: true }); }); onBeforeUnmount(() => window.removeEventListener("scroll", on)); return past; }