import { h } from 'preact'; /** * useExposure - 检测元素是否由不可见到可见 * @param {Function} onExpose - 元素由不可见到可见时的回调函数 * @param {Object} options - IntersectionObserver 配置选项 * eg: * const options = { root: null, // 使用视口作为参照物 rootMargin: '0px', // 不使用边缘 threshold: 0.6 // 曝光比例阈值 }; * @returns {Object} ref - 传递给需要检测的 DOM 元素的 ref */ declare const useExposure: (onExpose: () => void, options?: { threshold: number; }) => import("preact/hooks").MutableRef; declare function ExposeElement({ elementTag, src, children, handleExposure, className, imgStyle, ...restProps }: { className: string; elementTag?: 'Image' | 'View'; src?: string; children?: React.ReactNode; onClick?: (p: any) => void; handleExposure: () => void; style?: React.CSSProperties; imgStyle?: React.CSSProperties; }): h.JSX.Element; export { ExposeElement, useExposure };