Files
cozsweet-frontend-nextjs/src/app/chat/components/lottie-message-bubble.tsx
T

29 lines
903 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"use client";
/**
* LottieMessageBubble 动画消息气泡
*
* 原始 Dart: lib/ui/chat/widgets/lottie_message_bubble.dart51 行)
*
* 原始实现:使用 lottie SDK 渲染"打字指示器"动画
* 本轮实现:使用 CSS keyframes 模拟(无 lottie 依赖)
* - 3 个跳动的圆点(左右 + 中间)
* - 1.4s 周期,stagger 动画延迟
*
* 行为一致(视觉类似 lottie 的"三点跳跃"动画)
*/
import { MessageAvatar } from "./message-avatar";
import styles from "./lottie-message-bubble.module.css";
export function LottieMessageBubble() {
return (
<div className={styles.bubbleRow} role="status" aria-label="AI typing">
<MessageAvatar isFromAI={true} />
<div className={styles.bubble}>
<span className={styles.dot} />
<span className={styles.dot} />
<span className={styles.dot} />
</div>
</div>
);
}