import type { ReactNode } from 'react'; /** * A download size as a person reads it: `0 KB`, `38 KB`, `1.2 MB`. * Kilobytes are 1,024 bytes, as browsers' network panels count them. */ export declare function formatDownloadSize(bytes: number): string; /** `38 KB · 2 files`, approximate when `approximate`. */ export declare function downloadCostLabel(bytes: number, files: number, approximate?: boolean): string; export interface DownloadCostBadgeProps { /** Bytes a visitor downloads; absent while unknown. */ bytes?: number | null; /** How many files those bytes are. */ files?: number | null; /** Shows `≈`: some of the size could not be measured, or it is an estimate. */ approximate?: boolean; /** Still measuring. */ loading?: boolean; /** Why it could not be measured; shows the badge's error state. */ error?: string | null; /** What the figure counts, for the badge's tooltip. */ tooltip?: ReactNode; /** The label while measuring. */ loadingLabel?: string; } /** * What something costs a visitor to download, as one small badge: the size * and the number of files, with a tooltip saying what is counted, and its * own measuring and failed states (AGL-3656, first for the font picker). * * A badge, not a sentence, because it sits beside a choice and is read at a * glance while comparing two. NOT in the barrel: subpath-import it. */ export declare function DownloadCostBadge(props: DownloadCostBadgeProps): import("react").JSX.Element; export declare namespace DownloadCostBadge { var displayName: string; } export default DownloadCostBadge;