@grove-dev/cli 0.7.0 → 0.9.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.
Files changed (187) hide show
  1. package/README.md +53 -13
  2. package/dist/audit-cli.d.ts +1 -1
  3. package/dist/audit-cli.d.ts.map +1 -1
  4. package/dist/audit-cli.js +11 -11
  5. package/dist/audit-cli.js.map +1 -1
  6. package/dist/audit.d.ts +4 -4
  7. package/dist/audit.d.ts.map +1 -1
  8. package/dist/audit.js +91 -51
  9. package/dist/audit.js.map +1 -1
  10. package/dist/collection-cli.d.ts.map +1 -1
  11. package/dist/collection-cli.js +1 -1
  12. package/dist/collection-cli.js.map +1 -1
  13. package/dist/diff.d.ts +43 -0
  14. package/dist/diff.d.ts.map +1 -0
  15. package/dist/diff.js +70 -0
  16. package/dist/diff.js.map +1 -0
  17. package/dist/hash.d.ts +36 -0
  18. package/dist/hash.d.ts.map +1 -0
  19. package/dist/hash.js +82 -0
  20. package/dist/hash.js.map +1 -0
  21. package/dist/health-cli.d.ts +3 -0
  22. package/dist/health-cli.d.ts.map +1 -0
  23. package/dist/health-cli.js +15 -0
  24. package/dist/health-cli.js.map +1 -0
  25. package/dist/health.d.ts +7 -0
  26. package/dist/health.d.ts.map +1 -0
  27. package/dist/health.js +68 -0
  28. package/dist/health.js.map +1 -0
  29. package/dist/icons-cli.d.ts +1 -1
  30. package/dist/icons-cli.d.ts.map +1 -1
  31. package/dist/icons-cli.js +33 -14
  32. package/dist/icons-cli.js.map +1 -1
  33. package/dist/import-cli.d.ts +1 -1
  34. package/dist/import-cli.d.ts.map +1 -1
  35. package/dist/import-cli.js +6 -6
  36. package/dist/import-cli.js.map +1 -1
  37. package/dist/index.js +114 -70
  38. package/dist/index.js.map +1 -1
  39. package/dist/init.d.ts +52 -4
  40. package/dist/init.d.ts.map +1 -1
  41. package/dist/init.js +378 -57
  42. package/dist/init.js.map +1 -1
  43. package/dist/package-manager.d.ts +57 -0
  44. package/dist/package-manager.d.ts.map +1 -0
  45. package/dist/package-manager.js +157 -0
  46. package/dist/package-manager.js.map +1 -0
  47. package/dist/package.json +3 -2
  48. package/dist/r/about.json +23 -0
  49. package/dist/r/browse.json +90 -0
  50. package/dist/r/collections.json +60 -0
  51. package/dist/r/contributors.json +23 -0
  52. package/dist/r/default.json +439 -0
  53. package/dist/r/home.json +68 -0
  54. package/dist/r/not-found.json +23 -0
  55. package/dist/r/project-card.json +49 -0
  56. package/dist/r/record.json +60 -0
  57. package/dist/r/registry.json +916 -0
  58. package/dist/r/shell.json +76 -0
  59. package/dist/r/submit.json +29 -0
  60. package/dist/r/taxonomy.json +66 -0
  61. package/dist/r/ui.json +55 -0
  62. package/dist/readme-cli.d.ts +1 -1
  63. package/dist/readme-cli.d.ts.map +1 -1
  64. package/dist/readme-cli.js +37 -47
  65. package/dist/readme-cli.js.map +1 -1
  66. package/dist/registry.d.ts +80 -0
  67. package/dist/registry.d.ts.map +1 -0
  68. package/dist/registry.js +180 -0
  69. package/dist/registry.js.map +1 -0
  70. package/dist/run.d.ts +7 -0
  71. package/dist/run.d.ts.map +1 -0
  72. package/dist/run.js +20 -0
  73. package/dist/run.js.map +1 -0
  74. package/dist/unified-diff.d.ts +14 -0
  75. package/dist/unified-diff.d.ts.map +1 -0
  76. package/dist/unified-diff.js +103 -0
  77. package/dist/unified-diff.js.map +1 -0
  78. package/dist/update.d.ts +66 -0
  79. package/dist/update.d.ts.map +1 -0
  80. package/dist/update.js +311 -0
  81. package/dist/update.js.map +1 -0
  82. package/package.json +5 -4
  83. package/dist/site/.github/ISSUE_TEMPLATE/bug_report.md +0 -33
  84. package/dist/site/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
  85. package/dist/site/.github/ISSUE_TEMPLATE/record_submission.md +0 -48
  86. package/dist/site/.github/pull_request_template.md +0 -27
  87. package/dist/site/.github/workflows/ci.yml +0 -21
  88. package/dist/site/.github/workflows/cleanup.yml +0 -27
  89. package/dist/site/.github/workflows/deploy.yml +0 -36
  90. package/dist/site/.github/workflows/readme.yml +0 -41
  91. package/dist/site/.github/workflows/sync-contributors.yml +0 -28
  92. package/dist/site/.github/workflows/sync-github.yml +0 -31
  93. package/dist/site/README.md +0 -89
  94. package/dist/site/astro.config.mjs +0 -26
  95. package/dist/site/content/records/crewai.md +0 -898
  96. package/dist/site/content/records/dify.md +0 -35
  97. package/dist/site/content/records/flowise.md +0 -38
  98. package/dist/site/content/records/llamaindex.md +0 -45
  99. package/dist/site/content/records/ollama.md +0 -39
  100. package/dist/site/content/records/open-webui.md +0 -35
  101. package/dist/site/data/collections/top-ai-agents.yml +0 -14
  102. package/dist/site/data/collections/top-flutter.yml +0 -12
  103. package/dist/site/data/health.yml +0 -13
  104. package/dist/site/data/records/.gitkeep +0 -0
  105. package/dist/site/data/records/crewai.yml +0 -23
  106. package/dist/site/data/records/dify.yml +0 -23
  107. package/dist/site/data/records/flowise.yml +0 -23
  108. package/dist/site/data/records/llamaindex.yml +0 -23
  109. package/dist/site/data/records/ollama.yml +0 -30
  110. package/dist/site/data/records/open-webui.yml +0 -23
  111. package/dist/site/data/taxonomy/categories.yml +0 -10
  112. package/dist/site/data/taxonomy/distribution-channels.yml +0 -43
  113. package/dist/site/data/taxonomy/licenses.yml +0 -16
  114. package/dist/site/data/taxonomy/platforms.yml +0 -20
  115. package/dist/site/data/taxonomy/stacks.yml +0 -15
  116. package/dist/site/data/taxonomy/topics.yml +0 -29
  117. package/dist/site/grove.config.ts +0 -110
  118. package/dist/site/package.json +0 -34
  119. package/dist/site/public/icons/.grove-icons.json +0 -47
  120. package/dist/site/public/icons/platforms/android.svg +0 -1
  121. package/dist/site/public/icons/platforms/app.svg +0 -4
  122. package/dist/site/public/icons/platforms/chrome.svg +0 -1
  123. package/dist/site/public/icons/platforms/desktop.svg +0 -4
  124. package/dist/site/public/icons/platforms/embedded.svg +0 -5
  125. package/dist/site/public/icons/platforms/ios.svg +0 -1
  126. package/dist/site/public/icons/platforms/linux.svg +0 -1
  127. package/dist/site/public/icons/platforms/macos.svg +0 -1
  128. package/dist/site/public/icons/platforms/ubuntu.svg +0 -1
  129. package/dist/site/public/icons/platforms/web.svg +0 -5
  130. package/dist/site/public/icons/platforms/windows.svg +0 -1
  131. package/dist/site/public/icons/stacks/android.svg +0 -1
  132. package/dist/site/public/icons/stacks/apple.svg +0 -1
  133. package/dist/site/public/icons/stacks/bun.svg +0 -1
  134. package/dist/site/public/icons/stacks/capacitor.svg +0 -1
  135. package/dist/site/public/icons/stacks/clojure.svg +0 -1
  136. package/dist/site/public/icons/stacks/dart.svg +0 -1
  137. package/dist/site/public/icons/stacks/deno.svg +0 -1
  138. package/dist/site/public/icons/stacks/django.svg +0 -1
  139. package/dist/site/public/icons/stacks/docker.svg +0 -1
  140. package/dist/site/public/icons/stacks/firebase.svg +0 -1
  141. package/dist/site/public/icons/stacks/flutter.svg +0 -1
  142. package/dist/site/public/icons/stacks/go.svg +0 -1
  143. package/dist/site/public/icons/stacks/graphql.svg +0 -1
  144. package/dist/site/public/icons/stacks/ionic.svg +0 -1
  145. package/dist/site/public/icons/stacks/java.svg +0 -1
  146. package/dist/site/public/icons/stacks/javascript.svg +0 -1
  147. package/dist/site/public/icons/stacks/kotlin.svg +0 -1
  148. package/dist/site/public/icons/stacks/llm.svg +0 -4
  149. package/dist/site/public/icons/stacks/mongodb.svg +0 -1
  150. package/dist/site/public/icons/stacks/nodejs.svg +0 -1
  151. package/dist/site/public/icons/stacks/python.svg +0 -1
  152. package/dist/site/public/icons/stacks/rag.svg +0 -6
  153. package/dist/site/public/icons/stacks/react-native.svg +0 -1
  154. package/dist/site/public/icons/stacks/react.svg +0 -1
  155. package/dist/site/public/icons/stacks/rust.svg +0 -1
  156. package/dist/site/public/icons/stacks/solidity.svg +0 -1
  157. package/dist/site/public/icons/stacks/sveltekit.svg +0 -1
  158. package/dist/site/public/icons/stacks/swift.svg +0 -1
  159. package/dist/site/public/icons/stacks/tauri.svg +0 -1
  160. package/dist/site/public/icons/stacks/tensorflow.svg +0 -1
  161. package/dist/site/public/icons/stacks/typescript.svg +0 -1
  162. package/dist/site/public/icons/stacks/vue.svg +0 -1
  163. package/dist/site/public/logo.svg +0 -16
  164. package/dist/site/src/components/DirectoryBrowse.astro +0 -246
  165. package/dist/site/src/components/PipelineStrip.astro +0 -121
  166. package/dist/site/src/components/TaxonomyList.astro +0 -108
  167. package/dist/site/src/pages/404.astro +0 -63
  168. package/dist/site/src/pages/[slug]/[recordSlug].astro +0 -71
  169. package/dist/site/src/pages/[slug]/index.astro +0 -19
  170. package/dist/site/src/pages/[slug]/page/[page].astro +0 -32
  171. package/dist/site/src/pages/[slug]/page/cards.astro +0 -50
  172. package/dist/site/src/pages/[slug]/page/records.json.ts +0 -24
  173. package/dist/site/src/pages/about.astro +0 -130
  174. package/dist/site/src/pages/categories/[name].astro +0 -35
  175. package/dist/site/src/pages/categories/index.astro +0 -33
  176. package/dist/site/src/pages/collections/[slug].astro +0 -45
  177. package/dist/site/src/pages/collections/index.astro +0 -32
  178. package/dist/site/src/pages/contributors.astro +0 -115
  179. package/dist/site/src/pages/empty.astro +0 -24
  180. package/dist/site/src/pages/index.astro +0 -161
  181. package/dist/site/src/pages/licenses/[name].astro +0 -35
  182. package/dist/site/src/pages/stacks/[name].astro +0 -35
  183. package/dist/site/src/pages/stacks/index.astro +0 -35
  184. package/dist/site/src/pages/submit.astro +0 -183
  185. package/dist/site/src/styles/global.css +0 -21
  186. package/dist/site/tsconfig.json +0 -13
  187. /package/{dist/site/LICENSE → LICENSE} +0 -0
@@ -0,0 +1,439 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "default",
4
+ "title": "Grove default scaffold",
5
+ "description": "The complete directory site — every item in this registry, inlined, so it installs in one step with no further registry lookups. This is what `grove init` installs.",
6
+ "dependencies": [
7
+ "@astrojs/check@^0.9.9",
8
+ "@tailwindcss/vite@^4.3.0",
9
+ "astro@^7.1.3",
10
+ "tailwindcss@^4.3.3"
11
+ ],
12
+ "files": [
13
+ {
14
+ "path": "default/components/ui/badge.astro",
15
+ "content": "---\n/**\n * Badge — small labeled state indicator.\n *\n * Variant is the MEANING, not the color:\n * - `neutral` — plain metadata (counts, kinds).\n * - `selected` — \"you are here\" (neutral inversion, never green).\n * - `success` / `warning` / `danger` / `info` — actual status. These\n * use the status tokens, so green here means \"healthy/succeeded\",\n * not \"brand\" and not \"selected\".\n */\n\nexport type BadgeVariant = 'neutral' | 'selected' | 'success' | 'warning' | 'danger' | 'info';\n\ninterface Props {\n variant?: BadgeVariant;\n class?: string;\n [key: string]: unknown;\n}\n\nconst VARIANTS: Record<BadgeVariant, string> = {\n neutral: 'border-border bg-secondary text-secondary-foreground',\n selected: 'border-transparent bg-selected text-selected-foreground',\n success: 'border-transparent bg-success text-success-foreground',\n warning: 'border-transparent bg-warning text-warning-foreground',\n danger: 'border-transparent bg-danger text-danger-foreground',\n info: 'border-transparent bg-info text-info-foreground',\n};\n\nconst { variant = 'neutral', class: className = '', ...rest } = Astro.props;\n---\n\n<span\n class={`inline-flex min-h-5 items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium leading-none ${VARIANTS[variant]} ${className}`}\n {...rest}\n>\n <slot />\n</span>\n",
16
+ "type": "registry:ui",
17
+ "target": "~/src/components/ui/badge.astro"
18
+ },
19
+ {
20
+ "path": "default/components/ui/button.astro",
21
+ "content": "---\n/**\n * Button — the shared interactive control.\n *\n * Renders an `<a>` when `href` is given, otherwise a `<button>`.\n * Styling comes exclusively from `buttonClass()` (ui/button.ts) so\n * server components, consumer pages, and the client script share one\n * definition. Pass layout-only extras (widths, one-off spacing)\n * through `class`.\n */\nimport {\n type ButtonSize,\n type ButtonVariant,\n buttonClass,\n PAGINATION_DISABLED,\n} from '../../lib/classnames.ts';\n\ninterface Props {\n variant?: ButtonVariant;\n size?: ButtonSize;\n href?: string;\n type?: 'button' | 'submit' | 'reset';\n rel?: string;\n target?: string;\n disabled?: boolean;\n id?: string;\n class?: string;\n [key: string]: unknown;\n}\n\nconst {\n variant = 'secondary',\n size = 'sm',\n href,\n type = 'button',\n disabled,\n class: className = '',\n ...rest\n} = Astro.props;\n\nconst classes = buttonClass(variant, size, className);\n---\n\n{href ? (\n <a\n href={href}\n class:list={[classes, disabled && PAGINATION_DISABLED]}\n aria-disabled={disabled ? \"true\" : undefined}\n tabindex={disabled ? -1 : undefined}\n {...rest}\n ><slot /></a>\n) : (\n <button type={type} class={classes} disabled={disabled} {...rest}><slot /></button>\n)}\n",
22
+ "type": "registry:ui",
23
+ "target": "~/src/components/ui/button.astro"
24
+ },
25
+ {
26
+ "path": "default/components/ui/empty-state.astro",
27
+ "content": "---\n/**\n * EmptyState — a deliberate \"nothing here\" block that cannot be\n * mistaken for normal content. Explains WHY the area is empty and\n * offers a recovery action.\n *\n * Marked with `data-grove-empty-state` so quality gates can assert\n * that empty regions render as empty states, not silent gaps.\n */\nimport { type ButtonVariant, buttonClass } from '../../lib/classnames.ts';\n\ninterface Props {\n title: string;\n /** Why it's empty / what will make it non-empty. */\n description?: string;\n /** Recovery action (rendered as a button-styled link). */\n action?: { label: string; href: string; variant?: ButtonVariant };\n class?: string;\n}\n\nconst { title, description, action, class: className = '' } = Astro.props;\n---\n\n<div\n data-grove-empty-state\n class={`flex flex-col items-center gap-2 rounded-[calc(var(--radius)+0.25rem)] border border-dashed border-border bg-surface-sunken px-6 py-10 text-center ${className}`}\n>\n <p class=\"m-0 text-sm font-medium text-foreground\">{title}</p>\n {description && (\n <p class=\"m-0 max-w-[52ch] text-sm leading-relaxed text-muted-foreground\">{description}</p>\n )}\n <slot />\n {action && (\n <a href={action.href} class={buttonClass(action.variant ?? \"secondary\", \"sm\", \"mt-2\")}>\n {action.label}\n </a>\n )}\n</div>\n",
28
+ "type": "registry:ui",
29
+ "target": "~/src/components/ui/empty-state.astro"
30
+ },
31
+ {
32
+ "path": "default/components/ui/filter-drawer.astro",
33
+ "content": "---\n/**\n * FilterDrawer — mobile filter surface built on native `<dialog>`.\n *\n * `showModal()` gives focus trapping, Escape handling, and the\n * top-layer backdrop for free — no dependency, no hand-rolled trap.\n * On viewports ≥ md the trigger button hides and the slotted filter\n * controls render inline through the same slot used on desktop, so\n * there is exactly one copy of the filter markup.\n *\n * No-JS fallback: the slot content stays in normal flow (the dialog\n * only wraps it once the client script moves it), so filters remain\n * usable without JavaScript.\n */\nimport { buttonClass } from '../../lib/classnames.ts';\n\ninterface Props {\n /** Trigger button label. */\n label?: string;\n /** Count of active filters shown on the trigger. */\n activeCount?: number;\n /** URL that clears every filter — offered inside the sheet. */\n clearHref?: string;\n class?: string;\n}\n\nconst { label = 'Filters', activeCount = 0, clearHref, class: className = '' } = Astro.props;\n---\n\n<div class={`grove-filter-drawer ${className}`} data-grove-filter-drawer>\n <button\n type=\"button\"\n data-drawer-open\n class={buttonClass(\"secondary\", \"md\", \"w-full md:hidden\")}\n aria-haspopup=\"dialog\"\n >\n {label}\n {/* Always in the DOM (hidden at zero) so the client script can\n update it from the live URL state on this prerendered page. */}\n <span\n data-drawer-count\n class:list={[\n \"inline-flex min-w-5 items-center justify-center rounded-full bg-selected px-1.5 py-0.5 font-mono text-2xs leading-none text-selected-foreground\",\n activeCount === 0 && \"hidden\",\n ]}\n >\n {activeCount}\n </span>\n </button>\n\n {/* On mobile the client script moves this content into the dialog;\n on ≥ md it stays inline. Not hidden by CSS — without JS the\n filters must remain visible in flow on every viewport. */}\n <div data-drawer-content class=\"md:contents\">\n <slot />\n </div>\n\n <dialog\n data-drawer-dialog\n class=\"m-0 mt-auto w-full max-w-none rounded-t-[calc(var(--radius)+0.5rem)] border-0 bg-surface-overlay p-0 text-foreground backdrop:bg-black/40 md:hidden\"\n aria-label={label}\n >\n <div class=\"flex items-center justify-between gap-3 border-b border-border px-4 py-3\">\n <p class=\"m-0 text-sm font-semibold\">{label}</p>\n <div class=\"flex items-center gap-2\">\n {clearHref && (\n /* Clearing from inside the sheet is the only way out of a\n stack of filters on mobile — the chips row is behind it. */\n <a\n href={clearHref}\n data-drawer-clear\n class:list={[buttonClass(\"ghost\", \"sm\"), activeCount === 0 && \"hidden\"]}\n >\n Clear all\n </a>\n )}\n <button type=\"button\" data-drawer-close class={buttonClass(\"ghost\", \"sm\")}>\n Done\n </button>\n </div>\n </div>\n <div data-drawer-body class=\"max-h-[70vh] overflow-y-auto p-4\"></div>\n </dialog>\n</div>\n\n<script>\n document.querySelectorAll<HTMLElement>(\"[data-grove-filter-drawer]\").forEach((root) => {\n const dialog = root.querySelector<HTMLDialogElement>(\"[data-drawer-dialog]\");\n const content = root.querySelector<HTMLElement>(\"[data-drawer-content]\");\n const body = root.querySelector<HTMLElement>(\"[data-drawer-body]\");\n const open = root.querySelector<HTMLButtonElement>(\"[data-drawer-open]\");\n const close = root.querySelector<HTMLButtonElement>(\"[data-drawer-close]\");\n if (!dialog || !content || !body || !open) return;\n\n const mobile = window.matchMedia(\"(max-width: 47.999rem)\");\n const place = () => {\n // One copy of the filter markup, moved between the inline slot\n // (desktop) and the dialog body (mobile).\n if (mobile.matches) {\n body.append(...content.children);\n content.classList.add(\"hidden\");\n } else {\n if (dialog.open) dialog.close();\n content.append(...body.children);\n content.classList.remove(\"hidden\");\n }\n };\n place();\n mobile.addEventListener(\"change\", place);\n\n open.addEventListener(\"click\", () => dialog.showModal());\n close?.addEventListener(\"click\", () => dialog.close());\n dialog.addEventListener(\"click\", (event) => {\n // Backdrop click closes: the dialog element itself is the\n // target only when the click lands outside the panel content.\n if (event.target === dialog) dialog.close();\n });\n });\n</script>\n",
34
+ "type": "registry:ui",
35
+ "target": "~/src/components/ui/filter-drawer.astro"
36
+ },
37
+ {
38
+ "path": "default/components/ui/page-header.astro",
39
+ "content": "---\n/**\n * PageHeader — the page's title block. Always renders a semantic\n * heading (h1 by default — every route needs exactly one) with an\n * optional eyebrow and description.\n *\n * For section headings INSIDE a page keep using `SectionHeader`\n * (layouts/), which defaults to h2/h3.\n */\n\ninterface Props {\n eyebrow?: string;\n title: string;\n description?: string;\n /** Escape hatch for embedded use; the default 1 is the point. */\n level?: 1 | 2;\n class?: string;\n}\n\nconst { eyebrow, title, description, level = 1, class: className = '' } = Astro.props;\nconst Heading = `h${level}` as 'h1' | 'h2';\n---\n\n<header class={`flex flex-col gap-1 ${className}`}>\n {eyebrow && (\n <span class=\"text-2xs font-medium uppercase tracking-wider text-muted-foreground\">\n {eyebrow}\n </span>\n )}\n <Heading class=\"m-0 text-[1.875rem] font-semibold tracking-tight text-foreground sm:text-[2.125rem]\">\n {title}\n </Heading>\n {description && (\n <p class=\"m-0 mt-1 max-w-[64ch] text-[0.9375rem] leading-relaxed text-muted-foreground\">\n {description}\n </p>\n )}\n <slot />\n</header>\n",
40
+ "type": "registry:ui",
41
+ "target": "~/src/components/ui/page-header.astro"
42
+ },
43
+ {
44
+ "path": "default/components/ui/search-field.astro",
45
+ "content": "---\n/**\n * SearchField — labeled search input with the leading glass icon.\n *\n * The label is visually hidden but always present; placeholder text\n * is display copy, not the accessible name. Pass the derived\n * placeholder from `getDirectoryIndexModel().searchPlaceholder` so it\n * only names ENABLED facets.\n *\n * `shortcut` renders the `/` hint and wires the global key handler.\n * The hint is hidden once the field has focus — it is an invitation,\n * not a persistent label — and on coarse pointers, where there is no\n * key to press.\n */\n\ninterface Props {\n label: string;\n name?: string;\n id?: string;\n value?: string;\n placeholder?: string;\n /** Show the `/` hint and focus this field when `/` is pressed. */\n shortcut?: boolean;\n class?: string;\n}\n\nconst {\n label,\n name = 'q',\n id = 'search-input',\n value = '',\n placeholder,\n shortcut = false,\n class: className = '',\n} = Astro.props;\n---\n\n<label class={`grove-search relative block ${className}`}>\n <span class=\"sr-only\">{label}</span>\n <svg\n viewBox=\"0 0 16 16\"\n width=\"16\"\n height=\"16\"\n aria-hidden=\"true\"\n class=\"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground\"\n fill=\"currentColor\"\n >\n <path d=\"M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.5 4.5 0 1 0-9 0 4.5 4.5 0 0 0 9 0Z\" />\n </svg>\n <input\n id={id}\n type=\"search\"\n name={name}\n value={value}\n placeholder={placeholder}\n autocomplete=\"off\"\n data-search-input\n class=\"peer h-10 w-full rounded-md border border-input bg-background py-2 pl-9 pr-10 text-sm text-foreground placeholder:text-muted-foreground focus:border-ring focus:outline-none focus:ring-2 focus:ring-ring/20 [&::-webkit-search-cancel-button]:appearance-none\"\n />\n {shortcut && (\n <kbd\n data-search-hint\n aria-hidden=\"true\"\n class=\"pointer-events-none absolute right-2 top-1/2 hidden h-6 w-6 -translate-y-1/2 select-none items-center justify-center rounded-md border border-border bg-secondary font-mono text-[11px] leading-none text-muted-foreground peer-focus:!hidden peer-not-placeholder-shown:hidden sm:inline-flex\"\n >/</kbd\n >\n )}\n <button\n type=\"button\"\n data-search-clear\n hidden={!value}\n aria-label=\"Clear search\"\n class=\"absolute right-2 top-1/2 inline-flex h-6 w-6 -translate-y-1/2 cursor-pointer items-center justify-center rounded-full border-0 bg-transparent p-0 text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/35\"\n >\n <svg viewBox=\"0 0 16 16\" width=\"12\" height=\"12\" aria-hidden=\"true\" fill=\"currentColor\">\n <path\n 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 />\n </svg>\n </button>\n</label>\n\n{shortcut && (\n <script>\n // `/` focuses the directory search from anywhere on the page, but\n // never while the visitor is already typing somewhere — otherwise\n // the shortcut eats a literal slash out of another field.\n document.addEventListener(\"keydown\", (event) => {\n if (event.key !== \"/\" || event.metaKey || event.ctrlKey || event.altKey) return;\n const active = document.activeElement as HTMLElement | null;\n if (\n active &&\n (active.tagName === \"INPUT\" ||\n active.tagName === \"TEXTAREA\" ||\n active.tagName === \"SELECT\" ||\n active.isContentEditable)\n )\n return;\n const input = document.querySelector(\"[data-search-input]\");\n if (!(input instanceof HTMLInputElement)) return;\n event.preventDefault();\n input.focus();\n input.select();\n });\n </script>\n)}\n",
46
+ "type": "registry:ui",
47
+ "target": "~/src/components/ui/search-field.astro"
48
+ },
49
+ {
50
+ "path": "default/lib/classnames.ts",
51
+ "content": "/**\n * Button / chip class builders — the single source for interactive\n * control styling.\n *\n * Plain TS (not an .astro component) on purpose: `DirectoryIndexClient`\n * rebuilds pagination links and active-filter chips in CLIENT-side JS,\n * and those class strings must stay byte-identical with the server\n * render. Both sides import these builders, so they cannot drift.\n *\n * Variant semantics (see styles.css):\n * - `primary` — the brand action (config `theme.primaryColor`).\n * - `secondary` — default chrome buttons.\n * - `outline` / `ghost` — quieter chrome.\n * - `selected` — \"you are here\" state (active filter, current lens,\n * current page). Neutral inversion via the `selected` tokens —\n * deliberately NOT the brand primary, so green never doubles as a\n * selection indicator.\n */\n\nexport type ButtonVariant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'selected';\n/** `bare` emits no size classes — pass custom geometry via `extra`. */\nexport type ButtonSize = 'sm' | 'md' | 'lg' | 'bare';\n\nconst BASE =\n 'inline-flex cursor-pointer items-center justify-center gap-1.5 rounded-[var(--radius)] border border-transparent font-medium leading-none no-underline outline-none transition-colors focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35';\n\n/**\n * `md`/`lg` guarantee a ≥44px hit target on small viewports\n * (`max-sm:min-h-11`) while keeping the compact desktop height.\n */\nconst SIZES: Record<ButtonSize, string> = {\n sm: 'h-8 px-3 text-sm',\n md: 'h-9 px-3 text-sm max-sm:min-h-11',\n lg: 'h-11 px-4 text-sm',\n bare: '',\n};\n\nconst VARIANTS: Record<ButtonVariant, string> = {\n primary: 'bg-primary text-primary-foreground hover:bg-primary/90',\n secondary: 'border-border bg-secondary text-foreground hover:bg-accent',\n outline: 'border-border bg-transparent text-foreground hover:bg-accent',\n ghost: 'text-foreground hover:bg-accent',\n selected: 'bg-selected text-selected-foreground hover:bg-selected/90',\n};\n\nexport function buttonClass(\n variant: ButtonVariant = 'secondary',\n size: ButtonSize = 'sm',\n extra = '',\n): string {\n return [BASE, SIZES[size], VARIANTS[variant], extra].filter(Boolean).join(' ');\n}\n\n/**\n * Layout extras for pagination controls — shared by `Pagination.astro`\n * and the client-side pagination rebuild in `DirectoryIndexClient`.\n */\nexport const PAGINATION_EXTRA = 'min-w-9 px-2 py-1.5 text-2xs';\n\n/**\n * The dead end of a pagination row — \"Previous\" on page 1.\n *\n * Dimming to `opacity-40` put it at 3.37:1 against the dark surface,\n * which is a contrast failure, not a disabled state. 60% still reads\n * as unavailable and clears 4.5:1.\n */\nexport const PAGINATION_DISABLED = 'pointer-events-none opacity-60';\n\n/**\n * Facet filter trigger (the \"Stack: Any\" dropdown buttons). Includes\n * the `grove-filter-trigger` hook class because the client script\n * reassigns the whole className when the active state changes — the\n * hook must survive that reassignment.\n */\nexport function filterTriggerClass(active: boolean): string {\n return [\n 'grove-filter-trigger',\n BASE,\n 'h-9 px-3 text-[0.8125rem] max-sm:min-h-11',\n active ? `${VARIANTS.selected} hover:text-selected-foreground` : VARIANTS.secondary,\n ].join(' ');\n}\n\n/**\n * Lens tab (the All / Hot / Mature row). Same geometry as the filter\n * trigger; `data-lens-id` targeting keeps its own hook attribute.\n */\nexport function lensTabClass(active: boolean): string {\n return [\n BASE,\n 'h-9 px-3 text-[0.8125rem] max-sm:min-h-11',\n active ? `${VARIANTS.selected} hover:text-selected-foreground` : VARIANTS.secondary,\n ].join(' ');\n}\n\n/**\n * Active-filter chip (the removable \"Stack: Python ×\" pills). One\n * definition for the server render and the client rebuild.\n */\nexport function chipClass(extra = ''): string {\n return [\n 'inline-flex min-h-5 items-center justify-center gap-1 rounded-full border border-transparent bg-secondary px-2 py-0.5 align-middle text-xs font-medium leading-none text-secondary-foreground transition-colors hover:border-ink-400',\n extra,\n ]\n .filter(Boolean)\n .join(' ');\n}\n",
52
+ "type": "registry:file",
53
+ "target": "~/src/lib/classnames.ts"
54
+ },
55
+ {
56
+ "path": "default/layouts/base-layout.astro",
57
+ "content": "---\n/**\n * BaseLayout — wraps every page. Owns the theme-detection inline\n * script and the global shell (Header, Footer). Per-page SEO\n * (title, description, OG, JSON-LD) is delegated to `<Seo />` so\n * each page can declare what it needs without polluting the layout\n * file.\n *\n * Generic: takes a `site` prop with brand + nav + stats. No\n * `siteConfig` import — consumers compose the props from their\n * own config (typically `data/generated/site-config.json` for the\n * showcase).\n *\n * GA4 can be configured once through `site.analytics.googleAnalyticsId`\n * or overridden per page with `gaId`. Omit both for privacy-first deployments.\n */\nimport '../styles/system.css';\nimport { derivePrimaryPalette } from '@grove-dev/astro/server';\nimport Footer from './footer.astro';\nimport Header from './header.astro';\nimport Seo from './seo.astro';\n\ninterface NavItem {\n label: string;\n href: string;\n}\n\ninterface SiteStats {\n totalApps?: number;\n totalCategories?: number;\n totalStacks?: number;\n totalOwners?: number;\n totalStars?: number;\n repositoryStars?: number;\n repositoryForks?: number;\n repositoryContributors?: number;\n originalRepo?: string;\n originalStars?: number;\n originalForks?: number;\n originalContributors?: number;\n}\n\ninterface Site {\n name: string;\n tagline?: string;\n description?: string;\n nav: NavItem[];\n footer?: {\n columns?: Array<{\n heading: string;\n items: Array<{ label: string; href: string; external?: boolean }>;\n }>;\n copyright?: string;\n license?: string;\n };\n submission?: {\n eyebrow?: string;\n title?: string;\n description?: string;\n good?: string[];\n avoid?: string[];\n };\n repoUrl?: string;\n url?: string;\n /** Header logo path under `public/` (e.g. `/logo.svg`). */\n logo?: string;\n /** Favicon path under `public/` (e.g. `/favicon.svg`). */\n favicon?: string;\n /** BCP-47 language tag (e.g. \"en\"). Drives `<html lang>` and og:locale. */\n locale?: string;\n /** Twitter/X handle (e.g. \"@grove\") — emitted as twitter:site. */\n twitter?: string;\n analytics?: {\n googleAnalyticsId?: string;\n };\n /** Optional directory-level stats — populated from site-config.json\n * at generate time. Components use it to render hero counts,\n * origin card stats, and footer summary lines. */\n stats?: SiteStats;\n /** Theme knobs from grove.config.ts — resolved into CSS custom\n * properties on `<html>` so the package stylesheet picks them up.\n * Values are plain strings because the prop usually arrives from a\n * JSON import; unknown values fall back to the package defaults. */\n theme?: {\n primaryColor?: string;\n /** \"none\" | \"soft\" | \"round\" */\n radius?: string;\n /** \"compact\" | \"comfortable\" | \"spacious\" */\n density?: string;\n containerWidth?: string;\n };\n blueprintConfig?: {\n routeSlug?: string;\n labelSingular?: string;\n labelPlural?: string;\n };\n}\n\ninterface Props {\n title: string;\n description: string;\n site: Site;\n type?: 'website' | 'article' | 'profile';\n noindex?: boolean;\n jsonLd?: Record<string, unknown> | Record<string, unknown>[];\n /** Open Graph / Twitter image path (e.g. \"/og/records/foo.png\").\n * Defaults to the site-wide /og-image.svg inside <Seo />. */\n image?: string;\n /** Alt text for the OG/Twitter image. */\n imageAlt?: string;\n /** Optional Google Analytics 4 Measurement ID (e.g. \"G-XXXXXX\"). */\n gaId?: string;\n /** Path used for JSON-LD `SearchAction` target. Defaults to \"/items\". */\n searchPath?: string;\n /** Submit button label rendered in the header. Omit to hide. */\n submitLabel?: string;\n /** Submit button href rendered in the header. */\n submitHref?: string;\n}\n\nconst {\n title,\n description,\n site,\n type,\n noindex,\n jsonLd,\n image,\n imageAlt,\n gaId,\n searchPath,\n submitLabel,\n submitHref,\n} = Astro.props;\nconst directoryPath = searchPath ?? `/${site.blueprintConfig?.routeSlug ?? 'items'}`;\nconst effectiveGaId = gaId ?? site.analytics?.googleAnalyticsId;\n\n// ── Theme wiring ─────────────────────────────────────────────────\n// `theme.*` from grove.config.ts resolves to CSS custom properties\n// on the <html> style attribute. An attribute (not an inline\n// <style>) so the override wins over the bundled stylesheet\n// regardless of how Vite orders the CSS output.\nconst RADIUS_PRESETS: Record<string, [string, string, string]> = {\n none: ['0rem', '0rem', '0rem'],\n soft: ['0.625rem', '0.5rem', '0.75rem'],\n round: ['0.875rem', '0.75rem', '1rem'],\n};\nconst DENSITY_SPACING: Record<string, string> = {\n compact: '0.225rem',\n comfortable: '0.25rem',\n spacious: '0.28rem',\n};\n\n// Brand fill and text derive from ONE WCAG computation (contrast.ts)\n// so background and foreground can never drift apart across themes.\n\nconst themeConfig = site.theme;\nconst themeStyleParts: string[] = [];\nif (themeConfig) {\n const radius = RADIUS_PRESETS[themeConfig.radius ?? 'soft'];\n if (radius && themeConfig.radius && themeConfig.radius !== 'soft') {\n themeStyleParts.push(\n `--grove-radius: ${radius[0]}`,\n `--grove-radius-lg: ${radius[1]}`,\n `--grove-radius-xl: ${radius[2]}`,\n );\n }\n const spacing = DENSITY_SPACING[themeConfig.density ?? 'comfortable'];\n if (spacing && themeConfig.density && themeConfig.density !== 'comfortable') {\n themeStyleParts.push(`--spacing: ${spacing}`);\n }\n if (themeConfig.containerWidth) {\n themeStyleParts.push(`--grove-container: ${themeConfig.containerWidth}`);\n }\n const primary = themeConfig.primaryColor;\n if (typeof primary === 'string' && /^#[0-9a-fA-F]{3,8}$/.test(primary)) {\n const palette = derivePrimaryPalette(primary);\n if (palette) {\n themeStyleParts.push(\n `--grove-theme-primary: ${palette.solid}`,\n `--grove-theme-primary-foreground: ${palette.solidForeground}`,\n `--grove-theme-primary-dark: ${palette.dark}`,\n `--grove-theme-primary-dark-foreground: ${palette.darkForeground}`,\n );\n }\n }\n}\nconst themeStyle = themeStyleParts.length > 0 ? `${themeStyleParts.join('; ')};` : undefined;\n\n// `site.favicon` points at a file the consumer owns under `public/`.\n// The fallback is a generated square — tinted with the configured\n// brand color rather than a hardcoded near-black, so an unconfigured\n// site still gets a tab mark that is recognisably its own.\nconst faviconFill = (site.theme?.primaryColor ?? '#18181b').trim();\nconst favicon =\n site.favicon ??\n `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect width='16' height='16' rx='3' fill='${encodeURIComponent(faviconFill)}'/%3E%3C/svg%3E`;\n---\n\n<!doctype html>\n<html lang={site.locale ?? 'en'} style={themeStyle}>\n <head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <meta name=\"generator\" content={Astro.generator} />\n <meta name=\"theme-color\" content=\"#0a0a0c\" media=\"(prefers-color-scheme: dark)\" />\n <meta name=\"theme-color\" content=\"#fafafa\" media=\"(prefers-color-scheme: light)\" />\n <link rel=\"icon\" href={favicon} />\n <link rel=\"sitemap\" href=\"/sitemap.xml\" />\n {/* Preconnect to GitHub's avatar CDN — most pages render at least\n one avatar (record list cards, detail page logo) and the\n connection is reusable across cards. Cross-origin only, no\n document fetch, so the cost is one TLS handshake per page. */}\n <link rel=\"preconnect\" href=\"https://avatars.githubusercontent.com\" crossorigin=\"anonymous\" />\n <link\n rel=\"alternate\"\n type=\"text/plain\"\n href=\"/llms.txt\"\n title=\"LLM usage guidance\"\n />\n\n {effectiveGaId && (\n <>\n <script\n is:inline\n async\n src={`https://www.googletagmanager.com/gtag/js?id=${effectiveGaId}`}\n />\n <script is:inline define:vars={{ gaId: effectiveGaId }}>\n window.dataLayer = window.dataLayer || [];\n function gtag() {\n dataLayer.push(arguments);\n }\n gtag(\"js\", new Date());\n gtag(\"config\", gaId, {\n page_path: window.location.pathname + window.location.search,\n page_title: document.title,\n });\n </script>\n </>\n )}\n\n <Seo\n title={title}\n description={description}\n type={type}\n noindex={noindex}\n jsonLd={jsonLd}\n {...(image ? { image } : {})}\n imageAlt={imageAlt}\n site={site}\n searchPath={directoryPath}\n />\n\n <slot name=\"head\" />\n\n <script is:inline>\n // THEME_INIT — runs before paint so the user never sees a\n // flash of the wrong theme. State is persisted in localStorage\n // under the key \"grove-theme\" (matching ThemeToggle.astro).\n (function () {\n var STORAGE_KEY = \"grove-theme\";\n function getMode() {\n try {\n var stored = localStorage.getItem(STORAGE_KEY);\n if (stored === \"light\" || stored === \"dark\" || stored === \"system\")\n return stored;\n } catch (e) {\n // localStorage may be blocked (private mode, etc.) —\n // fall through to the system default.\n }\n return \"system\";\n }\n function apply(mode) {\n var resolved =\n mode === \"system\"\n ? (window.matchMedia(\"(prefers-color-scheme: dark)\").matches\n ? \"dark\"\n : \"light\")\n : mode;\n var root = document.documentElement;\n if (resolved === \"dark\") root.classList.add(\"dark\");\n else root.classList.remove(\"dark\");\n root.dataset.theme = mode;\n root.dataset.resolvedTheme = resolved;\n }\n apply(getMode());\n window.addEventListener(\"theme:set\", function (e) {\n apply(e.detail);\n });\n var mq = window.matchMedia(\"(prefers-color-scheme: dark)\");\n mq.addEventListener(\"change\", function () {\n if (getMode() === \"system\") apply(\"system\");\n });\n })();\n </script>\n </head>\n <body class=\"min-h-screen bg-background text-foreground\">\n <a\n href=\"#main\"\n class=\"sr-only z-50 rounded-md bg-background px-3 py-2 text-sm font-medium text-foreground outline-none ring-2 ring-ring focus:not-sr-only focus:fixed focus:left-3 focus:top-3\"\n >\n Skip to content\n </a>\n <slot name=\"header\">\n <Header\n site={site}\n submitLabel={submitLabel ?? (site.blueprintConfig ? `Submit ${site.blueprintConfig.labelSingular ?? \"item\"}` : undefined)}\n submitHref={submitHref ?? (site.blueprintConfig ? \"/submit\" : undefined)}\n />\n </slot>\n\n <main id=\"main\">\n <slot />\n </main>\n\n <slot name=\"footer\">\n <Footer\n site={site}\n stats={{\n totalApps: site.stats?.totalApps,\n totalCategories: site.stats?.totalCategories,\n totalStacks: site.stats?.totalStacks,\n totalOwners: site.stats?.totalOwners,\n }}\n itemsLabel={site.blueprintConfig?.labelPlural ?? \"items\"}\n discover={{\n heading: \"Discover\",\n items: [\n ...(site.stats?.totalApps\n ? [{ label: \"Browse all\", href: directoryPath }]\n : []),\n { label: \"Community\", href: \"/contributors\" },\n ...(site.stats?.originalRepo\n ? [{ label: \"View on GitHub\", href: site.stats.originalRepo, external: true }]\n : []),\n ],\n }}\n contribute={{\n heading: \"Contribute\",\n items: [\n ...(site.repoUrl\n ? [\n {\n label: \"Submit via GitHub\",\n href: `${site.repoUrl}/blob/main/CONTRIBUTING.md`,\n external: true,\n },\n ]\n : []),\n ...(site.repoUrl\n ? [\n {\n label: \"Report an issue\",\n href: `${site.repoUrl}/issues`,\n external: true,\n },\n ]\n : []),\n ],\n }}\n project={{\n heading: \"Project\",\n items: [\n ...(site.repoUrl\n ? [\n {\n label: \"Source on GitHub\",\n href: site.repoUrl,\n external: true,\n },\n ]\n : []),\n ...(site.repoUrl\n ? [\n {\n label: \"Changelog\",\n href: `${site.repoUrl}/blob/main/CHANGELOG.md`,\n external: true,\n },\n ]\n : []),\n ],\n }}\n />\n </slot>\n\n <slot name=\"body-end\" />\n\n {effectiveGaId && (\n <script is:inline define:vars={{ gaId: effectiveGaId }}>\n (function () {\n // GA4's `gtag('config', id)` call in the <head> already auto-pings\n // `page_view` on full navigations, so this block only needs to\n // catch history changes (back/forward). No history.pushState /\n // replaceState wrap: the package does not install\n // @astrojs/transitions' ClientRouter, and those wraps\n // double-fired page_view events on every navigation.\n var last = location.pathname + location.search;\n function report() {\n var next = location.pathname + location.search;\n if (next === last) return;\n last = next;\n window.gtag(\"event\", \"page_view\", {\n page_path: next,\n page_title: document.title,\n page_location: location.href,\n });\n }\n window.addEventListener(\"popstate\", report);\n })();\n </script>\n )}\n </body>\n</html>\n",
58
+ "type": "registry:component",
59
+ "target": "~/src/layouts/base-layout.astro"
60
+ },
61
+ {
62
+ "path": "default/layouts/container.astro",
63
+ "content": "---\ninterface Props {\n size?: 'default' | 'wide' | 'narrow';\n class?: string;\n}\n\nconst { size = 'default', class: className = '' } = Astro.props;\nconst sizeClass =\n size === 'wide'\n ? 'mx-auto w-full max-w-wide'\n : size === 'narrow'\n ? 'mx-auto w-full max-w-narrow'\n : 'mx-auto w-full max-w-container';\n---\n\n<div class={`${sizeClass} px-5 sm:px-7 ${className}`}>\n <slot />\n</div>\n",
64
+ "type": "registry:component",
65
+ "target": "~/src/layouts/container.astro"
66
+ },
67
+ {
68
+ "path": "default/layouts/footer.astro",
69
+ "content": "---\n/**\n * Footer — 4-column grid (brand + Discover + Contribute + Project) plus\n * a thin bar at the bottom with copyright + repo link.\n *\n * Generic: takes a `site` prop with brand + repoUrl + stats, plus\n * pre-computed column data. No `siteConfig` import — consumers\n * compose props from their own config (or from\n * `data/generated/site-config.json` for the showcase).\n *\n * Each column's links are passed in as a `{ heading, items[] }` shape\n * so consumers can customize the order and copy. Defaults are\n * provided so the footer still renders if no extra data is supplied.\n */\nimport PoweredBy from '../components/grove/powered-by.astro';\n\ninterface NavItem {\n label: string;\n href: string;\n /** When true, opens in a new tab (external). */\n external?: boolean;\n}\n\ninterface FooterColumn {\n heading: string;\n items: NavItem[];\n}\n\ninterface Site {\n name: string;\n tagline?: string;\n description?: string;\n repoUrl?: string;\n footer?: {\n columns?: FooterColumn[];\n copyright?: string;\n license?: string;\n /** \"Powered by Grove\" under the brand block. Defaults to on. */\n poweredBy?: boolean;\n };\n stats?: {\n totalApps?: number;\n totalCategories?: number;\n totalStacks?: number;\n totalOwners?: number;\n };\n}\n\ninterface Props {\n site: Site;\n /** Discover links — first content column. */\n discover?: FooterColumn;\n /** Contribute links — second content column. */\n contribute?: FooterColumn;\n /** Project links — third content column. */\n project?: FooterColumn;\n /** Stats line under brand blurb. */\n stats?: {\n totalApps?: number;\n totalCategories?: number;\n totalStacks?: number;\n totalOwners?: number;\n };\n /**\n * Plural label for the primary count stat. Default \"items\" so the\n * footer reads naturally regardless of blueprint.\n */\n itemsLabel?: string;\n /** Copyright suffix. Defaults to site.name. */\n copyrightHolder?: string;\n /** License line under the bar (e.g. \"Content under CC BY-SA 4.0.\"). */\n licenseLine?: string;\n /**\n * \"Powered by Grove\" under the brand block. Falls back to\n * `site.footer.poweredBy`, which defaults to on.\n */\n poweredBy?: boolean;\n /** Extra class for the outer footer element. */\n class?: string;\n}\n\nconst {\n site,\n discover = { heading: 'Discover', items: [] },\n contribute = { heading: 'Contribute', items: [] },\n project = { heading: 'Project', items: [] },\n stats,\n itemsLabel = 'items',\n copyrightHolder,\n licenseLine,\n poweredBy,\n class: className = '',\n} = Astro.props;\n\nconst showPoweredBy = poweredBy ?? site.footer?.poweredBy ?? true;\n\nconst year = new Date().getFullYear();\nconst holder = copyrightHolder ?? site.footer?.copyright ?? site.name;\nconst gh = site.repoUrl;\nconst showOwners = (stats?.totalOwners ?? 0) > 0;\n\nconst defaultDiscover: NavItem[] = gh\n ? [\n { label: 'Source on GitHub', href: gh, external: true },\n { label: 'Latest release', href: `${gh}/releases`, external: true },\n ]\n : [];\nconst defaultContribute: NavItem[] = gh\n ? [\n { label: 'Submit via GitHub', href: `${gh}/blob/main/CONTRIBUTING.md`, external: true },\n { label: 'Report an issue', href: `${gh}/issues`, external: true },\n { label: 'Contributing guide', href: `${gh}/blob/main/CONTRIBUTING.md`, external: true },\n ]\n : [];\nconst defaultProject: NavItem[] = gh\n ? [\n { label: 'README', href: `${gh}/blob/main/README.md`, external: true },\n { label: 'Changelog', href: `${gh}/blob/main/CHANGELOG.md`, external: true },\n ]\n : [];\n\nconst discoverItems = discover.items.length ? discover.items : defaultDiscover;\nconst contributeItems = contribute.items.length ? contribute.items : defaultContribute;\nconst projectItems = project.items.length ? project.items : defaultProject;\nconst configuredColumns = site.footer?.columns ?? [];\nconst columns = configuredColumns.length\n ? configuredColumns\n : [\n { heading: discover.heading, items: discoverItems },\n { heading: contribute.heading, items: contributeItems },\n { heading: project.heading, items: projectItems },\n ].filter((column) => column.items.length > 0);\nconst resolvedLicenseLine = licenseLine ?? site.footer?.license;\n---\n\n<footer\n class:list={[\n \"border-border bg-background mt-16 border-t text-ink-500 dark:text-ink-400\",\n className,\n ]}\n>\n <div\n class=\"mx-auto grid w-full max-w-container grid-cols-2 gap-8 px-5 py-12 md:grid-cols-4 sm:px-7\"\n >\n <div class=\"col-span-2 md:col-span-1\">\n <div\n class=\"mb-2 inline-flex items-center gap-2 text-[0.95rem] font-semibold text-ink-900 dark:text-ink-100\"\n >\n <span\n aria-hidden=\"true\"\n class=\"inline-block h-3.5 w-3.5 rounded bg-ink-900 dark:bg-ink-100\"\n ></span>\n <span>{site.name}</span>\n </div>\n {site.tagline && (\n <p class=\"m-0 max-w-[36ch] text-[0.8125rem] leading-relaxed text-ink-500 dark:text-ink-400\">\n {site.tagline}\n </p>\n )}\n {stats && (\n <p class=\"mt-3 m-0 text-2xs text-ink-500 dark:text-ink-400\">\n {stats.totalApps !== undefined && (\n <>\n <span class=\"font-mono\">{stats.totalApps}</span> {itemsLabel}\n </>\n )}\n {stats.totalApps !== undefined && (stats.totalCategories !== undefined || showOwners) && (\n <span class=\"mx-1 text-ink-300 dark:text-ink-700\">·</span>\n )}\n {stats.totalCategories !== undefined && (\n <>\n <span class=\"font-mono\">{stats.totalCategories}</span> categories\n </>\n )}\n {stats.totalCategories !== undefined && showOwners && (\n <span class=\"mx-1 text-ink-300 dark:text-ink-700\">·</span>\n )}\n {showOwners && (\n <>\n <span class=\"font-mono\">{stats.totalOwners}</span> project owners\n </>\n )}\n </p>\n )}\n {showPoweredBy && (\n <p class=\"mt-4 m-0 text-[0.8125rem] text-ink-500 dark:text-ink-400\">\n <PoweredBy size={16} />\n </p>\n )}\n </div>\n\n {columns.map((column) => (\n <div>\n <h2 class=\"mb-3 text-2xs font-semibold uppercase tracking-wider text-ink-900 dark:text-ink-100\">\n {column.heading}\n </h2>\n <ul class=\"m-0 flex list-none flex-col gap-2 p-0\">\n {column.items.map((item) => (\n <li>\n <a\n href={item.href}\n class=\"text-sm transition-colors hover:text-ink-900 dark:hover:text-ink-100\"\n {...(item.external\n ? { target: \"_blank\", rel: \"noopener noreferrer\" }\n : {})}\n >\n {item.label}\n </a>\n </li>\n ))}\n </ul>\n </div>\n ))}\n </div>\n\n <div class=\"border-t border-ink-200 dark:border-ink-800\">\n <div\n class=\"mx-auto flex w-full max-w-container flex-wrap items-center gap-3 px-5 py-4 text-2xs text-ink-500 sm:px-7 dark:text-ink-400\"\n >\n <span>© {year} {holder}{resolvedLicenseLine ? `. ${resolvedLicenseLine}` : \".\"}</span>\n {gh && (\n <>\n <span class=\"text-ink-300 dark:text-ink-700\">·</span>\n <a\n href={gh}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"transition-colors hover:text-ink-900 dark:hover:text-ink-100\"\n >\n View source on GitHub\n </a>\n </>\n )}\n </div>\n </div>\n</footer>\n",
70
+ "type": "registry:component",
71
+ "target": "~/src/layouts/footer.astro"
72
+ },
73
+ {
74
+ "path": "default/layouts/header.astro",
75
+ "content": "---\n/**\n * Header — sticky brand + nav + theme toggle.\n *\n * Generic: takes a `site` prop with brand + nav. No `siteConfig`\n * import — consumers compose the props from their own config.\n *\n * Optional `submit` button renders a \"Submit app\" / \"Submit project\"\n * call-to-action on the right side of the nav. Set `submitHref` /\n * `submitLabel` to enable, leave them undefined for a clean header.\n *\n * Optional `repoUrl` adds a \"View source\" GitHub button. Set\n * `repoLabel` to change the visible text.\n */\n\nimport { compact } from '@grove-dev/core';\nimport ThemeToggle from '../components/site/theme-toggle.astro';\nimport { buttonClass } from '../lib/classnames.ts';\n\ninterface NavItem {\n label: string;\n href: string;\n}\n\ninterface Site {\n name: string;\n tagline?: string;\n nav: NavItem[];\n description?: string;\n repoUrl?: string;\n url?: string;\n /** Logo path under `public/` (e.g. `/logo.svg`). */\n logo?: string;\n stats?: {\n /** Stars on this site's own source repository. */\n repositoryStars?: number;\n };\n blueprintConfig?: {\n routeSlug?: string;\n };\n}\n\ninterface Props {\n site: Site;\n /** Submit button label, e.g. \"Submit app\". Omit to hide. */\n submitLabel?: string;\n /** Submit button href, e.g. \"/submit\". Omit to hide. */\n submitHref?: string;\n /** GitHub button label, e.g. \"View source\". */\n repoLabel?: string;\n /** Extra class for the outer header element. */\n class?: string;\n}\n\nconst { site, submitLabel, submitHref, repoLabel = 'Star', class: className = '' } = Astro.props;\nconst directoryPath = `/${site.blueprintConfig?.routeSlug ?? 'items'}`;\nconst defaultNavItems = site.blueprintConfig\n ? [\n { label: 'Recently added', href: `${directoryPath}?sort=recently-added` },\n { label: 'Trending', href: `${directoryPath}?label=hot` },\n { label: 'Categories', href: '/categories' },\n { label: 'Stacks', href: '/stacks' },\n { label: 'About', href: '/about' },\n ]\n : [];\nconst navItems = site.nav?.length ? site.nav : defaultNavItems;\nconst stars = site.stats?.repositoryStars;\nconst starsLabel = typeof stars === 'number' ? compact(stars) : null;\n---\n\n<header\n class:list={[\n \"border-border bg-background/85 sticky top-0 z-50 border-b backdrop-blur\",\n className,\n ]}\n>\n <div\n class=\"mx-auto flex w-full max-w-container items-center gap-3 px-5 py-3 sm:gap-6 sm:px-7\"\n >\n <a\n href=\"/\"\n class=\"inline-flex min-w-0 shrink items-center gap-2 text-[0.95rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100\"\n >\n {site.logo ? (\n <img\n src={site.logo}\n alt=\"\"\n aria-hidden=\"true\"\n width=\"18\"\n height=\"18\"\n class=\"inline-block h-[18px] w-[18px] shrink-0 object-contain\"\n />\n ) : (\n /* No logo configured — a neutral mark is the honest default.\n Set `site.logo` in grove.config.ts to replace it. */\n <span\n aria-hidden=\"true\"\n class=\"inline-block h-[18px] w-[18px] rounded bg-ink-900 dark:bg-ink-100\"\n ></span>\n )}\n <span class=\"truncate\">{site.name}</span>\n </a>\n\n <nav class=\"hidden flex-1 md:block\" aria-label=\"Primary\">\n <ul class=\"m-0 flex list-none gap-5 p-0\">\n {navItems.map((item) => (\n <li>\n <a\n href={item.href}\n class=\"text-[0.875rem] font-medium text-ink-500 transition-colors hover:text-ink-900 dark:text-ink-400 dark:hover:text-ink-100\"\n >\n {item.label}\n </a>\n </li>\n ))}\n </ul>\n </nav>\n\n <div class=\"ml-auto flex items-center gap-2\">\n <details class=\"group relative md:hidden\">\n <summary class=\"inline-flex h-9 cursor-pointer list-none items-center justify-center rounded-[var(--radius)] border border-border bg-secondary px-2.5 text-sm font-medium text-foreground hover:bg-accent focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/35\">\n Menu\n </summary>\n <nav aria-label=\"Mobile primary\" class=\"absolute right-0 top-[calc(100%+0.5rem)] z-50 w-56 rounded-[var(--radius)] border border-border bg-background p-2 shadow-lg\">\n <ul class=\"m-0 flex list-none flex-col gap-1 p-0\">\n {navItems.map((item) => (\n <li><a href={item.href} class=\"block rounded-md px-3 py-2 text-sm font-medium text-foreground no-underline hover:bg-accent\">{item.label}</a></li>\n ))}\n {submitHref && (\n <li class=\"border-t border-border pt-1\"><a href={submitHref} class=\"block rounded-md px-3 py-2 text-sm font-medium text-foreground no-underline hover:bg-accent\">{submitLabel ?? \"Submit\"}</a></li>\n )}\n </ul>\n </nav>\n </details>\n\n {submitHref && (\n <a\n href={submitHref}\n class={buttonClass(\"secondary\", \"sm\", \"max-sm:!hidden\")}\n >\n <svg\n viewBox=\"0 0 16 16\"\n width=\"13\"\n height=\"13\"\n aria-hidden=\"true\"\n fill=\"currentColor\"\n >\n <path d=\"M7.75 2a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 7.75 2Z\"></path>\n </svg>\n <span>{submitLabel ?? \"Submit\"}</span>\n </a>\n )}\n\n {site.repoUrl && (\n <a\n href={site.repoUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n aria-label={`${repoLabel} on GitHub${starsLabel ? ` — ${starsLabel} stars` : \"\"}`}\n title={`${repoLabel} on GitHub`}\n class={buttonClass(\"secondary\", \"bare\", \"h-8 overflow-hidden p-0 text-sm\")}\n >\n <span class=\"flex items-center gap-1.5 px-2.5 py-1.5 text-ink-900 dark:text-ink-100\">\n <svg viewBox=\"0 0 16 16\" width=\"16\" height=\"16\" aria-hidden=\"true\" fill=\"currentColor\">\n <path d=\"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38v-1.33c-2.22.48-2.69-1.07-2.69-1.07-.36-.92-.89-1.17-.89-1.17-.73-.5.05-.49.05-.49.8.06 1.23.83 1.23.83.72 1.22 1.87.87 2.33.67.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48v2.19c0 .21.15.46.55.38A8 8 0 0 0 8 0Z\"></path>\n </svg>\n <span class=\"hidden lg:inline\">{repoLabel}</span>\n </span>\n {starsLabel && <span class=\"hidden items-center gap-1 border-s border-border bg-secondary px-2 py-1.5 text-secondary-foreground sm:flex\">\n <svg viewBox=\"0 0 16 16\" width=\"11\" height=\"11\" aria-hidden=\"true\" fill=\"currentColor\" class=\"text-warning\">\n <path d=\"M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Z\"></path>\n </svg>\n <span class=\"font-mono\">{starsLabel}</span>\n </span>}\n </a>\n )}\n\n <ThemeToggle />\n </div>\n </div>\n</header>\n\n<script>\n // Smooth-scroll for in-page anchor links (Header nav + Hero CTA).\n // Works on any <a href=\"#…\"> that points to an existing element on\n // the current page. External links (e.g. /about, /projects?…) are\n // skipped because they don't start with \"#\". Modifier-clicks\n // (Cmd/Ctrl/Shift/middle) let the browser handle the anchor\n // normally so users can open the same section in a new tab.\n document.addEventListener(\"click\", (e) => {\n if (e.defaultPrevented) return;\n if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return;\n if (e.button !== 0) return;\n const link = (e.target as HTMLElement).closest<HTMLAnchorElement>(\n 'a[href^=\"#\"]',\n );\n if (!link) return;\n const id = link.getAttribute(\"href\")!;\n if (id.length <= 1) return;\n const target = document.querySelector(id);\n if (!target) return;\n e.preventDefault();\n target.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\n history.replaceState(null, \"\", id);\n });\n</script>\n",
76
+ "type": "registry:component",
77
+ "target": "~/src/layouts/header.astro"
78
+ },
79
+ {
80
+ "path": "default/layouts/section-header.astro",
81
+ "content": "---\ninterface Props {\n eyebrow?: string;\n title: string;\n description?: string;\n align?: 'left' | 'center';\n /** Pass 1 when this header IS the page title (one h1 per route). */\n level?: 1 | 2 | 3;\n}\n\nconst { eyebrow, title, description, align = 'left', level = 2 } = Astro.props;\nconst Heading = `h${level}` as 'h1' | 'h2' | 'h3';\n---\n\n<header\n class={`mb-6 flex flex-col gap-2 ${\n align === \"center\" ? \"items-center text-center\" : \"\"\n }`}\n>\n {\n eyebrow && (\n <span class=\"text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">\n {eyebrow}\n </span>\n )\n }\n <Heading\n class=\"text-[1.5rem] sm:text-[1.625rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100 m-0\"\n >\n {title}\n </Heading>\n {\n description && (\n <p\n class={`text-[0.9375rem] leading-relaxed text-ink-500 dark:text-ink-400 m-0 ${\n align === \"center\" ? \"max-w-2xl\" : \"max-w-[56ch]\"\n }`}\n >\n {description}\n </p>\n )\n }\n</header>\n",
82
+ "type": "registry:component",
83
+ "target": "~/src/layouts/section-header.astro"
84
+ },
85
+ {
86
+ "path": "default/layouts/seo.astro",
87
+ "content": "---\n// SPDX-License-Identifier: MIT\n\n/**\n * Per-page SEO: <title>, description, canonical, Open Graph, Twitter Card,\n * and JSON-LD structured data. Designed to be used inside <head> by the\n * BaseLayout. Pages pass the rich props they care about; everything else\n * has a sensible default derived from the site config and the Astro URL.\n *\n * Renders:\n * - <title>, meta description, canonical link, robots\n * - Open Graph (og:*) for Facebook, LinkedIn, Discord, Slack, etc.\n * - Twitter Card (twitter:*) for X / Twitter\n * - JSON-LD WebSite+Organization identity graph on every page\n * (built by @grove-dev/core's `siteSchema`, with a SearchAction\n * pointing at the directory's browse page)\n * - Per-page JSON-LD nodes when `jsonLd` is provided (SoftwareSourceCode\n * on record pages, CollectionPage/ItemList/BreadcrumbList on\n * collection and taxonomy pages, ...)\n *\n * Noindex is opt-in via the `noindex` prop. By default everything is\n * indexable; noindex targets today are /submit, /404, and /empty.\n */\nimport { type JsonLdNode, siteSchema, validateJsonLd } from '@grove-dev/core';\n\ninterface Props {\n title: string;\n description: string;\n site: {\n name: string;\n description?: string;\n repoUrl?: string;\n /** Header logo path under `public/` — used as Organization logo when set. */\n logo?: string;\n /** BCP-47 language tag (e.g. \"en\"). Drives og:locale + JSON-LD inLanguage. */\n locale?: string;\n /** Twitter/X handle (e.g. \"@grove\") — emitted as twitter:site. */\n twitter?: string;\n };\n searchPath?: string;\n /** Open Graph / Twitter image. Default: /og-image.svg. Should be absolute or root-relative. */\n image?: string;\n /** Alt text for the OG/Twitter image. Default: \"<site name> social preview\". */\n imageAlt?: string;\n /** og:type. Default: \"website\". Use \"article\" for blog posts / changelog. */\n type?: 'website' | 'article' | 'profile';\n /** Set true to add noindex,nofollow. */\n noindex?: boolean;\n /** Extra JSON-LD payload (object) — typically SoftwareSourceCode on item pages. */\n jsonLd?: Record<string, unknown> | Record<string, unknown>[];\n}\n\nconst {\n title,\n description,\n site: siteConfig,\n searchPath = '/items',\n image = '/og-image.svg',\n imageAlt,\n type = 'website',\n noindex = false,\n jsonLd,\n} = Astro.props;\n\n// `Astro.site` is required for canonical / OG / Twitter / JSON-LD URLs to\n// resolve to the consumer's domain. Failing the build (rather than silently\n// emitting `https://example.com/...`) is the right call: every canonical,\n// OG, and JSON-LD URL would otherwise leak to a domain the consumer doesn't\n// own, which search engines either ignore or treat as canonical to the\n// wrong host.\nif (!Astro.site) {\n throw new Error(\n \"Seo: `site` is not set on the Astro config. Add `site: 'https://your-domain'` to astro.config.mjs so canonical / Open Graph / Twitter / JSON-LD URLs resolve correctly.\",\n );\n}\nconst siteUrl = Astro.site;\nconst canonical = new URL(Astro.url.pathname, siteUrl).toString();\nconst ogImage = new URL(image, siteUrl).toString();\nconst ogImageAlt = imageAlt ?? `${siteConfig.name} social preview`;\nconst locale = siteConfig.locale ?? 'en';\n\n// Truncate description for OG/Twitter where longer is worse (160–200 chars).\nfunction truncate(s: string, max: number): string {\n if (s.length <= max) return s;\n return s.slice(0, max - 1).trimEnd() + '…';\n}\nconst shortDescription = truncate(description, 200);\n\n// WebSite+Organization identity graph — site-wide signals that appear on\n// every page (Google uses them for site links and the knowledge panel).\n// Built by core's `siteSchema` so the @id graph shape is shared with the\n// rest of the JSON-LD registry; the SearchAction is appended here because\n// the browse path is an adapter concern, not a core one.\nconst bareSiteUrl = siteUrl.toString().replace(/\\/$/, '');\nconst [siteLd] = siteSchema({\n url: bareSiteUrl,\n name: siteConfig.name,\n description: siteConfig.description ?? description,\n inLanguage: locale,\n orgName: siteConfig.name,\n orgUrl: bareSiteUrl,\n ...(siteConfig.logo ? { orgLogo: new URL(siteConfig.logo, siteUrl).toString() } : {}),\n ...(siteConfig.repoUrl ? { sameAs: [siteConfig.repoUrl] } : {}),\n});\nsiteLd.potentialAction = {\n '@type': 'SearchAction',\n target: `${bareSiteUrl}${searchPath}?q={search_term_string}`,\n 'query-input': 'required name=search_term_string',\n};\n\nconst perPageNodes = jsonLd ? (Array.isArray(jsonLd) ? jsonLd : [jsonLd]) : null;\n\n// Dev-only well-formedness check — surfaces malformed nodes (relative\n// URLs, missing @context, duplicate @ids) in the terminal during\n// `astro dev` without ever failing or slowing a production build.\nif (import.meta.env.DEV && perPageNodes) {\n const issues = validateJsonLd(perPageNodes as JsonLdNode[]);\n for (const issue of issues) {\n console.warn(`[grove seo] ${Astro.url.pathname}: ${issue.message}`);\n }\n}\n\n// Pre-stringify the JSON-LD payloads in the frontmatter so the\n// template body just interpolates the resulting strings. For SSR\n// this saves the JSON.stringify call on every render; for static\n// builds the cost is unchanged but the template reads cleaner.\nconst siteLdJson = JSON.stringify(siteLd);\nconst perPageLdJson = perPageNodes ? JSON.stringify(perPageNodes) : null;\n---\n\n<!-- Primary meta -->\n<title>{title}</title>\n<meta name=\"description\" content={description} />\n<link rel=\"canonical\" href={canonical} />\n{noindex ? (\n <meta name=\"robots\" content=\"noindex,nofollow\" />\n) : (\n <meta name=\"robots\" content=\"index,follow,max-image-preview:large\" />\n)}\n\n<!-- Open Graph -->\n<meta property=\"og:type\" content={type} />\n<meta property=\"og:url\" content={canonical} />\n<meta property=\"og:title\" content={title} />\n<meta property=\"og:description\" content={shortDescription} />\n<meta property=\"og:image\" content={ogImage} />\n<meta property=\"og:image:width\" content=\"1200\" />\n<meta property=\"og:image:height\" content=\"630\" />\n<meta property=\"og:image:alt\" content={ogImageAlt} />\n<meta property=\"og:site_name\" content={siteConfig.name} />\n<meta property=\"og:locale\" content={locale} />\n\n<!-- Twitter Card -->\n<meta name=\"twitter:card\" content=\"summary_large_image\" />\n{siteConfig.twitter && <meta name=\"twitter:site\" content={siteConfig.twitter} />}\n<meta name=\"twitter:title\" content={title} />\n<meta name=\"twitter:description\" content={shortDescription} />\n<meta name=\"twitter:image\" content={ogImage} />\n<meta name=\"twitter:image:alt\" content={ogImageAlt} />\n\n<!-- JSON-LD: site-wide identity graph -->\n<script is:inline type=\"application/ld+json\" set:html={siteLdJson} />\n\n<!-- JSON-LD: per-page (SoftwareSourceCode, CollectionPage, BreadcrumbList, ...) -->\n{perPageLdJson && (\n <script\n is:inline\n type=\"application/ld+json\"\n set:html={perPageLdJson}\n />\n)}\n",
88
+ "type": "registry:component",
89
+ "target": "~/src/layouts/seo.astro"
90
+ },
91
+ {
92
+ "path": "default/components/site/theme-toggle.astro",
93
+ "content": "---\n// A three-position theme switcher: light / dark / system.\n//\n// State is persisted in `localStorage` under the key \"grove-theme\".\n// On mount it reads the stored value (or \"system\" if none), applies\n// the corresponding class to <html>, and re-syncs when the OS\n// preference changes (only meaningful when mode is \"system\").\n//\n// Implementation note: the actual <html class=\"dark\"> toggle happens\n// in the inline script in `src/components/layout/BaseLayout.astro`\n// (THEME_INIT). That script runs before paint so the user never sees\n// a flash of the wrong theme.\n\ninterface Props {\n class?: string;\n}\n\nconst { class: className = '' } = Astro.props;\n---\n\n<button\n type=\"button\"\n id=\"theme-toggle\"\n data-theme-toggle\n aria-label=\"Theme: system — switch to light\"\n title=\"Toggle theme\"\n class={`inline-flex h-9 w-9 shrink-0 cursor-pointer items-center justify-center rounded-[var(--radius)] border border-border bg-secondary p-0 text-foreground outline-none transition-colors hover:bg-accent focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35 ${className}`}\n>\n {/* Sun — shown in dark mode (click to go light) */}\n <svg\n width=\"18\"\n height=\"18\"\n class=\"hidden shrink-0 dark:block\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.8\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"4\"/>\n <path d=\"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41\"/>\n </svg>\n {/* Moon — shown in light mode (click to go dark) */}\n <svg\n width=\"18\"\n height=\"18\"\n class=\"block shrink-0 dark:hidden\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.8\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79Z\"/>\n </svg>\n</button>\n{/* Announces theme changes to assistive tech — the icon alone can't\n distinguish \"dark\" from \"system resolving to dark\". */}\n<span data-theme-toggle-status role=\"status\" class=\"sr-only\"></span>\n\n<script>\n // The toggle button simply rotates between the three modes on\n // click. The actual class application lives in the page-level\n // THEME_INIT script so behaviour stays consistent.\n const STORAGE_KEY = \"grove-theme\";\n type Mode = \"light\" | \"dark\" | \"system\";\n\n function currentMode(): Mode {\n const stored = localStorage.getItem(STORAGE_KEY);\n return stored === \"light\" || stored === \"dark\" || stored === \"system\"\n ? stored\n : \"system\";\n }\n\n function rotate(): Mode {\n const order: Mode[] = [\"light\", \"dark\", \"system\"];\n const next = order[(order.indexOf(currentMode()) + 1) % order.length];\n localStorage.setItem(STORAGE_KEY, next);\n // Notify the page-level listener.\n window.dispatchEvent(new CustomEvent(\"theme:set\", { detail: next }));\n return next;\n }\n\n function nextMode(): Mode {\n const order: Mode[] = [\"light\", \"dark\", \"system\"];\n return order[(order.indexOf(currentMode()) + 1) % order.length];\n }\n\n // The accessible name carries BOTH the current state and the next\n // action (\"Theme: dark — switch to system\"); title mirrors it for\n // sighted tooltip users. Re-read on focus/hover so another tab or\n // toggle instance can't leave it stale.\n function updateLabel(btn: HTMLButtonElement) {\n const label = `Theme: ${currentMode()} — switch to ${nextMode()}`;\n btn.setAttribute(\"aria-label\", label);\n btn.title = label;\n }\n\n function announce(mode: Mode) {\n const status = document.querySelector(\"[data-theme-toggle-status]\");\n if (status) status.textContent = `Theme set to ${mode}`;\n }\n\n document.querySelectorAll<HTMLButtonElement>(\"[data-theme-toggle]\").forEach((btn) => {\n updateLabel(btn);\n btn.addEventListener(\"click\", () => {\n const mode = rotate();\n updateLabel(btn);\n announce(mode);\n });\n btn.addEventListener(\"mouseenter\", () => updateLabel(btn));\n btn.addEventListener(\"focus\", () => updateLabel(btn));\n });\n</script>\n",
94
+ "type": "registry:component",
95
+ "target": "~/src/components/site/theme-toggle.astro"
96
+ },
97
+ {
98
+ "path": "default/components/grove/powered-by.astro",
99
+ "content": "---\n/**\n * PoweredBy — \"Powered by Grove\" attribution.\n *\n * The mark is **inlined**, not loaded through `<img src>`: an SVG\n * served as its own document cannot see page CSS, so `currentColor`\n * never resolves there (the bug that cost the packaged icon set both\n * themes before 0.5.3). Inlined, the mark simply inherits the\n * surrounding text colour and follows the site's theme toggle — no\n * second file, no script.\n *\n * Generic: no `siteConfig` import. `Footer` renders it under the brand\n * block when `footer.poweredBy` is on; consumers can also drop it\n * anywhere themselves — e.g. into `Hero`'s `eyebrow` slot.\n */\n\ninterface Props {\n /** Where the link points. Override only for a staging/docs mirror. */\n href?: string;\n /** Mark size in px. Default 16 — sized for 13px text. */\n size?: number;\n /** Extra class on the link. */\n class?: string;\n}\n\nconst { href = 'https://withgrove.dev', size = 16, class: className = '' } = Astro.props;\n---\n\n<a\n href={href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class:list={[\n \"inline-flex items-center gap-1.5 transition-colors hover:text-ink-900 dark:hover:text-ink-100\",\n className,\n ]}\n>\n <span>Powered by</span>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 32 32\"\n width={size}\n height={size}\n style={`width:${size}px;height:${size}px`}\n fill=\"none\"\n aria-hidden=\"true\"\n class=\"shrink-0 align-middle\"\n >\n <path d=\"M16 28V14\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"></path>\n <path d=\"M16 14C16 14 16 8 22 6C22 6 22 12 16 14Z\" fill=\"currentColor\" fill-opacity=\"0.85\"></path>\n <path d=\"M16 14C16 14 16 8 10 6C10 6 10 12 16 14Z\" fill=\"currentColor\" fill-opacity=\"0.6\"></path>\n <path d=\"M16 18C16 18 16 22 20 23\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n <path d=\"M16 21C16 21 16 24 12 25\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n </svg>\n <span class=\"font-semibold\">Grove</span>\n</a>\n",
100
+ "type": "registry:component",
101
+ "target": "~/src/components/grove/powered-by.astro"
102
+ },
103
+ {
104
+ "path": "default/styles/system.css",
105
+ "content": "/*\n * Grove design system — your copy.\n *\n * The registry installed this file into your project; it is yours to\n * edit. `base-layout.astro` imports it, so it is the single entry point\n * for the whole stack. It owns Tailwind theme tokens, runtime light/dark\n * values, base element defaults, and rendered Markdown styles. Astro\n * components keep their presentation in HTML with Tailwind utilities.\n *\n * For overrides you would rather keep separate from upstream, create\n * `src/styles/global.css` — the Grove integration auto-loads it after\n * this file, and `grove update` never touches it.\n */\n\n@import \"tailwindcss\";\n/*\n * Custom `dark` variant — `dark:` utilities must key off the `.dark`\n * class on <html> (set by the THEME_INIT script in BaseLayout.astro),\n * NOT off `prefers-color-scheme`. Tailwind v4.3.0 splits the selector\n * argument on commas — including commas inside `:where(...)` — so\n * `(&:where(.dark, .dark *))` is silently parsed as two separate\n * (and broken) selectors and the variant never registers. Use two\n * selectors joined by a space instead.\n */\n@custom-variant dark (&:where(.dark), &:where(.dark *));\n@source \"./**/*.{astro,html,js,jsx,ts,tsx}\";\n\n@theme {\n /* ── Starlight-aligned neutral scale ──────────────────────────── */\n --color-ink-50: oklch(98.5% 0 0);\n --color-ink-100: oklch(97% 0 0);\n --color-ink-200: oklch(92.2% 0 0);\n --color-ink-300: oklch(87% 0 0);\n --color-ink-400: oklch(70.8% 0 0);\n --color-ink-500: oklch(55.6% 0 0);\n --color-ink-600: oklch(43.9% 0 0);\n --color-ink-700: oklch(37.1% 0 0);\n --color-ink-800: oklch(26.9% 0 0);\n --color-ink-900: oklch(20.5% 0 0);\n --color-ink-950: oklch(14.5% 0 0);\n\n /* ── Semantic colors ────────────────────────────────────────────\n * These point at runtime variables instead of fixed palette steps so\n * Tailwind utilities such as `bg-background` and `text-foreground`\n * follow the resolved theme without requiring a `dark:` twin. The\n * values below mirror packages/starlight/styles/{theme,base}.css.\n */\n --color-background: var(--grove-background);\n --color-foreground: var(--grove-foreground);\n --color-primary: var(--grove-primary);\n --color-primary-foreground: var(--grove-primary-foreground);\n --color-secondary: var(--grove-secondary);\n --color-secondary-foreground: var(--grove-secondary-foreground);\n --color-muted: var(--grove-muted);\n --color-muted-foreground: var(--grove-muted-foreground);\n --color-accent: var(--grove-accent);\n --color-accent-foreground: var(--grove-accent-foreground);\n --color-border: var(--grove-border);\n --color-input: var(--grove-input);\n --color-ring: var(--grove-ring);\n --color-card: var(--grove-card);\n --color-card-foreground: var(--grove-card-foreground);\n --color-popover: var(--grove-popover);\n --color-popover-foreground: var(--grove-popover-foreground);\n\n /* ── Surfaces ───────────────────────────────────────────────────\n * Elevation roles. `card` and `popover` above resolve to these so\n * legacy utilities keep working while new components can name the\n * elevation they mean.\n */\n --color-surface-raised: var(--grove-surface-raised);\n --color-surface-sunken: var(--grove-surface-sunken);\n --color-surface-overlay: var(--grove-surface-overlay);\n\n /* ── Selection (neutral inversion) ──────────────────────────────\n * Active filters, current lens/page, and other \"you are here\"\n * states. Deliberately decoupled from the brand primary so green\n * can mean brand action or success — never selection.\n */\n --color-selected: var(--grove-selected);\n --color-selected-foreground: var(--grove-selected-foreground);\n\n /* ── Status roles (solid fill + text-on-fill pairs) ───────────── */\n --color-success: var(--grove-success);\n --color-success-foreground: var(--grove-success-foreground);\n --color-warning: var(--grove-warning);\n --color-warning-foreground: var(--grove-warning-foreground);\n --color-danger: var(--grove-danger);\n --color-danger-foreground: var(--grove-danger-foreground);\n --color-info: var(--grove-info);\n --color-info-foreground: var(--grove-info-foreground);\n\n /* ── Accent (interactive states) ─────────────────────────────── */\n --color-accent-muted: color-mix(in oklab, var(--grove-foreground) 8%, transparent);\n\n /* ── Status palettes (badges only) ───────────────────────────── */\n --color-emerald-50: oklch(98.2% 0.018 155.826);\n --color-emerald-300: oklch(87.1% 0.15 154.449);\n --color-emerald-400: oklch(79.2% 0.209 151.711);\n --color-emerald-500: oklch(72.3% 0.219 149.579);\n --color-emerald-600: oklch(52.7% 0.154 150.069);\n --color-emerald-700: oklch(52.7% 0.154 150.069);\n --color-emerald-800: oklch(26.6% 0.065 152.934);\n --color-emerald-950: oklch(26.6% 0.065 152.934);\n\n --color-orange-50: oklch(98% 0.016 73.684);\n --color-orange-300: oklch(90.1% 0.076 70.697);\n --color-orange-400: oklch(83.7% 0.128 66.29);\n --color-orange-500: oklch(70.5% 0.213 47.604);\n --color-orange-700: oklch(70.5% 0.213 47.604);\n --color-orange-800: oklch(55.3% 0.195 38.402);\n --color-orange-950: oklch(40.8% 0.123 38.172);\n\n --color-blue-50: oklch(97% 0.014 254.604);\n --color-blue-300: oklch(82.8% 0.111 230.318);\n --color-blue-400: oklch(70.7% 0.165 254.624);\n --color-blue-700: oklch(48.8% 0.243 264.376);\n --color-blue-800: oklch(29.3% 0.066 243.157);\n --color-blue-950: oklch(29.3% 0.066 243.157);\n\n --color-amber-50: oklch(98% 0.016 73.684);\n --color-amber-300: oklch(90.1% 0.076 70.697);\n --color-amber-400: oklch(83.7% 0.128 66.29);\n --color-amber-500: oklch(83.7% 0.128 66.29);\n --color-amber-600: oklch(70.5% 0.213 47.604);\n --color-amber-700: oklch(70.5% 0.213 47.604);\n --color-amber-800: oklch(55.3% 0.195 38.402);\n --color-amber-900: oklch(40.8% 0.123 38.172);\n --color-amber-950: oklch(40.8% 0.123 38.172);\n\n /* ── Font stacks ─────────────────────────────────────────────── */\n --font-sans:\n -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Noto Sans\", Arial,\n sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n --font-mono:\n ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\",\n monospace;\n\n /* ── Starlight typography weight/rhythm ──────────────────────── */\n --font-weight-semibold: 500;\n --font-weight-bold: 600;\n --leading-relaxed: 1.75;\n\n /* ── Font size extensions (2xs) ──────────────────────────────── */\n --text-2xs: 0.6875rem;\n --text-2xs--line-height: 1rem;\n\n /* ── Container widths (showcase rhythm) ──────────────────────────\n * The default container tracks `theme.containerWidth` from\n * grove.config.ts: BaseLayout emits `--grove-container` on <html>\n * and the token falls back to the package default when unset. */\n --container-container: var(--grove-container, 1160px);\n /* `wide` is an opt-in escape hatch, not a second site width. It is\n clamped to the configured container so a wide section can never\n overhang the header, footer, and the rest of the page — every\n shell and page template uses `max-w-container`. */\n --container-wide: min(var(--grove-container, 1400px), 1400px);\n /* `narrow` is the reading measure for prose pages (about, 404,\n empty). Clamped for the same reason — a site narrower than 720px\n should not have its prose pages spill past its own frame. */\n --container-narrow: min(var(--grove-container, 720px), 720px);\n\n /* ── Border radius scale ──────────────────────────────────────────\n * Driven by `theme.radius` (\"none\" | \"soft\" | \"round\") the same\n * way — BaseLayout emits the `--grove-radius*` overrides. */\n --radius: var(--grove-radius, 0.625rem);\n --radius-lg: var(--grove-radius-lg, 0.5rem);\n --radius-xl: var(--grove-radius-xl, 0.75rem);\n\n /* ── Animations ──────────────────────────────────────────────── */\n --animate-fade-in-up: fade-in-up 0.6s ease-out both;\n --animate-fade-in: fade-in 0.8s ease-out both;\n --animate-gradient-shift: gradient-shift 8s ease-in-out infinite;\n --animate-subtle-bob: subtle-bob 3s ease-in-out infinite;\n}\n\n@keyframes fade-in-up {\n 0% {\n opacity: 0;\n transform: translateY(8px);\n }\n 100% {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n@keyframes fade-in {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n@keyframes gradient-shift {\n 0%,\n 100% {\n background-position: 0% 50%;\n }\n 50% {\n background-position: 100% 50%;\n }\n}\n\n@keyframes subtle-bob {\n 0%,\n 100% {\n transform: translateY(0);\n }\n 50% {\n transform: translateY(-2px);\n }\n}\n\n/* Respect the OS-level \"reduce motion\" setting. Neutralizes every\n * animation/transition (the `--animate-*` custom properties above,\n * plus one-off `animate-pulse` / `animate-ping` utility classes used\n * directly in components) rather than trying to freeze each keyframe\n * mid-motion, which isn't meaningful for e.g. `background-position`. */\n@media (prefers-reduced-motion: reduce) {\n *,\n *::before,\n *::after {\n animation-duration: 0.01ms !important;\n animation-iteration-count: 1 !important;\n transition-duration: 0.01ms !important;\n scroll-behavior: auto !important;\n }\n}\n\n/* ──────────────────────────────────────────────────────────────────\n * Base\n * ────────────────────────────────────────────────────────────────── */\n\n@layer base {\n :root {\n color-scheme: light;\n\n /* Starlight light theme, expressed as Grove's public semantic API. */\n --grove-background: oklch(100% 0 0);\n --grove-foreground: var(--color-ink-950);\n --grove-gray-1: var(--color-ink-900);\n --grove-gray-2: var(--color-ink-800);\n --grove-gray-3: var(--color-ink-700);\n --grove-gray-4: var(--color-ink-500);\n --grove-gray-5: var(--color-ink-400);\n --grove-gray-6: var(--color-ink-300);\n --grove-gray-7: var(--color-ink-100);\n /* Brand color from `theme.primaryColor` (grove.config.ts) —\n * BaseLayout emits `--grove-theme-primary*` on <html>; without\n * a config the site keeps the neutral ink treatment. */\n --grove-primary: var(--grove-theme-primary, var(--grove-foreground));\n --grove-primary-foreground: var(--grove-theme-primary-foreground, var(--grove-gray-7));\n --grove-secondary: var(--grove-gray-7);\n --grove-secondary-foreground: var(--grove-foreground);\n --grove-muted: var(--grove-gray-7);\n --grove-muted-foreground: var(--grove-gray-4);\n --grove-accent: var(--grove-gray-7);\n --grove-accent-foreground: var(--grove-foreground);\n --grove-border: var(--grove-gray-6);\n --grove-input: var(--grove-gray-6);\n --grove-ring: var(--grove-gray-4);\n /* Elevation: raised surfaces stay in the light family — cards sit\n * on the page via border, not a dark fill. */\n --grove-surface-raised: var(--grove-background);\n --grove-surface-sunken: var(--color-ink-100);\n --grove-surface-overlay: var(--grove-background);\n --grove-card: var(--grove-surface-raised);\n --grove-card-foreground: var(--grove-foreground);\n --grove-popover: var(--grove-surface-overlay);\n --grove-popover-foreground: var(--grove-foreground);\n /* Selection: neutral inversion (vite.dev-style), never the brand\n * primary. */\n --grove-selected: var(--color-ink-900);\n --grove-selected-foreground: var(--color-ink-50);\n /* Status fills with AA text-on-fill partners. */\n --grove-success: #15803d;\n --grove-success-foreground: #ffffff;\n --grove-warning: #92400e;\n --grove-warning-foreground: #ffffff;\n --grove-danger: #b91c1c;\n --grove-danger-foreground: #ffffff;\n --grove-info: #1d4ed8;\n --grove-info-foreground: #ffffff;\n }\n\n :root.dark {\n color-scheme: dark;\n --grove-background: var(--color-ink-950);\n --grove-foreground: var(--color-ink-50);\n --grove-gray-1: var(--color-ink-50);\n --grove-gray-2: var(--color-ink-300);\n --grove-gray-3: var(--color-ink-400);\n --grove-gray-4: var(--color-ink-500);\n --grove-gray-5: var(--color-ink-700);\n --grove-gray-6: var(--color-ink-800);\n --grove-gray-7: var(--color-ink-900);\n /* Dark mode lifts the brand color toward white (see BaseLayout's\n * emitted `--grove-theme-primary-dark`) so contrast holds. The\n * foreground is computed against that lifted value, never assumed. */\n --grove-primary: var(--grove-theme-primary-dark, var(--grove-foreground));\n --grove-primary-foreground: var(--grove-theme-primary-dark-foreground, var(--grove-gray-7));\n --grove-secondary: var(--grove-gray-6);\n --grove-secondary-foreground: var(--grove-foreground);\n --grove-muted: var(--grove-gray-6);\n --grove-muted-foreground: var(--grove-gray-3);\n --grove-accent: var(--grove-gray-5);\n --grove-accent-foreground: var(--grove-foreground);\n --grove-border: var(--grove-gray-6);\n --grove-input: var(--grove-gray-5);\n --grove-ring: var(--grove-gray-4);\n /* Elevation: the dark raised surface sits just above the ink-950\n * page (deliberate landing-page value; hover lifts to ink-900). */\n --grove-surface-raised: #141516;\n --grove-surface-sunken: oklch(11.5% 0 0);\n --grove-surface-overlay: var(--grove-gray-7);\n --grove-card: var(--grove-surface-raised);\n --grove-card-foreground: var(--grove-foreground);\n --grove-popover: var(--grove-surface-overlay);\n --grove-popover-foreground: var(--grove-foreground);\n /* Selection: neutral inversion, mirrored. */\n --grove-selected: var(--color-ink-100);\n --grove-selected-foreground: var(--color-ink-950);\n /* Status fills lift toward pastels with dark text-on-fill. */\n --grove-success: #4ade80;\n --grove-success-foreground: var(--color-ink-950);\n --grove-warning: #fbbf24;\n --grove-warning-foreground: var(--color-ink-950);\n --grove-danger: #f87171;\n --grove-danger-foreground: var(--color-ink-950);\n --grove-info: #60a5fa;\n --grove-info-foreground: var(--color-ink-950);\n }\n\n html {\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n body {\n margin: 0;\n background: var(--grove-background);\n color: var(--grove-foreground);\n font-family: var(--font-sans);\n font-size: 15px;\n line-height: 1.75;\n }\n\n a {\n color: inherit;\n text-decoration: none;\n }\n\n /* Subtle selection */\n ::selection {\n background: var(--grove-muted);\n color: var(--grove-foreground);\n }\n\n /* Slim, neutral scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: var(--grove-border) transparent;\n }\n *::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n }\n *::-webkit-scrollbar-thumb {\n background: var(--grove-border);\n border-radius: 4px;\n }\n\n input,\n select,\n textarea,\n button {\n font: inherit;\n }\n\n :where(\n input[type=\"text\"],\n input[type=\"search\"],\n input[type=\"url\"],\n input[type=\"email\"],\n input:not([type]),\n textarea\n ) {\n appearance: none;\n -webkit-appearance: none;\n }\n\n input[type=\"search\"]::-webkit-search-cancel-button,\n input[type=\"search\"]::-webkit-search-results-button,\n input[type=\"search\"]::-webkit-search-results-decoration {\n -webkit-appearance: none;\n display: none;\n }\n\n /* Inputs that live INSIDE a styled shell (the hero search pill)\n * opt out with `.grove-input-unstyled`: the shell owns the border,\n * radius, background, and the focus treatment via `focus-within` —\n * forcing a second background/radius/focus ring on the inner input\n * paints a box-within-a-box. */\n :where(\n input[type=\"text\"],\n input[type=\"search\"],\n input[type=\"url\"],\n input[type=\"email\"],\n input:not([type]),\n select,\n textarea\n ):not(.grove-input-unstyled) {\n border-color: var(--grove-input) !important;\n border-radius: var(--radius) !important;\n background-color: var(--grove-background) !important;\n color: var(--grove-foreground) !important;\n }\n\n :where(\n input[type=\"text\"],\n input[type=\"search\"],\n input[type=\"url\"],\n input[type=\"email\"],\n input:not([type]),\n select,\n textarea\n ):not(.grove-input-unstyled):focus-visible {\n border-color: var(--grove-ring) !important;\n outline: none;\n box-shadow: 0 0 0 3px color-mix(in oklab, var(--grove-ring) 35%, transparent);\n }\n}\n\n/* ──────────────────────────────────────────────────────────────────\n * Rendered record Markdown\n *\n * The `.grove-prose` class wraps any rendered Markdown body (record\n * sidecar or consumer-authored page). Sizing follows the editorial\n * recipe:\n * body 17px / 1.75\n * h2 28px h3 21px h4 17px h5/h6 smaller, uppercase tracker\n * The parent column owns the measure (≈760–820px on lg+), so the\n * `.grove-prose` wrapper intentionally omits a `max-width`.\n *\n * Colors come from the package's `ink-*` scale via CSS variables so\n * every consumer gets the same baseline regardless of brand overrides.\n * ────────────────────────────────────────────────────────────────── */\n\n/* ──────────────────────────────────────────────────────────────────\n * Monochrome brand marks (`Icon.astro`, kind: \"mono\")\n *\n * An SVG loaded through `<img src>` is an independent document that\n * page CSS cannot reach, so `currentColor` inside it never resolves\n * against the theme — it silently renders black in both modes. That\n * is why single-color marks (Apple, Rust, Tauri, Deno, …) used to\n * need a hand-maintained `-light`/`-dark` file pair plus a JS `src`\n * swap, and why the pair was easy to get backwards.\n *\n * Masking inverts the relationship: the SVG supplies the *shape*\n * (via its alpha channel) and the page supplies the *color* — no\n * script and no second file.\n *\n * The paint is `--grove-foreground`, NOT `currentColor`. These are\n * brand marks, and a brand mark's real presentation is solid black on\n * light and solid white on dark — not whatever tint the surrounding\n * chip label happens to use. Inheriting `currentColor` washed the\n * Apple mark down to the chip's muted `ink-500`, which reads as a\n * greyed-out logo rather than a logo. Callers that genuinely want a\n * tinted mark can override `--grove-icon-mono`.\n *\n * The URL is per-icon and computed at render time, so it can never\n * appear literally in a source file for Tailwind's extractor to find\n * — arbitrary `mask-[url(…)]` utilities are structurally impossible\n * here. Everything static lives in this class; only the URL travels\n * inline, as `--grove-icon-url`.\n * ────────────────────────────────────────────────────────────────── */\n.grove-icon-mask {\n display: inline-block;\n flex-shrink: 0;\n vertical-align: middle;\n background-color: var(--grove-icon-mono, var(--grove-foreground));\n -webkit-mask-image: var(--grove-icon-url);\n mask-image: var(--grove-icon-url);\n -webkit-mask-size: contain;\n mask-size: contain;\n -webkit-mask-repeat: no-repeat;\n mask-repeat: no-repeat;\n -webkit-mask-position: center;\n mask-position: center;\n}\n\n/* Print stylesheets drop background colors, which would erase the\n * glyph entirely — an `<img>` would still print. */\n@media print {\n .grove-icon-mask {\n -webkit-print-color-adjust: exact;\n print-color-adjust: exact;\n }\n}\n\n/* Forced-colors mode overrides `background-color`; pin it to the\n * system text color so the mark stays visible. */\n@media (forced-colors: active) {\n .grove-icon-mask {\n background-color: CanvasText;\n }\n}\n\n.grove-prose {\n font-size: 1.0625rem; /* 17px */\n line-height: 1.75;\n color: var(--color-ink-700, #3a3a3a);\n overflow-wrap: break-word;\n word-wrap: break-word;\n}\n.dark .grove-prose {\n color: var(--color-ink-200, #d4d4d4);\n}\n.grove-prose > :first-child {\n margin-top: 0;\n}\n.grove-prose > :last-child {\n margin-bottom: 0;\n}\n\n/* Headings — full depth. */\n.grove-prose :where(h1, h2, h3, h4, h5, h6) {\n font-weight: 600;\n line-height: 1.25;\n letter-spacing: -0.015em;\n color: var(--color-ink-900, #1a1a1a);\n scroll-margin-top: 5rem;\n}\n.dark .grove-prose :where(h1, h2, h3, h4, h5, h6) {\n color: var(--color-ink-100, #f0f0f0);\n}\n/* Page bodies open with a `# <Page name>` heading that duplicates\n the page title. Hide the first heading so the body flows from a\n top-level paragraph into sections. */\n.grove-prose > h1:first-child {\n display: none;\n}\n.grove-prose h1:not(:first-child) {\n font-size: 2.5rem; /* 40px */\n margin-top: 2.5rem;\n margin-bottom: 1rem;\n}\n.grove-prose h2 {\n font-size: 1.75rem; /* 28px */\n margin-top: 2.5rem;\n margin-bottom: 0.75rem;\n padding-bottom: 0.5rem;\n border-bottom: 1px solid var(--color-ink-200, #e5e5e5);\n}\n.dark .grove-prose h2 {\n border-bottom-color: var(--color-ink-800, #2a2a2a);\n}\n.grove-prose h3 {\n font-size: 1.3125rem; /* 21px */\n margin-top: 2rem;\n margin-bottom: 0.5rem;\n}\n.grove-prose h4 {\n font-size: 1.0625rem; /* 17px */\n margin-top: 1.5rem;\n margin-bottom: 0.4rem;\n}\n.grove-prose h5 {\n font-size: 0.9375rem; /* 15px */\n margin-top: 1.25rem;\n margin-bottom: 0.4rem;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: var(--color-ink-600, #555555);\n}\n.grove-prose h6 {\n font-size: 0.875rem; /* 14px */\n margin-top: 1rem;\n margin-bottom: 0.35rem;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n color: var(--color-ink-500, #6a6a6a);\n}\n.dark .grove-prose h5 {\n color: var(--color-ink-400, #8a8a8a);\n}\n.dark .grove-prose h6 {\n color: var(--color-ink-500, #6a6a6a);\n}\n\n/* Paragraphs + lists. */\n.grove-prose p {\n margin: 0 0 1rem 0;\n}\n.grove-prose :where(ul, ol) {\n margin: 0 0 1rem 0;\n padding-left: 1.5rem;\n}\n.grove-prose ul {\n list-style: disc;\n}\n.grove-prose ol {\n list-style: decimal;\n}\n.grove-prose li {\n margin-bottom: 0.35rem;\n padding-left: 0.25rem;\n}\n.grove-prose li > :where(ul, ol) {\n margin-top: 0.35rem;\n margin-bottom: 0;\n}\n\n/* Definition lists. */\n.grove-prose dl {\n margin: 0 0 1rem 0;\n}\n.grove-prose dt {\n font-weight: 600;\n color: var(--color-ink-900, #1a1a1a);\n margin-top: 0.5rem;\n}\n.grove-prose dd {\n margin-left: 1.5rem;\n margin-bottom: 0.5rem;\n color: var(--color-ink-700, #3a3a3a);\n}\n.dark .grove-prose dt {\n color: var(--color-ink-100, #f0f0f0);\n}\n.dark .grove-prose dd {\n color: var(--color-ink-200, #d4d4d4);\n}\n\n/* Inline emphasis. */\n.grove-prose strong {\n font-weight: 600;\n color: var(--color-ink-900, #1a1a1a);\n}\n.grove-prose em {\n font-style: italic;\n}\n.grove-prose u {\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.grove-prose :where(s, del) {\n text-decoration: line-through;\n color: var(--color-ink-500, #6a6a6a);\n}\n.grove-prose ins {\n text-decoration: underline;\n text-decoration-style: double;\n text-underline-offset: 2px;\n}\n.grove-prose small {\n font-size: 0.85em;\n color: var(--color-ink-500, #6a6a6a);\n}\n.dark .grove-prose strong {\n color: var(--color-ink-100, #f0f0f0);\n}\n.dark .grove-prose small {\n color: var(--color-ink-400, #8a8a8a);\n}\n\n/* Inline marks / keys / abbreviations. */\n.grove-prose mark {\n background-color: oklch(95% 0.05 90);\n color: var(--color-ink-900, #1a1a1a);\n padding: 0.05em 0.25em;\n border-radius: 0.2rem;\n}\n.dark .grove-prose mark {\n background-color: oklch(35% 0.08 80);\n color: var(--color-ink-50, #fafafa);\n}\n.grove-prose kbd {\n font-family: var(--font-mono);\n font-size: 0.8em;\n background-color: var(--color-ink-100, #f0f0f0);\n color: var(--color-ink-900, #1a1a1a);\n border: 1px solid var(--color-ink-300, #c0c0c0);\n border-bottom-width: 2px;\n border-radius: 0.3rem;\n padding: 0.05em 0.4em;\n line-height: 1;\n display: inline-block;\n vertical-align: baseline;\n box-shadow: 0 1px 0 var(--color-ink-300, #c0c0c0);\n}\n.dark .grove-prose kbd {\n background-color: var(--color-ink-900, #1a1a1a);\n color: var(--color-ink-100, #f0f0f0);\n border-color: var(--color-ink-700, #4a4a4a);\n box-shadow: 0 1px 0 var(--color-ink-700, #4a4a4a);\n}\n.grove-prose abbr[title] {\n text-decoration: underline dotted;\n text-underline-offset: 2px;\n cursor: help;\n}\n.grove-prose :where(sub, sup) {\n font-size: 0.75em;\n line-height: 1;\n position: relative;\n vertical-align: baseline;\n}\n.grove-prose sub {\n bottom: -0.25em;\n}\n.grove-prose sup {\n top: -0.5em;\n}\n.grove-prose time {\n font-variant-numeric: tabular-nums;\n}\n\n/* Links. */\n.grove-prose a {\n color: var(--color-ink-900, #1a1a1a);\n text-decoration: underline;\n text-decoration-color: var(--color-ink-300, #c0c0c0);\n text-underline-offset: 2px;\n text-decoration-thickness: 1px;\n transition: text-decoration-color 120ms ease;\n}\n.grove-prose a:hover {\n text-decoration-color: currentColor;\n text-decoration-thickness: 2px;\n}\n.dark .grove-prose a {\n color: var(--color-ink-100, #f0f0f0);\n text-decoration-color: var(--color-ink-700, #4a4a4a);\n}\n\n/* Inline code. */\n.grove-prose code {\n font-family: var(--font-mono);\n font-size: 0.875em;\n background-color: var(--color-ink-100, #f0f0f0);\n color: var(--color-ink-900, #1a1a1a);\n padding: 0.15em 0.4em;\n border-radius: 0.3rem;\n word-break: break-word;\n}\n.dark .grove-prose code {\n background-color: var(--color-ink-900, #1a1a1a);\n color: var(--color-ink-100, #f0f0f0);\n}\n\n/* Code blocks — full column width, internal scroll on overflow. */\n.grove-prose pre {\n background-color: var(--color-ink-100, #f0f0f0);\n color: var(--color-ink-900, #1a1a1a);\n padding: 1rem 1.25rem;\n border-radius: 0.5rem;\n overflow-x: auto;\n margin: 0 0 1.5rem 0;\n font-size: 0.875rem;\n line-height: 1.6;\n border: 1px solid var(--color-ink-200, #e5e5e5);\n max-width: 100%;\n}\n.dark .grove-prose pre {\n background-color: var(--color-ink-900, #1a1a1a);\n color: var(--color-ink-100, #f0f0f0);\n border-color: var(--color-ink-800, #2a2a2a);\n}\n.grove-prose pre code {\n background: transparent;\n padding: 0;\n border-radius: 0;\n font-size: inherit;\n word-break: normal;\n white-space: pre;\n}\n\n/* Shiki-themed code blocks. Shiki emits `<pre class=\"shiki …\">`\n with per-token `<span style=\"--shiki-light: …; --shiki-dark: …\">`\n when configured with `defaultColor: false`. Our job is to:\n 1. Give the block a slightly different background to read as\n \"code\" (lighter than the prose surface in light mode,\n darker in dark mode).\n 2. Make the foreground colour resolve through the dual\n variables so the same HTML is themed correctly when\n `.dark` toggles on `<html>`. */\n.grove-prose pre.shiki {\n background-color: var(--color-ink-50, #fafafa) !important;\n color: var(--shiki-light, var(--color-ink-900, #1a1a1a));\n border-color: var(--color-ink-200, #e5e5e5);\n}\n.dark .grove-prose pre.shiki {\n background-color: var(--color-ink-950, #0a0a0a) !important;\n color: var(--shiki-dark, var(--color-ink-100, #f0f0f0));\n border-color: var(--color-ink-800, #2a2a2a);\n}\n.grove-prose pre.shiki code {\n color: inherit;\n}\n.grove-prose pre.shiki span {\n color: var(--shiki-light);\n}\n.dark .grove-prose pre.shiki span {\n color: var(--shiki-dark);\n}\n\n/* Blockquotes — italic + left border + background tint. */\n.grove-prose blockquote {\n margin: 0 0 1rem 0;\n padding: 0.65rem 1rem 0.65rem 1.1rem;\n border-left: 3px solid var(--color-ink-300, #c0c0c0);\n color: var(--color-ink-500, #6a6a6a);\n font-style: italic;\n background-color: var(--color-ink-50, #fafafa);\n border-radius: 0 0.4rem 0.4rem 0;\n}\n.grove-prose blockquote > :first-child {\n margin-top: 0;\n}\n.grove-prose blockquote > :last-child {\n margin-bottom: 0;\n}\n.grove-prose blockquote p {\n margin: 0 0 0.5rem 0;\n}\n.grove-prose blockquote blockquote {\n margin: 0.5rem 0;\n border-left-width: 2px;\n}\n.dark .grove-prose blockquote {\n border-left-color: var(--color-ink-700, #4a4a4a);\n color: var(--color-ink-400, #8a8a8a);\n background-color: var(--color-ink-900, #1a1a1a);\n}\n\n/* Horizontal rules. */\n.grove-prose hr {\n border: 0;\n border-top: 1px solid var(--color-ink-200, #e5e5e5);\n margin: 2.25rem 0;\n}\n.dark .grove-prose hr {\n border-top-color: var(--color-ink-800, #2a2a2a);\n}\n\n/* Images — rounded border, full column width. */\n.grove-prose img {\n max-width: 100%;\n height: auto;\n border-radius: 0.5rem;\n border: 1px solid var(--color-ink-200, #e5e5e5);\n display: block;\n margin: 1.25rem 0;\n}\n.dark .grove-prose img {\n border-color: var(--color-ink-800, #2a2a2a);\n}\n\n/* Figures + captions. */\n.grove-prose figure {\n margin: 1.25rem 0;\n padding: 0;\n}\n.grove-prose figure > img {\n margin: 0 0 0.5rem 0;\n}\n.grove-prose figcaption {\n font-size: 0.85rem;\n color: var(--color-ink-500, #6a6a6a);\n text-align: center;\n margin-top: 0.4rem;\n}\n.dark .grove-prose figcaption {\n color: var(--color-ink-400, #8a8a8a);\n}\n\n/* GFM tables — the renderer wraps them in `.grove-prose-table-wrap`\n so the column-width overflow is contained. */\n.grove-prose-table-wrap {\n margin: 0 0 1.5rem 0;\n overflow-x: auto;\n border-radius: 0.5rem;\n border: 1px solid var(--color-ink-200, #e5e5e5);\n background-color: var(--grove-background, #ffffff);\n}\n.dark .grove-prose-table-wrap {\n border-color: var(--color-ink-800, #2a2a2a);\n}\n.grove-prose table {\n width: 100%;\n border-collapse: collapse;\n font-size: 0.95rem;\n line-height: 1.55;\n}\n.grove-prose table caption {\n text-align: left;\n font-size: 0.85rem;\n color: var(--color-ink-500, #6a6a6a);\n padding: 0.5rem 1rem;\n caption-side: bottom;\n}\n.grove-prose thead {\n background-color: var(--color-ink-50, #fafafa);\n border-bottom: 2px solid var(--color-ink-200, #e5e5e5);\n}\n.dark .grove-prose thead {\n background-color: var(--color-ink-900, #1a1a1a);\n border-bottom-color: var(--color-ink-700, #4a4a4a);\n}\n.grove-prose th {\n text-align: left;\n font-weight: 600;\n padding: 0.75rem 1rem;\n color: var(--color-ink-900, #1a1a1a);\n border-bottom: 1px solid var(--color-ink-200, #e5e5e5);\n}\n.grove-prose td {\n padding: 0.65rem 1rem;\n border-bottom: 1px solid var(--color-ink-100, #f0f0f0);\n color: var(--color-ink-700, #3a3a3a);\n vertical-align: top;\n}\n.grove-prose th[align=\"center\"],\n.grove-prose td[align=\"center\"] {\n text-align: center;\n}\n.grove-prose th[align=\"right\"],\n.grove-prose td[align=\"right\"] {\n text-align: right;\n}\n.grove-prose tbody tr:last-child td {\n border-bottom: 0;\n}\n.grove-prose tbody tr:hover {\n background-color: var(--color-ink-50, #fafafa);\n}\n.dark .grove-prose th {\n color: var(--color-ink-100, #f0f0f0);\n border-bottom-color: var(--color-ink-700, #4a4a4a);\n}\n.dark .grove-prose td {\n color: var(--color-ink-200, #d4d4d4);\n border-bottom-color: var(--color-ink-800, #2a2a2a);\n}\n.dark .grove-prose tbody tr:hover {\n background-color: var(--color-ink-900, #1a1a1a);\n}\n\n/* GFM task-list checkboxes — read-only at runtime. */\n.grove-prose input[type=\"checkbox\"] {\n appearance: none;\n -webkit-appearance: none;\n width: 1em;\n height: 1em;\n border: 1.5px solid var(--color-ink-400, #999999);\n border-radius: 0.25rem;\n margin-right: 0.45rem;\n margin-top: 0.15rem;\n vertical-align: middle;\n position: relative;\n top: -0.05em;\n background-color: var(--grove-background, #ffffff);\n cursor: default;\n flex-shrink: 0;\n}\n.grove-prose input[type=\"checkbox\"]:checked {\n background-color: var(--color-ink-900, #1a1a1a);\n border-color: var(--color-ink-900, #1a1a1a);\n}\n.grove-prose input[type=\"checkbox\"]:checked::after {\n content: \"\";\n position: absolute;\n left: 4px;\n top: 1px;\n width: 4px;\n height: 8px;\n border: solid var(--grove-background, #ffffff);\n border-width: 0 2px 2px 0;\n transform: rotate(45deg);\n}\n.grove-prose input[type=\"checkbox\"]:disabled {\n opacity: 0.7;\n}\n.dark .grove-prose input[type=\"checkbox\"] {\n border-color: var(--color-ink-600, #555555);\n background-color: var(--grove-background, #1a1a1a);\n}\n.dark .grove-prose input[type=\"checkbox\"]:checked {\n background-color: var(--color-ink-100, #f0f0f0);\n border-color: var(--color-ink-100, #f0f0f0);\n}\n.dark .grove-prose input[type=\"checkbox\"]:checked::after {\n border-color: var(--grove-background, #1a1a1a);\n}\n.grove-prose li:has(> input[type=\"checkbox\"]) {\n list-style: none;\n margin-left: -1.25rem;\n display: flex;\n align-items: flex-start;\n gap: 0.15rem;\n}\n.grove-prose li:has(> input[type=\"checkbox\"]) > input[type=\"checkbox\"] {\n margin-right: 0.55rem;\n margin-left: 0.15rem;\n}\n\n/* Collapsibles (details / summary). */\n.grove-prose details {\n margin: 0 0 1rem 0;\n border: 1px solid var(--color-ink-200, #e5e5e5);\n border-radius: 0.5rem;\n background-color: var(--color-ink-50, #fafafa);\n overflow: hidden;\n}\n.grove-prose details[open] {\n background-color: var(--grove-background, #ffffff);\n}\n.grove-prose details + details {\n margin-top: -0.5rem;\n}\n.dark .grove-prose details {\n border-color: var(--color-ink-800, #2a2a2a);\n background-color: var(--color-ink-900, #1a1a1a);\n}\n.dark .grove-prose details[open] {\n background-color: var(--grove-background, #1a1a1a);\n}\n.grove-prose summary {\n cursor: pointer;\n padding: 0.75rem 1rem;\n font-weight: 600;\n color: var(--color-ink-900, #1a1a1a);\n list-style: none;\n user-select: none;\n display: flex;\n align-items: center;\n gap: 0.5rem;\n transition: background-color 120ms ease;\n}\n.grove-prose summary::-webkit-details-marker {\n display: none;\n}\n.grove-prose summary::before {\n content: \"\";\n width: 0;\n height: 0;\n border-style: solid;\n border-width: 0.35rem 0 0.35rem 0.55rem;\n border-color: transparent transparent transparent var(--color-ink-500, #6a6a6a);\n transition: transform 120ms ease;\n flex-shrink: 0;\n}\n.grove-prose details[open] > summary::before {\n transform: rotate(90deg);\n}\n.grove-prose summary:hover {\n background-color: var(--color-ink-100, #f0f0f0);\n}\n.grove-prose summary strong {\n font-weight: inherit;\n}\n.dark .grove-prose summary {\n color: var(--color-ink-100, #f0f0f0);\n}\n.dark .grove-prose summary:hover {\n background-color: var(--color-ink-800, #2a2a2a);\n}\n.grove-prose details > :not(summary) {\n padding: 0 1rem 1rem 1rem;\n}\n.grove-prose details > :not(summary):first-of-type {\n padding-top: 0;\n}\n\n/* ──────────────────────────────────────────────────────────────────\n * On-page TOC component (`.grove-toc-*`)\n * Selectors are static so Tailwind purges nothing. The active state\n * is set imperatively by the TableOfContents script via\n * `[data-toc-active]` on the matching anchor.\n * ────────────────────────────────────────────────────────────────── */\n.grove-toc summary {\n color: inherit;\n}\n.grove-toc[open] .grove-toc-chevron,\n.grove-toc > summary:hover .grove-toc-chevron {\n transform: rotate(90deg);\n}\n/* Desktop (lg+): keep the TOC contents visible even before the\n * component script sets the `open` attribute (and with JS disabled).\n * Closed `<details>` content lives in a hidden UA shadow slot, so\n * both the legacy child rule and the modern `::details-content`\n * override are needed for cross-browser coverage; the script in\n * `TableOfContents.astro` sets `open` as the primary mechanism. */\n@media (width >= 64rem) {\n .grove-toc:not([open]) > *:not(summary) {\n display: block;\n }\n .grove-toc:not([open])::details-content {\n content-visibility: visible;\n display: block;\n }\n}\n/* Active item: text-color + a left-rail accent on the link's\n * leading edge. A full pill background reads as a button, not a\n * nav indicator, so it is reserved for hover; the rail stays put\n * while the visitor moves between sections. */\n.grove-toc-item > .grove-toc-link {\n position: relative;\n}\n.grove-toc-link {\n border-left: 2px solid transparent;\n}\n.grove-toc-item--h3 > .grove-toc-link {\n border-left-style: dashed;\n}\n.grove-toc-link[data-toc-active] {\n color: var(--color-ink-900, #1a1a1a);\n border-left-color: currentColor;\n font-weight: 600;\n}\n.dark .grove-toc-link[data-toc-active] {\n color: var(--color-ink-100, #f0f0f0);\n}\n\n/* ──────────────────────────────────────────────────────────────────\n * Activity-badge tone classes.\n *\n * Tone is set via `data-activity-tone` on the element. The rules\n * below are static strings, so Tailwind's content scanner can see\n * them at build time and ship the CSS. Avoid rebuilding tone\n * strings from variables — Tailwind purges anything it can't see.\n * ────────────────────────────────────────────────────────────────── */\n.grove-pill--activity {\n border-color: var(--color-ink-300, #c0c0c0);\n background-color: var(--color-ink-100, #f0f0f0);\n color: var(--color-ink-700, #3a3a3a);\n}\n[data-activity-tone=\"fresh\"] {\n border-color: oklch(87% 0.15 154);\n background-color: oklch(98% 0.018 156);\n color: oklch(40% 0.12 152);\n}\n[data-activity-tone=\"ok\"] {\n border-color: oklch(83% 0.11 230);\n background-color: oklch(97% 0.014 255);\n color: oklch(40% 0.16 255);\n}\n[data-activity-tone=\"low\"] {\n border-color: oklch(90% 0.08 70);\n background-color: oklch(98% 0.016 74);\n color: oklch(40% 0.13 60);\n}\n[data-activity-tone=\"dead\"] {\n border-color: oklch(90% 0.08 40);\n background-color: oklch(98% 0.016 38);\n color: oklch(40% 0.13 40);\n}\n.dark [data-activity-tone=\"fresh\"] {\n border-color: oklch(35% 0.1 154);\n background-color: oklch(20% 0.05 156);\n color: oklch(85% 0.15 154);\n}\n.dark [data-activity-tone=\"ok\"] {\n border-color: oklch(30% 0.1 230);\n background-color: oklch(20% 0.05 255);\n color: oklch(80% 0.13 230);\n}\n.dark [data-activity-tone=\"low\"] {\n border-color: oklch(35% 0.1 60);\n background-color: oklch(20% 0.05 74);\n color: oklch(85% 0.13 70);\n}\n.dark [data-activity-tone=\"dead\"] {\n border-color: oklch(35% 0.1 40);\n background-color: oklch(20% 0.05 40);\n color: oklch(85% 0.13 40);\n}\n\n/* ──────────────────────────────────────────────────────────────────\n * Sidebar key-value rows.\n * Static selector (no dynamic class concatenation) — Tailwind ships\n * the CSS because the class string appears literally here.\n * ────────────────────────────────────────────────────────────────── */\n.grove-kv div {\n line-height: 1.4;\n}\n.grove-card-title {\n letter-spacing: 0.04em;\n}\n.grove-card--muted {\n background-color: color-mix(in oklab, var(--grove-background) 60%, transparent);\n}\n",
106
+ "type": "registry:file",
107
+ "target": "~/src/styles/system.css"
108
+ },
109
+ {
110
+ "path": "default/components/grove/project-card.astro",
111
+ "content": "---\n/**\n * ProjectCard — the canonical card for one directory record.\n *\n * V1 (v0.5.0) refined design for the three-column grid, now shared by\n * every listing surface (home sections, browse results, collection\n * entries, taxonomy pages) through thin adapters (`IndexRow`,\n * `CollectionRow`):\n *\n * - Default mode: the whole card is one clickable `<a>` (cursor:\n * pointer, subtle border + surface lift on hover, no more than\n * 1–2px vertical motion).\n * - When the record has a repository the root becomes an\n * `<article>` with a stretched title link, because nesting `<a>`\n * inside `<a>` is invalid HTML. The `owner/repo` line is a real\n * link to the repository and sits above the stretched overlay\n * (`relative z-10`).\n * - App icon top-left (48px), app name + clickable owner/repo,\n * two-line description with reserved vertical space.\n * - Footer row: stack logos on the left, stars and last-updated on\n * the right, navigation arrow anchored bottom-right.\n *\n * **The layout is fixed.** Earlier versions let list pages opt into a\n * curated badge, a license tag, a `category · status` line and\n * labelled chip rows, so the same record rendered differently\n * depending on where a visitor found it. Platform support is\n * likewise off the card: it is reference detail and belongs on the\n * record page (`RecordSidebar`).\n *\n * Presentation only: this component takes a pre-built\n * `ProjectCardModel` (see `@grove-dev/astro/server`'s\n * `buildProjectCardModel`) and renders it — no record shapes, casts,\n * or formatting live here. Callers that render a raw record (or a\n * lightweight adapter shape like `CollectionEntry`) build the model\n * themselves before reaching this component.\n *\n * Uses the package's design-system tokens plus the standard `dark:`\n * variant. Equal-height cards in the row are achieved at the grid\n * level (`CardGrid`: `grid` + `items-stretch`).\n */\nimport type { ProjectCardModel } from '@grove-dev/astro/server';\nimport CardIcon from './card-icon.astro';\nimport Icon from './icon.astro';\n\ninterface Props {\n /** Pre-built view-model — see `buildProjectCardModel`. */\n model: ProjectCardModel;\n /** Full detail-page URL. */\n href: string;\n /** Eager-load the avatar (above-the-fold rows). */\n eager?: boolean;\n /** Analytics data-event attributes on the card root. */\n event?: string;\n eventSource?: string;\n class?: string;\n}\n\nconst { model, href, eager = false, event, eventSource, class: className = '' } = Astro.props;\n\nconst {\n name,\n slug,\n description,\n initials,\n avatarUrl,\n repoHref,\n owner,\n repo,\n isArticle,\n stars,\n starsLabel,\n hasStars,\n pushedAt,\n updatedLabel,\n hasUpdated,\n visibleStacks,\n stackOverflow,\n hasStacks,\n} = model;\n\nconst Root = isArticle ? 'article' : 'a';\nconst rootAttrs = isArticle ? {} : { href, 'aria-label': `Open ${name}` };\n---\n\n<Root\n {...rootAttrs}\n class={`group relative flex h-full min-w-0 flex-col gap-3 rounded-xl border border-ink-200 bg-card p-5 outline-none transition-[border-color,background-color,transform] duration-150 hover:-translate-y-0.5 hover:border-ink-400 hover:bg-ink-50 focus-visible:border-ink-500 focus-visible:ring-2 focus-visible:ring-ink-900/15 dark:border-ink-800 dark:hover:border-ink-600 dark:hover:bg-ink-900 dark:focus-visible:border-ink-500 dark:focus-visible:ring-ink-100/15 ${className}`}\n data-record-slug={slug}\n data-event={event}\n data-event-source={eventSource}\n data-event-item={event ? slug : undefined}\n>\n {/* Header: icon + name + owner.\n\n The initials chip is always in the DOM, `hidden` behind the image,\n and unhidden by the image's own `onerror` — the same pattern\n `Icon.astro` uses. Rendering it only when `avatarUrl` is falsy made\n it unreachable for every record with a GitHub owner, so a dead\n logo URL or a renamed org showed the browser's broken-image glyph\n instead of a fallback. */}\n <header class=\"flex items-start gap-3\">\n {avatarUrl && (\n <img\n src={avatarUrl}\n alt=\"\"\n width=\"48\"\n height=\"48\"\n loading={eager ? \"eager\" : \"lazy\"}\n fetchpriority={eager ? \"high\" : undefined}\n decoding=\"async\"\n onerror=\"this.hidden=true;this.nextElementSibling.hidden=false\"\n class=\"h-12 w-12 shrink-0 rounded-lg bg-white object-contain p-1\"\n />\n )}\n <span\n aria-hidden=\"true\"\n hidden={Boolean(avatarUrl)}\n data-grove-card-fallback-initials\n class=\"flex h-12 w-12 shrink-0 items-center justify-center rounded-lg bg-ink-100 text-base font-semibold uppercase text-ink-700 dark:bg-ink-800 dark:text-ink-200\"\n >\n {initials}\n </span>\n\n <div class=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n <h3 class=\"m-0 truncate text-[17px] font-semibold leading-snug tracking-tight text-ink-900 sm:text-[18px] dark:text-ink-100\">\n {isArticle ? (\n <a\n href={href}\n class=\"text-inherit no-underline before:absolute before:inset-0 before:z-0 before:content-['']\"\n >\n {name}\n </a>\n ) : (\n name\n )}\n </h3>\n {owner && repo && (\n <p class=\"m-0 truncate font-mono text-[13px] text-ink-500 dark:text-ink-400\">\n {repoHref ? (\n <a\n href={repoHref}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n title={`${owner}/${repo} on GitHub`}\n data-event=\"external_repo_click\"\n data-event-source=\"project_card_repo\"\n data-event-item={slug}\n class=\"relative z-10 text-inherit no-underline transition-colors hover:text-ink-900 hover:underline dark:hover:text-ink-100\"\n >\n {owner}<span class=\"opacity-60\">/</span>{repo}\n </a>\n ) : (\n <Fragment>{owner}<span class=\"opacity-60\">/</span>{repo}</Fragment>\n )}\n </p>\n )}\n </div>\n </header>\n\n {/* Description — two-line clamp with reserved vertical space */}\n <p\n class=\"m-0 line-clamp-2 min-h-[42px] text-[14px] leading-[1.5] text-ink-500 dark:text-ink-400\"\n >\n {description}\n </p>\n\n {/* Footer: stack logos · stars/updated · arrow */}\n <footer class=\"mt-auto flex items-center justify-between gap-3 text-[12px] sm:text-[13px]\">\n {hasStacks ? (\n <div class=\"flex min-w-0 items-center gap-2 text-ink-500 dark:text-ink-400\">\n {visibleStacks.map((stack) => (\n <Icon name={stack} category=\"stack\" size={16} title={stack} />\n ))}\n {stackOverflow > 0 && (\n <span class=\"text-[12px] text-ink-500 dark:text-ink-400\">+{stackOverflow}</span>\n )}\n </div>\n ) : (\n /* Keeps the footer's stars/updated block right-aligned without\n shipping an empty flex container on every stackless card. */\n <span></span>\n )}\n\n <div class=\"flex min-w-0 shrink-0 items-center gap-3 text-ink-500 dark:text-ink-400\">\n {hasStars && (\n <span class=\"inline-flex items-center gap-1\" title={`${stars ?? 0} stars on GitHub`}>\n <span class=\"inline-flex text-warning\"><CardIcon name=\"star\" /></span>\n <span class=\"font-mono\">{starsLabel}</span>\n </span>\n )}\n {hasUpdated && (\n <span class=\"whitespace-nowrap\" title={`Last updated ${pushedAt}`}>\n Updated {updatedLabel}\n </span>\n )}\n <CardIcon\n name=\"arrow\"\n class=\"shrink-0 text-ink-400 transition-colors group-hover:text-ink-700 dark:text-ink-500 dark:group-hover:text-ink-100\"\n />\n </div>\n </footer>\n</Root>\n",
112
+ "type": "registry:component",
113
+ "target": "~/src/components/grove/project-card.astro"
114
+ },
115
+ {
116
+ "path": "default/components/grove/card-grid.astro",
117
+ "content": "---\n/**\n * CardGrid — the one responsive grid host for card-shaped children.\n *\n * Owns the three-column layout every listing surface shares (home\n * record sections, browse results, collection entries, taxonomy\n * terms) so pages never re-declare grid classes. Cards are passed\n * through the default slot, which keeps the grid card-agnostic: any\n * component that follows the sizing contract (`h-full flex flex-col`\n * root, package radius/padding tokens) drops in — including new card\n * types added by consumers.\n *\n * Children may be bare cards or `<li>` wrappers; bare children are\n * valid because the grid renders `role=\"list\"` semantics regardless\n * (Safari drops list semantics on `list-none` either way).\n *\n * `empty` swaps the grid for the `empty` slot so pages keep their\n * empty-state markup next to the list they describe.\n */\ninterface Props {\n /** id forwarded to the `<ul>` (client scripts key off it). */\n id?: string;\n /** Render the `empty` slot instead of the grid. */\n empty?: boolean;\n class?: string;\n}\n\nconst { id, empty = false, class: className = '' } = Astro.props;\n---\n\n{empty ? (\n <slot name=\"empty\" />\n) : (\n <ul\n id={id}\n role=\"list\"\n class={`m-0 grid list-none grid-cols-1 items-stretch gap-5 p-0 sm:grid-cols-2 lg:grid-cols-3 ${className}`}\n >\n <slot />\n </ul>\n)}\n",
118
+ "type": "registry:component",
119
+ "target": "~/src/components/grove/card-grid.astro"
120
+ },
121
+ {
122
+ "path": "default/components/grove/card-icon.astro",
123
+ "content": "---\n/**\n * CardIcon — the small metadata glyphs shared by every card component\n * (star, clock, curated check, navigation arrow, external link).\n *\n * Extracted so a visual tweak (size, stroke, path) is one edit instead\n * of a copy-paste hunt across ProjectCard/IndexRow/CollectionRow.\n * Color comes from `currentColor`; wrap in a colored span (e.g.\n * `text-warning` for the star) to tint.\n */\ninterface Props {\n name: 'star' | 'clock' | 'curated' | 'arrow' | 'external';\n /** Square size in px. Defaults per-glyph to match card typography. */\n size?: number;\n class?: string;\n}\n\nconst { name, size, class: className = '' } = Astro.props;\n\nconst defaults: Record<Props['name'], number> = {\n star: 13,\n clock: 11,\n curated: 10,\n arrow: 16,\n external: 10,\n};\nconst px = size ?? defaults[name];\n---\n\n{name === \"star\" && (\n <svg viewBox=\"0 0 16 16\" width={px} height={px} aria-hidden=\"true\" fill=\"currentColor\" class={className}>\n <path d=\"M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Z\" />\n </svg>\n)}\n{name === \"clock\" && (\n <svg viewBox=\"0 0 16 16\" width={px} height={px} aria-hidden=\"true\" fill=\"currentColor\" class={className}>\n <path d=\"M8 2a6 6 0 1 0 0 12A6 6 0 0 0 8 2Zm0 1.5a4.5 4.5 0 1 1 0 9 4.5 4.5 0 0 1 0-9Zm-.5 1.5a.5.5 0 0 0-1 0v3.25c0 .15.07.29.18.39l1.95 1.65a.5.5 0 0 0 .66-.76L7.5 7.55V5Z\" />\n </svg>\n)}\n{name === \"curated\" && (\n <svg viewBox=\"0 0 16 16\" width={px} height={px} aria-hidden=\"true\" fill=\"currentColor\" class={className}>\n <path d=\"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0Zm3.41 5.09a.75.75 0 0 0-1.06 0L6.75 8.69 5.65 7.59a.75.75 0 1 0-1.06 1.06l1.65 1.65a.75.75 0 0 0 1.06 0l4.11-4.11a.75.75 0 0 0 0-1.06Z\" />\n </svg>\n)}\n{name === \"arrow\" && (\n <svg\n viewBox=\"0 0 24 24\"\n width={px}\n height={px}\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n class={className}\n >\n <path d=\"M5 12h14\"></path>\n <path d=\"m12 5 7 7-7 7\"></path>\n </svg>\n)}\n{name === \"external\" && (\n <svg viewBox=\"0 0 16 16\" width={px} height={px} aria-hidden=\"true\" fill=\"currentColor\" class={className}>\n <path d=\"M3.75 2A1.75 1.75 0 0 0 2 3.75v8.5C2 13.216 2.784 14 3.75 14h8.5A1.75 1.75 0 0 0 14 12.25v-3.5a.75.75 0 0 0-1.5 0v3.5a.25.25 0 0 1-.25.25h-8.5a.25.25 0 0 1-.25-.25v-8.5a.25.25 0 0 1 .25-.25h3.5a.75.75 0 0 0 0-1.5h-3.5Z\" />\n <path d=\"M10 0a.75.75 0 0 0-.75.75v.75h-3a.75.75 0 0 0 0 1.5h3v.75A.75.75 0 0 0 10.75 4.5h2.5A.75.75 0 0 0 14 3.75v-2.5A.75.75 0 0 0 13.25.5H10Z\" />\n </svg>\n)}\n",
124
+ "type": "registry:component",
125
+ "target": "~/src/components/grove/card-icon.astro"
126
+ },
127
+ {
128
+ "path": "default/components/grove/icon.astro",
129
+ "content": "---\nimport type { IconKind } from '../../lib/icon-kinds';\n/**\n * Icon — brand icon registry.\n *\n * Resolves a registry name to `/icons/{stacks|platforms|brands}/{name}.svg`\n * and renders it. The Astro integration syncs the packaged set into the\n * consumer's `public/icons/` on every build; consumers can ship their own\n * SVGs under the same paths (or override the `base` prop) without forking\n * this component.\n *\n * The component is **generic** — it does not import any consumer-side\n * `siteConfig`, `item`, or blueprint-specific module.\n *\n * `category` selects the subfolder:\n *\n * - \"stack\" → `/icons/stacks/{name}.svg`\n * - \"platform\" → `/icons/platforms/{name}.svg`\n * - \"brand\" → `/icons/brands/{name}.svg` (consumer-supplied)\n *\n * ## Theming\n *\n * `ICON_KINDS` (generated by `scripts/sync-icons.mjs`) classifies each\n * packaged icon:\n *\n * - **color** — the default. Any brand with a color mark keeps it,\n * rendered as `<img>` with an `onerror` fallback to an initials\n * chip.\n * - **mono** — marks with no color to lose (Apple, Rust, Tauri,\n * Solidity, Deno) plus the concept glyphs. Rendered as a CSS-masked\n * `<span>` painted from `--grove-foreground`, which reproduces how\n * those brands are actually used: solid black on light, solid white\n * on dark, with no script and no second file. See\n * `.grove-icon-mask` in `styles.css`.\n *\n * The map CLASSIFIES; it does not gate availability. A name it has never\n * heard of — a consumer's own SVG — takes the `<img>` path, exactly as\n * before. Pass `kind=\"mono\"` to opt a custom mark into `currentColor`\n * tinting.\n *\n * Aliases: a tiny `aliases` map (e.g. `rn → react-native`) lets the\n * registry accept multiple ids for the same asset. Lookup falls through\n * `aliases` → the built-in stack aliases → the raw slug, then fails over\n * to the initials placeholder.\n */\nimport { ICON_KINDS } from '../../lib/icon-kinds';\nimport type { IconCategory } from '../../lib/icon-registry';\nimport { resolveIconAsset, slugifyIconName } from '../../lib/icon-registry';\n\nexport type { IconCategory, IconKind };\n\n/**\n * @deprecated Theme variants are no longer file-based — `mono` icons\n * inherit `currentColor`. Accepted and ignored so consumers passing\n * `mode=\"auto\"` do not hit a type error.\n */\nexport type IconMode = 'static' | 'auto';\n\ninterface Props {\n /**\n * Registry id. Resolved through `aliases` first, then matched\n * against the SVG file name (case-insensitive, slug-normalized).\n */\n name: string;\n /** Subfolder under `/icons/`. */\n category: IconCategory;\n /** Pixel size (square). Defaults to 16. */\n size?: number;\n /** Extra class for the outer wrapper. */\n class?: string;\n /** Tooltip / aria-label. */\n title?: string;\n /** @deprecated No-op. Kept for one minor release. */\n mode?: IconMode;\n /**\n * Override the packaged kind classification. Pass `\"mono\"` for a\n * consumer-supplied single-color mark so it is painted black on\n * light and white on dark instead of shipping two files.\n */\n kind?: IconKind;\n /**\n * Optional id → id remap. Lookup goes `name → aliases[name] →\n * {name}.svg` (case-insensitive).\n */\n aliases?: Record<string, string>;\n /**\n * Optional complete asset registry supplied by a consumer. When omitted,\n * Grove attempts the configured asset path and falls back on image error.\n */\n available?: string[];\n /**\n * Initials to render when the icon file is missing. Defaults to\n * the first 1–2 characters of `name`.\n */\n fallbackInitials?: string;\n /**\n * Base path for icon files. Defaults to `/icons` (matches the\n * synced `public/icons/`).\n */\n base?: string;\n}\n\nconst {\n name,\n category,\n size = 16,\n class: className = '',\n title,\n kind,\n aliases,\n available,\n fallbackInitials,\n base = '/icons',\n} = Astro.props;\n\nconst asset = resolveIconAsset(name, category, aliases);\nconst resolved = asset.name;\nconst availableIcons = available?.map(slugifyIconName);\nconst hasAsset =\n category === 'brand' || availableIcons === undefined || availableIcons.includes(resolved);\nconst src = `${base.replace(/\\/$/, '')}/${asset.folder}/${resolved}.svg`;\n\n// Initials fallback: first 1–2 alphanumerics, uppercased.\nconst init = (fallbackInitials ?? name ?? '')\n .replace(/[^a-z0-9]/gi, '')\n .slice(0, 2)\n .toUpperCase();\nconst showFallback = !resolved || !hasAsset || asset.textOnly;\n\n// Unknown names fall through to `<img>`, never to `mono` — a mask has\n// no `onerror`, so a missing file would render an invisible blank.\nconst effectiveKind: IconKind = kind ?? ICON_KINDS[asset.key] ?? 'color';\n\n// `name` reaches the mask branch as part of a CSS `url()` token, and\n// slugifying does not remove the characters that would close it. Astro\n// escapes the attribute; this escapes the CSS inside it.\nconst cssUrl = src.replace(/['\"()\\\\\\s]/g, encodeURIComponent);\n\n// Build aria-label.\nconst ariaLabel = title ?? name;\nconst a11y: Record<string, string> = title\n ? { 'aria-label': ariaLabel, role: 'img' }\n : { 'aria-hidden': 'true', focusable: 'false' };\n\nconst fallbackClass = [\n 'inline-flex shrink-0 select-none items-center justify-center rounded-sm bg-ink-100 align-middle font-semibold uppercase leading-none text-ink-700 dark:bg-ink-800 dark:text-ink-200',\n className,\n];\nconst fallbackStyle = `width:${size}px;height:${size}px;font-size:${Math.max(10, size - 6)}px;`;\n---\n\n{\n showFallback ? (\n <span class:list={fallbackClass} style={fallbackStyle} {...a11y}>\n {init || \"·\"}\n </span>\n ) : effectiveKind === \"mono\" ? (\n <span\n class:list={[\"grove-icon-mask\", className]}\n style={`width:${size}px;height:${size}px;--grove-icon-url:url('${cssUrl}');`}\n {...a11y}\n />\n ) : (\n <>\n {/* The `width`/`height` attributes below are only presentational\n hints. These SVGs carry a `viewBox` and no intrinsic size, so\n once one loads the browser re-derives the box and the row\n reflows — Lighthouse reports it as \"media element lacking an\n explicit size\" and it cost the browse page 0.115 CLS. The\n `style` attribute's explicit CSS size pins the box before\n the first byte arrives. */}\n <img\n src={src}\n width={size}\n height={size}\n style={`width:${size}px;height:${size}px`}\n alt=\"\"\n class:list={[\"inline-block shrink-0 align-middle\", className]}\n loading=\"lazy\"\n decoding=\"async\"\n onerror=\"this.hidden=true;this.nextElementSibling.hidden=false\"\n {...a11y}\n />\n <span hidden data-grove-icon-fallback-initials class:list={fallbackClass} style={fallbackStyle} {...a11y}>\n {init || \"·\"}\n </span>\n </>\n )\n}\n",
130
+ "type": "registry:component",
131
+ "target": "~/src/components/grove/icon.astro"
132
+ },
133
+ {
134
+ "path": "default/lib/icon-kinds.ts",
135
+ "content": "// GENERATED by scripts/sync-icons.mjs — do not edit by hand.\n// Run `pnpm icons:sync` to regenerate.\n/**\n * How each packaged icon is painted.\n *\n * This map CLASSIFIES; it does not gate availability. A name that is\n * absent falls through to the `<img>` + initials path, which is what\n * keeps consumer-supplied SVGs under `public/icons/` working.\n *\n * Keyed by `${folder}/${resolvedName}` — the folder matters because\n * `apple` exists under both `stacks/` and `platforms/`.\n */\nexport type IconKind = 'color' | 'mono';\n\nexport const ICON_KINDS: Readonly<Record<string, IconKind>> = {\n 'platforms/android': 'color',\n 'platforms/app': 'mono',\n 'platforms/chrome': 'color',\n 'platforms/desktop': 'mono',\n 'platforms/embedded': 'mono',\n 'platforms/ios': 'mono',\n 'platforms/linux': 'color',\n 'platforms/macos': 'mono',\n 'platforms/ubuntu': 'color',\n 'platforms/web': 'mono',\n 'platforms/windows': 'color',\n 'stacks/android': 'color',\n 'stacks/apple': 'mono',\n 'stacks/bun': 'color',\n 'stacks/capacitor': 'color',\n 'stacks/clojure': 'color',\n 'stacks/dart': 'color',\n 'stacks/deno': 'mono',\n 'stacks/django': 'color',\n 'stacks/docker': 'color',\n 'stacks/firebase': 'color',\n 'stacks/flutter': 'color',\n 'stacks/go': 'color',\n 'stacks/graphql': 'color',\n 'stacks/ionic': 'color',\n 'stacks/java': 'color',\n 'stacks/javascript': 'color',\n 'stacks/kotlin': 'color',\n 'stacks/llm': 'mono',\n 'stacks/mongodb': 'color',\n 'stacks/nodejs': 'color',\n 'stacks/python': 'color',\n 'stacks/rag': 'mono',\n 'stacks/react': 'color',\n 'stacks/react-native': 'color',\n 'stacks/rust': 'mono',\n 'stacks/solidity': 'mono',\n 'stacks/sveltekit': 'color',\n 'stacks/swift': 'color',\n 'stacks/tauri': 'mono',\n 'stacks/tensorflow': 'color',\n 'stacks/typescript': 'color',\n 'stacks/vue': 'color',\n};\n",
136
+ "type": "registry:file",
137
+ "target": "~/src/lib/icon-kinds.ts"
138
+ },
139
+ {
140
+ "path": "default/lib/icon-registry.ts",
141
+ "content": "/**\n * Icon registry resolution — the name → asset lookup shared by\n * `components/Icon.astro` and the icon test suite.\n *\n * Kept out of the component's frontmatter so tests can assert on the\n * exact resolution the component performs instead of reimplementing\n * (and drifting from) the alias and folder rules.\n */\n\nexport type IconCategory = 'stack' | 'platform' | 'brand';\nexport type IconFolder = 'stacks' | 'platforms' | 'brands';\n\n/**\n * Normalize: lowercase + replace spaces/underscores with dashes.\n *\n * Deliberately NOT `@grove-dev/core`'s `slugify`, which also strips\n * dots and other punctuation. Icon names are file names, so they must\n * survive verbatim apart from case and separator normalization.\n */\nexport function slugifyIconName(s: string): string {\n return s\n .toLowerCase()\n .trim()\n .replace(/[\\s_]+/g, '-');\n}\n\n/**\n * Built-in id remaps. Stack-only by design: `category=\"platform\"`\n * resolves straight to the file name so a consumer shipping their own\n * `public/icons/platforms/ios.svg` is never silently bypassed.\n */\nconst defaultAliases: Partial<Record<IconCategory, Record<string, string>>> = {\n stack: {\n ios: 'apple',\n 'native-ios': 'apple',\n ipados: 'apple',\n macos: 'apple',\n 'objective-c': 'apple',\n spritekit: 'apple',\n swiftui: 'apple',\n kmp: 'kotlin',\n 'kotlin-multiplatform': 'kotlin',\n // Names the shipped set covers under a different file.\n 'node.js': 'nodejs',\n node: 'nodejs',\n clojurescript: 'clojure',\n svelte: 'sveltekit',\n },\n};\n\n/** Stack marks that `category=\"platform\"` should reuse rather than duplicate. */\nconst platformStackIcons = new Set(['docker']);\n\n/** Platforms with no mark at all — always render the initials chip. */\nexport const textOnlyPlatforms = new Set(['self-host', 'self-hosted']);\n\nexport interface ResolvedIconAsset {\n /** Subfolder under the icon base path. */\n folder: IconFolder;\n /** Alias-resolved, slugified file name (no extension). */\n name: string;\n /** `${folder}/${name}` — the key used by the generated kind map. */\n key: string;\n /** True when this name is text-only and must fall back to initials. */\n textOnly: boolean;\n}\n\n/**\n * Resolve a registry id to the asset it points at.\n *\n * Lookup order: `aliases` → the built-in stack aliases → the raw\n * slugified name. Any name not covered by the shipped set simply\n * resolves to `{category-folder}/{slug}`, which is what lets consumers\n * drop their own SVGs in without touching this file.\n */\nexport function resolveIconAsset(\n name: string,\n category: IconCategory,\n aliases?: Record<string, string>,\n): ResolvedIconAsset {\n const resolved = resolveName(name, category, aliases);\n const folder: IconFolder =\n category === 'stack' || (category === 'platform' && platformStackIcons.has(resolved))\n ? 'stacks'\n : category === 'platform'\n ? 'platforms'\n : 'brands';\n\n return {\n folder,\n name: resolved,\n key: `${folder}/${resolved}`,\n textOnly: category === 'platform' && textOnlyPlatforms.has(resolved),\n };\n}\n\nfunction resolveName(\n raw: string,\n category: IconCategory,\n aliases?: Record<string, string>,\n): string {\n if (!raw) return '';\n for (const registry of [aliases, defaultAliases[category]]) {\n if (!registry) continue;\n const lower = raw.toLowerCase();\n for (const [k, v] of Object.entries(registry)) {\n if (k.toLowerCase() === lower) return slugifyIconName(v);\n }\n }\n return slugifyIconName(raw);\n}\n",
142
+ "type": "registry:file",
143
+ "target": "~/src/lib/icon-registry.ts"
144
+ },
145
+ {
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}`}\n />\n</BaseLayout>\n",
148
+ "type": "registry:page",
149
+ "target": "~/src/pages/categories/index.astro"
150
+ },
151
+ {
152
+ "path": "default/pages/categories/[name].astro",
153
+ "content": "---\nimport siteConfig from '@grove/generated/site-config.json';\nimport { getTaxonomyPageModel, itemLabelPlural } from '@grove-dev/astro/server';\nimport TaxonomyList from '../../components/grove/taxonomy-list.astro';\nimport BaseLayout from '../../layouts/base-layout.astro';\n\nexport function getStaticPaths() {\n const categories = siteConfig.taxonomy?.categories ?? [];\n // A category no record currently uses gets no page at all — the\n // static host 404s the request instead of publishing a thin,\n // indexable \"0 apps\" page for it.\n return categories\n .filter(({ count }) => (count ?? 0) > 0)\n .map(({ id, name }) => ({\n params: { name: id },\n props: { displayName: name },\n }));\n}\n\nconst { displayName } = Astro.props;\nconst name = Astro.params.name;\nconst model = getTaxonomyPageModel('categories', name, displayName, siteConfig);\n---\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 site={siteConfig}\n>\n <TaxonomyList\n eyebrow=\"Category\"\n displayName={displayName}\n lede={`Browse ${itemLabelPlural()} in this directory in the ${displayName} category.`}\n records={model.records}\n />\n</BaseLayout>\n",
154
+ "type": "registry:page",
155
+ "target": "~/src/pages/categories/[name].astro"
156
+ },
157
+ {
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}`}\n />\n</BaseLayout>\n",
160
+ "type": "registry:page",
161
+ "target": "~/src/pages/stacks/index.astro"
162
+ },
163
+ {
164
+ "path": "default/pages/stacks/[name].astro",
165
+ "content": "---\nimport siteConfig from '@grove/generated/site-config.json';\nimport { getTaxonomyPageModel, itemLabelPlural } from '@grove-dev/astro/server';\nimport TaxonomyList from '../../components/grove/taxonomy-list.astro';\nimport BaseLayout from '../../layouts/base-layout.astro';\n\nexport function getStaticPaths() {\n const stacks = siteConfig.taxonomy?.stacks ?? [];\n // A stack no record currently uses gets no page at all — the\n // static host 404s the request instead of publishing a thin,\n // indexable \"0 apps\" page for it.\n return stacks\n .filter(({ count }) => (count ?? 0) > 0)\n .map(({ id, name }) => ({\n params: { name: id },\n props: { displayName: name },\n }));\n}\n\nconst { displayName } = Astro.props;\nconst name = Astro.params.name;\nconst model = getTaxonomyPageModel('stacks', name, displayName, siteConfig);\n---\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 site={siteConfig}\n>\n <TaxonomyList\n eyebrow=\"Stack\"\n displayName={displayName}\n lede={`Browse ${itemLabelPlural()} in this directory built with ${displayName}.`}\n records={model.records}\n />\n</BaseLayout>\n",
166
+ "type": "registry:page",
167
+ "target": "~/src/pages/stacks/[name].astro"
168
+ },
169
+ {
170
+ "path": "default/pages/licenses/[name].astro",
171
+ "content": "---\nimport siteConfig from '@grove/generated/site-config.json';\nimport { getTaxonomyPageModel, itemLabelPlural } from '@grove-dev/astro/server';\nimport TaxonomyList from '../../components/grove/taxonomy-list.astro';\nimport BaseLayout from '../../layouts/base-layout.astro';\n\nexport function getStaticPaths() {\n const licenses = siteConfig.taxonomy?.licenses ?? [];\n // A license no record currently uses gets no page at all — the\n // static host 404s the request instead of publishing a thin,\n // indexable \"0 apps\" page for it.\n return licenses\n .filter(({ count }) => (count ?? 0) > 0)\n .map(({ id, name }) => ({\n params: { name: id },\n props: { displayName: name },\n }));\n}\n\nconst { displayName } = Astro.props;\nconst name = Astro.params.name;\nconst model = getTaxonomyPageModel('licenses', name, displayName, siteConfig);\n---\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 site={siteConfig}\n>\n <TaxonomyList\n eyebrow=\"License\"\n displayName={displayName}\n lede={`Browse ${itemLabelPlural()} in this directory licensed under ${displayName}.`}\n records={model.records}\n />\n</BaseLayout>\n",
172
+ "type": "registry:page",
173
+ "target": "~/src/pages/licenses/[name].astro"
174
+ },
175
+ {
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()}`,\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
+ "type": "registry:component",
179
+ "target": "~/src/components/grove/taxonomy-list.astro"
180
+ },
181
+ {
182
+ "path": "default/components/grove/stack-grid.astro",
183
+ "content": "---\nimport { formatCount } from '@grove-dev/core';\nimport Icon from './icon.astro';\n\n/**\n * StackGrid — browse-by-stack grid for the home page.\n *\n * Renders a card per stack with name, blurb, status pill\n * (live/expanding/planned), and a count. The href is the list\n * page filtered to that stack, so consumers compose the URL via\n * the `hrefFor` prop.\n *\n * Generic: no blueprint-specific terms. A \"stack\" here is just a\n * slug + display name + status; consumers derive both from their\n * own data.\n */\n\ninterface StackEntry {\n name: string;\n slug: string;\n blurb?: string;\n status?: 'live' | 'expanding' | 'planned';\n count?: number;\n}\n\ninterface Props {\n stacks: StackEntry[];\n /** List page base. */\n pathPrefix?: string;\n /** Stack icon registry — maps slug → icon file name. Optional. */\n iconAliases?: Record<string, string>;\n /** Extra class. */\n class?: string;\n /** Hide the section eyebrow / header entirely. */\n bare?: boolean;\n itemLabelPlural?: string;\n /** Noun pair for count chips — singular fixes \"1 projects\". */\n itemNoun?: { singular: string; plural: string };\n /** Pass 1 when this grid IS the page (`/stacks` index). */\n level?: 1 | 2;\n /**\n * Card link builder. Defaults to the browse page filtered by stack\n * (`{pathPrefix}?stack=…`); pass e.g. `(slug) => \\`/stacks/${slug}\\``\n * to link to taxonomy detail routes instead.\n */\n hrefFor?: (slug: string) => string;\n}\n\nconst {\n stacks,\n pathPrefix = '/',\n iconAliases,\n class: className = '',\n bare = false,\n itemLabelPlural = 'items',\n itemNoun = { singular: 'item', plural: 'items' },\n level = 2,\n hrefFor,\n} = Astro.props;\n\nconst Heading = `h${level}` as 'h1' | 'h2';\n\nfunction buildHref(slug: string): string {\n if (hrefFor) return hrefFor(slug);\n const base = pathPrefix.replace(/\\/$/, '');\n return `${base}?stack=${encodeURIComponent(slug)}`;\n}\n\nfunction statusLabel(s: StackEntry['status']): string | null {\n switch (s) {\n case 'live':\n return 'Available now';\n case 'expanding':\n return 'Expanding';\n case 'planned':\n return 'Planned';\n default:\n return null;\n }\n}\n---\n\n<section\n id=\"stacks\"\n class:list={[\"py-12 sm:py-16 scroll-mt-20 border-b border-ink-200 dark:border-ink-800\", className]}\n aria-labelledby={bare ? undefined : \"grove-stackgrid-heading\"}\n>\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n {!bare && (\n <header class=\"mb-6\">\n <span class=\"text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">\n Stacks\n </span>\n <Heading\n id=\"grove-stackgrid-heading\"\n class=\"m-0 mt-1 text-[1.5rem] sm:text-[1.625rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100\"\n >\n Browse by stack\n </Heading>\n <p class=\"m-0 max-w-[60ch] text-[0.9375rem] text-ink-500 dark:text-ink-400\">\n Pick a stack to see real {itemLabelPlural} built with it.\n </p>\n </header>\n )}\n\n <div class=\"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3\">\n {stacks.map((s) => (\n <a\n href={buildHref(s.slug)}\n class=\"rounded-[calc(var(--radius)+0.25rem)] border border-border bg-card shadow-none transition-colors hover:border-ink-300 dark:hover:border-ink-700 group flex h-full items-center gap-3 p-3.5 no-underline\"\n data-event=\"stack_grid_click\"\n data-event-source=\"stack_grid\"\n >\n <div class=\"flex h-9 w-9 shrink-0 items-center justify-center rounded-md border border-ink-200 bg-white dark:border-ink-800 dark:bg-ink-950\" aria-hidden=\"true\">\n <Icon name={iconAliases?.[s.slug] ?? s.slug} category=\"stack\" size={18} />\n </div>\n\n <div class=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n <div class=\"flex items-center gap-2\">\n {/* Not a heading: these tiles are links in a grid, and\n heading-per-card breaks the outline when the grid\n sits directly under the page h1 (/stacks). */}\n <span class=\"m-0 text-[0.875rem] font-semibold tracking-tight text-ink-900 group-hover:underline dark:text-ink-100\">\n {s.name}\n </span>\n {typeof s.count === \"number\" && (\n <span class=\"inline-flex items-center rounded-md border border-ink-200 bg-ink-50 px-1.5 py-0.5 font-mono text-[10px] font-medium text-ink-600 dark:border-ink-800 dark:bg-ink-900/60 dark:text-ink-400\">\n {formatCount(s.count, itemNoun)}\n </span>\n )}\n </div>\n {s.blurb && <p class=\"m-0 truncate text-2xs text-ink-500 dark:text-ink-400\">{s.blurb}</p>}\n </div>\n {statusLabel(s.status) && (\n <span\n class:list={[\n \"shrink-0 inline-flex items-center rounded-md border px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wider\",\n s.status === \"live\"\n ? \"!bg-success/10 !text-success\"\n : s.status === \"expanding\"\n ? \"!bg-info/10 !text-info\"\n : \"!bg-warning/10 !text-warning\",\n ]}\n >\n {statusLabel(s.status)}\n </span>\n )}\n </a>\n ))}\n </div>\n </div>\n</section>\n",
184
+ "type": "registry:component",
185
+ "target": "~/src/components/grove/stack-grid.astro"
186
+ },
187
+ {
188
+ "path": "default/components/grove/category-grid.astro",
189
+ "content": "---\nimport { formatCount } from '@grove-dev/core';\n\n/**\n * CategoryGrid — browse-by-category grid for the home page.\n *\n * The lighter sibling of StackGrid. Renders a card per category with\n * name, blurb, and count. Generic: takes a list of plain\n * `{ name, slug, blurb, count }` entries.\n */\n\ninterface CategoryEntry {\n name: string;\n slug: string;\n blurb?: string;\n count?: number;\n}\n\ninterface Props {\n categories: CategoryEntry[];\n /** List page base. */\n pathPrefix?: string;\n /** Extra class. */\n class?: string;\n /** Hide the section header. */\n bare?: boolean;\n itemLabelPlural?: string;\n /** Noun pair for count chips — singular fixes \"1 projects\". */\n itemNoun?: { singular: string; plural: string };\n /** Pass 1 when this grid IS the page (`/categories` index). */\n level?: 1 | 2;\n /** Card link builder (defaults to browse filtered by category). */\n hrefFor?: (slug: string) => string;\n}\n\nconst {\n categories,\n pathPrefix = '/',\n class: className = '',\n bare = false,\n itemLabelPlural = 'items',\n itemNoun = { singular: 'item', plural: 'items' },\n level = 2,\n hrefFor,\n} = Astro.props;\n\nconst Heading: 'h1' | 'h2' = level === 1 ? 'h1' : 'h2';\n\nfunction buildHref(slug: string): string {\n if (hrefFor) return hrefFor(slug);\n const base = pathPrefix.replace(/\\/$/, '');\n return `${base}?category=${encodeURIComponent(slug)}`;\n}\n---\n\n<section\n id=\"categories\"\n class:list={[\"py-12 sm:py-16 scroll-mt-20 border-b border-ink-200 dark:border-ink-800\", className]}\n aria-labelledby={bare ? undefined : \"grove-categorygrid-heading\"}\n>\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n {!bare && (\n <header class=\"mb-6\">\n <span class=\"text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">\n Categories\n </span>\n <Heading\n id=\"grove-categorygrid-heading\"\n class=\"m-0 mt-1 text-[1.5rem] sm:text-[1.625rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100\"\n >\n Browse by category\n </Heading>\n <p class=\"m-0 max-w-[60ch] text-[0.9375rem] text-ink-500 dark:text-ink-400\">\n Find {itemLabelPlural} by what they do, not by which stack they use.\n </p>\n </header>\n )}\n\n <div class=\"overflow-hidden rounded-lg border border-ink-200 dark:border-ink-800\">\n <ul class=\"m-0 grid list-none grid-cols-1 divide-y divide-ink-200 p-0 sm:grid-cols-2 sm:divide-x sm:divide-y-0 lg:grid-cols-3 dark:divide-ink-800\">\n {categories.map((c) => (\n <li class=\"divide-x divide-ink-200 dark:divide-ink-800\">\n <a\n href={buildHref(c.slug)}\n class=\"group flex h-full items-start gap-3 p-4 no-underline transition-colors hover:bg-ink-50/60 dark:hover:bg-ink-900/40\"\n >\n <div class=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n <div class=\"flex items-center gap-2\">\n {/* Not a heading — see StackGrid: link tiles under a\n page h1 must not introduce h3 skips. */}\n <span class=\"m-0 text-[0.9375rem] font-semibold tracking-tight text-ink-900 group-hover:underline dark:text-ink-100\">\n {c.name}\n </span>\n {typeof c.count === \"number\" && (\n <span class=\"inline-flex items-center rounded-md border border-ink-200 bg-ink-50 px-1.5 py-0.5 font-mono text-[10px] font-medium text-ink-600 dark:border-ink-800 dark:bg-ink-900/60 dark:text-ink-400\">\n {formatCount(c.count, itemNoun)}\n </span>\n )}\n </div>\n {c.blurb && (\n <p class=\"m-0 text-2xs leading-relaxed text-ink-500 dark:text-ink-400\">\n {c.blurb}\n </p>\n )}\n </div>\n <svg viewBox=\"0 0 16 16\" width=\"12\" height=\"12\" aria-hidden=\"true\" class=\"mt-1 shrink-0 text-ink-300 transition-colors group-hover:text-ink-500 dark:text-ink-700 dark:group-hover:text-ink-400\" fill=\"currentColor\">\n <path d=\"M6.22 3.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L9.94 8 6.22 4.28a.75.75 0 0 1 0-1.06Z\" />\n </svg>\n </a>\n </li>\n ))}\n </ul>\n </div>\n </div>\n</section>\n",
190
+ "type": "registry:component",
191
+ "target": "~/src/components/grove/category-grid.astro"
192
+ },
193
+ {
194
+ "path": "default/pages/collections/index.astro",
195
+ "content": "---\nimport records from '@grove/generated/records.json';\nimport siteConfig from '@grove/generated/site-config.json';\nimport {\n getCollectionIndexModel,\n loadCollections,\n recordsToCollectionEntries,\n} from '@grove-dev/astro/server';\nimport CollectionIndex from '../../components/grove/collection-index.astro';\nimport BaseLayout from '../../layouts/base-layout.astro';\n\nconst collections = await loadCollections(process.cwd());\nconst entries = recordsToCollectionEntries(\n (records as { records: unknown[] }).records as never,\n siteConfig,\n);\nconst model = getCollectionIndexModel(collections, entries, siteConfig);\nconst countNoun = {\n singular: siteConfig.blueprintConfig?.labelSingular ?? 'item',\n plural: siteConfig.blueprintConfig?.labelPlural ?? 'items',\n};\nconst seo = model.seo;\n---\n<BaseLayout\n title={seo?.title ?? \"Collections\"}\n description={seo?.description ?? \"Curated and generated directories of related items.\"}\n image={seo?.image}\n jsonLd={seo?.jsonLd}\n site={siteConfig}\n>\n <CollectionIndex model={model} level={1} countNoun={countNoun} />\n</BaseLayout>\n",
196
+ "type": "registry:page",
197
+ "target": "~/src/pages/collections/index.astro"
198
+ },
199
+ {
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",
202
+ "type": "registry:page",
203
+ "target": "~/src/pages/collections/[slug].astro"
204
+ },
205
+ {
206
+ "path": "default/components/grove/collection-index.astro",
207
+ "content": "---\nimport type { CollectionIndexModel } from '@grove-dev/astro/server';\nimport Container from '../../layouts/container.astro';\nimport SectionHeader from '../../layouts/section-header.astro';\nimport EmptyState from '../ui/empty-state.astro';\n/**\n * CollectionIndex — renders a grid of every collection defined in\n * `data/collections/*.yml`. Each card links to the collection's\n * detail page and shows the entry count.\n *\n * Consumes a `CollectionIndexModel` produced by\n * `getCollectionIndexModel`. Pass `limit` (e.g. 3) for a teaser-style\n * subset; the framework also re-exports this component as\n * `CollectionTeaser` for the homepage use case.\n *\n * API parity with `RecordSection`:\n * - `id`, `eyebrow`, `title`, `description`\n * - `viewAllHref`, `viewAllLabel` — header CTA\n * - `emptyLabel` — copy when there are no collections\n * - `<slot name=\"header-actions\">` — custom buttons in header\n * - `class` — extra class on the outer <section>\n */\nimport CardGrid from './card-grid.astro';\nimport CollectionCard from './collection-card.astro';\n\ninterface Props {\n model: CollectionIndexModel;\n id?: string;\n eyebrow?: string;\n title?: string;\n description?: string;\n /** Header \"View all\" link. Hides when not provided. */\n viewAllHref?: string;\n viewAllLabel?: string;\n emptyLabel?: string;\n /** Cap the number of cards rendered. Omit for \"all\". */\n limit?: number;\n /**\n * Heading level for the section title. Pass 1 when this component\n * renders the page's title (the `/collections` index); the default\n * 2 fits embedded use (homepage teaser).\n */\n level?: 1 | 2;\n /** Noun pair for the per-card entry counts (blueprint labels). */\n countNoun?: { singular: string; plural: string };\n class?: string;\n}\n\nconst {\n model,\n id,\n eyebrow = 'Collections',\n title = 'Collections',\n description = 'Curated and generated directories of related items.',\n viewAllHref,\n viewAllLabel = 'View all',\n emptyLabel = 'No collections yet.',\n limit,\n level = 2,\n countNoun,\n class: className = '',\n} = Astro.props;\n\nconst cards = typeof limit === 'number' ? model.collections.slice(0, limit) : model.collections;\nconst headerActions = Astro.slots.has('header-actions');\n---\n\n<section id={id} class={`py-12 sm:py-16 ${className}`}>\n <Container>\n <div class=\"mb-6 flex flex-wrap items-end justify-between gap-3\">\n <SectionHeader eyebrow={eyebrow} title={title} description={description} level={level} />\n {(viewAllHref || headerActions) && (\n <div class=\"flex shrink-0 items-center gap-2 pb-2\">\n {viewAllHref && (\n <a\n href={viewAllHref}\n class=\"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 <slot name=\"header-actions\" />\n </div>\n )}\n </div>\n\n {cards.length === 0 ? (\n <EmptyState\n title={emptyLabel}\n description=\"Collections are defined in data/collections/*.yml — add a file there and it appears here on the next build.\"\n />\n ) : (\n <CardGrid>\n {cards.map((c) => (\n <li class=\"m-0 p-0\">\n <CollectionCard collection={c} countNoun={countNoun} />\n </li>\n ))}\n </CardGrid>\n )}\n </Container>\n</section>\n",
208
+ "type": "registry:component",
209
+ "target": "~/src/components/grove/collection-index.astro"
210
+ },
211
+ {
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`; the `<slot name=\"intro\">` is\n * the natural place for editorial intros (markdown rendered with\n * the consumer's content pipeline). `emptyLabel` matches\n * `RecordSection`'s API for empty-state copy.\n */\nimport { formatCount } 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 /** 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 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 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 {/* 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 ) : (\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 {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
+ "type": "registry:component",
215
+ "target": "~/src/components/grove/collection-page.astro"
216
+ },
217
+ {
218
+ "path": "default/components/grove/collection-card.astro",
219
+ "content": "---\n/**\n * CollectionCard — card for one collection (not a record): kind\n * eyebrow, title, description, entry count.\n *\n * Extracted from `CollectionIndex` so the collection tile shares the\n * `ProjectCard` visual language (border, radius, hover lift, tokens)\n * and stays in sync with the record cards as the design evolves.\n * Follows the `CardGrid` sizing contract (`h-full flex flex-col`).\n */\nimport { formatCount } from '@grove-dev/core';\n\ninterface Props {\n collection: {\n slug: string;\n url: string;\n kind: string;\n title: string;\n description?: string;\n count: number;\n };\n /** Analytics source emitted with `collection_card_click`. */\n eventSource?: string;\n /** Noun pair for the entry count (blueprint labels). */\n countNoun?: { singular: string; plural: string };\n class?: string;\n}\n\nconst {\n collection: c,\n eventSource = 'collection_index',\n countNoun = { singular: 'item', plural: 'items' },\n class: className = '',\n} = Astro.props;\n---\n\n<a\n href={c.url}\n data-event=\"collection_card_click\"\n data-event-source={eventSource}\n data-event-item={c.slug}\n class={`group relative flex h-full min-w-0 flex-col gap-2 rounded-xl border border-ink-200 bg-card p-5 no-underline outline-none transition-[border-color,background-color,transform] duration-150 hover:-translate-y-0.5 hover:border-ink-300 hover:bg-ink-50 focus-visible:border-ink-500 focus-visible:ring-2 focus-visible:ring-ink-900/15 dark:border-ink-800 dark:hover:border-ink-700 dark:hover:bg-ink-900 dark:focus-visible:border-ink-500 dark:focus-visible:ring-ink-100/15 ${className}`}\n>\n <span class=\"text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">\n {c.kind === \"curated\" ? \"Curated\" : \"Generated\"}\n </span>\n <span class=\"text-[1.0625rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100\">\n {c.title}\n </span>\n <span class=\"line-clamp-2 text-[0.875rem] text-ink-500 dark:text-ink-400\">\n {c.description}\n </span>\n <span class=\"mt-auto pt-2 text-2xs font-medium text-ink-500 transition-colors group-hover:text-ink-900 dark:text-ink-400 dark:group-hover:text-ink-100\">\n {formatCount(c.count, countNoun)} →\n </span>\n</a>\n",
220
+ "type": "registry:component",
221
+ "target": "~/src/components/grove/collection-card.astro"
222
+ },
223
+ {
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}` 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
+ "type": "registry:component",
227
+ "target": "~/src/components/grove/collection-row.astro"
228
+ },
229
+ {
230
+ "path": "default/components/grove/collection-teaser.astro",
231
+ "content": "---\nimport type { CollectionIndexModel } from '@grove-dev/astro/server';\n/**\n * CollectionTeaser — homepage-friendly subset of `CollectionIndex`.\n *\n * Thin wrapper that defaults `limit` to 3 and sets homepage-friendly\n * \"View all collections\" link + copy. For custom card counts or\n * different copy, use `CollectionIndex` directly with explicit\n * `limit` and `viewAllHref` props.\n */\nimport CollectionIndex from './collection-index.astro';\n\ninterface Props {\n model: CollectionIndexModel;\n title?: string;\n description?: string;\n viewAllHref?: string;\n viewAllLabel?: string;\n /** Cap the number of cards rendered. Default: 3. */\n limit?: number;\n /** Noun pair for the per-card entry counts (blueprint labels). */\n countNoun?: { singular: string; plural: string };\n class?: string;\n}\n\nconst {\n model,\n title = 'Featured collections',\n description = 'Hand-picked and auto-generated groupings of related items.',\n viewAllHref = '/collections/',\n viewAllLabel = 'View all collections',\n limit = 3,\n countNoun,\n class: className,\n} = Astro.props;\n---\n\n<CollectionIndex\n model={model}\n title={title}\n description={description}\n viewAllHref={viewAllHref}\n viewAllLabel={viewAllLabel}\n limit={limit}\n countNoun={countNoun}\n class={className}\n/>\n",
232
+ "type": "registry:component",
233
+ "target": "~/src/components/grove/collection-teaser.astro"
234
+ },
235
+ {
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}`, 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
+ "type": "registry:page",
239
+ "target": "~/src/pages/index.astro"
240
+ },
241
+ {
242
+ "path": "default/components/grove/hero.astro",
243
+ "content": "---\nimport { compact } from '@grove-dev/core';\n/**\n * Hero — the home page banner.\n *\n * Mirrors the openapps layout: trust-stats row across the top,\n * big two-line headline with a gradient accent on the second\n * line, descriptive paragraph, search form with a Filters\n * shortcut, quick-filter chips, and up to 3 CTAs.\n *\n * Generic: every value comes through props (or `siteConfig` for\n * the trust stats). The label next to the count is blueprint-\n * driven via `itemsLabel` — so a project-directory renders\n * \"apps indexed\", a resource-hub renders \"resources indexed\",\n * an ecosystem-map renders \"entities indexed\".\n */\nimport Container from '../../layouts/container.astro';\n\ninterface CTA {\n label: string;\n href: string;\n variant?: 'primary' | 'outline' | 'ghost';\n external?: boolean;\n}\n\ninterface Props {\n /** Site/brand name. */\n name: string;\n /** Short tagline — usually pulled from siteConfig.tagline. */\n tagline: string;\n /** Longer descriptive paragraph. */\n description?: string;\n /** Trust stats: items count, categories, stacks, owners, stars. */\n stats?: {\n totalApps?: number;\n totalCategories?: number;\n totalStacks?: number;\n totalOwners?: number;\n totalStars?: number;\n };\n /** Search form target — the list page. */\n searchHref?: string;\n /** Search input placeholder. */\n searchPlaceholder?: string;\n /**\n * Plural noun for the primary count (e.g. \"apps\", \"resources\",\n * \"entities\"). Used in the trust-stats label and CTA copy.\n */\n itemsLabel?: string;\n /** Quick filter chips under the search bar. */\n quickFilters?: Array<{ label: string; href: string }>;\n /** CTAs rendered below the form. */\n ctas?: CTA[];\n /** Extra class. */\n class?: string;\n /** Eyebrow text rendered above the title. */\n eyebrow?: string;\n /** Optional badge content rendered next to the eyebrow. */\n eyebrowBadge?: string;\n}\n\nconst {\n name,\n tagline,\n description,\n stats = {},\n searchHref = '/',\n searchPlaceholder = 'Search the directory...',\n itemsLabel = 'items',\n quickFilters = [],\n ctas = [],\n class: className = '',\n eyebrow = 'A directory of curated knowledge',\n eyebrowBadge,\n} = Astro.props;\n\n// One compact stats line: \"6 projects indexed · 5 categories · 3 stacks\".\n// Every entry is guarded so a fresh directory never renders a zero-value.\nconst statParts: string[] = [\n ...(stats.totalApps !== undefined && stats.totalApps > 0\n ? [`${compact(stats.totalApps)} ${itemsLabel} indexed`]\n : []),\n ...(stats.totalCategories !== undefined && stats.totalCategories > 0\n ? [`${stats.totalCategories} categories`]\n : []),\n ...(stats.totalStacks !== undefined && stats.totalStacks > 0\n ? [`${stats.totalStacks} stacks`]\n : []),\n ...(stats.totalOwners !== undefined && stats.totalOwners > 0\n ? [`${compact(stats.totalOwners)} owners`]\n : []),\n ...(stats.totalStars !== undefined && stats.totalStars > 0\n ? [`${compact(stats.totalStars)} stars`]\n : []),\n];\n\n// One primary CTA only — Submit already lives in the navbar\n// (BaseLayout → Header submitHref), so the hero never duplicates it.\nconst primaryCta: CTA | undefined = ctas.find((c) => c.variant === 'primary') ??\n ctas[0] ?? { label: `Browse ${itemsLabel}`, href: searchHref, variant: 'primary' };\n---\n\n<section\n class:list={[\n \"relative overflow-hidden border-b border-ink-200 dark:border-ink-800\",\n className,\n ]}\n>\n {/* Dark mode only: a barely-there radial lift behind the headline. */}\n <div\n aria-hidden=\"true\"\n class=\"pointer-events-none absolute inset-0 hidden dark:block\"\n style=\"background: radial-gradient(60% 55% at 50% 0%, color-mix(in oklab, var(--grove-foreground) 5%, transparent) 0%, transparent 70%);\"\n ></div>\n\n <Container>\n <div class=\"relative mx-auto flex max-w-[900px] flex-col items-center py-[88px] text-center lg:py-[104px]\">\n {/* Eyebrow. The `eyebrow` slot replaces the whole line — dot\n included — so a consumer can put richer content here (a\n `PoweredBy` link, a release badge) without forking the Hero. */}\n <span class=\"inline-flex animate-fade-in items-center gap-2 text-[13px] font-medium text-ink-500 dark:text-ink-400\">\n <slot name=\"eyebrow\">\n <span aria-hidden=\"true\" class=\"inline-block h-1.5 w-1.5 animate-pulse rounded-full bg-success\"></span>\n {eyebrow}\n {eyebrowBadge && (\n <span\n class=\"inline-flex items-center rounded-full border border-warning/30 bg-warning/10 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wider text-warning\"\n aria-label={eyebrowBadge}\n >\n {eyebrowBadge}\n </span>\n )}\n </slot>\n </span>\n\n {/* Headline */}\n <h1\n class=\"m-0 mt-5 max-w-[820px] animate-fade-in-up text-balance text-[clamp(44px,5vw,64px)] font-[650] leading-[1.08] tracking-[-0.035em] text-ink-900 dark:text-ink-100\"\n style=\"animation-delay: 0.05s;\"\n >\n <span class=\"block\">{name}</span>\n <span class=\"block\">{tagline}</span>\n </h1>\n\n {description && (\n <p\n class=\"m-0 mt-5 max-w-[640px] animate-fade-in-up text-[16px] leading-[1.6] text-ink-500 dark:text-ink-400\"\n style=\"animation-delay: 0.1s;\"\n >\n {description}\n </p>\n )}\n\n {/* Search — primary interaction. The FORM is the visual control:\n it owns the border, radius, and the single focus treatment\n (focus-within border + soft ring). The inner input opts out\n of the global input styling (`grove-input-unstyled`) so it\n stays a transparent, chrome-free text slot — no second box\n or ring appearing inside the pill on focus. */}\n <form\n class=\"mt-8 flex h-[58px] w-full max-w-[840px] animate-fade-in-up items-center gap-3 rounded-xl border border-ink-200 bg-background p-1.5 pl-4 transition-[border-color,box-shadow] focus-within:border-ink-400 focus-within:ring-3 focus-within:ring-ring/15 dark:border-ink-800 dark:focus-within:border-ink-600\"\n style=\"animation-delay: 0.15s;\"\n role=\"search\"\n action={searchHref}\n method=\"get\"\n >\n <label class=\"flex min-w-0 flex-1 items-center gap-3\">\n <span class=\"sr-only\">Search {itemsLabel}, stacks, and categories</span>\n <svg viewBox=\"0 0 16 16\" width=\"20\" height=\"20\" aria-hidden=\"true\" class=\"shrink-0 text-ink-400 dark:text-ink-500\" fill=\"currentColor\">\n <path d=\"M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z\"></path>\n </svg>\n <input\n type=\"search\"\n name=\"q\"\n placeholder={searchPlaceholder}\n class=\"grove-input-unstyled h-full w-full min-w-0 rounded-none border-0 bg-transparent px-0 text-[16px] text-ink-900 outline-none placeholder:text-ink-400 dark:text-ink-100 dark:placeholder:text-ink-500\"\n />\n </label>\n <button\n type=\"submit\"\n class=\"inline-flex h-[46px] shrink-0 cursor-pointer items-center justify-center rounded-lg border border-transparent bg-primary px-5 text-[15px] font-medium leading-none text-primary-foreground outline-none transition-colors hover:bg-primary/90 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35\"\n >\n Search\n </button>\n </form>\n\n {quickFilters.length > 0 && (\n <p class=\"m-0 mt-4 text-[13px] text-ink-500 dark:text-ink-400\">\n Try{\" \"}\n {quickFilters.map((f, i) => (\n <>\n <a href={f.href} class=\"font-mono text-ink-700 underline-offset-2 hover:underline dark:text-ink-300\">{f.label}</a>\n {i < quickFilters.length - 1 && <span aria-hidden=\"true\" class=\"mx-1\">·</span>}\n </>\n ))}\n </p>\n )}\n\n {/* Inline stats — single compact line, middle-dot separators */}\n {statParts.length > 0 && (\n <p class=\"m-0 mt-5 text-[13px] text-ink-500 dark:text-ink-400\">\n {statParts.map((part, i) => (\n <>\n {i > 0 && <span aria-hidden=\"true\" class=\"mx-2 opacity-60\">·</span>}\n <span>{part}</span>\n </>\n ))}\n </p>\n )}\n\n {/* Primary CTA only */}\n {primaryCta && (\n <div class=\"mt-8\">\n <a\n href={primaryCta.href}\n class=\"inline-flex h-11 cursor-pointer items-center justify-center gap-2 rounded-[var(--radius)] border border-transparent bg-primary px-5 text-[15px] font-medium leading-none text-primary-foreground outline-none transition-colors hover:bg-primary/90 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35\"\n {...(primaryCta.external ? { target: \"_blank\", rel: \"noopener noreferrer\" } : {})}\n data-event=\"hero_cta_click\"\n data-event-source=\"hero\"\n >\n {primaryCta.label}\n <svg viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M5 12h14\"></path>\n <path d=\"m12 5 7 7-7 7\"></path>\n </svg>\n </a>\n </div>\n )}\n </div>\n </Container>\n</section>\n",
244
+ "type": "registry:component",
245
+ "target": "~/src/components/grove/hero.astro"
246
+ },
247
+ {
248
+ "path": "default/components/grove/why-this-exists.astro",
249
+ "content": "---\n/**\n * WhyThisExists — the \"what is this site for?\" section.\n *\n * Renders 3 short, opinionated points (icon + title + body). The\n * icon set is small and generic: \"item\" (window/grid glyph),\n * \"code\" (angle brackets), \"search\" (magnifier). Defaults to\n * the canonical \"directory, source, search\" trio.\n *\n * Generic: every point comes through props. No blueprint-specific\n * copy. Consumers can pass `points` to swap the order or copy.\n */\n\ninterface WhyPoint {\n title: string;\n body: string;\n icon: 'item' | 'code' | 'search';\n}\n\ninterface Props {\n points?: WhyPoint[];\n eyebrow?: string;\n title?: string;\n description?: string;\n class?: string;\n}\n\nconst {\n points,\n eyebrow = 'Why this exists',\n title = 'Most directory discovery is fragmented.',\n description = 'Lists are useful, but they often become long, static pages without enough context to compare what is real, maintained, and worth exploring.',\n class: className = '',\n} = Astro.props;\n\nconst defaultPoints: WhyPoint[] = [\n {\n icon: 'item',\n title: 'Real projects',\n body: 'Not SDKs, templates, or tiny demos. Focused on complete projects you can actually run.',\n },\n {\n icon: 'code',\n title: 'Codebase context',\n body: 'Stack, platform, license, activity, maturity, and contribution signals in one place.',\n },\n {\n icon: 'search',\n title: 'Searchable discovery',\n body: 'Browse by category, stack, platform, stars, recency, and status instead of scanning a flat list.',\n },\n];\n\nconst items = points && points.length > 0 ? points : defaultPoints;\n---\n\n<section\n id=\"about\"\n class:list={[\"py-12 sm:py-16 scroll-mt-20 border-b border-ink-200 dark:border-ink-800\", className]}\n aria-labelledby=\"grove-why-heading\"\n>\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n <header class=\"flex flex-col gap-2\">\n <span class=\"text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">\n {eyebrow}\n </span>\n <h2\n id=\"grove-why-heading\"\n class=\"m-0 max-w-[40ch] text-[1.5rem] sm:text-[1.75rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100\"\n >\n {title}\n </h2>\n {description && (\n <p class=\"m-0 max-w-[64ch] text-[0.9375rem] leading-relaxed text-ink-500 dark:text-ink-400\">\n {description}\n </p>\n )}\n </header>\n\n <ul\n class=\"m-0 mt-7 grid list-none grid-cols-1 gap-3 p-0 sm:grid-cols-3\"\n aria-label=\"Why this directory\"\n >\n {items.map((p) => (\n <li class=\"rounded-[calc(var(--radius)+0.25rem)] border border-border bg-card shadow-none transition-colors p-4\">\n <div\n aria-hidden=\"true\"\n class=\"mb-3 flex h-8 w-8 items-center justify-center rounded-md border border-ink-200 bg-white text-ink-700 dark:border-ink-800 dark:bg-ink-950 dark:text-ink-300\"\n >\n {p.icon === \"item\" && (\n <svg viewBox=\"0 0 16 16\" width=\"16\" height=\"16\" fill=\"currentColor\">\n <path d=\"M1.75 3.5a.25.25 0 0 1 .25-.25h12a.25.25 0 0 1 .25.25v8a.25.25 0 0 1-.25.25h-12a.25.25 0 0 1-.25-.25v-8ZM2 4.75v6h12v-6H2ZM2.5 6.5h4v2.5h-4V6.5Z\"></path>\n </svg>\n )}\n {p.icon === \"code\" && (\n <svg viewBox=\"0 0 16 16\" width=\"16\" height=\"16\" fill=\"currentColor\">\n <path d=\"M4.72 3.22a.75.75 0 0 1 1.06 1.06L2.06 8l3.72 3.72a.75.75 0 1 1-1.06 1.06L.47 8.53a.75.75 0 0 1 0-1.06l4.25-4.25Zm6.56 0a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L13.94 8l-3.72-3.72a.75.75 0 0 1 0-1.06Z\"></path>\n </svg>\n )}\n {p.icon === \"search\" && (\n <svg viewBox=\"0 0 16 16\" width=\"16\" height=\"16\" fill=\"currentColor\">\n <path d=\"M10.68 11.74a6 6 0 1 1 1.06-1.06l3.04 3.04a.75.75 0 1 1-1.06 1.06l-3.04-3.04ZM11.5 7a4.5 4.5 0 1 0-9 0 4.5 4.5 0 0 0 9 0Z\"></path>\n </svg>\n )}\n </div>\n <h3 class=\"m-0 text-[0.9375rem] font-semibold text-ink-900 dark:text-ink-100\">\n {p.title}\n </h3>\n <p class=\"m-0 mt-1.5 text-[0.8125rem] leading-relaxed text-ink-500 dark:text-ink-400\">\n {p.body}\n </p>\n </li>\n ))}\n </ul>\n </div>\n</section>\n",
250
+ "type": "registry:component",
251
+ "target": "~/src/components/grove/why-this-exists.astro"
252
+ },
253
+ {
254
+ "path": "default/components/grove/pipeline-strip.astro",
255
+ "content": "---\n/**\n * PipelineStrip — the file-first publishing story.\n *\n * Three beats: a record YAML (source of truth) → the Grove build →\n * the published outputs (this site, README, llms.txt, sitemap),\n * plus the sync loop (edits arrive as pull requests, automation\n * keeps every output current). The sample record shown is\n * illustrative markup, not live data — pass `samplePath` (a real\n * repo-relative path to one of your own records) to turn the \"Read\n * this file on GitHub\" link on; without it, the link is omitted.\n */\n\ninterface Props {\n /** Repository URL for the \"read the source\" link. */\n repoUrl?: string;\n /** Repo-relative path to a real sample record. No default — a\n * fresh scaffold has no records yet, so the link is omitted\n * unless you supply one. */\n samplePath?: string;\n class?: string;\n}\n\nconst { repoUrl, samplePath, class: className = '' } = Astro.props;\n\nconst sampleHref = repoUrl ? `${repoUrl.replace(/\\/$/, '')}/blob/main/${samplePath}` : undefined;\n\nconst outputs = [\n { label: 'This website', detail: 'browse, search, filters' },\n { label: 'README', detail: 'awesome-list generated' },\n { label: 'llms.txt', detail: 'machine-readable index' },\n { label: 'Sitemap + SEO', detail: 'structured data' },\n];\n---\n\n<section\n id=\"pipeline\"\n class:list={[\"scroll-mt-20 border-b border-border py-12 sm:py-16\", className]}\n aria-labelledby=\"pipeline-heading\"\n>\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n <header class=\"flex flex-col gap-2\">\n <span class=\"text-2xs font-medium uppercase tracking-wider text-muted-foreground\">\n How this site works\n </span>\n <h2\n id=\"pipeline-heading\"\n class=\"m-0 max-w-[40ch] text-[1.5rem] font-semibold tracking-tight text-foreground sm:text-[1.75rem]\"\n >\n Every listing is a plain YAML file.\n </h2>\n <p class=\"m-0 max-w-[64ch] text-[0.9375rem] leading-relaxed text-muted-foreground\">\n The content you're browsing lives as files in a repository. Grove builds them\n into this site and its machine-readable outputs — and keeps everything in sync\n when a file changes.\n </p>\n </header>\n\n <div class=\"mt-7 grid grid-cols-1 gap-3 md:grid-cols-3\">\n {/* Beat 1 — the source file */}\n <div class=\"flex flex-col rounded-[calc(var(--radius)+0.25rem)] border border-border bg-surface-raised p-4\">\n <p class=\"m-0 text-2xs font-medium uppercase tracking-wider text-muted-foreground\">\n 1 · Source file\n </p>\n <pre\n class=\"mt-3 flex-1 overflow-x-auto rounded-md bg-surface-sunken p-3 font-mono text-[0.75rem] leading-relaxed text-foreground\"\n ><code>name: Open WebUI\nslug: open-webui\ncategory: interfaces\nstacks: [typescript, python]\ntags: [chat, self-host, llm]\nlicenses: [mit]</code></pre>\n {sampleHref && (\n <a\n href={sampleHref}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"mt-3 text-2xs font-medium text-muted-foreground underline decoration-border underline-offset-2 hover:text-foreground\"\n >\n Read this file on GitHub →\n </a>\n )}\n </div>\n\n {/* Beat 2 — the build */}\n <div class=\"flex flex-col rounded-[calc(var(--radius)+0.25rem)] border border-border bg-surface-raised p-4\">\n <p class=\"m-0 text-2xs font-medium uppercase tracking-wider text-muted-foreground\">\n 2 · Grove build\n </p>\n <ul class=\"m-0 mt-3 flex flex-1 list-none flex-col gap-2 p-0 text-[0.8125rem] leading-relaxed text-muted-foreground\">\n <li>Validates every record against the schema</li>\n <li>Joins taxonomy labels, health, and GitHub metadata</li>\n <li>Generates one index consumed by every output</li>\n </ul>\n <p class=\"m-0 mt-3 font-mono text-2xs text-muted-foreground\">grove check && astro build</p>\n </div>\n\n {/* Beat 3 — the outputs */}\n <div class=\"flex flex-col rounded-[calc(var(--radius)+0.25rem)] border border-border bg-surface-raised p-4\">\n <p class=\"m-0 text-2xs font-medium uppercase tracking-wider text-muted-foreground\">\n 3 · Published outputs\n </p>\n <ul class=\"m-0 mt-3 flex flex-1 list-none flex-col gap-2 p-0\">\n {outputs.map((output) => (\n <li class=\"flex items-baseline justify-between gap-3 text-[0.8125rem]\">\n <span class=\"font-medium text-foreground\">{output.label}</span>\n <span class=\"text-right text-2xs text-muted-foreground\">{output.detail}</span>\n </li>\n ))}\n </ul>\n </div>\n </div>\n\n <p class=\"m-0 mt-4 text-[0.8125rem] leading-relaxed text-muted-foreground\">\n The loop: edits arrive as pull requests to the files, weekly automation refreshes\n GitHub metadata, and every output above is regenerated from the same source —\n nothing is entered twice, nothing goes stale.\n </p>\n </div>\n</section>\n",
256
+ "type": "registry:component",
257
+ "target": "~/src/components/grove/pipeline-strip.astro"
258
+ },
259
+ {
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}`;\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
+ "type": "registry:component",
263
+ "target": "~/src/components/grove/record-section.astro"
264
+ },
265
+ {
266
+ "path": "default/components/grove/contributors-grid.astro",
267
+ "content": "---\n/**\n * ContributorsGrid — avatar grid for the home page.\n *\n * Renders a dense grid of contributor avatars with optional name and\n * contribution count. Each tile links to the contributor's profile.\n * No blueprint-specific terms — works for any \"people\" feed.\n *\n * Empty tiles are skipped. When the list is empty the entire section\n * hides its body but keeps the header (so a \"no contributors yet\"\n * state can be wired by a consumer via a slot).\n */\n\nimport { compact } from '@grove-dev/core';\nimport EmptyState from '../ui/empty-state.astro';\n\ninterface Contributor {\n username: string;\n name?: string;\n avatarUrl?: string;\n profileUrl?: string;\n contributions?: number;\n}\n\ninterface Props {\n contributors: Contributor[];\n /** Total count to display in the header (e.g. \"1,234 contributors\"). */\n total?: number;\n /** Optional view-all href rendered top-right. */\n viewAllHref?: string;\n viewAllLabel?: string;\n title?: string;\n description?: string;\n /** Render per-user contribution counts (config: contributors.showContributionCount). */\n showContributionCount?: boolean;\n class?: string;\n}\n\nconst {\n contributors,\n total,\n viewAllHref,\n viewAllLabel = 'View all',\n title = 'Built by the community',\n description = 'The people improving this directory through code, curation, and review.',\n showContributionCount = true,\n class: className = '',\n} = Astro.props;\n\nconst visible = contributors.filter((c) => c.username).slice(0, 100);\n---\n\n<section\n class:list={[\"py-12 sm:py-16\", className]}\n aria-labelledby=\"grove-contributors-heading\"\n>\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n <header class=\"mb-6 flex flex-wrap items-end justify-between gap-3\">\n <div>\n <h2\n id=\"grove-contributors-heading\"\n class=\"m-0 text-[1.5rem] sm:text-[1.625rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100\"\n >\n {title}\n {typeof total === \"number\" && (\n <span class=\"ml-2 font-mono text-[0.9375rem] font-normal text-ink-500 dark:text-ink-400\">\n ({compact(total)})\n </span>\n )}\n </h2>\n {description && (\n <p class=\"m-0 mt-1 max-w-[60ch] text-[0.9375rem] text-ink-500 dark:text-ink-400\">\n {description}\n </p>\n )}\n </div>\n {viewAllHref && (\n <a\n href={viewAllHref}\n class=\"text-sm font-medium text-ink-500 hover:text-ink-900 dark:text-ink-400 dark:hover:text-ink-100\"\n >\n {viewAllLabel} →\n </a>\n )}\n </header>\n\n {visible.length === 0 ? (\n <EmptyState title=\"Community profiles appear after the first repository metadata sync.\" />\n ) : (\n <ul\n class=\"m-0 grid list-none grid-cols-[repeat(auto-fill,minmax(72px,1fr))] gap-x-3 gap-y-5 p-0\"\n aria-label=\"Contributors\"\n >\n {visible.map((c) => {\n const href = c.profileUrl ?? `https://github.com/${c.username}`;\n const avatar =\n c.avatarUrl ??\n `https://avatars.githubusercontent.com/${c.username}?v=4&s=80`;\n return (\n <li class=\"m-0 p-0\">\n <a\n href={href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"group flex flex-col items-center gap-1.5 p-2 text-center no-underline\"\n data-event=\"contributor_click\"\n data-event-source=\"contributors_grid\"\n >\n <img\n src={avatar}\n alt={c.name ?? c.username}\n width=\"48\"\n height=\"48\"\n loading=\"lazy\"\n decoding=\"async\"\n class=\"h-12 w-12 rounded-full border border-ink-200 object-cover dark:border-ink-800\"\n />\n <span class=\"line-clamp-1 text-2xs font-medium text-ink-700 group-hover:text-ink-900 dark:text-ink-300 dark:group-hover:text-ink-100\">\n {c.name ?? c.username}\n </span>\n {showContributionCount && typeof c.contributions === \"number\" && (\n <span class=\"font-mono text-2xs text-ink-400\">\n {compact(c.contributions)}\n </span>\n )}\n </a>\n </li>\n );\n })}\n </ul>\n )}\n </div>\n</section>\n",
268
+ "type": "registry:component",
269
+ "target": "~/src/components/grove/contributors-grid.astro"
270
+ },
271
+ {
272
+ "path": "default/components/grove/original-collection.astro",
273
+ "content": "---\nimport { compact } from '@grove-dev/core';\n/**\n * OriginalCollection — legacy lineage card.\n *\n * Renders a single wide card that links out to the project's origin\n * repository, with stars/forks/contributors stats. Used on home and\n * about pages to give visitors a way to find the original curated\n * collection this directory descends from.\n *\n * Generic: takes plain `stats` and a `repoUrl`. No blueprint or\n * site-specific copy.\n */\nimport { buttonClass } from '../../lib/classnames.ts';\n\ninterface OriginStats {\n stars?: number;\n forks?: number;\n contributors?: number;\n description?: string;\n}\n\ninterface Props {\n repoUrl: string;\n repoLabel?: string;\n stats?: OriginStats;\n title?: string;\n description?: string;\n class?: string;\n}\n\nconst {\n repoUrl,\n repoLabel = 'View on GitHub',\n stats = {},\n title = 'A growing list, forked from the original',\n description = 'This directory descends from an earlier curated collection. The original still lives on — same shape, same spirit, fresh data.',\n class: className = '',\n} = Astro.props;\n\nconst hasStats =\n stats.stars !== undefined || stats.forks !== undefined || stats.contributors !== undefined;\n---\n\n<section class:list={[\"py-12 sm:py-16\", className]}>\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n <div\n class=\"rounded-[calc(var(--radius)+0.25rem)] border border-border bg-card shadow-none transition-colors flex flex-col gap-4 p-6 sm:flex-row sm:items-center sm:justify-between\"\n >\n <div class=\"flex flex-col gap-2\">\n <span class=\"text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">\n Origin\n </span>\n <h2 class=\"m-0 text-[1.25rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100\">\n {title}\n </h2>\n <p class=\"m-0 max-w-2xl text-[0.875rem] text-ink-500 dark:text-ink-400\">\n {description}\n </p>\n {stats.description && (\n <p class=\"m-0 max-w-2xl text-[0.8125rem] text-ink-500 dark:text-ink-400\">\n {stats.description}\n </p>\n )}\n {hasStats && (\n <dl\n class=\"mt-2 flex flex-wrap items-center gap-x-4 gap-y-1 text-2xs text-ink-500 dark:text-ink-400\"\n aria-label=\"Original repository signals\"\n >\n {stats.stars !== undefined && (\n <div class=\"flex items-center gap-1\">\n <dd class=\"m-0 font-mono\">{compact(stats.stars)}</dd>\n <dt>stars</dt>\n </div>\n )}\n {stats.forks !== undefined && (\n <div class=\"flex items-center gap-1\">\n <dd class=\"m-0 font-mono\">{compact(stats.forks)}</dd>\n <dt>forks</dt>\n </div>\n )}\n {stats.contributors !== undefined && (\n <div class=\"flex items-center gap-1\">\n <dd class=\"m-0 font-mono\">\n {compact(stats.contributors)}\n </dd>\n <dt>contributors</dt>\n </div>\n )}\n </dl>\n )}\n </div>\n <div class=\"flex flex-shrink-0 items-center gap-2\">\n <a\n href={repoUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class={buttonClass(\"primary\", \"sm\")}\n data-event=\"original_collection_click\"\n data-event-source=\"original_collection\"\n >\n {repoLabel} →\n </a>\n </div>\n </div>\n </div>\n</section>\n",
274
+ "type": "registry:component",
275
+ "target": "~/src/components/grove/original-collection.astro"
276
+ },
277
+ {
278
+ "path": "default/components/grove/final-cta.astro",
279
+ "content": "---\nimport { buttonClass } from '../../lib/classnames.ts';\n\ninterface Props {\n itemLabel?: string;\n itemsLabel?: string;\n browseHref?: string;\n submitHref?: string;\n class?: string;\n}\n\nconst {\n itemLabel = 'item',\n itemsLabel = 'items',\n browseHref = '/items',\n submitHref = '/submit',\n class: className = '',\n} = Astro.props;\n---\n\n<section class:list={[\"border-t border-ink-200 py-10 sm:py-12 dark:border-ink-800\", className]} aria-labelledby=\"grove-final-cta-heading\">\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n <div class=\"rounded-[calc(var(--radius)+0.25rem)] border border-border bg-card px-6 py-7 sm:flex sm:items-center sm:justify-between sm:gap-10 sm:px-8 sm:py-8 dark:border-ink-800\">\n <div class=\"max-w-2xl\">\n <p class=\"m-0 text-2xs font-semibold uppercase tracking-wider text-ink-500 dark:text-ink-400\">Keep the directory useful</p>\n <h2 id=\"grove-final-cta-heading\" class=\"m-0 mt-1.5 text-[1.5rem] font-semibold tracking-tight text-ink-900 sm:text-[1.75rem] dark:text-ink-100\">\n Know {itemLabel === \"app\" ? \"an\" : \"a\"} {itemLabel} that belongs here?\n </h2>\n <p class=\"m-0 mt-2 max-w-xl text-sm leading-relaxed text-ink-500 dark:text-ink-400\">\n Add a real, inspectable project or improve the metadata behind an existing listing.\n </p>\n </div>\n <div class=\"mt-5 flex shrink-0 flex-wrap items-center gap-2 sm:mt-0 sm:justify-end\">\n <a href={submitHref} class={buttonClass(\"primary\", \"md\", \"px-4\")}>\n Submit {itemLabel}\n </a>\n <a href={browseHref} class={buttonClass(\"outline\", \"md\", \"px-4\")}>\n Explore {itemsLabel}\n </a>\n </div>\n </div>\n </div>\n</section>\n",
280
+ "type": "registry:component",
281
+ "target": "~/src/components/grove/final-cta.astro"
282
+ },
283
+ {
284
+ "path": "default/pages/[slug]/index.astro",
285
+ "content": "---\n/**\n * List page — page 1 of the discovery / browse page.\n *\n * The body lives in `DirectoryBrowse` because two routes render it:\n * this one and `/{slug}/page/{n}/`. The URL slug (e.g. `/projects/`,\n * `/resources/`, `/entities/`) is derived from the blueprint, so the\n * same page works for every blueprint without per-blueprint forks.\n */\nimport siteConfig from '@grove/generated/site-config.json';\nimport DirectoryBrowse from '../../components/grove/directory-browse.astro';\n\nexport function getStaticPaths() {\n const routeSlug = siteConfig.blueprintConfig?.routeSlug ?? 'projects';\n return [{ params: { slug: routeSlug } }];\n}\n---\n\n<DirectoryBrowse routePage={1} />\n",
286
+ "type": "registry:page",
287
+ "target": "~/src/pages/[slug]/index.astro"
288
+ },
289
+ {
290
+ "path": "default/pages/[slug]/page/[page].astro",
291
+ "content": "---\n/**\n * Browse pages 2..n — `/{slug}/page/2/`, `/{slug}/page/3/`, …\n *\n * Real prerendered paths rather than a `?page=` query, so every record\n * in a large directory is reachable by a crawler and by a visitor with\n * no JavaScript. The `/page/` segment keeps these clear of\n * `/{slug}/{recordSlug}`, which would otherwise claim `/projects/2/`\n * for a record slugged \"2\".\n *\n * Page 1 is the bare `/{slug}/` route — it is not duplicated here, so\n * there is one canonical URL for the first page.\n */\nimport siteConfig from '@grove/generated/site-config.json';\nimport { getDirectoryIndexModel } from '@grove-dev/astro/server';\nimport DirectoryBrowse from '../../../components/grove/directory-browse.astro';\n\nexport function getStaticPaths() {\n const routeSlug = siteConfig.blueprintConfig?.routeSlug ?? 'projects';\n // Page count comes from the model, not from `stats.totalRecords` —\n // the browse list is scoped to the blueprint's own records.\n const { pages: count } = getDirectoryIndexModel(new URLSearchParams(), siteConfig);\n return Array.from({ length: Math.max(0, count - 1) }, (_, index) => ({\n params: { slug: routeSlug, page: String(index + 2) },\n props: { routePage: index + 2 },\n }));\n}\n\nconst { routePage } = Astro.props;\n---\n\n<DirectoryBrowse routePage={routePage} />\n",
292
+ "type": "registry:page",
293
+ "target": "~/src/pages/[slug]/page/[page].astro"
294
+ },
295
+ {
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}`}\n />\n </li>\n ))}\n </ul>\n </body>\n</html>\n",
298
+ "type": "registry:page",
299
+ "target": "~/src/pages/[slug]/page/cards.astro"
300
+ },
301
+ {
302
+ "path": "default/pages/[slug]/page/records.json.ts",
303
+ "content": "/**\n * Record index for client-side filtering — `/{slug}/page/records.json`.\n *\n * The browse page used to inline this array in a `<script type=\n * \"application/json\">`. That put the entire directory into every\n * paginated page's HTML: at 300 records the browse page weighed over\n * 300 kB before a single card was read. Fetched instead, it arrives\n * once, on idle, and the browser caches it across every page of the\n * directory.\n */\nimport siteConfig from '@grove/generated/site-config.json';\nimport { getDirectoryIndexModel } from '@grove-dev/astro/server';\n\nexport function getStaticPaths() {\n const routeSlug = siteConfig.blueprintConfig?.routeSlug ?? 'projects';\n return [{ params: { slug: routeSlug } }];\n}\n\nexport function GET() {\n const { clientItemsJson } = getDirectoryIndexModel(new URLSearchParams(), siteConfig);\n return new Response(clientItemsJson, {\n headers: { 'content-type': 'application/json; charset=utf-8' },\n });\n}\n",
304
+ "type": "registry:file",
305
+ "target": "~/src/pages/[slug]/page/records.json.ts"
306
+ },
307
+ {
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",
310
+ "type": "registry:component",
311
+ "target": "~/src/components/grove/directory-browse.astro"
312
+ },
313
+ {
314
+ "path": "default/components/grove/directory-index-client.astro",
315
+ "content": "---\n/**\n * DirectoryIndexClient — the browse page's client controller.\n *\n * The browse routes are prerendered per page (`/{slug}/`,\n * `/{slug}/page/2/`), so the server never sees a query string. This\n * script re-reads `location.search` and re-derives results, chips,\n * facet counts, and pagination with the same `@grove-dev/core/directory`\n * functions the server used.\n *\n * Two modes, one list:\n * - **No filters** — the server-rendered page slice is already right.\n * Pagination links stay the real `/page/n/` paths.\n * - **Filtered** — the whole record set is filtered here, the page\n * re-renders from `clientItemsJson`, and pagination switches to\n * `?page=N` on the base route.\n */\ninterface Props {\n slug: string;\n singular: string;\n plural: string;\n taxonomy: Record<string, unknown>;\n /** Page this route prerendered; the client starts from it. */\n routePage?: number;\n}\n\nconst { slug, singular, plural, taxonomy, routePage = 1 } = Astro.props;\nconst clientConfigJson = JSON.stringify({ slug, singular, plural, taxonomy, routePage }).replace(\n /</g,\n '\\\\u003c',\n);\n---\n\n<script is:inline id=\"grove-index-config\" type=\"application/json\" set:html={clientConfigJson}></script>\n<script>\n import type { IndexRecord } from \"@grove-dev/core\";\n import type { DirectoryFilterGroupKey } from \"@grove-dev/core/directory\";\n import {\n PAGE_SIZE,\n activeFilterChips,\n applySort,\n buildFacets,\n DIRECTORY_FILTER_KEYS,\n DIRECTORY_FILTER_LABELS,\n DIRECTORY_TAXONOMY_KINDS,\n effectivePage,\n effectiveSort,\n filterRecords,\n filtersFromSearchParams,\n hasAnyFilter,\n isDirectoryFilterGroupKey,\n hrefForClearedFilters,\n hrefForFilters,\n pagePathHref,\n paginationPageList,\n searchParamsFromFilters,\n sortDisplay,\n totalPages,\n } from \"@grove-dev/core/directory\";\n import {\n PAGINATION_DISABLED,\n PAGINATION_EXTRA,\n buttonClass,\n chipClass,\n filterTriggerClass,\n } from \"../../lib/classnames.ts\";\n\n (() => {\n const configSource = document.querySelector(\"#grove-index-config\");\n const listNode = document.querySelector<HTMLElement>(\"#results-list\");\n if (!configSource || !listNode) return;\n // Closures below cannot see the guard above; bind the narrowed type once.\n const list = listNode;\n\n const { slug, singular, plural, taxonomy, routePage } = JSON.parse(\n configSource.textContent || \"{}\",\n );\n // Filled by `loadRecords()`. Until then the page shows what the\n // server rendered, which for an unfiltered view is already right.\n let items: IndexRecord[] = [];\n const pathPrefix = `/${slug}`;\n\n // Cards for this page came with the document. A filtered view can\n // surface any record in the directory, so the rest are fetched\n // once from `/{slug}/page/cards/` — rendered there by the same\n // server component, which is what keeps the card to a single\n // definition instead of a second one written in JavaScript.\n const nodes = new Map<string, HTMLElement>();\n for (const node of list.querySelectorAll(\":scope > [data-record-slug]\")) {\n const key = (node as HTMLElement).dataset.recordSlug;\n if (key) nodes.set(key, node as HTMLElement);\n }\n\n // The record index — everything filtering, sorting, and facet\n // counting reads. Fetched rather than inlined so a paginated page\n // does not carry the whole directory in its HTML.\n let recordSource: Promise<void> | null = null;\n let recordsSettled = false;\n function loadRecords(): Promise<void> {\n if (!recordSource) {\n recordSource = fetch(`${pathPrefix}/page/records.json`)\n .then((response) => (response.ok ? response.json() : []))\n .then((data) => {\n items = Array.isArray(data) ? data : [];\n })\n .catch(() => {\n items = [];\n })\n .then(() => {\n // Settled either way: a failed fetch must not leave the\n // page retrying forever behind a busy list.\n recordsSettled = true;\n });\n }\n return recordSource;\n }\n\n let cardSource: Promise<void> | null = null;\n let cardsSettled = false;\n function loadAllCards(): Promise<void> {\n if (!cardSource) {\n cardSource = fetch(`${pathPrefix}/page/cards/`)\n .then((response) => (response.ok ? response.text() : \"\"))\n .then((html) => {\n if (!html) return;\n const parsed = new DOMParser().parseFromString(html, \"text/html\");\n for (const node of parsed.querySelectorAll(\"#grove-index-cards > [data-record-slug]\")) {\n const key = (node as HTMLElement).dataset.recordSlug;\n if (key && !nodes.has(key)) nodes.set(key, document.adoptNode(node) as HTMLElement);\n }\n })\n .catch(() => {\n // Offline or a stale deploy: the page keeps working with\n // the records it already has.\n })\n .then(() => {\n cardsSettled = true;\n });\n }\n return cardSource;\n }\n /** Everything a filtered view needs: the index and the cards. */\n const loadAll = () => Promise.all([loadRecords(), loadAllCards()]);\n\n // Warm on the first sign of intent — a pointer or focus reaching\n // the controls — rather than on idle. Prefetching a whole\n // directory during load competes with the page itself for\n // bandwidth on a phone, and most visitors never filter at all.\n const controls = document.querySelector(\"#search-form\")?.parentElement ?? document;\n for (const type of [\"pointerdown\", \"focusin\", \"keydown\"]) {\n controls.addEventListener(type, () => loadAll(), { once: true, passive: true });\n }\n\n let params = new URLSearchParams(location.search);\n let filters = filtersFromSearchParams(params);\n let sort = effectiveSort(filters);\n\n /**\n * True when the URL asks for something the prerendered document\n * does not already show. `hasAnyFilter` deliberately ignores\n * `sort`, but a sorted view is just as much a client view: the\n * `/page/N/` documents are all built with the default sort, so\n * paging out of `?sort=most-starred` onto one of them would\n * silently re-sort the list mid-journey.\n */\n const isClientView = () => hasAnyFilter(filters) || Boolean(filters.sort);\n\n /** Client views own the page number; prerendered ones use the path. */\n const currentPage = () => (isClientView() ? effectivePage(filters) : routePage || 1);\n\n const hrefForResultPage = (target: number) =>\n isClientView()\n ? hrefForFilters({ ...filters, page: target }, pathPrefix)\n : pagePathHref(pathPrefix, target);\n\n /** Move the page's cards into the list, in result order. */\n function renderList(visible: { slug: string }[]) {\n const next: HTMLElement[] = [];\n let missing = false;\n for (const record of visible) {\n const node = nodes.get(record.slug);\n if (node) next.push(node);\n else missing = true;\n }\n list.replaceChildren(...next);\n // A record whose card has not arrived yet: render what we have\n // and finish the moment the card source lands. Only while the\n // fetch is still outstanding — once it has settled, a missing\n // card is missing, and retrying would spin.\n if (missing && !cardsSettled) loadAllCards().then(() => applyClientFilters());\n }\n\n function applyClientFilters() {\n const filtered = applySort(filterRecords(items, filters), sort);\n const pageCount = totalPages(filtered.length);\n const page = Math.min(Math.max(1, currentPage()), pageCount);\n renderList(filtered.slice((page - 1) * PAGE_SIZE, page * PAGE_SIZE));\n\n const count = document.querySelector(\"#results-count\");\n const pageLabel = document.querySelector(\"#results-page\");\n const empty = document.querySelector(\"#empty-state\");\n if (count) count.textContent = `${filtered.length} ${filtered.length === 1 ? singular : plural}`;\n const sortLabel = document.querySelector(\"#results-sort\");\n if (sortLabel) sortLabel.textContent = ` · sorted by ${sortDisplay(sort)}`;\n if (pageLabel) pageLabel.textContent = pageCount > 1 ? ` · page ${page} of ${pageCount}` : \"\";\n if (empty) empty.classList.toggle(\"hidden\", filtered.length > 0);\n\n // Rebuild the pagination controls, mirroring the server-rendered\n // `Pagination.astro` (Previous/Next + windowed page list via the\n // shared `paginationPageList`) so client filtering never degrades\n // the affordances of the initial render.\n const pagination = document.querySelector(\"#results-pagination\");\n if (pagination) {\n pagination.innerHTML = \"\";\n if (pageCount > 1) {\n const linkClass = buttonClass(\"secondary\", \"sm\", PAGINATION_EXTRA);\n const nav = document.createElement(\"nav\");\n nav.className = \"flex flex-wrap items-center justify-center gap-1.5\";\n nav.setAttribute(\"aria-label\", \"Pagination\");\n const control = (label: string, target: number | null, rel?: string) => {\n if (target === null) {\n const span = document.createElement(\"span\");\n span.className = `${linkClass} ${PAGINATION_DISABLED}`;\n span.textContent = label;\n return span;\n }\n const link = document.createElement(\"a\");\n link.href = hrefForResultPage(target);\n link.textContent = label;\n link.className = linkClass;\n if (rel) link.rel = rel;\n return link;\n };\n nav.append(control(\"Previous\", page > 1 ? page - 1 : null, \"prev\"));\n for (const entry of paginationPageList(page, pageCount)) {\n if (entry === \"ellipsis\") {\n const dots = document.createElement(\"span\");\n dots.className = \"px-1 text-2xs text-ink-400\";\n dots.setAttribute(\"aria-hidden\", \"true\");\n dots.textContent = \"...\";\n nav.append(dots);\n continue;\n }\n const link = control(String(entry), entry);\n link.setAttribute(\"aria-label\", `Page ${entry}`);\n if (entry === page) {\n link.setAttribute(\"aria-current\", \"page\");\n link.className = buttonClass(\"selected\", \"sm\", PAGINATION_EXTRA);\n }\n nav.append(link);\n }\n nav.append(control(\"Next\", page < pageCount ? page + 1 : null, \"next\"));\n pagination.append(nav);\n }\n }\n }\n\n const searchInput = document.querySelector(\"#search-input\");\n const searchClear = document.querySelector(\"[data-search-clear]\");\n if (searchInput instanceof HTMLInputElement) searchInput.value = filters.q || \"\";\n document.querySelectorAll('select[name=\"sort\"]').forEach((select) => {\n if (select instanceof HTMLSelectElement) select.value = sort;\n });\n\n const filterKeys = DIRECTORY_FILTER_KEYS;\n const filterLabels = DIRECTORY_FILTER_LABELS;\n const taxonomyKinds = DIRECTORY_TAXONOMY_KINDS;\n const taxonomyName = (groupKey: DirectoryFilterGroupKey, value: string) =>\n (taxonomy[taxonomyKinds[groupKey]] || []).find(\n (entry: { id: string; name: string }) => entry.id === value,\n )?.name ?? value;\n\n /** Chip labels and remove hrefs come from core — one definition. */\n function renderChips() {\n const activeFilters = document.querySelector(\"#active-filters\");\n const chips = activeFilterChips(filters, { taxonomy, pathPrefix });\n if (activeFilters) {\n activeFilters.innerHTML = \"\";\n for (const chip of chips) {\n const link = document.createElement(\"a\");\n link.href = chip.href;\n // The whole anchor is the remove control; the visible label\n // announces the filter value, and the aria-label spells out\n // the action for assistive tech.\n link.setAttribute(\"aria-label\", `Remove filter: ${chip.label}`);\n link.className = chipClass();\n link.append(document.createTextNode(`${chip.label} `));\n const close = document.createElement(\"span\");\n close.setAttribute(\"aria-hidden\", \"true\");\n close.textContent = \"×\";\n link.append(close);\n activeFilters.append(link);\n }\n if (chips.length) {\n const clear = document.createElement(\"a\");\n clear.href = hrefForClearedFilters(filters, pathPrefix);\n clear.className =\n \"text-2xs font-medium text-ink-500 underline decoration-border underline-offset-2 hover:text-ink-900 dark:hover:text-ink-100\";\n clear.setAttribute(\"aria-label\", \"Clear all active filters\");\n clear.textContent = \"Clear all\";\n activeFilters.append(clear);\n }\n activeFilters.classList.toggle(\"hidden\", chips.length === 0);\n }\n\n // Mobile filter-drawer badge + its clear-all mirror the chips.\n const drawerCount = document.querySelector(\"[data-drawer-count]\");\n if (drawerCount) {\n drawerCount.textContent = String(chips.length);\n drawerCount.classList.toggle(\"hidden\", chips.length === 0);\n }\n const drawerClear = document.querySelector(\"[data-drawer-clear]\");\n if (drawerClear instanceof HTMLAnchorElement) {\n drawerClear.href = hrefForClearedFilters(filters, pathPrefix);\n drawerClear.classList.toggle(\"hidden\", chips.length === 0);\n }\n }\n\n function renderFilterTriggers() {\n const values = (key: string) => params.getAll(key).filter(Boolean);\n document.querySelectorAll(\".grove-filter\").forEach((group) => {\n if (!(group instanceof HTMLElement)) return;\n const groupKey = group.dataset.filterGroupKey;\n if (!groupKey || !isDirectoryFilterGroupKey(groupKey)) return;\n const selected = values(filterKeys[groupKey]);\n group.querySelectorAll(\".grove-filter-input\").forEach((input) => {\n if (input instanceof HTMLInputElement) {\n input.checked = selected.includes(input.dataset.filterValue || \"\");\n }\n });\n const triggerButton = group.querySelector(\".grove-filter-trigger\");\n const trigger = triggerButton?.querySelector(\"span\");\n const label = filterLabels[groupKey];\n if (trigger) {\n trigger.textContent = selected.length\n ? `${label}: ${\n selected.length === 1\n ? taxonomyName(groupKey, selected[0] ?? \"\")\n : `${selected.length} selected`\n }`\n : `${label}: Any`;\n }\n if (triggerButton) {\n // Same builder the server render used — the class string is\n // reassigned wholesale so the two can never drift.\n triggerButton.className = filterTriggerClass(selected.length > 0);\n }\n group.querySelector(\".grove-filter-clear\")?.classList.toggle(\"hidden\", selected.length === 0);\n });\n }\n\n // Facet counts were rendered at build time from the UNFILTERED\n // record set (the route is prerendered, so the server never sees\n // the live query string). Recompute intersection counts against\n // the current filters and patch each count span in place —\n // never re-render the option lists, which would destroy\n // checkbox, focus, and scroll state.\n function renderFacetCounts() {\n const liveFacets: Record<string, { value: string; count: number }[]> = buildFacets(items, {\n filters,\n curatedTagIds: (taxonomy.topics || []).map((topic: { id: string }) => topic.id),\n });\n document.querySelectorAll(\"[data-facet-count]\").forEach((span) => {\n if (!(span instanceof HTMLElement)) return;\n const options = liveFacets[span.dataset.facet ?? \"\"] ?? [];\n const count = options.find((option) => option.value === span.dataset.value)?.count ?? 0;\n span.textContent = String(count);\n const row = span.closest(\"label\");\n const input = row?.querySelector(\".grove-filter-input\");\n const checked = input instanceof HTMLInputElement && input.checked;\n // A zero-count option can't narrow anything — dim and disable\n // it unless it's the currently selected value (which must stay\n // interactive so the user can un-select it).\n const inert = count === 0 && !checked;\n row?.classList.toggle(\"opacity-45\", inert);\n if (input instanceof HTMLInputElement) input.disabled = inert;\n });\n }\n\n function renderAll() {\n renderChips();\n renderFilterTriggers();\n if (searchClear instanceof HTMLElement) searchClear.hidden = !(filters.q || \"\").length;\n\n if (recordsSettled) {\n renderFacetCounts();\n applyClientFilters();\n return;\n }\n // Nothing to filter with yet. A plain view of this page is\n // already correct as the server rendered it; anything the URL\n // asks for beyond that — a filter, a search, a sort — waits for\n // the index and the cards, and says so while it does.\n if (!isClientView()) return;\n list.setAttribute(\"aria-busy\", \"true\");\n loadAll().then(() => {\n list.removeAttribute(\"aria-busy\");\n renderAll();\n });\n }\n\n /**\n * Adopt a URL without a navigation, then re-render from it.\n *\n * A URL with no query is a prerendered document — clearing the\n * last filter lands on `/{slug}/`, which on page 2+ is a\n * *different* document than the one on screen. Adopting it there\n * would leave records 21–40 rendered under the page-1 URL, so\n * that case navigates for real.\n */\n function adopt(url: string, mode: \"push\" | \"replace\") {\n const next = new URL(url, location.origin);\n const samePath =\n next.pathname.replace(/\\/$/, \"\") === location.pathname.replace(/\\/$/, \"\");\n if (!next.search && (!samePath || (routePage || 1) > 1)) {\n location.assign(next.toString());\n return;\n }\n const state = { grove: true, scrollY: window.scrollY };\n if (mode === \"push\") history.pushState(state, \"\", next);\n else history.replaceState(state, \"\", next);\n params = new URLSearchParams(next.search);\n filters = filtersFromSearchParams(params);\n sort = effectiveSort(filters);\n renderAll();\n }\n\n // Search filters as you type. `replaceState` keeps a search\n // session out of the history stack — Back should return to the\n // previous result set, not to the previous keystroke.\n let debounce = 0;\n searchInput?.addEventListener(\"input\", () => {\n window.clearTimeout(debounce);\n debounce = window.setTimeout(() => {\n const query = searchInput instanceof HTMLInputElement ? searchInput.value.trim() : \"\";\n adopt(hrefForFilters({ ...filters, q: query || undefined, page: 1 }, pathPrefix), \"replace\");\n if (searchInput instanceof HTMLInputElement) searchInput.focus();\n }, 150);\n });\n searchClear?.addEventListener(\"click\", () => {\n if (searchInput instanceof HTMLInputElement) {\n searchInput.value = \"\";\n searchInput.focus();\n }\n adopt(hrefForFilters({ ...filters, q: undefined, page: 1 }, pathPrefix), \"replace\");\n });\n document.querySelector(\"#search-form\")?.addEventListener(\"submit\", (event) => {\n // Enter already has its answer on screen; submitting would only\n // reload the same state.\n event.preventDefault();\n });\n\n // RefinePanel asks before it navigates; cancelling means \"this\n // page can apply the URL in place\".\n document.addEventListener(\"grove:navigate\", (event) => {\n const url = (event as CustomEvent<{ url: string }>).detail?.url;\n if (!url) return;\n event.preventDefault();\n adopt(url, \"push\");\n });\n\n // Filtered navigation is a real step: Back returns to the\n // previous result set and its scroll position.\n //\n // Only links that carry a query are adopted. Everything else that\n // points at this list — `/{slug}/` from \"Clear all\" or the \"1\"\n // pagination link, `/{slug}/page/2/`, the header's \"Browse\" nav —\n // is a prerendered document and must actually navigate;\n // swallowing those left page 2's records rendered under the\n // page-1 URL. Hash links (the skip link) are never ours.\n document.addEventListener(\"click\", (event) => {\n const link = (event.target as HTMLElement | null)?.closest(\"a\");\n if (!(link instanceof HTMLAnchorElement)) return;\n if (event.defaultPrevented || event.metaKey || event.ctrlKey || event.shiftKey) return;\n if (link.target === \"_blank\" || !link.href.startsWith(location.origin)) return;\n const url = new URL(link.href);\n if (url.hash) return;\n const isListUrl = url.pathname === `${pathPrefix}/` || url.pathname === pathPrefix;\n if (!isListUrl || !url.search) return;\n event.preventDefault();\n history.replaceState({ grove: true, scrollY: window.scrollY }, \"\");\n adopt(url.toString(), \"push\");\n window.scrollTo({ top: 0, behavior: \"instant\" as ScrollBehavior });\n });\n\n window.addEventListener(\"popstate\", (event) => {\n params = new URLSearchParams(location.search);\n filters = filtersFromSearchParams(params);\n sort = effectiveSort(filters);\n if (searchInput instanceof HTMLInputElement) searchInput.value = filters.q || \"\";\n document.querySelectorAll('select[name=\"sort\"]').forEach((select) => {\n if (select instanceof HTMLSelectElement) select.value = sort;\n });\n renderAll();\n const state = event.state as { scrollY?: number } | null;\n if (typeof state?.scrollY === \"number\") {\n window.scrollTo({ top: state.scrollY, behavior: \"instant\" as ScrollBehavior });\n }\n });\n\n renderAll();\n })();\n</script>\n",
316
+ "type": "registry:component",
317
+ "target": "~/src/components/grove/directory-index-client.astro"
318
+ },
319
+ {
320
+ "path": "default/components/grove/refine-panel.astro",
321
+ "content": "---\nimport type { IndexFilters } from '@grove-dev/core';\n/**\n * RefinePanel — multi-select facet dropdowns.\n *\n * Renders the ordered `groups` view-model produced by\n * `getDirectoryIndexModel().facetGroups` — visibility, ORDER, display\n * label, and selection mode all come from `browse.facets` + the core\n * facet registry, never from this component. Option labels arrive\n * pre-resolved from the taxonomy YAML, so the server render and the\n * client script share one label source.\n *\n * The form is a GET to the list page base, with each facet as a\n * repeated key. Empty values are dropped, so the URL stays clean.\n */\nimport { DIRECTORY_FILTER_KEYS, SORT_OPTIONS } from '@grove-dev/core';\nimport FilterGroupMenu from './filter-group-menu.astro';\n\ninterface FacetValue {\n value: string;\n label?: string;\n count?: number;\n}\n\ninterface FacetGroupModel {\n id: string;\n filterKey: 'stacks' | 'platforms' | 'categories' | 'tags' | 'licenses';\n label: string;\n single?: boolean;\n options: FacetValue[];\n initial: string[];\n}\n\ninterface Props {\n /** Ordered filter groups (see `getDirectoryIndexModel`). */\n groups: FacetGroupModel[];\n /** Current URL filter state — used to preselect the sort. */\n initial: IndexFilters;\n pathPrefix?: string;\n class?: string;\n /**\n * Emit the default flex layout on the root. Pass `false` when the\n * caller owns the layout — e.g. `layout={false} class=\"contents\"` to\n * promote the filter triggers into the parent's flex row. Without\n * this the root's own `flex` would win over any display utility in\n * `class`, since Tailwind emits `.contents` before `.flex`.\n */\n layout?: boolean;\n /** Hide the sort select (e.g. when the page renders its own). */\n hide?: Array<'sort'>;\n}\n\nconst {\n groups: groupModels,\n initial,\n pathPrefix = '/',\n class: className = '',\n layout = true,\n hide = [],\n} = Astro.props;\n\nfunction triggerLabel(group: FacetGroupModel): string {\n if (group.initial.length === 0) return `${group.label}: Any`;\n if (group.initial.length === 1) {\n const selected = group.initial[0];\n const option = group.options.find((candidate) => candidate.value === selected);\n return `${group.label}: ${option?.label ?? selected}`;\n }\n return `${group.label}: ${group.initial.length} selected`;\n}\n\nconst groups = groupModels.map((group) => ({\n ...group,\n active: group.initial.length > 0,\n popoverId: `filter-popover-${group.filterKey}`,\n trigger: triggerLabel(group),\n}));\n---\n\n<div class:list={[layout && \"flex flex-wrap items-center gap-2\", className]} role=\"toolbar\" aria-label=\"Filter items\">\n {groups.map((group) => <FilterGroupMenu {...group} />)}\n\n {!hide.includes(\"sort\") && (\n <label class=\"relative\">\n <span class=\"sr-only\">Sort items</span>\n <select name=\"sort\" class=\"h-9 cursor-pointer appearance-none border py-1.5 pl-3 pr-8 text-[0.8125rem] font-medium\">\n {SORT_OPTIONS.map((option) => <option value={option.value} selected={(initial.sort ?? \"recently-updated\") === option.value}>{option.label}</option>)}\n </select>\n <svg viewBox=\"0 0 16 16\" width=\"11\" height=\"11\" aria-hidden=\"true\" class=\"pointer-events-none absolute right-2.5 top-1/2 -translate-y-1/2 text-ink-400\" fill=\"currentColor\">\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 )}\n</div>\n\n<script is:inline define:vars={{ pathPrefix, filterKeys: DIRECTORY_FILTER_KEYS }}>\n (() => {\n const groups = document.querySelectorAll(\".grove-filter\");\n const keys = filterKeys;\n function closeAll(except) {\n groups.forEach((group) => {\n if (group === except) return;\n const popover = group.querySelector(\".grove-filter-popover\");\n const trigger = group.querySelector(\".grove-filter-trigger\");\n if (popover && trigger) {\n popover.hidden = true;\n popover.classList.add(\"hidden\");\n trigger.setAttribute(\"aria-expanded\", \"false\");\n }\n });\n }\n // A directory controller (DirectoryIndexClient) can adopt the URL\n // in place and re-render without a reload; it signals that by\n // cancelling the event. Anywhere else — a taxonomy page, no\n // controller on the page at all — this falls back to navigating,\n // so the panel keeps working on its own.\n function go(url) {\n const event = new CustomEvent(\"grove:navigate\", { detail: { url }, cancelable: true });\n if (document.dispatchEvent(event)) location.assign(url);\n }\n function navigate(group, values) {\n const params = new URLSearchParams(location.search);\n const key = keys[group.dataset.filterGroupKey];\n params.delete(key);\n params.delete(\"page\");\n values.forEach((value) => params.append(key, value));\n go(params.toString() ? `${pathPrefix}?${params}` : pathPrefix);\n }\n groups.forEach((group) => {\n const trigger = group.querySelector(\".grove-filter-trigger\");\n const popover = group.querySelector(\".grove-filter-popover\");\n trigger?.addEventListener(\"click\", (event) => {\n event.stopPropagation();\n const opening = trigger.getAttribute(\"aria-expanded\") !== \"true\";\n closeAll(opening ? group : undefined);\n popover.hidden = !opening;\n popover.classList.toggle(\"hidden\", !opening);\n trigger.setAttribute(\"aria-expanded\", String(opening));\n });\n group.querySelector(\".grove-filter-apply\")?.addEventListener(\"click\", () => {\n navigate(group, [...group.querySelectorAll(\".grove-filter-input:checked\")].map((input) => input.dataset.filterValue));\n });\n group.querySelector(\".grove-filter-clear\")?.addEventListener(\"click\", () => navigate(group, []));\n if (group.dataset.filterSingle === \"true\") {\n group.querySelectorAll(\".grove-filter-input\").forEach((input) => input.addEventListener(\"change\", () => navigate(group, [input.dataset.filterValue])));\n }\n popover?.addEventListener(\"click\", (event) => event.stopPropagation());\n });\n document.addEventListener(\"click\", () => closeAll());\n document.addEventListener(\"keydown\", (event) => {\n if (event.key !== \"Escape\") return;\n // Restore focus to the trigger whose popover was open so\n // keyboard users don't lose their place.\n const openGroup = [...groups].find((group) =>\n group.querySelector('.grove-filter-trigger[aria-expanded=\"true\"]'),\n );\n closeAll();\n openGroup?.querySelector(\".grove-filter-trigger\")?.focus();\n });\n document.querySelector('select[name=\"sort\"]')?.addEventListener(\"change\", (event) => {\n const params = new URLSearchParams(location.search);\n params.set(\"sort\", event.target.value);\n params.delete(\"page\");\n go(params.toString() ? `${pathPrefix}?${params}` : pathPrefix);\n });\n })();\n</script>\n",
322
+ "type": "registry:component",
323
+ "target": "~/src/components/grove/refine-panel.astro"
324
+ },
325
+ {
326
+ "path": "default/components/grove/filter-group-menu.astro",
327
+ "content": "---\nimport { buttonClass, filterTriggerClass } from '../../lib/classnames.ts';\nimport FilterOptions from './filter-options.astro';\n\ninterface FacetValue {\n value: string;\n label?: string;\n count?: number;\n}\n\ninterface Props {\n label: string;\n filterKey: string;\n options: FacetValue[];\n initial: string[];\n single?: boolean;\n active: boolean;\n popoverId: string;\n trigger: string;\n}\n\nconst group = Astro.props;\n---\n\n<div class=\"grove-filter relative\" data-filter-group-key={group.filterKey} data-filter-single={group.single ? \"true\" : \"false\"}>\n <button\n type=\"button\"\n class={filterTriggerClass(group.active)}\n aria-expanded=\"false\"\n aria-controls={group.popoverId}\n >\n <span>{group.trigger}</span>\n <svg viewBox=\"0 0 16 16\" width=\"11\" height=\"11\" aria-hidden=\"true\" fill=\"currentColor\" class=\"opacity-70\">\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 </button>\n {/* A group of native checkboxes/radios — the old listbox role over\n label/input children had no valid accessibility tree. */}\n <div\n id={group.popoverId}\n class=\"rounded-[calc(var(--radius)+0.25rem)] border border-border bg-popover text-popover-foreground shadow-xl grove-filter-popover absolute left-0 top-full z-40 mt-1 hidden w-72 max-w-[calc(100vw-2rem)] p-1.5\"\n role=\"group\"\n aria-label={`${group.label} filters`}\n hidden\n >\n <FilterOptions filterKey={group.filterKey} options={group.options} initial={group.initial} single={group.single} />\n {/* Single-select groups navigate on change, so Apply would be a\n dead affordance — they keep only Clear, and the whole footer\n hides itself while Clear is hidden (the client script toggles\n Clear's `hidden` class from the live URL state). */}\n <div\n class:list={[\n \"mt-1 flex items-center justify-between border-t border-ink-100 px-2 pt-1.5 dark:border-ink-900\",\n group.single && \"has-[.grove-filter-clear.hidden]:hidden\",\n ]}\n >\n <button\n type=\"button\"\n class:list={[\n \"grove-filter-clear text-2xs font-medium text-ink-500 hover:text-ink-900 dark:text-ink-400 dark:hover:text-ink-100\",\n !group.active && \"hidden\",\n ]}\n >Clear {group.label.toLowerCase()}</button>\n {!group.single && (\n <button type=\"button\" class={buttonClass(\"primary\", \"sm\", \"grove-filter-apply ml-auto px-2.5 text-2xs\")}>Apply</button>\n )}\n </div>\n </div>\n</div>\n",
328
+ "type": "registry:component",
329
+ "target": "~/src/components/grove/filter-group-menu.astro"
330
+ },
331
+ {
332
+ "path": "default/components/grove/filter-options.astro",
333
+ "content": "---\ninterface FacetValue {\n value: string;\n label?: string;\n count?: number;\n}\n\ninterface Props {\n filterKey: string;\n options: FacetValue[];\n initial: string[];\n single?: boolean;\n}\n\nconst { filterKey, options, initial, single = false } = Astro.props;\n\nfunction pretty(value: string): string {\n return value\n .split(/[-_]/)\n .map((part) => (part ? part[0].toUpperCase() + part.slice(1) : part))\n .join(' ');\n}\n---\n\n<ul class=\"m-0 flex max-h-72 list-none flex-col gap-0.5 overflow-y-auto p-0\">\n {options.map((option) => (\n <li>\n <label class=\"flex cursor-pointer items-center justify-between gap-3 rounded-md px-2 py-1.5 text-[0.8125rem] text-ink-700 transition-colors hover:bg-ink-50 dark:text-ink-300 dark:hover:bg-ink-900/60\">\n <span class=\"flex min-w-0 items-center gap-2\">\n <input\n type={single ? \"radio\" : \"checkbox\"}\n name={single ? filterKey : undefined}\n class=\"grove-filter-input h-3.5 w-3.5 shrink-0 cursor-pointer accent-ink-900 dark:accent-ink-100\"\n data-filter-key={filterKey}\n data-filter-value={option.value}\n checked={initial.includes(option.value)}\n />\n <span class=\"truncate\">{option.label ?? pretty(option.value)}</span>\n </span>\n <span\n class=\"font-mono text-2xs tabular-nums text-ink-500 dark:text-ink-400\"\n data-facet-count\n data-facet={filterKey}\n data-value={option.value}\n >{option.count ?? 0}</span>\n </label>\n </li>\n ))}\n</ul>\n",
334
+ "type": "registry:component",
335
+ "target": "~/src/components/grove/filter-options.astro"
336
+ },
337
+ {
338
+ "path": "default/components/grove/pagination.astro",
339
+ "content": "---\ninterface Props {\n current: number;\n total: number;\n hrefFor: (page: number) => string;\n class?: string;\n}\n\nimport { paginationPageList } from '@grove-dev/astro';\nimport { buttonClass, PAGINATION_DISABLED, PAGINATION_EXTRA } from '../../lib/classnames.ts';\n\nconst { current, total, hrefFor, class: className = '' } = Astro.props;\n\nconst pages = paginationPageList(current, total);\nconst linkClass = buttonClass('secondary', 'sm', PAGINATION_EXTRA);\nconst currentClass = buttonClass('selected', 'sm', PAGINATION_EXTRA);\n---\n\n{total > 1 && (\n <nav\n class:list={[\"flex flex-wrap items-center justify-center gap-1.5\", className]}\n aria-label=\"Pagination\"\n >\n {current > 1 ? (\n <a href={hrefFor(current - 1)} class={linkClass} rel=\"prev\">Previous</a>\n ) : (\n <span class={`${linkClass} ${PAGINATION_DISABLED}`}>Previous</span>\n )}\n\n {pages.map((page) =>\n page === \"ellipsis\" ? (\n <span class=\"px-1 text-2xs text-ink-400\" aria-hidden=\"true\">...</span>\n ) : (\n <a\n href={hrefFor(page)}\n class={page === current ? currentClass : linkClass}\n aria-current={page === current ? \"page\" : undefined}\n >\n {page}\n </a>\n ),\n )}\n\n {current < total ? (\n <a href={hrefFor(current + 1)} class={linkClass} rel=\"next\">Next</a>\n ) : (\n <span class={`${linkClass} ${PAGINATION_DISABLED}`}>Next</span>\n )}\n </nav>\n)}\n",
340
+ "type": "registry:component",
341
+ "target": "~/src/components/grove/pagination.astro"
342
+ },
343
+ {
344
+ "path": "default/components/grove/smart-lens-tabs.astro",
345
+ "content": "---\n/**\n * SmartLensTabs — curated single-select lens tabs.\n *\n * Renders configured curated lenses as a horizontal tab bar. Sort choices,\n * including Recently added, belong in the separate sort control.\n * Clicking a tab navigates to the same list page with the `lens=`\n * query param updated. Other filter params (q, stack, platform,\n * category, sort) are preserved.\n *\n * The current selection is computed from `currentParams`, so the\n * component is server-render-only — no client JS required.\n *\n * Generic: uses the `LENSES` registry from `lib/lenses.ts` and\n * takes the list-page base via `pathPrefix`.\n */\n\nimport { hrefForLens, isLensActive, LENSES, lensDisplay } from '@grove-dev/core';\nimport { lensTabClass } from '../../lib/classnames.ts';\n\ninterface Props {\n currentParams: URLSearchParams;\n pathPrefix?: string;\n class?: string;\n /**\n * Emit the default flex layout on the root. Pass `false` when the\n * caller owns the layout — e.g. `layout={false} class=\"contents\"` to\n * promote the tabs into the parent's flex row. Without this the\n * root's own `flex` would win over any display utility in `class`,\n * since Tailwind emits `.contents` before `.flex`.\n */\n layout?: boolean;\n /** Override the visible lens list (defaults to LENSES). */\n lensIds?: readonly string[];\n /** Consumer noun for the unfiltered lens, e.g. \"All apps\". */\n allLabel?: string;\n}\n\nconst {\n currentParams,\n pathPrefix = '/',\n class: className = '',\n layout = true,\n lensIds,\n allLabel,\n} = Astro.props;\n\n// If `lensIds` is provided, filter LENSES to those ids in that order.\nconst lenses =\n lensIds && lensIds.length > 0\n ? lensIds\n .map((id) => LENSES.find((l) => l.id === id))\n .filter((l): l is NonNullable<typeof l> => Boolean(l))\n : LENSES;\n---\n\n<nav\n class:list={[\n \"grove-lens-tabs\",\n layout && \"flex flex-wrap items-center gap-1.5\",\n className,\n ]}\n aria-label=\"Curated views\"\n>\n {lenses.map((lens) => {\n const active = isLensActive(lens.id, currentParams);\n return (\n <a\n href={hrefForLens(lens.id, currentParams, pathPrefix)}\n class={lensTabClass(active)}\n aria-current={active ? \"page\" : undefined}\n data-lens-id={lens.id}\n data-event=\"lens_tab_click\"\n data-event-source=\"smart_lens_tabs\"\n >\n {lens.id === \"all\" && allLabel ? allLabel : lensDisplay(lens.id)}\n </a>\n );\n })}\n</nav>\n",
346
+ "type": "registry:component",
347
+ "target": "~/src/components/grove/smart-lens-tabs.astro"
348
+ },
349
+ {
350
+ "path": "default/components/grove/index-row.astro",
351
+ "content": "---\nimport { buildProjectCardModel } from '@grove-dev/astro/server';\n/**\n * IndexRow — browse-page adapter around the canonical `ProjectCard`.\n *\n * Keeps the historical public props (`record`, `detailHref`,\n * `showChips`, `eager`) so consumer pages copied from earlier versions\n * keep working. The card itself is the same on every surface: a\n * record must not look like a different record depending on whether\n * you found it on the home page or in the browse list. The repository\n * is reached through the card's `owner/repo` line, so this adapter\n * adds nothing to the card at all.\n *\n * Builds the `ProjectCardModel` from `record` internally — `record`\n * stays this adapter's public contract (unaffected by `ProjectCard`'s\n * presentation-only rewrite).\n */\nimport type { IndexRecord } from '@grove-dev/core';\nimport ProjectCard from './project-card.astro';\n\ninterface Props {\n record: IndexRecord;\n detailHref: string;\n /** @deprecated Ignored — the card renders one fixed layout. */\n showChips?: boolean;\n /** Set true on the first 1-2 rows of a list to bypass lazy\n * loading for the above-the-fold avatars. Pair with\n * `fetchpriority=\"high\"`. */\n eager?: boolean;\n class?: string;\n}\n\nconst { record, detailHref, eager = false, class: className = '' } = Astro.props;\n\nconst model = buildProjectCardModel(record);\n---\n\n<ProjectCard\n model={model}\n href={detailHref}\n eager={eager}\n class={className}\n/>\n",
352
+ "type": "registry:component",
353
+ "target": "~/src/components/grove/index-row.astro"
354
+ },
355
+ {
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 { getRecordDetailModel, recordDetailPaths } 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 RecordSidebar from '../../components/grove/record-sidebar.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\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\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 bestFor={detail.bestFor} caveats={detail.caveats} />\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 {/* 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
+ "type": "registry:page",
359
+ "target": "~/src/pages/[slug]/[recordSlug].astro"
360
+ },
361
+ {
362
+ "path": "default/components/grove/record-header.astro",
363
+ "content": "---\n/**\n * RecordHeader.astro\n *\n * Compact project-identity header used at the top of every record\n * detail page. The header carries:\n * - avatar / initials\n * - pills row (category + curation labels + \"Curated\" check +\n * optional activity badge)\n * - record name + owner/repo line\n * - short description\n * - GitHub + Homepage CTAs\n *\n * Tags + activity metadata are surfaced separately (sidebar), so\n * the header stays narrow on mobile and doesn't compete with the\n * two-column layout below.\n *\n * Tone classes for the activity badge are static `[data-activity-tone]`\n * selectors in `styles.css` — Tailwind purges any classes built from\n * dynamic strings, so the package ships the rules statically and\n * the badge's `data-activity-tone` attribute picks one at runtime.\n */\nimport type { RecordDetailModel } from '@grove-dev/astro/server';\nimport { buttonClass } from '../../lib/classnames.ts';\n\ninterface Props {\n detail: RecordDetailModel;\n}\n\nconst { detail } = Astro.props;\nconst {\n record,\n repoUrl,\n homepageUrl,\n ownerRepo,\n avatarSrc,\n initials,\n curationLabels,\n activityBadge,\n summary,\n sourceDescription,\n screenshots,\n category,\n name,\n} = detail;\n---\n\n<header class=\"mb-8\">\n {/* Identity row: logo sized to the name+repo block beside it — no\n tall avatar column leaving dead space under the logo. Pills sit\n at the row's right edge on wide viewports and wrap below on\n mobile. */}\n <div class=\"flex items-center gap-4\">\n {/* Initials stay in the DOM behind the logo and are revealed by the\n image's own `onerror` — a dead logo URL or a renamed GitHub org\n would otherwise render the broken-image glyph. */}\n {avatarSrc && (\n <img\n src={avatarSrc}\n alt=\"\"\n width=\"56\"\n height=\"56\"\n loading=\"lazy\"\n decoding=\"async\"\n onerror=\"this.hidden=true;this.nextElementSibling.hidden=false\"\n class=\"h-12 w-12 shrink-0 rounded-lg border border-ink-200 object-contain bg-white p-1 dark:border-ink-800 sm:h-14 sm:w-14\"\n />\n )}\n <span\n aria-hidden=\"true\"\n hidden={Boolean(avatarSrc)}\n data-grove-card-fallback-initials\n class=\"inline-flex h-12 w-12 shrink-0 items-center justify-center rounded-lg border border-ink-200 bg-ink-50 text-xl font-semibold text-ink-700 dark:border-ink-800 dark:bg-ink-900 dark:text-ink-200 sm:h-14 sm:w-14\"\n >\n {initials || \"·\"}\n </span>\n\n <div class=\"min-w-0 flex-1\">\n <h1 class=\"m-0 text-[1.75rem] font-semibold leading-tight tracking-tight text-ink-900 dark:text-ink-100 sm:text-[2rem]\">\n {name}\n </h1>\n {ownerRepo && (\n <p class=\"m-0 mt-0.5 text-sm text-ink-500 dark:text-ink-400\">\n <a\n href={`https://github.com/${ownerRepo.owner}`}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"text-inherit no-underline hover:text-ink-900 dark:hover:text-ink-100\"\n >\n @{ownerRepo.owner}\n </a>\n <span class=\"mx-1 text-ink-300 dark:text-ink-700\">/</span>\n <a\n href={repoUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"text-inherit no-underline hover:text-ink-900 dark:hover:text-ink-100\"\n >\n {ownerRepo.repo}\n </a>\n </p>\n )}\n </div>\n\n {/* Pills — right-aligned beside the name on wide viewports. */}\n <div class=\"hidden shrink-0 flex-wrap items-center justify-end gap-1.5 md:flex\">\n {category && (\n <span class=\"rounded-full border border-ink-200 px-2 py-0.5 text-2xs font-medium text-ink-700 dark:border-ink-800 dark:text-ink-300\">\n {category}\n </span>\n )}\n {curationLabels.map((l) => (\n <span class=\"rounded-full bg-secondary px-2 py-0.5 text-2xs font-medium text-secondary-foreground\">\n {l}\n </span>\n ))}\n {/* Curated = reviewed provenance, not a success status. */}\n {record.curation?.reviewed && (\n <span class=\"inline-flex items-center gap-1 rounded-full border border-border bg-secondary px-2 py-0.5 text-2xs font-medium text-secondary-foreground\">\n <svg viewBox=\"0 0 16 16\" width=\"10\" height=\"10\" aria-hidden=\"true\" fill=\"currentColor\">\n <path d=\"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0Zm3.41 5.09a.75.75 0 0 0-1.06 0L6.75 8.69 5.65 7.59a.75.75 0 1 0-1.06 1.06l1.65 1.65a.75.75 0 0 0 1.06 0l4.11-4.11a.75.75 0 0 0 0-1.06Z\" />\n </svg>\n Curated\n </span>\n )}\n {activityBadge && (\n <span\n data-activity-tone={activityBadge.tone}\n class=\"grove-pill grove-pill--activity inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-2xs font-medium\"\n >\n <span class=\"relative flex h-1.5 w-1.5\">\n <span class=\"absolute inline-flex h-full w-full animate-ping rounded-full bg-current opacity-60\"></span>\n <span class=\"relative inline-flex h-1.5 w-1.5 rounded-full bg-current\"></span>\n </span>\n {activityBadge.label}\n </span>\n )}\n </div>\n </div>\n\n {/* Same pills below the identity row on narrow viewports. */}\n <div class=\"mt-3 flex flex-wrap items-center gap-1.5 md:hidden\">\n {category && (\n <span class=\"rounded-full border border-ink-200 px-2 py-0.5 text-2xs font-medium text-ink-700 dark:border-ink-800 dark:text-ink-300\">\n {category}\n </span>\n )}\n {curationLabels.map((l) => (\n <span class=\"rounded-full bg-secondary px-2 py-0.5 text-2xs font-medium text-secondary-foreground\">\n {l}\n </span>\n ))}\n {record.curation?.reviewed && (\n <span class=\"inline-flex items-center gap-1 rounded-full border border-border bg-secondary px-2 py-0.5 text-2xs font-medium text-secondary-foreground\">\n <svg viewBox=\"0 0 16 16\" width=\"10\" height=\"10\" aria-hidden=\"true\" fill=\"currentColor\">\n <path d=\"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0Zm3.41 5.09a.75.75 0 0 0-1.06 0L6.75 8.69 5.65 7.59a.75.75 0 1 0-1.06 1.06l1.65 1.65a.75.75 0 0 0 1.06 0l4.11-4.11a.75.75 0 0 0 0-1.06Z\" />\n </svg>\n Curated\n </span>\n )}\n </div>\n\n {/* Description — full width below the identity row. */}\n {summary && (\n <p class=\"m-0 mt-4 max-w-[72ch] text-base leading-relaxed text-ink-700 dark:text-ink-200\">\n {summary}\n </p>\n )}\n {sourceDescription && sourceDescription !== summary && (\n <p class=\"m-0 mt-2 max-w-[72ch] text-sm leading-relaxed text-ink-500 dark:text-ink-400\">\n <span class=\"text-2xs font-semibold uppercase tracking-wider\">From the project's README: </span>\n {sourceDescription}\n </p>\n )}\n\n {/* CTA row — primary actions only. */}\n <div class=\"mt-4 flex flex-wrap items-center gap-2\">\n {repoUrl && (\n <a\n href={repoUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class={buttonClass(\"primary\", \"sm\")}\n >\n View on GitHub →\n </a>\n )}\n {homepageUrl && (\n <a\n href={homepageUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class={buttonClass(\"secondary\", \"sm\")}\n >\n Homepage\n </a>\n )}\n </div>\n {screenshots && screenshots.length > 0 && (\n <div class=\"mt-6 grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3\" aria-label=\"Screenshots\">\n {screenshots.map((shot) => (\n <figure class=\"m-0 overflow-hidden rounded-[var(--radius-lg)] border border-ink-200 bg-muted dark:border-ink-800\">\n <img\n src={shot.src}\n alt={shot.alt}\n loading=\"lazy\"\n decoding=\"async\"\n width={shot.width}\n height={shot.height}\n class=\"block h-auto w-full object-cover\"\n />\n {shot.source && (\n <figcaption class=\"px-3 py-1.5 text-2xs text-ink-500 dark:text-ink-400\">\n Source: <a href={shot.source} target=\"_blank\" rel=\"noopener noreferrer\" class=\"text-inherit no-underline hover:underline\">{shot.source.replace(/^https?:\\/\\//, \"\")}</a>\n </figcaption>\n )}\n </figure>\n ))}\n </div>\n )}\n</header>",
364
+ "type": "registry:component",
365
+ "target": "~/src/components/grove/record-header.astro"
366
+ },
367
+ {
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>",
370
+ "type": "registry:component",
371
+ "target": "~/src/components/grove/record-sidebar.astro"
372
+ },
373
+ {
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\n * nothing when both arrays 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}\n\nconst { bestFor, caveats } = Astro.props;\nconst hasAny = bestFor.length > 0 || caveats.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 <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
+ "type": "registry:component",
377
+ "target": "~/src/components/grove/editorial-summary.astro"
378
+ },
379
+ {
380
+ "path": "default/components/grove/table-of-contents.astro",
381
+ "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)}",
382
+ "type": "registry:component",
383
+ "target": "~/src/components/grove/table-of-contents.astro"
384
+ },
385
+ {
386
+ "path": "default/components/grove/markdown-body.astro",
387
+ "content": "---\n/**\n * MarkdownBody.astro\n *\n * Renders a record's pre-sanitized Markdown body (`getContentHtml`)\n * inside the package's `.grove-prose` stylesheet.\n *\n * The renderer itself lives in `@grove-dev/astro/server/directory.ts`\n * (`renderMarkdownToSafeHtml`) and runs once per record at module\n * load; this component is the presentation half of that pipeline.\n *\n * Props:\n * - `recordSlug`: the **record's** slug (not the route prefix).\n * `getContentHtml` is keyed by record slug — `detail.slug` is the\n * route prefix (e.g. \"projects\"), `detail.record.slug` is the\n * record (e.g. \"crewai\").\n * - `fallback`: optional content to render when the record has no\n * body (e.g. an empty-state message).\n */\nimport { getContentHtml } from '@grove-dev/astro/server';\n\ninterface Props {\n /** Record slug — looks up the pre-rendered HTML in the module map. */\n recordSlug: string;\n /** Optional fallback content for records without a body. */\n fallback?: string;\n}\n\nconst { recordSlug, fallback } = Astro.props;\nconst html = getContentHtml(recordSlug);\n---\n\n{html ? (\n <div class=\"grove-prose\" set:html={html} />\n) : fallback ? (\n <p class=\"grove-prose text-ink-500 dark:text-ink-400\">{fallback}</p>\n) : null}",
388
+ "type": "registry:component",
389
+ "target": "~/src/components/grove/markdown-body.astro"
390
+ },
391
+ {
392
+ "path": "default/components/grove/language-breakdown.astro",
393
+ "content": "---\n/**\n * LanguageBreakdown.astro\n *\n * Visual GitHub-Linguist-style code-composition bar plus a legend\n * showing each language's percentage. Reads from the record's\n * pre-computed `languages` array (top-5 by bytes) and `langColor`\n * (in @grove-dev/core).\n *\n * Used inside the Activity sidebar card.\n */\nimport { langColor } from '@grove-dev/core';\n\ninterface LangEntry {\n name: string;\n bytes: number;\n}\n\ninterface Props {\n /** Top-N languages as `[name, bytes]` tuples (already sorted). */\n languages: ReadonlyArray<readonly [string, number]>;\n /** Total bytes across all languages (denominator). */\n totalBytes: number;\n /** Optional max segments to show. */\n maxSegments?: number;\n}\n\nconst { languages, totalBytes, maxSegments = 5 } = Astro.props;\n\nconst segments = languages.slice(0, maxSegments).map(([name, bytes]) => {\n const pct = Math.round((bytes / Math.max(1, totalBytes)) * 100);\n return { name, pct, color: langColor(name) };\n});\n---\n\n{segments.length > 0 && (\n <div class=\"grove-langbreak mt-4 border-t border-ink-100 pt-4 dark:border-ink-800\">\n <h3 class=\"m-0 text-2xs font-semibold uppercase tracking-wider text-ink-500 dark:text-ink-400\">\n Code composition\n </h3>\n <div\n class=\"grove-langbreak-bar mt-2 flex h-2 w-full overflow-hidden rounded-full bg-ink-100 dark:bg-ink-800\"\n role=\"img\"\n aria-label={`Code composition: ${segments.map((s) => `${s.name} ${s.pct}%`).join(', ')}`}\n >\n {segments.map((s) => (\n <span\n class=\"grove-langbreak-seg h-full\"\n style={`width:${s.pct}%;background-color:${s.color}`}\n title={`${s.name}: ${s.pct}%`}\n />\n ))}\n </div>\n <ul class=\"grove-langbreak-list mt-2 flex flex-wrap gap-x-3 gap-y-1 text-2xs text-ink-500 dark:text-ink-400\">\n {segments.map((s) => (\n <li class=\"inline-flex items-center gap-1\">\n <span\n class=\"inline-block h-2 w-2 rounded-sm\"\n style={`background-color:${s.color}`}\n />\n <span class=\"font-mono\">{s.name}</span>\n <span>{s.pct}%</span>\n </li>\n ))}\n </ul>\n </div>\n)}",
394
+ "type": "registry:component",
395
+ "target": "~/src/components/grove/language-breakdown.astro"
396
+ },
397
+ {
398
+ "path": "default/pages/submit.astro",
399
+ "content": "---\nimport siteConfig from '@grove/generated/site-config.json';\nimport { getSubmissionPageModel } from '@grove-dev/astro/server';\nimport SubmissionClient from '../components/grove/submission-client.astro';\nimport BaseLayout from '../layouts/base-layout.astro';\nimport Container from '../layouts/container.astro';\nimport { buttonClass } from '../lib/classnames.ts';\n\nconst {\n singular,\n title,\n description,\n repoUrl,\n copy,\n fields,\n categories,\n stacks,\n existingSlugs,\n existingFullNames,\n platformOptions,\n licenseOptions,\n taxonomy,\n} = getSubmissionPageModel(siteConfig);\nconst goodSubmissions = [\n ...(copy.good?.length\n ? copy.good\n : [\n `A real, usable ${singular}, not a tutorial or one-screen demo`,\n 'A public repository with a clear open-source license',\n 'Enough documentation to understand, run, or contribute',\n 'Recent maintenance, releases, or meaningful project history',\n ]),\n];\nconst pleaseAvoid = [\n ...(copy.avoid?.length\n ? copy.avoid\n : [\n 'Snippets, exercises, abandoned experiments, or duplicate entries',\n 'Private repositories or projects without source',\n 'Marketing pages with no usable project behind them',\n 'Records with no license or verifiable repository',\n ]),\n];\n---\n\n<BaseLayout title={title} description={description} site={siteConfig} noindex>\n <Container>\n <section class=\"py-10 sm:py-14\">\n <div class=\"max-w-3xl\">\n <p class=\"m-0 text-2xs font-semibold uppercase tracking-wider text-ink-500 dark:text-ink-400\">\n {copy.eyebrow ?? `${singular} submission`}\n </p>\n <h1 class=\"mt-2 text-[2rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100\">\n {copy.title ?? `Add ${singular === \"app\" ? \"an\" : \"a\"} ${singular} to the directory`}\n </h1>\n <p class=\"m-0 mt-3 max-w-[60ch] text-[0.9375rem] leading-relaxed text-ink-500 dark:text-ink-400\">\n {copy.description ?? `Paste a GitHub URL to pull in the basics, edit the generated draft, then open a pull request. The data stays in this repository.`}\n </p>\n </div>\n\n {/* One compact line, not three cards — on mobile the form\n starts within the first viewport. */}\n <ol class=\"mt-4 flex flex-wrap gap-x-6 gap-y-1.5 text-2xs text-muted-foreground\" aria-label=\"Submission steps\">\n {[\n [\"1\", \"Paste a GitHub URL\"],\n [\"2\", \"Review the draft\"],\n [\"3\", \"Open a pull request\"],\n ].map(([number, heading]) => (\n <li class=\"flex items-center gap-1.5\">\n <span class=\"inline-flex h-4.5 w-4.5 shrink-0 items-center justify-center rounded-full border border-border font-mono text-[10px] font-semibold text-foreground\">{number}</span>\n <span class=\"font-medium text-foreground\">{heading}</span>\n </li>\n ))}\n </ol>\n\n <div class=\"mt-8 grid grid-cols-1 items-start gap-6 md:grid-cols-[minmax(0,1fr)_minmax(300px,0.72fr)]\">\n <form id=\"submit-form\" class=\"rounded-[calc(var(--radius)+0.25rem)] border border-ink-200 bg-background p-5 shadow-sm dark:border-ink-800\">\n <div class=\"grid gap-5\">\n <label class=\"grid gap-1.5\">\n <span class=\"text-2xs font-medium uppercase tracking-[.05em] text-muted-foreground\">GitHub URL</span>\n <div class=\"flex flex-col gap-2 sm:flex-row\">\n <input id=\"repo-url\" type=\"url\" required placeholder=\"https://github.com/owner/repo\" class=\"min-h-10 flex-1 rounded-[var(--radius)] border border-input bg-background px-3 py-2 text-sm text-foreground outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35\" />\n <button id=\"fetch-repo\" type=\"button\" class={buttonClass(\"primary\", \"bare\", \"min-h-10 whitespace-nowrap px-3 text-sm\")}>Generate draft</button>\n </div>\n <span class=\"text-2xs text-muted-foreground\">The repository must be public. We never write to it.</span>\n </label>\n\n <div class=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n <label class=\"grid gap-1.5\"><span class=\"text-2xs font-medium uppercase tracking-[.05em] text-muted-foreground\">Name</span><input id=\"item-name\" type=\"text\" class=\"min-h-10 rounded-[var(--radius)] border border-input bg-background px-3 py-2 text-sm text-foreground outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35\" /></label>\n <label class=\"grid gap-1.5\"><span class=\"text-2xs font-medium uppercase tracking-[.05em] text-muted-foreground\">Slug</span><input id=\"item-slug\" type=\"text\" class=\"min-h-10 rounded-[var(--radius)] border border-input bg-background px-3 py-2 font-mono text-sm text-foreground outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35\" /><span class=\"text-2xs text-muted-foreground\">URL fragment, auto-filled from the repository name.</span></label>\n </div>\n\n <label class=\"grid gap-1.5\">\n <span class=\"text-2xs font-medium uppercase tracking-[.05em] text-muted-foreground\">Description</span>\n <textarea id=\"item-description\" rows=\"3\" class=\"min-h-10 resize-y rounded-[var(--radius)] border border-input bg-background px-3 py-2 text-sm text-foreground outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35\"></textarea>\n <span class=\"text-2xs text-muted-foreground\">One or two sentences in plain language.</span>\n </label>\n\n {(fields.category || fields.stack) && <div class:list={[\"grid grid-cols-1 gap-4\", fields.category && fields.stack && \"sm:grid-cols-2\"]}>\n {fields.category && (\n <label class=\"grid gap-1.5\">\n <span class=\"text-2xs font-medium uppercase tracking-[.05em] text-muted-foreground\">Category</span>\n <select id=\"item-category\" class=\"min-h-10 rounded-[var(--radius)] border border-input bg-background px-3 py-2 text-sm text-foreground outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35\">\n <option value=\"\">Choose a category</option>\n {categories.map((option) => <option value={option.id}>{option.label}</option>)}\n </select>\n </label>\n )}\n {fields.stack && (\n <label class=\"grid gap-1.5\">\n <span class=\"text-2xs font-medium uppercase tracking-[.05em] text-muted-foreground\">Primary stack</span>\n <select id=\"primary-stack\" class=\"min-h-10 rounded-[var(--radius)] border border-input bg-background px-3 py-2 text-sm text-foreground outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35\">\n <option value=\"\">Choose a stack</option>\n {stacks.map((option) => <option value={option.id}>{option.label}</option>)}\n </select>\n </label>\n )}\n </div>}\n\n {fields.platforms && <fieldset class=\"grid gap-2\">\n <legend class=\"text-2xs font-medium uppercase tracking-[.05em] text-muted-foreground\">Platforms</legend>\n <div class=\"grid grid-cols-2 gap-2 sm:grid-cols-3\">\n {platformOptions.map((platform) => (\n <label class=\"flex min-h-9 items-center gap-2 rounded-md border border-ink-200 px-2 text-sm dark:border-ink-800\">\n <input type=\"checkbox\" name=\"platform\" value={platform.id} class=\"h-4 w-4\" />\n <span>{platform.label}</span>\n </label>\n ))}\n </div>\n </fieldset>}\n\n {fields.tags && <label class=\"grid gap-1.5\"><span class=\"text-2xs font-medium uppercase tracking-[.05em] text-muted-foreground\">Tags</span><input id=\"item-tags\" type=\"text\" placeholder=\"self-hosted, developer-tools, offline-first\" class=\"min-h-10 rounded-[var(--radius)] border border-input bg-background px-3 py-2 text-sm text-foreground outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35\" /></label>}\n\n {fields.license && licenseOptions.length > 0 && (\n <label class=\"grid gap-1.5\">\n <span class=\"text-2xs font-medium uppercase tracking-[.05em] text-muted-foreground\">License</span>\n <select id=\"item-license\" class=\"min-h-10 rounded-[var(--radius)] border border-input bg-background px-3 py-2 text-sm text-foreground outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35\">\n <option value=\"\">Detected from the repository if left empty</option>\n {licenseOptions.map((option) => <option value={option.id}>{option.label}</option>)}\n </select>\n </label>\n )}\n <label class=\"grid gap-1.5\"><span class=\"text-2xs font-medium uppercase tracking-[.05em] text-muted-foreground\">Website</span><input id=\"item-website\" type=\"url\" placeholder=\"https://example.com\" class=\"min-h-10 rounded-[var(--radius)] border border-input bg-background px-3 py-2 text-sm text-foreground outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35\" /></label>\n <label class=\"grid gap-1.5\"><span class=\"text-2xs font-medium uppercase tracking-[.05em] text-muted-foreground\">Best for</span><textarea id=\"best-for\" rows=\"3\" class=\"min-h-10 resize-y rounded-[var(--radius)] border border-input bg-background px-3 py-2 text-sm text-foreground outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35\" placeholder=\"One use case per line\"></textarea></label>\n </div>\n </form>\n\n <aside class=\"flex flex-col gap-4 md:sticky md:top-24\">\n <div class=\"rounded-[calc(var(--radius)+0.25rem)] border border-border bg-card p-5\">\n <h2 class=\"m-0 text-[0.9375rem] font-semibold text-ink-900 dark:text-ink-100\">Submission criteria</h2>\n <p class=\"m-0 mt-1 text-2xs text-ink-500 dark:text-ink-400\">Use this checklist before opening the draft.</p>\n <div class=\"mt-4 grid grid-cols-1 gap-4 text-2xs sm:grid-cols-2 lg:grid-cols-1 xl:grid-cols-2\">\n <div>\n <div class=\"font-semibold uppercase tracking-wider text-emerald-700 dark:text-emerald-400\">Good submissions</div>\n <ul class=\"m-0 mt-2 list-none space-y-1 p-0 text-ink-700 dark:text-ink-200\">{goodSubmissions.map((item) => <li class=\"flex gap-2\"><span class=\"text-emerald-600\">✓</span><span>{item}</span></li>)}</ul>\n </div>\n <div>\n <div class=\"font-semibold uppercase tracking-wider text-amber-700 dark:text-amber-400\">Please avoid</div>\n <ul class=\"m-0 mt-2 list-none space-y-1 p-0 text-ink-700 dark:text-ink-200\">{pleaseAvoid.map((item) => <li class=\"flex gap-2\"><span class=\"text-amber-600\">·</span><span>{item}</span></li>)}</ul>\n </div>\n </div>\n </div>\n\n <div class=\"flex min-h-[360px] flex-col rounded-[calc(var(--radius)+0.25rem)] border border-border bg-card p-5\">\n <div class=\"flex flex-wrap items-center justify-between gap-3\">\n <h2 class=\"m-0 text-base font-semibold text-ink-900 dark:text-ink-100\">YAML draft</h2>\n <div class=\"flex items-center gap-2\">\n <button id=\"copy-yaml\" type=\"button\" class={buttonClass(\"secondary\", \"sm\", \"whitespace-nowrap pointer-events-none opacity-50\")} disabled>Copy YAML</button>\n <a id=\"open-pr-link\" href=\"#\" target=\"_blank\" rel=\"noopener noreferrer\" class={buttonClass(\"secondary\", \"sm\", \"whitespace-nowrap pointer-events-none opacity-50\")}>Open PR draft</a>\n </div>\n </div>\n <pre class=\"mt-4 min-h-0 flex-1 overflow-auto rounded-md border border-ink-200 bg-ink-50 p-3 text-xs leading-relaxed text-ink-800 dark:border-ink-800 dark:bg-ink-900/60 dark:text-ink-200\"><code id=\"yaml-preview\">Paste a GitHub URL to generate a draft.</code></pre>\n <p id=\"submit-status\" class=\"mt-3 min-h-5 text-2xs text-ink-500 dark:text-ink-400\" aria-live=\"polite\"></p>\n </div>\n </aside>\n </div>\n </section>\n </Container>\n\n <SubmissionClient\n existingSlugs={existingSlugs}\n existingFullNames={existingFullNames}\n repoUrl={repoUrl}\n fields={fields}\n taxonomy={taxonomy}\n />\n</BaseLayout>\n",
400
+ "type": "registry:page",
401
+ "target": "~/src/pages/submit.astro"
402
+ },
403
+ {
404
+ "path": "default/components/grove/submission-client.astro",
405
+ "content": "---\nimport {\n inferStackFromTopics,\n parseGithubRepo,\n recordSlugify,\n yamlLines,\n yamlQuote,\n} from '@grove-dev/core';\n\ninterface Props {\n existingSlugs: string[];\n existingFullNames: string[];\n repoUrl: string;\n fields: {\n category: boolean;\n stack: boolean;\n platforms: boolean;\n tags: boolean;\n license?: boolean;\n };\n /** Taxonomy ids for client-side validation. */\n taxonomy?: {\n categoryIds?: string[];\n stackIds?: string[];\n platformIds?: string[];\n };\n /**\n * Optional path of a server-side proxy endpoint that wraps\n * `api.github.com` (SSR consumers with an adapter can wire one and\n * read a `GITHUB_TOKEN` env var to lift the rate limit). When\n * omitted — the static-build default — the visitor's browser calls\n * `https://api.github.com/repos/{owner}/{repo}` directly, which\n * works on any static host but is subject to GitHub's per-IP\n * unauthenticated limit (60 requests/hour).\n */\n githubProxyPath?: string;\n}\nconst {\n existingSlugs,\n existingFullNames,\n repoUrl,\n fields,\n taxonomy,\n githubProxyPath = '',\n} = Astro.props;\n---\n\n<script is:inline define:vars={{ existingSlugs, existingFullNames, repoUrl, fields, taxonomy, githubProxyPath, recordSlugify, parseGithubRepo, yamlQuote, yamlLines, inferStackFromTopics }}>\n /** @typedef {{ name: string; description: string | null; html_url: string; homepage: string | null; language: string | null; private: boolean; topics: string[] }} GitHubRepo */\n /** @type {GitHubRepo | null} */\n let repository = null;\n\n const $ = /** @param {string} selector */ (selector) => /** @type {HTMLElement | null} */ (document.querySelector(selector));\n /** @type {Record<string, HTMLInputElement | HTMLTextAreaElement | null>} */\n const inputs = {\n repo: /** @type {HTMLInputElement | null} */ ($(\"#repo-url\")),\n name: /** @type {HTMLInputElement | null} */ ($(\"#item-name\")),\n slug: /** @type {HTMLInputElement | null} */ ($(\"#item-slug\")),\n description: /** @type {HTMLInputElement | null} */ ($(\"#item-description\")),\n category: /** @type {HTMLSelectElement | null} */ ($(\"#item-category\")),\n stack: /** @type {HTMLSelectElement | null} */ ($(\"#primary-stack\")),\n tags: /** @type {HTMLInputElement | null} */ ($(\"#item-tags\")),\n license: /** @type {HTMLSelectElement | null} */ ($(\"#item-license\")),\n website: /** @type {HTMLInputElement | null} */ ($(\"#item-website\")),\n bestFor: /** @type {HTMLTextAreaElement | null} */ ($(\"#best-for\")),\n };\n const fetchButton = /** @type {HTMLButtonElement | null} */ ($(\"#fetch-repo\"));\n const preview = /** @type {HTMLElement | null} */ ($(\"#yaml-preview\"));\n const status = /** @type {HTMLElement | null} */ ($(\"#submit-status\"));\n const copyButton = /** @type {HTMLButtonElement | null} */ ($(\"#copy-yaml\"));\n const openPrLink = /** @type {HTMLAnchorElement | null} */ ($(\"#open-pr-link\"));\n const slugSet = new Set(existingSlugs);\n const repoSet = new Set(existingFullNames);\n const categoryIds = new Set(taxonomy?.categoryIds ?? []);\n const stackIds = new Set(taxonomy?.stackIds ?? []);\n const platformIds = new Set(taxonomy?.platformIds ?? []);\n\n const slugify = recordSlugify;\n const parseRepo = parseGithubRepo;\n const quote = yamlQuote;\n const lines = yamlLines;\n const inferStack = /** @param {GitHubRepo} repo */ (repo) =>\n inferStackFromTopics({ language: repo.language, topics: repo.topics });\n const selectedPlatforms = () =>\n /** @type {string[]} */ ([...document.querySelectorAll(\"input[name=platform]:checked\")].map((input) => /** @type {HTMLInputElement} */ (input).value));\n const setStatus = (text, tone = \"muted\") => {\n if (!status) return;\n status.textContent = text;\n // Status tokens (danger/warning/success) so the submit states use\n // the same semantic roles as the rest of the system.\n status.className = `mt-3 min-h-5 text-2xs ${tone === \"error\" ? \"text-danger\" : tone === \"warn\" ? \"text-warning\" : tone === \"success\" ? \"text-success\" : \"text-muted-foreground\"}`;\n };\n const generateYaml = () => {\n if (!repository) return \"\";\n const parsed = parseRepo(inputs.repo?.value ?? \"\");\n if (!parsed) return \"\";\n const tags = String(inputs.tags?.value ?? \"\").split(\",\").map((tag) => tag.trim()).filter(Boolean);\n const platforms = selectedPlatforms();\n const bestFor = String(inputs.bestFor?.value ?? \"\").split(\"\\n\").map((item) => item.trim()).filter(Boolean);\n return [\n \"kind: project\",\n `slug: ${slugify(inputs.slug?.value ?? repository.name)}`,\n // The day the record joins the directory. Without it the\n // `recently-added` sort has nothing to sort a new record on and\n // drops it to the bottom of the list built to show it off.\n `addedAt: ${new Date().toISOString().slice(0, 10)}`,\n `name: ${quote(inputs.name?.value ?? \"\")}`,\n `description: ${quote(inputs.description?.value ?? \"\")}`,\n ...(fields.category ? [`category: ${inputs.category?.value || \"uncategorized\"}`] : []),\n \"projectType: real-app\",\n ...(fields.stack && inputs.stack?.value ? [`stack: ${quote(inputs.stack.value)}`] : []),\n ...(fields.platforms ? [\"platforms:\", platforms.length ? lines(platforms) : \" []\"] : []),\n ...(fields.tags ? [\"tags:\", tags.length ? lines(tags) : \" []\"] : []),\n ...(fields.license && inputs.license?.value ? [\"licenses:\", lines([inputs.license.value])] : []),\n `repoUrl: ${repository.html_url}`,\n \"links:\",\n ` github: ${repository.html_url}`,\n ...(inputs.website?.value ? [` website: ${inputs.website.value}`] : []),\n \"bestFor:\", bestFor.length ? lines(bestFor) : \" []\",\n \"source:\",\n \" type: manual\",\n ` owner: ${parsed.owner}`,\n ` repo: ${parsed.repo}`,\n \"curation:\",\n \" reviewed: false\",\n \" labels: []\",\n \" lenses: []\",\n \"\",\n ].join(\"\\n\");\n };\n // NOTE: this taxonomy/slug membership logic duplicates a concern\n // that belongs in `@grove-dev/core` (domain/taxonomy rules, not\n // UI), but it can't be moved into an import here. This `<script>`\n // uses `define:vars` (see the tag above), which Astro's compiler\n // implicitly treats as `is:inline` — the script is emitted\n // verbatim into the page and is NOT run through Vite's bundler,\n // so a bare-specifier `import ... from \"@grove-dev/core\"` would\n // not resolve in the browser (no bundler rewrite, no import map).\n // `define:vars` itself only hands the script JSON-serializable\n // data (see `taxonomy`, `existingSlugs`, etc. above) — a function\n // reference can't cross that boundary either. Moving this out\n // would require converting the script off `is:inline`/`define:vars`\n // to a regular bundled `<script>` that reads its props from\n // `data-*` attributes or a JSON island, which is a larger\n // structural change than this fix warrants.\n const validationIssues = () => {\n const issues = [];\n if (inputs.slug && slugSet.has(slugify(inputs.slug.value))) {\n issues.push(\"A record with that slug already exists — update the existing one instead of opening a duplicate PR.\");\n }\n const description = String(inputs.description?.value ?? \"\");\n if (description.trim().length < 40) {\n issues.push(\"Description must be at least 40 characters.\");\n }\n if (fields.category && inputs.category) {\n const v = inputs.category.value;\n if (!v || v === \"uncategorized\" || (categoryIds.size > 0 && !categoryIds.has(v))) {\n issues.push(\"Choose a category from the taxonomy.\");\n }\n }\n if (fields.stack && inputs.stack) {\n const v = inputs.stack.value;\n if (!v || (stackIds.size > 0 && !stackIds.has(v))) {\n issues.push(\"Choose a primary stack from the taxonomy.\");\n }\n }\n if (fields.platforms && selectedPlatforms().length === 0) {\n issues.push(\"Select at least one platform.\");\n } else if (fields.platforms && platformIds.size > 0) {\n const bad = selectedPlatforms().find((p) => !platformIds.has(p));\n if (bad) issues.push(`Platform \"${bad}\" is not in the taxonomy.`);\n }\n return issues;\n };\n const refresh = () => {\n const yaml = generateYaml();\n if (preview) preview.textContent = yaml || \"Paste a GitHub URL to generate a draft.\";\n if (!yaml || !openPrLink || !copyButton) return;\n const issues = validationIssues();\n if (issues.length > 0) {\n setStatus(issues[0], \"error\");\n openPrLink.classList.add(\"pointer-events-none\", \"opacity-50\");\n copyButton.disabled = true;\n copyButton.classList.add(\"pointer-events-none\", \"opacity-50\");\n return;\n }\n const params = new URLSearchParams({ filename: `data/records/${slugify(inputs.slug?.value ?? \"\")}.yml`, value: yaml });\n openPrLink.href = `${repoUrl}/new/main?${params}`;\n openPrLink.classList.remove(\"pointer-events-none\", \"opacity-50\");\n copyButton.disabled = false;\n copyButton.classList.remove(\"pointer-events-none\", \"opacity-50\");\n };\n\n fetchButton?.addEventListener(\"click\", async () => {\n const parsed = parseRepo(inputs.repo?.value ?? \"\");\n if (!parsed) return setStatus(\"Enter a valid GitHub repository URL.\", \"error\");\n const fullName = `${parsed.owner}/${parsed.repo}`.toLowerCase();\n if (repoSet.has(fullName)) setStatus(\"This repository is already listed. The draft can update its record.\", \"warn\");\n if (fetchButton) fetchButton.disabled = true;\n setStatus(\"Fetching GitHub metadata...\");\n try {\n if (githubProxyPath) {\n // Server-side proxy (SSR consumers) — the endpoint reads an\n // optional `GITHUB_TOKEN` env var and forwards the request\n // with a Bearer header (or unauthenticated, if no token).\n const proxyUrl = `${githubProxyPath}?owner=${encodeURIComponent(parsed.owner)}&repo=${encodeURIComponent(parsed.repo)}`;\n const response = await fetch(proxyUrl);\n const payload = /** @type {{ ok: boolean; status?: number; message?: string; data?: GitHubRepo }} */ (await response.json());\n if (!response.ok || !payload.ok || !payload.data) {\n throw new Error(payload.message || `GitHub returned ${response.status}.`);\n }\n repository = payload.data;\n } else {\n // Static-build default — call api.github.com directly. The\n // raw payload carries the same field names the form fill\n // logic consumes (name, description, html_url, homepage,\n // language, private, topics).\n const response = await fetch(\n `https://api.github.com/repos/${encodeURIComponent(parsed.owner)}/${encodeURIComponent(parsed.repo)}`,\n { headers: { Accept: \"application/vnd.github+json\" } },\n );\n if (response.status === 404) {\n throw new Error(\"Repository not found or not public.\");\n }\n if (response.status === 403 || response.status === 429) {\n throw new Error(\n \"GitHub rate limit reached (60 requests/hour per visitor). Try again later or fill the fields manually.\",\n );\n }\n if (!response.ok) {\n throw new Error(`GitHub returned ${response.status}.`);\n }\n const data = /** @type {GitHubRepo & { topics?: string[] }} */ (await response.json());\n repository = {\n name: data.name,\n description: data.description ?? null,\n html_url: data.html_url,\n homepage: data.homepage ?? null,\n language: data.language ?? null,\n private: Boolean(data.private),\n topics: Array.isArray(data.topics) ? data.topics : [],\n };\n }\n if (repository.private) throw new Error(\"Private repositories cannot be submitted.\");\n if (inputs.name) inputs.name.value = repository.name || parsed.repo;\n if (inputs.slug) inputs.slug.value = slugify(repository.name || parsed.repo);\n if (inputs.description) inputs.description.value = repository.description || \"\";\n if (inputs.stack) inputs.stack.value = inferStack(repository);\n if (inputs.tags) inputs.tags.value = (repository.topics || []).slice(0, 8).join(\", \");\n if (inputs.website) inputs.website.value = repository.homepage || \"\";\n const duplicate = inputs.slug ? slugSet.has(inputs.slug.value) : false;\n setStatus(\n duplicate ? \"That slug already exists. Choose another or update the existing record.\" : \"Draft generated. Edit any field and the YAML will refresh.\",\n duplicate ? \"warn\" : \"success\",\n );\n refresh();\n } catch (error) {\n repository = null;\n setStatus(error instanceof Error ? error.message : \"Unable to fetch repository metadata.\", \"error\");\n } finally {\n if (fetchButton) fetchButton.disabled = false;\n }\n });\n $(\"#submit-form\")?.addEventListener(\"input\", refresh);\n $(\"#submit-form\")?.addEventListener(\"change\", refresh);\n copyButton?.addEventListener(\"click\", async () => {\n try {\n await navigator.clipboard.writeText(preview?.textContent || \"\");\n setStatus(\"Copied YAML to clipboard.\", \"success\");\n } catch {\n setStatus(\"Couldn't copy automatically. Select the YAML and copy it.\", \"error\");\n }\n });\n </script>\n",
406
+ "type": "registry:component",
407
+ "target": "~/src/components/grove/submission-client.astro"
408
+ },
409
+ {
410
+ "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}`} 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
+ "type": "registry:page",
413
+ "target": "~/src/pages/about.astro"
414
+ },
415
+ {
416
+ "path": "default/pages/contributors.astro",
417
+ "content": "---\n/**\n * Contributors page — full list with per-user contribution counts.\n *\n * Generic: works for any blueprint (project-directory, resource-hub,\n * ecosystem-map) and any source of contributors. Reads from\n * `data/generated/contributors.json` if present, otherwise renders\n * a graceful empty state. The file is produced by the\n * `sync-contributors` GitHub Action (see `.github/workflows/`).\n *\n * The list represents contributors to the directory's own source\n * repository. Project owners in the directory are a separate metric.\n */\nimport siteConfig from '@grove/generated/site-config.json';\nimport { getContributorsPageModel } from '@grove-dev/astro/server';\nimport EmptyState from '../components/ui/empty-state.astro';\nimport BaseLayout from '../layouts/base-layout.astro';\n\nconst {\n contributors: sorted,\n total,\n seo,\n contributorsGraphHref,\n showContributionCount,\n} = getContributorsPageModel(siteConfig);\n---\n\n<BaseLayout title={seo.title} description={seo.description} image={seo.image} jsonLd={seo.jsonLd} site={siteConfig}>\n <section class=\"py-12 sm:py-16\">\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n <span class=\"text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">\n Community\n </span>\n <h1 class=\"m-0 mt-2 text-[2rem] sm:text-[2.5rem] font-semibold leading-[1.05] tracking-tight text-ink-900 dark:text-ink-100\">\n {total > 0 ? `${total} community contributors` : \"Community\"}\n </h1>\n <p class=\"m-0 mt-3 max-w-2xl text-base leading-relaxed text-ink-700 dark:text-ink-200\">\n {total > 0\n ? `People who have improved ${siteConfig.name} through code, curation, and review.`\n : `Community profiles will appear after ${siteConfig.name} syncs its source repository metadata.`}\n </p>\n\n {contributorsGraphHref && (\n <p class=\"m-0 mt-3 text-sm text-ink-500 dark:text-ink-400\">\n <a\n href={contributorsGraphHref}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"font-medium underline decoration-ink-300 underline-offset-2 hover:decoration-ink-500 dark:decoration-ink-700 dark:hover:decoration-ink-400\"\n >\n GitHub contributors graph →\n </a>\n </p>\n )}\n </div>\n </section>\n\n {sorted.length === 0 ? (\n <section class=\"pb-12 sm:pb-16\">\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n <EmptyState\n title=\"No contributors synced yet\"\n description={`Contributor profiles come from data/generated/contributors.json, written by the weekly sync-contributors workflow. Run \"grove sync contributors\" (or wait for the scheduled sync) and every contributor avatar lands here.`}\n action={contributorsGraphHref\n ? { label: \"View contributors on GitHub\", href: contributorsGraphHref }\n : undefined}\n />\n </div>\n </section>\n ) : (\n <section class=\"py-12 sm:py-16\" aria-label=\"Contributors list\">\n <div class=\"mx-auto w-full max-w-container px-5 pb-16 sm:px-7\">\n <ul\n class=\"m-0 grid list-none grid-cols-2 gap-3 p-0 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6\"\n aria-label=\"Contributors\"\n >\n {sorted.map((c) => {\n const href = c.profileUrl ?? `https://github.com/${c.username}`;\n const avatar =\n c.avatarUrl ??\n `https://avatars.githubusercontent.com/${c.username}?v=4&s=80`;\n return (\n <li class=\"m-0 p-0\">\n <a\n href={href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"group rounded-[calc(var(--radius)+0.25rem)] border border-border bg-card shadow-none transition-colors flex flex-col items-center gap-2 p-3 text-center no-underline hover:border-ink-300 dark:hover:border-ink-700\"\n data-event=\"contributor_click\"\n data-event-source=\"contributors_page\"\n >\n <img\n src={avatar}\n alt={c.name ?? c.username}\n width=\"56\"\n height=\"56\"\n loading=\"lazy\"\n decoding=\"async\"\n class=\"h-14 w-14 rounded-full border border-ink-200 object-cover dark:border-ink-800\"\n />\n <span class=\"line-clamp-1 text-sm font-medium text-ink-700 group-hover:text-ink-900 dark:text-ink-300 dark:group-hover:text-ink-100\">\n {c.name ?? c.username}\n </span>\n <span class=\"text-2xs text-ink-500 dark:text-ink-400\">\n @{c.username}\n </span>\n {showContributionCount && typeof c.contributions === \"number\" && (\n <span class=\"font-mono text-2xs text-ink-400\">\n {c.contributions.toLocaleString()} contributions\n </span>\n )}\n </a>\n </li>\n );\n })}\n </ul>\n </div>\n </section>\n )}\n</BaseLayout>\n",
418
+ "type": "registry:page",
419
+ "target": "~/src/pages/contributors.astro"
420
+ },
421
+ {
422
+ "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}`} 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
+ "type": "registry:page",
425
+ "target": "~/src/pages/404.astro"
426
+ },
427
+ {
428
+ "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}`, variant: \"primary\" }}\n />\n </div>\n </section>\n</BaseLayout>\n",
430
+ "type": "registry:page",
431
+ "target": "~/src/pages/empty.astro"
432
+ }
433
+ ],
434
+ "meta": {
435
+ "version": "1.1.0",
436
+ "requiresGrove": "0.9.0"
437
+ },
438
+ "type": "registry:block"
439
+ }