|
| 1 | +import type { ReactNode } from "react"; |
| 2 | + |
| 3 | +import { Wordmark } from "@executor-js/react/components/wordmark"; |
| 4 | + |
| 5 | +// Split auth layout for the chromeless pages (setup, login, join): a promo |
| 6 | +// panel on the left, the form on the right. The panel follows design.md's |
| 7 | +// registry-minimal rules — graph-paper texture, mono eyebrow + index numerals, |
| 8 | +// grayscale only — so the first screen a person ever sees speaks the same |
| 9 | +// language as the app behind it. Collapses to form-only below lg. |
| 10 | +const PANEL_POINTS: ReadonlyArray<{ index: string; title: string; body: string }> = [ |
| 11 | + { |
| 12 | + index: "01", |
| 13 | + title: "Connect", |
| 14 | + body: "OpenAPI, GraphQL, and MCP sources become tools your agent can call.", |
| 15 | + }, |
| 16 | + { |
| 17 | + index: "02", |
| 18 | + title: "Control", |
| 19 | + body: "Policies decide which tools run, which ask first, and which are blocked.", |
| 20 | + }, |
| 21 | + { |
| 22 | + index: "03", |
| 23 | + title: "Audit", |
| 24 | + body: "Every invocation is recorded, with approvals where they matter.", |
| 25 | + }, |
| 26 | +]; |
| 27 | + |
| 28 | +export function AuthLayout(props: { readonly children: ReactNode }) { |
| 29 | + return ( |
| 30 | + <div className="grid min-h-screen bg-background lg:grid-cols-[1.1fr_1fr]"> |
| 31 | + <aside className="relative hidden flex-col justify-between overflow-hidden border-r border-border bg-sidebar p-12 lg:flex"> |
| 32 | + {/* Graph-paper texture, faded toward the bottom (design.md signature). */} |
| 33 | + <div |
| 34 | + aria-hidden |
| 35 | + className="pointer-events-none absolute inset-0 text-foreground opacity-[0.05]" |
| 36 | + style={{ |
| 37 | + backgroundImage: |
| 38 | + "linear-gradient(currentColor 1px, transparent 1px), linear-gradient(90deg, currentColor 1px, transparent 1px)", |
| 39 | + backgroundSize: "32px 32px", |
| 40 | + maskImage: "linear-gradient(to bottom, black 30%, transparent 85%)", |
| 41 | + }} |
| 42 | + /> |
| 43 | + |
| 44 | + <div className="relative"> |
| 45 | + <Wordmark /> |
| 46 | + </div> |
| 47 | + |
| 48 | + <div className="relative max-w-md space-y-10"> |
| 49 | + <div className="space-y-4"> |
| 50 | + <p className="font-mono text-[11px] font-medium uppercase tracking-[0.18em] text-muted-foreground"> |
| 51 | + The integration layer for AI agents |
| 52 | + </p> |
| 53 | + <h2 className="text-4xl font-semibold tracking-[-0.04em] text-foreground"> |
| 54 | + Every tool your agent needs, behind one endpoint. |
| 55 | + </h2> |
| 56 | + <p className="text-sm leading-6 text-muted-foreground"> |
| 57 | + Connect your APIs once. Any MCP-compatible agent gets the whole catalog, governed by |
| 58 | + your policies. |
| 59 | + </p> |
| 60 | + </div> |
| 61 | + |
| 62 | + <ul className="space-y-5"> |
| 63 | + {PANEL_POINTS.map((point) => ( |
| 64 | + <li key={point.index} className="flex gap-4"> |
| 65 | + <span className="font-mono text-[11px] font-medium tracking-[0.08em] text-muted-foreground/70 pt-0.5"> |
| 66 | + {point.index} |
| 67 | + </span> |
| 68 | + <div> |
| 69 | + <p className="text-sm font-medium text-foreground">{point.title}</p> |
| 70 | + <p className="text-sm leading-6 text-muted-foreground">{point.body}</p> |
| 71 | + </div> |
| 72 | + </li> |
| 73 | + ))} |
| 74 | + </ul> |
| 75 | + </div> |
| 76 | + |
| 77 | + <p className="relative font-mono text-[11px] tracking-[0.08em] text-muted-foreground"> |
| 78 | + self-hosted |
| 79 | + </p> |
| 80 | + </aside> |
| 81 | + |
| 82 | + <main className="flex flex-col items-center justify-center gap-6 p-6"> |
| 83 | + <div className="lg:hidden"> |
| 84 | + <Wordmark /> |
| 85 | + </div> |
| 86 | + {props.children} |
| 87 | + </main> |
| 88 | + </div> |
| 89 | + ); |
| 90 | +} |
0 commit comments