@zero2webmaster/starter-kit 0.45.0 → 0.46.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.
- package/README.md +5 -3
- package/dist/scaffolders/nextjs.js +37 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# z2w-starter-kit
|
|
2
2
|
|
|
3
|
-
**Version:** 0.
|
|
3
|
+
**Version:** 0.46.0 | **Framework:** 2.19.0
|
|
4
4
|
|
|
5
5
|
> Node CLI to scaffold new Z2W projects from canonical Templates + AGENTS.md.
|
|
6
6
|
|
|
@@ -83,7 +83,9 @@ The Claude Code skill at `~/.claude/skills/instantiate-z2w-project/SKILL.md` and
|
|
|
83
83
|
|
|
84
84
|
## Status
|
|
85
85
|
|
|
86
|
-
- **v0.
|
|
86
|
+
- **v0.46.0 (current)** gets `nextjs` scaffolds ready for phones. Installed to a home screen, the app now draws edge to edge (`viewport-fit=cover`), and the page is padded by the phone's safe areas so the notch and home indicator never cover content; CSS variables (`--safe-top`, `--safe-bottom` and so on) let a fixed bar pad itself. A `prefers-reduced-motion` rule turns any animation or transition into an instant change for people who switch on Reduce Motion. Verified on a real build in Chromium: no change at all on an ordinary screen.
|
|
87
|
+
|
|
88
|
+
- **v0.45.0** runs the tests before every push. `nextjs`, `cf-worker`, `library` and `node-service` scaffolds now ship a tracked `pre-push` hook that runs `npm test`, installed into the repo's own `.git/hooks/` by `npm install` (skipped in CI, never fails an install). Until now the scaffold emitted a test script that nothing ran: `audit-engine` measured 24 of 29 multi-tenant apps whose cross-tenant tests ran only when someone typed the command. A `library` scaffold also gets a starter test, because its first `npm test` used to fail with "No test files found". Verified on real scaffolds from the built `dist/`, through the global hook dispatcher: a green push passes, a red one is refused.
|
|
87
89
|
|
|
88
90
|
- **v0.44.0** stops the PWA service worker from storing pages. Since v0.19.0 it cached every page it loaded, including signed-in ones, which then stayed readable offline after sign-out. Page loads now go to the network, with a built-in "You're offline" page when that fails, and only content-hashed `/_next/static/` files are cached. Verified in Chromium against a dynamic page, with the old worker as a control. Full detail in [CHANGELOG.md](CHANGELOG.md).
|
|
89
91
|
|
|
@@ -139,4 +141,4 @@ Inquiries: kerry@zero2webmaster.com.
|
|
|
139
141
|
---
|
|
140
142
|
|
|
141
143
|
*Scaffolded 2026-05-28 via the [[instantiate-z2w-project]] Claude Code skill v1; reconciled against the consolidated skill v1.1.0 (brief-first + Agent Coordination block) on 2026-05-29.*
|
|
142
|
-
*Version: 0.
|
|
144
|
+
*Version: 0.46.0 | Last Updated: 2026-10-27*
|
|
@@ -1475,8 +1475,8 @@ const PAGE_SURFACE = "#ffffff";
|
|
|
1475
1475
|
*
|
|
1476
1476
|
* What is deliberately NOT interpolated here is as load-bearing as what is:
|
|
1477
1477
|
* the required marker and the info-hint summary use FIXED accessible colors,
|
|
1478
|
-
* never `{{accent_color}}`. Z2W gold (`#FFD700`) is
|
|
1479
|
-
* orange (`#f5821f`)
|
|
1478
|
+
* never `{{accent_color}}`. Z2W gold (`#FFD700`) is 1.40:1 on white and STF
|
|
1479
|
+
* orange (`#f5821f`) 2.59:1 (both measured) — using the brand accent as small text ships an
|
|
1480
1480
|
* illegible glyph under a brand-consistency rationale.
|
|
1481
1481
|
*/
|
|
1482
1482
|
function globalsCss(primaryColor) {
|
|
@@ -1530,10 +1530,39 @@ function globalsCss(primaryColor) {
|
|
|
1530
1530
|
/* The page itself. Named so \`test/contrast.test.ts\` can enumerate SURFACES
|
|
1531
1531
|
rather than assume one — the whole point of that file. */
|
|
1532
1532
|
--page-surface: ${PAGE_SURFACE};
|
|
1533
|
+
/* The phone's notch, rounded corners and home indicator. app/layout.tsx sets
|
|
1534
|
+
\`viewportFit: "cover"\`, so the page is drawn edge to edge and these say how
|
|
1535
|
+
much of each edge the hardware hides. They are 0px on a desktop and on any
|
|
1536
|
+
phone without a notch, so they cost nothing where they are not needed.
|
|
1537
|
+
<body> already pads by them. A FIXED or STICKY bar does not inherit that
|
|
1538
|
+
padding (it is positioned against the viewport, not the body), so give it
|
|
1539
|
+
its own, e.g. \`padding-bottom: var(--safe-bottom)\` on a bottom tab bar —
|
|
1540
|
+
otherwise the home indicator sits on top of its buttons once installed. */
|
|
1541
|
+
--safe-top: env(safe-area-inset-top, 0px);
|
|
1542
|
+
--safe-right: env(safe-area-inset-right, 0px);
|
|
1543
|
+
--safe-bottom: env(safe-area-inset-bottom, 0px);
|
|
1544
|
+
--safe-left: env(safe-area-inset-left, 0px);
|
|
1533
1545
|
}
|
|
1534
1546
|
|
|
1535
1547
|
body {
|
|
1536
1548
|
background: var(--page-surface);
|
|
1549
|
+
padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
|
|
1550
|
+
}
|
|
1551
|
+
|
|
1552
|
+
/* Reduce Motion (an OS accessibility setting) means "no movement": it is there
|
|
1553
|
+
for people who get dizzy or nauseous from animation. The scaffold itself has
|
|
1554
|
+
no animation, so this is for the first one somebody adds. It shortens every
|
|
1555
|
+
animation and transition to an instant rather than removing it, so code that
|
|
1556
|
+
waits for \`transitionend\` or \`animationend\` still gets the event. */
|
|
1557
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1558
|
+
*,
|
|
1559
|
+
*::before,
|
|
1560
|
+
*::after {
|
|
1561
|
+
animation-duration: 0.01ms !important;
|
|
1562
|
+
animation-iteration-count: 1 !important;
|
|
1563
|
+
transition-duration: 0.01ms !important;
|
|
1564
|
+
scroll-behavior: auto !important;
|
|
1565
|
+
}
|
|
1537
1566
|
}
|
|
1538
1567
|
|
|
1539
1568
|
html {
|
|
@@ -4000,6 +4029,10 @@ export const metadata: Metadata = {
|
|
|
4000
4029
|
|
|
4001
4030
|
export const viewport: Viewport = {
|
|
4002
4031
|
themeColor: "{{primary_color}}",
|
|
4032
|
+
// Draw edge to edge, under the notch and home indicator, when installed.
|
|
4033
|
+
// Safe only because app/globals.css pads <body> by env(safe-area-inset-*);
|
|
4034
|
+
// remove that padding and this hides content behind the notch in landscape.
|
|
4035
|
+
viewportFit: "cover",
|
|
4003
4036
|
};
|
|
4004
4037
|
|
|
4005
4038
|
const organizationJsonLd = {
|
|
@@ -4317,6 +4350,8 @@ Not SEO, but it is a pre-launch check and this is the pre-launch file.
|
|
|
4317
4350
|
- ✅ \`public/icon.svg\` — 512×512, listed twice in the manifest (\`purpose: "any"\` **and** \`purpose: "maskable"\`)
|
|
4318
4351
|
- ✅ \`public/sw.js\` — never stores a page (signed-in pages would stay readable offline after sign-out); page loads go to the network with a built-in offline page; only \`/_next/static/\` build files are cached
|
|
4319
4352
|
- ✅ \`components/ServiceWorker.tsx\` — registers the worker in **production only**, mounted from \`app/layout.tsx\`
|
|
4353
|
+
- ✅ Safe areas — \`viewportFit: "cover"\` in \`app/layout.tsx\`, and \`<body>\` padded by \`env(safe-area-inset-*)\` in \`app/globals.css\`
|
|
4354
|
+
- [ ] **Every fixed or sticky bar pads itself** with \`var(--safe-top)\` / \`var(--safe-bottom)\` (it does not inherit the body's padding); check it on a real iPhone with the app installed to the home screen
|
|
4320
4355
|
- [ ] **Verify installability on the deployed site, not locally** — the worker does not register under \`next dev\` by design. Chrome DevTools → Application → Manifest should list the manifest with no errors and both icon purposes; Application → Service Workers should show \`sw.js\` activated
|
|
4321
4356
|
- [ ] **Confirm no page or API response is cached** — DevTools → Application → Cache Storage → \`{{slug}}-v2\` should list only \`/_next/static/\` files
|
|
4322
4357
|
- [ ] Replace \`public/icon.svg\` with real artwork; keep the 512×512 frame and keep the mark inside the central ~80% (Android crops the rest)
|