{"version":3,"file":"PageFadeTransition.D9mnmvCS.mjs","names":["useState","useTransition","useMemo","useCallback"],"sources":["https:/framerusercontent.com/modules/Et7Rk7H9eBNNKsC3x6cH/IoghVtNLVmAOanWBQCnX/PageFadeTransition.js"],"sourcesContent":["// User request: Create a PageFadeTransition component that fades a fixed full-viewport overlay from black to transparent on mount/navigation, hides itself after fade, stays invisible in Framer canvas/static renderer, and exposes color/duration/delay controls.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{useCallback,useMemo,useState,useTransition}from\"react\";import{motion}from\"framer-motion\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function PageFadeTransition(props){const{color,duration,delay}=props;const isStaticRenderer=useIsStaticRenderer();const[isVisible,setIsVisible]=useState(true);const[,startTransition]=useTransition();const transition=useMemo(()=>({duration,delay,ease:\"easeOut\"}),[duration,delay]);const handleAnimationComplete=useCallback(()=>{startTransition(()=>setIsVisible(false));},[]);if(isStaticRenderer){return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:1,height:1,opacity:0,pointerEvents:\"none\"}});}if(!isVisible){return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:\"100%\",height:\"100%\"}});}return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:\"100%\",height:\"100%\"},children:/*#__PURE__*/_jsx(motion.div,{initial:{opacity:1},animate:{opacity:0},transition:transition,onAnimationComplete:handleAnimationComplete,style:{position:\"fixed\",inset:0,background:color,zIndex:9999,pointerEvents:\"none\"}})});}addPropertyControls(PageFadeTransition,{color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#000000\"},duration:{type:ControlType.Number,title:\"Duration\",defaultValue:.5,min:.1,max:3,step:.1},delay:{type:ControlType.Number,title:\"Delay\",defaultValue:0,min:0,max:2,step:.05}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PageFadeTransition\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PageFadeTransition.map"],"mappings":"wPAIG,SAAwB,EAAmB,EAAM,CAAC,GAAK,CAAC,QAAM,WAAS,SAAO,EAAY,EAAiB,EAAoB,EAAO,CAAC,EAAU,GAAcA,EAAS,EAAI,EAAO,EAAE,GAAiBC,EAAc,EAAQ,EAAWC,OAAa,CAAC,WAAS,QAAM,KAAK,SAAS,GAAG,CAAC,EAAS,CAAK,CAAC,EAAQ,EAAwBC,MAAgB,CAAC,MAAoB,EAAa,EAAK,CAAC,CAAE,EAAE,CAAC,CAAC,EAA+O,OAA1O,EAAsC,EAAK,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,cAAc,MAAM,CAAC,CAAC,EAAO,EAAyH,EAAK,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,MAAM,OAAO,OAAO,MAAM,EAAE,SAAsB,EAAK,EAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAa,aAAW,oBAAoB,EAAwB,MAAM,CAAC,SAAS,QAAQ,MAAM,EAAE,WAAW,EAAM,OAAO,KAAK,cAAc,MAAM,CAAC,CAAC,CAAC,CAAC,EAAnY,EAAK,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,MAAM,OAAO,OAAO,MAAM,CAAC,CAAC,CAAkU,iBAH14B,IAAwE,IAA8D,IAAkC,EAGmuB,EAAoB,EAAmB,CAAC,MAAM,CAAC,KAAK,EAAY,MAAM,MAAM,QAAQ,aAAa,SAAS,EAAE,SAAS,CAAC,KAAK,EAAY,OAAO,MAAM,WAAW,aAAa,GAAG,IAAI,GAAG,IAAI,EAAE,KAAK,EAAE,EAAE,MAAM,CAAC,KAAK,EAAY,OAAO,MAAM,QAAQ,aAAa,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,GAAG,CAAC,CAAC"}