{"version":3,"file":"LineScrollAnimation.zIOe7ZId.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/ELebCYNBiUwJYLOoNn6W/Hl2ZKX21C4Clc49B0e0M/LineScrollAnimation.js"],"sourcesContent":["// Line scroll animation - animated line that grows as user scrolls\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useScroll,useTransform,motion}from\"framer-motion\";import{useRef}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerIntrinsicWidth 100\n * @framerIntrinsicHeight 400\n * \n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function LineScrollAnimation(props){const{orientation=\"vertical\",lineColor=\"#000000\",lineThickness=4,startPosition=\"top\"}=props;const containerRef=useRef(null);const{scrollYProgress}=useScroll({target:containerRef,offset:[\"start end\",\"end start\"]});const isVertical=orientation===\"vertical\";const isReversed=startPosition===\"bottom\"||startPosition===\"right\";const scaleValue=useTransform(scrollYProgress,[0,1],isReversed?[1,0]:[0,1]);return /*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:{position:\"relative\",width:\"100%\",height:\"100%\",overflow:\"hidden\"},children:/*#__PURE__*/_jsx(motion.div,{style:{position:\"absolute\",backgroundColor:lineColor,transformOrigin:isVertical?startPosition===\"bottom\"?\"bottom\":\"top\":startPosition===\"right\"?\"right\":\"left\",...isVertical?{width:`${lineThickness}px`,height:\"100%\",left:\"50%\",top:0,transform:\"translateX(-50%)\",scaleY:scaleValue}:{height:`${lineThickness}px`,width:\"100%\",top:\"50%\",left:0,transform:\"translateY(-50%)\",scaleX:scaleValue}}})});}addPropertyControls(LineScrollAnimation,{orientation:{type:ControlType.Enum,title:\"Orientation\",options:[\"horizontal\",\"vertical\"],optionTitles:[\"Horizontal\",\"Vertical\"],defaultValue:\"vertical\",displaySegmentedControl:true},startPosition:{type:ControlType.Enum,title:\"Start Position\",options:[\"top\",\"bottom\",\"left\",\"right\"],optionTitles:[\"Top\",\"Bottom\",\"Left\",\"Right\"],defaultValue:\"top\",hidden:({orientation})=>false},lineColor:{type:ControlType.Color,title:\"Line Color\",defaultValue:\"#000000\"},lineThickness:{type:ControlType.Number,title:\"Thickness\",defaultValue:4,min:1,max:20,step:1,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LineScrollAnimation\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"400\",\"framerIntrinsicWidth\":\"100\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LineScrollAnimation.map"],"mappings":"yOAOG,SAAwB,EAAoB,EAAM,CAAC,GAAK,CAAC,cAAY,WAAW,YAAU,UAAU,gBAAc,EAAE,gBAAc,OAAO,EAAY,EAAaA,EAAO,IAAI,EAAO,CAAC,mBAAiB,EAAU,CAAC,OAAO,EAAa,OAAO,CAAC,YAAY,WAAW,CAAC,CAAC,EAAQ,EAAW,IAAc,WAAoF,EAAW,EAAa,EAAgB,CAAC,EAAE,CAAC,EAApG,IAAgB,UAAU,IAAgB,QAAuE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,OAAoB,EAAK,MAAM,CAAC,IAAI,EAAa,MAAM,CAAC,SAAS,WAAW,MAAM,OAAO,OAAO,OAAO,SAAS,QAAQ,EAAE,SAAsB,EAAK,EAAO,IAAI,CAAC,MAAM,CAAC,SAAS,WAAW,gBAAgB,EAAU,gBAAgB,EAAW,IAAgB,SAAS,SAAS,MAAM,IAAgB,QAAQ,QAAQ,OAAO,GAAG,EAAW,CAAC,MAAM,GAAG,EAAc,IAAI,OAAO,OAAO,KAAK,MAAM,IAAI,EAAE,UAAU,mBAAmB,OAAO,CAAU,EAAE,CAAC,OAAO,GAAG,EAAc,IAAI,MAAM,OAAO,IAAI,MAAM,KAAK,EAAE,UAAU,mBAAmB,OAAO,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