@grove-dev/cli 1.3.1 → 1.4.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.
@@ -10,7 +10,7 @@
10
10
  "files": [
11
11
  {
12
12
  "path": "default/pages/submit.astro",
13
- "content": "---\nimport siteConfig from '@grove/generated/site-config.json';\nimport { getSubmissionPageModel } from '@grove-dev/astro/server';\nimport SubmissionClient from '../components/grove/submission-client.astro';\nimport BaseLayout from '../layouts/base-layout.astro';\nimport Container from '../layouts/container.astro';\nimport { buttonClass } from '../lib/classnames.ts';\n\nconst {\n singular,\n title,\n description,\n repoUrl,\n copy,\n fields,\n categories,\n stacks,\n existingSlugs,\n existingFullNames,\n platformOptions,\n licenseOptions,\n taxonomy,\n} = getSubmissionPageModel(siteConfig);\nconst goodSubmissions = [\n ...(copy.good?.length\n ? copy.good\n : [\n `A real, usable ${singular}, not a tutorial or one-screen demo`,\n 'A public repository with a clear open-source license',\n 'Enough documentation to understand, run, or contribute',\n 'Recent maintenance, releases, or meaningful project history',\n ]),\n];\nconst pleaseAvoid = [\n ...(copy.avoid?.length\n ? copy.avoid\n : [\n 'Snippets, exercises, abandoned experiments, or duplicate entries',\n 'Private repositories or projects without source',\n 'Marketing pages with no usable project behind them',\n 'Records with no license or verifiable repository',\n ]),\n];\n\n// Shared control styling.\nconst control =\n 'min-h-10 w-full rounded-[var(--radius)] border border-input bg-background px-3 py-2 text-sm text-foreground outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35';\nconst labelText = 'text-sm font-medium text-foreground';\nconst hint = 'text-2xs leading-relaxed text-muted-foreground';\nconst steps = [\n { id: 'repo', title: 'Repository', text: 'Paste the GitHub URL' },\n { id: 'details', title: 'Details', text: 'Say what it is and who it is for' },\n { id: 'review', title: 'Open the pull request', text: 'Check the preview, open one PR' },\n];\n---\n\n<BaseLayout\n title={title}\n description={description}\n noindex\n site={siteConfig}\n submitHref=\"/submit\"\n>\n <div class=\"border-b border-border bg-surface-sunken/60\">\n <Container>\n <section class=\"py-10 sm:py-14\">\n <p class=\"m-0 text-2xs font-semibold uppercase tracking-wider text-muted-foreground\">\n {copy.eyebrow ?? `${singular} submission`}\n </p>\n <h1 class=\"m-0 mt-2 text-[2rem] font-semibold leading-tight tracking-tight text-foreground sm:text-[2.5rem]\">\n {copy.title ?? `Add ${singular === \"app\" ? \"an\" : \"a\"} ${singular} to the directory`}\n </h1>\n <p class=\"m-0 mt-3 max-w-[62ch] text-[1rem] leading-relaxed text-muted-foreground\">\n {copy.description ?? description}\n </p>\n <ul class=\"m-0 mt-5 flex list-none flex-wrap gap-2 p-0 text-2xs\">\n {[\"No account on this site\", \"Reviewed by a person\", \"Credited on the page\", \"README badge for maintainers\"].map((item) => (\n <li class=\"inline-flex items-center gap-1.5 rounded-full border border-border bg-background px-2.5 py-1 font-medium text-foreground\">\n <svg viewBox=\"0 0 16 16\" width=\"11\" height=\"11\" aria-hidden=\"true\" fill=\"currentColor\" class=\"text-success\"><path d=\"M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.75.75 0 0 1 1.06-1.06L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z\" /></svg>\n {item}\n </li>\n ))}\n </ul>\n\n <ol id=\"submit-steps\" class=\"m-0 mt-8 grid list-none grid-cols-1 gap-2 p-0 sm:grid-cols-3\" aria-label=\"Submission steps\">\n {steps.map((step, i) => (\n <li data-step={step.id} data-state={i === 0 ? \"current\" : \"todo\"} class=\"group flex items-center gap-3 rounded-[var(--radius-lg)] border border-border bg-background px-3 py-2.5 data-[state=current]:border-foreground data-[state=done]:border-success/50\">\n <span class=\"inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full border border-border text-xs font-semibold tabular-nums text-muted-foreground group-data-[state=current]:border-foreground group-data-[state=current]:bg-foreground group-data-[state=current]:text-background group-data-[state=done]:border-success group-data-[state=done]:bg-success group-data-[state=done]:text-background\">\n <span class=\"group-data-[state=done]:hidden\">{i + 1}</span>\n <svg viewBox=\"0 0 16 16\" width=\"12\" height=\"12\" aria-hidden=\"true\" fill=\"currentColor\" class=\"hidden group-data-[state=done]:block\"><path d=\"M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.75.75 0 0 1 1.06-1.06L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z\" /></svg>\n </span>\n <span class=\"min-w-0\">\n <span class=\"block text-sm font-semibold text-foreground\">{step.title}</span>\n <span class=\"block truncate text-2xs text-muted-foreground\">{step.text}</span>\n </span>\n </li>\n ))}\n </ol>\n </section>\n </Container>\n </div>\n\n <Container>\n <div class=\"grid grid-cols-1 items-start gap-6 py-8 sm:py-10 lg:grid-cols-[minmax(0,1fr)_minmax(320px,0.8fr)]\">\n <form id=\"submit-form\" class=\"grid gap-6\" novalidate>\n {/* ── 1. Repository ───────────────────────────── */}\n <section aria-labelledby=\"step-repo\" class=\"rounded-[var(--radius-lg)] border border-border bg-card p-5 sm:p-6\">\n <h2 id=\"step-repo\" class=\"m-0 flex items-center gap-2 text-[1.0625rem] font-semibold text-foreground\">\n <span class=\"text-muted-foreground\">1.</span> Repository\n </h2>\n <label class=\"mt-4 grid gap-1.5\">\n <span class={labelText}>GitHub URL</span>\n <div class=\"flex flex-col gap-2 sm:flex-row\">\n <input id=\"repo-url\" type=\"url\" required autocomplete=\"off\" placeholder=\"https://github.com/owner/repo\" class={`${control} min-h-11 text-[0.9375rem] sm:flex-1`} />\n <button id=\"fetch-repo\" type=\"button\" class={buttonClass(\"primary\", \"bare\", \"min-h-11 whitespace-nowrap px-4 text-sm\")}>Fetch details</button>\n </div>\n <span class={hint}>Public repositories only. We read it from the GitHub API and never write to it.</span>\n </label>\n <div id=\"repo-card\" hidden class=\"mt-4 flex items-start gap-3 rounded-[var(--radius)] border border-border bg-background p-3\">\n <img id=\"repo-avatar\" src=\"data:,\" alt=\"\" width=\"40\" height=\"40\" class=\"h-10 w-10 shrink-0 rounded-lg border border-border object-cover\" />\n <div class=\"min-w-0 flex-1\">\n <p id=\"repo-name\" class=\"m-0 truncate text-sm font-semibold text-foreground\"></p>\n <p id=\"repo-description\" class=\"m-0 mt-0.5 line-clamp-2 text-2xs text-muted-foreground\"></p>\n <p id=\"repo-facts\" class=\"m-0 mt-1.5 flex flex-wrap gap-x-3 text-2xs text-muted-foreground\"></p>\n </div>\n </div>\n </section>\n\n {/* ── 2. Details ──────────────────────────────── */}\n <section aria-labelledby=\"step-details\" class=\"rounded-[var(--radius-lg)] border border-border bg-card p-5 sm:p-6\">\n <h2 id=\"step-details\" class=\"m-0 flex items-center gap-2 text-[1.0625rem] font-semibold text-foreground\">\n <span class=\"text-muted-foreground\">2.</span> About the {singular}\n </h2>\n <p class=\"m-0 mt-1 text-2xs text-muted-foreground\">Filled from GitHub where possible — edit anything that reads like a README.</p>\n\n <div class=\"mt-5 grid gap-5\">\n <div class=\"grid grid-cols-1 items-start gap-4 sm:grid-cols-[minmax(0,1fr)_14rem]\">\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Name</span>\n <input id=\"item-name\" type=\"text\" class={control} />\n </label>\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Page address</span>\n <input id=\"item-slug\" type=\"text\" class={`${control} font-mono`} />\n <span class={hint}>The last part of the page URL — from the repo name.</span>\n </label>\n </div>\n\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Description</span>\n <textarea id=\"item-description\" rows=\"3\" class={`${control} resize-y`}></textarea>\n <span class={hint}>One or two plain sentences: what it is and who it is for. At least 40 characters.</span>\n </label>\n\n {(fields.category || fields.stack) && (\n <div class:list={[\"grid grid-cols-1 gap-4\", fields.category && fields.stack && \"sm:grid-cols-2\"]}>\n {fields.category && (\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Category</span>\n <select id=\"item-category\" class={control}>\n <option value=\"\">Choose a category</option>\n {categories.map((option) => <option value={option.id}>{option.label}</option>)}\n </select>\n </label>\n )}\n {fields.stack && (\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Primary stack</span>\n <select id=\"primary-stack\" class={control}>\n <option value=\"\">Choose a stack</option>\n {stacks.map((option) => <option value={option.id}>{option.label}</option>)}\n </select>\n </label>\n )}\n </div>\n )}\n\n {fields.platforms && (\n <fieldset class=\"m-0 grid gap-2 border-0 p-0\">\n <legend class={`${labelText} mb-2`}>Platforms</legend>\n <div class=\"flex flex-wrap gap-2\">\n {platformOptions.map((platform) => (\n <label class=\"inline-flex min-h-9 cursor-pointer items-center gap-2 rounded-full border border-border px-3 text-sm text-foreground has-[:checked]:border-foreground has-[:checked]:bg-foreground has-[:checked]:text-background\">\n <input type=\"checkbox\" name=\"platform\" value={platform.id} class=\"sr-only\" />\n <span>{platform.label}</span>\n </label>\n ))}\n </div>\n </fieldset>\n )}\n\n\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Your GitHub username <span class=\"font-normal text-muted-foreground\">(recommended)</span></span>\n <div class=\"flex items-center gap-2\">\n <span class=\"text-sm text-muted-foreground\">@</span>\n <input id=\"submitted-by\" type=\"text\" autocomplete=\"username\" spellcheck=\"false\" placeholder=\"octocat\" class={`${control} max-w-xs`} />\n </div>\n <span class={hint}>Shown as “Submitted by @you” on the page and on the contributors page.</span>\n </label>\n\n <details class=\"group rounded-[var(--radius)] border border-border bg-background\">\n <summary class=\"flex cursor-pointer list-none items-center justify-between gap-3 px-4 py-3 text-sm font-medium text-foreground [&::-webkit-details-marker]:hidden\">\n <span>Add more detail <span class=\"font-normal text-muted-foreground\">— optional: tags, licence, website, who it is for</span></span>\n <span aria-hidden=\"true\" class=\"text-muted-foreground transition-transform group-open:rotate-45\">+</span>\n </summary>\n <div class=\"grid gap-5 border-t border-border px-4 pb-5 pt-4\">\n {fields.tags && (\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Tags</span>\n <input id=\"item-tags\" type=\"text\" placeholder=\"self-hosted, developer-tools, offline-first\" class={control} />\n <span class={hint}>Comma-separated. Pre-filled from the repository topics.</span>\n </label>\n )}\n <div class=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n {fields.license && licenseOptions.length > 0 && (\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Licence</span>\n <select id=\"item-license\" class={control}>\n <option value=\"\">Detected from the repository</option>\n {licenseOptions.map((option) => <option value={option.id}>{option.label}</option>)}\n </select>\n </label>\n )}\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Website</span>\n <input id=\"item-website\" type=\"url\" placeholder=\"https://example.com\" class={control} />\n </label>\n </div>\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Best for</span>\n <textarea id=\"best-for\" rows=\"2\" class={`${control} resize-y`} placeholder=\"One use case per line\"></textarea>\n <span class={hint}>Who it suits — one audience or use case per line.</span>\n </label>\n </div>\n </details>\n </div>\n </section>\n </form>\n\n {/* ── 3. Review & open the pull request ─────────── */}\n <aside class=\"flex flex-col gap-4 lg:sticky lg:top-20\" aria-labelledby=\"step-review\">\n <section class=\"rounded-[var(--radius-lg)] border border-border bg-card p-5\">\n <h2 id=\"step-review\" class=\"m-0 flex items-center gap-2 text-[1.0625rem] font-semibold text-foreground\">\n <span class=\"text-muted-foreground\">3.</span> Preview and open the PR\n </h2>\n\n <div id=\"preview-card\" class=\"mt-4 rounded-[var(--radius)] border border-border bg-background p-4\">\n <div class=\"flex items-start gap-3\">\n <img id=\"preview-avatar\" hidden src=\"data:,\" alt=\"\" width=\"40\" height=\"40\" class=\"h-10 w-10 shrink-0 rounded-lg border border-border object-cover\" />\n <span id=\"preview-initials\" class=\"inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-lg border border-dashed border-border text-sm font-semibold text-muted-foreground\">?</span>\n <div class=\"min-w-0\">\n <p id=\"preview-name\" class=\"m-0 truncate text-[0.9375rem] font-semibold text-foreground\">{`Your ${singular}`}</p>\n <p id=\"preview-meta\" class=\"m-0 mt-0.5 text-2xs text-muted-foreground\">Category · Stack</p>\n </div>\n </div>\n <p id=\"preview-description\" class=\"m-0 mt-3 line-clamp-3 text-sm leading-relaxed text-muted-foreground\">The description appears here.</p>\n <p id=\"preview-credit\" hidden class=\"m-0 mt-3 text-2xs text-muted-foreground\"></p>\n </div>\n\n <ul id=\"submit-checklist\" class=\"m-0 mt-4 flex list-none flex-col gap-1.5 p-0 text-sm\" aria-label=\"Before you open the pull request\">\n {[\n [\"repo\", \"Repository fetched\"],\n [\"description\", \"Description of 40+ characters\"],\n ...(fields.category ? [[\"category\", \"Category chosen\"]] : []),\n ...(fields.stack ? [[\"stack\", \"Primary stack chosen\"]] : []),\n ...(fields.platforms ? [[\"platforms\", \"At least one platform\"]] : []),\n [\"credit\", \"Your GitHub username (optional)\"],\n ].map(([key, label]) => (\n <li data-check={key} data-ok=\"false\" class=\"group flex items-center gap-2 text-muted-foreground data-[ok=true]:text-foreground\">\n <span class=\"inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-full border border-border group-data-[ok=true]:border-success group-data-[ok=true]:bg-success group-data-[ok=true]:text-background\">\n <svg viewBox=\"0 0 16 16\" width=\"9\" height=\"9\" aria-hidden=\"true\" fill=\"currentColor\" class=\"hidden group-data-[ok=true]:block\"><path d=\"M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.75.75 0 0 1 1.06-1.06L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z\" /></svg>\n </span>\n {label}\n </li>\n ))}\n </ul>\n\n <div class=\"mt-5 grid gap-2\">\n <a id=\"open-pr-link\" href=\"#\" target=\"_blank\" rel=\"noopener\" class={buttonClass(\"primary\", \"md\", \"w-full justify-center pointer-events-none opacity-50\")}>\n Open pull request on GitHub\n </a>\n <button id=\"copy-yaml\" type=\"button\" disabled class={buttonClass(\"ghost\", \"sm\", \"w-full justify-center pointer-events-none opacity-50\")}>Copy the file instead</button>\n </div>\n <p id=\"submit-status\" class=\"m-0 mt-3 min-h-5 text-2xs text-muted-foreground\" aria-live=\"polite\"></p>\n\n <details class=\"group mt-2 border-t border-border pt-3\">\n <summary class=\"flex cursor-pointer list-none items-center justify-between text-2xs font-medium text-muted-foreground hover:text-foreground [&::-webkit-details-marker]:hidden\">\n <span>Show the file <span id=\"record-path\" class=\"font-mono\"></span></span>\n <span aria-hidden=\"true\" class=\"transition-transform group-open:rotate-45\">+</span>\n </summary>\n <pre class=\"mt-3 max-h-96 overflow-auto rounded-md border border-border bg-surface-sunken p-3 text-xs leading-relaxed text-foreground\"><code id=\"yaml-preview\">Paste a GitHub URL to generate a draft.</code></pre>\n </details>\n </section>\n\n <section class=\"rounded-[var(--radius-lg)] border border-border bg-card p-5\">\n <h2 class=\"m-0 text-sm font-semibold text-foreground\">What happens next</h2>\n <ol class=\"m-0 mt-3 flex list-none flex-col gap-3 p-0 text-2xs leading-relaxed text-muted-foreground\">\n {[\n [\"GitHub opens with the file ready.\", \"Commit it to a fork and open the pull request — one record file.\"],\n [\"Checks run on the pull request.\", \"Schema, taxonomy and duplicate checks — fix anything they flag.\"],\n [\"A maintainer reviews and merges.\", \"Curation and review fields are theirs to fill.\"],\n [\"The page goes live and credits you.\", \"It shows “Submitted by @you”, and maintainers get a README badge.\"],\n ].map(([head, text], i) => (\n <li class=\"flex gap-3\">\n <span class=\"inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-secondary text-[10px] font-semibold text-secondary-foreground\">{i + 1}</span>\n <span><strong class=\"font-semibold text-foreground\">{head}</strong> {text}</span>\n </li>\n ))}\n </ol>\n </section>\n\n <details class=\"group rounded-[var(--radius-lg)] border border-border bg-card\">\n <summary class=\"flex cursor-pointer list-none items-center justify-between px-5 py-4 text-sm font-semibold text-foreground [&::-webkit-details-marker]:hidden\">\n Is it a good fit?\n <span aria-hidden=\"true\" class=\"text-muted-foreground transition-transform group-open:rotate-45\">+</span>\n </summary>\n <div class=\"grid gap-4 border-t border-border px-5 pb-5 pt-4 text-2xs sm:grid-cols-2 lg:grid-cols-1\">\n <div>\n <p class=\"m-0 font-semibold uppercase tracking-wider text-emerald-700 dark:text-emerald-400\">Good fit</p>\n <ul class=\"m-0 mt-2 list-none space-y-1.5 p-0 text-foreground\">\n {goodSubmissions.map((item) => <li class=\"flex gap-2\"><span class=\"text-success\">✓</span><span>{item}</span></li>)}\n </ul>\n </div>\n <div>\n <p class=\"m-0 font-semibold uppercase tracking-wider text-amber-700 dark:text-amber-400\">Not a fit</p>\n <ul class=\"m-0 mt-2 list-none space-y-1.5 p-0 text-foreground\">\n {pleaseAvoid.map((item) => <li class=\"flex gap-2\"><span class=\"text-warning\">×</span><span>{item}</span></li>)}\n </ul>\n </div>\n </div>\n </details>\n </aside>\n </div>\n </Container>\n\n <SubmissionClient\n existingSlugs={existingSlugs}\n existingFullNames={existingFullNames}\n repoUrl={repoUrl}\n fields={fields}\n taxonomy={taxonomy}\n categoryLabels={Object.fromEntries(categories.map((c) => [c.id, c.label]))}\n stackLabels={Object.fromEntries(stacks.map((c) => [c.id, c.label]))}\n />\n</BaseLayout>\n",
13
+ "content": "---\nimport siteConfig from '@grove/generated/site-config.json';\nimport { getSubmissionPageModel } from '@grove-dev/astro/server';\nimport SubmissionClient from '../components/grove/submission-client.astro';\nimport BaseLayout from '../layouts/base-layout.astro';\nimport Container from '../layouts/container.astro';\nimport { buttonClass } from '../lib/classnames.ts';\n\nconst {\n singular,\n title,\n description,\n repoUrl,\n copy,\n fields,\n categories,\n stacks,\n existingSlugs,\n existingFullNames,\n platformOptions,\n licenseOptions,\n taxonomy,\n} = getSubmissionPageModel(siteConfig);\nconst goodSubmissions = [\n ...(copy.good?.length\n ? copy.good\n : [\n `A real, usable ${singular}, not a tutorial or one-screen demo`,\n 'A public repository with a clear open-source license',\n 'Enough documentation to understand, run, or contribute',\n 'Recent maintenance, releases, or meaningful project history',\n ]),\n];\nconst pleaseAvoid = [\n ...(copy.avoid?.length\n ? copy.avoid\n : [\n 'Snippets, exercises, abandoned experiments, or duplicate entries',\n 'Private repositories or projects without source',\n 'Marketing pages with no usable project behind them',\n 'Records with no license or verifiable repository',\n ]),\n];\n\n// Shared control styling.\nconst control =\n 'min-h-10 w-full rounded-[var(--radius)] border border-input bg-background px-3 py-2 text-sm text-foreground outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35';\nconst labelText = 'text-sm font-medium text-foreground';\nconst hint = 'text-2xs leading-relaxed text-muted-foreground';\nconst steps = [\n { id: 'repo', title: 'Repository', text: 'Paste the GitHub URL' },\n { id: 'details', title: 'Details', text: 'Say what it is and who it is for' },\n { id: 'review', title: 'Open the pull request', text: 'Check the preview, open one PR' },\n];\n---\n\n<BaseLayout\n title={title}\n description={description}\n noindex\n site={siteConfig}\n submitHref=\"/submit/\"\n>\n <div class=\"border-b border-border bg-surface-sunken/60\">\n <Container>\n <section class=\"py-10 sm:py-14\">\n <p class=\"m-0 text-2xs font-semibold uppercase tracking-wider text-muted-foreground\">\n {copy.eyebrow ?? `${singular} submission`}\n </p>\n <h1 class=\"m-0 mt-2 text-[2rem] font-semibold leading-tight tracking-tight text-foreground sm:text-[2.5rem]\">\n {copy.title ?? `Add ${singular === \"app\" ? \"an\" : \"a\"} ${singular} to the directory`}\n </h1>\n <p class=\"m-0 mt-3 max-w-[62ch] text-[1rem] leading-relaxed text-muted-foreground\">\n {copy.description ?? description}\n </p>\n <ul class=\"m-0 mt-5 flex list-none flex-wrap gap-2 p-0 text-2xs\">\n {[\"No account on this site\", \"Reviewed by a person\", \"Credited on the page\", \"README badge for maintainers\"].map((item) => (\n <li class=\"inline-flex items-center gap-1.5 rounded-full border border-border bg-background px-2.5 py-1 font-medium text-foreground\">\n <svg viewBox=\"0 0 16 16\" width=\"11\" height=\"11\" aria-hidden=\"true\" fill=\"currentColor\" class=\"text-success\"><path d=\"M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.75.75 0 0 1 1.06-1.06L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z\" /></svg>\n {item}\n </li>\n ))}\n </ul>\n\n <ol id=\"submit-steps\" class=\"m-0 mt-8 grid list-none grid-cols-1 gap-2 p-0 sm:grid-cols-3\" aria-label=\"Submission steps\">\n {steps.map((step, i) => (\n <li data-step={step.id} data-state={i === 0 ? \"current\" : \"todo\"} class=\"group flex items-center gap-3 rounded-[var(--radius-lg)] border border-border bg-background px-3 py-2.5 data-[state=current]:border-foreground data-[state=done]:border-success/50\">\n <span class=\"inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full border border-border text-xs font-semibold tabular-nums text-muted-foreground group-data-[state=current]:border-foreground group-data-[state=current]:bg-foreground group-data-[state=current]:text-background group-data-[state=done]:border-success group-data-[state=done]:bg-success group-data-[state=done]:text-background\">\n <span class=\"group-data-[state=done]:hidden\">{i + 1}</span>\n <svg viewBox=\"0 0 16 16\" width=\"12\" height=\"12\" aria-hidden=\"true\" fill=\"currentColor\" class=\"hidden group-data-[state=done]:block\"><path d=\"M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.75.75 0 0 1 1.06-1.06L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z\" /></svg>\n </span>\n <span class=\"min-w-0\">\n <span class=\"block text-sm font-semibold text-foreground\">{step.title}</span>\n <span class=\"block truncate text-2xs text-muted-foreground\">{step.text}</span>\n </span>\n </li>\n ))}\n </ol>\n </section>\n </Container>\n </div>\n\n <Container>\n <div class=\"grid grid-cols-1 items-start gap-6 py-8 sm:py-10 lg:grid-cols-[minmax(0,1fr)_minmax(320px,0.8fr)]\">\n <form id=\"submit-form\" class=\"grid gap-6\" novalidate>\n {/* ── 1. Repository ───────────────────────────── */}\n <section aria-labelledby=\"step-repo\" class=\"rounded-[var(--radius-lg)] border border-border bg-card p-5 sm:p-6\">\n <h2 id=\"step-repo\" class=\"m-0 flex items-center gap-2 text-[1.0625rem] font-semibold text-foreground\">\n <span class=\"text-muted-foreground\">1.</span> Repository\n </h2>\n <label class=\"mt-4 grid gap-1.5\">\n <span class={labelText}>GitHub URL</span>\n <div class=\"flex flex-col gap-2 sm:flex-row\">\n <input id=\"repo-url\" type=\"url\" required autocomplete=\"off\" placeholder=\"https://github.com/owner/repo\" class={`${control} min-h-11 text-[0.9375rem] sm:flex-1`} />\n <button id=\"fetch-repo\" type=\"button\" class={buttonClass(\"primary\", \"bare\", \"min-h-11 whitespace-nowrap px-4 text-sm\")}>Fetch details</button>\n </div>\n <span class={hint}>Public repositories only. We read it from the GitHub API and never write to it.</span>\n </label>\n <div id=\"repo-card\" hidden class=\"mt-4 flex items-start gap-3 rounded-[var(--radius)] border border-border bg-background p-3\">\n <img id=\"repo-avatar\" src=\"data:,\" alt=\"\" width=\"40\" height=\"40\" class=\"h-10 w-10 shrink-0 rounded-lg border border-border object-cover\" />\n <div class=\"min-w-0 flex-1\">\n <p id=\"repo-name\" class=\"m-0 truncate text-sm font-semibold text-foreground\"></p>\n <p id=\"repo-description\" class=\"m-0 mt-0.5 line-clamp-2 text-2xs text-muted-foreground\"></p>\n <p id=\"repo-facts\" class=\"m-0 mt-1.5 flex flex-wrap gap-x-3 text-2xs text-muted-foreground\"></p>\n </div>\n </div>\n </section>\n\n {/* ── 2. Details ──────────────────────────────── */}\n <section aria-labelledby=\"step-details\" class=\"rounded-[var(--radius-lg)] border border-border bg-card p-5 sm:p-6\">\n <h2 id=\"step-details\" class=\"m-0 flex items-center gap-2 text-[1.0625rem] font-semibold text-foreground\">\n <span class=\"text-muted-foreground\">2.</span> About the {singular}\n </h2>\n <p class=\"m-0 mt-1 text-2xs text-muted-foreground\">Filled from GitHub where possible — edit anything that reads like a README.</p>\n\n <div class=\"mt-5 grid gap-5\">\n <div class=\"grid grid-cols-1 items-start gap-4 sm:grid-cols-[minmax(0,1fr)_14rem]\">\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Name</span>\n <input id=\"item-name\" type=\"text\" class={control} />\n </label>\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Page address</span>\n <input id=\"item-slug\" type=\"text\" class={`${control} font-mono`} />\n <span class={hint}>The last part of the page URL — from the repo name.</span>\n </label>\n </div>\n\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Description</span>\n <textarea id=\"item-description\" rows=\"3\" class={`${control} resize-y`}></textarea>\n <span class={hint}>One or two plain sentences: what it is and who it is for. At least 40 characters.</span>\n </label>\n\n {(fields.category || fields.stack) && (\n <div class:list={[\"grid grid-cols-1 gap-4\", fields.category && fields.stack && \"sm:grid-cols-2\"]}>\n {fields.category && (\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Category</span>\n <select id=\"item-category\" class={control}>\n <option value=\"\">Choose a category</option>\n {categories.map((option) => <option value={option.id}>{option.label}</option>)}\n </select>\n </label>\n )}\n {fields.stack && (\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Primary stack</span>\n <select id=\"primary-stack\" class={control}>\n <option value=\"\">Choose a stack</option>\n {stacks.map((option) => <option value={option.id}>{option.label}</option>)}\n </select>\n </label>\n )}\n </div>\n )}\n\n {fields.platforms && (\n <fieldset class=\"m-0 grid gap-2 border-0 p-0\">\n <legend class={`${labelText} mb-2`}>Platforms</legend>\n <div class=\"flex flex-wrap gap-2\">\n {platformOptions.map((platform) => (\n <label class=\"inline-flex min-h-9 cursor-pointer items-center gap-2 rounded-full border border-border px-3 text-sm text-foreground has-[:checked]:border-foreground has-[:checked]:bg-foreground has-[:checked]:text-background\">\n <input type=\"checkbox\" name=\"platform\" value={platform.id} class=\"sr-only\" />\n <span>{platform.label}</span>\n </label>\n ))}\n </div>\n </fieldset>\n )}\n\n\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Your GitHub username <span class=\"font-normal text-muted-foreground\">(recommended)</span></span>\n <div class=\"flex items-center gap-2\">\n <span class=\"text-sm text-muted-foreground\">@</span>\n <input id=\"submitted-by\" type=\"text\" autocomplete=\"username\" spellcheck=\"false\" placeholder=\"octocat\" class={`${control} max-w-xs`} />\n </div>\n <span class={hint}>Shown as “Submitted by @you” on the page and on the contributors page.</span>\n </label>\n\n <details class=\"group rounded-[var(--radius)] border border-border bg-background\">\n <summary class=\"flex cursor-pointer list-none items-center justify-between gap-3 px-4 py-3 text-sm font-medium text-foreground [&::-webkit-details-marker]:hidden\">\n <span>Add more detail <span class=\"font-normal text-muted-foreground\">— optional: tags, licence, website, who it is for</span></span>\n <span aria-hidden=\"true\" class=\"text-muted-foreground transition-transform group-open:rotate-45\">+</span>\n </summary>\n <div class=\"grid gap-5 border-t border-border px-4 pb-5 pt-4\">\n {fields.tags && (\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Tags</span>\n <input id=\"item-tags\" type=\"text\" placeholder=\"self-hosted, developer-tools, offline-first\" class={control} />\n <span class={hint}>Comma-separated. Pre-filled from the repository topics.</span>\n </label>\n )}\n <div class=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n {fields.license && licenseOptions.length > 0 && (\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Licence</span>\n <select id=\"item-license\" class={control}>\n <option value=\"\">Detected from the repository</option>\n {licenseOptions.map((option) => <option value={option.id}>{option.label}</option>)}\n </select>\n </label>\n )}\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Website</span>\n <input id=\"item-website\" type=\"url\" placeholder=\"https://example.com\" class={control} />\n </label>\n </div>\n <label class=\"grid gap-1.5\">\n <span class={labelText}>Best for</span>\n <textarea id=\"best-for\" rows=\"2\" class={`${control} resize-y`} placeholder=\"One use case per line\"></textarea>\n <span class={hint}>Who it suits — one audience or use case per line.</span>\n </label>\n </div>\n </details>\n </div>\n </section>\n </form>\n\n {/* ── 3. Review & open the pull request ─────────── */}\n <aside class=\"flex flex-col gap-4 lg:sticky lg:top-20\" aria-labelledby=\"step-review\">\n <section class=\"rounded-[var(--radius-lg)] border border-border bg-card p-5\">\n <h2 id=\"step-review\" class=\"m-0 flex items-center gap-2 text-[1.0625rem] font-semibold text-foreground\">\n <span class=\"text-muted-foreground\">3.</span> Preview and open the PR\n </h2>\n\n <div id=\"preview-card\" class=\"mt-4 rounded-[var(--radius)] border border-border bg-background p-4\">\n <div class=\"flex items-start gap-3\">\n <img id=\"preview-avatar\" hidden src=\"data:,\" alt=\"\" width=\"40\" height=\"40\" class=\"h-10 w-10 shrink-0 rounded-lg border border-border object-cover\" />\n <span id=\"preview-initials\" class=\"inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-lg border border-dashed border-border text-sm font-semibold text-muted-foreground\">?</span>\n <div class=\"min-w-0\">\n <p id=\"preview-name\" class=\"m-0 truncate text-[0.9375rem] font-semibold text-foreground\">{`Your ${singular}`}</p>\n <p id=\"preview-meta\" class=\"m-0 mt-0.5 text-2xs text-muted-foreground\">Category · Stack</p>\n </div>\n </div>\n <p id=\"preview-description\" class=\"m-0 mt-3 line-clamp-3 text-sm leading-relaxed text-muted-foreground\">The description appears here.</p>\n <p id=\"preview-credit\" hidden class=\"m-0 mt-3 text-2xs text-muted-foreground\"></p>\n </div>\n\n <ul id=\"submit-checklist\" class=\"m-0 mt-4 flex list-none flex-col gap-1.5 p-0 text-sm\" aria-label=\"Before you open the pull request\">\n {[\n [\"repo\", \"Repository fetched\"],\n [\"description\", \"Description of 40+ characters\"],\n ...(fields.category ? [[\"category\", \"Category chosen\"]] : []),\n ...(fields.stack ? [[\"stack\", \"Primary stack chosen\"]] : []),\n ...(fields.platforms ? [[\"platforms\", \"At least one platform\"]] : []),\n [\"credit\", \"Your GitHub username (optional)\"],\n ].map(([key, label]) => (\n <li data-check={key} data-ok=\"false\" class=\"group flex items-center gap-2 text-muted-foreground data-[ok=true]:text-foreground\">\n <span class=\"inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-full border border-border group-data-[ok=true]:border-success group-data-[ok=true]:bg-success group-data-[ok=true]:text-background\">\n <svg viewBox=\"0 0 16 16\" width=\"9\" height=\"9\" aria-hidden=\"true\" fill=\"currentColor\" class=\"hidden group-data-[ok=true]:block\"><path d=\"M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.75.75 0 0 1 1.06-1.06L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z\" /></svg>\n </span>\n {label}\n </li>\n ))}\n </ul>\n\n <div class=\"mt-5 grid gap-2\">\n <a id=\"open-pr-link\" href=\"#\" target=\"_blank\" rel=\"noopener\" class={buttonClass(\"primary\", \"md\", \"w-full justify-center pointer-events-none opacity-50\")}>\n Open pull request on GitHub\n </a>\n <button id=\"copy-yaml\" type=\"button\" disabled class={buttonClass(\"ghost\", \"sm\", \"w-full justify-center pointer-events-none opacity-50\")}>Copy the file instead</button>\n </div>\n <p id=\"submit-status\" class=\"m-0 mt-3 min-h-5 text-2xs text-muted-foreground\" aria-live=\"polite\"></p>\n\n <details class=\"group mt-2 border-t border-border pt-3\">\n <summary class=\"flex cursor-pointer list-none items-center justify-between text-2xs font-medium text-muted-foreground hover:text-foreground [&::-webkit-details-marker]:hidden\">\n <span>Show the file <span id=\"record-path\" class=\"font-mono\"></span></span>\n <span aria-hidden=\"true\" class=\"transition-transform group-open:rotate-45\">+</span>\n </summary>\n <pre class=\"mt-3 max-h-96 overflow-auto rounded-md border border-border bg-surface-sunken p-3 text-xs leading-relaxed text-foreground\"><code id=\"yaml-preview\">Paste a GitHub URL to generate a draft.</code></pre>\n </details>\n </section>\n\n <section class=\"rounded-[var(--radius-lg)] border border-border bg-card p-5\">\n <h2 class=\"m-0 text-sm font-semibold text-foreground\">What happens next</h2>\n <ol class=\"m-0 mt-3 flex list-none flex-col gap-3 p-0 text-2xs leading-relaxed text-muted-foreground\">\n {[\n [\"GitHub opens with the file ready.\", \"Commit it to a fork and open the pull request — one record file.\"],\n [\"Checks run on the pull request.\", \"Schema, taxonomy and duplicate checks — fix anything they flag.\"],\n [\"A maintainer reviews and merges.\", \"Curation and review fields are theirs to fill.\"],\n [\"The page goes live and credits you.\", \"It shows “Submitted by @you”, and maintainers get a README badge.\"],\n ].map(([head, text], i) => (\n <li class=\"flex gap-3\">\n <span class=\"inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-secondary text-[10px] font-semibold text-secondary-foreground\">{i + 1}</span>\n <span><strong class=\"font-semibold text-foreground\">{head}</strong> {text}</span>\n </li>\n ))}\n </ol>\n </section>\n\n <details class=\"group rounded-[var(--radius-lg)] border border-border bg-card\">\n <summary class=\"flex cursor-pointer list-none items-center justify-between px-5 py-4 text-sm font-semibold text-foreground [&::-webkit-details-marker]:hidden\">\n Is it a good fit?\n <span aria-hidden=\"true\" class=\"text-muted-foreground transition-transform group-open:rotate-45\">+</span>\n </summary>\n <div class=\"grid gap-4 border-t border-border px-5 pb-5 pt-4 text-2xs sm:grid-cols-2 lg:grid-cols-1\">\n <div>\n <p class=\"m-0 font-semibold uppercase tracking-wider text-emerald-700 dark:text-emerald-400\">Good fit</p>\n <ul class=\"m-0 mt-2 list-none space-y-1.5 p-0 text-foreground\">\n {goodSubmissions.map((item) => <li class=\"flex gap-2\"><span class=\"text-success\">✓</span><span>{item}</span></li>)}\n </ul>\n </div>\n <div>\n <p class=\"m-0 font-semibold uppercase tracking-wider text-amber-700 dark:text-amber-400\">Not a fit</p>\n <ul class=\"m-0 mt-2 list-none space-y-1.5 p-0 text-foreground\">\n {pleaseAvoid.map((item) => <li class=\"flex gap-2\"><span class=\"text-warning\">×</span><span>{item}</span></li>)}\n </ul>\n </div>\n </div>\n </details>\n </aside>\n </div>\n </Container>\n\n <SubmissionClient\n existingSlugs={existingSlugs}\n existingFullNames={existingFullNames}\n repoUrl={repoUrl}\n fields={fields}\n taxonomy={taxonomy}\n categoryLabels={Object.fromEntries(categories.map((c) => [c.id, c.label]))}\n stackLabels={Object.fromEntries(stacks.map((c) => [c.id, c.label]))}\n />\n</BaseLayout>\n",
14
14
  "type": "registry:page",
15
15
  "target": "~/src/pages/submit.astro"
16
16
  },
@@ -23,7 +23,7 @@
23
23
  ],
24
24
  "meta": {
25
25
  "version": "1.6.0",
26
- "requiresGrove": "1.3.1"
26
+ "requiresGrove": "1.4.0"
27
27
  },
28
28
  "type": "registry:block"
29
29
  }
@@ -48,20 +48,20 @@
48
48
  },
49
49
  {
50
50
  "path": "default/components/grove/stack-grid.astro",
51
- "content": "---\nimport { formatCount } from '@grove-dev/core';\nimport Icon from './icon.astro';\n\n/**\n * StackGrid — browse-by-stack grid for the home page.\n *\n * Renders a card per stack with name, blurb, status pill\n * (live/expanding/planned), and a count. The href is the list\n * page filtered to that stack, so consumers compose the URL via\n * the `hrefFor` prop.\n *\n * Generic: no blueprint-specific terms. A \"stack\" here is just a\n * slug + display name + status; consumers derive both from their\n * own data.\n */\n\ninterface StackEntry {\n name: string;\n slug: string;\n blurb?: string;\n status?: 'live' | 'expanding' | 'planned';\n count?: number;\n}\n\ninterface Props {\n stacks: StackEntry[];\n /** List page base. */\n pathPrefix?: string;\n /** Stack icon registry — maps slug → icon file name. Optional. */\n iconAliases?: Record<string, string>;\n /** Extra class. */\n class?: string;\n /** Hide the section eyebrow / header entirely. */\n bare?: boolean;\n itemLabelPlural?: string;\n /** Noun pair for count chips — singular fixes \"1 projects\". */\n itemNoun?: { singular: string; plural: string };\n /** Pass 1 when this grid IS the page (`/stacks` index). */\n level?: 1 | 2;\n /**\n * Card link builder. Defaults to the browse page filtered by stack\n * (`{pathPrefix}?stack=…`); pass e.g. `(slug) => \\`/stacks/${slug}\\``\n * to link to taxonomy detail routes instead.\n */\n hrefFor?: (slug: string) => string;\n}\n\nconst {\n stacks,\n pathPrefix = '/',\n iconAliases,\n class: className = '',\n bare = false,\n itemLabelPlural = 'items',\n itemNoun = { singular: 'item', plural: 'items' },\n level = 2,\n hrefFor,\n} = Astro.props;\n\nconst Heading = `h${level}` as 'h1' | 'h2';\n\nfunction buildHref(slug: string): string {\n if (hrefFor) return hrefFor(slug);\n const base = pathPrefix.replace(/\\/$/, '');\n return `${base}?stack=${encodeURIComponent(slug)}`;\n}\n\nfunction statusLabel(s: StackEntry['status']): string | null {\n switch (s) {\n case 'live':\n return 'Available now';\n case 'expanding':\n return 'Expanding';\n case 'planned':\n return 'Planned';\n default:\n return null;\n }\n}\n---\n\n<section\n id=\"stacks\"\n class:list={[\"py-12 sm:py-16 scroll-mt-20 border-b border-ink-200 dark:border-ink-800\", className]}\n aria-labelledby={bare ? undefined : \"grove-stackgrid-heading\"}\n>\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n {!bare && (\n <header class=\"mb-6\">\n <span class=\"text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">\n Stacks\n </span>\n <Heading\n id=\"grove-stackgrid-heading\"\n class=\"m-0 mt-1 text-[1.5rem] sm:text-[1.625rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100\"\n >\n Browse by stack\n </Heading>\n <p class=\"m-0 max-w-[60ch] text-[0.9375rem] text-ink-500 dark:text-ink-400\">\n Pick a stack to see real {itemLabelPlural} built with it.\n </p>\n </header>\n )}\n\n <div class=\"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3\">\n {stacks.map((s) => (\n <a\n href={buildHref(s.slug)}\n class=\"rounded-[calc(var(--radius)+0.25rem)] border border-border bg-card shadow-none transition-colors hover:border-ink-300 dark:hover:border-ink-700 group flex h-full items-center gap-3 p-3.5 no-underline\"\n data-event=\"stack_grid_click\"\n data-event-source=\"stack_grid\"\n >\n <div class=\"flex h-9 w-9 shrink-0 items-center justify-center rounded-md border border-ink-200 bg-white dark:border-ink-800 dark:bg-ink-950\" aria-hidden=\"true\">\n <Icon name={iconAliases?.[s.slug] ?? s.slug} category=\"stack\" size={18} />\n </div>\n\n <div class=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n <div class=\"flex items-center gap-2\">\n {/* Not a heading: these tiles are links in a grid, and\n heading-per-card breaks the outline when the grid\n sits directly under the page h1 (/stacks). */}\n <span class=\"m-0 text-[0.875rem] font-semibold tracking-tight text-ink-900 group-hover:underline dark:text-ink-100\">\n {s.name}\n </span>\n {typeof s.count === \"number\" && (\n <span class=\"inline-flex items-center rounded-md border border-ink-200 bg-ink-50 px-1.5 py-0.5 font-mono text-[10px] font-medium text-ink-600 dark:border-ink-800 dark:bg-ink-900/60 dark:text-ink-400\">\n {formatCount(s.count, itemNoun)}\n </span>\n )}\n </div>\n {s.blurb && <p class=\"m-0 truncate text-2xs text-ink-500 dark:text-ink-400\">{s.blurb}</p>}\n </div>\n {statusLabel(s.status) && (\n <span\n class:list={[\n \"shrink-0 inline-flex items-center rounded-md border px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wider\",\n s.status === \"live\"\n ? \"!bg-success/10 !text-success\"\n : s.status === \"expanding\"\n ? \"!bg-info/10 !text-info\"\n : \"!bg-warning/10 !text-warning\",\n ]}\n >\n {statusLabel(s.status)}\n </span>\n )}\n </a>\n ))}\n </div>\n </div>\n</section>\n",
51
+ "content": "---\nimport { formatCount, hrefForFilters } from '@grove-dev/core';\nimport Icon from './icon.astro';\n\n/**\n * StackGrid — browse-by-stack grid for the home page.\n *\n * Renders a card per stack with name, blurb, status pill\n * (live/expanding/planned), and a count. The href is the list\n * page filtered to that stack, so consumers compose the URL via\n * the `hrefFor` prop.\n *\n * Generic: no blueprint-specific terms. A \"stack\" here is just a\n * slug + display name + status; consumers derive both from their\n * own data.\n */\n\ninterface StackEntry {\n name: string;\n slug: string;\n blurb?: string;\n status?: 'live' | 'expanding' | 'planned';\n count?: number;\n}\n\ninterface Props {\n stacks: StackEntry[];\n /** List page base. */\n pathPrefix?: string;\n /** Stack icon registry — maps slug → icon file name. Optional. */\n iconAliases?: Record<string, string>;\n /** Extra class. */\n class?: string;\n /** Hide the section eyebrow / header entirely. */\n bare?: boolean;\n itemLabelPlural?: string;\n /** Noun pair for count chips — singular fixes \"1 projects\". */\n itemNoun?: { singular: string; plural: string };\n /** Pass 1 when this grid IS the page (`/stacks` index). */\n level?: 1 | 2;\n /**\n * Card link builder. Defaults to the browse page filtered by stack\n * (`{pathPrefix}?stack=…`); pass e.g. `(slug) => \\`/stacks/${slug}\\``\n * to link to taxonomy detail routes instead.\n */\n hrefFor?: (slug: string) => string;\n}\n\nconst {\n stacks,\n pathPrefix = '/',\n iconAliases,\n class: className = '',\n bare = false,\n itemLabelPlural = 'items',\n itemNoun = { singular: 'item', plural: 'items' },\n level = 2,\n hrefFor,\n} = Astro.props;\n\nconst Heading = `h${level}` as 'h1' | 'h2';\n\nfunction buildHref(slug: string): string {\n if (hrefFor) return hrefFor(slug);\n return hrefForFilters({ stacks: [slug] }, pathPrefix);\n}\n\nfunction statusLabel(s: StackEntry['status']): string | null {\n switch (s) {\n case 'live':\n return 'Available now';\n case 'expanding':\n return 'Expanding';\n case 'planned':\n return 'Planned';\n default:\n return null;\n }\n}\n---\n\n<section\n id=\"stacks\"\n class:list={[\"py-12 sm:py-16 scroll-mt-20 border-b border-ink-200 dark:border-ink-800\", className]}\n aria-labelledby={bare ? undefined : \"grove-stackgrid-heading\"}\n>\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n {!bare && (\n <header class=\"mb-6\">\n <span class=\"text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">\n Stacks\n </span>\n <Heading\n id=\"grove-stackgrid-heading\"\n class=\"m-0 mt-1 text-[1.5rem] sm:text-[1.625rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100\"\n >\n Browse by stack\n </Heading>\n <p class=\"m-0 max-w-[60ch] text-[0.9375rem] text-ink-500 dark:text-ink-400\">\n Pick a stack to see real {itemLabelPlural} built with it.\n </p>\n </header>\n )}\n\n <div class=\"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3\">\n {stacks.map((s) => (\n <a\n href={buildHref(s.slug)}\n class=\"rounded-[calc(var(--radius)+0.25rem)] border border-border bg-card shadow-none transition-colors hover:border-ink-300 dark:hover:border-ink-700 group flex h-full items-center gap-3 p-3.5 no-underline\"\n data-event=\"stack_grid_click\"\n data-event-source=\"stack_grid\"\n >\n <div class=\"flex h-9 w-9 shrink-0 items-center justify-center rounded-md border border-ink-200 bg-white dark:border-ink-800 dark:bg-ink-950\" aria-hidden=\"true\">\n <Icon name={iconAliases?.[s.slug] ?? s.slug} category=\"stack\" size={18} />\n </div>\n\n <div class=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n <div class=\"flex items-center gap-2\">\n {/* Not a heading: these tiles are links in a grid, and\n heading-per-card breaks the outline when the grid\n sits directly under the page h1 (/stacks). */}\n <span class=\"m-0 text-[0.875rem] font-semibold tracking-tight text-ink-900 group-hover:underline dark:text-ink-100\">\n {s.name}\n </span>\n {typeof s.count === \"number\" && (\n <span class=\"inline-flex items-center rounded-md border border-ink-200 bg-ink-50 px-1.5 py-0.5 font-mono text-[10px] font-medium text-ink-600 dark:border-ink-800 dark:bg-ink-900/60 dark:text-ink-400\">\n {formatCount(s.count, itemNoun)}\n </span>\n )}\n </div>\n {s.blurb && <p class=\"m-0 truncate text-2xs text-ink-500 dark:text-ink-400\">{s.blurb}</p>}\n </div>\n {statusLabel(s.status) && (\n <span\n class:list={[\n \"shrink-0 inline-flex items-center rounded-md border px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wider\",\n s.status === \"live\"\n ? \"!bg-success/10 !text-success\"\n : s.status === \"expanding\"\n ? \"!bg-info/10 !text-info\"\n : \"!bg-warning/10 !text-warning\",\n ]}\n >\n {statusLabel(s.status)}\n </span>\n )}\n </a>\n ))}\n </div>\n </div>\n</section>\n",
52
52
  "type": "registry:component",
53
53
  "target": "~/src/components/grove/stack-grid.astro"
54
54
  },
55
55
  {
56
56
  "path": "default/components/grove/category-grid.astro",
57
- "content": "---\nimport { formatCount } from '@grove-dev/core';\n\n/**\n * CategoryGrid — browse-by-category grid for the home page.\n *\n * The lighter sibling of StackGrid. Renders a card per category with\n * name, blurb, and count. Generic: takes a list of plain\n * `{ name, slug, blurb, count }` entries.\n */\n\ninterface CategoryEntry {\n name: string;\n slug: string;\n blurb?: string;\n count?: number;\n}\n\ninterface Props {\n categories: CategoryEntry[];\n /** List page base. */\n pathPrefix?: string;\n /** Extra class. */\n class?: string;\n /** Hide the section header. */\n bare?: boolean;\n itemLabelPlural?: string;\n /** Noun pair for count chips — singular fixes \"1 projects\". */\n itemNoun?: { singular: string; plural: string };\n /** Pass 1 when this grid IS the page (`/categories` index). */\n level?: 1 | 2;\n /** Card link builder (defaults to browse filtered by category). */\n hrefFor?: (slug: string) => string;\n}\n\nconst {\n categories,\n pathPrefix = '/',\n class: className = '',\n bare = false,\n itemLabelPlural = 'items',\n itemNoun = { singular: 'item', plural: 'items' },\n level = 2,\n hrefFor,\n} = Astro.props;\n\nconst Heading: 'h1' | 'h2' = level === 1 ? 'h1' : 'h2';\n\nfunction buildHref(slug: string): string {\n if (hrefFor) return hrefFor(slug);\n const base = pathPrefix.replace(/\\/$/, '');\n return `${base}?category=${encodeURIComponent(slug)}`;\n}\n---\n\n<section\n id=\"categories\"\n class:list={[\"py-12 sm:py-16 scroll-mt-20 border-b border-ink-200 dark:border-ink-800\", className]}\n aria-labelledby={bare ? undefined : \"grove-categorygrid-heading\"}\n>\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n {!bare && (\n <header class=\"mb-6\">\n <span class=\"text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">\n Categories\n </span>\n <Heading\n id=\"grove-categorygrid-heading\"\n class=\"m-0 mt-1 text-[1.5rem] sm:text-[1.625rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100\"\n >\n Browse by category\n </Heading>\n <p class=\"m-0 max-w-[60ch] text-[0.9375rem] text-ink-500 dark:text-ink-400\">\n Find {itemLabelPlural} by what they do, not by which stack they use.\n </p>\n </header>\n )}\n\n <div class=\"overflow-hidden rounded-lg border border-ink-200 dark:border-ink-800\">\n <ul class=\"m-0 grid list-none grid-cols-1 divide-y divide-ink-200 p-0 sm:grid-cols-2 sm:divide-x sm:divide-y-0 lg:grid-cols-3 dark:divide-ink-800\">\n {categories.map((c) => (\n <li class=\"divide-x divide-ink-200 dark:divide-ink-800\">\n <a\n href={buildHref(c.slug)}\n class=\"group flex h-full items-start gap-3 p-4 no-underline transition-colors hover:bg-ink-50/60 dark:hover:bg-ink-900/40\"\n >\n <div class=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n <div class=\"flex items-center gap-2\">\n {/* Not a heading — see StackGrid: link tiles under a\n page h1 must not introduce h3 skips. */}\n <span class=\"m-0 text-[0.9375rem] font-semibold tracking-tight text-ink-900 group-hover:underline dark:text-ink-100\">\n {c.name}\n </span>\n {typeof c.count === \"number\" && (\n <span class=\"inline-flex items-center rounded-md border border-ink-200 bg-ink-50 px-1.5 py-0.5 font-mono text-[10px] font-medium text-ink-600 dark:border-ink-800 dark:bg-ink-900/60 dark:text-ink-400\">\n {formatCount(c.count, itemNoun)}\n </span>\n )}\n </div>\n {c.blurb && (\n <p class=\"m-0 text-2xs leading-relaxed text-ink-500 dark:text-ink-400\">\n {c.blurb}\n </p>\n )}\n </div>\n <svg viewBox=\"0 0 16 16\" width=\"12\" height=\"12\" aria-hidden=\"true\" class=\"mt-1 shrink-0 text-ink-300 transition-colors group-hover:text-ink-500 dark:text-ink-700 dark:group-hover:text-ink-400\" fill=\"currentColor\">\n <path d=\"M6.22 3.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L9.94 8 6.22 4.28a.75.75 0 0 1 0-1.06Z\" />\n </svg>\n </a>\n </li>\n ))}\n </ul>\n </div>\n </div>\n</section>\n",
57
+ "content": "---\nimport { formatCount, hrefForFilters } from '@grove-dev/core';\n\n/**\n * CategoryGrid — browse-by-category grid for the home page.\n *\n * The lighter sibling of StackGrid. Renders a card per category with\n * name, blurb, and count. Generic: takes a list of plain\n * `{ name, slug, blurb, count }` entries.\n */\n\ninterface CategoryEntry {\n name: string;\n slug: string;\n blurb?: string;\n count?: number;\n}\n\ninterface Props {\n categories: CategoryEntry[];\n /** List page base. */\n pathPrefix?: string;\n /** Extra class. */\n class?: string;\n /** Hide the section header. */\n bare?: boolean;\n itemLabelPlural?: string;\n /** Noun pair for count chips — singular fixes \"1 projects\". */\n itemNoun?: { singular: string; plural: string };\n /** Pass 1 when this grid IS the page (`/categories` index). */\n level?: 1 | 2;\n /** Card link builder (defaults to browse filtered by category). */\n hrefFor?: (slug: string) => string;\n}\n\nconst {\n categories,\n pathPrefix = '/',\n class: className = '',\n bare = false,\n itemLabelPlural = 'items',\n itemNoun = { singular: 'item', plural: 'items' },\n level = 2,\n hrefFor,\n} = Astro.props;\n\nconst Heading: 'h1' | 'h2' = level === 1 ? 'h1' : 'h2';\n\nfunction buildHref(slug: string): string {\n if (hrefFor) return hrefFor(slug);\n return hrefForFilters({ categories: [slug] }, pathPrefix);\n}\n---\n\n<section\n id=\"categories\"\n class:list={[\"py-12 sm:py-16 scroll-mt-20 border-b border-ink-200 dark:border-ink-800\", className]}\n aria-labelledby={bare ? undefined : \"grove-categorygrid-heading\"}\n>\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n {!bare && (\n <header class=\"mb-6\">\n <span class=\"text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">\n Categories\n </span>\n <Heading\n id=\"grove-categorygrid-heading\"\n class=\"m-0 mt-1 text-[1.5rem] sm:text-[1.625rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100\"\n >\n Browse by category\n </Heading>\n <p class=\"m-0 max-w-[60ch] text-[0.9375rem] text-ink-500 dark:text-ink-400\">\n Find {itemLabelPlural} by what they do, not by which stack they use.\n </p>\n </header>\n )}\n\n <div class=\"overflow-hidden rounded-lg border border-ink-200 dark:border-ink-800\">\n <ul class=\"m-0 grid list-none grid-cols-1 divide-y divide-ink-200 p-0 sm:grid-cols-2 sm:divide-x sm:divide-y-0 lg:grid-cols-3 dark:divide-ink-800\">\n {categories.map((c) => (\n <li class=\"divide-x divide-ink-200 dark:divide-ink-800\">\n <a\n href={buildHref(c.slug)}\n class=\"group flex h-full items-start gap-3 p-4 no-underline transition-colors hover:bg-ink-50/60 dark:hover:bg-ink-900/40\"\n >\n <div class=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n <div class=\"flex items-center gap-2\">\n {/* Not a heading — see StackGrid: link tiles under a\n page h1 must not introduce h3 skips. */}\n <span class=\"m-0 text-[0.9375rem] font-semibold tracking-tight text-ink-900 group-hover:underline dark:text-ink-100\">\n {c.name}\n </span>\n {typeof c.count === \"number\" && (\n <span class=\"inline-flex items-center rounded-md border border-ink-200 bg-ink-50 px-1.5 py-0.5 font-mono text-[10px] font-medium text-ink-600 dark:border-ink-800 dark:bg-ink-900/60 dark:text-ink-400\">\n {formatCount(c.count, itemNoun)}\n </span>\n )}\n </div>\n {c.blurb && (\n <p class=\"m-0 text-2xs leading-relaxed text-ink-500 dark:text-ink-400\">\n {c.blurb}\n </p>\n )}\n </div>\n <svg viewBox=\"0 0 16 16\" width=\"12\" height=\"12\" aria-hidden=\"true\" class=\"mt-1 shrink-0 text-ink-300 transition-colors group-hover:text-ink-500 dark:text-ink-700 dark:group-hover:text-ink-400\" fill=\"currentColor\">\n <path d=\"M6.22 3.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L9.94 8 6.22 4.28a.75.75 0 0 1 0-1.06Z\" />\n </svg>\n </a>\n </li>\n ))}\n </ul>\n </div>\n </div>\n</section>\n",
58
58
  "type": "registry:component",
59
59
  "target": "~/src/components/grove/category-grid.astro"
60
60
  }
61
61
  ],
62
62
  "meta": {
63
63
  "version": "1.6.0",
64
- "requiresGrove": "1.3.1"
64
+ "requiresGrove": "1.4.0"
65
65
  },
66
66
  "type": "registry:block"
67
67
  }
package/dist/r/ui.json CHANGED
@@ -49,7 +49,7 @@
49
49
  ],
50
50
  "meta": {
51
51
  "version": "1.6.0",
52
- "requiresGrove": "1.3.1"
52
+ "requiresGrove": "1.4.0"
53
53
  },
54
54
  "type": "registry:ui"
55
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grove-dev/cli",
3
- "version": "1.3.1",
3
+ "version": "1.4.0",
4
4
  "type": "module",
5
5
  "description": "Grove CLI — scaffolds Grove-powered spaces and orchestrates @grove-dev/core commands.",
6
6
  "license": "MIT",
@@ -48,7 +48,7 @@
48
48
  "lighthouse": "^13.5.0",
49
49
  "typescript": "^5.9.3",
50
50
  "yaml": "^2.6.0",
51
- "@grove-dev/core": "1.3.1"
51
+ "@grove-dev/core": "1.4.0"
52
52
  },
53
53
  "devDependencies": {
54
54
  "tsx": "^4.23.0",