16 Commits
Author SHA1 Message Date
CatoandClaude a1223d801e fix(chrome): own box model, nav links elsewhere, trailingSlash, footer year (#51)
What a consumer gets:
- styles.css gives sitekit's own elements in the masthead, footer, tab bar
  and skip link box-sizing: border-box at zero specificity (:where), so the
  chrome measures the same without a host reset (the row was 422px wide at
  390 and the controls about 67px tall). A host rule with a type, class or id
  selector still wins; a host '*' rule loaded first does not. Host content
  in a slot (brand, actions, footer extra, tab icon) keeps the host's box
  model. A link straight in actions drops its block padding, so it is
  44-46px in either box model.
- Rendered nav props take SiteNavLink: an in-site path, or an href used
  verbatim, exactly one (siteNavLinkSchema, field-addressed messages; its
  output type is SiteNavLink, so validate-then-render type-checks). An href
  must be http(s), mailto, tel, //host, #fragment or ?query; anything else
  (javascript:, data:, bitcoin:, any other scheme) is refused by the schema
  and never rendered. A nav or group left with no items renders as one given
  none (the document nav: the same empty <nav> as items={[]}).
  href(), siteNavItems(), SiteNavItem, siteNavItemSchema and SiteNavGroup
  are unchanged and stay path-only.
- Links to another origin, as a browser resolves them (also /\host and
  https:/\host), get rel="noopener" in nav and footer (a footer change).
  The footer drops only javascript:, vbscript: and data: links, and a group
  whose every link was dropped; every other footer link renders as in 0.7.0.
- trailingSlash on SiteMasthead, SiteNav, SiteTabBar and href(): the slash
  goes on the path part ('/a/#b'), never after a file name ('/feed.xml')
  unless the path already ended in one ('/a/b.c/'); aria-current then
  ignores slashes. Without it nothing changes.
- SiteFooter year: an integer from 1 to 9999 is printed without reading the
  clock, null prints none, anything else counts as omitted.

How it is checked: test/types/consumer.ts (compiled by typecheck: a 0.7.0
consumer's siteNavItems(...).map(i => i.path.length), and a parsed
siteNavLinkSchema item passed to SiteNav and SiteMasthead),
test/links.test.js (href() against 0.7.0's output for 26 inputs,
trailingSlash, the allow-list, browser-read externality, schema messages and
output, refused hrefs in every renderer, all-refused navs and groups, footer
schemes and groups), test/footer-year.test.js, test/box-model-browser.test.js
(320 and 390px with and without a reset; slotted host elements measure as
outside the chrome). Each fails on the previous source. Masthead, nav and
tab bar markup for path-only items is identical to the 0.7.0 build, except
that a nav path a browser reads as another host (\\host, /\host) keeps its
href and gains rel="noopener"; footer links to another origin gain rel.

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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-12 10:05:52 +01:00
Cato e03c00c98c Preserve host widget layout inside grouped actions (#48) 2026-11-06 00:53:14 +01:00
Cato adedc287dc Keep grouped navigation within its shell and narrow account slots (#47) 2026-11-06 00:49:55 +01:00
CatoandClaude a170feb2b8 feat(shell): SiteIcon set, a tab bar that reads as one control, masthead tabBar prop (#45)
Products passed unicode glyphs (◎ ✎ ⌕ ⇄ ★) as tab icons; they render
differently on every phone and never look like an interface. The tab bar
also had a filled "active" pill and sat under a masthead that still showed a
Menu button for the same five places.

- SiteIcon / SITE_ICON_NAMES: one stroke icon set on currentColor (home,
  write, search, compass, star, user, chat, bell, settings, list, globe,
  book, heart, plus, menu, calendar, wallet, chart), aria-hidden.
- SiteTabBar: equal grid cells, 24px icon box, 11px/600 labels, the current
  tab marked by a short rule above its icon and full text colour, 56px cells
  with the safe-area inset outside them.
- SiteMasthead tabBar prop: below 48rem the tab bar is the navigation, so
  the masthead drops its menu button and keeps the account actions.
- Tests for every icon and for the masthead class; README and CHANGELOG.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-06 00:36:01 +01:00
Cato cb68eabb47 Add grouped descriptive application navigation (#43) 2026-11-06 00:16:33 +01:00
CatoandClaude e43a0c89b5 fix(masthead): on the narrowest phones the account action moves into the menu (#42)
AOZ's public masthead (brand, "Zur Anmeldung", "Menü") needs 369px; at 320px
the page scrolled sideways by 49px. Up to 380px (which takes in 360px
Android) the action is now hidden in the row and shown at the foot of the
mobile menu, one tap away, and only where a menu exists: a masthead with no
nav items keeps its action in the row. SiteNav takes the actions as
`menuActions`; SiteMasthead passes them.

Measured in AOZ's production build with this package: 0px sideways at 320,
390 and 1280px, the action reachable in the open menu.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-03 00:53:49 +01:00
Cato e11d26d014 feat(react): SiteTabBar, a mobile bottom tab bar (#41) 2026-11-02 20:22:50 +01:00
Cato 835396d498 Fit footer columns to configured groups and expose lead typography roles (#32) 2026-10-24 16:22:25 +02:00
Cato 83c32e2815 Support grouped application footers and configurable type hierarchy (#31) 2026-10-24 16:09:43 +02:00
Cato 52116c960b Add reusable application chrome and hero composition (#30) 2026-10-24 14:19:50 +02:00
CatoandClaude Opus 5.5 a81c981d46 fix(react): the masthead nav takes a row of its own when it does not fit (#25)
On a phone the nav shared its row with the wordmark and got ~290px, so
camille-boulangerie's third section painted as a lone "Ü" at 390px - the
fleet render sweep's nav rule 7 finding. The masthead row now wraps: the
nav drops to exactly one row of its own (it never wraps itself, so a long
nav still scrolls sideways there). One-row layouts are unchanged; at 390
the header grows by one 44px row. Test pinned and mutation-checked.

Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 23:33:16 -07:00
bf97f09fd3 chore: rename package to @bitbaum/sitekit for npm publishing (#17)
Claude-Session: https://claude.ai/code/session_01WqKqMnHQHSmkGFfc5t7Rxn

Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-09-05 14:41:47 +00:00
GandClaude Opus 5 9dcf9fe90c chore: add a formatter (#9)
* chore: add a formatter, matching the style this repo already writes

singleQuote=true was chosen by counting this repo's own
imports, not by fleet decree. The fleet is genuinely split and the two repos
that already had a .prettierrc disagreed with each other, so there was no
standard to restore. Quote style does not cross repo boundaries; having a
gate does.

Markdown is ignored for now — prettier rewraps prose, which would bury the
real diff.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* style: format with prettier (14 files)

Mechanical. No behaviour change. This SHA is listed in
.git-blame-ignore-revs so `git blame` skips it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* chore: teach git blame to skip the reformat

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-31 10:33:14 +02:00
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 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