/** * InputMini — the input demoted to a compact secondary control for output-first * views. Ported from `InputMini.jsx`. */ import { VirtualJoystick, XYPad } from '../primitives'; import type { MFMode } from './model'; export interface InputMiniProps { mode: MFMode; pos: [number, number]; onMove: (x: number, y: number) => void; noiseCap?: number; size?: number; corner?: 'bottom-left' | 'bottom-right' | 'top-left'; /** Input-map shape override (Settings). Falls back to the mode's input. */ variant?: 'rectangular' | 'circular'; } export function InputMini({ mode, pos, onMove, size = 132, corner = 'bottom-left', variant, }: InputMiniProps) { const circular = variant ? variant === 'circular' : mode.input === 'joystick'; const place = { 'bottom-left': { bottom: 14, left: 14 }, 'bottom-right': { bottom: 14, right: 14 }, 'top-left': { top: 14, left: 14 }, }[corner]; return (