4 Commits
Author SHA1 Message Date
9122b6b6c6 fix(nav): the shared chrome shipped two defects no consumer could fix (#8)
A shared renderer is the one place where a mistake is not one bug in one repo
but the same bug on every site that installs it — and unfixable downstream,
because a consumer cannot patch markup it does not own. Two shipped:

1. Nav links were `px-2 py-1` on `text-xs`, roughly a 28px target. That is a
   fiddly thing to hit on a phone and below the 44px floor the rest of the
   fleet holds (fleetcrown enforces it centrally; kivvi and wild-spirit meet
   it explicitly). Now `inline-flex min-h-11 items-center`.

2. The package defined no focus style at all. A consumer's CSS reset can
   remove the user-agent ring, and nothing here replaced it, so keyboard
   users could lose their visible position in the nav on every site that
   installs this. Both the nav links and the wordmark now carry
   `focus-visible:outline-2 outline-offset-2 outline-accent` — a semantic
   class, so it stays the consumer's colour, per this package's no-tokens rule.

The masthead does NOT get taller. Its own comment warns that wrapping the nav
"makes a sticky masthead eat a third of a phone screen", so the row pays for
the bigger targets out of its own padding: py-4 becomes py-2, and 44px items
land the header at the height it already had.

Five rendered tests, asserting markup rather than source and importing by
package name so a broken exports map fails here rather than in a consumer.
Four fail against the previous renderers; the fifth covers `aria-current`,
which already worked and is guarded so a refactor of these classes cannot
quietly drop it.

Both live consumers inherit this: substrata (v0.1.1) and camille-boulangerie
(v0.2.0) are also version-drifted from each other, so both move to v0.3.0.

Found by a fleet-wide navigation audit across 20 repos, where this was the
only defect that multiplies.


Claude-Session: https://claude.ai/code/session_01XeELB8b3N4JrT2asYL9WvE

Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-31 10:20:30 +02:00
Mao NakamotoandClaude Opus 5 6585578959 feat: the section kinds a small business needs — v0.2.0
The Camille rebuild (first real site against the union) could not be
expressed, which per ADR-0003 means the union grows here, deliberately:

- hero gains optional actions (first filled, rest outlined) — a publication
  has none, a bakery has two
- cards gain an optional icon and a 4-column layout
- feature: a figure beside a story (founder, workshop) with quote and CTA
- contact: locations with address/phone/hours — exactly the fields the
  provenance rules protect; the renderer omits whatever the data omits
- faq: native details/summary, works without JavaScript
- anchor generalised to every jumpable kind, and the page schema now rejects
  a hero action or index entry pointing at a fragment nothing carries —
  Camille's hand-rolled original shipped dead links; generated sites can't

28 tests, all importing by package name.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AZCNYHwjEeqxNpYCUk6Yna
2026-08-28 09:50:39 +02:00
Mao NakamotoandClaude Opus 5 cabb138d1d fix: make the chrome RSC-native — a Link component cannot cross 'use client'
Next's build caught it in the first consumer: SiteNav was a client component
and SiteMasthead passed the injected Link (a component function) across the
server->client boundary, which React refuses to serialise. The nav is now a
server component and the one client behaviour — scrolling the active item
into view — is isolated in NavAutoScroll, which takes only a string.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AZCNYHwjEeqxNpYCUk6Yna
2026-08-28 09:18:56 +02:00
Mao NakamotoandClaude Opus 5 1b3a6b4a93 feat: sitekit v0.1.0 — a website as data
Extracted from substrata's hosted-site model, per orangecat ADR-0003 (the
Site Factory). Three things ship:

- The closed section union (hero, prose, stats, meter, cards, definitions,
  index, table) with Zod as the SSOT — every TS type is inferred, and
  validateSite() returns path-addressed errors a generator can act on.
  Structural rules are in the schema: hero only first, no duplicate paths,
  no index entry pointing at a missing anchor.
- One set of React renderers emitting semantic utility classes only; no
  colours, faces or radii ship. The single framework seam is an injectable
  Link component defaulting to a plain anchor, so static sites and Next
  apps consume the same package.
- Provenance: a sidecar keyed by JSON path (scraped/operator/inferred/
  not-found). assertDeliverable() throws on any inferred field, which turns
  'we fabricate no facts' from a promise into a check, and not-found makes
  unknown distinct from empty.

Tests import the package by name so a broken exports map fails in CI.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AZCNYHwjEeqxNpYCUk6Yna
2026-08-28 09:13:38 +02:00