"use strict";/*! * v-spotlight v2.1.0 * (c) 2024 Vinayak Kulkarni * @license MIT */Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),i="transparent 160px, rgba(0, 0, 0, 0.9) 200px)",u=o.defineComponent({__name:"VSpotlight",setup(s){const r=o.ref(null),n=o.ref(i);o.onMounted(()=>{window.addEventListener("mousemove",e=>{t(e)}),window.addEventListener("mousedown",e=>{e.button===0&&(n.value="transparent 130px, rgba(0, 0, 0, 0.95) 150px)",t(e))}),window.addEventListener("mouseup",e=>{n.value=i,t(e)})}),o.onUnmounted(()=>{window.removeEventListener("mousemove",e=>{t(e)}),window.removeEventListener("mousedown",e=>{t(e)}),window.removeEventListener("mouseup",e=>{n.value=i,t(e)})});const t=e=>{r.value&&(r.value.style.backgroundImage=`radial-gradient(circle at ${e.pageX/window.innerWidth*100}% ${e.pageY/window.innerHeight*100}%, ${n.value}`)};return(e,v)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"spotlight",ref:r,class:"radial pointer-events-none absolute h-screen w-screen"},null,512))}}),d=(s,r)=>{const n=s.__vccOpts||s;for(const[t,e]of r)n[t]=e;return n},l=d(u,[["__scopeId","data-v-5d88262e"]]);let a=!1;const c=s=>{a||(s.component("VSpotlight",l),a=!0)},p=c;exports.VSpotlight=l;exports.default=p; //# sourceMappingURL=v-spotlight.cjs.map