@ -21,16 +21,6 @@ function cssVars(config: ResolvedConfig): string {
const lighter = adjustColor ( config . primaryColor , 18 ) ;
const lighter = adjustColor ( config . primaryColor , 18 ) ;
const rgb = hexToRgb ( config . primaryColor ) ;
const rgb = hexToRgb ( config . primaryColor ) ;
// 马卡龙主题渐变色映射
const themeGradients : Record < string , { grad1 : string ; grad2 : string ; glow : string } > = {
'dream-purple' : { grad1 : '#A78BFA' , grad2 : '#F0ABFC' , glow : '167, 139, 250' } ,
'mint-tech' : { grad1 : '#6EE7B7' , grad2 : '#34D399' , glow : '52, 211, 153' } ,
'coral-peach' : { grad1 : '#FB7185' , grad2 : '#FDBA74' , glow : '251, 113, 133' } ,
'sky-blue' : { grad1 : '#7DD3FC' , grad2 : '#A78BFA' , glow : '125, 211, 252' } ,
} ;
const themeColors = config . launcherTheme ? themeGradients [ config . launcherTheme ] : null ;
return `
return `
-- csk - primary : $ { config . primaryColor } ;
-- csk - primary : $ { config . primaryColor } ;
-- csk - primary - hover : $ { darker } ;
-- csk - primary - hover : $ { darker } ;
@ -47,11 +37,6 @@ function cssVars(config: ResolvedConfig): string {
-- csk - shadow - bubble : 0 1 px 2 px rgba ( 15 , 23 , 42 , 0.06 ) ;
-- csk - shadow - bubble : 0 1 px 2 px rgba ( 15 , 23 , 42 , 0.06 ) ;
-- csk - border : # ECEEF2 ;
-- csk - border : # ECEEF2 ;
-- csk - bg - app : # F6F7F9 ;
-- csk - bg - app : # F6F7F9 ;
$ { themeColors ? `
-- csk - launcher - grad - 1 : $ { themeColors . grad1 } ;
-- csk - launcher - grad - 2 : $ { themeColors . grad2 } ;
-- csk - launcher - glow : $ { themeColors . glow } ;
` : ''}
` ;
` ;
}
}
@ -92,13 +77,8 @@ function getStyles(config: ResolvedConfig): string {
width : 60px ;
width : 60px ;
height : 60px ;
height : 60px ;
border - radius : 50 % ;
border - radius : 50 % ;
/* 极光旋转渐变底 — 默认蓝紫系,由 primaryColor 驱动的 conic-gradient */
background : conic - gradient ( from 0 deg ,
var ( -- csk - primary - light , # 06 b6d4 ) ,
var ( -- csk - primary , # 3 b82f6 ) ,
var ( -- csk - primary - hover , # 8 b5cf6 ) ,
var ( -- csk - primary - light , # 06 b6d4 )
) ;
/* E5 梦幻拖尾 — 四段极光渐变慢旋 */
background : conic - gradient ( from 0 deg , # ec4899 0 deg , # 8 b5cf6 90 deg , # 3 b82f6 180 deg , # 06 b6d4 270 deg , # ec4899 360 deg ) ;
display : flex ;
display : flex ;
align - items : center ;
align - items : center ;
justify - content : center ;
justify - content : center ;
@ -112,63 +92,27 @@ function getStyles(config: ResolvedConfig): string {
box - shadow :
box - shadow :
0 1 px 2 px rgba ( 0 , 0 , 0 , 0.06 ) ,
0 1 px 2 px rgba ( 0 , 0 , 0 , 0.06 ) ,
0 4 px 16 px rgba ( 0 , 0 , 0 , 0.10 ) ,
0 4 px 16 px rgba ( 0 , 0 , 0 , 0.10 ) ,
0 6 px 24 px rgba ( var ( -- csk - primary - rgb ) , 0.28 ) ,
0 0 48 px rgba ( var ( -- csk - primary - rgb ) , 0.12 ) ;
0 6 px 24 px rgba ( 236 , 72 , 153 , 0.28 ) ,
0 0 48 px rgba ( 236 , 72 , 153 , 0.12 ) ;
transition :
transition :
transform 0.25 s cubic - bezier ( 0.34 , 1.56 , 0.64 , 1 ) ,
transform 0.25 s cubic - bezier ( 0.34 , 1.56 , 0.64 , 1 ) ,
box - shadow 0.25 s ease ,
box - shadow 0.25 s ease ,
border - color 0.25 s ease ;
border - color 0.25 s ease ;
animation :
animation :
csk - aurora - spin 4 s linear infinite ,
csk - aurora - spin 5 s linear infinite ,
csk - launcher - in 0.55 s cubic - bezier ( 0.22 , 1 , 0.36 , 1 ) both ;
csk - launcher - in 0.55 s cubic - bezier ( 0.22 , 1 , 0.36 , 1 ) both ;
}
}
. csk - launcher -- right { right : 24px ; }
. csk - launcher -- right { right : 24px ; }
. csk - launcher -- left { left : 24px ; }
. csk - launcher -- left { left : 24px ; }
/* 高光扫过动效 */
. csk - launcher : : before {
content : '' ;
position : absolute ;
top : - 50 % ;
left : - 50 % ;
width : 40 % ;
height : 200 % ;
border - radius : 50 % ;
background : linear - gradient (
105 deg ,
transparent 30 % ,
rgba ( 255 , 255 , 255 , 0.28 ) 48 % ,
rgba ( 255 , 255 , 255 , 0.1 ) 52 % ,
transparent 70 %
) ;
transform : rotate ( 25 deg ) ;
animation : csk - shimmer 4 s ease - in - out infinite ;
pointer - events : none ;
}
/* 呼吸色晕 — 配合接地阴影,强化白底上的立体存在感 */
. csk - launcher : : after {
content : '' ;
position : absolute ;
inset : - 18 px ;
border - radius : 50 % ;
background : radial - gradient ( circle , rgba ( var ( -- csk - primary - rgb ) , 0.18 ) 0 % , rgba ( var ( -- csk - primary - rgb ) , 0.05 ) 45 % , transparent 68 % ) ;
animation : csk - breathe 3.5 s ease - in - out infinite ;
pointer - events : none ;
}
. csk - launcher :hover {
. csk - launcher :hover {
transform : translateY ( - 3 px ) scale ( 1.08 ) ;
transform : translateY ( - 3 px ) scale ( 1.08 ) ;
border - color : rgba ( 255 , 255 , 255 , 0.75 ) ;
border - color : rgba ( 255 , 255 , 255 , 0.75 ) ;
box - shadow :
box - shadow :
0 2 px 6 px rgba ( 0 , 0 , 0 , 0.10 ) ,
0 2 px 6 px rgba ( 0 , 0 , 0 , 0.10 ) ,
0 8 px 24 px rgba ( 0 , 0 , 0 , 0.14 ) ,
0 8 px 24 px rgba ( 0 , 0 , 0 , 0.14 ) ,
0 10 px 36 px rgba ( var ( -- csk - primary - rgb ) , 0.32 ) ,
0 0 56 px rgba ( var ( -- csk - primary - rgb ) , 0.14 ) ;
}
. csk - launcher :hover : : before { animation - play - state : paused ; }
. csk - launcher :hover : : after {
animation : none ;
inset : - 22 px ;
background : radial - gradient ( circle , rgba ( var ( -- csk - primary - rgb ) , 0.22 ) 0 % , rgba ( var ( -- csk - primary - rgb ) , 0.06 ) 45 % , transparent 68 % ) ;
0 10 px 36 px rgba ( 236 , 72 , 153 , 0.32 ) ,
0 0 56 px rgba ( 236 , 72 , 153 , 0.14 ) ;
}
}
. csk - launcher :active { transform : scale ( 0.93 ) ; }
. csk - launcher :active { transform : scale ( 0.93 ) ; }
. csk - launcher svg {
. csk - launcher svg {
@ -185,140 +129,149 @@ function getStyles(config: ResolvedConfig): string {
100 % { opacity : 1 ; transform : scale ( 1 ) translateY ( 0 ) ; }
100 % { opacity : 1 ; transform : scale ( 1 ) translateY ( 0 ) ; }
}
}
/* ========== 三点脉冲序列图标 ========== */
/* ========== E5 梦幻拖尾·全粒子动画系统 ========== */
/* 极光旋转 */
/* 极光旋转 */
@keyframes csk - aurora - spin {
@keyframes csk - aurora - spin {
to { transform : rotate ( 360 deg ) ; }
to { transform : rotate ( 360 deg ) ; }
}
}
/* 脉冲点 */
. csk - ico - pulse - dot {
/* 粒子通用 */
. csk - pt {
position : absolute ;
position : absolute ;
width : 6px ;
height : 6px ;
border - radius : 50 % ;
border - radius : 50 % ;
background : # fff ;
background : # fff ;
z - index : 5 ;
animation : csk - seq - pulse 1.2 s ease - in - out infinite ;
box - shadow : 0 0 6 px 1 px rgba ( 255 , 255 , 255 , 0.5 ) ;
z - index : 4 ;
top : 50 % ;
left : 50 % ;
pointer - events : none ;
}
}
. csk - ico - pulse - dot -- 1 { top : 4px ; left : 50 % ; margin - left : - 3 px ; }
. csk - ico - pulse - dot -- 2 { top : 50 % ; right : 5px ; margin - top : - 3 px ; animation - delay : 0.3s ; }
. csk - ico - pulse - dot -- 3 { bottom : 5px ; left : 50 % ; margin - left : - 3 px ; animation - delay : 0.6s ; }
@keyframes csk - seq - pulse {
0 % , 100 % { transform : scale ( 0.4 ) ; opacity : 0.3 ; box - shadow : 0 0 4 px 1 px rgba ( 255 , 255 , 255 , 0.3 ) ; }
35 % { transform : scale ( 1.8 ) ; opacity : 1 ; box - shadow : 0 0 12 px 4 px rgba ( 255 , 255 , 255 , 0.8 ) ; }
70 % { transform : scale ( 0.4 ) ; opacity : 0.3 ; box - shadow : 0 0 4 px 1 px rgba ( 255 , 255 , 255 , 0.3 ) ; }
/* ── 爆散粒子(8颗,不同方向/距离/大小/延迟)── */
. csk - pt - burst { animation : csk - burst 2.8 s ease - in - out infinite ; }
. csk - pt - burst :nth - child ( 1 ) { width :5px ; height :5px ; animation - delay :0s ; }
. csk - pt - burst :nth - child ( 2 ) { width :4px ; height :4px ; animation - delay :0.35s ; }
. csk - pt - burst :nth - child ( 3 ) { width :5px ; height :5px ; animation - delay :0.7s ; }
. csk - pt - burst :nth - child ( 4 ) { width :3px ; height :3px ; animation - delay :1.05s ; }
. csk - pt - burst :nth - child ( 5 ) { width :5px ; height :5px ; animation - delay :1.4s ; }
. csk - pt - burst :nth - child ( 6 ) { width :4px ; height :4px ; animation - delay :1.75s ; }
. csk - pt - burst :nth - child ( 7 ) { width :3px ; height :3px ; animation - delay :2.1s ; }
. csk - pt - burst :nth - child ( 8 ) { width :5px ; height :5px ; animation - delay :2.45s ; }
@keyframes csk - burst {
0 % { transform : translate ( - 50 % , - 50 % ) scale ( 0 ) ; opacity : 0 ; }
12 % { transform : translate ( - 50 % , - 50 % ) scale ( 0 ) ; opacity : 0 ; }
32 % { transform : translate ( calc ( - 50 % + var ( -- dx ) ) , calc ( - 50 % + var ( -- dy ) ) ) scale ( 1.5 ) ; opacity : 1 ; }
48 % { transform : translate ( calc ( - 50 % + var ( -- dx ) ) , calc ( - 50 % + var ( -- dy ) ) ) scale ( 0.5 ) ; opacity : .55 ; }
62 % { transform : translate ( - 50 % , - 50 % ) scale ( 0 ) ; opacity : 0 ; }
100 % { transform : translate ( - 50 % , - 50 % ) scale ( 0 ) ; opacity : 0 ; }
}
}
/* 移除旧的 SVG 图标相关样式(已不再使用) */
/* ── 浮游粒子(持续轨道运动,永不停歇)── */
. csk - pt - float {
animation : csk - float - orbit 3 s linear infinite ;
box - shadow : 0 0 4 px 1 px rgba ( 255 , 255 , 255 , . 5 ) ;
}
. csk - pt - float :nth - child ( 9 ) { width :3px ; height :3px ; animation - duration :2.4s ; animation - delay :0s ; }
. csk - pt - float :nth - child ( 10 ) { width :4px ; height :4px ; animation - duration :3.2s ; animation - delay : - 0.6 s ; }
. csk - pt - float :nth - child ( 11 ) { width :3px ; height :3px ; animation - duration :2.8s ; animation - delay : - 1.2 s ; }
. csk - pt - float :nth - child ( 12 ) { width :4px ; height :4px ; animation - duration :3.6s ; animation - delay : - 1.8 s ; }
/* ========== 高光扫过动效 ========== */
. csk - launcher : : before {
content : '' ;
position : absolute ;
top : - 50 % ;
left : - 50 % ;
width : 40 % ;
height : 200 % ;
border - radius : 50 % ;
background : linear - gradient (
105 deg ,
transparent 30 % ,
rgba ( 255 , 255 , 255 , 0.28 ) 48 % ,
rgba ( 255 , 255 , 255 , 0.1 ) 52 % ,
transparent 70 %
) ;
transform : rotate ( 25 deg ) ;
animation : csk - shimmer 4 s ease - in - out infinite ;
pointer - events : none ;
@keyframes csk - float - orbit {
0 % { transform : translate ( - 50 % , - 50 % ) rotate ( 0 deg ) translateX ( 20 px ) rotate ( 0 deg ) ; }
100 % { transform : translate ( - 50 % , - 50 % ) rotate ( 360 deg ) translateX ( 20 px ) rotate ( - 360 deg ) ; }
}
}
/* 呼吸色晕 — 配合接地阴影,强化白底上的立体存在感 */
. csk - launcher : : after {
content : '' ;
position : absolute ;
inset : - 18 px ;
border - radius : 50 % ;
background : radial - gradient ( circle , rgba ( var ( -- csk - primary - rgb ) , 0.18 ) 0 % , rgba ( var ( -- csk - primary - rgb ) , 0.05 ) 45 % , transparent 68 % ) ;
animation : csk - breathe 3.5 s ease - in - out infinite ;
pointer - events : none ;
/* ── 心跳粒子(中心脉冲 + 呼吸缩放)── */
. csk - pt - pulse {
animation : csk - heart - pulse 1.4 s ease - in - out infinite ;
}
}
@keyframes csk - shimmer {
0 % , 100 % { left : - 60 % ; opacity : 0 ; }
20 % { opacity : 1 ; }
60 % { opacity : 1 ; }
80 % { left : 120 % ; opacity : 0 ; }
. csk - pt - pulse :nth - child ( 13 ) {
width : 8px ; height : 8px ;
box - shadow : 0 0 14 px 4 px rgba ( 255 , 255 , 255 , . 8 ) , 0 0 28 px 8 px rgba ( 255 , 255 , 255 , . 3 ) ;
animation - delay : 0s ;
}
}
@keyframes csk - breathe {
0 % , 100 % { transform : scale ( 1 ) ; opacity : 1 ; }
50 % { transform : scale ( 1.15 ) ; opacity : 0.35 ; }
. csk - pt - pulse :nth - child ( 14 ) {
width : 4px ; height : 4px ;
box - shadow : 0 0 8 px 2 px rgba ( 255 , 255 , 255 , . 6 ) ;
animation - delay : 0.7s ;
}
}
/* ========== 磨砂玻璃质感悬浮按钮 ========== */
. csk - launcher -- glass {
/* 覆盖旋转动画为静止渐变 */
animation :
csk - launcher - in 0.55 s cubic - bezier ( 0.22 , 1 , 0.36 , 1 ) both ! important ;
background : linear - gradient (
135 deg ,
var ( -- csk - launcher - grad - 1 , var ( -- csk - primary ) ) 0 % ,
var ( -- csk - launcher - grad - 2 , var ( -- csk - primary - light ) ) 100 %
) ! important ;
backdrop - filter : blur ( 12 px ) saturate ( 180 % ) ;
- webkit - backdrop - filter : blur ( 12 px ) saturate ( 180 % ) ;
border : 1.5px solid rgba ( 255 , 255 , 255 , 0.55 ) ! important ;
/* 多层阴影:接地 + 彩色光晕 + 内阴影立体感 */
box - shadow :
0 2 px 4 px rgba ( 0 , 0 , 0 , 0.04 ) ,
0 6 px 20 px rgba ( 0 , 0 , 0 , 0.08 ) ,
0 8 px 32 px rgba ( var ( -- csk - launcher - glow , var ( -- csk - primary - rgb ) ) , 0.30 ) ,
inset 0 1 px 1 px rgba ( 255 , 255 , 255 , 0.35 ) ,
inset 0 - 1 px 1 px rgba ( 0 , 0 , 0 , 0.04 ) ! important ;
}
. csk - launcher -- glass :hover {
border - color : rgba ( 255 , 255 , 255 , 0.75 ) ! important ;
box - shadow :
0 4 px 8 px rgba ( 0 , 0 , 0 , 0.06 ) ,
0 10 px 28 px rgba ( 0 , 0 , 0 , 0.10 ) ,
0 12 px 40 px rgba ( var ( -- csk - launcher - glow , var ( -- csk - primary - rgb ) ) , 0.38 ) ,
inset 0 1 px 2 px rgba ( 255 , 255 , 255 , 0.45 ) ,
inset 0 - 1 px 1 px rgba ( 0 , 0 , 0 , 0.04 ) ! important ;
@keyframes csk - heart - pulse {
0 % , 100 % { transform : translate ( - 50 % , - 50 % ) scale ( 0.4 ) ; opacity : .3 ; }
25 % { transform : translate ( - 50 % , - 50 % ) scale ( 1.6 ) ; opacity : 1 ; }
50 % { transform : translate ( - 50 % , - 50 % ) scale ( 0.4 ) ; opacity : .3 ; }
75 % { transform : translate ( - 50 % , - 50 % ) scale ( 0.9 ) ; opacity : .6 ; }
}
}
/* 玻璃按钮的呼吸色晕 — 更鲜艳、更醒目 */
. csk - launcher -- glass : : after {
background : radial - gradient (
circle ,
rgba ( var ( -- csk - launcher - glow , var ( -- csk - primary - rgb ) ) , 0.28 ) 0 % ,
rgba ( var ( -- csk - launcher - glow , var ( -- csk - primary - rgb ) ) , 0.10 ) 40 % ,
transparent 65 %
) ! important ;
animation : csk - breathe - glow 3.5 s ease - in - out infinite ;
}
@keyframes csk - breathe - glow {
0 % , 100 % { transform : scale ( 1 ) ; opacity : 0.8 ; }
50 % { transform : scale ( 1.22 ) ; opacity : 0.25 ; }
/* ── 甩尾粒子(椭圆轨道 + 变速,近大远小)── */
. csk - pt - elliptic {
animation : csk - elliptic - orbit 2.6 s ease - in - out infinite ;
box - shadow : 0 0 5 px 1 px rgba ( 255 , 255 , 255 , . 6 ) ;
}
}
. csk - pt - elliptic :nth - child ( 15 ) { width :4px ; height :4px ; animation - delay :0s ; }
. csk - pt - elliptic :nth - child ( 16 ) { width :4px ; height :4px ; animation - delay : - 1.3 s ; }
/* 玻璃按钮的高光扫过 — 更柔和的玻璃质感 */
. csk - launcher -- glass : : before {
background : linear - gradient (
115 deg ,
transparent 25 % ,
rgba ( 255 , 255 , 255 , 0.35 ) 45 % ,
rgba ( 255 , 255 , 255 , 0.15 ) 55 % ,
transparent 75 %
) ! important ;
width : 50 % ;
animation : csk - shimmer - glass 5 s ease - in - out infinite ;
}
@keyframes csk - shimmer - glass {
0 % , 100 % { left : - 70 % ; opacity : 0 ; }
15 % { opacity : 1 ; }
55 % { opacity : 1 ; }
70 % { left : 130 % ; opacity : 0 ; }
@keyframes csk - elliptic - orbit {
0 % { transform : translate ( - 50 % , - 50 % ) rotate ( 0 deg ) translateX ( 18 px ) rotate ( 0 deg ) scaleY ( 1 ) ; }
25 % { transform : translate ( - 50 % , - 50 % ) rotate ( 90 deg ) translateX ( 18 px ) rotate ( - 90 deg ) scaleY ( 0.45 ) ; }
50 % { transform : translate ( - 50 % , - 50 % ) rotate ( 180 deg ) translateX ( 18 px ) rotate ( - 180 deg ) scaleY ( 1 ) ; }
75 % { transform : translate ( - 50 % , - 50 % ) rotate ( 270 deg ) translateX ( 18 px ) rotate ( - 270 deg ) scaleY ( 0.45 ) ; }
100 % { transform : translate ( - 50 % , - 50 % ) rotate ( 360 deg ) translateX ( 18 px ) rotate ( - 360 deg ) scaleY ( 1 ) ; }
}
}
/* 三点脉冲图标在玻璃主题下保持可见 */
/* ── 环绕流光(外层慢速光环拖尾)── */
. csk - pt - ring {
width : 3px ; height : 3px ;
background : rgba ( 255 , 255 , 255 , . 9 ) ;
box - shadow : 0 0 6 px 2 px rgba ( 255 , 255 , 255 , . 7 ) ;
animation : csk - ring - orbit 5 s linear infinite ;
}
. csk - pt - ring :nth - child ( 17 ) { animation - delay : 0s ; }
. csk - pt - ring :nth - child ( 18 ) { animation - delay : - 1.25 s ; }
. csk - pt - ring :nth - child ( 19 ) { animation - delay : - 2.5 s ; }
. csk - pt - ring :nth - child ( 20 ) { animation - delay : - 3.75 s ; }
@keyframes csk - ring - orbit {
0 % { transform : translate ( - 50 % , - 50 % ) rotate ( 0 deg ) translateX ( 23 px ) rotate ( 0 deg ) scale ( 1 ) ; opacity : .8 ; }
50 % { transform : translate ( - 50 % , - 50 % ) rotate ( 180 deg ) translateX ( 23 px ) rotate ( - 180 deg ) scale ( 1.8 ) ; opacity : 1 ; }
100 % { transform : translate ( - 50 % , - 50 % ) rotate ( 360 deg ) translateX ( 23 px ) rotate ( - 360 deg ) scale ( 1 ) ; opacity : .8 ; }
}
/* ── 极光扫光叠加层 ── */
. csk - sheen {
position : absolute ;
inset : 0 ;
border - radius : 50 % ;
pointer - events : none ;
z - index : 3 ;
overflow : hidden ;
}
. csk - sheen : : after {
content : '' ;
position : absolute ;
top : - 60 % ; left : - 60 % ;
width : 35 % ; height : 220 % ;
background : rgba ( 255 , 255 , 255 , . 15 ) ;
transform : rotate ( 22 deg ) ;
animation : csk - shimmer - sweep 2.8 s ease - in - out infinite ;
}
@keyframes csk - shimmer - sweep {
0 % { left : - 60 % ; }
40 % { left : 50 % ; }
60 % { left : 50 % ; }
100 % { left : 130 % ; }
}
/* ── 双层极光圈(反向旋转,增加层次)── */
. csk - dual {
position : absolute ;
inset : 0 ;
border - radius : 50 % ;
pointer - events : none ;
z - index : 2 ;
background : conic - gradient ( from 180 deg , transparent 0 % , rgba ( 255 , 255 , 255 , . 08 ) 35 % , transparent 65 % ) ;
animation : csk - aurora - spin 2 s linear infinite reverse ;
}
/* ========== 聊天弹窗 ========== */
/* ========== 聊天弹窗 ========== */
. csk - window {
. csk - window {
@ -452,6 +405,43 @@ function getStyles(config: ResolvedConfig): string {
. csk - header__btn :active ,
. csk - header__btn :active ,
. csk - history - btn :active { transform : scale ( 0.92 ) ; }
. csk - history - btn :active { transform : scale ( 0.92 ) ; }
/* ========== 角色选择器 ========== */
. csk - role - select - wrap {
display : flex ;
align - items : center ;
flex - shrink : 0 ;
margin : 0 4 px ;
}
. csk - role - select {
appearance : none ;
- webkit - appearance : none ;
padding : 4px 24 px 4 px 10 px ;
border : 1px solid rgba ( 255 , 255 , 255 , 0.35 ) ;
border - radius : 8px ;
background : rgba ( 255 , 255 , 255 , 0.15 ) url ( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='white' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E" ) no - repeat right 6 px center ;
color : # fff ;
font - size : 12px ;
font - family : inherit ;
cursor : pointer ;
outline : none ;
transition : background 0.15 s , border - color 0.15 s ;
max - width : 120px ;
text - overflow : ellipsis ;
white - space : nowrap ;
}
. csk - role - select :hover {
background - color : rgba ( 255 , 255 , 255 , 0.25 ) ;
border - color : rgba ( 255 , 255 , 255 , 0.55 ) ;
}
. csk - role - select :focus {
border - color : rgba ( 255 , 255 , 255 , 0.7 ) ;
box - shadow : 0 0 0 2 px rgba ( 255 , 255 , 255 , 0.2 ) ;
}
. csk - role - select option {
color : # 1 F2937 ;
background : # fff ;
}
/* ========== 消息区 ========== */
/* ========== 消息区 ========== */
. csk - messages {
. csk - messages {
flex : 1 ;
flex : 1 ;
@ -839,6 +829,7 @@ function getStyles(config: ResolvedConfig): string {
. csk - msg -- ai . csk - msg__bubble . csk - md - h4 { font - size : 14px ; }
. csk - msg -- ai . csk - msg__bubble . csk - md - h4 { font - size : 14px ; }
. csk - md - code - block {
. csk - md - code - block {
position : relative ;
background : # 1 E293B ;
background : # 1 E293B ;
color : # E2E8F0 ;
color : # E2E8F0 ;
padding : 12px 14 px ;
padding : 12px 14 px ;
@ -1025,19 +1016,6 @@ function getStyles(config: ResolvedConfig): string {
color : # 9 CA3AF ;
color : # 9 CA3AF ;
font - size : 13px ;
font - size : 13px ;
}
}
. csk - history - panel__loadmore {
display : block ;
width : 100 % ;
padding : 10px ;
border : none ;
background : # F9FAFB ;
color : # 6 B7280 ;
font - size : 12px ;
cursor : pointer ;
text - align : center ;
transition : background 0.15 s ;
}
. csk - history - panel__loadmore :hover { background : # F3F4F6 ; }
/* ========== 快捷问题芯片 ========== */
/* ========== 快捷问题芯片 ========== */
. csk - quick - replies {
. csk - quick - replies {
@ -1117,7 +1095,6 @@ function getStyles(config: ResolvedConfig): string {
}
}
/* ========== 代码块复制按钮 ========== */
/* ========== 代码块复制按钮 ========== */
. csk - md - code - block { position : relative ; }
. csk - md - code - copy {
. csk - md - code - copy {
position : absolute ;
position : absolute ;
top : 8px ;
top : 8px ;
@ -1329,6 +1306,10 @@ function getStyles(config: ResolvedConfig): string {
. csk - dark . csk - launcher__badge { box - shadow : 0 0 0 2 px # 1 A1A2E ; }
. csk - dark . csk - launcher__badge { box - shadow : 0 0 0 2 px # 1 A1A2E ; }
. csk - dark . csk - welcome__avatar { box - shadow : 0 6 px 18 px rgba ( var ( -- csk - primary - rgb ) , 0.25 ) ; }
. csk - dark . csk - welcome__avatar { box - shadow : 0 6 px 18 px rgba ( var ( -- csk - primary - rgb ) , 0.25 ) ; }
. csk - dark . csk - header__avatar { box - shadow : inset 0 0 0 1 px rgba ( 255 , 255 , 255 , 0.15 ) ; background : rgba ( 255 , 255 , 255 , 0.1 ) ; }
. csk - dark . csk - header__avatar { box - shadow : inset 0 0 0 1 px rgba ( 255 , 255 , 255 , 0.15 ) ; background : rgba ( 255 , 255 , 255 , 0.1 ) ; }
. csk - dark . csk - role - select option {
background : # 1 A1A2E ;
color : # E2E8F0 ;
}
/* Launcher 拖拽态:微放大 + 阴影加深 */
/* Launcher 拖拽态:微放大 + 阴影加深 */
. csk - launcher -- dragging {
. csk - launcher -- dragging {
@ -1337,11 +1318,9 @@ function getStyles(config: ResolvedConfig): string {
box - shadow :
box - shadow :
0 4 px 12 px rgba ( 0 , 0 , 0 , 0.14 ) ,
0 4 px 12 px rgba ( 0 , 0 , 0 , 0.14 ) ,
0 12 px 32 px rgba ( 0 , 0 , 0 , 0.18 ) ,
0 12 px 32 px rgba ( 0 , 0 , 0 , 0.18 ) ,
0 14 px 40 px rgba ( var ( -- csk - primary - rgb ) , 0.36 ) ,
0 0 56 px rgba ( var ( -- csk - primary - rgb ) , 0.18 ) ! important ;
0 14 px 40 px rgba ( 236 , 72 , 153 , 0.36 ) ,
0 0 56 px rgba ( 236 , 72 , 153 , 0.18 ) ! important ;
}
}
. csk - launcher -- dragging : : before ,
. csk - launcher -- dragging : : after { animation - play - state : paused ! important ; }
/* 拖拽中隐藏未读徽章 */
/* 拖拽中隐藏未读徽章 */
. csk - launcher -- dragging . csk - launcher__badge { display : none ! important ; }
. csk - launcher -- dragging . csk - launcher__badge { display : none ! important ; }
/* 吸附过渡动画(释放时的缓动) */
/* 吸附过渡动画(释放时的缓动) */
@ -1555,26 +1534,6 @@ export function injectStyles(config: ResolvedConfig): void {
document . head . appendChild ( styleElement ) ;
document . head . appendChild ( styleElement ) ;
}
}
/ * *
* 动 态 更 新 CSS 变 量 ( 主 题 色 变 更 时 使 用 )
* /
export function updateTheme ( config : ResolvedConfig ) : void {
const root = document . querySelector ( '.csk-root' ) as HTMLElement ;
if ( ! root ) {
return ;
}
const vars = cssVars ( config ) ;
vars . split ( ';' ) . forEach ( ( pair ) = > {
const idx = pair . indexOf ( ':' ) ;
if ( idx < 0 ) return ;
const key = pair . slice ( 0 , idx ) . trim ( ) ;
const value = pair . slice ( idx + 1 ) . trim ( ) ;
if ( key && value ) {
root . style . setProperty ( key , value ) ;
}
} ) ;
}
/ * *
/ * *
* 移 除 注 入 的 样 式
* 移 除 注 入 的 样 式
* /
* /