{"version":3,"file":"ScrollLine.DCYYK0PD.mjs","names":["useRef","__esmMin","init_ssg_sandbox_shims","de","p","c","init_jsx_runtime","init_npm_react_18_3_1","ce","window","useScroll","motion","useTransform","init_framer_motion_DhsWWWsN","addPropertyControls","init_framer_DymZktPS","ControlType","ScrollLine","props","containerRef","scrollContainerRef","parentTargetRef","scrollSection","element","rootElement","offsetStart","offsetEnd","parentScrollYProgress","stackViewportYProgress","progressSource","scrollValue","scrollYProgress","parentScrollValue","stackViewportValue","animationType","progress","isVertical","orientation","isStackViewport","thicknessPx","thickness","style","baseColor","baseOpacity","progressColor","init_ScrollLine","enabled"],"sources":["https:/framerusercontent.com/modules/q2kVyKSZsFceFWDh7Hjz/E3XmRQ8gSHSVmDHv4ao1/ScrollLine.js"],"sourcesContent":["// Pedido do usuário: remover Mouse Y e substituir por uma nova opção Stack Viewport, mantendo Scroll/Parent Scroll, indicador de progresso do stack pai e espessura exata sem fallback de 5px.\n// Linha com animação de progresso baseada em scroll\n// Linha base com opacidade e linha branca sólida que desce conforme scroll\n// Largura fit (auto) e altura fill (100%)\n// Suporta valores de espessura menores que 1px (como 0.5px)\n// Sem bordas arredondadas ou radius\n// Controle de velocidade da animação\n// Animação pode começar a partir de uma scroll section específica com controles de alinhamento\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useScroll,useTransform,motion}from\"framer-motion\";import{useRef,useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Scroll Progress Line\n * \n * @framerIntrinsicWidth 5\n * @framerIntrinsicHeight 200\n * \n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function ScrollLine(props){const{animationType=\"scroll\",baseColor=\"#FFFFFF\",baseOpacity=.3,progressColor=\"#FFFFFF\",thickness=4,orientation=\"vertical\",speed=1,scrollSection={enabled:false,sectionId:\"\",containerAlign:\"start\",targetAlign:\"end\"},style}=props;const containerRef=useRef(null);const scrollContainerRef=useRef(null);const parentTargetRef=useRef(null);// Find and store the scroll section container\nuseEffect(()=>{if(scrollSection.enabled&&scrollSection.sectionId&&typeof document!==\"undefined\"){const element=document.querySelector(`[data-framer-name=\"${scrollSection.sectionId}\"]`);if(element){scrollContainerRef.current=element;}}},[scrollSection.enabled,scrollSection.sectionId]);useEffect(()=>{if(typeof window===\"undefined\")return;const rootElement=containerRef.current;if(!rootElement)return;parentTargetRef.current=rootElement.parentElement??rootElement;},[]);// Build offset string based on alignment settings\nconst offsetStart=`${scrollSection.containerAlign} ${scrollSection.targetAlign}`;const offsetEnd=scrollSection.enabled?`end ${scrollSection.targetAlign}`:\"end start\";// Track scroll progress with optional scroll section target\nconst{scrollYProgress}=useScroll(scrollSection.enabled&&scrollContainerRef.current?{target:containerRef,container:scrollContainerRef,offset:[offsetStart,offsetEnd]}:{target:containerRef,offset:[\"start end\",\"end start\"]});const{scrollYProgress:parentScrollYProgress}=useScroll({target:parentTargetRef,offset:[\"start end\",\"end center\"]});const{scrollYProgress:stackViewportYProgress}=useScroll({target:parentTargetRef,offset:[\"start end\",\"end end\"]});// Transform progress to height/width percentage with mode-aware source\nconst progressSource=useTransform(()=>{const scrollValue=scrollYProgress.get();const parentScrollValue=parentScrollYProgress.get();const stackViewportValue=stackViewportYProgress.get();if(animationType===\"parentScroll\")return parentScrollValue;if(animationType===\"stackViewport\")return stackViewportValue;return scrollValue;});const progress=useTransform(progressSource,[0,1],[\"0%\",\"100%\"]);const isVertical=orientation===\"vertical\";const isStackViewport=animationType===\"stackViewport\";const thicknessPx=`${thickness}px`;return /*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:{...style,position:\"relative\",width:isVertical?thicknessPx:\"100%\",height:isVertical?isStackViewport?\"100vh\":\"100%\":thicknessPx,display:\"flex\",justifyContent:\"center\",alignItems:\"center\"},children:/*#__PURE__*/_jsxs(\"div\",{style:{position:isStackViewport?\"sticky\":\"relative\",top:isStackViewport?0:undefined,left:0,width:isVertical?thicknessPx:\"100%\",height:isVertical?isStackViewport?\"100vh\":\"100%\":thicknessPx},children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:isVertical?0:\"50%\",left:isVertical?\"50%\":0,width:isVertical?thicknessPx:\"100%\",height:isVertical?\"100%\":thicknessPx,backgroundColor:baseColor,opacity:baseOpacity,transform:isVertical?\"translateX(-50%)\":\"translateY(-50%)\"}}),/*#__PURE__*/_jsx(motion.div,{style:{position:\"absolute\",top:isVertical?0:\"50%\",left:isVertical?\"50%\":0,width:isVertical?thicknessPx:progress,height:isVertical?progress:thicknessPx,backgroundColor:progressColor,transformOrigin:isVertical?\"top center\":\"left center\",transform:isVertical?\"translateX(-50%)\":\"translateY(-50%)\"}})]})});}addPropertyControls(ScrollLine,{animationType:{type:ControlType.Enum,title:\"Animation\",options:[\"scroll\",\"parentScroll\",\"stackViewport\"],optionTitles:[\"Scroll\",\"Parent Scroll\",\"Stack Viewport\"],defaultValue:\"scroll\"},orientation:{type:ControlType.Enum,title:\"Orientation\",options:[\"vertical\",\"horizontal\"],optionTitles:[\"Vertical\",\"Horizontal\"],defaultValue:\"vertical\",displaySegmentedControl:true},scrollSection:{type:ControlType.Object,title:\"Scroll Section\",hidden:props=>props.animationType!==\"scroll\",controls:{enabled:{type:ControlType.Boolean,title:\"Trigger\",defaultValue:false,enabledTitle:\"Section in View\",disabledTitle:\"Page Scroll\"},sectionId:{type:ControlType.String,title:\"Section\",defaultValue:\"\",placeholder:\"Select...\",hidden:({enabled})=>!enabled},containerAlign:{type:ControlType.Enum,title:\"Viewport\",options:[\"start\",\"center\",\"end\"],optionTitles:[\"Start\",\"Center\",\"End\"],defaultValue:\"start\",displaySegmentedControl:true,hidden:({enabled})=>!enabled},targetAlign:{type:ControlType.Enum,title:\" \",options:[\"start\",\"center\",\"end\"],optionTitles:[\"Start\",\"Center\",\"End\"],defaultValue:\"end\",displaySegmentedControl:true,hidden:({enabled})=>!enabled}}},speed:{type:ControlType.Number,title:\"Speed\",defaultValue:1,min:.1,max:3,step:.1},baseColor:{type:ControlType.Color,title:\"Base Color\",defaultValue:\"#FFFFFF\"},baseOpacity:{type:ControlType.Number,title:\"Base Opacity\",defaultValue:.3,min:0,max:1,step:.1},progressColor:{type:ControlType.Color,title:\"Progress Color\",defaultValue:\"#FFFFFF\"},thickness:{type:ControlType.Number,title:\"Thickness\",defaultValue:4,min:.1,max:20,step:.1,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ScrollLine\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"200\",\"framerIntrinsicWidth\":\"5\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ScrollLine.map"],"mappings":"A,qQAgBG,SAAwBiB,EAAW,EAAM,CAAC,GAAK,CAAC,gBAAc,SAAS,YAAU,UAAU,cAAY,GAAG,gBAAc,UAAU,YAAU,EAAE,cAAY,WAAW,QAAM,EAAE,gBAAc,CAAC,QAAQ,GAAM,UAAU,GAAG,eAAe,QAAQ,YAAY,KAAK,EAAE,SAAOC,EAAYC,EAAanB,EAAO,IAAI,EAAQoB,EAAmBpB,EAAO,IAAI,EAAQqB,EAAgBrB,EAAO,IAAI,EACxXQ,MAAc,CAAC,GAAGc,EAAc,SAASA,EAAc,WAAW,OAAO,SAAW,IAAY,CAAC,IAAMC,EAAQ,SAAS,cAAc,sBAAsBD,EAAc,UAAU,GAAG,EAAKC,IAAS,EAAmB,QAAQA,EAAS,CAAC,EAAE,CAACD,EAAc,QAAQA,EAAc,SAAS,CAAC,EAAEd,MAAc,CAAC,GAAUC,IAAS,OAAY,OAAO,IAAMe,EAAYL,EAAa,QAAYK,IAAmB,EAAgB,QAAQA,EAAY,eAAeA,EAAY,EAAE,CAAC,CAAC,EACnd,IAAMC,EAAY,GAAGH,EAAc,eAAe,G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