import { useId } from 'react'; import type { CSSProperties } from 'react'; import type { RGB } from '@/shared/contracts/robot.ts'; import { anchors } from '@/client/exhibit/diagram/diagram-model.ts'; export function ledColor(rgb?: RGB): string { return rgb ? `rgb(${rgb.map((value) => Math.min(255, value * 8)).join(' ')})` : '#697366'; } /** Board artwork and logical stream anchors; the LED follows reported hardware state. */ export function BoardIllustration({ led }: { led?: RGB }) { const patternId = useId(); const color = ledColor(led), known = !!led, ledOn = !!led?.some((value) => value > 0); return ( {[0, 1].map((side) => ( {Array.from({ length: 16 }, (_, i) => ( ))} ))} ESPRESSIF ESP32-S3 DUAL CORE ยท 240 MHz 32 MiB FLASH 16 MiB PSRAM RGB / 38 BOOT RESET {/* Logical Wi-Fi streams meet the edge of the illustration. These markers do not represent USB connections or GPIO assignments. */} ); }