{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/f67cgTyjlvva1G8ifRZc/deQZh8RIa5hztCOroINC/BorderReveal_1.js"],
  "sourcesContent": ["// Animated border that transforms from left to right or top to bottom when in view, with arrow icon control for direction and full Framer animation control. Only triggers on layer in view.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useRef,useEffect,useState,startTransition}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";/**\n * BorderReveal\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight fixed\n */export default function BorderReveal(props){const{direction=\"leftToRight\",transition={type:\"tween\",ease:\"easeInOut\",duration:.7,delay:0},borderColor,size,borderRadius,replay=false,style}=props;const ref=useRef(null);const[inView,setInView]=useState(false);const[hasAnimated,setHasAnimated]=useState(false);const isStatic=useIsStaticRenderer();useEffect(()=>{if(isStatic){setInView(true);return;}const node=ref.current;if(!node)return;let observer=null;observer=new window.IntersectionObserver(([entry])=>{if(replay){startTransition(()=>setInView(entry.isIntersecting));}else{if(entry.isIntersecting&&!hasAnimated){startTransition(()=>setInView(true));setHasAnimated(true);}}},{threshold:0});observer.observe(node);return()=>{if(observer&&node)observer.unobserve(node);};},[isStatic,replay,hasAnimated]);return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{...style,position:\"relative\",width:direction===\"leftToRight\"?\"100%\":size,height:direction===\"leftToRight\"?size:\"100%\",minWidth:5,minHeight:5,overflow:\"hidden\",borderRadius,background:\"transparent\"},children:/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",left:direction===\"leftToRight\"?0:undefined,top:direction===\"topToBottom\"?0:undefined,width:direction===\"leftToRight\"?inView?\"100%\":0:size,height:direction===\"topToBottom\"?inView?\"100%\":0:size,background:borderColor,borderRadius,transition:transition.type===\"tween\"?`${direction===\"leftToRight\"?\"width\":\"height\"} ${transition.duration??.7}s ${transition.ease===\"linear\"?\"linear\":transition.ease===\"easeIn\"?\"cubic-bezier(0.4,0,1,1)\":transition.ease===\"easeOut\"?\"cubic-bezier(0,0,0.2,1)\":transition.ease===\"easeInOut\"?\"cubic-bezier(0.4,0,0.2,1)\":\"cubic-bezier(0.4,0,0.2,1)\"} ${transition.delay??0}s`:transition.type===\"spring\"?undefined:undefined},\"aria-hidden\":\"true\"})});}addPropertyControls(BorderReveal,{direction:{type:ControlType.Enum,title:\"Direction\",options:[\"leftToRight\",\"topToBottom\"],optionTitles:[\"\u2192\",\"\u2193\"],defaultValue:\"leftToRight\",displaySegmentedControl:true},replay:{type:ControlType.Boolean,title:\"Replay\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\"},transition:{type:ControlType.Transition,title:\"Animation\"},borderColor:{type:ControlType.Color,title:\"Border Color\",defaultValue:\"#222\"},size:{type:ControlType.Number,title:\"Size\",defaultValue:4,min:1,max:40,step:1,unit:\"px\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:2,min:0,max:20,step:1,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BorderReveal\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BorderReveal_1.map"],
  "mappings": "qKAMkB,SAARA,EAA8BC,EAAM,CAAC,GAAK,CAAC,UAAAC,EAAU,cAAc,WAAAC,EAAW,CAAC,KAAK,QAAQ,KAAK,YAAY,SAAS,GAAG,MAAM,CAAC,EAAE,YAAAC,EAAY,KAAAC,EAAK,aAAAC,EAAa,OAAAC,EAAO,GAAM,MAAAC,CAAK,EAAEP,EAAYQ,EAAIC,EAAO,IAAI,EAAO,CAACC,EAAOC,CAAS,EAAEC,EAAS,EAAK,EAAO,CAACC,EAAYC,CAAc,EAAEF,EAAS,EAAK,EAAQG,EAASC,EAAoB,EAAE,OAAAC,E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C,CAAC,CAAE,CAACsB,EAAoBzB,EAAa,CAAC,UAAU,CAAC,KAAK0B,EAAY,KAAK,MAAM,YAAY,QAAQ,CAAC,cAAc,aAAa,EAAE,aAAa,CAAC,SAAI,QAAG,EAAE,aAAa,cAAc,wBAAwB,EAAI,EAAE,OAAO,CAAC,KAAKA,EAAY,QAAQ,MAAM,SAAS,aAAa,GAAM,aAAa,MAAM,cAAc,IAAI,EAAE,WAAW,CAAC,KAAKA,EAAY,WAAW,MAAM,WAAW,EAAE,YAAY,CAAC,KAAKA,EAAY,MAAM,MAAM,eAAe,aAAa,MAAM,EAAE,KAAK,CAAC,KAAKA,EAAY,OAAO,MAAM,OAAO,aAAa,EAAE,IAAI,EAAE,IAAI,GAAG,KAAK,EAAE,KAAK,IAAI,EAAE,aAAa,CAAC,KAAKA,EAAY,OAAO,MAAM,SAAS,aAAa,EAAE,IAAI,EAAE,IAAI,GAAG,KAAK,EAAE,KAAK,IAAI,CAAC,CAAC",
  "names": ["BorderReveal", "props", "direction", "transition", "borderColor", "size", "borderRadius", "replay", "style", "ref", "pe", "inView", "setInView", "ye", "hasAnimated", "setHasAnimated", "isStatic", "useIsStaticRenderer", "ue", "node", "observer", "window", "entry", "Z", "p", "addPropertyControls", "ControlType"]
}
