feat(chat): port chat widget components from Dart to React

This commit is contained in:
2026-06-09 20:19:52 +08:00
parent 199a14650e
commit 109a3e3855
48 changed files with 2463 additions and 382 deletions
@@ -0,0 +1,28 @@
"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>
);
}