import React from 'react'; import { Heart } from 'lucide-react'; import { motion } from 'framer-motion'; import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer } from 'recharts'; import { TypewriterText } from './common/TypewriterText'; import { ContentCard } from './common/ContentCard'; import { SkeletonCard } from './common/SkeletonCard'; import { IconLoading } from './common/IconLoading'; interface ScriptContent { acts?: Array<{ id: string; stableId: string; title: string; desc: string; beats: string[]; }>; characters?: Array<{ id: string; stableId: string; name: string; role: string; arc: string; desc: string; color: string; }>; dialogue?: { stableId: string; rhythm: string; style: string; }; themes?: Array<{ id: string; stableId: string; theme: string; desc: string; depth: string; }>; dramaticLine?: { stableId: string; points: Array<{ id: string; stableId: string; title: string; desc: string; intensity: number; // 0-100 情感强度 }>; }; } interface ScriptwriterProps { currentContent: ScriptContent; isPlaying: boolean; } const CustomTooltip = ({ active, payload, label }: any) => { if (active && payload && payload.length) { return (

{payload[0].payload.title}

{`情感强度: ${payload[0].value}`}

); } return null; }; const Scriptwriter: React.FC = ({ currentContent, isPlaying }) => { return (
{/* 左侧:三幕结构和角色弧光 */}
{/* 三幕结构 */}

三幕结构搭建

{currentContent.acts && currentContent.acts.length > 0 ? ( currentContent.acts.map((act) => (
{act.title}
{act.beats?.map((beat, index) => ( {beat} ))}
)) ) : ( Array.from({length: 3}, (_, i) => ( )) )}
{/* 角色弧光设计 */}

角色弧光设计

{currentContent.characters && currentContent.characters.length > 0 ? ( currentContent.characters.map((char) => (
{char.name} ({char.role})
{char.arc}
)) ) : ( Array.from({length: 3}, (_, i) => ( )) )}
{/* 右侧:对白节奏和主题深化 */}
{/* 对白节奏感 */}

对白节奏感

{currentContent.dialogue ? (
节奏控制
表达风格
) : ( )}
{/* 主题深化过程 */}

主题深化过程

{currentContent.themes ? ( <> {currentContent.themes.map((theme) => (
{theme.theme}
))} ) : ( Array.from({length: 2}, (_, i) => ( )) )}
{/* 剧情起伏戏演线 */}

剧情起伏戏演线

{currentContent.dramaticLine ? (
{/* 情感强度曲线图 */}
} />
{/* 关键点说明 */}
{currentContent.dramaticLine?.points?.map((point) => (
{point.title}
))}
) : (
{/* 骨架屏曲线图 */}
)}
); }; export default Scriptwriter;