@grove-dev/cli 0.10.0 → 0.12.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/collection-cli.d.ts.map +1 -1
- package/dist/collection-cli.js +11 -0
- package/dist/collection-cli.js.map +1 -1
- package/dist/index.js +24 -12
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/r/about.json +3 -3
- package/dist/r/browse.json +4 -4
- package/dist/r/collections.json +5 -5
- package/dist/r/contributors.json +2 -2
- package/dist/r/default.json +30 -18
- package/dist/r/home.json +4 -4
- package/dist/r/not-found.json +3 -3
- package/dist/r/project-card.json +2 -2
- package/dist/r/record.json +17 -5
- package/dist/r/registry.json +46 -26
- package/dist/r/shell.json +2 -2
- package/dist/r/submit.json +2 -2
- package/dist/r/taxonomy.json +5 -5
- package/dist/r/ui.json +2 -2
- package/dist/readme-cli.d.ts.map +1 -1
- package/dist/readme-cli.js +26 -16
- package/dist/readme-cli.js.map +1 -1
- package/dist/sync-summary.d.ts +42 -0
- package/dist/sync-summary.d.ts.map +1 -0
- package/dist/sync-summary.js +90 -0
- package/dist/sync-summary.js.map +1 -0
- package/package.json +3 -3
package/dist/r/default.json
CHANGED
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
},
|
|
145
145
|
{
|
|
146
146
|
"path": "default/pages/categories/index.astro",
|
|
147
|
-
"content": "---\n/**\n * Categories index — every category with live counts. Linked from the\n * default header nav; each tile opens the browse page pre-filtered to\n * the category (detail pages live at `/categories/<id>/`).\n */\nimport siteConfig from '@grove/generated/site-config.json';\nimport {\n getTaxonomyIndexModel,\n getTaxonomyIndexSeo,\n itemLabel,\n itemLabelPlural,\n} from '@grove-dev/astro/server';\n\nimport CategoryGrid from '../../components/grove/category-grid.astro';\nimport BaseLayout from '../../layouts/base-layout.astro';\n\nconst slug = siteConfig.blueprintConfig?.routeSlug ?? 'projects';\nconst { categories } = getTaxonomyIndexModel();\nconst itemNoun = { singular: itemLabel(), plural: itemLabelPlural() };\nconst seo = getTaxonomyIndexSeo('categories', siteConfig);\n---\n\n<BaseLayout\n title={seo.title}\n description={seo.description}\n image={seo.image}\n jsonLd={seo.jsonLd}\n site={siteConfig}\n>\n <CategoryGrid\n categories={categories}\n pathPrefix={`/${slug}`}\n itemLabelPlural={itemLabelPlural()}\n itemNoun={itemNoun}\n level={1}\n hrefFor={(categorySlug: string) => `/categories/${categorySlug}
|
|
147
|
+
"content": "---\n/**\n * Categories index — every category with live counts. Linked from the\n * default header nav; each tile opens the browse page pre-filtered to\n * the category (detail pages live at `/categories/<id>/`).\n */\nimport siteConfig from '@grove/generated/site-config.json';\nimport {\n getTaxonomyIndexModel,\n getTaxonomyIndexSeo,\n itemLabel,\n itemLabelPlural,\n} from '@grove-dev/astro/server';\n\nimport CategoryGrid from '../../components/grove/category-grid.astro';\nimport BaseLayout from '../../layouts/base-layout.astro';\n\nconst slug = siteConfig.blueprintConfig?.routeSlug ?? 'projects';\nconst { categories } = getTaxonomyIndexModel();\nconst itemNoun = { singular: itemLabel(), plural: itemLabelPlural() };\nconst seo = getTaxonomyIndexSeo('categories', siteConfig);\n---\n\n<BaseLayout\n title={seo.title}\n description={seo.description}\n image={seo.image}\n jsonLd={seo.jsonLd}\n site={siteConfig}\n>\n <CategoryGrid\n categories={categories}\n pathPrefix={`/${slug}`}\n itemLabelPlural={itemLabelPlural()}\n itemNoun={itemNoun}\n level={1}\n hrefFor={(categorySlug: string) => `/categories/${categorySlug}/`}\n />\n</BaseLayout>\n",
|
|
148
148
|
"type": "registry:page",
|
|
149
149
|
"target": "~/src/pages/categories/index.astro"
|
|
150
150
|
},
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
},
|
|
157
157
|
{
|
|
158
158
|
"path": "default/pages/stacks/index.astro",
|
|
159
|
-
"content": "---\n/**\n * Stacks index — every stack with live counts. Linked from the\n * default header nav; each tile opens the browse page pre-filtered to\n * the stack (detail pages live at `/stacks/<id>/`).\n */\nimport siteConfig from '@grove/generated/site-config.json';\nimport {\n getTaxonomyIndexModel,\n getTaxonomyIndexSeo,\n itemLabel,\n itemLabelPlural,\n} from '@grove-dev/astro/server';\nimport StackGrid from '../../components/grove/stack-grid.astro';\nimport BaseLayout from '../../layouts/base-layout.astro';\n\nconst slug = siteConfig.blueprintConfig?.routeSlug ?? 'projects';\n// Uncapped: the index page lists EVERY stack (the homepage grid's\n// 12-item cap is a homepage layout choice, not a data truth).\nconst { stacks } = getTaxonomyIndexModel();\nconst itemNoun = { singular: itemLabel(), plural: itemLabelPlural() };\nconst seo = getTaxonomyIndexSeo('stacks', siteConfig);\n---\n\n<BaseLayout\n title={seo.title}\n description={seo.description}\n image={seo.image}\n jsonLd={seo.jsonLd}\n site={siteConfig}\n>\n <StackGrid\n stacks={stacks}\n pathPrefix={`/${slug}`}\n itemLabelPlural={itemLabelPlural()}\n itemNoun={itemNoun}\n level={1}\n hrefFor={(stackSlug: string) => `/stacks/${stackSlug}
|
|
159
|
+
"content": "---\n/**\n * Stacks index — every stack with live counts. Linked from the\n * default header nav; each tile opens the browse page pre-filtered to\n * the stack (detail pages live at `/stacks/<id>/`).\n */\nimport siteConfig from '@grove/generated/site-config.json';\nimport {\n getTaxonomyIndexModel,\n getTaxonomyIndexSeo,\n itemLabel,\n itemLabelPlural,\n} from '@grove-dev/astro/server';\nimport StackGrid from '../../components/grove/stack-grid.astro';\nimport BaseLayout from '../../layouts/base-layout.astro';\n\nconst slug = siteConfig.blueprintConfig?.routeSlug ?? 'projects';\n// Uncapped: the index page lists EVERY stack (the homepage grid's\n// 12-item cap is a homepage layout choice, not a data truth).\nconst { stacks } = getTaxonomyIndexModel();\nconst itemNoun = { singular: itemLabel(), plural: itemLabelPlural() };\nconst seo = getTaxonomyIndexSeo('stacks', siteConfig);\n---\n\n<BaseLayout\n title={seo.title}\n description={seo.description}\n image={seo.image}\n jsonLd={seo.jsonLd}\n site={siteConfig}\n>\n <StackGrid\n stacks={stacks}\n pathPrefix={`/${slug}`}\n itemLabelPlural={itemLabelPlural()}\n itemNoun={itemNoun}\n level={1}\n hrefFor={(stackSlug: string) => `/stacks/${stackSlug}/`}\n />\n</BaseLayout>\n",
|
|
160
160
|
"type": "registry:page",
|
|
161
161
|
"target": "~/src/pages/stacks/index.astro"
|
|
162
162
|
},
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
},
|
|
175
175
|
{
|
|
176
176
|
"path": "default/components/grove/taxonomy-list.astro",
|
|
177
|
-
"content": "---\nimport {\n buildProjectCardModel,\n indexSlug,\n itemLabel,\n itemLabelPlural,\n} from '@grove-dev/astro/server';\nimport type { IndexRecord } from '@grove-dev/core';\nimport { formatCount } from '@grove-dev/core';\nimport EmptyState from '../ui/empty-state.astro';\n/**\n * TaxonomyList.astro\n *\n * Shared body for the three taxonomy pages — `stacks/[name].astro`,\n * `categories/[name].astro`, `licenses/[name].astro`. The pages\n * differ only in the heading copy and the filterRecords field;\n * everything below the heading — the count, the card grid, the\n * empty state, the back link — is identical, so it lives here.\n *\n * Records render through the package's canonical `ProjectCard` inside\n * `CardGrid`, so taxonomy pages read as the same site as the browse\n * and collection pages.\n */\nimport CardGrid from './card-grid.astro';\nimport ProjectCard from './project-card.astro';\n\ntype TaxonomyRecord = IndexRecord;\n\ninterface Props {\n /** Eyebrow label above the heading (\"Stack\", \"Category\", \"License\"). */\n eyebrow: string;\n /** Display name shown in the heading and intro copy. */\n displayName: string;\n /** Lede copy under the heading. */\n lede: string;\n /**\n * Noun pair for the heading and count label. Defaults to the\n * blueprint's singular/plural labels so irregular plurals render\n * correctly on every blueprint.\n */\n itemNoun?: { singular: string; plural: string };\n /** Records filtered by `filterRecords` upstream. */\n records: TaxonomyRecord[];\n /**\n * Index route for the back link and card hrefs. Defaults to the\n * configured directory route (`routes.directory` in `grove.config.ts`),\n * so a site that browses at `/apps` links to `/apps`, not `/projects`.\n */\n backHref?: string;\n /** Back-link label. */\n backLabel?: string;\n}\n\nconst {\n eyebrow,\n displayName,\n lede,\n itemNoun = { singular: itemLabel(), plural: itemLabelPlural() },\n records,\n backHref = `/${indexSlug()}
|
|
177
|
+
"content": "---\nimport {\n buildProjectCardModel,\n indexSlug,\n itemLabel,\n itemLabelPlural,\n} from '@grove-dev/astro/server';\nimport type { IndexRecord } from '@grove-dev/core';\nimport { formatCount } from '@grove-dev/core';\nimport EmptyState from '../ui/empty-state.astro';\n/**\n * TaxonomyList.astro\n *\n * Shared body for the three taxonomy pages — `stacks/[name].astro`,\n * `categories/[name].astro`, `licenses/[name].astro`. The pages\n * differ only in the heading copy and the filterRecords field;\n * everything below the heading — the count, the card grid, the\n * empty state, the back link — is identical, so it lives here.\n *\n * Records render through the package's canonical `ProjectCard` inside\n * `CardGrid`, so taxonomy pages read as the same site as the browse\n * and collection pages.\n */\nimport CardGrid from './card-grid.astro';\nimport ProjectCard from './project-card.astro';\n\ntype TaxonomyRecord = IndexRecord;\n\ninterface Props {\n /** Eyebrow label above the heading (\"Stack\", \"Category\", \"License\"). */\n eyebrow: string;\n /** Display name shown in the heading and intro copy. */\n displayName: string;\n /** Lede copy under the heading. */\n lede: string;\n /**\n * Noun pair for the heading and count label. Defaults to the\n * blueprint's singular/plural labels so irregular plurals render\n * correctly on every blueprint.\n */\n itemNoun?: { singular: string; plural: string };\n /** Records filtered by `filterRecords` upstream. */\n records: TaxonomyRecord[];\n /**\n * Index route for the back link and card hrefs. Defaults to the\n * configured directory route (`routes.directory` in `grove.config.ts`),\n * so a site that browses at `/apps` links to `/apps`, not `/projects`.\n */\n backHref?: string;\n /** Back-link label. */\n backLabel?: string;\n}\n\nconst {\n eyebrow,\n displayName,\n lede,\n itemNoun = { singular: itemLabel(), plural: itemLabelPlural() },\n records,\n backHref = `/${indexSlug()}/`,\n backLabel = `← Back to all ${itemLabelPlural()}`,\n} = Astro.props;\n\nconst count = records.length;\nconst hrefPrefix = backHref.replace(/\\/$/, '');\n---\n\n<section class=\"mx-auto w-full max-w-container px-5 py-12 sm:px-7 sm:py-16\">\n <p class=\"m-0 text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">{eyebrow}</p>\n <h1 class=\"m-0 mt-2 text-[1.875rem] font-semibold tracking-tight text-ink-900 sm:text-[2.125rem] dark:text-ink-100\">\n {displayName} {itemNoun.plural}\n </h1>\n <p class=\"m-0 mt-3 max-w-2xl text-[0.9375rem] leading-relaxed text-ink-500 dark:text-ink-400\">{lede}</p>\n\n <div class=\"mt-10\">\n <p class=\"m-0 text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">\n {formatCount(count, itemNoun)}\n </p>\n\n {count === 0 ? (\n <EmptyState class=\"mt-4\" title={`No ${itemNoun.plural} yet in ${displayName}.`} />\n ) : (\n <CardGrid class=\"mt-6\">\n {records.map((record, i) => (\n <li class=\"m-0 p-0\">\n <ProjectCard\n model={buildProjectCardModel(record)}\n href={`${hrefPrefix}/${record.slug}/`}\n eager={i < 3}\n />\n </li>\n ))}\n </CardGrid>\n )}\n </div>\n\n <p class=\"mt-12 text-2xs text-ink-500 dark:text-ink-400\">\n <a href={backHref} class=\"text-inherit no-underline hover:underline\">\n {backLabel}\n </a>\n </p>\n</section>\n",
|
|
178
178
|
"type": "registry:component",
|
|
179
179
|
"target": "~/src/components/grove/taxonomy-list.astro"
|
|
180
180
|
},
|
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
},
|
|
199
199
|
{
|
|
200
200
|
"path": "default/pages/collections/[slug].astro",
|
|
201
|
-
"content": "---\nimport records from '@grove/generated/records.json';\nimport siteConfig from '@grove/generated/site-config.json';\nimport {\n getCollectionPageModel,\n loadCollections,\n recordsToCollectionEntries,\n} from '@grove-dev/astro/server';\nimport CollectionPage from '../../components/grove/collection-page.astro';\nimport BaseLayout from '../../layouts/base-layout.astro';\n\nexport async function getStaticPaths() {\n const collections = await loadCollections(process.cwd());\n return collections.map((c) => ({ params: { slug: c.slug } }));\n}\n\nconst { slug } = Astro.params;\nconst collections = await loadCollections(process.cwd());\nconst collection = collections.find((c) => c.slug === slug);\nif (!collection) return Astro.redirect('/404');\n\nconst entries = recordsToCollectionEntries(\n (records as { records: unknown[] }).records as never,\n siteConfig,\n);\nconst model = getCollectionPageModel(collection, entries, collections, siteConfig);\n---\n<BaseLayout\n title={model.seo.title}\n description={model.seo.description}\n image={model.seo.image}\n imageAlt={model.seo.imageAlt}\n jsonLd={model.seo.jsonLd}\n noindex={model.seo.noindex}\n site={siteConfig}\n>\n <CollectionPage\n model={model}\n eyebrow={model.collection.kind === \"curated\" ? \"Curated collection\" : \"Generated collection\"}\n countNoun={{\n singular: siteConfig.blueprintConfig?.labelSingular ?? \"item\",\n plural: siteConfig.blueprintConfig?.labelPlural ?? \"items\",\n }}\n />\n</BaseLayout>\n",
|
|
201
|
+
"content": "---\nimport records from '@grove/generated/records.json';\nimport siteConfig from '@grove/generated/site-config.json';\nimport {\n getCollectionBodyHtml,\n getCollectionPageModel,\n loadCollections,\n recordsToCollectionEntries,\n} from '@grove-dev/astro/server';\nimport CollectionPage from '../../components/grove/collection-page.astro';\nimport BaseLayout from '../../layouts/base-layout.astro';\n\nexport async function getStaticPaths() {\n const collections = await loadCollections(process.cwd());\n return collections.map((c) => ({ params: { slug: c.slug } }));\n}\n\nconst { slug } = Astro.params;\nconst collections = await loadCollections(process.cwd());\nconst collection = collections.find((c) => c.slug === slug);\nif (!collection) return Astro.redirect('/404');\n\nconst entries = recordsToCollectionEntries(\n (records as { records: unknown[] }).records as never,\n siteConfig,\n);\nconst model = getCollectionPageModel(collection, entries, collections, siteConfig);\nconst bodyHtml = getCollectionBodyHtml(collection.content);\n---\n<BaseLayout\n title={model.seo.title}\n description={model.seo.description}\n image={model.seo.image}\n imageAlt={model.seo.imageAlt}\n jsonLd={model.seo.jsonLd}\n noindex={model.seo.noindex}\n site={siteConfig}\n>\n <CollectionPage\n model={model}\n bodyHtml={bodyHtml}\n eyebrow={model.collection.kind === \"curated\" ? \"Curated collection\" : \"Generated collection\"}\n countNoun={{\n singular: siteConfig.blueprintConfig?.labelSingular ?? \"item\",\n plural: siteConfig.blueprintConfig?.labelPlural ?? \"items\",\n }}\n />\n</BaseLayout>\n",
|
|
202
202
|
"type": "registry:page",
|
|
203
203
|
"target": "~/src/pages/collections/[slug].astro"
|
|
204
204
|
},
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
},
|
|
211
211
|
{
|
|
212
212
|
"path": "default/components/grove/collection-page.astro",
|
|
213
|
-
"content": "---\nimport type { CollectionPageModel } from '@grove-dev/astro/server';\n/**\n * CollectionPage — renders a single curated/generated collection.\n *\n * Consumes a `CollectionPageModel` produced by `getCollectionPageModel`.\n * Renders the header via `SectionHeader` (framework consistency),\n * the matched entries via `CollectionRow`, and a related-collections\n * section.\n *\n * Generic: no blueprint-specific copy. Consumers can override\n * `eyebrow`, `title`, `description`;
|
|
213
|
+
"content": "---\nimport type { CollectionPageModel } from '@grove-dev/astro/server';\n/**\n * CollectionPage — renders a single curated/generated collection.\n *\n * Consumes a `CollectionPageModel` produced by `getCollectionPageModel`.\n * Renders the header via `SectionHeader` (framework consistency),\n * the matched entries via `CollectionRow`, and a related-collections\n * section.\n *\n * Editorial layers, each rendered only when the collection has it:\n * `editorial.introduction` (lead paragraph), the selection criteria,\n * the Markdown body (`bodyHtml`, from `getCollectionBodyHtml`), and the\n * `faq`. When the curator wrote per-entry notes the entries render as a\n * numbered verdict list — a card clamps its description to two lines,\n * which is no place for a 40-word verdict — and otherwise as the card\n * grid.\n *\n * Generic: no blueprint-specific copy. Consumers can override\n * `eyebrow`, `title`, `description`; `<slot name=\"intro\">` takes any\n * extra markup. `emptyLabel` matches `RecordSection`'s API for\n * empty-state copy.\n */\nimport { formatCount, formatStars } from '@grove-dev/core';\nimport Container from '../../layouts/container.astro';\nimport SectionHeader from '../../layouts/section-header.astro';\nimport EmptyState from '../ui/empty-state.astro';\nimport CardGrid from './card-grid.astro';\nimport CollectionRow from './collection-row.astro';\n\ninterface Props {\n model: CollectionPageModel;\n /** Sanitized HTML of the collection's Markdown body, if it has one. */\n bodyHtml?: string | null;\n /** Override the eyebrow text (default: derived from collection kind). */\n eyebrow?: string;\n /** Override the title (default: collection.title). */\n title?: string;\n /** Override the description (default: collection.description). */\n description?: string;\n /** Default copy when the collection has no matching entries. */\n emptyLabel?: string;\n /** Section id (deep link + stable key). */\n id?: string;\n /**\n * Heading level for the collection title. This component IS the\n * page on collection detail routes, so it defaults to 1.\n */\n level?: 1 | 2;\n /** Noun pair for the entry count (blueprint labels). */\n countNoun?: { singular: string; plural: string };\n class?: string;\n}\n\nconst {\n model,\n bodyHtml = null,\n eyebrow,\n title,\n description,\n emptyLabel = 'This collection is currently empty.',\n id,\n level = 1,\n countNoun = { singular: 'item', plural: 'items' },\n class: className = '',\n} = Astro.props;\n\nconst finalTitle = title ?? model.collection.title;\nconst finalDescription = description ?? model.collection.description;\nconst hasNotes = model.entries.some((entry) => entry.note);\nconst reviewedLabel = model.collection.lastReviewedAt\n ? new Date(model.collection.lastReviewedAt).toLocaleDateString('en', {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n timeZone: 'UTC',\n })\n : null;\nconst finalEyebrow =\n eyebrow ?? (model.collection.kind === 'curated' ? 'Curated collection' : 'Generated collection');\n---\n\n<section id={id} class={`py-12 sm:py-16 ${className}`}>\n <Container>\n <SectionHeader eyebrow={finalEyebrow} title={finalTitle} description={finalDescription} level={level} />\n\n {model.collection.introduction && (\n <p class=\"m-0 mb-6 max-w-[68ch] text-[1.0625rem] leading-relaxed text-foreground\">\n {model.collection.introduction}\n </p>\n )}\n\n {/* Editorial context reads as a quiet callout, not metadata\n shouting in uppercase. */}\n {model.collection.selectionNote && (\n <aside class=\"mb-6 max-w-[64ch] rounded-[var(--radius-lg)] border-l-2 border-border bg-surface-sunken px-4 py-3\">\n <p class=\"m-0 text-2xs font-medium uppercase tracking-wider text-muted-foreground\">\n Selection criteria\n </p>\n <p class=\"m-0 mt-1 text-[0.875rem] leading-relaxed text-foreground\">\n {model.collection.selectionNote}\n </p>\n </aside>\n )}\n\n <slot name=\"intro\" />\n\n {/* Bridges the heading outline: the page title is an h1 and the\n entry cards render h3 titles — without this h2 Lighthouse\n flags a heading-order skip. */}\n <h2 class=\"sr-only\">Entries</h2>\n <p class=\"m-0 mb-4 text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">\n {formatCount(model.total, countNoun)}\n </p>\n\n {model.isEmpty ? (\n <EmptyState\n title={emptyLabel}\n description=\"No records currently match this collection's query. The collection fills automatically as matching records are added.\"\n />\n ) : hasNotes ? (\n <ol class=\"m-0 flex list-none flex-col gap-3 p-0\">\n {model.entries.map((entry, i) => (\n <li class=\"m-0 rounded-[var(--radius-lg)] border border-border bg-card p-4 sm:p-5\">\n <h3 class=\"m-0 text-[1.0625rem] font-semibold leading-snug text-foreground\">\n <span class=\"mr-2 tabular-nums text-muted-foreground\">{i + 1}.</span>\n <a href={entry.url} class=\"text-foreground no-underline hover:underline\">{entry.title}</a>\n </h3>\n <p class=\"m-0 mt-2 max-w-[72ch] text-[0.9375rem] leading-relaxed text-foreground\">\n {entry.note ?? entry.description}\n </p>\n <p class=\"m-0 mt-3 flex flex-wrap gap-x-4 gap-y-1 text-2xs text-muted-foreground\">\n {typeof entry.stars === 'number' && entry.stars > 0 && (\n <span>{formatStars(entry.stars)} stars</span>\n )}\n {(entry.licenses?.[0] ?? entry.license) && <span>{entry.licenses?.[0] ?? entry.license}</span>}\n {entry.stack && <span>{entry.stack}</span>}\n {entry.repoHref && (\n <a href={entry.repoHref} rel=\"noopener noreferrer\" target=\"_blank\" class=\"text-muted-foreground underline\">\n Source\n </a>\n )}\n </p>\n </li>\n ))}\n </ol>\n ) : (\n <CardGrid>\n {model.entries.map((entry, i) => (\n <li class=\"m-0 p-0\">\n <CollectionRow entry={entry} eager={i < 3} />\n </li>\n ))}\n </CardGrid>\n )}\n\n {bodyHtml && <div class=\"grove-prose mt-12 max-w-[72ch]\" set:html={bodyHtml} />}\n\n {model.faq.length > 0 && (\n <section class=\"mt-12 max-w-[72ch]\">\n <h2 class=\"m-0 mb-4 text-[1.375rem] font-semibold tracking-tight text-foreground\">\n Frequently asked questions\n </h2>\n <dl class=\"m-0 flex flex-col gap-5\">\n {model.faq.map((item) => (\n <div>\n <dt class=\"m-0 text-[1rem] font-semibold text-foreground\">{item.q}</dt>\n <dd class=\"m-0 mt-1 text-[0.9375rem] leading-relaxed text-foreground\">{item.a}</dd>\n </div>\n ))}\n </dl>\n </section>\n )}\n\n {reviewedLabel && (\n <p class=\"m-0 mt-8 text-2xs text-muted-foreground\">\n Last reviewed <time datetime={model.collection.lastReviewedAt}>{reviewedLabel}</time>\n </p>\n )}\n\n {model.related.length > 0 && (\n <section class=\"mt-12 border-t border-ink-200 pt-8 dark:border-ink-800\">\n <SectionHeader\n eyebrow=\"Related\"\n title=\"Related collections\"\n description=\"Other curated groupings of related items.\"\n level={2}\n />\n <ul class=\"m-0 grid list-none grid-cols-1 gap-2 p-0 sm:grid-cols-2 lg:grid-cols-4\">\n {model.related.map((r) => (\n <li class=\"m-0 p-0\">\n <a\n href={r.url}\n class=\"group flex h-full flex-col gap-1 rounded-md border border-ink-200 bg-white px-3 py-2.5 no-underline transition-colors hover:border-ink-400 dark:border-ink-800 dark:bg-ink-950 dark:hover:border-ink-600\"\n >\n <span class=\"text-sm font-medium text-ink-900 group-hover:underline dark:text-ink-100\">{r.title}</span>\n </a>\n </li>\n ))}\n </ul>\n </section>\n )}\n </Container>\n</section>\n",
|
|
214
214
|
"type": "registry:component",
|
|
215
215
|
"target": "~/src/components/grove/collection-page.astro"
|
|
216
216
|
},
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
},
|
|
223
223
|
{
|
|
224
224
|
"path": "default/components/grove/collection-row.astro",
|
|
225
|
-
"content": "---\nimport type { ProjectCardModel } from '@grove-dev/astro/server';\n/**\n * CollectionRow — collection-page adapter around the canonical\n * `ProjectCard`.\n *\n * Consumes the lightweight `CollectionEntry` shape directly and maps\n * it onto `ProjectCard`'s explicit props, so a collection page sitting\n * next to the directory index reads as the same site. The historical\n * public props are preserved:\n *\n * - `entry` — the collection entry (slug, title, description, …)\n * - `href` — full detail URL; wins over `routeSlug`\n * - `routeSlug` — blueprint slug (e.g. \"projects\"); details derived\n * as `/${routeSlug}/${slug}
|
|
225
|
+
"content": "---\nimport type { ProjectCardModel } from '@grove-dev/astro/server';\n/**\n * CollectionRow — collection-page adapter around the canonical\n * `ProjectCard`.\n *\n * Consumes the lightweight `CollectionEntry` shape directly and maps\n * it onto `ProjectCard`'s explicit props, so a collection page sitting\n * next to the directory index reads as the same site. The historical\n * public props are preserved:\n *\n * - `entry` — the collection entry (slug, title, description, …)\n * - `href` — full detail URL; wins over `routeSlug`\n * - `routeSlug` — blueprint slug (e.g. \"projects\"); details derived\n * as `/${routeSlug}/${slug}/` when `href` is not provided\n * - `showChips`, `showLabel` — deprecated no-ops. The card renders\n * one fixed layout everywhere, so a record cannot look like a\n * different record depending on the page it appears on.\n * - `showMeta` — still honoured: it controls whether the *data*\n * (stars, last-updated) is passed in at all, not how it is drawn\n * - `class` — extra class on the card root\n * - `eager` — bypass lazy loading for above-the-fold avatars\n *\n * The repository is reached through the card's `owner/repo` line;\n * there is no separate footer link button.\n *\n * `CollectionEntry` isn't a `CardRecord`, so this adapter can't call\n * `buildProjectCardModel()` — it builds the `ProjectCardModel` object\n * literal directly from its own already-computed fields, reusing the\n * same `formatStars`/`formatRelative`/`getOwnerAndRepoFromRepoUrl`/\n * `nameInitials` helpers `buildProjectCardModel` uses internally so\n * the two stay in lockstep.\n *\n * Analytics: emits `data-event=\"collection_item_click\"` /\n * `data-event-source=\"collection_row\"` on the card root, so sites wire\n * one handler in BaseLayout.\n */\nimport type { CollectionEntry } from '@grove-dev/core';\nimport {\n formatRelative,\n formatStars,\n getOwnerAndRepoFromRepoUrl,\n getOwnerAvatarUrl,\n nameInitials,\n} from '@grove-dev/core';\nimport ProjectCard from './project-card.astro';\n\ninterface Props {\n entry: CollectionEntry;\n /** Full detail-page URL. Wins over `routeSlug`. */\n href?: string;\n /** Blueprint route slug; detail URL = `/${routeSlug}/${slug}/`. */\n routeSlug?: string;\n /** @deprecated Ignored — the card renders one fixed layout. */\n showChips?: boolean;\n /** Pass stars / last-updated through to the card. Default true. */\n showMeta?: boolean;\n /** @deprecated Ignored — see `showChips`. */\n showLabel?: boolean;\n eager?: boolean;\n class?: string;\n}\n\nconst {\n entry,\n href: hrefProp,\n routeSlug,\n showMeta = true,\n eager = false,\n class: className = '',\n} = Astro.props;\n\nconst slug = entry.slug;\nconst base = (routeSlug ?? '').replace(/^\\/+|\\/+$/g, '');\nconst detailHref =\n typeof hrefProp === 'string' && hrefProp.length > 0\n ? hrefProp\n : entry.url || (base ? `/${base}/${slug}/` : `/${slug}/`);\n\nconst repoHref = entry.repoHref;\nconst stars = showMeta ? entry.stars : undefined;\nconst pushedAt = showMeta ? entry.pushedAt : undefined;\nconst stackIds = entry.stack ? [entry.stack] : [];\nconst { owner, repo } = getOwnerAndRepoFromRepoUrl(repoHref ?? '');\nconst starsLabel = formatStars(stars);\nconst updatedLabel = formatRelative(pushedAt);\nconst visibleStacks = stackIds.slice(0, 4);\n\nconst model: ProjectCardModel = {\n name: entry.title,\n slug,\n description: entry.description ?? '',\n initials: nameInitials(entry.title),\n avatarUrl: getOwnerAvatarUrl(owner, 80) ?? undefined,\n repoHref,\n owner: owner ?? undefined,\n repo: repo ?? undefined,\n isArticle: Boolean(repoHref && owner && repo),\n stars,\n starsLabel,\n hasStars: starsLabel !== null && typeof stars === 'number' && stars > 0,\n pushedAt,\n updatedLabel,\n hasUpdated: Boolean(pushedAt),\n stackIds,\n visibleStacks,\n stackOverflow: stackIds.length - visibleStacks.length,\n hasStacks: visibleStacks.length > 0,\n};\n---\n\n<ProjectCard\n href={detailHref}\n model={model}\n eager={eager}\n event=\"collection_item_click\"\n eventSource=\"collection_row\"\n class={className}\n/>\n",
|
|
226
226
|
"type": "registry:component",
|
|
227
227
|
"target": "~/src/components/grove/collection-row.astro"
|
|
228
228
|
},
|
|
@@ -234,7 +234,7 @@
|
|
|
234
234
|
},
|
|
235
235
|
{
|
|
236
236
|
"path": "default/pages/index.astro",
|
|
237
|
-
"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}
|
|
237
|
+
"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",
|
|
238
238
|
"type": "registry:page",
|
|
239
239
|
"target": "~/src/pages/index.astro"
|
|
240
240
|
},
|
|
@@ -258,7 +258,7 @@
|
|
|
258
258
|
},
|
|
259
259
|
{
|
|
260
260
|
"path": "default/components/grove/record-section.astro",
|
|
261
|
-
"content": "---\nimport { buildProjectCardModel } from '@grove-dev/astro/server';\n/**\n * RecordSection — generic lens-style section wrapper for the\n * home page.\n *\n * Renders a SectionHeader + a 3-column grid of `ProjectCard`s\n * (the v0.5.0 refined card), plus an optional \"View all\" link\n * in the header. Generic: takes any\n * `IndexRecord[]` (the slim list-page shape, discriminated union\n * over `kind`).\n *\n * Two equivalent APIs are supported so the same template works\n * against both the workspace source and the published\n * `@grove-dev/astro@0.2.10` package:\n *\n * - **`hrefFor(record)`** callback — V1 published API. Caller\n * passes a function that returns the detail-page URL for\n * each item.\n * - **`pathPrefix` string** — convenience API for the common\n * case `${pathPrefix}/${item.slug}`. Mutually exclusive with\n * `hrefFor`; if both are provided, `hrefFor` wins.\n *\n * Empty-state copy is rendered when the list has no items, so the\n * homepage never collapses to a blank section.\n */\nimport type { IndexRecord } from '@grove-dev/core';\nimport Container from '../../layouts/container.astro';\nimport SectionHeader from '../../layouts/section-header.astro';\nimport EmptyState from '../ui/empty-state.astro';\nimport CardGrid from './card-grid.astro';\nimport ProjectCard from './project-card.astro';\n\ninterface Props {\n /** Used as the section id (so deep links work) and a stable key. */\n id: string;\n title: string;\n description?: string;\n items: IndexRecord[];\n /** Detail-page href builder (V1 published API). */\n hrefFor?: (record: IndexRecord) => string;\n /** Detail-page URL prefix (convenience API). */\n pathPrefix?: string;\n /** Optional \"View all\" link rendered in the header. */\n viewAllHref?: string;\n viewAllLabel?: string;\n /** Optional eyebrow. */\n eyebrow?: string;\n /** Empty-state copy. */\n emptyLabel?: string;\n /** Extra class on the outer <section>. */\n class?: string;\n /** How many records to render. Default 3 — the refined grid shows one row. */\n limit?: number;\n}\n\nconst {\n id,\n title,\n description,\n items,\n hrefFor,\n pathPrefix = '/items',\n viewAllHref,\n viewAllLabel = 'View all',\n eyebrow,\n emptyLabel = 'No records yet.',\n class: className = '',\n limit = 3,\n} = Astro.props;\n\nconst visible = items.slice(0, limit);\n---\n\n<section\n id={id}\n class={`py-12 sm:py-16 scroll-mt-20 ${className}`}\n>\n <Container>\n <div class=\"mb-6 flex flex-wrap items-end justify-between gap-3\">\n <SectionHeader\n eyebrow={eyebrow}\n title={title}\n description={description}\n />\n {viewAllHref && (\n <a\n href={viewAllHref}\n class=\"hidden shrink-0 pb-2 text-2xs font-medium text-ink-500 transition-colors hover:text-ink-900 sm:inline dark:text-ink-400 dark:hover:text-ink-100\"\n >\n {viewAllLabel} →\n </a>\n )}\n </div>\n\n {visible.length === 0 ? (\n <EmptyState title={emptyLabel} />\n ) : (\n <CardGrid>\n {visible.map((item) => {\n // Resolve href: caller-supplied `hrefFor` callback wins;\n // otherwise fall back to `${pathPrefix}/${slug}`. The href\n // is what each card actually navigates to — getting it\n // right is the difference between a working home page\n // and a 404-storm of `/items/<slug>` links.\n const base = pathPrefix.replace(/\\/$/, \"\");\n const fallbackHref = `${base}/${item.slug}
|
|
261
|
+
"content": "---\nimport { buildProjectCardModel } from '@grove-dev/astro/server';\n/**\n * RecordSection — generic lens-style section wrapper for the\n * home page.\n *\n * Renders a SectionHeader + a 3-column grid of `ProjectCard`s\n * (the v0.5.0 refined card), plus an optional \"View all\" link\n * in the header. Generic: takes any\n * `IndexRecord[]` (the slim list-page shape, discriminated union\n * over `kind`).\n *\n * Two equivalent APIs are supported so the same template works\n * against both the workspace source and the published\n * `@grove-dev/astro@0.2.10` package:\n *\n * - **`hrefFor(record)`** callback — V1 published API. Caller\n * passes a function that returns the detail-page URL for\n * each item.\n * - **`pathPrefix` string** — convenience API for the common\n * case `${pathPrefix}/${item.slug}`. Mutually exclusive with\n * `hrefFor`; if both are provided, `hrefFor` wins.\n *\n * Empty-state copy is rendered when the list has no items, so the\n * homepage never collapses to a blank section.\n */\nimport type { IndexRecord } from '@grove-dev/core';\nimport Container from '../../layouts/container.astro';\nimport SectionHeader from '../../layouts/section-header.astro';\nimport EmptyState from '../ui/empty-state.astro';\nimport CardGrid from './card-grid.astro';\nimport ProjectCard from './project-card.astro';\n\ninterface Props {\n /** Used as the section id (so deep links work) and a stable key. */\n id: string;\n title: string;\n description?: string;\n items: IndexRecord[];\n /** Detail-page href builder (V1 published API). */\n hrefFor?: (record: IndexRecord) => string;\n /** Detail-page URL prefix (convenience API). */\n pathPrefix?: string;\n /** Optional \"View all\" link rendered in the header. */\n viewAllHref?: string;\n viewAllLabel?: string;\n /** Optional eyebrow. */\n eyebrow?: string;\n /** Empty-state copy. */\n emptyLabel?: string;\n /** Extra class on the outer <section>. */\n class?: string;\n /** How many records to render. Default 3 — the refined grid shows one row. */\n limit?: number;\n}\n\nconst {\n id,\n title,\n description,\n items,\n hrefFor,\n pathPrefix = '/items',\n viewAllHref,\n viewAllLabel = 'View all',\n eyebrow,\n emptyLabel = 'No records yet.',\n class: className = '',\n limit = 3,\n} = Astro.props;\n\nconst visible = items.slice(0, limit);\n---\n\n<section\n id={id}\n class={`py-12 sm:py-16 scroll-mt-20 ${className}`}\n>\n <Container>\n <div class=\"mb-6 flex flex-wrap items-end justify-between gap-3\">\n <SectionHeader\n eyebrow={eyebrow}\n title={title}\n description={description}\n />\n {viewAllHref && (\n <a\n href={viewAllHref}\n class=\"hidden shrink-0 pb-2 text-2xs font-medium text-ink-500 transition-colors hover:text-ink-900 sm:inline dark:text-ink-400 dark:hover:text-ink-100\"\n >\n {viewAllLabel} →\n </a>\n )}\n </div>\n\n {visible.length === 0 ? (\n <EmptyState title={emptyLabel} />\n ) : (\n <CardGrid>\n {visible.map((item) => {\n // Resolve href: caller-supplied `hrefFor` callback wins;\n // otherwise fall back to `${pathPrefix}/${slug}`. The href\n // is what each card actually navigates to — getting it\n // right is the difference between a working home page\n // and a 404-storm of `/items/<slug>` links.\n const base = pathPrefix.replace(/\\/$/, \"\");\n const fallbackHref = `${base}/${item.slug}/`;\n const finalHref =\n typeof hrefFor === \"function\" ? hrefFor(item) : fallbackHref;\n const model = buildProjectCardModel(item);\n return (\n <li class=\"m-0 p-0\">\n <ProjectCard model={model} href={finalHref} />\n </li>\n );\n })}\n </CardGrid>\n )}\n\n {viewAllHref && (\n <div class=\"mt-4 sm:hidden\">\n <a\n href={viewAllHref}\n class=\"text-2xs font-medium text-ink-500 transition-colors hover:text-ink-900 dark:text-ink-400 dark:hover:text-ink-100\"\n >{viewAllLabel} →</a>\n </div>\n )}\n </Container>\n</section>\n",
|
|
262
262
|
"type": "registry:component",
|
|
263
263
|
"target": "~/src/components/grove/record-section.astro"
|
|
264
264
|
},
|
|
@@ -294,7 +294,7 @@
|
|
|
294
294
|
},
|
|
295
295
|
{
|
|
296
296
|
"path": "default/pages/[slug]/page/cards.astro",
|
|
297
|
-
"content": "---\n/**\n * Card source for client-side filtering — `/{slug}/page/cards/`.\n *\n * Every record's card, rendered once by the same component the browse\n * page uses, as a bare fragment with no layout.\n *\n * Why it exists: browse pages prerender only their own 20 records, so\n * the page a visitor lands on is small and crawlable. Filtering happens\n * on the client and can surface any record in the directory, so the\n * controller needs cards it was not given. Fetching them from here —\n * lazily, once, after the page is interactive — keeps the card markup\n * to a single definition instead of a second one written in JavaScript.\n *\n * `noindex`: this is a machine surface. Every record it contains is\n * already indexable through the paginated browse pages and its own\n * detail page.\n */\nimport siteConfig from '@grove/generated/site-config.json';\nimport { getDirectoryIndexModel } from '@grove-dev/astro/server';\nimport IndexRow from '../../../components/grove/index-row.astro';\n\nexport function getStaticPaths() {\n const routeSlug = siteConfig.blueprintConfig?.routeSlug ?? 'projects';\n return [{ params: { slug: routeSlug } }];\n}\n\nconst slug = siteConfig.blueprintConfig?.routeSlug ?? 'projects';\nconst { sorted } = getDirectoryIndexModel(new URLSearchParams(), siteConfig);\n---\n\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <meta name=\"robots\" content=\"noindex, nofollow\" />\n <title>{`${slug} card source`}</title>\n </head>\n <body>\n <ul id=\"grove-index-cards\">\n {sorted.map((item) => (\n <li class=\"m-0 p-0\" data-record-slug={item.slug}>\n <IndexRow\n record={item as Parameters<typeof IndexRow>[0][\"record\"]}\n detailHref={`/${slug}/${item.slug}
|
|
297
|
+
"content": "---\n/**\n * Card source for client-side filtering — `/{slug}/page/cards/`.\n *\n * Every record's card, rendered once by the same component the browse\n * page uses, as a bare fragment with no layout.\n *\n * Why it exists: browse pages prerender only their own 20 records, so\n * the page a visitor lands on is small and crawlable. Filtering happens\n * on the client and can surface any record in the directory, so the\n * controller needs cards it was not given. Fetching them from here —\n * lazily, once, after the page is interactive — keeps the card markup\n * to a single definition instead of a second one written in JavaScript.\n *\n * `noindex`: this is a machine surface. Every record it contains is\n * already indexable through the paginated browse pages and its own\n * detail page.\n */\nimport siteConfig from '@grove/generated/site-config.json';\nimport { getDirectoryIndexModel } from '@grove-dev/astro/server';\nimport IndexRow from '../../../components/grove/index-row.astro';\n\nexport function getStaticPaths() {\n const routeSlug = siteConfig.blueprintConfig?.routeSlug ?? 'projects';\n return [{ params: { slug: routeSlug } }];\n}\n\nconst slug = siteConfig.blueprintConfig?.routeSlug ?? 'projects';\nconst { sorted } = getDirectoryIndexModel(new URLSearchParams(), siteConfig);\n---\n\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <meta name=\"robots\" content=\"noindex, nofollow\" />\n <title>{`${slug} card source`}</title>\n </head>\n <body>\n <ul id=\"grove-index-cards\">\n {sorted.map((item) => (\n <li class=\"m-0 p-0\" data-record-slug={item.slug}>\n <IndexRow\n record={item as Parameters<typeof IndexRow>[0][\"record\"]}\n detailHref={`/${slug}/${item.slug}/`}\n />\n </li>\n ))}\n </ul>\n </body>\n</html>\n",
|
|
298
298
|
"type": "registry:page",
|
|
299
299
|
"target": "~/src/pages/[slug]/page/cards.astro"
|
|
300
300
|
},
|
|
@@ -306,7 +306,7 @@
|
|
|
306
306
|
},
|
|
307
307
|
{
|
|
308
308
|
"path": "default/components/grove/directory-browse.astro",
|
|
309
|
-
"content": "---\n/**\n * DirectoryBrowse — the browse page body, shared by the two routes\n * that render it: `/{slug}/` (page 1) and `/{slug}/page/{n}/`.\n *\n * Layout, top to bottom:\n * - PageHeader (the only place the page names itself)\n * - Search + Sort on one row\n * - Every facet filter on the next row\n * - Applied-filter chips + Clear all on their own row\n * - Result count / sort / page line\n * - Card grid, then pagination\n *\n * Navigation model: **pages are real paths.** Each route prerenders\n * only its own 20 records, so an unfiltered directory of any size is\n * crawlable, works without JavaScript, and never ships the whole\n * catalogue as DOM.\n *\n * Filtering stays client-side: these routes are PRERENDERED, so at\n * build time `Astro.url.searchParams` is empty. `DirectoryIndexClient`\n * re-reads `location.search` and re-derives the result list, chips,\n * pagination, and facet intersection counts with the same\n * `@grove-dev/core/directory` functions the server used. Filtered views\n * paginate with `?page=N` on the base route.\n */\nimport siteConfig from '@grove/generated/site-config.json';\nimport { SORT_OPTIONS, sortDisplay } from '@grove-dev/astro';\nimport {\n getDirectoryIndexModel,\n itemLabel,\n itemLabelPlural,\n seoTitle,\n taxonomy,\n titleCaseFirst,\n} from '@grove-dev/astro/server';\nimport { formatCount } from '@grove-dev/core';\nimport BaseLayout from '../../layouts/base-layout.astro';\nimport { chipClass } from '../../lib/classnames.ts';\nimport Button from '../ui/button.astro';\nimport FilterDrawer from '../ui/filter-drawer.astro';\nimport PageHeader from '../ui/page-header.astro';\nimport SearchField from '../ui/search-field.astro';\nimport CardGrid from './card-grid.astro';\nimport DirectoryIndexClient from './directory-index-client.astro';\nimport IndexRow from './index-row.astro';\nimport Pagination from './pagination.astro';\nimport RefinePanel from './refine-panel.astro';\nimport SmartLensTabs from './smart-lens-tabs.astro';\n\ninterface Props {\n /** 1-based page this route renders. */\n routePage?: number;\n}\n\nconst { routePage = 1 } = Astro.props;\nconst slug = siteConfig.blueprintConfig?.routeSlug ?? 'projects';\nconst {\n total,\n filters,\n facetGroups,\n searchPlaceholder,\n sort,\n sorted,\n pageItems,\n pages,\n page,\n chips,\n clearFiltersHref,\n hrefForResultPage,\n seo,\n} = getDirectoryIndexModel(Astro.url.searchParams, siteConfig, { page: routePage });\n\n// Page 2+ gets a distinct title and skips the ItemList JSON-LD so the\n// list markup isn't duplicated across every paginated route. The\n// per-page description is built inside `getDirectoryIndexModel` so it\n// fits inside the 160-char cap; this view just forwards `seo.title`.\nconst title =\n page > 1\n ? seoTitle(`Browse ${titleCaseFirst(itemLabelPlural())} — Page ${page}`, siteConfig.name)\n : seo.title;\nconst description = seo.description;\n---\n\n<BaseLayout\n title={title}\n description={description}\n image={seo.image}\n jsonLd={page > 1 ? undefined : seo.jsonLd}\n site={siteConfig}\n submitHref=\"/submit\"\n submitLabel={`Submit ${itemLabel()}`}\n>\n <section class=\"border-b border-border bg-background\">\n <div class=\"mx-auto w-full max-w-container px-5 pt-10 sm:px-7 sm:pt-12\">\n <PageHeader\n eyebrow={slug}\n title={`Browse ${slug}`}\n description={`Search, filter, and explore ${formatCount(total, { singular: itemLabel(), plural: itemLabelPlural() })} in this directory.`}\n />\n\n {/* Curated views. Real links (not a JS-driven control) — the\n same server-and-client filter pipeline (@grove-dev/core's\n filtersFromSearchParams/filterRecords) already understands\n `?lens=`, so this works with JS disabled too. */}\n <SmartLensTabs\n currentParams={Astro.url.searchParams}\n pathPrefix={`/${slug}`}\n lensIds={[\"all\", \"hot\", \"new\", \"mature\"]}\n class=\"mt-6\"\n />\n\n {/* Row 1 — search and sort. Search filters as you type (see\n DirectoryIndexClient); the submit button is sr-only so Enter\n still works when JavaScript never arrives. */}\n <form\n method=\"get\"\n action={`/${slug}`}\n id=\"search-form\"\n class=\"mt-6 flex flex-col gap-2 sm:flex-row\"\n role=\"search\"\n >\n <SearchField\n class=\"flex-1\"\n label={`Search ${itemLabelPlural()}`}\n value={filters.q ?? \"\"}\n placeholder={searchPlaceholder}\n shortcut\n />\n <label class=\"relative\">\n <span class=\"sr-only\">{`Sort ${itemLabelPlural()}`}</span>\n <select\n id=\"sort-select\"\n name=\"sort\"\n class=\"h-10 w-full cursor-pointer appearance-none rounded-md border border-input bg-background py-1.5 pl-3 pr-8 text-sm font-medium text-foreground transition-colors hover:border-ring focus:border-ring focus:outline-none focus:ring-2 focus:ring-ring/20 sm:w-auto\"\n >\n {SORT_OPTIONS.map((o) => (\n <option value={o.value} selected={o.value === sort}>{o.label}</option>\n ))}\n </select>\n <svg\n viewBox=\"0 0 16 16\"\n width=\"11\"\n height=\"11\"\n aria-hidden=\"true\"\n class=\"pointer-events-none absolute right-2.5 top-1/2 -translate-y-1/2 text-muted-foreground\"\n fill=\"currentColor\"\n >\n <path d=\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\" />\n </svg>\n </label>\n <button type=\"submit\" class=\"sr-only\">Search</button>\n </form>\n\n {/* Row 2 — every filter on one line. On mobile they collapse into\n a full-width \"Filters (n)\" button opening a bottom sheet. */}\n <div class=\"mt-3\">\n <FilterDrawer label=\"Filters\" activeCount={chips.length} clearHref={clearFiltersHref}>\n <RefinePanel\n class=\"max-md:flex-col max-md:items-stretch\"\n groups={facetGroups}\n initial={filters}\n pathPrefix={`/${slug}`}\n hide={[\"sort\"]}\n />\n </FilterDrawer>\n </div>\n\n {/* Row 3 — what is currently narrowing the list, and one way out\n of all of it. Server-rendered empty on this prerendered route;\n the client fills it from the live query string. */}\n <div\n id=\"active-filters\"\n class:list={[\"mt-3 flex flex-wrap items-center gap-1.5 pb-6\", chips.length === 0 && \"hidden\"]}\n aria-label=\"Active filters\"\n >\n {chips.map((chip) => (\n <a href={chip.href} class={chipClass()} aria-label={`Remove filter: ${chip.label}`}>\n {chip.label} <span aria-hidden=\"true\">×</span>\n </a>\n ))}\n {chips.length > 0 && (\n <a\n href={clearFiltersHref}\n class=\"text-2xs font-medium text-ink-500 underline decoration-border underline-offset-2 hover:text-ink-900 dark:hover:text-ink-100\"\n aria-label=\"Clear all active filters\"\n >\n Clear all\n </a>\n )}\n </div>\n {chips.length === 0 && <div class=\"pb-6\"></div>}\n </div>\n </section>\n\n <section class=\"py-10 sm:py-12\">\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n {/* The count line IS the results heading — it carries a fact,\n which \"All projects / Every item in the directory\" did not,\n and it keeps the document's heading order intact above the\n cards' own h3s. */}\n <h2\n id=\"results-heading\"\n class=\"m-0 mb-5 text-2xs font-normal text-ink-500 dark:text-ink-400\"\n >\n <span id=\"results-count\" class=\"font-mono font-semibold text-ink-900 dark:text-ink-100\">\n {sorted.length} {sorted.length === 1 ? itemLabel() : itemLabelPlural()}\n </span>\n <span id=\"results-sort\">{` · sorted by ${sortDisplay(sort)}`}</span>\n <span id=\"results-page\">{pages > 1 ? ` · page ${page} of ${pages}` : \"\"}</span>\n </h2>\n\n <CardGrid id=\"results-list\">\n {pageItems.map((item, i) => (\n <li class=\"m-0 p-0\" data-record-slug={item.slug}>\n <IndexRow\n record={item as Parameters<typeof IndexRow>[0][\"record\"]}\n detailHref={`/${slug}/${item.slug}`}\n eager={i < 3}\n />\n </li>\n ))}\n </CardGrid>\n\n <div id=\"empty-state\" class:list={[\"py-12 text-center\", sorted.length > 0 && \"hidden\"]}>\n <p class=\"m-0 text-sm font-medium text-ink-700 dark:text-ink-200\">\n {`No ${itemLabelPlural()} match these filters.`}\n </p>\n <Button href={clearFiltersHref} variant=\"secondary\" size=\"sm\" class=\"mt-4\">Clear filters</Button>\n </div>\n {/* Plain div wrapper — Pagination renders its own\n <nav aria-label=\"Pagination\">, so a nav here would nest two\n identical landmarks. */}\n <div id=\"results-pagination\" class=\"mt-8 flex flex-wrap items-center justify-center gap-1.5\">\n <Pagination current={page} total={pages} hrefFor={hrefForResultPage} />\n </div>\n </div>\n </section>\n\n <section class=\"border-t border-ink-200 dark:border-ink-800\">\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n <div class=\"flex flex-col items-center gap-3 py-12 text-center\">\n <h2 class=\"m-0 text-xl font-semibold tracking-tight text-ink-900 dark:text-ink-100\">\n {`Know a real ${itemLabel()} that belongs here?`}\n </h2>\n <p class=\"m-0 max-w-2xl text-sm text-ink-500 dark:text-ink-400\">\n {`Open a pull request with a YAML file. We review every submission against the bar — no marketing, no tutorials.`}\n </p>\n <Button href=\"/submit\" variant=\"primary\" size=\"sm\" class=\"mt-2\">\n {`Submit ${itemLabel()}`}\n </Button>\n\n </div>\n </div>\n </section>\n\n <DirectoryIndexClient\n slug={slug}\n singular={itemLabel()}\n plural={itemLabelPlural()}\n taxonomy={taxonomy}\n routePage={page}\n />\n</BaseLayout>\n",
|
|
309
|
+
"content": "---\n/**\n * DirectoryBrowse — the browse page body, shared by the two routes\n * that render it: `/{slug}/` (page 1) and `/{slug}/page/{n}/`.\n *\n * Layout, top to bottom:\n * - PageHeader (the only place the page names itself)\n * - Search + Sort on one row\n * - Every facet filter on the next row\n * - Applied-filter chips + Clear all on their own row\n * - Result count / sort / page line\n * - Card grid, then pagination\n *\n * Navigation model: **pages are real paths.** Each route prerenders\n * only its own 20 records, so an unfiltered directory of any size is\n * crawlable, works without JavaScript, and never ships the whole\n * catalogue as DOM.\n *\n * Filtering stays client-side: these routes are PRERENDERED, so at\n * build time `Astro.url.searchParams` is empty. `DirectoryIndexClient`\n * re-reads `location.search` and re-derives the result list, chips,\n * pagination, and facet intersection counts with the same\n * `@grove-dev/core/directory` functions the server used. Filtered views\n * paginate with `?page=N` on the base route.\n */\nimport siteConfig from '@grove/generated/site-config.json';\nimport { SORT_OPTIONS, sortDisplay } from '@grove-dev/astro';\nimport {\n getDirectoryIndexModel,\n itemLabel,\n itemLabelPlural,\n seoTitle,\n taxonomy,\n titleCaseFirst,\n} from '@grove-dev/astro/server';\nimport { formatCount } from '@grove-dev/core';\nimport BaseLayout from '../../layouts/base-layout.astro';\nimport { chipClass } from '../../lib/classnames.ts';\nimport Button from '../ui/button.astro';\nimport FilterDrawer from '../ui/filter-drawer.astro';\nimport PageHeader from '../ui/page-header.astro';\nimport SearchField from '../ui/search-field.astro';\nimport CardGrid from './card-grid.astro';\nimport DirectoryIndexClient from './directory-index-client.astro';\nimport IndexRow from './index-row.astro';\nimport Pagination from './pagination.astro';\nimport RefinePanel from './refine-panel.astro';\nimport SmartLensTabs from './smart-lens-tabs.astro';\n\ninterface Props {\n /** 1-based page this route renders. */\n routePage?: number;\n}\n\nconst { routePage = 1 } = Astro.props;\nconst slug = siteConfig.blueprintConfig?.routeSlug ?? 'projects';\nconst {\n total,\n filters,\n facetGroups,\n searchPlaceholder,\n sort,\n sorted,\n pageItems,\n pages,\n page,\n chips,\n clearFiltersHref,\n hrefForResultPage,\n seo,\n} = getDirectoryIndexModel(Astro.url.searchParams, siteConfig, { page: routePage });\n\n// Page 2+ gets a distinct title and skips the ItemList JSON-LD so the\n// list markup isn't duplicated across every paginated route. The\n// per-page description is built inside `getDirectoryIndexModel` so it\n// fits inside the 160-char cap; this view just forwards `seo.title`.\nconst title =\n page > 1\n ? seoTitle(`Browse ${titleCaseFirst(itemLabelPlural())} — Page ${page}`, siteConfig.name)\n : seo.title;\nconst description = seo.description;\n---\n\n<BaseLayout\n title={title}\n description={description}\n image={seo.image}\n jsonLd={page > 1 ? undefined : seo.jsonLd}\n site={siteConfig}\n submitHref=\"/submit\"\n submitLabel={`Submit ${itemLabel()}`}\n>\n <section class=\"border-b border-border bg-background\">\n <div class=\"mx-auto w-full max-w-container px-5 pt-10 sm:px-7 sm:pt-12\">\n <PageHeader\n eyebrow={slug}\n title={`Browse ${slug}`}\n description={`Search, filter, and explore ${formatCount(total, { singular: itemLabel(), plural: itemLabelPlural() })} in this directory.`}\n />\n\n {/* Curated views. Real links (not a JS-driven control) — the\n same server-and-client filter pipeline (@grove-dev/core's\n filtersFromSearchParams/filterRecords) already understands\n `?lens=`, so this works with JS disabled too. */}\n <SmartLensTabs\n currentParams={Astro.url.searchParams}\n pathPrefix={`/${slug}`}\n lensIds={[\"all\", \"hot\", \"new\", \"mature\"]}\n class=\"mt-6\"\n />\n\n {/* Row 1 — search and sort. Search filters as you type (see\n DirectoryIndexClient); the submit button is sr-only so Enter\n still works when JavaScript never arrives. */}\n <form\n method=\"get\"\n action={`/${slug}`}\n id=\"search-form\"\n class=\"mt-6 flex flex-col gap-2 sm:flex-row\"\n role=\"search\"\n >\n <SearchField\n class=\"flex-1\"\n label={`Search ${itemLabelPlural()}`}\n value={filters.q ?? \"\"}\n placeholder={searchPlaceholder}\n shortcut\n />\n <label class=\"relative\">\n <span class=\"sr-only\">{`Sort ${itemLabelPlural()}`}</span>\n <select\n id=\"sort-select\"\n name=\"sort\"\n class=\"h-10 w-full cursor-pointer appearance-none rounded-md border border-input bg-background py-1.5 pl-3 pr-8 text-sm font-medium text-foreground transition-colors hover:border-ring focus:border-ring focus:outline-none focus:ring-2 focus:ring-ring/20 sm:w-auto\"\n >\n {SORT_OPTIONS.map((o) => (\n <option value={o.value} selected={o.value === sort}>{o.label}</option>\n ))}\n </select>\n <svg\n viewBox=\"0 0 16 16\"\n width=\"11\"\n height=\"11\"\n aria-hidden=\"true\"\n class=\"pointer-events-none absolute right-2.5 top-1/2 -translate-y-1/2 text-muted-foreground\"\n fill=\"currentColor\"\n >\n <path d=\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\" />\n </svg>\n </label>\n <button type=\"submit\" class=\"sr-only\">Search</button>\n </form>\n\n {/* Row 2 — every filter on one line. On mobile they collapse into\n a full-width \"Filters (n)\" button opening a bottom sheet. */}\n <div class=\"mt-3\">\n <FilterDrawer label=\"Filters\" activeCount={chips.length} clearHref={clearFiltersHref}>\n <RefinePanel\n class=\"max-md:flex-col max-md:items-stretch\"\n groups={facetGroups}\n initial={filters}\n pathPrefix={`/${slug}`}\n hide={[\"sort\"]}\n />\n </FilterDrawer>\n </div>\n\n {/* Row 3 — what is currently narrowing the list, and one way out\n of all of it. Server-rendered empty on this prerendered route;\n the client fills it from the live query string. */}\n <div\n id=\"active-filters\"\n class:list={[\"mt-3 flex flex-wrap items-center gap-1.5 pb-6\", chips.length === 0 && \"hidden\"]}\n aria-label=\"Active filters\"\n >\n {chips.map((chip) => (\n <a href={chip.href} class={chipClass()} aria-label={`Remove filter: ${chip.label}`}>\n {chip.label} <span aria-hidden=\"true\">×</span>\n </a>\n ))}\n {chips.length > 0 && (\n <a\n href={clearFiltersHref}\n class=\"text-2xs font-medium text-ink-500 underline decoration-border underline-offset-2 hover:text-ink-900 dark:hover:text-ink-100\"\n aria-label=\"Clear all active filters\"\n >\n Clear all\n </a>\n )}\n </div>\n {chips.length === 0 && <div class=\"pb-6\"></div>}\n </div>\n </section>\n\n <section class=\"py-10 sm:py-12\">\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n {/* The count line IS the results heading — it carries a fact,\n which \"All projects / Every item in the directory\" did not,\n and it keeps the document's heading order intact above the\n cards' own h3s. */}\n <h2\n id=\"results-heading\"\n class=\"m-0 mb-5 text-2xs font-normal text-ink-500 dark:text-ink-400\"\n >\n <span id=\"results-count\" class=\"font-mono font-semibold text-ink-900 dark:text-ink-100\">\n {sorted.length} {sorted.length === 1 ? itemLabel() : itemLabelPlural()}\n </span>\n <span id=\"results-sort\">{` · sorted by ${sortDisplay(sort)}`}</span>\n <span id=\"results-page\">{pages > 1 ? ` · page ${page} of ${pages}` : \"\"}</span>\n </h2>\n\n <CardGrid id=\"results-list\">\n {pageItems.map((item, i) => (\n <li class=\"m-0 p-0\" data-record-slug={item.slug}>\n <IndexRow\n record={item as Parameters<typeof IndexRow>[0][\"record\"]}\n detailHref={`/${slug}/${item.slug}/`}\n eager={i < 3}\n />\n </li>\n ))}\n </CardGrid>\n\n <div id=\"empty-state\" class:list={[\"py-12 text-center\", sorted.length > 0 && \"hidden\"]}>\n <p class=\"m-0 text-sm font-medium text-ink-700 dark:text-ink-200\">\n {`No ${itemLabelPlural()} match these filters.`}\n </p>\n <Button href={clearFiltersHref} variant=\"secondary\" size=\"sm\" class=\"mt-4\">Clear filters</Button>\n </div>\n {/* Plain div wrapper — Pagination renders its own\n <nav aria-label=\"Pagination\">, so a nav here would nest two\n identical landmarks. */}\n <div id=\"results-pagination\" class=\"mt-8 flex flex-wrap items-center justify-center gap-1.5\">\n <Pagination current={page} total={pages} hrefFor={hrefForResultPage} />\n </div>\n </div>\n </section>\n\n <section class=\"border-t border-ink-200 dark:border-ink-800\">\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n <div class=\"flex flex-col items-center gap-3 py-12 text-center\">\n <h2 class=\"m-0 text-xl font-semibold tracking-tight text-ink-900 dark:text-ink-100\">\n {`Know a real ${itemLabel()} that belongs here?`}\n </h2>\n <p class=\"m-0 max-w-2xl text-sm text-ink-500 dark:text-ink-400\">\n {`Open a pull request with a YAML file. We review every submission against the bar — no marketing, no tutorials.`}\n </p>\n <Button href=\"/submit\" variant=\"primary\" size=\"sm\" class=\"mt-2\">\n {`Submit ${itemLabel()}`}\n </Button>\n\n </div>\n </div>\n </section>\n\n <DirectoryIndexClient\n slug={slug}\n singular={itemLabel()}\n plural={itemLabelPlural()}\n taxonomy={taxonomy}\n routePage={page}\n />\n</BaseLayout>\n",
|
|
310
310
|
"type": "registry:component",
|
|
311
311
|
"target": "~/src/components/grove/directory-browse.astro"
|
|
312
312
|
},
|
|
@@ -354,7 +354,7 @@
|
|
|
354
354
|
},
|
|
355
355
|
{
|
|
356
356
|
"path": "default/pages/[slug]/[recordSlug].astro",
|
|
357
|
-
"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 siteConfig from '@grove/generated/site-config.json';\nimport {
|
|
357
|
+
"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",
|
|
358
358
|
"type": "registry:page",
|
|
359
359
|
"target": "~/src/pages/[slug]/[recordSlug].astro"
|
|
360
360
|
},
|
|
@@ -366,16 +366,28 @@
|
|
|
366
366
|
},
|
|
367
367
|
{
|
|
368
368
|
"path": "default/components/grove/record-sidebar.astro",
|
|
369
|
-
"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>",
|
|
369
|
+
"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>",
|
|
370
370
|
"type": "registry:component",
|
|
371
371
|
"target": "~/src/components/grove/record-sidebar.astro"
|
|
372
372
|
},
|
|
373
373
|
{
|
|
374
374
|
"path": "default/components/grove/editorial-summary.astro",
|
|
375
|
-
"content": "---\n/**\n * EditorialSummary.astro\n *\n * Compact card at the top of the record body that surfaces the\n * curator's \"Best for\" and \"Consider before using\" notes. Renders
|
|
375
|
+
"content": "---\n/**\n * EditorialSummary.astro\n *\n * Compact card at the top of the record body that surfaces the\n * curator's \"Why it's listed\", \"Best for\" and \"Consider before using\"\n * notes. Renders nothing when all three are empty.\n *\n * This is the editorial half of the page: the sidebar (right) is\n * auto-generated facts; the summary (left) is human-authored\n * curation.\n */\ninterface Props {\n bestFor: string[];\n caveats: string[];\n /** Why the curator included this record. Optional for older pages. */\n whyListed?: string[];\n}\n\nconst { bestFor, caveats, whyListed = [] } = Astro.props;\nconst hasAny = bestFor.length > 0 || caveats.length > 0 || whyListed.length > 0;\n---\n\n{hasAny && (\n <section class=\"grove-editorial mb-10 rounded-[var(--radius-lg)] border border-ink-200 bg-card p-5 dark:border-ink-800\" aria-label=\"Editorial summary\">\n <h2 class=\"sr-only\">Editorial summary</h2>\n {whyListed.length > 0 && (\n <div class:list={[(bestFor.length > 0 || caveats.length > 0) && 'mb-5 border-b border-ink-200 pb-5 dark:border-ink-800']}>\n <h3 class=\"m-0 text-2xs font-semibold uppercase tracking-wider text-muted-foreground\">\n Why it's listed\n </h3>\n <ul class=\"mt-2 m-0 flex list-none flex-col gap-1.5 p-0 text-sm text-ink-700 dark:text-ink-200\">\n {whyListed.map((w) => (\n <li class=\"leading-relaxed\">{w}</li>\n ))}\n </ul>\n </div>\n )}\n <div class=\"grid grid-cols-1 gap-5 sm:grid-cols-2\">\n {bestFor.length > 0 && (\n <div>\n <h3 class=\"m-0 flex items-center gap-1.5 text-2xs font-semibold uppercase tracking-wider text-success\">\n <svg viewBox=\"0 0 16 16\" width=\"11\" height=\"11\" aria-hidden=\"true\" fill=\"currentColor\">\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 Best for\n </h3>\n <ul class=\"mt-2 m-0 flex list-none flex-col gap-1.5 p-0 text-sm text-ink-700 dark:text-ink-200\">\n {bestFor.map((b) => (\n <li class=\"leading-relaxed\">{b}</li>\n ))}\n </ul>\n </div>\n )}\n {caveats.length > 0 && (\n <div>\n <h3 class=\"m-0 flex items-center gap-1.5 text-2xs font-semibold uppercase tracking-wider text-warning\">\n <svg viewBox=\"0 0 16 16\" width=\"11\" height=\"11\" aria-hidden=\"true\" fill=\"currentColor\">\n <path d=\"M8 1.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13zM0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8zm9 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-.25-6.25a.75.75 0 0 0-1.5 0v3.5a.75.75 0 0 0 .4 1.04l1.6.8a.75.75 0 1 0 .67-1.34l-1.17-.59V4.75z\" />\n </svg>\n Consider before using\n </h3>\n <ul class=\"mt-2 m-0 flex list-none flex-col gap-1.5 p-0 text-sm text-ink-700 dark:text-ink-200\">\n {caveats.map((c) => (\n <li class=\"leading-relaxed\">{c}</li>\n ))}\n </ul>\n </div>\n )}\n </div>\n </section>\n)}",
|
|
376
376
|
"type": "registry:component",
|
|
377
377
|
"target": "~/src/components/grove/editorial-summary.astro"
|
|
378
378
|
},
|
|
379
|
+
{
|
|
380
|
+
"path": "default/components/grove/record-relations.astro",
|
|
381
|
+
"content": "---\n/**\n * RecordRelations.astro\n *\n * The record's relations to subjects — \"Alternative to Notion\" — as a\n * row of links under the header. Each links to the subject's hub\n * collection when one exists, so a reader who came for one alternative\n * can reach the page that compares all of them. Without a hub the\n * subject renders as plain text: a link to the vendor would send the\n * reader away from the directory at the top of the page.\n *\n * A relation the curator inferred (`evidence.type: editorial`) is\n * marked as such; one the project states itself is not second-guessed.\n *\n * Renders nothing when the record has no relations.\n */\nimport type { RecordContextModel } from '@grove-dev/astro/server';\n\ninterface Props {\n relations: RecordContextModel['relations'];\n}\n\nconst { relations } = Astro.props;\n---\n\n{relations.length > 0 && (\n <ul class=\"m-0 mb-8 flex list-none flex-wrap gap-2 p-0\" aria-label=\"Related products\">\n {relations.map((relation) => (\n <li class=\"m-0 inline-flex items-center gap-1.5 rounded-full border border-border bg-card px-3 py-1 text-xs text-muted-foreground\">\n <span>{relation.label}</span>\n {relation.hub ? (\n <a href={relation.hub.url} class=\"font-medium text-foreground underline-offset-2 hover:underline\">\n {relation.subject.name}\n </a>\n ) : (\n <span class=\"font-medium text-foreground\">{relation.subject.name}</span>\n )}\n {relation.evidence?.type === 'editorial' && (\n <span title=\"The curator's comparison, not the project's own claim\">· editor's match</span>\n )}\n </li>\n ))}\n </ul>\n)}\n",
|
|
382
|
+
"type": "registry:component",
|
|
383
|
+
"target": "~/src/components/grove/record-relations.astro"
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"path": "default/components/grove/related-records.astro",
|
|
387
|
+
"content": "---\n/**\n * RelatedRecords.astro\n *\n * Where a record page leads next: sibling records that share a subject\n * (\"Other alternatives to Notion\") and the collections the record\n * appears in. Both come from `getRecordContextModel`. Before this, a\n * detail page linked to its stack and its category and nothing else.\n *\n * Renders nothing when there is neither.\n */\nimport type { RecordContextModel } from '@grove-dev/astro/server';\n\ninterface Props {\n context: RecordContextModel;\n}\n\nconst { context } = Astro.props;\nconst hasAny = context.relatedRecords.length > 0 || context.collectionMembership.length > 0;\n---\n\n{hasAny && (\n <section class=\"mt-12 border-t border-border pt-8\" aria-label=\"Related\">\n {context.relatedRecords.map((group) => (\n <div class=\"mb-8\">\n <h2 class=\"m-0 text-[1.125rem] font-semibold tracking-tight text-foreground\">\n Other {group.label.toLowerCase().replace(/ to$/, 's to')} {group.subject.name}\n </h2>\n <ul class=\"m-0 mt-3 grid list-none grid-cols-1 gap-2 p-0 sm:grid-cols-2\">\n {group.records.map((r) => (\n <li class=\"m-0 rounded-md border border-border bg-card px-3 py-2.5\">\n <a href={r.url} class=\"text-sm font-medium text-foreground no-underline hover:underline\">{r.title}</a>\n {r.description && (\n <p class=\"m-0 mt-1 line-clamp-2 text-[0.8125rem] leading-relaxed text-muted-foreground\">{r.description}</p>\n )}\n </li>\n ))}\n </ul>\n {group.hub && (\n <p class=\"m-0 mt-3 text-sm\">\n <a href={group.hub.url} class=\"font-medium text-foreground underline underline-offset-2\">\n Compare them all: {group.hub.title} →\n </a>\n </p>\n )}\n </div>\n ))}\n\n {context.collectionMembership.length > 0 && (\n <div>\n <h2 class=\"m-0 text-[1.125rem] font-semibold tracking-tight text-foreground\">Featured in</h2>\n <ul class=\"m-0 mt-3 flex list-none flex-wrap gap-2 p-0\">\n {context.collectionMembership.map((c) => (\n <li class=\"m-0\">\n <a href={c.url} class=\"inline-flex rounded-full border border-border bg-card px-3 py-1 text-sm text-foreground no-underline hover:border-ink-400\">\n {c.title}\n </a>\n </li>\n ))}\n </ul>\n </div>\n )}\n </section>\n)}\n",
|
|
388
|
+
"type": "registry:component",
|
|
389
|
+
"target": "~/src/components/grove/related-records.astro"
|
|
390
|
+
},
|
|
379
391
|
{
|
|
380
392
|
"path": "default/components/grove/table-of-contents.astro",
|
|
381
393
|
"content": "---\n/**\n * TableOfContents.astro\n *\n * Collapsible on-page nav for a record's Markdown body.\n *\n * Behavior:\n * - Mobile (below lg): rendered as a closed `<details>` dropdown.\n * - Desktop (lg+): forced open by the `.grove-toc` media rule in\n * `styles.css` (CSS reveals the list without the `open`\n * attribute) so the nav stays visible while the user scrolls.\n * - Heading IDs come from the markdown renderer; the TOC entries\n * are pre-computed by `extractToc` and passed in.\n *\n * The scroll-spy + smooth-scroll logic lives in an inline script\n * that finds every `data-toc-link` on the page and highlights the\n * link whose target is closest to the top of the viewport (rAF-\n * throttled). Active styling comes from the `data-toc-active`\n * attribute toggled in the script + CSS rules in `styles.css`.\n */\nimport type { TocEntry } from '@grove-dev/core';\n\ninterface Props {\n /** Heading entries from `extractToc`. */\n items: TocEntry[];\n /** Optional accessible label override. */\n label?: string;\n}\n\nconst { items, label = 'On this page' } = Astro.props;\nconst hasItems = items.length > 1;\n---\n\n{hasItems && (\n <details class=\"grove-toc lg:border-0\">\n <summary class=\"cursor-pointer list-none pb-3 text-2xs font-semibold uppercase tracking-wider text-ink-500 hover:text-ink-900 dark:text-ink-400 dark:hover:text-ink-100 lg:cursor-default lg:pointer-events-none lg:pb-2\">\n <span class=\"inline-flex items-center gap-1.5\">\n <svg viewBox=\"0 0 16 16\" width=\"11\" height=\"11\" aria-hidden=\"true\" fill=\"currentColor\" class=\"grove-toc-chevron transition-transform lg:hidden\">\n <path d=\"M6 4l4 4-4 4V4z\" />\n </svg>\n {label}\n </span>\n </summary>\n {/* Full list, no inner scroll — the TOC lives in the right rail\n and every entry stays visible. h3 entries indent further under\n their h2 parents; the active state is a left-rail indicator +\n text-color emphasis set by the script + styles.css. */}\n <ol class=\"grove-toc-list list-none py-1 text-sm lg:py-0\">\n {items.map((entry) => (\n <li\n class:list={[\n \"grove-toc-item relative\",\n entry.depth >= 3 && \"grove-toc-item--h3\",\n ]}\n >\n <a\n href={`#${entry.id}`}\n class:list={[\n \"grove-toc-link block py-1.5 text-ink-500 no-underline transition-colors hover:text-ink-900 dark:text-ink-400 dark:hover:text-ink-100\",\n entry.depth >= 2 && \"pl-3 lg:pl-4\",\n entry.depth >= 3 && \"pl-6 text-[0.8125rem] lg:pl-7\",\n ]}\n data-toc-link={entry.id}\n >\n {entry.text}\n </a>\n </li>\n ))}\n </ol>\n </details>\n)}\n\n{hasItems && (\n <script is:inline define:vars={{ tocIds: items.map((i) => i.id) }}>\n (function () {\n // Desktop (lg+): force the details open so the nav stays visible\n // while scrolling; the summary is pointer-events-none there. On\n // narrow viewports restore the closed dropdown default. CSS in\n // styles.css covers the no-JS case.\n var toc = document.querySelector(\".grove-toc\");\n if (toc) {\n var mq = window.matchMedia(\"(min-width: 64rem)\");\n var syncOpen = function () { toc.open = mq.matches; };\n if (typeof mq.addEventListener === \"function\") {\n mq.addEventListener(\"change\", syncOpen);\n }\n syncOpen();\n }\n\n // Smooth scroll + history-replace on TOC link clicks.\n function onClick(e) {\n var link = e.target.closest(\"a[data-toc-link]\");\n if (!link) return;\n e.preventDefault();\n var id = link.getAttribute(\"data-toc-link\");\n var target = document.getElementById(id);\n if (!target) return;\n target.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\n history.replaceState(null, \"\", \"#\" + id);\n }\n document.addEventListener(\"click\", onClick);\n\n // Scroll-spy: rAF-throttled, toggles `data-toc-active` on the\n // link whose heading is closest to the top of the viewport.\n // CSS handles the active styling — no dynamic Tailwind classes.\n var headings = tocIds\n .map(function (id) { return document.getElementById(id); })\n .filter(function (el) { return !!el; });\n if (!headings.length) return;\n var links = new Map();\n document.querySelectorAll(\"a[data-toc-link]\").forEach(function (a) {\n links.set(a.getAttribute(\"data-toc-link\"), a);\n });\n var active = null;\n var ticking = false;\n function update() {\n ticking = false;\n var top = window.scrollY + 140;\n var current = headings[0].id;\n for (var i = 0; i < headings.length; i++) {\n if (headings[i].offsetTop <= top) current = headings[i].id;\n else break;\n }\n if (current === active) return;\n active = current;\n links.forEach(function (a, id) {\n if (id === current) a.setAttribute(\"data-toc-active\", \"\");\n else a.removeAttribute(\"data-toc-active\");\n });\n }\n function onScroll() {\n if (ticking) return;\n ticking = true;\n requestAnimationFrame(update);\n }\n window.addEventListener(\"scroll\", onScroll, { passive: true });\n update();\n })();\n </script>\n)}",
|
|
@@ -408,7 +420,7 @@
|
|
|
408
420
|
},
|
|
409
421
|
{
|
|
410
422
|
"path": "default/pages/about.astro",
|
|
411
|
-
"content": "---\nimport siteConfig from '@grove/generated/site-config.json';\nimport {\n getAboutPageSeo,\n getPageContentHtml,\n indexSlug,\n itemLabel,\n itemLabelPlural,\n} from '@grove-dev/astro/server';\n/**\n * About page — generic.\n *\n * A continuous narrative in three movements: what this site is →\n * how it's built (the file-first pipeline: source files → Grove →\n * multiple outputs → ongoing sync) → how to contribute. Prose\n * sections, not a stack of cards — the reading experience is the\n * point here.\n *\n * The copy is generic — references \"directory\", \"record\",\n * \"repository\" — so it works for any blueprint, and every dynamic\n * value (`siteConfig.tagline`, `siteConfig.repoUrl`, item labels)\n * flows from the site config.\n */\nimport BaseLayout from '../layouts/base-layout.astro';\nimport Container from '../layouts/container.astro';\nimport { buttonClass } from '../lib/classnames.ts';\n\nconst githubUrl = siteConfig.repoUrl;\nconst seo = getAboutPageSeo(siteConfig);\nconst slug = indexSlug();\nconst item = itemLabel();\nconst items = itemLabelPlural();\nconst pageContentHtml = getPageContentHtml('about');\n---\n\n<BaseLayout title={seo.title} description={seo.description} image={seo.image} jsonLd={seo.jsonLd} site={siteConfig}>\n <Container size=\"narrow\">\n <article class=\"py-12 sm:py-16\">\n <nav class=\"text-2xs text-muted-foreground\" aria-label=\"Breadcrumb\">\n <a href=\"/\" class=\"hover:text-foreground\">Home</a>\n <span class=\"mx-1.5 text-ink-300 dark:text-ink-700\">/</span>\n <span class=\"text-foreground\">About</span>\n </nav>\n\n {pageContentHtml ? (\n <section class=\"grove-prose mt-8\" set:html={pageContentHtml} />\n ) : (\n <>\n <header class=\"mt-5\">\n <span class=\"text-2xs font-medium uppercase tracking-wider text-muted-foreground\">\n About\n </span>\n <h1 class=\"mt-1 m-0 text-[1.75rem] sm:text-[2.25rem] font-semibold tracking-[-0.02em] leading-[1.1] text-foreground\">\n A directory that lives in files.\n </h1>\n <p class=\"mt-4 m-0 text-[1rem] sm:text-[1.0625rem] leading-relaxed text-foreground max-w-[62ch]\">\n {siteConfig.name} is a curated, health-aware directory of open-source\n {items} — and every listing you see here is a plain YAML file in a\n public repository. This website is one of the outputs generated from\n those files.\n </p>\n </header>\n\n <section class=\"mt-10\">\n <h2 class=\"m-0 text-[1.25rem] sm:text-[1.375rem] font-semibold tracking-tight text-foreground\">\n Why it exists\n </h2>\n <p class=\"mt-3 m-0 text-[0.9375rem] leading-relaxed text-foreground\">\n GitHub search and README lists optimize for the repository name and\n description. They rarely tell you whether a project is a real {item}\n or a demo, which stack it uses beyond the headline, how active it\n really is, or whether it has a clear license.\n </p>\n <p class=\"mt-3 m-0 text-[0.9375rem] leading-relaxed text-foreground\">\n Each entry here carries the metadata a developer actually needs\n before opening the repo: stack, platforms, license, activity and\n health signals, plus curated notes — best for, why listed, caveats.\n Everything links back to real, runnable source. No SEO spam, no\n affiliate farms, no broken links.\n </p>\n </section>\n\n <section class=\"mt-10\">\n <h2 class=\"m-0 text-[1.25rem] sm:text-[1.375rem] font-semibold tracking-tight text-foreground\">\n How it's built\n </h2>\n <p class=\"mt-3 m-0 text-[0.9375rem] leading-relaxed text-foreground\">\n The source of truth is a folder of files: one YAML record per\n {item}, taxonomy files for categories, stacks, platforms, and\n licenses, and Markdown for long-form notes. <a href=\"https://github.com/tortuvshin/grove\" class=\"font-medium underline decoration-border underline-offset-2 hover:decoration-ring\">Grove</a> validates\n those files, joins in synced GitHub metadata, and publishes them as\n multiple outputs — this website with its search and filters, a\n generated README, an <code class=\"font-mono text-[0.875em]\">llms.txt</code> index\n for machines, and sitemap/SEO data.\n </p>\n <p class=\"mt-3 m-0 text-[0.9375rem] leading-relaxed text-foreground\">\n Automation keeps the outputs current: weekly syncs refresh stars,\n activity, and contributor data, and every change to a source file\n rebuilds everything derived from it. There is no database and no\n server — the output is static HTML, and the content stays portable\n in files you can fork.\n </p>\n </section>\n\n <section class=\"mt-10\">\n <h2 class=\"m-0 text-[1.25rem] sm:text-[1.375rem] font-semibold tracking-tight text-foreground\">\n How to contribute\n </h2>\n <p class=\"mt-3 m-0 text-[0.9375rem] leading-relaxed text-foreground\">\n Because the content is files, contributing is a pull request: add a\n YAML record for a new {item}, fix a typo, or improve the metadata\n behind an existing listing. The <a href=\"/submit\" class=\"font-medium underline decoration-border underline-offset-2 hover:decoration-ring\">submit page</a> drafts\n the YAML for you from a repository URL, and every submission is\n reviewed against the curation bar before it lands.\n </p>\n </section>\n\n <section class=\"mt-10 flex flex-wrap items-center gap-3\">\n <a href={`/${slug}
|
|
423
|
+
"content": "---\nimport siteConfig from '@grove/generated/site-config.json';\nimport {\n getAboutPageSeo,\n getPageContentHtml,\n indexSlug,\n itemLabel,\n itemLabelPlural,\n} from '@grove-dev/astro/server';\n/**\n * About page — generic.\n *\n * A continuous narrative in three movements: what this site is →\n * how it's built (the file-first pipeline: source files → Grove →\n * multiple outputs → ongoing sync) → how to contribute. Prose\n * sections, not a stack of cards — the reading experience is the\n * point here.\n *\n * The copy is generic — references \"directory\", \"record\",\n * \"repository\" — so it works for any blueprint, and every dynamic\n * value (`siteConfig.tagline`, `siteConfig.repoUrl`, item labels)\n * flows from the site config.\n */\nimport BaseLayout from '../layouts/base-layout.astro';\nimport Container from '../layouts/container.astro';\nimport { buttonClass } from '../lib/classnames.ts';\n\nconst githubUrl = siteConfig.repoUrl;\nconst seo = getAboutPageSeo(siteConfig);\nconst slug = indexSlug();\nconst item = itemLabel();\nconst items = itemLabelPlural();\nconst pageContentHtml = getPageContentHtml('about');\n---\n\n<BaseLayout title={seo.title} description={seo.description} image={seo.image} jsonLd={seo.jsonLd} site={siteConfig}>\n <Container size=\"narrow\">\n <article class=\"py-12 sm:py-16\">\n <nav class=\"text-2xs text-muted-foreground\" aria-label=\"Breadcrumb\">\n <a href=\"/\" class=\"hover:text-foreground\">Home</a>\n <span class=\"mx-1.5 text-ink-300 dark:text-ink-700\">/</span>\n <span class=\"text-foreground\">About</span>\n </nav>\n\n {pageContentHtml ? (\n <section class=\"grove-prose mt-8\" set:html={pageContentHtml} />\n ) : (\n <>\n <header class=\"mt-5\">\n <span class=\"text-2xs font-medium uppercase tracking-wider text-muted-foreground\">\n About\n </span>\n <h1 class=\"mt-1 m-0 text-[1.75rem] sm:text-[2.25rem] font-semibold tracking-[-0.02em] leading-[1.1] text-foreground\">\n A directory that lives in files.\n </h1>\n <p class=\"mt-4 m-0 text-[1rem] sm:text-[1.0625rem] leading-relaxed text-foreground max-w-[62ch]\">\n {siteConfig.name} is a curated, health-aware directory of open-source\n {items} — and every listing you see here is a plain YAML file in a\n public repository. This website is one of the outputs generated from\n those files.\n </p>\n </header>\n\n <section class=\"mt-10\">\n <h2 class=\"m-0 text-[1.25rem] sm:text-[1.375rem] font-semibold tracking-tight text-foreground\">\n Why it exists\n </h2>\n <p class=\"mt-3 m-0 text-[0.9375rem] leading-relaxed text-foreground\">\n GitHub search and README lists optimize for the repository name and\n description. They rarely tell you whether a project is a real {item}\n or a demo, which stack it uses beyond the headline, how active it\n really is, or whether it has a clear license.\n </p>\n <p class=\"mt-3 m-0 text-[0.9375rem] leading-relaxed text-foreground\">\n Each entry here carries the metadata a developer actually needs\n before opening the repo: stack, platforms, license, activity and\n health signals, plus curated notes — best for, why listed, caveats.\n Everything links back to real, runnable source. No SEO spam, no\n affiliate farms, no broken links.\n </p>\n </section>\n\n <section class=\"mt-10\">\n <h2 class=\"m-0 text-[1.25rem] sm:text-[1.375rem] font-semibold tracking-tight text-foreground\">\n How it's built\n </h2>\n <p class=\"mt-3 m-0 text-[0.9375rem] leading-relaxed text-foreground\">\n The source of truth is a folder of files: one YAML record per\n {item}, taxonomy files for categories, stacks, platforms, and\n licenses, and Markdown for long-form notes. <a href=\"https://github.com/tortuvshin/grove\" class=\"font-medium underline decoration-border underline-offset-2 hover:decoration-ring\">Grove</a> validates\n those files, joins in synced GitHub metadata, and publishes them as\n multiple outputs — this website with its search and filters, a\n generated README, an <code class=\"font-mono text-[0.875em]\">llms.txt</code> index\n for machines, and sitemap/SEO data.\n </p>\n <p class=\"mt-3 m-0 text-[0.9375rem] leading-relaxed text-foreground\">\n Automation keeps the outputs current: weekly syncs refresh stars,\n activity, and contributor data, and every change to a source file\n rebuilds everything derived from it. There is no database and no\n server — the output is static HTML, and the content stays portable\n in files you can fork.\n </p>\n </section>\n\n <section class=\"mt-10\">\n <h2 class=\"m-0 text-[1.25rem] sm:text-[1.375rem] font-semibold tracking-tight text-foreground\">\n How to contribute\n </h2>\n <p class=\"mt-3 m-0 text-[0.9375rem] leading-relaxed text-foreground\">\n Because the content is files, contributing is a pull request: add a\n YAML record for a new {item}, fix a typo, or improve the metadata\n behind an existing listing. The <a href=\"/submit\" class=\"font-medium underline decoration-border underline-offset-2 hover:decoration-ring\">submit page</a> drafts\n the YAML for you from a repository URL, and every submission is\n reviewed against the curation bar before it lands.\n </p>\n </section>\n\n <section class=\"mt-10 flex flex-wrap items-center gap-3\">\n <a href={`/${slug}/`} class={buttonClass(\"primary\", \"sm\")}>Browse the directory</a>\n {githubUrl && (\n <a\n href={githubUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class={buttonClass(\"secondary\", \"sm\")}\n >\n View on GitHub\n </a>\n )}\n <a href=\"/submit\" class={buttonClass(\"ghost\", \"sm\")}>Submit a {item} →</a>\n </section>\n </>\n )}\n </article>\n </Container>\n</BaseLayout>\n",
|
|
412
424
|
"type": "registry:page",
|
|
413
425
|
"target": "~/src/pages/about.astro"
|
|
414
426
|
},
|
|
@@ -420,20 +432,20 @@
|
|
|
420
432
|
},
|
|
421
433
|
{
|
|
422
434
|
"path": "default/pages/404.astro",
|
|
423
|
-
"content": "---\n/**\n * 404 — generic fallback page.\n *\n * Renders the normal shell (header / footer / theme toggle) with a\n * short message and a search form pointing at the list page. Stays\n * on-brand regardless of blueprint.\n */\nimport siteConfig from '@grove/generated/site-config.json';\nimport { indexSlug } from '@grove-dev/astro/server';\nimport SearchField from '../components/ui/search-field.astro';\nimport BaseLayout from '../layouts/base-layout.astro';\nimport { buttonClass } from '../lib/classnames.ts';\n\nconst slug = indexSlug();\nconst title = `Page not found | ${siteConfig.name}`;\nconst description = `That page doesn't exist on ${siteConfig.name}. Search the directory or browse from the home page.`;\n---\n\n<BaseLayout\n title={title}\n description={description}\n site={siteConfig}\n noindex\n>\n {/* One recovery hierarchy: search is the primary tool, Browse the\n single button action, home a quiet text link — no three\n competing primary CTAs. Centered so the wide viewport doesn't\n pin everything into the top-left corner. */}\n <section class=\"py-12 sm:py-16\">\n <div class=\"mx-auto w-full max-w-narrow px-5 py-16 text-center sm:px-7 sm:py-24\">\n <span class=\"text-2xs font-medium uppercase tracking-wider text-muted-foreground\">\n 404\n </span>\n <h1 class=\"m-0 mt-2 text-[2.25rem] font-semibold leading-[1.05] tracking-tight text-foreground sm:text-[3rem]\">\n Page not found\n </h1>\n <p class=\"mx-auto m-0 mt-4 max-w-xl text-lg leading-relaxed text-muted-foreground\">\n The page you're looking for doesn't exist on {siteConfig.name}.\n It may have been moved, renamed, or never existed.\n </p>\n\n <form\n class=\"mx-auto mt-8 flex max-w-xl flex-col gap-2 sm:flex-row sm:items-center\"\n role=\"search\"\n action={`/${slug}`}\n method=\"get\"\n >\n <SearchField class=\"flex-1\" label=\"Search\" placeholder={`Search ${slug}...`} id=\"not-found-search\" />\n <button type=\"submit\" class={buttonClass(\"primary\", \"bare\", \"h-10 px-4 text-sm max-sm:min-h-11\")}>\n Search\n </button>\n </form>\n\n <div class=\"mt-6 flex flex-wrap items-center justify-center gap-4\">\n <a href={`/${slug}
|
|
435
|
+
"content": "---\n/**\n * 404 — generic fallback page.\n *\n * Renders the normal shell (header / footer / theme toggle) with a\n * short message and a search form pointing at the list page. Stays\n * on-brand regardless of blueprint.\n */\nimport siteConfig from '@grove/generated/site-config.json';\nimport { indexSlug } from '@grove-dev/astro/server';\nimport SearchField from '../components/ui/search-field.astro';\nimport BaseLayout from '../layouts/base-layout.astro';\nimport { buttonClass } from '../lib/classnames.ts';\n\nconst slug = indexSlug();\nconst title = `Page not found | ${siteConfig.name}`;\nconst description = `That page doesn't exist on ${siteConfig.name}. Search the directory or browse from the home page.`;\n---\n\n<BaseLayout\n title={title}\n description={description}\n site={siteConfig}\n noindex\n>\n {/* One recovery hierarchy: search is the primary tool, Browse the\n single button action, home a quiet text link — no three\n competing primary CTAs. Centered so the wide viewport doesn't\n pin everything into the top-left corner. */}\n <section class=\"py-12 sm:py-16\">\n <div class=\"mx-auto w-full max-w-narrow px-5 py-16 text-center sm:px-7 sm:py-24\">\n <span class=\"text-2xs font-medium uppercase tracking-wider text-muted-foreground\">\n 404\n </span>\n <h1 class=\"m-0 mt-2 text-[2.25rem] font-semibold leading-[1.05] tracking-tight text-foreground sm:text-[3rem]\">\n Page not found\n </h1>\n <p class=\"mx-auto m-0 mt-4 max-w-xl text-lg leading-relaxed text-muted-foreground\">\n The page you're looking for doesn't exist on {siteConfig.name}.\n It may have been moved, renamed, or never existed.\n </p>\n\n <form\n class=\"mx-auto mt-8 flex max-w-xl flex-col gap-2 sm:flex-row sm:items-center\"\n role=\"search\"\n action={`/${slug}`}\n method=\"get\"\n >\n <SearchField class=\"flex-1\" label=\"Search\" placeholder={`Search ${slug}...`} id=\"not-found-search\" />\n <button type=\"submit\" class={buttonClass(\"primary\", \"bare\", \"h-10 px-4 text-sm max-sm:min-h-11\")}>\n Search\n </button>\n </form>\n\n <div class=\"mt-6 flex flex-wrap items-center justify-center gap-4\">\n <a href={`/${slug}/`} class={buttonClass(\"secondary\", \"sm\")}>Browse {slug}</a>\n <a href=\"/\" class=\"text-sm font-medium text-muted-foreground underline decoration-border underline-offset-2 hover:text-foreground\">\n Back to home\n </a>\n </div>\n </div>\n </section>\n</BaseLayout>\n",
|
|
424
436
|
"type": "registry:page",
|
|
425
437
|
"target": "~/src/pages/404.astro"
|
|
426
438
|
},
|
|
427
439
|
{
|
|
428
440
|
"path": "default/pages/empty.astro",
|
|
429
|
-
"content": "---\nimport siteConfig from '@grove/generated/site-config.json';\nimport EmptyState from '../components/ui/empty-state.astro';\n/**\n * Empty-state fixture (`audit.pages` type \"empty\") — renders the\n * shared `EmptyState` primitive so the audit sample represents what\n * visitors actually see when a directory has nothing to show.\n */\nimport BaseLayout from '../layouts/base-layout.astro';\n\nconst slug = siteConfig.blueprintConfig?.routeSlug ?? 'projects';\n---\n<BaseLayout title={`No results | ${siteConfig.name}`} description=\"Empty state fixture.\" site={siteConfig} noindex>\n <section class=\"py-16 sm:py-24\">\n <div class=\"mx-auto w-full max-w-narrow px-5 sm:px-7\">\n <h1 class=\"sr-only\">No results</h1>\n <EmptyState\n title=\"Nothing to show right now\"\n description=\"This view has no records yet — new entries land here as soon as their source files are added to the repository.\"\n action={{ label: `Browse ${slug}`, href: `/${slug}
|
|
441
|
+
"content": "---\nimport siteConfig from '@grove/generated/site-config.json';\nimport EmptyState from '../components/ui/empty-state.astro';\n/**\n * Empty-state fixture (`audit.pages` type \"empty\") — renders the\n * shared `EmptyState` primitive so the audit sample represents what\n * visitors actually see when a directory has nothing to show.\n */\nimport BaseLayout from '../layouts/base-layout.astro';\n\nconst slug = siteConfig.blueprintConfig?.routeSlug ?? 'projects';\n---\n<BaseLayout title={`No results | ${siteConfig.name}`} description=\"Empty state fixture.\" site={siteConfig} noindex>\n <section class=\"py-16 sm:py-24\">\n <div class=\"mx-auto w-full max-w-narrow px-5 sm:px-7\">\n <h1 class=\"sr-only\">No results</h1>\n <EmptyState\n title=\"Nothing to show right now\"\n description=\"This view has no records yet — new entries land here as soon as their source files are added to the repository.\"\n action={{ label: `Browse ${slug}`, href: `/${slug}/`, variant: \"primary\" }}\n />\n </div>\n </section>\n</BaseLayout>\n",
|
|
430
442
|
"type": "registry:page",
|
|
431
443
|
"target": "~/src/pages/empty.astro"
|
|
432
444
|
}
|
|
433
445
|
],
|
|
434
446
|
"meta": {
|
|
435
|
-
"version": "1.
|
|
436
|
-
"requiresGrove": "0.
|
|
447
|
+
"version": "1.3.0",
|
|
448
|
+
"requiresGrove": "0.12.0"
|
|
437
449
|
},
|
|
438
450
|
"type": "registry:block"
|
|
439
451
|
}
|