{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/nNAxSV55M3EvltnFShg1/O4jtm2WzM7wZJaErSp63/Text_Opacity_Words_1.js"],
  "sourcesContent": ["// Welcome to Code in Framer\n// Get Started: https://www.framer.com/developers\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{motion,useScroll,useTransform}from\"framer-motion\";import{useRef}from\"react\";const EachWord=({word,starting,ending,progress})=>{const ref=useRef();const progressVal=useTransform(progress,[starting,ending],[.2,1]);return /*#__PURE__*/_jsxs(motion.span,{style:{opacity:progressVal},children:[word,\" \"]});};/**\n * These annotations control how your component sizes\n * Learn more: https://www.framer.com/developers/#code-components-auto-sizing\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function Text_Opacity_Words(props){const text=props.text;const words=text.split(\" \");const totalWords=words.length;const ref=useRef(null);const{scrollYProgress}=useScroll({target:ref,offset:[\"start 0.75\",\"start 0.15\"]});return /*#__PURE__*/_jsx(\"p\",{ref:ref,style:{...props.font,color:props.textColor},children:words.map((word,idx)=>{const starting=idx/totalWords;const ending=(idx+1)/totalWords;return /*#__PURE__*/_jsx(EachWord,{word:word,starting:starting,ending:ending,progress:scrollYProgress});})});}addPropertyControls(Text_Opacity_Words,{text:{title:\"Text\",type:ControlType.String,defaultValue:\"Hello\"},font:{type:\"font\",controls:\"extended\"},textColor:{type:ControlType.Color}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Text_Opacity_Words\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Text_Opacity_Words_1.map"],
  "mappings": "0FAEgM,IAAMA,EAAS,CAAC,CAAC,KAAAC,EAAK,SAAAC,EAAS,OAAAC,EAAO,SAAAC,CAAQ,IAAI,CAAC,IAAMC,EAAIC,EAAO,EAAQC,EAAYC,EAAaJ,EAAS,CAACF,EAASC,CAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,OAAoBM,EAAMC,EAAO,KAAK,CAAC,MAAM,CAAC,QAAQH,CAAW,EAAE,SAAS,CAACN,EAAK,GAAG,CAAC,CAAC,CAAE,EAM/Y,SAARU,EAAoCC,EAAM,CAAuB,IAAMC,EAAjBD,EAAM,KAAsB,MAAM,GAAG,EAAQE,EAAWD,EAAM,OAAaR,EAAIC,EAAO,IAAI,EAAO,CAAC,gBAAAS,CAAe,EAAEC,EAAU,CAAC,OAAOX,EAAI,OAAO,CAAC,aAAa,YAAY,CAAC,CAAC,EAAE,OAAoBY,EAAK,IAAI,CAAC,IAAIZ,EAAI,MAAM,CAAC,GAAGO,EAAM,KAAK,MAAMA,EAAM,SAAS,EAAE,SAASC,EAAM,IAAI,CAACZ,EAAKiB,IAAM,CAAC,IAAMhB,EAASgB,EAAIJ,EAAiBX,GAAQe,EAAI,GAAGJ,EAAW,OAAoBG,EAAKjB,EAAS,CAAC,KAAKC,EAAK,SAASC,EAAS,OAAOC,EAAO,SAASY,CAAe,CAAC,CAAE,CAAC,CAAC,CAAC,CAAE,CAACI,EAAoBR,EAAmB,CAAC,KAAK,CAAC,MAAM,OAAO,KAAKS,EAAY,OAAO,aAAa,OAAO,EAAE,KAAK,CAAC,KAAK,OAAO,SAAS,UAAU,EAAE,UAAU,CAAC,KAAKA,EAAY,KAAK,CAAC,CAAC",
  "names": ["EachWord", "word", "starting", "ending", "progress", "ref", "pe", "progressVal", "useTransform", "u", "motion", "Text_Opacity_Words", "props", "words", "totalWords", "scrollYProgress", "useScroll", "p", "idx", "addPropertyControls", "ControlType"]
}
