interface UseScrollSpyOptions { /** * CSS selector for elements to observe (e.g., "h1, h2, h3") */ selector?: string; /** * Root margin for Intersection Observer (e.g., "-100px 0px -66%") */ rootMargin?: string; /** * Threshold for Intersection Observer (0-1) */ threshold?: number | number[]; /** * Offset from top of viewport to consider element active */ offset?: number; /** * Whether scroll spy is enabled */ enabled?: boolean; /** * Container element to scope element detection and use as root for Intersection Observer. * If provided, only elements within this container will be observed, and scrolling * will be tracked relative to this container's viewport. * If not provided, uses document viewport (default behavior). */ container?: HTMLElement | null; } interface UseScrollSpyReturn { /** * Currently active element ID (first visible item for backward compatibility) */ activeId: string | null; /** * Array of all visible element IDs in viewport */ visibleIds: string[]; /** * Manually set the active ID (overrides scroll spy) */ setActiveId: (id: string | null) => void; } /** * Hook to detect which element is currently in viewport using Intersection Observer * Supports manual override via setActiveId */ export declare function useScrollSpy({ selector, rootMargin, threshold, offset, enabled, container, }?: UseScrollSpyOptions): UseScrollSpyReturn; export {}; //# sourceMappingURL=use-scroll-spy.d.ts.map