{"version":3,"file":"ShineSlideFX.BUnTIJFE.mjs","names":[],"sources":["https:/framerusercontent.com/modules/b0kkYh90JkMQy3Xtluyr/OaoiPOOS5Xssg7CWLuJM/ShineSlideFX.js"],"sourcesContent":["// Shine slide effect overlay component to be placed in absolute position over other components\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{motion,useMotionValue,useTransform,animate}from\"framer-motion\";import{useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function ShineSlideFX(props){const{shineColor=\"#FFFFFF\",shineWidth=100,duration=2,delay=0,loop=true,angle=45,opacity=.5}=props;const x=useMotionValue(-shineWidth);useEffect(()=>{const controls=animate(x,[-(shineWidth*2),window.innerWidth+shineWidth],{duration,delay,repeat:loop?Infinity:0,repeatDelay:delay,ease:\"easeInOut\"});return()=>controls.stop();},[x,shineWidth,duration,delay,loop]);const gradientX=useTransform(x,value=>`${value}px`);return /*#__PURE__*/_jsx(motion.div,{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",pointerEvents:\"none\",overflow:\"hidden\"},children:/*#__PURE__*/_jsx(motion.div,{style:{position:\"absolute\",top:0,left:gradientX,width:`${shineWidth}px`,height:\"100%\",background:`linear-gradient(${angle}deg, transparent 0%, ${shineColor} 50%, transparent 100%)`,opacity,transform:`skewX(${angle-90}deg)`}})});}addPropertyControls(ShineSlideFX,{shineColor:{type:ControlType.Color,title:\"Shine Color\",defaultValue:\"#FFFFFF\"},shineWidth:{type:ControlType.Number,title:\"Shine Width\",defaultValue:100,min:20,max:300,step:10,unit:\"px\"},opacity:{type:ControlType.Number,title:\"Opacity\",defaultValue:.5,min:0,max:1,step:.1},angle:{type:ControlType.Number,title:\"Angle\",defaultValue:45,min:0,max:360,step:15,unit:\"deg\"},duration:{type:ControlType.Number,title:\"Duration\",defaultValue:2,min:.5,max:10,step:.5,unit:\"s\"},delay:{type:ControlType.Number,title:\"Delay\",defaultValue:0,min:0,max:5,step:.5,unit:\"s\"},loop:{type:ControlType.Boolean,title:\"Loop\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ShineSlideFX\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ShineSlideFX.map"],"mappings":"8PAIG,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,aAAW,UAAU,aAAW,IAAI,WAAS,EAAE,QAAM,EAAE,OAAK,GAAK,QAAM,GAAG,UAAQ,IAAI,EAAY,EAAE,EAAe,CAAC,EAAW,CAAC,MAAc,CAAC,IAAM,EAAS,EAAQ,EAAE,CAAC,EAAE,EAAW,GAAG,EAAO,WAAW,EAAW,CAAC,CAAC,WAAS,QAAM,OAAO,EAAK,IAAS,EAAE,YAAY,EAAM,KAAK,YAAY,CAAC,CAAC,UAAU,EAAS,MAAM,EAAG,CAAC,EAAE,EAAW,EAAS,EAAM,EAAK,CAAC,CAAC,IAAM,EAAU,EAAa,EAAE,GAAO,GAAG,EAAM,IAAI,CAAC,OAAoB,EAAK,EAAO,IAAI,CAAC,MAAM,CAAC,SAAS,WAAW,IAAI,EAAE,KAAK,EAAE,MAAM,OAAO,OAAO,OAAO,cAAc,OAAO,SAAS,SAAS,CAAC,SAAsB,EAAK,EAAO,IAAI,CAAC,MAAM,CAAC,SAAS,WAAW,IAAI,EAAE,KAAK,EAAU,MAAM,GAAG,EAAW,IAAI,OAAO,OAAO,WAAW,mBAAmB,EAAM,uBAAuB,EAAW,yBAAyB,UAAQ,UAAU,SAAS,EAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,sBAH3zB,IAAsE,IAA6B,IAAoD,CAGsqB,EAAoB,EAAa,CAAC,WAAW,CAAC,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