@contractspec/bundle.marketing 2.1.0 → 2.2.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 (87) hide show
  1. package/.turbo/turbo-build.log +73 -73
  2. package/CHANGELOG.md +49 -0
  3. package/README.md +6 -1
  4. package/dist/browser/components/marketing/CofounderPage.js +2 -2
  5. package/dist/browser/components/marketing/ContactClient.js +57 -961
  6. package/dist/browser/components/marketing/DesignPartnerPage.js +2 -2
  7. package/dist/browser/components/marketing/LandingPage.js +6 -6
  8. package/dist/browser/components/marketing/PricingClient.js +107 -1127
  9. package/dist/browser/components/marketing/ProductClientPage.js +2 -2
  10. package/dist/browser/components/marketing/index.js +157 -1064
  11. package/dist/browser/components/marketing/pricing-thinking-modal.js +3 -3
  12. package/dist/browser/components/marketing/sections/CorePositioningSection.js +2 -2
  13. package/dist/browser/components/marketing/sections/CtaSection.js +2 -2
  14. package/dist/browser/components/marketing/sections/HeroMarketingSection.js +2 -2
  15. package/dist/browser/components/marketing/studio-signup-section.js +87 -0
  16. package/dist/browser/components/templates/TemplatesClientPage.js +175 -1082
  17. package/dist/browser/components/templates/index.js +181 -1088
  18. package/dist/browser/index.js +505 -1157
  19. package/dist/browser/registry/engine.js +158 -1080
  20. package/dist/browser/registry/index.js +158 -1080
  21. package/dist/browser/registry/registry-docs.js +2 -17
  22. package/dist/browser/registry/registry-landing.js +156 -1063
  23. package/dist/browser/registry/registry.js +158 -1080
  24. package/dist/browser/registry/utils.js +158 -1080
  25. package/dist/components/marketing/CofounderPage.js +2 -2
  26. package/dist/components/marketing/ContactClient.js +57 -961
  27. package/dist/components/marketing/DesignPartnerPage.js +2 -2
  28. package/dist/components/marketing/LandingPage.js +6 -6
  29. package/dist/components/marketing/PricingClient.js +107 -1127
  30. package/dist/components/marketing/ProductClientPage.js +2 -2
  31. package/dist/components/marketing/index.d.ts +1 -1
  32. package/dist/components/marketing/index.js +157 -1064
  33. package/dist/components/marketing/pricing-thinking-modal.js +3 -3
  34. package/dist/components/marketing/sections/CorePositioningSection.js +2 -2
  35. package/dist/components/marketing/sections/CtaSection.js +2 -2
  36. package/dist/components/marketing/sections/HeroMarketingSection.js +2 -2
  37. package/dist/components/marketing/studio-signup-section.d.ts +5 -0
  38. package/dist/components/marketing/studio-signup-section.js +82 -0
  39. package/dist/components/templates/TemplatesClientPage.js +175 -1082
  40. package/dist/components/templates/index.js +181 -1088
  41. package/dist/index.js +505 -1157
  42. package/dist/node/components/marketing/CofounderPage.js +2 -2
  43. package/dist/node/components/marketing/ContactClient.js +57 -961
  44. package/dist/node/components/marketing/DesignPartnerPage.js +2 -2
  45. package/dist/node/components/marketing/LandingPage.js +6 -6
  46. package/dist/node/components/marketing/PricingClient.js +107 -1127
  47. package/dist/node/components/marketing/ProductClientPage.js +2 -2
  48. package/dist/node/components/marketing/index.js +157 -1064
  49. package/dist/node/components/marketing/pricing-thinking-modal.js +3 -3
  50. package/dist/node/components/marketing/sections/CorePositioningSection.js +2 -2
  51. package/dist/node/components/marketing/sections/CtaSection.js +2 -2
  52. package/dist/node/components/marketing/sections/HeroMarketingSection.js +2 -2
  53. package/dist/node/components/marketing/studio-signup-section.js +82 -0
  54. package/dist/node/components/templates/TemplatesClientPage.js +175 -1082
  55. package/dist/node/components/templates/index.js +181 -1088
  56. package/dist/node/index.js +505 -1157
  57. package/dist/node/registry/engine.js +158 -1080
  58. package/dist/node/registry/index.js +158 -1080
  59. package/dist/node/registry/registry-docs.js +2 -17
  60. package/dist/node/registry/registry-landing.js +156 -1063
  61. package/dist/node/registry/registry.js +158 -1080
  62. package/dist/node/registry/utils.js +158 -1080
  63. package/dist/registry/engine.js +158 -1080
  64. package/dist/registry/index.js +158 -1080
  65. package/dist/registry/registry-docs.js +2 -17
  66. package/dist/registry/registry-landing.js +156 -1063
  67. package/dist/registry/registry.js +158 -1080
  68. package/dist/registry/utils.js +158 -1080
  69. package/package.json +34 -34
  70. package/src/components/marketing/CofounderPage.tsx +2 -2
  71. package/src/components/marketing/ContactClient.tsx +3 -3
  72. package/src/components/marketing/DesignPartnerPage.tsx +3 -3
  73. package/src/components/marketing/PricingClient.tsx +39 -38
  74. package/src/components/marketing/ProductClientPage.tsx +2 -2
  75. package/src/components/marketing/index.ts +1 -1
  76. package/src/components/marketing/pricing-thinking-modal.tsx +5 -5
  77. package/src/components/marketing/sections/CorePositioningSection.tsx +2 -2
  78. package/src/components/marketing/sections/CtaSection.tsx +2 -2
  79. package/src/components/marketing/sections/HeroMarketingSection.tsx +2 -2
  80. package/src/components/marketing/studio-signup-section.tsx +56 -0
  81. package/src/components/templates/TemplatesClientPage.tsx +12 -9
  82. package/src/registry/registry-docs.ts +0 -40
  83. package/dist/browser/components/marketing/waitlist-section.js +0 -1104
  84. package/dist/components/marketing/waitlist-section.d.ts +0 -7
  85. package/dist/components/marketing/waitlist-section.js +0 -1099
  86. package/dist/node/components/marketing/waitlist-section.js +0 -1099
  87. package/src/components/marketing/waitlist-section.tsx +0 -606
@@ -1,1099 +0,0 @@
1
- import { createRequire } from "node:module";
2
- var __require = /* @__PURE__ */ createRequire(import.meta.url);
3
-
4
- // src/libs/email/client.ts
5
- import { createClient, Temv1alpha1 } from "@scaleway/sdk";
6
- import { Logger } from "@contractspec/lib.logger";
7
- var DEFAULT_FROM = {
8
- email: "noreply@transactional.contractspec.io",
9
- name: "ContractSpec"
10
- };
11
- var DEFAULT_TEAM_INBOX = {
12
- email: "contact@contractspec.io",
13
- name: "ContractSpec Team"
14
- };
15
- var DEFAULT_REGION = "fr-par";
16
- var cachedConfig = null;
17
- var cachedClient = null;
18
- var apiFactory = (client) => new Temv1alpha1.API(client);
19
- var mapRegion = (value) => {
20
- const normalized = value?.trim().toLowerCase();
21
- if (normalized === "par" || normalized === "fr-par")
22
- return "fr-par";
23
- if (normalized === "ams" || normalized === "nl-ams")
24
- return "nl-ams";
25
- if (normalized === "waw" || normalized === "pl-waw")
26
- return "pl-waw";
27
- return DEFAULT_REGION;
28
- };
29
- var getEmailConfig = () => {
30
- if (cachedConfig) {
31
- return { ok: true, config: cachedConfig };
32
- }
33
- const accessKey = process.env.SCALEWAY_ACCESS_KEY || process.env.SCALEWAY_ACCESS_KEY_QUEUE;
34
- const secretKey = process.env.SCALEWAY_SECRET_KEY || process.env.SCALEWAY_SECRET_KEY_QUEUE;
35
- const projectId = process.env.SCALEWAY_PROJECT_ID;
36
- if (!accessKey || !secretKey || !projectId) {
37
- return {
38
- ok: false,
39
- errorMessage: "Email service is not configured. Please contact us directly at contact@contractspec.io."
40
- };
41
- }
42
- const region = mapRegion(process.env.SCALEWAY_REGION);
43
- cachedConfig = {
44
- accessKey,
45
- secretKey,
46
- projectId,
47
- region,
48
- defaultZone: `${region}-1`,
49
- from: {
50
- email: process.env.SCALEWAY_EMAIL_FROM_EMAIL ?? DEFAULT_FROM.email,
51
- name: process.env.SCALEWAY_EMAIL_FROM_NAME ?? DEFAULT_FROM.name
52
- },
53
- teamInbox: {
54
- email: process.env.SCALEWAY_EMAIL_TEAM_EMAIL ?? DEFAULT_TEAM_INBOX.email,
55
- name: process.env.SCALEWAY_EMAIL_TEAM_NAME ?? DEFAULT_TEAM_INBOX.name
56
- }
57
- };
58
- return { ok: true, config: cachedConfig };
59
- };
60
- var getTemClient = (config) => {
61
- if (cachedClient) {
62
- return cachedClient;
63
- }
64
- const client = createClient({
65
- accessKey: config.accessKey,
66
- secretKey: config.secretKey,
67
- defaultProjectId: config.projectId,
68
- defaultRegion: config.region,
69
- defaultZone: config.defaultZone
70
- });
71
- cachedClient = apiFactory(client);
72
- return cachedClient;
73
- };
74
- var sendEmail = async (config, request) => {
75
- try {
76
- const client = getTemClient(config);
77
- await client.createEmail({
78
- region: config.region,
79
- projectId: config.projectId,
80
- from: config.from,
81
- to: request.to,
82
- subject: request.subject,
83
- text: request.text,
84
- html: request.html || request.text,
85
- additionalHeaders: request.replyTo ? [{ key: "Reply-To", value: request.replyTo }] : undefined
86
- });
87
- return { success: true };
88
- } catch (error) {
89
- new Logger().error("scaleway_tem_email_send_failed", {
90
- context: request.context ?? "email",
91
- error: error instanceof Error ? error.message : error
92
- });
93
- return {
94
- success: false,
95
- error,
96
- errorMessage: "Failed to send email via Scaleway."
97
- };
98
- }
99
- };
100
- var __internal = {
101
- resetCaches() {
102
- cachedClient = null;
103
- cachedConfig = null;
104
- apiFactory = (client) => new Temv1alpha1.API(client);
105
- },
106
- setApiFactory(factory) {
107
- apiFactory = factory;
108
- },
109
- setClient(client) {
110
- cachedClient = client;
111
- }
112
- };
113
-
114
- // src/libs/email/utils.ts
115
- var escapeHtml = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;");
116
- var formatMultilineHtml = (value) => escapeHtml(value).replaceAll(`
117
- `, "<br />");
118
-
119
- // src/libs/email/waitlist.ts
120
- "use server";
121
- var WAITLIST_MISSING_CONFIG = "Waitlist service is not configured. Please try again later.";
122
- var WAITLIST_SEND_ERROR = "Failed to join waitlist. Please try again later or contact us directly.";
123
- var joinWaitlist = async (formData) => {
124
- const email = (formData.get("email") ?? "").toString().trim();
125
- if (!email || !email.includes("@")) {
126
- return {
127
- success: false,
128
- text: "Please enter a valid email address."
129
- };
130
- }
131
- const configResult = getEmailConfig();
132
- if (!configResult.ok || !configResult.config) {
133
- return {
134
- success: false,
135
- text: configResult.errorMessage ?? WAITLIST_MISSING_CONFIG
136
- };
137
- }
138
- const waitlistText = `
139
- You're on the waitlist!
140
-
141
- Thanks for joining the ContractSpec waitlist. You're now in line for early access to:
142
-
143
- • Stabilize your AI-generated code with ContractSpec
144
- • Multi-surface consistency (API, DB, UI, events)
145
- • Safe regeneration without breaking changes
146
- • AI governance and contract enforcement
147
-
148
- We'll notify you as soon as early access is available. In the meantime, you can:
149
-
150
- • Check out our docs: https://contractspec.io/docs
151
- • Follow our progress on GitHub
152
- • Book a demo call to see ContractSpec in action
153
-
154
- We're excited to have you on board!
155
-
156
- ---
157
- ContractSpec Team
158
- https://contractspec.io
159
-
160
- To remove yourself from the waitlist, reply to this email with "remove"
161
- `.trim();
162
- const waitlistHtml = `
163
- <div style="font-family: sans-serif; max-width: 640px; margin: 0 auto;">
164
- <h1 style="color: #8b5cf6;">You're on the waitlist!</h1>
165
- <p>Thanks for joining the ContractSpec waitlist. You're now in line for early access to:</p>
166
- <ul style="line-height: 1.8;">
167
- <li>Stabilize your AI-generated code with ContractSpec</li>
168
- <li>Multi-surface consistency (API, DB, UI, events)</li>
169
- <li>Safe regeneration without breaking changes</li>
170
- <li>AI governance and contract enforcement</li>
171
- </ul>
172
- <p>We'll notify you as soon as early access is available. In the meantime, you can:</p>
173
- <ul style="line-height: 1.8;">
174
- <li>Check out our <a href="https://contractspec.io/docs" style="color: #8b5cf6;">docs</a></li>
175
- <li>Follow our progress on GitHub</li>
176
- <li>Book a demo call to see ContractSpec in action</li>
177
- </ul>
178
- <p>We're excited to have you on board!</p>
179
- <hr style="margin: 30px 0; border: none; border-top: 1px solid #e5e7eb;" />
180
- <p style="color: #6b7280; font-size: 14px;">
181
- ContractSpec Team<br />
182
- <a href="https://contractspec.io" style="color: #8b5cf6;">contractspec.io</a>
183
- </p>
184
- <p style="color: #9ca3af; font-size: 12px;">
185
- To remove yourself from the waitlist, reply to this email with "remove"
186
- </p>
187
- </div>
188
- `;
189
- const userSend = await sendEmail(configResult.config, {
190
- to: [{ email }],
191
- subject: "You're on the ContractSpec waitlist!",
192
- text: waitlistText,
193
- html: waitlistHtml,
194
- context: "waitlist-welcome"
195
- });
196
- if (!userSend.success) {
197
- return { success: false, text: WAITLIST_SEND_ERROR };
198
- }
199
- const teamNotificationText = `New waitlist signup from: ${email}`;
200
- const teamNotificationHtml = `
201
- <div style="font-family: sans-serif; max-width: 640px; margin: 0 auto;">
202
- <p style="margin: 0 0 8px;">New waitlist signup</p>
203
- <p style="margin: 0;"><strong>Email:</strong> ${formatMultilineHtml(email)}</p>
204
- </div>
205
- `;
206
- const teamSend = await sendEmail(configResult.config, {
207
- to: [configResult.config.teamInbox],
208
- subject: `New Waitlist Signup: ${email}`,
209
- text: teamNotificationText,
210
- html: teamNotificationHtml,
211
- context: "waitlist-team-notification"
212
- });
213
- if (!teamSend.success) {
214
- return { success: false, text: WAITLIST_SEND_ERROR };
215
- }
216
- return { success: true, text: "Successfully joined waitlist!" };
217
- };
218
-
219
- // src/libs/email/waitlist-application.ts
220
- "use server";
221
- var APPLICATION_MISSING_CONFIG = "Waitlist application service is not configured. Please try again later.";
222
- var APPLICATION_SEND_ERROR = "Failed to submit application. Please try again later or contact us directly.";
223
- var submitWaitlistApplication = async (formData) => {
224
- const email = (formData.get("email") ?? "").toString().trim();
225
- const name = (formData.get("name") ?? "").toString().trim();
226
- const company = (formData.get("company") ?? "").toString().trim();
227
- const role = (formData.get("role") ?? "").toString().trim();
228
- const useCase = (formData.get("useCase") ?? "").toString().trim();
229
- const currentStack = (formData.get("currentStack") ?? "").toString().trim();
230
- const whatBuilding = (formData.get("whatBuilding") ?? "").toString().trim();
231
- const whatSolving = (formData.get("whatSolving") ?? "").toString().trim();
232
- const teamSize = (formData.get("teamSize") ?? "").toString().trim();
233
- const timeline = (formData.get("timeline") ?? "").toString().trim();
234
- const openToSessions = formData.get("openToSessions") === "on";
235
- const okayWithCaseStudies = formData.get("okayWithCaseStudies") === "on";
236
- if (!email || !email.includes("@")) {
237
- return {
238
- success: false,
239
- text: "Please enter a valid email address."
240
- };
241
- }
242
- if (!name || !whatBuilding || !whatSolving) {
243
- return {
244
- success: false,
245
- text: "Please fill in all required fields."
246
- };
247
- }
248
- const configResult = getEmailConfig();
249
- if (!configResult.ok || !configResult.config) {
250
- return {
251
- success: false,
252
- text: configResult.errorMessage ?? APPLICATION_MISSING_CONFIG
253
- };
254
- }
255
- const applicantText = `
256
- You're on the list.
257
-
258
- 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.
259
-
260
- What happens next:
261
- • We review applications weekly
262
- • If selected, we'll reach out via email to schedule an intro call
263
- • During early access, you'll get hands-on support and influence over the roadmap
264
-
265
- In the meantime:
266
- • Check out our docs: https://contractspec.io/docs
267
- • Book a demo call: https://contractspec.io/contact
268
-
269
- We're excited about the possibility of working together!
270
-
271
- ---
272
- ContractSpec Team
273
- https://contractspec.io
274
- `.trim();
275
- const applicantHtml = `
276
- <div style="font-family: sans-serif; max-width: 640px; margin: 0 auto;">
277
- <h1 style="color: #8b5cf6;">You're on the list.</h1>
278
- <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>
279
- <h2 style="color: #8b5cf6; margin-top: 24px;">What happens next:</h2>
280
- <ul style="line-height: 1.8;">
281
- <li>We review applications weekly</li>
282
- <li>If selected, we'll reach out via email to schedule an intro call</li>
283
- <li>During early access, you'll get hands-on support and influence over the roadmap</li>
284
- </ul>
285
- <h2 style="color: #8b5cf6; margin-top: 24px;">In the meantime:</h2>
286
- <ul style="line-height: 1.8;">
287
- <li>Check out our <a href="https://contractspec.io/docs" style="color: #8b5cf6;">docs</a></li>
288
- <li>Book a demo call: <a href="https://contractspec.io/contact" style="color: #8b5cf6;">contractspec.io/contact</a></li>
289
- </ul>
290
- <p>We're excited about the possibility of working together!</p>
291
- <hr style="margin: 30px 0; border: none; border-top: 1px solid #e5e7eb;" />
292
- <p style="color: #6b7280; font-size: 14px;">
293
- ContractSpec Team<br />
294
- <a href="https://contractspec.io" style="color: #8b5cf6;">contractspec.io</a>
295
- </p>
296
- </div>
297
- `;
298
- const applicantSend = await sendEmail(configResult.config, {
299
- to: [{ email }],
300
- subject: "You're on the ContractSpec design partner waitlist!",
301
- text: applicantText,
302
- html: applicantHtml,
303
- context: "waitlist-application-welcome"
304
- });
305
- if (!applicantSend.success) {
306
- return { success: false, text: APPLICATION_SEND_ERROR };
307
- }
308
- const preferencesText = `
309
- Open to 1:1 product/design sessions: ${openToSessions ? "Yes" : "No"}
310
- Okay with anonymized case studies: ${okayWithCaseStudies ? "Yes" : "No"}
311
- `.trim();
312
- const teamEmailText = `
313
- New Design Partner Waitlist Application
314
-
315
- Contact Information:
316
- - Name: ${name}
317
- - Email: ${email}
318
- ${company ? `- Company/Project: ${company}` : ""}
319
- ${role ? `- Role: ${role}` : ""}
320
-
321
- Application Details:
322
- - What are you building with AI today?
323
- ${whatBuilding}
324
-
325
- - What do you hope ContractSpec will solve for you?
326
- ${whatSolving}
327
-
328
- - Primary use case: ${useCase || "Not specified"}
329
- - Current stack: ${currentStack || "Not specified"}
330
- - Team Size: ${teamSize || "Not specified"}
331
- - Timeline: ${timeline || "Not specified"}
332
-
333
- Preferences:
334
- - Open to 1:1 product/design sessions: ${openToSessions ? "Yes" : "No"}
335
- - Okay with anonymized case studies: ${okayWithCaseStudies ? "Yes" : "No"}
336
-
337
- ---
338
- Submitted via ContractSpec waitlist application form
339
- `.trim();
340
- const teamEmailHtml = `
341
- <div style="font-family: sans-serif; max-width: 720px; margin: 0 auto;">
342
- <h1 style="color: #8b5cf6;">New Design Partner Waitlist Application</h1>
343
- <h2 style="color: #8b5cf6; margin: 16px 0 8px;">Contact Information</h2>
344
- <ul style="padding-left: 16px; line-height: 1.6; margin: 0 0 16px;">
345
- <li>Name: ${escapeHtml(name)}</li>
346
- <li>Email: ${escapeHtml(email)}</li>
347
- ${company ? `<li>Company/Project: ${escapeHtml(company)}</li>` : ""}
348
- ${role ? `<li>Role: ${escapeHtml(role)}</li>` : ""}
349
- </ul>
350
- <h2 style="color: #8b5cf6; margin: 16px 0 8px;">Application Details</h2>
351
- <p style="margin: 0 0 8px; font-weight: 600;">What are you building with AI today?</p>
352
- <div style="border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px; background: #f9fafb; white-space: pre-wrap; line-height: 1.6;">
353
- ${formatMultilineHtml(whatBuilding)}
354
- </div>
355
- <p style="margin: 16px 0 8px; font-weight: 600;">What do you hope ContractSpec will solve for you?</p>
356
- <div style="border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px; background: #f9fafb; white-space: pre-wrap; line-height: 1.6;">
357
- ${formatMultilineHtml(whatSolving)}
358
- </div>
359
- <ul style="padding-left: 16px; line-height: 1.6; margin: 16px 0;">
360
- <li>Primary use case: ${escapeHtml(useCase || "Not specified")}</li>
361
- <li>Current stack: ${escapeHtml(currentStack || "Not specified")}</li>
362
- <li>Team Size: ${escapeHtml(teamSize || "Not specified")}</li>
363
- <li>Timeline: ${escapeHtml(timeline || "Not specified")}</li>
364
- </ul>
365
- <h2 style="color: #8b5cf6; margin: 16px 0 8px;">Preferences</h2>
366
- <div style="border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px; background: #f9fafb; line-height: 1.6;">
367
- ${formatMultilineHtml(preferencesText)}
368
- </div>
369
- <p style="color: #6b7280; font-size: 12px; margin-top: 20px;">Submitted via ContractSpec waitlist application form</p>
370
- </div>
371
- `;
372
- const teamSend = await sendEmail(configResult.config, {
373
- to: [configResult.config.teamInbox],
374
- subject: `New Design Partner Application: ${name} (${email})`,
375
- text: teamEmailText,
376
- html: teamEmailHtml,
377
- replyTo: email,
378
- context: "waitlist-application-team-notification"
379
- });
380
- if (!teamSend.success) {
381
- return { success: false, text: APPLICATION_SEND_ERROR };
382
- }
383
- return {
384
- success: true,
385
- text: "Application submitted successfully!"
386
- };
387
- };
388
-
389
- // src/components/marketing/waitlist-section.tsx
390
- import { useEffect, useState } from "react";
391
- import { useForm } from "react-hook-form";
392
- import { zodResolver } from "@hookform/resolvers/zod";
393
- import z from "zod";
394
- import { AlertCircle, CheckCircle } from "lucide-react";
395
- import { Button } from "@contractspec/lib.design-system";
396
- import { Textarea } from "@contractspec/lib.design-system";
397
- import { Label } from "@contractspec/lib.ui-kit-web/ui/label";
398
- import {
399
- Select,
400
- SelectContent,
401
- SelectItem,
402
- SelectTrigger,
403
- SelectValue
404
- } from "@contractspec/lib.ui-kit-web/ui/select";
405
- import { Checkbox } from "@contractspec/lib.ui-kit-web/ui/checkbox";
406
- import { Switch } from "@contractspec/lib.ui-kit-web/ui/switch";
407
- import { Input } from "@contractspec/lib.design-system";
408
- import { jsxDEV, Fragment } from "react/jsx-dev-runtime";
409
- "use client";
410
- var simpleWaitlistSchema = z.object({
411
- email: z.email("Please enter a valid email address")
412
- });
413
- var designPartnerSchema = z.object({
414
- name: z.string().min(1, "Name is required"),
415
- email: z.email("Please enter a valid email address"),
416
- company: z.string().optional(),
417
- role: z.string().optional(),
418
- useCase: z.string().optional(),
419
- currentStack: z.string().optional(),
420
- whatBuilding: z.string().min(1, "Please tell us what you are building"),
421
- whatSolving: z.string().min(1, "Please tell us what ContractSpec will solve for you"),
422
- teamSize: z.string().optional(),
423
- timeline: z.string().optional(),
424
- openToSessions: z.boolean().default(false),
425
- okayWithCaseStudies: z.boolean().default(false)
426
- });
427
- function WaitlistSection({
428
- variant = "default",
429
- context = "pricing"
430
- }) {
431
- const [isDesignPartner, setIsDesignPartner] = useState(false);
432
- const [submitResult, setSubmitResult] = useState(null);
433
- const [isPending, setIsPending] = useState(false);
434
- const simpleForm = useForm({
435
- resolver: zodResolver(simpleWaitlistSchema),
436
- defaultValues: {
437
- email: ""
438
- }
439
- });
440
- const designPartnerForm = useForm({
441
- resolver: zodResolver(designPartnerSchema),
442
- defaultValues: {
443
- name: "",
444
- email: "",
445
- company: "",
446
- role: "",
447
- useCase: "",
448
- currentStack: "",
449
- whatBuilding: "",
450
- whatSolving: "",
451
- teamSize: "",
452
- timeline: "",
453
- openToSessions: false,
454
- okayWithCaseStudies: false
455
- }
456
- });
457
- const simpleEmail = simpleForm.watch("email");
458
- const designPartnerEmail = designPartnerForm.watch("email");
459
- useEffect(() => {
460
- const currentDesignPartnerEmail = designPartnerForm.getValues("email");
461
- if (simpleEmail && simpleEmail !== currentDesignPartnerEmail) {
462
- designPartnerForm.setValue("email", simpleEmail, { shouldDirty: false });
463
- }
464
- }, [simpleEmail, designPartnerForm]);
465
- useEffect(() => {
466
- const currentSimpleEmail = simpleForm.getValues("email");
467
- if (designPartnerEmail && designPartnerEmail !== currentSimpleEmail) {
468
- simpleForm.setValue("email", designPartnerEmail, { shouldDirty: false });
469
- }
470
- }, [designPartnerEmail, simpleForm]);
471
- const handleSimpleSubmit = async (data) => {
472
- setIsPending(true);
473
- setSubmitResult(null);
474
- try {
475
- const formData = new FormData;
476
- formData.set("email", data.email);
477
- const result = await joinWaitlist(formData);
478
- if (result.success) {
479
- setSubmitResult({
480
- success: true,
481
- text: "Thanks for joining the waitlist! Check your inbox for a confirmation."
482
- });
483
- simpleForm.reset();
484
- } else {
485
- setSubmitResult({
486
- success: false,
487
- text: result.text || "Failed to join waitlist. Please try again."
488
- });
489
- }
490
- } catch (_error) {
491
- setSubmitResult({
492
- success: false,
493
- text: "Failed to join waitlist. Please try again."
494
- });
495
- } finally {
496
- setIsPending(false);
497
- }
498
- };
499
- const handleDesignPartnerSubmit = async (data) => {
500
- setIsPending(true);
501
- setSubmitResult(null);
502
- try {
503
- const formData = new FormData;
504
- formData.set("email", data.email);
505
- formData.set("name", data.name);
506
- if (data.company)
507
- formData.set("company", data.company);
508
- if (data.role)
509
- formData.set("role", data.role);
510
- if (data.useCase)
511
- formData.set("useCase", data.useCase);
512
- if (data.currentStack)
513
- formData.set("currentStack", data.currentStack);
514
- formData.set("whatBuilding", data.whatBuilding);
515
- formData.set("whatSolving", data.whatSolving);
516
- if (data.teamSize)
517
- formData.set("teamSize", data.teamSize);
518
- if (data.timeline)
519
- formData.set("timeline", data.timeline);
520
- if (data.openToSessions)
521
- formData.set("openToSessions", "on");
522
- if (data.okayWithCaseStudies)
523
- formData.set("okayWithCaseStudies", "on");
524
- const result = await submitWaitlistApplication(formData);
525
- if (result.success) {
526
- setSubmitResult({
527
- success: true,
528
- 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."
529
- });
530
- designPartnerForm.reset();
531
- } else {
532
- setSubmitResult({
533
- success: false,
534
- text: result.text || "Failed to submit application. Please try again."
535
- });
536
- }
537
- } catch (_error) {
538
- setSubmitResult({
539
- success: false,
540
- text: "Failed to submit application. Please try again."
541
- });
542
- } finally {
543
- setIsPending(false);
544
- }
545
- };
546
- const onSubmit = isDesignPartner ? designPartnerForm.handleSubmit(handleDesignPartnerSubmit) : simpleForm.handleSubmit(handleSimpleSubmit);
547
- const isCompact = variant === "compact";
548
- return /* @__PURE__ */ jsxDEV("div", {
549
- id: "waitlist",
550
- className: isCompact ? "space-y-4" : "card-subtle space-y-6 p-8",
551
- children: [
552
- !isCompact && /* @__PURE__ */ jsxDEV("div", {
553
- className: "space-y-4",
554
- children: [
555
- /* @__PURE__ */ jsxDEV("div", {
556
- className: "inline-flex items-center gap-2 rounded-full border border-violet-500/20 bg-violet-500/10 px-3 py-1",
557
- children: /* @__PURE__ */ jsxDEV("span", {
558
- className: "text-sm font-medium text-violet-300",
559
- children: isDesignPartner ? "Design Partner Waitlist" : "Join the Waitlist"
560
- }, undefined, false, undefined, this)
561
- }, undefined, false, undefined, this),
562
- /* @__PURE__ */ jsxDEV("h2", {
563
- className: "text-2xl font-bold",
564
- children: isDesignPartner ? "Apply for early access to ContractSpec" : "Get early access to ContractSpec"
565
- }, undefined, false, undefined, this),
566
- /* @__PURE__ */ jsxDEV("p", {
567
- className: "text-muted-foreground text-sm",
568
- 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."
569
- }, undefined, false, undefined, this)
570
- ]
571
- }, undefined, true, undefined, this),
572
- !isCompact && /* @__PURE__ */ jsxDEV("div", {
573
- className: "border-border bg-muted/20 flex items-center justify-between gap-4 rounded-lg border p-4",
574
- children: [
575
- /* @__PURE__ */ jsxDEV("div", {
576
- className: "space-y-1",
577
- children: [
578
- /* @__PURE__ */ jsxDEV(Label, {
579
- htmlFor: "design-partner-toggle",
580
- className: "text-sm font-medium",
581
- children: "Apply as a design partner"
582
- }, undefined, false, undefined, this),
583
- /* @__PURE__ */ jsxDEV("p", {
584
- className: "text-muted-foreground text-xs",
585
- children: isDesignPartner ? "Get hands-on support, influence the roadmap, and founding discount" : "Get priority access, 1:1 onboarding, and help shape ContractSpec"
586
- }, undefined, false, undefined, this)
587
- ]
588
- }, undefined, true, undefined, this),
589
- /* @__PURE__ */ jsxDEV(Switch, {
590
- id: "design-partner-toggle",
591
- checked: isDesignPartner,
592
- onCheckedChange: setIsDesignPartner,
593
- disabled: isPending || submitResult?.success
594
- }, undefined, false, undefined, this)
595
- ]
596
- }, undefined, true, undefined, this),
597
- !isCompact && isDesignPartner && /* @__PURE__ */ jsxDEV("div", {
598
- className: "space-y-2",
599
- children: [
600
- /* @__PURE__ */ jsxDEV("p", {
601
- className: "text-sm font-medium",
602
- children: "Benefits:"
603
- }, undefined, false, undefined, this),
604
- /* @__PURE__ */ jsxDEV("ul", {
605
- className: "text-muted-foreground space-y-1 text-sm",
606
- children: [
607
- /* @__PURE__ */ jsxDEV("li", {
608
- children: "• Early access to ContractSpec Studio"
609
- }, undefined, false, undefined, this),
610
- /* @__PURE__ */ jsxDEV("li", {
611
- children: "• 1:1 onboarding and architecture sessions"
612
- }, undefined, false, undefined, this),
613
- /* @__PURE__ */ jsxDEV("li", {
614
- children: "• Priority support via direct channels"
615
- }, undefined, false, undefined, this),
616
- /* @__PURE__ */ jsxDEV("li", {
617
- children: "• Influence over roadmap and features"
618
- }, undefined, false, undefined, this),
619
- /* @__PURE__ */ jsxDEV("li", {
620
- children: "• Founding discount when paid plans launch"
621
- }, undefined, false, undefined, this)
622
- ]
623
- }, undefined, true, undefined, this)
624
- ]
625
- }, undefined, true, undefined, this),
626
- /* @__PURE__ */ jsxDEV("form", {
627
- onSubmit,
628
- className: "space-y-4",
629
- children: [
630
- isDesignPartner ? /* @__PURE__ */ jsxDEV(Fragment, {
631
- children: [
632
- /* @__PURE__ */ jsxDEV("div", {
633
- className: "grid gap-4 md:grid-cols-2",
634
- children: [
635
- /* @__PURE__ */ jsxDEV("div", {
636
- className: "space-y-2",
637
- children: [
638
- /* @__PURE__ */ jsxDEV(Label, {
639
- htmlFor: "waitlist-name",
640
- className: "text-sm font-medium",
641
- children: [
642
- "Name ",
643
- /* @__PURE__ */ jsxDEV("span", {
644
- className: "text-red-400",
645
- children: "*"
646
- }, undefined, false, undefined, this)
647
- ]
648
- }, undefined, true, undefined, this),
649
- /* @__PURE__ */ jsxDEV(Input, {
650
- id: "waitlist-name",
651
- ...designPartnerForm.register("name"),
652
- type: "text",
653
- placeholder: "Your name",
654
- disabled: isPending || submitResult?.success
655
- }, undefined, false, undefined, this),
656
- designPartnerForm.formState.errors.name && /* @__PURE__ */ jsxDEV("p", {
657
- className: "text-xs text-red-400",
658
- children: designPartnerForm.formState.errors.name.message
659
- }, undefined, false, undefined, this)
660
- ]
661
- }, undefined, true, undefined, this),
662
- /* @__PURE__ */ jsxDEV("div", {
663
- className: "space-y-2",
664
- children: [
665
- /* @__PURE__ */ jsxDEV(Label, {
666
- htmlFor: "waitlist-email",
667
- className: "text-sm font-medium",
668
- children: [
669
- "Email ",
670
- /* @__PURE__ */ jsxDEV("span", {
671
- className: "text-red-400",
672
- children: "*"
673
- }, undefined, false, undefined, this)
674
- ]
675
- }, undefined, true, undefined, this),
676
- /* @__PURE__ */ jsxDEV(Input, {
677
- id: "waitlist-email",
678
- ...designPartnerForm.register("email"),
679
- type: "email",
680
- placeholder: "your@email.com",
681
- disabled: isPending || submitResult?.success
682
- }, undefined, false, undefined, this),
683
- designPartnerForm.formState.errors.email && /* @__PURE__ */ jsxDEV("p", {
684
- className: "text-xs text-red-400",
685
- children: designPartnerForm.formState.errors.email.message
686
- }, undefined, false, undefined, this)
687
- ]
688
- }, undefined, true, undefined, this)
689
- ]
690
- }, undefined, true, undefined, this),
691
- /* @__PURE__ */ jsxDEV("div", {
692
- className: "grid gap-4 md:grid-cols-2",
693
- children: [
694
- /* @__PURE__ */ jsxDEV("div", {
695
- className: "space-y-2",
696
- children: [
697
- /* @__PURE__ */ jsxDEV(Label, {
698
- htmlFor: "waitlist-company",
699
- className: "text-sm font-medium",
700
- children: "Company / Project Name"
701
- }, undefined, false, undefined, this),
702
- /* @__PURE__ */ jsxDEV(Input, {
703
- id: "waitlist-company",
704
- ...designPartnerForm.register("company"),
705
- type: "text",
706
- placeholder: "Your company or project",
707
- disabled: isPending || submitResult?.success
708
- }, undefined, false, undefined, this)
709
- ]
710
- }, undefined, true, undefined, this),
711
- /* @__PURE__ */ jsxDEV("div", {
712
- className: "space-y-2",
713
- children: [
714
- /* @__PURE__ */ jsxDEV(Label, {
715
- htmlFor: "waitlist-role",
716
- className: "text-sm font-medium",
717
- children: "Role"
718
- }, undefined, false, undefined, this),
719
- /* @__PURE__ */ jsxDEV(Select, {
720
- value: designPartnerForm.watch("role") || "",
721
- onValueChange: (value) => designPartnerForm.setValue("role", value),
722
- disabled: isPending || submitResult?.success,
723
- children: [
724
- /* @__PURE__ */ jsxDEV(SelectTrigger, {
725
- id: "waitlist-role",
726
- className: "w-full",
727
- children: /* @__PURE__ */ jsxDEV(SelectValue, {
728
- placeholder: "Select your role"
729
- }, undefined, false, undefined, this)
730
- }, undefined, false, undefined, this),
731
- /* @__PURE__ */ jsxDEV(SelectContent, {
732
- children: [
733
- /* @__PURE__ */ jsxDEV(SelectItem, {
734
- value: "founder",
735
- children: "Founder"
736
- }, undefined, false, undefined, this),
737
- /* @__PURE__ */ jsxDEV(SelectItem, {
738
- value: "cto",
739
- children: "CTO"
740
- }, undefined, false, undefined, this),
741
- /* @__PURE__ */ jsxDEV(SelectItem, {
742
- value: "lead-engineer",
743
- children: "Lead Engineer"
744
- }, undefined, false, undefined, this),
745
- /* @__PURE__ */ jsxDEV(SelectItem, {
746
- value: "engineer",
747
- children: "Engineer"
748
- }, undefined, false, undefined, this),
749
- /* @__PURE__ */ jsxDEV(SelectItem, {
750
- value: "product-manager",
751
- children: "Product Manager"
752
- }, undefined, false, undefined, this),
753
- /* @__PURE__ */ jsxDEV(SelectItem, {
754
- value: "other",
755
- children: "Other"
756
- }, undefined, false, undefined, this)
757
- ]
758
- }, undefined, true, undefined, this)
759
- ]
760
- }, undefined, true, undefined, this)
761
- ]
762
- }, undefined, true, undefined, this)
763
- ]
764
- }, undefined, true, undefined, this),
765
- /* @__PURE__ */ jsxDEV("div", {
766
- className: "grid gap-4 md:grid-cols-2",
767
- children: [
768
- /* @__PURE__ */ jsxDEV("div", {
769
- className: "space-y-2",
770
- children: [
771
- /* @__PURE__ */ jsxDEV(Label, {
772
- htmlFor: "waitlist-use-case",
773
- className: "text-sm font-medium",
774
- children: "Primary use case"
775
- }, undefined, false, undefined, this),
776
- /* @__PURE__ */ jsxDEV(Select, {
777
- value: designPartnerForm.watch("useCase") || "",
778
- onValueChange: (value) => designPartnerForm.setValue("useCase", value),
779
- disabled: isPending || submitResult?.success,
780
- children: [
781
- /* @__PURE__ */ jsxDEV(SelectTrigger, {
782
- id: "waitlist-use-case",
783
- className: "w-full",
784
- children: /* @__PURE__ */ jsxDEV(SelectValue, {
785
- placeholder: "Select a use case"
786
- }, undefined, false, undefined, this)
787
- }, undefined, false, undefined, this),
788
- /* @__PURE__ */ jsxDEV(SelectContent, {
789
- children: [
790
- /* @__PURE__ */ jsxDEV(SelectItem, {
791
- value: "api-platform",
792
- children: "API platform"
793
- }, undefined, false, undefined, this),
794
- /* @__PURE__ */ jsxDEV(SelectItem, {
795
- value: "ai-ops",
796
- children: "AI operations"
797
- }, undefined, false, undefined, this),
798
- /* @__PURE__ */ jsxDEV(SelectItem, {
799
- value: "integration-hub",
800
- children: "Integration hub"
801
- }, undefined, false, undefined, this),
802
- /* @__PURE__ */ jsxDEV(SelectItem, {
803
- value: "internal-tools",
804
- children: "Internal tools"
805
- }, undefined, false, undefined, this),
806
- /* @__PURE__ */ jsxDEV(SelectItem, {
807
- value: "data-pipelines",
808
- children: "Data pipelines"
809
- }, undefined, false, undefined, this),
810
- /* @__PURE__ */ jsxDEV(SelectItem, {
811
- value: "other",
812
- children: "Other"
813
- }, undefined, false, undefined, this)
814
- ]
815
- }, undefined, true, undefined, this)
816
- ]
817
- }, undefined, true, undefined, this)
818
- ]
819
- }, undefined, true, undefined, this),
820
- /* @__PURE__ */ jsxDEV("div", {
821
- className: "space-y-2",
822
- children: [
823
- /* @__PURE__ */ jsxDEV(Label, {
824
- htmlFor: "waitlist-current-stack",
825
- className: "text-sm font-medium",
826
- children: "Current stack"
827
- }, undefined, false, undefined, this),
828
- /* @__PURE__ */ jsxDEV(Input, {
829
- id: "waitlist-current-stack",
830
- ...designPartnerForm.register("currentStack"),
831
- type: "text",
832
- placeholder: "e.g. Next.js, Postgres, OpenAPI",
833
- disabled: isPending || submitResult?.success
834
- }, undefined, false, undefined, this)
835
- ]
836
- }, undefined, true, undefined, this)
837
- ]
838
- }, undefined, true, undefined, this),
839
- /* @__PURE__ */ jsxDEV("div", {
840
- className: "space-y-2",
841
- children: [
842
- /* @__PURE__ */ jsxDEV(Label, {
843
- htmlFor: "waitlist-what-building",
844
- className: "text-sm font-medium",
845
- children: [
846
- "What are you building with AI today?",
847
- " ",
848
- /* @__PURE__ */ jsxDEV("span", {
849
- className: "text-red-400",
850
- children: "*"
851
- }, undefined, false, undefined, this)
852
- ]
853
- }, undefined, true, undefined, this),
854
- /* @__PURE__ */ jsxDEV(Textarea, {
855
- id: "waitlist-what-building",
856
- ...designPartnerForm.register("whatBuilding"),
857
- placeholder: "Tell us about your project...",
858
- disabled: isPending || submitResult?.success,
859
- rows: 4
860
- }, undefined, false, undefined, this),
861
- designPartnerForm.formState.errors.whatBuilding && /* @__PURE__ */ jsxDEV("p", {
862
- className: "text-xs text-red-400",
863
- children: designPartnerForm.formState.errors.whatBuilding.message
864
- }, undefined, false, undefined, this)
865
- ]
866
- }, undefined, true, undefined, this),
867
- /* @__PURE__ */ jsxDEV("div", {
868
- className: "space-y-2",
869
- children: [
870
- /* @__PURE__ */ jsxDEV(Label, {
871
- htmlFor: "waitlist-what-solving",
872
- className: "text-sm font-medium",
873
- children: [
874
- "What do you hope ContractSpec will solve for you?",
875
- " ",
876
- /* @__PURE__ */ jsxDEV("span", {
877
- className: "text-red-400",
878
- children: "*"
879
- }, undefined, false, undefined, this)
880
- ]
881
- }, undefined, true, undefined, this),
882
- /* @__PURE__ */ jsxDEV(Textarea, {
883
- id: "waitlist-what-solving",
884
- ...designPartnerForm.register("whatSolving"),
885
- placeholder: "What problems are you trying to solve?",
886
- disabled: isPending || submitResult?.success,
887
- rows: 4
888
- }, undefined, false, undefined, this),
889
- designPartnerForm.formState.errors.whatSolving && /* @__PURE__ */ jsxDEV("p", {
890
- className: "text-xs text-red-400",
891
- children: designPartnerForm.formState.errors.whatSolving.message
892
- }, undefined, false, undefined, this)
893
- ]
894
- }, undefined, true, undefined, this),
895
- /* @__PURE__ */ jsxDEV("div", {
896
- className: "grid gap-4 md:grid-cols-2",
897
- children: [
898
- /* @__PURE__ */ jsxDEV("div", {
899
- className: "space-y-2",
900
- children: [
901
- /* @__PURE__ */ jsxDEV(Label, {
902
- htmlFor: "waitlist-team-size",
903
- className: "text-sm font-medium",
904
- children: "Team Size"
905
- }, undefined, false, undefined, this),
906
- /* @__PURE__ */ jsxDEV(Select, {
907
- value: designPartnerForm.watch("teamSize") || "",
908
- onValueChange: (value) => designPartnerForm.setValue("teamSize", value),
909
- disabled: isPending || submitResult?.success,
910
- children: [
911
- /* @__PURE__ */ jsxDEV(SelectTrigger, {
912
- id: "waitlist-team-size",
913
- className: "w-full",
914
- children: /* @__PURE__ */ jsxDEV(SelectValue, {
915
- placeholder: "Select team size"
916
- }, undefined, false, undefined, this)
917
- }, undefined, false, undefined, this),
918
- /* @__PURE__ */ jsxDEV(SelectContent, {
919
- children: [
920
- /* @__PURE__ */ jsxDEV(SelectItem, {
921
- value: "solo",
922
- children: "Solo"
923
- }, undefined, false, undefined, this),
924
- /* @__PURE__ */ jsxDEV(SelectItem, {
925
- value: "2-5",
926
- children: "2-5"
927
- }, undefined, false, undefined, this),
928
- /* @__PURE__ */ jsxDEV(SelectItem, {
929
- value: "6-20",
930
- children: "6-20"
931
- }, undefined, false, undefined, this),
932
- /* @__PURE__ */ jsxDEV(SelectItem, {
933
- value: "20+",
934
- children: "20+"
935
- }, undefined, false, undefined, this)
936
- ]
937
- }, undefined, true, undefined, this)
938
- ]
939
- }, undefined, true, undefined, this)
940
- ]
941
- }, undefined, true, undefined, this),
942
- /* @__PURE__ */ jsxDEV("div", {
943
- className: "space-y-2",
944
- children: [
945
- /* @__PURE__ */ jsxDEV(Label, {
946
- htmlFor: "waitlist-timeline",
947
- className: "text-sm font-medium",
948
- children: "Timeline"
949
- }, undefined, false, undefined, this),
950
- /* @__PURE__ */ jsxDEV(Select, {
951
- value: designPartnerForm.watch("timeline") || "",
952
- onValueChange: (value) => designPartnerForm.setValue("timeline", value),
953
- disabled: isPending || submitResult?.success,
954
- children: [
955
- /* @__PURE__ */ jsxDEV(SelectTrigger, {
956
- id: "waitlist-timeline",
957
- className: "w-full",
958
- children: /* @__PURE__ */ jsxDEV(SelectValue, {
959
- placeholder: "Select timeline"
960
- }, undefined, false, undefined, this)
961
- }, undefined, false, undefined, this),
962
- /* @__PURE__ */ jsxDEV(SelectContent, {
963
- children: [
964
- /* @__PURE__ */ jsxDEV(SelectItem, {
965
- value: "now",
966
- children: "Now"
967
- }, undefined, false, undefined, this),
968
- /* @__PURE__ */ jsxDEV(SelectItem, {
969
- value: "1-3-months",
970
- children: "1-3 months"
971
- }, undefined, false, undefined, this),
972
- /* @__PURE__ */ jsxDEV(SelectItem, {
973
- value: "3-6-months",
974
- children: "3-6 months"
975
- }, undefined, false, undefined, this),
976
- /* @__PURE__ */ jsxDEV(SelectItem, {
977
- value: "exploring",
978
- children: "Exploring"
979
- }, undefined, false, undefined, this)
980
- ]
981
- }, undefined, true, undefined, this)
982
- ]
983
- }, undefined, true, undefined, this)
984
- ]
985
- }, undefined, true, undefined, this)
986
- ]
987
- }, undefined, true, undefined, this),
988
- /* @__PURE__ */ jsxDEV("div", {
989
- className: "space-y-3",
990
- children: [
991
- /* @__PURE__ */ jsxDEV("div", {
992
- className: "flex items-start gap-3",
993
- children: [
994
- /* @__PURE__ */ jsxDEV(Checkbox, {
995
- id: "waitlist-open-to-sessions",
996
- checked: designPartnerForm.watch("openToSessions"),
997
- onCheckedChange: (checked) => designPartnerForm.setValue("openToSessions", checked === true),
998
- disabled: isPending || submitResult?.success
999
- }, undefined, false, undefined, this),
1000
- /* @__PURE__ */ jsxDEV(Label, {
1001
- htmlFor: "waitlist-open-to-sessions",
1002
- className: "cursor-pointer text-sm leading-relaxed",
1003
- children: "I'm open to 1:1 product/design sessions"
1004
- }, undefined, false, undefined, this)
1005
- ]
1006
- }, undefined, true, undefined, this),
1007
- /* @__PURE__ */ jsxDEV("div", {
1008
- className: "flex items-start gap-3",
1009
- children: [
1010
- /* @__PURE__ */ jsxDEV(Checkbox, {
1011
- id: "waitlist-case-studies",
1012
- checked: designPartnerForm.watch("okayWithCaseStudies"),
1013
- onCheckedChange: (checked) => designPartnerForm.setValue("okayWithCaseStudies", checked === true),
1014
- disabled: isPending || submitResult?.success
1015
- }, undefined, false, undefined, this),
1016
- /* @__PURE__ */ jsxDEV(Label, {
1017
- htmlFor: "waitlist-case-studies",
1018
- className: "cursor-pointer text-sm leading-relaxed",
1019
- children: "I'm okay with anonymized case studies about our usage"
1020
- }, undefined, false, undefined, this)
1021
- ]
1022
- }, undefined, true, undefined, this)
1023
- ]
1024
- }, undefined, true, undefined, this)
1025
- ]
1026
- }, undefined, true, undefined, this) : /* @__PURE__ */ jsxDEV("div", {
1027
- className: "space-y-2",
1028
- children: [
1029
- /* @__PURE__ */ jsxDEV(Label, {
1030
- htmlFor: "waitlist-email",
1031
- className: "text-sm font-medium",
1032
- children: [
1033
- "Email ",
1034
- /* @__PURE__ */ jsxDEV("span", {
1035
- className: "text-red-400",
1036
- children: "*"
1037
- }, undefined, false, undefined, this)
1038
- ]
1039
- }, undefined, true, undefined, this),
1040
- /* @__PURE__ */ jsxDEV(Input, {
1041
- id: "waitlist-email",
1042
- ...simpleForm.register("email"),
1043
- type: "email",
1044
- placeholder: "your@email.com",
1045
- disabled: isPending || submitResult?.success
1046
- }, undefined, false, undefined, this),
1047
- simpleForm.formState.errors.email && /* @__PURE__ */ jsxDEV("p", {
1048
- className: "text-xs text-red-400",
1049
- children: simpleForm.formState.errors.email.message
1050
- }, undefined, false, undefined, this)
1051
- ]
1052
- }, undefined, true, undefined, this),
1053
- submitResult && !isPending && /* @__PURE__ */ jsxDEV("div", {
1054
- 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"}`,
1055
- children: [
1056
- submitResult.success ? /* @__PURE__ */ jsxDEV(CheckCircle, {
1057
- size: 20,
1058
- className: "mt-0.5 shrink-0"
1059
- }, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV(AlertCircle, {
1060
- size: 20,
1061
- className: "mt-0.5 shrink-0"
1062
- }, undefined, false, undefined, this),
1063
- /* @__PURE__ */ jsxDEV("div", {
1064
- className: "flex-1",
1065
- children: submitResult.success ? /* @__PURE__ */ jsxDEV(Fragment, {
1066
- children: [
1067
- /* @__PURE__ */ jsxDEV("p", {
1068
- className: "mb-1 font-semibold",
1069
- children: "You're on the list."
1070
- }, undefined, false, undefined, this),
1071
- /* @__PURE__ */ jsxDEV("p", {
1072
- className: "text-sm",
1073
- children: submitResult.text
1074
- }, undefined, false, undefined, this)
1075
- ]
1076
- }, undefined, true, undefined, this) : /* @__PURE__ */ jsxDEV("p", {
1077
- children: submitResult.text
1078
- }, undefined, false, undefined, this)
1079
- }, undefined, false, undefined, this)
1080
- ]
1081
- }, undefined, true, undefined, this),
1082
- /* @__PURE__ */ jsxDEV(Button, {
1083
- type: "submit",
1084
- disabled: isPending || submitResult?.success,
1085
- className: "w-full",
1086
- children: isPending ? "Submitting..." : isDesignPartner ? "Apply to the waitlist" : "Join waitlist"
1087
- }, undefined, false, undefined, this),
1088
- /* @__PURE__ */ jsxDEV("p", {
1089
- className: "text-muted-foreground text-center text-xs",
1090
- children: "No spam. We'll only email you about ContractSpec and your application."
1091
- }, undefined, false, undefined, this)
1092
- ]
1093
- }, undefined, true, undefined, this)
1094
- ]
1095
- }, undefined, true, undefined, this);
1096
- }
1097
- export {
1098
- WaitlistSection
1099
- };