import * as React from "react"; //#region src/facehash.d.ts type Intensity3D = "none" | "subtle" | "medium" | "dramatic"; type Variant = "gradient" | "solid"; interface FacehashProps extends Omit, "children"> { /** * String to generate a deterministic face from. * Same string always produces the same face. */ name: string; /** * Size in pixels or CSS units. * @default 40 */ size?: number | string; /** * Background style. * - "gradient": Adds gradient overlay (default) * - "solid": Plain background color * @default "gradient" */ variant?: Variant; /** * 3D effect intensity. * @default "dramatic" */ intensity3d?: Intensity3D; /** * Enable hover interaction. * When true, face "looks straight" on hover. * @default true */ interactive?: boolean; /** * Show first letter of name below the face. * @default true */ showInitial?: boolean; /** * Hex color array for inline styles. * Use this OR colorClasses, not both. */ colors?: string[]; /** * Tailwind class array for background colors. * Example: ["bg-pink-500 dark:bg-pink-600", "bg-blue-500 dark:bg-blue-600"] * Use this OR colors, not both. */ colorClasses?: string[]; /** * Custom gradient overlay class (Tailwind). * When provided, replaces the default pure CSS gradient. * Only used when variant="gradient". */ gradientOverlayClass?: string; /** * Custom mouth renderer. When provided, replaces the initial letter. * Useful for showing loading spinners, custom icons, etc. * @example * ```tsx * } /> * ``` */ onRenderMouth?: () => React.ReactNode; /** * Enable random eye blinking animation. * Pure CSS animation with chaotic timing per eye. * @default false */ enableBlink?: boolean; } /** * Facehash - Deterministic avatar faces from any string. * * @example * ```tsx * // With Tailwind classes * * * // With hex colors * * * // Plain color (no gradient) * * ``` */ declare const Facehash: React.ForwardRefExoticComponent>; //#endregion //#region src/avatar.d.ts type ImageLoadingStatus$1 = "idle" | "loading" | "loaded" | "error"; type AvatarContextValue = { imageLoadingStatus: ImageLoadingStatus$1; onImageLoadingStatusChange: (status: ImageLoadingStatus$1) => void; }; /** * Hook to access the Avatar context. * Throws an error if used outside of Avatar. */ declare const useAvatarContext: () => AvatarContextValue; type AvatarProps = React.HTMLAttributes & { /** * Render as a different element using the asChild pattern. * When true, Avatar renders its child and merges props. */ asChild?: boolean; }; /** * Root avatar component that provides context for image loading state. * * @example * ```tsx * * * * * ``` */ declare const Avatar: React.ForwardRefExoticComponent & { /** * Render as a different element using the asChild pattern. * When true, Avatar renders its child and merges props. */ asChild?: boolean; } & React.RefAttributes>; //#endregion //#region src/avatar-fallback.d.ts type AvatarFallbackProps = Omit, "children"> & { /** * The name to derive initials and Facehash from. */ name?: string; /** * Delay in milliseconds before showing the fallback. * Useful to prevent flashing when images load quickly. * @default 0 */ delayMs?: number; /** * Custom children to render instead of initials or Facehash. */ children?: React.ReactNode; /** * Use the Facehash component as fallback instead of initials. * @default true */ facehash?: boolean; /** * Props to pass to the Facehash component. */ facehashProps?: Omit; }; /** * Fallback component that displays when the image fails to load. * Uses Facehash by default, can show initials or custom content. * * @example * ```tsx * // With Facehash (default) * * * // With initials * * * // With custom content * * * * ``` */ declare const AvatarFallback: React.ForwardRefExoticComponent, "children"> & { /** * The name to derive initials and Facehash from. */ name?: string; /** * Delay in milliseconds before showing the fallback. * Useful to prevent flashing when images load quickly. * @default 0 */ delayMs?: number; /** * Custom children to render instead of initials or Facehash. */ children?: React.ReactNode; /** * Use the Facehash component as fallback instead of initials. * @default true */ facehash?: boolean; /** * Props to pass to the Facehash component. */ facehashProps?: Omit; } & React.RefAttributes>; //#endregion //#region src/avatar-image.d.ts type ImageLoadingStatus = "idle" | "loading" | "loaded" | "error"; type AvatarImageProps = Omit, "src"> & { /** * The image source URL. If empty or undefined, triggers error state. */ src?: string | null; /** * Callback when the image loading status changes. */ onLoadingStatusChange?: (status: ImageLoadingStatus) => void; }; /** * Image component that syncs its loading state with the Avatar context. * Automatically hides when loading fails, allowing fallback to show. * * @example * ```tsx * * * * * ``` */ declare const AvatarImage: React.ForwardRefExoticComponent, "src"> & { /** * The image source URL. If empty or undefined, triggers error state. */ src?: string | null; /** * Callback when the image loading status changes. */ onLoadingStatusChange?: (status: ImageLoadingStatus) => void; } & React.RefAttributes>; //#endregion //#region src/faces.d.ts type FaceProps = { className?: string; style?: React.CSSProperties; /** * Enable blinking animation */ enableBlink?: boolean; /** * Blink animation timings for left and right eyes */ blinkTimings?: { left: { delay: number; duration: number; }; right: { delay: number; duration: number; }; }; }; /** * Round eyes face - simple circular eyes */ declare const RoundFace: React.FC; /** * Cross eyes face - X-shaped eyes */ declare const CrossFace: React.FC; /** * Line eyes face - horizontal line eyes */ declare const LineFace: React.FC; /** * Curved eyes face - sleepy/happy curved eyes */ declare const CurvedFace: React.FC; /** * All available face components */ declare const FACES: readonly [React.FC, React.FC, React.FC, React.FC]; type FaceComponent = (typeof FACES)[number]; //#endregion //#region src/utils/hash.d.ts /** * Generates a consistent numeric hash from a string. * Used to deterministically select faces and colors for avatars. * * @param str - The input string to hash * @returns A positive 32-bit integer hash */ declare function stringHash(str: string): number; //#endregion export { Avatar, type AvatarContextValue, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarImageProps, type AvatarProps, CrossFace, CurvedFace, FACES, type FaceComponent, type FaceProps, Facehash, type FacehashProps, type Intensity3D, LineFace, RoundFace, type Variant, stringHash, useAvatarContext }; //# sourceMappingURL=index.d.ts.map