import "./avatar.css"; import type * as React from "react"; import type { AvatarRootProps } from "@base-ui/react/avatar"; import { type DisplayFile } from "./file_thumbnail"; import { type MarkSize } from "./mark"; import { type TextSize } from "./text"; import { type StyleProps } from "./style_props"; /** `sm` runs richer: one letter in a small circle needs the weight. */ export declare const AVATAR_TEXT: Record; /** Glyphs take the icon ladder (`constitution.md` §9); `xl` and `xxl` take §9's proportional escape. */ export declare const AVATAR_GLYPH: Record; /** * The first and last words, not the first two: a Vietnamese name is họ + đệm + tên, so "Vũ Thị Lan" * and "Vũ Thị Ngọc" would both be "VT". `xs` and `sm` get one letter. */ export declare function avatarInitials(name: string, size: MarkSize): string; /** * An image's URL, or the FILE the subject's picture is: an image draws as its picture, a video as its first * frame under its play mark, any other file as its kind — never initials over a picture held. */ export type AvatarSource = { uri?: string; } | { file: DisplayFile; }; /** A subject's picture as a row holds it: an image's URL, or the file it is. */ export type Picture = string | DisplayFile; /** The source a picture draws from; absent, the mark's initials. */ export declare function pictureSource(picture: Picture | null | undefined): AvatarSource | undefined; /** * A company drawn with a person's disc claims they are the same kind of entity. One component, per * the mode-is-a-variant rule. */ export type AvatarSubject = "person" | "organization" | "agent"; export interface AvatarProps extends StyleProps { /** From `identityRung`, never pixels. Unstated, the row's lead decides (`useLeadRung`). */ size?: MarkSize; /** * `person` (a disc), `organization` (rounded square), or `agent` (the agent glyph on the product's hue). * Unstated, a `person` — unless `source` is a file, or the mark leads a row's picture (`Row.Lead picture`): * a thing's picture, a rounded square. */ subject?: AvatarSubject; /** Its picture; a file that is a video draws its first frame (`AvatarSource`). */ source?: AvatarSource; /** * Pass the name as given and let a missing one be missing: substituting the word for "nobody" * hands the hash a locale string. */ name?: string | null; /** * Read only where there is no `name`. Pass both rather than resolving the pair: `identityKey` is * the kit's one reading. */ identity?: string | null; contentFit?: "cover" | "contain"; /** Default false: the name text almost always sits beside the mark. */ announce?: boolean; testID?: string; ref?: React.Ref; render?: AvatarRootProps["render"]; } /** * An image when there is one, otherwise the subject's mark. Base UI keeps the fallback mounted * until the image loads, so a broken source shows a named disc. */ export declare function Avatar(props: AvatarProps): React.JSX.Element;