/** * Skeleton primitives. * * The shimmer itself lives in `.aime-skeleton` (global.scss) so every waiting * surface in the plugin sweeps in the same material and the same rhythm — these * only decide size and arrangement. * * For a whole-surface wait, prefer `Loader` with a variant; reach for these when * a specific block needs its own placeholder. */ const SkeletonBlock = ( { width = '100%', height = 16, style = {} } ) => (
); const SkeletonCard = () => (
); // Fixed, offset widths rather than random ones: a placeholder that reshuffles on // every re-render reads as content changing, not as content arriving. const ROW_WIDTHS = [ '72%', '90%', '55%', '80%', '64%' ]; const SkeletonRow = ( { cols = 5, offset = 0 } ) => ( { Array.from( { length: cols } ).map( ( _, i ) => ( ) ) } ); const SkeletonTable = ( { rows = 5, cols = 5 } ) => (
{ Array.from( { length: cols } ).map( ( _, i ) => ( ) ) } { Array.from( { length: rows } ).map( ( _, i ) => ( ) ) }
); const SkeletonChart = ( { height = 250 } ) => (
); export { SkeletonBlock, SkeletonCard, SkeletonRow, SkeletonTable, SkeletonChart }; export default SkeletonCard;