{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/7BMt3JVm7zyNgfciwYd2/hHA8Ksfq7rREe9gVMZB1/Text_Chr_Reveal.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,motion,RenderTarget}from\"framer\";import{useRef,useEffect,useState,memo,useMemo}from\"react\";import{useInView}from\"framer-motion\";const CharacterRow=/*#__PURE__*/memo(({characters,yOffset,top,color,textStyle,keyPrefix,isInView,duration,isLooping,repeat,direction,delay})=>{// Determine initial and target Y positions based on direction\nconst initialY=direction===\"top-to-bottom\"?-yOffset:yOffset;const targetY=direction===\"top-to-bottom\"?0:0;return /*#__PURE__*/_jsx(\"div\",{style:{position:top===true?\"relative\":\"absolute\",top:top===true?undefined:`${top}%`,left:top===true?undefined:\"50%\",transform:top===true?undefined:\"translate(-50%, -50%)\",display:\"flex\",justifyContent:\"center\",textTransform:\"uppercase\",color,willChange:\"transform\",...textStyle},children:characters.map((char,index)=>/*#__PURE__*/_jsx(motion.span,{initial:{y:initialY},animate:{y:isInView?targetY:initialY},transition:{type:\"tween\",ease:[.2,.8,0,1],duration:duration,delay:delay+index*.06,repeat:isLooping?repeat:0,repeatType:\"reverse\"},style:{position:\"relative\",display:\"inline-block\",willChange:\"transform\"},children:char},`${keyPrefix}-${index}`))});});CharacterRow.displayName=\"CharacterRow\";export default function Text_Chr_Reveal({text=\"SELECTED\",textStyle={fontSize:26,lineHeight:\"1\"},color=\"#ECEBEB\",yOffset1=290,yOffset2=290,yOffset3=300,duration=2.5,loopDelay=1,isLooping=false,repeat=0,direction=\"top-to-bottom\",delay=0}){const ref=useRef(null);const isInView=useInView(ref,{once:!isLooping});const[key,setKey]=useState(0);// Memoize characters array to avoid recalculating on every render\nconst characters=useMemo(()=>text.split(\"\"),[text]);// Reset animation periodically if looping is enabled\nuseEffect(()=>{if(isInView&&isLooping){const interval=setInterval(()=>{setKey(prev=>prev+1);},(duration+loopDelay)*1e3);return()=>clearInterval(interval);}},[isInView,duration,loopDelay,isLooping]);if(RenderTarget.current()===\"CANVAS\"){return /*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",justifyContent:\"center\",textTransform:\"uppercase\",color,willChange:\"transform\",...textStyle},children:characters.map((char,index)=>/*#__PURE__*/_jsx(motion.span,{style:{position:\"relative\",display:\"inline-block\"},children:char}))});}return /*#__PURE__*/_jsxs(\"div\",{ref:ref,style:{display:\"flex\",flexDirection:\"column\",width:\"100%\",height:\"auto\",justifyContent:\"center\",overflow:\"hidden\",position:\"relative\"},children:[/*#__PURE__*/_jsx(CharacterRow,{characters:characters,yOffset:yOffset1,top:true,color:color,textStyle:textStyle,keyPrefix:`${key}-top`,isInView:isInView,duration:duration,isLooping:isLooping,repeat:repeat,direction:direction,delay:delay}),/*#__PURE__*/_jsx(CharacterRow,{characters:characters,yOffset:yOffset2,top:180,color:color,textStyle:textStyle,keyPrefix:`${key}-middle`,isInView:isInView,duration:duration,isLooping:isLooping,repeat:repeat,direction:direction,delay:delay}),/*#__PURE__*/_jsx(CharacterRow,{characters:characters,yOffset:yOffset3,top:250,color:color,textStyle:textStyle,keyPrefix:`${key}-bottom`,isInView:isInView,duration:duration,isLooping:isLooping,repeat:repeat,direction:direction,delay:delay})]});}addPropertyControls(Text_Chr_Reveal,{textStyle:{type:\"font\",title:\"Font\",controls:\"extended\",defaultValue:{fontSize:26,lineHeight:\"1\"}},delay:{type:ControlType.Number,defaultValue:0,title:\"Delay\"},duration:{type:ControlType.Number,defaultValue:2.5,title:\"Animation Duration\"},isLooping:{type:ControlType.Boolean,defaultValue:false,title:\"Loop\"},loopDelay:{type:ControlType.Number,defaultValue:1,title:\"Delay Between Loops\"},repeat:{type:ControlType.Number,defaultValue:0,title:\"Repeat Time\"},yOffset1:{type:ControlType.Number,defaultValue:290,title:\"Top Row Offset\"},yOffset2:{type:ControlType.Number,defaultValue:290,title:\"Middle Row Offset\"},yOffset3:{type:ControlType.Number,defaultValue:300,title:\"Bottom Row Offset\"},color:{type:ControlType.Color,defaultValue:\"#ECEBEB\",title:\"Text Color\"},text:{type:ControlType.String,title:\"Text Content\"},direction:{type:ControlType.Enum,defaultValue:\"top-to-bottom\",title:\"Transition Direction\",options:[\"top-to-bottom\",\"bottom-to-top\"],optionTitles:[\"Top to Bottom\",\"Bottom to Top\"]}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Text_Chr_Reveal\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Text_Chr_Reveal.map"],
  "mappings": "wJAAgO,IAAMA,EAA0BC,EAAK,CAAC,CAAC,WAAAC,EAAW,QAAAC,EAAQ,IAAAC,EAAI,MAAAC,EAAM,UAAAC,EAAU,UAAAC,EAAU,SAAAC,EAAS,SAAAC,EAAS,UAAAC,EAAU,OAAAC,EAAO,UAAAC,EAAU,MAAAC,CAAK,IAAI,CAC9W,IAAMC,EAASF,IAAY,gBAAgB,CAACT,EAAQA,EAAcY,EAAoC,EAAI,OAAoBC,EAAK,MAAM,CAAC,MAAM,CAAC,SAASZ,IAAM,GAAK,WAAW,WAAW,IAAIA,IAAM,GAAK,OAAU,GAAGA,KAAO,KAAKA,IAAM,GAAK,OAAU,MAAM,UAAUA,IAAM,GAAK,OAAU,wBAAwB,QAAQ,OAAO,eAAe,SAAS,cAAc,YAAY,MAAAC,EAAM,WAAW,YAAY,GAAGC,CAAS,EAAE,SAASJ,EAAW,IAAI,CAACe,EAAKC,IAAqBF,EAAKG,EAAO,KAAK,CAAC,QAAQ,CAAC,EAAEL,CAAQ,EAAE,QAAQ,CAAC,EAAEN,EAASO,EAAQD,CAAQ,EAAE,WAAW,CAAC,KAAK,QAAQ,KAAK,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,SAASL,EAAS,MAAMI,EAAMK,EAAM,IAAI,OAAOR,EAAUC,EAAO,EAAE,WAAW,S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M,gBAAgB,EAAE,SAAS,CAAC,KAAKA,EAAY,OAAO,aAAa,IAAI,MAAM,mBAAmB,EAAE,SAAS,CAAC,KAAKA,EAAY,OAAO,aAAa,IAAI,MAAM,mBAAmB,EAAE,MAAM,CAAC,KAAKA,EAAY,MAAM,aAAa,UAAU,MAAM,YAAY,EAAE,KAAK,CAAC,KAAKA,EAAY,OAAO,MAAM,cAAc,EAAE,UAAU,CAAC,KAAKA,EAAY,KAAK,aAAa,gBAAgB,MAAM,uBAAuB,QAAQ,CAAC,gBAAgB,eAAe,EAAE,aAAa,CAAC,gBAAgB,eAAe,CAAC,CAAC,CAAC",
  "names": ["CharacterRow", "X", "characters", "yOffset", "top", "color", "textStyle", "keyPrefix", "isInView", "duration", "isLooping", "repeat", "direction", "delay", "initialY", "targetY", "p", "char", "index", "motion", "Text_Chr_Reveal", "text", "yOffset1", "yOffset2", "yOffset3", "loopDelay", "ref", "pe", "useInView", "key", "setKey", "ye", "se", "ue", "interval", "prev", "RenderTarget", "u", "addPropertyControls", "ControlType"]
}
