@grove-dev/cli 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -14,6 +14,7 @@ import { buildMigrateCommand } from './migrate-cli.js';
14
14
  import { detectPackageManager, installCommand, localBin, runScriptCommand, } from './package-manager.js';
15
15
  import { buildReadmeCommand } from './readme-cli.js';
16
16
  import { run } from './run.js';
17
+ import { buildSeoCommand } from './seo-cli.js';
17
18
  import { formatCandidateRunSummary, runGithubSync } from './sync-github.js';
18
19
  import { appendSyncStepSummary, formatSyncSummaryText, syncExitCode } from './sync-summary.js';
19
20
  import { formatPlan, runUpdate } from './update.js';
@@ -187,6 +188,7 @@ program.addCommand(buildIconsCommand());
187
188
  program.addCommand(buildImportCommand());
188
189
  program.addCommand(buildMigrateCommand());
189
190
  program.addCommand(buildReadmeCommand());
191
+ program.addCommand(buildSeoCommand());
190
192
  program.parseAsync().catch((error) => {
191
193
  console.error(error instanceof Error ? error.message : String(error));
192
194
  process.exitCode = 1;
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EACL,YAAY,EACZ,UAAU,EACV,0BAA0B,EAC1B,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,GAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,kBAA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C,CAAC;AACzC,OAAO,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC,CAAC;AAEtC,OAAO,CAAC,UAAU,EAAE,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;IAC5C,OAAO,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACtE,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC"}
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grove-dev/cli",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "type": "module",
5
5
  "description": "Grove CLI — scaffolds Grove-powered spaces and orchestrates @grove-dev/core commands.",
6
6
  "license": "MIT",
package/dist/r/about.json CHANGED
@@ -16,8 +16,8 @@
16
16
  }
17
17
  ],
18
18
  "meta": {
19
- "version": "1.5.0",
20
- "requiresGrove": "1.0.0"
19
+ "version": "1.6.0",
20
+ "requiresGrove": "1.1.0"
21
21
  },
22
22
  "type": "registry:block"
23
23
  }
@@ -95,8 +95,8 @@
95
95
  }
96
96
  ],
97
97
  "meta": {
98
- "version": "1.5.0",
99
- "requiresGrove": "1.0.0"
98
+ "version": "1.6.0",
99
+ "requiresGrove": "1.1.0"
100
100
  },
101
101
  "type": "registry:block"
102
102
  }
@@ -83,8 +83,8 @@
83
83
  }
84
84
  ],
85
85
  "meta": {
86
- "version": "1.5.0",
87
- "requiresGrove": "1.0.0"
86
+ "version": "1.6.0",
87
+ "requiresGrove": "1.1.0"
88
88
  },
89
89
  "type": "registry:block"
90
90
  }
@@ -16,8 +16,8 @@
16
16
  }
17
17
  ],
18
18
  "meta": {
19
- "version": "1.5.0",
20
- "requiresGrove": "1.0.0"
19
+ "version": "1.6.0",
20
+ "requiresGrove": "1.1.0"
21
21
  },
22
22
  "type": "registry:block"
23
23
  }
@@ -54,7 +54,7 @@
54
54
  },
55
55
  {
56
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 /** Exact robots meta value (e.g. a page model's `seo.robots`); wins over `noindex`. */\n robots?: string;\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 robots,\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 // define:vars wraps this script in a function, so a plain\n // `function gtag` would stay local; the Back/Forward handler at\n // the end of <body> needs it on window.\n window.gtag = 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 robots={robots}\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 || typeof window.gtag !== \"function\") 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 // Links and cards carry `data-event` (+ optional\n // `data-event-source` / `data-event-item`); send each click as a\n // GA event so installs and outbound clicks per record are counted.\n document.addEventListener(\"click\", function (e) {\n var el = e.target instanceof Element ? e.target.closest(\"[data-event]\") : null;\n if (!el || typeof window.gtag !== \"function\") return;\n window.gtag(\"event\", el.getAttribute(\"data-event\"), {\n event_source: el.getAttribute(\"data-event-source\") || undefined,\n event_item: el.getAttribute(\"data-event-item\") || undefined,\n link_url: el.getAttribute(\"href\") || undefined,\n transport_type: \"beacon\",\n });\n });\n })();\n </script>\n )}\n </body>\n</html>\n",
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 /** Exact robots meta value (e.g. a page model's `seo.robots`); wins over `noindex`. */\n robots?: string;\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 /** Directory browse path for \"Browse all\" links. Defaults to the blueprint route. */\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 robots,\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 // define:vars wraps this script in a function, so a plain\n // `function gtag` would stay local; the Back/Forward handler at\n // the end of <body> needs it on window.\n window.gtag = 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 robots={robots}\n jsonLd={jsonLd}\n {...(image ? { image } : {})}\n imageAlt={imageAlt}\n site={site}\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 || typeof window.gtag !== \"function\") 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 // Links and cards carry `data-event` (+ optional\n // `data-event-source` / `data-event-item`); send each click as a\n // GA event so installs and outbound clicks per record are counted.\n document.addEventListener(\"click\", function (e) {\n var el = e.target instanceof Element ? e.target.closest(\"[data-event]\") : null;\n if (!el || typeof window.gtag !== \"function\") return;\n window.gtag(\"event\", el.getAttribute(\"data-event\"), {\n event_source: el.getAttribute(\"data-event-source\") || undefined,\n event_item: el.getAttribute(\"data-event-item\") || undefined,\n link_url: el.getAttribute(\"href\") || undefined,\n transport_type: \"beacon\",\n });\n });\n })();\n </script>\n )}\n </body>\n</html>\n",
58
58
  "type": "registry:component",
59
59
  "target": "~/src/layouts/base-layout.astro"
60
60
  },
@@ -72,7 +72,7 @@
72
72
  },
73
73
  {
74
74
  "path": "default/layouts/header.astro",
75
- "content": "---\n/**\n * Header — sticky brand + nav + theme toggle.\n *\n * Generic: takes a `site` prop with brand + nav. No `siteConfig`\n * import — consumers compose the props from their own config.\n *\n * Optional `submit` button renders a \"Submit app\" / \"Submit project\"\n * call-to-action on the right side of the nav. Set `submitHref` /\n * `submitLabel` to enable, leave them undefined for a clean header.\n *\n * Optional `repoUrl` adds a \"View source\" GitHub button. Set\n * `repoLabel` to change the visible text.\n *\n * A nav item with `children` opens a menu panel; `menu: \"collections\"`\n * fills the panel from the collection files. The item whose `href` (or\n * a child's) prefixes the current path is marked `aria-current`.\n */\n\nimport { loadCollections } from '@grove-dev/astro/server';\nimport { compact } from '@grove-dev/core';\nimport ThemeToggle from '../components/site/theme-toggle.astro';\nimport { buttonClass } from '../lib/classnames.ts';\n\ninterface NavLink {\n label: string;\n href: string;\n description?: string;\n}\n\ninterface NavItem extends NavLink {\n children?: NavLink[];\n menu?: 'collections';\n}\n\ninterface Site {\n name: string;\n tagline?: string;\n nav: NavItem[];\n description?: string;\n repoUrl?: string;\n url?: string;\n /** Logo path under `public/` (e.g. `/logo.svg`). */\n logo?: string;\n stats?: {\n /** Stars on this site's own source repository. */\n repositoryStars?: number;\n };\n blueprintConfig?: {\n routeSlug?: string;\n };\n}\n\ninterface Props {\n site: Site;\n /** Submit button label, e.g. \"Submit app\". Omit to hide. */\n submitLabel?: string;\n /** Submit button href, e.g. \"/submit\". Omit to hide. */\n submitHref?: string;\n /** GitHub button label, e.g. \"View source\". */\n repoLabel?: string;\n /** Extra class for the outer header element. */\n class?: string;\n}\n\nconst { site, submitLabel, submitHref, repoLabel = 'Star', class: className = '' } = Astro.props;\nconst directoryPath = `/${site.blueprintConfig?.routeSlug ?? 'items'}`;\nconst defaultNavItems = site.blueprintConfig\n ? [\n { label: 'Recently added', href: `${directoryPath}?sort=recently-added` },\n { label: 'Trending', href: `${directoryPath}?label=hot` },\n { label: 'Categories', href: '/categories' },\n { label: 'Stacks', href: '/stacks' },\n { label: 'About', href: '/about' },\n ]\n : [];\nconst navItems: NavItem[] = site.nav?.length ? site.nav : defaultNavItems;\n\n// Resolve menus: explicit children, or the collection files for\n// `menu: \"collections\"` (loaded only when a nav item asks for them).\nconst collections = navItems.some((item) => item.menu === 'collections')\n ? await loadCollections(process.cwd())\n : [];\nconst menus = navItems.map((item) => {\n const children: NavLink[] =\n item.menu === 'collections'\n ? collections\n .map((c) => ({\n label: c.title,\n href: `/collections/${c.slug}/`,\n description: c.description,\n }))\n .sort((a, b) => a.label.localeCompare(b.label))\n : (item.children ?? []);\n return {\n ...item,\n children,\n footer: item.menu === 'collections' ? { label: 'All collections', href: item.href } : undefined,\n };\n});\nconst withSlash = (path: string) => (path.endsWith('/') ? path : `${path}/`);\nconst pathname = withSlash(Astro.url.pathname);\nconst isCurrent = (item: (typeof menus)[number]) =>\n [item.href, ...item.children.map((c) => c.href)]\n .map((href) => withSlash(href.split('?')[0] ?? ''))\n .some((href) => href !== '/' && pathname.startsWith(href));\nconst stars = site.stats?.repositoryStars;\nconst starsLabel = typeof stars === 'number' ? compact(stars) : null;\n---\n\n<header\n class:list={[\n \"border-border bg-background/85 sticky top-0 z-50 border-b backdrop-blur\",\n className,\n ]}\n>\n <div\n class=\"mx-auto flex w-full max-w-container items-center gap-3 px-5 py-3 sm:gap-6 sm:px-7\"\n >\n <a\n href=\"/\"\n class=\"inline-flex min-w-0 shrink items-center gap-2 text-[0.95rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100\"\n >\n {site.logo ? (\n <img\n src={site.logo}\n alt=\"\"\n aria-hidden=\"true\"\n width=\"18\"\n height=\"18\"\n class=\"inline-block h-[18px] w-[18px] shrink-0 object-contain\"\n />\n ) : (\n /* No logo configured — a neutral mark is the honest default.\n Set `site.logo` in grove.config.ts to replace it. */\n <span\n aria-hidden=\"true\"\n class=\"inline-block h-[18px] w-[18px] rounded bg-ink-900 dark:bg-ink-100\"\n ></span>\n )}\n <span class=\"truncate\">{site.name}</span>\n </a>\n\n <nav class=\"hidden flex-1 md:block\" aria-label=\"Primary\">\n <ul class=\"m-0 flex list-none items-center gap-1 p-0\">\n {menus.map((menu) => {\n const current = isCurrent(menu);\n const itemClass = [\n \"relative inline-flex h-8 cursor-pointer list-none items-center gap-1 rounded-[var(--radius)] px-2.5 text-[0.875rem] font-medium no-underline outline-none transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/35 [&::-webkit-details-marker]:hidden\",\n current ? \"text-foreground after:absolute after:inset-x-2.5 after:-bottom-[0.8125rem] after:h-0.5 after:rounded-full after:bg-foreground after:content-['']\" : \"text-muted-foreground\",\n ].join(\" \");\n return (\n <li class=\"relative\">\n {menu.children.length > 0 ? (\n <details class=\"group\" data-nav-menu>\n <summary class={itemClass} aria-current={current ? \"page\" : undefined}>\n {menu.label}\n <svg viewBox=\"0 0 16 16\" width=\"12\" height=\"12\" aria-hidden=\"true\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"opacity-60 transition-transform group-open:rotate-180\"><path d=\"m4 6 4 4 4-4\"></path></svg>\n </summary>\n <div class:list={[\n \"absolute left-0 top-[calc(100%+0.625rem)] z-50 rounded-[var(--radius-lg)] border border-border bg-popover p-2 shadow-lg\",\n menu.children.length > 5 ? \"w-[34rem]\" : \"w-80\",\n ]}>\n <ul class:list={[\"m-0 grid list-none gap-0.5 p-0\", menu.children.length > 5 && \"grid-cols-2\"]}>\n {menu.children.map((item) => (\n <li>\n <a href={item.href} class=\"block rounded-[var(--radius)] px-3 py-2 no-underline outline-none hover:bg-accent focus-visible:bg-accent\">\n <span class=\"block text-sm font-medium text-foreground\">{item.label}</span>\n {item.description && <span class=\"mt-0.5 line-clamp-2 block text-2xs leading-snug text-muted-foreground\">{item.description}</span>}\n </a>\n </li>\n ))}\n </ul>\n {menu.footer && (\n <a href={menu.footer.href} class=\"mt-1 flex items-center justify-between rounded-[var(--radius)] border-t border-border px-3 pb-1 pt-2.5 text-sm font-medium text-foreground no-underline hover:underline\">\n {menu.footer.label}<span aria-hidden=\"true\">→</span>\n </a>\n )}\n </div>\n </details>\n ) : (\n <a href={menu.href} class={itemClass} aria-current={current ? \"page\" : undefined}>{menu.label}</a>\n )}\n </li>\n );\n })}\n </ul>\n </nav>\n\n <div class=\"ml-auto flex items-center gap-2\">\n <details class=\"group relative md:hidden\" data-nav-menu>\n <summary class=\"inline-flex h-9 cursor-pointer list-none items-center justify-center gap-1.5 rounded-[var(--radius)] border border-border bg-secondary px-2.5 text-sm font-medium text-foreground hover:bg-accent focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/35 [&::-webkit-details-marker]:hidden\">\n <svg viewBox=\"0 0 16 16\" width=\"14\" height=\"14\" aria-hidden=\"true\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\"><path d=\"M2.5 4.5h11M2.5 8h11M2.5 11.5h11\"></path></svg>\n Menu\n </summary>\n <nav aria-label=\"Mobile primary\" class=\"fixed inset-x-3 top-[3.75rem] z-50 max-h-[calc(100dvh-5rem)] overflow-y-auto rounded-[var(--radius-lg)] border border-border bg-popover p-3 shadow-lg\">\n <ul class=\"m-0 flex list-none flex-col gap-3 p-0\">\n {menus.map((menu) => (\n <li>\n <a href={menu.href} aria-current={isCurrent(menu) ? \"page\" : undefined} class=\"block rounded-md px-2 py-1.5 text-sm font-semibold text-foreground no-underline hover:bg-accent aria-[current=page]:bg-accent\">{menu.label}</a>\n {menu.children.length > 0 && (\n <ul class=\"m-0 mt-1 grid list-none grid-cols-2 gap-0.5 p-0\">\n {menu.children.map((item) => (\n <li><a href={item.href} class=\"block truncate rounded-md px-2 py-1.5 text-sm text-muted-foreground no-underline hover:bg-accent hover:text-foreground\">{item.label}</a></li>\n ))}\n </ul>\n )}\n </li>\n ))}\n {submitHref && (\n <li class=\"border-t border-border pt-3\">\n <a href={submitHref} class={buttonClass(\"primary\", \"md\", \"w-full justify-center\")}>{submitLabel ?? \"Submit\"}</a>\n </li>\n )}\n </ul>\n </nav>\n </details>\n\n {submitHref && (\n <a\n href={submitHref}\n class={buttonClass(\"primary\", \"sm\", \"max-sm:!hidden\")}\n >\n <svg\n viewBox=\"0 0 16 16\"\n width=\"13\"\n height=\"13\"\n aria-hidden=\"true\"\n fill=\"currentColor\"\n >\n <path d=\"M7.75 2a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 7.75 2Z\"></path>\n </svg>\n <span>{submitLabel ?? \"Submit\"}</span>\n </a>\n )}\n\n {site.repoUrl && (\n <a\n href={site.repoUrl}\n target=\"_blank\"\n rel=\"noopener\"\n aria-label={`${repoLabel} on GitHub${starsLabel ? ` — ${starsLabel} stars` : \"\"}`}\n title={`${repoLabel} on GitHub`}\n class={buttonClass(\"secondary\", \"bare\", \"h-8 overflow-hidden p-0 text-sm\")}\n >\n <span class=\"flex items-center gap-1.5 px-2.5 py-1.5 text-ink-900 dark:text-ink-100\">\n <svg viewBox=\"0 0 16 16\" width=\"16\" height=\"16\" aria-hidden=\"true\" fill=\"currentColor\">\n <path d=\"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38v-1.33c-2.22.48-2.69-1.07-2.69-1.07-.36-.92-.89-1.17-.89-1.17-.73-.5.05-.49.05-.49.8.06 1.23.83 1.23.83.72 1.22 1.87.87 2.33.67.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48v2.19c0 .21.15.46.55.38A8 8 0 0 0 8 0Z\"></path>\n </svg>\n <span class=\"hidden lg:inline\">{repoLabel}</span>\n </span>\n {starsLabel && <span class=\"hidden items-center gap-1 border-s border-border bg-secondary px-2 py-1.5 text-secondary-foreground sm:flex\">\n <svg viewBox=\"0 0 16 16\" width=\"11\" height=\"11\" aria-hidden=\"true\" fill=\"currentColor\" class=\"text-warning\">\n <path d=\"M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Z\"></path>\n </svg>\n <span class=\"font-mono\">{starsLabel}</span>\n </span>}\n </a>\n )}\n\n <ThemeToggle />\n </div>\n </div>\n</header>\n\n<script>\n // Nav menus are <details>: one open at a time, closed by Escape,\n // an outside click, or following a link inside the panel.\n const menus = [...document.querySelectorAll<HTMLDetailsElement>(\"[data-nav-menu]\")];\n const closeAll = (except?: HTMLDetailsElement) =>\n menus.forEach((menu) => { if (menu !== except) menu.open = false; });\n menus.forEach((menu) => {\n menu.addEventListener(\"toggle\", () => { if (menu.open) closeAll(menu); });\n menu.addEventListener(\"click\", (e) => {\n if ((e.target as HTMLElement).closest(\"a\")) menu.open = false;\n });\n });\n document.addEventListener(\"click\", (e) => {\n if (!(e.target as HTMLElement).closest(\"[data-nav-menu]\")) closeAll();\n });\n document.addEventListener(\"keydown\", (e) => {\n if (e.key !== \"Escape\") return;\n const open = menus.find((menu) => menu.open);\n if (!open) return;\n open.open = false;\n open.querySelector(\"summary\")?.focus();\n });\n\n // Smooth-scroll for in-page anchor links (Header nav + Hero CTA).\n // Works on any <a href=\"#…\"> that points to an existing element on\n // the current page. External links (e.g. /about, /projects?…) are\n // skipped because they don't start with \"#\". Modifier-clicks\n // (Cmd/Ctrl/Shift/middle) let the browser handle the anchor\n // normally so users can open the same section in a new tab.\n document.addEventListener(\"click\", (e) => {\n if (e.defaultPrevented) return;\n if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return;\n if (e.button !== 0) return;\n const link = (e.target as HTMLElement).closest<HTMLAnchorElement>(\n 'a[href^=\"#\"]',\n );\n if (!link) return;\n const id = link.getAttribute(\"href\")!;\n if (id.length <= 1) return;\n const target = document.querySelector(id);\n if (!target) return;\n e.preventDefault();\n target.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\n history.replaceState(null, \"\", id);\n });\n</script>\n",
75
+ "content": "---\n/**\n * Header — sticky brand + nav + theme toggle.\n *\n * Generic: takes a `site` prop with brand + nav. No `siteConfig`\n * import — consumers compose the props from their own config.\n *\n * Optional `submit` button renders a \"Submit app\" / \"Submit project\"\n * call-to-action on the right side of the nav. Set `submitHref` /\n * `submitLabel` to enable, leave them undefined for a clean header.\n *\n * Optional `repoUrl` adds a \"View source\" GitHub button. Set\n * `repoLabel` to change the visible text.\n *\n * A nav item with `children` opens a menu panel; `menu: \"collections\"`\n * fills the panel from the collection files. The item whose `href` (or\n * a child's) prefixes the current path is marked `aria-current`.\n */\n\nimport { loadCollections } from '@grove-dev/astro/server';\nimport { compact } from '@grove-dev/core';\nimport ThemeToggle from '../components/site/theme-toggle.astro';\nimport { buttonClass } from '../lib/classnames.ts';\n\ninterface NavLink {\n label: string;\n href: string;\n description?: string;\n}\n\ninterface NavItem extends NavLink {\n children?: NavLink[];\n menu?: 'collections';\n /** Collection slugs the collections menu shows, in order. */\n featured?: string[];\n}\n\ninterface NavGroup {\n label: string;\n items: NavLink[];\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 /** Subjects name alternatives hubs in the collections menu (\"Notion\"). */\n taxonomy?: {\n subjects?: { id: string; name: string }[];\n };\n}\n\ninterface Props {\n site: Site;\n /** Submit button label, e.g. \"Submit app\". Omit to hide. */\n submitLabel?: string;\n /** Submit button href, e.g. \"/submit\". Omit to hide. */\n submitHref?: string;\n /** GitHub button label, e.g. \"View source\". */\n repoLabel?: string;\n /** Extra class for the outer header element. */\n class?: string;\n}\n\nconst { site, submitLabel, submitHref, repoLabel = 'Star', class: className = '' } = Astro.props;\nconst directoryPath = `/${site.blueprintConfig?.routeSlug ?? 'items'}`;\nconst defaultNavItems = site.blueprintConfig\n ? [\n { label: 'Recently added', href: `${directoryPath}?sort=recently-added` },\n { label: 'Trending', href: `${directoryPath}?label=hot` },\n { label: 'Categories', href: '/categories' },\n { label: 'Stacks', href: '/stacks' },\n { label: 'About', href: '/about' },\n ]\n : [];\nconst navItems: NavItem[] = site.nav?.length ? site.nav : defaultNavItems;\n\n// Resolve menus: explicit children, or the collection files for\n// `menu: \"collections\"` (loaded only when a nav item asks for them).\nconst collections = navItems.some((item) => item.menu === 'collections')\n ? await loadCollections(process.cwd())\n : [];\n// The collections menu is a shortcut, not the index: `featured` slugs (or\n// the first ten by title), titles only, and a footer link to all of them.\n// An alternatives hub (a collection with a `subject`) is named by the\n// product alone (\"Notion\") and grouped apart from the other lists.\nconst MENU_COLLECTIONS = 10;\nconst subjectNames = new Map((site.taxonomy?.subjects ?? []).map((s) => [s.id, s.name]));\nconst collectionGroups = (featured?: string[]): NavGroup[] => {\n const all = collections as { slug: string; title: string; subject?: string }[];\n const picked = featured?.length\n ? featured.flatMap((slug) => all.filter((c) => c.slug === slug))\n : [...all].sort((a, b) => a.title.localeCompare(b.title)).slice(0, MENU_COLLECTIONS);\n const hubs: NavLink[] = [];\n const lists: NavLink[] = [];\n for (const c of picked) {\n const href = `/collections/${c.slug}/`;\n const name = c.subject ? subjectNames.get(c.subject) : undefined;\n if (name) hubs.push({ label: name, href });\n else lists.push({ label: c.title, href });\n }\n return [\n { label: 'Alternatives to', items: hubs },\n { label: 'Curated lists', items: lists },\n ].filter((g) => g.items.length > 0);\n};\nconst menus = navItems.map((item) => {\n const groups = item.menu === 'collections' ? collectionGroups(item.featured) : undefined;\n const children: NavLink[] = groups ? groups.flatMap((g) => g.items) : (item.children ?? []);\n return {\n ...item,\n children,\n groups,\n footer:\n item.menu === 'collections'\n ? { label: `All ${collections.length} collections`, href: item.href }\n : undefined,\n };\n});\nconst withSlash = (path: string) => (path.endsWith('/') ? path : `${path}/`);\nconst pathname = withSlash(Astro.url.pathname);\nconst isCurrent = (item: (typeof menus)[number]) =>\n [item.href, ...item.children.map((c) => c.href)]\n .map((href) => withSlash(href.split('?')[0] ?? ''))\n .some((href) => href !== '/' && pathname.startsWith(href));\nconst stars = site.stats?.repositoryStars;\nconst starsLabel = typeof stars === 'number' ? compact(stars) : null;\n---\n\n<header\n class:list={[\n \"border-border bg-background/85 sticky top-0 z-50 border-b backdrop-blur\",\n className,\n ]}\n>\n <div\n class=\"mx-auto flex w-full max-w-container items-center gap-3 px-5 py-3 sm:gap-6 sm:px-7\"\n >\n <a\n href=\"/\"\n class=\"inline-flex min-w-0 shrink items-center gap-2 text-[0.95rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100\"\n >\n {site.logo ? (\n <img\n src={site.logo}\n alt=\"\"\n aria-hidden=\"true\"\n width=\"18\"\n height=\"18\"\n class=\"inline-block h-[18px] w-[18px] shrink-0 object-contain\"\n />\n ) : (\n /* No logo configured — a neutral mark is the honest default.\n Set `site.logo` in grove.config.ts to replace it. */\n <span\n aria-hidden=\"true\"\n class=\"inline-block h-[18px] w-[18px] rounded bg-ink-900 dark:bg-ink-100\"\n ></span>\n )}\n <span class=\"truncate\">{site.name}</span>\n </a>\n\n <nav class=\"hidden flex-1 md:block\" aria-label=\"Primary\">\n <ul class=\"m-0 flex list-none items-center gap-1 p-0\">\n {menus.map((menu) => {\n const current = isCurrent(menu);\n const itemClass = [\n \"relative inline-flex h-8 cursor-pointer list-none items-center gap-1 rounded-[var(--radius)] px-2.5 text-[0.875rem] font-medium no-underline outline-none transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/35 [&::-webkit-details-marker]:hidden\",\n current ? \"text-foreground after:absolute after:inset-x-2.5 after:-bottom-[0.8125rem] after:h-0.5 after:rounded-full after:bg-foreground after:content-['']\" : \"text-muted-foreground\",\n ].join(\" \");\n return (\n <li class=\"relative\">\n {menu.children.length > 0 ? (\n <details class=\"group\" data-nav-menu>\n <summary class={itemClass} aria-current={current ? \"page\" : undefined}>\n {menu.label}\n <svg viewBox=\"0 0 16 16\" width=\"12\" height=\"12\" aria-hidden=\"true\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"opacity-60 transition-transform group-open:rotate-180\"><path d=\"m4 6 4 4 4-4\"></path></svg>\n </summary>\n <div class:list={[\n \"absolute left-0 top-[calc(100%+0.625rem)] z-50 rounded-[var(--radius-lg)] border border-border bg-popover p-2 shadow-lg\",\n menu.groups ? \"w-[30rem]\" : menu.children.length > 5 ? \"w-[34rem]\" : \"w-80\",\n ]}>\n {menu.groups ? (\n menu.groups.map((group) => (\n <div class=\"px-1 pb-1 pt-1.5\">\n <p class=\"m-0 px-2 pb-1 text-2xs font-medium uppercase tracking-wide text-muted-foreground\">{group.label}</p>\n <ul class:list={[\"m-0 grid list-none gap-0 p-0\", group.items.length > 3 ? \"grid-cols-2\" : \"grid-cols-1\"]}>\n {group.items.map((item) => (\n <li>\n <a href={item.href} aria-current={pathname === item.href ? \"page\" : undefined} class=\"block truncate rounded-[var(--radius)] px-2 py-1.5 text-sm text-foreground no-underline outline-none hover:bg-accent focus-visible:bg-accent aria-[current=page]:bg-accent\">{item.label}</a>\n </li>\n ))}\n </ul>\n </div>\n ))\n ) : (\n <ul class:list={[\"m-0 grid list-none gap-0.5 p-0\", menu.children.length > 5 && \"grid-cols-2\"]}>\n {menu.children.map((item) => (\n <li>\n <a href={item.href} class=\"block rounded-[var(--radius)] px-3 py-2 no-underline outline-none hover:bg-accent focus-visible:bg-accent\">\n <span class=\"block text-sm font-medium text-foreground\">{item.label}</span>\n {item.description && <span class=\"mt-0.5 line-clamp-2 block text-2xs leading-snug text-muted-foreground\">{item.description}</span>}\n </a>\n </li>\n ))}\n </ul>\n )}\n {menu.footer && (\n <a href={menu.footer.href} class=\"mt-1 flex items-center justify-between rounded-[var(--radius)] border-t border-border px-3 pb-1 pt-2.5 text-sm font-medium text-foreground no-underline hover:underline\">\n {menu.footer.label}<span aria-hidden=\"true\">→</span>\n </a>\n )}\n </div>\n </details>\n ) : (\n <a href={menu.href} class={itemClass} aria-current={current ? \"page\" : undefined}>{menu.label}</a>\n )}\n </li>\n );\n })}\n </ul>\n </nav>\n\n <div class=\"ml-auto flex items-center gap-2\">\n <details class=\"group relative md:hidden\" data-nav-menu>\n <summary class=\"inline-flex h-9 cursor-pointer list-none items-center justify-center gap-1.5 rounded-[var(--radius)] border border-border bg-secondary px-2.5 text-sm font-medium text-foreground hover:bg-accent focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/35 [&::-webkit-details-marker]:hidden\">\n <svg viewBox=\"0 0 16 16\" width=\"14\" height=\"14\" aria-hidden=\"true\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\"><path d=\"M2.5 4.5h11M2.5 8h11M2.5 11.5h11\"></path></svg>\n Menu\n </summary>\n <nav aria-label=\"Mobile primary\" class=\"fixed inset-x-3 top-[3.75rem] z-50 max-h-[calc(100dvh-5rem)] overflow-y-auto rounded-[var(--radius-lg)] border border-border bg-popover p-3 shadow-lg\">\n <ul class=\"m-0 flex list-none flex-col gap-3 p-0\">\n {menus.map((menu) => (\n <li>\n <a href={menu.href} aria-current={isCurrent(menu) ? \"page\" : undefined} class=\"block rounded-md px-2 py-1.5 text-sm font-semibold text-foreground no-underline hover:bg-accent aria-[current=page]:bg-accent\">{menu.label}</a>\n {menu.children.length > 0 && (\n <ul class=\"m-0 mt-1 grid list-none grid-cols-2 gap-0.5 p-0\">\n {menu.children.map((item) => (\n <li><a href={item.href} class=\"block truncate rounded-md px-2 py-1.5 text-sm text-muted-foreground no-underline hover:bg-accent hover:text-foreground\">{item.label}</a></li>\n ))}\n </ul>\n )}\n </li>\n ))}\n {submitHref && (\n <li class=\"border-t border-border pt-3\">\n <a href={submitHref} class={buttonClass(\"primary\", \"md\", \"w-full justify-center\")}>{submitLabel ?? \"Submit\"}</a>\n </li>\n )}\n </ul>\n </nav>\n </details>\n\n {submitHref && (\n <a\n href={submitHref}\n class={buttonClass(\"primary\", \"sm\", \"max-sm:!hidden\")}\n >\n <svg\n viewBox=\"0 0 16 16\"\n width=\"13\"\n height=\"13\"\n aria-hidden=\"true\"\n fill=\"currentColor\"\n >\n <path d=\"M7.75 2a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 7.75 2Z\"></path>\n </svg>\n <span>{submitLabel ?? \"Submit\"}</span>\n </a>\n )}\n\n {site.repoUrl && (\n <a\n href={site.repoUrl}\n target=\"_blank\"\n rel=\"noopener\"\n aria-label={`${repoLabel} on GitHub${starsLabel ? ` — ${starsLabel} stars` : \"\"}`}\n title={`${repoLabel} on GitHub`}\n class={buttonClass(\"secondary\", \"bare\", \"h-8 overflow-hidden p-0 text-sm\")}\n >\n <span class=\"flex items-center gap-1.5 px-2.5 py-1.5 text-ink-900 dark:text-ink-100\">\n <svg viewBox=\"0 0 16 16\" width=\"16\" height=\"16\" aria-hidden=\"true\" fill=\"currentColor\">\n <path d=\"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38v-1.33c-2.22.48-2.69-1.07-2.69-1.07-.36-.92-.89-1.17-.89-1.17-.73-.5.05-.49.05-.49.8.06 1.23.83 1.23.83.72 1.22 1.87.87 2.33.67.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48v2.19c0 .21.15.46.55.38A8 8 0 0 0 8 0Z\"></path>\n </svg>\n <span class=\"hidden lg:inline\">{repoLabel}</span>\n </span>\n {starsLabel && <span class=\"hidden items-center gap-1 border-s border-border bg-secondary px-2 py-1.5 text-secondary-foreground sm:flex\">\n <svg viewBox=\"0 0 16 16\" width=\"11\" height=\"11\" aria-hidden=\"true\" fill=\"currentColor\" class=\"text-warning\">\n <path d=\"M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Z\"></path>\n </svg>\n <span class=\"font-mono\">{starsLabel}</span>\n </span>}\n </a>\n )}\n\n <ThemeToggle />\n </div>\n </div>\n</header>\n\n<script>\n // Nav menus are <details>: one open at a time, closed by Escape,\n // an outside click, or following a link inside the panel.\n const menus = [...document.querySelectorAll<HTMLDetailsElement>(\"[data-nav-menu]\")];\n const closeAll = (except?: HTMLDetailsElement) =>\n menus.forEach((menu) => { if (menu !== except) menu.open = false; });\n menus.forEach((menu) => {\n menu.addEventListener(\"toggle\", () => { if (menu.open) closeAll(menu); });\n menu.addEventListener(\"click\", (e) => {\n if ((e.target as HTMLElement).closest(\"a\")) menu.open = false;\n });\n });\n document.addEventListener(\"click\", (e) => {\n if (!(e.target as HTMLElement).closest(\"[data-nav-menu]\")) closeAll();\n });\n document.addEventListener(\"keydown\", (e) => {\n if (e.key !== \"Escape\") return;\n const open = menus.find((menu) => menu.open);\n if (!open) return;\n open.open = false;\n open.querySelector(\"summary\")?.focus();\n });\n\n // Smooth-scroll for in-page anchor links (Header nav + Hero CTA).\n // Works on any <a href=\"#…\"> that points to an existing element on\n // the current page. External links (e.g. /about, /projects?…) are\n // skipped because they don't start with \"#\". Modifier-clicks\n // (Cmd/Ctrl/Shift/middle) let the browser handle the anchor\n // normally so users can open the same section in a new tab.\n document.addEventListener(\"click\", (e) => {\n if (e.defaultPrevented) return;\n if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return;\n if (e.button !== 0) return;\n const link = (e.target as HTMLElement).closest<HTMLAnchorElement>(\n 'a[href^=\"#\"]',\n );\n if (!link) return;\n const id = link.getAttribute(\"href\")!;\n if (id.length <= 1) return;\n const target = document.querySelector(id);\n if (!target) return;\n e.preventDefault();\n target.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\n history.replaceState(null, \"\", id);\n });\n</script>\n",
76
76
  "type": "registry:component",
77
77
  "target": "~/src/layouts/header.astro"
78
78
  },
@@ -84,7 +84,7 @@
84
84
  },
85
85
  {
86
86
  "path": "default/layouts/seo.astro",
87
- "content": "---\n// SPDX-License-Identifier: MIT\n\n/**\n * Per-page SEO: <title>, description, canonical, Open Graph, Twitter Card,\n * and JSON-LD structured data. Designed to be used inside <head> by the\n * BaseLayout. Pages pass the rich props they care about; everything else\n * has a sensible default derived from the site config and the Astro URL.\n *\n * Renders:\n * - <title>, meta description, canonical link, robots\n * - Open Graph (og:*) for Facebook, LinkedIn, Discord, Slack, etc.\n * - Twitter Card (twitter:*) for X / Twitter\n * - JSON-LD WebSite+Organization identity graph on every page\n * (built by @grove-dev/core's `siteSchema`, with a SearchAction\n * pointing at the directory's browse page)\n * - Per-page JSON-LD nodes when `jsonLd` is provided (SoftwareApplication\n * on record pages, CollectionPage/ItemList/BreadcrumbList on\n * collection and taxonomy pages, ...)\n *\n * Noindex is opt-in via the `noindex` prop. By default everything is\n * indexable; noindex targets today are /submit, /404, and /empty.\n * `robots` sets the exact value instead — page models pass\n * `noindex,follow` for pages the index policy (`seo.*IndexPolicy`)\n * excludes, so their links are still followed.\n *\n * Any URL with a query string (`?q=`, `?sort=`, facet filters) is a\n * filtered view of a static page: the server sends the base page's\n * HTML, canonical included. A small inline script switches the robots\n * meta to `noindex,follow` on those URLs so the variant itself is not\n * indexed; Google renders JavaScript and honours a robots meta the page\n * sets at runtime. A server-side `X-Robots-Tag` is stronger where the\n * host allows it (see the SEO docs).\n */\nimport { type JsonLdNode, siteSchema, validateJsonLd } from '@grove-dev/core';\n\ninterface Props {\n title: string;\n description: string;\n site: {\n name: string;\n description?: string;\n repoUrl?: string;\n /** Header logo path under `public/` — used as Organization logo when set. */\n logo?: string;\n /** BCP-47 language tag (e.g. \"en\"). Drives og:locale + JSON-LD inLanguage. */\n locale?: string;\n /** Twitter/X handle (e.g. \"@grove\") — emitted as twitter:site. */\n twitter?: string;\n };\n searchPath?: string;\n /** Open Graph / Twitter image. Default: /og-image.svg. Should be absolute or root-relative. */\n image?: string;\n /** Alt text for the OG/Twitter image. Default: \"<site name> social preview\". */\n imageAlt?: string;\n /** og:type. Default: \"website\". Use \"article\" for blog posts / changelog. */\n type?: 'website' | 'article' | 'profile';\n /** Set true to add noindex,nofollow. */\n noindex?: boolean;\n /** Exact robots meta value (e.g. \"noindex,follow\"); wins over `noindex`. */\n robots?: string;\n /** Extra JSON-LD payload (object) — typically SoftwareSourceCode on item pages. */\n jsonLd?: Record<string, unknown> | Record<string, unknown>[];\n}\n\nconst {\n title,\n description,\n site: siteConfig,\n searchPath = '/items',\n image = '/og-image.svg',\n imageAlt,\n type = 'website',\n noindex = false,\n robots,\n jsonLd,\n} = Astro.props;\nconst robotsContent =\n robots ?? (noindex ? 'noindex,nofollow' : 'index,follow,max-image-preview:large');\n\n// `Astro.site` is required for canonical / OG / Twitter / JSON-LD URLs to\n// resolve to the consumer's domain. Failing the build (rather than silently\n// emitting `https://example.com/...`) is the right call: every canonical,\n// OG, and JSON-LD URL would otherwise leak to a domain the consumer doesn't\n// own, which search engines either ignore or treat as canonical to the\n// wrong host.\nif (!Astro.site) {\n throw new Error(\n \"Seo: `site` is not set on the Astro config. Add `site: 'https://your-domain'` to astro.config.mjs so canonical / Open Graph / Twitter / JSON-LD URLs resolve correctly.\",\n );\n}\nconst siteUrl = Astro.site;\nconst canonical = new URL(Astro.url.pathname, siteUrl).toString();\nconst ogImage = new URL(image, siteUrl).toString();\nconst ogImageAlt = imageAlt ?? `${siteConfig.name} social preview`;\nconst locale = siteConfig.locale ?? 'en';\n\n// Truncate description for OG/Twitter where longer is worse (160–200 chars).\nfunction truncate(s: string, max: number): string {\n if (s.length <= max) return s;\n return `${s.slice(0, max - 1).trimEnd()}…`;\n}\nconst shortDescription = truncate(description, 200);\n\n// WebSite+Organization identity graph — site-wide signals that appear on\n// every page (Google uses them for site links and the knowledge panel).\n// Built by core's `siteSchema` so the @id graph shape is shared with the\n// rest of the JSON-LD registry; the SearchAction is appended here because\n// the browse path is an adapter concern, not a core one.\nconst bareSiteUrl = siteUrl.toString().replace(/\\/$/, '');\nconst [siteLd] = siteSchema({\n url: bareSiteUrl,\n name: siteConfig.name,\n description: siteConfig.description ?? description,\n inLanguage: locale,\n orgName: siteConfig.name,\n orgUrl: bareSiteUrl,\n ...(siteConfig.logo ? { orgLogo: new URL(siteConfig.logo, siteUrl).toString() } : {}),\n ...(siteConfig.repoUrl ? { sameAs: [siteConfig.repoUrl] } : {}),\n});\nsiteLd.potentialAction = {\n '@type': 'SearchAction',\n target: `${bareSiteUrl}${searchPath}?q={search_term_string}`,\n 'query-input': 'required name=search_term_string',\n};\n\nconst perPageNodes = jsonLd ? (Array.isArray(jsonLd) ? jsonLd : [jsonLd]) : null;\n\n// Dev-only well-formedness check — surfaces malformed nodes (relative\n// URLs, missing @context, duplicate @ids) in the terminal during\n// `astro dev` without ever failing or slowing a production build.\nif (import.meta.env.DEV && perPageNodes) {\n const issues = validateJsonLd(perPageNodes as JsonLdNode[]);\n for (const issue of issues) {\n console.warn(`[grove seo] ${Astro.url.pathname}: ${issue.message}`);\n }\n}\n\n// Pre-stringify the JSON-LD payloads in the frontmatter so the\n// template body just interpolates the resulting strings. For SSR\n// this saves the JSON.stringify call on every render; for static\n// builds the cost is unchanged but the template reads cleaner.\nconst siteLdJson = JSON.stringify(siteLd);\nconst perPageLdJson = perPageNodes ? JSON.stringify(perPageNodes) : null;\n---\n\n<!-- Primary meta -->\n<title>{title}</title>\n<meta name=\"description\" content={description} />\n<link rel=\"canonical\" href={canonical} />\n<meta name=\"robots\" content={robotsContent} />\n<!-- Filtered / parameter URLs: noindex the variant, canonical stays the base page. -->\n<script is:inline data-grove-param-robots>\n if (location.search) {\n document.querySelector('meta[name=\"robots\"]')?.setAttribute('content', 'noindex,follow');\n }\n</script>\n\n<!-- Open Graph -->\n<meta property=\"og:type\" content={type} />\n<meta property=\"og:url\" content={canonical} />\n<meta property=\"og:title\" content={title} />\n<meta property=\"og:description\" content={shortDescription} />\n<meta property=\"og:image\" content={ogImage} />\n<meta property=\"og:image:width\" content=\"1200\" />\n<meta property=\"og:image:height\" content=\"630\" />\n<meta property=\"og:image:alt\" content={ogImageAlt} />\n<meta property=\"og:site_name\" content={siteConfig.name} />\n<meta property=\"og:locale\" content={locale} />\n\n<!-- Twitter Card -->\n<meta name=\"twitter:card\" content=\"summary_large_image\" />\n{siteConfig.twitter && <meta name=\"twitter:site\" content={siteConfig.twitter} />}\n<meta name=\"twitter:title\" content={title} />\n<meta name=\"twitter:description\" content={shortDescription} />\n<meta name=\"twitter:image\" content={ogImage} />\n<meta name=\"twitter:image:alt\" content={ogImageAlt} />\n\n<!-- JSON-LD: site-wide identity graph -->\n<script is:inline type=\"application/ld+json\" set:html={siteLdJson} />\n\n<!-- JSON-LD: per-page (SoftwareApplication, CollectionPage, BreadcrumbList, ...) -->\n{perPageLdJson && (\n <script\n is:inline\n type=\"application/ld+json\"\n set:html={perPageLdJson}\n />\n)}\n",
87
+ "content": "---\n// SPDX-License-Identifier: MIT\n\n/**\n * Per-page SEO: <title>, description, canonical, Open Graph, Twitter Card,\n * and JSON-LD structured data. Designed to be used inside <head> by the\n * BaseLayout. Pages pass the rich props they care about; everything else\n * has a sensible default derived from the site config and the Astro URL.\n *\n * Renders:\n * - <title>, meta description, canonical link, robots\n * - Open Graph (og:*) for Facebook, LinkedIn, Discord, Slack, etc.\n * - Twitter Card (twitter:*) for X / Twitter\n * - JSON-LD WebSite+Organization identity graph on every page\n * (built by @grove-dev/core's `siteSchema`)\n * - Per-page JSON-LD nodes when `jsonLd` is provided (SoftwareApplication\n * on record pages, CollectionPage/ItemList/BreadcrumbList on\n * collection and taxonomy pages, ...)\n *\n * Noindex is opt-in via the `noindex` prop. By default everything is\n * indexable; noindex targets today are /submit, /404, and /empty.\n * `robots` sets the exact value instead — page models pass\n * `noindex,follow` for pages the index policy (`seo.*IndexPolicy`)\n * excludes, so their links are still followed.\n *\n * Any URL with a query string (`?q=`, `?sort=`, facet filters) is a\n * filtered view of a static page: the server sends the base page's\n * HTML, canonical included. A small inline script switches the robots\n * meta to `noindex,follow` on those URLs so the variant itself is not\n * indexed; Google renders JavaScript and honours a robots meta the page\n * sets at runtime. A server-side `X-Robots-Tag` is stronger where the\n * host allows it (see the SEO docs).\n */\nimport { type JsonLdNode, siteSchema, validateJsonLd } from '@grove-dev/core';\n\ninterface Props {\n title: string;\n description: string;\n site: {\n name: string;\n description?: string;\n repoUrl?: string;\n /** Header logo path under `public/` — used as Organization logo when set. */\n logo?: string;\n /** BCP-47 language tag (e.g. \"en\"). Drives og:locale + JSON-LD inLanguage. */\n locale?: string;\n /** Twitter/X handle (e.g. \"@grove\") — emitted as twitter:site. */\n twitter?: string;\n };\n /** Open Graph / Twitter image. Default: /og-image.svg. Should be absolute or root-relative. */\n image?: string;\n /** Alt text for the OG/Twitter image. Default: \"<site name> social preview\". */\n imageAlt?: string;\n /** og:type. Default: \"website\". Use \"article\" for blog posts / changelog. */\n type?: 'website' | 'article' | 'profile';\n /** Set true to add noindex,nofollow. */\n noindex?: boolean;\n /** Exact robots meta value (e.g. \"noindex,follow\"); wins over `noindex`. */\n robots?: string;\n /** Extra JSON-LD payload (object) — typically SoftwareSourceCode on item pages. */\n jsonLd?: Record<string, unknown> | Record<string, unknown>[];\n}\n\nconst {\n title,\n description,\n site: siteConfig,\n image = '/og-image.svg',\n imageAlt,\n type = 'website',\n noindex = false,\n robots,\n jsonLd,\n} = Astro.props;\nconst robotsContent =\n robots ?? (noindex ? 'noindex,nofollow' : 'index,follow,max-image-preview:large');\n\n// `Astro.site` is required for canonical / OG / Twitter / JSON-LD URLs to\n// resolve to the consumer's domain. Failing the build (rather than silently\n// emitting `https://example.com/...`) is the right call: every canonical,\n// OG, and JSON-LD URL would otherwise leak to a domain the consumer doesn't\n// own, which search engines either ignore or treat as canonical to the\n// wrong host.\nif (!Astro.site) {\n throw new Error(\n \"Seo: `site` is not set on the Astro config. Add `site: 'https://your-domain'` to astro.config.mjs so canonical / Open Graph / Twitter / JSON-LD URLs resolve correctly.\",\n );\n}\nconst siteUrl = Astro.site;\nconst canonical = new URL(Astro.url.pathname, siteUrl).toString();\nconst ogImage = new URL(image, siteUrl).toString();\nconst ogImageAlt = imageAlt ?? `${siteConfig.name} social preview`;\nconst locale = siteConfig.locale ?? 'en';\n\n// Truncate description for OG/Twitter where longer is worse (160–200 chars).\nfunction truncate(s: string, max: number): string {\n if (s.length <= max) return s;\n return `${s.slice(0, max - 1).trimEnd()}…`;\n}\nconst shortDescription = truncate(description, 200);\n\n// WebSite+Organization identity graph — site-wide signals that appear on\n// every page (Google uses them for site links and the knowledge panel).\n// Built by core's `siteSchema` so the @id graph shape is shared with the\n// rest of the JSON-LD registry.\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});\n// No SearchAction: Google retired the sitelinks search box on\n// 2024-11-21 and the markup no longer has any effect in Search.\n\nconst perPageNodes = jsonLd ? (Array.isArray(jsonLd) ? jsonLd : [jsonLd]) : null;\n\n// Dev-only well-formedness check — surfaces malformed nodes (relative\n// URLs, missing @context, duplicate @ids) in the terminal during\n// `astro dev` without ever failing or slowing a production build.\nif (import.meta.env.DEV && perPageNodes) {\n const issues = validateJsonLd(perPageNodes as JsonLdNode[]);\n for (const issue of issues) {\n console.warn(`[grove seo] ${Astro.url.pathname}: ${issue.message}`);\n }\n}\n\n// Pre-stringify the JSON-LD payloads in the frontmatter so the\n// template body just interpolates the resulting strings. For SSR\n// this saves the JSON.stringify call on every render; for static\n// builds the cost is unchanged but the template reads cleaner.\nconst siteLdJson = JSON.stringify(siteLd);\nconst perPageLdJson = perPageNodes ? JSON.stringify(perPageNodes) : null;\n---\n\n<!-- Primary meta -->\n<title>{title}</title>\n<meta name=\"description\" content={description} />\n<link rel=\"canonical\" href={canonical} />\n<meta name=\"robots\" content={robotsContent} />\n<!-- Filtered / parameter URLs: noindex the variant, canonical stays the base page. -->\n<script is:inline data-grove-param-robots>\n if (location.search) {\n document.querySelector('meta[name=\"robots\"]')?.setAttribute('content', 'noindex,follow');\n }\n</script>\n\n<!-- Open Graph -->\n<meta property=\"og:type\" content={type} />\n<meta property=\"og:url\" content={canonical} />\n<meta property=\"og:title\" content={title} />\n<meta property=\"og:description\" content={shortDescription} />\n<meta property=\"og:image\" content={ogImage} />\n<meta property=\"og:image:width\" content=\"1200\" />\n<meta property=\"og:image:height\" content=\"630\" />\n<meta property=\"og:image:alt\" content={ogImageAlt} />\n<meta property=\"og:site_name\" content={siteConfig.name} />\n<meta property=\"og:locale\" content={locale} />\n\n<!-- Twitter Card -->\n<meta name=\"twitter:card\" content=\"summary_large_image\" />\n{siteConfig.twitter && <meta name=\"twitter:site\" content={siteConfig.twitter} />}\n<meta name=\"twitter:title\" content={title} />\n<meta name=\"twitter:description\" content={shortDescription} />\n<meta name=\"twitter:image\" content={ogImage} />\n<meta name=\"twitter:image:alt\" content={ogImageAlt} />\n\n<!-- JSON-LD: site-wide identity graph -->\n<script is:inline type=\"application/ld+json\" set:html={siteLdJson} />\n\n<!-- JSON-LD: per-page (SoftwareApplication, CollectionPage, BreadcrumbList, ...) -->\n{perPageLdJson && (\n <script\n is:inline\n type=\"application/ld+json\"\n set:html={perPageLdJson}\n />\n)}\n",
88
88
  "type": "registry:component",
89
89
  "target": "~/src/layouts/seo.astro"
90
90
  },
@@ -150,7 +150,7 @@
150
150
  },
151
151
  {
152
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 noindex={model.seo.noindex}\n robots={model.seo.robots}\n site={siteConfig}\n>\n <TaxonomyList\n eyebrow=\"Category\"\n displayName={displayName}\n lede={`Browse ${itemLabelPlural()} in this directory in the ${displayName} category.`}\n scope={{ categories: [name] }}\n count={model.records.length}\n pathPrefix={`/categories/${name}`}\n />\n</BaseLayout>\n",
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 noindex={model.seo.noindex}\n robots={model.seo.robots}\n site={siteConfig}\n>\n <TaxonomyList\n eyebrow=\"Category\"\n displayName={displayName}\n heading={model.heading}\n lede={model.lede ?? `Browse ${itemLabelPlural()} in this directory in the ${displayName} category.`}\n scope={{ categories: [name] }}\n count={model.records.length}\n pathPrefix={`/categories/${name}`}\n />\n</BaseLayout>\n",
154
154
  "type": "registry:page",
155
155
  "target": "~/src/pages/categories/[name].astro"
156
156
  },
@@ -162,19 +162,19 @@
162
162
  },
163
163
  {
164
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 noindex={model.seo.noindex}\n robots={model.seo.robots}\n site={siteConfig}\n>\n <TaxonomyList\n eyebrow=\"Stack\"\n displayName={displayName}\n lede={`Browse ${itemLabelPlural()} in this directory built with ${displayName}.`}\n scope={{ stacks: [name] }}\n count={model.records.length}\n pathPrefix={`/stacks/${name}`}\n />\n</BaseLayout>\n",
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 noindex={model.seo.noindex}\n robots={model.seo.robots}\n site={siteConfig}\n>\n <TaxonomyList\n eyebrow=\"Stack\"\n displayName={displayName}\n heading={model.heading}\n lede={model.lede ?? `Browse ${itemLabelPlural()} in this directory built with ${displayName}.`}\n scope={{ stacks: [name] }}\n count={model.records.length}\n pathPrefix={`/stacks/${name}`}\n />\n</BaseLayout>\n",
166
166
  "type": "registry:page",
167
167
  "target": "~/src/pages/stacks/[name].astro"
168
168
  },
169
169
  {
170
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 scope={{ licenses: [name] }}\n count={model.records.length}\n pathPrefix={`/licenses/${name}`}\n />\n</BaseLayout>\n",
171
+ "content": "---\nimport siteConfig from '@grove/generated/site-config.json';\nimport { getPageContentHtml, 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// Optional plain-language guide under the list: content/pages/licenses/<id>.md.\nconst guideHtml = getPageContentHtml(`licenses/${name}`);\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 noindex={model.seo.noindex}\n robots={model.seo.robots}\n site={siteConfig}\n>\n <TaxonomyList\n eyebrow=\"License\"\n displayName={displayName}\n heading={model.heading}\n lede={model.lede ?? `Browse ${itemLabelPlural()} in this directory licensed under ${displayName}.`}\n scope={{ licenses: [name] }}\n count={model.records.length}\n pathPrefix={`/licenses/${name}`}\n >\n {guideHtml && (\n <section class=\"mx-auto w-full max-w-container px-5 pb-4 pt-4 sm:px-7\" aria-label={`About the ${displayName}`}>\n <div class=\"grove-prose max-w-[72ch] border-t border-border pt-8\" set:html={guideHtml} />\n </section>\n )}\n </TaxonomyList>\n</BaseLayout>\n",
172
172
  "type": "registry:page",
173
173
  "target": "~/src/pages/licenses/[name].astro"
174
174
  },
175
175
  {
176
176
  "path": "default/components/grove/taxonomy-list.astro",
177
- "content": "---\nimport { indexSlug, itemLabel, itemLabelPlural } from '@grove-dev/astro/server';\nimport { formatCount } from '@grove-dev/core';\nimport type { DirectoryScope } from '../../lib/live-filters.ts';\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 scope; everything else — the\n * hero, the list, the empty state, the back link — lives here.\n *\n * The list is the browse engine (`DirectoryBrowseView`) with an\n * immutable `scope`, so a stack or category page has the same search,\n * facets, sort and chips as the directory. Those live in this page's\n * own query string (`/stacks/flutter/?platform=ios`); the scoped group\n * is never a facet, a chip or a parameter. The canonical URL stays the\n * bare page path, because `Seo` builds it from the pathname.\n */\nimport DirectoryBrowseView from './directory-browse-view.astro';\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 /** Full H1 override. Default: \"{displayName} {itemNoun.plural}\". */\n heading?: 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 /**\n * The slice of the directory this page lists, e.g.\n * `{ stacks: ['flutter'] }`. Merged into every query.\n */\n scope: DirectoryScope;\n /** How many records the scope holds (from the page model). */\n count: number;\n /**\n * This page's own path, without a trailing slash, e.g.\n * `/stacks/flutter`. Filtered URLs are built on it.\n */\n pathPrefix: string;\n /**\n * Index route for the back link. Defaults to the configured directory\n * route (`routes.directory` in `grove.config.ts`), so a site that\n * 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 heading,\n lede,\n itemNoun = { singular: itemLabel(), plural: itemLabelPlural() },\n scope,\n count,\n pathPrefix,\n backHref = `/${indexSlug()}/`,\n backLabel = `← Back to all ${itemLabelPlural()}`,\n} = Astro.props;\n---\n\n<section class=\"bg-background\">\n <div class=\"mx-auto w-full max-w-container px-5 pt-12 pb-8 sm:px-7 sm:pt-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 {heading ?? `${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 </div>\n</section>\n\n{count === 0 ? (\n <section class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\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 <EmptyState class=\"mt-4\" title={`No ${itemNoun.plural} yet in ${displayName}.`} />\n </section>\n) : (\n <DirectoryBrowseView scope={scope} pathPrefix={pathPrefix} />\n)}\n\n<section class=\"mx-auto w-full max-w-container px-5 pb-12 sm:px-7 sm:pb-16\">\n <p class=\"m-0 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",
177
+ "content": "---\nimport { indexSlug, itemLabel, itemLabelPlural } from '@grove-dev/astro/server';\nimport { formatCount } from '@grove-dev/core';\nimport type { DirectoryScope } from '../../lib/live-filters.ts';\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 scope; everything else — the\n * hero, the list, the empty state, the back link — lives here.\n *\n * The list is the browse engine (`DirectoryBrowseView`) with an\n * immutable `scope`, so a stack or category page has the same search,\n * facets, sort and chips as the directory. Those live in this page's\n * own query string (`/stacks/flutter/?platform=ios`); the scoped group\n * is never a facet, a chip or a parameter. The canonical URL stays the\n * bare page path, because `Seo` builds it from the pathname.\n */\nimport DirectoryBrowseView from './directory-browse-view.astro';\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 /** Full H1 override. Default: \"{displayName} {itemNoun.plural}\". */\n heading?: 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 /**\n * The slice of the directory this page lists, e.g.\n * `{ stacks: ['flutter'] }`. Merged into every query.\n */\n scope: DirectoryScope;\n /** How many records the scope holds (from the page model). */\n count: number;\n /**\n * This page's own path, without a trailing slash, e.g.\n * `/stacks/flutter`. Filtered URLs are built on it.\n */\n pathPrefix: string;\n /**\n * Index route for the back link. Defaults to the configured directory\n * route (`routes.directory` in `grove.config.ts`), so a site that\n * 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 heading,\n lede,\n itemNoun = { singular: itemLabel(), plural: itemLabelPlural() },\n scope,\n count,\n pathPrefix,\n backHref = `/${indexSlug()}/`,\n backLabel = `← Back to all ${itemLabelPlural()}`,\n} = Astro.props;\n---\n\n<section class=\"bg-background\">\n <div class=\"mx-auto w-full max-w-container px-5 pt-12 pb-8 sm:px-7 sm:pt-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 {heading ?? `${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 </div>\n</section>\n\n{count === 0 ? (\n <section class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\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 <EmptyState class=\"mt-4\" title={`No ${itemNoun.plural} yet in ${displayName}.`} />\n </section>\n) : (\n <DirectoryBrowseView scope={scope} pathPrefix={pathPrefix} />\n)}\n\n{/* Optional editorial guide for the term (e.g. licence pages). */}\n<slot />\n\n<section class=\"mx-auto w-full max-w-container px-5 pb-12 sm:px-7 sm:pb-16\">\n <p class=\"m-0 text-2xs text-ink-500 dark:text-ink-400\">\n <a href={backHref} class=\"text-inherit no-underline hover:underline\">\n {backLabel}\n </a>\n </p>\n</section>\n",
178
178
  "type": "registry:component",
179
179
  "target": "~/src/components/grove/taxonomy-list.astro"
180
180
  },
@@ -414,7 +414,7 @@
414
414
  },
415
415
  {
416
416
  "path": "default/components/grove/record-sidebar.astro",
417
- "content": "---\nimport siteConfig from '@grove/generated/site-config.json';\nimport type { RecordDetailModel } from '@grove-dev/astro/server';\nimport { taxonomyLabel } from '@grove-dev/astro/server';\n/**\n * RecordSidebar.astro\n *\n * Sticky right-hand column on the record detail page. Renders\n * up to four cards, each conditional on the model's `sidebar`\n * visibility flags:\n *\n * - Activity — repo facts (stars, forks, language, license, …)\n * - Freshness — last commit / last fetch / maintenance status\n * - Ecosystem — stack, platforms, category, tags, hygiene files\n * - Source — curation metadata + reading-time summary\n *\n * Empty rows are suppressed entirely — the sidebar never shows \"—\"\n * or \"0\" placeholders that confuse \"no data\" with \"zero\".\n *\n * Sticky on lg+ (`lg:sticky lg:top-20 lg:max-h-calc(100vh-5rem)\n * lg:overflow-y-auto`) so the cards stay in view while the user\n * scrolls the body. Cards are individually rendered so the\n * sticky container's height is bounded by the actual content.\n */\nimport { licenseDisplay, withRef } from '@grove-dev/core';\nimport FeaturedBadge from '../site/featured-badge.astro';\nimport Badge from '../ui/badge.astro';\nimport Icon from './icon.astro';\nimport LanguageBreakdown from './language-breakdown.astro';\n\ninterface Props {\n detail: RecordDetailModel;\n /**\n * Pass false when a parent wrapper owns the sticky behavior (e.g.\n * the detail page stacks the TOC above this sidebar inside one\n * sticky column).\n */\n sticky?: boolean;\n /**\n * \"column\" (default) stacks the cards vertically for a rail;\n * \"grid\" lays them out in responsive columns for full-width\n * placement below the article.\n */\n layout?: 'column' | 'grid';\n}\n\nconst { detail, sticky = true, layout = 'column' } = Astro.props;\nconst {\n sidebar,\n github,\n stars,\n forks,\n language,\n licenseSpdx,\n pushedLabel,\n repoUrl,\n ownerRepo,\n healthLabel,\n activityBadge,\n stacks,\n platforms,\n tags,\n category,\n contributionSignals,\n languages,\n totalLanguageBytes,\n readingMetrics,\n record,\n firstCommitYear,\n lastFetchedLabel,\n reviewedAtLabel,\n addedAtLabel,\n} = detail;\nconst alsoIn: Array<{ url: string; title: string }> = detail.collectionMembership ?? [];\n\n// Visibility helpers for individual rows inside the Activity card.\n// `hasRepo` is the discriminator between \"GitHub data synced\" and\n// \"no data fetched yet\" — without it the card would show \"Stars 0\"\n// even when the field was never populated.\nconst repo = github;\nconst hasRepo = !!repo;\nconst starsNumber = typeof stars === 'number' && stars > 0 ? stars : null;\nconst forksNumber = typeof forks === 'number' && forks > 0 ? forks : null;\n// `repo` is a loosely-typed passthrough of the raw GitHub API response\n// (see `@grove-dev/astro/server`'s `getRecordDetailModel`) — `releases`\n// isn't in the normalized `githubMetadataSchema`, so it arrives as\n// `unknown` and needs a local shape for the three fields read below.\nconst recentReleases = (\n (repo?.releases as Array<{ html_url?: string; tag_name?: string; name?: string }> | undefined) ??\n []\n).slice(0, 1);\nconst isArchived = !!repo?.archived;\n\n// Render a kv row only when both the label and value have content.\nfunction row(label: string, value: unknown) {\n if (value === null || value === undefined || value === '') return null;\n return { label, value };\n}\nconst outbound =\n (siteConfig as { outbound?: { ref?: string | false; skipHosts?: string[] } }).outbound ?? {};\nconst siteOrigin = new URL((siteConfig as { siteUrl?: string }).siteUrl ?? 'https://example.com')\n .origin;\n---\n\n<aside\n class:list={[\n layout === \"grid\"\n ? \"grove-sidebar grid grid-cols-1 items-start gap-4 sm:grid-cols-2 xl:grid-cols-4\"\n : \"grove-sidebar flex flex-col gap-4\",\n layout === \"column\" &&\n sticky &&\n \"lg:sticky lg:top-20 lg:max-h-[calc(100vh-5rem)] lg:self-start lg:overflow-y-auto\",\n ]}\n aria-label=\"Record metadata\"\n>\n\n {/* ── Activity card ──────────────────────────────────────── */}\n {sidebar.showActivity && (\n <section\n class=\"grove-card rounded-[var(--radius-lg)] border border-ink-200 bg-card p-4 dark:border-ink-800\"\n aria-labelledby=\"sidebar-activity-title\"\n >\n <h2\n id=\"sidebar-activity-title\"\n class=\"grove-card-title m-0 mb-3 text-2xs font-semibold uppercase tracking-wider text-ink-500 dark:text-ink-400\"\n >\n Activity\n </h2>\n <dl class=\"grove-kv m-0 flex flex-col gap-2.5 text-sm\">\n {row(\"Stars\", starsNumber !== null ? starsNumber : null) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Stars</dt>\n <dd class=\"font-mono tabular-nums text-ink-900 dark:text-ink-100\">{starsNumber!.toLocaleString()}</dd>\n </div>\n )}\n {row(\"Forks\", forksNumber !== null ? forksNumber.toLocaleString() : null) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Forks</dt>\n <dd class=\"font-mono tabular-nums text-ink-900 dark:text-ink-100\">{forksNumber!.toLocaleString()}</dd>\n </div>\n )}\n {row(\"Contributors\", repo?.contributors_count) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Contributors</dt>\n <dd class=\"font-mono tabular-nums text-ink-900 dark:text-ink-100\">{Number(repo!.contributors_count).toLocaleString()}</dd>\n </div>\n )}\n {row(\"Open issues\", repo?.open_issues_count) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Open issues</dt>\n <dd class=\"font-mono tabular-nums text-ink-900 dark:text-ink-100\">{Number(repo!.open_issues_count).toLocaleString()}</dd>\n </div>\n )}\n {row(\"Watchers\", repo?.subscribers_count) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Watchers</dt>\n <dd class=\"font-mono tabular-nums text-ink-900 dark:text-ink-100\">{Number(repo!.subscribers_count).toLocaleString()}</dd>\n </div>\n )}\n {row(\"Language\", language) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Language</dt>\n <dd class=\"text-ink-900 dark:text-ink-100\">{language}</dd>\n </div>\n )}\n {row(\"License\", licenseSpdx) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">License</dt>\n <dd class=\"font-mono text-ink-900 dark:text-ink-100\">{licenseDisplay(licenseSpdx)}</dd>\n </div>\n )}\n {row(\"Default branch\", repo?.default_branch) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Default branch</dt>\n <dd class=\"font-mono text-ink-900 dark:text-ink-100\">{repo!.default_branch}</dd>\n </div>\n )}\n {row(\"First commit\", firstCommitYear) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">First commit</dt>\n <dd class=\"text-ink-900 dark:text-ink-100\">\n <time datetime={String(repo!.created_at)}>{firstCommitYear}</time>\n </dd>\n </div>\n )}\n {recentReleases[0] && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Latest release</dt>\n <dd class=\"text-ink-900 dark:text-ink-100\">\n <a\n href={recentReleases[0].html_url ?? repoUrl}\n target=\"_blank\"\n rel=\"noopener\"\n class=\"no-underline hover:underline\"\n >\n {recentReleases[0].tag_name ?? recentReleases[0].name ?? \"—\"}\n </a>\n </dd>\n </div>\n )}\n </dl>\n\n <LanguageBreakdown languages={languages} totalBytes={totalLanguageBytes} />\n </section>\n )}\n\n {/* ── Freshness card ─────────────────────────────────────── */}\n {sidebar.showFreshness && (\n <section\n class=\"grove-card rounded-[var(--radius-lg)] border border-ink-200 bg-card p-4 dark:border-ink-800\"\n aria-labelledby=\"sidebar-freshness-title\"\n >\n <h2\n id=\"sidebar-freshness-title\"\n class=\"grove-card-title m-0 mb-3 text-2xs font-semibold uppercase tracking-wider text-ink-500 dark:text-ink-400\"\n >\n Freshness\n </h2>\n <dl class=\"grove-kv m-0 flex flex-col gap-2.5 text-sm\">\n {pushedLabel && pushedLabel !== \"—\" && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Last commit</dt>\n <dd class=\"text-ink-900 dark:text-ink-100\">{pushedLabel}</dd>\n </div>\n )}\n {repo?.updated_at && lastFetchedLabel && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Last fetched</dt>\n <dd class=\"text-ink-900 dark:text-ink-100\">\n <time datetime={String(repo.updated_at)}>{lastFetchedLabel}</time>\n </dd>\n </div>\n )}\n {activityBadge && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Maintenance</dt>\n <dd>\n <span data-activity-tone={activityBadge.tone} class=\"grove-pill grove-pill--activity inline-flex items-center gap-1 rounded border px-1.5 py-0.5 text-[10px] font-medium\">\n {activityBadge.label}\n </span>\n </dd>\n </div>\n )}\n {healthLabel && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Health</dt>\n <dd class=\"text-ink-900 dark:text-ink-100\">{healthLabel}</dd>\n </div>\n )}\n {isArchived && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Status</dt>\n <dd><Badge variant=\"warning\">Archived</Badge></dd>\n </div>\n )}\n {repo?.homepage && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Docs</dt>\n <dd class=\"truncate text-ink-900 dark:text-ink-100\">\n <a href={withRef(String(repo.homepage), outbound)} target=\"_blank\" rel=\"noopener\" class=\"no-underline hover:underline\">\n {new URL(String(repo.homepage)).hostname}\n </a>\n </dd>\n </div>\n )}\n {repoUrl && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Source</dt>\n <dd class=\"text-ink-900 dark:text-ink-100\">\n <a href={repoUrl} target=\"_blank\" rel=\"noopener\" class=\"no-underline hover:underline\">\n {ownerRepo ? `${ownerRepo.owner}/${ownerRepo.repo}` : repoUrl}\n </a>\n </dd>\n </div>\n )}\n </dl>\n </section>\n )}\n\n {/* ── Ecosystem card ─────────────────────────────────────── */}\n {sidebar.showEcosystem && (\n <section\n class=\"grove-card rounded-[var(--radius-lg)] border border-ink-200 bg-card p-4 dark:border-ink-800\"\n aria-labelledby=\"sidebar-ecosystem-title\"\n >\n <h2\n id=\"sidebar-ecosystem-title\"\n class=\"grove-card-title m-0 mb-3 text-2xs font-semibold uppercase tracking-wider text-ink-500 dark:text-ink-400\"\n >\n Ecosystem\n </h2>\n\n {stacks.length > 0 && (\n <div class=\"mb-3\">\n <h3 class=\"m-0 mb-1.5 text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">Stack</h3>\n <ul class=\"m-0 flex list-none flex-wrap gap-1.5 p-0\">\n {stacks.map((s) => (\n <li>\n <a href={`/stacks/${s}/`} class=\"inline-flex items-center gap-1.5 rounded-full bg-secondary py-0.5 pl-1.5 pr-2 text-2xs font-medium text-secondary-foreground no-underline\">\n <Icon name={s} category=\"stack\" size={12} />\n {taxonomyLabel(\"stacks\", s)}\n </a>\n </li>\n ))}\n </ul>\n </div>\n )}\n\n {platforms.length > 0 && (\n <div class=\"mb-3\">\n <h3 class=\"m-0 mb-1.5 text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">Platforms</h3>\n <ul class=\"m-0 flex list-none flex-wrap gap-1.5 p-0\">\n {platforms.map((p) => (\n <li class=\"inline-flex items-center gap-1.5 rounded-full border border-ink-200 py-0.5 pl-1.5 pr-2 text-2xs font-medium text-ink-700 dark:border-ink-800 dark:text-ink-300\">\n <Icon name={p} category=\"platform\" size={12} />\n {taxonomyLabel(\"platforms\", p)}\n </li>\n ))}\n </ul>\n </div>\n )}\n\n {category && (\n <div class=\"mb-3\">\n <h3 class=\"m-0 mb-1.5 text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">Category</h3>\n <a href={`/categories/${category}/`} class=\"rounded-full bg-secondary px-2 py-0.5 text-2xs font-medium text-secondary-foreground no-underline\">\n {taxonomyLabel(\"categories\", category)}\n </a>\n </div>\n )}\n\n {tags.length > 0 && (\n <div class=\"mb-3\">\n <h3 class=\"m-0 mb-1.5 text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">Tags</h3>\n <ul class=\"m-0 flex list-none flex-wrap gap-1.5 p-0\">\n {tags.map((t) => (\n <li>\n <a href={`/${detail.slug}?tag=${encodeURIComponent(t)}`} rel=\"nofollow\" class=\"rounded-full border border-ink-200 px-2 py-0.5 text-2xs font-medium text-ink-700 no-underline dark:border-ink-800 dark:text-ink-300\">\n {taxonomyLabel(\"topics\", t)}\n </a>\n </li>\n ))}\n </ul>\n </div>\n )}\n\n {contributionSignals.length > 0 && (\n <div>\n <h3 class=\"m-0 mb-1.5 text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">Repository hygiene</h3>\n <ul class=\"m-0 flex list-none flex-col gap-1 p-0 text-sm\">\n {contributionSignals.map((s) => (\n <li class=\"inline-flex items-center gap-1.5 text-ink-700 dark:text-ink-200\">\n {s.ok ? (\n <svg viewBox=\"0 0 16 16\" width=\"11\" height=\"11\" aria-hidden=\"true\" fill=\"currentColor\" class=\"text-emerald-600 dark:text-emerald-400\">\n <path d=\"M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.75.75 0 0 1 1.06-1.06L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z\" />\n </svg>\n ) : (\n <svg viewBox=\"0 0 16 16\" width=\"11\" height=\"11\" aria-hidden=\"true\" fill=\"currentColor\" class=\"text-ink-400\">\n <path d=\"M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.75.75 0 1 1 1.06 1.06L9.06 8l3.22 3.22a.75.75 0 1 1-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 0 1-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z\" />\n </svg>\n )}\n {s.label}\n </li>\n ))}\n </ul>\n </div>\n )}\n </section>\n )}\n\n <FeaturedBadge\n pageUrl={`${siteOrigin}/${detail.slug}/${record.slug}/`}\n origin={siteOrigin}\n siteName={String((siteConfig as { name?: string }).name ?? '')}\n name={String((record as { name?: string }).name ?? record.slug)}\n outboundRef={outbound.ref}\n />\n\n {/* ── Source card (small) ────────────────────────────────── */}\n {sidebar.showSource && (\n <section\n class=\"grove-card grove-card--muted rounded-[var(--radius-lg)] border border-dashed border-ink-200 bg-card/50 p-4 text-2xs text-ink-500 dark:border-ink-800 dark:text-ink-400\"\n aria-labelledby=\"sidebar-source-title\"\n >\n <h2\n id=\"sidebar-source-title\"\n class=\"grove-card-title m-0 mb-1.5 text-2xs font-semibold uppercase tracking-wider text-ink-500 dark:text-ink-400\"\n >\n Source\n </h2>\n {addedAtLabel && (\n <p class=\"m-0 leading-relaxed\">\n Added on <time datetime={String(record.addedAt)}>{addedAtLabel}</time>.\n </p>\n )}\n {/* Only when a curator actually reviewed the record. This line\n used to render unconditionally with an em dash where the date\n belongs, and gated the whole card besides. */}\n {reviewedAtLabel && (\n <p class:list={[\"m-0 leading-relaxed\", addedAtLabel && \"mt-1.5\"]}>\n Reviewed by {record.curation?.reviewedBy ?? \"grove\"}\n on <time datetime={String(record.curation?.reviewedAt)}>\n {reviewedAtLabel}\n </time>.\n </p>\n )}\n {alsoIn.length > 0 && (\n <p class=\"m-0 mt-1.5 leading-relaxed\">\n <span class=\"font-semibold\">Also in: </span>\n {alsoIn.map((c, i) => (\n <>\n <a href={c.url} class=\"text-inherit no-underline hover:underline\">{c.title}</a>{i < alsoIn.length - 1 ? \", \" : \"\"}\n </>\n ))}\n </p>\n )}\n {readingMetrics.wordCount > 0 && (\n <p class=\"m-0 mt-1 leading-relaxed\">\n Notes: {readingMetrics.wordCount.toLocaleString()} words · {readingMetrics.minutes} min read.\n </p>\n )}\n </section>\n )}\n</aside>",
417
+ "content": "---\nimport siteConfig from '@grove/generated/site-config.json';\nimport type { RecordDetailModel } from '@grove-dev/astro/server';\nimport { taxonomyLabel } from '@grove-dev/astro/server';\n/**\n * RecordSidebar.astro\n *\n * Sticky right-hand column on the record detail page. Renders\n * up to four cards, each conditional on the model's `sidebar`\n * visibility flags:\n *\n * - Activity — repo facts (stars, forks, language, license, …)\n * - Freshness — last commit / last fetch / maintenance status\n * - Ecosystem — stack, platforms, category, tags, hygiene files\n * - Source — curation metadata + reading-time summary\n *\n * Empty rows are suppressed entirely — the sidebar never shows \"—\"\n * or \"0\" placeholders that confuse \"no data\" with \"zero\".\n *\n * Sticky on lg+ (`lg:sticky lg:top-20 lg:max-h-calc(100vh-5rem)\n * lg:overflow-y-auto`) so the cards stay in view while the user\n * scrolls the body. Cards are individually rendered so the\n * sticky container's height is bounded by the actual content.\n */\nimport { licenseDisplay, withRef } from '@grove-dev/core';\nimport FeaturedBadge from '../site/featured-badge.astro';\nimport Badge from '../ui/badge.astro';\nimport Icon from './icon.astro';\nimport LanguageBreakdown from './language-breakdown.astro';\n\ninterface Props {\n detail: RecordDetailModel;\n /**\n * Pass false when a parent wrapper owns the sticky behavior (e.g.\n * the detail page stacks the TOC above this sidebar inside one\n * sticky column).\n */\n sticky?: boolean;\n /**\n * \"column\" (default) stacks the cards vertically for a rail;\n * \"grid\" lays them out in responsive columns for full-width\n * placement below the article.\n */\n layout?: 'column' | 'grid';\n}\n\nconst { detail, sticky = true, layout = 'column' } = Astro.props;\nconst {\n sidebar,\n github,\n stars,\n forks,\n language,\n licenseSpdx,\n pushedLabel,\n repoUrl,\n ownerRepo,\n healthLabel,\n activityBadge,\n stacks,\n platforms,\n tags,\n category,\n contributionSignals,\n languages,\n totalLanguageBytes,\n readingMetrics,\n record,\n firstCommitYear,\n lastFetchedLabel,\n reviewedAtLabel,\n addedAtLabel,\n} = detail;\nconst alsoIn: Array<{ url: string; title: string }> = detail.collectionMembership ?? [];\n\n// Visibility helpers for individual rows inside the Activity card.\n// `hasRepo` is the discriminator between \"GitHub data synced\" and\n// \"no data fetched yet\" — without it the card would show \"Stars 0\"\n// even when the field was never populated.\nconst repo = github;\nconst hasRepo = !!repo;\nconst starsNumber = typeof stars === 'number' && stars > 0 ? stars : null;\nconst forksNumber = typeof forks === 'number' && forks > 0 ? forks : null;\n// `repo` is a loosely-typed passthrough of the raw GitHub API response\n// (see `@grove-dev/astro/server`'s `getRecordDetailModel`) — `releases`\n// isn't in the normalized `githubMetadataSchema`, so it arrives as\n// `unknown` and needs a local shape for the three fields read below.\nconst recentReleases = (\n (repo?.releases as Array<{ html_url?: string; tag_name?: string; name?: string }> | undefined) ??\n []\n).slice(0, 1);\nconst isArchived = !!repo?.archived;\n\n// Render a kv row only when both the label and value have content.\nfunction row(label: string, value: unknown) {\n if (value === null || value === undefined || value === '') return null;\n return { label, value };\n}\nconst outbound =\n (siteConfig as { outbound?: { ref?: string | false; skipHosts?: string[] } }).outbound ?? {};\nconst siteOrigin = new URL((siteConfig as { siteUrl?: string }).siteUrl ?? 'https://example.com')\n .origin;\n---\n\n<aside\n class:list={[\n layout === \"grid\"\n ? // Full width under the article: a flat band of columns, not a wall of\n // boxes of uneven height. Cards lose their frame here; the badge and\n // source notes sit on their own row below.\n \"grove-sidebar grid grid-cols-1 items-start gap-x-10 gap-y-8 sm:grid-cols-2 xl:grid-cols-4 [&>.grove-card]:rounded-none [&>.grove-card]:border-0 [&>.grove-card]:bg-transparent [&>.grove-card]:p-0\"\n : \"grove-sidebar flex flex-col gap-4\",\n layout === \"column\" &&\n sticky &&\n \"lg:sticky lg:top-20 lg:max-h-[calc(100vh-5rem)] lg:self-start lg:overflow-y-auto\",\n ]}\n aria-label=\"Record metadata\"\n>\n\n {/* ── Activity card ──────────────────────────────────────── */}\n {sidebar.showActivity && (\n <section\n class=\"grove-card rounded-[var(--radius-lg)] border border-ink-200 bg-card p-4 dark:border-ink-800\"\n aria-labelledby=\"sidebar-activity-title\"\n >\n <h2\n id=\"sidebar-activity-title\"\n class=\"grove-card-title m-0 mb-3 text-2xs font-semibold uppercase tracking-wider text-ink-500 dark:text-ink-400\"\n >\n Activity\n </h2>\n <dl class=\"grove-kv m-0 flex flex-col gap-2.5 text-sm\">\n {row(\"Stars\", starsNumber !== null ? starsNumber : null) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Stars</dt>\n <dd class=\"font-mono tabular-nums text-ink-900 dark:text-ink-100\">{starsNumber!.toLocaleString()}</dd>\n </div>\n )}\n {row(\"Forks\", forksNumber !== null ? forksNumber.toLocaleString() : null) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Forks</dt>\n <dd class=\"font-mono tabular-nums text-ink-900 dark:text-ink-100\">{forksNumber!.toLocaleString()}</dd>\n </div>\n )}\n {row(\"Contributors\", repo?.contributors_count) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Contributors</dt>\n <dd class=\"font-mono tabular-nums text-ink-900 dark:text-ink-100\">{Number(repo!.contributors_count).toLocaleString()}</dd>\n </div>\n )}\n {row(\"Open issues\", repo?.open_issues_count) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Open issues</dt>\n <dd class=\"font-mono tabular-nums text-ink-900 dark:text-ink-100\">{Number(repo!.open_issues_count).toLocaleString()}</dd>\n </div>\n )}\n {row(\"Watchers\", repo?.subscribers_count) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Watchers</dt>\n <dd class=\"font-mono tabular-nums text-ink-900 dark:text-ink-100\">{Number(repo!.subscribers_count).toLocaleString()}</dd>\n </div>\n )}\n {row(\"Language\", language) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Language</dt>\n <dd class=\"text-ink-900 dark:text-ink-100\">{language}</dd>\n </div>\n )}\n {row(\"License\", licenseSpdx) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">License</dt>\n <dd class=\"font-mono text-ink-900 dark:text-ink-100\">{licenseDisplay(licenseSpdx)}</dd>\n </div>\n )}\n {row(\"Default branch\", repo?.default_branch) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Default branch</dt>\n <dd class=\"font-mono text-ink-900 dark:text-ink-100\">{repo!.default_branch}</dd>\n </div>\n )}\n {row(\"First commit\", firstCommitYear) && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">First commit</dt>\n <dd class=\"text-ink-900 dark:text-ink-100\">\n <time datetime={String(repo!.created_at)}>{firstCommitYear}</time>\n </dd>\n </div>\n )}\n {recentReleases[0] && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Latest release</dt>\n <dd class=\"text-ink-900 dark:text-ink-100\">\n <a\n href={recentReleases[0].html_url ?? repoUrl}\n target=\"_blank\"\n rel=\"noopener\"\n class=\"no-underline hover:underline\"\n >\n {recentReleases[0].tag_name ?? recentReleases[0].name ?? \"—\"}\n </a>\n </dd>\n </div>\n )}\n </dl>\n\n <LanguageBreakdown languages={languages} totalBytes={totalLanguageBytes} />\n </section>\n )}\n\n {/* ── Freshness card ─────────────────────────────────────── */}\n {sidebar.showFreshness && (\n <section\n class=\"grove-card rounded-[var(--radius-lg)] border border-ink-200 bg-card p-4 dark:border-ink-800\"\n aria-labelledby=\"sidebar-freshness-title\"\n >\n <h2\n id=\"sidebar-freshness-title\"\n class=\"grove-card-title m-0 mb-3 text-2xs font-semibold uppercase tracking-wider text-ink-500 dark:text-ink-400\"\n >\n Freshness\n </h2>\n <dl class=\"grove-kv m-0 flex flex-col gap-2.5 text-sm\">\n {pushedLabel && pushedLabel !== \"—\" && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Last commit</dt>\n <dd class=\"text-ink-900 dark:text-ink-100\">{pushedLabel}</dd>\n </div>\n )}\n {/* Two clocks, named apart: when a person last reviewed the page,\n and when the repository numbers were last synced. */}\n {reviewedAtLabel && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Editorial review</dt>\n <dd class=\"text-ink-900 dark:text-ink-100\">\n <time datetime={String(record.curation?.reviewedAt)}>{reviewedAtLabel}</time>\n </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\">Repository data</dt>\n <dd class=\"text-ink-900 dark:text-ink-100\">\n <time datetime={String(repo.updated_at)}>{lastFetchedLabel}</time>\n </dd>\n </div>\n )}\n {activityBadge && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Maintenance</dt>\n <dd>\n <span data-activity-tone={activityBadge.tone} class=\"grove-pill grove-pill--activity inline-flex items-center gap-1 rounded border px-1.5 py-0.5 text-[10px] font-medium\">\n {activityBadge.label}\n </span>\n </dd>\n </div>\n )}\n {healthLabel && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Health</dt>\n <dd class=\"text-ink-900 dark:text-ink-100\">{healthLabel}</dd>\n </div>\n )}\n {isArchived && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Status</dt>\n <dd><Badge variant=\"warning\">Archived</Badge></dd>\n </div>\n )}\n {repo?.homepage && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Docs</dt>\n <dd class=\"truncate text-ink-900 dark:text-ink-100\">\n <a href={withRef(String(repo.homepage), outbound)} target=\"_blank\" rel=\"noopener\" class=\"no-underline hover:underline\">\n {new URL(String(repo.homepage)).hostname}\n </a>\n </dd>\n </div>\n )}\n {repoUrl && (\n <div class=\"flex items-baseline justify-between gap-3\">\n <dt class=\"text-ink-500 dark:text-ink-400\">Source</dt>\n <dd class=\"text-ink-900 dark:text-ink-100\">\n <a href={repoUrl} target=\"_blank\" rel=\"noopener\" class=\"no-underline hover:underline\">\n {ownerRepo ? `${ownerRepo.owner}/${ownerRepo.repo}` : repoUrl}\n </a>\n </dd>\n </div>\n )}\n </dl>\n </section>\n )}\n\n {/* ── Ecosystem card ─────────────────────────────────────── */}\n {sidebar.showEcosystem && (\n <section\n class=\"grove-card rounded-[var(--radius-lg)] border border-ink-200 bg-card p-4 dark:border-ink-800\"\n aria-labelledby=\"sidebar-ecosystem-title\"\n >\n <h2\n id=\"sidebar-ecosystem-title\"\n class=\"grove-card-title m-0 mb-3 text-2xs font-semibold uppercase tracking-wider text-ink-500 dark:text-ink-400\"\n >\n Ecosystem\n </h2>\n\n {stacks.length > 0 && (\n <div class=\"mb-3\">\n <h3 class=\"m-0 mb-1.5 text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">Stack</h3>\n <ul class=\"m-0 flex list-none flex-wrap gap-1.5 p-0\">\n {stacks.map((s) => (\n <li>\n <a href={`/stacks/${s}/`} class=\"inline-flex items-center gap-1.5 rounded-full bg-secondary py-0.5 pl-1.5 pr-2 text-2xs font-medium text-secondary-foreground no-underline\">\n <Icon name={s} category=\"stack\" size={12} />\n {taxonomyLabel(\"stacks\", s)}\n </a>\n </li>\n ))}\n </ul>\n </div>\n )}\n\n {platforms.length > 0 && (\n <div class=\"mb-3\">\n <h3 class=\"m-0 mb-1.5 text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">Platforms</h3>\n <ul class=\"m-0 flex list-none flex-wrap gap-1.5 p-0\">\n {platforms.map((p) => (\n <li class=\"inline-flex items-center gap-1.5 rounded-full border border-ink-200 py-0.5 pl-1.5 pr-2 text-2xs font-medium text-ink-700 dark:border-ink-800 dark:text-ink-300\">\n <Icon name={p} category=\"platform\" size={12} />\n {taxonomyLabel(\"platforms\", p)}\n </li>\n ))}\n </ul>\n </div>\n )}\n\n {category && (\n <div class=\"mb-3\">\n <h3 class=\"m-0 mb-1.5 text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">Category</h3>\n <a href={`/categories/${category}/`} class=\"rounded-full bg-secondary px-2 py-0.5 text-2xs font-medium text-secondary-foreground no-underline\">\n {taxonomyLabel(\"categories\", category)}\n </a>\n </div>\n )}\n\n {tags.length > 0 && (\n <div class=\"mb-3\">\n <h3 class=\"m-0 mb-1.5 text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">Tags</h3>\n <ul class=\"m-0 flex list-none flex-wrap gap-1.5 p-0\">\n {tags.map((t) => (\n <li>\n <a href={`/${detail.slug}?tag=${encodeURIComponent(t)}`} rel=\"nofollow\" class=\"rounded-full border border-ink-200 px-2 py-0.5 text-2xs font-medium text-ink-700 no-underline dark:border-ink-800 dark:text-ink-300\">\n {taxonomyLabel(\"topics\", t)}\n </a>\n </li>\n ))}\n </ul>\n </div>\n )}\n\n {contributionSignals.length > 0 && (\n <div>\n <h3 class=\"m-0 mb-1.5 text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">Repository hygiene</h3>\n <ul class=\"m-0 flex list-none flex-col gap-1 p-0 text-sm\">\n {contributionSignals.map((s) => (\n <li class=\"inline-flex items-center gap-1.5 text-ink-700 dark:text-ink-200\">\n {s.ok ? (\n <svg viewBox=\"0 0 16 16\" width=\"11\" height=\"11\" aria-hidden=\"true\" fill=\"currentColor\" class=\"text-emerald-600 dark:text-emerald-400\">\n <path d=\"M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.75.75 0 0 1 1.06-1.06L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z\" />\n </svg>\n ) : (\n <svg viewBox=\"0 0 16 16\" width=\"11\" height=\"11\" aria-hidden=\"true\" fill=\"currentColor\" class=\"text-ink-400\">\n <path d=\"M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.75.75 0 1 1 1.06 1.06L9.06 8l3.22 3.22a.75.75 0 1 1-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 0 1-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z\" />\n </svg>\n )}\n {s.label}\n </li>\n ))}\n </ul>\n </div>\n )}\n </section>\n )}\n\n <div class:list={[layout === \"grid\" && \"border-t border-border pt-6 sm:col-start-1 xl:col-span-2 [&>.grove-card]:rounded-none [&>.grove-card]:border-0 [&>.grove-card]:bg-transparent [&>.grove-card]:p-0\"]}>\n <FeaturedBadge\n pageUrl={`${siteOrigin}/${detail.slug}/${record.slug}/`}\n origin={siteOrigin}\n siteName={String((siteConfig as { name?: string }).name ?? '')}\n name={String((record as { name?: string }).name ?? record.slug)}\n outboundRef={outbound.ref}\n />\n </div>\n\n {/* ── Source card (small) ────────────────────────────────── */}\n {sidebar.showSource && (\n <section\n class:list={[layout === \"grid\" && \"!border-t !border-solid !border-border !pt-6 xl:col-span-2\", \"grove-card grove-card--muted rounded-[var(--radius-lg)] border border-dashed border-ink-200 bg-card/50 p-4 text-2xs text-ink-500 dark:border-ink-800 dark:text-ink-400\"]}\n aria-labelledby=\"sidebar-source-title\"\n >\n <h2\n id=\"sidebar-source-title\"\n class=\"grove-card-title m-0 mb-1.5 text-2xs font-semibold uppercase tracking-wider text-ink-500 dark:text-ink-400\"\n >\n Source\n </h2>\n {addedAtLabel && (\n <p class=\"m-0 leading-relaxed\">\n Added on <time datetime={String(record.addedAt)}>{addedAtLabel}</time>.\n </p>\n )}\n {/* Only when a curator actually reviewed the record. This line\n used to render unconditionally with an em dash where the date\n belongs, and gated the whole card besides. */}\n {reviewedAtLabel && (\n <p class:list={[\"m-0 leading-relaxed\", addedAtLabel && \"mt-1.5\"]}>\n Reviewed by {record.curation?.reviewedBy ?? \"grove\"}{\" \"}\n on <time datetime={String(record.curation?.reviewedAt)}>\n {reviewedAtLabel}\n </time>.\n </p>\n )}\n {alsoIn.length > 0 && (\n <p class=\"m-0 mt-1.5 leading-relaxed\">\n <span class=\"font-semibold\">Also in: </span>\n {alsoIn.map((c, i) => (\n <>\n <a href={c.url} class=\"text-inherit no-underline hover:underline\">{c.title}</a>{i < alsoIn.length - 1 ? \", \" : \"\"}\n </>\n ))}\n </p>\n )}\n {readingMetrics.wordCount > 0 && (\n <p class=\"m-0 mt-1 leading-relaxed\">\n Notes: {readingMetrics.wordCount.toLocaleString()} words · {readingMetrics.minutes} min read.\n </p>\n )}\n </section>\n )}\n</aside>",
418
418
  "type": "registry:component",
419
419
  "target": "~/src/components/grove/record-sidebar.astro"
420
420
  },
@@ -432,7 +432,7 @@
432
432
  },
433
433
  {
434
434
  "path": "default/components/grove/related-records.astro",
435
- "content": "---\n/**\n * RelatedRecords.astro\n *\n * Where a record page leads next: sibling records that share a subject\n * (\"Other alternatives to Notion\") and the collections the record\n * appears in. Both come from `getRecordContextModel`. Before this, a\n * detail page linked to its stack and its category and nothing else.\n *\n * Renders nothing when there is neither.\n */\nimport type { RecordContextModel } from '@grove-dev/astro/server';\n\ninterface Props {\n context: RecordContextModel;\n}\n\nconst { context } = Astro.props;\nconst hasAny = context.relatedRecords.length > 0 || context.collectionMembership.length > 0;\n---\n\n{hasAny && (\n <section class=\"mt-12 border-t border-border pt-8\" aria-label=\"Related\">\n {context.relatedRecords.map((group) => (\n <div class=\"mb-8\">\n <h2 class=\"m-0 text-[1.125rem] font-semibold tracking-tight text-foreground\">\n Other {group.label.toLowerCase().replace(/ to$/, 's to')} {group.subject.name}\n </h2>\n <ul class=\"m-0 mt-3 grid list-none grid-cols-1 gap-2 p-0 sm:grid-cols-2\">\n {group.records.map((r) => (\n <li class=\"m-0 rounded-md border border-border bg-card px-3 py-2.5\">\n <a href={r.url} class=\"text-sm font-medium text-foreground no-underline hover:underline\">{r.title}</a>\n {r.description && (\n <p class=\"m-0 mt-1 line-clamp-2 text-[0.8125rem] leading-relaxed text-muted-foreground\">{r.description}</p>\n )}\n </li>\n ))}\n </ul>\n {group.hub && (\n <p class=\"m-0 mt-3 text-sm\">\n <a href={group.hub.url} class=\"font-medium text-foreground underline underline-offset-2\">\n Compare them all: {group.hub.title} →\n </a>\n </p>\n )}\n </div>\n ))}\n\n {context.collectionMembership.length > 0 && (\n <div>\n <h2 class=\"m-0 text-[1.125rem] font-semibold tracking-tight text-foreground\">Featured in</h2>\n <ul class=\"m-0 mt-3 flex list-none flex-wrap gap-2 p-0\">\n {context.collectionMembership.map((c) => (\n <li class=\"m-0\">\n <a href={c.url} class=\"inline-flex rounded-full border border-border bg-card px-3 py-1 text-sm text-foreground no-underline hover:border-ink-400\">\n {c.title}\n </a>\n </li>\n ))}\n </ul>\n </div>\n )}\n </section>\n)}\n",
435
+ "content": "---\n/**\n * RelatedRecords.astro\n *\n * Where a record page leads next: sibling records that share a subject\n * (\"Other alternatives to Notion\") and the collections the record\n * appears in. Both come from `getRecordContextModel`. Before this, a\n * detail page linked to its stack and its category and nothing else.\n *\n * Renders nothing when there is neither.\n */\nimport type { RecordContextModel } from '@grove-dev/astro/server';\n\ninterface Props {\n context: RecordContextModel;\n}\n\nconst { context } = Astro.props;\nconst hasAny = context.relatedRecords.length > 0 || context.collectionMembership.length > 0;\n---\n\n{hasAny && (\n <section class=\"mt-12 border-t border-border pt-8\" aria-label=\"Related\">\n {/* Collections are destinations, not reading: titles only, as chips. */}\n {context.collectionMembership.length > 0 && (\n <div class=\"flex flex-wrap items-center gap-2\">\n <h2 class=\"m-0 text-2xs font-semibold uppercase tracking-wider text-muted-foreground\">Featured in</h2>\n {context.collectionMembership.map((c) => (\n <a href={c.url} class=\"rounded-full border border-border bg-card px-3 py-1 text-[0.8125rem] font-medium text-foreground no-underline hover:border-ink-400\">\n {c.title}\n </a>\n ))}\n </div>\n )}\n\n {context.relatedRecords.map((group) => (\n <div class:list={[context.collectionMembership.length > 0 ? \"mt-7\" : \"\"]}>\n <div class=\"flex flex-wrap items-baseline justify-between gap-x-4 gap-y-1\">\n <h2 class=\"m-0 text-2xs font-semibold uppercase tracking-wider text-muted-foreground\">\n Other {group.label.toLowerCase().replace(/ to$/, 's to')} {group.subject.name}\n </h2>\n {group.hub && (\n <a href={group.hub.url} aria-label={`Compare them all: ${group.hub.title}`} class=\"text-sm font-medium text-foreground no-underline hover:underline\">\n Compare them all →\n </a>\n )}\n </div>\n {/* Equal-height cards: a ragged wall of boxes reads as clutter. */}\n <ul class=\"m-0 mt-3 grid list-none grid-cols-1 gap-3 p-0 sm:grid-cols-2 lg:grid-cols-3\">\n {group.records.map((r) => (\n <li class=\"m-0\">\n <a href={r.url} class=\"flex h-full flex-col rounded-[var(--radius-lg)] border border-border bg-card px-4 py-3 no-underline hover:border-ink-400\">\n <span class=\"text-sm font-medium text-foreground\">{r.title}</span>\n {r.description && (\n <span class=\"mt-1 line-clamp-2 text-[0.8125rem] leading-snug text-muted-foreground\">{r.description}</span>\n )}\n </a>\n </li>\n ))}\n </ul>\n </div>\n ))}\n </section>\n)}\n",
436
436
  "type": "registry:component",
437
437
  "target": "~/src/components/grove/related-records.astro"
438
438
  },
@@ -498,8 +498,8 @@
498
498
  }
499
499
  ],
500
500
  "meta": {
501
- "version": "1.5.0",
502
- "requiresGrove": "1.0.0"
501
+ "version": "1.6.0",
502
+ "requiresGrove": "1.1.0"
503
503
  },
504
504
  "type": "registry:block"
505
505
  }
package/dist/r/home.json CHANGED
@@ -67,8 +67,8 @@
67
67
  }
68
68
  ],
69
69
  "meta": {
70
- "version": "1.5.0",
71
- "requiresGrove": "1.0.0"
70
+ "version": "1.6.0",
71
+ "requiresGrove": "1.1.0"
72
72
  },
73
73
  "type": "registry:block"
74
74
  }
@@ -16,8 +16,8 @@
16
16
  }
17
17
  ],
18
18
  "meta": {
19
- "version": "1.5.0",
20
- "requiresGrove": "1.0.0"
19
+ "version": "1.6.0",
20
+ "requiresGrove": "1.1.0"
21
21
  },
22
22
  "type": "registry:block"
23
23
  }