@contractspec/bundle.marketing 1.12.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.
- package/.turbo/turbo-build$colon$types.log +1 -0
- package/.turbo/turbo-build.log +175 -0
- package/.turbo/turbo-lint.log +3 -0
- package/AGENTS.md +36 -0
- package/CHANGELOG.md +416 -0
- package/README.md +57 -0
- package/dist/components/marketing/ChangelogPage.d.ts +21 -0
- package/dist/components/marketing/ChangelogPage.d.ts.map +1 -0
- package/dist/components/marketing/ChangelogPage.js +65 -0
- package/dist/components/marketing/ChangelogPage.js.map +1 -0
- package/dist/components/marketing/CofounderPage.d.ts +7 -0
- package/dist/components/marketing/CofounderPage.d.ts.map +1 -0
- package/dist/components/marketing/CofounderPage.js +468 -0
- package/dist/components/marketing/CofounderPage.js.map +1 -0
- package/dist/components/marketing/ContactClient.d.ts +7 -0
- package/dist/components/marketing/ContactClient.d.ts.map +1 -0
- package/dist/components/marketing/ContactClient.js +158 -0
- package/dist/components/marketing/ContactClient.js.map +1 -0
- package/dist/components/marketing/ContributePage.d.ts +9 -0
- package/dist/components/marketing/ContributePage.d.ts.map +1 -0
- package/dist/components/marketing/ContributePage.js +362 -0
- package/dist/components/marketing/ContributePage.js.map +1 -0
- package/dist/components/marketing/DesignPartnerPage.d.ts +9 -0
- package/dist/components/marketing/DesignPartnerPage.d.ts.map +1 -0
- package/dist/components/marketing/DesignPartnerPage.js +215 -0
- package/dist/components/marketing/DesignPartnerPage.js.map +1 -0
- package/dist/components/marketing/LandingPage.d.ts +7 -0
- package/dist/components/marketing/LandingPage.d.ts.map +1 -0
- package/dist/components/marketing/LandingPage.js +38 -0
- package/dist/components/marketing/LandingPage.js.map +1 -0
- package/dist/components/marketing/PricingClient.d.ts +7 -0
- package/dist/components/marketing/PricingClient.d.ts.map +1 -0
- package/dist/components/marketing/PricingClient.js +521 -0
- package/dist/components/marketing/PricingClient.js.map +1 -0
- package/dist/components/marketing/ProductClientPage.d.ts +7 -0
- package/dist/components/marketing/ProductClientPage.d.ts.map +1 -0
- package/dist/components/marketing/ProductClientPage.js +460 -0
- package/dist/components/marketing/ProductClientPage.js.map +1 -0
- package/dist/components/marketing/index.d.ts +11 -0
- package/dist/components/marketing/index.js +12 -0
- package/dist/components/marketing/pricing-thinking-modal.d.ts +16 -0
- package/dist/components/marketing/pricing-thinking-modal.d.ts.map +1 -0
- package/dist/components/marketing/pricing-thinking-modal.js +202 -0
- package/dist/components/marketing/pricing-thinking-modal.js.map +1 -0
- package/dist/components/marketing/sections/AudienceSection.d.ts +7 -0
- package/dist/components/marketing/sections/AudienceSection.d.ts.map +1 -0
- package/dist/components/marketing/sections/AudienceSection.js +68 -0
- package/dist/components/marketing/sections/AudienceSection.js.map +1 -0
- package/dist/components/marketing/sections/CorePositioningSection.d.ts +7 -0
- package/dist/components/marketing/sections/CorePositioningSection.d.ts.map +1 -0
- package/dist/components/marketing/sections/CorePositioningSection.js +59 -0
- package/dist/components/marketing/sections/CorePositioningSection.js.map +1 -0
- package/dist/components/marketing/sections/CtaSection.d.ts +7 -0
- package/dist/components/marketing/sections/CtaSection.d.ts.map +1 -0
- package/dist/components/marketing/sections/CtaSection.js +54 -0
- package/dist/components/marketing/sections/CtaSection.js.map +1 -0
- package/dist/components/marketing/sections/DevelopersSection.d.ts +7 -0
- package/dist/components/marketing/sections/DevelopersSection.d.ts.map +1 -0
- package/dist/components/marketing/sections/DevelopersSection.js +45 -0
- package/dist/components/marketing/sections/DevelopersSection.js.map +1 -0
- package/dist/components/marketing/sections/FearsSection.d.ts +7 -0
- package/dist/components/marketing/sections/FearsSection.d.ts.map +1 -0
- package/dist/components/marketing/sections/FearsSection.js +48 -0
- package/dist/components/marketing/sections/FearsSection.js.map +1 -0
- package/dist/components/marketing/sections/HeroMarketingSection.d.ts +7 -0
- package/dist/components/marketing/sections/HeroMarketingSection.d.ts.map +1 -0
- package/dist/components/marketing/sections/HeroMarketingSection.js +77 -0
- package/dist/components/marketing/sections/HeroMarketingSection.js.map +1 -0
- package/dist/components/marketing/sections/IconGridSection.d.ts +45 -0
- package/dist/components/marketing/sections/IconGridSection.d.ts.map +1 -0
- package/dist/components/marketing/sections/IconGridSection.js +44 -0
- package/dist/components/marketing/sections/IconGridSection.js.map +1 -0
- package/dist/components/marketing/sections/OutputsSection.d.ts +7 -0
- package/dist/components/marketing/sections/OutputsSection.d.ts.map +1 -0
- package/dist/components/marketing/sections/OutputsSection.js +59 -0
- package/dist/components/marketing/sections/OutputsSection.js.map +1 -0
- package/dist/components/marketing/sections/ProblemSection.d.ts +7 -0
- package/dist/components/marketing/sections/ProblemSection.d.ts.map +1 -0
- package/dist/components/marketing/sections/ProblemSection.js +46 -0
- package/dist/components/marketing/sections/ProblemSection.js.map +1 -0
- package/dist/components/marketing/sections/SolutionSection.d.ts +7 -0
- package/dist/components/marketing/sections/SolutionSection.d.ts.map +1 -0
- package/dist/components/marketing/sections/SolutionSection.js +46 -0
- package/dist/components/marketing/sections/SolutionSection.js.map +1 -0
- package/dist/components/marketing/sections/StepsSection.d.ts +7 -0
- package/dist/components/marketing/sections/StepsSection.d.ts.map +1 -0
- package/dist/components/marketing/sections/StepsSection.js +52 -0
- package/dist/components/marketing/sections/StepsSection.js.map +1 -0
- package/dist/components/marketing/waitlist-section.d.ts +15 -0
- package/dist/components/marketing/waitlist-section.d.ts.map +1 -0
- package/dist/components/marketing/waitlist-section.js +578 -0
- package/dist/components/marketing/waitlist-section.js.map +1 -0
- package/dist/components/templates/TemplatesClientPage.d.ts +7 -0
- package/dist/components/templates/TemplatesClientPage.d.ts.map +1 -0
- package/dist/components/templates/TemplatesClientPage.js +625 -0
- package/dist/components/templates/TemplatesClientPage.js.map +1 -0
- package/dist/components/templates/TemplatesPage.d.ts +7 -0
- package/dist/components/templates/TemplatesPage.d.ts.map +1 -0
- package/dist/components/templates/TemplatesPage.js +125 -0
- package/dist/components/templates/TemplatesPage.js.map +1 -0
- package/dist/components/templates/TemplatesPreviewModal.d.ts +15 -0
- package/dist/components/templates/TemplatesPreviewModal.d.ts.map +1 -0
- package/dist/components/templates/TemplatesPreviewModal.js +137 -0
- package/dist/components/templates/TemplatesPreviewModal.js.map +1 -0
- package/dist/components/templates/index.d.ts +4 -0
- package/dist/components/templates/index.js +5 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +28 -0
- package/dist/libs/email/client.d.ts +15 -0
- package/dist/libs/email/client.d.ts.map +1 -0
- package/dist/libs/email/client.js +113 -0
- package/dist/libs/email/client.js.map +1 -0
- package/dist/libs/email/contact.d.ts +7 -0
- package/dist/libs/email/contact.d.ts.map +1 -0
- package/dist/libs/email/contact.js +71 -0
- package/dist/libs/email/contact.js.map +1 -0
- package/dist/libs/email/newsletter.d.ts +7 -0
- package/dist/libs/email/newsletter.d.ts.map +1 -0
- package/dist/libs/email/newsletter.js +95 -0
- package/dist/libs/email/newsletter.js.map +1 -0
- package/dist/libs/email/types.d.ts +53 -0
- package/dist/libs/email/types.d.ts.map +1 -0
- package/dist/libs/email/types.js +1 -0
- package/dist/libs/email/utils.d.ts +6 -0
- package/dist/libs/email/utils.d.ts.map +1 -0
- package/dist/libs/email/utils.js +7 -0
- package/dist/libs/email/utils.js.map +1 -0
- package/dist/libs/email/waitlist-application.d.ts +7 -0
- package/dist/libs/email/waitlist-application.d.ts.map +1 -0
- package/dist/libs/email/waitlist-application.js +170 -0
- package/dist/libs/email/waitlist-application.js.map +1 -0
- package/dist/libs/email/waitlist.d.ts +7 -0
- package/dist/libs/email/waitlist.d.ts.map +1 -0
- package/dist/libs/email/waitlist.js +105 -0
- package/dist/libs/email/waitlist.js.map +1 -0
- package/dist/libs/pricing-examples.d.ts +22 -0
- package/dist/libs/pricing-examples.d.ts.map +1 -0
- package/dist/libs/pricing-examples.js +21 -0
- package/dist/libs/pricing-examples.js.map +1 -0
- package/dist/registry/engine.d.ts +17 -0
- package/dist/registry/engine.d.ts.map +1 -0
- package/dist/registry/engine.js +24 -0
- package/dist/registry/engine.js.map +1 -0
- package/dist/registry/factory.d.ts +64 -0
- package/dist/registry/factory.d.ts.map +1 -0
- package/dist/registry/factory.js +61 -0
- package/dist/registry/factory.js.map +1 -0
- package/dist/registry/index.d.ts +8 -0
- package/dist/registry/index.js +8 -0
- package/dist/registry/registry-docs.d.ts +15 -0
- package/dist/registry/registry-docs.d.ts.map +1 -0
- package/dist/registry/registry-docs.js +305 -0
- package/dist/registry/registry-docs.js.map +1 -0
- package/dist/registry/registry-landing.d.ts +19 -0
- package/dist/registry/registry-landing.d.ts.map +1 -0
- package/dist/registry/registry-landing.js +95 -0
- package/dist/registry/registry-landing.js.map +1 -0
- package/dist/registry/registry.d.ts +30 -0
- package/dist/registry/registry.d.ts.map +1 -0
- package/dist/registry/registry.js +61 -0
- package/dist/registry/registry.js.map +1 -0
- package/dist/registry/types.d.ts +19 -0
- package/dist/registry/types.d.ts.map +1 -0
- package/dist/registry/types.js +0 -0
- package/dist/registry/utils.d.ts +31 -0
- package/dist/registry/utils.d.ts.map +1 -0
- package/dist/registry/utils.js +54 -0
- package/dist/registry/utils.js.map +1 -0
- package/package.json +151 -0
- package/src/components/marketing/ChangelogPage.tsx +110 -0
- package/src/components/marketing/CofounderPage.tsx +409 -0
- package/src/components/marketing/ContactClient.tsx +174 -0
- package/src/components/marketing/ContributePage.tsx +319 -0
- package/src/components/marketing/DesignPartnerPage.tsx +181 -0
- package/src/components/marketing/LandingPage.tsx +30 -0
- package/src/components/marketing/PricingClient.tsx +446 -0
- package/src/components/marketing/ProductClientPage.tsx +391 -0
- package/src/components/marketing/index.ts +10 -0
- package/src/components/marketing/pricing-thinking-modal.tsx +224 -0
- package/src/components/marketing/sections/AudienceSection.tsx +66 -0
- package/src/components/marketing/sections/CorePositioningSection.tsx +44 -0
- package/src/components/marketing/sections/CtaSection.tsx +57 -0
- package/src/components/marketing/sections/DevelopersSection.tsx +38 -0
- package/src/components/marketing/sections/FearsSection.tsx +45 -0
- package/src/components/marketing/sections/HeroMarketingSection.tsx +73 -0
- package/src/components/marketing/sections/IconGridSection.tsx +91 -0
- package/src/components/marketing/sections/OutputsSection.tsx +59 -0
- package/src/components/marketing/sections/ProblemSection.tsx +47 -0
- package/src/components/marketing/sections/SolutionSection.tsx +47 -0
- package/src/components/marketing/sections/StepsSection.tsx +55 -0
- package/src/components/marketing/waitlist-section.tsx +606 -0
- package/src/components/templates/TemplatesClientPage.tsx +711 -0
- package/src/components/templates/TemplatesPage.tsx +129 -0
- package/src/components/templates/TemplatesPreviewModal.tsx +260 -0
- package/src/components/templates/index.ts +3 -0
- package/src/index.ts +15 -0
- package/src/libs/email/client.test.ts +107 -0
- package/src/libs/email/client.ts +146 -0
- package/src/libs/email/contact.ts +80 -0
- package/src/libs/email/newsletter.ts +108 -0
- package/src/libs/email/types.ts +59 -0
- package/src/libs/email/utils.ts +8 -0
- package/src/libs/email/waitlist-application.ts +192 -0
- package/src/libs/email/waitlist.ts +118 -0
- package/src/libs/pricing-examples.ts +19 -0
- package/src/registry/engine.ts +38 -0
- package/src/registry/factory.ts +110 -0
- package/src/registry/index.ts +7 -0
- package/src/registry/registry-docs.ts +843 -0
- package/src/registry/registry-landing.ts +118 -0
- package/src/registry/registry.ts +85 -0
- package/src/registry/types.ts +17 -0
- package/src/registry/utils.ts +99 -0
- package/tsconfig.json +13 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/tsdown.config.js +10 -0
|
@@ -0,0 +1,711 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { Search } from 'lucide-react';
|
|
5
|
+
import { cn } from '@contractspec/lib.ui-kit-core/utils';
|
|
6
|
+
import Link from 'next/link';
|
|
7
|
+
import type {
|
|
8
|
+
RegistryTemplate,
|
|
9
|
+
TemplateId,
|
|
10
|
+
} from '@contractspec/lib.example-shared-ui';
|
|
11
|
+
import { useRegistryTemplates } from '@contractspec/lib.example-shared-ui';
|
|
12
|
+
import { getTemplate } from '@contractspec/module.examples';
|
|
13
|
+
import {
|
|
14
|
+
Tooltip,
|
|
15
|
+
TooltipContent,
|
|
16
|
+
TooltipProvider,
|
|
17
|
+
TooltipTrigger,
|
|
18
|
+
} from '@contractspec/lib.ui-kit-web/ui/tooltip';
|
|
19
|
+
import {
|
|
20
|
+
analyticsEventNames,
|
|
21
|
+
captureAnalyticsEvent,
|
|
22
|
+
} from '@contractspec/bundle.library/libs/posthog/client';
|
|
23
|
+
import {
|
|
24
|
+
Dialog,
|
|
25
|
+
DialogContent,
|
|
26
|
+
DialogDescription,
|
|
27
|
+
DialogHeader,
|
|
28
|
+
DialogTitle,
|
|
29
|
+
} from '@contractspec/lib.ui-kit-web/ui/dialog';
|
|
30
|
+
import { WaitlistSection } from '../marketing';
|
|
31
|
+
import { TemplatePreviewModal } from './TemplatesPreviewModal';
|
|
32
|
+
|
|
33
|
+
const templates = [
|
|
34
|
+
{
|
|
35
|
+
id: 'minimal-example',
|
|
36
|
+
templateId: 'todos-app' as TemplateId,
|
|
37
|
+
title: 'Minimal Example',
|
|
38
|
+
description:
|
|
39
|
+
'A minimal template to get you running in minutes. Perfect for exploring the engine.',
|
|
40
|
+
tags: ['Getting Started'],
|
|
41
|
+
capabilities: 'Basic Forms, Auth',
|
|
42
|
+
isStarter: true,
|
|
43
|
+
previewUrl: '/sandbox?template=minimal-example',
|
|
44
|
+
docsUrl: '/docs/getting-started/hello-world',
|
|
45
|
+
},
|
|
46
|
+
// ============================================
|
|
47
|
+
// Phase 1 Examples (using cross-cutting modules)
|
|
48
|
+
// ============================================
|
|
49
|
+
{
|
|
50
|
+
id: 'saas-boilerplate',
|
|
51
|
+
templateId: 'saas-boilerplate' as TemplateId,
|
|
52
|
+
title: 'SaaS Boilerplate',
|
|
53
|
+
description:
|
|
54
|
+
'Complete SaaS foundation with multi-tenant orgs, projects, settings, and billing usage.',
|
|
55
|
+
tags: ['Getting Started', 'SaaS', 'Business'],
|
|
56
|
+
capabilities: 'Multi-tenancy, RBAC, Projects, Billing',
|
|
57
|
+
isNew: true,
|
|
58
|
+
previewUrl: '/sandbox?template=saas-boilerplate',
|
|
59
|
+
docsUrl: '/docs/templates/saas-boilerplate',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
id: 'crm-pipeline',
|
|
63
|
+
templateId: 'crm-pipeline' as TemplateId,
|
|
64
|
+
title: 'CRM Pipeline',
|
|
65
|
+
description:
|
|
66
|
+
'Sales CRM with contacts, companies, deals, pipeline stages, and task management.',
|
|
67
|
+
tags: ['CRM', 'Business'],
|
|
68
|
+
capabilities: 'Contacts, Deals, Pipelines, Tasks',
|
|
69
|
+
isNew: true,
|
|
70
|
+
previewUrl: '/sandbox?template=crm-pipeline',
|
|
71
|
+
docsUrl: '/docs/templates/crm-pipeline',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
id: 'agent-console',
|
|
75
|
+
templateId: 'agent-console' as TemplateId,
|
|
76
|
+
title: 'AI Agent Console',
|
|
77
|
+
description:
|
|
78
|
+
'AI agent orchestration platform with tools, agents, runs, and execution logs.',
|
|
79
|
+
tags: ['AI', 'Ops'],
|
|
80
|
+
capabilities: 'Tools, Agents, Runs, Metrics',
|
|
81
|
+
isNew: true,
|
|
82
|
+
previewUrl: '/sandbox?template=agent-console',
|
|
83
|
+
docsUrl: '/docs/templates/agent-console',
|
|
84
|
+
},
|
|
85
|
+
// ============================================
|
|
86
|
+
// Phase 2-4 Examples
|
|
87
|
+
// ============================================
|
|
88
|
+
{
|
|
89
|
+
id: 'workflow-system',
|
|
90
|
+
templateId: 'workflow-system' as TemplateId,
|
|
91
|
+
title: 'Workflow / Approval System',
|
|
92
|
+
description:
|
|
93
|
+
'Multi-step workflows with role-based approvals and state transitions.',
|
|
94
|
+
tags: ['Business', 'Ops'],
|
|
95
|
+
capabilities: 'Workflows, Approvals, State Machine',
|
|
96
|
+
isNew: true,
|
|
97
|
+
previewUrl: '/sandbox?template=workflow-system',
|
|
98
|
+
docsUrl: '/docs/templates/workflow-system',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
id: 'marketplace',
|
|
102
|
+
templateId: 'marketplace' as TemplateId,
|
|
103
|
+
title: 'Marketplace',
|
|
104
|
+
description:
|
|
105
|
+
'Two-sided marketplace with stores, products, orders, and payouts.',
|
|
106
|
+
tags: ['Business', 'Payments'],
|
|
107
|
+
capabilities: 'Stores, Products, Orders, Payouts',
|
|
108
|
+
isNew: true,
|
|
109
|
+
previewUrl: '/sandbox?template=marketplace',
|
|
110
|
+
docsUrl: '/docs/templates/marketplace',
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
id: 'integration-hub',
|
|
114
|
+
templateId: 'integration-hub' as TemplateId,
|
|
115
|
+
title: 'Integration Hub',
|
|
116
|
+
description:
|
|
117
|
+
'Third-party integrations with connections, sync configs, and field mapping.',
|
|
118
|
+
tags: ['Ops', 'AI'],
|
|
119
|
+
capabilities: 'Integrations, Connections, Sync',
|
|
120
|
+
isNew: true,
|
|
121
|
+
previewUrl: '/sandbox?template=integration-hub',
|
|
122
|
+
docsUrl: '/docs/templates/integration-hub',
|
|
123
|
+
},
|
|
124
|
+
// ============================================
|
|
125
|
+
// Learning Journeys
|
|
126
|
+
// ============================================
|
|
127
|
+
{
|
|
128
|
+
id: 'learning-journey-studio-onboarding',
|
|
129
|
+
templateId: 'learning-journey-studio-onboarding' as TemplateId,
|
|
130
|
+
title: 'Learning Journey — Studio Getting Started',
|
|
131
|
+
description:
|
|
132
|
+
'First 30 minutes in Studio: choose template, edit spec, regenerate, playground, evolution.',
|
|
133
|
+
tags: ['Learning', 'Onboarding'],
|
|
134
|
+
capabilities: 'Spec-first onboarding, XP/streak, progress widget',
|
|
135
|
+
isNew: true,
|
|
136
|
+
previewUrl: '/sandbox?template=learning-journey-studio-onboarding',
|
|
137
|
+
docsUrl: '/docs/templates/learning-journey-studio-onboarding',
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
id: 'learning-journey-platform-tour',
|
|
141
|
+
templateId: 'learning-journey-platform-tour' as TemplateId,
|
|
142
|
+
title: 'Learning Journey — Platform Primitives Tour',
|
|
143
|
+
description:
|
|
144
|
+
'Touch identity, audit, notifications, jobs, flags, files, metering once with guided steps.',
|
|
145
|
+
tags: ['Learning', 'Platform'],
|
|
146
|
+
capabilities: 'Cross-module tour with event-driven completion',
|
|
147
|
+
isNew: true,
|
|
148
|
+
previewUrl: '/sandbox?template=learning-journey-platform-tour',
|
|
149
|
+
docsUrl: '/docs/templates/learning-journey-platform-tour',
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
id: 'learning-journey-crm-onboarding',
|
|
153
|
+
templateId: 'learning-journey-crm-onboarding' as TemplateId,
|
|
154
|
+
title: 'Learning Journey — CRM First Win',
|
|
155
|
+
description:
|
|
156
|
+
'Get to first closed-won deal: pipeline, contact/company, deal, stages, follow-up.',
|
|
157
|
+
tags: ['Learning', 'CRM'],
|
|
158
|
+
capabilities: 'CRM onboarding with XP/streak/badge',
|
|
159
|
+
isNew: true,
|
|
160
|
+
previewUrl: '/sandbox?template=learning-journey-crm-onboarding',
|
|
161
|
+
docsUrl: '/docs/templates/learning-journey-crm-onboarding',
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
id: 'analytics-dashboard',
|
|
165
|
+
templateId: 'analytics-dashboard' as TemplateId,
|
|
166
|
+
title: 'Analytics Dashboard',
|
|
167
|
+
description:
|
|
168
|
+
'Custom dashboards with widgets, saved queries, and real-time visualization.',
|
|
169
|
+
tags: ['Business', 'Ops'],
|
|
170
|
+
capabilities: 'Dashboards, Widgets, Queries',
|
|
171
|
+
isNew: true,
|
|
172
|
+
previewUrl: '/sandbox?template=analytics-dashboard',
|
|
173
|
+
docsUrl: '/docs/templates/analytics-dashboard',
|
|
174
|
+
},
|
|
175
|
+
// ============================================
|
|
176
|
+
// Classic Templates
|
|
177
|
+
// ============================================
|
|
178
|
+
{
|
|
179
|
+
id: 'plumber-ops',
|
|
180
|
+
templateId: 'messaging-app' as TemplateId,
|
|
181
|
+
title: 'Plumber Ops',
|
|
182
|
+
description:
|
|
183
|
+
'Complete workflow: Quotes → Deposit → Job → Invoice → Payment. Policy-enforced approvals.',
|
|
184
|
+
tags: ['Trades', 'Payments'],
|
|
185
|
+
capabilities: 'Quotes, Jobs, Invoicing, Payments',
|
|
186
|
+
previewUrl: '/sandbox?template=plumber-ops',
|
|
187
|
+
docsUrl: '/docs/specs/workflows',
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
id: 'coliving-management',
|
|
191
|
+
templateId: 'recipe-app-i18n' as TemplateId,
|
|
192
|
+
title: 'Coliving Management',
|
|
193
|
+
description:
|
|
194
|
+
'Coliving management: Onboarding, chores, shared wallet. Multi-party approvals built-in.',
|
|
195
|
+
tags: ['Coliving', 'Finance'],
|
|
196
|
+
capabilities: 'Tasks, Approvals, Payments',
|
|
197
|
+
previewUrl: '/sandbox?template=coliving-management',
|
|
198
|
+
docsUrl: '/docs/specs/workflows',
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
id: 'chores-allowance',
|
|
202
|
+
templateId: 'todos-app' as TemplateId,
|
|
203
|
+
title: 'Chores & Allowance',
|
|
204
|
+
description:
|
|
205
|
+
'Family task management with approval workflows. Teach financial accountability safely.',
|
|
206
|
+
tags: ['Family', 'Ops'],
|
|
207
|
+
capabilities: 'Tasks, Approvals, Notifications',
|
|
208
|
+
previewUrl: '/sandbox?template=chores-allowance',
|
|
209
|
+
docsUrl: '/docs/specs/workflows',
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
id: 'service-dispatch',
|
|
213
|
+
templateId: 'messaging-app' as TemplateId,
|
|
214
|
+
title: 'Service Dispatch',
|
|
215
|
+
description:
|
|
216
|
+
'Field service scheduling, routing, and invoicing. Real-time coordination with policy gates.',
|
|
217
|
+
tags: ['Ops', 'Trades'],
|
|
218
|
+
capabilities: 'Scheduling, Maps, Invoicing',
|
|
219
|
+
previewUrl: '/sandbox?template=service-dispatch',
|
|
220
|
+
docsUrl: '/docs/specs/workflows',
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
id: 'content-review',
|
|
224
|
+
templateId: 'todos-app' as TemplateId,
|
|
225
|
+
title: 'Content Review',
|
|
226
|
+
description:
|
|
227
|
+
'Multi-stage approval workflow for content. Audit trail for every decision.',
|
|
228
|
+
tags: ['Ops'],
|
|
229
|
+
capabilities: 'Workflows, Approvals, Comments',
|
|
230
|
+
previewUrl: '/sandbox?template=content-review',
|
|
231
|
+
docsUrl: '/docs/specs/workflows',
|
|
232
|
+
},
|
|
233
|
+
];
|
|
234
|
+
type LocalTemplate = (typeof templates)[number];
|
|
235
|
+
|
|
236
|
+
const allTags = [
|
|
237
|
+
'Getting Started',
|
|
238
|
+
'SaaS',
|
|
239
|
+
'Business',
|
|
240
|
+
'CRM',
|
|
241
|
+
'AI',
|
|
242
|
+
'Trades',
|
|
243
|
+
'Coliving',
|
|
244
|
+
'Family',
|
|
245
|
+
'Ops',
|
|
246
|
+
'Payments',
|
|
247
|
+
'Learning',
|
|
248
|
+
'Platform',
|
|
249
|
+
];
|
|
250
|
+
|
|
251
|
+
export const TemplatesPage = () => {
|
|
252
|
+
const [selectedTag, setSelectedTag] = useState<string | null>(null);
|
|
253
|
+
const [search, setSearch] = useState('');
|
|
254
|
+
const [preview, setPreview] = useState<TemplateId | null>(null);
|
|
255
|
+
const [waitlistModalOpen, setWaitlistModalOpen] = useState(false);
|
|
256
|
+
const [source, setSource] = useState<'local' | 'registry'>('local');
|
|
257
|
+
const [selectedTemplateForCommand, setSelectedTemplateForCommand] = useState<
|
|
258
|
+
RegistryTemplate | LocalTemplate | null
|
|
259
|
+
>(null);
|
|
260
|
+
|
|
261
|
+
const { data: registryTemplates = [], isLoading: registryLoading } =
|
|
262
|
+
useRegistryTemplates();
|
|
263
|
+
|
|
264
|
+
const filtered = templates.filter((t) => {
|
|
265
|
+
const matchTag = !selectedTag || t.tags.includes(selectedTag);
|
|
266
|
+
const matchSearch =
|
|
267
|
+
!search ||
|
|
268
|
+
t.title.toLowerCase().includes(search.toLowerCase()) ||
|
|
269
|
+
t.description.toLowerCase().includes(search.toLowerCase());
|
|
270
|
+
return matchTag && matchSearch;
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
const commandId = selectedTemplateForCommand
|
|
274
|
+
? 'templateId' in selectedTemplateForCommand
|
|
275
|
+
? selectedTemplateForCommand.templateId
|
|
276
|
+
: selectedTemplateForCommand.id
|
|
277
|
+
: '';
|
|
278
|
+
|
|
279
|
+
return (
|
|
280
|
+
<TooltipProvider>
|
|
281
|
+
<main className="">
|
|
282
|
+
{/* Hero */}
|
|
283
|
+
<section className="section-padding hero-gradient border-border relative border-b">
|
|
284
|
+
<div className="mx-auto max-w-4xl space-y-6 text-center">
|
|
285
|
+
<h1 className="text-5xl leading-tight font-bold md:text-6xl">
|
|
286
|
+
Recipe templates
|
|
287
|
+
</h1>
|
|
288
|
+
<p className="text-muted-foreground text-lg">
|
|
289
|
+
Ready-to-use, customizable recipes. Policies built in. One-click
|
|
290
|
+
deploy.
|
|
291
|
+
</p>
|
|
292
|
+
</div>
|
|
293
|
+
</section>
|
|
294
|
+
|
|
295
|
+
{/* Search & Filter */}
|
|
296
|
+
<section className="section-padding border-border border-b">
|
|
297
|
+
<div className="mx-auto max-w-6xl space-y-6">
|
|
298
|
+
<div className="flex items-center justify-between gap-3">
|
|
299
|
+
<div className="text-muted-foreground text-sm">Source:</div>
|
|
300
|
+
<div className="flex gap-2">
|
|
301
|
+
<button
|
|
302
|
+
onClick={() => setSource('local')}
|
|
303
|
+
className={cn(
|
|
304
|
+
'rounded-full px-4 py-2 text-sm font-medium transition-colors',
|
|
305
|
+
{
|
|
306
|
+
'bg-violet-500 text-white': source === 'local',
|
|
307
|
+
'bg-card border-border hover:bg-card/80 border':
|
|
308
|
+
source !== 'local',
|
|
309
|
+
}
|
|
310
|
+
)}
|
|
311
|
+
aria-pressed={source === 'local'}
|
|
312
|
+
>
|
|
313
|
+
Local
|
|
314
|
+
</button>
|
|
315
|
+
<button
|
|
316
|
+
onClick={() => setSource('registry')}
|
|
317
|
+
className={cn(
|
|
318
|
+
'rounded-full px-4 py-2 text-sm font-medium transition-colors',
|
|
319
|
+
{
|
|
320
|
+
'bg-violet-500 text-white': source === 'registry',
|
|
321
|
+
'bg-card border-border hover:bg-card/80 border':
|
|
322
|
+
source !== 'registry',
|
|
323
|
+
}
|
|
324
|
+
)}
|
|
325
|
+
aria-pressed={source === 'registry'}
|
|
326
|
+
>
|
|
327
|
+
Community
|
|
328
|
+
</button>
|
|
329
|
+
</div>
|
|
330
|
+
</div>
|
|
331
|
+
<div className="relative">
|
|
332
|
+
<Search
|
|
333
|
+
className="text-muted-foreground absolute top-3 left-3"
|
|
334
|
+
size={20}
|
|
335
|
+
/>
|
|
336
|
+
<input
|
|
337
|
+
type="text"
|
|
338
|
+
placeholder="Search templates..."
|
|
339
|
+
value={search}
|
|
340
|
+
onChange={(e) => setSearch(e.target.value)}
|
|
341
|
+
className="bg-card border-border w-full rounded-lg border py-3 pr-4 pl-10 focus:ring-2 focus:ring-violet-500 focus:outline-none"
|
|
342
|
+
aria-label="Search templates"
|
|
343
|
+
/>
|
|
344
|
+
</div>
|
|
345
|
+
<div className="flex flex-wrap gap-2">
|
|
346
|
+
<button
|
|
347
|
+
onClick={() => setSelectedTag(null)}
|
|
348
|
+
className={`rounded-full px-4 py-2 text-sm font-medium transition-colors ${
|
|
349
|
+
selectedTag === null
|
|
350
|
+
? 'bg-violet-500 text-white'
|
|
351
|
+
: 'bg-card border-border hover:bg-card/80 border'
|
|
352
|
+
}`}
|
|
353
|
+
aria-pressed={selectedTag === null}
|
|
354
|
+
>
|
|
355
|
+
All
|
|
356
|
+
</button>
|
|
357
|
+
{allTags.map((tag) => (
|
|
358
|
+
<button
|
|
359
|
+
key={tag}
|
|
360
|
+
onClick={() => setSelectedTag(tag)}
|
|
361
|
+
className={cn(
|
|
362
|
+
`rounded-full px-4 py-2 text-sm font-medium transition-colors`,
|
|
363
|
+
{
|
|
364
|
+
'bg-violet-500 text-white': selectedTag === tag,
|
|
365
|
+
'bg-card border-border hover:bg-card/80 border':
|
|
366
|
+
selectedTag !== tag,
|
|
367
|
+
}
|
|
368
|
+
)}
|
|
369
|
+
aria-pressed={selectedTag === tag}
|
|
370
|
+
>
|
|
371
|
+
{tag}
|
|
372
|
+
</button>
|
|
373
|
+
))}
|
|
374
|
+
</div>
|
|
375
|
+
</div>
|
|
376
|
+
</section>
|
|
377
|
+
|
|
378
|
+
{/* Templates Grid */}
|
|
379
|
+
<section className="section-padding">
|
|
380
|
+
<div className="mx-auto max-w-6xl">
|
|
381
|
+
{source === 'registry' ? (
|
|
382
|
+
registryLoading ? (
|
|
383
|
+
<div className="py-12 text-center">
|
|
384
|
+
<p className="text-muted-foreground">
|
|
385
|
+
Loading community templates…
|
|
386
|
+
</p>
|
|
387
|
+
</div>
|
|
388
|
+
) : registryTemplates.length === 0 ? (
|
|
389
|
+
<div className="py-12 text-center">
|
|
390
|
+
<p className="text-muted-foreground">
|
|
391
|
+
No community templates found (configure
|
|
392
|
+
`NEXT_PUBLIC_CONTRACTSPEC_REGISTRY_URL`).
|
|
393
|
+
</p>
|
|
394
|
+
</div>
|
|
395
|
+
) : (
|
|
396
|
+
<div className="grid gap-6 md:grid-cols-2 lg:grid-cols-3">
|
|
397
|
+
{registryTemplates.map((t) => (
|
|
398
|
+
<div
|
|
399
|
+
key={t.id}
|
|
400
|
+
className="card-subtle relative flex flex-col space-y-4 p-6 transition-colors hover:border-violet-500/50"
|
|
401
|
+
>
|
|
402
|
+
<div>
|
|
403
|
+
<h3 className="text-lg font-bold">{t.name}</h3>
|
|
404
|
+
<p className="text-muted-foreground mt-1 text-sm">
|
|
405
|
+
{t.description}
|
|
406
|
+
</p>
|
|
407
|
+
</div>
|
|
408
|
+
<div className="flex-1 space-y-2">
|
|
409
|
+
<div className="flex flex-wrap gap-1">
|
|
410
|
+
{t.tags.map((tag) => (
|
|
411
|
+
<span
|
|
412
|
+
key={tag}
|
|
413
|
+
className="rounded border border-violet-500/20 bg-violet-500/10 px-2 py-1 text-xs text-violet-300"
|
|
414
|
+
>
|
|
415
|
+
{tag}
|
|
416
|
+
</span>
|
|
417
|
+
))}
|
|
418
|
+
</div>
|
|
419
|
+
</div>
|
|
420
|
+
<div className="flex gap-2 pt-4">
|
|
421
|
+
<Tooltip>
|
|
422
|
+
<TooltipTrigger asChild>
|
|
423
|
+
<button
|
|
424
|
+
className="btn-ghost flex-1 text-center text-xs"
|
|
425
|
+
onClick={() => {
|
|
426
|
+
const local = getTemplate(t.id as TemplateId);
|
|
427
|
+
if (!local) {
|
|
428
|
+
setSelectedTemplateForCommand(t);
|
|
429
|
+
return;
|
|
430
|
+
}
|
|
431
|
+
setPreview(t.id as TemplateId);
|
|
432
|
+
}}
|
|
433
|
+
>
|
|
434
|
+
Preview
|
|
435
|
+
</button>
|
|
436
|
+
</TooltipTrigger>
|
|
437
|
+
<TooltipContent>
|
|
438
|
+
<p>Preview this template (if available locally)</p>
|
|
439
|
+
</TooltipContent>
|
|
440
|
+
</Tooltip>
|
|
441
|
+
<Tooltip>
|
|
442
|
+
<TooltipTrigger asChild>
|
|
443
|
+
<button
|
|
444
|
+
className="btn-primary flex-1 text-center text-xs"
|
|
445
|
+
onClick={() => {
|
|
446
|
+
captureAnalyticsEvent(
|
|
447
|
+
analyticsEventNames.EXAMPLE_REPO_OPEN,
|
|
448
|
+
{
|
|
449
|
+
surface: 'templates',
|
|
450
|
+
templateId: t.id,
|
|
451
|
+
source: 'registry',
|
|
452
|
+
}
|
|
453
|
+
);
|
|
454
|
+
setSelectedTemplateForCommand(t);
|
|
455
|
+
}}
|
|
456
|
+
>
|
|
457
|
+
Use Template
|
|
458
|
+
</button>
|
|
459
|
+
</TooltipTrigger>
|
|
460
|
+
<TooltipContent>
|
|
461
|
+
<p>Get CLI command</p>
|
|
462
|
+
</TooltipContent>
|
|
463
|
+
</Tooltip>
|
|
464
|
+
</div>
|
|
465
|
+
</div>
|
|
466
|
+
))}
|
|
467
|
+
</div>
|
|
468
|
+
)
|
|
469
|
+
) : filtered.length === 0 ? (
|
|
470
|
+
<div className="py-12 text-center">
|
|
471
|
+
<p className="text-muted-foreground">
|
|
472
|
+
No templates match your filters. Try a different search.
|
|
473
|
+
</p>
|
|
474
|
+
</div>
|
|
475
|
+
) : (
|
|
476
|
+
<div className="grid gap-6 md:grid-cols-2 lg:grid-cols-3">
|
|
477
|
+
{filtered.map((template, i) => (
|
|
478
|
+
<div
|
|
479
|
+
key={i}
|
|
480
|
+
className="card-subtle relative flex flex-col space-y-4 p-6 transition-colors hover:border-violet-500/50"
|
|
481
|
+
>
|
|
482
|
+
{'isNew' in template && template.isNew && (
|
|
483
|
+
<span className="absolute top-3 right-3 rounded-full bg-green-500 px-2 py-0.5 text-xs font-semibold text-white">
|
|
484
|
+
New
|
|
485
|
+
</span>
|
|
486
|
+
)}
|
|
487
|
+
<div>
|
|
488
|
+
<h3 className="text-lg font-bold">{template.title}</h3>
|
|
489
|
+
<p className="text-muted-foreground mt-1 text-sm">
|
|
490
|
+
{template.description}
|
|
491
|
+
</p>
|
|
492
|
+
</div>
|
|
493
|
+
<div className="flex-1 space-y-2">
|
|
494
|
+
<p className="text-muted-foreground text-xs">
|
|
495
|
+
<span className="text-foreground font-medium">
|
|
496
|
+
Capabilities:
|
|
497
|
+
</span>{' '}
|
|
498
|
+
{template.capabilities}
|
|
499
|
+
</p>
|
|
500
|
+
<div className="flex flex-wrap gap-1">
|
|
501
|
+
{template.tags.map((tag) => (
|
|
502
|
+
<span
|
|
503
|
+
key={tag}
|
|
504
|
+
className="rounded border border-violet-500/20 bg-violet-500/10 px-2 py-1 text-xs text-violet-300"
|
|
505
|
+
>
|
|
506
|
+
{tag}
|
|
507
|
+
</span>
|
|
508
|
+
))}
|
|
509
|
+
</div>
|
|
510
|
+
</div>
|
|
511
|
+
<div className="flex gap-2 pt-4">
|
|
512
|
+
<Tooltip>
|
|
513
|
+
<TooltipTrigger asChild>
|
|
514
|
+
<button
|
|
515
|
+
className="btn-ghost flex-1 text-center text-xs"
|
|
516
|
+
onClick={() => setPreview(template.templateId)}
|
|
517
|
+
>
|
|
518
|
+
Preview
|
|
519
|
+
</button>
|
|
520
|
+
</TooltipTrigger>
|
|
521
|
+
<TooltipContent>
|
|
522
|
+
<p>Preview this template in a modal</p>
|
|
523
|
+
</TooltipContent>
|
|
524
|
+
</Tooltip>
|
|
525
|
+
<Tooltip>
|
|
526
|
+
<TooltipTrigger asChild>
|
|
527
|
+
<button
|
|
528
|
+
className="btn-primary flex-1 text-center text-xs"
|
|
529
|
+
onClick={() => {
|
|
530
|
+
captureAnalyticsEvent(
|
|
531
|
+
analyticsEventNames.EXAMPLE_REPO_OPEN,
|
|
532
|
+
{
|
|
533
|
+
surface: 'templates',
|
|
534
|
+
templateId: template.templateId,
|
|
535
|
+
source: 'local',
|
|
536
|
+
}
|
|
537
|
+
);
|
|
538
|
+
setSelectedTemplateForCommand(template);
|
|
539
|
+
}}
|
|
540
|
+
>
|
|
541
|
+
Use Template
|
|
542
|
+
</button>
|
|
543
|
+
</TooltipTrigger>
|
|
544
|
+
<TooltipContent>
|
|
545
|
+
<p>Get CLI command</p>
|
|
546
|
+
</TooltipContent>
|
|
547
|
+
</Tooltip>
|
|
548
|
+
</div>
|
|
549
|
+
</div>
|
|
550
|
+
))}
|
|
551
|
+
</div>
|
|
552
|
+
)}
|
|
553
|
+
</div>
|
|
554
|
+
</section>
|
|
555
|
+
|
|
556
|
+
{/* Extend with Integrations & Knowledge */}
|
|
557
|
+
<section className="section-padding border-border bg-striped border-t">
|
|
558
|
+
<div className="mx-auto max-w-6xl space-y-8">
|
|
559
|
+
<div className="space-y-4 text-center">
|
|
560
|
+
<h2 className="text-3xl font-bold md:text-4xl">
|
|
561
|
+
Extend templates with integrations & knowledge
|
|
562
|
+
</h2>
|
|
563
|
+
<p className="text-muted-foreground mx-auto max-w-2xl">
|
|
564
|
+
Every template can be enhanced with built-in integrations and
|
|
565
|
+
knowledge spaces. Add payments, email, AI, and structured
|
|
566
|
+
knowledge without writing integration code.
|
|
567
|
+
</p>
|
|
568
|
+
</div>
|
|
569
|
+
<div className="grid gap-6 md:grid-cols-3">
|
|
570
|
+
<div className="card-subtle space-y-4 p-6">
|
|
571
|
+
<div className="text-3xl">💳</div>
|
|
572
|
+
<h3 className="font-bold">Add Payments</h3>
|
|
573
|
+
<p className="text-muted-foreground text-sm">
|
|
574
|
+
Connect Stripe to any template for payment processing,
|
|
575
|
+
subscriptions, and invoicing. Type-safe and policy-enforced.
|
|
576
|
+
</p>
|
|
577
|
+
<Link
|
|
578
|
+
href="/docs/integrations/stripe"
|
|
579
|
+
className="inline-flex items-center gap-1 text-sm text-violet-400 hover:text-violet-300"
|
|
580
|
+
>
|
|
581
|
+
Learn more →
|
|
582
|
+
</Link>
|
|
583
|
+
</div>
|
|
584
|
+
<div className="card-subtle space-y-4 p-6">
|
|
585
|
+
<div className="text-3xl">📧</div>
|
|
586
|
+
<h3 className="font-bold">Add Notifications</h3>
|
|
587
|
+
<p className="text-muted-foreground text-sm">
|
|
588
|
+
Send transactional emails via Postmark or Resend. Process
|
|
589
|
+
inbound emails with Gmail API. SMS via Twilio.
|
|
590
|
+
</p>
|
|
591
|
+
<Link
|
|
592
|
+
href="/docs/integrations"
|
|
593
|
+
className="inline-flex items-center gap-1 text-sm text-violet-400 hover:text-violet-300"
|
|
594
|
+
>
|
|
595
|
+
View integrations →
|
|
596
|
+
</Link>
|
|
597
|
+
</div>
|
|
598
|
+
<div className="card-subtle space-y-4 p-6">
|
|
599
|
+
<div className="text-3xl">🧠</div>
|
|
600
|
+
<h3 className="font-bold">Add AI & Knowledge</h3>
|
|
601
|
+
<p className="text-muted-foreground text-sm">
|
|
602
|
+
Power templates with OpenAI, vector search via Qdrant, and
|
|
603
|
+
structured knowledge spaces for context-aware workflows.
|
|
604
|
+
</p>
|
|
605
|
+
<Link
|
|
606
|
+
href="/docs/knowledge"
|
|
607
|
+
className="inline-flex items-center gap-1 text-sm text-violet-400 hover:text-violet-300"
|
|
608
|
+
>
|
|
609
|
+
Learn about knowledge →
|
|
610
|
+
</Link>
|
|
611
|
+
</div>
|
|
612
|
+
</div>
|
|
613
|
+
<div className="pt-4 text-center">
|
|
614
|
+
<p className="text-muted-foreground mb-4 text-sm">
|
|
615
|
+
All integrations are configured per-tenant with automatic health
|
|
616
|
+
checks and credential rotation.
|
|
617
|
+
</p>
|
|
618
|
+
<Link href="/docs/architecture" className="btn-primary">
|
|
619
|
+
View Architecture
|
|
620
|
+
</Link>
|
|
621
|
+
</div>
|
|
622
|
+
</div>
|
|
623
|
+
</section>
|
|
624
|
+
</main>
|
|
625
|
+
|
|
626
|
+
{/*{preview ? (*/}
|
|
627
|
+
<TemplatePreviewModal
|
|
628
|
+
templateId={preview}
|
|
629
|
+
onClose={() => {
|
|
630
|
+
setPreview(null);
|
|
631
|
+
}}
|
|
632
|
+
/>
|
|
633
|
+
{/*) : null}*/}
|
|
634
|
+
|
|
635
|
+
<Dialog open={waitlistModalOpen} onOpenChange={setWaitlistModalOpen}>
|
|
636
|
+
<DialogContent className="max-h-[90vh] max-w-2xl overflow-y-auto">
|
|
637
|
+
<DialogHeader>
|
|
638
|
+
<DialogTitle>Early Access Required</DialogTitle>
|
|
639
|
+
<DialogDescription>
|
|
640
|
+
ContractSpec Studio is in early access. Join the waitlist to
|
|
641
|
+
deploy projects to our managed cloud.
|
|
642
|
+
</DialogDescription>
|
|
643
|
+
</DialogHeader>
|
|
644
|
+
<WaitlistSection variant="compact" />
|
|
645
|
+
</DialogContent>
|
|
646
|
+
</Dialog>
|
|
647
|
+
|
|
648
|
+
<Dialog
|
|
649
|
+
open={!!selectedTemplateForCommand}
|
|
650
|
+
onOpenChange={() => setSelectedTemplateForCommand(null)}
|
|
651
|
+
>
|
|
652
|
+
<DialogContent className="max-w-md">
|
|
653
|
+
<DialogHeader>
|
|
654
|
+
<DialogTitle>Use this template</DialogTitle>
|
|
655
|
+
<DialogDescription>
|
|
656
|
+
Initialize a new project with this template using the CLI.
|
|
657
|
+
</DialogDescription>
|
|
658
|
+
</DialogHeader>
|
|
659
|
+
<div className="space-y-4 pt-4">
|
|
660
|
+
<div className="rounded-md border border-zinc-800 bg-zinc-950 p-4 font-mono text-sm text-zinc-50">
|
|
661
|
+
npx contractspec init --template {commandId}
|
|
662
|
+
</div>
|
|
663
|
+
<div className="flex gap-2">
|
|
664
|
+
<button
|
|
665
|
+
className="btn-secondary w-full"
|
|
666
|
+
onClick={() => {
|
|
667
|
+
navigator.clipboard.writeText(
|
|
668
|
+
`npx contractspec init --template ${commandId}`
|
|
669
|
+
);
|
|
670
|
+
captureAnalyticsEvent(
|
|
671
|
+
analyticsEventNames.COPY_COMMAND_CLICK,
|
|
672
|
+
{
|
|
673
|
+
surface: 'templates',
|
|
674
|
+
templateId: commandId,
|
|
675
|
+
filename: 'templates-cli',
|
|
676
|
+
}
|
|
677
|
+
);
|
|
678
|
+
}}
|
|
679
|
+
>
|
|
680
|
+
Copy Command
|
|
681
|
+
</button>
|
|
682
|
+
</div>
|
|
683
|
+
<div className="relative">
|
|
684
|
+
<div className="absolute inset-0 flex items-center">
|
|
685
|
+
<span className="border-border w-full border-t" />
|
|
686
|
+
</div>
|
|
687
|
+
<div className="relative flex justify-center text-xs uppercase">
|
|
688
|
+
<span className="bg-background text-muted-foreground px-2">
|
|
689
|
+
Or
|
|
690
|
+
</span>
|
|
691
|
+
</div>
|
|
692
|
+
</div>
|
|
693
|
+
<button
|
|
694
|
+
className="btn-ghost w-full text-sm"
|
|
695
|
+
onClick={() => {
|
|
696
|
+
captureAnalyticsEvent(analyticsEventNames.CTA_STUDIO_CLICK, {
|
|
697
|
+
surface: 'templates',
|
|
698
|
+
templateId: commandId,
|
|
699
|
+
});
|
|
700
|
+
setSelectedTemplateForCommand(null);
|
|
701
|
+
setWaitlistModalOpen(true);
|
|
702
|
+
}}
|
|
703
|
+
>
|
|
704
|
+
Deploy to Studio (Waitlist)
|
|
705
|
+
</button>
|
|
706
|
+
</div>
|
|
707
|
+
</DialogContent>
|
|
708
|
+
</Dialog>
|
|
709
|
+
</TooltipProvider>
|
|
710
|
+
);
|
|
711
|
+
};
|