import { gradientFor, hashString } from "../../web/src/lib/avatarGradient.ts"; /** * Render an actor's placeholder as a self-contained SVG string. */ export const gradientSvg = (actor, size = 128) => { const { angle, stops, glow } = gradientFor(actor); const id = hashString(actor).toString(36); const stopMarkup = stops .map((s) => ``) .join(""); return ( `` + `` + `${stopMarkup}` + `` + `` + `` + `` + `` + `` + `` + `` ); };