import type { TimeHTMLAttributes } from "react"; /** * Timestamp — accessible relative/absolute time primitive. * * Renders a semantic `` element. Format modes: * - `relative` (default) — "just now", "5 minutes ago", "2 hours ago", * "Dec 5" (>7d), "Dec 5, 2024" (different year) * - `absolute` — full localized date+time * - `both` — "Dec 5, 2026 (2 hours ago)" * * Uses zero-dep `Intl.RelativeTimeFormat`. The tooltip on hover is the * HTML `title` attribute (not the `` component) — keeps this * file a true primitive without sibling-primitive imports. * * Auto-refreshes via `setInterval` (default 60_000ms); pass * `refreshInterval={0}` to disable. `aria-label` always carries the * absolute time so screen readers read "May 23, 2026 14:32 — posted * 2 hours ago". * * @param value Source date — ISO string, Date object, or **Unix ms** * (NOT seconds). Passing seconds renders ~1970. */ export interface TimestampProps extends Omit, "children"> { value: string | Date | number; format?: "relative" | "absolute" | "both"; /** Auto-refresh interval when format=relative. Default 60000. 0 disables. */ refreshInterval?: number; /** Locale for absolute formatting + Intl.RelativeTimeFormat. Default browser locale. */ locale?: string; /** When true, omit the `title` tooltip. */ noTooltip?: boolean; } declare const Timestamp: import("react").ForwardRefExoticComponent>; export { Timestamp };