HEL-748: implement S1 frontend with explicit local demo

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
白栖知
2026-10-22 00:56:18 +08:00
co-authored by multica-agent
parent 1e9b08aed8
commit 6c3b09e693
39 changed files with 5414 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
export function Background() {
return <div className="space" aria-hidden="true"><div className="layer">{['moon', 'fog'].map(theme => <div className={`scene ${theme}`} key={theme}><div className="sky"/>{theme === 'moon' ? <><div className="moon-halo"/><div className="moon-disc"/></> : <>{[1, 2, 3].map(i => <div className={`ribbon r${i}`} key={i}/>)}</>}{['far', 'near'].map((depth, index) => <div className={`skyline ${depth}`} key={depth}><svg viewBox="0 0 1440 400" preserveAspectRatio="none"><defs><linearGradient id={`${theme}-${depth}`} x1="0" y1="0" x2="0" y2="1"><stop stopColor={theme === 'moon' ? '#121f46' : '#33215c'}/><stop offset="1" stopColor={theme === 'moon' ? '#060c22' : '#170e32'}/></linearGradient></defs>{Array.from({ length: 28 }, (_, i) => { const h = 45 + (i * 71 + index * 37) % 180; return <g key={i}><rect x={i * 54} y={400 - h} width={40 + i % 3 * 4} height={h} fill={`url(#${theme}-${depth})`}/>{Array.from({ length: 3 }, (_, j) => <rect key={j} x={i * 54 + 9 + j * 9} y={420 - h} width="3" height="6" fill="#b1cbff" opacity=".3"/>)}</g>; })}</svg></div>)}{[1, 2, 3, 4].map(i => <div className={`mist m${i}`} key={i}/>)}{[1, 2, 3].map(i => <div className={`bokeh b${i}`} key={i}/>)}</div>)}</div><div className="vignette"/><div className="depth-veil"/></div>;
}
+15
View File
@@ -0,0 +1,15 @@
import { useState } from 'react';
import type { SceneDesc } from '../domain/model';
import { Icon } from '../shared/ui';
export interface PresenterProps {
scene: SceneDesc;
onClose: () => void;
closeLabel: string;
presence: string;
observation: string;
}
// Only consumes scene. No life writes, no synthesis, no microphone/camera APIs.
export function FallbackPresenter({ scene, onClose, closeLabel, presence, observation }: PresenterProps) {
const [failed, setFailed] = useState(false);
return <><section className="portal" aria-label="她的视窗"><div className="life">{!failed && <><img className="img-room" src="/assets/her-room.jpg" alt="卧室窗边的人物参考静帧" onError={() => setFailed(true)}/><img className="img-talk" src="/assets/her-talk.jpg" alt="同一人物的交谈近景参考静帧" onError={() => setFailed(true)}/></>}</div>{failed && <div className="empty">画面暂时没打开,文字仍可使用。</div>}<div className="tint"/><div className="doing"><span className="chip glass"><Icon name="book"/>{scene.activity}</span><span className="tag-demo">演示状态</span></div><div className="topleft"><span className="chip">{presence}</span>{observation && <span className="chip observe show">{observation}</span>}</div><button className="close" onClick={onClose}><Icon name="back"/>{closeLabel}</button><span className="mark">示意画面 · 参考静帧</span></section><div className="mini-cap"><b>她此刻 · {scene.activity}</b>来自演示生活状态<br />画面为示意静帧<button className="btn-text" onClick={onClose}>回到她身边</button></div></>;
}