{"version":3,"file":"TextReveal_1.CpnZbPyG.mjs","names":[],"sources":["https:/framerusercontent.com/modules/MZKvg3H4HyiIc3j4OWEC/YtlaJisHwh0d1WKAEq98/TextReveal_1.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{motion,useScroll,useTransform}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";import{useRef}from\"react\";/* const paragraph =\n    \"Take your business to new heights quickly—let us handle the technology\" */export default function textReveal(props){const{fuente,parrafo}=props;return /*#__PURE__*/_jsx(\"main\",{children:/*#__PURE__*/_jsx(Paragraph,{fuente:fuente,value:parrafo})});}function Paragraph({value,fuente}){const element=useRef(null);const{scrollYProgress}=useScroll({target:element,offset:[\"start 0.9\",\"start 0.4\"]});const words=value.split(\" \");return /*#__PURE__*/_jsx(\"p\",{ref:element,style:{...styles.paragraph,fontSize:fuente},children:words.map((word,i)=>{const start=i/words.length;const end=start+1/words.length;console.log(end);return /*#__PURE__*/_jsx(Word,{progress:scrollYProgress,range:[start,end],children:word},i);})});}const Word=({children,progress,range})=>{const opacity=useTransform(progress,range,[0,1]);return /*#__PURE__*/_jsxs(\"span\",{style:styles.word,children:[/*#__PURE__*/_jsx(\"span\",{style:styles.shadow,children:children}),/*#__PURE__*/_jsx(motion.span,{style:{opacity:opacity},children:children})]});};const fontColor=\"#fafafa\";const styles={paragraph:{color:fontColor,fontFamily:\"Open Sans, sans-serif\",fontWeight:600,display:\"flex\",flexWrap:\"wrap\",lineHeight:1},word:{marginRight:\"8px\",marginTop:\"8px\",position:\"relative\"},shadow:{position:\"absolute\",opacity:.3}};addPropertyControls(textReveal,{parrafo:{type:ControlType.String,defaultValue:\"What is this that stands before me? Figure in black which points at me\"},fuente:{type:ControlType.Number,defaultValue:20}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"textReveal\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\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