@the-smithy/create-hearth-site 0.28.0 → 0.28.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-smithy/create-hearth-site",
3
- "version": "0.28.0",
3
+ "version": "0.28.2",
4
4
  "description": "Start a new client website powered by Hearth: pnpm create @the-smithy/hearth-site",
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -30,7 +30,7 @@
30
30
  ],
31
31
  "devDependencies": {
32
32
  "vitest": "^5.0.3",
33
- "@the-smithy/hearth-schema": "^0.28.0"
33
+ "@the-smithy/hearth-schema": "^0.28.2"
34
34
  },
35
35
  "scripts": {
36
36
  "test": "node --test \"test/**/*.test.js\" && vitest run test/blocks.test.ts test/overrides.test.ts",
@@ -12,6 +12,7 @@ Before grepping or reading whole files, use [Drift](https://github.com/The-Smith
12
12
  - `drift query <symbol>` or `drift find <words>`: where something is defined
13
13
  - `drift show <symbol>` or `drift sig <symbol>`: its source, or just its signature
14
14
  - `drift outline <file>`: a file's definitions and imports
15
+ - `drift docs <words>`: the section of the docs that covers something. Read it with `drift show <path:start-end>`
15
16
  - `drift refs <symbol>`, `drift importers <file>`, `drift tests --for <file>`: what uses it
16
17
  - `drift context <symbol or file>`: all of the above before changing something
17
18
  - `drift map`: orientation in a new repo
@@ -1,4 +1,5 @@
1
1
  import type { Metadata } from "next";
2
+ import Link from "next/link";
2
3
  import { notFound } from "next/navigation";
3
4
  import { Fragment, Suspense, type ReactNode } from "react";
4
5
  import { Blocks } from "../blocks";
@@ -74,17 +75,17 @@ export default async function BlockLibrary({ searchParams }: { searchParams: Pro
74
75
  <ViewLink href={unstyled}>Unstyled</ViewLink>
75
76
  <span className="hearth-library-current">This site&apos;s theme</span>
76
77
  </span>
77
- <details className="hearth-library-jump">
78
+ <details key={only?.type ?? "all"} className="hearth-library-jump">
78
79
  <summary>{only ? only.label : "All blocks"}</summary>
79
80
  <nav aria-label="Blocks">
80
- <a href="/hearth/blocks">Every block on one page</a>
81
+ <Link href="/hearth/blocks">Every block on one page</Link>
81
82
  {libraryGroups.map((g) => (
82
83
  <Fragment key={g.group}>
83
84
  <p>{g.group}</p>
84
85
  {g.blocks.map((b) => (
85
- <a key={b.type} href={`/hearth/blocks?block=${b.type}`}>
86
+ <Link key={b.type} href={`/hearth/blocks?block=${b.type}`}>
86
87
  {b.label}
87
- </a>
88
+ </Link>
88
89
  ))}
89
90
  </Fragment>
90
91
  ))}
@@ -106,7 +107,7 @@ export default async function BlockLibrary({ searchParams }: { searchParams: Pro
106
107
  )}
107
108
  {showing.map((b) =>
108
109
  samples[b.type].map((s, i) => (
109
- <Sample key={s.block.id} id={i ? undefined : `block-${b.type}`} name={b.label} label={s.label} action={only ? <a href="/hearth/blocks">Show every block</a> : <a href={`/hearth/blocks?block=${b.type}`}>Only this block</a>}>
110
+ <Sample key={s.block.id} id={i ? undefined : `block-${b.type}`} name={b.label} label={s.label} action={only ? <Link href="/hearth/blocks">Show every block</Link> : <Link href={`/hearth/blocks?block=${b.type}`}>Only this block</Link>}>
110
111
  <Blocks blocks={[s.block]} />
111
112
  </Sample>
112
113
  )),