import { EyeOff } from 'lucide-react'; import { useLayoutEffect, useRef, useState } from 'react'; import type { InputMethod } from '../types'; import { getVimHudLegendGroups, isVimHudLegendGroupActive, type VimHudCommand, type VimHudLegendGroup, type VimHudLegendGroupId, type VimHudPhase, } from '../utils/vimHud'; const HUD_MONO_FONT = '"SFMono-Regular", "JetBrains Mono", Menlo, var(--font-mono), monospace'; // Match the seven-frame pressed state in the 30fps product-demo HUD. const PRESSED_DURATION_MS = (7 / 30) * 1000; const KEY_MAP_COLUMNS: readonly (readonly VimHudLegendGroupId[])[] = [ ['structure', 'control'], ['text'], ['selection', 'annotation'], ]; const KEY_MAP_GROUPS = getVimHudLegendGroups(); interface PreviousKeyProps { readonly keyLabel: string; readonly opacity: number; } function PreviousKey({ keyLabel, opacity }: PreviousKeyProps) { return (