@cimplify/cli 0.6.2 → 0.6.4

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.
Files changed (162) hide show
  1. package/dist/{add-2DGJIRBT.mjs → add-NWGER62A.mjs} +1 -1
  2. package/dist/{chunk-SAESFNUJ.mjs → chunk-76TJ56KE.mjs} +1 -1
  3. package/dist/{chunk-XYEZPYCO.mjs → chunk-MGP2FUAK.mjs} +1 -1
  4. package/dist/chunk-TFEUFCEH.mjs +5707 -0
  5. package/dist/dispatcher.mjs +9 -9
  6. package/dist/{doctor-26CFG2CR.mjs → doctor-ZGW3VZOG.mjs} +2 -2
  7. package/dist/{explain-AIMUFEME.mjs → explain-4ITTI4FM.mjs} +1 -1
  8. package/dist/{introspect-5ELLE23M.mjs → introspect-DL2HE7DG.mjs} +2 -2
  9. package/dist/{list-74VZJRQE.mjs → list-WNNKVK7V.mjs} +1 -1
  10. package/dist/{update-5E646EVY.mjs → update-EPRLX6FL.mjs} +1 -1
  11. package/package.json +1 -1
  12. package/templates/storefront-auto/app/about/page.tsx +1 -1
  13. package/templates/storefront-auto/app/faq/page.tsx +1 -1
  14. package/templates/storefront-auto/app/layout.tsx +15 -31
  15. package/templates/storefront-auto/app/orders/[id]/page.tsx +1 -1
  16. package/templates/storefront-auto/app/privacy/page.tsx +1 -1
  17. package/templates/storefront-auto/app/terms/page.tsx +1 -1
  18. package/templates/storefront-auto/components/cart-pill.tsx +2 -2
  19. package/templates/storefront-auto/components/category-grid.tsx +1 -1
  20. package/templates/storefront-auto/components/collection-strip.tsx +1 -1
  21. package/templates/storefront-auto/components/header.tsx +13 -7
  22. package/templates/storefront-auto/components/hero.tsx +1 -1
  23. package/templates/storefront-auto/components/json-ld.tsx +34 -0
  24. package/templates/storefront-auto/components/mobile-nav.tsx +113 -0
  25. package/templates/storefront-auto/components/policy-page.tsx +1 -1
  26. package/templates/storefront-auto/components/section-heading.tsx +2 -2
  27. package/templates/storefront-auto/package.json +1 -1
  28. package/templates/storefront-bakery/app/about/page.tsx +1 -1
  29. package/templates/storefront-bakery/app/categories/[slug]/page.tsx +2 -2
  30. package/templates/storefront-bakery/app/collections/[slug]/page.tsx +2 -2
  31. package/templates/storefront-bakery/app/error.tsx +1 -1
  32. package/templates/storefront-bakery/app/faq/page.tsx +1 -1
  33. package/templates/storefront-bakery/app/layout.tsx +5 -26
  34. package/templates/storefront-bakery/app/not-found.tsx +1 -1
  35. package/templates/storefront-bakery/app/orders/[id]/page.tsx +1 -1
  36. package/templates/storefront-bakery/app/page.tsx +2 -2
  37. package/templates/storefront-bakery/app/privacy/page.tsx +1 -1
  38. package/templates/storefront-bakery/app/terms/page.tsx +1 -1
  39. package/templates/storefront-bakery/components/cart-pill.tsx +2 -2
  40. package/templates/storefront-bakery/components/category-grid.tsx +1 -1
  41. package/templates/storefront-bakery/components/collection-strip.tsx +1 -1
  42. package/templates/storefront-bakery/components/footer.tsx +1 -1
  43. package/templates/storefront-bakery/components/header.tsx +15 -9
  44. package/templates/storefront-bakery/components/hero.tsx +1 -1
  45. package/templates/storefront-bakery/components/json-ld.tsx +34 -0
  46. package/templates/storefront-bakery/components/mobile-nav.tsx +113 -0
  47. package/templates/storefront-bakery/components/policy-page.tsx +1 -1
  48. package/templates/storefront-bakery/package.json +1 -1
  49. package/templates/storefront-fashion/app/about/page.tsx +1 -1
  50. package/templates/storefront-fashion/app/faq/page.tsx +1 -1
  51. package/templates/storefront-fashion/app/layout.tsx +15 -31
  52. package/templates/storefront-fashion/app/orders/[id]/page.tsx +1 -1
  53. package/templates/storefront-fashion/app/privacy/page.tsx +1 -1
  54. package/templates/storefront-fashion/app/terms/page.tsx +1 -1
  55. package/templates/storefront-fashion/components/cart-pill.tsx +2 -2
  56. package/templates/storefront-fashion/components/category-grid.tsx +1 -1
  57. package/templates/storefront-fashion/components/collection-strip.tsx +1 -1
  58. package/templates/storefront-fashion/components/feature-hero.tsx +1 -1
  59. package/templates/storefront-fashion/components/header.tsx +13 -7
  60. package/templates/storefront-fashion/components/hero.tsx +1 -1
  61. package/templates/storefront-fashion/components/json-ld.tsx +34 -0
  62. package/templates/storefront-fashion/components/mobile-nav.tsx +113 -0
  63. package/templates/storefront-fashion/components/policy-page.tsx +1 -1
  64. package/templates/storefront-fashion/components/section-heading.tsx +2 -2
  65. package/templates/storefront-fashion/package.json +1 -1
  66. package/templates/storefront-grocery/app/about/page.tsx +1 -1
  67. package/templates/storefront-grocery/app/categories/[slug]/page.tsx +2 -2
  68. package/templates/storefront-grocery/app/collections/[slug]/page.tsx +2 -2
  69. package/templates/storefront-grocery/app/error.tsx +1 -1
  70. package/templates/storefront-grocery/app/faq/page.tsx +1 -1
  71. package/templates/storefront-grocery/app/layout.tsx +10 -32
  72. package/templates/storefront-grocery/app/not-found.tsx +1 -1
  73. package/templates/storefront-grocery/app/orders/[id]/page.tsx +1 -1
  74. package/templates/storefront-grocery/app/page.tsx +2 -2
  75. package/templates/storefront-grocery/app/privacy/page.tsx +1 -1
  76. package/templates/storefront-grocery/app/terms/page.tsx +1 -1
  77. package/templates/storefront-grocery/components/cart-pill.tsx +2 -2
  78. package/templates/storefront-grocery/components/category-grid.tsx +1 -1
  79. package/templates/storefront-grocery/components/collection-strip.tsx +1 -1
  80. package/templates/storefront-grocery/components/footer.tsx +1 -1
  81. package/templates/storefront-grocery/components/header.tsx +15 -9
  82. package/templates/storefront-grocery/components/hero.tsx +1 -1
  83. package/templates/storefront-grocery/components/json-ld.tsx +34 -0
  84. package/templates/storefront-grocery/components/mobile-nav.tsx +113 -0
  85. package/templates/storefront-grocery/components/policy-page.tsx +1 -1
  86. package/templates/storefront-grocery/package.json +1 -1
  87. package/templates/storefront-pharmacy/app/about/page.tsx +1 -1
  88. package/templates/storefront-pharmacy/app/faq/page.tsx +1 -1
  89. package/templates/storefront-pharmacy/app/layout.tsx +15 -31
  90. package/templates/storefront-pharmacy/app/orders/[id]/page.tsx +1 -1
  91. package/templates/storefront-pharmacy/app/privacy/page.tsx +1 -1
  92. package/templates/storefront-pharmacy/app/terms/page.tsx +1 -1
  93. package/templates/storefront-pharmacy/components/cart-pill.tsx +2 -2
  94. package/templates/storefront-pharmacy/components/category-grid.tsx +1 -1
  95. package/templates/storefront-pharmacy/components/collection-strip.tsx +1 -1
  96. package/templates/storefront-pharmacy/components/header.tsx +13 -7
  97. package/templates/storefront-pharmacy/components/hero.tsx +1 -1
  98. package/templates/storefront-pharmacy/components/json-ld.tsx +34 -0
  99. package/templates/storefront-pharmacy/components/mobile-nav.tsx +113 -0
  100. package/templates/storefront-pharmacy/components/policy-page.tsx +1 -1
  101. package/templates/storefront-pharmacy/components/section-heading.tsx +2 -2
  102. package/templates/storefront-pharmacy/package.json +1 -1
  103. package/templates/storefront-restaurant/app/about/page.tsx +1 -1
  104. package/templates/storefront-restaurant/app/categories/[slug]/page.tsx +2 -2
  105. package/templates/storefront-restaurant/app/collections/[slug]/page.tsx +2 -2
  106. package/templates/storefront-restaurant/app/error.tsx +1 -1
  107. package/templates/storefront-restaurant/app/faq/page.tsx +1 -1
  108. package/templates/storefront-restaurant/app/layout.tsx +10 -31
  109. package/templates/storefront-restaurant/app/not-found.tsx +1 -1
  110. package/templates/storefront-restaurant/app/orders/[id]/page.tsx +1 -1
  111. package/templates/storefront-restaurant/app/page.tsx +2 -2
  112. package/templates/storefront-restaurant/app/privacy/page.tsx +1 -1
  113. package/templates/storefront-restaurant/app/terms/page.tsx +1 -1
  114. package/templates/storefront-restaurant/components/cart-pill.tsx +2 -2
  115. package/templates/storefront-restaurant/components/category-grid.tsx +1 -1
  116. package/templates/storefront-restaurant/components/collection-strip.tsx +1 -1
  117. package/templates/storefront-restaurant/components/footer.tsx +1 -1
  118. package/templates/storefront-restaurant/components/header.tsx +15 -9
  119. package/templates/storefront-restaurant/components/hero.tsx +1 -1
  120. package/templates/storefront-restaurant/components/json-ld.tsx +34 -0
  121. package/templates/storefront-restaurant/components/mobile-nav.tsx +113 -0
  122. package/templates/storefront-restaurant/components/policy-page.tsx +1 -1
  123. package/templates/storefront-restaurant/package.json +1 -1
  124. package/templates/storefront-retail/app/about/page.tsx +1 -1
  125. package/templates/storefront-retail/app/faq/page.tsx +1 -1
  126. package/templates/storefront-retail/app/layout.tsx +15 -31
  127. package/templates/storefront-retail/app/orders/[id]/page.tsx +1 -1
  128. package/templates/storefront-retail/app/privacy/page.tsx +1 -1
  129. package/templates/storefront-retail/app/terms/page.tsx +1 -1
  130. package/templates/storefront-retail/components/cart-pill.tsx +2 -2
  131. package/templates/storefront-retail/components/category-grid.tsx +1 -1
  132. package/templates/storefront-retail/components/collection-strip.tsx +1 -1
  133. package/templates/storefront-retail/components/header.tsx +13 -7
  134. package/templates/storefront-retail/components/hero.tsx +1 -1
  135. package/templates/storefront-retail/components/json-ld.tsx +34 -0
  136. package/templates/storefront-retail/components/mobile-nav.tsx +113 -0
  137. package/templates/storefront-retail/components/policy-page.tsx +1 -1
  138. package/templates/storefront-retail/components/section-heading.tsx +2 -2
  139. package/templates/storefront-retail/package.json +1 -1
  140. package/templates/storefront-services/app/about/page.tsx +1 -1
  141. package/templates/storefront-services/app/book/book-client.tsx +41 -105
  142. package/templates/storefront-services/app/categories/[slug]/page.tsx +2 -2
  143. package/templates/storefront-services/app/collections/[slug]/page.tsx +2 -2
  144. package/templates/storefront-services/app/error.tsx +1 -1
  145. package/templates/storefront-services/app/faq/page.tsx +1 -1
  146. package/templates/storefront-services/app/layout.tsx +10 -31
  147. package/templates/storefront-services/app/not-found.tsx +1 -1
  148. package/templates/storefront-services/app/orders/[id]/page.tsx +1 -1
  149. package/templates/storefront-services/app/page.tsx +2 -2
  150. package/templates/storefront-services/app/privacy/page.tsx +1 -1
  151. package/templates/storefront-services/app/terms/page.tsx +1 -1
  152. package/templates/storefront-services/components/cart-pill.tsx +2 -2
  153. package/templates/storefront-services/components/category-grid.tsx +1 -1
  154. package/templates/storefront-services/components/collection-strip.tsx +1 -1
  155. package/templates/storefront-services/components/footer.tsx +1 -1
  156. package/templates/storefront-services/components/header.tsx +15 -9
  157. package/templates/storefront-services/components/hero.tsx +1 -1
  158. package/templates/storefront-services/components/json-ld.tsx +34 -0
  159. package/templates/storefront-services/components/mobile-nav.tsx +113 -0
  160. package/templates/storefront-services/components/policy-page.tsx +1 -1
  161. package/templates/storefront-services/package.json +1 -1
  162. package/dist/chunk-PPU3YTG7.mjs +0 -5707
@@ -72,7 +72,7 @@ export default async function HomePage() {
72
72
 
73
73
  function StripSkeleton({ title }: { title: string }) {
74
74
  return (
75
- <section className="max-w-7xl mx-auto px-8 pt-12">
75
+ <section className="max-w-7xl mx-auto px-6 sm:px-8 pt-12">
76
76
  <h2 className="font-serif text-[28px] font-semibold m-0 mb-5">{title}</h2>
77
77
  <div className="grid grid-flow-col auto-cols-[minmax(220px,1fr)] gap-4 overflow-x-auto pb-2">
78
78
  {Array.from({ length: 5 }).map((_, i) => (
@@ -85,7 +85,7 @@ function StripSkeleton({ title }: { title: string }) {
85
85
 
86
86
  function CategoryGridSkeleton() {
87
87
  return (
88
- <section className="max-w-7xl mx-auto px-8 pt-14">
88
+ <section className="max-w-7xl mx-auto px-6 sm:px-8 pt-14">
89
89
  <div className="h-8 w-48 bg-muted rounded mb-5 animate-pulse" />
90
90
  <div className="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4">
91
91
  {Array.from({ length: 6 }).map((_, i) => (
@@ -9,7 +9,7 @@ export const metadata: Metadata = {
9
9
  export default function PrivacyPage() {
10
10
  const p = brand.privacy;
11
11
  return (
12
- <article className="max-w-3xl mx-auto px-8 py-16 prose prose-lg max-w-none">
12
+ <article className="max-w-3xl mx-auto px-6 sm:px-8 py-16 prose prose-lg max-w-none">
13
13
  <p className="text-[11px] font-semibold uppercase tracking-[0.16em] text-primary mb-2 not-prose">
14
14
  {p.eyebrow}
15
15
  </p>
@@ -9,7 +9,7 @@ export const metadata: Metadata = {
9
9
  export default function TermsPage() {
10
10
  const t = brand.terms;
11
11
  return (
12
- <article className="max-w-3xl mx-auto px-8 py-16 prose prose-lg max-w-none">
12
+ <article className="max-w-3xl mx-auto px-6 sm:px-8 py-16 prose prose-lg max-w-none">
13
13
  <p className="text-[11px] font-semibold uppercase tracking-[0.16em] text-primary mb-2 not-prose">
14
14
  {t.eyebrow}
15
15
  </p>
@@ -17,7 +17,7 @@ export function CartPill() {
17
17
  type="button"
18
18
  onClick={open}
19
19
  aria-label={`Open cart, ${count} ${count === 1 ? "item" : "items"}`}
20
- className="inline-flex items-center gap-1.5 px-3.5 py-2 rounded-full bg-foreground text-background text-xs font-semibold tracking-wide transition-transform hover:scale-105 cursor-pointer"
20
+ className="inline-flex items-center gap-1.5 px-4 py-2.5 sm:py-2 rounded-full bg-foreground text-background text-xs font-semibold tracking-wide transition-transform hover:scale-105 cursor-pointer"
21
21
  >
22
22
  Cart · {count}
23
23
  </button>
@@ -28,7 +28,7 @@ export function CartPillSkeleton() {
28
28
  return (
29
29
  <span
30
30
  aria-hidden
31
- className="inline-flex items-center gap-1.5 px-3.5 py-2 rounded-full bg-foreground/80 text-background text-xs font-semibold tracking-wide"
31
+ className="inline-flex items-center gap-1.5 px-4 py-2.5 sm:py-2 rounded-full bg-foreground/80 text-background text-xs font-semibold tracking-wide"
32
32
  >
33
33
  Cart · …
34
34
  </span>
@@ -11,7 +11,7 @@ import type { Category } from "@cimplify/sdk";
11
11
  export function CategoryGrid({ categories }: { categories?: Category[] }) {
12
12
  const router = useRouter();
13
13
  return (
14
- <section className="max-w-7xl mx-auto px-8 pt-14">
14
+ <section className="max-w-7xl mx-auto px-6 sm:px-8 pt-14">
15
15
  <h2 className="font-serif text-[28px] font-semibold m-0 mb-5">Browse the menu</h2>
16
16
  <SdkCategoryGrid
17
17
  categories={categories}
@@ -16,7 +16,7 @@ interface CollectionStripProps {
16
16
  export function CollectionStrip({ collection, products, collectionHref }: CollectionStripProps) {
17
17
  if (products.length === 0) return null;
18
18
  return (
19
- <section className="max-w-7xl mx-auto px-8 pt-12">
19
+ <section className="max-w-7xl mx-auto px-6 sm:px-8 pt-12">
20
20
  <header className="grid grid-cols-[1fr_auto] items-end gap-4 mb-5">
21
21
  <h2 className="font-serif text-[28px] font-semibold m-0">{collection.name}</h2>
22
22
  {collectionHref && (
@@ -51,7 +51,7 @@ export async function Footer() {
51
51
  "use cache";
52
52
  const year = new Date().getFullYear();
53
53
  return (
54
- <footer className="mt-12 px-8 py-10 text-xs text-muted-foreground border-t border-border bg-card">
54
+ <footer className="mt-12 px-6 sm:px-8 py-10 text-xs text-muted-foreground border-t border-border bg-card">
55
55
  <div className="max-w-7xl mx-auto">
56
56
  <div className="grid gap-10 md:grid-cols-[1.4fr_repeat(4,1fr)]">
57
57
  <div>
@@ -2,6 +2,7 @@ import Link from "next/link";
2
2
  import { Suspense } from "react";
3
3
  import { NavLink } from "./nav-link";
4
4
  import { CartPill, CartPillSkeleton } from "./cart-pill";
5
+ import { MobileNav } from "./mobile-nav";
5
6
  import { brand } from "@/lib/brand";
6
7
 
7
8
  /**
@@ -11,25 +12,30 @@ import { brand } from "@/lib/brand";
11
12
  */
12
13
  export function Header() {
13
14
  return (
14
- <header className="sticky top-0 z-30 flex items-center justify-between px-8 py-4 border-b border-border bg-background/90 backdrop-blur-md">
15
+ <header className="sticky top-0 z-30 flex items-center justify-between px-6 sm:px-8 py-4 border-b border-border bg-background/90 backdrop-blur-md">
15
16
  <Link href="/" className="flex items-baseline gap-2">
16
17
  <span className="font-serif text-[22px] font-semibold -tracking-[0.02em]">
17
18
  {brand.shortName}
18
19
  </span>
19
- <span className="text-[11px] font-medium uppercase tracking-[0.12em] text-muted-foreground">
20
+ <span className="hidden sm:inline text-[11px] font-medium uppercase tracking-[0.12em] text-muted-foreground">
20
21
  {brand.microTag}
21
22
  </span>
22
23
  </Link>
23
- <nav className="flex items-center gap-6">
24
- {brand.header.nav.map((link) => (
25
- <Suspense key={link.href} fallback={<NavLinkFallback>{link.label}</NavLinkFallback>}>
26
- <NavLink href={link.href}>{link.label}</NavLink>
27
- </Suspense>
28
- ))}
24
+ <div className="flex items-center gap-3 sm:gap-6">
25
+ <nav className="hidden sm:flex items-center gap-6">
26
+ {brand.header.nav.map((link) => (
27
+ <Suspense key={link.href} fallback={<NavLinkFallback>{link.label}</NavLinkFallback>}>
28
+ <NavLink href={link.href}>{link.label}</NavLink>
29
+ </Suspense>
30
+ ))}
31
+ </nav>
29
32
  <Suspense fallback={<CartPillSkeleton />}>
30
33
  <CartPill />
31
34
  </Suspense>
32
- </nav>
35
+ <div className="sm:hidden">
36
+ <MobileNav />
37
+ </div>
38
+ </div>
33
39
  </header>
34
40
  );
35
41
  }
@@ -6,7 +6,7 @@ interface HeroProps {
6
6
 
7
7
  export function Hero({ badge, title, subtitle }: HeroProps) {
8
8
  return (
9
- <section className="px-8 py-16 text-center bg-gradient-to-b from-accent to-background">
9
+ <section className="px-6 sm:px-8 py-16 text-center bg-gradient-to-b from-accent to-background">
10
10
  {badge && (
11
11
  <span className="inline-block mb-4 px-3.5 py-1.5 rounded-full bg-card border border-accent text-accent-foreground text-[11px] font-semibold uppercase tracking-[0.12em]">
12
12
  {badge}
@@ -0,0 +1,34 @@
1
+ import { brand } from "@/lib/brand";
2
+ import { getSiteUrl } from "@/lib/site-url";
3
+
4
+ /**
5
+ * Streams the organization JSON-LD script tag in async so it doesn't block
6
+ * the rest of the layout shell. `getSiteUrl` reads request headers, and
7
+ * any await on dynamic data inside `RootLayout` makes Next 16 mark the
8
+ * whole route as blocking.
9
+ */
10
+ export async function OrganizationJsonLd(): Promise<React.ReactElement> {
11
+ const siteUrl = await getSiteUrl();
12
+ const ld = {
13
+ "@context": "https://schema.org",
14
+ "@type": brand.schemaType,
15
+ name: brand.name,
16
+ url: siteUrl,
17
+ description: brand.description,
18
+ email: brand.contact.email,
19
+ telephone: brand.contact.phoneTel,
20
+ address: {
21
+ "@type": "PostalAddress",
22
+ streetAddress: brand.contact.streetAddress,
23
+ addressLocality: brand.contact.city,
24
+ addressCountry: brand.contact.countryCode,
25
+ },
26
+ sameAs: brand.socials.map((s) => s.href),
27
+ };
28
+ return (
29
+ <script
30
+ type="application/ld+json"
31
+ dangerouslySetInnerHTML={{ __html: JSON.stringify(ld) }}
32
+ />
33
+ );
34
+ }
@@ -0,0 +1,113 @@
1
+ "use client";
2
+
3
+ import { useEffect, useState } from "react";
4
+ import Link from "next/link";
5
+ import { brand } from "@/lib/brand";
6
+
7
+ /**
8
+ * Hamburger button + slide-in drawer for narrow viewports. Header hides
9
+ * its inline nav links below `sm` and renders this in their place; the
10
+ * cart pill stays in the header chrome.
11
+ */
12
+ export function MobileNav() {
13
+ const [open, setOpen] = useState(false);
14
+
15
+ useEffect(() => {
16
+ if (!open) return;
17
+ const onKey = (event: KeyboardEvent) => {
18
+ if (event.key === "Escape") setOpen(false);
19
+ };
20
+ document.addEventListener("keydown", onKey);
21
+ const previousOverflow = document.body.style.overflow;
22
+ document.body.style.overflow = "hidden";
23
+ return () => {
24
+ document.removeEventListener("keydown", onKey);
25
+ document.body.style.overflow = previousOverflow;
26
+ };
27
+ }, [open]);
28
+
29
+ return (
30
+ <>
31
+ <button
32
+ type="button"
33
+ onClick={() => setOpen(true)}
34
+ aria-label="Open menu"
35
+ aria-expanded={open}
36
+ aria-controls="mobile-nav-drawer"
37
+ className="grid place-items-center w-11 h-11 -mr-2 rounded-md text-foreground hover:bg-muted transition-colors"
38
+ >
39
+ <svg
40
+ width="20"
41
+ height="20"
42
+ viewBox="0 0 24 24"
43
+ fill="none"
44
+ stroke="currentColor"
45
+ strokeWidth="2"
46
+ strokeLinecap="round"
47
+ strokeLinejoin="round"
48
+ aria-hidden="true"
49
+ >
50
+ <line x1="3" y1="6" x2="21" y2="6" />
51
+ <line x1="3" y1="12" x2="21" y2="12" />
52
+ <line x1="3" y1="18" x2="21" y2="18" />
53
+ </svg>
54
+ </button>
55
+
56
+ {open ? (
57
+ <div className="fixed inset-0 z-50 sm:hidden">
58
+ <button
59
+ type="button"
60
+ onClick={() => setOpen(false)}
61
+ aria-label="Close menu"
62
+ className="absolute inset-0 bg-background/80 backdrop-blur-sm"
63
+ />
64
+ <nav
65
+ id="mobile-nav-drawer"
66
+ aria-label="Mobile navigation"
67
+ className="absolute inset-y-0 right-0 w-[85%] max-w-sm flex flex-col bg-background border-l border-border shadow-2xl"
68
+ >
69
+ <div className="flex items-center justify-between px-6 py-4 border-b border-border">
70
+ <span className="text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground">
71
+ Menu
72
+ </span>
73
+ <button
74
+ type="button"
75
+ onClick={() => setOpen(false)}
76
+ aria-label="Close menu"
77
+ className="grid place-items-center w-11 h-11 -mr-2 rounded-md text-foreground hover:bg-muted transition-colors"
78
+ >
79
+ <svg
80
+ width="20"
81
+ height="20"
82
+ viewBox="0 0 24 24"
83
+ fill="none"
84
+ stroke="currentColor"
85
+ strokeWidth="2"
86
+ strokeLinecap="round"
87
+ strokeLinejoin="round"
88
+ aria-hidden="true"
89
+ >
90
+ <line x1="18" y1="6" x2="6" y2="18" />
91
+ <line x1="6" y1="6" x2="18" y2="18" />
92
+ </svg>
93
+ </button>
94
+ </div>
95
+ <ul className="flex flex-col gap-1 px-3 py-4">
96
+ {brand.header.nav.map((link) => (
97
+ <li key={link.href}>
98
+ <Link
99
+ href={link.href}
100
+ onClick={() => setOpen(false)}
101
+ className="block px-3 py-3 rounded-md text-base font-medium text-foreground hover:bg-muted transition-colors"
102
+ >
103
+ {link.label}
104
+ </Link>
105
+ </li>
106
+ ))}
107
+ </ul>
108
+ </nav>
109
+ </div>
110
+ ) : null}
111
+ </>
112
+ );
113
+ }
@@ -13,7 +13,7 @@ interface PolicyShape {
13
13
  */
14
14
  export function PolicyPage({ policy }: { policy: PolicyShape }) {
15
15
  return (
16
- <article className="max-w-3xl mx-auto px-8 py-16 prose prose-lg max-w-none">
16
+ <article className="max-w-3xl mx-auto px-6 sm:px-8 py-16 prose prose-lg max-w-none">
17
17
  <p className="text-[11px] font-semibold uppercase tracking-[0.16em] text-primary mb-2 not-prose">
18
18
  {policy.eyebrow}
19
19
  </p>
@@ -17,7 +17,7 @@
17
17
  "check": "bun run typecheck && bun run test:run"
18
18
  },
19
19
  "dependencies": {
20
- "@cimplify/sdk": "^0.47.0",
20
+ "@cimplify/sdk": "^0.48.0",
21
21
  "next": "^16.2.4",
22
22
  "react": "^19.0.0",
23
23
  "react-dom": "^19.0.0"
@@ -11,7 +11,7 @@ export default function AboutPage() {
11
11
  // Title supports a single \n for a hard line break.
12
12
  const titleParts = a.title.split("\n");
13
13
  return (
14
- <article className="max-w-3xl mx-auto px-8 py-16">
14
+ <article className="max-w-3xl mx-auto px-6 sm:px-8 py-16">
15
15
  <p className="text-[11px] font-mono uppercase tracking-[0.16em] text-primary mb-2">
16
16
  {a.eyebrow}
17
17
  </p>
@@ -9,7 +9,7 @@ export const metadata: Metadata = {
9
9
  export default function FaqPage() {
10
10
  const f = brand.faq;
11
11
  return (
12
- <article className="max-w-3xl mx-auto px-8 py-16">
12
+ <article className="max-w-3xl mx-auto px-6 sm:px-8 py-16">
13
13
  <p className="text-[11px] font-mono uppercase tracking-[0.16em] text-primary mb-2">
14
14
  {f.eyebrow}
15
15
  </p>
@@ -4,7 +4,10 @@ import "./globals.css";
4
4
  import { Providers } from "@/components/providers";
5
5
  import { Header } from "@/components/header";
6
6
  import { Footer } from "@/components/footer";
7
+ import { ProductModal } from "@/components/product-modal";
7
8
  import { CartDrawer } from "@/components/cart-drawer";
9
+ import { OrganizationJsonLd } from "@/components/json-ld";
10
+ import { Suspense } from "react";
8
11
  import { brand } from "@/lib/brand";
9
12
  import { getSiteUrl } from "@/lib/site-url";
10
13
 
@@ -26,55 +29,36 @@ export async function generateMetadata(): Promise<Metadata> {
26
29
  return {
27
30
  metadataBase: new URL(siteUrl),
28
31
  title: {
29
- default: brand.name,
30
- template: `%s — ${brand.name}`,
32
+ default: brand.name,
33
+ template: `%s — ${brand.name}`,
31
34
  },
32
35
  description: brand.description,
33
36
  openGraph: {
34
- type: "website",
35
- siteName: brand.name,
36
- locale: brand.locale,
37
+ type: "website",
38
+ siteName: brand.name,
39
+ locale: brand.locale,
37
40
  },
38
41
  twitter: { card: "summary_large_image" },
39
42
  };
40
43
  }
41
44
 
42
- async function organizationLd() {
43
- const siteUrl = await getSiteUrl();
44
- return {
45
- "@context": "https://schema.org",
46
- "@type": brand.schemaType,
47
- name: brand.name,
48
- url: siteUrl,
49
- description: brand.description,
50
- email: brand.contact.email,
51
- telephone: brand.contact.phoneTel,
52
- address: {
53
- "@type": "PostalAddress",
54
- streetAddress: brand.contact.streetAddress,
55
- addressLocality: brand.contact.city,
56
- addressCountry: brand.contact.countryCode,
57
- },
58
- sameAs: brand.socials.map((s) => s.href),
59
- };
60
- }
61
-
62
- export default async function RootLayout({ children }: { children: React.ReactNode }) {
63
- const ld = await organizationLd();
45
+ export default function RootLayout({ children }: { children: React.ReactNode }) {
64
46
  return (
65
47
  <html lang="en" suppressHydrationWarning className={`${inter.variable} ${anton.variable}`}>
66
48
  <body
67
49
  suppressHydrationWarning
68
50
  className="min-h-screen flex flex-col bg-background text-foreground font-sans"
69
51
  >
70
- <script
71
- type="application/ld+json"
72
- dangerouslySetInnerHTML={{ __html: JSON.stringify(ld) }}
73
- />
52
+ <Suspense fallback={null}>
53
+ <OrganizationJsonLd />
54
+ </Suspense>
74
55
  <Providers>
75
56
  <Header />
76
57
  <main className="flex-1 pb-12 w-full">{children}</main>
77
58
  <Footer />
59
+ <Suspense fallback={null}>
60
+ <ProductModal />
61
+ </Suspense>
78
62
  <CartDrawer />
79
63
  </Providers>
80
64
  </body>
@@ -3,7 +3,7 @@ import Link from "next/link";
3
3
  export default async function OrderPage({ params }: { params: Promise<{ id: string }> }) {
4
4
  const { id } = await params;
5
5
  return (
6
- <section className="max-w-2xl mx-auto px-8 py-20 text-center">
6
+ <section className="max-w-2xl mx-auto px-6 sm:px-8 py-20 text-center">
7
7
  <h1 className="text-3xl mt-0 mb-3 font-bold -tracking-[0.025em]">
8
8
  Order confirmed.
9
9
  </h1>
@@ -9,7 +9,7 @@ export const metadata: Metadata = {
9
9
  export default function PrivacyPage() {
10
10
  const p = brand.privacy;
11
11
  return (
12
- <article className="max-w-3xl mx-auto px-8 py-16 prose prose-lg max-w-none">
12
+ <article className="max-w-3xl mx-auto px-6 sm:px-8 py-16 prose prose-lg max-w-none">
13
13
  <p className="text-[11px] font-mono uppercase tracking-[0.16em] text-primary mb-2 not-prose">
14
14
  {p.eyebrow}
15
15
  </p>
@@ -9,7 +9,7 @@ export const metadata: Metadata = {
9
9
  export default function TermsPage() {
10
10
  const t = brand.terms;
11
11
  return (
12
- <article className="max-w-3xl mx-auto px-8 py-16 prose prose-lg max-w-none">
12
+ <article className="max-w-3xl mx-auto px-6 sm:px-8 py-16 prose prose-lg max-w-none">
13
13
  <p className="text-[11px] font-mono uppercase tracking-[0.16em] text-primary mb-2 not-prose">
14
14
  {t.eyebrow}
15
15
  </p>
@@ -17,7 +17,7 @@ export function CartPill() {
17
17
  type="button"
18
18
  onClick={open}
19
19
  aria-label={`Open cart, ${count} ${count === 1 ? "item" : "items"}`}
20
- className="inline-flex items-center gap-1.5 px-3.5 py-2 rounded-full bg-foreground text-background text-xs font-semibold tracking-wide transition-transform hover:scale-105 cursor-pointer"
20
+ className="inline-flex items-center gap-1.5 px-4 py-2.5 sm:py-2 rounded-full bg-foreground text-background text-xs font-semibold tracking-wide transition-transform hover:scale-105 cursor-pointer"
21
21
  >
22
22
  Cart · {count}
23
23
  </button>
@@ -28,7 +28,7 @@ export function CartPillSkeleton() {
28
28
  return (
29
29
  <span
30
30
  aria-hidden
31
- className="inline-flex items-center gap-1.5 px-3.5 py-2 rounded-full bg-foreground/80 text-background text-xs font-semibold tracking-wide"
31
+ className="inline-flex items-center gap-1.5 px-4 py-2.5 sm:py-2 rounded-full bg-foreground/80 text-background text-xs font-semibold tracking-wide"
32
32
  >
33
33
  Cart · …
34
34
  </span>
@@ -11,7 +11,7 @@ import type { Category } from "@cimplify/sdk";
11
11
  export function CategoryGrid({ categories }: { categories?: Category[] }) {
12
12
  const router = useRouter();
13
13
  return (
14
- <section className="max-w-7xl mx-auto px-8 pt-14">
14
+ <section className="max-w-7xl mx-auto px-6 sm:px-8 pt-14">
15
15
  <h2 className="font-serif text-[28px] font-semibold m-0 mb-5">Browse the menu</h2>
16
16
  <SdkCategoryGrid
17
17
  categories={categories}
@@ -16,7 +16,7 @@ interface CollectionStripProps {
16
16
  export function CollectionStrip({ collection, products, collectionHref }: CollectionStripProps) {
17
17
  if (products.length === 0) return null;
18
18
  return (
19
- <section className="max-w-7xl mx-auto px-8 pt-12">
19
+ <section className="max-w-7xl mx-auto px-6 sm:px-8 pt-12">
20
20
  <header className="grid grid-cols-[1fr_auto] items-end gap-4 mb-5">
21
21
  <h2 className="font-serif text-[28px] font-semibold m-0">{collection.name}</h2>
22
22
  {collectionHref && (
@@ -27,7 +27,7 @@ export function FeatureHero({
27
27
  badge,
28
28
  }: FeatureHeroProps) {
29
29
  return (
30
- <section className="relative w-full h-[clamp(560px,80vh,820px)] overflow-hidden bg-foreground text-background">
30
+ <section className="relative w-full h-[clamp(440px,65vh,640px)] sm:h-[clamp(560px,80vh,820px)] overflow-hidden bg-foreground text-background">
31
31
  <Image
32
32
  src={imageUrl}
33
33
  alt={imageAlt}
@@ -2,6 +2,7 @@ import Link from "next/link";
2
2
  import { Suspense } from "react";
3
3
  import { NavLink } from "./nav-link";
4
4
  import { CartPill, CartPillSkeleton } from "./cart-pill";
5
+ import { MobileNav } from "./mobile-nav";
5
6
  import { brand } from "@/lib/brand";
6
7
 
7
8
  /**
@@ -20,16 +21,21 @@ export function Header() {
20
21
  {brand.microTag}
21
22
  </span>
22
23
  </Link>
23
- <nav className="flex items-center gap-5 sm:gap-7 uppercase tracking-wide text-[12px]">
24
- {brand.header.nav.map((link) => (
25
- <Suspense key={link.href} fallback={<NavLinkFallback>{link.label}</NavLinkFallback>}>
26
- <NavLink href={link.href}>{link.label}</NavLink>
27
- </Suspense>
28
- ))}
24
+ <div className="flex items-center gap-3 sm:gap-7">
25
+ <nav className="hidden sm:flex items-center gap-5 sm:gap-7 uppercase tracking-wide text-[12px]">
26
+ {brand.header.nav.map((link) => (
27
+ <Suspense key={link.href} fallback={<NavLinkFallback>{link.label}</NavLinkFallback>}>
28
+ <NavLink href={link.href}>{link.label}</NavLink>
29
+ </Suspense>
30
+ ))}
31
+ </nav>
29
32
  <Suspense fallback={<CartPillSkeleton />}>
30
33
  <CartPill />
31
34
  </Suspense>
32
- </nav>
35
+ <div className="sm:hidden">
36
+ <MobileNav />
37
+ </div>
38
+ </div>
33
39
  </header>
34
40
  );
35
41
  }
@@ -6,7 +6,7 @@ interface HeroProps {
6
6
 
7
7
  export function Hero({ badge, title, subtitle }: HeroProps) {
8
8
  return (
9
- <section className="relative px-8 py-20 text-center overflow-hidden bg-gradient-to-br from-foreground via-foreground to-primary text-background">
9
+ <section className="relative px-6 sm:px-8 py-20 text-center overflow-hidden bg-gradient-to-br from-foreground via-foreground to-primary text-background">
10
10
  <div className="absolute inset-0 opacity-[0.06] pointer-events-none [background-image:radial-gradient(circle_at_2px_2px,white_1px,transparent_0)] [background-size:32px_32px]" />
11
11
  <div className="relative max-w-3xl mx-auto">
12
12
  {badge && (
@@ -0,0 +1,34 @@
1
+ import { brand } from "@/lib/brand";
2
+ import { getSiteUrl } from "@/lib/site-url";
3
+
4
+ /**
5
+ * Streams the organization JSON-LD script tag in async so it doesn't block
6
+ * the rest of the layout shell. `getSiteUrl` reads request headers, and
7
+ * any await on dynamic data inside `RootLayout` makes Next 16 mark the
8
+ * whole route as blocking.
9
+ */
10
+ export async function OrganizationJsonLd(): Promise<React.ReactElement> {
11
+ const siteUrl = await getSiteUrl();
12
+ const ld = {
13
+ "@context": "https://schema.org",
14
+ "@type": brand.schemaType,
15
+ name: brand.name,
16
+ url: siteUrl,
17
+ description: brand.description,
18
+ email: brand.contact.email,
19
+ telephone: brand.contact.phoneTel,
20
+ address: {
21
+ "@type": "PostalAddress",
22
+ streetAddress: brand.contact.streetAddress,
23
+ addressLocality: brand.contact.city,
24
+ addressCountry: brand.contact.countryCode,
25
+ },
26
+ sameAs: brand.socials.map((s) => s.href),
27
+ };
28
+ return (
29
+ <script
30
+ type="application/ld+json"
31
+ dangerouslySetInnerHTML={{ __html: JSON.stringify(ld) }}
32
+ />
33
+ );
34
+ }