{"version":3,"file":"TextShimmer_Prod.C6cG9FEQ.mjs","names":["useRef","__esmMin","init_npm_react_18_3_1","ce","init_jsx_runtime","c","p","de","addPropertyControls","init_framer_BikQVKhx","getUniqueClassName","TextShimmer","classNameRef","Tag","tag","backgroundSize","speedFormatted","speed","gradientFirst","size","gradientLast","animationDuration","delay","startPos","direction","endPos","keyframes","styleId","styleEl","rotation","shimmer","userSelect","font","content","init_TextShimmer_Prod","ControlType"],"sources":["https:/framerusercontent.com/modules/TS5bPiMUGtjrWMUlvKp9/AciUHRnNOn8057WveTGJ/TextShimmer_Prod.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useRef,useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";function getUniqueClassName(){return\"text-shimmer-\"+Math.random().toString(36).substr(2,9);}/**\n * @framerIntrinsicWidth 400\n * @framerIntrinsicHeight 200\n *\n * @framerDisableUnlink\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function TextShimmer({font,content,color,shimmer,size,speed,userSelect,rotation,delay,tag,direction}){const classNameRef=useRef(getUniqueClassName());const Tag=tag;const backgroundSize=`200% 200%`;const speedFormatted=11-speed;const gradientFirst=50-size*(50-20)/100;const gradientLast=50+size*(80-50)/100;const animationDuration=speedFormatted+delay;// Calculate keyframes\nconst startPos=direction===\"left\"?\"-100%\":\"200%\";const endPos=direction===\"left\"?\"200%\":\"-100%\";const keyframes=`\n        @keyframes shimmer-${classNameRef.current} {\n            0%, ${delay/animationDuration*100}% {\n                background-position: ${startPos};\n            }\n            100% {\n                background-position: ${endPos};\n            }\n        }\n    `;// Inject style tag once per instance\nuseEffect(()=>{const styleId=`shimmer-style-${classNameRef.current}`;let styleEl=document.getElementById(styleId);if(!styleEl){styleEl=document.createElement(\"style\");styleEl.id=styleId;document.head.appendChild(styleEl);}styleEl.innerHTML=`\n            ${keyframes}\n            .${classNameRef.current} {\n                background: linear-gradient(\n                    ${rotation}deg,\n                    transparent 0%,\n                    transparent ${gradientFirst}%,\n                    ${shimmer} 50%,\n                    transparent ${gradientLast}%,\n                    transparent 100%\n                );\n                -webkit-background-size: ${backgroundSize};\n                -moz-background-size: ${backgroundSize};\n                background-size: ${backgroundSize};\n                -webkit-background-clip: text;\n                -moz-background-clip: text;\n                background-clip: text;\n                background-repeat: no-repeat;\n                animation: shimmer-${classNameRef.current} ${animationDuration}s linear infinite;\n            }\n        `;return()=>{if(styleEl&&styleEl.parentNode){styleEl.parentNode.removeChild(styleEl);}};},[shimmer,rotation,gradientFirst,gradientLast,backgroundSize,animationDuration,delay,direction,keyframes]);return /*#__PURE__*/_jsxs(\"div\",{style:{userSelect:userSelect?\"auto\":\"none\",position:\"relative\"},children:[/*#__PURE__*/_jsx(Tag,{style:{...font,color,marginBlockStart:\"0px\",marginBlockEnd:\"0px\"},children:content}),/*#__PURE__*/_jsx(Tag,{\"aria-hidden\":\"true\",className:classNameRef.current,style:{...font,color:\"transparent\",position:\"absolute\",top:0,left:0,right:0,bottom:0,zIndex:1,marginBlockStart:\"0px\",marginBlockEnd:\"0px\",pointerEvents:\"none\"},children:content})]});}TextShimmer.displayName=\"Text Shimmer\";addPropertyControls(TextShimmer,{font:{type:ControlType.Font,title:\"Font\",defaultValue:\"Inter\",controls:\"extended\"},content:{type:ControlType.String,title:\"Content\",defaultValue:\"Learn Framer With Framer University\"},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#FFFFFF1A\"},shimmer:{type:ControlType.Color,title:\"Shimmer\",defaultValue:\"#ffffff\"},size:{type:ControlType.Number,title:\"Size\",defaultValue:30,step:1,max:100,min:1},speed:{type:ControlType.Number,title:\"Speed\",defaultValue:5,max:10,min:1,step:1},direction:{type:ControlType.Enum,title:\"Direction\",defaultValue:\"left\",options:[\"left\",\"right\"],optionTitles:[\"Left\",\"Right\"],displaySegmentedControl:true,segmentedControlDirection:\"horizontal\",optionIcons:[\"direction-left\",\"direction-right\"]},userSelect:{title:\"User Select\",type:ControlType.Boolean,defaultValue:false},rotation:{type:ControlType.Number,title:\"Rotation\",defaultValue:90,min:45,unit:\"\\xb0\",max:135,step:1},delay:{type:ControlType.Number,title:\"Delay\",defaultValue:0,min:0,max:10,step:.1},tag:{type:ControlType.Enum,title:\"Tag\",defaultValue:\"p\",displaySegmentedControl:true,segmentedControlDirection:\"horizontal\",options:[\"h1\",\"h2\",\"h3\",\"p\"],optionTitles:[\"H1\",\"H2\",\"H3\",\"P\"],description:\"More components at [Framer University](https://frameruni.link/cc).\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TextShimmer\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"400\",\"framerIntrinsicHeight\":\"200\",\"framerSupportedLayoutHeight\":\"any\",\"framerDisableUnlink\":\"*\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TextShimmer_Prod.map"],"mappings":"A,oLAAiJ,SAASU,GAAoB,CAAC,MAAM,gBAAgB,KAAK,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAE,CAQzO,SAAwBC,EAAY,CAAC,OAAK,UAAQ,QAAM,UAAQ,OAAK,QAAM,aAAW,WAAS,QAAM,MAAI,aAAW,CAAC,IAAMC,EAAaZ,EAAOU,EAAmB,CAAC,EAAQG,EAAIC,EAAUC,EAAe,YAAkBC,EAAe,GAAGC,EAAYC,EAAc,GAAGC,EAAM,GAAO,IAAUC,EAAa,GAAGD,EAAM,GAAO,IAAUE,EAAkBL,EAAeM,EACrWC,EAASC,IAAY,OAAO,QAAQ,OAAaC,EAAOD,IAAY,OAAO,OAAO,QAAcE,EAAU;6BACnFd,EAAa,QAAQ;kBAChCU,EAAMD,EAAkB,IAAI;uCACPE,EAAS;;;uCAGTE,EAAO;;;MAwB8J,OApB5MtB,MAAc,CAAC,IAAMwB,EAAQ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