// Loading states: skeletons shaped like the content that is coming, with a soft shimmer
// (still when Settings → Motion is Reduced or the system asks for reduced motion).
import { tr } from "../lib/i18n.js";
export function Skeleton({ w = "100%", h = 12, r = 8, style }) {
return ;
}
// A few lines of text, the last one shorter.
export function SkeletonLines({ n = 3 }) {
return (
{Array.from({ length: n }, (_, i) => )}
);
}
// A whole page while its first data arrives: title bar, three tiles, two cards.
export function PageSkeleton() {
return (
{tr("Loading…")}
{[0, 1, 2].map((i) => (
))}
);
}
// A spinner ring and a line of status, for something that loads in one piece (the orb graph).
export function Loader({ title, detail }) {
return (
{title}
{detail && {detail}}
);
}