PageSourceSearch

https://mstdn.social/packs/useSelectableClick-JYr_1CvO.js

js mstdn.social collected 2026-09-24 08:36:11 UTC 603 bytes, 2 lines download raw bytes

1import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{t}from"./react-C21x__mS.js";var n=e(t()),r=(e,t=5)=>{let r=(0,n.useRef)(null);return[(0,n.useCallback)(e=>{r.current=[e.clientX,e.clientY]},[]),(0,n.useCallback)(n=>{if(!r.current)return;let[i,a]=r.current,[o,s]=[Math.abs(n.clientX-i),Math.abs(n.clientY-a)],c=n.target;for(;c&&c instanceof HTMLElement;){if(c.localName===`button`||c.localName===`a`||c.localName===`label`)return;c=c.parentNode}o+s<t&&(n.button===0||n.button===1)&&n.detail>=1&&e(n),r.current=null},[t,e])]};export{r as t};
2//# sourceMappingURL=useSelectableClick-JYr_1CvO.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.