import type { ReactNode } from "react"; import { AuthorAvatar } from "./author-link"; import { InstallCount } from "./install-count"; import { pluginCardScreenshot } from "./thumbnails"; import { pluginHref } from "./links"; import { PluginTile } from "./plugin-tile"; import { firstMediaImage, getAuthor, getCategory, type Plugin } from "./registry"; export const PLUGIN_GRID_CLASS = "grid gap-x-4 gap-y-8 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4"; /** First allowed image, or the plugin tile on a quiet backdrop when there is none. */ function PluginShot({ plugin }: { plugin: Plugin }) { const url = firstMediaImage(plugin); return (
{plugin.name}
{plugin.description}
{plugin.name}
{children}{plugin.description}
); } /** Ranked row for the directory's Most installed list. */ export function PluginRankRow({ plugin, rank, installs, }: { plugin: Plugin; rank: number; installs: number; }) { return ( {rank}{plugin.name}
{getCategory(plugin.categories[0])?.label}