// src/components/InputPanel.jsx import React, { useRef, useState } from 'react' export default function InputPanel({ text, onTextChange, onImageChange, onAnalyze, loading, imagePreview }) { const fileRef = useRef(null) const [dragOver, setDragOver] = useState(false) function handleDrop(e) { e.preventDefault() setDragOver(false) const file = e.dataTransfer.files[0] if (file && file.type.startsWith('image/')) onImageChange(file) } function handleFile(e) { const file = e.target.files[0] if (file) onImageChange(file) } return (
Input Stream Vision + NLP
{/* Image drop zone */}
fileRef.current?.click()} onDragOver={e => { e.preventDefault(); setDragOver(true) }} onDragLeave={() => setDragOver(false)} onDrop={handleDrop} > {imagePreview ? ( Face preview ) : (

Drop face image or click to upload

JPEG · PNG · WEBP

)} {/* scanline overlay while no image */} {!imagePreview && (
)}
{/* Text area */}