Files
Sub-Router/dist/assets/ShinyText--nigmw_p.js
T
abingyydsandClaude Sonnet 4.6 3ed0f67be0 feat: 分站配置导出器模型搜索功能 + i18n 补全
ConfigExporter 模型下拉改为可搜索的自定义 combobox,
新增 config.searchModel / config.noModelMatch i18n 键。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 23:05:07 +09:00

2 lines
1.4 KiB
JavaScript

import{r,j as F}from"./index-EC_zKUeV.js";import{m as I}from"./proxy-CLxAIQiL.js";import{b as L,c as W}from"./CountUp-FAZKmwKP.js";import{u as v}from"./use-animation-frame-DEW1zdg1.js";const V=({text:k,disabled:x=!1,speed:y=2,className:T="",color:u="#b5b5b5",shineColor:$="#ffffff",spread:R=120,yoyo:C=!1,pauseOnHover:l=!1,direction:m="left",delay:E=0})=>{const[M,b]=r.useState(!1),e=L(0),i=r.useRef(0),o=r.useRef(null),n=r.useRef(m==="left"?1:-1),t=y*1e3,p=E*1e3;v(a=>{if(x||M){o.current=null;return}if(o.current===null){o.current=a;return}const P=a-o.current;if(o.current=a,i.current+=P,C){const c=t+p,f=c*2,s=i.current%f;if(s<t){const d=s/t*100;e.set(n.current===1?d:100-d)}else if(s<c)e.set(n.current===1?100:0);else if(s<c+t){const g=100-(s-c)/t*100;e.set(n.current===1?g:100-g)}else e.set(n.current===1?0:100)}else{const c=t+p,f=i.current%c;if(f<t){const s=f/t*100;e.set(n.current===1?s:100-s)}else e.set(n.current===1?100:0)}}),r.useEffect(()=>{n.current=m==="left"?1:-1,i.current=0,e.set(0)},[m]);const S=W(e,a=>`${150-a*2}% center`),h=r.useCallback(()=>{l&&b(!0)},[l]),D=r.useCallback(()=>{l&&b(!1)},[l]),j={backgroundImage:`linear-gradient(${R}deg, ${u} 0%, ${u} 35%, ${$} 50%, ${u} 65%, ${u} 100%)`,backgroundSize:"200% auto",WebkitBackgroundClip:"text",backgroundClip:"text",WebkitTextFillColor:"transparent"};return F.jsx(I.span,{className:`inline-block ${T}`,style:{...j,backgroundPosition:S},onMouseEnter:h,onMouseLeave:D,children:k})};export{V as S};