@cimplify/cli 0.9.0 → 0.9.1

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 (37) hide show
  1. package/dist/{add-HCVYD33F.mjs → add-ZRSE2STJ.mjs} +1 -1
  2. package/dist/{chunk-VHXZ4SGF.mjs → chunk-N3YC3V2N.mjs} +2 -2
  3. package/dist/{chunk-WNZ6N634.mjs → chunk-SS3XKLBR.mjs} +1 -1
  4. package/dist/{chunk-DE4MI2UK.mjs → chunk-WBNI7PWA.mjs} +18 -18
  5. package/dist/dispatcher.mjs +9 -9
  6. package/dist/{doctor-2OIPFMDS.mjs → doctor-JIPUNSOC.mjs} +2 -2
  7. package/dist/{explain-JBPAC2ZB.mjs → explain-6LPKSOBY.mjs} +1 -1
  8. package/dist/{introspect-5BX4KGO4.mjs → introspect-TDUKKAZE.mjs} +2 -2
  9. package/dist/{list-5WLNIKFF.mjs → list-FCBWJ5DY.mjs} +1 -1
  10. package/dist/{update-6EVYEGKD.mjs → update-7BHT5CL5.mjs} +1 -1
  11. package/package.json +2 -2
  12. package/templates/storefront-auto/CLAUDE.md +39 -0
  13. package/templates/storefront-auto/components/mobile-nav.tsx +58 -48
  14. package/templates/storefront-auto/package.json +1 -1
  15. package/templates/storefront-bakery/CLAUDE.md +39 -0
  16. package/templates/storefront-bakery/components/mobile-nav.tsx +58 -48
  17. package/templates/storefront-bakery/package.json +1 -1
  18. package/templates/storefront-fashion/CLAUDE.md +39 -0
  19. package/templates/storefront-fashion/components/mobile-nav.tsx +58 -48
  20. package/templates/storefront-fashion/package.json +1 -1
  21. package/templates/storefront-grocery/CLAUDE.md +39 -0
  22. package/templates/storefront-grocery/components/mobile-nav.tsx +58 -48
  23. package/templates/storefront-grocery/package.json +1 -1
  24. package/templates/storefront-pharmacy/CLAUDE.md +39 -0
  25. package/templates/storefront-pharmacy/components/mobile-nav.tsx +58 -48
  26. package/templates/storefront-pharmacy/package.json +1 -1
  27. package/templates/storefront-restaurant/CLAUDE.md +39 -0
  28. package/templates/storefront-restaurant/components/mobile-nav.tsx +58 -48
  29. package/templates/storefront-restaurant/package.json +1 -1
  30. package/templates/storefront-retail/CLAUDE.md +39 -0
  31. package/templates/storefront-retail/components/mobile-nav.tsx +58 -48
  32. package/templates/storefront-retail/package.json +1 -1
  33. package/templates/storefront-services/CLAUDE.md +39 -0
  34. package/templates/storefront-services/app/book/book-client.tsx +1 -0
  35. package/templates/storefront-services/bun.lock +454 -8
  36. package/templates/storefront-services/components/mobile-nav.tsx +58 -48
  37. package/templates/storefront-services/package.json +1 -1
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
 
3
3
  import { useEffect, useState } from "react";
4
+ import { createPortal } from "react-dom";
4
5
  import Link from "next/link";
5
6
  import { brand } from "@/lib/brand";
6
7
 
@@ -11,6 +12,9 @@ import { brand } from "@/lib/brand";
11
12
  */
12
13
  export function MobileNav() {
13
14
  const [open, setOpen] = useState(false);
15
+ const [mounted, setMounted] = useState(false);
16
+
17
+ useEffect(() => setMounted(true), []);
14
18
 
15
19
  useEffect(() => {
16
20
  if (!open) return;
@@ -53,61 +57,67 @@ export function MobileNav() {
53
57
  </svg>
54
58
  </button>
55
59
 
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>
60
+ {/* Portalled: the header carries `backdrop-filter`, which makes it the
61
+ containing block for `position: fixed`, clamping this drawer to the
62
+ header's box. */}
63
+ {open && mounted
64
+ ? createPortal(
65
+ <div className="fixed inset-0 z-50 sm:hidden">
73
66
  <button
74
67
  type="button"
75
68
  onClick={() => setOpen(false)}
76
69
  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"
70
+ className="absolute inset-0 bg-background/80 backdrop-blur-sm"
71
+ />
72
+ <nav
73
+ id="mobile-nav-drawer"
74
+ aria-label="Mobile navigation"
75
+ className="absolute inset-y-0 right-0 w-[85%] max-w-sm flex flex-col bg-background border-l border-border shadow-2xl"
78
76
  >
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}
77
+ <div className="flex items-center justify-between px-6 py-4 border-b border-border">
78
+ <span className="text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground">
79
+ Menu
80
+ </span>
81
+ <button
82
+ type="button"
100
83
  onClick={() => setOpen(false)}
101
- className="block px-3 py-3 rounded-md text-base font-medium text-foreground hover:bg-muted transition-colors"
84
+ aria-label="Close menu"
85
+ className="grid place-items-center w-11 h-11 -mr-2 rounded-md text-foreground hover:bg-muted transition-colors"
102
86
  >
103
- {link.label}
104
- </Link>
105
- </li>
106
- ))}
107
- </ul>
108
- </nav>
109
- </div>
110
- ) : null}
87
+ <svg
88
+ width="20"
89
+ height="20"
90
+ viewBox="0 0 24 24"
91
+ fill="none"
92
+ stroke="currentColor"
93
+ strokeWidth="2"
94
+ strokeLinecap="round"
95
+ strokeLinejoin="round"
96
+ aria-hidden="true"
97
+ >
98
+ <line x1="18" y1="6" x2="6" y2="18" />
99
+ <line x1="6" y1="6" x2="18" y2="18" />
100
+ </svg>
101
+ </button>
102
+ </div>
103
+ <ul className="flex flex-col gap-1 px-3 py-4">
104
+ {brand.header.nav.map((link) => (
105
+ <li key={link.href}>
106
+ <Link
107
+ href={link.href}
108
+ onClick={() => setOpen(false)}
109
+ className="block px-3 py-3 rounded-md text-base font-medium text-foreground hover:bg-muted transition-colors"
110
+ >
111
+ {link.label}
112
+ </Link>
113
+ </li>
114
+ ))}
115
+ </ul>
116
+ </nav>
117
+ </div>,
118
+ document.body,
119
+ )
120
+ : null}
111
121
  </>
112
122
  );
113
123
  }
@@ -17,7 +17,7 @@
17
17
  "check": "bun run typecheck && bun run test:run"
18
18
  },
19
19
  "dependencies": {
20
- "@cimplify/sdk": "^0.95.0",
20
+ "@cimplify/sdk": "^0.96.0",
21
21
  "next": "^16.2.6",
22
22
  "react": "^19.0.0",
23
23
  "react-dom": "^19.0.0"