import type { MemoryBucket, SensingState } from "../types"; const AFFECT_EMOJI: Record = { HAPPY: "😊", FRUSTRATED: "😀", NEUTRAL: "😐", SURPRISED: "😲", }; const ZONE_LABEL: Record = { family: "πŸ‘¨β€πŸ‘©β€πŸ‘§ Family", medical: "πŸ₯ Medical", social: "πŸ‘₯ Social", hobbies: "🎨 Hobbies", daily_routine: "πŸŒ… Routine", }; function GazeZoneMap({ active }: { active: MemoryBucket | null }) { const zone = (bucket: MemoryBucket) => (
{ZONE_LABEL[bucket]}
); return (
{zone("family")} {zone("medical")}
{zone("social")}
{zone("hobbies")} {zone("daily_routine")}
); } interface Props { sensing: SensingState; webcamActive: boolean; calibrated?: boolean; onRecalibrate?: () => void; } export function SensingStatus({ sensing, webcamActive, calibrated, onRecalibrate }: Props) { if (!webcamActive) { return

Webcam off

; } return (
{calibrated !== undefined && (
Calibration {calibrated ? "βœ“ ready" : "β€”"} {onRecalibrate && ( )}
)}
Affect {AFFECT_EMOJI[sensing.affect ?? "NEUTRAL"]}{" "} {sensing.affect ?? "NEUTRAL"}
Gesture {sensing.gestureTag ?? "none"}
Gaze {sensing.gazeBucket ?? "none"}
Head {sensing.headSignal ?? "steady"}
↳ p/y/r {sensing.headDebug.pitch}Β° / {sensing.headDebug.yaw}Β° / {sensing.headDebug.roll}Β° {" "}(x{sensing.headDebug.crossings})
Air-writing {sensing.airWritingActive ? "✏️ drawing…" : sensing.airWrittenText ? sensing.airWrittenText : "none"}
); }