From b1561fdfe5a474c0d1dbf75302c31022aafda026 Mon Sep 17 00:00:00 2001 From: Yuvraj Sarathe Date: Tue, 26 May 2026 15:54:22 +0530 Subject: [PATCH 1/4] UI --- package.json | 3 +- src/components/Commands.tsx | 4 +-- src/components/Hero.tsx | 8 ++--- src/components/Navbar.tsx | 65 +++++++++++++++++++++++++++++++++++-- src/components/Terminal.tsx | 2 +- vite.config.ts | 2 +- 6 files changed, 73 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 9b51765..8bf24d4 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "build:dev": "vite build --mode development", "preview": "vite preview", "lint": "eslint .", - "format": "prettier --write ." + "format": "prettier --write .", + "postinstall": "node scripts/patch-lovable-config.cjs" }, "dependencies": { "@cloudflare/vite-plugin": "^1.25.5", diff --git a/src/components/Commands.tsx b/src/components/Commands.tsx index 93266cd..083fea2 100644 --- a/src/components/Commands.tsx +++ b/src/components/Commands.tsx @@ -63,12 +63,12 @@ export const Commands = () => {
-
+
{commands.map((c, i) => (
-
+
-
12k+
+
12k+
Active clusters
-
99.99%
+
99.99%
Uptime SLA
-
<50ms
+
<50ms
Stream latency
diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index 1b953f0..41c42db 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -1,5 +1,12 @@ import { Link } from "@tanstack/react-router"; -import { Star } from "lucide-react"; +import { Menu, Star } from "lucide-react"; + +import { + Sheet, + SheetTrigger, + SheetContent, + SheetClose, +} from "@/components/ui/sheet"; export const Navbar = () => { return ( @@ -15,11 +22,65 @@ export const Navbar = () => { Docs
+ {/* Mobile hamburger trigger — visible only below md */} + + + + + + + + + + {/* Desktop GitHub CTA — hidden on mobile (replaced by Sheet) */} Star us diff --git a/src/components/Terminal.tsx b/src/components/Terminal.tsx index 1d45020..40c5b77 100644 --- a/src/components/Terminal.tsx +++ b/src/components/Terminal.tsx @@ -30,7 +30,7 @@ export const Terminal = () => { ~/cluster — kdm
-
+
{lines.slice(0, visible).map((l, i) => (
{l.prompt && {l.prompt}} diff --git a/vite.config.ts b/vite.config.ts index bb81147..773c92a 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -12,7 +12,7 @@ const isVercel = process.env.VERCEL === "1"; // Redirect TanStack Start's bundled server entry to src/server.ts (our SSR error wrapper). // @cloudflare/vite-plugin builds from this — wrangler.jsonc main alone is insufficient. export default defineConfig({ - cloudflare: !isVercel, // Disable cloudflare plugin on Vercel + cloudflare: isVercel ? false : {}, // Disable cloudflare plugin on Vercel vite: { plugins: isVercel ? [nitro({ preset: "vercel" })] : [], }, From 6fc5d86025b8db2c4e4203c93e9c08172f6f597b Mon Sep 17 00:00:00 2001 From: Yuvraj Sarathe Date: Tue, 26 May 2026 16:23:44 +0530 Subject: [PATCH 2/4] UI --- scripts/patch-lovable-config.cjs | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 scripts/patch-lovable-config.cjs diff --git a/scripts/patch-lovable-config.cjs b/scripts/patch-lovable-config.cjs new file mode 100644 index 0000000..47a6d89 --- /dev/null +++ b/scripts/patch-lovable-config.cjs @@ -0,0 +1,37 @@ +// Patches @lovable.dev/vite-tanstack-config to prefer the ESM entrypoint +// (dist/index.js) over the CJS one (dist/index.cjs) for import contexts. +// Required for Node.js >=22.12 compat — the CJS file does require("vite"), +// which is ESM-only, causing ERR_REQUIRE_CYCLE_MODULE. +const fs = require("fs"); +const path = require("path"); + +const pkgPath = path.resolve( + __dirname, + "..", + "node_modules", + "@lovable.dev", + "vite-tanstack-config", + "package.json" +); + +if (!fs.existsSync(pkgPath)) { + console.warn("[patch-lovable-config] package not found — skipping"); + process.exit(0); +} + +const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8")); + +if (pkg.exports) { + console.log("[patch-lovable-config] exports already present — nothing to do"); + process.exit(0); +} + +pkg.exports = { + ".": { + import: "./dist/index.js", + require: "./dist/index.cjs", + }, +}; + +fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + "\n"); +console.log("[patch-lovable-config] added exports field to prefer ESM entrypoint"); From 6aa9072aa15e103acab76cb0039d3ec3f7fd843b Mon Sep 17 00:00:00 2001 From: Utkarsh patrikar <137105846+utkarsh232005@users.noreply.github.com> Date: Tue, 26 May 2026 19:12:47 +0530 Subject: [PATCH 3/4] Update scripts/patch-lovable-config.cjs Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- scripts/patch-lovable-config.cjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/patch-lovable-config.cjs b/scripts/patch-lovable-config.cjs index 47a6d89..c3bc468 100644 --- a/scripts/patch-lovable-config.cjs +++ b/scripts/patch-lovable-config.cjs @@ -9,9 +9,9 @@ const pkgPath = path.resolve( __dirname, "..", "node_modules", - "@lovable.dev", + "`@lovable.dev`", "vite-tanstack-config", - "package.json" + "package.json", ); if (!fs.existsSync(pkgPath)) { From 77d25d453a597d13a83fca74a1b64aa71f2845de Mon Sep 17 00:00:00 2001 From: Utkarsh patrikar <137105846+utkarsh232005@users.noreply.github.com> Date: Tue, 26 May 2026 19:17:48 +0530 Subject: [PATCH 4/4] Update patch-lovable-config.cjs --- scripts/patch-lovable-config.cjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/patch-lovable-config.cjs b/scripts/patch-lovable-config.cjs index c3bc468..6ef5953 100644 --- a/scripts/patch-lovable-config.cjs +++ b/scripts/patch-lovable-config.cjs @@ -9,7 +9,7 @@ const pkgPath = path.resolve( __dirname, "..", "node_modules", - "`@lovable.dev`", + "@lovable.dev", "vite-tanstack-config", "package.json", );