import { Body, Button, Container, Head, Heading, Hr, Html, Link, Preview, Section, Text, } from "@react-email/components"; import * as React from "react"; interface MeshInvitationProps { meshName: string; inviteUrl: string; token: string; expiresAt: string; appBaseUrl: string; } // Brand tokens — mirror of apps/web/src/assets/styles/globals.css (--cm-*). // Inlined here because email clients don't resolve CSS vars. const brand = { bg: "#141413", bgElevated: "#1f1e1d", bgCode: "#0f0e0d", fg: "#faf9f5", fgSecondary: "#c2c0b6", fgTertiary: "#87867f", clay: "#d97757", clayBorder: "rgba(217, 119, 87, 0.35)", border: "rgba(217, 119, 87, 0.2)", serif: 'Georgia, "Times New Roman", serif', mono: '"JetBrains Mono", "SF Mono", Menlo, Consolas, monospace', sans: '-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif', } as const; export const MeshInvitation = ({ meshName, inviteUrl, token, expiresAt, appBaseUrl, }: MeshInvitationProps) => { const expiresLabel = new Date(expiresAt).toUTCString(); const launchCmd = `claudemesh launch --join ${inviteUrl}`; const oneLiner = `npm i -g claudemesh-cli && ${launchCmd}`; return ( You've been invited to the {meshName} mesh on claudemesh {/* Header — mesh glyph + wordmark */}
claudemesh
{/* Eyebrow */} — you're invited {/* Heading */} Join{" "} {meshName} {" "} on claudemesh {/* Body prose */} claudemesh is a peer mesh for Claude Code sessions — end-to-end encrypted, keys stay on your machine. Open the link below to see the mesh, the inviter, and the command to join. {/* Primary CTA */}
{/* Terminal shortcut — for the already-set-up crowd */} — already have the CLI?
{launchCmd}
{/* First-time one-liner */} — first time? one command
{oneLiner} Requires Node.js 20+. Display name defaults to $USER.

{/* Footer meta */} Expires{" "} {expiresLabel}. If you weren't expecting this, you can ignore it. claudemesh.com
); }; MeshInvitation.PreviewProps = { meshName: "prueba1", inviteUrl: "https://claudemesh.com/i/RUVMYXZQ", token: "eyJ2IjoxLCJtZXNoX2lkIjoiQUtMYUZxR3FKOGZCajN0U3dvVk1PSFYxQmF3UGlYTE8iLCJtZXNoX3NsdWciOiJwcnVlYmExIn0", expiresAt: "2026-04-22T00:51:26.181Z", appBaseUrl: "https://claudemesh.com", } satisfies MeshInvitationProps; export default MeshInvitation;