/** * avatar.ts — roster avatar rendering (T18-avatar). * * Produces the leading avatar element for a message row: an when the * sender has an avatar URL, or a deterministic initials-circle fallback. * Falls back to initials on image load error (onerror). * * Security: the avatar URL is caller-supplied roster data. It is assigned via * `img.src` (the property), NEVER via innerHTML, and only when it is an http(s) * URL — a defensive second gate on top of the server-side scheme validation. */ /** Deterministic initials from a display name (1-2 uppercase letters). */ export declare function avatarInitials(name: string): string; /** Deterministic background color (HSL string) seeded by a stable id (epid). */ export declare function avatarColor(seed: string): string; export interface AvatarOptions { /** Display name — used for alt text and the initials fallback. */ name: string; /** Avatar URL, or null for the initials fallback. */ avatarUrl: string | null; /** Stable id (epid) seeding the fallback color. */ seed: string; } /** * Build the leading avatar element for a message row. * * - avatarUrl present + http(s): an (src set via property, never * innerHTML); on load error it swaps to the initials fallback. * - avatarUrl null/invalid: a deterministic initials circle. * * Accessible: the carries alt = display name; the initials circle is * decorative (aria-hidden) since the sender name is already in the bubble. */ export declare function createAvatarElement(opts: AvatarOptions): HTMLElement; //# sourceMappingURL=avatar.d.ts.map