import { Avatar as DicebearAvatar, Style } from "@dicebear/core" import loreleiDefinition from "@dicebear/styles/lorelei.json" // Génération locale (pas d'appel à l'API DiceBear) : self-hosted, offline, // aucun pseudo envoyé à un tiers. Lorelei par Lisa Wischofsky — licence CC0 1.0. const style = new Style(loreleiDefinition) const cache = new Map() /** Data URI de l'avatar pour un seed donné, mémoïsé. */ function avatarUri(seed: string): string { let uri = cache.get(seed) if (!uri) { uri = new DicebearAvatar(style, { seed }).toDataUri() cache.set(seed, uri) } return uri } /** Avatar DiceBear (style lorelei), seedé par le pseudo → stable et reconnaissable. */ export function Avatar({ seed, className }: { seed: string; className?: string }) { return ( {`Avatar ) }