{"version":3,"file":"CrossCompInteractions_Prod.BUroU4A2.mjs","names":["useRef","useState","__esmMin","init_npm_react_18_3_1","se","window","init_ssg_sandbox_shims","ce","init_jsx_runtime","_e","de","useInView","init_framer_motion_DhsWWWsN","init_framer_CaDWdxiz","addPropertyControls","RenderTarget","ControlType","_define_property","key","obj","value","CrossCompInteractions","containerRef","isInView","offScreenIsInView","props","useTrigger","clonedContent","useTarget","isReactElement","cloneWithVariant","InteractionManager","init_CrossCompInteractions_Prod","parent","domEvent","handleInteraction","setClonedContent","nativeComponent","cycleStateRef","lastUpdateTimeRef","isInitializedRef","mode","sizeAdjustedContent","component","componentWidth","componentHeight","findPropertyControls","element","variantControl","getDefaultVariant","defaultVariant","newVariantCycles","interactionVariants","pair","startIndex","options","initialContent","cyclingPairs","cycle","handleVariantChange","now","interactionId","matchingPair","nextIndex","nextVariant","newContent","interactionManager","listeners","listener","el","hasVariantProp","hasChildrenProp","newProps","targetVariant","variant","l"],"sources":["https:/framerusercontent.com/modules/5al7X0wNtaoDRZccWNoK/tyLpwCeg78T6S7A7wpsn/CrossCompInteractions_Prod.js"],"sourcesContent":["function _define_property(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}import{jsx as _jsx}from\"react/jsx-runtime\";import{ControlType,addPropertyControls,RenderTarget}from\"framer\";import{useEffect,useRef,cloneElement,useState,useInsertionEffect}from\"react\";import{useInView}from\"framer-motion\";// ------------------------------------------------------------ //\n// PROPERTY CONTROLS\n// ------------------------------------------------------------ //\naddPropertyControls(CrossCompInteractions,{mode:{type:ControlType.Enum,title:\"Mode\",options:[\"trigger\",\"target\"],optionTitles:[\"Trigger\",\"Target\"],defaultValue:\"trigger\",displaySegmentedControl:true},//----------------------------- trigger ----------------------------- //\ninteractionId:{type:ControlType.String,title:\"ID\",defaultValue:\"interaction-1\",hidden:props=>props.mode===\"target\"},interaction:{type:ControlType.Enum,title:\"On\",options:[\"mouseEnter\",\"mouseLeave\",\"mouseDown\",\"click\",\"appear\"],optionTitles:[\"Mouse Enter\",\"Mouse Leave\",\"Click Start\",\"Click\",\"Appear\"],defaultValue:\"click\",hidden:props=>props.mode===\"target\"},offScreen:{type:ControlType.Enum,title:\"Off Screen\",options:[\"play\",\"pause\"],optionTitles:[\"Play\",\"Pause\"],defaultValue:\"pause\",displaySegmentedControl:true,hidden:props=>props.mode===\"target\"||props.interaction!==\"appear\"},delay:{type:ControlType.Number,title:\"Delay\",defaultValue:0,min:0,max:10,step:.1,unit:\"s\",displayStepper:true,hidden:props=>props.mode===\"target\"},//----------------------------- target ----------------------------- //\nnativeComponent:{type:ControlType.ComponentInstance,title:\"Component\",hidden:props=>props.mode===\"trigger\"},componentWidth:{type:ControlType.Enum,title:\"Width\",options:[\"default\",\"fill\"],optionTitles:[\"Default\",\"Fill\"],defaultValue:\"default\",displaySegmentedControl:true,segmentedControlDirection:\"vertical\",hidden:props=>props.mode===\"trigger\"},componentHeight:{type:ControlType.Enum,title:\"Height\",options:[\"default\",\"fill\"],optionTitles:[\"Default\",\"Fill\"],defaultValue:\"default\",displaySegmentedControl:true,segmentedControlDirection:\"vertical\",hidden:props=>props.mode===\"trigger\"},interactionVariants:{type:ControlType.Array,title:\"Interactions\",control:{type:ControlType.Object,controls:{interactionId:{type:ControlType.String,title:\"ID\",defaultValue:\"interaction-1\"},repeat:{type:ControlType.Enum,title:\"Repeat\",options:[\"once\",\"cycle\"],optionTitles:[\"Once\",\"Cycle\"],defaultValue:\"once\",displaySegmentedControl:true},variant:{type:ControlType.String,title:\"Variant\",placeholder:\"Variant 2\",hidden:props=>props.repeat===\"cycle\",description:\"Exact name of the variant you want to switch to.\"}}},defaultValue:[{interactionId:\"interaction-1\",variant:\"\"}],hidden:props=>props.mode===\"trigger\"}});// ------------------------------------------------------------ //\n// DEFAULT PROPS\n// ------------------------------------------------------------ //\nCrossCompInteractions.defaultProps={mode:\"trigger\",// trigger\ninteraction:\"click\",interactionId:\"interaction-1\",offScreen:\"pause\",delay:0,// target\nnativeComponent:null,componentWidth:\"default\",componentHeight:\"default\",interactionVariants:[{interactionId:\"interaction-1\",variant:\"\",repeat:\"once\"}]};// ------------------------------------------------------------ //\n// MAIN COMPONENT\n// ------------------------------------------------------------ //\n/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerIntrinsicWidth 400\n * @framerIntrinsicHeight 200\n * @framerDisableUnlink\n */export default function CrossCompInteractions(props){const isOnFramerCanvas=RenderTarget.hasRestrictions();const containerRef=useRef(null);const isInView=useInView(containerRef,{once:false,amount:\"some\"});const offScreenIsInView=props.offScreen===\"pause\"?isInView:true;// Use custom hooks\nuseTrigger({mode:props.mode,containerRef:containerRef,interactionId:props.interactionId,variant:\"\",interaction:props.interaction,isInView:offScreenIsInView,delay:props.delay});const clonedContent=useTarget(props.mode,props.nativeComponent,props.interactionVariants,props.componentWidth,props.componentHeight);return /*#__PURE__*/_jsx(\"div\",{id:`${props.interactionId}-${props.mode}`,ref:containerRef,style:{width:\"100%\",height:\"100%\"},children:/*#__PURE__*/_jsx(\"div\",{style:{width:props.componentWidth===\"default\"?\"fit-content\":\"100%\",height:props.componentHeight===\"default\"?\"fit-content\":\"100%\",display:\"flex\"},children:clonedContent})});}const useTrigger=props=>{useEffect(()=>{if(props.mode!==\"trigger\"||!props.containerRef.current)return;const subparent=props.containerRef.current.parentElement;const parent=subparent?.parentElement;if(!parent)return;// Handle \"appear\" interaction separately\nif(props.interaction===\"appear\"){if(props.isInView){setTimeout(()=>{InteractionManager.getInstance().trigger(props.interactionId,\"\");},props.delay*1e3)// Convert seconds to milliseconds\n;}return;}// Map Framer interaction types to DOM events\nconst eventMap={mouseEnter:\"mouseenter\",mouseLeave:\"mouseleave\",mouseDown:\"mousedown\",click:\"click\",appear:\"none\"};// Get the corresponding DOM event\nconst domEvent=eventMap[props.interaction];// Event handler function\nconst handleInteraction=()=>{setTimeout(()=>{InteractionManager.getInstance().trigger(props.interactionId,\"\");},props.delay*1e3)// Convert seconds to milliseconds\n;};// Add event listener only for non-appear interactions\nif(domEvent!==\"none\"){parent.addEventListener(domEvent,handleInteraction);// Cleanup function to remove event listener\nreturn()=>{parent.removeEventListener(domEvent,handleInteraction);};}},[props.mode,props.interactionId,props.interaction,props.isInView,props.containerRef,props.delay]);};const useTarget=(mode,nativeComponent,interactionVariants,componentWidth,componentHeight)=>{const[clonedContent,setClonedContent]=useState(nativeComponent);const cycleStateRef=useRef({});const lastUpdateTimeRef=useRef({});const isInitializedRef=useRef({});const DEBOUNCE_TIME=50// ms\n;// Pre-render width and height adjustment using useInsertionEffect\nuseInsertionEffect(()=>{if(mode!==\"target\"||!nativeComponent.length)return;const sizeAdjustedContent=nativeComponent.map(component=>{if(!isReactElement(component))return component;return /*#__PURE__*/cloneElement(component,{// @ts-expect-error this is Framer layer\nstyle:{// @ts-expect-error this is Framer layer\n...component.props.style,width:componentWidth===\"fill\"?\"100%\":component.props.width,height:componentHeight===\"fill\"?\"100%\":component.props.height}});});setClonedContent(sizeAdjustedContent);},[mode,nativeComponent,componentWidth,componentHeight]);// Clear interaction manager on mount in preview mode, but only once\nuseEffect(()=>{if(typeof window!==\"undefined\"&&window.location.href.includes(\"framercanvas.com\")){InteractionManager.clearPreviewOnce();}},[]);// Extract all available variants from the target component\nuseEffect(()=>{if(mode!==\"target\"||!nativeComponent.length)return;const findPropertyControls=element=>{if(!element)return null;if(element.type?.propertyControls?.variant?.options&&element.type?.propertyControls?.variant?.optionTitles){return element.type.propertyControls.variant;}if(element.props?.children){return findPropertyControls(element.props.children);}return null;};const variantControl=findPropertyControls(nativeComponent[0]);if(!variantControl){return;}const{options}=variantControl;// Get the default variant from the component props\nconst getDefaultVariant=component=>{if(!component)return undefined;if(component.props?.variant)return component.props.variant;if(component.props?.children)return getDefaultVariant(component.props.children);return undefined;};const defaultVariant=getDefaultVariant(nativeComponent[0]);// Initialize variant cycles for each interaction\nconst newVariantCycles={};interactionVariants.forEach(pair=>{if(pair.repeat===\"cycle\"){// Find the index of the default variant\nconst startIndex=defaultVariant?options.indexOf(defaultVariant):0;newVariantCycles[pair.interactionId]={currentIndex:startIndex>=0?startIndex:0,variants:options};}});cycleStateRef.current=newVariantCycles;// Apply initial variants for cycling interactions\n// First ensure we have size-adjusted content\nconst sizeAdjustedContent=nativeComponent.map(component=>{if(!isReactElement(component))return component;return /*#__PURE__*/cloneElement(component,{// @ts-expect-error this is Framer layer\nstyle:{// @ts-expect-error this is Framer layer\n...component.props.style,width:componentWidth===\"fill\"?\"100%\":component.props.width,height:componentHeight===\"fill\"?\"100%\":component.props.height}});});// Then apply cycling variants while preserving size adjustments and respecting default variant\nconst initialContent=sizeAdjustedContent.map(component=>{const cyclingPairs=interactionVariants.filter(pair=>pair.repeat===\"cycle\");if(cyclingPairs.length>0){// For cycling variants, keep the default variant\ncyclingPairs.forEach(pair=>{const cycle=newVariantCycles[pair.interactionId];if(cycle&&cycle.variants.length>0){isInitializedRef.current[pair.interactionId]=true;if(defaultVariant){// Keep the default variant\n// @ts-expect-error this is Framer layer\ncomponent=cloneWithVariant(component,defaultVariant,componentWidth,componentHeight);}}});}return component;});setClonedContent(initialContent);},[mode,nativeComponent,interactionVariants,componentWidth,componentHeight]);useEffect(()=>{if(mode!==\"target\")return;const handleVariantChange=interactionId=>{const now=Date.now();const lastUpdate=lastUpdateTimeRef.current[interactionId]||0;// Debounce check\nif(now-lastUpdate<DEBOUNCE_TIME){return;}lastUpdateTimeRef.current[interactionId]=now;// Find the matching variant pair for this interaction ID\nconst matchingPair=interactionVariants.find(pair=>pair.interactionId===interactionId);if(!matchingPair){return;}// Handle cycling if repeat is \"cycle\"\nif(matchingPair.repeat===\"cycle\"){const cycle=cycleStateRef.current[interactionId];if(!cycle||!cycle.variants||cycle.variants.length===0){return;}// Calculate next index\nconst nextIndex=(cycle.currentIndex+1)%cycle.variants.length;const nextVariant=cycle.variants[nextIndex];// First ensure we have size-adjusted content\nconst sizeAdjustedContent=nativeComponent.map(component=>{if(!isReactElement(component))return component;return /*#__PURE__*/cloneElement(component,{// @ts-expect-error this is Framer layer\nstyle:{// @ts-expect-error this is Framer layer\n...component.props.style,width:componentWidth===\"fill\"?\"100%\":component.props.width,height:componentHeight===\"fill\"?\"100%\":component.props.height}});});// Then apply the next variant while preserving size adjustments\nconst newContent=sizeAdjustedContent.map(component=>cloneWithVariant(component,nextVariant,componentWidth,componentHeight));setClonedContent(newContent);// Update the ref\ncycleStateRef.current={...cycleStateRef.current,[interactionId]:{...cycle,currentIndex:nextIndex}};}else{// First ensure we have size-adjusted content\nconst sizeAdjustedContent=nativeComponent.map(component=>{if(!isReactElement(component))return component;return /*#__PURE__*/cloneElement(component,{// @ts-expect-error this is Framer layer\nstyle:{// @ts-expect-error this is Framer layer\n...component.props.style,width:componentWidth===\"fill\"?\"100%\":component.props.width,height:componentHeight===\"fill\"?\"100%\":component.props.height}});});// Then apply the variant while preserving size adjustments\nconst newContent=sizeAdjustedContent.map(component=>cloneWithVariant(component,matchingPair.variant,componentWidth,componentHeight));setClonedContent(newContent);}};// Only set initial content if not already initialized and has cycling variants\nconst hasUninitializedCycles=interactionVariants.some(pair=>pair.repeat===\"cycle\"&&!isInitializedRef.current[pair.interactionId]);if(hasUninitializedCycles){// First apply size adjustments\nconst sizeAdjustedContent=nativeComponent.map(component=>{if(!isReactElement(component))return component;return /*#__PURE__*/cloneElement(component,{// @ts-expect-error this is Framer layer\nstyle:{// @ts-expect-error this is Framer layer\n...component.props.style,width:componentWidth===\"fill\"?\"100%\":component.props.width,height:componentHeight===\"fill\"?\"100%\":component.props.height}});});setClonedContent(sizeAdjustedContent);}// Get interaction manager instance\nconst interactionManager=InteractionManager.getInstance();// Store listeners for cleanup\nconst listeners={};// Register listeners for all interaction IDs\ninteractionVariants.forEach(pair=>{const listener=()=>handleVariantChange(pair.interactionId);listeners[pair.interactionId]=listener;interactionManager.addListener(pair.interactionId,listener);});// Cleanup listeners on unmount\nreturn()=>{Object.entries(listeners).forEach(([interactionId,listener])=>{interactionManager.removeListener(interactionId,listener);});};},[nativeComponent,mode,interactionVariants,componentWidth,componentHeight]);return clonedContent;};// ------------------------------------------------------------ //\n// HELPERS\n// ------------------------------------------------------------ //\n// Type guard to ensure we're working with a ReactElement\nconst isReactElement=el=>{return el&&typeof el===\"object\"&&\"props\"in el;};// Clone with variant function\nconst cloneWithVariant=(element,targetVariant,componentWidth,componentHeight)=>{// Early return for non-element nodes\nif(!isReactElement(element)){return element;}// Type guard for variant props\nconst hasVariantProp=props=>{return props&&typeof props===\"object\"&&\"variant\"in props;};// Type guard for children props\nconst hasChildrenProp=props=>{return props&&typeof props===\"object\"&&\"children\"in props;};// Check if this element has a variant prop\nif(hasVariantProp(element.props)){const newProps={...element.props,variant:targetVariant,style:{...element.props.style,width:componentWidth===\"fill\"?\"100%\":element.props.width,height:componentHeight===\"fill\"?\"100%\":element.props.height}};// Clone children recursively\nnewProps.children=element.props.children?cloneWithVariant(element.props.children,targetVariant,componentWidth,componentHeight):element.props.children;return /*#__PURE__*/cloneElement(element,newProps);}// If it has children, recursively clone them\nif(hasChildrenProp(element.props)){return /*#__PURE__*/cloneElement(element,{...element.props,style:{...element.props.style,width:componentWidth===\"fill\"?\"100%\":element.props.width,height:componentHeight===\"fill\"?\"100%\":element.props.height},children:cloneWithVariant(element.props.children,targetVariant,componentWidth,componentHeight)});}return element;};class InteractionManager{static getInstance(){if(!InteractionManager.instance){InteractionManager.instance=new InteractionManager;}return InteractionManager.instance;}addListener(interactionId,listener){if(!this.listeners[interactionId]){this.listeners[interactionId]=[];}// Add instanceId to help with cleanup\nconst wrappedListener=variant=>{if(InteractionManager.instanceId===this.getCurrentInstanceId()){listener(variant);}};this.listeners[interactionId].push(wrappedListener);}removeListener(interactionId,listener){if(!this.listeners[interactionId])return;this.listeners[interactionId]=this.listeners[interactionId].filter(l=>l!==listener);// Clean up empty listener arrays\nif(this.listeners[interactionId].length===0){delete this.listeners[interactionId];}}clearAllListeners(){this.listeners={};// Generate new instance ID to invalidate old listeners\nInteractionManager.instanceId=Math.random().toString(36).substring(7);}getCurrentInstanceId(){return InteractionManager.instanceId;}trigger(interactionId,variant){if(!this.listeners[interactionId])return;this.listeners[interactionId].forEach(listener=>listener(variant));}static clearPreviewOnce(){if(!InteractionManager.isPreviewCleared){InteractionManager.getInstance().clearAllListeners();InteractionManager.isPreviewCleared=true;}}constructor(){_define_property(this,\"listeners\",{});// Listen for preview reloads\nif(typeof window!==\"undefined\"){window.addEventListener(\"unload\",()=>{this.clearAllListeners();});}}}_define_property(InteractionManager,\"instance\",void 0);_define_property(InteractionManager,\"instanceId\",Math.random().toString(36).substring(7));_define_property(InteractionManager,\"isPreviewCleared\",false);CrossCompInteractions.displayName=\"Cross Comp Interactions\";\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CrossCompInteractions\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\",\"framerIntrinsicWidth\":\"400\",\"framerIntrinsicHeight\":\"200\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CrossCompInteractions_Prod.map"],"mappings":"A,wQAAA,SAASiB,EAAiB,EAAI,EAAI,EAAM,CAAmI,OAA/HC,KAAOC,EAAK,OAAO,eAAeA,EAAID,EAAI,CAAO,QAAM,WAAW,GAAK,aAAa,GAAK,SAAS,EAAI,CAAC,EAAQ,EAAIA,GAAKE,EAAcD,CAAI,CAmBnL,SAAwBE,EAAsB,EAAM,CAAwBN,EAAa,gBAAgB,EAAE,IAAMO,EAAatB,EAAO,IAAI,EAAQuB,EAASZ,EAAUW,EAAa,CAAC,KAAK,GAAM,OAAO,MAAM,CAAC,EAAQE,EAAkBC,EAAM,YAAY,SAAQF,EAClQG,EAAW,CAAC,KAAKD,EAAM,KAAkB,eAAa,cAAcA,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