{"version":3,"file":"shared-lib.DSiTpV7B.mjs","names":["useState","useRef","useMemo","_Fragment","metadata","siteMetadata","metadataVersion","__FramerMetadata__","metadata","siteMetadata"],"sources":["https:/framerusercontent.com/modules/ieQ3b3Ni9ZS4mMNTgXbW/o2QBRMY1tRXO2j618lLF/HoverImageReveal.js","https:/framerusercontent.com/modules/wDcNTu1dbNUoK3wXizXP/I8aNBZfJyWRq5x0hKwwy/siteMetadata.js","https:/framerusercontent.com/modules/d0VkEZizAaegRMbQVLNK/cUOg0cmiHEt53KLg0wEy/augiA20Il.js","https:/framerusercontent.com/modules/OGsnOJJamnW6Sb128Cwh/2pAeHd8GnH2lSuAC7yZ0/PM_qYJ5Ep.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useState,useMemo,useRef}from\"react\";import{motion,AnimatePresence}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";import{createPortal}from\"react-dom\";/**\n * Hover Image Reveal Component\n *\n * Inline text with hoverable words that reveal images.\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function HoverImageReveal(props){const[hoveredIndex,setHoveredIndex]=useState(null);const wordRefs=useRef({});const hoverWords=useMemo(()=>{return props.hoverWords||[];},[props.hoverWords]);// Compute current position based on the hovered word ref\nconst currentPosition=useMemo(()=>{if(hoveredIndex===null||!wordRefs.current[hoveredIndex]){return null;}const rect=wordRefs.current[hoveredIndex].getBoundingClientRect();return{top:rect.top+props.imageOffsetY,left:rect.left+rect.width/2+props.imageOffsetX};},[hoveredIndex,props.imageOffsetX,props.imageOffsetY]);const getTransition=()=>{if(props.animationType===\"spring\"){return{type:\"spring\",stiffness:300,damping:25};}return{type:\"tween\",ease:\"easeOut\",duration:props.animationDuration};};const renderText=()=>{const{text}=props;if(!text)return null;// Sort hover words by length (longest first) to avoid partial matches\nconst sortedWords=[...hoverWords].sort((a,b)=>b.word.length-a.word.length);// Build regex pattern for all hover words\nconst patterns=sortedWords.map(w=>w.word.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\"));const regex=new RegExp(`(${patterns.join(\"|\")})`,\"g\");// Split text by hover words\nconst parts=text.split(regex);return parts.map((part,index)=>{const wordIndex=hoverWords.findIndex(w=>w.word===part);if(wordIndex!==-1){const isHovered=hoveredIndex===wordIndex;return /*#__PURE__*/_jsx(\"span\",{ref:el=>{wordRefs.current[wordIndex]=el;},onMouseEnter:()=>setHoveredIndex(wordIndex),onMouseLeave:()=>setHoveredIndex(null),style:{cursor:\"pointer\",color:isHovered?props.hoverTextColor:props.hoverableTextColor,backgroundColor:isHovered?props.hoverBackground:\"transparent\",transition:\"color 0.2s, background-color 0.2s\",display:\"inline\"},children:part},`hover-${index}`);}// Handle newlines as line breaks\nreturn part.split(\"\\n\").map((line,lineIdx,arr)=>/*#__PURE__*/_jsxs(\"span\",{children:[line,lineIdx<arr.length-1&&/*#__PURE__*/_jsx(\"br\",{})]},`line-${index}-${lineIdx}`));});};return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",...props.textFont,color:props.textColor,lineHeight:\"1.5\",whiteSpace:\"pre-wrap\"},children:renderText()}),typeof window!==\"undefined\"&&/*#__PURE__*/createPortal(/*#__PURE__*/_jsx(AnimatePresence,{children:hoveredIndex!==null&&currentPosition&&/*#__PURE__*/_jsx(motion.div,{style:{position:\"fixed\",top:currentPosition.top,left:currentPosition.left,transform:\"translate(-50%, -100%)\",zIndex:9999,pointerEvents:\"none\"},initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:getTransition(),children:/*#__PURE__*/_jsx(\"div\",{style:{maxWidth:props.maxImageWidth,maxHeight:props.maxImageHeight,backgroundColor:\"transparent\"},children:/*#__PURE__*/_jsx(\"img\",{src:hoverWords[hoveredIndex].image?.src||[\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",\"https://framerusercontent.com/images/aNsAT3jCvt4zglbWCUoFe33Q.jpg\",\"https://framerusercontent.com/images/BYnxEV1zjYb9bhWh1IwBZ1ZoS60.jpg\"][hoveredIndex],alt:hoverWords[hoveredIndex].image?.alt||`Image ${hoveredIndex+1}`,style:{maxWidth:\"100%\",maxHeight:props.maxImageHeight,width:\"auto\",height:\"auto\",objectFit:\"contain\",display:\"block\",boxShadow:props.hoverImageShadow||\"0 8px 32px rgba(0, 0, 0, 0.2)\"}})})},`image-${hoveredIndex}`)}),document.body)]});}addPropertyControls(HoverImageReveal,{text:{type:ControlType.String,title:\"Text Content\",defaultValue:\"This is a paragraph where you can hover over specific words to reveal images. You can also hover over other highlighted terms to see different visuals. Try hovering over this final word to see the last image appear above the text.\\n\\nYou can create new paragraphs by pressing Enter twice.\",displayTextArea:true},hoverWords:{type:ControlType.Array,title:\"Hover Words\",maxCount:10,defaultValue:[{word:\"specific words\",image:{src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Image 1\"}},{word:\"other highlighted terms\",image:{src:\"https://framerusercontent.com/images/aNsAT3jCvt4zglbWCUoFe33Q.jpg\",alt:\"Image 2\"}},{word:\"this final word\",image:{src:\"https://framerusercontent.com/images/BYnxEV1zjYb9bhWh1IwBZ1ZoS60.jpg\",alt:\"Image 3\"}}],control:{type:ControlType.Object,controls:{word:{type:ControlType.String,title:\"Word/Phrase\",defaultValue:\"hover word\"},image:{type:ControlType.ResponsiveImage,title:\"Image\"}}}},textFont:{type:ControlType.Font,title:\"Text Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"18px\",variant:\"Regular\",letterSpacing:\"-0.01em\",lineHeight:\"1.5em\"}},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},hoverableTextColor:{type:ControlType.Color,title:\"Hoverable Word Color\",defaultValue:\"#0066FF\"},hoverTextColor:{type:ControlType.Color,title:\"Hover Text Color\",defaultValue:\"#0066FF\"},hoverBackground:{type:ControlType.Color,title:\"Hover Background\",defaultValue:\"rgba(0, 102, 255, 0.1)\"},maxImageWidth:{type:ControlType.Number,title:\"Max Image Width\",defaultValue:400,min:100,max:800,step:10,unit:\"px\"},maxImageHeight:{type:ControlType.Number,title:\"Max Image Height\",defaultValue:300,min:100,max:600,step:10,unit:\"px\"},imageOffsetX:{type:ControlType.Number,title:\"Image Offset X\",defaultValue:0,min:-300,max:300,step:10,unit:\"px\"},imageOffsetY:{type:ControlType.Number,title:\"Image Offset Y\",defaultValue:-12,min:-200,max:50,step:10,unit:\"px\"},animationType:{type:ControlType.Enum,title:\"Animation\",options:[\"spring\",\"ease\"],optionTitles:[\"Spring\",\"Ease\"],defaultValue:\"spring\",displaySegmentedControl:true},animationDuration:{type:ControlType.Number,title:\"Duration\",defaultValue:.3,min:.1,max:1,step:.1,unit:\"s\",hidden:({animationType})=>animationType===\"spring\"},hoverImageShadow:{type:ControlType.BoxShadow,title:\"Hover Image Shadow\",defaultValue:\"0 8px 32px rgba(0, 0, 0, 0.2)\"}});HoverImageReveal.displayName=\"Hover Image Reveal\";\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"HoverImageReveal\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./HoverImageReveal.map","// Generated by Framer (265a357)\nexport default function metadata(params,activeLocale){return{description:\"Made with Framer\",robots:\"max-image-preview:large\",socialImage:\"https://framerusercontent.com/assets/p2Qvsn3s6hxNC5Yz3vl9Mhmbs.png\",title:\"My Framer Site\"};}export const metadataVersion=1;\nexport const __FramerMetadata__ = {\"exports\":{\"metadataVersion\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","// Generated by Framer (265a357)\nimport siteMetadata from\"#framer/local/siteMetadata/siteMetadata/siteMetadata.js\";export default function metadata(params,activeLocale){return{breakpoints:[{hash:\"72rtr7\"}],description:siteMetadata(params,activeLocale).description,elements:{},robots:\"max-image-preview:large\",serializationId:\"framer-9aIbO\",title:siteMetadata(params,activeLocale).title||\"Home\",viewport:\"width=1440\"};}export const metadataVersion=1;\nexport const __FramerMetadata__ = {\"exports\":{\"metadataVersion\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","// Generated by Framer (265a357)\nimport siteMetadata from\"#framer/local/siteMetadata/siteMetadata/siteMetadata.js\";export default function metadata(params,activeLocale){return{breakpoints:[{hash:\"a4klev\"}],description:siteMetadata(params,activeLocale).description,elements:{},robots:\"max-image-preview:large\",serializationId:\"framer-FjqrZ\",title:siteMetadata(params,activeLocale).title||\"Preview\",viewport:\"width=1440\"};}export const metadataVersion=1;\nexport const __FramerMetadata__ = {\"exports\":{\"metadataVersion\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"0RAOG,SAAwB,EAAiB,EAAM,CAAC,GAAK,CAAC,EAAa,GAAiBA,EAAS,KAAK,CAAO,EAASC,EAAO,EAAE,CAAC,CAAO,EAAWC,MAAoB,EAAM,YAAY,EAAE,CAAG,CAAC,EAAM,WAAW,CAAC,CACzM,EAAgBA,MAAY,CAAC,GAAG,IAAe,MAAM,CAAC,EAAS,QAAQ,GAAe,OAAO,KAAM,IAAM,EAAK,EAAS,QAAQ,GAAc,uBAAuB,CAAC,MAAM,CAAC,IAAI,EAAK,IAAI,EAAM,aAAa,KAAK,EAAK,KA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