{"version":3,"file":"Image_Reveal.DTaUWiIP.mjs","names":[],"sources":["https:/framerusercontent.com/modules/LNZgxGMI61F4u0N3XrpG/KL81l7QCpIUPiZ1LTgqb/Image_Reveal.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";/**\n * @framerDisableUnlink\n *\n * @framerIntrinsicWidth 800\n * @framerIntrinsicHeight 450\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function ImageRevealGrid(props){const{image,gridSize,animationDuration,gridOverlayColor,revealDirection,altText}=props;const totalCells=gridSize*gridSize;// If no image is provided, show the empty state\nif(!image){return /*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",flexDirection:\"column\",alignItems:\"center\",justifyContent:\"center\",backgroundColor:\"#f5f5f5\",borderRadius:\"8px\",border:\"1px dashed #ccc\",padding:\"20px\",boxSizing:\"border-box\",color:\"#666\",fontFamily:\"sans-serif\",textAlign:\"center\"},children:[/*#__PURE__*/_jsx(\"h3\",{style:{margin:\"0 0 8px 0\",fontSize:\"18px\",fontWeight:\"500\"},children:\"No Image Selected\"}),/*#__PURE__*/_jsx(\"p\",{style:{margin:\"0\",fontSize:\"14px\",maxWidth:\"300px\",lineHeight:\"1.4\"},children:\"Please select an image to see the grid reveal animation effect.\"})]});}const createDelayArray=(size,duration,direction)=>{const delayIncrement=duration/(size*2);let delays=[];for(let row=0;row<size;row++){for(let col=0;col<size;col++){let delay;switch(direction){case\"topLeft\":delay=(row+col)*delayIncrement;break;case\"topRight\":delay=(row+(size-col-1))*delayIncrement;break;case\"centerTop\":delay=(Math.abs(row-size/2)+Math.abs(col-size/2))*delayIncrement;break;case\"centerBottom\":delay=(Math.abs(row-(size-1)/2)+Math.abs(col-(size-1)/2))*delayIncrement;break;case\"bottomLeft\":delay=(size-row-1+col)*delayIncrement;break;case\"bottomRight\":delay=(size-row-1+(size-col-1))*delayIncrement;break;default:delay=(row+col)*delayIncrement;break;}delays.push(delay);}}return delays;};const cellDelays=createDelayArray(gridSize,animationDuration,revealDirection);return /*#__PURE__*/_jsxs(motion.div,{style:{width:\"100%\",height:\"100%\",position:\"relative\",overflow:\"hidden\"},initial:{opacity:0},whileInView:{opacity:1},children:[/*#__PURE__*/_jsx(motion.img,{src:image,alt:altText,style:{width:\"100%\",height:\"100%\",objectFit:\"cover\",filter:\"blur(16px)\"},animate:{filter:\"blur(0px)\"},transition:{duration:animationDuration}}),/*#__PURE__*/_jsx(motion.div,{style:{position:\"absolute\",top:0,left:0,bottom:0,right:0,zIndex:1,display:\"grid\",gridTemplateRows:`repeat(${gridSize}, 1fr)`,gridTemplateColumns:`repeat(${gridSize}, 1fr)`},children:cellDelays.map((delay,index)=>/*#__PURE__*/_jsx(motion.div,{style:{backgroundColor:gridOverlayColor},initial:{opacity:1},// animate={{ opacity: 0 }}\n    whileInView:{opacity:0},transition:{delay,duration:animationDuration/2}},index))})]});}addPropertyControls(ImageRevealGrid,{image:{title:\"Image\",type:ControlType.Image},altText:{title:\"Alt Text\",type:ControlType.String,defaultValue:\"Your Image Alt Text\"},animationDuration:{title:\"Duration\",type:ControlType.Number,defaultValue:1,step:.1},gridSize:{title:\"Grid\",type:ControlType.Number,defaultValue:10,max:100},gridOverlayColor:{title:\"Background Color\",type:ControlType.Color,defaultValue:\"#000000\"},revealDirection:{title:\"Direction\",type:ControlType.Enum,defaultValue:\"topLeft\",options:[\"topLeft\",\"topRight\",\"centerTop\",\"bottomLeft\",\"bottomRight\"],optionTitles:[\"Top Left\",\"Top Right\",\"Center\",\"Bottom Left\",\"Bottom Right\"]}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ImageRevealGrid\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"*\",\"framerSupportedLayoutHeight\":\"any\",\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\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