/** * @fileoverview Simplified viewport visibility hook — returns a boolean. * @author Saasflare™ * @module packages/ui/hooks/use-in-view * @package ui * * @example * const ref = useRef(null); * const inView = useInView(ref); * return
; */ import { type RefObject } from 'react'; import { type UseIntersectionObserverOptions } from './use-intersection-observer'; /** * Returns `true` when the referenced element is visible in the viewport. * Simplified wrapper around {@link useIntersectionObserver}. * * @param {RefObject} ref - The element to watch * @param {UseIntersectionObserverOptions} [options] - Observer options * @returns {boolean} Whether the element is currently in view * * @example * const heroRef = useRef(null); * const heroVisible = useInView(heroRef, { threshold: 0.5, triggerOnce: true }); */ export declare function useInView(ref: RefObject, options?: UseIntersectionObserverOptions): boolean;