@grove-dev/cli 0.17.0 → 0.19.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.
package/dist/r/home.json CHANGED
@@ -13,13 +13,13 @@
13
13
  "files": [
14
14
  {
15
15
  "path": "default/pages/index.astro",
16
- "content": "---\nimport records from '@grove/generated/records.json';\nimport siteConfig from '@grove/generated/site-config.json';\nimport {\n getCollectionTeaserModel,\n getHomePageModel,\n loadCollections,\n recordsToCollectionEntries,\n} from '@grove-dev/astro/server';\nimport CategoryGrid from '../components/grove/category-grid.astro';\nimport CollectionTeaser from '../components/grove/collection-teaser.astro';\nimport ContributorsGrid from '../components/grove/contributors-grid.astro';\nimport FinalCta from '../components/grove/final-cta.astro';\nimport Hero from '../components/grove/hero.astro';\nimport OriginalCollection from '../components/grove/original-collection.astro';\nimport PipelineStrip from '../components/grove/pipeline-strip.astro';\nimport RecordSection from '../components/grove/record-section.astro';\nimport StackGrid from '../components/grove/stack-grid.astro';\nimport WhyThisExists from '../components/grove/why-this-exists.astro';\n/**\n * Home page — generic.\n *\n * Mirrors the openapps structure: Hero → WhyThisExists → three\n * lens sections (hot / new / mature) → StackGrid → CategoryGrid →\n * ContributorsGrid → OriginalCollection.\n *\n * All data derives from `data/generated/records.{index,full}.json`\n * and `data/generated/site-config.json`. Nothing here is hardcoded\n * to a specific blueprint — section copy uses singular/plural\n * labels from `itemLabel()`/`itemLabelPlural()`.\n */\nimport BaseLayout from '../layouts/base-layout.astro';\n\nconst home = getHomePageModel(siteConfig);\nconst { slug, itemSingular, itemPlural } = home;\n\n// ── Lens sectioning (Hot / New / Mature) ────────────────────────\nconst hotList = home.hot;\nconst newList = home.recentlyAdded;\nconst matureList = home.established;\n\nconst { stacks, categories } = home;\n\nconst { contributors, stats, title, description } = home;\n\n// ── Featured collections teaser ─────────────────────────────────\nconst allCollections = await loadCollections(process.cwd());\nconst teaserEntries = recordsToCollectionEntries(\n (records as { records: unknown[] }).records as never,\n siteConfig,\n);\nconst collectionTeaser = getCollectionTeaserModel(allCollections, teaserEntries, 3);\n---\n\n<BaseLayout title={title} description={description} image={home.seo.image} site={siteConfig}>\n <Hero\n name={`Find ${itemPlural} you can actually`}\n tagline=\"run, study, and contribute to.\"\n description={`Every listing is a YAML file in a public repository — Grove publishes those files as this site, a README, and machine-readable outputs, and keeps them in sync.`}\n eyebrow=\"Curated in plain files, published by Grove\"\n stats={{\n totalApps: stats.apps,\n totalCategories: stats.categories,\n totalStacks: stats.stacks,\n totalOwners: stats.owners,\n totalStars: stats.stars,\n }}\n itemsLabel={itemPlural}\n searchHref={`/${slug}`}\n searchPlaceholder={`Search ${itemPlural}, stacks, or categories...`}\n quickFilters={[\n { label: `Trending ${itemPlural}`, href: `/${slug}?label=hot` },\n { label: \"Recently added\", href: `/${slug}?sort=recently-added` },\n { label: \"How this site works\", href: \"#pipeline\" },\n ]}\n ctas={[\n { label: `Browse ${itemPlural}`, href: `/${slug}/`, variant: \"primary\" },\n ]}\n />\n\n <WhyThisExists />\n\n <PipelineStrip repoUrl={siteConfig.repoUrl} />\n\n <RecordSection\n id=\"hot\"\n title=\"Trending now\"\n description={`${itemPlural.charAt(0).toUpperCase() + itemPlural.slice(1)} gaining stars, activity, or attention recently.`}\n eyebrow=\"Hot\"\n items={hotList}\n hrefFor={(r) => `/${slug}/${r.slug}/`}\n viewAllHref={`/${slug}?label=hot`}\n viewAllLabel={`View all trending ${itemPlural}`}\n />\n\n <RecordSection\n id=\"new\"\n title=\"Recently added\"\n description={`${itemPlural.charAt(0).toUpperCase() + itemPlural.slice(1)} added to the directory in the last few weeks.`}\n eyebrow=\"New\"\n items={newList}\n hrefFor={(r) => `/${slug}/${r.slug}/`}\n viewAllHref={`/${slug}?sort=recently-added`}\n viewAllLabel={`View all recently added`}\n />\n\n <RecordSection\n id=\"mature\"\n title=\"Established\"\n description={`Long-running curated ${itemPlural} with strong history, active maintainers, and real-world usage.`}\n eyebrow=\"Mature\"\n items={matureList}\n hrefFor={(r) => `/${slug}/${r.slug}/`}\n viewAllHref={`/${slug}?label=mature`}\n viewAllLabel={`View all established`}\n />\n\n <StackGrid\n stacks={stacks}\n pathPrefix={`/${slug}`}\n itemLabelPlural={itemPlural}\n itemNoun={{ singular: itemSingular, plural: itemPlural }}\n hrefFor={(stackSlug: string) => `/stacks/${stackSlug}/`}\n />\n <CollectionTeaser\n model={collectionTeaser}\n countNoun={{ singular: itemSingular, plural: itemPlural }}\n />\n <CategoryGrid\n categories={categories}\n pathPrefix={`/${slug}`}\n itemLabelPlural={itemPlural}\n itemNoun={{ singular: itemSingular, plural: itemPlural }}\n hrefFor={(categorySlug: string) => `/categories/${categorySlug}/`}\n />\n\n <ContributorsGrid\n contributors={contributors}\n total={contributors.length || undefined}\n viewAllHref={`/contributors`}\n viewAllLabel=\"Meet the community\"\n showContributionCount={siteConfig.contributors?.showContributionCount ?? true}\n />\n\n {siteConfig.stats?.originalRepo && (\n <OriginalCollection\n repoUrl={siteConfig.stats.originalRepo}\n stats={{\n stars: siteConfig.stats.originalStars,\n forks: siteConfig.stats.originalForks,\n contributors: siteConfig.stats.originalContributors,\n }}\n />\n )}\n\n <FinalCta\n itemLabel={itemSingular}\n itemsLabel={itemPlural}\n browseHref={`/${slug}`}\n />\n</BaseLayout>\n",
16
+ "content": "---\nimport records from '@grove/generated/records.json';\nimport siteConfig from '@grove/generated/site-config.json';\nimport {\n getCollectionTeaserModel,\n getHomePageModel,\n loadCollections,\n recordsToCollectionEntries,\n} from '@grove-dev/astro/server';\nimport CategoryGrid from '../components/grove/category-grid.astro';\nimport CollectionTeaser from '../components/grove/collection-teaser.astro';\nimport ContributorsGrid from '../components/grove/contributors-grid.astro';\nimport FinalCta from '../components/grove/final-cta.astro';\nimport Hero from '../components/grove/hero.astro';\nimport HeroProof from '../components/grove/hero-proof.astro';\nimport OriginalCollection from '../components/grove/original-collection.astro';\nimport PipelineStrip from '../components/grove/pipeline-strip.astro';\nimport RecordSection from '../components/grove/record-section.astro';\nimport StackGrid from '../components/grove/stack-grid.astro';\nimport WhyThisExists from '../components/grove/why-this-exists.astro';\n/**\n * Home page — generic.\n *\n * Mirrors the openapps structure: Hero → WhyThisExists → three\n * lens sections (hot / new / mature) → StackGrid → CategoryGrid →\n * ContributorsGrid → OriginalCollection.\n *\n * All data derives from `data/generated/records.{index,full}.json`\n * and `data/generated/site-config.json`. Nothing here is hardcoded\n * to a specific blueprint — section copy uses singular/plural\n * labels from `itemLabel()`/`itemLabelPlural()`.\n */\nimport BaseLayout from '../layouts/base-layout.astro';\n\nconst home = getHomePageModel(siteConfig);\nconst { slug, itemSingular, itemPlural } = home;\n\n// ── Lens sectioning (Hot / New / Mature) ────────────────────────\nconst hotList = home.hot;\nconst newList = home.recentlyAdded;\nconst matureList = home.established;\n\nconst { stacks, categories } = home;\n\nconst { contributors, stats, title, description } = home;\n\n// ── Featured collections teaser ─────────────────────────────────\nconst allCollections = await loadCollections(process.cwd());\nconst teaserEntries = recordsToCollectionEntries(\n (records as { records: unknown[] }).records as never,\n siteConfig,\n);\nconst collectionTeaser = getCollectionTeaserModel(allCollections, teaserEntries, 3);\n---\n\n<BaseLayout title={title} description={description} image={home.seo.image} site={siteConfig}>\n <Hero\n name={`Find ${itemPlural} you can actually`}\n tagline=\"run, study, and contribute to.\"\n description={`Every listing is a YAML file in a public repository — Grove publishes those files as this site, a README, and machine-readable outputs, and keeps them in sync.`}\n eyebrow=\"Curated in plain files, published by Grove\"\n stats={{\n totalApps: stats.apps,\n totalCategories: stats.categories,\n totalStacks: stats.stacks,\n totalOwners: stats.owners,\n totalStars: stats.stars,\n }}\n itemsLabel={itemPlural}\n searchHref={`/${slug}`}\n searchPlaceholder={`Search ${itemPlural}, stacks, or categories...`}\n quickFilters={[\n { label: `Trending ${itemPlural}`, href: `/${slug}?label=hot` },\n { label: \"Recently added\", href: `/${slug}?sort=recently-added` },\n { label: \"How this site works\", href: \"#pipeline\" },\n ]}\n ctas={[\n { label: `Browse ${itemPlural}`, href: `/${slug}/`, variant: \"primary\" },\n ]}\n >\n {((siteConfig as { press?: unknown[] }).press?.length ?? 0) > 0 && (\n <HeroProof slot=\"eyebrow\" variant=\"pill\" />\n )}\n <HeroProof slot=\"proof\" variant=\"row\" contributors={contributors} />\n </Hero>\n\n <WhyThisExists />\n\n <PipelineStrip repoUrl={siteConfig.repoUrl} />\n\n <RecordSection\n id=\"hot\"\n title=\"Trending now\"\n description={`${itemPlural.charAt(0).toUpperCase() + itemPlural.slice(1)} gaining stars, activity, or attention recently.`}\n eyebrow=\"Hot\"\n items={hotList}\n hrefFor={(r) => `/${slug}/${r.slug}/`}\n viewAllHref={`/${slug}?label=hot`}\n viewAllLabel={`View all trending ${itemPlural}`}\n />\n\n <RecordSection\n id=\"new\"\n title=\"Recently added\"\n description={`${itemPlural.charAt(0).toUpperCase() + itemPlural.slice(1)} added to the directory in the last few weeks.`}\n eyebrow=\"New\"\n items={newList}\n hrefFor={(r) => `/${slug}/${r.slug}/`}\n viewAllHref={`/${slug}?sort=recently-added`}\n viewAllLabel={`View all recently added`}\n />\n\n <RecordSection\n id=\"mature\"\n title=\"Established\"\n description={`Long-running curated ${itemPlural} with strong history, active maintainers, and real-world usage.`}\n eyebrow=\"Mature\"\n items={matureList}\n hrefFor={(r) => `/${slug}/${r.slug}/`}\n viewAllHref={`/${slug}?label=mature`}\n viewAllLabel={`View all established`}\n />\n\n <StackGrid\n stacks={stacks}\n pathPrefix={`/${slug}`}\n itemLabelPlural={itemPlural}\n itemNoun={{ singular: itemSingular, plural: itemPlural }}\n hrefFor={(stackSlug: string) => `/stacks/${stackSlug}/`}\n />\n <CollectionTeaser\n model={collectionTeaser}\n countNoun={{ singular: itemSingular, plural: itemPlural }}\n />\n <CategoryGrid\n categories={categories}\n pathPrefix={`/${slug}`}\n itemLabelPlural={itemPlural}\n itemNoun={{ singular: itemSingular, plural: itemPlural }}\n hrefFor={(categorySlug: string) => `/categories/${categorySlug}/`}\n />\n\n <ContributorsGrid\n contributors={contributors}\n total={contributors.length || undefined}\n viewAllHref={`/contributors`}\n viewAllLabel=\"Meet the community\"\n showContributionCount={siteConfig.contributors?.showContributionCount ?? true}\n />\n\n {siteConfig.stats?.originalRepo && (\n <OriginalCollection\n repoUrl={siteConfig.stats.originalRepo}\n stats={{\n stars: siteConfig.stats.originalStars,\n forks: siteConfig.stats.originalForks,\n contributors: siteConfig.stats.originalContributors,\n }}\n />\n )}\n\n <FinalCta\n itemLabel={itemSingular}\n itemsLabel={itemPlural}\n browseHref={`/${slug}`}\n />\n</BaseLayout>\n",
17
17
  "type": "registry:page",
18
18
  "target": "~/src/pages/index.astro"
19
19
  },
20
20
  {
21
21
  "path": "default/components/grove/hero.astro",
22
- "content": "---\nimport { compact } from '@grove-dev/core';\n/**\n * Hero — the home page banner.\n *\n * Mirrors the openapps layout: trust-stats row across the top,\n * big two-line headline with a gradient accent on the second\n * line, descriptive paragraph, search form with a Filters\n * shortcut, quick-filter chips, and up to 3 CTAs.\n *\n * Generic: every value comes through props (or `siteConfig` for\n * the trust stats). The label next to the count is blueprint-\n * driven via `itemsLabel` — so a project-directory renders\n * \"apps indexed\", a resource-hub renders \"resources indexed\",\n * an ecosystem-map renders \"entities indexed\".\n */\nimport Container from '../../layouts/container.astro';\n\ninterface CTA {\n label: string;\n href: string;\n variant?: 'primary' | 'outline' | 'ghost';\n external?: boolean;\n}\n\ninterface Props {\n /** Site/brand name. */\n name: string;\n /** Short tagline — usually pulled from siteConfig.tagline. */\n tagline: string;\n /** Longer descriptive paragraph. */\n description?: string;\n /** Trust stats: items count, categories, stacks, owners, stars. */\n stats?: {\n totalApps?: number;\n totalCategories?: number;\n totalStacks?: number;\n totalOwners?: number;\n totalStars?: number;\n };\n /** Search form target — the list page. */\n searchHref?: string;\n /** Search input placeholder. */\n searchPlaceholder?: string;\n /**\n * Plural noun for the primary count (e.g. \"apps\", \"resources\",\n * \"entities\"). Used in the trust-stats label and CTA copy.\n */\n itemsLabel?: string;\n /** Quick filter chips under the search bar. */\n quickFilters?: Array<{ label: string; href: string }>;\n /** CTAs rendered below the form. */\n ctas?: CTA[];\n /** Extra class. */\n class?: string;\n /** Eyebrow text rendered above the title. */\n eyebrow?: string;\n /** Optional badge content rendered next to the eyebrow. */\n eyebrowBadge?: string;\n}\n\nconst {\n name,\n tagline,\n description,\n stats = {},\n searchHref = '/',\n searchPlaceholder = 'Search the directory...',\n itemsLabel = 'items',\n quickFilters = [],\n ctas = [],\n class: className = '',\n eyebrow = 'A directory of curated knowledge',\n eyebrowBadge,\n} = Astro.props;\n\n// One compact stats line: \"6 projects indexed · 5 categories · 3 stacks\".\n// Every entry is guarded so a fresh directory never renders a zero-value.\nconst statParts: string[] = [\n ...(stats.totalApps !== undefined && stats.totalApps > 0\n ? [`${compact(stats.totalApps)} ${itemsLabel} indexed`]\n : []),\n ...(stats.totalCategories !== undefined && stats.totalCategories > 0\n ? [`${stats.totalCategories} categories`]\n : []),\n ...(stats.totalStacks !== undefined && stats.totalStacks > 0\n ? [`${stats.totalStacks} stacks`]\n : []),\n ...(stats.totalOwners !== undefined && stats.totalOwners > 0\n ? [`${compact(stats.totalOwners)} owners`]\n : []),\n ...(stats.totalStars !== undefined && stats.totalStars > 0\n ? [`${compact(stats.totalStars)} stars`]\n : []),\n];\n\n// One primary CTA only — Submit already lives in the navbar\n// (BaseLayout → Header submitHref), so the hero never duplicates it.\nconst primaryCta: CTA | undefined = ctas.find((c) => c.variant === 'primary') ??\n ctas[0] ?? { label: `Browse ${itemsLabel}`, href: searchHref, variant: 'primary' };\n---\n\n<section\n class:list={[\n \"relative overflow-hidden border-b border-ink-200 dark:border-ink-800\",\n className,\n ]}\n>\n {/* Dark mode only: a barely-there radial lift behind the headline. */}\n <div\n aria-hidden=\"true\"\n class=\"pointer-events-none absolute inset-0 hidden dark:block\"\n style=\"background: radial-gradient(60% 55% at 50% 0%, color-mix(in oklab, var(--grove-foreground) 5%, transparent) 0%, transparent 70%);\"\n ></div>\n\n <Container>\n <div class=\"relative mx-auto flex max-w-[900px] flex-col items-center py-[88px] text-center lg:py-[104px]\">\n {/* Eyebrow. The `eyebrow` slot replaces the whole line — dot\n included — so a consumer can put richer content here (a\n `PoweredBy` link, a release badge) without forking the Hero. */}\n <span class=\"inline-flex animate-fade-in items-center gap-2 text-[13px] font-medium text-ink-500 dark:text-ink-400\">\n <slot name=\"eyebrow\">\n <span aria-hidden=\"true\" class=\"inline-block h-1.5 w-1.5 animate-pulse rounded-full bg-success\"></span>\n {eyebrow}\n {eyebrowBadge && (\n <span\n class=\"inline-flex items-center rounded-full border border-warning/30 bg-warning/10 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wider text-warning\"\n aria-label={eyebrowBadge}\n >\n {eyebrowBadge}\n </span>\n )}\n </slot>\n </span>\n\n {/* Headline */}\n <h1\n class=\"m-0 mt-5 max-w-[820px] animate-fade-in-up text-balance text-[clamp(44px,5vw,64px)] font-[650] leading-[1.08] tracking-[-0.035em] text-ink-900 dark:text-ink-100\"\n style=\"animation-delay: 0.05s;\"\n >\n <span class=\"block\">{name}</span>\n <span class=\"block\">{tagline}</span>\n </h1>\n\n {description && (\n <p\n class=\"m-0 mt-5 max-w-[640px] animate-fade-in-up text-[16px] leading-[1.6] text-ink-500 dark:text-ink-400\"\n style=\"animation-delay: 0.1s;\"\n >\n {description}\n </p>\n )}\n\n {/* Search — primary interaction. The FORM is the visual control:\n it owns the border, radius, and the single focus treatment\n (focus-within border + soft ring). The inner input opts out\n of the global input styling (`grove-input-unstyled`) so it\n stays a transparent, chrome-free text slot — no second box\n or ring appearing inside the pill on focus. */}\n <form\n class=\"mt-8 flex h-[58px] w-full max-w-[840px] animate-fade-in-up items-center gap-3 rounded-xl border border-ink-200 bg-background p-1.5 pl-4 transition-[border-color,box-shadow] focus-within:border-ink-400 focus-within:ring-3 focus-within:ring-ring/15 dark:border-ink-800 dark:focus-within:border-ink-600\"\n style=\"animation-delay: 0.15s;\"\n role=\"search\"\n action={searchHref}\n method=\"get\"\n >\n <label class=\"flex min-w-0 flex-1 items-center gap-3\">\n <span class=\"sr-only\">Search {itemsLabel}, stacks, and categories</span>\n <svg viewBox=\"0 0 16 16\" width=\"20\" height=\"20\" aria-hidden=\"true\" class=\"shrink-0 text-ink-400 dark:text-ink-500\" fill=\"currentColor\">\n <path d=\"M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z\"></path>\n </svg>\n <input\n type=\"search\"\n name=\"q\"\n placeholder={searchPlaceholder}\n class=\"grove-input-unstyled h-full w-full min-w-0 rounded-none border-0 bg-transparent px-0 text-[16px] text-ink-900 outline-none placeholder:text-ink-400 dark:text-ink-100 dark:placeholder:text-ink-500\"\n />\n </label>\n <button\n type=\"submit\"\n class=\"inline-flex h-[46px] shrink-0 cursor-pointer items-center justify-center rounded-lg border border-transparent bg-primary px-5 text-[15px] font-medium leading-none text-primary-foreground outline-none transition-colors hover:bg-primary/90 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35\"\n >\n Search\n </button>\n </form>\n\n {quickFilters.length > 0 && (\n <p class=\"m-0 mt-4 text-[13px] text-ink-500 dark:text-ink-400\">\n Try{\" \"}\n {quickFilters.map((f, i) => (\n <>\n <a href={f.href} class=\"font-mono text-ink-700 underline-offset-2 hover:underline dark:text-ink-300\">{f.label}</a>\n {i < quickFilters.length - 1 && <span aria-hidden=\"true\" class=\"mx-1\">·</span>}\n </>\n ))}\n </p>\n )}\n\n {/* Inline stats — single compact line, middle-dot separators */}\n {statParts.length > 0 && (\n <p class=\"m-0 mt-5 text-[13px] text-ink-500 dark:text-ink-400\">\n {statParts.map((part, i) => (\n <>\n {i > 0 && <span aria-hidden=\"true\" class=\"mx-2 opacity-60\">·</span>}\n <span>{part}</span>\n </>\n ))}\n </p>\n )}\n\n {/* Primary CTA only */}\n {primaryCta && (\n <div class=\"mt-8\">\n <a\n href={primaryCta.href}\n class=\"inline-flex h-11 cursor-pointer items-center justify-center gap-2 rounded-[var(--radius)] border border-transparent bg-primary px-5 text-[15px] font-medium leading-none text-primary-foreground outline-none transition-colors hover:bg-primary/90 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35\"\n {...(primaryCta.external ? { target: \"_blank\", rel: \"noopener noreferrer\" } : {})}\n data-event=\"hero_cta_click\"\n data-event-source=\"hero\"\n >\n {primaryCta.label}\n <svg viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M5 12h14\"></path>\n <path d=\"m12 5 7 7-7 7\"></path>\n </svg>\n </a>\n </div>\n )}\n </div>\n </Container>\n</section>\n",
22
+ "content": "---\nimport { compact } from '@grove-dev/core';\n/**\n * Hero — the home page banner.\n *\n * Mirrors the openapps layout: trust-stats row across the top,\n * big two-line headline with a gradient accent on the second\n * line, descriptive paragraph, search form with a Filters\n * shortcut, quick-filter chips, and up to 3 CTAs.\n *\n * Generic: every value comes through props (or `siteConfig` for\n * the trust stats). The label next to the count is blueprint-\n * driven via `itemsLabel` — so a project-directory renders\n * \"apps indexed\", a resource-hub renders \"resources indexed\",\n * an ecosystem-map renders \"entities indexed\".\n */\nimport Container from '../../layouts/container.astro';\n\ninterface CTA {\n label: string;\n href: string;\n variant?: 'primary' | 'outline' | 'ghost';\n external?: boolean;\n}\n\ninterface Props {\n /** Site/brand name. */\n name: string;\n /** Short tagline — usually pulled from siteConfig.tagline. */\n tagline: string;\n /** Longer descriptive paragraph. */\n description?: string;\n /** Trust stats: items count, categories, stacks, owners, stars. */\n stats?: {\n totalApps?: number;\n totalCategories?: number;\n totalStacks?: number;\n totalOwners?: number;\n totalStars?: number;\n };\n /** Search form target — the list page. */\n searchHref?: string;\n /** Search input placeholder. */\n searchPlaceholder?: string;\n /**\n * Plural noun for the primary count (e.g. \"apps\", \"resources\",\n * \"entities\"). Used in the trust-stats label and CTA copy.\n */\n itemsLabel?: string;\n /** Quick filter chips under the search bar. */\n quickFilters?: Array<{ label: string; href: string }>;\n /** CTAs rendered below the form. */\n ctas?: CTA[];\n /** Extra class. */\n class?: string;\n /** Eyebrow text rendered above the title. */\n eyebrow?: string;\n /** Optional badge content rendered next to the eyebrow. */\n eyebrowBadge?: string;\n}\n\nconst {\n name,\n tagline,\n description,\n stats = {},\n searchHref = '/',\n searchPlaceholder = 'Search the directory...',\n itemsLabel = 'items',\n quickFilters = [],\n ctas = [],\n class: className = '',\n eyebrow = 'A directory of curated knowledge',\n eyebrowBadge,\n} = Astro.props;\n\n// One compact stats line: \"6 projects indexed · 5 categories · 3 stacks\".\n// Every entry is guarded so a fresh directory never renders a zero-value.\nconst statParts: string[] = [\n ...(stats.totalApps !== undefined && stats.totalApps > 0\n ? [`${compact(stats.totalApps)} ${itemsLabel} indexed`]\n : []),\n ...(stats.totalCategories !== undefined && stats.totalCategories > 0\n ? [`${stats.totalCategories} categories`]\n : []),\n ...(stats.totalStacks !== undefined && stats.totalStacks > 0\n ? [`${stats.totalStacks} stacks`]\n : []),\n ...(stats.totalOwners !== undefined && stats.totalOwners > 0\n ? [`${compact(stats.totalOwners)} owners`]\n : []),\n ...(stats.totalStars !== undefined && stats.totalStars > 0\n ? [`${compact(stats.totalStars)} stars`]\n : []),\n];\n\n// One primary CTA only — Submit already lives in the navbar\n// (BaseLayout → Header submitHref), so the hero never duplicates it.\nconst primaryCta: CTA | undefined = ctas.find((c) => c.variant === 'primary') ??\n ctas[0] ?? { label: `Browse ${itemsLabel}`, href: searchHref, variant: 'primary' };\n---\n\n<section\n class:list={[\n \"relative overflow-hidden border-b border-ink-200 dark:border-ink-800\",\n className,\n ]}\n>\n {/* Dark mode only: a barely-there radial lift behind the headline. */}\n <div\n aria-hidden=\"true\"\n class=\"pointer-events-none absolute inset-0 hidden dark:block\"\n style=\"background: radial-gradient(60% 55% at 50% 0%, color-mix(in oklab, var(--grove-foreground) 5%, transparent) 0%, transparent 70%);\"\n ></div>\n\n <Container>\n <div class=\"relative mx-auto flex max-w-[900px] flex-col items-center py-[88px] text-center lg:py-[104px]\">\n {/* Eyebrow. The `eyebrow` slot replaces the whole line — dot\n included — so a consumer can put richer content here (a\n `PoweredBy` link, a release badge) without forking the Hero. */}\n <span class=\"inline-flex animate-fade-in items-center gap-2 text-[13px] font-medium text-ink-500 dark:text-ink-400\">\n <slot name=\"eyebrow\">\n <span aria-hidden=\"true\" class=\"inline-block h-1.5 w-1.5 animate-pulse rounded-full bg-success\"></span>\n {eyebrow}\n {eyebrowBadge && (\n <span\n class=\"inline-flex items-center rounded-full border border-warning/30 bg-warning/10 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wider text-warning\"\n aria-label={eyebrowBadge}\n >\n {eyebrowBadge}\n </span>\n )}\n </slot>\n </span>\n\n {/* Headline */}\n <h1\n class=\"m-0 mt-5 max-w-[820px] animate-fade-in-up text-balance text-[clamp(44px,5vw,64px)] font-[650] leading-[1.08] tracking-[-0.035em] text-ink-900 dark:text-ink-100\"\n style=\"animation-delay: 0.05s;\"\n >\n <span class=\"block\">{name}</span>\n <span class=\"block\">{tagline}</span>\n </h1>\n\n {description && (\n <p\n class=\"m-0 mt-5 max-w-[640px] animate-fade-in-up text-[16px] leading-[1.6] text-ink-500 dark:text-ink-400\"\n style=\"animation-delay: 0.1s;\"\n >\n {description}\n </p>\n )}\n\n {/* Search — primary interaction. The FORM is the visual control:\n it owns the border, radius, and the single focus treatment\n (focus-within border + soft ring). The inner input opts out\n of the global input styling (`grove-input-unstyled`) so it\n stays a transparent, chrome-free text slot — no second box\n or ring appearing inside the pill on focus. */}\n <form\n class=\"mt-8 flex h-[58px] w-full max-w-[840px] animate-fade-in-up items-center gap-3 rounded-xl border border-ink-200 bg-background p-1.5 pl-4 transition-[border-color,box-shadow] focus-within:border-ink-400 focus-within:ring-3 focus-within:ring-ring/15 dark:border-ink-800 dark:focus-within:border-ink-600\"\n style=\"animation-delay: 0.15s;\"\n role=\"search\"\n action={searchHref}\n method=\"get\"\n >\n <label class=\"flex min-w-0 flex-1 items-center gap-3\">\n <span class=\"sr-only\">Search {itemsLabel}, stacks, and categories</span>\n <svg viewBox=\"0 0 16 16\" width=\"20\" height=\"20\" aria-hidden=\"true\" class=\"shrink-0 text-ink-400 dark:text-ink-500\" fill=\"currentColor\">\n <path d=\"M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z\"></path>\n </svg>\n <input\n type=\"search\"\n name=\"q\"\n placeholder={searchPlaceholder}\n class=\"grove-input-unstyled h-full w-full min-w-0 rounded-none border-0 bg-transparent px-0 text-[16px] text-ink-900 outline-none placeholder:text-ink-400 dark:text-ink-100 dark:placeholder:text-ink-500\"\n />\n </label>\n <button\n type=\"submit\"\n class=\"inline-flex h-[46px] shrink-0 cursor-pointer items-center justify-center rounded-lg border border-transparent bg-primary px-5 text-[15px] font-medium leading-none text-primary-foreground outline-none transition-colors hover:bg-primary/90 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35\"\n >\n Search\n </button>\n </form>\n\n {quickFilters.length > 0 && (\n <p class=\"m-0 mt-4 text-[13px] text-ink-500 dark:text-ink-400\">\n Try{\" \"}\n {quickFilters.map((f, i) => (\n <>\n <a href={f.href} class=\"font-mono text-ink-700 underline-offset-2 hover:underline dark:text-ink-300\">{f.label}</a>\n {i < quickFilters.length - 1 && <span aria-hidden=\"true\" class=\"mx-1\">·</span>}\n </>\n ))}\n </p>\n )}\n\n {/* Inline stats — single compact line, middle-dot separators */}\n {statParts.length > 0 && (\n <p class=\"m-0 mt-5 text-[13px] text-ink-500 dark:text-ink-400\">\n {statParts.map((part, i) => (\n <>\n {i > 0 && <span aria-hidden=\"true\" class=\"mx-2 opacity-60\">·</span>}\n <span>{part}</span>\n </>\n ))}\n </p>\n )}\n\n {/* Primary CTA only */}\n {primaryCta && (\n <div class=\"mt-8\">\n <a\n href={primaryCta.href}\n class=\"inline-flex h-11 cursor-pointer items-center justify-center gap-2 rounded-[var(--radius)] border border-transparent bg-primary px-5 text-[15px] font-medium leading-none text-primary-foreground outline-none transition-colors hover:bg-primary/90 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35\"\n {...(primaryCta.external ? { target: \"_blank\", rel: \"noopener\" } : {})}\n data-event=\"hero_cta_click\"\n data-event-source=\"hero\"\n >\n {primaryCta.label}\n <svg viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M5 12h14\"></path>\n <path d=\"m12 5 7 7-7 7\"></path>\n </svg>\n </a>\n </div>\n )}\n\n {/* Social proof under the CTA — see HeroProof. */}\n <slot name=\"proof\" />\n </div>\n </Container>\n</section>\n",
23
23
  "type": "registry:component",
24
24
  "target": "~/src/components/grove/hero.astro"
25
25
  },
@@ -31,7 +31,7 @@
31
31
  },
32
32
  {
33
33
  "path": "default/components/grove/pipeline-strip.astro",
34
- "content": "---\n/**\n * PipelineStrip — the file-first publishing story.\n *\n * Three beats: a record YAML (source of truth) → the Grove build →\n * the published outputs (this site, README, llms.txt, sitemap),\n * plus the sync loop (edits arrive as pull requests, automation\n * keeps every output current). The sample record shown is\n * illustrative markup, not live data — pass `samplePath` (a real\n * repo-relative path to one of your own records) to turn the \"Read\n * this file on GitHub\" link on; without it, the link is omitted.\n */\n\ninterface Props {\n /** Repository URL for the \"read the source\" link. */\n repoUrl?: string;\n /** Repo-relative path to a real sample record. No default — a\n * fresh scaffold has no records yet, so the link is omitted\n * unless you supply one. */\n samplePath?: string;\n class?: string;\n}\n\nconst { repoUrl, samplePath, class: className = '' } = Astro.props;\n\nconst sampleHref = repoUrl ? `${repoUrl.replace(/\\/$/, '')}/blob/main/${samplePath}` : undefined;\n\nconst outputs = [\n { label: 'This website', detail: 'browse, search, filters' },\n { label: 'README', detail: 'awesome-list generated' },\n { label: 'llms.txt', detail: 'machine-readable index' },\n { label: 'Sitemap + SEO', detail: 'structured data' },\n];\n---\n\n<section\n id=\"pipeline\"\n class:list={[\"scroll-mt-20 border-b border-border py-12 sm:py-16\", className]}\n aria-labelledby=\"pipeline-heading\"\n>\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n <header class=\"flex flex-col gap-2\">\n <span class=\"text-2xs font-medium uppercase tracking-wider text-muted-foreground\">\n How this site works\n </span>\n <h2\n id=\"pipeline-heading\"\n class=\"m-0 max-w-[40ch] text-[1.5rem] font-semibold tracking-tight text-foreground sm:text-[1.75rem]\"\n >\n Every listing is a plain YAML file.\n </h2>\n <p class=\"m-0 max-w-[64ch] text-[0.9375rem] leading-relaxed text-muted-foreground\">\n The content you're browsing lives as files in a repository. Grove builds them\n into this site and its machine-readable outputs — and keeps everything in sync\n when a file changes.\n </p>\n </header>\n\n <div class=\"mt-7 grid grid-cols-1 gap-3 md:grid-cols-3\">\n {/* Beat 1 — the source file */}\n <div class=\"flex flex-col rounded-[calc(var(--radius)+0.25rem)] border border-border bg-surface-raised p-4\">\n <p class=\"m-0 text-2xs font-medium uppercase tracking-wider text-muted-foreground\">\n 1 · Source file\n </p>\n <pre\n class=\"mt-3 flex-1 overflow-x-auto rounded-md bg-surface-sunken p-3 font-mono text-[0.75rem] leading-relaxed text-foreground\"\n ><code>name: Open WebUI\nslug: open-webui\ncategory: interfaces\nstacks: [typescript, python]\ntags: [chat, self-host, llm]\nlicenses: [mit]</code></pre>\n {sampleHref && (\n <a\n href={sampleHref}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"mt-3 text-2xs font-medium text-muted-foreground underline decoration-border underline-offset-2 hover:text-foreground\"\n >\n Read this file on GitHub →\n </a>\n )}\n </div>\n\n {/* Beat 2 — the build */}\n <div class=\"flex flex-col rounded-[calc(var(--radius)+0.25rem)] border border-border bg-surface-raised p-4\">\n <p class=\"m-0 text-2xs font-medium uppercase tracking-wider text-muted-foreground\">\n 2 · Grove build\n </p>\n <ul class=\"m-0 mt-3 flex flex-1 list-none flex-col gap-2 p-0 text-[0.8125rem] leading-relaxed text-muted-foreground\">\n <li>Validates every record against the schema</li>\n <li>Joins taxonomy labels, health, and GitHub metadata</li>\n <li>Generates one index consumed by every output</li>\n </ul>\n <p class=\"m-0 mt-3 font-mono text-2xs text-muted-foreground\">grove check && astro build</p>\n </div>\n\n {/* Beat 3 — the outputs */}\n <div class=\"flex flex-col rounded-[calc(var(--radius)+0.25rem)] border border-border bg-surface-raised p-4\">\n <p class=\"m-0 text-2xs font-medium uppercase tracking-wider text-muted-foreground\">\n 3 · Published outputs\n </p>\n <ul class=\"m-0 mt-3 flex flex-1 list-none flex-col gap-2 p-0\">\n {outputs.map((output) => (\n <li class=\"flex items-baseline justify-between gap-3 text-[0.8125rem]\">\n <span class=\"font-medium text-foreground\">{output.label}</span>\n <span class=\"text-right text-2xs text-muted-foreground\">{output.detail}</span>\n </li>\n ))}\n </ul>\n </div>\n </div>\n\n <p class=\"m-0 mt-4 text-[0.8125rem] leading-relaxed text-muted-foreground\">\n The loop: edits arrive as pull requests to the files, weekly automation refreshes\n GitHub metadata, and every output above is regenerated from the same source —\n nothing is entered twice, nothing goes stale.\n </p>\n </div>\n</section>\n",
34
+ "content": "---\n/**\n * PipelineStrip — the file-first publishing story.\n *\n * Three beats: a record YAML (source of truth) → the Grove build →\n * the published outputs (this site, README, llms.txt, sitemap),\n * plus the sync loop (edits arrive as pull requests, automation\n * keeps every output current). The sample record shown is\n * illustrative markup, not live data — pass `samplePath` (a real\n * repo-relative path to one of your own records) to turn the \"Read\n * this file on GitHub\" link on; without it, the link is omitted.\n */\n\ninterface Props {\n /** Repository URL for the \"read the source\" link. */\n repoUrl?: string;\n /** Repo-relative path to a real sample record. No default — a\n * fresh scaffold has no records yet, so the link is omitted\n * unless you supply one. */\n samplePath?: string;\n class?: string;\n}\n\nconst { repoUrl, samplePath, class: className = '' } = Astro.props;\n\nconst sampleHref = repoUrl ? `${repoUrl.replace(/\\/$/, '')}/blob/main/${samplePath}` : undefined;\n\nconst outputs = [\n { label: 'This website', detail: 'browse, search, filters' },\n { label: 'README', detail: 'awesome-list generated' },\n { label: 'llms.txt', detail: 'machine-readable index' },\n { label: 'Sitemap + SEO', detail: 'structured data' },\n];\n---\n\n<section\n id=\"pipeline\"\n class:list={[\"scroll-mt-20 border-b border-border py-12 sm:py-16\", className]}\n aria-labelledby=\"pipeline-heading\"\n>\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n <header class=\"flex flex-col gap-2\">\n <span class=\"text-2xs font-medium uppercase tracking-wider text-muted-foreground\">\n How this site works\n </span>\n <h2\n id=\"pipeline-heading\"\n class=\"m-0 max-w-[40ch] text-[1.5rem] font-semibold tracking-tight text-foreground sm:text-[1.75rem]\"\n >\n Every listing is a plain YAML file.\n </h2>\n <p class=\"m-0 max-w-[64ch] text-[0.9375rem] leading-relaxed text-muted-foreground\">\n The content you're browsing lives as files in a repository. Grove builds them\n into this site and its machine-readable outputs — and keeps everything in sync\n when a file changes.\n </p>\n </header>\n\n <div class=\"mt-7 grid grid-cols-1 gap-3 md:grid-cols-3\">\n {/* Beat 1 — the source file */}\n <div class=\"flex flex-col rounded-[calc(var(--radius)+0.25rem)] border border-border bg-surface-raised p-4\">\n <p class=\"m-0 text-2xs font-medium uppercase tracking-wider text-muted-foreground\">\n 1 · Source file\n </p>\n <pre\n class=\"mt-3 flex-1 overflow-x-auto rounded-md bg-surface-sunken p-3 font-mono text-[0.75rem] leading-relaxed text-foreground\"\n ><code>name: Open WebUI\nslug: open-webui\ncategory: interfaces\nstacks: [typescript, python]\ntags: [chat, self-host, llm]\nlicenses: [mit]</code></pre>\n {sampleHref && (\n <a\n href={sampleHref}\n target=\"_blank\"\n rel=\"noopener\"\n class=\"mt-3 text-2xs font-medium text-muted-foreground underline decoration-border underline-offset-2 hover:text-foreground\"\n >\n Read this file on GitHub →\n </a>\n )}\n </div>\n\n {/* Beat 2 — the build */}\n <div class=\"flex flex-col rounded-[calc(var(--radius)+0.25rem)] border border-border bg-surface-raised p-4\">\n <p class=\"m-0 text-2xs font-medium uppercase tracking-wider text-muted-foreground\">\n 2 · Grove build\n </p>\n <ul class=\"m-0 mt-3 flex flex-1 list-none flex-col gap-2 p-0 text-[0.8125rem] leading-relaxed text-muted-foreground\">\n <li>Validates every record against the schema</li>\n <li>Joins taxonomy labels, health, and GitHub metadata</li>\n <li>Generates one index consumed by every output</li>\n </ul>\n <p class=\"m-0 mt-3 font-mono text-2xs text-muted-foreground\">grove check && astro build</p>\n </div>\n\n {/* Beat 3 — the outputs */}\n <div class=\"flex flex-col rounded-[calc(var(--radius)+0.25rem)] border border-border bg-surface-raised p-4\">\n <p class=\"m-0 text-2xs font-medium uppercase tracking-wider text-muted-foreground\">\n 3 · Published outputs\n </p>\n <ul class=\"m-0 mt-3 flex flex-1 list-none flex-col gap-2 p-0\">\n {outputs.map((output) => (\n <li class=\"flex items-baseline justify-between gap-3 text-[0.8125rem]\">\n <span class=\"font-medium text-foreground\">{output.label}</span>\n <span class=\"text-right text-2xs text-muted-foreground\">{output.detail}</span>\n </li>\n ))}\n </ul>\n </div>\n </div>\n\n <p class=\"m-0 mt-4 text-[0.8125rem] leading-relaxed text-muted-foreground\">\n The loop: edits arrive as pull requests to the files, weekly automation refreshes\n GitHub metadata, and every output above is regenerated from the same source —\n nothing is entered twice, nothing goes stale.\n </p>\n </div>\n</section>\n",
35
35
  "type": "registry:component",
36
36
  "target": "~/src/components/grove/pipeline-strip.astro"
37
37
  },
@@ -43,13 +43,13 @@
43
43
  },
44
44
  {
45
45
  "path": "default/components/grove/contributors-grid.astro",
46
- "content": "---\n/**\n * ContributorsGrid — avatar grid for the home page.\n *\n * Renders a dense grid of contributor avatars with optional name and\n * contribution count. Each tile links to the contributor's profile.\n * No blueprint-specific terms — works for any \"people\" feed.\n *\n * Empty tiles are skipped. When the list is empty the entire section\n * hides its body but keeps the header (so a \"no contributors yet\"\n * state can be wired by a consumer via a slot).\n */\n\nimport { compact } from '@grove-dev/core';\nimport EmptyState from '../ui/empty-state.astro';\n\ninterface Contributor {\n username: string;\n name?: string;\n avatarUrl?: string;\n profileUrl?: string;\n contributions?: number;\n}\n\ninterface Props {\n contributors: Contributor[];\n /** Total count to display in the header (e.g. \"1,234 contributors\"). */\n total?: number;\n /** Optional view-all href rendered top-right. */\n viewAllHref?: string;\n viewAllLabel?: string;\n title?: string;\n description?: string;\n /** Render per-user contribution counts (config: contributors.showContributionCount). */\n showContributionCount?: boolean;\n class?: string;\n}\n\nconst {\n contributors,\n total,\n viewAllHref,\n viewAllLabel = 'View all',\n title = 'Built by the community',\n description = 'The people improving this directory through code, curation, and review.',\n showContributionCount = true,\n class: className = '',\n} = Astro.props;\n\nconst visible = contributors.filter((c) => c.username).slice(0, 100);\n---\n\n<section\n class:list={[\"py-12 sm:py-16\", className]}\n aria-labelledby=\"grove-contributors-heading\"\n>\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n <header class=\"mb-6 flex flex-wrap items-end justify-between gap-3\">\n <div>\n <h2\n id=\"grove-contributors-heading\"\n class=\"m-0 text-[1.5rem] sm:text-[1.625rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100\"\n >\n {title}\n {typeof total === \"number\" && (\n <span class=\"ml-2 font-mono text-[0.9375rem] font-normal text-ink-500 dark:text-ink-400\">\n ({compact(total)})\n </span>\n )}\n </h2>\n {description && (\n <p class=\"m-0 mt-1 max-w-[60ch] text-[0.9375rem] text-ink-500 dark:text-ink-400\">\n {description}\n </p>\n )}\n </div>\n {viewAllHref && (\n <a\n href={viewAllHref}\n class=\"text-sm font-medium text-ink-500 hover:text-ink-900 dark:text-ink-400 dark:hover:text-ink-100\"\n >\n {viewAllLabel} →\n </a>\n )}\n </header>\n\n {visible.length === 0 ? (\n <EmptyState title=\"Community profiles appear after the first repository metadata sync.\" />\n ) : (\n <ul\n class=\"m-0 grid list-none grid-cols-[repeat(auto-fill,minmax(72px,1fr))] gap-x-3 gap-y-5 p-0\"\n aria-label=\"Contributors\"\n >\n {visible.map((c) => {\n const href = c.profileUrl ?? `https://github.com/${c.username}`;\n const avatar =\n c.avatarUrl ??\n `https://avatars.githubusercontent.com/${c.username}?v=4&s=80`;\n return (\n <li class=\"m-0 p-0\">\n <a\n href={href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"group flex flex-col items-center gap-1.5 p-2 text-center no-underline\"\n data-event=\"contributor_click\"\n data-event-source=\"contributors_grid\"\n >\n <img\n src={avatar}\n alt={c.name ?? c.username}\n width=\"48\"\n height=\"48\"\n loading=\"lazy\"\n decoding=\"async\"\n class=\"h-12 w-12 rounded-full border border-ink-200 object-cover dark:border-ink-800\"\n />\n <span class=\"line-clamp-1 text-2xs font-medium text-ink-700 group-hover:text-ink-900 dark:text-ink-300 dark:group-hover:text-ink-100\">\n {c.name ?? c.username}\n </span>\n {showContributionCount && typeof c.contributions === \"number\" && (\n <span class=\"font-mono text-2xs text-ink-400\">\n {compact(c.contributions)}\n </span>\n )}\n </a>\n </li>\n );\n })}\n </ul>\n )}\n </div>\n</section>\n",
46
+ "content": "---\n/**\n * ContributorsGrid — avatar grid for the home page.\n *\n * Renders a dense grid of contributor avatars with optional name and\n * contribution count. Each tile links to the contributor's profile.\n * No blueprint-specific terms — works for any \"people\" feed.\n *\n * Empty tiles are skipped. When the list is empty the entire section\n * hides its body but keeps the header (so a \"no contributors yet\"\n * state can be wired by a consumer via a slot).\n */\n\nimport { compact } from '@grove-dev/core';\nimport EmptyState from '../ui/empty-state.astro';\n\ninterface Contributor {\n username: string;\n name?: string;\n avatarUrl?: string;\n profileUrl?: string;\n contributions?: number;\n}\n\ninterface Props {\n contributors: Contributor[];\n /** Total count to display in the header (e.g. \"1,234 contributors\"). */\n total?: number;\n /** Optional view-all href rendered top-right. */\n viewAllHref?: string;\n viewAllLabel?: string;\n title?: string;\n description?: string;\n /** Render per-user contribution counts (config: contributors.showContributionCount). */\n showContributionCount?: boolean;\n class?: string;\n}\n\nconst {\n contributors,\n total,\n viewAllHref,\n viewAllLabel = 'View all',\n title = 'Built by the community',\n description = 'The people improving this directory through code, curation, and review.',\n showContributionCount = true,\n class: className = '',\n} = Astro.props;\n\nconst visible = contributors.filter((c) => c.username).slice(0, 100);\n---\n\n<section\n class:list={[\"py-12 sm:py-16\", className]}\n aria-labelledby=\"grove-contributors-heading\"\n>\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n <header class=\"mb-6 flex flex-wrap items-end justify-between gap-3\">\n <div>\n <h2\n id=\"grove-contributors-heading\"\n class=\"m-0 text-[1.5rem] sm:text-[1.625rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100\"\n >\n {title}\n {typeof total === \"number\" && (\n <span class=\"ml-2 font-mono text-[0.9375rem] font-normal text-ink-500 dark:text-ink-400\">\n ({compact(total)})\n </span>\n )}\n </h2>\n {description && (\n <p class=\"m-0 mt-1 max-w-[60ch] text-[0.9375rem] text-ink-500 dark:text-ink-400\">\n {description}\n </p>\n )}\n </div>\n {viewAllHref && (\n <a\n href={viewAllHref}\n class=\"text-sm font-medium text-ink-500 hover:text-ink-900 dark:text-ink-400 dark:hover:text-ink-100\"\n >\n {viewAllLabel} →\n </a>\n )}\n </header>\n\n {visible.length === 0 ? (\n <EmptyState title=\"Community profiles appear after the first repository metadata sync.\" />\n ) : (\n <ul\n class=\"m-0 grid list-none grid-cols-[repeat(auto-fill,minmax(72px,1fr))] gap-x-3 gap-y-5 p-0\"\n aria-label=\"Contributors\"\n >\n {visible.map((c) => {\n const href = c.profileUrl ?? `https://github.com/${c.username}`;\n const avatar =\n c.avatarUrl ??\n `https://avatars.githubusercontent.com/${c.username}?v=4&s=80`;\n return (\n <li class=\"m-0 p-0\">\n <a\n href={href}\n target=\"_blank\"\n rel=\"noopener\"\n class=\"group flex flex-col items-center gap-1.5 p-2 text-center no-underline\"\n data-event=\"contributor_click\"\n data-event-source=\"contributors_grid\"\n >\n <img\n src={avatar}\n alt={c.name ?? c.username}\n width=\"48\"\n height=\"48\"\n loading=\"lazy\"\n decoding=\"async\"\n class=\"h-12 w-12 rounded-full border border-ink-200 object-cover dark:border-ink-800\"\n />\n <span class=\"line-clamp-1 text-2xs font-medium text-ink-700 group-hover:text-ink-900 dark:text-ink-300 dark:group-hover:text-ink-100\">\n {c.name ?? c.username}\n </span>\n {showContributionCount && typeof c.contributions === \"number\" && (\n <span class=\"font-mono text-2xs text-ink-400\">\n {compact(c.contributions)}\n </span>\n )}\n </a>\n </li>\n );\n })}\n </ul>\n )}\n </div>\n</section>\n",
47
47
  "type": "registry:component",
48
48
  "target": "~/src/components/grove/contributors-grid.astro"
49
49
  },
50
50
  {
51
51
  "path": "default/components/grove/original-collection.astro",
52
- "content": "---\nimport { compact } from '@grove-dev/core';\n/**\n * OriginalCollection — legacy lineage card.\n *\n * Renders a single wide card that links out to the project's origin\n * repository, with stars/forks/contributors stats. Used on home and\n * about pages to give visitors a way to find the original curated\n * collection this directory descends from.\n *\n * Generic: takes plain `stats` and a `repoUrl`. No blueprint or\n * site-specific copy.\n */\nimport { buttonClass } from '../../lib/classnames.ts';\n\ninterface OriginStats {\n stars?: number;\n forks?: number;\n contributors?: number;\n description?: string;\n}\n\ninterface Props {\n repoUrl: string;\n repoLabel?: string;\n stats?: OriginStats;\n title?: string;\n description?: string;\n class?: string;\n}\n\nconst {\n repoUrl,\n repoLabel = 'View on GitHub',\n stats = {},\n title = 'A growing list, forked from the original',\n description = 'This directory descends from an earlier curated collection. The original still lives on — same shape, same spirit, fresh data.',\n class: className = '',\n} = Astro.props;\n\nconst hasStats =\n stats.stars !== undefined || stats.forks !== undefined || stats.contributors !== undefined;\n---\n\n<section class:list={[\"py-12 sm:py-16\", className]}>\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n <div\n class=\"rounded-[calc(var(--radius)+0.25rem)] border border-border bg-card shadow-none transition-colors flex flex-col gap-4 p-6 sm:flex-row sm:items-center sm:justify-between\"\n >\n <div class=\"flex flex-col gap-2\">\n <span class=\"text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">\n Origin\n </span>\n <h2 class=\"m-0 text-[1.25rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100\">\n {title}\n </h2>\n <p class=\"m-0 max-w-2xl text-[0.875rem] text-ink-500 dark:text-ink-400\">\n {description}\n </p>\n {stats.description && (\n <p class=\"m-0 max-w-2xl text-[0.8125rem] text-ink-500 dark:text-ink-400\">\n {stats.description}\n </p>\n )}\n {hasStats && (\n <dl\n class=\"mt-2 flex flex-wrap items-center gap-x-4 gap-y-1 text-2xs text-ink-500 dark:text-ink-400\"\n aria-label=\"Original repository signals\"\n >\n {stats.stars !== undefined && (\n <div class=\"flex items-center gap-1\">\n <dd class=\"m-0 font-mono\">{compact(stats.stars)}</dd>\n <dt>stars</dt>\n </div>\n )}\n {stats.forks !== undefined && (\n <div class=\"flex items-center gap-1\">\n <dd class=\"m-0 font-mono\">{compact(stats.forks)}</dd>\n <dt>forks</dt>\n </div>\n )}\n {stats.contributors !== undefined && (\n <div class=\"flex items-center gap-1\">\n <dd class=\"m-0 font-mono\">\n {compact(stats.contributors)}\n </dd>\n <dt>contributors</dt>\n </div>\n )}\n </dl>\n )}\n </div>\n <div class=\"flex flex-shrink-0 items-center gap-2\">\n <a\n href={repoUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class={buttonClass(\"primary\", \"sm\")}\n data-event=\"original_collection_click\"\n data-event-source=\"original_collection\"\n >\n {repoLabel} →\n </a>\n </div>\n </div>\n </div>\n</section>\n",
52
+ "content": "---\nimport { compact } from '@grove-dev/core';\n/**\n * OriginalCollection — legacy lineage card.\n *\n * Renders a single wide card that links out to the project's origin\n * repository, with stars/forks/contributors stats. Used on home and\n * about pages to give visitors a way to find the original curated\n * collection this directory descends from.\n *\n * Generic: takes plain `stats` and a `repoUrl`. No blueprint or\n * site-specific copy.\n */\nimport { buttonClass } from '../../lib/classnames.ts';\n\ninterface OriginStats {\n stars?: number;\n forks?: number;\n contributors?: number;\n description?: string;\n}\n\ninterface Props {\n repoUrl: string;\n repoLabel?: string;\n stats?: OriginStats;\n title?: string;\n description?: string;\n class?: string;\n}\n\nconst {\n repoUrl,\n repoLabel = 'View on GitHub',\n stats = {},\n title = 'A growing list, forked from the original',\n description = 'This directory descends from an earlier curated collection. The original still lives on — same shape, same spirit, fresh data.',\n class: className = '',\n} = Astro.props;\n\nconst hasStats =\n stats.stars !== undefined || stats.forks !== undefined || stats.contributors !== undefined;\n---\n\n<section class:list={[\"py-12 sm:py-16\", className]}>\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n <div\n class=\"rounded-[calc(var(--radius)+0.25rem)] border border-border bg-card shadow-none transition-colors flex flex-col gap-4 p-6 sm:flex-row sm:items-center sm:justify-between\"\n >\n <div class=\"flex flex-col gap-2\">\n <span class=\"text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">\n Origin\n </span>\n <h2 class=\"m-0 text-[1.25rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100\">\n {title}\n </h2>\n <p class=\"m-0 max-w-2xl text-[0.875rem] text-ink-500 dark:text-ink-400\">\n {description}\n </p>\n {stats.description && (\n <p class=\"m-0 max-w-2xl text-[0.8125rem] text-ink-500 dark:text-ink-400\">\n {stats.description}\n </p>\n )}\n {hasStats && (\n <dl\n class=\"mt-2 flex flex-wrap items-center gap-x-4 gap-y-1 text-2xs text-ink-500 dark:text-ink-400\"\n aria-label=\"Original repository signals\"\n >\n {stats.stars !== undefined && (\n <div class=\"flex items-center gap-1\">\n <dd class=\"m-0 font-mono\">{compact(stats.stars)}</dd>\n <dt>stars</dt>\n </div>\n )}\n {stats.forks !== undefined && (\n <div class=\"flex items-center gap-1\">\n <dd class=\"m-0 font-mono\">{compact(stats.forks)}</dd>\n <dt>forks</dt>\n </div>\n )}\n {stats.contributors !== undefined && (\n <div class=\"flex items-center gap-1\">\n <dd class=\"m-0 font-mono\">\n {compact(stats.contributors)}\n </dd>\n <dt>contributors</dt>\n </div>\n )}\n </dl>\n )}\n </div>\n <div class=\"flex flex-shrink-0 items-center gap-2\">\n <a\n href={repoUrl}\n target=\"_blank\"\n rel=\"noopener\"\n class={buttonClass(\"primary\", \"sm\")}\n data-event=\"original_collection_click\"\n data-event-source=\"original_collection\"\n >\n {repoLabel} →\n </a>\n </div>\n </div>\n </div>\n</section>\n",
53
53
  "type": "registry:component",
54
54
  "target": "~/src/components/grove/original-collection.astro"
55
55
  },
@@ -58,11 +58,17 @@
58
58
  "content": "---\nimport { buttonClass } from '../../lib/classnames.ts';\n\ninterface Props {\n itemLabel?: string;\n itemsLabel?: string;\n browseHref?: string;\n submitHref?: string;\n class?: string;\n}\n\nconst {\n itemLabel = 'item',\n itemsLabel = 'items',\n browseHref = '/items',\n submitHref = '/submit',\n class: className = '',\n} = Astro.props;\n---\n\n<section class:list={[\"border-t border-ink-200 py-10 sm:py-12 dark:border-ink-800\", className]} aria-labelledby=\"grove-final-cta-heading\">\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n <div class=\"rounded-[calc(var(--radius)+0.25rem)] border border-border bg-card px-6 py-7 sm:flex sm:items-center sm:justify-between sm:gap-10 sm:px-8 sm:py-8 dark:border-ink-800\">\n <div class=\"max-w-2xl\">\n <p class=\"m-0 text-2xs font-semibold uppercase tracking-wider text-ink-500 dark:text-ink-400\">Keep the directory useful</p>\n <h2 id=\"grove-final-cta-heading\" class=\"m-0 mt-1.5 text-[1.5rem] font-semibold tracking-tight text-ink-900 sm:text-[1.75rem] dark:text-ink-100\">\n Know {itemLabel === \"app\" ? \"an\" : \"a\"} {itemLabel} that belongs here?\n </h2>\n <p class=\"m-0 mt-2 max-w-xl text-sm leading-relaxed text-ink-500 dark:text-ink-400\">\n Add a real, inspectable project or improve the metadata behind an existing listing.\n </p>\n </div>\n <div class=\"mt-5 flex shrink-0 flex-wrap items-center gap-2 sm:mt-0 sm:justify-end\">\n <a href={submitHref} class={buttonClass(\"primary\", \"md\", \"px-4\")}>\n Submit {itemLabel}\n </a>\n <a href={browseHref} class={buttonClass(\"outline\", \"md\", \"px-4\")}>\n Explore {itemsLabel}\n </a>\n </div>\n </div>\n </div>\n</section>\n",
59
59
  "type": "registry:component",
60
60
  "target": "~/src/components/grove/final-cta.astro"
61
+ },
62
+ {
63
+ "path": "default/components/grove/hero-proof.astro",
64
+ "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",
65
+ "type": "registry:component",
66
+ "target": "~/src/components/grove/hero-proof.astro"
61
67
  }
62
68
  ],
63
69
  "meta": {
64
- "version": "1.3.0",
65
- "requiresGrove": "0.17.0"
70
+ "version": "1.4.0",
71
+ "requiresGrove": "0.19.0"
66
72
  },
67
73
  "type": "registry:block"
68
74
  }
@@ -16,8 +16,8 @@
16
16
  }
17
17
  ],
18
18
  "meta": {
19
- "version": "1.3.0",
20
- "requiresGrove": "0.17.0"
19
+ "version": "1.4.0",
20
+ "requiresGrove": "0.19.0"
21
21
  },
22
22
  "type": "registry:block"
23
23
  }
@@ -6,7 +6,7 @@
6
6
  "files": [
7
7
  {
8
8
  "path": "default/components/grove/project-card.astro",
9
- "content": "---\n/**\n * ProjectCard — the canonical card for one directory record.\n *\n * V1 (v0.5.0) refined design for the three-column grid, now shared by\n * every listing surface (home sections, browse results, collection\n * entries, taxonomy pages) through thin adapters (`IndexRow`,\n * `CollectionRow`):\n *\n * - Default mode: the whole card is one clickable `<a>` (cursor:\n * pointer, subtle border + surface lift on hover, no more than\n * 1–2px vertical motion).\n * - When the record has a repository the root becomes an\n * `<article>` with a stretched title link, because nesting `<a>`\n * inside `<a>` is invalid HTML. The `owner/repo` line is a real\n * link to the repository and sits above the stretched overlay\n * (`relative z-10`).\n * - App icon top-left (48px), app name + clickable owner/repo,\n * two-line description with reserved vertical space.\n * - Footer row: stack logos on the left, stars and last-updated on\n * the right, navigation arrow anchored bottom-right.\n *\n * **The layout is fixed.** Earlier versions let list pages opt into a\n * curated badge, a license tag, a `category · status` line and\n * labelled chip rows, so the same record rendered differently\n * depending on where a visitor found it. Platform support is\n * likewise off the card: it is reference detail and belongs on the\n * record page (`RecordSidebar`).\n *\n * Presentation only: this component takes a pre-built\n * `ProjectCardModel` (see `@grove-dev/astro/server`'s\n * `buildProjectCardModel`) and renders it — no record shapes, casts,\n * or formatting live here. Callers that render a raw record (or a\n * lightweight adapter shape like `CollectionEntry`) build the model\n * themselves before reaching this component.\n *\n * Uses the package's design-system tokens plus the standard `dark:`\n * variant. Equal-height cards in the row are achieved at the grid\n * level (`CardGrid`: `grid` + `items-stretch`).\n */\nimport type { ProjectCardModel } from '@grove-dev/astro/server';\nimport CardIcon from './card-icon.astro';\nimport Icon from './icon.astro';\n\ninterface Props {\n /** Pre-built view-model — see `buildProjectCardModel`. */\n model: ProjectCardModel;\n /** Full detail-page URL. */\n href: string;\n /** Eager-load the avatar (above-the-fold rows). */\n eager?: boolean;\n /** Analytics data-event attributes on the card root. */\n event?: string;\n eventSource?: string;\n class?: string;\n}\n\nconst { model, href, eager = false, event, eventSource, class: className = '' } = Astro.props;\n\nconst {\n name,\n slug,\n description,\n initials,\n avatarUrl,\n repoHref,\n owner,\n repo,\n isArticle,\n stars,\n starsLabel,\n hasStars,\n pushedAt,\n updatedLabel,\n hasUpdated,\n visibleStacks,\n stackOverflow,\n hasStacks,\n} = model;\n\nconst Root = isArticle ? 'article' : 'a';\nconst rootAttrs = isArticle ? {} : { href, 'aria-label': `Open ${name}` };\n---\n\n<Root\n {...rootAttrs}\n class={`group relative flex h-full min-w-0 flex-col gap-3 rounded-xl border border-ink-200 bg-card p-5 outline-none transition-[border-color,background-color,transform] duration-150 hover:-translate-y-0.5 hover:border-ink-400 hover:bg-ink-50 focus-visible:border-ink-500 focus-visible:ring-2 focus-visible:ring-ink-900/15 dark:border-ink-800 dark:hover:border-ink-600 dark:hover:bg-ink-900 dark:focus-visible:border-ink-500 dark:focus-visible:ring-ink-100/15 ${className}`}\n data-record-slug={slug}\n data-event={event}\n data-event-source={eventSource}\n data-event-item={event ? slug : undefined}\n>\n {/* Header: icon + name + owner.\n\n The initials chip is always in the DOM, `hidden` behind the image,\n and unhidden by the image's own `onerror` — the same pattern\n `Icon.astro` uses. Rendering it only when `avatarUrl` is falsy made\n it unreachable for every record with a GitHub owner, so a dead\n logo URL or a renamed org showed the browser's broken-image glyph\n instead of a fallback. */}\n <header class=\"flex items-start gap-3\">\n {avatarUrl && (\n <img\n src={avatarUrl}\n alt=\"\"\n width=\"48\"\n height=\"48\"\n loading={eager ? \"eager\" : \"lazy\"}\n fetchpriority={eager ? \"high\" : undefined}\n decoding=\"async\"\n onerror=\"this.hidden=true;this.nextElementSibling.hidden=false\"\n class=\"h-12 w-12 shrink-0 rounded-lg bg-white object-contain p-1\"\n />\n )}\n <span\n aria-hidden=\"true\"\n hidden={Boolean(avatarUrl)}\n data-grove-card-fallback-initials\n class=\"flex h-12 w-12 shrink-0 items-center justify-center rounded-lg bg-ink-100 text-base font-semibold uppercase text-ink-700 dark:bg-ink-800 dark:text-ink-200\"\n >\n {initials}\n </span>\n\n <div class=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n <h3 class=\"m-0 truncate text-[17px] font-semibold leading-snug tracking-tight text-ink-900 sm:text-[18px] dark:text-ink-100\">\n {isArticle ? (\n <a\n href={href}\n class=\"text-inherit no-underline before:absolute before:inset-0 before:z-0 before:content-['']\"\n >\n {name}\n </a>\n ) : (\n name\n )}\n </h3>\n {owner && repo && (\n <p class=\"m-0 truncate font-mono text-[13px] text-ink-500 dark:text-ink-400\">\n {repoHref ? (\n <a\n href={repoHref}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n title={`${owner}/${repo} on GitHub`}\n data-event=\"external_repo_click\"\n data-event-source=\"project_card_repo\"\n data-event-item={slug}\n class=\"relative z-10 text-inherit no-underline transition-colors hover:text-ink-900 hover:underline dark:hover:text-ink-100\"\n >\n {owner}<span class=\"opacity-60\">/</span>{repo}\n </a>\n ) : (\n <Fragment>{owner}<span class=\"opacity-60\">/</span>{repo}</Fragment>\n )}\n </p>\n )}\n </div>\n </header>\n\n {/* Description — two-line clamp with reserved vertical space */}\n <p\n class=\"m-0 line-clamp-2 min-h-[42px] text-[14px] leading-[1.5] text-ink-500 dark:text-ink-400\"\n >\n {description}\n </p>\n\n {/* Footer: stack logos · stars/updated · arrow */}\n <footer class=\"mt-auto flex items-center justify-between gap-3 text-[12px] sm:text-[13px]\">\n {hasStacks ? (\n <div class=\"flex min-w-0 items-center gap-2 text-ink-500 dark:text-ink-400\">\n {visibleStacks.map((stack) => (\n <Icon name={stack} category=\"stack\" size={16} title={stack} />\n ))}\n {stackOverflow > 0 && (\n <span class=\"text-[12px] text-ink-500 dark:text-ink-400\">+{stackOverflow}</span>\n )}\n </div>\n ) : (\n /* Keeps the footer's stars/updated block right-aligned without\n shipping an empty flex container on every stackless card. */\n <span></span>\n )}\n\n <div class=\"flex min-w-0 shrink-0 items-center gap-3 text-ink-500 dark:text-ink-400\">\n {hasStars && (\n <span class=\"inline-flex items-center gap-1\" title={`${stars ?? 0} stars on GitHub`}>\n <span class=\"inline-flex text-warning\"><CardIcon name=\"star\" /></span>\n <span class=\"font-mono\">{starsLabel}</span>\n </span>\n )}\n {hasUpdated && (\n <span class=\"whitespace-nowrap\" title={`Last updated ${pushedAt}`}>\n Updated {updatedLabel}\n </span>\n )}\n <CardIcon\n name=\"arrow\"\n class=\"shrink-0 text-ink-400 transition-colors group-hover:text-ink-700 dark:text-ink-500 dark:group-hover:text-ink-100\"\n />\n </div>\n </footer>\n</Root>\n",
9
+ "content": "---\n/**\n * ProjectCard — the canonical card for one directory record.\n *\n * V1 (v0.5.0) refined design for the three-column grid, now shared by\n * every listing surface (home sections, browse results, collection\n * entries, taxonomy pages) through thin adapters (`IndexRow`,\n * `CollectionRow`):\n *\n * - Default mode: the whole card is one clickable `<a>` (cursor:\n * pointer, subtle border + surface lift on hover, no more than\n * 1–2px vertical motion).\n * - When the record has a repository the root becomes an\n * `<article>` with a stretched title link, because nesting `<a>`\n * inside `<a>` is invalid HTML. The `owner/repo` line is a real\n * link to the repository and sits above the stretched overlay\n * (`relative z-10`).\n * - App icon top-left (48px), app name + clickable owner/repo,\n * two-line description with reserved vertical space.\n * - Footer row: stack logos on the left, stars and last-updated on\n * the right, navigation arrow anchored bottom-right.\n *\n * **The layout is fixed.** Earlier versions let list pages opt into a\n * curated badge, a license tag, a `category · status` line and\n * labelled chip rows, so the same record rendered differently\n * depending on where a visitor found it. Platform support is\n * likewise off the card: it is reference detail and belongs on the\n * record page (`RecordSidebar`).\n *\n * Presentation only: this component takes a pre-built\n * `ProjectCardModel` (see `@grove-dev/astro/server`'s\n * `buildProjectCardModel`) and renders it — no record shapes, casts,\n * or formatting live here. Callers that render a raw record (or a\n * lightweight adapter shape like `CollectionEntry`) build the model\n * themselves before reaching this component.\n *\n * Uses the package's design-system tokens plus the standard `dark:`\n * variant. Equal-height cards in the row are achieved at the grid\n * level (`CardGrid`: `grid` + `items-stretch`).\n */\nimport type { ProjectCardModel } from '@grove-dev/astro/server';\nimport CardIcon from './card-icon.astro';\nimport Icon from './icon.astro';\n\ninterface Props {\n /** Pre-built view-model — see `buildProjectCardModel`. */\n model: ProjectCardModel;\n /** Full detail-page URL. */\n href: string;\n /** Eager-load the avatar (above-the-fold rows). */\n eager?: boolean;\n /** Analytics data-event attributes on the card root. */\n event?: string;\n eventSource?: string;\n class?: string;\n}\n\nconst { model, href, eager = false, event, eventSource, class: className = '' } = Astro.props;\n\nconst {\n name,\n slug,\n description,\n initials,\n avatarUrl,\n repoHref,\n owner,\n repo,\n isArticle,\n stars,\n starsLabel,\n hasStars,\n pushedAt,\n updatedLabel,\n hasUpdated,\n visibleStacks,\n stackOverflow,\n hasStacks,\n} = model;\n\nconst Root = isArticle ? 'article' : 'a';\nconst rootAttrs = isArticle ? {} : { href, 'aria-label': `Open ${name}` };\n---\n\n<Root\n {...rootAttrs}\n class={`group relative flex h-full min-w-0 flex-col gap-3 rounded-xl border border-ink-200 bg-card p-5 outline-none transition-[border-color,background-color,transform] duration-150 hover:-translate-y-0.5 hover:border-ink-400 hover:bg-ink-50 focus-visible:border-ink-500 focus-visible:ring-2 focus-visible:ring-ink-900/15 dark:border-ink-800 dark:hover:border-ink-600 dark:hover:bg-ink-900 dark:focus-visible:border-ink-500 dark:focus-visible:ring-ink-100/15 ${className}`}\n data-record-slug={slug}\n data-event={event}\n data-event-source={eventSource}\n data-event-item={event ? slug : undefined}\n>\n {/* Header: icon + name + owner.\n\n The initials chip is always in the DOM, `hidden` behind the image,\n and unhidden by the image's own `onerror` — the same pattern\n `Icon.astro` uses. Rendering it only when `avatarUrl` is falsy made\n it unreachable for every record with a GitHub owner, so a dead\n logo URL or a renamed org showed the browser's broken-image glyph\n instead of a fallback. */}\n <header class=\"flex items-start gap-3\">\n {avatarUrl && (\n <img\n src={avatarUrl}\n alt=\"\"\n width=\"48\"\n height=\"48\"\n loading={eager ? \"eager\" : \"lazy\"}\n fetchpriority={eager ? \"high\" : undefined}\n decoding=\"async\"\n onerror=\"this.hidden=true;this.nextElementSibling.hidden=false\"\n class=\"h-12 w-12 shrink-0 rounded-lg bg-white object-contain p-1\"\n />\n )}\n <span\n aria-hidden=\"true\"\n hidden={Boolean(avatarUrl)}\n data-grove-card-fallback-initials\n class=\"flex h-12 w-12 shrink-0 items-center justify-center rounded-lg bg-ink-100 text-base font-semibold uppercase text-ink-700 dark:bg-ink-800 dark:text-ink-200\"\n >\n {initials}\n </span>\n\n <div class=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n <h3 class=\"m-0 truncate text-[17px] font-semibold leading-snug tracking-tight text-ink-900 sm:text-[18px] dark:text-ink-100\">\n {isArticle ? (\n <a\n href={href}\n class=\"text-inherit no-underline before:absolute before:inset-0 before:z-0 before:content-['']\"\n >\n {name}\n </a>\n ) : (\n name\n )}\n </h3>\n {owner && repo && (\n <p class=\"m-0 truncate font-mono text-[13px] text-ink-500 dark:text-ink-400\">\n {repoHref ? (\n <a\n href={repoHref}\n target=\"_blank\"\n rel=\"noopener\"\n title={`${owner}/${repo} on GitHub`}\n data-event=\"external_repo_click\"\n data-event-source=\"project_card_repo\"\n data-event-item={slug}\n class=\"relative z-10 text-inherit no-underline transition-colors hover:text-ink-900 hover:underline dark:hover:text-ink-100\"\n >\n {owner}<span class=\"opacity-60\">/</span>{repo}\n </a>\n ) : (\n <Fragment>{owner}<span class=\"opacity-60\">/</span>{repo}</Fragment>\n )}\n </p>\n )}\n </div>\n </header>\n\n {/* Description — two-line clamp with reserved vertical space */}\n <p\n class=\"m-0 line-clamp-2 min-h-[42px] text-[14px] leading-[1.5] text-ink-500 dark:text-ink-400\"\n >\n {description}\n </p>\n\n {/* Footer: stack logos · stars/updated · arrow */}\n <footer class=\"mt-auto flex items-center justify-between gap-3 text-[12px] sm:text-[13px]\">\n {hasStacks ? (\n <div class=\"flex min-w-0 items-center gap-2 text-ink-500 dark:text-ink-400\">\n {visibleStacks.map((stack) => (\n <Icon name={stack} category=\"stack\" size={16} title={stack} />\n ))}\n {stackOverflow > 0 && (\n <span class=\"text-[12px] text-ink-500 dark:text-ink-400\">+{stackOverflow}</span>\n )}\n </div>\n ) : (\n /* Keeps the footer's stars/updated block right-aligned without\n shipping an empty flex container on every stackless card. */\n <span></span>\n )}\n\n <div class=\"flex min-w-0 shrink-0 items-center gap-3 text-ink-500 dark:text-ink-400\">\n {hasStars && (\n <span class=\"inline-flex items-center gap-1\" title={`${stars ?? 0} stars on GitHub`}>\n <span class=\"inline-flex text-warning\"><CardIcon name=\"star\" /></span>\n <span class=\"font-mono\">{starsLabel}</span>\n </span>\n )}\n {hasUpdated && (\n <span class=\"whitespace-nowrap\" title={`Last updated ${pushedAt}`}>\n Updated {updatedLabel}\n </span>\n )}\n <CardIcon\n name=\"arrow\"\n class=\"shrink-0 text-ink-400 transition-colors group-hover:text-ink-700 dark:text-ink-500 dark:group-hover:text-ink-100\"\n />\n </div>\n </footer>\n</Root>\n",
10
10
  "type": "registry:component",
11
11
  "target": "~/src/components/grove/project-card.astro"
12
12
  },
@@ -42,8 +42,8 @@
42
42
  }
43
43
  ],
44
44
  "meta": {
45
- "version": "1.3.0",
46
- "requiresGrove": "0.17.0"
45
+ "version": "1.4.0",
46
+ "requiresGrove": "0.19.0"
47
47
  },
48
48
  "type": "registry:block"
49
49
  }
@@ -11,19 +11,19 @@
11
11
  "files": [
12
12
  {
13
13
  "path": "default/pages/[slug]/[recordSlug].astro",
14
- "content": "---\n/**\n * Detail page — thin consumer wiring up the package's\n * RecordHeader, EditorialSummary, TableOfContents, MarkdownBody,\n * and RecordSidebar components. All rendering logic, prose\n * styling, sidebar visibility, and activity-badge rules live in\n * `@grove-dev/astro`; this file only composes them.\n */\nimport records from '@grove/generated/records.json';\nimport siteConfig from '@grove/generated/site-config.json';\nimport {\n getRecordContextModel,\n getRecordDetailModel,\n loadCollections,\n recordDetailPaths,\n recordsToCollectionEntries,\n} from '@grove-dev/astro/server';\nimport EditorialSummary from '../../components/grove/editorial-summary.astro';\nimport MarkdownBody from '../../components/grove/markdown-body.astro';\nimport RecordHeader from '../../components/grove/record-header.astro';\nimport RecordRelations from '../../components/grove/record-relations.astro';\nimport RecordSidebar from '../../components/grove/record-sidebar.astro';\nimport RelatedRecords from '../../components/grove/related-records.astro';\nimport TableOfContents from '../../components/grove/table-of-contents.astro';\nimport BaseLayout from '../../layouts/base-layout.astro';\n\nexport function getStaticPaths() {\n return recordDetailPaths(siteConfig);\n}\n\nconst dirSlug = siteConfig.blueprintConfig?.routeSlug ?? 'projects';\nconst detail = getRecordDetailModel(\n Astro.params.recordSlug ?? '',\n siteConfig,\n Astro.params.slug ?? dirSlug,\n);\nif (!detail) return Astro.redirect(`/${dirSlug}`);\nconst { record, itemSingular, seo } = detail;\n\n// Where this page links out to: subject hubs, sibling records, and the\n// collections the record appears in.\nconst context = getRecordContextModel(record, {\n collections: await loadCollections(process.cwd()),\n entries: recordsToCollectionEntries(\n (records as { records: unknown[] }).records as never,\n siteConfig,\n ),\n subjects: siteConfig.taxonomy?.subjects ?? [],\n});\n---\n\n<BaseLayout\n title={seo.title}\n description={seo.description}\n image={seo.image}\n imageAlt={seo.imageAlt}\n site={siteConfig}\n type=\"article\"\n jsonLd={seo.jsonLd}\n submitHref=\"/submit\"\n submitLabel={`Submit ${itemSingular}`}\n>\n <article class=\"py-8 sm:py-10\">\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n <RecordHeader detail={detail} />\n <RecordRelations relations={context.relations} />\n\n <div\n class=\"grid grid-cols-1 gap-10 lg:grid-cols-[minmax(0,1fr)_300px] lg:gap-12\"\n >\n {/* Reading column: editorial context, then the article —\n no TOC panel pushing the body down. */}\n <div class=\"min-w-0\">\n <EditorialSummary\n bestFor={detail.bestFor}\n caveats={detail.caveats}\n whyListed={detail.whyListed}\n />\n <MarkdownBody\n recordSlug={record.slug}\n fallback={record.content ? \"This record doesn't have notes yet.\" : undefined}\n />\n </div>\n {/* Right rail: the TOC and nothing else. */}\n <div class=\"min-w-0 lg:sticky lg:top-20 lg:max-h-[calc(100vh-5rem)] lg:self-start lg:overflow-y-auto\">\n <TableOfContents items={detail.toc} />\n </div>\n </div>\n\n <RelatedRecords context={context} />\n\n {/* Metadata panels — full width below the article. */}\n <section class=\"mt-12 border-t border-border pt-8\" aria-label=\"Project details\">\n <RecordSidebar detail={detail} sticky={false} layout=\"grid\" />\n </section>\n </div>\n </article>\n</BaseLayout>\n",
14
+ "content": "---\n/**\n * Detail page — thin consumer wiring up the package's\n * RecordHeader, EditorialSummary, TableOfContents, MarkdownBody,\n * and RecordSidebar components. All rendering logic, prose\n * styling, sidebar visibility, and activity-badge rules live in\n * `@grove-dev/astro`; this file only composes them.\n */\nimport records from '@grove/generated/records.json';\nimport siteConfig from '@grove/generated/site-config.json';\nimport {\n getRecordContextModel,\n getRecordDetailModel,\n loadCollections,\n recordDetailPaths,\n recordsToCollectionEntries,\n} from '@grove-dev/astro/server';\nimport EditorialSummary from '../../components/grove/editorial-summary.astro';\nimport MarkdownBody from '../../components/grove/markdown-body.astro';\nimport RecordHeader from '../../components/grove/record-header.astro';\nimport RecordRelations from '../../components/grove/record-relations.astro';\nimport RecordSidebar from '../../components/grove/record-sidebar.astro';\nimport RelatedRecords from '../../components/grove/related-records.astro';\nimport TableOfContents from '../../components/grove/table-of-contents.astro';\nimport BaseLayout from '../../layouts/base-layout.astro';\n\nexport function getStaticPaths() {\n return recordDetailPaths(siteConfig);\n}\n\nconst dirSlug = siteConfig.blueprintConfig?.routeSlug ?? 'projects';\nconst detail = getRecordDetailModel(\n Astro.params.recordSlug ?? '',\n siteConfig,\n Astro.params.slug ?? dirSlug,\n);\nif (!detail) return Astro.redirect(`/${dirSlug}`);\nconst { record, itemSingular, seo } = detail;\n\n// Where this page links out to: subject hubs, sibling records, and the\n// collections the record appears in.\nconst context = getRecordContextModel(record, {\n collections: await loadCollections(process.cwd()),\n entries: recordsToCollectionEntries(\n (records as { records: unknown[] }).records as never,\n siteConfig,\n ),\n subjects: siteConfig.taxonomy?.subjects ?? [],\n});\n---\n\n<BaseLayout\n title={seo.title}\n description={seo.description}\n image={seo.image}\n imageAlt={seo.imageAlt}\n site={siteConfig}\n type=\"article\"\n jsonLd={seo.jsonLd}\n noindex={seo.noindex}\n robots={seo.robots}\n submitHref=\"/submit\"\n submitLabel={`Submit ${itemSingular}`}\n>\n <article class=\"py-8 sm:py-10\">\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n <RecordHeader detail={detail} />\n <RecordRelations relations={context.relations} />\n\n <div\n class=\"grid grid-cols-1 gap-10 lg:grid-cols-[minmax(0,1fr)_300px] lg:gap-12\"\n >\n {/* Reading column: editorial context, then the article —\n no TOC panel pushing the body down. */}\n <div class=\"min-w-0\">\n <EditorialSummary\n bestFor={detail.bestFor}\n caveats={detail.caveats}\n whyListed={detail.whyListed}\n />\n <MarkdownBody\n recordSlug={record.slug}\n fallback={record.content ? \"This record doesn't have notes yet.\" : undefined}\n />\n </div>\n {/* Right rail: the TOC and nothing else. */}\n <div class=\"min-w-0 lg:sticky lg:top-20 lg:max-h-[calc(100vh-5rem)] lg:self-start lg:overflow-y-auto\">\n <TableOfContents items={detail.toc} />\n </div>\n </div>\n\n <RelatedRecords context={context} />\n\n {/* Metadata panels — full width below the article. */}\n <section class=\"mt-12 border-t border-border pt-8\" aria-label=\"Project details\">\n <RecordSidebar detail={detail} sticky={false} layout=\"grid\" />\n </section>\n </div>\n </article>\n</BaseLayout>\n",
15
15
  "type": "registry:page",
16
16
  "target": "~/src/pages/[slug]/[recordSlug].astro"
17
17
  },
18
18
  {
19
19
  "path": "default/components/grove/record-header.astro",
20
- "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 type { RecordDetailModel } from '@grove-dev/astro/server';\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---\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 noreferrer\"\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 noreferrer\"\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 {/* 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 {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 noreferrer\"\n class={buttonClass(\"primary\", \"sm\")}\n >\n View on GitHub →\n </a>\n )}\n {homepageUrl && (\n <a\n href={homepageUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class={buttonClass(\"secondary\", \"sm\")}\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 noreferrer\" class=\"text-inherit no-underline hover:underline\">{shot.source.replace(/^https?:\\/\\//, \"\")}</a>\n </figcaption>\n )}\n </figure>\n ))}\n </div>\n )}\n</header>",
20
+ "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>",
21
21
  "type": "registry:component",
22
22
  "target": "~/src/components/grove/record-header.astro"
23
23
  },
24
24
  {
25
25
  "path": "default/components/grove/record-sidebar.astro",
26
- "content": "---\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}\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 noreferrer\"\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={String(repo.homepage)} target=\"_blank\" rel=\"noopener noreferrer\" 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 noreferrer\" 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 {/* ── 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>",
26
+ "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>",
27
27
  "type": "registry:component",
28
28
  "target": "~/src/components/grove/record-sidebar.astro"
29
29
  },
@@ -62,11 +62,17 @@
62
62
  "content": "---\n/**\n * LanguageBreakdown.astro\n *\n * Visual GitHub-Linguist-style code-composition bar plus a legend\n * showing each language's percentage. Reads from the record's\n * pre-computed `languages` array (top-5 by bytes) and `langColor`\n * (in @grove-dev/core).\n *\n * Used inside the Activity sidebar card.\n */\nimport { langColor } from '@grove-dev/core';\n\ninterface LangEntry {\n name: string;\n bytes: number;\n}\n\ninterface Props {\n /** Top-N languages as `[name, bytes]` tuples (already sorted). */\n languages: ReadonlyArray<readonly [string, number]>;\n /** Total bytes across all languages (denominator). */\n totalBytes: number;\n /** Optional max segments to show. */\n maxSegments?: number;\n}\n\nconst { languages, totalBytes, maxSegments = 5 } = Astro.props;\n\nconst segments = languages.slice(0, maxSegments).map(([name, bytes]) => {\n const pct = Math.round((bytes / Math.max(1, totalBytes)) * 100);\n return { name, pct, color: langColor(name) };\n});\n---\n\n{segments.length > 0 && (\n <div class=\"grove-langbreak mt-4 border-t border-ink-100 pt-4 dark:border-ink-800\">\n <h3 class=\"m-0 text-2xs font-semibold uppercase tracking-wider text-ink-500 dark:text-ink-400\">\n Code composition\n </h3>\n <div\n class=\"grove-langbreak-bar mt-2 flex h-2 w-full overflow-hidden rounded-full bg-ink-100 dark:bg-ink-800\"\n role=\"img\"\n aria-label={`Code composition: ${segments.map((s) => `${s.name} ${s.pct}%`).join(', ')}`}\n >\n {segments.map((s) => (\n <span\n class=\"grove-langbreak-seg h-full\"\n style={`width:${s.pct}%;background-color:${s.color}`}\n title={`${s.name}: ${s.pct}%`}\n />\n ))}\n </div>\n <ul class=\"grove-langbreak-list mt-2 flex flex-wrap gap-x-3 gap-y-1 text-2xs text-ink-500 dark:text-ink-400\">\n {segments.map((s) => (\n <li class=\"inline-flex items-center gap-1\">\n <span\n class=\"inline-block h-2 w-2 rounded-sm\"\n style={`background-color:${s.color}`}\n />\n <span class=\"font-mono\">{s.name}</span>\n <span>{s.pct}%</span>\n </li>\n ))}\n </ul>\n </div>\n)}",
63
63
  "type": "registry:component",
64
64
  "target": "~/src/components/grove/language-breakdown.astro"
65
+ },
66
+ {
67
+ "path": "default/components/site/featured-badge.astro",
68
+ "content": "---\n/**\n * FeaturedBadge — \"Featured on <site>\" README badge for maintainers.\n *\n * The SVGs are generated into `public/badges/` by the Grove build\n * (light and dark). The snippets link back to the record with\n * `?ref=badge` so badge traffic shows up in analytics, and the HTML\n * variant swaps to the dark badge through <picture>, which GitHub\n * READMEs honour.\n */\ninterface Props {\n /** Absolute URL of the record page, without a query string. */\n pageUrl: string;\n /** Absolute site origin, e.g. https://example.dev */\n origin: string;\n /** Site name, for the alt text. */\n siteName: string;\n /** Record name, for the alt text. */\n name: string;\n /** The `ref` value outbound links carry, if any — mentioned in the copy. */\n outboundRef?: string | false;\n}\n\nconst { pageUrl, origin, siteName, name, outboundRef } = Astro.props;\nconst href = `${pageUrl}?ref=badge`;\nconst light = `${origin}/badges/featured.svg`;\nconst dark = `${origin}/badges/featured-dark.svg`;\nconst alt = `${name} on ${siteName}`;\nconst markdown = `[![${alt}](${light})](${href})`;\nconst html = `<a href=\"${href}\"><picture><source media=\"(prefers-color-scheme: dark)\" srcset=\"${dark}\"><img alt=\"${alt}\" src=\"${light}\" height=\"40\"></picture></a>`;\n---\n\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-badge-title\"\n>\n <h2 id=\"sidebar-badge-title\" class=\"m-0 text-2xs font-semibold uppercase tracking-wider text-ink-500 dark:text-ink-400\">\n Maintainer? Add the badge\n </h2>\n <p class=\"m-0 mt-1.5 text-sm leading-relaxed text-ink-700 dark:text-ink-300\">\n Show readers where to find this page.\n {outboundRef && <> Visits from here reach your site with <code class=\"text-2xs\">ref={outboundRef}</code>.</>}\n </p>\n <picture>\n <source media=\"(prefers-color-scheme: dark)\" srcset=\"/badges/featured-dark.svg\" />\n <img src=\"/badges/featured.svg\" alt=\"\" height=\"40\" loading=\"lazy\" decoding=\"async\" class=\"mt-3 block h-10 w-auto\" />\n </picture>\n <div class=\"mt-3 flex flex-wrap gap-2\" data-badge-copy>\n <button type=\"button\" data-copy={markdown} class=\"cursor-pointer rounded-[var(--radius)] border border-border bg-secondary px-2.5 py-1 text-2xs font-medium text-secondary-foreground hover:bg-accent\">\n Copy Markdown\n </button>\n <button type=\"button\" data-copy={html} class=\"cursor-pointer rounded-[var(--radius)] border border-border bg-secondary px-2.5 py-1 text-2xs font-medium text-secondary-foreground hover:bg-accent\">\n Copy HTML\n </button>\n </div>\n</section>\n\n<script>\n document.querySelectorAll<HTMLElement>('[data-badge-copy] [data-copy]').forEach((button) => {\n const label = button.textContent?.trim() ?? '';\n button.addEventListener('click', async () => {\n try {\n await navigator.clipboard.writeText(button.dataset.copy ?? '');\n button.textContent = 'Copied';\n } catch {\n button.textContent = 'Copy failed';\n }\n setTimeout(() => (button.textContent = label), 1500);\n });\n });\n</script>\n",
69
+ "type": "registry:component",
70
+ "target": "~/src/components/site/featured-badge.astro"
65
71
  }
66
72
  ],
67
73
  "meta": {
68
- "version": "1.3.0",
69
- "requiresGrove": "0.17.0"
74
+ "version": "1.4.0",
75
+ "requiresGrove": "0.19.0"
70
76
  },
71
77
  "type": "registry:block"
72
78
  }