@grove-dev/cli 0.19.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -72,7 +72,7 @@
72
72
  },
73
73
  {
74
74
  "path": "default/layouts/header.astro",
75
- "content": "---\n/**\n * Header — sticky brand + nav + theme toggle.\n *\n * Generic: takes a `site` prop with brand + nav. No `siteConfig`\n * import — consumers compose the props from their own config.\n *\n * Optional `submit` button renders a \"Submit app\" / \"Submit project\"\n * call-to-action on the right side of the nav. Set `submitHref` /\n * `submitLabel` to enable, leave them undefined for a clean header.\n *\n * Optional `repoUrl` adds a \"View source\" GitHub button. Set\n * `repoLabel` to change the visible text.\n *\n * A nav item with `children` opens a menu panel; `menu: \"collections\"`\n * fills the panel from the collection files. The item whose `href` (or\n * a child's) prefixes the current path is marked `aria-current`.\n */\n\nimport { loadCollections } from '@grove-dev/astro/server';\nimport { compact } from '@grove-dev/core';\nimport ThemeToggle from '../components/site/theme-toggle.astro';\nimport { buttonClass } from '../lib/classnames.ts';\n\ninterface NavLink {\n label: string;\n href: string;\n description?: string;\n}\n\ninterface NavItem extends NavLink {\n children?: NavLink[];\n menu?: 'collections';\n}\n\ninterface Site {\n name: string;\n tagline?: string;\n nav: NavItem[];\n description?: string;\n repoUrl?: string;\n url?: string;\n /** Logo path under `public/` (e.g. `/logo.svg`). */\n logo?: string;\n stats?: {\n /** Stars on this site's own source repository. */\n repositoryStars?: number;\n };\n blueprintConfig?: {\n routeSlug?: string;\n };\n}\n\ninterface Props {\n site: Site;\n /** Submit button label, e.g. \"Submit app\". Omit to hide. */\n submitLabel?: string;\n /** Submit button href, e.g. \"/submit\". Omit to hide. */\n submitHref?: string;\n /** GitHub button label, e.g. \"View source\". */\n repoLabel?: string;\n /** Extra class for the outer header element. */\n class?: string;\n}\n\nconst { site, submitLabel, submitHref, repoLabel = 'Star', class: className = '' } = Astro.props;\nconst directoryPath = `/${site.blueprintConfig?.routeSlug ?? 'items'}`;\nconst defaultNavItems = site.blueprintConfig\n ? [\n { label: 'Recently added', href: `${directoryPath}?sort=recently-added` },\n { label: 'Trending', href: `${directoryPath}?label=hot` },\n { label: 'Categories', href: '/categories' },\n { label: 'Stacks', href: '/stacks' },\n { label: 'About', href: '/about' },\n ]\n : [];\nconst navItems: NavItem[] = site.nav?.length ? site.nav : defaultNavItems;\n\n// Resolve menus: explicit children, or the collection files for\n// `menu: \"collections\"` (loaded only when a nav item asks for them).\nconst collections = navItems.some((item) => item.menu === 'collections')\n ? await loadCollections(process.cwd())\n : [];\nconst menus = navItems.map((item) => {\n const children: NavLink[] =\n item.menu === 'collections'\n ? collections\n .map((c) => ({ label: c.title, href: `/collections/${c.slug}/`, description: c.description }))\n .sort((a, b) => a.label.localeCompare(b.label))\n : (item.children ?? []);\n return { ...item, children, footer: item.menu === 'collections' ? { label: 'All collections', href: item.href } : undefined };\n});\nconst withSlash = (path: string) => (path.endsWith('/') ? path : `${path}/`);\nconst pathname = withSlash(Astro.url.pathname);\nconst isCurrent = (item: (typeof menus)[number]) =>\n [item.href, ...item.children.map((c) => c.href)]\n .map((href) => withSlash(href.split('?')[0] ?? ''))\n .some((href) => href !== '/' && pathname.startsWith(href));\nconst stars = site.stats?.repositoryStars;\nconst starsLabel = typeof stars === 'number' ? compact(stars) : null;\n---\n\n<header\n class:list={[\n \"border-border bg-background/85 sticky top-0 z-50 border-b backdrop-blur\",\n className,\n ]}\n>\n <div\n class=\"mx-auto flex w-full max-w-container items-center gap-3 px-5 py-3 sm:gap-6 sm:px-7\"\n >\n <a\n href=\"/\"\n class=\"inline-flex min-w-0 shrink items-center gap-2 text-[0.95rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100\"\n >\n {site.logo ? (\n <img\n src={site.logo}\n alt=\"\"\n aria-hidden=\"true\"\n width=\"18\"\n height=\"18\"\n class=\"inline-block h-[18px] w-[18px] shrink-0 object-contain\"\n />\n ) : (\n /* No logo configured — a neutral mark is the honest default.\n Set `site.logo` in grove.config.ts to replace it. */\n <span\n aria-hidden=\"true\"\n class=\"inline-block h-[18px] w-[18px] rounded bg-ink-900 dark:bg-ink-100\"\n ></span>\n )}\n <span class=\"truncate\">{site.name}</span>\n </a>\n\n <nav class=\"hidden flex-1 md:block\" aria-label=\"Primary\">\n <ul class=\"m-0 flex list-none items-center gap-1 p-0\">\n {menus.map((menu) => {\n const current = isCurrent(menu);\n const itemClass = [\n \"relative inline-flex h-8 cursor-pointer list-none items-center gap-1 rounded-[var(--radius)] px-2.5 text-[0.875rem] font-medium no-underline outline-none transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/35 [&::-webkit-details-marker]:hidden\",\n current ? \"text-foreground after:absolute after:inset-x-2.5 after:-bottom-[0.8125rem] after:h-0.5 after:rounded-full after:bg-foreground after:content-['']\" : \"text-muted-foreground\",\n ].join(\" \");\n return (\n <li class=\"relative\">\n {menu.children.length > 0 ? (\n <details class=\"group\" data-nav-menu>\n <summary class={itemClass} aria-current={current ? \"page\" : undefined}>\n {menu.label}\n <svg viewBox=\"0 0 16 16\" width=\"12\" height=\"12\" aria-hidden=\"true\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"opacity-60 transition-transform group-open:rotate-180\"><path d=\"m4 6 4 4 4-4\"></path></svg>\n </summary>\n <div class:list={[\n \"absolute left-0 top-[calc(100%+0.625rem)] z-50 rounded-[var(--radius-lg)] border border-border bg-popover p-2 shadow-lg\",\n menu.children.length > 5 ? \"w-[34rem]\" : \"w-80\",\n ]}>\n <ul class:list={[\"m-0 grid list-none gap-0.5 p-0\", menu.children.length > 5 && \"grid-cols-2\"]}>\n {menu.children.map((item) => (\n <li>\n <a href={item.href} class=\"block rounded-[var(--radius)] px-3 py-2 no-underline outline-none hover:bg-accent focus-visible:bg-accent\">\n <span class=\"block text-sm font-medium text-foreground\">{item.label}</span>\n {item.description && <span class=\"mt-0.5 line-clamp-2 block text-2xs leading-snug text-muted-foreground\">{item.description}</span>}\n </a>\n </li>\n ))}\n </ul>\n {menu.footer && (\n <a href={menu.footer.href} class=\"mt-1 flex items-center justify-between rounded-[var(--radius)] border-t border-border px-3 pb-1 pt-2.5 text-sm font-medium text-foreground no-underline hover:underline\">\n {menu.footer.label}<span aria-hidden=\"true\">→</span>\n </a>\n )}\n </div>\n </details>\n ) : (\n <a href={menu.href} class={itemClass} aria-current={current ? \"page\" : undefined}>{menu.label}</a>\n )}\n </li>\n );\n })}\n </ul>\n </nav>\n\n <div class=\"ml-auto flex items-center gap-2\">\n <details class=\"group relative md:hidden\" data-nav-menu>\n <summary class=\"inline-flex h-9 cursor-pointer list-none items-center justify-center gap-1.5 rounded-[var(--radius)] border border-border bg-secondary px-2.5 text-sm font-medium text-foreground hover:bg-accent focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/35 [&::-webkit-details-marker]:hidden\">\n <svg viewBox=\"0 0 16 16\" width=\"14\" height=\"14\" aria-hidden=\"true\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\"><path d=\"M2.5 4.5h11M2.5 8h11M2.5 11.5h11\"></path></svg>\n Menu\n </summary>\n <nav aria-label=\"Mobile primary\" class=\"fixed inset-x-3 top-[3.75rem] z-50 max-h-[calc(100dvh-5rem)] overflow-y-auto rounded-[var(--radius-lg)] border border-border bg-popover p-3 shadow-lg\">\n <ul class=\"m-0 flex list-none flex-col gap-3 p-0\">\n {menus.map((menu) => (\n <li>\n <a href={menu.href} aria-current={isCurrent(menu) ? \"page\" : undefined} class=\"block rounded-md px-2 py-1.5 text-sm font-semibold text-foreground no-underline hover:bg-accent aria-[current=page]:bg-accent\">{menu.label}</a>\n {menu.children.length > 0 && (\n <ul class=\"m-0 mt-1 grid list-none grid-cols-2 gap-0.5 p-0\">\n {menu.children.map((item) => (\n <li><a href={item.href} class=\"block truncate rounded-md px-2 py-1.5 text-sm text-muted-foreground no-underline hover:bg-accent hover:text-foreground\">{item.label}</a></li>\n ))}\n </ul>\n )}\n </li>\n ))}\n {submitHref && (\n <li class=\"border-t border-border pt-3\">\n <a href={submitHref} class={buttonClass(\"primary\", \"md\", \"w-full justify-center\")}>{submitLabel ?? \"Submit\"}</a>\n </li>\n )}\n </ul>\n </nav>\n </details>\n\n {submitHref && (\n <a\n href={submitHref}\n class={buttonClass(\"primary\", \"sm\", \"max-sm:!hidden\")}\n >\n <svg\n viewBox=\"0 0 16 16\"\n width=\"13\"\n height=\"13\"\n aria-hidden=\"true\"\n fill=\"currentColor\"\n >\n <path d=\"M7.75 2a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 7.75 2Z\"></path>\n </svg>\n <span>{submitLabel ?? \"Submit\"}</span>\n </a>\n )}\n\n {site.repoUrl && (\n <a\n href={site.repoUrl}\n target=\"_blank\"\n rel=\"noopener\"\n aria-label={`${repoLabel} on GitHub${starsLabel ? ` — ${starsLabel} stars` : \"\"}`}\n title={`${repoLabel} on GitHub`}\n class={buttonClass(\"secondary\", \"bare\", \"h-8 overflow-hidden p-0 text-sm\")}\n >\n <span class=\"flex items-center gap-1.5 px-2.5 py-1.5 text-ink-900 dark:text-ink-100\">\n <svg viewBox=\"0 0 16 16\" width=\"16\" height=\"16\" aria-hidden=\"true\" fill=\"currentColor\">\n <path d=\"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38v-1.33c-2.22.48-2.69-1.07-2.69-1.07-.36-.92-.89-1.17-.89-1.17-.73-.5.05-.49.05-.49.8.06 1.23.83 1.23.83.72 1.22 1.87.87 2.33.67.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48v2.19c0 .21.15.46.55.38A8 8 0 0 0 8 0Z\"></path>\n </svg>\n <span class=\"hidden lg:inline\">{repoLabel}</span>\n </span>\n {starsLabel && <span class=\"hidden items-center gap-1 border-s border-border bg-secondary px-2 py-1.5 text-secondary-foreground sm:flex\">\n <svg viewBox=\"0 0 16 16\" width=\"11\" height=\"11\" aria-hidden=\"true\" fill=\"currentColor\" class=\"text-warning\">\n <path d=\"M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Z\"></path>\n </svg>\n <span class=\"font-mono\">{starsLabel}</span>\n </span>}\n </a>\n )}\n\n <ThemeToggle />\n </div>\n </div>\n</header>\n\n<script>\n // Nav menus are <details>: one open at a time, closed by Escape,\n // an outside click, or following a link inside the panel.\n const menus = [...document.querySelectorAll<HTMLDetailsElement>(\"[data-nav-menu]\")];\n const closeAll = (except?: HTMLDetailsElement) =>\n menus.forEach((menu) => { if (menu !== except) menu.open = false; });\n menus.forEach((menu) => {\n menu.addEventListener(\"toggle\", () => { if (menu.open) closeAll(menu); });\n menu.addEventListener(\"click\", (e) => {\n if ((e.target as HTMLElement).closest(\"a\")) menu.open = false;\n });\n });\n document.addEventListener(\"click\", (e) => {\n if (!(e.target as HTMLElement).closest(\"[data-nav-menu]\")) closeAll();\n });\n document.addEventListener(\"keydown\", (e) => {\n if (e.key !== \"Escape\") return;\n const open = menus.find((menu) => menu.open);\n if (!open) return;\n open.open = false;\n open.querySelector(\"summary\")?.focus();\n });\n\n // Smooth-scroll for in-page anchor links (Header nav + Hero CTA).\n // Works on any <a href=\"#…\"> that points to an existing element on\n // the current page. External links (e.g. /about, /projects?…) are\n // skipped because they don't start with \"#\". Modifier-clicks\n // (Cmd/Ctrl/Shift/middle) let the browser handle the anchor\n // normally so users can open the same section in a new tab.\n document.addEventListener(\"click\", (e) => {\n if (e.defaultPrevented) return;\n if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return;\n if (e.button !== 0) return;\n const link = (e.target as HTMLElement).closest<HTMLAnchorElement>(\n 'a[href^=\"#\"]',\n );\n if (!link) return;\n const id = link.getAttribute(\"href\")!;\n if (id.length <= 1) return;\n const target = document.querySelector(id);\n if (!target) return;\n e.preventDefault();\n target.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\n history.replaceState(null, \"\", id);\n });\n</script>\n",
75
+ "content": "---\n/**\n * Header — sticky brand + nav + theme toggle.\n *\n * Generic: takes a `site` prop with brand + nav. No `siteConfig`\n * import — consumers compose the props from their own config.\n *\n * Optional `submit` button renders a \"Submit app\" / \"Submit project\"\n * call-to-action on the right side of the nav. Set `submitHref` /\n * `submitLabel` to enable, leave them undefined for a clean header.\n *\n * Optional `repoUrl` adds a \"View source\" GitHub button. Set\n * `repoLabel` to change the visible text.\n *\n * A nav item with `children` opens a menu panel; `menu: \"collections\"`\n * fills the panel from the collection files. The item whose `href` (or\n * a child's) prefixes the current path is marked `aria-current`.\n */\n\nimport { loadCollections } from '@grove-dev/astro/server';\nimport { compact } from '@grove-dev/core';\nimport ThemeToggle from '../components/site/theme-toggle.astro';\nimport { buttonClass } from '../lib/classnames.ts';\n\ninterface NavLink {\n label: string;\n href: string;\n description?: string;\n}\n\ninterface NavItem extends NavLink {\n children?: NavLink[];\n menu?: 'collections';\n}\n\ninterface Site {\n name: string;\n tagline?: string;\n nav: NavItem[];\n description?: string;\n repoUrl?: string;\n url?: string;\n /** Logo path under `public/` (e.g. `/logo.svg`). */\n logo?: string;\n stats?: {\n /** Stars on this site's own source repository. */\n repositoryStars?: number;\n };\n blueprintConfig?: {\n routeSlug?: string;\n };\n}\n\ninterface Props {\n site: Site;\n /** Submit button label, e.g. \"Submit app\". Omit to hide. */\n submitLabel?: string;\n /** Submit button href, e.g. \"/submit\". Omit to hide. */\n submitHref?: string;\n /** GitHub button label, e.g. \"View source\". */\n repoLabel?: string;\n /** Extra class for the outer header element. */\n class?: string;\n}\n\nconst { site, submitLabel, submitHref, repoLabel = 'Star', class: className = '' } = Astro.props;\nconst directoryPath = `/${site.blueprintConfig?.routeSlug ?? 'items'}`;\nconst defaultNavItems = site.blueprintConfig\n ? [\n { label: 'Recently added', href: `${directoryPath}?sort=recently-added` },\n { label: 'Trending', href: `${directoryPath}?label=hot` },\n { label: 'Categories', href: '/categories' },\n { label: 'Stacks', href: '/stacks' },\n { label: 'About', href: '/about' },\n ]\n : [];\nconst navItems: NavItem[] = site.nav?.length ? site.nav : defaultNavItems;\n\n// Resolve menus: explicit children, or the collection files for\n// `menu: \"collections\"` (loaded only when a nav item asks for them).\nconst collections = navItems.some((item) => item.menu === 'collections')\n ? await loadCollections(process.cwd())\n : [];\nconst menus = navItems.map((item) => {\n const children: NavLink[] =\n item.menu === 'collections'\n ? collections\n .map((c) => ({\n label: c.title,\n href: `/collections/${c.slug}/`,\n description: c.description,\n }))\n .sort((a, b) => a.label.localeCompare(b.label))\n : (item.children ?? []);\n return {\n ...item,\n children,\n footer: item.menu === 'collections' ? { label: 'All collections', href: item.href } : undefined,\n };\n});\nconst withSlash = (path: string) => (path.endsWith('/') ? path : `${path}/`);\nconst pathname = withSlash(Astro.url.pathname);\nconst isCurrent = (item: (typeof menus)[number]) =>\n [item.href, ...item.children.map((c) => c.href)]\n .map((href) => withSlash(href.split('?')[0] ?? ''))\n .some((href) => href !== '/' && pathname.startsWith(href));\nconst stars = site.stats?.repositoryStars;\nconst starsLabel = typeof stars === 'number' ? compact(stars) : null;\n---\n\n<header\n class:list={[\n \"border-border bg-background/85 sticky top-0 z-50 border-b backdrop-blur\",\n className,\n ]}\n>\n <div\n class=\"mx-auto flex w-full max-w-container items-center gap-3 px-5 py-3 sm:gap-6 sm:px-7\"\n >\n <a\n href=\"/\"\n class=\"inline-flex min-w-0 shrink items-center gap-2 text-[0.95rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100\"\n >\n {site.logo ? (\n <img\n src={site.logo}\n alt=\"\"\n aria-hidden=\"true\"\n width=\"18\"\n height=\"18\"\n class=\"inline-block h-[18px] w-[18px] shrink-0 object-contain\"\n />\n ) : (\n /* No logo configured — a neutral mark is the honest default.\n Set `site.logo` in grove.config.ts to replace it. */\n <span\n aria-hidden=\"true\"\n class=\"inline-block h-[18px] w-[18px] rounded bg-ink-900 dark:bg-ink-100\"\n ></span>\n )}\n <span class=\"truncate\">{site.name}</span>\n </a>\n\n <nav class=\"hidden flex-1 md:block\" aria-label=\"Primary\">\n <ul class=\"m-0 flex list-none items-center gap-1 p-0\">\n {menus.map((menu) => {\n const current = isCurrent(menu);\n const itemClass = [\n \"relative inline-flex h-8 cursor-pointer list-none items-center gap-1 rounded-[var(--radius)] px-2.5 text-[0.875rem] font-medium no-underline outline-none transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/35 [&::-webkit-details-marker]:hidden\",\n current ? \"text-foreground after:absolute after:inset-x-2.5 after:-bottom-[0.8125rem] after:h-0.5 after:rounded-full after:bg-foreground after:content-['']\" : \"text-muted-foreground\",\n ].join(\" \");\n return (\n <li class=\"relative\">\n {menu.children.length > 0 ? (\n <details class=\"group\" data-nav-menu>\n <summary class={itemClass} aria-current={current ? \"page\" : undefined}>\n {menu.label}\n <svg viewBox=\"0 0 16 16\" width=\"12\" height=\"12\" aria-hidden=\"true\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"opacity-60 transition-transform group-open:rotate-180\"><path d=\"m4 6 4 4 4-4\"></path></svg>\n </summary>\n <div class:list={[\n \"absolute left-0 top-[calc(100%+0.625rem)] z-50 rounded-[var(--radius-lg)] border border-border bg-popover p-2 shadow-lg\",\n menu.children.length > 5 ? \"w-[34rem]\" : \"w-80\",\n ]}>\n <ul class:list={[\"m-0 grid list-none gap-0.5 p-0\", menu.children.length > 5 && \"grid-cols-2\"]}>\n {menu.children.map((item) => (\n <li>\n <a href={item.href} class=\"block rounded-[var(--radius)] px-3 py-2 no-underline outline-none hover:bg-accent focus-visible:bg-accent\">\n <span class=\"block text-sm font-medium text-foreground\">{item.label}</span>\n {item.description && <span class=\"mt-0.5 line-clamp-2 block text-2xs leading-snug text-muted-foreground\">{item.description}</span>}\n </a>\n </li>\n ))}\n </ul>\n {menu.footer && (\n <a href={menu.footer.href} class=\"mt-1 flex items-center justify-between rounded-[var(--radius)] border-t border-border px-3 pb-1 pt-2.5 text-sm font-medium text-foreground no-underline hover:underline\">\n {menu.footer.label}<span aria-hidden=\"true\">→</span>\n </a>\n )}\n </div>\n </details>\n ) : (\n <a href={menu.href} class={itemClass} aria-current={current ? \"page\" : undefined}>{menu.label}</a>\n )}\n </li>\n );\n })}\n </ul>\n </nav>\n\n <div class=\"ml-auto flex items-center gap-2\">\n <details class=\"group relative md:hidden\" data-nav-menu>\n <summary class=\"inline-flex h-9 cursor-pointer list-none items-center justify-center gap-1.5 rounded-[var(--radius)] border border-border bg-secondary px-2.5 text-sm font-medium text-foreground hover:bg-accent focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/35 [&::-webkit-details-marker]:hidden\">\n <svg viewBox=\"0 0 16 16\" width=\"14\" height=\"14\" aria-hidden=\"true\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\"><path d=\"M2.5 4.5h11M2.5 8h11M2.5 11.5h11\"></path></svg>\n Menu\n </summary>\n <nav aria-label=\"Mobile primary\" class=\"fixed inset-x-3 top-[3.75rem] z-50 max-h-[calc(100dvh-5rem)] overflow-y-auto rounded-[var(--radius-lg)] border border-border bg-popover p-3 shadow-lg\">\n <ul class=\"m-0 flex list-none flex-col gap-3 p-0\">\n {menus.map((menu) => (\n <li>\n <a href={menu.href} aria-current={isCurrent(menu) ? \"page\" : undefined} class=\"block rounded-md px-2 py-1.5 text-sm font-semibold text-foreground no-underline hover:bg-accent aria-[current=page]:bg-accent\">{menu.label}</a>\n {menu.children.length > 0 && (\n <ul class=\"m-0 mt-1 grid list-none grid-cols-2 gap-0.5 p-0\">\n {menu.children.map((item) => (\n <li><a href={item.href} class=\"block truncate rounded-md px-2 py-1.5 text-sm text-muted-foreground no-underline hover:bg-accent hover:text-foreground\">{item.label}</a></li>\n ))}\n </ul>\n )}\n </li>\n ))}\n {submitHref && (\n <li class=\"border-t border-border pt-3\">\n <a href={submitHref} class={buttonClass(\"primary\", \"md\", \"w-full justify-center\")}>{submitLabel ?? \"Submit\"}</a>\n </li>\n )}\n </ul>\n </nav>\n </details>\n\n {submitHref && (\n <a\n href={submitHref}\n class={buttonClass(\"primary\", \"sm\", \"max-sm:!hidden\")}\n >\n <svg\n viewBox=\"0 0 16 16\"\n width=\"13\"\n height=\"13\"\n aria-hidden=\"true\"\n fill=\"currentColor\"\n >\n <path d=\"M7.75 2a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 7.75 2Z\"></path>\n </svg>\n <span>{submitLabel ?? \"Submit\"}</span>\n </a>\n )}\n\n {site.repoUrl && (\n <a\n href={site.repoUrl}\n target=\"_blank\"\n rel=\"noopener\"\n aria-label={`${repoLabel} on GitHub${starsLabel ? ` — ${starsLabel} stars` : \"\"}`}\n title={`${repoLabel} on GitHub`}\n class={buttonClass(\"secondary\", \"bare\", \"h-8 overflow-hidden p-0 text-sm\")}\n >\n <span class=\"flex items-center gap-1.5 px-2.5 py-1.5 text-ink-900 dark:text-ink-100\">\n <svg viewBox=\"0 0 16 16\" width=\"16\" height=\"16\" aria-hidden=\"true\" fill=\"currentColor\">\n <path d=\"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38v-1.33c-2.22.48-2.69-1.07-2.69-1.07-.36-.92-.89-1.17-.89-1.17-.73-.5.05-.49.05-.49.8.06 1.23.83 1.23.83.72 1.22 1.87.87 2.33.67.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48v2.19c0 .21.15.46.55.38A8 8 0 0 0 8 0Z\"></path>\n </svg>\n <span class=\"hidden lg:inline\">{repoLabel}</span>\n </span>\n {starsLabel && <span class=\"hidden items-center gap-1 border-s border-border bg-secondary px-2 py-1.5 text-secondary-foreground sm:flex\">\n <svg viewBox=\"0 0 16 16\" width=\"11\" height=\"11\" aria-hidden=\"true\" fill=\"currentColor\" class=\"text-warning\">\n <path d=\"M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Z\"></path>\n </svg>\n <span class=\"font-mono\">{starsLabel}</span>\n </span>}\n </a>\n )}\n\n <ThemeToggle />\n </div>\n </div>\n</header>\n\n<script>\n // Nav menus are <details>: one open at a time, closed by Escape,\n // an outside click, or following a link inside the panel.\n const menus = [...document.querySelectorAll<HTMLDetailsElement>(\"[data-nav-menu]\")];\n const closeAll = (except?: HTMLDetailsElement) =>\n menus.forEach((menu) => { if (menu !== except) menu.open = false; });\n menus.forEach((menu) => {\n menu.addEventListener(\"toggle\", () => { if (menu.open) closeAll(menu); });\n menu.addEventListener(\"click\", (e) => {\n if ((e.target as HTMLElement).closest(\"a\")) menu.open = false;\n });\n });\n document.addEventListener(\"click\", (e) => {\n if (!(e.target as HTMLElement).closest(\"[data-nav-menu]\")) closeAll();\n });\n document.addEventListener(\"keydown\", (e) => {\n if (e.key !== \"Escape\") return;\n const open = menus.find((menu) => menu.open);\n if (!open) return;\n open.open = false;\n open.querySelector(\"summary\")?.focus();\n });\n\n // Smooth-scroll for in-page anchor links (Header nav + Hero CTA).\n // Works on any <a href=\"#…\"> that points to an existing element on\n // the current page. External links (e.g. /about, /projects?…) are\n // skipped because they don't start with \"#\". Modifier-clicks\n // (Cmd/Ctrl/Shift/middle) let the browser handle the anchor\n // normally so users can open the same section in a new tab.\n document.addEventListener(\"click\", (e) => {\n if (e.defaultPrevented) return;\n if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return;\n if (e.button !== 0) return;\n const link = (e.target as HTMLElement).closest<HTMLAnchorElement>(\n 'a[href^=\"#\"]',\n );\n if (!link) return;\n const id = link.getAttribute(\"href\")!;\n if (id.length <= 1) return;\n const target = document.querySelector(id);\n if (!target) return;\n e.preventDefault();\n target.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\n history.replaceState(null, \"\", id);\n });\n</script>\n",
76
76
  "type": "registry:component",
77
77
  "target": "~/src/layouts/header.astro"
78
78
  },
@@ -84,7 +84,7 @@
84
84
  },
85
85
  {
86
86
  "path": "default/layouts/seo.astro",
87
- "content": "---\n// SPDX-License-Identifier: MIT\n\n/**\n * Per-page SEO: <title>, description, canonical, Open Graph, Twitter Card,\n * and JSON-LD structured data. Designed to be used inside <head> by the\n * BaseLayout. Pages pass the rich props they care about; everything else\n * has a sensible default derived from the site config and the Astro URL.\n *\n * Renders:\n * - <title>, meta description, canonical link, robots\n * - Open Graph (og:*) for Facebook, LinkedIn, Discord, Slack, etc.\n * - Twitter Card (twitter:*) for X / Twitter\n * - JSON-LD WebSite+Organization identity graph on every page\n * (built by @grove-dev/core's `siteSchema`, with a SearchAction\n * pointing at the directory's browse page)\n * - Per-page JSON-LD nodes when `jsonLd` is provided (SoftwareApplication\n * on record pages, CollectionPage/ItemList/BreadcrumbList on\n * collection and taxonomy pages, ...)\n *\n * Noindex is opt-in via the `noindex` prop. By default everything is\n * indexable; noindex targets today are /submit, /404, and /empty.\n * `robots` sets the exact value instead — page models pass\n * `noindex,follow` for pages the index policy (`seo.*IndexPolicy`)\n * excludes, so their links are still followed.\n *\n * Any URL with a query string (`?q=`, `?sort=`, facet filters) is a\n * filtered view of a static page: the server sends the base page's\n * HTML, canonical included. A small inline script switches the robots\n * meta to `noindex,follow` on those URLs so the variant itself is not\n * indexed; Google renders JavaScript and honours a robots meta the page\n * sets at runtime. A server-side `X-Robots-Tag` is stronger where the\n * host allows it (see the SEO docs).\n */\nimport { type JsonLdNode, siteSchema, validateJsonLd } from '@grove-dev/core';\n\ninterface Props {\n title: string;\n description: string;\n site: {\n name: string;\n description?: string;\n repoUrl?: string;\n /** Header logo path under `public/` — used as Organization logo when set. */\n logo?: string;\n /** BCP-47 language tag (e.g. \"en\"). Drives og:locale + JSON-LD inLanguage. */\n locale?: string;\n /** Twitter/X handle (e.g. \"@grove\") — emitted as twitter:site. */\n twitter?: string;\n };\n searchPath?: string;\n /** Open Graph / Twitter image. Default: /og-image.svg. Should be absolute or root-relative. */\n image?: string;\n /** Alt text for the OG/Twitter image. Default: \"<site name> social preview\". */\n imageAlt?: string;\n /** og:type. Default: \"website\". Use \"article\" for blog posts / changelog. */\n type?: 'website' | 'article' | 'profile';\n /** Set true to add noindex,nofollow. */\n noindex?: boolean;\n /** Exact robots meta value (e.g. \"noindex,follow\"); wins over `noindex`. */\n robots?: string;\n /** Extra JSON-LD payload (object) — typically SoftwareSourceCode on item pages. */\n jsonLd?: Record<string, unknown> | Record<string, unknown>[];\n}\n\nconst {\n title,\n description,\n site: siteConfig,\n searchPath = '/items',\n image = '/og-image.svg',\n imageAlt,\n type = 'website',\n noindex = false,\n robots,\n jsonLd,\n} = Astro.props;\nconst robotsContent =\n robots ?? (noindex ? 'noindex,nofollow' : 'index,follow,max-image-preview:large');\n\n// `Astro.site` is required for canonical / OG / Twitter / JSON-LD URLs to\n// resolve to the consumer's domain. Failing the build (rather than silently\n// emitting `https://example.com/...`) is the right call: every canonical,\n// OG, and JSON-LD URL would otherwise leak to a domain the consumer doesn't\n// own, which search engines either ignore or treat as canonical to the\n// wrong host.\nif (!Astro.site) {\n throw new Error(\n \"Seo: `site` is not set on the Astro config. Add `site: 'https://your-domain'` to astro.config.mjs so canonical / Open Graph / Twitter / JSON-LD URLs resolve correctly.\",\n );\n}\nconst siteUrl = Astro.site;\nconst canonical = new URL(Astro.url.pathname, siteUrl).toString();\nconst ogImage = new URL(image, siteUrl).toString();\nconst ogImageAlt = imageAlt ?? `${siteConfig.name} social preview`;\nconst locale = siteConfig.locale ?? 'en';\n\n// Truncate description for OG/Twitter where longer is worse (160–200 chars).\nfunction truncate(s: string, max: number): string {\n if (s.length <= max) return s;\n return s.slice(0, max - 1).trimEnd() + '…';\n}\nconst shortDescription = truncate(description, 200);\n\n// WebSite+Organization identity graph — site-wide signals that appear on\n// every page (Google uses them for site links and the knowledge panel).\n// Built by core's `siteSchema` so the @id graph shape is shared with the\n// rest of the JSON-LD registry; the SearchAction is appended here because\n// the browse path is an adapter concern, not a core one.\nconst bareSiteUrl = siteUrl.toString().replace(/\\/$/, '');\nconst [siteLd] = siteSchema({\n url: bareSiteUrl,\n name: siteConfig.name,\n description: siteConfig.description ?? description,\n inLanguage: locale,\n orgName: siteConfig.name,\n orgUrl: bareSiteUrl,\n ...(siteConfig.logo ? { orgLogo: new URL(siteConfig.logo, siteUrl).toString() } : {}),\n ...(siteConfig.repoUrl ? { sameAs: [siteConfig.repoUrl] } : {}),\n});\nsiteLd.potentialAction = {\n '@type': 'SearchAction',\n target: `${bareSiteUrl}${searchPath}?q={search_term_string}`,\n 'query-input': 'required name=search_term_string',\n};\n\nconst perPageNodes = jsonLd ? (Array.isArray(jsonLd) ? jsonLd : [jsonLd]) : null;\n\n// Dev-only well-formedness check — surfaces malformed nodes (relative\n// URLs, missing @context, duplicate @ids) in the terminal during\n// `astro dev` without ever failing or slowing a production build.\nif (import.meta.env.DEV && perPageNodes) {\n const issues = validateJsonLd(perPageNodes as JsonLdNode[]);\n for (const issue of issues) {\n console.warn(`[grove seo] ${Astro.url.pathname}: ${issue.message}`);\n }\n}\n\n// Pre-stringify the JSON-LD payloads in the frontmatter so the\n// template body just interpolates the resulting strings. For SSR\n// this saves the JSON.stringify call on every render; for static\n// builds the cost is unchanged but the template reads cleaner.\nconst siteLdJson = JSON.stringify(siteLd);\nconst perPageLdJson = perPageNodes ? JSON.stringify(perPageNodes) : null;\n---\n\n<!-- Primary meta -->\n<title>{title}</title>\n<meta name=\"description\" content={description} />\n<link rel=\"canonical\" href={canonical} />\n<meta name=\"robots\" content={robotsContent} />\n<!-- Filtered / parameter URLs: noindex the variant, canonical stays the base page. -->\n<script is:inline data-grove-param-robots>\n if (location.search) {\n document.querySelector('meta[name=\"robots\"]')?.setAttribute('content', 'noindex,follow');\n }\n</script>\n\n<!-- Open Graph -->\n<meta property=\"og:type\" content={type} />\n<meta property=\"og:url\" content={canonical} />\n<meta property=\"og:title\" content={title} />\n<meta property=\"og:description\" content={shortDescription} />\n<meta property=\"og:image\" content={ogImage} />\n<meta property=\"og:image:width\" content=\"1200\" />\n<meta property=\"og:image:height\" content=\"630\" />\n<meta property=\"og:image:alt\" content={ogImageAlt} />\n<meta property=\"og:site_name\" content={siteConfig.name} />\n<meta property=\"og:locale\" content={locale} />\n\n<!-- Twitter Card -->\n<meta name=\"twitter:card\" content=\"summary_large_image\" />\n{siteConfig.twitter && <meta name=\"twitter:site\" content={siteConfig.twitter} />}\n<meta name=\"twitter:title\" content={title} />\n<meta name=\"twitter:description\" content={shortDescription} />\n<meta name=\"twitter:image\" content={ogImage} />\n<meta name=\"twitter:image:alt\" content={ogImageAlt} />\n\n<!-- JSON-LD: site-wide identity graph -->\n<script is:inline type=\"application/ld+json\" set:html={siteLdJson} />\n\n<!-- JSON-LD: per-page (SoftwareApplication, CollectionPage, BreadcrumbList, ...) -->\n{perPageLdJson && (\n <script\n is:inline\n type=\"application/ld+json\"\n set:html={perPageLdJson}\n />\n)}\n",
87
+ "content": "---\n// SPDX-License-Identifier: MIT\n\n/**\n * Per-page SEO: <title>, description, canonical, Open Graph, Twitter Card,\n * and JSON-LD structured data. Designed to be used inside <head> by the\n * BaseLayout. Pages pass the rich props they care about; everything else\n * has a sensible default derived from the site config and the Astro URL.\n *\n * Renders:\n * - <title>, meta description, canonical link, robots\n * - Open Graph (og:*) for Facebook, LinkedIn, Discord, Slack, etc.\n * - Twitter Card (twitter:*) for X / Twitter\n * - JSON-LD WebSite+Organization identity graph on every page\n * (built by @grove-dev/core's `siteSchema`, with a SearchAction\n * pointing at the directory's browse page)\n * - Per-page JSON-LD nodes when `jsonLd` is provided (SoftwareApplication\n * on record pages, CollectionPage/ItemList/BreadcrumbList on\n * collection and taxonomy pages, ...)\n *\n * Noindex is opt-in via the `noindex` prop. By default everything is\n * indexable; noindex targets today are /submit, /404, and /empty.\n * `robots` sets the exact value instead — page models pass\n * `noindex,follow` for pages the index policy (`seo.*IndexPolicy`)\n * excludes, so their links are still followed.\n *\n * Any URL with a query string (`?q=`, `?sort=`, facet filters) is a\n * filtered view of a static page: the server sends the base page's\n * HTML, canonical included. A small inline script switches the robots\n * meta to `noindex,follow` on those URLs so the variant itself is not\n * indexed; Google renders JavaScript and honours a robots meta the page\n * sets at runtime. A server-side `X-Robots-Tag` is stronger where the\n * host allows it (see the SEO docs).\n */\nimport { type JsonLdNode, siteSchema, validateJsonLd } from '@grove-dev/core';\n\ninterface Props {\n title: string;\n description: string;\n site: {\n name: string;\n description?: string;\n repoUrl?: string;\n /** Header logo path under `public/` — used as Organization logo when set. */\n logo?: string;\n /** BCP-47 language tag (e.g. \"en\"). Drives og:locale + JSON-LD inLanguage. */\n locale?: string;\n /** Twitter/X handle (e.g. \"@grove\") — emitted as twitter:site. */\n twitter?: string;\n };\n searchPath?: string;\n /** Open Graph / Twitter image. Default: /og-image.svg. Should be absolute or root-relative. */\n image?: string;\n /** Alt text for the OG/Twitter image. Default: \"<site name> social preview\". */\n imageAlt?: string;\n /** og:type. Default: \"website\". Use \"article\" for blog posts / changelog. */\n type?: 'website' | 'article' | 'profile';\n /** Set true to add noindex,nofollow. */\n noindex?: boolean;\n /** Exact robots meta value (e.g. \"noindex,follow\"); wins over `noindex`. */\n robots?: string;\n /** Extra JSON-LD payload (object) — typically SoftwareSourceCode on item pages. */\n jsonLd?: Record<string, unknown> | Record<string, unknown>[];\n}\n\nconst {\n title,\n description,\n site: siteConfig,\n searchPath = '/items',\n image = '/og-image.svg',\n imageAlt,\n type = 'website',\n noindex = false,\n robots,\n jsonLd,\n} = Astro.props;\nconst robotsContent =\n robots ?? (noindex ? 'noindex,nofollow' : 'index,follow,max-image-preview:large');\n\n// `Astro.site` is required for canonical / OG / Twitter / JSON-LD URLs to\n// resolve to the consumer's domain. Failing the build (rather than silently\n// emitting `https://example.com/...`) is the right call: every canonical,\n// OG, and JSON-LD URL would otherwise leak to a domain the consumer doesn't\n// own, which search engines either ignore or treat as canonical to the\n// wrong host.\nif (!Astro.site) {\n throw new Error(\n \"Seo: `site` is not set on the Astro config. Add `site: 'https://your-domain'` to astro.config.mjs so canonical / Open Graph / Twitter / JSON-LD URLs resolve correctly.\",\n );\n}\nconst siteUrl = Astro.site;\nconst canonical = new URL(Astro.url.pathname, siteUrl).toString();\nconst ogImage = new URL(image, siteUrl).toString();\nconst ogImageAlt = imageAlt ?? `${siteConfig.name} social preview`;\nconst locale = siteConfig.locale ?? 'en';\n\n// Truncate description for OG/Twitter where longer is worse (160–200 chars).\nfunction truncate(s: string, max: number): string {\n if (s.length <= max) return s;\n return `${s.slice(0, max - 1).trimEnd()}…`;\n}\nconst shortDescription = truncate(description, 200);\n\n// WebSite+Organization identity graph — site-wide signals that appear on\n// every page (Google uses them for site links and the knowledge panel).\n// Built by core's `siteSchema` so the @id graph shape is shared with the\n// rest of the JSON-LD registry; the SearchAction is appended here because\n// the browse path is an adapter concern, not a core one.\nconst bareSiteUrl = siteUrl.toString().replace(/\\/$/, '');\nconst [siteLd] = siteSchema({\n url: bareSiteUrl,\n name: siteConfig.name,\n description: siteConfig.description ?? description,\n inLanguage: locale,\n orgName: siteConfig.name,\n orgUrl: bareSiteUrl,\n ...(siteConfig.logo ? { orgLogo: new URL(siteConfig.logo, siteUrl).toString() } : {}),\n ...(siteConfig.repoUrl ? { sameAs: [siteConfig.repoUrl] } : {}),\n});\nsiteLd.potentialAction = {\n '@type': 'SearchAction',\n target: `${bareSiteUrl}${searchPath}?q={search_term_string}`,\n 'query-input': 'required name=search_term_string',\n};\n\nconst perPageNodes = jsonLd ? (Array.isArray(jsonLd) ? jsonLd : [jsonLd]) : null;\n\n// Dev-only well-formedness check — surfaces malformed nodes (relative\n// URLs, missing @context, duplicate @ids) in the terminal during\n// `astro dev` without ever failing or slowing a production build.\nif (import.meta.env.DEV && perPageNodes) {\n const issues = validateJsonLd(perPageNodes as JsonLdNode[]);\n for (const issue of issues) {\n console.warn(`[grove seo] ${Astro.url.pathname}: ${issue.message}`);\n }\n}\n\n// Pre-stringify the JSON-LD payloads in the frontmatter so the\n// template body just interpolates the resulting strings. For SSR\n// this saves the JSON.stringify call on every render; for static\n// builds the cost is unchanged but the template reads cleaner.\nconst siteLdJson = JSON.stringify(siteLd);\nconst perPageLdJson = perPageNodes ? JSON.stringify(perPageNodes) : null;\n---\n\n<!-- Primary meta -->\n<title>{title}</title>\n<meta name=\"description\" content={description} />\n<link rel=\"canonical\" href={canonical} />\n<meta name=\"robots\" content={robotsContent} />\n<!-- Filtered / parameter URLs: noindex the variant, canonical stays the base page. -->\n<script is:inline data-grove-param-robots>\n if (location.search) {\n document.querySelector('meta[name=\"robots\"]')?.setAttribute('content', 'noindex,follow');\n }\n</script>\n\n<!-- Open Graph -->\n<meta property=\"og:type\" content={type} />\n<meta property=\"og:url\" content={canonical} />\n<meta property=\"og:title\" content={title} />\n<meta property=\"og:description\" content={shortDescription} />\n<meta property=\"og:image\" content={ogImage} />\n<meta property=\"og:image:width\" content=\"1200\" />\n<meta property=\"og:image:height\" content=\"630\" />\n<meta property=\"og:image:alt\" content={ogImageAlt} />\n<meta property=\"og:site_name\" content={siteConfig.name} />\n<meta property=\"og:locale\" content={locale} />\n\n<!-- Twitter Card -->\n<meta name=\"twitter:card\" content=\"summary_large_image\" />\n{siteConfig.twitter && <meta name=\"twitter:site\" content={siteConfig.twitter} />}\n<meta name=\"twitter:title\" content={title} />\n<meta name=\"twitter:description\" content={shortDescription} />\n<meta name=\"twitter:image\" content={ogImage} />\n<meta name=\"twitter:image:alt\" content={ogImageAlt} />\n\n<!-- JSON-LD: site-wide identity graph -->\n<script is:inline type=\"application/ld+json\" set:html={siteLdJson} />\n\n<!-- JSON-LD: per-page (SoftwareApplication, CollectionPage, BreadcrumbList, ...) -->\n{perPageLdJson && (\n <script\n is:inline\n type=\"application/ld+json\"\n set:html={perPageLdJson}\n />\n)}\n",
88
88
  "type": "registry:component",
89
89
  "target": "~/src/layouts/seo.astro"
90
90
  },
@@ -126,7 +126,7 @@
126
126
  },
127
127
  {
128
128
  "path": "default/components/grove/icon.astro",
129
- "content": "---\nimport type { IconKind } from '../../lib/icon-kinds';\n/**\n * Icon — brand icon registry.\n *\n * Resolves a registry name to `/icons/{stacks|platforms|brands}/{name}.svg`\n * and renders it. The Astro integration syncs the packaged set into the\n * consumer's `public/icons/` on every build; consumers can ship their own\n * SVGs under the same paths (or override the `base` prop) without forking\n * this component.\n *\n * The component is **generic** — it does not import any consumer-side\n * `siteConfig`, `item`, or blueprint-specific module.\n *\n * `category` selects the subfolder:\n *\n * - \"stack\" → `/icons/stacks/{name}.svg`\n * - \"platform\" → `/icons/platforms/{name}.svg`\n * - \"brand\" → `/icons/brands/{name}.svg` (consumer-supplied)\n *\n * ## Theming\n *\n * `ICON_KINDS` (generated by `scripts/sync-icons.mjs`) classifies each\n * packaged icon:\n *\n * - **color** — the default. Any brand with a color mark keeps it,\n * rendered as `<img>` with an `onerror` fallback to an initials\n * chip.\n * - **mono** — marks with no color to lose (Apple, Rust, Tauri,\n * Solidity, Deno) plus the concept glyphs. Rendered as a CSS-masked\n * `<span>` painted from `--grove-foreground`, which reproduces how\n * those brands are actually used: solid black on light, solid white\n * on dark, with no script and no second file. See\n * `.grove-icon-mask` in `styles.css`.\n *\n * The map CLASSIFIES; it does not gate availability. A name it has never\n * heard of — a consumer's own SVG — takes the `<img>` path, exactly as\n * before. Pass `kind=\"mono\"` to opt a custom mark into `currentColor`\n * tinting.\n *\n * Aliases: a tiny `aliases` map (e.g. `rn → react-native`) lets the\n * registry accept multiple ids for the same asset. Lookup falls through\n * `aliases` → the built-in stack aliases → the raw slug, then fails over\n * to the initials placeholder.\n */\nimport { ICON_KINDS } from '../../lib/icon-kinds';\nimport type { IconCategory } from '../../lib/icon-registry';\nimport { resolveIconAsset, slugifyIconName } from '../../lib/icon-registry';\n\nexport type { IconCategory, IconKind };\n\n/**\n * @deprecated Theme variants are no longer file-based — `mono` icons\n * inherit `currentColor`. Accepted and ignored so consumers passing\n * `mode=\"auto\"` do not hit a type error.\n */\nexport type IconMode = 'static' | 'auto';\n\ninterface Props {\n /**\n * Registry id. Resolved through `aliases` first, then matched\n * against the SVG file name (case-insensitive, slug-normalized).\n */\n name: string;\n /** Subfolder under `/icons/`. */\n category: IconCategory;\n /** Pixel size (square). Defaults to 16. */\n size?: number;\n /** Extra class for the outer wrapper. */\n class?: string;\n /** Tooltip / aria-label. */\n title?: string;\n /** @deprecated No-op. Kept for one minor release. */\n mode?: IconMode;\n /**\n * Override the packaged kind classification. Pass `\"mono\"` for a\n * consumer-supplied single-color mark so it is painted black on\n * light and white on dark instead of shipping two files.\n */\n kind?: IconKind;\n /**\n * Optional id → id remap. Lookup goes `name → aliases[name] →\n * {name}.svg` (case-insensitive).\n */\n aliases?: Record<string, string>;\n /**\n * Optional complete asset registry supplied by a consumer. When omitted,\n * Grove attempts the configured asset path and falls back on image error.\n */\n available?: string[];\n /**\n * Initials to render when the icon file is missing. Defaults to\n * the first 1–2 characters of `name`.\n */\n fallbackInitials?: string;\n /**\n * Base path for icon files. Defaults to `/icons` (matches the\n * synced `public/icons/`).\n */\n base?: string;\n}\n\nconst {\n name,\n category,\n size = 16,\n class: className = '',\n title,\n kind,\n aliases,\n available,\n fallbackInitials,\n base = '/icons',\n} = Astro.props;\n\nconst asset = resolveIconAsset(name, category, aliases);\nconst resolved = asset.name;\nconst availableIcons = available?.map(slugifyIconName);\nconst hasAsset =\n category === 'brand' || availableIcons === undefined || availableIcons.includes(resolved);\nconst src = `${base.replace(/\\/$/, '')}/${asset.folder}/${resolved}.svg`;\n\n// Initials fallback: first 1–2 alphanumerics, uppercased.\nconst init = (fallbackInitials ?? name ?? '')\n .replace(/[^a-z0-9]/gi, '')\n .slice(0, 2)\n .toUpperCase();\nconst showFallback = !resolved || !hasAsset || asset.textOnly;\n\n// Unknown names fall through to `<img>`, never to `mono` — a mask has\n// no `onerror`, so a missing file would render an invisible blank.\nconst effectiveKind: IconKind = kind ?? ICON_KINDS[asset.key] ?? 'color';\n\n// `name` reaches the mask branch as part of a CSS `url()` token, and\n// slugifying does not remove the characters that would close it. Astro\n// escapes the attribute; this escapes the CSS inside it.\nconst cssUrl = src.replace(/['\"()\\\\\\s]/g, encodeURIComponent);\n\n// Build aria-label.\nconst ariaLabel = title ?? name;\nconst a11y: Record<string, string> = title\n ? { 'aria-label': ariaLabel, role: 'img' }\n : { 'aria-hidden': 'true', focusable: 'false' };\n\nconst fallbackClass = [\n 'inline-flex shrink-0 select-none items-center justify-center rounded-sm bg-ink-100 align-middle font-semibold uppercase leading-none text-ink-700 dark:bg-ink-800 dark:text-ink-200',\n className,\n];\nconst fallbackStyle = `width:${size}px;height:${size}px;font-size:${Math.max(10, size - 6)}px;`;\n---\n\n{\n showFallback ? (\n <span class:list={fallbackClass} style={fallbackStyle} {...a11y}>\n {init || \"·\"}\n </span>\n ) : effectiveKind === \"mono\" ? (\n <span\n class:list={[\"grove-icon-mask\", className]}\n style={`width:${size}px;height:${size}px;--grove-icon-url:url('${cssUrl}');`}\n {...a11y}\n />\n ) : (\n <>\n {/* The `width`/`height` attributes below are only presentational\n hints. These SVGs carry a `viewBox` and no intrinsic size, so\n once one loads the browser re-derives the box and the row\n reflows — Lighthouse reports it as \"media element lacking an\n explicit size\" and it cost the browse page 0.115 CLS. The\n `style` attribute's explicit CSS size pins the box before\n the first byte arrives. */}\n <img\n src={src}\n width={size}\n height={size}\n style={`width:${size}px;height:${size}px`}\n alt=\"\"\n class:list={[\"inline-block shrink-0 align-middle\", className]}\n loading=\"lazy\"\n decoding=\"async\"\n onerror=\"this.hidden=true;this.nextElementSibling.hidden=false\"\n {...a11y}\n />\n <span hidden data-grove-icon-fallback-initials class:list={fallbackClass} style={fallbackStyle} {...a11y}>\n {init || \"·\"}\n </span>\n </>\n )\n}\n",
129
+ "content": "---\nimport type { IconKind } from '../../lib/icon-kinds';\n/**\n * Icon — brand icon registry.\n *\n * Resolves a registry name to `/icons/{stacks|platforms|brands}/{name}.svg`\n * and renders it. The Astro integration syncs the packaged set into the\n * consumer's `public/icons/` on every build; consumers can ship their own\n * SVGs under the same paths (or override the `base` prop) without forking\n * this component.\n *\n * The component is **generic** — it does not import any consumer-side\n * `siteConfig`, `item`, or blueprint-specific module.\n *\n * `category` selects the subfolder:\n *\n * - \"stack\" → `/icons/stacks/{name}.svg`\n * - \"platform\" → `/icons/platforms/{name}.svg`\n * - \"brand\" → `/icons/brands/{name}.svg` (consumer-supplied)\n *\n * ## Theming\n *\n * `ICON_KINDS` (generated by `scripts/sync-icons.mjs`) classifies each\n * packaged icon:\n *\n * - **color** — the default. Any brand with a color mark keeps it,\n * rendered as `<img>` with an `onerror` fallback to an initials\n * chip.\n * - **mono** — marks with no color to lose (Apple, Rust, Tauri,\n * Solidity, Deno) plus the concept glyphs. Rendered as a CSS-masked\n * `<span>` painted from `--grove-foreground`, which reproduces how\n * those brands are actually used: solid black on light, solid white\n * on dark, with no script and no second file. See\n * `.grove-icon-mask` in `styles.css`.\n *\n * The map CLASSIFIES; it does not gate availability. A name it has never\n * heard of — a consumer's own SVG — takes the `<img>` path, exactly as\n * before. Pass `kind=\"mono\"` to opt a custom mark into `currentColor`\n * tinting.\n *\n * Aliases: a tiny `aliases` map (e.g. `rn → react-native`) lets the\n * registry accept multiple ids for the same asset. Lookup falls through\n * `aliases` → the built-in stack aliases → the raw slug, then fails over\n * to the initials placeholder.\n */\nimport { ICON_KINDS } from '../../lib/icon-kinds';\nimport type { IconCategory } from '../../lib/icon-registry';\nimport { resolveIconAsset, slugifyIconName } from '../../lib/icon-registry';\n\nexport type { IconCategory, IconKind };\n\ninterface Props {\n /**\n * Registry id. Resolved through `aliases` first, then matched\n * against the SVG file name (case-insensitive, slug-normalized).\n */\n name: string;\n /** Subfolder under `/icons/`. */\n category: IconCategory;\n /** Pixel size (square). Defaults to 16. */\n size?: number;\n /** Extra class for the outer wrapper. */\n class?: string;\n /** Tooltip / aria-label. */\n title?: string;\n /**\n * Override the packaged kind classification. Pass `\"mono\"` for a\n * consumer-supplied single-color mark so it is painted black on\n * light and white on dark instead of shipping two files.\n */\n kind?: IconKind;\n /**\n * Optional id → id remap. Lookup goes `name → aliases[name] →\n * {name}.svg` (case-insensitive).\n */\n aliases?: Record<string, string>;\n /**\n * Optional complete asset registry supplied by a consumer. When omitted,\n * Grove attempts the configured asset path and falls back on image error.\n */\n available?: string[];\n /**\n * Initials to render when the icon file is missing. Defaults to\n * the first 1–2 characters of `name`.\n */\n fallbackInitials?: string;\n /**\n * Base path for icon files. Defaults to `/icons` (matches the\n * synced `public/icons/`).\n */\n base?: string;\n}\n\nconst {\n name,\n category,\n size = 16,\n class: className = '',\n title,\n kind,\n aliases,\n available,\n fallbackInitials,\n base = '/icons',\n} = Astro.props;\n\nconst asset = resolveIconAsset(name, category, aliases);\nconst resolved = asset.name;\nconst availableIcons = available?.map(slugifyIconName);\nconst hasAsset =\n category === 'brand' || availableIcons === undefined || availableIcons.includes(resolved);\nconst src = `${base.replace(/\\/$/, '')}/${asset.folder}/${resolved}.svg`;\n\n// Initials fallback: first 1–2 alphanumerics, uppercased.\nconst init = (fallbackInitials ?? name ?? '')\n .replace(/[^a-z0-9]/gi, '')\n .slice(0, 2)\n .toUpperCase();\nconst showFallback = !resolved || !hasAsset || asset.textOnly;\n\n// Unknown names fall through to `<img>`, never to `mono` — a mask has\n// no `onerror`, so a missing file would render an invisible blank.\nconst effectiveKind: IconKind = kind ?? ICON_KINDS[asset.key] ?? 'color';\n\n// `name` reaches the mask branch as part of a CSS `url()` token, and\n// slugifying does not remove the characters that would close it. Astro\n// escapes the attribute; this escapes the CSS inside it.\nconst cssUrl = src.replace(/['\"()\\\\\\s]/g, encodeURIComponent);\n\n// Build aria-label.\nconst ariaLabel = title ?? name;\nconst a11y: Record<string, string> = title\n ? { 'aria-label': ariaLabel, role: 'img' }\n : { 'aria-hidden': 'true', focusable: 'false' };\n\nconst fallbackClass = [\n 'inline-flex shrink-0 select-none items-center justify-center rounded-sm bg-ink-100 align-middle font-semibold uppercase leading-none text-ink-700 dark:bg-ink-800 dark:text-ink-200',\n className,\n];\nconst fallbackStyle = `width:${size}px;height:${size}px;font-size:${Math.max(10, size - 6)}px;`;\n---\n\n{\n showFallback ? (\n <span class:list={fallbackClass} style={fallbackStyle} {...a11y}>\n {init || \"·\"}\n </span>\n ) : effectiveKind === \"mono\" ? (\n <span\n class:list={[\"grove-icon-mask\", className]}\n style={`width:${size}px;height:${size}px;--grove-icon-url:url('${cssUrl}');`}\n {...a11y}\n />\n ) : (\n <>\n {/* The `width`/`height` attributes below are only presentational\n hints. These SVGs carry a `viewBox` and no intrinsic size, so\n once one loads the browser re-derives the box and the row\n reflows — Lighthouse reports it as \"media element lacking an\n explicit size\" and it cost the browse page 0.115 CLS. The\n `style` attribute's explicit CSS size pins the box before\n the first byte arrives. */}\n <img\n src={src}\n width={size}\n height={size}\n style={`width:${size}px;height:${size}px`}\n alt=\"\"\n class:list={[\"inline-block shrink-0 align-middle\", className]}\n loading=\"lazy\"\n decoding=\"async\"\n onerror=\"this.hidden=true;this.nextElementSibling.hidden=false\"\n {...a11y}\n />\n <span hidden data-grove-icon-fallback-initials class:list={fallbackClass} style={fallbackStyle} {...a11y}>\n {init || \"·\"}\n </span>\n </>\n )\n}\n",
130
130
  "type": "registry:component",
131
131
  "target": "~/src/components/grove/icon.astro"
132
132
  },
@@ -210,7 +210,7 @@
210
210
  },
211
211
  {
212
212
  "path": "default/components/grove/collection-page.astro",
213
- "content": "---\nimport siteConfig from '@grove/generated/site-config.json';\nimport type { CollectionPageModel, CollectionTile as Tile } from '@grove-dev/astro/server';\n/**\n * CollectionPage — renders a single curated/generated collection.\n *\n * Consumes a `CollectionPageModel` produced by `getCollectionPageModel`.\n *\n * First screen: a header band with the kind (editor's picks when the\n * curator wrote per-entry notes, otherwise a live view), the title, the\n * verdict (`editorial.introduction`, falling back to the description),\n * faces of the entries, the count and the review date.\n *\n * Entries: editor's picks render as numbered cards with the note, tags,\n * stars / last push / licence and Website (with `ref`) and Source\n * links; live views render as a two-column grid of ranked cards. A\n * sticky rail on wide screens holds the page outline and a submit\n * prompt. Below: the Markdown body (`bodyHtml`), \"How we picked\"\n * (`selectionNote`), the FAQ and related collections — as cards when\n * `relatedTiles` is passed.\n *\n * Generic: no blueprint-specific copy. Consumers can override\n * `eyebrow`, `title`, `description`; `<slot name=\"intro\">` takes any\n * extra markup.\n */\nimport { formatCount, withRef } from '@grove-dev/core';\nimport Container from '../../layouts/container.astro';\nimport SectionHeader from '../../layouts/section-header.astro';\nimport { buttonClass } from '../../lib/classnames.ts';\nimport EmptyState from '../ui/empty-state.astro';\nimport CollectionTile from './collection-tile.astro';\nimport Avatar from './entry-avatar.astro';\nimport Chips from './entry-chips.astro';\nimport Metrics from './entry-metrics.astro';\n\ninterface Props {\n model: CollectionPageModel;\n /** Sanitized HTML of the collection's Markdown body, if it has one. */\n bodyHtml?: string | null;\n /** Override the eyebrow text (default: \"Editor's picks\" / \"Live view\"). */\n eyebrow?: string;\n /** Override the title (default: collection.title). */\n title?: string;\n /** Override the lead (default: introduction, else description). */\n description?: string;\n /** Default copy when the collection has no matching entries. */\n emptyLabel?: string;\n /** Section id (deep link + stable key). */\n id?: string;\n /** Heading level for the collection title (the page's h1 by default). */\n level?: 1 | 2;\n /** Noun pair for the entry count (blueprint labels). */\n countNoun?: { singular: string; plural: string };\n /** Cards for related collections (`getCollectionTiles`); plain links otherwise. */\n relatedTiles?: Tile[];\n /** Where the rail's \"Know one that fits?\" prompt points. Empty hides it. */\n submitHref?: string;\n class?: string;\n}\n\nconst {\n model,\n bodyHtml = null,\n eyebrow,\n title,\n description,\n emptyLabel = 'This collection is currently empty.',\n id,\n level = 1,\n countNoun = { singular: 'item', plural: 'items' },\n relatedTiles = [],\n submitHref = '/submit/',\n class: className = '',\n} = Astro.props;\n\nconst Heading = `h${level}` as 'h1' | 'h2';\nconst editorial = model.entries.some((entry) => entry.note);\nconst finalTitle = title ?? model.collection.title;\nconst verdict = description ?? model.collection.introduction ?? model.collection.description;\nconst finalEyebrow = eyebrow ?? (editorial ? \"Editor's picks\" : 'Live view');\nconst countText = formatCount(model.total, countNoun);\nconst reviewedText = model.collection.lastReviewedAt\n ? new Date(model.collection.lastReviewedAt).toLocaleDateString('en', {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n timeZone: 'UTC',\n })\n : null;\nconst outbound = (siteConfig as { outbound?: { ref?: string | false; skipHosts?: string[] } }).outbound ?? {};\nconst faces = model.entries.filter((e) => e.avatarUrl).slice(0, 6);\nconst jumpLinks = [\n model.isEmpty ? null : { href: '#entries', label: editorial ? `The ${countText}` : `All ${countText}` },\n model.collection.selectionNote ? { href: '#how-we-picked', label: 'How we picked' } : null,\n model.faq.length > 0 ? { href: '#faq', label: 'Questions' } : null,\n model.related.length > 0 ? { href: '#related', label: 'Related collections' } : null,\n].filter((link): link is { href: string; label: string } => link !== null);\n---\n\n<section id={id} class={className}>\n <div class=\"border-b border-border bg-surface-sunken/60\">\n <Container>\n <header class=\"max-w-[76ch] py-10 sm:py-14\">\n <nav aria-label=\"Breadcrumb\" class=\"flex items-center gap-2 text-2xs text-muted-foreground\">\n <a href=\"/collections/\" class=\"text-muted-foreground no-underline hover:text-foreground hover:underline\">Collections</a>\n <span aria-hidden=\"true\">/</span>\n {editorial ? (\n <span class=\"inline-flex items-center rounded-full bg-emerald-500/10 px-2 py-0.5 font-semibold text-emerald-700 dark:text-emerald-300\">{finalEyebrow}</span>\n ) : (\n <span class=\"inline-flex items-center gap-1.5 rounded-full bg-secondary px-2 py-0.5 font-semibold text-secondary-foreground\"><span class=\"h-1.5 w-1.5 rounded-full bg-success\" aria-hidden=\"true\"></span>{finalEyebrow}</span>\n )}\n </nav>\n <Heading class=\"m-0 mt-4 text-[2rem] font-semibold leading-[1.1] tracking-tight text-foreground sm:text-[2.625rem]\">{finalTitle}</Heading>\n {verdict && <p class=\"m-0 mt-4 text-[1.0625rem] leading-relaxed text-foreground sm:text-[1.125rem]\">{verdict}</p>}\n <div class=\"mt-5 flex flex-wrap items-center gap-x-4 gap-y-2 text-sm text-muted-foreground\">\n {faces.length > 0 && (\n <span class=\"flex -space-x-2\" aria-hidden=\"true\">\n {faces.map((e) => (\n <img src={e.avatarUrl} alt=\"\" width=\"28\" height=\"28\" decoding=\"async\" class=\"h-7 w-7 rounded-full border-2 border-background bg-secondary object-cover\" />\n ))}\n </span>\n )}\n <span class=\"font-medium text-foreground\">{countText}</span>\n {reviewedText && <span>Reviewed <time datetime={model.collection.lastReviewedAt}>{reviewedText}</time></span>}\n </div>\n </header>\n </Container>\n </div>\n\n <Container>\n <div class=\"grid gap-10 py-10 lg:grid-cols-[minmax(0,1fr)_15rem] lg:gap-12\">\n <div class=\"min-w-0\">\n {jumpLinks.length > 1 && (\n <nav aria-label=\"On this page\" class=\"mb-8 lg:hidden\">\n <ul class=\"m-0 flex list-none flex-wrap gap-2 p-0\">\n {jumpLinks.map((link) => (\n <li class=\"m-0\"><a href={link.href} class={buttonClass('outline', 'sm')}>{link.label}</a></li>\n ))}\n </ul>\n </nav>\n )}\n\n <slot name=\"intro\" />\n\n <section id=\"entries\" aria-labelledby=\"entries-heading\" class=\"scroll-mt-20\">\n <h2 id=\"entries-heading\" class=\"m-0 mb-4 text-[1.375rem] font-semibold tracking-tight text-foreground\">\n {editorial ? `The ${countText}` : `All ${countText}, ranked`}\n </h2>\n\n {model.isEmpty ? (\n <EmptyState\n title={emptyLabel}\n description=\"No records currently match this collection's query. The collection fills automatically as matching records are added.\"\n />\n ) : editorial ? (\n <ol class=\"m-0 flex list-none flex-col gap-4 p-0\">\n {model.entries.map((entry, i) => {\n const website = withRef(entry.homepageHref, outbound);\n return (\n <li id={`pick-${entry.slug}`} class=\"m-0 scroll-mt-20 rounded-[var(--radius-lg)] border border-border bg-card p-5 sm:p-6\">\n <div class=\"flex items-start gap-4\">\n <Avatar src={entry.avatarUrl} title={entry.title} size=\"lg\" />\n <div class=\"min-w-0 flex-1\">\n <h3 class=\"m-0 flex flex-wrap items-baseline gap-x-2 text-[1.1875rem] font-semibold leading-snug text-foreground\">\n <span class=\"tabular-nums text-muted-foreground\">{i + 1}.</span>\n <a href={entry.url} class=\"text-foreground no-underline hover:underline\">{entry.title}</a>\n </h3>\n <Metrics stars={entry.stars} pushedAt={entry.pushedAt} license={entry.licenses?.[0] ?? entry.license} />\n </div>\n </div>\n <p class=\"m-0 mt-4 max-w-[72ch] text-[0.9375rem] leading-relaxed text-foreground\">{entry.note ?? entry.description}</p>\n <Chips items={(entry.tags ?? []).slice(0, 4)} />\n <div class=\"mt-4 flex flex-wrap items-center gap-2 border-t border-border pt-4\">\n {website && (\n <a href={website} rel=\"noopener\" target=\"_blank\" class={buttonClass('secondary', 'sm')} data-event=\"homepage_click\" data-event-source=\"collection_pick\" data-event-item={entry.slug}>\n Website<span class=\"sr-only\"> of {entry.title}</span>\n </a>\n )}\n {entry.repoHref && (\n <a href={entry.repoHref} rel=\"noopener\" target=\"_blank\" class={buttonClass('ghost', 'sm')} data-event=\"external_repo_click\" data-event-source=\"collection_pick\" data-event-item={entry.slug}>\n Source<span class=\"sr-only\"> code of {entry.title}</span>\n </a>\n )}\n <a href={entry.url} class=\"ml-auto text-sm font-medium text-muted-foreground no-underline hover:text-foreground hover:underline\">Full page →</a>\n </div>\n </li>\n );\n })}\n </ol>\n ) : (\n <ol class=\"m-0 grid list-none grid-cols-1 gap-3 p-0 md:grid-cols-2\">\n {model.entries.map((entry, i) => (\n <li id={`pick-${entry.slug}`} class=\"group relative m-0 flex scroll-mt-20 flex-col rounded-[var(--radius-lg)] border border-border bg-card p-4 transition-[border-color,box-shadow] focus-within:border-ring hover:border-ink-300 hover:shadow-md dark:hover:border-ink-700\">\n <div class=\"flex items-start gap-3\">\n <Avatar src={entry.avatarUrl} title={entry.title} />\n <div class=\"min-w-0 flex-1\">\n <h3 class=\"m-0 text-[1rem] font-semibold leading-snug text-foreground\">\n <a href={entry.url} class=\"text-foreground no-underline outline-none after:absolute after:inset-0 after:content-[''] group-hover:underline\">{entry.title}</a>\n </h3>\n {entry.stack && <p class=\"m-0 mt-0.5 text-2xs text-muted-foreground\">{entry.stack}</p>}\n </div>\n <span class=\"shrink-0 rounded-full bg-secondary px-2 py-0.5 text-2xs font-semibold tabular-nums text-secondary-foreground\" aria-label={`Rank ${i + 1}`}>#{i + 1}</span>\n </div>\n <p class=\"m-0 mt-3 line-clamp-2 text-sm leading-relaxed text-muted-foreground\">{entry.description}</p>\n <Chips items={(entry.tags ?? []).slice(0, 3)} />\n <div class=\"mt-auto pt-3\">\n <Metrics stars={entry.stars} pushedAt={entry.pushedAt} license={entry.licenses?.[0] ?? entry.license} bordered />\n </div>\n </li>\n ))}\n </ol>\n )}\n </section>\n\n {bodyHtml && <div class=\"grove-prose mt-12 max-w-[76ch]\" set:html={bodyHtml} />}\n\n {model.collection.selectionNote && (\n <details id=\"how-we-picked\" class=\"group mt-12 max-w-[76ch] scroll-mt-20 rounded-[var(--radius-lg)] border border-border bg-surface-sunken\">\n <summary class=\"flex cursor-pointer list-none items-center justify-between gap-3 rounded-[var(--radius-lg)] px-4 py-3 outline-none focus-visible:ring-3 focus-visible:ring-ring/35 [&::-webkit-details-marker]:hidden\">\n <h2 class=\"m-0 text-[1rem] font-semibold text-foreground\">How we picked</h2>\n <span aria-hidden=\"true\" class=\"text-muted-foreground transition-transform group-open:rotate-45\">+</span>\n </summary>\n <p class=\"m-0 px-4 pb-4 text-[0.9375rem] leading-relaxed text-foreground\">\n {model.collection.selectionNote.trim().replace(/\\s*\\n\\s*/g, ' ')}\n </p>\n </details>\n )}\n\n {model.faq.length > 0 && (\n <section id=\"faq\" class=\"mt-12 max-w-[76ch] scroll-mt-20\">\n <h2 class=\"m-0 mb-4 text-[1.375rem] font-semibold tracking-tight text-foreground\">Frequently asked questions</h2>\n <dl class=\"m-0 flex flex-col gap-5\">\n {model.faq.map((item) => (\n <div>\n <dt class=\"m-0 text-[1rem] font-semibold text-foreground\">{item.q}</dt>\n <dd class=\"m-0 mt-1 text-[0.9375rem] leading-relaxed text-foreground\">{item.a}</dd>\n </div>\n ))}\n </dl>\n </section>\n )}\n </div>\n\n <aside class=\"hidden lg:block\" data-pagefind-ignore>\n <div class=\"sticky top-20 flex flex-col gap-4\">\n {jumpLinks.length > 1 && (\n <nav aria-label=\"On this page\" class=\"rounded-[var(--radius-lg)] border border-border bg-card p-3\">\n <p class=\"m-0 px-2 text-2xs font-medium uppercase tracking-wider text-muted-foreground\">On this page</p>\n <ul class=\"m-0 mt-2 flex list-none flex-col p-0\">\n {jumpLinks.map((link) => (\n <li class=\"m-0\"><a href={link.href} class=\"block rounded-[var(--radius)] px-2 py-1.5 text-sm text-foreground no-underline hover:bg-accent\">{link.label}</a></li>\n ))}\n </ul>\n </nav>\n )}\n {submitHref && (\n <div class=\"rounded-[var(--radius-lg)] border border-dashed border-border p-4\">\n <p class=\"m-0 text-sm font-semibold text-foreground\">Know one that fits?</p>\n <p class=\"m-0 mt-1 text-2xs leading-relaxed text-muted-foreground\">Submit it with one pull request. The page credits you.</p>\n <a href={submitHref} class={buttonClass('secondary', 'sm', 'mt-3 w-full justify-center')}>Submit {countNoun.singular === 'item' ? 'an entry' : `a ${countNoun.singular}`}</a>\n </div>\n )}\n </div>\n </aside>\n </div>\n\n {model.related.length > 0 && (\n <section id=\"related\" data-pagefind-ignore class=\"scroll-mt-20 border-t border-border pb-16 pt-10\">\n <SectionHeader eyebrow=\"Related\" title=\"Related collections\" level={2} />\n {relatedTiles.length > 0 ? (\n <ul class=\"m-0 grid list-none grid-cols-1 gap-4 p-0 sm:grid-cols-2 lg:grid-cols-3\">\n {relatedTiles.map((tile) => <li class=\"m-0 p-0\"><CollectionTile tile={tile} eventSource=\"collection_related\" /></li>)}\n </ul>\n ) : (\n <ul class=\"m-0 grid list-none grid-cols-1 gap-2 p-0 sm:grid-cols-2 lg:grid-cols-4\">\n {model.related.map((r) => (\n <li class=\"m-0 p-0\"><a href={r.url} class=\"flex h-full rounded-md border border-border bg-card px-3 py-2.5 text-sm font-medium text-foreground no-underline hover:underline\">{r.title}</a></li>\n ))}\n </ul>\n )}\n </section>\n )}\n </Container>\n</section>\n",
213
+ "content": "---\nimport siteConfig from '@grove/generated/site-config.json';\nimport type { CollectionPageModel, CollectionTile as Tile } from '@grove-dev/astro/server';\n/**\n * CollectionPage — renders a single curated/generated collection.\n *\n * Consumes a `CollectionPageModel` produced by `getCollectionPageModel`.\n *\n * First screen: a header band with the kind (editor's picks when the\n * curator wrote per-entry notes, otherwise a live view), the title, the\n * verdict (`editorial.introduction`, falling back to the description),\n * faces of the entries, the count and the review date.\n *\n * Entries: editor's picks render as numbered cards with the note, tags,\n * stars / last push / licence and Website (with `ref`) and Source\n * links; live views render as a two-column grid of ranked cards. A\n * sticky rail on wide screens holds the page outline and a submit\n * prompt. Below: the Markdown body (`bodyHtml`), \"How we picked\"\n * (`selectionNote`), the FAQ and related collections — as cards when\n * `relatedTiles` is passed.\n *\n * Generic: no blueprint-specific copy. Consumers can override\n * `eyebrow`, `title`, `description`; `<slot name=\"intro\">` takes any\n * extra markup.\n */\nimport { formatCount, withRef } from '@grove-dev/core';\nimport Container from '../../layouts/container.astro';\nimport SectionHeader from '../../layouts/section-header.astro';\nimport { buttonClass } from '../../lib/classnames.ts';\nimport EmptyState from '../ui/empty-state.astro';\nimport CollectionTile from './collection-tile.astro';\nimport Avatar from './entry-avatar.astro';\nimport Chips from './entry-chips.astro';\nimport Metrics from './entry-metrics.astro';\n\ninterface Props {\n model: CollectionPageModel;\n /** Sanitized HTML of the collection's Markdown body, if it has one. */\n bodyHtml?: string | null;\n /** Override the eyebrow text (default: \"Editor's picks\" / \"Live view\"). */\n eyebrow?: string;\n /** Override the title (default: collection.title). */\n title?: string;\n /** Override the lead (default: introduction, else description). */\n description?: string;\n /** Default copy when the collection has no matching entries. */\n emptyLabel?: string;\n /** Section id (deep link + stable key). */\n id?: string;\n /** Heading level for the collection title (the page's h1 by default). */\n level?: 1 | 2;\n /** Noun pair for the entry count (blueprint labels). */\n countNoun?: { singular: string; plural: string };\n /** Cards for related collections (`getCollectionTiles`); plain links otherwise. */\n relatedTiles?: Tile[];\n /** Where the rail's \"Know one that fits?\" prompt points. Empty hides it. */\n submitHref?: string;\n class?: string;\n}\n\nconst {\n model,\n bodyHtml = null,\n eyebrow,\n title,\n description,\n emptyLabel = 'This collection is currently empty.',\n id,\n level = 1,\n countNoun = { singular: 'item', plural: 'items' },\n relatedTiles = [],\n submitHref = '/submit/',\n class: className = '',\n} = Astro.props;\n\nconst Heading = `h${level}` as 'h1' | 'h2';\nconst editorial = model.entries.some((entry) => entry.note);\nconst finalTitle = title ?? model.collection.title;\nconst verdict = description ?? model.collection.introduction ?? model.collection.description;\nconst finalEyebrow = eyebrow ?? (editorial ? \"Editor's picks\" : 'Live view');\nconst countText = formatCount(model.total, countNoun);\nconst reviewedText = model.collection.lastReviewedAt\n ? new Date(model.collection.lastReviewedAt).toLocaleDateString('en', {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n timeZone: 'UTC',\n })\n : null;\nconst outbound =\n (siteConfig as { outbound?: { ref?: string | false; skipHosts?: string[] } }).outbound ?? {};\nconst faces = model.entries.filter((e) => e.avatarUrl).slice(0, 6);\nconst jumpLinks = [\n model.isEmpty\n ? null\n : { href: '#entries', label: editorial ? `The ${countText}` : `All ${countText}` },\n model.collection.selectionNote ? { href: '#how-we-picked', label: 'How we picked' } : null,\n model.faq.length > 0 ? { href: '#faq', label: 'Questions' } : null,\n model.related.length > 0 ? { href: '#related', label: 'Related collections' } : null,\n].filter((link): link is { href: string; label: string } => link !== null);\n---\n\n<section id={id} class={className}>\n <div class=\"border-b border-border bg-surface-sunken/60\">\n <Container>\n <header class=\"max-w-[76ch] py-10 sm:py-14\">\n <nav aria-label=\"Breadcrumb\" class=\"flex items-center gap-2 text-2xs text-muted-foreground\">\n <a href=\"/collections/\" class=\"text-muted-foreground no-underline hover:text-foreground hover:underline\">Collections</a>\n <span aria-hidden=\"true\">/</span>\n {editorial ? (\n <span class=\"inline-flex items-center rounded-full bg-emerald-500/10 px-2 py-0.5 font-semibold text-emerald-700 dark:text-emerald-300\">{finalEyebrow}</span>\n ) : (\n <span class=\"inline-flex items-center gap-1.5 rounded-full bg-secondary px-2 py-0.5 font-semibold text-secondary-foreground\"><span class=\"h-1.5 w-1.5 rounded-full bg-success\" aria-hidden=\"true\"></span>{finalEyebrow}</span>\n )}\n </nav>\n <Heading class=\"m-0 mt-4 text-[2rem] font-semibold leading-[1.1] tracking-tight text-foreground sm:text-[2.625rem]\">{finalTitle}</Heading>\n {verdict && <p class=\"m-0 mt-4 text-[1.0625rem] leading-relaxed text-foreground sm:text-[1.125rem]\">{verdict}</p>}\n <div class=\"mt-5 flex flex-wrap items-center gap-x-4 gap-y-2 text-sm text-muted-foreground\">\n {faces.length > 0 && (\n <span class=\"flex -space-x-2\" aria-hidden=\"true\">\n {faces.map((e) => (\n <img src={e.avatarUrl} alt=\"\" width=\"28\" height=\"28\" decoding=\"async\" class=\"h-7 w-7 rounded-full border-2 border-background bg-secondary object-cover\" />\n ))}\n </span>\n )}\n <span class=\"font-medium text-foreground\">{countText}</span>\n {reviewedText && <span>Reviewed <time datetime={model.collection.lastReviewedAt}>{reviewedText}</time></span>}\n </div>\n </header>\n </Container>\n </div>\n\n <Container>\n <div class=\"grid gap-10 py-10 lg:grid-cols-[minmax(0,1fr)_15rem] lg:gap-12\">\n <div class=\"min-w-0\">\n {jumpLinks.length > 1 && (\n <nav aria-label=\"On this page\" class=\"mb-8 lg:hidden\">\n <ul class=\"m-0 flex list-none flex-wrap gap-2 p-0\">\n {jumpLinks.map((link) => (\n <li class=\"m-0\"><a href={link.href} class={buttonClass('outline', 'sm')}>{link.label}</a></li>\n ))}\n </ul>\n </nav>\n )}\n\n <slot name=\"intro\" />\n\n <section id=\"entries\" aria-labelledby=\"entries-heading\" class=\"scroll-mt-20\">\n <h2 id=\"entries-heading\" class=\"m-0 mb-4 text-[1.375rem] font-semibold tracking-tight text-foreground\">\n {editorial ? `The ${countText}` : `All ${countText}, ranked`}\n </h2>\n\n {model.isEmpty ? (\n <EmptyState\n title={emptyLabel}\n description=\"No records currently match this collection's query. The collection fills automatically as matching records are added.\"\n />\n ) : editorial ? (\n <ol class=\"m-0 flex list-none flex-col gap-4 p-0\">\n {model.entries.map((entry, i) => {\n const website = withRef(entry.homepageHref, outbound);\n return (\n <li id={`pick-${entry.slug}`} class=\"m-0 scroll-mt-20 rounded-[var(--radius-lg)] border border-border bg-card p-5 sm:p-6\">\n <div class=\"flex items-start gap-4\">\n <Avatar src={entry.avatarUrl} title={entry.title} size=\"lg\" />\n <div class=\"min-w-0 flex-1\">\n <h3 class=\"m-0 flex flex-wrap items-baseline gap-x-2 text-[1.1875rem] font-semibold leading-snug text-foreground\">\n <span class=\"tabular-nums text-muted-foreground\">{i + 1}.</span>\n <a href={entry.url} class=\"text-foreground no-underline hover:underline\">{entry.title}</a>\n </h3>\n <Metrics stars={entry.stars} pushedAt={entry.pushedAt} license={entry.licenses?.[0]} />\n </div>\n </div>\n <p class=\"m-0 mt-4 max-w-[72ch] text-[0.9375rem] leading-relaxed text-foreground\">{entry.note ?? entry.description}</p>\n <Chips items={(entry.tags ?? []).slice(0, 4)} />\n <div class=\"mt-4 flex flex-wrap items-center gap-2 border-t border-border pt-4\">\n {website && (\n <a href={website} rel=\"noopener\" target=\"_blank\" class={buttonClass('secondary', 'sm')} data-event=\"homepage_click\" data-event-source=\"collection_pick\" data-event-item={entry.slug}>\n Website<span class=\"sr-only\"> of {entry.title}</span>\n </a>\n )}\n {entry.repoHref && (\n <a href={entry.repoHref} rel=\"noopener\" target=\"_blank\" class={buttonClass('ghost', 'sm')} data-event=\"external_repo_click\" data-event-source=\"collection_pick\" data-event-item={entry.slug}>\n Source<span class=\"sr-only\"> code of {entry.title}</span>\n </a>\n )}\n <a href={entry.url} class=\"ml-auto text-sm font-medium text-muted-foreground no-underline hover:text-foreground hover:underline\">Full page →</a>\n </div>\n </li>\n );\n })}\n </ol>\n ) : (\n <ol class=\"m-0 grid list-none grid-cols-1 gap-3 p-0 md:grid-cols-2\">\n {model.entries.map((entry, i) => (\n <li id={`pick-${entry.slug}`} class=\"group relative m-0 flex scroll-mt-20 flex-col rounded-[var(--radius-lg)] border border-border bg-card p-4 transition-[border-color,box-shadow] focus-within:border-ring hover:border-ink-300 hover:shadow-md dark:hover:border-ink-700\">\n <div class=\"flex items-start gap-3\">\n <Avatar src={entry.avatarUrl} title={entry.title} />\n <div class=\"min-w-0 flex-1\">\n <h3 class=\"m-0 text-[1rem] font-semibold leading-snug text-foreground\">\n <a href={entry.url} class=\"text-foreground no-underline outline-none after:absolute after:inset-0 after:content-[''] group-hover:underline\">{entry.title}</a>\n </h3>\n {entry.stack && <p class=\"m-0 mt-0.5 text-2xs text-muted-foreground\">{entry.stack}</p>}\n </div>\n <span class=\"shrink-0 rounded-full bg-secondary px-2 py-0.5 text-2xs font-semibold tabular-nums text-secondary-foreground\" aria-label={`Rank ${i + 1}`}>#{i + 1}</span>\n </div>\n <p class=\"m-0 mt-3 line-clamp-2 text-sm leading-relaxed text-muted-foreground\">{entry.description}</p>\n <Chips items={(entry.tags ?? []).slice(0, 3)} />\n <div class=\"mt-auto pt-3\">\n <Metrics stars={entry.stars} pushedAt={entry.pushedAt} license={entry.licenses?.[0]} bordered />\n </div>\n </li>\n ))}\n </ol>\n )}\n </section>\n\n {bodyHtml && <div class=\"grove-prose mt-12 max-w-[76ch]\" set:html={bodyHtml} />}\n\n {model.collection.selectionNote && (\n <details id=\"how-we-picked\" class=\"group mt-12 max-w-[76ch] scroll-mt-20 rounded-[var(--radius-lg)] border border-border bg-surface-sunken\">\n <summary class=\"flex cursor-pointer list-none items-center justify-between gap-3 rounded-[var(--radius-lg)] px-4 py-3 outline-none focus-visible:ring-3 focus-visible:ring-ring/35 [&::-webkit-details-marker]:hidden\">\n <h2 class=\"m-0 text-[1rem] font-semibold text-foreground\">How we picked</h2>\n <span aria-hidden=\"true\" class=\"text-muted-foreground transition-transform group-open:rotate-45\">+</span>\n </summary>\n <p class=\"m-0 px-4 pb-4 text-[0.9375rem] leading-relaxed text-foreground\">\n {model.collection.selectionNote.trim().replace(/\\s*\\n\\s*/g, ' ')}\n </p>\n </details>\n )}\n\n {model.faq.length > 0 && (\n <section id=\"faq\" class=\"mt-12 max-w-[76ch] scroll-mt-20\">\n <h2 class=\"m-0 mb-4 text-[1.375rem] font-semibold tracking-tight text-foreground\">Frequently asked questions</h2>\n <dl class=\"m-0 flex flex-col gap-5\">\n {model.faq.map((item) => (\n <div>\n <dt class=\"m-0 text-[1rem] font-semibold text-foreground\">{item.q}</dt>\n <dd class=\"m-0 mt-1 text-[0.9375rem] leading-relaxed text-foreground\">{item.a}</dd>\n </div>\n ))}\n </dl>\n </section>\n )}\n </div>\n\n <aside class=\"hidden lg:block\" data-pagefind-ignore>\n <div class=\"sticky top-20 flex flex-col gap-4\">\n {jumpLinks.length > 1 && (\n <nav aria-label=\"On this page\" class=\"rounded-[var(--radius-lg)] border border-border bg-card p-3\">\n <p class=\"m-0 px-2 text-2xs font-medium uppercase tracking-wider text-muted-foreground\">On this page</p>\n <ul class=\"m-0 mt-2 flex list-none flex-col p-0\">\n {jumpLinks.map((link) => (\n <li class=\"m-0\"><a href={link.href} class=\"block rounded-[var(--radius)] px-2 py-1.5 text-sm text-foreground no-underline hover:bg-accent\">{link.label}</a></li>\n ))}\n </ul>\n </nav>\n )}\n {submitHref && (\n <div class=\"rounded-[var(--radius-lg)] border border-dashed border-border p-4\">\n <p class=\"m-0 text-sm font-semibold text-foreground\">Know one that fits?</p>\n <p class=\"m-0 mt-1 text-2xs leading-relaxed text-muted-foreground\">Submit it with one pull request. The page credits you.</p>\n <a href={submitHref} class={buttonClass('secondary', 'sm', 'mt-3 w-full justify-center')}>Submit {countNoun.singular === 'item' ? 'an entry' : `a ${countNoun.singular}`}</a>\n </div>\n )}\n </div>\n </aside>\n </div>\n\n {model.related.length > 0 && (\n <section id=\"related\" data-pagefind-ignore class=\"scroll-mt-20 border-t border-border pb-16 pt-10\">\n <SectionHeader eyebrow=\"Related\" title=\"Related collections\" level={2} />\n {relatedTiles.length > 0 ? (\n <ul class=\"m-0 grid list-none grid-cols-1 gap-4 p-0 sm:grid-cols-2 lg:grid-cols-3\">\n {relatedTiles.map((tile) => <li class=\"m-0 p-0\"><CollectionTile tile={tile} eventSource=\"collection_related\" /></li>)}\n </ul>\n ) : (\n <ul class=\"m-0 grid list-none grid-cols-1 gap-2 p-0 sm:grid-cols-2 lg:grid-cols-4\">\n {model.related.map((r) => (\n <li class=\"m-0 p-0\"><a href={r.url} class=\"flex h-full rounded-md border border-border bg-card px-3 py-2.5 text-sm font-medium text-foreground no-underline hover:underline\">{r.title}</a></li>\n ))}\n </ul>\n )}\n </section>\n )}\n </Container>\n</section>\n",
214
214
  "type": "registry:component",
215
215
  "target": "~/src/components/grove/collection-page.astro"
216
216
  },
@@ -234,19 +234,19 @@
234
234
  },
235
235
  {
236
236
  "path": "default/components/grove/collection-directory.astro",
237
- "content": "---\n/**\n * CollectionDirectory — the /collections/ page.\n *\n * A short header with the two kinds of collection as a legend, one\n * featured editor's-picks collection with its first picks, then every\n * other collection as a card. Tiles come from `getCollectionTiles`.\n * The featured slot goes to the most recently reviewed non-empty\n * collection with curator notes; with none, every tile is in the grid.\n */\nimport type { CollectionTile as Tile } from '@grove-dev/astro/server';\nimport { formatStars } from '@grove-dev/core';\nimport Container from '../../layouts/container.astro';\nimport { buttonClass } from '../../lib/classnames.ts';\nimport EmptyState from '../ui/empty-state.astro';\nimport CollectionTile from './collection-tile.astro';\n\ninterface Props {\n tiles: Tile[];\n /** Distinct entries across all collections, for the header line. */\n covered?: number;\n itemsLabel?: string;\n title?: string;\n description?: string;\n}\n\nconst {\n tiles,\n covered,\n itemsLabel = 'items',\n title = 'Collections',\n description = 'Shortlists for a question you already have, and live views that re-rank as the directory changes.',\n} = Astro.props;\n\nconst featured = tiles\n .filter((t) => t.editorial && !t.isEmpty && t.reviewedAt)\n .sort((a, b) => Date.parse(b.reviewedAt ?? '') - Date.parse(a.reviewedAt ?? ''))[0];\nconst rest = tiles.filter((t) => t !== featured);\nconst reviewedText = (date?: string) =>\n date\n ? new Date(date).toLocaleDateString('en', { year: 'numeric', month: 'short', day: 'numeric', timeZone: 'UTC' })\n : undefined;\n---\n\n<section class=\"border-b border-border pb-10 pt-12 sm:pb-12 sm:pt-16\">\n <Container>\n <div class=\"flex flex-col gap-6 lg:flex-row lg:items-end lg:justify-between\">\n <div class=\"max-w-[60ch]\">\n <p class=\"m-0 text-2xs font-medium uppercase tracking-wider text-muted-foreground\">\n {tiles.length} collections{typeof covered === 'number' && covered > 0 ? ` · ${covered} ${itemsLabel} covered` : ''}\n </p>\n <h1 class=\"m-0 mt-2 text-[2rem] font-semibold leading-tight tracking-tight text-foreground sm:text-[2.625rem]\">{title}</h1>\n <p class=\"m-0 mt-3 text-[1.0625rem] leading-relaxed text-muted-foreground\">{description}</p>\n </div>\n <dl class=\"m-0 grid gap-2 text-sm sm:grid-cols-2 lg:w-[30rem]\">\n <div class=\"rounded-[var(--radius-lg)] border border-border bg-card p-3\">\n <dt class=\"inline-flex items-center gap-1.5 rounded-full bg-emerald-500/10 px-2 py-0.5 text-2xs font-semibold text-emerald-700 dark:text-emerald-300\">Editor's picks</dt>\n <dd class=\"m-0 mt-2 text-2xs leading-relaxed text-muted-foreground\">A person chose each entry and wrote down why. Dated reviews.</dd>\n </div>\n <div class=\"rounded-[var(--radius-lg)] border border-border bg-card p-3\">\n <dt class=\"inline-flex items-center gap-1.5 rounded-full bg-secondary px-2 py-0.5 text-2xs font-semibold text-secondary-foreground\">\n <span class=\"h-1.5 w-1.5 rounded-full bg-success\" aria-hidden=\"true\"></span>Live view\n </dt>\n <dd class=\"m-0 mt-2 text-2xs leading-relaxed text-muted-foreground\">Fixed rules over the directory, re-ranked on every sync.</dd>\n </div>\n </dl>\n </div>\n </Container>\n</section>\n\n{tiles.length === 0 && (\n <section class=\"py-12\">\n <Container>\n <EmptyState title=\"No collections yet\" description=\"Add a YAML file to data/collections/ and it appears here.\" />\n </Container>\n </section>\n)}\n\n{featured && (\n <section aria-labelledby=\"featured-heading\" class=\"pt-10 sm:pt-12\">\n <Container>\n <article class=\"grid overflow-hidden rounded-[var(--radius-lg)] border border-border bg-card lg:grid-cols-2\">\n <div class=\"flex min-w-0 flex-col p-6 sm:p-8\">\n <p class=\"m-0 flex items-center gap-2 text-2xs font-medium uppercase tracking-wider text-muted-foreground\">\n <span class=\"inline-flex items-center rounded-full bg-emerald-500/10 px-2 py-0.5 font-semibold normal-case tracking-normal text-emerald-700 dark:text-emerald-300\">Featured</span>\n Editor's picks\n </p>\n <h2 id=\"featured-heading\" class=\"m-0 mt-4 text-[1.625rem] font-semibold leading-tight tracking-tight text-foreground sm:text-[2rem]\">\n <a href={featured.url} class=\"text-foreground no-underline hover:underline\">{featured.title}</a>\n </h2>\n {featured.takeaway && <p class=\"m-0 mt-4 max-w-[58ch] text-[0.9375rem] leading-relaxed text-foreground\">{featured.takeaway}</p>}\n <div class=\"mt-auto flex flex-wrap items-center gap-x-4 gap-y-2 pt-6\">\n <a href={featured.url} class={buttonClass('primary', 'md')} data-event=\"collection_card_click\" data-event-source=\"collection_featured\" data-event-item={featured.slug}>See the picks →</a>\n <span class=\"text-2xs text-muted-foreground\">\n {featured.countLabel}\n {reviewedText(featured.reviewedAt) && <> · Reviewed <time datetime={featured.reviewedAt}>{reviewedText(featured.reviewedAt)}</time></>}\n </span>\n </div>\n </div>\n {featured.examples.length > 0 && (\n <div class=\"min-w-0 border-t border-border bg-surface-sunken p-4 sm:p-6 lg:border-l lg:border-t-0\">\n <h3 class=\"m-0 px-2 text-2xs font-medium uppercase tracking-wider text-muted-foreground\">Quick picks</h3>\n <ol class=\"m-0 mt-2 flex list-none flex-col p-0\">\n {featured.examples.map((ex, i) => (\n <li class=\"m-0\">\n <a href={`${featured.url}#pick-${ex.slug}`} class=\"group flex items-start gap-3 rounded-[var(--radius)] px-2 py-2.5 no-underline hover:bg-accent\">\n {ex.avatarUrl ? (\n <img src={ex.avatarUrl} alt=\"\" width=\"36\" height=\"36\" loading=\"lazy\" decoding=\"async\" class=\"h-9 w-9 shrink-0 rounded-lg border border-border bg-background object-cover\" />\n ) : (\n <span class=\"inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-border bg-background text-xs font-semibold text-muted-foreground\">{i + 1}</span>\n )}\n <span class=\"min-w-0 flex-1\">\n <span class=\"flex items-baseline justify-between gap-3\">\n <span class=\"text-[0.9375rem] font-semibold text-foreground group-hover:underline\">{ex.title}</span>\n {typeof ex.stars === 'number' && ex.stars > 0 && <span class=\"shrink-0 text-2xs tabular-nums text-muted-foreground\">★ {formatStars(ex.stars)}</span>}\n </span>\n {ex.note && <span class=\"mt-0.5 line-clamp-2 block text-sm leading-snug text-muted-foreground\">{ex.note}</span>}\n </span>\n </a>\n </li>\n ))}\n </ol>\n </div>\n )}\n </article>\n </Container>\n </section>\n)}\n\n{rest.length > 0 && (\n <section aria-labelledby=\"all-collections\" class=\"pb-16 pt-12\">\n <Container>\n <h2 id=\"all-collections\" class=\"m-0 mb-4 text-[1.25rem] font-semibold tracking-tight text-foreground\">\n {featured ? 'More collections' : 'All collections'}\n </h2>\n <ul class=\"m-0 grid list-none grid-cols-1 gap-4 p-0 sm:grid-cols-2 lg:grid-cols-3\">\n {rest.map((tile) => <li class=\"m-0 p-0\"><CollectionTile tile={tile} /></li>)}\n </ul>\n </Container>\n </section>\n)}\n",
237
+ "content": "---\n/**\n * CollectionDirectory — the /collections/ page.\n *\n * A short header with the two kinds of collection as a legend, one\n * featured editor's-picks collection with its first picks, then every\n * other collection as a card. Tiles come from `getCollectionTiles`.\n * The featured slot goes to the most recently reviewed non-empty\n * collection with curator notes; with none, every tile is in the grid.\n */\nimport type { CollectionTile as Tile } from '@grove-dev/astro/server';\nimport { formatStars } from '@grove-dev/core';\nimport Container from '../../layouts/container.astro';\nimport { buttonClass } from '../../lib/classnames.ts';\nimport EmptyState from '../ui/empty-state.astro';\nimport CollectionTile from './collection-tile.astro';\n\ninterface Props {\n tiles: Tile[];\n /** Distinct entries across all collections, for the header line. */\n covered?: number;\n itemsLabel?: string;\n title?: string;\n description?: string;\n}\n\nconst {\n tiles,\n covered,\n itemsLabel = 'items',\n title = 'Collections',\n description = 'Shortlists for a question you already have, and live views that re-rank as the directory changes.',\n} = Astro.props;\n\nconst featured = tiles\n .filter((t) => t.editorial && !t.isEmpty && t.reviewedAt)\n .sort((a, b) => Date.parse(b.reviewedAt ?? '') - Date.parse(a.reviewedAt ?? ''))[0];\nconst rest = tiles.filter((t) => t !== featured);\nconst reviewedText = (date?: string) =>\n date\n ? new Date(date).toLocaleDateString('en', {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n timeZone: 'UTC',\n })\n : undefined;\n---\n\n<section class=\"border-b border-border pb-10 pt-12 sm:pb-12 sm:pt-16\">\n <Container>\n <div class=\"flex flex-col gap-6 lg:flex-row lg:items-end lg:justify-between\">\n <div class=\"max-w-[60ch]\">\n <p class=\"m-0 text-2xs font-medium uppercase tracking-wider text-muted-foreground\">\n {tiles.length} collections{typeof covered === 'number' && covered > 0 ? ` · ${covered} ${itemsLabel} covered` : ''}\n </p>\n <h1 class=\"m-0 mt-2 text-[2rem] font-semibold leading-tight tracking-tight text-foreground sm:text-[2.625rem]\">{title}</h1>\n <p class=\"m-0 mt-3 text-[1.0625rem] leading-relaxed text-muted-foreground\">{description}</p>\n </div>\n <dl class=\"m-0 grid gap-2 text-sm sm:grid-cols-2 lg:w-[30rem]\">\n <div class=\"rounded-[var(--radius-lg)] border border-border bg-card p-3\">\n <dt class=\"inline-flex items-center gap-1.5 rounded-full bg-emerald-500/10 px-2 py-0.5 text-2xs font-semibold text-emerald-700 dark:text-emerald-300\">Editor's picks</dt>\n <dd class=\"m-0 mt-2 text-2xs leading-relaxed text-muted-foreground\">A person chose each entry and wrote down why. Dated reviews.</dd>\n </div>\n <div class=\"rounded-[var(--radius-lg)] border border-border bg-card p-3\">\n <dt class=\"inline-flex items-center gap-1.5 rounded-full bg-secondary px-2 py-0.5 text-2xs font-semibold text-secondary-foreground\">\n <span class=\"h-1.5 w-1.5 rounded-full bg-success\" aria-hidden=\"true\"></span>Live view\n </dt>\n <dd class=\"m-0 mt-2 text-2xs leading-relaxed text-muted-foreground\">Fixed rules over the directory, re-ranked on every sync.</dd>\n </div>\n </dl>\n </div>\n </Container>\n</section>\n\n{tiles.length === 0 && (\n <section class=\"py-12\">\n <Container>\n <EmptyState title=\"No collections yet\" description=\"Add a YAML file to data/collections/ and it appears here.\" />\n </Container>\n </section>\n)}\n\n{featured && (\n <section aria-labelledby=\"featured-heading\" class=\"pt-10 sm:pt-12\">\n <Container>\n <article class=\"grid overflow-hidden rounded-[var(--radius-lg)] border border-border bg-card lg:grid-cols-2\">\n <div class=\"flex min-w-0 flex-col p-6 sm:p-8\">\n <p class=\"m-0 flex items-center gap-2 text-2xs font-medium uppercase tracking-wider text-muted-foreground\">\n <span class=\"inline-flex items-center rounded-full bg-emerald-500/10 px-2 py-0.5 font-semibold normal-case tracking-normal text-emerald-700 dark:text-emerald-300\">Featured</span>\n Editor's picks\n </p>\n <h2 id=\"featured-heading\" class=\"m-0 mt-4 text-[1.625rem] font-semibold leading-tight tracking-tight text-foreground sm:text-[2rem]\">\n <a href={featured.url} class=\"text-foreground no-underline hover:underline\">{featured.title}</a>\n </h2>\n {featured.takeaway && <p class=\"m-0 mt-4 max-w-[58ch] text-[0.9375rem] leading-relaxed text-foreground\">{featured.takeaway}</p>}\n <div class=\"mt-auto flex flex-wrap items-center gap-x-4 gap-y-2 pt-6\">\n <a href={featured.url} class={buttonClass('primary', 'md')} data-event=\"collection_card_click\" data-event-source=\"collection_featured\" data-event-item={featured.slug}>See the picks →</a>\n <span class=\"text-2xs text-muted-foreground\">\n {featured.countLabel}\n {reviewedText(featured.reviewedAt) && <> · Reviewed <time datetime={featured.reviewedAt}>{reviewedText(featured.reviewedAt)}</time></>}\n </span>\n </div>\n </div>\n {featured.examples.length > 0 && (\n <div class=\"min-w-0 border-t border-border bg-surface-sunken p-4 sm:p-6 lg:border-l lg:border-t-0\">\n <h3 class=\"m-0 px-2 text-2xs font-medium uppercase tracking-wider text-muted-foreground\">Quick picks</h3>\n <ol class=\"m-0 mt-2 flex list-none flex-col p-0\">\n {featured.examples.map((ex, i) => (\n <li class=\"m-0\">\n <a href={`${featured.url}#pick-${ex.slug}`} class=\"group flex items-start gap-3 rounded-[var(--radius)] px-2 py-2.5 no-underline hover:bg-accent\">\n {ex.avatarUrl ? (\n <img src={ex.avatarUrl} alt=\"\" width=\"36\" height=\"36\" loading=\"lazy\" decoding=\"async\" class=\"h-9 w-9 shrink-0 rounded-lg border border-border bg-background object-cover\" />\n ) : (\n <span class=\"inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-border bg-background text-xs font-semibold text-muted-foreground\">{i + 1}</span>\n )}\n <span class=\"min-w-0 flex-1\">\n <span class=\"flex items-baseline justify-between gap-3\">\n <span class=\"text-[0.9375rem] font-semibold text-foreground group-hover:underline\">{ex.title}</span>\n {typeof ex.stars === 'number' && ex.stars > 0 && <span class=\"shrink-0 text-2xs tabular-nums text-muted-foreground\">★ {formatStars(ex.stars)}</span>}\n </span>\n {ex.note && <span class=\"mt-0.5 line-clamp-2 block text-sm leading-snug text-muted-foreground\">{ex.note}</span>}\n </span>\n </a>\n </li>\n ))}\n </ol>\n </div>\n )}\n </article>\n </Container>\n </section>\n)}\n\n{rest.length > 0 && (\n <section aria-labelledby=\"all-collections\" class=\"pb-16 pt-12\">\n <Container>\n <h2 id=\"all-collections\" class=\"m-0 mb-4 text-[1.25rem] font-semibold tracking-tight text-foreground\">\n {featured ? 'More collections' : 'All collections'}\n </h2>\n <ul class=\"m-0 grid list-none grid-cols-1 gap-4 p-0 sm:grid-cols-2 lg:grid-cols-3\">\n {rest.map((tile) => <li class=\"m-0 p-0\"><CollectionTile tile={tile} /></li>)}\n </ul>\n </Container>\n </section>\n)}\n",
238
238
  "type": "registry:component",
239
239
  "target": "~/src/components/grove/collection-directory.astro"
240
240
  },
241
241
  {
242
242
  "path": "default/components/grove/collection-tile.astro",
243
- "content": "---\n/**\n * CollectionTile — one collection as a card: kind, title, a one-line\n * takeaway, faces of the entries inside and the review date. Used on\n * /collections/ and for \"Related collections\" on a collection page.\n * Takes a tile from `getCollectionTiles`.\n */\nimport type { CollectionTile } from '@grove-dev/astro/server';\n\ninterface Props {\n tile: CollectionTile;\n headingLevel?: 'h2' | 'h3';\n /** Small label above the title, e.g. the reader's intent. */\n label?: string;\n eventSource?: string;\n}\n\nconst { tile, headingLevel: Heading = 'h3', label, eventSource = 'collection_index' } = Astro.props;\nconst faces = tile.faces.slice(0, 5);\nconst extra = Math.max(0, tile.count - faces.length);\nconst names = tile.examples.slice(0, 2).map((e) => e.title);\nconst namesText = names.length\n ? `${names.join(', ')}${tile.count > names.length ? ` and ${tile.count - names.length} more` : ''}`\n : '';\nconst reviewedText = tile.reviewedAt\n ? new Date(tile.reviewedAt).toLocaleDateString('en', { year: 'numeric', month: 'short', day: 'numeric', timeZone: 'UTC' })\n : undefined;\n---\n\n<a\n href={tile.url}\n data-event=\"collection_card_click\"\n data-event-source={eventSource}\n data-event-item={tile.slug}\n class=\"group flex h-full min-w-0 flex-col rounded-[var(--radius-lg)] border border-border bg-card p-5 no-underline outline-none transition-[border-color,box-shadow,transform] hover:-translate-y-0.5 hover:border-ink-300 hover:shadow-md focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35 dark:hover:border-ink-700\"\n>\n <div class=\"flex items-center justify-between gap-3\">\n {tile.editorial ? (\n <span class=\"inline-flex items-center gap-1.5 rounded-full bg-emerald-500/10 px-2 py-0.5 text-2xs font-semibold text-emerald-700 dark:text-emerald-300\">\n <svg viewBox=\"0 0 16 16\" width=\"10\" height=\"10\" aria-hidden=\"true\" fill=\"currentColor\"><path d=\"M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Z\"></path></svg>\n Editor's picks\n </span>\n ) : (\n <span class=\"inline-flex items-center gap-1.5 rounded-full bg-secondary px-2 py-0.5 text-2xs font-semibold text-secondary-foreground\">\n <span class=\"h-1.5 w-1.5 rounded-full bg-success\" aria-hidden=\"true\"></span>\n Live view\n </span>\n )}\n <span class=\"text-2xs tabular-nums text-muted-foreground\">{tile.countLabel}</span>\n </div>\n\n {label && <p class=\"m-0 mt-4 text-2xs font-medium uppercase tracking-wider text-muted-foreground\">{label}</p>}\n <Heading class:list={[\"m-0 text-[1.125rem] font-semibold leading-snug tracking-tight text-foreground group-hover:underline\", label ? \"mt-1\" : \"mt-4\"]}>\n {tile.title}\n </Heading>\n {tile.takeaway && (\n <p class=\"m-0 mt-2 line-clamp-2 text-sm leading-relaxed text-muted-foreground\">{tile.takeaway}</p>\n )}\n\n <div class=\"mt-auto flex items-center gap-3 pt-5\">\n {faces.length > 0 && (\n <span class=\"flex shrink-0 -space-x-2\" aria-hidden=\"true\">\n {faces.map((face) => (\n <img src={face.avatarUrl} alt=\"\" width=\"28\" height=\"28\" loading=\"lazy\" decoding=\"async\" class=\"h-7 w-7 rounded-full border-2 border-card bg-secondary object-cover\" />\n ))}\n {extra > 0 && (\n <span class=\"inline-flex h-7 min-w-7 items-center justify-center rounded-full border-2 border-card bg-secondary px-1 text-[10px] font-semibold tabular-nums text-secondary-foreground\">+{extra}</span>\n )}\n </span>\n )}\n <span class=\"min-w-0 flex-1 truncate text-2xs text-muted-foreground\">{namesText}</span>\n </div>\n {reviewedText && (\n <p class=\"m-0 mt-3 flex items-center justify-between border-t border-border pt-3 text-2xs text-muted-foreground\">\n <span>Reviewed <time datetime={tile.reviewedAt}>{reviewedText}</time></span>\n <span aria-hidden=\"true\" class=\"transition-transform group-hover:translate-x-0.5\">→</span>\n </p>\n )}\n</a>\n",
243
+ "content": "---\n/**\n * CollectionTile — one collection as a card: kind, title, a one-line\n * takeaway, faces of the entries inside and the review date. Used on\n * /collections/ and for \"Related collections\" on a collection page.\n * Takes a tile from `getCollectionTiles`.\n */\nimport type { CollectionTile } from '@grove-dev/astro/server';\n\ninterface Props {\n tile: CollectionTile;\n headingLevel?: 'h2' | 'h3';\n /** Small label above the title, e.g. the reader's intent. */\n label?: string;\n eventSource?: string;\n}\n\nconst { tile, headingLevel: Heading = 'h3', label, eventSource = 'collection_index' } = Astro.props;\nconst faces = tile.faces.slice(0, 5);\nconst extra = Math.max(0, tile.count - faces.length);\nconst names = tile.examples.slice(0, 2).map((e) => e.title);\nconst namesText = names.length\n ? `${names.join(', ')}${tile.count > names.length ? ` and ${tile.count - names.length} more` : ''}`\n : '';\nconst reviewedText = tile.reviewedAt\n ? new Date(tile.reviewedAt).toLocaleDateString('en', {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n timeZone: 'UTC',\n })\n : undefined;\n---\n\n<a\n href={tile.url}\n data-event=\"collection_card_click\"\n data-event-source={eventSource}\n data-event-item={tile.slug}\n class=\"group flex h-full min-w-0 flex-col rounded-[var(--radius-lg)] border border-border bg-card p-5 no-underline outline-none transition-[border-color,box-shadow,transform] hover:-translate-y-0.5 hover:border-ink-300 hover:shadow-md focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35 dark:hover:border-ink-700\"\n>\n <div class=\"flex items-center justify-between gap-3\">\n {tile.editorial ? (\n <span class=\"inline-flex items-center gap-1.5 rounded-full bg-emerald-500/10 px-2 py-0.5 text-2xs font-semibold text-emerald-700 dark:text-emerald-300\">\n <svg viewBox=\"0 0 16 16\" width=\"10\" height=\"10\" aria-hidden=\"true\" fill=\"currentColor\"><path d=\"M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Z\"></path></svg>\n Editor's picks\n </span>\n ) : (\n <span class=\"inline-flex items-center gap-1.5 rounded-full bg-secondary px-2 py-0.5 text-2xs font-semibold text-secondary-foreground\">\n <span class=\"h-1.5 w-1.5 rounded-full bg-success\" aria-hidden=\"true\"></span>\n Live view\n </span>\n )}\n <span class=\"text-2xs tabular-nums text-muted-foreground\">{tile.countLabel}</span>\n </div>\n\n {label && <p class=\"m-0 mt-4 text-2xs font-medium uppercase tracking-wider text-muted-foreground\">{label}</p>}\n <Heading class:list={[\"m-0 text-[1.125rem] font-semibold leading-snug tracking-tight text-foreground group-hover:underline\", label ? \"mt-1\" : \"mt-4\"]}>\n {tile.title}\n </Heading>\n {tile.takeaway && (\n <p class=\"m-0 mt-2 line-clamp-2 text-sm leading-relaxed text-muted-foreground\">{tile.takeaway}</p>\n )}\n\n <div class=\"mt-auto flex items-center gap-3 pt-5\">\n {faces.length > 0 && (\n <span class=\"flex shrink-0 -space-x-2\" aria-hidden=\"true\">\n {faces.map((face) => (\n <img src={face.avatarUrl} alt=\"\" width=\"28\" height=\"28\" loading=\"lazy\" decoding=\"async\" class=\"h-7 w-7 rounded-full border-2 border-card bg-secondary object-cover\" />\n ))}\n {extra > 0 && (\n <span class=\"inline-flex h-7 min-w-7 items-center justify-center rounded-full border-2 border-card bg-secondary px-1 text-[10px] font-semibold tabular-nums text-secondary-foreground\">+{extra}</span>\n )}\n </span>\n )}\n <span class=\"min-w-0 flex-1 truncate text-2xs text-muted-foreground\">{namesText}</span>\n </div>\n {reviewedText && (\n <p class=\"m-0 mt-3 flex items-center justify-between border-t border-border pt-3 text-2xs text-muted-foreground\">\n <span>Reviewed <time datetime={tile.reviewedAt}>{reviewedText}</time></span>\n <span aria-hidden=\"true\" class=\"transition-transform group-hover:translate-x-0.5\">→</span>\n </p>\n )}\n</a>\n",
244
244
  "type": "registry:component",
245
245
  "target": "~/src/components/grove/collection-tile.astro"
246
246
  },
247
247
  {
248
248
  "path": "default/components/grove/entry-avatar.astro",
249
- "content": "---\n/** App icon: the record's logo or the GitHub owner's avatar, else initials. */\ninterface Props {\n src?: string;\n title: string;\n size?: 'md' | 'lg';\n}\nconst { src, title, size = 'md' } = Astro.props;\nconst box = size === 'lg' ? 'h-12 w-12 rounded-xl' : 'h-10 w-10 rounded-lg';\nconst initials = title.replace(/[^A-Za-z0-9 ]/g, '').split(/\\s+/).filter(Boolean).slice(0, 2).map((w) => w[0]).join('').toUpperCase() || title.slice(0, 2).toUpperCase();\n---\n{src ? (\n <img src={src} alt=\"\" width={size === 'lg' ? 48 : 40} height={size === 'lg' ? 48 : 40} loading=\"lazy\" decoding=\"async\" class={`${box} shrink-0 border border-border bg-background object-cover`} />\n) : (\n <span aria-hidden=\"true\" class={`${box} inline-flex shrink-0 items-center justify-center border border-border bg-secondary text-sm font-semibold text-secondary-foreground`}>{initials}</span>\n)}\n",
249
+ "content": "---\n/** App icon: the record's logo or the GitHub owner's avatar, else initials. */\ninterface Props {\n src?: string;\n title: string;\n size?: 'md' | 'lg';\n}\nconst { src, title, size = 'md' } = Astro.props;\nconst box = size === 'lg' ? 'h-12 w-12 rounded-xl' : 'h-10 w-10 rounded-lg';\nconst initials =\n title\n .replace(/[^A-Za-z0-9 ]/g, '')\n .split(/\\s+/)\n .filter(Boolean)\n .slice(0, 2)\n .map((w) => w[0])\n .join('')\n .toUpperCase() || title.slice(0, 2).toUpperCase();\n---\n{src ? (\n <img src={src} alt=\"\" width={size === 'lg' ? 48 : 40} height={size === 'lg' ? 48 : 40} loading=\"lazy\" decoding=\"async\" class={`${box} shrink-0 border border-border bg-background object-cover`} />\n) : (\n <span aria-hidden=\"true\" class={`${box} inline-flex shrink-0 items-center justify-center border border-border bg-secondary text-sm font-semibold text-secondary-foreground`}>{initials}</span>\n)}\n",
250
250
  "type": "registry:component",
251
251
  "target": "~/src/components/grove/entry-avatar.astro"
252
252
  },
@@ -258,7 +258,7 @@
258
258
  },
259
259
  {
260
260
  "path": "default/components/grove/entry-metrics.astro",
261
- "content": "---\n/** Stars · last push · licence, with icons. Renders nothing when all are missing. */\nimport { formatRelative, formatStars, isDetectedLicense, licenseDisplay } from '@grove-dev/core';\n\ninterface Props {\n stars?: number;\n pushedAt?: string;\n /** SPDX id or a display label; placeholders are dropped. */\n license?: string;\n /** Top border, for the foot of a card. */\n bordered?: boolean;\n}\nconst { stars, pushedAt, bordered = false } = Astro.props;\n// GitHub's placeholders (NOASSERTION, OTHER…) say nothing useful here.\nconst license = isDetectedLicense(Astro.props.license) ? licenseDisplay(Astro.props.license) : undefined;\nconst starsText = typeof stars === 'number' && stars > 0 ? formatStars(stars) : undefined;\nconst pushedText = pushedAt ? formatRelative(pushedAt) : undefined;\n---\n{(starsText || pushedText || license) && (\n <p class:list={[\"m-0 mt-1.5 flex flex-wrap items-center gap-x-4 gap-y-1 text-2xs text-muted-foreground\", bordered && \"border-t border-border pt-3\"]}>\n {starsText && (\n <span class=\"inline-flex items-center gap-1 tabular-nums\" title={`${stars?.toLocaleString('en')} GitHub stars`}>\n <svg viewBox=\"0 0 16 16\" width=\"12\" height=\"12\" aria-hidden=\"true\" fill=\"currentColor\" class=\"text-warning\"><path d=\"M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Z\"></path></svg>\n {starsText}<span class=\"sr-only\"> stars</span>\n </span>\n )}\n {pushedText && (\n <span class=\"inline-flex items-center gap-1\" title=\"Last push to the repository\">\n <svg viewBox=\"0 0 16 16\" width=\"12\" height=\"12\" aria-hidden=\"true\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"><circle cx=\"8\" cy=\"8\" r=\"6.25\"></circle><path d=\"M8 4.75V8l2.25 1.5\"></path></svg>\n <span><span class=\"sr-only\">Last commit </span>{pushedText}</span>\n </span>\n )}\n {license && (\n <span class=\"inline-flex items-center gap-1\">\n <svg viewBox=\"0 0 16 16\" width=\"12\" height=\"12\" aria-hidden=\"true\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M8 1.75v12.5M3.25 4.25h9.5M4.75 4.25 2.5 9a2.25 2.25 0 0 0 4.5 0L4.75 4.25ZM11.25 4.25 9 9a2.25 2.25 0 0 0 4.5 0l-2.25-4.75ZM5.5 14.25h5\"></path></svg>\n {license}\n </span>\n )}\n </p>\n)}\n",
261
+ "content": "---\n/** Stars · last push · licence, with icons. Renders nothing when all are missing. */\nimport { formatRelative, formatStars, isDetectedLicense, licenseDisplay } from '@grove-dev/core';\n\ninterface Props {\n stars?: number;\n pushedAt?: string;\n /** SPDX id or a display label; placeholders are dropped. */\n license?: string;\n /** Top border, for the foot of a card. */\n bordered?: boolean;\n}\nconst { stars, pushedAt, bordered = false } = Astro.props;\n// GitHub's placeholders (NOASSERTION, OTHER…) say nothing useful here.\nconst license = isDetectedLicense(Astro.props.license)\n ? licenseDisplay(Astro.props.license)\n : undefined;\nconst starsText = typeof stars === 'number' && stars > 0 ? formatStars(stars) : undefined;\nconst pushedText = pushedAt ? formatRelative(pushedAt) : undefined;\n---\n{(starsText || pushedText || license) && (\n <p class:list={[\"m-0 mt-1.5 flex flex-wrap items-center gap-x-4 gap-y-1 text-2xs text-muted-foreground\", bordered && \"border-t border-border pt-3\"]}>\n {starsText && (\n <span class=\"inline-flex items-center gap-1 tabular-nums\" title={`${stars?.toLocaleString('en')} GitHub stars`}>\n <svg viewBox=\"0 0 16 16\" width=\"12\" height=\"12\" aria-hidden=\"true\" fill=\"currentColor\" class=\"text-warning\"><path d=\"M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Z\"></path></svg>\n {starsText}<span class=\"sr-only\"> stars</span>\n </span>\n )}\n {pushedText && (\n <span class=\"inline-flex items-center gap-1\" title=\"Last push to the repository\">\n <svg viewBox=\"0 0 16 16\" width=\"12\" height=\"12\" aria-hidden=\"true\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"><circle cx=\"8\" cy=\"8\" r=\"6.25\"></circle><path d=\"M8 4.75V8l2.25 1.5\"></path></svg>\n <span><span class=\"sr-only\">Last commit </span>{pushedText}</span>\n </span>\n )}\n {license && (\n <span class=\"inline-flex items-center gap-1\">\n <svg viewBox=\"0 0 16 16\" width=\"12\" height=\"12\" aria-hidden=\"true\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M8 1.75v12.5M3.25 4.25h9.5M4.75 4.25 2.5 9a2.25 2.25 0 0 0 4.5 0L4.75 4.25ZM11.25 4.25 9 9a2.25 2.25 0 0 0 4.5 0l-2.25-4.75ZM5.5 14.25h5\"></path></svg>\n {license}\n </span>\n )}\n </p>\n)}\n",
262
262
  "type": "registry:component",
263
263
  "target": "~/src/components/grove/entry-metrics.astro"
264
264
  },
@@ -312,7 +312,7 @@
312
312
  },
313
313
  {
314
314
  "path": "default/components/grove/hero-proof.astro",
315
- "content": "---\n/**\n * HeroProof — the proof row under the home hero, and the \"featured in\"\n * pill for its eyebrow.\n *\n * `variant=\"pill\"` renders the newest `site.press` mention as a link\n * for the hero's `eyebrow` slot. `variant=\"row\"` renders contributor\n * faces and count, the site repository's stars and the newest mention.\n * Every value comes from site-config.json; parts with no data are left\n * out, so a new site shows nothing rather than zeros.\n */\nimport siteConfig from '@grove/generated/site-config.json';\nimport { compact } from '@grove-dev/core';\n\ninterface Props {\n variant: 'pill' | 'row';\n /** Contributors for the faces (the home model's `contributors`). */\n contributors?: Array<{ username: string; avatarUrl?: string }>;\n slot?: string;\n}\n\nconst { variant, contributors = [] } = Astro.props;\ntype Press = { outlet: string; title: string; url: string; date: string; label?: string; logo?: string };\nconst site = siteConfig as {\n press?: Press[];\n repoUrl?: string;\n stats?: { repositoryStars?: number; repositoryContributors?: number };\n};\nconst featured = site.press?.[0];\nconst stars = site.stats?.repositoryStars ?? 0;\nconst people = site.stats?.repositoryContributors || contributors.length;\nconst faces = contributors.filter((c) => c.avatarUrl).slice(0, 5);\nconst monthYear = (date: string) =>\n new Date(`${date}-01T00:00:00Z`).toLocaleDateString('en-US', { month: 'long', year: 'numeric', timeZone: 'UTC' });\n---\n\n{variant === 'pill' ? (\n featured && (\n <a\n href={featured.url}\n target=\"_blank\"\n rel=\"noopener\"\n class=\"group inline-flex items-center gap-2 rounded-full border border-border bg-secondary py-1 pl-1.5 pr-3 text-[13px] font-medium text-secondary-foreground no-underline transition-colors hover:border-ink-400 dark:hover:border-ink-600\"\n data-event=\"press_click\"\n data-event-source=\"hero_eyebrow\"\n data-event-item={featured.outlet}\n >\n {featured.logo ? (\n <span class=\"inline-flex h-5 w-5 items-center justify-center rounded-full bg-white p-0.5\"><img src={featured.logo} alt=\"\" width=\"14\" height=\"14\" class=\"h-3.5 w-3.5\" /></span>\n ) : (\n <span aria-hidden=\"true\" class=\"inline-block h-1.5 w-1.5 rounded-full bg-success\"></span>\n )}\n {featured.label ?? `Featured in ${featured.outlet} · ${monthYear(featured.date)}`}\n <span aria-hidden=\"true\" class=\"text-muted-foreground transition-transform group-hover:translate-x-0.5\">→</span>\n </a>\n )\n) : (\n (faces.length > 0 || stars > 0 || featured) && (\n <div class=\"mt-8 flex flex-wrap items-center justify-center gap-x-6 gap-y-3 text-[13px] text-ink-500 dark:text-ink-400\">\n {faces.length > 0 && (\n <a href=\"/contributors/\" class=\"inline-flex items-center gap-2.5 text-inherit no-underline hover:text-foreground\">\n <span class=\"flex -space-x-2\" aria-hidden=\"true\">\n {faces.map((c) => (\n <img src={`${c.avatarUrl}${c.avatarUrl!.includes('?') ? '&' : '?'}s=48`} alt=\"\" width=\"24\" height=\"24\" loading=\"lazy\" decoding=\"async\" class=\"h-6 w-6 rounded-full border-2 border-background\" />\n ))}\n </span>\n <span><strong class=\"font-semibold text-foreground\">{people}</strong> contributors</span>\n </a>\n )}\n {stars > 0 && site.repoUrl && (\n <a href={site.repoUrl} target=\"_blank\" rel=\"noopener\" class=\"inline-flex items-center gap-1.5 text-inherit no-underline hover:text-foreground\">\n <svg viewBox=\"0 0 16 16\" width=\"13\" height=\"13\" aria-hidden=\"true\" fill=\"currentColor\" class=\"text-warning\"><path d=\"M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Z\"></path></svg>\n <span><strong class=\"font-semibold text-foreground\">{compact(stars)}</strong> stars on GitHub</span>\n </a>\n )}\n {featured && (\n <a href={featured.url} target=\"_blank\" rel=\"noopener\" class=\"inline-flex items-center gap-1.5 text-inherit no-underline hover:text-foreground\" data-event=\"press_click\" data-event-source=\"hero_proof\" data-event-item={featured.outlet}>\n {featured.logo && <span class=\"inline-flex h-4 w-4 items-center justify-center rounded-full bg-white p-px\"><img src={featured.logo} alt=\"\" width=\"12\" height=\"12\" class=\"h-3 w-3\" /></span>}\n <span>Featured by <strong class=\"font-semibold text-foreground\">{featured.outlet}</strong></span>\n </a>\n )}\n </div>\n )\n)}\n",
315
+ "content": "---\n/**\n * HeroProof — the proof row under the home hero, and the \"featured in\"\n * pill for its eyebrow.\n *\n * `variant=\"pill\"` renders the newest `site.press` mention as a link\n * for the hero's `eyebrow` slot. `variant=\"row\"` renders contributor\n * faces and count, the site repository's stars and the newest mention.\n * Every value comes from site-config.json; parts with no data are left\n * out, so a new site shows nothing rather than zeros.\n */\nimport siteConfig from '@grove/generated/site-config.json';\nimport { compact } from '@grove-dev/core';\n\ninterface Props {\n variant: 'pill' | 'row';\n /** Contributors for the faces (the home model's `contributors`). */\n contributors?: Array<{ username: string; avatarUrl?: string }>;\n slot?: string;\n}\n\nconst { variant, contributors = [] } = Astro.props;\ntype Press = {\n outlet: string;\n title: string;\n url: string;\n date: string;\n label?: string;\n logo?: string;\n};\nconst site = siteConfig as {\n press?: Press[];\n repoUrl?: string;\n stats?: { repositoryStars?: number; repositoryContributors?: number };\n};\nconst featured = site.press?.[0];\nconst stars = site.stats?.repositoryStars ?? 0;\nconst people = site.stats?.repositoryContributors || contributors.length;\nconst faces = contributors.filter((c) => c.avatarUrl).slice(0, 5);\nconst monthYear = (date: string) =>\n new Date(`${date}-01T00:00:00Z`).toLocaleDateString('en-US', {\n month: 'long',\n year: 'numeric',\n timeZone: 'UTC',\n });\n---\n\n{variant === 'pill' ? (\n featured && (\n <a\n href={featured.url}\n target=\"_blank\"\n rel=\"noopener\"\n class=\"group inline-flex items-center gap-2 rounded-full border border-border bg-secondary py-1 pl-1.5 pr-3 text-[13px] font-medium text-secondary-foreground no-underline transition-colors hover:border-ink-400 dark:hover:border-ink-600\"\n data-event=\"press_click\"\n data-event-source=\"hero_eyebrow\"\n data-event-item={featured.outlet}\n >\n {featured.logo ? (\n <span class=\"inline-flex h-5 w-5 items-center justify-center rounded-full bg-white p-0.5\"><img src={featured.logo} alt=\"\" width=\"14\" height=\"14\" class=\"h-3.5 w-3.5\" /></span>\n ) : (\n <span aria-hidden=\"true\" class=\"inline-block h-1.5 w-1.5 rounded-full bg-success\"></span>\n )}\n {featured.label ?? `Featured in ${featured.outlet} · ${monthYear(featured.date)}`}\n <span aria-hidden=\"true\" class=\"text-muted-foreground transition-transform group-hover:translate-x-0.5\">→</span>\n </a>\n )\n) : (\n (faces.length > 0 || stars > 0 || featured) && (\n <div class=\"mt-8 flex flex-wrap items-center justify-center gap-x-6 gap-y-3 text-[13px] text-ink-500 dark:text-ink-400\">\n {faces.length > 0 && (\n <a href=\"/contributors/\" class=\"inline-flex items-center gap-2.5 text-inherit no-underline hover:text-foreground\">\n <span class=\"flex -space-x-2\" aria-hidden=\"true\">\n {faces.map((c) => (\n <img src={`${c.avatarUrl}${c.avatarUrl!.includes('?') ? '&' : '?'}s=48`} alt=\"\" width=\"24\" height=\"24\" loading=\"lazy\" decoding=\"async\" class=\"h-6 w-6 rounded-full border-2 border-background\" />\n ))}\n </span>\n <span><strong class=\"font-semibold text-foreground\">{people}</strong> contributors</span>\n </a>\n )}\n {stars > 0 && site.repoUrl && (\n <a href={site.repoUrl} target=\"_blank\" rel=\"noopener\" class=\"inline-flex items-center gap-1.5 text-inherit no-underline hover:text-foreground\">\n <svg viewBox=\"0 0 16 16\" width=\"13\" height=\"13\" aria-hidden=\"true\" fill=\"currentColor\" class=\"text-warning\"><path d=\"M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Z\"></path></svg>\n <span><strong class=\"font-semibold text-foreground\">{compact(stars)}</strong> stars on GitHub</span>\n </a>\n )}\n {featured && (\n <a href={featured.url} target=\"_blank\" rel=\"noopener\" class=\"inline-flex items-center gap-1.5 text-inherit no-underline hover:text-foreground\" data-event=\"press_click\" data-event-source=\"hero_proof\" data-event-item={featured.outlet}>\n {featured.logo && <span class=\"inline-flex h-4 w-4 items-center justify-center rounded-full bg-white p-px\"><img src={featured.logo} alt=\"\" width=\"12\" height=\"12\" class=\"h-3 w-3\" /></span>}\n <span>Featured by <strong class=\"font-semibold text-foreground\">{featured.outlet}</strong></span>\n </a>\n )}\n </div>\n )\n)}\n",
316
316
  "type": "registry:component",
317
317
  "target": "~/src/components/grove/hero-proof.astro"
318
318
  },
@@ -408,13 +408,13 @@
408
408
  },
409
409
  {
410
410
  "path": "default/components/grove/record-header.astro",
411
- "content": "---\n/**\n * RecordHeader.astro\n *\n * Compact project-identity header used at the top of every record\n * detail page. The header carries:\n * - avatar / initials\n * - pills row (category + curation labels + \"Curated\" check +\n * optional activity badge)\n * - record name + owner/repo line\n * - short description\n * - GitHub + Homepage CTAs\n *\n * Tags + activity metadata are surfaced separately (sidebar), so\n * the header stays narrow on mobile and doesn't compete with the\n * two-column layout below.\n *\n * Tone classes for the activity badge are static `[data-activity-tone]`\n * selectors in `styles.css` — Tailwind purges any classes built from\n * dynamic strings, so the package ships the rules statically and\n * the badge's `data-activity-tone` attribute picks one at runtime.\n */\nimport siteConfig from '@grove/generated/site-config.json';\nimport type { RecordDetailModel } from '@grove-dev/astro/server';\nimport { withRef } from '@grove-dev/core';\nimport { buttonClass } from '../../lib/classnames.ts';\n\ninterface Props {\n detail: RecordDetailModel;\n}\n\nconst { detail } = Astro.props;\nconst {\n record,\n repoUrl,\n homepageUrl,\n ownerRepo,\n avatarSrc,\n initials,\n curationLabels,\n activityBadge,\n summary,\n sourceDescription,\n screenshots,\n category,\n name,\n} = detail;\n// Links to the record's own site carry `ref=<site host>`; see `outbound`\n// in grove.config.ts.\nconst outbound = (siteConfig as { outbound?: { ref?: string | false; skipHosts?: string[] } }).outbound ?? {};\nconst homepageHref = withRef(homepageUrl, outbound);\nconst submittedBy = (record as { submittedBy?: string }).submittedBy;\n---\n\n<header class=\"mb-8\">\n {/* Identity row: logo sized to the name+repo block beside it — no\n tall avatar column leaving dead space under the logo. Pills sit\n at the row's right edge on wide viewports and wrap below on\n mobile. */}\n <div class=\"flex items-center gap-4\">\n {/* Initials stay in the DOM behind the logo and are revealed by the\n image's own `onerror` — a dead logo URL or a renamed GitHub org\n would otherwise render the broken-image glyph. */}\n {avatarSrc && (\n <img\n src={avatarSrc}\n alt=\"\"\n width=\"56\"\n height=\"56\"\n loading=\"lazy\"\n decoding=\"async\"\n onerror=\"this.hidden=true;this.nextElementSibling.hidden=false\"\n class=\"h-12 w-12 shrink-0 rounded-lg border border-ink-200 object-contain bg-white p-1 dark:border-ink-800 sm:h-14 sm:w-14\"\n />\n )}\n <span\n aria-hidden=\"true\"\n hidden={Boolean(avatarSrc)}\n data-grove-card-fallback-initials\n class=\"inline-flex h-12 w-12 shrink-0 items-center justify-center rounded-lg border border-ink-200 bg-ink-50 text-xl font-semibold text-ink-700 dark:border-ink-800 dark:bg-ink-900 dark:text-ink-200 sm:h-14 sm:w-14\"\n >\n {initials || \"·\"}\n </span>\n\n <div class=\"min-w-0 flex-1\">\n <h1 class=\"m-0 text-[1.75rem] font-semibold leading-tight tracking-tight text-ink-900 dark:text-ink-100 sm:text-[2rem]\">\n {name}\n </h1>\n {ownerRepo && (\n <p class=\"m-0 mt-0.5 text-sm text-ink-500 dark:text-ink-400\">\n <a\n href={`https://github.com/${ownerRepo.owner}`}\n target=\"_blank\"\n rel=\"noopener\"\n class=\"text-inherit no-underline hover:text-ink-900 dark:hover:text-ink-100\"\n >\n @{ownerRepo.owner}\n </a>\n <span class=\"mx-1 text-ink-300 dark:text-ink-700\">/</span>\n <a\n href={repoUrl}\n target=\"_blank\"\n rel=\"noopener\"\n class=\"text-inherit no-underline hover:text-ink-900 dark:hover:text-ink-100\"\n >\n {ownerRepo.repo}\n </a>\n </p>\n )}\n </div>\n\n {/* Pills — right-aligned beside the name on wide viewports. */}\n <div class=\"hidden shrink-0 flex-wrap items-center justify-end gap-1.5 md:flex\">\n {category && (\n <span class=\"rounded-full border border-ink-200 px-2 py-0.5 text-2xs font-medium text-ink-700 dark:border-ink-800 dark:text-ink-300\">\n {category}\n </span>\n )}\n {curationLabels.map((l) => (\n <span class=\"rounded-full bg-secondary px-2 py-0.5 text-2xs font-medium text-secondary-foreground\">\n {l}\n </span>\n ))}\n {submittedBy && (\n <a\n href={`/contributors/#${submittedBy.toLowerCase()}`}\n class=\"inline-flex items-center gap-1.5 rounded-full border border-border py-0.5 pl-0.5 pr-2 text-2xs font-medium text-ink-700 no-underline hover:border-ink-400 dark:text-ink-300\"\n title={`Submitted by @${submittedBy}`}\n data-submitted-by={submittedBy}\n >\n <img src={`https://github.com/${submittedBy}.png?size=32`} alt=\"\" width=\"16\" height=\"16\" loading=\"lazy\" decoding=\"async\" class=\"h-4 w-4 rounded-full\" />\n Submitted by @{submittedBy}\n </a>\n )}\n {/* Curated = reviewed provenance, not a success status. */}\n {record.curation?.reviewed && (\n <span class=\"inline-flex items-center gap-1 rounded-full border border-border bg-secondary px-2 py-0.5 text-2xs font-medium text-secondary-foreground\">\n <svg viewBox=\"0 0 16 16\" width=\"10\" height=\"10\" aria-hidden=\"true\" fill=\"currentColor\">\n <path d=\"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0Zm3.41 5.09a.75.75 0 0 0-1.06 0L6.75 8.69 5.65 7.59a.75.75 0 1 0-1.06 1.06l1.65 1.65a.75.75 0 0 0 1.06 0l4.11-4.11a.75.75 0 0 0 0-1.06Z\" />\n </svg>\n Curated\n </span>\n )}\n {activityBadge && (\n <span\n data-activity-tone={activityBadge.tone}\n class=\"grove-pill grove-pill--activity inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-2xs font-medium\"\n >\n <span class=\"relative flex h-1.5 w-1.5\">\n <span class=\"absolute inline-flex h-full w-full animate-ping rounded-full bg-current opacity-60\"></span>\n <span class=\"relative inline-flex h-1.5 w-1.5 rounded-full bg-current\"></span>\n </span>\n {activityBadge.label}\n </span>\n )}\n </div>\n </div>\n\n {/* Same pills below the identity row on narrow viewports. */}\n <div class=\"mt-3 flex flex-wrap items-center gap-1.5 md:hidden\">\n {category && (\n <span class=\"rounded-full border border-ink-200 px-2 py-0.5 text-2xs font-medium text-ink-700 dark:border-ink-800 dark:text-ink-300\">\n {category}\n </span>\n )}\n {curationLabels.map((l) => (\n <span class=\"rounded-full bg-secondary px-2 py-0.5 text-2xs font-medium text-secondary-foreground\">\n {l}\n </span>\n ))}\n {submittedBy && (\n <a\n href={`/contributors/#${submittedBy.toLowerCase()}`}\n class=\"inline-flex items-center gap-1.5 rounded-full border border-border py-0.5 pl-0.5 pr-2 text-2xs font-medium text-ink-700 no-underline hover:border-ink-400 dark:text-ink-300\"\n title={`Submitted by @${submittedBy}`}\n data-submitted-by={submittedBy}\n >\n <img src={`https://github.com/${submittedBy}.png?size=32`} alt=\"\" width=\"16\" height=\"16\" loading=\"lazy\" decoding=\"async\" class=\"h-4 w-4 rounded-full\" />\n Submitted by @{submittedBy}\n </a>\n )}\n {record.curation?.reviewed && (\n <span class=\"inline-flex items-center gap-1 rounded-full border border-border bg-secondary px-2 py-0.5 text-2xs font-medium text-secondary-foreground\">\n <svg viewBox=\"0 0 16 16\" width=\"10\" height=\"10\" aria-hidden=\"true\" fill=\"currentColor\">\n <path d=\"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0Zm3.41 5.09a.75.75 0 0 0-1.06 0L6.75 8.69 5.65 7.59a.75.75 0 1 0-1.06 1.06l1.65 1.65a.75.75 0 0 0 1.06 0l4.11-4.11a.75.75 0 0 0 0-1.06Z\" />\n </svg>\n Curated\n </span>\n )}\n </div>\n\n {/* Description — full width below the identity row. */}\n {summary && (\n <p class=\"m-0 mt-4 max-w-[72ch] text-base leading-relaxed text-ink-700 dark:text-ink-200\">\n {summary}\n </p>\n )}\n {sourceDescription && sourceDescription !== summary && (\n <p class=\"m-0 mt-2 max-w-[72ch] text-sm leading-relaxed text-ink-500 dark:text-ink-400\">\n <span class=\"text-2xs font-semibold uppercase tracking-wider\">From the project's README: </span>\n {sourceDescription}\n </p>\n )}\n\n {/* CTA row — primary actions only. */}\n <div class=\"mt-4 flex flex-wrap items-center gap-2\">\n {repoUrl && (\n <a\n href={repoUrl}\n target=\"_blank\"\n rel=\"noopener\"\n class={buttonClass(\"primary\", \"sm\")}\n data-event=\"external_repo_click\"\n data-event-source=\"record_header\"\n data-event-item={record.slug}\n >\n View on GitHub →\n </a>\n )}\n {homepageUrl && (\n <a\n href={homepageHref}\n target=\"_blank\"\n rel=\"noopener\"\n class={buttonClass(\"secondary\", \"sm\")}\n data-event=\"homepage_click\"\n data-event-source=\"record_header\"\n data-event-item={record.slug}\n >\n Homepage\n </a>\n )}\n </div>\n {screenshots && screenshots.length > 0 && (\n <div class=\"mt-6 grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3\" aria-label=\"Screenshots\">\n {screenshots.map((shot) => (\n <figure class=\"m-0 overflow-hidden rounded-[var(--radius-lg)] border border-ink-200 bg-muted dark:border-ink-800\">\n <img\n src={shot.src}\n alt={shot.alt}\n loading=\"lazy\"\n decoding=\"async\"\n width={shot.width}\n height={shot.height}\n class=\"block h-auto w-full object-cover\"\n />\n {shot.source && (\n <figcaption class=\"px-3 py-1.5 text-2xs text-ink-500 dark:text-ink-400\">\n Source: <a href={shot.source} target=\"_blank\" rel=\"noopener\" class=\"text-inherit no-underline hover:underline\">{shot.source.replace(/^https?:\\/\\//, \"\")}</a>\n </figcaption>\n )}\n </figure>\n ))}\n </div>\n )}\n</header>",
411
+ "content": "---\n/**\n * RecordHeader.astro\n *\n * Compact project-identity header used at the top of every record\n * detail page. The header carries:\n * - avatar / initials\n * - pills row (category + curation labels + \"Curated\" check +\n * optional activity badge)\n * - record name + owner/repo line\n * - short description\n * - GitHub + Homepage CTAs\n *\n * Tags + activity metadata are surfaced separately (sidebar), so\n * the header stays narrow on mobile and doesn't compete with the\n * two-column layout below.\n *\n * Tone classes for the activity badge are static `[data-activity-tone]`\n * selectors in `styles.css` — Tailwind purges any classes built from\n * dynamic strings, so the package ships the rules statically and\n * the badge's `data-activity-tone` attribute picks one at runtime.\n */\nimport siteConfig from '@grove/generated/site-config.json';\nimport type { RecordDetailModel } from '@grove-dev/astro/server';\nimport { withRef } from '@grove-dev/core';\nimport { buttonClass } from '../../lib/classnames.ts';\n\ninterface Props {\n detail: RecordDetailModel;\n}\n\nconst { detail } = Astro.props;\nconst {\n record,\n repoUrl,\n homepageUrl,\n ownerRepo,\n avatarSrc,\n initials,\n curationLabels,\n activityBadge,\n summary,\n sourceDescription,\n screenshots,\n category,\n name,\n} = detail;\n// Links to the record's own site carry `ref=<site host>`; see `outbound`\n// in grove.config.ts.\nconst outbound =\n (siteConfig as { outbound?: { ref?: string | false; skipHosts?: string[] } }).outbound ?? {};\nconst homepageHref = withRef(homepageUrl, outbound);\nconst submittedBy = (record as { submittedBy?: string }).submittedBy;\n---\n\n<header class=\"mb-8\">\n {/* Identity row: logo sized to the name+repo block beside it — no\n tall avatar column leaving dead space under the logo. Pills sit\n at the row's right edge on wide viewports and wrap below on\n mobile. */}\n <div class=\"flex items-center gap-4\">\n {/* Initials stay in the DOM behind the logo and are revealed by the\n image's own `onerror` — a dead logo URL or a renamed GitHub org\n would otherwise render the broken-image glyph. */}\n {avatarSrc && (\n <img\n src={avatarSrc}\n alt=\"\"\n width=\"56\"\n height=\"56\"\n loading=\"lazy\"\n decoding=\"async\"\n onerror=\"this.hidden=true;this.nextElementSibling.hidden=false\"\n class=\"h-12 w-12 shrink-0 rounded-lg border border-ink-200 object-contain bg-white p-1 dark:border-ink-800 sm:h-14 sm:w-14\"\n />\n )}\n <span\n aria-hidden=\"true\"\n hidden={Boolean(avatarSrc)}\n data-grove-card-fallback-initials\n class=\"inline-flex h-12 w-12 shrink-0 items-center justify-center rounded-lg border border-ink-200 bg-ink-50 text-xl font-semibold text-ink-700 dark:border-ink-800 dark:bg-ink-900 dark:text-ink-200 sm:h-14 sm:w-14\"\n >\n {initials || \"·\"}\n </span>\n\n <div class=\"min-w-0 flex-1\">\n <h1 class=\"m-0 text-[1.75rem] font-semibold leading-tight tracking-tight text-ink-900 dark:text-ink-100 sm:text-[2rem]\">\n {name}\n </h1>\n {ownerRepo && (\n <p class=\"m-0 mt-0.5 text-sm text-ink-500 dark:text-ink-400\">\n <a\n href={`https://github.com/${ownerRepo.owner}`}\n target=\"_blank\"\n rel=\"noopener\"\n class=\"text-inherit no-underline hover:text-ink-900 dark:hover:text-ink-100\"\n >\n @{ownerRepo.owner}\n </a>\n <span class=\"mx-1 text-ink-300 dark:text-ink-700\">/</span>\n <a\n href={repoUrl}\n target=\"_blank\"\n rel=\"noopener\"\n class=\"text-inherit no-underline hover:text-ink-900 dark:hover:text-ink-100\"\n >\n {ownerRepo.repo}\n </a>\n </p>\n )}\n </div>\n\n {/* Pills — right-aligned beside the name on wide viewports. */}\n <div class=\"hidden shrink-0 flex-wrap items-center justify-end gap-1.5 md:flex\">\n {category && (\n <span class=\"rounded-full border border-ink-200 px-2 py-0.5 text-2xs font-medium text-ink-700 dark:border-ink-800 dark:text-ink-300\">\n {category}\n </span>\n )}\n {curationLabels.map((l) => (\n <span class=\"rounded-full bg-secondary px-2 py-0.5 text-2xs font-medium text-secondary-foreground\">\n {l}\n </span>\n ))}\n {submittedBy && (\n <a\n href={`/contributors/#${submittedBy.toLowerCase()}`}\n class=\"inline-flex items-center gap-1.5 rounded-full border border-border py-0.5 pl-0.5 pr-2 text-2xs font-medium text-ink-700 no-underline hover:border-ink-400 dark:text-ink-300\"\n title={`Submitted by @${submittedBy}`}\n data-submitted-by={submittedBy}\n >\n <img src={`https://github.com/${submittedBy}.png?size=32`} alt=\"\" width=\"16\" height=\"16\" loading=\"lazy\" decoding=\"async\" class=\"h-4 w-4 rounded-full\" />\n Submitted by @{submittedBy}\n </a>\n )}\n {/* Curated = reviewed provenance, not a success status. */}\n {record.curation?.reviewed && (\n <span class=\"inline-flex items-center gap-1 rounded-full border border-border bg-secondary px-2 py-0.5 text-2xs font-medium text-secondary-foreground\">\n <svg viewBox=\"0 0 16 16\" width=\"10\" height=\"10\" aria-hidden=\"true\" fill=\"currentColor\">\n <path d=\"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0Zm3.41 5.09a.75.75 0 0 0-1.06 0L6.75 8.69 5.65 7.59a.75.75 0 1 0-1.06 1.06l1.65 1.65a.75.75 0 0 0 1.06 0l4.11-4.11a.75.75 0 0 0 0-1.06Z\" />\n </svg>\n Curated\n </span>\n )}\n {activityBadge && (\n <span\n data-activity-tone={activityBadge.tone}\n class=\"grove-pill grove-pill--activity inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-2xs font-medium\"\n >\n <span class=\"relative flex h-1.5 w-1.5\">\n <span class=\"absolute inline-flex h-full w-full animate-ping rounded-full bg-current opacity-60\"></span>\n <span class=\"relative inline-flex h-1.5 w-1.5 rounded-full bg-current\"></span>\n </span>\n {activityBadge.label}\n </span>\n )}\n </div>\n </div>\n\n {/* Same pills below the identity row on narrow viewports. */}\n <div class=\"mt-3 flex flex-wrap items-center gap-1.5 md:hidden\">\n {category && (\n <span class=\"rounded-full border border-ink-200 px-2 py-0.5 text-2xs font-medium text-ink-700 dark:border-ink-800 dark:text-ink-300\">\n {category}\n </span>\n )}\n {curationLabels.map((l) => (\n <span class=\"rounded-full bg-secondary px-2 py-0.5 text-2xs font-medium text-secondary-foreground\">\n {l}\n </span>\n ))}\n {submittedBy && (\n <a\n href={`/contributors/#${submittedBy.toLowerCase()}`}\n class=\"inline-flex items-center gap-1.5 rounded-full border border-border py-0.5 pl-0.5 pr-2 text-2xs font-medium text-ink-700 no-underline hover:border-ink-400 dark:text-ink-300\"\n title={`Submitted by @${submittedBy}`}\n data-submitted-by={submittedBy}\n >\n <img src={`https://github.com/${submittedBy}.png?size=32`} alt=\"\" width=\"16\" height=\"16\" loading=\"lazy\" decoding=\"async\" class=\"h-4 w-4 rounded-full\" />\n Submitted by @{submittedBy}\n </a>\n )}\n {record.curation?.reviewed && (\n <span class=\"inline-flex items-center gap-1 rounded-full border border-border bg-secondary px-2 py-0.5 text-2xs font-medium text-secondary-foreground\">\n <svg viewBox=\"0 0 16 16\" width=\"10\" height=\"10\" aria-hidden=\"true\" fill=\"currentColor\">\n <path d=\"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0Zm3.41 5.09a.75.75 0 0 0-1.06 0L6.75 8.69 5.65 7.59a.75.75 0 1 0-1.06 1.06l1.65 1.65a.75.75 0 0 0 1.06 0l4.11-4.11a.75.75 0 0 0 0-1.06Z\" />\n </svg>\n Curated\n </span>\n )}\n </div>\n\n {/* Description — full width below the identity row. */}\n {summary && (\n <p class=\"m-0 mt-4 max-w-[72ch] text-base leading-relaxed text-ink-700 dark:text-ink-200\">\n {summary}\n </p>\n )}\n {sourceDescription && sourceDescription !== summary && (\n <p class=\"m-0 mt-2 max-w-[72ch] text-sm leading-relaxed text-ink-500 dark:text-ink-400\">\n <span class=\"text-2xs font-semibold uppercase tracking-wider\">From the project's README: </span>\n {sourceDescription}\n </p>\n )}\n\n {/* CTA row — primary actions only. */}\n <div class=\"mt-4 flex flex-wrap items-center gap-2\">\n {repoUrl && (\n <a\n href={repoUrl}\n target=\"_blank\"\n rel=\"noopener\"\n class={buttonClass(\"primary\", \"sm\")}\n data-event=\"external_repo_click\"\n data-event-source=\"record_header\"\n data-event-item={record.slug}\n >\n View on GitHub →\n </a>\n )}\n {homepageUrl && (\n <a\n href={homepageHref}\n target=\"_blank\"\n rel=\"noopener\"\n class={buttonClass(\"secondary\", \"sm\")}\n data-event=\"homepage_click\"\n data-event-source=\"record_header\"\n data-event-item={record.slug}\n >\n Homepage\n </a>\n )}\n </div>\n {screenshots && screenshots.length > 0 && (\n <div class=\"mt-6 grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3\" aria-label=\"Screenshots\">\n {screenshots.map((shot) => (\n <figure class=\"m-0 overflow-hidden rounded-[var(--radius-lg)] border border-ink-200 bg-muted dark:border-ink-800\">\n <img\n src={shot.src}\n alt={shot.alt}\n loading=\"lazy\"\n decoding=\"async\"\n width={shot.width}\n height={shot.height}\n class=\"block h-auto w-full object-cover\"\n />\n {shot.source && (\n <figcaption class=\"px-3 py-1.5 text-2xs text-ink-500 dark:text-ink-400\">\n Source: <a href={shot.source} target=\"_blank\" rel=\"noopener\" class=\"text-inherit no-underline hover:underline\">{shot.source.replace(/^https?:\\/\\//, \"\")}</a>\n </figcaption>\n )}\n </figure>\n ))}\n </div>\n )}\n</header>",
412
412
  "type": "registry:component",
413
413
  "target": "~/src/components/grove/record-header.astro"
414
414
  },
415
415
  {
416
416
  "path": "default/components/grove/record-sidebar.astro",
417
- "content": "---\nimport siteConfig from '@grove/generated/site-config.json';\nimport { withRef } from '@grove-dev/core';\nimport FeaturedBadge from '../site/featured-badge.astro';\nimport type { RecordDetailModel } from '@grove-dev/astro/server';\nimport { taxonomyLabel } from '@grove-dev/astro/server';\n/**\n * RecordSidebar.astro\n *\n * Sticky right-hand column on the record detail page. Renders\n * up to four cards, each conditional on the model's `sidebar`\n * visibility flags:\n *\n * - Activity — repo facts (stars, forks, language, license, …)\n * - Freshness — last commit / last fetch / maintenance status\n * - Ecosystem — stack, platforms, category, tags, hygiene files\n * - Source — curation metadata + reading-time summary\n *\n * Empty rows are suppressed entirely — the sidebar never shows \"—\"\n * or \"0\" placeholders that confuse \"no data\" with \"zero\".\n *\n * Sticky on lg+ (`lg:sticky lg:top-20 lg:max-h-calc(100vh-5rem)\n * lg:overflow-y-auto`) so the cards stay in view while the user\n * scrolls the body. Cards are individually rendered so the\n * sticky container's height is bounded by the actual content.\n */\nimport { licenseDisplay } from '@grove-dev/core';\nimport Badge from '../ui/badge.astro';\nimport Icon from './icon.astro';\nimport LanguageBreakdown from './language-breakdown.astro';\n\ninterface Props {\n detail: RecordDetailModel;\n /**\n * Pass false when a parent wrapper owns the sticky behavior (e.g.\n * the detail page stacks the TOC above this sidebar inside one\n * sticky column).\n */\n sticky?: boolean;\n /**\n * \"column\" (default) stacks the cards vertically for a rail;\n * \"grid\" lays them out in responsive columns for full-width\n * placement below the article.\n */\n layout?: 'column' | 'grid';\n}\n\nconst { detail, sticky = true, layout = 'column' } = Astro.props;\nconst {\n sidebar,\n github,\n stars,\n forks,\n language,\n licenseSpdx,\n pushedLabel,\n repoUrl,\n ownerRepo,\n healthLabel,\n activityBadge,\n stacks,\n platforms,\n tags,\n category,\n contributionSignals,\n languages,\n totalLanguageBytes,\n readingMetrics,\n record,\n firstCommitYear,\n lastFetchedLabel,\n reviewedAtLabel,\n addedAtLabel,\n} = detail;\nconst alsoIn: Array<{ url: string; title: string }> = detail.collectionMembership ?? [];\n\n// Visibility helpers for individual rows inside the Activity card.\n// `hasRepo` is the discriminator between \"GitHub data synced\" and\n// \"no data fetched yet\" — without it the card would show \"Stars 0\"\n// even when the field was never populated.\nconst repo = github;\nconst hasRepo = !!repo;\nconst starsNumber = typeof stars === 'number' && stars > 0 ? stars : null;\nconst forksNumber = typeof forks === 'number' && forks > 0 ? forks : null;\n// `repo` is a loosely-typed passthrough of the raw GitHub API response\n// (see `@grove-dev/astro/server`'s `getRecordDetailModel`) — `releases`\n// isn't in the normalized `githubMetadataSchema`, so it arrives as\n// `unknown` and needs a local shape for the three fields read below.\nconst recentReleases = (\n (repo?.releases as Array<{ html_url?: string; tag_name?: string; name?: string }> | undefined) ??\n []\n).slice(0, 1);\nconst isArchived = !!repo?.archived;\n\n// Render a kv row only when both the label and value have content.\nfunction row(label: string, value: unknown) {\n if (value === null || value === undefined || value === '') return null;\n return { label, value };\n}\nconst outbound = (siteConfig as { outbound?: { ref?: string | false; skipHosts?: string[] } }).outbound ?? {};\nconst siteOrigin = new URL((siteConfig as { siteUrl?: string }).siteUrl ?? 'https://example.com').origin;\n---\n\n<aside\n class:list={[\n layout === \"grid\"\n ? \"grove-sidebar grid grid-cols-1 items-start gap-4 sm:grid-cols-2 xl:grid-cols-4\"\n : \"grove-sidebar flex flex-col gap-4\",\n layout === \"column\" &&\n sticky &&\n \"lg:sticky lg:top-20 lg:max-h-[calc(100vh-5rem)] lg:self-start lg:overflow-y-auto\",\n ]}\n aria-label=\"Record metadata\"\n>\n\n {/* ── Activity card ──────────────────────────────────────── */}\n {sidebar.showActivity && (\n <section\n class=\"grove-card rounded-[var(--radius-lg)] border border-ink-200 bg-card p-4 dark:border-ink-800\"\n aria-labelledby=\"sidebar-activity-title\"\n >\n <h2\n id=\"sidebar-activity-title\"\n class=\"grove-card-title m-0 mb-3 text-2xs font-semibold uppercase tracking-wider text-ink-500 dark:text-ink-400\"\n >\n Activity\n </h2>\n <dl class=\"grove-kv m-0 flex flex-col gap-2.5 text-sm\">\n {row(\"Stars\", starsNumber !== null ? starsNumber : null) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Stars</dt>\n <dd class=\"font-mono tabular-nums text-ink-900 dark:text-ink-100\">{starsNumber!.toLocaleString()}</dd>\n </div>\n )}\n {row(\"Forks\", forksNumber !== null ? forksNumber.toLocaleString() : null) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Forks</dt>\n <dd class=\"font-mono tabular-nums text-ink-900 dark:text-ink-100\">{forksNumber!.toLocaleString()}</dd>\n </div>\n )}\n {row(\"Contributors\", repo?.contributors_count) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Contributors</dt>\n <dd class=\"font-mono tabular-nums text-ink-900 dark:text-ink-100\">{Number(repo!.contributors_count).toLocaleString()}</dd>\n </div>\n )}\n {row(\"Open issues\", repo?.open_issues_count) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Open issues</dt>\n <dd class=\"font-mono tabular-nums text-ink-900 dark:text-ink-100\">{Number(repo!.open_issues_count).toLocaleString()}</dd>\n </div>\n )}\n {row(\"Watchers\", repo?.subscribers_count) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Watchers</dt>\n <dd class=\"font-mono tabular-nums text-ink-900 dark:text-ink-100\">{Number(repo!.subscribers_count).toLocaleString()}</dd>\n </div>\n )}\n {row(\"Language\", language) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Language</dt>\n <dd class=\"text-ink-900 dark:text-ink-100\">{language}</dd>\n </div>\n )}\n {row(\"License\", licenseSpdx) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">License</dt>\n <dd class=\"font-mono text-ink-900 dark:text-ink-100\">{licenseDisplay(licenseSpdx)}</dd>\n </div>\n )}\n {row(\"Default branch\", repo?.default_branch) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Default branch</dt>\n <dd class=\"font-mono text-ink-900 dark:text-ink-100\">{repo!.default_branch}</dd>\n </div>\n )}\n {row(\"First commit\", firstCommitYear) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">First commit</dt>\n <dd class=\"text-ink-900 dark:text-ink-100\">\n <time datetime={String(repo!.created_at)}>{firstCommitYear}</time>\n </dd>\n </div>\n )}\n {recentReleases[0] && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Latest release</dt>\n <dd class=\"text-ink-900 dark:text-ink-100\">\n <a\n href={recentReleases[0].html_url ?? repoUrl}\n target=\"_blank\"\n rel=\"noopener\"\n class=\"no-underline hover:underline\"\n >\n {recentReleases[0].tag_name ?? recentReleases[0].name ?? \"—\"}\n </a>\n </dd>\n </div>\n )}\n </dl>\n\n <LanguageBreakdown languages={languages} totalBytes={totalLanguageBytes} />\n </section>\n )}\n\n {/* ── Freshness card ─────────────────────────────────────── */}\n {sidebar.showFreshness && (\n <section\n class=\"grove-card rounded-[var(--radius-lg)] border border-ink-200 bg-card p-4 dark:border-ink-800\"\n aria-labelledby=\"sidebar-freshness-title\"\n >\n <h2\n id=\"sidebar-freshness-title\"\n class=\"grove-card-title m-0 mb-3 text-2xs font-semibold uppercase tracking-wider text-ink-500 dark:text-ink-400\"\n >\n Freshness\n </h2>\n <dl class=\"grove-kv m-0 flex flex-col gap-2.5 text-sm\">\n {pushedLabel && pushedLabel !== \"—\" && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Last commit</dt>\n <dd class=\"text-ink-900 dark:text-ink-100\">{pushedLabel}</dd>\n </div>\n )}\n {repo?.updated_at && lastFetchedLabel && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Last fetched</dt>\n <dd class=\"text-ink-900 dark:text-ink-100\">\n <time datetime={String(repo.updated_at)}>{lastFetchedLabel}</time>\n </dd>\n </div>\n )}\n {activityBadge && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Maintenance</dt>\n <dd>\n <span data-activity-tone={activityBadge.tone} class=\"grove-pill grove-pill--activity inline-flex items-center gap-1 rounded border px-1.5 py-0.5 text-[10px] font-medium\">\n {activityBadge.label}\n </span>\n </dd>\n </div>\n )}\n {healthLabel && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Health</dt>\n <dd class=\"text-ink-900 dark:text-ink-100\">{healthLabel}</dd>\n </div>\n )}\n {isArchived && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Status</dt>\n <dd><Badge variant=\"warning\">Archived</Badge></dd>\n </div>\n )}\n {repo?.homepage && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Docs</dt>\n <dd class=\"truncate text-ink-900 dark:text-ink-100\">\n <a href={withRef(String(repo.homepage), outbound)} target=\"_blank\" rel=\"noopener\" class=\"no-underline hover:underline\">\n {new URL(String(repo.homepage)).hostname}\n </a>\n </dd>\n </div>\n )}\n {repoUrl && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Source</dt>\n <dd class=\"text-ink-900 dark:text-ink-100\">\n <a href={repoUrl} target=\"_blank\" rel=\"noopener\" class=\"no-underline hover:underline\">\n {ownerRepo ? `${ownerRepo.owner}/${ownerRepo.repo}` : repoUrl}\n </a>\n </dd>\n </div>\n )}\n </dl>\n </section>\n )}\n\n {/* ── Ecosystem card ─────────────────────────────────────── */}\n {sidebar.showEcosystem && (\n <section\n class=\"grove-card rounded-[var(--radius-lg)] border border-ink-200 bg-card p-4 dark:border-ink-800\"\n aria-labelledby=\"sidebar-ecosystem-title\"\n >\n <h2\n id=\"sidebar-ecosystem-title\"\n class=\"grove-card-title m-0 mb-3 text-2xs font-semibold uppercase tracking-wider text-ink-500 dark:text-ink-400\"\n >\n Ecosystem\n </h2>\n\n {stacks.length > 0 && (\n <div class=\"mb-3\">\n <h3 class=\"m-0 mb-1.5 text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">Stack</h3>\n <ul class=\"m-0 flex list-none flex-wrap gap-1.5 p-0\">\n {stacks.map((s) => (\n <li>\n <a href={`/stacks/${s}/`} class=\"inline-flex items-center gap-1.5 rounded-full bg-secondary py-0.5 pl-1.5 pr-2 text-2xs font-medium text-secondary-foreground no-underline\">\n <Icon name={s} category=\"stack\" size={12} />\n {taxonomyLabel(\"stacks\", s)}\n </a>\n </li>\n ))}\n </ul>\n </div>\n )}\n\n {platforms.length > 0 && (\n <div class=\"mb-3\">\n <h3 class=\"m-0 mb-1.5 text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">Platforms</h3>\n <ul class=\"m-0 flex list-none flex-wrap gap-1.5 p-0\">\n {platforms.map((p) => (\n <li class=\"inline-flex items-center gap-1.5 rounded-full border border-ink-200 py-0.5 pl-1.5 pr-2 text-2xs font-medium text-ink-700 dark:border-ink-800 dark:text-ink-300\">\n <Icon name={p} category=\"platform\" size={12} />\n {taxonomyLabel(\"platforms\", p)}\n </li>\n ))}\n </ul>\n </div>\n )}\n\n {category && (\n <div class=\"mb-3\">\n <h3 class=\"m-0 mb-1.5 text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">Category</h3>\n <a href={`/categories/${category}/`} class=\"rounded-full bg-secondary px-2 py-0.5 text-2xs font-medium text-secondary-foreground no-underline\">\n {taxonomyLabel(\"categories\", category)}\n </a>\n </div>\n )}\n\n {tags.length > 0 && (\n <div class=\"mb-3\">\n <h3 class=\"m-0 mb-1.5 text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">Tags</h3>\n <ul class=\"m-0 flex list-none flex-wrap gap-1.5 p-0\">\n {tags.map((t) => (\n <li>\n <a href={`/${detail.slug}?tag=${encodeURIComponent(t)}`} rel=\"nofollow\" class=\"rounded-full border border-ink-200 px-2 py-0.5 text-2xs font-medium text-ink-700 no-underline dark:border-ink-800 dark:text-ink-300\">\n {taxonomyLabel(\"topics\", t)}\n </a>\n </li>\n ))}\n </ul>\n </div>\n )}\n\n {contributionSignals.length > 0 && (\n <div>\n <h3 class=\"m-0 mb-1.5 text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">Repository hygiene</h3>\n <ul class=\"m-0 flex list-none flex-col gap-1 p-0 text-sm\">\n {contributionSignals.map((s) => (\n <li class=\"inline-flex items-center gap-1.5 text-ink-700 dark:text-ink-200\">\n {s.ok ? (\n <svg viewBox=\"0 0 16 16\" width=\"11\" height=\"11\" aria-hidden=\"true\" fill=\"currentColor\" class=\"text-emerald-600 dark:text-emerald-400\">\n <path d=\"M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.75.75 0 0 1 1.06-1.06L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z\" />\n </svg>\n ) : (\n <svg viewBox=\"0 0 16 16\" width=\"11\" height=\"11\" aria-hidden=\"true\" fill=\"currentColor\" class=\"text-ink-400\">\n <path d=\"M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.75.75 0 1 1 1.06 1.06L9.06 8l3.22 3.22a.75.75 0 1 1-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 0 1-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z\" />\n </svg>\n )}\n {s.label}\n </li>\n ))}\n </ul>\n </div>\n )}\n </section>\n )}\n\n <FeaturedBadge\n pageUrl={`${siteOrigin}/${detail.slug}/${record.slug}/`}\n origin={siteOrigin}\n siteName={String((siteConfig as { name?: string }).name ?? '')}\n name={String((record as { name?: string }).name ?? record.slug)}\n outboundRef={outbound.ref}\n />\n\n {/* ── Source card (small) ────────────────────────────────── */}\n {sidebar.showSource && (\n <section\n class=\"grove-card grove-card--muted rounded-[var(--radius-lg)] border border-dashed border-ink-200 bg-card/50 p-4 text-2xs text-ink-500 dark:border-ink-800 dark:text-ink-400\"\n aria-labelledby=\"sidebar-source-title\"\n >\n <h2\n id=\"sidebar-source-title\"\n class=\"grove-card-title m-0 mb-1.5 text-2xs font-semibold uppercase tracking-wider text-ink-500 dark:text-ink-400\"\n >\n Source\n </h2>\n {addedAtLabel && (\n <p class=\"m-0 leading-relaxed\">\n Added on <time datetime={String(record.addedAt)}>{addedAtLabel}</time>.\n </p>\n )}\n {/* Only when a curator actually reviewed the record. This line\n used to render unconditionally with an em dash where the date\n belongs, and gated the whole card besides. */}\n {reviewedAtLabel && (\n <p class:list={[\"m-0 leading-relaxed\", addedAtLabel && \"mt-1.5\"]}>\n Reviewed by {record.curation?.reviewedBy ?? \"grove\"}\n on <time datetime={String(record.curation?.reviewedAt)}>\n {reviewedAtLabel}\n </time>.\n </p>\n )}\n {alsoIn.length > 0 && (\n <p class=\"m-0 mt-1.5 leading-relaxed\">\n <span class=\"font-semibold\">Also in: </span>\n {alsoIn.map((c, i) => (\n <>\n <a href={c.url} class=\"text-inherit no-underline hover:underline\">{c.title}</a>{i < alsoIn.length - 1 ? \", \" : \"\"}\n </>\n ))}\n </p>\n )}\n {readingMetrics.wordCount > 0 && (\n <p class=\"m-0 mt-1 leading-relaxed\">\n Notes: {readingMetrics.wordCount.toLocaleString()} words · {readingMetrics.minutes} min read.\n </p>\n )}\n </section>\n )}\n</aside>",
417
+ "content": "---\nimport siteConfig from '@grove/generated/site-config.json';\nimport type { RecordDetailModel } from '@grove-dev/astro/server';\nimport { taxonomyLabel } from '@grove-dev/astro/server';\n/**\n * RecordSidebar.astro\n *\n * Sticky right-hand column on the record detail page. Renders\n * up to four cards, each conditional on the model's `sidebar`\n * visibility flags:\n *\n * - Activity — repo facts (stars, forks, language, license, …)\n * - Freshness — last commit / last fetch / maintenance status\n * - Ecosystem — stack, platforms, category, tags, hygiene files\n * - Source — curation metadata + reading-time summary\n *\n * Empty rows are suppressed entirely — the sidebar never shows \"—\"\n * or \"0\" placeholders that confuse \"no data\" with \"zero\".\n *\n * Sticky on lg+ (`lg:sticky lg:top-20 lg:max-h-calc(100vh-5rem)\n * lg:overflow-y-auto`) so the cards stay in view while the user\n * scrolls the body. Cards are individually rendered so the\n * sticky container's height is bounded by the actual content.\n */\nimport { licenseDisplay, withRef } from '@grove-dev/core';\nimport FeaturedBadge from '../site/featured-badge.astro';\nimport Badge from '../ui/badge.astro';\nimport Icon from './icon.astro';\nimport LanguageBreakdown from './language-breakdown.astro';\n\ninterface Props {\n detail: RecordDetailModel;\n /**\n * Pass false when a parent wrapper owns the sticky behavior (e.g.\n * the detail page stacks the TOC above this sidebar inside one\n * sticky column).\n */\n sticky?: boolean;\n /**\n * \"column\" (default) stacks the cards vertically for a rail;\n * \"grid\" lays them out in responsive columns for full-width\n * placement below the article.\n */\n layout?: 'column' | 'grid';\n}\n\nconst { detail, sticky = true, layout = 'column' } = Astro.props;\nconst {\n sidebar,\n github,\n stars,\n forks,\n language,\n licenseSpdx,\n pushedLabel,\n repoUrl,\n ownerRepo,\n healthLabel,\n activityBadge,\n stacks,\n platforms,\n tags,\n category,\n contributionSignals,\n languages,\n totalLanguageBytes,\n readingMetrics,\n record,\n firstCommitYear,\n lastFetchedLabel,\n reviewedAtLabel,\n addedAtLabel,\n} = detail;\nconst alsoIn: Array<{ url: string; title: string }> = detail.collectionMembership ?? [];\n\n// Visibility helpers for individual rows inside the Activity card.\n// `hasRepo` is the discriminator between \"GitHub data synced\" and\n// \"no data fetched yet\" — without it the card would show \"Stars 0\"\n// even when the field was never populated.\nconst repo = github;\nconst hasRepo = !!repo;\nconst starsNumber = typeof stars === 'number' && stars > 0 ? stars : null;\nconst forksNumber = typeof forks === 'number' && forks > 0 ? forks : null;\n// `repo` is a loosely-typed passthrough of the raw GitHub API response\n// (see `@grove-dev/astro/server`'s `getRecordDetailModel`) — `releases`\n// isn't in the normalized `githubMetadataSchema`, so it arrives as\n// `unknown` and needs a local shape for the three fields read below.\nconst recentReleases = (\n (repo?.releases as Array<{ html_url?: string; tag_name?: string; name?: string }> | undefined) ??\n []\n).slice(0, 1);\nconst isArchived = !!repo?.archived;\n\n// Render a kv row only when both the label and value have content.\nfunction row(label: string, value: unknown) {\n if (value === null || value === undefined || value === '') return null;\n return { label, value };\n}\nconst outbound =\n (siteConfig as { outbound?: { ref?: string | false; skipHosts?: string[] } }).outbound ?? {};\nconst siteOrigin = new URL((siteConfig as { siteUrl?: string }).siteUrl ?? 'https://example.com')\n .origin;\n---\n\n<aside\n class:list={[\n layout === \"grid\"\n ? \"grove-sidebar grid grid-cols-1 items-start gap-4 sm:grid-cols-2 xl:grid-cols-4\"\n : \"grove-sidebar flex flex-col gap-4\",\n layout === \"column\" &&\n sticky &&\n \"lg:sticky lg:top-20 lg:max-h-[calc(100vh-5rem)] lg:self-start lg:overflow-y-auto\",\n ]}\n aria-label=\"Record metadata\"\n>\n\n {/* ── Activity card ──────────────────────────────────────── */}\n {sidebar.showActivity && (\n <section\n class=\"grove-card rounded-[var(--radius-lg)] border border-ink-200 bg-card p-4 dark:border-ink-800\"\n aria-labelledby=\"sidebar-activity-title\"\n >\n <h2\n id=\"sidebar-activity-title\"\n class=\"grove-card-title m-0 mb-3 text-2xs font-semibold uppercase tracking-wider text-ink-500 dark:text-ink-400\"\n >\n Activity\n </h2>\n <dl class=\"grove-kv m-0 flex flex-col gap-2.5 text-sm\">\n {row(\"Stars\", starsNumber !== null ? starsNumber : null) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Stars</dt>\n <dd class=\"font-mono tabular-nums text-ink-900 dark:text-ink-100\">{starsNumber!.toLocaleString()}</dd>\n </div>\n )}\n {row(\"Forks\", forksNumber !== null ? forksNumber.toLocaleString() : null) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Forks</dt>\n <dd class=\"font-mono tabular-nums text-ink-900 dark:text-ink-100\">{forksNumber!.toLocaleString()}</dd>\n </div>\n )}\n {row(\"Contributors\", repo?.contributors_count) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Contributors</dt>\n <dd class=\"font-mono tabular-nums text-ink-900 dark:text-ink-100\">{Number(repo!.contributors_count).toLocaleString()}</dd>\n </div>\n )}\n {row(\"Open issues\", repo?.open_issues_count) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Open issues</dt>\n <dd class=\"font-mono tabular-nums text-ink-900 dark:text-ink-100\">{Number(repo!.open_issues_count).toLocaleString()}</dd>\n </div>\n )}\n {row(\"Watchers\", repo?.subscribers_count) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Watchers</dt>\n <dd class=\"font-mono tabular-nums text-ink-900 dark:text-ink-100\">{Number(repo!.subscribers_count).toLocaleString()}</dd>\n </div>\n )}\n {row(\"Language\", language) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Language</dt>\n <dd class=\"text-ink-900 dark:text-ink-100\">{language}</dd>\n </div>\n )}\n {row(\"License\", licenseSpdx) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">License</dt>\n <dd class=\"font-mono text-ink-900 dark:text-ink-100\">{licenseDisplay(licenseSpdx)}</dd>\n </div>\n )}\n {row(\"Default branch\", repo?.default_branch) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Default branch</dt>\n <dd class=\"font-mono text-ink-900 dark:text-ink-100\">{repo!.default_branch}</dd>\n </div>\n )}\n {row(\"First commit\", firstCommitYear) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">First commit</dt>\n <dd class=\"text-ink-900 dark:text-ink-100\">\n <time datetime={String(repo!.created_at)}>{firstCommitYear}</time>\n </dd>\n </div>\n )}\n {recentReleases[0] && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Latest release</dt>\n <dd class=\"text-ink-900 dark:text-ink-100\">\n <a\n href={recentReleases[0].html_url ?? repoUrl}\n target=\"_blank\"\n rel=\"noopener\"\n class=\"no-underline hover:underline\"\n >\n {recentReleases[0].tag_name ?? recentReleases[0].name ?? \"—\"}\n </a>\n </dd>\n </div>\n )}\n </dl>\n\n <LanguageBreakdown languages={languages} totalBytes={totalLanguageBytes} />\n </section>\n )}\n\n {/* ── Freshness card ─────────────────────────────────────── */}\n {sidebar.showFreshness && (\n <section\n class=\"grove-card rounded-[var(--radius-lg)] border border-ink-200 bg-card p-4 dark:border-ink-800\"\n aria-labelledby=\"sidebar-freshness-title\"\n >\n <h2\n id=\"sidebar-freshness-title\"\n class=\"grove-card-title m-0 mb-3 text-2xs font-semibold uppercase tracking-wider text-ink-500 dark:text-ink-400\"\n >\n Freshness\n </h2>\n <dl class=\"grove-kv m-0 flex flex-col gap-2.5 text-sm\">\n {pushedLabel && pushedLabel !== \"—\" && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Last commit</dt>\n <dd class=\"text-ink-900 dark:text-ink-100\">{pushedLabel}</dd>\n </div>\n )}\n {repo?.updated_at && lastFetchedLabel && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Last fetched</dt>\n <dd class=\"text-ink-900 dark:text-ink-100\">\n <time datetime={String(repo.updated_at)}>{lastFetchedLabel}</time>\n </dd>\n </div>\n )}\n {activityBadge && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Maintenance</dt>\n <dd>\n <span data-activity-tone={activityBadge.tone} class=\"grove-pill grove-pill--activity inline-flex items-center gap-1 rounded border px-1.5 py-0.5 text-[10px] font-medium\">\n {activityBadge.label}\n </span>\n </dd>\n </div>\n )}\n {healthLabel && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Health</dt>\n <dd class=\"text-ink-900 dark:text-ink-100\">{healthLabel}</dd>\n </div>\n )}\n {isArchived && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Status</dt>\n <dd><Badge variant=\"warning\">Archived</Badge></dd>\n </div>\n )}\n {repo?.homepage && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Docs</dt>\n <dd class=\"truncate text-ink-900 dark:text-ink-100\">\n <a href={withRef(String(repo.homepage), outbound)} target=\"_blank\" rel=\"noopener\" class=\"no-underline hover:underline\">\n {new URL(String(repo.homepage)).hostname}\n </a>\n </dd>\n </div>\n )}\n {repoUrl && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Source</dt>\n <dd class=\"text-ink-900 dark:text-ink-100\">\n <a href={repoUrl} target=\"_blank\" rel=\"noopener\" class=\"no-underline hover:underline\">\n {ownerRepo ? `${ownerRepo.owner}/${ownerRepo.repo}` : repoUrl}\n </a>\n </dd>\n </div>\n )}\n </dl>\n </section>\n )}\n\n {/* ── Ecosystem card ─────────────────────────────────────── */}\n {sidebar.showEcosystem && (\n <section\n class=\"grove-card rounded-[var(--radius-lg)] border border-ink-200 bg-card p-4 dark:border-ink-800\"\n aria-labelledby=\"sidebar-ecosystem-title\"\n >\n <h2\n id=\"sidebar-ecosystem-title\"\n class=\"grove-card-title m-0 mb-3 text-2xs font-semibold uppercase tracking-wider text-ink-500 dark:text-ink-400\"\n >\n Ecosystem\n </h2>\n\n {stacks.length > 0 && (\n <div class=\"mb-3\">\n <h3 class=\"m-0 mb-1.5 text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">Stack</h3>\n <ul class=\"m-0 flex list-none flex-wrap gap-1.5 p-0\">\n {stacks.map((s) => (\n <li>\n <a href={`/stacks/${s}/`} class=\"inline-flex items-center gap-1.5 rounded-full bg-secondary py-0.5 pl-1.5 pr-2 text-2xs font-medium text-secondary-foreground no-underline\">\n <Icon name={s} category=\"stack\" size={12} />\n {taxonomyLabel(\"stacks\", s)}\n </a>\n </li>\n ))}\n </ul>\n </div>\n )}\n\n {platforms.length > 0 && (\n <div class=\"mb-3\">\n <h3 class=\"m-0 mb-1.5 text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">Platforms</h3>\n <ul class=\"m-0 flex list-none flex-wrap gap-1.5 p-0\">\n {platforms.map((p) => (\n <li class=\"inline-flex items-center gap-1.5 rounded-full border border-ink-200 py-0.5 pl-1.5 pr-2 text-2xs font-medium text-ink-700 dark:border-ink-800 dark:text-ink-300\">\n <Icon name={p} category=\"platform\" size={12} />\n {taxonomyLabel(\"platforms\", p)}\n </li>\n ))}\n </ul>\n </div>\n )}\n\n {category && (\n <div class=\"mb-3\">\n <h3 class=\"m-0 mb-1.5 text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">Category</h3>\n <a href={`/categories/${category}/`} class=\"rounded-full bg-secondary px-2 py-0.5 text-2xs font-medium text-secondary-foreground no-underline\">\n {taxonomyLabel(\"categories\", category)}\n </a>\n </div>\n )}\n\n {tags.length > 0 && (\n <div class=\"mb-3\">\n <h3 class=\"m-0 mb-1.5 text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">Tags</h3>\n <ul class=\"m-0 flex list-none flex-wrap gap-1.5 p-0\">\n {tags.map((t) => (\n <li>\n <a href={`/${detail.slug}?tag=${encodeURIComponent(t)}`} rel=\"nofollow\" class=\"rounded-full border border-ink-200 px-2 py-0.5 text-2xs font-medium text-ink-700 no-underline dark:border-ink-800 dark:text-ink-300\">\n {taxonomyLabel(\"topics\", t)}\n </a>\n </li>\n ))}\n </ul>\n </div>\n )}\n\n {contributionSignals.length > 0 && (\n <div>\n <h3 class=\"m-0 mb-1.5 text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">Repository hygiene</h3>\n <ul class=\"m-0 flex list-none flex-col gap-1 p-0 text-sm\">\n {contributionSignals.map((s) => (\n <li class=\"inline-flex items-center gap-1.5 text-ink-700 dark:text-ink-200\">\n {s.ok ? (\n <svg viewBox=\"0 0 16 16\" width=\"11\" height=\"11\" aria-hidden=\"true\" fill=\"currentColor\" class=\"text-emerald-600 dark:text-emerald-400\">\n <path d=\"M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.75.75 0 0 1 1.06-1.06L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z\" />\n </svg>\n ) : (\n <svg viewBox=\"0 0 16 16\" width=\"11\" height=\"11\" aria-hidden=\"true\" fill=\"currentColor\" class=\"text-ink-400\">\n <path d=\"M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.75.75 0 1 1 1.06 1.06L9.06 8l3.22 3.22a.75.75 0 1 1-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 0 1-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z\" />\n </svg>\n )}\n {s.label}\n </li>\n ))}\n </ul>\n </div>\n )}\n </section>\n )}\n\n <FeaturedBadge\n pageUrl={`${siteOrigin}/${detail.slug}/${record.slug}/`}\n origin={siteOrigin}\n siteName={String((siteConfig as { name?: string }).name ?? '')}\n name={String((record as { name?: string }).name ?? record.slug)}\n outboundRef={outbound.ref}\n />\n\n {/* ── Source card (small) ────────────────────────────────── */}\n {sidebar.showSource && (\n <section\n class=\"grove-card grove-card--muted rounded-[var(--radius-lg)] border border-dashed border-ink-200 bg-card/50 p-4 text-2xs text-ink-500 dark:border-ink-800 dark:text-ink-400\"\n aria-labelledby=\"sidebar-source-title\"\n >\n <h2\n id=\"sidebar-source-title\"\n class=\"grove-card-title m-0 mb-1.5 text-2xs font-semibold uppercase tracking-wider text-ink-500 dark:text-ink-400\"\n >\n Source\n </h2>\n {addedAtLabel && (\n <p class=\"m-0 leading-relaxed\">\n Added on <time datetime={String(record.addedAt)}>{addedAtLabel}</time>.\n </p>\n )}\n {/* Only when a curator actually reviewed the record. This line\n used to render unconditionally with an em dash where the date\n belongs, and gated the whole card besides. */}\n {reviewedAtLabel && (\n <p class:list={[\"m-0 leading-relaxed\", addedAtLabel && \"mt-1.5\"]}>\n Reviewed by {record.curation?.reviewedBy ?? \"grove\"}\n on <time datetime={String(record.curation?.reviewedAt)}>\n {reviewedAtLabel}\n </time>.\n </p>\n )}\n {alsoIn.length > 0 && (\n <p class=\"m-0 mt-1.5 leading-relaxed\">\n <span class=\"font-semibold\">Also in: </span>\n {alsoIn.map((c, i) => (\n <>\n <a href={c.url} class=\"text-inherit no-underline hover:underline\">{c.title}</a>{i < alsoIn.length - 1 ? \", \" : \"\"}\n </>\n ))}\n </p>\n )}\n {readingMetrics.wordCount > 0 && (\n <p class=\"m-0 mt-1 leading-relaxed\">\n Notes: {readingMetrics.wordCount.toLocaleString()} words · {readingMetrics.minutes} min read.\n </p>\n )}\n </section>\n )}\n</aside>",
418
418
  "type": "registry:component",
419
419
  "target": "~/src/components/grove/record-sidebar.astro"
420
420
  },
@@ -462,7 +462,7 @@
462
462
  },
463
463
  {
464
464
  "path": "default/pages/submit.astro",
465
- "content": "---\nimport siteConfig from '@grove/generated/site-config.json';\nimport { getSubmissionPageModel } from '@grove-dev/astro/server';\nimport SubmissionClient from '../components/grove/submission-client.astro';\nimport BaseLayout from '../layouts/base-layout.astro';\nimport Container from '../layouts/container.astro';\nimport { buttonClass } from '../lib/classnames.ts';\n\nconst {\n singular,\n title,\n description,\n repoUrl,\n copy,\n fields,\n categories,\n stacks,\n existingSlugs,\n existingFullNames,\n platformOptions,\n licenseOptions,\n taxonomy,\n} = getSubmissionPageModel(siteConfig);\nconst goodSubmissions = [\n ...(copy.good?.length\n ? copy.good\n : [\n `A real, usable ${singular}, not a tutorial or one-screen demo`,\n 'A public repository with a clear open-source license',\n 'Enough documentation to understand, run, or contribute',\n 'Recent maintenance, releases, or meaningful project history',\n ]),\n];\nconst pleaseAvoid = [\n ...(copy.avoid?.length\n ? copy.avoid\n : [\n 'Snippets, exercises, abandoned experiments, or duplicate entries',\n 'Private repositories or projects without source',\n 'Marketing pages with no usable project behind them',\n 'Records with no license or verifiable repository',\n ]),\n];\n\n// Shared control styling.\nconst control =\n \"min-h-10 w-full rounded-[var(--radius)] border border-input bg-background px-3 py-2 text-sm text-foreground outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35\";\nconst labelText = \"text-sm font-medium text-foreground\";\nconst hint = \"text-2xs leading-relaxed text-muted-foreground\";\nconst steps = [\n { id: \"repo\", title: \"Repository\", text: \"Paste the GitHub URL\" },\n { id: \"details\", title: \"Details\", text: \"Say what it is and who it is for\" },\n { id: \"review\", title: \"Open the pull request\", text: \"Check the preview, open one PR\" },\n];\n---\n\n<BaseLayout\n title={title}\n description={description}\n noindex\n site={siteConfig}\n submitHref=\"/submit\"\n>\n <div class=\"border-b border-border bg-surface-sunken/60\">\n <Container>\n <section class=\"py-10 sm:py-14\">\n <p class=\"m-0 text-2xs font-semibold uppercase tracking-wider text-muted-foreground\">\n {copy.eyebrow ?? `${singular} submission`}\n </p>\n <h1 class=\"m-0 mt-2 text-[2rem] font-semibold leading-tight tracking-tight text-foreground sm:text-[2.5rem]\">\n {copy.title ?? `Add ${singular === \"app\" ? \"an\" : \"a\"} ${singular} to the directory`}\n </h1>\n <p class=\"m-0 mt-3 max-w-[62ch] text-[1rem] leading-relaxed text-muted-foreground\">\n {copy.description ?? description}\n </p>\n <ul class=\"m-0 mt-5 flex list-none flex-wrap gap-2 p-0 text-2xs\">\n {[\"No account on this site\", \"Reviewed by a person\", \"Credited on the page\", \"README badge for maintainers\"].map((item) => (\n <li class=\"inline-flex items-center gap-1.5 rounded-full border border-border bg-background px-2.5 py-1 font-medium text-foreground\">\n <svg viewBox=\"0 0 16 16\" width=\"11\" height=\"11\" aria-hidden=\"true\" fill=\"currentColor\" class=\"text-success\"><path d=\"M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.75.75 0 0 1 1.06-1.06L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z\" /></svg>\n {item}\n </li>\n ))}\n </ul>\n\n <ol id=\"submit-steps\" class=\"m-0 mt-8 grid list-none grid-cols-1 gap-2 p-0 sm:grid-cols-3\" aria-label=\"Submission steps\">\n {steps.map((step, i) => (\n <li data-step={step.id} data-state={i === 0 ? \"current\" : \"todo\"} class=\"group flex items-center gap-3 rounded-[var(--radius-lg)] border border-border bg-background px-3 py-2.5 data-[state=current]:border-foreground data-[state=done]:border-success/50\">\n <span class=\"inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full border border-border text-xs font-semibold tabular-nums text-muted-foreground group-data-[state=current]:border-foreground group-data-[state=current]:bg-foreground group-data-[state=current]:text-background group-data-[state=done]:border-success group-data-[state=done]:bg-success group-data-[state=done]:text-background\">\n <span class=\"group-data-[state=done]:hidden\">{i + 1}</span>\n <svg viewBox=\"0 0 16 16\" width=\"12\" height=\"12\" aria-hidden=\"true\" fill=\"currentColor\" class=\"hidden group-data-[state=done]:block\"><path d=\"M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.75.75 0 0 1 1.06-1.06L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z\" /></svg>\n </span>\n <span class=\"min-w-0\">\n <span class=\"block text-sm font-semibold text-foreground\">{step.title}</span>\n <span class=\"block truncate text-2xs text-muted-foreground\">{step.text}</span>\n </span>\n </li>\n ))}\n </ol>\n </section>\n </Container>\n </div>\n\n <Container>\n <div class=\"grid grid-cols-1 items-start gap-6 py-8 sm:py-10 lg:grid-cols-[minmax(0,1fr)_minmax(320px,0.8fr)]\">\n <form id=\"submit-form\" class=\"grid gap-6\" novalidate>\n {/* ── 1. Repository ───────────────────────────── */}\n <section aria-labelledby=\"step-repo\" class=\"rounded-[var(--radius-lg)] border border-border bg-card p-5 sm:p-6\">\n <h2 id=\"step-repo\" class=\"m-0 flex items-center gap-2 text-[1.0625rem] font-semibold text-foreground\">\n <span class=\"text-muted-foreground\">1.</span> Repository\n </h2>\n <label class=\"mt-4 grid gap-1.5\">\n <span class={labelText}>GitHub URL</span>\n <div class=\"flex flex-col gap-2 sm:flex-row\">\n <input id=\"repo-url\" type=\"url\" required autocomplete=\"off\" placeholder=\"https://github.com/owner/repo\" class={`${control} min-h-11 text-[0.9375rem] sm:flex-1`} />\n <button id=\"fetch-repo\" type=\"button\" class={buttonClass(\"primary\", \"bare\", \"min-h-11 whitespace-nowrap px-4 text-sm\")}>Fetch details</button>\n </div>\n <span class={hint}>Public repositories only. We read it from the GitHub API and never write to it.</span>\n </label>\n <div id=\"repo-card\" hidden class=\"mt-4 flex items-start gap-3 rounded-[var(--radius)] border border-border bg-background p-3\">\n <img id=\"repo-avatar\" src=\"data:,\" alt=\"\" width=\"40\" height=\"40\" class=\"h-10 w-10 shrink-0 rounded-lg border border-border object-cover\" />\n <div class=\"min-w-0 flex-1\">\n <p id=\"repo-name\" class=\"m-0 truncate text-sm font-semibold text-foreground\"></p>\n <p id=\"repo-description\" class=\"m-0 mt-0.5 line-clamp-2 text-2xs text-muted-foreground\"></p>\n <p id=\"repo-facts\" class=\"m-0 mt-1.5 flex flex-wrap gap-x-3 text-2xs text-muted-foreground\"></p>\n </div>\n </div>\n </section>\n\n {/* ── 2. Details ──────────────────────────────── */}\n <section aria-labelledby=\"step-details\" class=\"rounded-[var(--radius-lg)] border border-border bg-card p-5 sm:p-6\">\n <h2 id=\"step-details\" class=\"m-0 flex items-center gap-2 text-[1.0625rem] font-semibold text-foreground\">\n <span class=\"text-muted-foreground\">2.</span> About the {singular}\n </h2>\n <p class=\"m-0 mt-1 text-2xs text-muted-foreground\">Filled from GitHub where possible — edit anything that reads like a README.</p>\n\n <div class=\"mt-5 grid gap-5\">\n <div class=\"grid grid-cols-1 items-start gap-4 sm:grid-cols-[minmax(0,1fr)_14rem]\">\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Name</span>\n <input id=\"item-name\" type=\"text\" class={control} />\n </label>\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Page address</span>\n <input id=\"item-slug\" type=\"text\" class={`${control} font-mono`} />\n <span class={hint}>The last part of the page URL — from the repo name.</span>\n </label>\n </div>\n\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Description</span>\n <textarea id=\"item-description\" rows=\"3\" class={`${control} resize-y`}></textarea>\n <span class={hint}>One or two plain sentences: what it is and who it is for. At least 40 characters.</span>\n </label>\n\n {(fields.category || fields.stack) && (\n <div class:list={[\"grid grid-cols-1 gap-4\", fields.category && fields.stack && \"sm:grid-cols-2\"]}>\n {fields.category && (\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Category</span>\n <select id=\"item-category\" class={control}>\n <option value=\"\">Choose a category</option>\n {categories.map((option) => <option value={option.id}>{option.label}</option>)}\n </select>\n </label>\n )}\n {fields.stack && (\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Primary stack</span>\n <select id=\"primary-stack\" class={control}>\n <option value=\"\">Choose a stack</option>\n {stacks.map((option) => <option value={option.id}>{option.label}</option>)}\n </select>\n </label>\n )}\n </div>\n )}\n\n {fields.platforms && (\n <fieldset class=\"m-0 grid gap-2 border-0 p-0\">\n <legend class={`${labelText} mb-2`}>Platforms</legend>\n <div class=\"flex flex-wrap gap-2\">\n {platformOptions.map((platform) => (\n <label class=\"inline-flex min-h-9 cursor-pointer items-center gap-2 rounded-full border border-border px-3 text-sm text-foreground has-[:checked]:border-foreground has-[:checked]:bg-foreground has-[:checked]:text-background\">\n <input type=\"checkbox\" name=\"platform\" value={platform.id} class=\"sr-only\" />\n <span>{platform.label}</span>\n </label>\n ))}\n </div>\n </fieldset>\n )}\n\n\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Your GitHub username <span class=\"font-normal text-muted-foreground\">(recommended)</span></span>\n <div class=\"flex items-center gap-2\">\n <span class=\"text-sm text-muted-foreground\">@</span>\n <input id=\"submitted-by\" type=\"text\" autocomplete=\"username\" spellcheck=\"false\" placeholder=\"octocat\" class={`${control} max-w-xs`} />\n </div>\n <span class={hint}>Shown as “Submitted by @you” on the page and on the contributors page.</span>\n </label>\n\n <details class=\"group rounded-[var(--radius)] border border-border bg-background\">\n <summary class=\"flex cursor-pointer list-none items-center justify-between gap-3 px-4 py-3 text-sm font-medium text-foreground [&::-webkit-details-marker]:hidden\">\n <span>Add more detail <span class=\"font-normal text-muted-foreground\">— optional: tags, licence, website, who it is for</span></span>\n <span aria-hidden=\"true\" class=\"text-muted-foreground transition-transform group-open:rotate-45\">+</span>\n </summary>\n <div class=\"grid gap-5 border-t border-border px-4 pb-5 pt-4\">\n {fields.tags && (\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Tags</span>\n <input id=\"item-tags\" type=\"text\" placeholder=\"self-hosted, developer-tools, offline-first\" class={control} />\n <span class={hint}>Comma-separated. Pre-filled from the repository topics.</span>\n </label>\n )}\n <div class=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n {fields.license && licenseOptions.length > 0 && (\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Licence</span>\n <select id=\"item-license\" class={control}>\n <option value=\"\">Detected from the repository</option>\n {licenseOptions.map((option) => <option value={option.id}>{option.label}</option>)}\n </select>\n </label>\n )}\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Website</span>\n <input id=\"item-website\" type=\"url\" placeholder=\"https://example.com\" class={control} />\n </label>\n </div>\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Best for</span>\n <textarea id=\"best-for\" rows=\"2\" class={`${control} resize-y`} placeholder=\"One use case per line\"></textarea>\n <span class={hint}>Who it suits — one audience or use case per line.</span>\n </label>\n </div>\n </details>\n </div>\n </section>\n </form>\n\n {/* ── 3. Review & open the pull request ─────────── */}\n <aside class=\"flex flex-col gap-4 lg:sticky lg:top-20\" aria-labelledby=\"step-review\">\n <section class=\"rounded-[var(--radius-lg)] border border-border bg-card p-5\">\n <h2 id=\"step-review\" class=\"m-0 flex items-center gap-2 text-[1.0625rem] font-semibold text-foreground\">\n <span class=\"text-muted-foreground\">3.</span> Preview and open the PR\n </h2>\n\n <div id=\"preview-card\" class=\"mt-4 rounded-[var(--radius)] border border-border bg-background p-4\">\n <div class=\"flex items-start gap-3\">\n <img id=\"preview-avatar\" hidden src=\"data:,\" alt=\"\" width=\"40\" height=\"40\" class=\"h-10 w-10 shrink-0 rounded-lg border border-border object-cover\" />\n <span id=\"preview-initials\" class=\"inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-lg border border-dashed border-border text-sm font-semibold text-muted-foreground\">?</span>\n <div class=\"min-w-0\">\n <p id=\"preview-name\" class=\"m-0 truncate text-[0.9375rem] font-semibold text-foreground\">{`Your ${singular}`}</p>\n <p id=\"preview-meta\" class=\"m-0 mt-0.5 text-2xs text-muted-foreground\">Category · Stack</p>\n </div>\n </div>\n <p id=\"preview-description\" class=\"m-0 mt-3 line-clamp-3 text-sm leading-relaxed text-muted-foreground\">The description appears here.</p>\n <p id=\"preview-credit\" hidden class=\"m-0 mt-3 text-2xs text-muted-foreground\"></p>\n </div>\n\n <ul id=\"submit-checklist\" class=\"m-0 mt-4 flex list-none flex-col gap-1.5 p-0 text-sm\" aria-label=\"Before you open the pull request\">\n {[\n [\"repo\", \"Repository fetched\"],\n [\"description\", \"Description of 40+ characters\"],\n ...(fields.category ? [[\"category\", \"Category chosen\"]] : []),\n ...(fields.stack ? [[\"stack\", \"Primary stack chosen\"]] : []),\n ...(fields.platforms ? [[\"platforms\", \"At least one platform\"]] : []),\n [\"credit\", \"Your GitHub username (optional)\"],\n ].map(([key, label]) => (\n <li data-check={key} data-ok=\"false\" class=\"group flex items-center gap-2 text-muted-foreground data-[ok=true]:text-foreground\">\n <span class=\"inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-full border border-border group-data-[ok=true]:border-success group-data-[ok=true]:bg-success group-data-[ok=true]:text-background\">\n <svg viewBox=\"0 0 16 16\" width=\"9\" height=\"9\" aria-hidden=\"true\" fill=\"currentColor\" class=\"hidden group-data-[ok=true]:block\"><path d=\"M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.75.75 0 0 1 1.06-1.06L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z\" /></svg>\n </span>\n {label}\n </li>\n ))}\n </ul>\n\n <div class=\"mt-5 grid gap-2\">\n <a id=\"open-pr-link\" href=\"#\" target=\"_blank\" rel=\"noopener\" class={buttonClass(\"primary\", \"md\", \"w-full justify-center pointer-events-none opacity-50\")}>\n Open pull request on GitHub\n </a>\n <button id=\"copy-yaml\" type=\"button\" disabled class={buttonClass(\"ghost\", \"sm\", \"w-full justify-center pointer-events-none opacity-50\")}>Copy the file instead</button>\n </div>\n <p id=\"submit-status\" class=\"m-0 mt-3 min-h-5 text-2xs text-muted-foreground\" aria-live=\"polite\"></p>\n\n <details class=\"group mt-2 border-t border-border pt-3\">\n <summary class=\"flex cursor-pointer list-none items-center justify-between text-2xs font-medium text-muted-foreground hover:text-foreground [&::-webkit-details-marker]:hidden\">\n <span>Show the file <span id=\"record-path\" class=\"font-mono\"></span></span>\n <span aria-hidden=\"true\" class=\"transition-transform group-open:rotate-45\">+</span>\n </summary>\n <pre class=\"mt-3 max-h-96 overflow-auto rounded-md border border-border bg-surface-sunken p-3 text-xs leading-relaxed text-foreground\"><code id=\"yaml-preview\">Paste a GitHub URL to generate a draft.</code></pre>\n </details>\n </section>\n\n <section class=\"rounded-[var(--radius-lg)] border border-border bg-card p-5\">\n <h2 class=\"m-0 text-sm font-semibold text-foreground\">What happens next</h2>\n <ol class=\"m-0 mt-3 flex list-none flex-col gap-3 p-0 text-2xs leading-relaxed text-muted-foreground\">\n {[\n [\"GitHub opens with the file ready.\", \"Commit it to a fork and open the pull request — one record file.\"],\n [\"Checks run on the pull request.\", \"Schema, taxonomy and duplicate checks — fix anything they flag.\"],\n [\"A maintainer reviews and merges.\", \"Curation and review fields are theirs to fill.\"],\n [\"The page goes live and credits you.\", \"It shows “Submitted by @you”, and maintainers get a README badge.\"],\n ].map(([head, text], i) => (\n <li class=\"flex gap-3\">\n <span class=\"inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-secondary text-[10px] font-semibold text-secondary-foreground\">{i + 1}</span>\n <span><strong class=\"font-semibold text-foreground\">{head}</strong> {text}</span>\n </li>\n ))}\n </ol>\n </section>\n\n <details class=\"group rounded-[var(--radius-lg)] border border-border bg-card\">\n <summary class=\"flex cursor-pointer list-none items-center justify-between px-5 py-4 text-sm font-semibold text-foreground [&::-webkit-details-marker]:hidden\">\n Is it a good fit?\n <span aria-hidden=\"true\" class=\"text-muted-foreground transition-transform group-open:rotate-45\">+</span>\n </summary>\n <div class=\"grid gap-4 border-t border-border px-5 pb-5 pt-4 text-2xs sm:grid-cols-2 lg:grid-cols-1\">\n <div>\n <p class=\"m-0 font-semibold uppercase tracking-wider text-emerald-700 dark:text-emerald-400\">Good fit</p>\n <ul class=\"m-0 mt-2 list-none space-y-1.5 p-0 text-foreground\">\n {goodSubmissions.map((item) => <li class=\"flex gap-2\"><span class=\"text-success\">✓</span><span>{item}</span></li>)}\n </ul>\n </div>\n <div>\n <p class=\"m-0 font-semibold uppercase tracking-wider text-amber-700 dark:text-amber-400\">Not a fit</p>\n <ul class=\"m-0 mt-2 list-none space-y-1.5 p-0 text-foreground\">\n {pleaseAvoid.map((item) => <li class=\"flex gap-2\"><span class=\"text-warning\">×</span><span>{item}</span></li>)}\n </ul>\n </div>\n </div>\n </details>\n </aside>\n </div>\n </Container>\n\n <SubmissionClient\n existingSlugs={existingSlugs}\n existingFullNames={existingFullNames}\n repoUrl={repoUrl}\n fields={fields}\n taxonomy={taxonomy}\n categoryLabels={Object.fromEntries(categories.map((c) => [c.id, c.label]))}\n stackLabels={Object.fromEntries(stacks.map((c) => [c.id, c.label]))}\n />\n</BaseLayout>\n",
465
+ "content": "---\nimport siteConfig from '@grove/generated/site-config.json';\nimport { getSubmissionPageModel } from '@grove-dev/astro/server';\nimport SubmissionClient from '../components/grove/submission-client.astro';\nimport BaseLayout from '../layouts/base-layout.astro';\nimport Container from '../layouts/container.astro';\nimport { buttonClass } from '../lib/classnames.ts';\n\nconst {\n singular,\n title,\n description,\n repoUrl,\n copy,\n fields,\n categories,\n stacks,\n existingSlugs,\n existingFullNames,\n platformOptions,\n licenseOptions,\n taxonomy,\n} = getSubmissionPageModel(siteConfig);\nconst goodSubmissions = [\n ...(copy.good?.length\n ? copy.good\n : [\n `A real, usable ${singular}, not a tutorial or one-screen demo`,\n 'A public repository with a clear open-source license',\n 'Enough documentation to understand, run, or contribute',\n 'Recent maintenance, releases, or meaningful project history',\n ]),\n];\nconst pleaseAvoid = [\n ...(copy.avoid?.length\n ? copy.avoid\n : [\n 'Snippets, exercises, abandoned experiments, or duplicate entries',\n 'Private repositories or projects without source',\n 'Marketing pages with no usable project behind them',\n 'Records with no license or verifiable repository',\n ]),\n];\n\n// Shared control styling.\nconst control =\n 'min-h-10 w-full rounded-[var(--radius)] border border-input bg-background px-3 py-2 text-sm text-foreground outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35';\nconst labelText = 'text-sm font-medium text-foreground';\nconst hint = 'text-2xs leading-relaxed text-muted-foreground';\nconst steps = [\n { id: 'repo', title: 'Repository', text: 'Paste the GitHub URL' },\n { id: 'details', title: 'Details', text: 'Say what it is and who it is for' },\n { id: 'review', title: 'Open the pull request', text: 'Check the preview, open one PR' },\n];\n---\n\n<BaseLayout\n title={title}\n description={description}\n noindex\n site={siteConfig}\n submitHref=\"/submit\"\n>\n <div class=\"border-b border-border bg-surface-sunken/60\">\n <Container>\n <section class=\"py-10 sm:py-14\">\n <p class=\"m-0 text-2xs font-semibold uppercase tracking-wider text-muted-foreground\">\n {copy.eyebrow ?? `${singular} submission`}\n </p>\n <h1 class=\"m-0 mt-2 text-[2rem] font-semibold leading-tight tracking-tight text-foreground sm:text-[2.5rem]\">\n {copy.title ?? `Add ${singular === \"app\" ? \"an\" : \"a\"} ${singular} to the directory`}\n </h1>\n <p class=\"m-0 mt-3 max-w-[62ch] text-[1rem] leading-relaxed text-muted-foreground\">\n {copy.description ?? description}\n </p>\n <ul class=\"m-0 mt-5 flex list-none flex-wrap gap-2 p-0 text-2xs\">\n {[\"No account on this site\", \"Reviewed by a person\", \"Credited on the page\", \"README badge for maintainers\"].map((item) => (\n <li class=\"inline-flex items-center gap-1.5 rounded-full border border-border bg-background px-2.5 py-1 font-medium text-foreground\">\n <svg viewBox=\"0 0 16 16\" width=\"11\" height=\"11\" aria-hidden=\"true\" fill=\"currentColor\" class=\"text-success\"><path d=\"M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.75.75 0 0 1 1.06-1.06L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z\" /></svg>\n {item}\n </li>\n ))}\n </ul>\n\n <ol id=\"submit-steps\" class=\"m-0 mt-8 grid list-none grid-cols-1 gap-2 p-0 sm:grid-cols-3\" aria-label=\"Submission steps\">\n {steps.map((step, i) => (\n <li data-step={step.id} data-state={i === 0 ? \"current\" : \"todo\"} class=\"group flex items-center gap-3 rounded-[var(--radius-lg)] border border-border bg-background px-3 py-2.5 data-[state=current]:border-foreground data-[state=done]:border-success/50\">\n <span class=\"inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full border border-border text-xs font-semibold tabular-nums text-muted-foreground group-data-[state=current]:border-foreground group-data-[state=current]:bg-foreground group-data-[state=current]:text-background group-data-[state=done]:border-success group-data-[state=done]:bg-success group-data-[state=done]:text-background\">\n <span class=\"group-data-[state=done]:hidden\">{i + 1}</span>\n <svg viewBox=\"0 0 16 16\" width=\"12\" height=\"12\" aria-hidden=\"true\" fill=\"currentColor\" class=\"hidden group-data-[state=done]:block\"><path d=\"M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.75.75 0 0 1 1.06-1.06L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z\" /></svg>\n </span>\n <span class=\"min-w-0\">\n <span class=\"block text-sm font-semibold text-foreground\">{step.title}</span>\n <span class=\"block truncate text-2xs text-muted-foreground\">{step.text}</span>\n </span>\n </li>\n ))}\n </ol>\n </section>\n </Container>\n </div>\n\n <Container>\n <div class=\"grid grid-cols-1 items-start gap-6 py-8 sm:py-10 lg:grid-cols-[minmax(0,1fr)_minmax(320px,0.8fr)]\">\n <form id=\"submit-form\" class=\"grid gap-6\" novalidate>\n {/* ── 1. Repository ───────────────────────────── */}\n <section aria-labelledby=\"step-repo\" class=\"rounded-[var(--radius-lg)] border border-border bg-card p-5 sm:p-6\">\n <h2 id=\"step-repo\" class=\"m-0 flex items-center gap-2 text-[1.0625rem] font-semibold text-foreground\">\n <span class=\"text-muted-foreground\">1.</span> Repository\n </h2>\n <label class=\"mt-4 grid gap-1.5\">\n <span class={labelText}>GitHub URL</span>\n <div class=\"flex flex-col gap-2 sm:flex-row\">\n <input id=\"repo-url\" type=\"url\" required autocomplete=\"off\" placeholder=\"https://github.com/owner/repo\" class={`${control} min-h-11 text-[0.9375rem] sm:flex-1`} />\n <button id=\"fetch-repo\" type=\"button\" class={buttonClass(\"primary\", \"bare\", \"min-h-11 whitespace-nowrap px-4 text-sm\")}>Fetch details</button>\n </div>\n <span class={hint}>Public repositories only. We read it from the GitHub API and never write to it.</span>\n </label>\n <div id=\"repo-card\" hidden class=\"mt-4 flex items-start gap-3 rounded-[var(--radius)] border border-border bg-background p-3\">\n <img id=\"repo-avatar\" src=\"data:,\" alt=\"\" width=\"40\" height=\"40\" class=\"h-10 w-10 shrink-0 rounded-lg border border-border object-cover\" />\n <div class=\"min-w-0 flex-1\">\n <p id=\"repo-name\" class=\"m-0 truncate text-sm font-semibold text-foreground\"></p>\n <p id=\"repo-description\" class=\"m-0 mt-0.5 line-clamp-2 text-2xs text-muted-foreground\"></p>\n <p id=\"repo-facts\" class=\"m-0 mt-1.5 flex flex-wrap gap-x-3 text-2xs text-muted-foreground\"></p>\n </div>\n </div>\n </section>\n\n {/* ── 2. Details ──────────────────────────────── */}\n <section aria-labelledby=\"step-details\" class=\"rounded-[var(--radius-lg)] border border-border bg-card p-5 sm:p-6\">\n <h2 id=\"step-details\" class=\"m-0 flex items-center gap-2 text-[1.0625rem] font-semibold text-foreground\">\n <span class=\"text-muted-foreground\">2.</span> About the {singular}\n </h2>\n <p class=\"m-0 mt-1 text-2xs text-muted-foreground\">Filled from GitHub where possible — edit anything that reads like a README.</p>\n\n <div class=\"mt-5 grid gap-5\">\n <div class=\"grid grid-cols-1 items-start gap-4 sm:grid-cols-[minmax(0,1fr)_14rem]\">\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Name</span>\n <input id=\"item-name\" type=\"text\" class={control} />\n </label>\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Page address</span>\n <input id=\"item-slug\" type=\"text\" class={`${control} font-mono`} />\n <span class={hint}>The last part of the page URL — from the repo name.</span>\n </label>\n </div>\n\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Description</span>\n <textarea id=\"item-description\" rows=\"3\" class={`${control} resize-y`}></textarea>\n <span class={hint}>One or two plain sentences: what it is and who it is for. At least 40 characters.</span>\n </label>\n\n {(fields.category || fields.stack) && (\n <div class:list={[\"grid grid-cols-1 gap-4\", fields.category && fields.stack && \"sm:grid-cols-2\"]}>\n {fields.category && (\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Category</span>\n <select id=\"item-category\" class={control}>\n <option value=\"\">Choose a category</option>\n {categories.map((option) => <option value={option.id}>{option.label}</option>)}\n </select>\n </label>\n )}\n {fields.stack && (\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Primary stack</span>\n <select id=\"primary-stack\" class={control}>\n <option value=\"\">Choose a stack</option>\n {stacks.map((option) => <option value={option.id}>{option.label}</option>)}\n </select>\n </label>\n )}\n </div>\n )}\n\n {fields.platforms && (\n <fieldset class=\"m-0 grid gap-2 border-0 p-0\">\n <legend class={`${labelText} mb-2`}>Platforms</legend>\n <div class=\"flex flex-wrap gap-2\">\n {platformOptions.map((platform) => (\n <label class=\"inline-flex min-h-9 cursor-pointer items-center gap-2 rounded-full border border-border px-3 text-sm text-foreground has-[:checked]:border-foreground has-[:checked]:bg-foreground has-[:checked]:text-background\">\n <input type=\"checkbox\" name=\"platform\" value={platform.id} class=\"sr-only\" />\n <span>{platform.label}</span>\n </label>\n ))}\n </div>\n </fieldset>\n )}\n\n\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Your GitHub username <span class=\"font-normal text-muted-foreground\">(recommended)</span></span>\n <div class=\"flex items-center gap-2\">\n <span class=\"text-sm text-muted-foreground\">@</span>\n <input id=\"submitted-by\" type=\"text\" autocomplete=\"username\" spellcheck=\"false\" placeholder=\"octocat\" class={`${control} max-w-xs`} />\n </div>\n <span class={hint}>Shown as “Submitted by @you” on the page and on the contributors page.</span>\n </label>\n\n <details class=\"group rounded-[var(--radius)] border border-border bg-background\">\n <summary class=\"flex cursor-pointer list-none items-center justify-between gap-3 px-4 py-3 text-sm font-medium text-foreground [&::-webkit-details-marker]:hidden\">\n <span>Add more detail <span class=\"font-normal text-muted-foreground\">— optional: tags, licence, website, who it is for</span></span>\n <span aria-hidden=\"true\" class=\"text-muted-foreground transition-transform group-open:rotate-45\">+</span>\n </summary>\n <div class=\"grid gap-5 border-t border-border px-4 pb-5 pt-4\">\n {fields.tags && (\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Tags</span>\n <input id=\"item-tags\" type=\"text\" placeholder=\"self-hosted, developer-tools, offline-first\" class={control} />\n <span class={hint}>Comma-separated. Pre-filled from the repository topics.</span>\n </label>\n )}\n <div class=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n {fields.license && licenseOptions.length > 0 && (\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Licence</span>\n <select id=\"item-license\" class={control}>\n <option value=\"\">Detected from the repository</option>\n {licenseOptions.map((option) => <option value={option.id}>{option.label}</option>)}\n </select>\n </label>\n )}\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Website</span>\n <input id=\"item-website\" type=\"url\" placeholder=\"https://example.com\" class={control} />\n </label>\n </div>\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Best for</span>\n <textarea id=\"best-for\" rows=\"2\" class={`${control} resize-y`} placeholder=\"One use case per line\"></textarea>\n <span class={hint}>Who it suits — one audience or use case per line.</span>\n </label>\n </div>\n </details>\n </div>\n </section>\n </form>\n\n {/* ── 3. Review & open the pull request ─────────── */}\n <aside class=\"flex flex-col gap-4 lg:sticky lg:top-20\" aria-labelledby=\"step-review\">\n <section class=\"rounded-[var(--radius-lg)] border border-border bg-card p-5\">\n <h2 id=\"step-review\" class=\"m-0 flex items-center gap-2 text-[1.0625rem] font-semibold text-foreground\">\n <span class=\"text-muted-foreground\">3.</span> Preview and open the PR\n </h2>\n\n <div id=\"preview-card\" class=\"mt-4 rounded-[var(--radius)] border border-border bg-background p-4\">\n <div class=\"flex items-start gap-3\">\n <img id=\"preview-avatar\" hidden src=\"data:,\" alt=\"\" width=\"40\" height=\"40\" class=\"h-10 w-10 shrink-0 rounded-lg border border-border object-cover\" />\n <span id=\"preview-initials\" class=\"inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-lg border border-dashed border-border text-sm font-semibold text-muted-foreground\">?</span>\n <div class=\"min-w-0\">\n <p id=\"preview-name\" class=\"m-0 truncate text-[0.9375rem] font-semibold text-foreground\">{`Your ${singular}`}</p>\n <p id=\"preview-meta\" class=\"m-0 mt-0.5 text-2xs text-muted-foreground\">Category · Stack</p>\n </div>\n </div>\n <p id=\"preview-description\" class=\"m-0 mt-3 line-clamp-3 text-sm leading-relaxed text-muted-foreground\">The description appears here.</p>\n <p id=\"preview-credit\" hidden class=\"m-0 mt-3 text-2xs text-muted-foreground\"></p>\n </div>\n\n <ul id=\"submit-checklist\" class=\"m-0 mt-4 flex list-none flex-col gap-1.5 p-0 text-sm\" aria-label=\"Before you open the pull request\">\n {[\n [\"repo\", \"Repository fetched\"],\n [\"description\", \"Description of 40+ characters\"],\n ...(fields.category ? [[\"category\", \"Category chosen\"]] : []),\n ...(fields.stack ? [[\"stack\", \"Primary stack chosen\"]] : []),\n ...(fields.platforms ? [[\"platforms\", \"At least one platform\"]] : []),\n [\"credit\", \"Your GitHub username (optional)\"],\n ].map(([key, label]) => (\n <li data-check={key} data-ok=\"false\" class=\"group flex items-center gap-2 text-muted-foreground data-[ok=true]:text-foreground\">\n <span class=\"inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-full border border-border group-data-[ok=true]:border-success group-data-[ok=true]:bg-success group-data-[ok=true]:text-background\">\n <svg viewBox=\"0 0 16 16\" width=\"9\" height=\"9\" aria-hidden=\"true\" fill=\"currentColor\" class=\"hidden group-data-[ok=true]:block\"><path d=\"M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.75.75 0 0 1 1.06-1.06L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z\" /></svg>\n </span>\n {label}\n </li>\n ))}\n </ul>\n\n <div class=\"mt-5 grid gap-2\">\n <a id=\"open-pr-link\" href=\"#\" target=\"_blank\" rel=\"noopener\" class={buttonClass(\"primary\", \"md\", \"w-full justify-center pointer-events-none opacity-50\")}>\n Open pull request on GitHub\n </a>\n <button id=\"copy-yaml\" type=\"button\" disabled class={buttonClass(\"ghost\", \"sm\", \"w-full justify-center pointer-events-none opacity-50\")}>Copy the file instead</button>\n </div>\n <p id=\"submit-status\" class=\"m-0 mt-3 min-h-5 text-2xs text-muted-foreground\" aria-live=\"polite\"></p>\n\n <details class=\"group mt-2 border-t border-border pt-3\">\n <summary class=\"flex cursor-pointer list-none items-center justify-between text-2xs font-medium text-muted-foreground hover:text-foreground [&::-webkit-details-marker]:hidden\">\n <span>Show the file <span id=\"record-path\" class=\"font-mono\"></span></span>\n <span aria-hidden=\"true\" class=\"transition-transform group-open:rotate-45\">+</span>\n </summary>\n <pre class=\"mt-3 max-h-96 overflow-auto rounded-md border border-border bg-surface-sunken p-3 text-xs leading-relaxed text-foreground\"><code id=\"yaml-preview\">Paste a GitHub URL to generate a draft.</code></pre>\n </details>\n </section>\n\n <section class=\"rounded-[var(--radius-lg)] border border-border bg-card p-5\">\n <h2 class=\"m-0 text-sm font-semibold text-foreground\">What happens next</h2>\n <ol class=\"m-0 mt-3 flex list-none flex-col gap-3 p-0 text-2xs leading-relaxed text-muted-foreground\">\n {[\n [\"GitHub opens with the file ready.\", \"Commit it to a fork and open the pull request — one record file.\"],\n [\"Checks run on the pull request.\", \"Schema, taxonomy and duplicate checks — fix anything they flag.\"],\n [\"A maintainer reviews and merges.\", \"Curation and review fields are theirs to fill.\"],\n [\"The page goes live and credits you.\", \"It shows “Submitted by @you”, and maintainers get a README badge.\"],\n ].map(([head, text], i) => (\n <li class=\"flex gap-3\">\n <span class=\"inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-secondary text-[10px] font-semibold text-secondary-foreground\">{i + 1}</span>\n <span><strong class=\"font-semibold text-foreground\">{head}</strong> {text}</span>\n </li>\n ))}\n </ol>\n </section>\n\n <details class=\"group rounded-[var(--radius-lg)] border border-border bg-card\">\n <summary class=\"flex cursor-pointer list-none items-center justify-between px-5 py-4 text-sm font-semibold text-foreground [&::-webkit-details-marker]:hidden\">\n Is it a good fit?\n <span aria-hidden=\"true\" class=\"text-muted-foreground transition-transform group-open:rotate-45\">+</span>\n </summary>\n <div class=\"grid gap-4 border-t border-border px-5 pb-5 pt-4 text-2xs sm:grid-cols-2 lg:grid-cols-1\">\n <div>\n <p class=\"m-0 font-semibold uppercase tracking-wider text-emerald-700 dark:text-emerald-400\">Good fit</p>\n <ul class=\"m-0 mt-2 list-none space-y-1.5 p-0 text-foreground\">\n {goodSubmissions.map((item) => <li class=\"flex gap-2\"><span class=\"text-success\">✓</span><span>{item}</span></li>)}\n </ul>\n </div>\n <div>\n <p class=\"m-0 font-semibold uppercase tracking-wider text-amber-700 dark:text-amber-400\">Not a fit</p>\n <ul class=\"m-0 mt-2 list-none space-y-1.5 p-0 text-foreground\">\n {pleaseAvoid.map((item) => <li class=\"flex gap-2\"><span class=\"text-warning\">×</span><span>{item}</span></li>)}\n </ul>\n </div>\n </div>\n </details>\n </aside>\n </div>\n </Container>\n\n <SubmissionClient\n existingSlugs={existingSlugs}\n existingFullNames={existingFullNames}\n repoUrl={repoUrl}\n fields={fields}\n taxonomy={taxonomy}\n categoryLabels={Object.fromEntries(categories.map((c) => [c.id, c.label]))}\n stackLabels={Object.fromEntries(stacks.map((c) => [c.id, c.label]))}\n />\n</BaseLayout>\n",
466
466
  "type": "registry:page",
467
467
  "target": "~/src/pages/submit.astro"
468
468
  },
@@ -474,7 +474,7 @@
474
474
  },
475
475
  {
476
476
  "path": "default/pages/about.astro",
477
- "content": "---\nimport siteConfig from '@grove/generated/site-config.json';\nimport {\n getAboutPageSeo,\n getPageContentHtml,\n indexSlug,\n itemLabel,\n itemLabelPlural,\n} from '@grove-dev/astro/server';\n/**\n * About page — generic.\n *\n * A continuous narrative in three movements: what this site is →\n * how it's built (the file-first pipeline: source files → Grove →\n * multiple outputs → ongoing sync) → how to contribute. Prose\n * sections, not a stack of cards — the reading experience is the\n * point here.\n *\n * The copy is generic — references \"directory\", \"record\",\n * \"repository\" — so it works for any blueprint, and every dynamic\n * value (`siteConfig.tagline`, `siteConfig.repoUrl`, item labels)\n * flows from the site config.\n */\nimport BaseLayout from '../layouts/base-layout.astro';\nimport Container from '../layouts/container.astro';\nimport { buttonClass } from '../lib/classnames.ts';\n\ntype Press = { outlet: string; title: string; url: string; date: string; logo?: string };\nconst press = ((siteConfig as { press?: Press[] }).press ?? []);\n\nconst githubUrl = siteConfig.repoUrl;\nconst seo = getAboutPageSeo(siteConfig);\nconst slug = indexSlug();\nconst item = itemLabel();\nconst items = itemLabelPlural();\nconst pageContentHtml = getPageContentHtml('about');\n---\n\n<BaseLayout title={seo.title} description={seo.description} image={seo.image} jsonLd={seo.jsonLd} site={siteConfig}>\n <Container size=\"narrow\">\n <article class=\"py-12 sm:py-16\">\n <nav class=\"text-2xs text-muted-foreground\" aria-label=\"Breadcrumb\">\n <a href=\"/\" class=\"hover:text-foreground\">Home</a>\n <span class=\"mx-1.5 text-ink-300 dark:text-ink-700\">/</span>\n <span class=\"text-foreground\">About</span>\n </nav>\n\n {pageContentHtml ? (\n <section class=\"grove-prose mt-8\" set:html={pageContentHtml} />\n ) : (\n <>\n <header class=\"mt-5\">\n <span class=\"text-2xs font-medium uppercase tracking-wider text-muted-foreground\">\n About\n </span>\n <h1 class=\"mt-1 m-0 text-[1.75rem] sm:text-[2.25rem] font-semibold tracking-[-0.02em] leading-[1.1] text-foreground\">\n A directory that lives in files.\n </h1>\n <p class=\"mt-4 m-0 text-[1rem] sm:text-[1.0625rem] leading-relaxed text-foreground max-w-[62ch]\">\n {siteConfig.name} is a curated, health-aware directory of open-source\n {items} — and every listing you see here is a plain YAML file in a\n public repository. This website is one of the outputs generated from\n those files.\n </p>\n </header>\n\n <section class=\"mt-10\">\n <h2 class=\"m-0 text-[1.25rem] sm:text-[1.375rem] font-semibold tracking-tight text-foreground\">\n Why it exists\n </h2>\n <p class=\"mt-3 m-0 text-[0.9375rem] leading-relaxed text-foreground\">\n GitHub search and README lists optimize for the repository name and\n description. They rarely tell you whether a project is a real {item}\n or a demo, which stack it uses beyond the headline, how active it\n really is, or whether it has a clear license.\n </p>\n <p class=\"mt-3 m-0 text-[0.9375rem] leading-relaxed text-foreground\">\n Each entry here carries the metadata a developer actually needs\n before opening the repo: stack, platforms, license, activity and\n health signals, plus curated notes — best for, why listed, caveats.\n Everything links back to real, runnable source. No SEO spam, no\n affiliate farms, no broken links.\n </p>\n </section>\n\n <section class=\"mt-10\">\n <h2 class=\"m-0 text-[1.25rem] sm:text-[1.375rem] font-semibold tracking-tight text-foreground\">\n How it's built\n </h2>\n <p class=\"mt-3 m-0 text-[0.9375rem] leading-relaxed text-foreground\">\n The source of truth is a folder of files: one YAML record per\n {item}, taxonomy files for categories, stacks, platforms, and\n licenses, and Markdown for long-form notes. <a href=\"https://github.com/tortuvshin/grove\" class=\"font-medium underline decoration-border underline-offset-2 hover:decoration-ring\">Grove</a> validates\n those files, joins in synced GitHub metadata, and publishes them as\n multiple outputs — this website with its search and filters, a\n generated README, an <code class=\"font-mono text-[0.875em]\">llms.txt</code> index\n for machines, and sitemap/SEO data.\n </p>\n <p class=\"mt-3 m-0 text-[0.9375rem] leading-relaxed text-foreground\">\n Automation keeps the outputs current: weekly syncs refresh stars,\n activity, and contributor data, and every change to a source file\n rebuilds everything derived from it. There is no database and no\n server — the output is static HTML, and the content stays portable\n in files you can fork.\n </p>\n </section>\n\n <section class=\"mt-10\">\n <h2 class=\"m-0 text-[1.25rem] sm:text-[1.375rem] font-semibold tracking-tight text-foreground\">\n How to contribute\n </h2>\n <p class=\"mt-3 m-0 text-[0.9375rem] leading-relaxed text-foreground\">\n Because the content is files, contributing is a pull request: add a\n YAML record for a new {item}, fix a typo, or improve the metadata\n behind an existing listing. The <a href=\"/submit\" class=\"font-medium underline decoration-border underline-offset-2 hover:decoration-ring\">submit page</a> drafts\n the YAML for you from a repository URL, and every submission is\n reviewed against the curation bar before it lands.\n </p>\n </section>\n\n <section class=\"mt-10 flex flex-wrap items-center gap-3\">\n <a href={`/${slug}/`} class={buttonClass(\"primary\", \"sm\")}>Browse the directory</a>\n {githubUrl && (\n <a\n href={githubUrl}\n target=\"_blank\"\n rel=\"noopener\"\n class={buttonClass(\"secondary\", \"sm\")}\n >\n View on GitHub\n </a>\n )}\n <a href=\"/submit\" class={buttonClass(\"ghost\", \"sm\")}>Submit a {item} →</a>\n </section>\n </>\n )}\n {press.length > 0 && (\n <section class=\"mt-12 border-t border-border pt-8\" aria-labelledby=\"press-heading\">\n <h2 id=\"press-heading\" class=\"m-0 text-[1.25rem] font-semibold tracking-tight text-foreground\">Featured in</h2>\n <ul class=\"m-0 mt-4 flex list-none flex-col gap-2 p-0\">\n {press.map((item) => (\n <li class=\"m-0\">\n <a href={item.url} target=\"_blank\" rel=\"noopener\" class=\"flex items-center gap-3 rounded-[var(--radius-lg)] border border-border bg-card p-3 no-underline hover:border-ink-400 dark:hover:border-ink-600\">\n {item.logo && (\n <span class=\"inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-white p-1.5\"><img src={item.logo} alt=\"\" width=\"20\" height=\"20\" class=\"h-5 w-5\" /></span>\n )}\n <span class=\"min-w-0\">\n <span class=\"block text-sm font-semibold text-foreground\">{item.title}</span>\n <span class=\"block text-2xs text-muted-foreground\">{item.outlet} · {new Date(`${item.date}-01T00:00:00Z`).toLocaleDateString('en-US', { month: 'long', year: 'numeric', timeZone: 'UTC' })}</span>\n </span>\n </a>\n </li>\n ))}\n </ul>\n </section>\n )}\n </article>\n </Container>\n</BaseLayout>\n",
477
+ "content": "---\nimport siteConfig from '@grove/generated/site-config.json';\nimport {\n getAboutPageSeo,\n getPageContentHtml,\n indexSlug,\n itemLabel,\n itemLabelPlural,\n} from '@grove-dev/astro/server';\n/**\n * About page — generic.\n *\n * A continuous narrative in three movements: what this site is →\n * how it's built (the file-first pipeline: source files → Grove →\n * multiple outputs → ongoing sync) → how to contribute. Prose\n * sections, not a stack of cards — the reading experience is the\n * point here.\n *\n * The copy is generic — references \"directory\", \"record\",\n * \"repository\" — so it works for any blueprint, and every dynamic\n * value (`siteConfig.tagline`, `siteConfig.repoUrl`, item labels)\n * flows from the site config.\n */\nimport BaseLayout from '../layouts/base-layout.astro';\nimport Container from '../layouts/container.astro';\nimport { buttonClass } from '../lib/classnames.ts';\n\ntype Press = { outlet: string; title: string; url: string; date: string; logo?: string };\nconst press = (siteConfig as { press?: Press[] }).press ?? [];\n\nconst githubUrl = siteConfig.repoUrl;\nconst seo = getAboutPageSeo(siteConfig);\nconst slug = indexSlug();\nconst item = itemLabel();\nconst items = itemLabelPlural();\nconst pageContentHtml = getPageContentHtml('about');\n---\n\n<BaseLayout title={seo.title} description={seo.description} image={seo.image} jsonLd={seo.jsonLd} site={siteConfig}>\n <Container size=\"narrow\">\n <article class=\"py-12 sm:py-16\">\n <nav class=\"text-2xs text-muted-foreground\" aria-label=\"Breadcrumb\">\n <a href=\"/\" class=\"hover:text-foreground\">Home</a>\n <span class=\"mx-1.5 text-ink-300 dark:text-ink-700\">/</span>\n <span class=\"text-foreground\">About</span>\n </nav>\n\n {pageContentHtml ? (\n <section class=\"grove-prose mt-8\" set:html={pageContentHtml} />\n ) : (\n <>\n <header class=\"mt-5\">\n <span class=\"text-2xs font-medium uppercase tracking-wider text-muted-foreground\">\n About\n </span>\n <h1 class=\"mt-1 m-0 text-[1.75rem] sm:text-[2.25rem] font-semibold tracking-[-0.02em] leading-[1.1] text-foreground\">\n A directory that lives in files.\n </h1>\n <p class=\"mt-4 m-0 text-[1rem] sm:text-[1.0625rem] leading-relaxed text-foreground max-w-[62ch]\">\n {siteConfig.name} is a curated, health-aware directory of open-source\n {items} — and every listing you see here is a plain YAML file in a\n public repository. This website is one of the outputs generated from\n those files.\n </p>\n </header>\n\n <section class=\"mt-10\">\n <h2 class=\"m-0 text-[1.25rem] sm:text-[1.375rem] font-semibold tracking-tight text-foreground\">\n Why it exists\n </h2>\n <p class=\"mt-3 m-0 text-[0.9375rem] leading-relaxed text-foreground\">\n GitHub search and README lists optimize for the repository name and\n description. They rarely tell you whether a project is a real {item}\n or a demo, which stack it uses beyond the headline, how active it\n really is, or whether it has a clear license.\n </p>\n <p class=\"mt-3 m-0 text-[0.9375rem] leading-relaxed text-foreground\">\n Each entry here carries the metadata a developer actually needs\n before opening the repo: stack, platforms, license, activity and\n health signals, plus curated notes — best for, why listed, caveats.\n Everything links back to real, runnable source. No SEO spam, no\n affiliate farms, no broken links.\n </p>\n </section>\n\n <section class=\"mt-10\">\n <h2 class=\"m-0 text-[1.25rem] sm:text-[1.375rem] font-semibold tracking-tight text-foreground\">\n How it's built\n </h2>\n <p class=\"mt-3 m-0 text-[0.9375rem] leading-relaxed text-foreground\">\n The source of truth is a folder of files: one YAML record per\n {item}, taxonomy files for categories, stacks, platforms, and\n licenses, and Markdown for long-form notes. <a href=\"https://github.com/tortuvshin/grove\" class=\"font-medium underline decoration-border underline-offset-2 hover:decoration-ring\">Grove</a> validates\n those files, joins in synced GitHub metadata, and publishes them as\n multiple outputs — this website with its search and filters, a\n generated README, an <code class=\"font-mono text-[0.875em]\">llms.txt</code> index\n for machines, and sitemap/SEO data.\n </p>\n <p class=\"mt-3 m-0 text-[0.9375rem] leading-relaxed text-foreground\">\n Automation keeps the outputs current: weekly syncs refresh stars,\n activity, and contributor data, and every change to a source file\n rebuilds everything derived from it. There is no database and no\n server — the output is static HTML, and the content stays portable\n in files you can fork.\n </p>\n </section>\n\n <section class=\"mt-10\">\n <h2 class=\"m-0 text-[1.25rem] sm:text-[1.375rem] font-semibold tracking-tight text-foreground\">\n How to contribute\n </h2>\n <p class=\"mt-3 m-0 text-[0.9375rem] leading-relaxed text-foreground\">\n Because the content is files, contributing is a pull request: add a\n YAML record for a new {item}, fix a typo, or improve the metadata\n behind an existing listing. The <a href=\"/submit\" class=\"font-medium underline decoration-border underline-offset-2 hover:decoration-ring\">submit page</a> drafts\n the YAML for you from a repository URL, and every submission is\n reviewed against the curation bar before it lands.\n </p>\n </section>\n\n <section class=\"mt-10 flex flex-wrap items-center gap-3\">\n <a href={`/${slug}/`} class={buttonClass(\"primary\", \"sm\")}>Browse the directory</a>\n {githubUrl && (\n <a\n href={githubUrl}\n target=\"_blank\"\n rel=\"noopener\"\n class={buttonClass(\"secondary\", \"sm\")}\n >\n View on GitHub\n </a>\n )}\n <a href=\"/submit\" class={buttonClass(\"ghost\", \"sm\")}>Submit a {item} →</a>\n </section>\n </>\n )}\n {press.length > 0 && (\n <section class=\"mt-12 border-t border-border pt-8\" aria-labelledby=\"press-heading\">\n <h2 id=\"press-heading\" class=\"m-0 text-[1.25rem] font-semibold tracking-tight text-foreground\">Featured in</h2>\n <ul class=\"m-0 mt-4 flex list-none flex-col gap-2 p-0\">\n {press.map((item) => (\n <li class=\"m-0\">\n <a href={item.url} target=\"_blank\" rel=\"noopener\" class=\"flex items-center gap-3 rounded-[var(--radius-lg)] border border-border bg-card p-3 no-underline hover:border-ink-400 dark:hover:border-ink-600\">\n {item.logo && (\n <span class=\"inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-white p-1.5\"><img src={item.logo} alt=\"\" width=\"20\" height=\"20\" class=\"h-5 w-5\" /></span>\n )}\n <span class=\"min-w-0\">\n <span class=\"block text-sm font-semibold text-foreground\">{item.title}</span>\n <span class=\"block text-2xs text-muted-foreground\">{item.outlet} · {new Date(`${item.date}-01T00:00:00Z`).toLocaleDateString('en-US', { month: 'long', year: 'numeric', timeZone: 'UTC' })}</span>\n </span>\n </a>\n </li>\n ))}\n </ul>\n </section>\n )}\n </article>\n </Container>\n</BaseLayout>\n",
478
478
  "type": "registry:page",
479
479
  "target": "~/src/pages/about.astro"
480
480
  },
@@ -498,8 +498,8 @@
498
498
  }
499
499
  ],
500
500
  "meta": {
501
- "version": "1.4.0",
502
- "requiresGrove": "0.19.0"
501
+ "version": "1.5.0",
502
+ "requiresGrove": "1.0.0"
503
503
  },
504
504
  "type": "registry:block"
505
505
  }