import * as react from 'react'; import { ComponentPropsWithoutRef } from 'react'; import { A as AnimationOptions } from './types-CQ3qrMsE.mjs'; /** AOS hook 選項 */ type UseAOSScopeOptions = Partial; /** * 建立並管理指定容器內的 AOS 動畫 * * @example * ```tsx "use client"; import {useAOSScope} from '@/aos'; export default function Demo() { const {containerRef} = useAOSScope() return (
Hello AOS
) } * ``` */ declare function useAOSScope( /** 預設動畫選項 */ options?: UseAOSScopeOptions): { containerRef: react.RefObject; }; /** 區塊元素標籤 */ type BlockElementTag = "address" | "article" | "aside" | "blockquote" | "canvas" | "dd" | "div" | "dl" | "dt" | "fieldset" | "figcaption" | "figure" | "footer" | "form" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "header" | "hr" | "li" | "main" | "nav" | "noscript" | "ol" | "p" | "pre" | "section" | "table" | "tfoot" | "ul" | "video"; type AOSProviderProps = { /** * 要渲染的 HTML 元素標籤。 * * 如果未提供或非區塊元素,預設會渲染 `
`。 * * @default "div" * * @see https://www.w3schools.com/html/html_blocks.asp */ component?: T; /** * 讓子元素繼承的預設動畫參數 * * > 注意:預設選項只作用於後續生成的動畫,這是刻意設計的行為。 */ options?: UseAOSScopeOptions; } & ComponentPropsWithoutRef; /** * 為子元素提供自動 AOS 動畫能力。 * * 所有帶有 `data-aos` 屬性的子元素都會自動生成動畫。 */ declare function AOSProvider({ component, options, children, ...props }: AOSProviderProps): react.DetailedReactHTMLElement, "component" | "children" | "options"> & { ref: react.RefObject; }, HTMLElement>; export { AOSProvider, useAOSScope };