{"version":3,"file":"Shiny_Text_1.D3Wv-Fo7.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/DUB0omscvrJ3uT8zext2/5S19v4vQjTDwZ5Ij5LWw/Shiny_Text_1.js"],"sourcesContent":["/**\n * Shiny Text\n * Text with a continuous shimmer sweep. Optionally wraps onto multiple lines.\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicWidth 220\n * @framerIntrinsicHeight 28\n */import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";const BASE_SHIMMER_DURATION=2.2;const SWEEP_CONFIG={leftToRight:{angle:105,size:\"200% 100%\",axis:\"X\",from:\"-50%\",to:\"150%\"},rightToLeft:{angle:105,size:\"200% 100%\",axis:\"X\",from:\"150%\",to:\"-50%\"},topToBottom:{angle:195,size:\"100% 200%\",axis:\"Y\",from:\"-50%\",to:\"150%\"},bottomToTop:{angle:195,size:\"100% 200%\",axis:\"Y\",from:\"150%\",to:\"-50%\"}};function usePrefersReducedMotion(){const[reduced,setReduced]=useState(()=>typeof window!==\"undefined\"&&window.matchMedia?.(\"(prefers-reduced-motion: reduce)\").matches===true);useEffect(()=>{if(typeof window===\"undefined\"||!window.matchMedia)return;const mq=window.matchMedia(\"(prefers-reduced-motion: reduce)\");const update=()=>setReduced(mq.matches);update();mq.addEventListener?.(\"change\",update);return()=>mq.removeEventListener?.(\"change\",update);},[]);return reduced;}export default function ShinyText({text=\"Thinking\",beforeText=\"\",afterText=\"\",beforeAfterColor=\"rgba(120, 120, 120, 0.55)\",gap=6,textAlign=\"left\",wrap=false,sweepDirection=\"leftToRight\",baseColor=\"rgba(120, 120, 120, 0.55)\",shineColor=\"#111111\",multiColorShine=false,shineColor2=\"#555555\",shineColor3=\"#999999\",shimmerSpeed=1,shimmerWait=0,link,openInNewTab=false,font={fontSize:18,fontWeight:500,lineHeight:1.3,letterSpacing:-.1},style}){const duration=BASE_SHIMMER_DURATION/Math.max(.1,shimmerSpeed);const repeatDelay=Math.max(0,shimmerWait);const isStaticRenderer=useIsStaticRenderer();const prefersReducedMotion=usePrefersReducedMotion();const isStill=isStaticRenderer||prefersReducedMotion;const sweep=SWEEP_CONFIG[sweepDirection];const hasText=typeof text===\"string\"&&text.trim().length>0;const hasLink=hasText&&typeof link===\"string\"&&link.trim().length>0;const OuterTag=hasLink?\"a\":\"span\";const outerProps=hasLink?{href:link,target:openInNewTab?\"_blank\":undefined,rel:openInNewTab?\"noopener noreferrer\":undefined}:{};const hasBefore=typeof beforeText===\"string\"&&beforeText.length>0;const hasAfter=typeof afterText===\"string\"&&afterText.length>0;// Whole sentence flows and wraps like normal paragraph text.\nconst outerStyle={display:\"block\",width:\"100%\",textAlign,textDecoration:\"none\",color:\"inherit\",cursor:hasLink?\"pointer\":undefined,whiteSpace:wrap?\"normal\":\"nowrap\",overflow:wrap?undefined:\"hidden\",textOverflow:wrap?undefined:\"ellipsis\",...style};const beforeStyle={...font,color:beforeAfterColor,marginRight:hasBefore?`${gap}px`:undefined};const afterStyle={...font,color:beforeAfterColor,marginLeft:hasAfter?`${gap}px`:undefined};// The animated word/phrase sits as one inline unit within the sentence,\n// just like a styled word — it can move to the next line on its own,\n// but its own content stays on a single line.\nconst innerStyle={position:\"relative\",display:\"inline-block\"};const baseTextStyle={...font,display:\"inline-block\",whiteSpace:\"nowrap\",color:baseColor};const frozenStops=multiColorShine?`${baseColor} 0%, ${baseColor} 15%, ${shineColor} 35%, ${shineColor2} 50%, ${shineColor3} 65%, ${baseColor} 85%, ${baseColor} 100%`:`${baseColor} 0%, ${baseColor} 20%, ${shineColor} 50%, ${baseColor} 80%, ${baseColor} 100%`;if(isStill){const frozenGradient=`linear-gradient(${sweep.angle}deg, ${frozenStops})`;return /*#__PURE__*/_jsxs(OuterTag,{style:outerStyle,...outerProps,children:[hasBefore&&/*#__PURE__*/_jsx(\"span\",{style:beforeStyle,children:beforeText}),/*#__PURE__*/_jsx(\"span\",{style:innerStyle,children:/*#__PURE__*/_jsx(\"span\",{style:{...font,display:\"inline-block\",whiteSpace:\"nowrap\",backgroundImage:frozenGradient,backgroundSize:sweep.size,backgroundPosition:\"50% 50%\",backgroundRepeat:\"no-repeat\",WebkitBackgroundClip:\"text\",backgroundClip:\"text\",WebkitTextFillColor:\"transparent\",color:\"transparent\"},children:text})}),hasAfter&&/*#__PURE__*/_jsx(\"span\",{style:afterStyle,children:afterText})]});}const shineStops=multiColorShine?`transparent 0%, transparent 25%, ${shineColor} 35%, ${shineColor2} 50%, ${shineColor3} 65%, transparent 75%, transparent 100%`:`transparent 0%, transparent 35%, ${shineColor} 50%, transparent 65%, transparent 100%`;const shineGradient=`linear-gradient(${sweep.angle}deg, ${shineStops})`;const shineOverlayStyle={...font,position:\"absolute\",top:0,left:0,whiteSpace:\"nowrap\",backgroundImage:shineGradient,backgroundSize:sweep.size,backgroundRepeat:\"no-repeat\",WebkitBackgroundClip:\"text\",backgroundClip:\"text\",WebkitTextFillColor:\"transparent\",color:\"transparent\",willChange:\"background-position\",pointerEvents:\"none\"};const animate=sweep.axis===\"X\"?{backgroundPositionX:[sweep.from,sweep.to],backgroundPositionY:\"0%\"}:{backgroundPositionX:\"0%\",backgroundPositionY:[sweep.from,sweep.to]};return /*#__PURE__*/_jsxs(OuterTag,{style:outerStyle,...outerProps,children:[hasBefore&&/*#__PURE__*/_jsx(\"span\",{style:beforeStyle,children:beforeText}),/*#__PURE__*/_jsxs(\"span\",{style:innerStyle,children:[/*#__PURE__*/_jsx(\"span\",{style:baseTextStyle,children:text}),/*#__PURE__*/_jsx(motion.span,{\"aria-hidden\":true,style:shineOverlayStyle,animate:animate,transition:{duration,repeat:Infinity,repeatDelay,ease:\"linear\"},children:text},sweepDirection)]}),hasAfter&&/*#__PURE__*/_jsx(\"span\",{style:afterStyle,children:afterText})]});}ShinyText.displayName=\"Shiny Text\";addPropertyControls(ShinyText,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"Thinking\",placeholder:\"Thinking…\"},beforeText:{type:ControlType.String,title:\"Before\",defaultValue:\"\",placeholder:\"e.g. New:\"},afterText:{type:ControlType.String,title:\"After\",defaultValue:\"\",placeholder:\"e.g. →\"},beforeAfterColor:{type:ControlType.Color,title:\"Before/After Color\",defaultValue:\"rgba(120, 120, 120, 0.55)\"},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:6,min:0,max:60,step:1,unit:\"px\",displayStepper:true},textAlign:{type:ControlType.Enum,title:\"Align\",options:[\"left\",\"center\",\"right\"],optionTitles:[\"Left\",\"Center\",\"Right\"],displaySegmentedControl:true,defaultValue:\"left\"},wrap:{type:ControlType.Boolean,title:\"Wrap\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\"},sweepDirection:{type:ControlType.Enum,title:\"Sweep\",options:[\"leftToRight\",\"rightToLeft\",\"topToBottom\",\"bottomToTop\"],optionTitles:[\"Left → Right\",\"Right → Left\",\"Top → Bottom\",\"Bottom → Top\"],defaultValue:\"leftToRight\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:18,fontWeight:500,lineHeight:1.3,letterSpacing:-.1}},baseColor:{type:ControlType.Color,title:\"Base\",defaultValue:\"rgba(120, 120, 120, 0.55)\"},shineColor:{type:ControlType.Color,title:\"Shine\",defaultValue:\"#111111\"},multiColorShine:{type:ControlType.Boolean,title:\"Gradient\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\"},shineColor2:{type:ControlType.Color,title:\"Shine 2\",defaultValue:\"#555555\",hidden:props=>!props.multiColorShine},shineColor3:{type:ControlType.Color,title:\"Shine 3\",defaultValue:\"#999999\",hidden:props=>!props.multiColorShine},shimmerSpeed:{type:ControlType.Number,title:\"Speed\",defaultValue:1,min:.25,max:4,step:.05,unit:\"x\",displayStepper:true},shimmerWait:{type:ControlType.Number,title:\"Wait\",defaultValue:0,min:0,max:8,step:.1,unit:\"s\",displayStepper:true},link:{type:ControlType.Link,title:\"Link\"},openInNewTab:{type:ControlType.Boolean,title:\"New Tab\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\",hidden:props=>!props.link}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ShinyText\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Shiny_Text_1.map"],"mappings":"+PAQiiB,SAAS,GAAyB,CAAC,GAAK,CAAC,EAAQ,GAAYA,MAAoB,IAAS,QAAa,EAAO,aAAa,kCAAkC,CAAC,CAAC,UAAU,EAAI,EAA4R,OAA1R,MAAc,CAAC,GAAU,IAAS,QAAa,CAAC,EAAO,WAAW,OAAO,IAAM,EAAG,EAAO,WAAW,kCAAkC,EAAQ,MAAW,EAAW,EAAG,OAAO,EAAkD,OAAhD,EAAO,EAAE,EAAG,mBAAmB,SAAS,CAAM,MAAY,EAAG,sBAAsB,SAAS,CAAM,CAAE,EAAE,CAAC,CAAC,EAAS,CAAQ,CAAC,SAAwB,EAAU,CAAC,OAAK,WAAW,aAAW,GAAG,YAAU,GAAG,mBAAiB,4BAA4B,MAAI,EAAE,YAAU,OAAO,OAAK,GAAM,iBAAe,cAAc,YAAU,4BAA4B,aAAW,UAAU,kBAAgB,GAAM,cAAY,UAAU,cAAY,UAAU,eAAa,EAAE,cAAY,EAAE,OAAK,eAAa,GAAM,OAAK,CAAC,SAAS,GAAG,WAAW,IAAI,WAAW,IAAI,cAAc,GAAG,EAAE,SAAO,CAAC,IAAM,EAAS,EAAsB,KAAK,IAAI,GAAG,CAAY,EAAQ,EAAY,KAAK,IAAI,EAAE,CAAW,EAAQ,EAAiB,EAAoB,EAAQ,EAAqB,EAAwB,EAAQ,EAAQ,GAAkB,EAA2B,EAAM,EAAa,GAAiF,EAAnD,OAAO,GAAO,UAAU,EAAK,KAAK,CAAC,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