{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/QamsdEmrFPwTauw4NEU9/6enOlStU6S0mJaqvkLVC/VelocityTicker.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useRef}from\"react\";import{motion,useScroll,useSpring,useTransform,useMotionValue,useVelocity,useAnimationFrame}from\"framer-motion\";import{wrap}from\"@motionone/utils\";import{addPropertyControls,ControlType}from\"framer\";/**\n *\n * framer.today/license\n *\n */function ParallaxText({text,baseVelocity,textStyle,gap,color}){const baseX=useMotionValue(0);const{scrollY}=useScroll();const scrollVelocity=useVelocity(scrollY);const smoothVelocity=useSpring(scrollVelocity,{damping:50,stiffness:150});const velocityFactor=useTransform(smoothVelocity,[0,50],[0,1],{clamp:false});const x=useTransform(baseX,v=>`${wrap(-25,0,v)}%`);const directionFactor=useRef(1);useAnimationFrame((t,delta)=>{if(scrollVelocity<0){directionFactor.current=-1;}else if(scrollVelocity>0){directionFactor.current=1;}let moveBy=directionFactor.current*baseVelocity*(delta/1e3);moveBy+=directionFactor.current*.01*velocityFactor.get();baseX.set(baseX.get()+moveBy);});const containerStyle={display:\"flex\",flexDirection:\"column\",justifyContent:\"center\",alignItems:\"center\",width:\"100%\",height:\"100%\",overflow:\"hidden\",userSelect:\"none\",...textStyle};const scrollerStyle={display:\"flex\",whiteSpace:\"nowrap\",willChange:\"transform\",userSelect:\"none\"};const spanStyle={marginRight:`${gap}px`,color:color};return /*#__PURE__*/_jsx(\"div\",{style:containerStyle,children:/*#__PURE__*/_jsxs(motion.div,{style:{...scrollerStyle,x},children:[/*#__PURE__*/_jsx(\"span\",{style:spanStyle,children:text}),/*#__PURE__*/_jsx(\"span\",{style:spanStyle,children:text}),/*#__PURE__*/_jsx(\"span\",{style:spanStyle,children:text}),/*#__PURE__*/_jsx(\"span\",{style:spanStyle,children:text})]})});}/**\n *\n * @framerDisableUnlink\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 450\n * @framerIntrinsicHeight 150\n */export default function VelocityTicker(props){const{text,baseVelocity,textStyle,gap,color}=props;return /*#__PURE__*/_jsx(\"div\",{children:/*#__PURE__*/_jsx(ParallaxText,{text:text,baseVelocity:baseVelocity,textStyle:textStyle,gap:gap,color:color})});}VelocityTicker.defaultProps={text:\"Hello World\",baseVelocity:1,textStyle:{fontFamily:\"Manrope, sans-serif\",fontSize:\"80px\",lineHeight:\"1.5em\"},color:\"#ffffff\",gap:12};addPropertyControls(VelocityTicker,{text:{type:ControlType.String,title:\"Text\"},baseVelocity:{type:ControlType.Number,title:\"Base Velocity\",defaultValue:1,min:0,max:10,step:.1},color:{title:\"Color\",type:ControlType.Color,defaultValue:\"#ffffff\"},textStyle:{type:ControlType.Font,controls:\"extended\",title:\"Font\",displayTextAlignment:false,displayFontSize:true,defaultValue:{fontSize:40,lineHeight:\"1.5em\"}},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:12,displayStepper:true,min:0,max:50,step:1,description:`\n        \n        *from framer.today*\n [License](https://framer.today/license)\n    `}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"VelocityTicker\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"450\",\"framerSupportedLayoutWidth\":\"any\",\"framerIntrinsicHeight\":\"150\",\"framerDisableUnlink\":\"*\",\"framerSupportedLayoutHeight\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./VelocityTicker.map"],
  "mappings": "0MAAAA,IAIG,SAASC,EAAa,CAAC,KAAAC,EAAK,aAAAC,EAAa,UAAAC,EAAU,IAAAC,EAAI,MAAAC,CAAK,EAAE,CAAC,IAAMC,EAAMC,EAAe,CAAC,EAAO,CAAC,QAAAC,CAAO,EAAEC,EAAU,EAAQC,EAAeC,EAAYH,CAAO,EAAQI,EAAeC,EAAUH,EAAe,CAAC,QAAQ,GAAG,UAA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,IAAAC,EAAI,MAAAC,CAAK,EAAE2B,EAAM,OAAoBJ,EAAK,MAAM,CAAC,SAAsBA,EAAK5B,EAAa,CAAC,KAAKC,EAAK,aAAaC,EAAa,UAAUC,EAAU,IAAIC,EAAI,MAAMC,CAAK,CAAC,CAAC,CAAC,CAAE,CAAC0B,EAAe,aAAa,CAAC,KAAK,cAAc,aAAa,EAAE,UAAU,CAAC,WAAW,sBAAsB,SAAS,OAAO,WAAW,OAAO,EAAE,MAAM,UAAU,IAAI,EAAE,EAAEE,EAAoBF,EAAe,CAAC,KAAK,CAAC,KAAKG,EAAY,OAAO,MAAM,MAAM,EAAE,aAAa,CAAC,KAAKA,EAAY,OAAO,MAAM,gBAAgB,aAAa,EAAE,IAAI,EAAE,IAAI,GAAG,KAAK,EAAE,EAAE,MAAM,CAAC,MAAM,QAAQ,KAAKA,EAAY,MAAM,aAAa,SAAS,EAAE,UAAU,CAAC,KAAKA,EAAY,KAAK,SAAS,WAAW,MAAM,OAAO,qBAAqB,GAAM,gBAAgB,GAAK,aAAa,CAAC,SAAS,GAAG,WAAW,OAAO,CAAC,EAAE,IAAI,CAAC,KAAKA,EAAY,OAAO,MAAM,MAAM,aAAa,GAAG,eAAe,GAAK,IAAI,EAAE,IAAI,GAAG,KAAK,EAAE,YAAY;AAAA;AAAA;AAAA;AAAA,KAIn6B,CAAC,CAAC",
  "names": ["init_ssg_sandbox_shims", "ParallaxText", "text", "baseVelocity", "textStyle", "gap", "color", "baseX", "useMotionValue", "scrollY", "useScroll", "scrollVelocity", "useVelocity", "smoothVelocity", "useSpring", "velocityFactor", "useTransform", "x", "v", "wrap", "directionFactor", "pe", "useAnimationFrame", "t", "delta", "moveBy", "containerStyle", "scrollerStyle", "spanStyle", "p", "u", "motion", "VelocityTicker", "props", "addPropertyControls", "ControlType"]
}
