packageDocumentation module import * as React from "react" ; internal export const useTargeted = ( ref ) => { const [ targeted , setTargeted ] = React . useState ( false ) ; React . useEffect ( ( ) => { const handleDocumentPointerMove = ( e ) => { setTargeted ( ! ! ref . current && ! ! e . target && ( e . target instanceof Node ) && ref . current . contains ( e . target ) ) ; } ; document . addEventListener ( "pointermove" , handleDocumentPointerMove ) ; return ( ) => { document . removeEventListener ( "pointermove" , handleDocumentPointerMove ) ; } ; } , [ ref ] ) ; return targeted ; } ;