@contractspec/bundle.marketing 3.8.8 → 3.8.9
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.log +64 -32
- package/CHANGELOG.md +30 -0
- package/dist/browser/components/templates/TemplateCard.js +83 -0
- package/dist/browser/components/templates/TemplateCommandDialog.js +110 -0
- package/dist/browser/components/templates/TemplatePreviewContent.js +96 -0
- package/dist/browser/components/templates/TemplatesBrowseControls.js +115 -0
- package/dist/browser/components/templates/TemplatesCatalogSection.js +284 -0
- package/dist/browser/components/templates/TemplatesClientPage.js +840 -917
- package/dist/browser/components/templates/TemplatesHeroSection.js +87 -0
- package/dist/browser/components/templates/TemplatesNextStepsSection.js +126 -0
- package/dist/browser/components/templates/TemplatesPreviewModal.js +136 -126
- package/dist/browser/components/templates/index.js +873 -950
- package/dist/browser/components/templates/template-catalog.js +81 -0
- package/dist/browser/components/templates/template-new.js +23 -0
- package/dist/browser/components/templates/template-preview.js +43 -0
- package/dist/browser/components/templates/template-source.js +19 -0
- package/dist/browser/index.js +873 -950
- package/dist/components/templates/TemplateCard.d.ts +12 -0
- package/dist/components/templates/TemplateCard.js +78 -0
- package/dist/components/templates/TemplateCommandDialog.d.ts +6 -0
- package/dist/components/templates/TemplateCommandDialog.js +105 -0
- package/dist/components/templates/TemplatePreviewContent.d.ts +5 -0
- package/dist/components/templates/TemplatePreviewContent.js +91 -0
- package/dist/components/templates/TemplatesBrowseControls.d.ts +13 -0
- package/dist/components/templates/TemplatesBrowseControls.js +110 -0
- package/dist/components/templates/TemplatesCatalogSection.d.ts +14 -0
- package/dist/components/templates/TemplatesCatalogSection.js +279 -0
- package/dist/components/templates/TemplatesClientPage.js +840 -917
- package/dist/components/templates/TemplatesHeroSection.d.ts +5 -0
- package/dist/components/templates/TemplatesHeroSection.js +82 -0
- package/dist/components/templates/TemplatesNextStepsSection.d.ts +1 -0
- package/dist/components/templates/TemplatesNextStepsSection.js +121 -0
- package/dist/components/templates/TemplatesPreviewModal.d.ts +3 -4
- package/dist/components/templates/TemplatesPreviewModal.js +136 -126
- package/dist/components/templates/index.js +873 -950
- package/dist/components/templates/template-catalog.d.ts +27 -0
- package/dist/components/templates/template-catalog.js +76 -0
- package/dist/components/templates/template-catalog.test.d.ts +1 -0
- package/dist/components/templates/template-new.d.ts +2 -0
- package/dist/components/templates/template-new.js +18 -0
- package/dist/components/templates/template-preview.d.ts +18 -0
- package/dist/components/templates/template-preview.js +38 -0
- package/dist/components/templates/template-source.d.ts +3 -0
- package/dist/components/templates/template-source.js +14 -0
- package/dist/index.js +873 -950
- package/dist/node/components/templates/TemplateCard.js +78 -0
- package/dist/node/components/templates/TemplateCommandDialog.js +105 -0
- package/dist/node/components/templates/TemplatePreviewContent.js +91 -0
- package/dist/node/components/templates/TemplatesBrowseControls.js +110 -0
- package/dist/node/components/templates/TemplatesCatalogSection.js +279 -0
- package/dist/node/components/templates/TemplatesClientPage.js +840 -917
- package/dist/node/components/templates/TemplatesHeroSection.js +82 -0
- package/dist/node/components/templates/TemplatesNextStepsSection.js +121 -0
- package/dist/node/components/templates/TemplatesPreviewModal.js +136 -126
- package/dist/node/components/templates/index.js +873 -950
- package/dist/node/components/templates/template-catalog.js +76 -0
- package/dist/node/components/templates/template-new.js +18 -0
- package/dist/node/components/templates/template-preview.js +38 -0
- package/dist/node/components/templates/template-source.js +14 -0
- package/dist/node/index.js +873 -950
- package/package.json +181 -26
- package/src/components/templates/TemplateCard.tsx +74 -0
- package/src/components/templates/TemplateCommandDialog.tsx +92 -0
- package/src/components/templates/TemplatePreviewContent.tsx +182 -0
- package/src/components/templates/TemplatesBrowseControls.tsx +120 -0
- package/src/components/templates/TemplatesCatalogSection.tsx +166 -0
- package/src/components/templates/TemplatesClientPage.tsx +109 -741
- package/src/components/templates/TemplatesHeroSection.tsx +41 -0
- package/src/components/templates/TemplatesNextStepsSection.tsx +80 -0
- package/src/components/templates/TemplatesPreviewModal.tsx +19 -294
- package/src/components/templates/template-catalog.test.ts +66 -0
- package/src/components/templates/template-catalog.ts +132 -0
- package/src/components/templates/template-new.ts +12 -0
- package/src/components/templates/template-preview.ts +57 -0
- package/src/components/templates/template-source.ts +13 -0
- package/.turbo/turbo-prebuild.log +0 -1
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
3
|
+
|
|
4
|
+
// src/components/templates/TemplatesHeroSection.tsx
|
|
5
|
+
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
6
|
+
function TemplatesHeroSection({
|
|
7
|
+
localTemplateCount,
|
|
8
|
+
sourceCount
|
|
9
|
+
}) {
|
|
10
|
+
return /* @__PURE__ */ jsxDEV("section", {
|
|
11
|
+
className: "section-padding hero-gradient border-border/70 border-b",
|
|
12
|
+
children: /* @__PURE__ */ jsxDEV("div", {
|
|
13
|
+
className: "editorial-shell space-y-8",
|
|
14
|
+
children: [
|
|
15
|
+
/* @__PURE__ */ jsxDEV("div", {
|
|
16
|
+
className: "max-w-4xl space-y-5",
|
|
17
|
+
children: [
|
|
18
|
+
/* @__PURE__ */ jsxDEV("p", {
|
|
19
|
+
className: "editorial-kicker",
|
|
20
|
+
children: "Proof through real scenarios"
|
|
21
|
+
}, undefined, false, undefined, this),
|
|
22
|
+
/* @__PURE__ */ jsxDEV("h1", {
|
|
23
|
+
className: "editorial-title",
|
|
24
|
+
children: "Templates that show the open system in practice."
|
|
25
|
+
}, undefined, false, undefined, this),
|
|
26
|
+
/* @__PURE__ */ jsxDEV("p", {
|
|
27
|
+
className: "editorial-subtitle",
|
|
28
|
+
children: "These scenarios are the fastest way to understand ContractSpec: explicit contracts, aligned surfaces, and an adoption path from OSS exploration into Studio deployment."
|
|
29
|
+
}, undefined, false, undefined, this)
|
|
30
|
+
]
|
|
31
|
+
}, undefined, true, undefined, this),
|
|
32
|
+
/* @__PURE__ */ jsxDEV("div", {
|
|
33
|
+
className: "editorial-proof-strip",
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ jsxDEV("div", {
|
|
36
|
+
className: "editorial-stat",
|
|
37
|
+
children: [
|
|
38
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
39
|
+
className: "editorial-stat-value",
|
|
40
|
+
children: localTemplateCount
|
|
41
|
+
}, undefined, false, undefined, this),
|
|
42
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
43
|
+
className: "editorial-label",
|
|
44
|
+
children: "curated scenarios"
|
|
45
|
+
}, undefined, false, undefined, this)
|
|
46
|
+
]
|
|
47
|
+
}, undefined, true, undefined, this),
|
|
48
|
+
/* @__PURE__ */ jsxDEV("div", {
|
|
49
|
+
className: "editorial-stat",
|
|
50
|
+
children: [
|
|
51
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
52
|
+
className: "editorial-stat-value",
|
|
53
|
+
children: sourceCount
|
|
54
|
+
}, undefined, false, undefined, this),
|
|
55
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
56
|
+
className: "editorial-label",
|
|
57
|
+
children: "entry paths"
|
|
58
|
+
}, undefined, false, undefined, this)
|
|
59
|
+
]
|
|
60
|
+
}, undefined, true, undefined, this),
|
|
61
|
+
/* @__PURE__ */ jsxDEV("div", {
|
|
62
|
+
className: "editorial-stat",
|
|
63
|
+
children: [
|
|
64
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
65
|
+
className: "editorial-stat-value",
|
|
66
|
+
children: "OSS"
|
|
67
|
+
}, undefined, false, undefined, this),
|
|
68
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
69
|
+
className: "editorial-label",
|
|
70
|
+
children: "first, Studio second"
|
|
71
|
+
}, undefined, false, undefined, this)
|
|
72
|
+
]
|
|
73
|
+
}, undefined, true, undefined, this)
|
|
74
|
+
]
|
|
75
|
+
}, undefined, true, undefined, this)
|
|
76
|
+
]
|
|
77
|
+
}, undefined, true, undefined, this)
|
|
78
|
+
}, undefined, false, undefined, this);
|
|
79
|
+
}
|
|
80
|
+
export {
|
|
81
|
+
TemplatesHeroSection
|
|
82
|
+
};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
3
|
+
|
|
4
|
+
// src/components/templates/TemplatesNextStepsSection.tsx
|
|
5
|
+
import Link from "next/link";
|
|
6
|
+
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
7
|
+
function TemplatesNextStepsSection() {
|
|
8
|
+
return /* @__PURE__ */ jsxDEV("section", {
|
|
9
|
+
className: "editorial-section bg-striped",
|
|
10
|
+
children: /* @__PURE__ */ jsxDEV("div", {
|
|
11
|
+
className: "editorial-shell space-y-8",
|
|
12
|
+
children: [
|
|
13
|
+
/* @__PURE__ */ jsxDEV("div", {
|
|
14
|
+
className: "max-w-3xl space-y-4",
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ jsxDEV("p", {
|
|
17
|
+
className: "editorial-kicker",
|
|
18
|
+
children: "From template to real system"
|
|
19
|
+
}, undefined, false, undefined, this),
|
|
20
|
+
/* @__PURE__ */ jsxDEV("h2", {
|
|
21
|
+
className: "font-serif text-4xl tracking-[-0.04em] md:text-5xl",
|
|
22
|
+
children: "Templates become useful when the system can absorb more context."
|
|
23
|
+
}, undefined, false, undefined, this),
|
|
24
|
+
/* @__PURE__ */ jsxDEV("p", {
|
|
25
|
+
className: "editorial-copy",
|
|
26
|
+
children: "Use templates to prove the base flow, then layer integrations, knowledge, and runtime behavior on top without losing the same contract source."
|
|
27
|
+
}, undefined, false, undefined, this)
|
|
28
|
+
]
|
|
29
|
+
}, undefined, true, undefined, this),
|
|
30
|
+
/* @__PURE__ */ jsxDEV("div", {
|
|
31
|
+
className: "grid gap-6 md:grid-cols-3",
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ jsxDEV("div", {
|
|
34
|
+
className: "editorial-panel space-y-4",
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ jsxDEV("div", {
|
|
37
|
+
className: "text-3xl",
|
|
38
|
+
children: "\uD83D\uDCB3"
|
|
39
|
+
}, undefined, false, undefined, this),
|
|
40
|
+
/* @__PURE__ */ jsxDEV("h3", {
|
|
41
|
+
className: "font-serif text-2xl tracking-[-0.03em]",
|
|
42
|
+
children: "Add payments"
|
|
43
|
+
}, undefined, false, undefined, this),
|
|
44
|
+
/* @__PURE__ */ jsxDEV("p", {
|
|
45
|
+
className: "text-muted-foreground text-sm",
|
|
46
|
+
children: "Connect Stripe to any template for payment processing, subscriptions, and invoicing. Type-safe and policy-enforced."
|
|
47
|
+
}, undefined, false, undefined, this),
|
|
48
|
+
/* @__PURE__ */ jsxDEV(Link, {
|
|
49
|
+
href: "/docs/integrations/stripe",
|
|
50
|
+
className: "font-medium text-[color:var(--blue)] text-sm hover:opacity-80",
|
|
51
|
+
children: "Learn more →"
|
|
52
|
+
}, undefined, false, undefined, this)
|
|
53
|
+
]
|
|
54
|
+
}, undefined, true, undefined, this),
|
|
55
|
+
/* @__PURE__ */ jsxDEV("div", {
|
|
56
|
+
className: "editorial-panel space-y-4",
|
|
57
|
+
children: [
|
|
58
|
+
/* @__PURE__ */ jsxDEV("div", {
|
|
59
|
+
className: "text-3xl",
|
|
60
|
+
children: "\uD83D\uDCE7"
|
|
61
|
+
}, undefined, false, undefined, this),
|
|
62
|
+
/* @__PURE__ */ jsxDEV("h3", {
|
|
63
|
+
className: "font-serif text-2xl tracking-[-0.03em]",
|
|
64
|
+
children: "Add notifications"
|
|
65
|
+
}, undefined, false, undefined, this),
|
|
66
|
+
/* @__PURE__ */ jsxDEV("p", {
|
|
67
|
+
className: "text-muted-foreground text-sm",
|
|
68
|
+
children: "Send transactional emails via Postmark or Resend. Process inbound emails with Gmail API. SMS via Twilio."
|
|
69
|
+
}, undefined, false, undefined, this),
|
|
70
|
+
/* @__PURE__ */ jsxDEV(Link, {
|
|
71
|
+
href: "/docs/integrations",
|
|
72
|
+
className: "font-medium text-[color:var(--blue)] text-sm hover:opacity-80",
|
|
73
|
+
children: "View integrations →"
|
|
74
|
+
}, undefined, false, undefined, this)
|
|
75
|
+
]
|
|
76
|
+
}, undefined, true, undefined, this),
|
|
77
|
+
/* @__PURE__ */ jsxDEV("div", {
|
|
78
|
+
className: "editorial-panel space-y-4",
|
|
79
|
+
children: [
|
|
80
|
+
/* @__PURE__ */ jsxDEV("div", {
|
|
81
|
+
className: "text-3xl",
|
|
82
|
+
children: "\uD83E\uDDE0"
|
|
83
|
+
}, undefined, false, undefined, this),
|
|
84
|
+
/* @__PURE__ */ jsxDEV("h3", {
|
|
85
|
+
className: "font-serif text-2xl tracking-[-0.03em]",
|
|
86
|
+
children: "Add AI and knowledge"
|
|
87
|
+
}, undefined, false, undefined, this),
|
|
88
|
+
/* @__PURE__ */ jsxDEV("p", {
|
|
89
|
+
className: "text-muted-foreground text-sm",
|
|
90
|
+
children: "Power templates with OpenAI, vector search via Qdrant, and structured knowledge spaces for context-aware workflows."
|
|
91
|
+
}, undefined, false, undefined, this),
|
|
92
|
+
/* @__PURE__ */ jsxDEV(Link, {
|
|
93
|
+
href: "/docs/knowledge",
|
|
94
|
+
className: "font-medium text-[color:var(--blue)] text-sm hover:opacity-80",
|
|
95
|
+
children: "Learn about knowledge →"
|
|
96
|
+
}, undefined, false, undefined, this)
|
|
97
|
+
]
|
|
98
|
+
}, undefined, true, undefined, this)
|
|
99
|
+
]
|
|
100
|
+
}, undefined, true, undefined, this),
|
|
101
|
+
/* @__PURE__ */ jsxDEV("div", {
|
|
102
|
+
className: "pt-4 text-center",
|
|
103
|
+
children: [
|
|
104
|
+
/* @__PURE__ */ jsxDEV("p", {
|
|
105
|
+
className: "mb-4 text-muted-foreground text-sm",
|
|
106
|
+
children: "All integrations are configured per-tenant with automatic health checks and credential rotation."
|
|
107
|
+
}, undefined, false, undefined, this),
|
|
108
|
+
/* @__PURE__ */ jsxDEV(Link, {
|
|
109
|
+
href: "/docs/architecture",
|
|
110
|
+
className: "btn-primary",
|
|
111
|
+
children: "View Architecture"
|
|
112
|
+
}, undefined, false, undefined, this)
|
|
113
|
+
]
|
|
114
|
+
}, undefined, true, undefined, this)
|
|
115
|
+
]
|
|
116
|
+
}, undefined, true, undefined, this)
|
|
117
|
+
}, undefined, false, undefined, this);
|
|
118
|
+
}
|
|
119
|
+
export {
|
|
120
|
+
TemplatesNextStepsSection
|
|
121
|
+
};
|
|
@@ -1,143 +1,153 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
2
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
3
3
|
|
|
4
|
-
// src/components/templates/
|
|
4
|
+
// src/components/templates/TemplatePreviewContent.tsx
|
|
5
|
+
import {
|
|
6
|
+
TemplateShell
|
|
7
|
+
} from "@contractspec/lib.example-shared-ui";
|
|
5
8
|
import { LoadingSpinner } from "@contractspec/lib.ui-kit-web/ui/atoms/LoadingSpinner";
|
|
6
|
-
import { Dialog, DialogContent } from "@contractspec/lib.ui-kit-web/ui/dialog";
|
|
7
|
-
import { ScrollArea } from "@contractspec/lib.ui-kit-web/ui/scroll-area";
|
|
8
9
|
import dynamic from "next/dynamic";
|
|
9
|
-
import { useMemo } from "react";
|
|
10
10
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
11
11
|
"use client";
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
var
|
|
19
|
-
var
|
|
20
|
-
var
|
|
21
|
-
var
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
12
|
+
var SaasDashboard = dynamic(() => import("@contractspec/example.saas-boilerplate").then((module) => module.SaasDashboard), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
|
|
13
|
+
var CrmDashboard = dynamic(() => import("@contractspec/example.crm-pipeline").then((module) => module.CrmDashboard), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
|
|
14
|
+
var DataGridShowcase = dynamic(() => import("@contractspec/example.data-grid-showcase/ui").then((module) => module.DataGridShowcase), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
|
|
15
|
+
var VisualizationShowcase = dynamic(() => import("@contractspec/example.visualization-showcase/ui").then((module) => module.VisualizationShowcase), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
|
|
16
|
+
var AgentDashboard = dynamic(() => import("@contractspec/example.agent-console/ui").then((module) => module.AgentDashboard), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
|
|
17
|
+
var AiChatAssistantDashboard = dynamic(() => import("@contractspec/example.ai-chat-assistant").then((module) => module.AiChatAssistantDashboard), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
|
|
18
|
+
var WorkflowDashboard = dynamic(() => import("@contractspec/example.workflow-system/ui").then((module) => module.WorkflowDashboard), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
|
|
19
|
+
var MarketplaceDashboard = dynamic(() => import("@contractspec/example.marketplace/ui").then((module) => module.MarketplaceDashboard), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
|
|
20
|
+
var IntegrationDashboard = dynamic(() => import("@contractspec/example.integration-hub/ui").then((module) => module.IntegrationDashboard), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
|
|
21
|
+
var AnalyticsDashboard = dynamic(() => import("@contractspec/example.analytics-dashboard").then((module) => module.AnalyticsDashboard), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
|
|
22
|
+
var PREVIEW_DEFINITIONS = {
|
|
23
|
+
"saas-boilerplate": {
|
|
24
|
+
title: "SaaS Boilerplate",
|
|
25
|
+
description: "Multi-tenant organizations, projects, settings, and billing usage tracking.",
|
|
26
|
+
component: SaasDashboard
|
|
27
|
+
},
|
|
28
|
+
"crm-pipeline": {
|
|
29
|
+
title: "CRM Pipeline",
|
|
30
|
+
description: "Sales CRM with contacts, companies, deals, and pipeline stages.",
|
|
31
|
+
component: CrmDashboard
|
|
32
|
+
},
|
|
33
|
+
"data-grid-showcase": {
|
|
34
|
+
title: "Data Grid Showcase",
|
|
35
|
+
description: "Shared ContractSpec table primitives with client, server, and DataView-driven lanes.",
|
|
36
|
+
component: DataGridShowcase
|
|
37
|
+
},
|
|
38
|
+
"visualization-showcase": {
|
|
39
|
+
title: "Visualization Showcase",
|
|
40
|
+
description: "ContractSpec-owned chart primitives rendered through shared visualization contracts and design-system wrappers.",
|
|
41
|
+
component: VisualizationShowcase
|
|
42
|
+
},
|
|
43
|
+
"agent-console": {
|
|
44
|
+
title: "AI Agent Console",
|
|
45
|
+
description: "AI agent orchestration with tools, agents, runs, and execution logs.",
|
|
46
|
+
component: AgentDashboard
|
|
47
|
+
},
|
|
48
|
+
"ai-chat-assistant": {
|
|
49
|
+
title: "AI Chat Assistant",
|
|
50
|
+
description: "Focused assistant surface with reasoning, sources, suggestions, and MCP-aware tools.",
|
|
51
|
+
component: AiChatAssistantDashboard
|
|
52
|
+
},
|
|
53
|
+
"workflow-system": {
|
|
54
|
+
title: "Workflow System",
|
|
55
|
+
description: "Multi-step workflows with role-based approvals.",
|
|
56
|
+
component: WorkflowDashboard
|
|
57
|
+
},
|
|
58
|
+
marketplace: {
|
|
59
|
+
title: "Marketplace",
|
|
60
|
+
description: "Two-sided marketplace with stores, products, orders, and payouts.",
|
|
61
|
+
component: MarketplaceDashboard
|
|
62
|
+
},
|
|
63
|
+
"integration-hub": {
|
|
64
|
+
title: "Integration Hub",
|
|
65
|
+
description: "Third-party integrations with connections, sync configs, and field mapping.",
|
|
66
|
+
component: IntegrationDashboard
|
|
67
|
+
},
|
|
68
|
+
"analytics-dashboard": {
|
|
69
|
+
title: "Analytics Dashboard",
|
|
70
|
+
description: "Custom dashboards with widgets and queries.",
|
|
71
|
+
component: AnalyticsDashboard
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
function TemplatePreviewContent({
|
|
75
|
+
templateId
|
|
76
|
+
}) {
|
|
77
|
+
const preview = PREVIEW_DEFINITIONS[templateId];
|
|
78
|
+
if (!preview) {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
const PreviewComponent = preview.component;
|
|
82
|
+
return /* @__PURE__ */ jsxDEV(TemplateShell, {
|
|
83
|
+
title: preview.title,
|
|
84
|
+
description: preview.description,
|
|
85
|
+
showSaveAction: false,
|
|
86
|
+
children: /* @__PURE__ */ jsxDEV(PreviewComponent, {}, undefined, false, undefined, this)
|
|
87
|
+
}, undefined, false, undefined, this);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// src/components/templates/template-preview.ts
|
|
91
|
+
var INLINE_TEMPLATE_PREVIEW_IDS = [
|
|
92
|
+
"agent-console",
|
|
93
|
+
"ai-chat-assistant",
|
|
94
|
+
"analytics-dashboard",
|
|
95
|
+
"crm-pipeline",
|
|
96
|
+
"data-grid-showcase",
|
|
97
|
+
"integration-hub",
|
|
98
|
+
"marketplace",
|
|
99
|
+
"saas-boilerplate",
|
|
100
|
+
"visualization-showcase",
|
|
101
|
+
"workflow-system"
|
|
102
|
+
];
|
|
103
|
+
var INLINE_TEMPLATE_PREVIEW_SET = new Set(INLINE_TEMPLATE_PREVIEW_IDS);
|
|
104
|
+
function supportsInlineTemplatePreview(templateId) {
|
|
105
|
+
return INLINE_TEMPLATE_PREVIEW_SET.has(templateId);
|
|
106
|
+
}
|
|
107
|
+
function getLocalTemplatePreviewAction(template) {
|
|
108
|
+
if (supportsInlineTemplatePreview(template.id)) {
|
|
109
|
+
return { kind: "modal", templateId: template.id };
|
|
110
|
+
}
|
|
111
|
+
return { kind: "sandbox", href: template.previewUrl };
|
|
112
|
+
}
|
|
113
|
+
function getRegistryTemplatePreviewAction(template, localTemplate) {
|
|
114
|
+
if (!localTemplate) {
|
|
115
|
+
return { kind: "disabled" };
|
|
116
|
+
}
|
|
117
|
+
return getLocalTemplatePreviewAction(localTemplate);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// src/components/templates/TemplatesPreviewModal.tsx
|
|
121
|
+
import { Dialog, DialogContent } from "@contractspec/lib.ui-kit-web/ui/dialog";
|
|
122
|
+
import { ScrollArea } from "@contractspec/lib.ui-kit-web/ui/scroll-area";
|
|
123
|
+
import { TemplateRuntimeProvider } from "@contractspec/module.examples";
|
|
124
|
+
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
125
|
+
"use client";
|
|
126
|
+
function TemplatePreviewModal({
|
|
27
127
|
templateId,
|
|
28
128
|
onClose
|
|
29
|
-
})
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
children: /* @__PURE__ */ jsxDEV(TodosTaskList, {}, undefined, false, undefined, this)
|
|
38
|
-
}, undefined, false, undefined, this);
|
|
39
|
-
case "messaging-app":
|
|
40
|
-
return /* @__PURE__ */ jsxDEV(TemplateShell, {
|
|
41
|
-
title: "Messaging workspace",
|
|
42
|
-
description: "Realtime-ready messaging surface with optimistic delivery.",
|
|
43
|
-
showSaveAction: false,
|
|
44
|
-
children: /* @__PURE__ */ jsxDEV(MessagingWorkspace, {}, undefined, false, undefined, this)
|
|
45
|
-
}, undefined, false, undefined, this);
|
|
46
|
-
case "recipe-app-i18n":
|
|
47
|
-
return /* @__PURE__ */ jsxDEV(TemplateShell, {
|
|
48
|
-
title: "Ceremony recipes",
|
|
49
|
-
description: "Switch locales and preview how rituals translate across teams.",
|
|
50
|
-
showSaveAction: false,
|
|
51
|
-
children: /* @__PURE__ */ jsxDEV(RecipesExperience, {}, undefined, false, undefined, this)
|
|
52
|
-
}, undefined, false, undefined, this);
|
|
53
|
-
case "saas-boilerplate":
|
|
54
|
-
return /* @__PURE__ */ jsxDEV(TemplateShell, {
|
|
55
|
-
title: "SaaS Boilerplate",
|
|
56
|
-
description: "Multi-tenant organizations, projects, settings, and billing usage tracking.",
|
|
57
|
-
showSaveAction: false,
|
|
58
|
-
children: /* @__PURE__ */ jsxDEV(SaasDashboard, {}, undefined, false, undefined, this)
|
|
59
|
-
}, undefined, false, undefined, this);
|
|
60
|
-
case "crm-pipeline":
|
|
61
|
-
return /* @__PURE__ */ jsxDEV(TemplateShell, {
|
|
62
|
-
title: "CRM Pipeline",
|
|
63
|
-
description: "Sales CRM with contacts, companies, deals, and pipeline stages.",
|
|
64
|
-
showSaveAction: false,
|
|
65
|
-
children: /* @__PURE__ */ jsxDEV(CrmDashboard, {}, undefined, false, undefined, this)
|
|
66
|
-
}, undefined, false, undefined, this);
|
|
67
|
-
case "data-grid-showcase":
|
|
68
|
-
return /* @__PURE__ */ jsxDEV(TemplateShell, {
|
|
69
|
-
title: "Data Grid Showcase",
|
|
70
|
-
description: "Shared ContractSpec table primitives with client, server, and DataView-driven lanes.",
|
|
71
|
-
showSaveAction: false,
|
|
72
|
-
children: /* @__PURE__ */ jsxDEV(DataGridShowcase, {}, undefined, false, undefined, this)
|
|
73
|
-
}, undefined, false, undefined, this);
|
|
74
|
-
case "visualization-showcase":
|
|
75
|
-
return /* @__PURE__ */ jsxDEV(TemplateShell, {
|
|
76
|
-
title: "Visualization Showcase",
|
|
77
|
-
description: "ContractSpec-owned chart primitives rendered through shared visualization contracts and design-system wrappers.",
|
|
78
|
-
showSaveAction: false,
|
|
79
|
-
children: /* @__PURE__ */ jsxDEV(VisualizationShowcase, {}, undefined, false, undefined, this)
|
|
80
|
-
}, undefined, false, undefined, this);
|
|
81
|
-
case "agent-console":
|
|
82
|
-
return /* @__PURE__ */ jsxDEV(TemplateShell, {
|
|
83
|
-
title: "AI Agent Console",
|
|
84
|
-
description: "AI agent orchestration with tools, agents, runs, and execution logs.",
|
|
85
|
-
showSaveAction: false,
|
|
86
|
-
children: /* @__PURE__ */ jsxDEV(AgentDashboard, {}, undefined, false, undefined, this)
|
|
87
|
-
}, undefined, false, undefined, this);
|
|
88
|
-
case "ai-chat-assistant":
|
|
89
|
-
return /* @__PURE__ */ jsxDEV(TemplateShell, {
|
|
90
|
-
title: "AI Chat Assistant",
|
|
91
|
-
description: "Focused assistant surface with reasoning, sources, suggestions, and MCP-aware tools.",
|
|
92
|
-
showSaveAction: false,
|
|
93
|
-
children: /* @__PURE__ */ jsxDEV(AiChatAssistantDashboard, {}, undefined, false, undefined, this)
|
|
94
|
-
}, undefined, false, undefined, this);
|
|
95
|
-
case "workflow-system":
|
|
96
|
-
return /* @__PURE__ */ jsxDEV(TemplateShell, {
|
|
97
|
-
title: "Workflow System",
|
|
98
|
-
description: "Multi-step workflows with role-based approvals.",
|
|
99
|
-
showSaveAction: false,
|
|
100
|
-
children: /* @__PURE__ */ jsxDEV(WorkflowDashboard, {}, undefined, false, undefined, this)
|
|
101
|
-
}, undefined, false, undefined, this);
|
|
102
|
-
case "marketplace":
|
|
103
|
-
return /* @__PURE__ */ jsxDEV(TemplateShell, {
|
|
104
|
-
title: "Marketplace",
|
|
105
|
-
description: "Two-sided marketplace with stores, products, and orders.",
|
|
106
|
-
showSaveAction: false,
|
|
107
|
-
children: /* @__PURE__ */ jsxDEV(MarketplaceDashboard, {}, undefined, false, undefined, this)
|
|
108
|
-
}, undefined, false, undefined, this);
|
|
109
|
-
case "integration-hub":
|
|
110
|
-
return /* @__PURE__ */ jsxDEV(TemplateShell, {
|
|
111
|
-
title: "Integration Hub",
|
|
112
|
-
description: "Third-party integrations with sync and field mapping.",
|
|
113
|
-
showSaveAction: false,
|
|
114
|
-
children: /* @__PURE__ */ jsxDEV(IntegrationDashboard, {}, undefined, false, undefined, this)
|
|
115
|
-
}, undefined, false, undefined, this);
|
|
116
|
-
case "analytics-dashboard":
|
|
117
|
-
return /* @__PURE__ */ jsxDEV(TemplateShell, {
|
|
118
|
-
title: "Analytics Dashboard",
|
|
119
|
-
description: "Custom dashboards with widgets and queries.",
|
|
120
|
-
showSaveAction: false,
|
|
121
|
-
children: /* @__PURE__ */ jsxDEV(AnalyticsDashboard, {}, undefined, false, undefined, this)
|
|
122
|
-
}, undefined, false, undefined, this);
|
|
123
|
-
case null:
|
|
124
|
-
return null;
|
|
125
|
-
default:
|
|
126
|
-
return null;
|
|
127
|
-
}
|
|
128
|
-
}, [templateId]);
|
|
129
|
-
return /* @__PURE__ */ jsxDEV(Dialog, {
|
|
130
|
-
open: !!previewComponent,
|
|
131
|
-
onOpenChange: onClose,
|
|
132
|
-
children: /* @__PURE__ */ jsxDEV(DialogContent, {
|
|
129
|
+
}) {
|
|
130
|
+
if (!supportsInlineTemplatePreview(templateId)) {
|
|
131
|
+
return null;
|
|
132
|
+
}
|
|
133
|
+
return /* @__PURE__ */ jsxDEV2(Dialog, {
|
|
134
|
+
open: true,
|
|
135
|
+
onOpenChange: (open) => !open && onClose(),
|
|
136
|
+
children: /* @__PURE__ */ jsxDEV2(DialogContent, {
|
|
133
137
|
className: "mb-8 flex h-[calc(100vh-2rem)] min-w-[calc(100vw-2rem)] flex-col justify-between gap-0 p-0",
|
|
134
|
-
children: /* @__PURE__ */
|
|
138
|
+
children: /* @__PURE__ */ jsxDEV2(ScrollArea, {
|
|
135
139
|
className: "flex flex-col justify-between overflow-hidden",
|
|
136
|
-
children:
|
|
140
|
+
children: /* @__PURE__ */ jsxDEV2(TemplateRuntimeProvider, {
|
|
141
|
+
templateId,
|
|
142
|
+
projectId: `marketing-preview-${templateId}`,
|
|
143
|
+
children: /* @__PURE__ */ jsxDEV2(TemplatePreviewContent, {
|
|
144
|
+
templateId
|
|
145
|
+
}, undefined, false, undefined, this)
|
|
146
|
+
}, templateId, false, undefined, this)
|
|
137
147
|
}, undefined, false, undefined, this)
|
|
138
148
|
}, undefined, false, undefined, this)
|
|
139
149
|
}, undefined, false, undefined, this);
|
|
140
|
-
}
|
|
150
|
+
}
|
|
141
151
|
export {
|
|
142
152
|
TemplatePreviewModal
|
|
143
153
|
};
|