@contractspec/bundle.marketing 1.12.0 → 1.14.0

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 (262) hide show
  1. package/.turbo/turbo-build.log +146 -175
  2. package/.turbo/turbo-prebuild.log +1 -0
  3. package/CHANGELOG.md +57 -0
  4. package/dist/browser/components/marketing/ChangelogPage.js +92 -0
  5. package/dist/browser/components/marketing/CofounderPage.js +581 -0
  6. package/dist/browser/components/marketing/ContactClient.js +1379 -0
  7. package/dist/browser/components/marketing/ContributePage.js +487 -0
  8. package/dist/browser/components/marketing/DesignPartnerPage.js +272 -0
  9. package/dist/browser/components/marketing/LandingPage.js +629 -0
  10. package/dist/browser/components/marketing/PricingClient.js +1972 -0
  11. package/dist/browser/components/marketing/ProductClientPage.js +563 -0
  12. package/dist/browser/components/marketing/index.js +4818 -0
  13. package/dist/browser/components/marketing/pricing-thinking-modal.js +258 -0
  14. package/dist/browser/components/marketing/sections/AudienceSection.js +90 -0
  15. package/dist/browser/components/marketing/sections/CorePositioningSection.js +72 -0
  16. package/dist/browser/components/marketing/sections/CtaSection.js +67 -0
  17. package/dist/browser/components/marketing/sections/DevelopersSection.js +50 -0
  18. package/dist/browser/components/marketing/sections/FearsSection.js +105 -0
  19. package/dist/browser/components/marketing/sections/HeroMarketingSection.js +93 -0
  20. package/dist/browser/components/marketing/sections/IconGridSection.js +63 -0
  21. package/dist/browser/components/marketing/sections/OutputsSection.js +116 -0
  22. package/dist/browser/components/marketing/sections/ProblemSection.js +103 -0
  23. package/dist/browser/components/marketing/sections/SolutionSection.js +103 -0
  24. package/dist/browser/components/marketing/sections/StepsSection.js +109 -0
  25. package/dist/browser/components/marketing/waitlist-section.js +1104 -0
  26. package/dist/browser/components/templates/TemplatesClientPage.js +5662 -0
  27. package/dist/browser/components/templates/TemplatesPage.js +177 -0
  28. package/dist/browser/components/templates/TemplatesPreviewModal.js +124 -0
  29. package/dist/browser/components/templates/index.js +5831 -0
  30. package/dist/browser/index.js +6485 -0
  31. package/dist/browser/libs/email/client.js +122 -0
  32. package/dist/browser/libs/email/contact.js +190 -0
  33. package/dist/browser/libs/email/newsletter.js +215 -0
  34. package/dist/browser/libs/email/types.js +2 -0
  35. package/dist/browser/libs/email/utils.js +16 -0
  36. package/dist/browser/libs/email/waitlist-application.js +295 -0
  37. package/dist/browser/libs/email/waitlist.js +225 -0
  38. package/dist/browser/libs/pricing-examples.js +26 -0
  39. package/dist/browser/registry/engine.js +5293 -0
  40. package/dist/browser/registry/factory.js +52 -0
  41. package/dist/browser/registry/index.js +5358 -0
  42. package/dist/browser/registry/registry-docs.js +343 -0
  43. package/dist/browser/registry/registry-landing.js +4937 -0
  44. package/dist/browser/registry/registry.js +5279 -0
  45. package/dist/browser/registry/types.js +0 -0
  46. package/dist/browser/registry/utils.js +5340 -0
  47. package/dist/components/marketing/ChangelogPage.d.ts +11 -17
  48. package/dist/components/marketing/ChangelogPage.d.ts.map +1 -1
  49. package/dist/components/marketing/ChangelogPage.js +84 -62
  50. package/dist/components/marketing/CofounderPage.d.ts +1 -6
  51. package/dist/components/marketing/CofounderPage.d.ts.map +1 -1
  52. package/dist/components/marketing/CofounderPage.js +544 -436
  53. package/dist/components/marketing/ContactClient.d.ts +1 -6
  54. package/dist/components/marketing/ContactClient.d.ts.map +1 -1
  55. package/dist/components/marketing/ContactClient.js +1371 -155
  56. package/dist/components/marketing/ContributePage.d.ts +3 -8
  57. package/dist/components/marketing/ContributePage.d.ts.map +1 -1
  58. package/dist/components/marketing/ContributePage.js +478 -358
  59. package/dist/components/marketing/DesignPartnerPage.d.ts +3 -8
  60. package/dist/components/marketing/DesignPartnerPage.d.ts.map +1 -1
  61. package/dist/components/marketing/DesignPartnerPage.js +263 -211
  62. package/dist/components/marketing/LandingPage.d.ts +1 -6
  63. package/dist/components/marketing/LandingPage.d.ts.map +1 -1
  64. package/dist/components/marketing/LandingPage.js +623 -37
  65. package/dist/components/marketing/PricingClient.d.ts +1 -6
  66. package/dist/components/marketing/PricingClient.d.ts.map +1 -1
  67. package/dist/components/marketing/PricingClient.js +1962 -516
  68. package/dist/components/marketing/ProductClientPage.d.ts +1 -6
  69. package/dist/components/marketing/ProductClientPage.d.ts.map +1 -1
  70. package/dist/components/marketing/ProductClientPage.js +556 -458
  71. package/dist/components/marketing/index.d.ts +11 -11
  72. package/dist/components/marketing/index.d.ts.map +1 -0
  73. package/dist/components/marketing/index.js +4813 -12
  74. package/dist/components/marketing/pricing-thinking-modal.d.ts +5 -13
  75. package/dist/components/marketing/pricing-thinking-modal.d.ts.map +1 -1
  76. package/dist/components/marketing/pricing-thinking-modal.js +248 -197
  77. package/dist/components/marketing/sections/AudienceSection.d.ts +1 -6
  78. package/dist/components/marketing/sections/AudienceSection.d.ts.map +1 -1
  79. package/dist/components/marketing/sections/AudienceSection.js +80 -63
  80. package/dist/components/marketing/sections/CorePositioningSection.d.ts +1 -6
  81. package/dist/components/marketing/sections/CorePositioningSection.d.ts.map +1 -1
  82. package/dist/components/marketing/sections/CorePositioningSection.js +62 -54
  83. package/dist/components/marketing/sections/CtaSection.d.ts +1 -6
  84. package/dist/components/marketing/sections/CtaSection.d.ts.map +1 -1
  85. package/dist/components/marketing/sections/CtaSection.js +58 -50
  86. package/dist/components/marketing/sections/DevelopersSection.d.ts +1 -6
  87. package/dist/components/marketing/sections/DevelopersSection.d.ts.map +1 -1
  88. package/dist/components/marketing/sections/DevelopersSection.js +40 -40
  89. package/dist/components/marketing/sections/FearsSection.d.ts +1 -6
  90. package/dist/components/marketing/sections/FearsSection.d.ts.map +1 -1
  91. package/dist/components/marketing/sections/FearsSection.js +96 -44
  92. package/dist/components/marketing/sections/HeroMarketingSection.d.ts +1 -6
  93. package/dist/components/marketing/sections/HeroMarketingSection.d.ts.map +1 -1
  94. package/dist/components/marketing/sections/HeroMarketingSection.js +82 -71
  95. package/dist/components/marketing/sections/IconGridSection.d.ts +25 -39
  96. package/dist/components/marketing/sections/IconGridSection.d.ts.map +1 -1
  97. package/dist/components/marketing/sections/IconGridSection.js +55 -41
  98. package/dist/components/marketing/sections/OutputsSection.d.ts +1 -6
  99. package/dist/components/marketing/sections/OutputsSection.d.ts.map +1 -1
  100. package/dist/components/marketing/sections/OutputsSection.js +107 -55
  101. package/dist/components/marketing/sections/ProblemSection.d.ts +1 -6
  102. package/dist/components/marketing/sections/ProblemSection.d.ts.map +1 -1
  103. package/dist/components/marketing/sections/ProblemSection.js +94 -42
  104. package/dist/components/marketing/sections/SolutionSection.d.ts +1 -6
  105. package/dist/components/marketing/sections/SolutionSection.d.ts.map +1 -1
  106. package/dist/components/marketing/sections/SolutionSection.js +94 -42
  107. package/dist/components/marketing/sections/StepsSection.d.ts +1 -6
  108. package/dist/components/marketing/sections/StepsSection.d.ts.map +1 -1
  109. package/dist/components/marketing/sections/StepsSection.js +100 -48
  110. package/dist/components/marketing/waitlist-section.d.ts +5 -12
  111. package/dist/components/marketing/waitlist-section.d.ts.map +1 -1
  112. package/dist/components/marketing/waitlist-section.js +1089 -568
  113. package/dist/components/templates/TemplatesClientPage.d.ts +1 -6
  114. package/dist/components/templates/TemplatesClientPage.d.ts.map +1 -1
  115. package/dist/components/templates/TemplatesClientPage.js +5649 -617
  116. package/dist/components/templates/TemplatesPage.d.ts +1 -6
  117. package/dist/components/templates/TemplatesPage.d.ts.map +1 -1
  118. package/dist/components/templates/TemplatesPage.js +163 -116
  119. package/dist/components/templates/TemplatesPreviewModal.d.ts +5 -12
  120. package/dist/components/templates/TemplatesPreviewModal.d.ts.map +1 -1
  121. package/dist/components/templates/TemplatesPreviewModal.js +113 -131
  122. package/dist/components/templates/index.d.ts +4 -4
  123. package/dist/components/templates/index.d.ts.map +1 -0
  124. package/dist/components/templates/index.js +5825 -4
  125. package/dist/index.d.ts +9 -29
  126. package/dist/index.d.ts.map +1 -0
  127. package/dist/index.js +6480 -28
  128. package/dist/libs/email/client.d.ts +9 -12
  129. package/dist/libs/email/client.d.ts.map +1 -1
  130. package/dist/libs/email/client.js +109 -105
  131. package/dist/libs/email/client.test.d.ts +2 -0
  132. package/dist/libs/email/client.test.d.ts.map +1 -0
  133. package/dist/libs/email/contact.d.ts +2 -6
  134. package/dist/libs/email/contact.d.ts.map +1 -1
  135. package/dist/libs/email/contact.js +155 -41
  136. package/dist/libs/email/newsletter.d.ts +2 -6
  137. package/dist/libs/email/newsletter.d.ts.map +1 -1
  138. package/dist/libs/email/newsletter.js +169 -54
  139. package/dist/libs/email/types.d.ts +48 -52
  140. package/dist/libs/email/types.d.ts.map +1 -1
  141. package/dist/libs/email/types.js +3 -1
  142. package/dist/libs/email/utils.d.ts +2 -5
  143. package/dist/libs/email/utils.d.ts.map +1 -1
  144. package/dist/libs/email/utils.js +10 -6
  145. package/dist/libs/email/waitlist-application.d.ts +2 -6
  146. package/dist/libs/email/waitlist-application.d.ts.map +1 -1
  147. package/dist/libs/email/waitlist-application.js +191 -71
  148. package/dist/libs/email/waitlist.d.ts +2 -6
  149. package/dist/libs/email/waitlist.d.ts.map +1 -1
  150. package/dist/libs/email/waitlist.js +171 -56
  151. package/dist/libs/pricing-examples.d.ts +13 -16
  152. package/dist/libs/pricing-examples.d.ts.map +1 -1
  153. package/dist/libs/pricing-examples.js +20 -20
  154. package/dist/node/components/marketing/ChangelogPage.js +87 -0
  155. package/dist/node/components/marketing/CofounderPage.js +576 -0
  156. package/dist/node/components/marketing/ContactClient.js +1374 -0
  157. package/dist/node/components/marketing/ContributePage.js +482 -0
  158. package/dist/node/components/marketing/DesignPartnerPage.js +267 -0
  159. package/dist/node/components/marketing/LandingPage.js +624 -0
  160. package/dist/node/components/marketing/PricingClient.js +1967 -0
  161. package/dist/node/components/marketing/ProductClientPage.js +558 -0
  162. package/dist/node/components/marketing/index.js +4813 -0
  163. package/dist/node/components/marketing/pricing-thinking-modal.js +253 -0
  164. package/dist/node/components/marketing/sections/AudienceSection.js +85 -0
  165. package/dist/node/components/marketing/sections/CorePositioningSection.js +67 -0
  166. package/dist/node/components/marketing/sections/CtaSection.js +62 -0
  167. package/dist/node/components/marketing/sections/DevelopersSection.js +45 -0
  168. package/dist/node/components/marketing/sections/FearsSection.js +100 -0
  169. package/dist/node/components/marketing/sections/HeroMarketingSection.js +88 -0
  170. package/dist/node/components/marketing/sections/IconGridSection.js +58 -0
  171. package/dist/node/components/marketing/sections/OutputsSection.js +111 -0
  172. package/dist/node/components/marketing/sections/ProblemSection.js +98 -0
  173. package/dist/node/components/marketing/sections/SolutionSection.js +98 -0
  174. package/dist/node/components/marketing/sections/StepsSection.js +104 -0
  175. package/dist/node/components/marketing/waitlist-section.js +1099 -0
  176. package/dist/node/components/templates/TemplatesClientPage.js +5657 -0
  177. package/dist/node/components/templates/TemplatesPage.js +172 -0
  178. package/dist/node/components/templates/TemplatesPreviewModal.js +119 -0
  179. package/dist/node/components/templates/index.js +5826 -0
  180. package/dist/node/index.js +6480 -0
  181. package/dist/node/libs/email/client.js +117 -0
  182. package/dist/node/libs/email/contact.js +185 -0
  183. package/dist/node/libs/email/newsletter.js +210 -0
  184. package/dist/node/libs/email/types.js +2 -0
  185. package/dist/node/libs/email/utils.js +11 -0
  186. package/dist/node/libs/email/waitlist-application.js +290 -0
  187. package/dist/node/libs/email/waitlist.js +220 -0
  188. package/dist/node/libs/pricing-examples.js +21 -0
  189. package/dist/node/registry/engine.js +5288 -0
  190. package/dist/node/registry/factory.js +47 -0
  191. package/dist/node/registry/index.js +5353 -0
  192. package/dist/node/registry/registry-docs.js +338 -0
  193. package/dist/node/registry/registry-landing.js +4932 -0
  194. package/dist/node/registry/registry.js +5274 -0
  195. package/dist/node/registry/types.js +0 -0
  196. package/dist/node/registry/utils.js +5335 -0
  197. package/dist/registry/engine.d.ts +4 -8
  198. package/dist/registry/engine.d.ts.map +1 -1
  199. package/dist/registry/engine.js +5287 -23
  200. package/dist/registry/factory.d.ts +30 -34
  201. package/dist/registry/factory.d.ts.map +1 -1
  202. package/dist/registry/factory.js +42 -56
  203. package/dist/registry/index.d.ts +8 -8
  204. package/dist/registry/index.d.ts.map +1 -0
  205. package/dist/registry/index.js +5353 -8
  206. package/dist/registry/registry-docs.d.ts +4 -8
  207. package/dist/registry/registry-docs.d.ts.map +1 -1
  208. package/dist/registry/registry-docs.js +242 -209
  209. package/dist/registry/registry-landing.d.ts +5 -9
  210. package/dist/registry/registry-landing.d.ts.map +1 -1
  211. package/dist/registry/registry-landing.js +4930 -93
  212. package/dist/registry/registry.d.ts +7 -11
  213. package/dist/registry/registry.d.ts.map +1 -1
  214. package/dist/registry/registry.js +5262 -49
  215. package/dist/registry/types.d.ts +6 -10
  216. package/dist/registry/types.d.ts.map +1 -1
  217. package/dist/registry/types.js +1 -0
  218. package/dist/registry/utils.d.ts +10 -14
  219. package/dist/registry/utils.d.ts.map +1 -1
  220. package/dist/registry/utils.js +5330 -49
  221. package/package.json +355 -73
  222. package/tsdown.config.js +1 -2
  223. package/.turbo/turbo-build$colon$types.log +0 -1
  224. package/.turbo/turbo-lint.log +0 -3
  225. package/dist/components/marketing/ChangelogPage.js.map +0 -1
  226. package/dist/components/marketing/CofounderPage.js.map +0 -1
  227. package/dist/components/marketing/ContactClient.js.map +0 -1
  228. package/dist/components/marketing/ContributePage.js.map +0 -1
  229. package/dist/components/marketing/DesignPartnerPage.js.map +0 -1
  230. package/dist/components/marketing/LandingPage.js.map +0 -1
  231. package/dist/components/marketing/PricingClient.js.map +0 -1
  232. package/dist/components/marketing/ProductClientPage.js.map +0 -1
  233. package/dist/components/marketing/pricing-thinking-modal.js.map +0 -1
  234. package/dist/components/marketing/sections/AudienceSection.js.map +0 -1
  235. package/dist/components/marketing/sections/CorePositioningSection.js.map +0 -1
  236. package/dist/components/marketing/sections/CtaSection.js.map +0 -1
  237. package/dist/components/marketing/sections/DevelopersSection.js.map +0 -1
  238. package/dist/components/marketing/sections/FearsSection.js.map +0 -1
  239. package/dist/components/marketing/sections/HeroMarketingSection.js.map +0 -1
  240. package/dist/components/marketing/sections/IconGridSection.js.map +0 -1
  241. package/dist/components/marketing/sections/OutputsSection.js.map +0 -1
  242. package/dist/components/marketing/sections/ProblemSection.js.map +0 -1
  243. package/dist/components/marketing/sections/SolutionSection.js.map +0 -1
  244. package/dist/components/marketing/sections/StepsSection.js.map +0 -1
  245. package/dist/components/marketing/waitlist-section.js.map +0 -1
  246. package/dist/components/templates/TemplatesClientPage.js.map +0 -1
  247. package/dist/components/templates/TemplatesPage.js.map +0 -1
  248. package/dist/components/templates/TemplatesPreviewModal.js.map +0 -1
  249. package/dist/libs/email/client.js.map +0 -1
  250. package/dist/libs/email/contact.js.map +0 -1
  251. package/dist/libs/email/newsletter.js.map +0 -1
  252. package/dist/libs/email/utils.js.map +0 -1
  253. package/dist/libs/email/waitlist-application.js.map +0 -1
  254. package/dist/libs/email/waitlist.js.map +0 -1
  255. package/dist/libs/pricing-examples.js.map +0 -1
  256. package/dist/registry/engine.js.map +0 -1
  257. package/dist/registry/factory.js.map +0 -1
  258. package/dist/registry/registry-docs.js.map +0 -1
  259. package/dist/registry/registry-landing.js.map +0 -1
  260. package/dist/registry/registry.js.map +0 -1
  261. package/dist/registry/utils.js.map +0 -1
  262. package/tsconfig.tsbuildinfo +0 -1
@@ -0,0 +1,1379 @@
1
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
2
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
3
+ }) : x)(function(x) {
4
+ if (typeof require !== "undefined")
5
+ return require.apply(this, arguments);
6
+ throw Error('Dynamic require of "' + x + '" is not supported');
7
+ });
8
+
9
+ // src/libs/email/client.ts
10
+ import { createClient, Temv1alpha1 } from "@scaleway/sdk";
11
+ import { Logger } from "@contractspec/lib.logger";
12
+ var DEFAULT_FROM = {
13
+ email: "noreply@transactional.contractspec.io",
14
+ name: "ContractSpec"
15
+ };
16
+ var DEFAULT_TEAM_INBOX = {
17
+ email: "contact@contractspec.io",
18
+ name: "ContractSpec Team"
19
+ };
20
+ var DEFAULT_REGION = "fr-par";
21
+ var cachedConfig = null;
22
+ var cachedClient = null;
23
+ var apiFactory = (client) => new Temv1alpha1.API(client);
24
+ var mapRegion = (value) => {
25
+ const normalized = value?.trim().toLowerCase();
26
+ if (normalized === "par" || normalized === "fr-par")
27
+ return "fr-par";
28
+ if (normalized === "ams" || normalized === "nl-ams")
29
+ return "nl-ams";
30
+ if (normalized === "waw" || normalized === "pl-waw")
31
+ return "pl-waw";
32
+ return DEFAULT_REGION;
33
+ };
34
+ var getEmailConfig = () => {
35
+ if (cachedConfig) {
36
+ return { ok: true, config: cachedConfig };
37
+ }
38
+ const accessKey = process.env.SCALEWAY_ACCESS_KEY || process.env.SCALEWAY_ACCESS_KEY_QUEUE;
39
+ const secretKey = process.env.SCALEWAY_SECRET_KEY || process.env.SCALEWAY_SECRET_KEY_QUEUE;
40
+ const projectId = process.env.SCALEWAY_PROJECT_ID;
41
+ if (!accessKey || !secretKey || !projectId) {
42
+ return {
43
+ ok: false,
44
+ errorMessage: "Email service is not configured. Please contact us directly at contact@contractspec.io."
45
+ };
46
+ }
47
+ const region = mapRegion(process.env.SCALEWAY_REGION);
48
+ cachedConfig = {
49
+ accessKey,
50
+ secretKey,
51
+ projectId,
52
+ region,
53
+ defaultZone: `${region}-1`,
54
+ from: {
55
+ email: process.env.SCALEWAY_EMAIL_FROM_EMAIL ?? DEFAULT_FROM.email,
56
+ name: process.env.SCALEWAY_EMAIL_FROM_NAME ?? DEFAULT_FROM.name
57
+ },
58
+ teamInbox: {
59
+ email: process.env.SCALEWAY_EMAIL_TEAM_EMAIL ?? DEFAULT_TEAM_INBOX.email,
60
+ name: process.env.SCALEWAY_EMAIL_TEAM_NAME ?? DEFAULT_TEAM_INBOX.name
61
+ }
62
+ };
63
+ return { ok: true, config: cachedConfig };
64
+ };
65
+ var getTemClient = (config) => {
66
+ if (cachedClient) {
67
+ return cachedClient;
68
+ }
69
+ const client = createClient({
70
+ accessKey: config.accessKey,
71
+ secretKey: config.secretKey,
72
+ defaultProjectId: config.projectId,
73
+ defaultRegion: config.region,
74
+ defaultZone: config.defaultZone
75
+ });
76
+ cachedClient = apiFactory(client);
77
+ return cachedClient;
78
+ };
79
+ var sendEmail = async (config, request) => {
80
+ try {
81
+ const client = getTemClient(config);
82
+ await client.createEmail({
83
+ region: config.region,
84
+ projectId: config.projectId,
85
+ from: config.from,
86
+ to: request.to,
87
+ subject: request.subject,
88
+ text: request.text,
89
+ html: request.html || request.text,
90
+ additionalHeaders: request.replyTo ? [{ key: "Reply-To", value: request.replyTo }] : undefined
91
+ });
92
+ return { success: true };
93
+ } catch (error) {
94
+ new Logger().error("scaleway_tem_email_send_failed", {
95
+ context: request.context ?? "email",
96
+ error: error instanceof Error ? error.message : error
97
+ });
98
+ return {
99
+ success: false,
100
+ error,
101
+ errorMessage: "Failed to send email via Scaleway."
102
+ };
103
+ }
104
+ };
105
+ var __internal = {
106
+ resetCaches() {
107
+ cachedClient = null;
108
+ cachedConfig = null;
109
+ apiFactory = (client) => new Temv1alpha1.API(client);
110
+ },
111
+ setApiFactory(factory) {
112
+ apiFactory = factory;
113
+ },
114
+ setClient(client) {
115
+ cachedClient = client;
116
+ }
117
+ };
118
+
119
+ // src/libs/email/utils.ts
120
+ var escapeHtml = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;");
121
+ var formatMultilineHtml = (value) => escapeHtml(value).replaceAll(`
122
+ `, "<br />");
123
+
124
+ // src/libs/email/contact.ts
125
+ "use server";
126
+ var CONTACT_MISSING_CONFIG = "Email service is not configured. Please contact us directly at contact@contractspec.io.";
127
+ var CONTACT_SEND_ERROR = "Failed to send message. Please contact us directly at contact@contractspec.io.";
128
+ var submitContactForm = async (formData) => {
129
+ const name = (formData.get("name") ?? "").toString().trim();
130
+ const email = (formData.get("email") ?? "").toString().trim();
131
+ const message = (formData.get("message") ?? "").toString().trim();
132
+ if (!email) {
133
+ return {
134
+ success: false,
135
+ text: "Please fill in all required fields."
136
+ };
137
+ }
138
+ const configResult = getEmailConfig();
139
+ if (!configResult.ok || !configResult.config) {
140
+ return {
141
+ success: false,
142
+ text: configResult.errorMessage ?? CONTACT_MISSING_CONFIG
143
+ };
144
+ }
145
+ const senderName = name || email;
146
+ const emailContentText = `
147
+ New contact form submission from ${senderName}
148
+
149
+ Contact Information:
150
+ - Name: ${name || "Not provided"}
151
+ - Email: ${email}
152
+
153
+ Message:
154
+ ${message || "No message provided"}
155
+
156
+ ---
157
+ Submitted via ContractSpec contact form
158
+ `.trim();
159
+ const emailContentHtml = `
160
+ <div style="font-family: sans-serif; max-width: 640px; margin: 0 auto;">
161
+ <h1 style="color: #8b5cf6; margin-bottom: 12px;">New contact form submission</h1>
162
+ <p style="margin: 0 0 12px;">From ${escapeHtml(senderName)}</p>
163
+ <h2 style="color: #8b5cf6; margin: 16px 0 8px;">Contact Information</h2>
164
+ <ul style="padding-left: 16px; line-height: 1.6; margin: 0 0 16px;">
165
+ <li>Name: ${escapeHtml(name || "Not provided")}</li>
166
+ <li>Email: ${escapeHtml(email)}</li>
167
+ </ul>
168
+ <h2 style="color: #8b5cf6; margin: 16px 0 8px;">Message</h2>
169
+ <div style="border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px; background: #f9fafb; white-space: pre-wrap; line-height: 1.6;">
170
+ ${message ? formatMultilineHtml(message) : "No message provided"}
171
+ </div>
172
+ <p style="color: #6b7280; font-size: 12px; margin-top: 20px;">Submitted via ContractSpec contact form</p>
173
+ </div>
174
+ `;
175
+ const sendResult = await sendEmail(configResult.config, {
176
+ to: [configResult.config.teamInbox],
177
+ subject: `New Contact Form Message from ${senderName}`,
178
+ text: emailContentText,
179
+ html: emailContentHtml,
180
+ replyTo: email,
181
+ context: "contact-form"
182
+ });
183
+ if (!sendResult.success) {
184
+ return { success: false, text: CONTACT_SEND_ERROR };
185
+ }
186
+ return { success: true, text: "Message sent successfully!" };
187
+ };
188
+
189
+ // src/libs/email/waitlist.ts
190
+ "use server";
191
+ var WAITLIST_MISSING_CONFIG = "Waitlist service is not configured. Please try again later.";
192
+ var WAITLIST_SEND_ERROR = "Failed to join waitlist. Please try again later or contact us directly.";
193
+ var joinWaitlist = async (formData) => {
194
+ const email = (formData.get("email") ?? "").toString().trim();
195
+ if (!email || !email.includes("@")) {
196
+ return {
197
+ success: false,
198
+ text: "Please enter a valid email address."
199
+ };
200
+ }
201
+ const configResult = getEmailConfig();
202
+ if (!configResult.ok || !configResult.config) {
203
+ return {
204
+ success: false,
205
+ text: configResult.errorMessage ?? WAITLIST_MISSING_CONFIG
206
+ };
207
+ }
208
+ const waitlistText = `
209
+ You're on the waitlist!
210
+
211
+ Thanks for joining the ContractSpec waitlist. You're now in line for early access to:
212
+
213
+ • Stabilize your AI-generated code with ContractSpec
214
+ • Multi-surface consistency (API, DB, UI, events)
215
+ • Safe regeneration without breaking changes
216
+ • AI governance and contract enforcement
217
+
218
+ We'll notify you as soon as early access is available. In the meantime, you can:
219
+
220
+ • Check out our docs: https://contractspec.io/docs
221
+ • Follow our progress on GitHub
222
+ • Book a demo call to see ContractSpec in action
223
+
224
+ We're excited to have you on board!
225
+
226
+ ---
227
+ ContractSpec Team
228
+ https://contractspec.io
229
+
230
+ To remove yourself from the waitlist, reply to this email with "remove"
231
+ `.trim();
232
+ const waitlistHtml = `
233
+ <div style="font-family: sans-serif; max-width: 640px; margin: 0 auto;">
234
+ <h1 style="color: #8b5cf6;">You're on the waitlist!</h1>
235
+ <p>Thanks for joining the ContractSpec waitlist. You're now in line for early access to:</p>
236
+ <ul style="line-height: 1.8;">
237
+ <li>Stabilize your AI-generated code with ContractSpec</li>
238
+ <li>Multi-surface consistency (API, DB, UI, events)</li>
239
+ <li>Safe regeneration without breaking changes</li>
240
+ <li>AI governance and contract enforcement</li>
241
+ </ul>
242
+ <p>We'll notify you as soon as early access is available. In the meantime, you can:</p>
243
+ <ul style="line-height: 1.8;">
244
+ <li>Check out our <a href="https://contractspec.io/docs" style="color: #8b5cf6;">docs</a></li>
245
+ <li>Follow our progress on GitHub</li>
246
+ <li>Book a demo call to see ContractSpec in action</li>
247
+ </ul>
248
+ <p>We're excited to have you on board!</p>
249
+ <hr style="margin: 30px 0; border: none; border-top: 1px solid #e5e7eb;" />
250
+ <p style="color: #6b7280; font-size: 14px;">
251
+ ContractSpec Team<br />
252
+ <a href="https://contractspec.io" style="color: #8b5cf6;">contractspec.io</a>
253
+ </p>
254
+ <p style="color: #9ca3af; font-size: 12px;">
255
+ To remove yourself from the waitlist, reply to this email with "remove"
256
+ </p>
257
+ </div>
258
+ `;
259
+ const userSend = await sendEmail(configResult.config, {
260
+ to: [{ email }],
261
+ subject: "You're on the ContractSpec waitlist!",
262
+ text: waitlistText,
263
+ html: waitlistHtml,
264
+ context: "waitlist-welcome"
265
+ });
266
+ if (!userSend.success) {
267
+ return { success: false, text: WAITLIST_SEND_ERROR };
268
+ }
269
+ const teamNotificationText = `New waitlist signup from: ${email}`;
270
+ const teamNotificationHtml = `
271
+ <div style="font-family: sans-serif; max-width: 640px; margin: 0 auto;">
272
+ <p style="margin: 0 0 8px;">New waitlist signup</p>
273
+ <p style="margin: 0;"><strong>Email:</strong> ${formatMultilineHtml(email)}</p>
274
+ </div>
275
+ `;
276
+ const teamSend = await sendEmail(configResult.config, {
277
+ to: [configResult.config.teamInbox],
278
+ subject: `New Waitlist Signup: ${email}`,
279
+ text: teamNotificationText,
280
+ html: teamNotificationHtml,
281
+ context: "waitlist-team-notification"
282
+ });
283
+ if (!teamSend.success) {
284
+ return { success: false, text: WAITLIST_SEND_ERROR };
285
+ }
286
+ return { success: true, text: "Successfully joined waitlist!" };
287
+ };
288
+
289
+ // src/libs/email/waitlist-application.ts
290
+ "use server";
291
+ var APPLICATION_MISSING_CONFIG = "Waitlist application service is not configured. Please try again later.";
292
+ var APPLICATION_SEND_ERROR = "Failed to submit application. Please try again later or contact us directly.";
293
+ var submitWaitlistApplication = async (formData) => {
294
+ const email = (formData.get("email") ?? "").toString().trim();
295
+ const name = (formData.get("name") ?? "").toString().trim();
296
+ const company = (formData.get("company") ?? "").toString().trim();
297
+ const role = (formData.get("role") ?? "").toString().trim();
298
+ const useCase = (formData.get("useCase") ?? "").toString().trim();
299
+ const currentStack = (formData.get("currentStack") ?? "").toString().trim();
300
+ const whatBuilding = (formData.get("whatBuilding") ?? "").toString().trim();
301
+ const whatSolving = (formData.get("whatSolving") ?? "").toString().trim();
302
+ const teamSize = (formData.get("teamSize") ?? "").toString().trim();
303
+ const timeline = (formData.get("timeline") ?? "").toString().trim();
304
+ const openToSessions = formData.get("openToSessions") === "on";
305
+ const okayWithCaseStudies = formData.get("okayWithCaseStudies") === "on";
306
+ if (!email || !email.includes("@")) {
307
+ return {
308
+ success: false,
309
+ text: "Please enter a valid email address."
310
+ };
311
+ }
312
+ if (!name || !whatBuilding || !whatSolving) {
313
+ return {
314
+ success: false,
315
+ text: "Please fill in all required fields."
316
+ };
317
+ }
318
+ const configResult = getEmailConfig();
319
+ if (!configResult.ok || !configResult.config) {
320
+ return {
321
+ success: false,
322
+ text: configResult.errorMessage ?? APPLICATION_MISSING_CONFIG
323
+ };
324
+ }
325
+ const applicantText = `
326
+ You're on the list.
327
+
328
+ Thanks for applying to the ContractSpec design partner program. We're slowly onboarding design partners in waves. If your use case is a good fit, we'll reach out personally.
329
+
330
+ What happens next:
331
+ • We review applications weekly
332
+ • If selected, we'll reach out via email to schedule an intro call
333
+ • During early access, you'll get hands-on support and influence over the roadmap
334
+
335
+ In the meantime:
336
+ • Check out our docs: https://contractspec.io/docs
337
+ • Book a demo call: https://contractspec.io/contact
338
+
339
+ We're excited about the possibility of working together!
340
+
341
+ ---
342
+ ContractSpec Team
343
+ https://contractspec.io
344
+ `.trim();
345
+ const applicantHtml = `
346
+ <div style="font-family: sans-serif; max-width: 640px; margin: 0 auto;">
347
+ <h1 style="color: #8b5cf6;">You're on the list.</h1>
348
+ <p>Thanks for applying to the ContractSpec design partner program. We're slowly onboarding design partners in waves. If your use case is a good fit, we'll reach out personally.</p>
349
+ <h2 style="color: #8b5cf6; margin-top: 24px;">What happens next:</h2>
350
+ <ul style="line-height: 1.8;">
351
+ <li>We review applications weekly</li>
352
+ <li>If selected, we'll reach out via email to schedule an intro call</li>
353
+ <li>During early access, you'll get hands-on support and influence over the roadmap</li>
354
+ </ul>
355
+ <h2 style="color: #8b5cf6; margin-top: 24px;">In the meantime:</h2>
356
+ <ul style="line-height: 1.8;">
357
+ <li>Check out our <a href="https://contractspec.io/docs" style="color: #8b5cf6;">docs</a></li>
358
+ <li>Book a demo call: <a href="https://contractspec.io/contact" style="color: #8b5cf6;">contractspec.io/contact</a></li>
359
+ </ul>
360
+ <p>We're excited about the possibility of working together!</p>
361
+ <hr style="margin: 30px 0; border: none; border-top: 1px solid #e5e7eb;" />
362
+ <p style="color: #6b7280; font-size: 14px;">
363
+ ContractSpec Team<br />
364
+ <a href="https://contractspec.io" style="color: #8b5cf6;">contractspec.io</a>
365
+ </p>
366
+ </div>
367
+ `;
368
+ const applicantSend = await sendEmail(configResult.config, {
369
+ to: [{ email }],
370
+ subject: "You're on the ContractSpec design partner waitlist!",
371
+ text: applicantText,
372
+ html: applicantHtml,
373
+ context: "waitlist-application-welcome"
374
+ });
375
+ if (!applicantSend.success) {
376
+ return { success: false, text: APPLICATION_SEND_ERROR };
377
+ }
378
+ const preferencesText = `
379
+ Open to 1:1 product/design sessions: ${openToSessions ? "Yes" : "No"}
380
+ Okay with anonymized case studies: ${okayWithCaseStudies ? "Yes" : "No"}
381
+ `.trim();
382
+ const teamEmailText = `
383
+ New Design Partner Waitlist Application
384
+
385
+ Contact Information:
386
+ - Name: ${name}
387
+ - Email: ${email}
388
+ ${company ? `- Company/Project: ${company}` : ""}
389
+ ${role ? `- Role: ${role}` : ""}
390
+
391
+ Application Details:
392
+ - What are you building with AI today?
393
+ ${whatBuilding}
394
+
395
+ - What do you hope ContractSpec will solve for you?
396
+ ${whatSolving}
397
+
398
+ - Primary use case: ${useCase || "Not specified"}
399
+ - Current stack: ${currentStack || "Not specified"}
400
+ - Team Size: ${teamSize || "Not specified"}
401
+ - Timeline: ${timeline || "Not specified"}
402
+
403
+ Preferences:
404
+ - Open to 1:1 product/design sessions: ${openToSessions ? "Yes" : "No"}
405
+ - Okay with anonymized case studies: ${okayWithCaseStudies ? "Yes" : "No"}
406
+
407
+ ---
408
+ Submitted via ContractSpec waitlist application form
409
+ `.trim();
410
+ const teamEmailHtml = `
411
+ <div style="font-family: sans-serif; max-width: 720px; margin: 0 auto;">
412
+ <h1 style="color: #8b5cf6;">New Design Partner Waitlist Application</h1>
413
+ <h2 style="color: #8b5cf6; margin: 16px 0 8px;">Contact Information</h2>
414
+ <ul style="padding-left: 16px; line-height: 1.6; margin: 0 0 16px;">
415
+ <li>Name: ${escapeHtml(name)}</li>
416
+ <li>Email: ${escapeHtml(email)}</li>
417
+ ${company ? `<li>Company/Project: ${escapeHtml(company)}</li>` : ""}
418
+ ${role ? `<li>Role: ${escapeHtml(role)}</li>` : ""}
419
+ </ul>
420
+ <h2 style="color: #8b5cf6; margin: 16px 0 8px;">Application Details</h2>
421
+ <p style="margin: 0 0 8px; font-weight: 600;">What are you building with AI today?</p>
422
+ <div style="border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px; background: #f9fafb; white-space: pre-wrap; line-height: 1.6;">
423
+ ${formatMultilineHtml(whatBuilding)}
424
+ </div>
425
+ <p style="margin: 16px 0 8px; font-weight: 600;">What do you hope ContractSpec will solve for you?</p>
426
+ <div style="border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px; background: #f9fafb; white-space: pre-wrap; line-height: 1.6;">
427
+ ${formatMultilineHtml(whatSolving)}
428
+ </div>
429
+ <ul style="padding-left: 16px; line-height: 1.6; margin: 16px 0;">
430
+ <li>Primary use case: ${escapeHtml(useCase || "Not specified")}</li>
431
+ <li>Current stack: ${escapeHtml(currentStack || "Not specified")}</li>
432
+ <li>Team Size: ${escapeHtml(teamSize || "Not specified")}</li>
433
+ <li>Timeline: ${escapeHtml(timeline || "Not specified")}</li>
434
+ </ul>
435
+ <h2 style="color: #8b5cf6; margin: 16px 0 8px;">Preferences</h2>
436
+ <div style="border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px; background: #f9fafb; line-height: 1.6;">
437
+ ${formatMultilineHtml(preferencesText)}
438
+ </div>
439
+ <p style="color: #6b7280; font-size: 12px; margin-top: 20px;">Submitted via ContractSpec waitlist application form</p>
440
+ </div>
441
+ `;
442
+ const teamSend = await sendEmail(configResult.config, {
443
+ to: [configResult.config.teamInbox],
444
+ subject: `New Design Partner Application: ${name} (${email})`,
445
+ text: teamEmailText,
446
+ html: teamEmailHtml,
447
+ replyTo: email,
448
+ context: "waitlist-application-team-notification"
449
+ });
450
+ if (!teamSend.success) {
451
+ return { success: false, text: APPLICATION_SEND_ERROR };
452
+ }
453
+ return {
454
+ success: true,
455
+ text: "Application submitted successfully!"
456
+ };
457
+ };
458
+
459
+ // src/components/marketing/waitlist-section.tsx
460
+ import { useEffect, useState } from "react";
461
+ import { useForm } from "react-hook-form";
462
+ import { zodResolver } from "@hookform/resolvers/zod";
463
+ import z from "zod";
464
+ import { AlertCircle, CheckCircle } from "lucide-react";
465
+ import { Button } from "@contractspec/lib.design-system";
466
+ import { Textarea } from "@contractspec/lib.design-system";
467
+ import { Label } from "@contractspec/lib.ui-kit-web/ui/label";
468
+ import {
469
+ Select,
470
+ SelectContent,
471
+ SelectItem,
472
+ SelectTrigger,
473
+ SelectValue
474
+ } from "@contractspec/lib.ui-kit-web/ui/select";
475
+ import { Checkbox } from "@contractspec/lib.ui-kit-web/ui/checkbox";
476
+ import { Switch } from "@contractspec/lib.ui-kit-web/ui/switch";
477
+ import { Input } from "@contractspec/lib.design-system";
478
+ import { jsxDEV, Fragment } from "react/jsx-dev-runtime";
479
+ "use client";
480
+ var simpleWaitlistSchema = z.object({
481
+ email: z.email("Please enter a valid email address")
482
+ });
483
+ var designPartnerSchema = z.object({
484
+ name: z.string().min(1, "Name is required"),
485
+ email: z.email("Please enter a valid email address"),
486
+ company: z.string().optional(),
487
+ role: z.string().optional(),
488
+ useCase: z.string().optional(),
489
+ currentStack: z.string().optional(),
490
+ whatBuilding: z.string().min(1, "Please tell us what you are building"),
491
+ whatSolving: z.string().min(1, "Please tell us what ContractSpec will solve for you"),
492
+ teamSize: z.string().optional(),
493
+ timeline: z.string().optional(),
494
+ openToSessions: z.boolean().default(false),
495
+ okayWithCaseStudies: z.boolean().default(false)
496
+ });
497
+ function WaitlistSection({
498
+ variant = "default",
499
+ context = "pricing"
500
+ }) {
501
+ const [isDesignPartner, setIsDesignPartner] = useState(false);
502
+ const [submitResult, setSubmitResult] = useState(null);
503
+ const [isPending, setIsPending] = useState(false);
504
+ const simpleForm = useForm({
505
+ resolver: zodResolver(simpleWaitlistSchema),
506
+ defaultValues: {
507
+ email: ""
508
+ }
509
+ });
510
+ const designPartnerForm = useForm({
511
+ resolver: zodResolver(designPartnerSchema),
512
+ defaultValues: {
513
+ name: "",
514
+ email: "",
515
+ company: "",
516
+ role: "",
517
+ useCase: "",
518
+ currentStack: "",
519
+ whatBuilding: "",
520
+ whatSolving: "",
521
+ teamSize: "",
522
+ timeline: "",
523
+ openToSessions: false,
524
+ okayWithCaseStudies: false
525
+ }
526
+ });
527
+ const simpleEmail = simpleForm.watch("email");
528
+ const designPartnerEmail = designPartnerForm.watch("email");
529
+ useEffect(() => {
530
+ const currentDesignPartnerEmail = designPartnerForm.getValues("email");
531
+ if (simpleEmail && simpleEmail !== currentDesignPartnerEmail) {
532
+ designPartnerForm.setValue("email", simpleEmail, { shouldDirty: false });
533
+ }
534
+ }, [simpleEmail, designPartnerForm]);
535
+ useEffect(() => {
536
+ const currentSimpleEmail = simpleForm.getValues("email");
537
+ if (designPartnerEmail && designPartnerEmail !== currentSimpleEmail) {
538
+ simpleForm.setValue("email", designPartnerEmail, { shouldDirty: false });
539
+ }
540
+ }, [designPartnerEmail, simpleForm]);
541
+ const handleSimpleSubmit = async (data) => {
542
+ setIsPending(true);
543
+ setSubmitResult(null);
544
+ try {
545
+ const formData = new FormData;
546
+ formData.set("email", data.email);
547
+ const result = await joinWaitlist(formData);
548
+ if (result.success) {
549
+ setSubmitResult({
550
+ success: true,
551
+ text: "Thanks for joining the waitlist! Check your inbox for a confirmation."
552
+ });
553
+ simpleForm.reset();
554
+ } else {
555
+ setSubmitResult({
556
+ success: false,
557
+ text: result.text || "Failed to join waitlist. Please try again."
558
+ });
559
+ }
560
+ } catch (_error) {
561
+ setSubmitResult({
562
+ success: false,
563
+ text: "Failed to join waitlist. Please try again."
564
+ });
565
+ } finally {
566
+ setIsPending(false);
567
+ }
568
+ };
569
+ const handleDesignPartnerSubmit = async (data) => {
570
+ setIsPending(true);
571
+ setSubmitResult(null);
572
+ try {
573
+ const formData = new FormData;
574
+ formData.set("email", data.email);
575
+ formData.set("name", data.name);
576
+ if (data.company)
577
+ formData.set("company", data.company);
578
+ if (data.role)
579
+ formData.set("role", data.role);
580
+ if (data.useCase)
581
+ formData.set("useCase", data.useCase);
582
+ if (data.currentStack)
583
+ formData.set("currentStack", data.currentStack);
584
+ formData.set("whatBuilding", data.whatBuilding);
585
+ formData.set("whatSolving", data.whatSolving);
586
+ if (data.teamSize)
587
+ formData.set("teamSize", data.teamSize);
588
+ if (data.timeline)
589
+ formData.set("timeline", data.timeline);
590
+ if (data.openToSessions)
591
+ formData.set("openToSessions", "on");
592
+ if (data.okayWithCaseStudies)
593
+ formData.set("okayWithCaseStudies", "on");
594
+ const result = await submitWaitlistApplication(formData);
595
+ if (result.success) {
596
+ setSubmitResult({
597
+ success: true,
598
+ text: "You're on the list. Thanks for applying. We're slowly onboarding design partners in waves. If your use case is a good fit, we'll reach out personally."
599
+ });
600
+ designPartnerForm.reset();
601
+ } else {
602
+ setSubmitResult({
603
+ success: false,
604
+ text: result.text || "Failed to submit application. Please try again."
605
+ });
606
+ }
607
+ } catch (_error) {
608
+ setSubmitResult({
609
+ success: false,
610
+ text: "Failed to submit application. Please try again."
611
+ });
612
+ } finally {
613
+ setIsPending(false);
614
+ }
615
+ };
616
+ const onSubmit = isDesignPartner ? designPartnerForm.handleSubmit(handleDesignPartnerSubmit) : simpleForm.handleSubmit(handleSimpleSubmit);
617
+ const isCompact = variant === "compact";
618
+ return /* @__PURE__ */ jsxDEV("div", {
619
+ id: "waitlist",
620
+ className: isCompact ? "space-y-4" : "card-subtle space-y-6 p-8",
621
+ children: [
622
+ !isCompact && /* @__PURE__ */ jsxDEV("div", {
623
+ className: "space-y-4",
624
+ children: [
625
+ /* @__PURE__ */ jsxDEV("div", {
626
+ className: "inline-flex items-center gap-2 rounded-full border border-violet-500/20 bg-violet-500/10 px-3 py-1",
627
+ children: /* @__PURE__ */ jsxDEV("span", {
628
+ className: "text-sm font-medium text-violet-300",
629
+ children: isDesignPartner ? "Design Partner Waitlist" : "Join the Waitlist"
630
+ }, undefined, false, undefined, this)
631
+ }, undefined, false, undefined, this),
632
+ /* @__PURE__ */ jsxDEV("h2", {
633
+ className: "text-2xl font-bold",
634
+ children: isDesignPartner ? "Apply for early access to ContractSpec" : "Get early access to ContractSpec"
635
+ }, undefined, false, undefined, this),
636
+ /* @__PURE__ */ jsxDEV("p", {
637
+ className: "text-muted-foreground text-sm",
638
+ children: isDesignPartner ? "Tell us what you're building. We'll prioritize teams where ContractSpec can have a big impact, and where we can learn the most." : "Join the waitlist to be notified when ContractSpec becomes available."
639
+ }, undefined, false, undefined, this)
640
+ ]
641
+ }, undefined, true, undefined, this),
642
+ !isCompact && /* @__PURE__ */ jsxDEV("div", {
643
+ className: "border-border bg-muted/20 flex items-center justify-between gap-4 rounded-lg border p-4",
644
+ children: [
645
+ /* @__PURE__ */ jsxDEV("div", {
646
+ className: "space-y-1",
647
+ children: [
648
+ /* @__PURE__ */ jsxDEV(Label, {
649
+ htmlFor: "design-partner-toggle",
650
+ className: "text-sm font-medium",
651
+ children: "Apply as a design partner"
652
+ }, undefined, false, undefined, this),
653
+ /* @__PURE__ */ jsxDEV("p", {
654
+ className: "text-muted-foreground text-xs",
655
+ children: isDesignPartner ? "Get hands-on support, influence the roadmap, and founding discount" : "Get priority access, 1:1 onboarding, and help shape ContractSpec"
656
+ }, undefined, false, undefined, this)
657
+ ]
658
+ }, undefined, true, undefined, this),
659
+ /* @__PURE__ */ jsxDEV(Switch, {
660
+ id: "design-partner-toggle",
661
+ checked: isDesignPartner,
662
+ onCheckedChange: setIsDesignPartner,
663
+ disabled: isPending || submitResult?.success
664
+ }, undefined, false, undefined, this)
665
+ ]
666
+ }, undefined, true, undefined, this),
667
+ !isCompact && isDesignPartner && /* @__PURE__ */ jsxDEV("div", {
668
+ className: "space-y-2",
669
+ children: [
670
+ /* @__PURE__ */ jsxDEV("p", {
671
+ className: "text-sm font-medium",
672
+ children: "Benefits:"
673
+ }, undefined, false, undefined, this),
674
+ /* @__PURE__ */ jsxDEV("ul", {
675
+ className: "text-muted-foreground space-y-1 text-sm",
676
+ children: [
677
+ /* @__PURE__ */ jsxDEV("li", {
678
+ children: "• Early access to ContractSpec Studio"
679
+ }, undefined, false, undefined, this),
680
+ /* @__PURE__ */ jsxDEV("li", {
681
+ children: "• 1:1 onboarding and architecture sessions"
682
+ }, undefined, false, undefined, this),
683
+ /* @__PURE__ */ jsxDEV("li", {
684
+ children: "• Priority support via direct channels"
685
+ }, undefined, false, undefined, this),
686
+ /* @__PURE__ */ jsxDEV("li", {
687
+ children: "• Influence over roadmap and features"
688
+ }, undefined, false, undefined, this),
689
+ /* @__PURE__ */ jsxDEV("li", {
690
+ children: "• Founding discount when paid plans launch"
691
+ }, undefined, false, undefined, this)
692
+ ]
693
+ }, undefined, true, undefined, this)
694
+ ]
695
+ }, undefined, true, undefined, this),
696
+ /* @__PURE__ */ jsxDEV("form", {
697
+ onSubmit,
698
+ className: "space-y-4",
699
+ children: [
700
+ isDesignPartner ? /* @__PURE__ */ jsxDEV(Fragment, {
701
+ children: [
702
+ /* @__PURE__ */ jsxDEV("div", {
703
+ className: "grid gap-4 md:grid-cols-2",
704
+ children: [
705
+ /* @__PURE__ */ jsxDEV("div", {
706
+ className: "space-y-2",
707
+ children: [
708
+ /* @__PURE__ */ jsxDEV(Label, {
709
+ htmlFor: "waitlist-name",
710
+ className: "text-sm font-medium",
711
+ children: [
712
+ "Name ",
713
+ /* @__PURE__ */ jsxDEV("span", {
714
+ className: "text-red-400",
715
+ children: "*"
716
+ }, undefined, false, undefined, this)
717
+ ]
718
+ }, undefined, true, undefined, this),
719
+ /* @__PURE__ */ jsxDEV(Input, {
720
+ id: "waitlist-name",
721
+ ...designPartnerForm.register("name"),
722
+ type: "text",
723
+ placeholder: "Your name",
724
+ disabled: isPending || submitResult?.success
725
+ }, undefined, false, undefined, this),
726
+ designPartnerForm.formState.errors.name && /* @__PURE__ */ jsxDEV("p", {
727
+ className: "text-xs text-red-400",
728
+ children: designPartnerForm.formState.errors.name.message
729
+ }, undefined, false, undefined, this)
730
+ ]
731
+ }, undefined, true, undefined, this),
732
+ /* @__PURE__ */ jsxDEV("div", {
733
+ className: "space-y-2",
734
+ children: [
735
+ /* @__PURE__ */ jsxDEV(Label, {
736
+ htmlFor: "waitlist-email",
737
+ className: "text-sm font-medium",
738
+ children: [
739
+ "Email ",
740
+ /* @__PURE__ */ jsxDEV("span", {
741
+ className: "text-red-400",
742
+ children: "*"
743
+ }, undefined, false, undefined, this)
744
+ ]
745
+ }, undefined, true, undefined, this),
746
+ /* @__PURE__ */ jsxDEV(Input, {
747
+ id: "waitlist-email",
748
+ ...designPartnerForm.register("email"),
749
+ type: "email",
750
+ placeholder: "your@email.com",
751
+ disabled: isPending || submitResult?.success
752
+ }, undefined, false, undefined, this),
753
+ designPartnerForm.formState.errors.email && /* @__PURE__ */ jsxDEV("p", {
754
+ className: "text-xs text-red-400",
755
+ children: designPartnerForm.formState.errors.email.message
756
+ }, undefined, false, undefined, this)
757
+ ]
758
+ }, undefined, true, undefined, this)
759
+ ]
760
+ }, undefined, true, undefined, this),
761
+ /* @__PURE__ */ jsxDEV("div", {
762
+ className: "grid gap-4 md:grid-cols-2",
763
+ children: [
764
+ /* @__PURE__ */ jsxDEV("div", {
765
+ className: "space-y-2",
766
+ children: [
767
+ /* @__PURE__ */ jsxDEV(Label, {
768
+ htmlFor: "waitlist-company",
769
+ className: "text-sm font-medium",
770
+ children: "Company / Project Name"
771
+ }, undefined, false, undefined, this),
772
+ /* @__PURE__ */ jsxDEV(Input, {
773
+ id: "waitlist-company",
774
+ ...designPartnerForm.register("company"),
775
+ type: "text",
776
+ placeholder: "Your company or project",
777
+ disabled: isPending || submitResult?.success
778
+ }, undefined, false, undefined, this)
779
+ ]
780
+ }, undefined, true, undefined, this),
781
+ /* @__PURE__ */ jsxDEV("div", {
782
+ className: "space-y-2",
783
+ children: [
784
+ /* @__PURE__ */ jsxDEV(Label, {
785
+ htmlFor: "waitlist-role",
786
+ className: "text-sm font-medium",
787
+ children: "Role"
788
+ }, undefined, false, undefined, this),
789
+ /* @__PURE__ */ jsxDEV(Select, {
790
+ value: designPartnerForm.watch("role") || "",
791
+ onValueChange: (value) => designPartnerForm.setValue("role", value),
792
+ disabled: isPending || submitResult?.success,
793
+ children: [
794
+ /* @__PURE__ */ jsxDEV(SelectTrigger, {
795
+ id: "waitlist-role",
796
+ className: "w-full",
797
+ children: /* @__PURE__ */ jsxDEV(SelectValue, {
798
+ placeholder: "Select your role"
799
+ }, undefined, false, undefined, this)
800
+ }, undefined, false, undefined, this),
801
+ /* @__PURE__ */ jsxDEV(SelectContent, {
802
+ children: [
803
+ /* @__PURE__ */ jsxDEV(SelectItem, {
804
+ value: "founder",
805
+ children: "Founder"
806
+ }, undefined, false, undefined, this),
807
+ /* @__PURE__ */ jsxDEV(SelectItem, {
808
+ value: "cto",
809
+ children: "CTO"
810
+ }, undefined, false, undefined, this),
811
+ /* @__PURE__ */ jsxDEV(SelectItem, {
812
+ value: "lead-engineer",
813
+ children: "Lead Engineer"
814
+ }, undefined, false, undefined, this),
815
+ /* @__PURE__ */ jsxDEV(SelectItem, {
816
+ value: "engineer",
817
+ children: "Engineer"
818
+ }, undefined, false, undefined, this),
819
+ /* @__PURE__ */ jsxDEV(SelectItem, {
820
+ value: "product-manager",
821
+ children: "Product Manager"
822
+ }, undefined, false, undefined, this),
823
+ /* @__PURE__ */ jsxDEV(SelectItem, {
824
+ value: "other",
825
+ children: "Other"
826
+ }, undefined, false, undefined, this)
827
+ ]
828
+ }, undefined, true, undefined, this)
829
+ ]
830
+ }, undefined, true, undefined, this)
831
+ ]
832
+ }, undefined, true, undefined, this)
833
+ ]
834
+ }, undefined, true, undefined, this),
835
+ /* @__PURE__ */ jsxDEV("div", {
836
+ className: "grid gap-4 md:grid-cols-2",
837
+ children: [
838
+ /* @__PURE__ */ jsxDEV("div", {
839
+ className: "space-y-2",
840
+ children: [
841
+ /* @__PURE__ */ jsxDEV(Label, {
842
+ htmlFor: "waitlist-use-case",
843
+ className: "text-sm font-medium",
844
+ children: "Primary use case"
845
+ }, undefined, false, undefined, this),
846
+ /* @__PURE__ */ jsxDEV(Select, {
847
+ value: designPartnerForm.watch("useCase") || "",
848
+ onValueChange: (value) => designPartnerForm.setValue("useCase", value),
849
+ disabled: isPending || submitResult?.success,
850
+ children: [
851
+ /* @__PURE__ */ jsxDEV(SelectTrigger, {
852
+ id: "waitlist-use-case",
853
+ className: "w-full",
854
+ children: /* @__PURE__ */ jsxDEV(SelectValue, {
855
+ placeholder: "Select a use case"
856
+ }, undefined, false, undefined, this)
857
+ }, undefined, false, undefined, this),
858
+ /* @__PURE__ */ jsxDEV(SelectContent, {
859
+ children: [
860
+ /* @__PURE__ */ jsxDEV(SelectItem, {
861
+ value: "api-platform",
862
+ children: "API platform"
863
+ }, undefined, false, undefined, this),
864
+ /* @__PURE__ */ jsxDEV(SelectItem, {
865
+ value: "ai-ops",
866
+ children: "AI operations"
867
+ }, undefined, false, undefined, this),
868
+ /* @__PURE__ */ jsxDEV(SelectItem, {
869
+ value: "integration-hub",
870
+ children: "Integration hub"
871
+ }, undefined, false, undefined, this),
872
+ /* @__PURE__ */ jsxDEV(SelectItem, {
873
+ value: "internal-tools",
874
+ children: "Internal tools"
875
+ }, undefined, false, undefined, this),
876
+ /* @__PURE__ */ jsxDEV(SelectItem, {
877
+ value: "data-pipelines",
878
+ children: "Data pipelines"
879
+ }, undefined, false, undefined, this),
880
+ /* @__PURE__ */ jsxDEV(SelectItem, {
881
+ value: "other",
882
+ children: "Other"
883
+ }, undefined, false, undefined, this)
884
+ ]
885
+ }, undefined, true, undefined, this)
886
+ ]
887
+ }, undefined, true, undefined, this)
888
+ ]
889
+ }, undefined, true, undefined, this),
890
+ /* @__PURE__ */ jsxDEV("div", {
891
+ className: "space-y-2",
892
+ children: [
893
+ /* @__PURE__ */ jsxDEV(Label, {
894
+ htmlFor: "waitlist-current-stack",
895
+ className: "text-sm font-medium",
896
+ children: "Current stack"
897
+ }, undefined, false, undefined, this),
898
+ /* @__PURE__ */ jsxDEV(Input, {
899
+ id: "waitlist-current-stack",
900
+ ...designPartnerForm.register("currentStack"),
901
+ type: "text",
902
+ placeholder: "e.g. Next.js, Postgres, OpenAPI",
903
+ disabled: isPending || submitResult?.success
904
+ }, undefined, false, undefined, this)
905
+ ]
906
+ }, undefined, true, undefined, this)
907
+ ]
908
+ }, undefined, true, undefined, this),
909
+ /* @__PURE__ */ jsxDEV("div", {
910
+ className: "space-y-2",
911
+ children: [
912
+ /* @__PURE__ */ jsxDEV(Label, {
913
+ htmlFor: "waitlist-what-building",
914
+ className: "text-sm font-medium",
915
+ children: [
916
+ "What are you building with AI today?",
917
+ " ",
918
+ /* @__PURE__ */ jsxDEV("span", {
919
+ className: "text-red-400",
920
+ children: "*"
921
+ }, undefined, false, undefined, this)
922
+ ]
923
+ }, undefined, true, undefined, this),
924
+ /* @__PURE__ */ jsxDEV(Textarea, {
925
+ id: "waitlist-what-building",
926
+ ...designPartnerForm.register("whatBuilding"),
927
+ placeholder: "Tell us about your project...",
928
+ disabled: isPending || submitResult?.success,
929
+ rows: 4
930
+ }, undefined, false, undefined, this),
931
+ designPartnerForm.formState.errors.whatBuilding && /* @__PURE__ */ jsxDEV("p", {
932
+ className: "text-xs text-red-400",
933
+ children: designPartnerForm.formState.errors.whatBuilding.message
934
+ }, undefined, false, undefined, this)
935
+ ]
936
+ }, undefined, true, undefined, this),
937
+ /* @__PURE__ */ jsxDEV("div", {
938
+ className: "space-y-2",
939
+ children: [
940
+ /* @__PURE__ */ jsxDEV(Label, {
941
+ htmlFor: "waitlist-what-solving",
942
+ className: "text-sm font-medium",
943
+ children: [
944
+ "What do you hope ContractSpec will solve for you?",
945
+ " ",
946
+ /* @__PURE__ */ jsxDEV("span", {
947
+ className: "text-red-400",
948
+ children: "*"
949
+ }, undefined, false, undefined, this)
950
+ ]
951
+ }, undefined, true, undefined, this),
952
+ /* @__PURE__ */ jsxDEV(Textarea, {
953
+ id: "waitlist-what-solving",
954
+ ...designPartnerForm.register("whatSolving"),
955
+ placeholder: "What problems are you trying to solve?",
956
+ disabled: isPending || submitResult?.success,
957
+ rows: 4
958
+ }, undefined, false, undefined, this),
959
+ designPartnerForm.formState.errors.whatSolving && /* @__PURE__ */ jsxDEV("p", {
960
+ className: "text-xs text-red-400",
961
+ children: designPartnerForm.formState.errors.whatSolving.message
962
+ }, undefined, false, undefined, this)
963
+ ]
964
+ }, undefined, true, undefined, this),
965
+ /* @__PURE__ */ jsxDEV("div", {
966
+ className: "grid gap-4 md:grid-cols-2",
967
+ children: [
968
+ /* @__PURE__ */ jsxDEV("div", {
969
+ className: "space-y-2",
970
+ children: [
971
+ /* @__PURE__ */ jsxDEV(Label, {
972
+ htmlFor: "waitlist-team-size",
973
+ className: "text-sm font-medium",
974
+ children: "Team Size"
975
+ }, undefined, false, undefined, this),
976
+ /* @__PURE__ */ jsxDEV(Select, {
977
+ value: designPartnerForm.watch("teamSize") || "",
978
+ onValueChange: (value) => designPartnerForm.setValue("teamSize", value),
979
+ disabled: isPending || submitResult?.success,
980
+ children: [
981
+ /* @__PURE__ */ jsxDEV(SelectTrigger, {
982
+ id: "waitlist-team-size",
983
+ className: "w-full",
984
+ children: /* @__PURE__ */ jsxDEV(SelectValue, {
985
+ placeholder: "Select team size"
986
+ }, undefined, false, undefined, this)
987
+ }, undefined, false, undefined, this),
988
+ /* @__PURE__ */ jsxDEV(SelectContent, {
989
+ children: [
990
+ /* @__PURE__ */ jsxDEV(SelectItem, {
991
+ value: "solo",
992
+ children: "Solo"
993
+ }, undefined, false, undefined, this),
994
+ /* @__PURE__ */ jsxDEV(SelectItem, {
995
+ value: "2-5",
996
+ children: "2-5"
997
+ }, undefined, false, undefined, this),
998
+ /* @__PURE__ */ jsxDEV(SelectItem, {
999
+ value: "6-20",
1000
+ children: "6-20"
1001
+ }, undefined, false, undefined, this),
1002
+ /* @__PURE__ */ jsxDEV(SelectItem, {
1003
+ value: "20+",
1004
+ children: "20+"
1005
+ }, undefined, false, undefined, this)
1006
+ ]
1007
+ }, undefined, true, undefined, this)
1008
+ ]
1009
+ }, undefined, true, undefined, this)
1010
+ ]
1011
+ }, undefined, true, undefined, this),
1012
+ /* @__PURE__ */ jsxDEV("div", {
1013
+ className: "space-y-2",
1014
+ children: [
1015
+ /* @__PURE__ */ jsxDEV(Label, {
1016
+ htmlFor: "waitlist-timeline",
1017
+ className: "text-sm font-medium",
1018
+ children: "Timeline"
1019
+ }, undefined, false, undefined, this),
1020
+ /* @__PURE__ */ jsxDEV(Select, {
1021
+ value: designPartnerForm.watch("timeline") || "",
1022
+ onValueChange: (value) => designPartnerForm.setValue("timeline", value),
1023
+ disabled: isPending || submitResult?.success,
1024
+ children: [
1025
+ /* @__PURE__ */ jsxDEV(SelectTrigger, {
1026
+ id: "waitlist-timeline",
1027
+ className: "w-full",
1028
+ children: /* @__PURE__ */ jsxDEV(SelectValue, {
1029
+ placeholder: "Select timeline"
1030
+ }, undefined, false, undefined, this)
1031
+ }, undefined, false, undefined, this),
1032
+ /* @__PURE__ */ jsxDEV(SelectContent, {
1033
+ children: [
1034
+ /* @__PURE__ */ jsxDEV(SelectItem, {
1035
+ value: "now",
1036
+ children: "Now"
1037
+ }, undefined, false, undefined, this),
1038
+ /* @__PURE__ */ jsxDEV(SelectItem, {
1039
+ value: "1-3-months",
1040
+ children: "1-3 months"
1041
+ }, undefined, false, undefined, this),
1042
+ /* @__PURE__ */ jsxDEV(SelectItem, {
1043
+ value: "3-6-months",
1044
+ children: "3-6 months"
1045
+ }, undefined, false, undefined, this),
1046
+ /* @__PURE__ */ jsxDEV(SelectItem, {
1047
+ value: "exploring",
1048
+ children: "Exploring"
1049
+ }, undefined, false, undefined, this)
1050
+ ]
1051
+ }, undefined, true, undefined, this)
1052
+ ]
1053
+ }, undefined, true, undefined, this)
1054
+ ]
1055
+ }, undefined, true, undefined, this)
1056
+ ]
1057
+ }, undefined, true, undefined, this),
1058
+ /* @__PURE__ */ jsxDEV("div", {
1059
+ className: "space-y-3",
1060
+ children: [
1061
+ /* @__PURE__ */ jsxDEV("div", {
1062
+ className: "flex items-start gap-3",
1063
+ children: [
1064
+ /* @__PURE__ */ jsxDEV(Checkbox, {
1065
+ id: "waitlist-open-to-sessions",
1066
+ checked: designPartnerForm.watch("openToSessions"),
1067
+ onCheckedChange: (checked) => designPartnerForm.setValue("openToSessions", checked === true),
1068
+ disabled: isPending || submitResult?.success
1069
+ }, undefined, false, undefined, this),
1070
+ /* @__PURE__ */ jsxDEV(Label, {
1071
+ htmlFor: "waitlist-open-to-sessions",
1072
+ className: "cursor-pointer text-sm leading-relaxed",
1073
+ children: "I'm open to 1:1 product/design sessions"
1074
+ }, undefined, false, undefined, this)
1075
+ ]
1076
+ }, undefined, true, undefined, this),
1077
+ /* @__PURE__ */ jsxDEV("div", {
1078
+ className: "flex items-start gap-3",
1079
+ children: [
1080
+ /* @__PURE__ */ jsxDEV(Checkbox, {
1081
+ id: "waitlist-case-studies",
1082
+ checked: designPartnerForm.watch("okayWithCaseStudies"),
1083
+ onCheckedChange: (checked) => designPartnerForm.setValue("okayWithCaseStudies", checked === true),
1084
+ disabled: isPending || submitResult?.success
1085
+ }, undefined, false, undefined, this),
1086
+ /* @__PURE__ */ jsxDEV(Label, {
1087
+ htmlFor: "waitlist-case-studies",
1088
+ className: "cursor-pointer text-sm leading-relaxed",
1089
+ children: "I'm okay with anonymized case studies about our usage"
1090
+ }, undefined, false, undefined, this)
1091
+ ]
1092
+ }, undefined, true, undefined, this)
1093
+ ]
1094
+ }, undefined, true, undefined, this)
1095
+ ]
1096
+ }, undefined, true, undefined, this) : /* @__PURE__ */ jsxDEV("div", {
1097
+ className: "space-y-2",
1098
+ children: [
1099
+ /* @__PURE__ */ jsxDEV(Label, {
1100
+ htmlFor: "waitlist-email",
1101
+ className: "text-sm font-medium",
1102
+ children: [
1103
+ "Email ",
1104
+ /* @__PURE__ */ jsxDEV("span", {
1105
+ className: "text-red-400",
1106
+ children: "*"
1107
+ }, undefined, false, undefined, this)
1108
+ ]
1109
+ }, undefined, true, undefined, this),
1110
+ /* @__PURE__ */ jsxDEV(Input, {
1111
+ id: "waitlist-email",
1112
+ ...simpleForm.register("email"),
1113
+ type: "email",
1114
+ placeholder: "your@email.com",
1115
+ disabled: isPending || submitResult?.success
1116
+ }, undefined, false, undefined, this),
1117
+ simpleForm.formState.errors.email && /* @__PURE__ */ jsxDEV("p", {
1118
+ className: "text-xs text-red-400",
1119
+ children: simpleForm.formState.errors.email.message
1120
+ }, undefined, false, undefined, this)
1121
+ ]
1122
+ }, undefined, true, undefined, this),
1123
+ submitResult && !isPending && /* @__PURE__ */ jsxDEV("div", {
1124
+ className: `flex items-start gap-2 rounded-lg p-4 text-sm ${submitResult.success ? "border border-green-500/20 bg-green-500/10 text-green-400" : "border border-red-500/20 bg-red-500/10 text-red-400"}`,
1125
+ children: [
1126
+ submitResult.success ? /* @__PURE__ */ jsxDEV(CheckCircle, {
1127
+ size: 20,
1128
+ className: "mt-0.5 shrink-0"
1129
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV(AlertCircle, {
1130
+ size: 20,
1131
+ className: "mt-0.5 shrink-0"
1132
+ }, undefined, false, undefined, this),
1133
+ /* @__PURE__ */ jsxDEV("div", {
1134
+ className: "flex-1",
1135
+ children: submitResult.success ? /* @__PURE__ */ jsxDEV(Fragment, {
1136
+ children: [
1137
+ /* @__PURE__ */ jsxDEV("p", {
1138
+ className: "mb-1 font-semibold",
1139
+ children: "You're on the list."
1140
+ }, undefined, false, undefined, this),
1141
+ /* @__PURE__ */ jsxDEV("p", {
1142
+ className: "text-sm",
1143
+ children: submitResult.text
1144
+ }, undefined, false, undefined, this)
1145
+ ]
1146
+ }, undefined, true, undefined, this) : /* @__PURE__ */ jsxDEV("p", {
1147
+ children: submitResult.text
1148
+ }, undefined, false, undefined, this)
1149
+ }, undefined, false, undefined, this)
1150
+ ]
1151
+ }, undefined, true, undefined, this),
1152
+ /* @__PURE__ */ jsxDEV(Button, {
1153
+ type: "submit",
1154
+ disabled: isPending || submitResult?.success,
1155
+ className: "w-full",
1156
+ children: isPending ? "Submitting..." : isDesignPartner ? "Apply to the waitlist" : "Join waitlist"
1157
+ }, undefined, false, undefined, this),
1158
+ /* @__PURE__ */ jsxDEV("p", {
1159
+ className: "text-muted-foreground text-center text-xs",
1160
+ children: "No spam. We'll only email you about ContractSpec and your application."
1161
+ }, undefined, false, undefined, this)
1162
+ ]
1163
+ }, undefined, true, undefined, this)
1164
+ ]
1165
+ }, undefined, true, undefined, this);
1166
+ }
1167
+
1168
+ // src/components/marketing/ContactClient.tsx
1169
+ import { useActionState } from "react";
1170
+ import {
1171
+ Calendar,
1172
+ MessageSquare,
1173
+ CheckCircle as CheckCircle2,
1174
+ AlertCircle as AlertCircle2
1175
+ } from "lucide-react";
1176
+ import {
1177
+ ActionForm,
1178
+ Button as Button2,
1179
+ Input as Input2,
1180
+ Textarea as Textarea2
1181
+ } from "@contractspec/lib.design-system";
1182
+ import { VStack, HStack } from "@contractspec/lib.ui-kit-web/ui/stack";
1183
+ import {
1184
+ H2,
1185
+ H1,
1186
+ Small,
1187
+ Muted
1188
+ } from "@contractspec/lib.ui-kit-web/ui/typography";
1189
+ import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
1190
+ "use client";
1191
+ function ContactClient() {
1192
+ const handleContactSubmit = async (_prevState, formData) => {
1193
+ const result = await submitContactForm(formData);
1194
+ if (result.success) {
1195
+ return {
1196
+ success: true,
1197
+ text: "Message sent successfully! We'll get back to you soon."
1198
+ };
1199
+ } else {
1200
+ return {
1201
+ success: false,
1202
+ text: result.text || "Failed to send message. Please try again."
1203
+ };
1204
+ }
1205
+ };
1206
+ const [contactResult, contactAction, contactPending] = useActionState(handleContactSubmit, null);
1207
+ return /* @__PURE__ */ jsxDEV2("section", {
1208
+ className: "section-padding hero-gradient w-full",
1209
+ children: /* @__PURE__ */ jsxDEV2(VStack, {
1210
+ className: "mx-auto max-w-4xl gap-16",
1211
+ children: [
1212
+ /* @__PURE__ */ jsxDEV2(VStack, {
1213
+ className: "gap-4 text-center",
1214
+ children: [
1215
+ /* @__PURE__ */ jsxDEV2(H1, {
1216
+ className: "text-5xl font-bold",
1217
+ children: "Get in touch"
1218
+ }, undefined, false, undefined, this),
1219
+ /* @__PURE__ */ jsxDEV2(Muted, {
1220
+ className: "text-lg",
1221
+ children: "Choose how you'd like to connect with us"
1222
+ }, undefined, false, undefined, this)
1223
+ ]
1224
+ }, undefined, true, undefined, this),
1225
+ /* @__PURE__ */ jsxDEV2(WaitlistSection, {
1226
+ context: "contact"
1227
+ }, undefined, false, undefined, this),
1228
+ /* @__PURE__ */ jsxDEV2(VStack, {
1229
+ className: "card-subtle gap-6 p-8",
1230
+ id: "call",
1231
+ children: [
1232
+ /* @__PURE__ */ jsxDEV2(HStack, {
1233
+ className: "items-center gap-3",
1234
+ children: [
1235
+ /* @__PURE__ */ jsxDEV2(Calendar, {
1236
+ className: "text-blue-400",
1237
+ size: 24
1238
+ }, undefined, false, undefined, this),
1239
+ /* @__PURE__ */ jsxDEV2(VStack, {
1240
+ className: "items-start gap-1",
1241
+ children: [
1242
+ /* @__PURE__ */ jsxDEV2(H2, {
1243
+ className: "text-2xl font-bold",
1244
+ children: "Book a 20-min call"
1245
+ }, undefined, false, undefined, this),
1246
+ /* @__PURE__ */ jsxDEV2(Muted, {
1247
+ className: "text-sm",
1248
+ children: "Schedule a walkthrough with our team to see ContractSpec in action"
1249
+ }, undefined, false, undefined, this)
1250
+ ]
1251
+ }, undefined, true, undefined, this)
1252
+ ]
1253
+ }, undefined, true, undefined, this),
1254
+ /* @__PURE__ */ jsxDEV2("div", {
1255
+ className: "border-border overflow-hidden rounded-lg border",
1256
+ children: /* @__PURE__ */ jsxDEV2("object", {
1257
+ data: "https://meet.reclaimai.com/e/f863cb29-caac-44b6-972b-1407dd9545a3",
1258
+ width: "100%",
1259
+ height: "700px",
1260
+ style: { outline: "none" },
1261
+ "aria-label": "Calendar booking widget"
1262
+ }, undefined, false, undefined, this)
1263
+ }, undefined, false, undefined, this)
1264
+ ]
1265
+ }, undefined, true, undefined, this),
1266
+ /* @__PURE__ */ jsxDEV2(VStack, {
1267
+ className: "card-subtle gap-6 p-8",
1268
+ id: "message",
1269
+ children: [
1270
+ /* @__PURE__ */ jsxDEV2(HStack, {
1271
+ className: "items-center gap-3",
1272
+ children: [
1273
+ /* @__PURE__ */ jsxDEV2(MessageSquare, {
1274
+ className: "text-emerald-400",
1275
+ size: 24
1276
+ }, undefined, false, undefined, this),
1277
+ /* @__PURE__ */ jsxDEV2(VStack, {
1278
+ className: "items-start gap-1",
1279
+ children: [
1280
+ /* @__PURE__ */ jsxDEV2(H2, {
1281
+ className: "text-2xl font-bold",
1282
+ children: "Send us a message"
1283
+ }, undefined, false, undefined, this),
1284
+ /* @__PURE__ */ jsxDEV2(Muted, {
1285
+ className: "text-sm",
1286
+ children: "Have questions or feedback? We'd love to hear from you"
1287
+ }, undefined, false, undefined, this)
1288
+ ]
1289
+ }, undefined, true, undefined, this)
1290
+ ]
1291
+ }, undefined, true, undefined, this),
1292
+ /* @__PURE__ */ jsxDEV2(ActionForm, {
1293
+ action: contactAction,
1294
+ children: /* @__PURE__ */ jsxDEV2(VStack, {
1295
+ className: "gap-4",
1296
+ children: [
1297
+ /* @__PURE__ */ jsxDEV2(VStack, {
1298
+ className: "gap-2",
1299
+ children: [
1300
+ /* @__PURE__ */ jsxDEV2(Small, {
1301
+ className: "text-sm font-medium",
1302
+ children: "Name"
1303
+ }, undefined, false, undefined, this),
1304
+ /* @__PURE__ */ jsxDEV2(Input2, {
1305
+ id: "contact-name",
1306
+ name: "name",
1307
+ type: "text",
1308
+ placeholder: "Your name",
1309
+ disabled: contactPending || contactResult?.success,
1310
+ required: true
1311
+ }, undefined, false, undefined, this)
1312
+ ]
1313
+ }, undefined, true, undefined, this),
1314
+ /* @__PURE__ */ jsxDEV2(VStack, {
1315
+ className: "gap-2",
1316
+ children: [
1317
+ /* @__PURE__ */ jsxDEV2(Small, {
1318
+ className: "text-sm font-medium",
1319
+ children: "Email"
1320
+ }, undefined, false, undefined, this),
1321
+ /* @__PURE__ */ jsxDEV2(Input2, {
1322
+ id: "contact-email",
1323
+ name: "email",
1324
+ type: "email",
1325
+ keyboard: { kind: "email" },
1326
+ placeholder: "your@email.com",
1327
+ disabled: contactPending || contactResult?.success,
1328
+ required: true
1329
+ }, undefined, false, undefined, this)
1330
+ ]
1331
+ }, undefined, true, undefined, this),
1332
+ /* @__PURE__ */ jsxDEV2(VStack, {
1333
+ className: "gap-2",
1334
+ children: [
1335
+ /* @__PURE__ */ jsxDEV2(Small, {
1336
+ className: "text-sm font-medium",
1337
+ children: "Message"
1338
+ }, undefined, false, undefined, this),
1339
+ /* @__PURE__ */ jsxDEV2(Textarea2, {
1340
+ id: "contact-message",
1341
+ name: "message",
1342
+ placeholder: "Tell us what's on your mind...",
1343
+ disabled: contactPending || contactResult?.success,
1344
+ rows: 6,
1345
+ required: true
1346
+ }, undefined, false, undefined, this)
1347
+ ]
1348
+ }, undefined, true, undefined, this),
1349
+ contactResult && !contactPending && /* @__PURE__ */ jsxDEV2(HStack, {
1350
+ className: `items-center gap-2 rounded-lg p-3 text-sm ${contactResult.success ? "border border-green-500/20 bg-green-500/10 text-green-400" : "border border-red-500/20 bg-red-500/10 text-red-400"}`,
1351
+ children: [
1352
+ contactResult.success ? /* @__PURE__ */ jsxDEV2(CheckCircle2, {
1353
+ size: 16
1354
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV2(AlertCircle2, {
1355
+ size: 16
1356
+ }, undefined, false, undefined, this),
1357
+ /* @__PURE__ */ jsxDEV2(Small, {
1358
+ children: contactResult.text
1359
+ }, undefined, false, undefined, this)
1360
+ ]
1361
+ }, undefined, true, undefined, this),
1362
+ /* @__PURE__ */ jsxDEV2(Button2, {
1363
+ type: "submit",
1364
+ disabled: contactPending || contactResult?.success,
1365
+ className: "w-full",
1366
+ children: contactPending ? "Sending..." : "Send message"
1367
+ }, undefined, false, undefined, this)
1368
+ ]
1369
+ }, undefined, true, undefined, this)
1370
+ }, undefined, false, undefined, this)
1371
+ ]
1372
+ }, undefined, true, undefined, this)
1373
+ ]
1374
+ }, undefined, true, undefined, this)
1375
+ }, undefined, false, undefined, this);
1376
+ }
1377
+ export {
1378
+ ContactClient
1379
+ };