/** based on framer-motion@4.1.17, Copyright (c) 2018 Framer B.V. */ import { PresenceContextProps } from "../../context/PresenceContext"; import { Readable } from 'svelte/store' export declare type SafeToRemove = () => void; declare type AlwaysPresent = [true, null]; declare type Present = [true]; declare type NotPresent = [false, SafeToRemove]; /** * When a component is the child of `AnimatePresence`, it can use `usePresence` * to access information about whether it's still present in the React tree. * * ```jsx * import { usePresence } from "framer-motion" * * const [isPresent, safeToRemove] = usePresence() * * * $: !isPresent && setTimeout(safeToRemove, 1000) * * * return
* } * ``` * * If `isPresent` is `false`, it means that a component has been removed the tree, but * `AnimatePresence` won't really remove it until `safeToRemove` has been called. * * @public */ export declare function usePresence(): Readable