{"version":3,"file":"TextShimmer_Prod.BF4w-Ybf.mjs","names":["useId"],"sources":["https:/framerusercontent.com/modules/TS5bPiMUGtjrWMUlvKp9/Lbun5KUVn1DOq0iJPMKK/TextShimmer_Prod.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useId}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\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 Tag=tag;// Stable, deterministic ID (same on server + client) → no hydration mismatch.\n// useId() returns values like \":r0:\" which aren't valid in CSS selectors /\n// animation names, so strip the colons to make it CSS-safe.\nconst uid=useId().replace(/:/g,\"\");const className=`text-shimmer-${uid}`;const keyframesName=`shimmer-${uid}`;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 positions\nconst startPos=direction===\"left\"?\"-100%\":\"200%\";const endPos=direction===\"left\"?\"200%\":\"-100%\";// Build the CSS once per render. Rendered inline as a <style> tag below so it\n// exists during SSR and works on first paint — no useEffect, no document.head.\nconst css=`\n        @keyframes ${keyframesName} {\n            0%, ${delay/animationDuration*100}% {\n                background-position: ${startPos};\n            }\n            100% {\n                background-position: ${endPos};\n            }\n        }\n        .${className} {\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: ${keyframesName} ${animationDuration}s linear infinite;\n        }\n    `;return /*#__PURE__*/_jsxs(\"div\",{style:{userSelect:userSelect?\"auto\":\"none\",position:\"relative\"},children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:css}}),/*#__PURE__*/_jsx(Tag,{style:{...font,color,marginBlockStart:\"0px\",marginBlockEnd:\"0px\"},children:content}),/*#__PURE__*/_jsx(Tag,{\"aria-hidden\":\"true\",className:className,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\":{\"framerDisableUnlink\":\"*\",\"framerSupportedLayoutWidth\":\"any\",\"framerIntrinsicWidth\":\"400\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any\",\"framerIntrinsicHeight\":\"200\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TextShimmer_Prod.map"],"mappings":"iLAQG,SAAwB,EAAY,CAAC,OAAK,UAAQ,QAAM,UAAQ,OAAK,QAAM,aAAW,WAAS,QAAM,MAAI,aAAW,CAAC,IAAM,EAAI,EAG5H,EAAIA,EAAM,CAAC,CAAC,QAAQ,KAAK,EAAE,EAAQ,EAAU,gBAAgB,IAAY,EAAc,WAAW,IAAY,EAAe,YAAkB,EAAe,GAAG,EAAY,EAAc,GAAG,EAAM,GAAO,IAAU,EAAa,GAAG,EAAM,GAAO,IAAU,EAAkB,EAAe,EAC7R,EAAS,IAAY,OAAO,QAAQ,OAAa,EAAO,IAAY,OAAO,OAAO,QAElF,EAAI;qBACW,EAAc;kBACjB,EAAM,EAAkB,IAAI;uCACP,EAAS;;;uCAGT,EAAO;;;WAGnC,EAAU;;kBAEH,EAAS;;8BAEG,EAAc;kBAC1B,EAAQ;8BACI,EAAa;;;uCAGJ,EAAe;oCAClB,EAAe;+BACpB,EAAe;;;;;yBAKrB,EAAc,GAAG,EAAkB;;MAEtD,OAAoB,EAAM,MAAM,CAAC,MAAM,CAAC,WAAW,EAAW,OAAO,OAAO,SAAS,UAAU,EAAE,SAAS,CAAc,EAAK,QAAQ,CAAC,wBAAwB,CAAC,OAAO,CAAG,CAAC,CAAC,EAAe,EAAK,EAAI,CAAC,MAAM,CAAC,GAAG,EAAK,QAAM,iBAAiB,MAAM,eAAe,KAAK,EAAE,SAAS,CAAO,CAAC,EAAe,EAAK,EAAI,CAAC,cAAc,OAAiB,YAAU,MAAM,CAAC,GAAG,EAAK,MAA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