generation-modes-diagram.tsx 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. "use client";
  2. function ScheduleItem({
  3. time,
  4. label,
  5. color,
  6. }: {
  7. time: string;
  8. label: string;
  9. color: string;
  10. }) {
  11. return (
  12. <div className="flex items-center gap-2 py-1.5 border-t border-border/50 first:border-t-0">
  13. <span className="text-[10px] text-muted-foreground/60 w-12 shrink-0 tabular-nums">
  14. {time}
  15. </span>
  16. <span
  17. className="w-1.5 h-1.5 rounded-full shrink-0"
  18. style={{ background: color }}
  19. />
  20. <span className="text-[11px] text-muted-foreground">{label}</span>
  21. </div>
  22. );
  23. }
  24. function InlineModeDiagram() {
  25. return (
  26. <div className="flex flex-col h-full">
  27. <div className="text-sm font-medium text-foreground text-center mb-3">
  28. Inline Mode
  29. </div>
  30. <div className="flex-1 border border-border rounded-2xl bg-background overflow-hidden flex flex-col">
  31. <div className="flex-1 p-4 space-y-3 overflow-hidden">
  32. {/* User message */}
  33. <div className="flex justify-end">
  34. <div className="bg-muted-foreground/20 rounded-2xl rounded-br px-3.5 py-2 max-w-[85%]">
  35. <span className="text-[11px] text-foreground/80">
  36. I have back-to-back meetings today
  37. </span>
  38. </div>
  39. </div>
  40. {/* AI response */}
  41. <div className="space-y-2">
  42. <p className="text-[11px] text-muted-foreground/70">
  43. Packed day! Here&apos;s what you&apos;ve got:
  44. </p>
  45. <div className="bg-muted/40 border border-border rounded-xl p-3 w-[92%]">
  46. <div className="text-[11px] font-semibold text-foreground/80 mb-2">
  47. Today&apos;s Schedule
  48. </div>
  49. <ScheduleItem
  50. time="10:00 AM"
  51. label="Design Review"
  52. color="#7aa2f7"
  53. />
  54. <ScheduleItem
  55. time="1:00 PM"
  56. label="Sprint Planning"
  57. color="#bb9af7"
  58. />
  59. <ScheduleItem
  60. time="3:30 PM"
  61. label="Team Standup"
  62. color="#9ece6a"
  63. />
  64. <ScheduleItem
  65. time="4:30 PM"
  66. label="Eng All-Hands"
  67. color="#e0af68"
  68. />
  69. </div>
  70. </div>
  71. </div>
  72. {/* Prompt input */}
  73. <div className="p-2.5">
  74. <div className="bg-muted/50 border border-border rounded-xl px-2.5 py-1.5 flex items-center gap-1.5">
  75. <span className="text-[10px] text-muted-foreground/40 flex-1">
  76. Message...
  77. </span>
  78. <div className="w-5 h-5 rounded-md bg-muted-foreground/20 flex items-center justify-center">
  79. <svg
  80. className="w-2.5 h-2.5 text-muted-foreground/50"
  81. viewBox="0 0 24 24"
  82. fill="currentColor"
  83. >
  84. <path
  85. d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"
  86. transform="rotate(-90 12 12)"
  87. />
  88. </svg>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. <div className="mt-3 flex flex-col items-center gap-2">
  94. <div className="text-xs font-medium text-muted-foreground">
  95. AI decides when UI beats text
  96. </div>
  97. <div className="flex items-center gap-1.5 text-[10px] text-muted-foreground/50">
  98. <span>AI chatbots</span>
  99. <span className="text-muted-foreground/30">/</span>
  100. <span>Copilots</span>
  101. <span className="text-muted-foreground/30">/</span>
  102. <span>Assistants</span>
  103. </div>
  104. </div>
  105. </div>
  106. );
  107. }
  108. function LandingPage() {
  109. return (
  110. <div className="w-full h-full flex flex-col bg-muted/20">
  111. {/* Nav */}
  112. <div className="flex items-center justify-between px-3 py-2 border-b border-border/50">
  113. <svg
  114. width="12"
  115. height="12"
  116. viewBox="0 0 24 24"
  117. fill="none"
  118. className="shrink-0"
  119. >
  120. <rect
  121. x="2"
  122. y="14"
  123. width="5"
  124. height="8"
  125. rx="1"
  126. className="fill-muted-foreground/60"
  127. />
  128. <rect
  129. x="9.5"
  130. y="8"
  131. width="5"
  132. height="14"
  133. rx="1"
  134. className="fill-muted-foreground/60"
  135. />
  136. <rect
  137. x="17"
  138. y="2"
  139. width="5"
  140. height="20"
  141. rx="1"
  142. className="fill-muted-foreground/60"
  143. />
  144. </svg>
  145. <div className="flex items-center gap-2">
  146. <span className="text-[9px] text-muted-foreground/50">Pricing</span>
  147. <span className="text-[9px] text-muted-foreground/50">Blog</span>
  148. <span className="text-[8px] font-semibold bg-foreground text-background rounded-md px-1.5 py-0.5 whitespace-nowrap">
  149. Get Started
  150. </span>
  151. </div>
  152. </div>
  153. {/* Hero */}
  154. <div className="flex-1 flex flex-col items-center justify-center gap-2.5 text-center px-4">
  155. <span className="text-[8px] font-medium text-green-400 bg-green-400/10 border border-green-400/15 rounded-full px-2 py-0.5">
  156. Trusted by 2,000+ teams
  157. </span>
  158. <div className="text-sm font-bold text-foreground leading-tight">
  159. Analytics that
  160. <br />
  161. move the needle
  162. </div>
  163. <div className="text-[10px] text-muted-foreground/50 leading-relaxed">
  164. Ship what matters. No setup required.
  165. </div>
  166. <div className="flex gap-1.5 mt-1">
  167. <button className="bg-foreground text-background text-[9px] font-semibold rounded-lg px-3 py-1.5 whitespace-nowrap">
  168. Start Free
  169. </button>
  170. <button className="border border-border text-muted-foreground text-[9px] font-medium rounded-lg px-3 py-1.5 whitespace-nowrap">
  171. Book Demo
  172. </button>
  173. </div>
  174. </div>
  175. {/* Footer */}
  176. <div className="flex justify-center gap-3 py-2 border-t border-border/50">
  177. <span className="text-[8px] text-muted-foreground/30">Privacy</span>
  178. <span className="text-[8px] text-muted-foreground/30">Terms</span>
  179. <span className="text-[8px] text-muted-foreground/30">Status</span>
  180. </div>
  181. </div>
  182. );
  183. }
  184. function StandaloneModeDiagram() {
  185. return (
  186. <div className="flex flex-col h-full">
  187. <div className="text-sm font-medium text-foreground text-center mb-3">
  188. Standalone Mode
  189. </div>
  190. <div className="flex-1 border border-border rounded-2xl bg-background overflow-hidden flex flex-row">
  191. {/* Left panel - conversation */}
  192. <div className="w-[38%] border-r border-border/50 flex flex-col">
  193. <div className="flex-1 p-3 space-y-2.5">
  194. {/* User message */}
  195. <div className="flex justify-end">
  196. <div className="bg-muted-foreground/20 rounded-2xl rounded-br px-2.5 py-1.5">
  197. <span className="text-[10px] text-foreground/80 block leading-relaxed">
  198. A landing page for my analytics startup
  199. </span>
  200. </div>
  201. </div>
  202. {/* AI text */}
  203. <p className="text-[10px] text-muted-foreground/60 leading-relaxed">
  204. Here&apos;s a clean landing page with a hero, nav, and CTAs.
  205. </p>
  206. </div>
  207. {/* Prompt input */}
  208. <div className="p-2.5">
  209. <div className="bg-muted/50 border border-border rounded-xl px-2.5 py-1.5 flex items-center gap-1.5">
  210. <span className="text-[10px] text-muted-foreground/40 flex-1">
  211. Message...
  212. </span>
  213. <div className="w-5 h-5 rounded-md bg-muted-foreground/20 flex items-center justify-center">
  214. <svg
  215. className="w-2.5 h-2.5 text-muted-foreground/50"
  216. viewBox="0 0 24 24"
  217. fill="currentColor"
  218. >
  219. <path
  220. d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"
  221. transform="rotate(-90 12 12)"
  222. />
  223. </svg>
  224. </div>
  225. </div>
  226. </div>
  227. </div>
  228. {/* Right panel - landing page */}
  229. <div className="flex-1">
  230. <LandingPage />
  231. </div>
  232. </div>
  233. <div className="mt-3 flex flex-col items-center gap-2">
  234. <div className="text-xs font-medium text-muted-foreground">
  235. Prompt in, UI out
  236. </div>
  237. <div className="flex items-center gap-1.5 text-[10px] text-muted-foreground/50">
  238. <span>Website builders</span>
  239. <span className="text-muted-foreground/30">/</span>
  240. <span>Text-to-widget</span>
  241. <span className="text-muted-foreground/30">/</span>
  242. <span>Dashboards</span>
  243. </div>
  244. </div>
  245. </div>
  246. );
  247. }
  248. export function GenerationModesDiagram() {
  249. return (
  250. <div className="not-prose my-8">
  251. <div className="grid grid-cols-1 sm:grid-cols-2 gap-6">
  252. <div className="h-[420px]">
  253. <InlineModeDiagram />
  254. </div>
  255. <div className="h-[420px]">
  256. <StandaloneModeDiagram />
  257. </div>
  258. </div>
  259. </div>
  260. );
  261. }