{"version":3,"file":"FrameBeam.BFWSliOP.mjs","names":["__esmMin","z","p","c","init_jsx_runtime","ce","init_npm_react_18_3_1","useAnimation","motion","init_framer_motion_DhsWWWsN","addPropertyControls","Frame","init_framer_Bf4_tcb2","ControlType","Framebeam","animationControl","getGradientDefinition","beamLength","secondColor","firstColor","gradientDefinition","colorMode","speed","appearDelay","rotationDirection","sizeBehaviour","radius","borderWidth","connectedFrame","frameStyle","child","index","init_FrameBeam"],"sources":["https:/framerusercontent.com/modules/0aV8IO22JIYVmkzPFMtA/GHqaSjfW4Tn1261KIRsa/FrameBeam.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{Frame,addPropertyControls,ControlType}from\"framer\";import{motion,useAnimation}from\"framer-motion\";//Code component provided by Eleveight Supply™. All rights reserved 2024.\n/**\n * @framerDisableUnlink\n *\n * @framerIntrinsicWidth 200\n * @framerIntrinsicHeight 200\n *\n * @framerSupportedLayoutWidth 100%\n * @framerSupportedLayoutHeight 100%\n */export default function Framebeam({speed,borderWidth,beamLength,firstColor,secondColor,appearDelay,connectedFrame,radius,colorMode,rotationDirection,sizeBehaviour}){const animationControl=useAnimation();const getGradientDefinition=(firstColor,secondColor,beamLength)=>{const fadeStart=100-beamLength;return`transparent ${fadeStart}%, ${secondColor}, ${firstColor} 100%`;};React.useEffect(()=>{const effectiveSecondColor=colorMode===\"Solid\"?firstColor:secondColor;const gradientDefinition=getGradientDefinition(firstColor,effectiveSecondColor,beamLength);animationControl.set({opacity:0});setTimeout(()=>{animationControl.start({opacity:[0,1],transition:{duration:1,ease:\"ease-in\"}});animationControl.start({background:[`conic-gradient(from 0deg at 50% 50%, ${gradientDefinition})`,`conic-gradient(from ${rotationDirection===\"CounterClockwise\"?\"360deg\":\"360deg\"} at 50% 50%, ${gradientDefinition})`],transition:{duration:31-speed,ease:\"linear\",repeat:Infinity}});},appearDelay*1e3);return()=>animationControl.stop();},[animationControl,speed,appearDelay,firstColor,secondColor,beamLength,colorMode,rotationDirection]);const renderContent=()=>{if(!connectedFrame||connectedFrame.length===0){return /*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",backgroundColor:\"#221A34\",color:\"#fff\",borderRadius:\"20px\",zIndex:2,flexDirection:\"column\",textAlign:\"center\",padding:\"35px\",boxSizing:\"border-box\"},children:[/*#__PURE__*/_jsxs(\"svg\",{width:\"80\",height:\"100\",viewBox:\"0 0 305 241\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:[/*#__PURE__*/_jsx(\"path\",{d:\"M0 39C0 17.4609 17.4609 0 39 0H266C287.539 0 305 17.4609 305 39V202C305 223.539 287.539 241 266 241H39C17.4609 241 0 223.539 0 202V39Z\",fill:\"#9A66FF\",\"fill-opacity\":\"0.22\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M3 135L3 37C3 18.2223 18.2223 3.00004 37 3.00004L154.827 3.00003L251 3.00004\",stroke:\"url(#paint0_linear_830_1907)\",\"stroke-width\":\"5\",\"stroke-linecap\":\"square\"}),/*#__PURE__*/_jsx(\"defs\",{children:/*#__PURE__*/_jsxs(\"linearGradient\",{id:\"paint0_linear_830_1907\",x1:\"251\",y1:\"5.85924\",x2:\"7.84388\",y2:\"105.944\",gradientUnits:\"userSpaceOnUse\",children:[/*#__PURE__*/_jsx(\"stop\",{\"stop-color\":\"#9A66FF\"}),/*#__PURE__*/_jsx(\"stop\",{offset:\"0.699384\",\"stop-color\":\"#E11FED\"}),/*#__PURE__*/_jsx(\"stop\",{offset:\"1\",\"stop-color\":\"#FF00E6\",\"stop-opacity\":\"0\"})]})})]}),/*#__PURE__*/_jsx(\"div\",{style:{marginTop:\"8px\",color:\"#8658D8\",fontWeight:\"normal\",fontSize:\"12px\",fontFamily:\"Inter, sans-serif\",textAlign:\"center\",width:\"300px\"},children:\"Connect to your frame, then adjust the various styling options from the property controls panel.\"})]});}else{const frameStyle=sizeBehaviour===\"Fit Frame\"?{}// No additional styling to fit frame\n:{width:\"100%\",height:\"100%\"}// Ensure connected frame fills the container\n;return connectedFrame.map((child,index)=>/*#__PURE__*/React.cloneElement(child,{key:index,style:{...frameStyle,...child.props.style}}));}};return /*#__PURE__*/_jsxs(Frame,{background:\"\",style:{width:sizeBehaviour===\"Fit Frame\"?\"auto\":\"100%\",height:sizeBehaviour===\"Fit Frame\"?\"auto\":\"100%\",overflow:\"hidden\",position:\"relative\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",borderRadius:`${radius}px`,padding:`${borderWidth}px`,boxSizing:\"border-box\"},children:[/*#__PURE__*/_jsx(motion.div,{style:{width:\"100%\",height:\"100%\",position:\"absolute\",top:0,left:0,right:0,bottom:0,backgroundSize:\"cover\",transform:rotationDirection===\"CounterClockwise\"?\"scaleX(-1)\":\"none\"},animate:animationControl}),renderContent()]});}Framebeam.defaultProps={speed:21,borderWidth:0,beamLength:50,firstColor:\"#8658D8\",secondColor:\"#E81CFF\",appearDelay:0,radius:20,direction:\"Right\",colorMode:\"Gradient\",rotationDirection:\"Clockwise\",sizeBehaviour:\"Fit Frame\"};addPropertyControls(Framebeam,{colorMode:{type:ControlType.SegmentedEnum,title:\"Color Mode\",options:[\"Solid\",\"Gradient\"],defaultValue:\"Gradient\"},firstColor:{type:ControlType.Color,title:\"First Color\"},secondColor:{type:ControlType.Color,title:\"Second Color\",hidden:({colorMode})=>colorMode===\"Solid\"},speed:{type:ControlType.Number,title:\"Speed\",min:1,max:30,displayStepper:true},rotationDirection:{type:ControlType.SegmentedEnum,title:\"Rotation\",options:[\"CounterClockwise\",\"Clockwise\"],optionTitles:[\"←\",\"→\"],defaultValue:\"Clockwise\"},beamLength:{type:ControlType.Number,title:\"Length\",min:0,max:100,unit:\"%\",displayStepper:true,defaultValue:50},borderWidth:{type:ControlType.Number,title:\"Thickness\",min:1,max:20,unit:\"px\",displayStepper:true},radius:{type:ControlType.Number,title:\"Radius\",min:0,max:200,displayStepper:true,description:\"Set to (main frame radius *+* thickness)\"},appearDelay:{type:ControlType.Number,title:\"Appear\",min:0,max:10,step:.1,unit:\"s\",displayStepper:true,description:\"Set a delay before the beam appears.\"},connectedFrame:{type:ControlType.Array,title:\"Main Frame\",propertyControl:{type:ControlType.ComponentInstance}},sizeBehaviour:{type:ControlType.Enum,title:\"Sizing\",options:[\"Fill Container\",\"Fit Frame\"],optionTitles:[\"Fill Container\",\"Fit Frame\"],defaultValue:\"Fit Frame\",description:\"*Fit* has the component size itself based on the connected Frame while *Fill* has the connected Fame cover the entire component area\",displaySegmentedControl:true,segmentedControlDirection:\"vertical\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Framebeam\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"200\",\"framerSupportedLayoutHeight\":\"100%\",\"framerDisableUnlink\":\"*\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"200\",\"framerSupportedLayoutWidth\":\"100%\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FrameBeam.map"],"mappings":"A,wPASG,SAAwBc,EAAU,CAAC,QAAM,cAAY,aAAW,aAAW,cAAY,cAAY,iBAAe,SAAO,YAAU,oBAAkB,iBAAe,CAAC,IAAMC,EAAiBR,EAAa,EAAQS,GAAuB,EAAW,EAAY,IAAmD,eAArB,IAAIC,EAA0C,KAAKC,EAAY,IAAIC,EAAW,OAElO,OAF2Od,MAAoB,CAAuE,IAAMe,EAAmBJ,EAAsBG,EAA1FE,IAAY,QAAQF,EAAWD,EAA2FD,CAAU,EAA6a,OAA3aF,EAAiB,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,eAAe,CAACA,EAAiB,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,WAAW,CAAC,SAAS,EAAE,KAAK,SAAS,CAAC,CAAC,EAAEA,EAAiB,MAAM,CAAC,WAAW,CAAC,wCAAwCK,EAAmB,GAAG,0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