mirror of
https://github.com/bitbaum/sitekit.git
synced 2026-12-03 19:57:19 +01:00
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>
81 lines
2.0 KiB
JSON
81 lines
2.0 KiB
JSON
{
|
|
"name": "@bitbaum/sitekit",
|
|
"version": "0.7.0",
|
|
"description": "A website as data: a closed union of section shapes validated at runtime, one set of React renderers, and per-field provenance so a generated site can prove it fabricated nothing.",
|
|
"license": "MIT",
|
|
"author": "Mao Nakamoto",
|
|
"homepage": "https://github.com/bitbaum/sitekit#readme",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/bitbaum/sitekit.git"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/bitbaum/sitekit/issues"
|
|
},
|
|
"keywords": [
|
|
"site-generator",
|
|
"content-model",
|
|
"sections",
|
|
"zod",
|
|
"react",
|
|
"headless-cms"
|
|
],
|
|
"type": "module",
|
|
"sideEffects": [
|
|
"*.css"
|
|
],
|
|
"packageManager": "pnpm@11.25.0",
|
|
"engines": {
|
|
"node": ">=20"
|
|
},
|
|
"publishConfig": {
|
|
"access": "public",
|
|
"provenance": true
|
|
},
|
|
"files": [
|
|
"dist",
|
|
"styles.css"
|
|
],
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/index.d.ts",
|
|
"default": "./dist/index.js"
|
|
},
|
|
"./react": {
|
|
"types": "./dist/react/index.d.ts",
|
|
"default": "./dist/react/index.js"
|
|
},
|
|
"./styles.css": "./styles.css"
|
|
},
|
|
"scripts": {
|
|
"build": "tsc -p tsconfig.json",
|
|
"lint": "eslint .",
|
|
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p test/types/tsconfig.json",
|
|
"test": "node --test test/*.test.js",
|
|
"verify": "pnpm run format:check && pnpm run lint && pnpm run typecheck && pnpm run build && pnpm test",
|
|
"prepare": "pnpm run build",
|
|
"format": "prettier --write .",
|
|
"format:check": "prettier --check ."
|
|
},
|
|
"dependencies": {
|
|
"zod": "^4.5.4"
|
|
},
|
|
"peerDependencies": {
|
|
"react": ">=18"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^10.0.1",
|
|
"@types/node": "^26.4.1",
|
|
"@types/react": "^19.0.0",
|
|
"esbuild": "^0.28.2",
|
|
"eslint": "^10.9.1",
|
|
"globals": "^17.12.0",
|
|
"playwright": "^1.64.1",
|
|
"prettier": "3.9.10",
|
|
"react": "^19.0.0",
|
|
"react-dom": "^19.0.0",
|
|
"typescript": "^6.0.3",
|
|
"typescript-eslint": "^8.69.0"
|
|
}
|
|
}
|