@contractspec/bundle.marketing 3.8.8 → 3.8.10

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 (96) hide show
  1. package/.turbo/turbo-build.log +73 -29
  2. package/CHANGELOG.md +63 -0
  3. package/dist/browser/components/templates/TemplateCard.js +83 -0
  4. package/dist/browser/components/templates/TemplateCommandDialog.js +110 -0
  5. package/dist/browser/components/templates/TemplatePreviewContent.js +96 -0
  6. package/dist/browser/components/templates/TemplatesBrowseControls.js +130 -0
  7. package/dist/browser/components/templates/TemplatesCatalogSection.js +307 -0
  8. package/dist/browser/components/templates/TemplatesClientPage.js +1020 -917
  9. package/dist/browser/components/templates/TemplatesHeroSection.js +87 -0
  10. package/dist/browser/components/templates/TemplatesNextStepsSection.js +126 -0
  11. package/dist/browser/components/templates/TemplatesOverlays.js +2874 -0
  12. package/dist/browser/components/templates/TemplatesPreviewModal.js +136 -126
  13. package/dist/browser/components/templates/index.js +1055 -952
  14. package/dist/browser/components/templates/template-catalog.js +83 -0
  15. package/dist/browser/components/templates/template-filters.js +99 -0
  16. package/dist/browser/components/templates/template-new.js +23 -0
  17. package/dist/browser/components/templates/template-preview.js +43 -0
  18. package/dist/browser/components/templates/template-source.js +19 -0
  19. package/dist/browser/components/templates/template-tag-visibility.js +40 -0
  20. package/dist/browser/components/templates/useTemplateBrowseState.js +191 -0
  21. package/dist/browser/index.js +1055 -952
  22. package/dist/components/templates/TemplateCard.d.ts +12 -0
  23. package/dist/components/templates/TemplateCard.js +78 -0
  24. package/dist/components/templates/TemplateCommandDialog.d.ts +6 -0
  25. package/dist/components/templates/TemplateCommandDialog.js +105 -0
  26. package/dist/components/templates/TemplatePreviewContent.d.ts +5 -0
  27. package/dist/components/templates/TemplatePreviewContent.js +91 -0
  28. package/dist/components/templates/TemplatesBrowseControls.d.ts +18 -0
  29. package/dist/components/templates/TemplatesBrowseControls.js +125 -0
  30. package/dist/components/templates/TemplatesCatalogSection.d.ts +17 -0
  31. package/dist/components/templates/TemplatesCatalogSection.js +302 -0
  32. package/dist/components/templates/TemplatesClientPage.js +1020 -917
  33. package/dist/components/templates/TemplatesHeroSection.d.ts +5 -0
  34. package/dist/components/templates/TemplatesHeroSection.js +82 -0
  35. package/dist/components/templates/TemplatesNextStepsSection.d.ts +1 -0
  36. package/dist/components/templates/TemplatesNextStepsSection.js +121 -0
  37. package/dist/components/templates/TemplatesOverlays.d.ts +10 -0
  38. package/dist/components/templates/TemplatesOverlays.js +2869 -0
  39. package/dist/components/templates/TemplatesPreviewModal.d.ts +3 -4
  40. package/dist/components/templates/TemplatesPreviewModal.js +136 -126
  41. package/dist/components/templates/index.js +1055 -952
  42. package/dist/components/templates/template-catalog.d.ts +28 -0
  43. package/dist/components/templates/template-catalog.js +78 -0
  44. package/dist/components/templates/template-catalog.test.d.ts +1 -0
  45. package/dist/components/templates/template-filters.d.ts +12 -0
  46. package/dist/components/templates/template-filters.js +94 -0
  47. package/dist/components/templates/template-new.d.ts +2 -0
  48. package/dist/components/templates/template-new.js +18 -0
  49. package/dist/components/templates/template-preview.d.ts +18 -0
  50. package/dist/components/templates/template-preview.js +38 -0
  51. package/dist/components/templates/template-source.d.ts +3 -0
  52. package/dist/components/templates/template-source.js +14 -0
  53. package/dist/components/templates/template-tag-visibility.d.ts +10 -0
  54. package/dist/components/templates/template-tag-visibility.js +35 -0
  55. package/dist/components/templates/useTemplateBrowseState.d.ts +22 -0
  56. package/dist/components/templates/useTemplateBrowseState.js +186 -0
  57. package/dist/index.js +1055 -952
  58. package/dist/node/components/templates/TemplateCard.js +78 -0
  59. package/dist/node/components/templates/TemplateCommandDialog.js +105 -0
  60. package/dist/node/components/templates/TemplatePreviewContent.js +91 -0
  61. package/dist/node/components/templates/TemplatesBrowseControls.js +125 -0
  62. package/dist/node/components/templates/TemplatesCatalogSection.js +302 -0
  63. package/dist/node/components/templates/TemplatesClientPage.js +1020 -917
  64. package/dist/node/components/templates/TemplatesHeroSection.js +82 -0
  65. package/dist/node/components/templates/TemplatesNextStepsSection.js +121 -0
  66. package/dist/node/components/templates/TemplatesOverlays.js +2869 -0
  67. package/dist/node/components/templates/TemplatesPreviewModal.js +136 -126
  68. package/dist/node/components/templates/index.js +1055 -952
  69. package/dist/node/components/templates/template-catalog.js +78 -0
  70. package/dist/node/components/templates/template-filters.js +94 -0
  71. package/dist/node/components/templates/template-new.js +18 -0
  72. package/dist/node/components/templates/template-preview.js +38 -0
  73. package/dist/node/components/templates/template-source.js +14 -0
  74. package/dist/node/components/templates/template-tag-visibility.js +35 -0
  75. package/dist/node/components/templates/useTemplateBrowseState.js +186 -0
  76. package/dist/node/index.js +1055 -952
  77. package/package.json +237 -26
  78. package/src/components/templates/TemplateCard.tsx +74 -0
  79. package/src/components/templates/TemplateCommandDialog.tsx +92 -0
  80. package/src/components/templates/TemplatePreviewContent.tsx +182 -0
  81. package/src/components/templates/TemplatesBrowseControls.tsx +144 -0
  82. package/src/components/templates/TemplatesCatalogSection.tsx +191 -0
  83. package/src/components/templates/TemplatesClientPage.tsx +85 -773
  84. package/src/components/templates/TemplatesHeroSection.tsx +41 -0
  85. package/src/components/templates/TemplatesNextStepsSection.tsx +80 -0
  86. package/src/components/templates/TemplatesOverlays.tsx +65 -0
  87. package/src/components/templates/TemplatesPreviewModal.tsx +19 -294
  88. package/src/components/templates/template-catalog.test.ts +162 -0
  89. package/src/components/templates/template-catalog.ts +140 -0
  90. package/src/components/templates/template-filters.ts +57 -0
  91. package/src/components/templates/template-new.ts +12 -0
  92. package/src/components/templates/template-preview.ts +57 -0
  93. package/src/components/templates/template-source.ts +13 -0
  94. package/src/components/templates/template-tag-visibility.ts +58 -0
  95. package/src/components/templates/useTemplateBrowseState.ts +101 -0
  96. package/.turbo/turbo-prebuild.log +0 -1
@@ -1,7 +1,6 @@
1
1
  import type { TemplateId } from '@contractspec/lib.example-shared-ui';
2
- interface TemplatePreviewModalProps {
3
- templateId: TemplateId | null;
2
+ export interface TemplatePreviewModalProps {
3
+ templateId: TemplateId;
4
4
  onClose: () => void;
5
5
  }
6
- export declare const TemplatePreviewModal: ({ templateId, onClose, }: TemplatePreviewModalProps) => import("react/jsx-runtime").JSX.Element;
7
- export {};
6
+ export declare function TemplatePreviewModal({ templateId, onClose, }: TemplatePreviewModalProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1,143 +1,153 @@
1
1
  // @bun
2
2
  var __require = import.meta.require;
3
3
 
4
- // src/components/templates/TemplatesPreviewModal.tsx
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 TemplateShell = dynamic(() => import("@contractspec/lib.example-shared-ui").then((mod) => mod.TemplateShell), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
13
- var TodosTaskList = dynamic(() => import("@contractspec/bundle.library/components/templates/todos/TaskList").then((mod) => mod.TaskList), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
14
- var MessagingWorkspace = dynamic(() => import("@contractspec/bundle.library/components/templates/messaging/MessagingWorkspace").then((mod) => mod.MessagingWorkspace), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
15
- var RecipesExperience = dynamic(() => import("@contractspec/bundle.library/components/templates/recipes/RecipeList").then((mod) => mod.RecipeList), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
16
- var SaasDashboard = dynamic(() => import("@contractspec/example.saas-boilerplate").then((mod) => mod.SaasDashboard), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
17
- var CrmDashboard = dynamic(() => import("@contractspec/example.crm-pipeline").then((mod) => mod.CrmDashboard), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
18
- var DataGridShowcase = dynamic(() => import("@contractspec/example.data-grid-showcase/ui").then((mod) => mod.DataGridShowcase), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
19
- var VisualizationShowcase = dynamic(() => import("@contractspec/example.visualization-showcase/ui").then((mod) => mod.VisualizationShowcase), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
20
- var AgentDashboard = dynamic(() => import("@contractspec/example.agent-console/ui").then((mod) => mod.AgentDashboard), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
21
- var WorkflowDashboard = dynamic(() => import("@contractspec/example.workflow-system/ui").then((mod) => mod.WorkflowDashboard), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
22
- var MarketplaceDashboard = dynamic(() => import("@contractspec/example.marketplace/ui").then((mod) => mod.MarketplaceDashboard), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
23
- var IntegrationDashboard = dynamic(() => import("@contractspec/example.integration-hub/ui").then((mod) => mod.IntegrationDashboard), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
24
- var AnalyticsDashboard = dynamic(() => import("@contractspec/example.analytics-dashboard").then((mod) => mod.AnalyticsDashboard), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
25
- var AiChatAssistantDashboard = dynamic(() => import("@contractspec/example.ai-chat-assistant").then((mod) => mod.AiChatAssistantDashboard), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
26
- var TemplatePreviewModal = ({
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
- const previewComponent = useMemo(() => {
31
- switch (templateId) {
32
- case "todos-app":
33
- return /* @__PURE__ */ jsxDEV(TemplateShell, {
34
- title: "Starter tasks",
35
- description: "Track work items with filters, priorities, and per-tenant data isolation.",
36
- showSaveAction: false,
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__ */ jsxDEV(ScrollArea, {
138
+ children: /* @__PURE__ */ jsxDEV2(ScrollArea, {
135
139
  className: "flex flex-col justify-between overflow-hidden",
136
- children: previewComponent
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
  };