{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/pb0fw1DZDVKJtH3BeHVc/mdtoDODAVt02zqMJcfOl/revealtext.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{motion,useScroll,useTransform,useSpring}from\"framer-motion\";import{useRef,useEffect,useState}from\"react\";const EachWord=({word,starting,ending,startOpacity,endOpacity,progress,stiffness,damping,primaryFont,secondaryFont,fontSize,openTypeFeatures,fontVariationSettings,baselineHeight,textAlign})=>{const[sanitizedWord,setSanitizedWord]=useState(word);const progressVal=useTransform(progress,[starting,ending],[startOpacity,endOpacity]);const smoothProgress=useSpring(progressVal,{stiffness,damping});const isSecondaryFont=word.startsWith(\"$\")&&word.endsWith(\"$\");// Convert OpenType features object to CSS string\nconst openTypeFeaturesStr=Object.entries(openTypeFeatures).map(([feature,value])=>`\"${feature}\" ${value?\"1\":\"0\"}`).join(\", \");// Convert variable settings object to CSS string\nconst variableSettingsStr=Object.entries(fontVariationSettings).map(([axis,value])=>`\"${axis}\" ${value}`).join(\", \");const animationStyles={opacity:smoothProgress,willChange:\"opacity\",fontSize:`${fontSize}px`,fontFamily:isSecondaryFont?secondaryFont.fontFamily:primaryFont.fontFamily,fontFeatureSettings:openTypeFeaturesStr||\"normal\",fontVariationSettings:variableSettingsStr||\"normal\",display:\"inline\",whiteSpace:\"pre-wrap\",width:\"100%\",lineHeight:baselineHeight};useEffect(()=>{if(typeof window!==\"undefined\"){import(\"dompurify\").then(DOMPurify=>{setSanitizedWord(DOMPurify.sanitize(word));});}},[word]);return /*#__PURE__*/_jsx(motion.span,{style:animationStyles,dangerouslySetInnerHTML:{__html:isSecondaryFont?sanitizedWord.slice(1,-1):sanitizedWord}});};export default function Reveal(props){const text=props.text;const lines=text.split(/<br\\s*\\/?>\\s*/gi);const ref=useRef(null);const{scrollYProgress}=useScroll({target:ref,offset:[`start ${props.startOffset}`,`end ${props.endOffset}`]});// Calculate baseline height based on font size and line height factor\nconst baselineHeight=`${props.fontSize*props.lineHeight}px`;const processLine=line=>{const regex=/(\\$[^$]+\\$|\\S+)(\\s*)/g;let matches=[];let match;while((match=regex.exec(line))!==null){matches.push(match[1]);if(match[2])matches.push(match[2]);}return matches;};return /*#__PURE__*/_jsx(\"div\",{style:{width:`${props.componentWidth}%`},children:/*#__PURE__*/_jsx(motion.div,{ref:ref,style:{width:\"100%\",height:\"auto\",minHeight:props.minHeight,maxHeight:props.maxHeight,overflow:\"hidden\",color:props.textColor,padding:\"0.25rem 0\",textAlign:props.textAlign},children:lines.map((line,lineIndex)=>{const words=processLine(line);const totalWords=words.length;return /*#__PURE__*/_jsx(\"div\",{style:{marginBottom:lineIndex<lines.length-1?`${props.paragraphSpacing}px`:0},children:words.map((word,idx)=>{const starting=(lineIndex*totalWords+idx)/(lines.length*totalWords);const ending=(lineIndex*totalWords+idx+1)/(lines.length*totalWords);return /*#__PURE__*/_jsx(EachWord,{word:word,starting:starting,ending:ending,startOpacity:props.startOpacity,endOpacity:props.endOpacity,progress:scrollYProgress,stiffness:props.stiffness,damping:props.damping,primaryFont:props.font,secondaryFont:props.secondaryFont,fontSize:props.fontSize,openTypeFeatures:props.openTypeFeatures,fontVariationSettings:props.fontVariationSettings,baselineHeight:baselineHeight,textAlign:props.textAlign},idx);})},lineIndex);})})});}addPropertyControls(Reveal,{text:{title:\"Text\",type:ControlType.String,defaultValue:\"Get the best developers who code and think like entrepreneurs to build what your $customers truly need$. <br/>Our team accompanies your projects from ideation to creation, building the MVP with features $delivered so fast that it will blow your mind.$\",displayTextArea:true},font:{type:ControlType.Font},secondaryFont:{type:ControlType.Font},fontSize:{title:\"Font Size\",type:ControlType.Number,defaultValue:16,min:8,max:72,step:1},textAlign:{title:\"Text Align\",type:ControlType.Enum,options:[\"left\",\"center\",\"right\",\"justify\"],defaultValue:\"left\"},lineHeight:{title:\"Line Height Factor\",type:ControlType.Number,defaultValue:1.2,min:.1,max:2,step:.05},paragraphSpacing:{title:\"Paragraph Spacing\",type:ControlType.Number,defaultValue:8,min:0,max:48,step:1},// OpenType Features\nopenTypeFeatures:{type:ControlType.Object,title:\"OpenType Features\",controls:{liga:{type:ControlType.Boolean,title:\"Standard Ligatures\",defaultValue:true},dlig:{type:ControlType.Boolean,title:\"Discretionary Ligatures\",defaultValue:false},salt:{type:ControlType.Boolean,title:\"Stylistic Alternates\",defaultValue:false},ss01:{type:ControlType.Boolean,title:\"Stylistic Set 1\",defaultValue:false},ss02:{type:ControlType.Boolean,title:\"Stylistic Set 2\",defaultValue:false},smcp:{type:ControlType.Boolean,title:\"Small Caps\",defaultValue:false},onum:{type:ControlType.Boolean,title:\"Old-Style Numbers\",defaultValue:false},tnum:{type:ControlType.Boolean,title:\"Tabular Numbers\",defaultValue:false}}},// Variable Font Settings\nfontVariationSettings:{type:ControlType.Object,title:\"Variable Font Axes\",controls:{wght:{type:ControlType.Number,title:\"Weight\",defaultValue:400,min:100,max:900},wdth:{type:ControlType.Number,title:\"Width\",defaultValue:100,min:50,max:200},slnt:{type:ControlType.Number,title:\"Slant\",defaultValue:0,min:-15,max:15},ital:{type:ControlType.Number,title:\"Italic\",defaultValue:0,min:0,max:1},opsz:{type:ControlType.Number,title:\"Optical Size\",defaultValue:14,min:8,max:144}}},componentWidth:{title:\"Width\",type:ControlType.Number,defaultValue:100,min:10,max:100,step:1,displayStepper:true},textColor:{type:ControlType.Color},minHeight:{title:\"Min Height\",type:ControlType.String,defaultValue:\"auto\"},maxHeight:{title:\"Max Height\",type:ControlType.String,defaultValue:\"none\"},startOffset:{title:\"Start Offset\",type:ControlType.Number,defaultValue:.75,min:0,max:1,step:.01},endOffset:{title:\"End Offset\",type:ControlType.Number,defaultValue:.15,min:0,max:1,step:.01},stiffness:{title:\"Stiffness\",type:ControlType.Number,defaultValue:100,min:0,max:1e3,step:1},damping:{title:\"Damping\",type:ControlType.Number,defaultValue:20,min:0,max:100,step:1},startOpacity:{title:\"Start Opacity\",type:ControlType.Number,defaultValue:.1,min:0,max:1,step:.01},endOpacity:{title:\"End Opacity\",type:ControlType.Number,defaultValue:1,min:0,max:1,step:.01}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Reveal\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./revealtext.map"],
  "mappings": "mLAA+M,IAAMA,EAAS,CAAC,CAAC,KAAAC,EAAK,SAAAC,EAAS,OAAAC,EAAO,aAAAC,EAAa,WAAAC,EAAW,SAAAC,EAAS,UAAAC,EAAU,QAAAC,EAAQ,YAAAC,EAAY,cAAAC,EAAc,SAAAC,EAAS,iBAAAC,EAAiB,sBAAAC,EAAsB,eAAAC,EAAe,UAAAC,CAAS,IAAI,CAAC,GAAK,CAACC,EAAcC,CAAgB,EAAEC,EAASjB,CAAI,EAAQkB,EAAYC,EAAad,EAAS,CAACJ,EAASC,CAAM,EAAE,CAACC,EAAaC,CAAU,CAAC,EAAQgB,EAAeC,EAAUH,EAAY,CAAC,UAAAZ,EAAU,QAAAC,CAAO,CAAC,EAAQe,EAAgBtB,EAAK,WAAW,GAAG,GAAGA,EAAK,SAAS,GAAG,EAChpBuB,EAAoB,OAAO,QAAQZ,CAAgB,EAAE,IAAI,CAAC,CAACa,EAAQC,CAAK,IAAI,IAAID,MAAYC,EAAM,IAAI,KAAK,EAAE,KAAK,IAAI,EACtHC,EAAoB,OAAO,QAAQd,CAAqB,EAAE,IAAI,CAAC,CAACe,EAAKF,CAAK,IAAI,IAAIE,MAASF,GAAO,EAAE,KAAK,IAAI,EAAQG,EAAgB,CAAC,QAAQR,EAAe,WAAW,UAAU,SAAS,GAAGV,MAAa,WAAWY,EAAgBb,EAAc,WAAWD,EAAY,WAAW,oBAAoBe,GAAqB,SAAS,sBAAsBG,GAAqB,SAAS,QAAQ,SAAS,WAAW,WAAW,MAAM,OAAO,WAAWb,CAAc,EAAE,OAAAgB,EAAU,IA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U,CAAC,MAAM,aAAa,KAAKA,EAAY,OAAO,aAAa,MAAM,EAAE,YAAY,CAAC,MAAM,eAAe,KAAKA,EAAY,OAAO,aAAa,IAAI,IAAI,EAAE,IAAI,EAAE,KAAK,GAAG,EAAE,UAAU,CAAC,MAAM,aAAa,KAAKA,EAAY,OAAO,aAAa,IAAI,IAAI,EAAE,IAAI,EAAE,KAAK,GAAG,EAAE,UAAU,CAAC,MAAM,YAAY,KAAKA,EAAY,OAAO,aAAa,IAAI,IAAI,EAAE,IAAI,IAAI,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,UAAU,KAAKA,EAAY,OAAO,aAAa,GAAG,IAAI,EAAE,IAAI,IAAI,KAAK,CAAC,EAAE,aAAa,CAAC,MAAM,gBAAgB,KAAKA,EAAY,OAAO,aAAa,GAAG,IAAI,EAAE,IAAI,EAAE,KAAK,GAAG,EAAE,WAAW,CAAC,MAAM,cAAc,KAAKA,EAAY,OAAO,aAAa,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,GAAG,CAAC,CAAC",
  "names": ["EachWord", "word", "starting", "ending", "startOpacity", "endOpacity", "progress", "stiffness", "damping", "primaryFont", "secondaryFont", "fontSize", "openTypeFeatures", "fontVariationSettings", "baselineHeight", "textAlign", "sanitizedWord", "setSanitizedWord", "ye", "progressVal", "useTransform", "smoothProgress", "useSpring", "isSecondaryFont", "openTypeFeaturesStr", "feature", "value", "variableSettingsStr", "axis", "animationStyles", "ue", "window", "DOMPurify", "p", "motion", "Reveal", "props", "lines", "ref", "pe", "scrollYProgress", "useScroll", "processLine", "line", "regex", "matches", "match", "lineIndex", "words", "totalWords", "idx", "addPropertyControls", "ControlType"]
}
