@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
package/dist/index.js
CHANGED
|
@@ -2561,989 +2561,912 @@ function PricingThinkingModal({
|
|
|
2561
2561
|
}, undefined, true, undefined, this)
|
|
2562
2562
|
}, undefined, false, undefined, this);
|
|
2563
2563
|
}
|
|
2564
|
-
// src/components/templates/
|
|
2565
|
-
import { LoadingSpinner } from "@contractspec/lib.ui-kit-web/ui/atoms/LoadingSpinner";
|
|
2566
|
-
import { Dialog as Dialog2, DialogContent as DialogContent2 } from "@contractspec/lib.ui-kit-web/ui/dialog";
|
|
2567
|
-
import { ScrollArea } from "@contractspec/lib.ui-kit-web/ui/scroll-area";
|
|
2568
|
-
import dynamic from "next/dynamic";
|
|
2569
|
-
import { useMemo } from "react";
|
|
2564
|
+
// src/components/templates/TemplateCard.tsx
|
|
2570
2565
|
import { jsxDEV as jsxDEV11 } from "react/jsx-dev-runtime";
|
|
2571
2566
|
"use client";
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
var
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
case "agent-console":
|
|
2642
|
-
return /* @__PURE__ */ jsxDEV11(TemplateShell, {
|
|
2643
|
-
title: "AI Agent Console",
|
|
2644
|
-
description: "AI agent orchestration with tools, agents, runs, and execution logs.",
|
|
2645
|
-
showSaveAction: false,
|
|
2646
|
-
children: /* @__PURE__ */ jsxDEV11(AgentDashboard, {}, undefined, false, undefined, this)
|
|
2647
|
-
}, undefined, false, undefined, this);
|
|
2648
|
-
case "ai-chat-assistant":
|
|
2649
|
-
return /* @__PURE__ */ jsxDEV11(TemplateShell, {
|
|
2650
|
-
title: "AI Chat Assistant",
|
|
2651
|
-
description: "Focused assistant surface with reasoning, sources, suggestions, and MCP-aware tools.",
|
|
2652
|
-
showSaveAction: false,
|
|
2653
|
-
children: /* @__PURE__ */ jsxDEV11(AiChatAssistantDashboard, {}, undefined, false, undefined, this)
|
|
2654
|
-
}, undefined, false, undefined, this);
|
|
2655
|
-
case "workflow-system":
|
|
2656
|
-
return /* @__PURE__ */ jsxDEV11(TemplateShell, {
|
|
2657
|
-
title: "Workflow System",
|
|
2658
|
-
description: "Multi-step workflows with role-based approvals.",
|
|
2659
|
-
showSaveAction: false,
|
|
2660
|
-
children: /* @__PURE__ */ jsxDEV11(WorkflowDashboard, {}, undefined, false, undefined, this)
|
|
2661
|
-
}, undefined, false, undefined, this);
|
|
2662
|
-
case "marketplace":
|
|
2663
|
-
return /* @__PURE__ */ jsxDEV11(TemplateShell, {
|
|
2664
|
-
title: "Marketplace",
|
|
2665
|
-
description: "Two-sided marketplace with stores, products, and orders.",
|
|
2666
|
-
showSaveAction: false,
|
|
2667
|
-
children: /* @__PURE__ */ jsxDEV11(MarketplaceDashboard, {}, undefined, false, undefined, this)
|
|
2668
|
-
}, undefined, false, undefined, this);
|
|
2669
|
-
case "integration-hub":
|
|
2670
|
-
return /* @__PURE__ */ jsxDEV11(TemplateShell, {
|
|
2671
|
-
title: "Integration Hub",
|
|
2672
|
-
description: "Third-party integrations with sync and field mapping.",
|
|
2673
|
-
showSaveAction: false,
|
|
2674
|
-
children: /* @__PURE__ */ jsxDEV11(IntegrationDashboard, {}, undefined, false, undefined, this)
|
|
2675
|
-
}, undefined, false, undefined, this);
|
|
2676
|
-
case "analytics-dashboard":
|
|
2677
|
-
return /* @__PURE__ */ jsxDEV11(TemplateShell, {
|
|
2678
|
-
title: "Analytics Dashboard",
|
|
2679
|
-
description: "Custom dashboards with widgets and queries.",
|
|
2680
|
-
showSaveAction: false,
|
|
2681
|
-
children: /* @__PURE__ */ jsxDEV11(AnalyticsDashboard, {}, undefined, false, undefined, this)
|
|
2682
|
-
}, undefined, false, undefined, this);
|
|
2683
|
-
case null:
|
|
2684
|
-
return null;
|
|
2685
|
-
default:
|
|
2686
|
-
return null;
|
|
2687
|
-
}
|
|
2688
|
-
}, [templateId]);
|
|
2689
|
-
return /* @__PURE__ */ jsxDEV11(Dialog2, {
|
|
2690
|
-
open: !!previewComponent,
|
|
2691
|
-
onOpenChange: onClose,
|
|
2692
|
-
children: /* @__PURE__ */ jsxDEV11(DialogContent2, {
|
|
2693
|
-
className: "mb-8 flex h-[calc(100vh-2rem)] min-w-[calc(100vw-2rem)] flex-col justify-between gap-0 p-0",
|
|
2694
|
-
children: /* @__PURE__ */ jsxDEV11(ScrollArea, {
|
|
2695
|
-
className: "flex flex-col justify-between overflow-hidden",
|
|
2696
|
-
children: previewComponent
|
|
2697
|
-
}, undefined, false, undefined, this)
|
|
2698
|
-
}, undefined, false, undefined, this)
|
|
2699
|
-
}, undefined, false, undefined, this);
|
|
2700
|
-
};
|
|
2567
|
+
function TemplateCard({
|
|
2568
|
+
title,
|
|
2569
|
+
description,
|
|
2570
|
+
metaBadges,
|
|
2571
|
+
tags,
|
|
2572
|
+
featureList = [],
|
|
2573
|
+
isNew = false,
|
|
2574
|
+
previewAction,
|
|
2575
|
+
useAction
|
|
2576
|
+
}) {
|
|
2577
|
+
return /* @__PURE__ */ jsxDEV11("div", {
|
|
2578
|
+
className: "editorial-panel relative flex flex-col space-y-4 transition-colors hover:border-[color:rgb(162_79_42_/_0.55)]",
|
|
2579
|
+
children: [
|
|
2580
|
+
isNew ? /* @__PURE__ */ jsxDEV11("span", {
|
|
2581
|
+
className: "absolute top-4 right-4 rounded-full bg-[color:var(--success)] px-2.5 py-1 font-medium text-[11px] text-white uppercase",
|
|
2582
|
+
children: "New"
|
|
2583
|
+
}, undefined, false, undefined, this) : null,
|
|
2584
|
+
/* @__PURE__ */ jsxDEV11("div", {
|
|
2585
|
+
children: [
|
|
2586
|
+
/* @__PURE__ */ jsxDEV11("h3", {
|
|
2587
|
+
className: "font-serif text-2xl tracking-[-0.03em]",
|
|
2588
|
+
children: title
|
|
2589
|
+
}, undefined, false, undefined, this),
|
|
2590
|
+
/* @__PURE__ */ jsxDEV11("p", {
|
|
2591
|
+
className: "mt-1 text-muted-foreground text-sm",
|
|
2592
|
+
children: description
|
|
2593
|
+
}, undefined, false, undefined, this)
|
|
2594
|
+
]
|
|
2595
|
+
}, undefined, true, undefined, this),
|
|
2596
|
+
/* @__PURE__ */ jsxDEV11("div", {
|
|
2597
|
+
className: "flex-1 space-y-3",
|
|
2598
|
+
children: [
|
|
2599
|
+
/* @__PURE__ */ jsxDEV11("div", {
|
|
2600
|
+
className: "flex flex-wrap gap-2",
|
|
2601
|
+
children: metaBadges.map((badge) => /* @__PURE__ */ jsxDEV11("span", {
|
|
2602
|
+
className: "rounded-full border border-border bg-background px-3 py-1 text-[11px] text-foreground",
|
|
2603
|
+
children: badge
|
|
2604
|
+
}, badge, false, undefined, this))
|
|
2605
|
+
}, undefined, false, undefined, this),
|
|
2606
|
+
featureList.length > 0 ? /* @__PURE__ */ jsxDEV11("p", {
|
|
2607
|
+
className: "text-muted-foreground text-xs",
|
|
2608
|
+
children: [
|
|
2609
|
+
/* @__PURE__ */ jsxDEV11("span", {
|
|
2610
|
+
className: "font-medium text-foreground",
|
|
2611
|
+
children: "Features:"
|
|
2612
|
+
}, undefined, false, undefined, this),
|
|
2613
|
+
" ",
|
|
2614
|
+
featureList.join(", ")
|
|
2615
|
+
]
|
|
2616
|
+
}, undefined, true, undefined, this) : null,
|
|
2617
|
+
/* @__PURE__ */ jsxDEV11("div", {
|
|
2618
|
+
className: "flex flex-wrap gap-1",
|
|
2619
|
+
children: tags.map((tag) => /* @__PURE__ */ jsxDEV11("span", {
|
|
2620
|
+
className: "rounded-full border border-border bg-muted px-3 py-1 text-[11px] text-muted-foreground",
|
|
2621
|
+
children: tag
|
|
2622
|
+
}, tag, false, undefined, this))
|
|
2623
|
+
}, undefined, false, undefined, this)
|
|
2624
|
+
]
|
|
2625
|
+
}, undefined, true, undefined, this),
|
|
2626
|
+
/* @__PURE__ */ jsxDEV11("div", {
|
|
2627
|
+
className: "flex gap-2 pt-4",
|
|
2628
|
+
children: [
|
|
2629
|
+
previewAction,
|
|
2630
|
+
useAction
|
|
2631
|
+
]
|
|
2632
|
+
}, undefined, true, undefined, this)
|
|
2633
|
+
]
|
|
2634
|
+
}, undefined, true, undefined, this);
|
|
2635
|
+
}
|
|
2701
2636
|
|
|
2702
|
-
// src/components/templates/
|
|
2637
|
+
// src/components/templates/TemplateCommandDialog.tsx
|
|
2703
2638
|
import {
|
|
2704
2639
|
analyticsEventNames as analyticsEventNames2,
|
|
2705
2640
|
captureAnalyticsEvent as captureAnalyticsEvent2
|
|
2706
2641
|
} from "@contractspec/bundle.library/libs/posthog/client";
|
|
2707
|
-
import { useRegistryTemplates } from "@contractspec/lib.example-shared-ui";
|
|
2708
|
-
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
2709
2642
|
import {
|
|
2710
|
-
Dialog as
|
|
2711
|
-
DialogContent as
|
|
2643
|
+
Dialog as Dialog2,
|
|
2644
|
+
DialogContent as DialogContent2,
|
|
2712
2645
|
DialogDescription as DialogDescription2,
|
|
2713
2646
|
DialogHeader as DialogHeader2,
|
|
2714
2647
|
DialogTitle as DialogTitle2
|
|
2715
2648
|
} from "@contractspec/lib.ui-kit-web/ui/dialog";
|
|
2716
|
-
import {
|
|
2717
|
-
Tooltip,
|
|
2718
|
-
TooltipContent,
|
|
2719
|
-
TooltipProvider,
|
|
2720
|
-
TooltipTrigger
|
|
2721
|
-
} from "@contractspec/lib.ui-kit-web/ui/tooltip";
|
|
2722
|
-
import { getTemplate } from "@contractspec/module.examples";
|
|
2723
|
-
import { Search } from "lucide-react";
|
|
2724
|
-
import Link8 from "next/link";
|
|
2725
|
-
import { useState as useState2 } from "react";
|
|
2726
2649
|
import { jsxDEV as jsxDEV12 } from "react/jsx-dev-runtime";
|
|
2727
2650
|
"use client";
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2651
|
+
function TemplateCommandDialog({
|
|
2652
|
+
templateId,
|
|
2653
|
+
onClose,
|
|
2654
|
+
onDeployStudio
|
|
2655
|
+
}) {
|
|
2656
|
+
const command = templateId ? `npx contractspec init --template ${templateId}` : "";
|
|
2657
|
+
return /* @__PURE__ */ jsxDEV12(Dialog2, {
|
|
2658
|
+
open: !!templateId,
|
|
2659
|
+
onOpenChange: (open) => !open && onClose(),
|
|
2660
|
+
children: /* @__PURE__ */ jsxDEV12(DialogContent2, {
|
|
2661
|
+
className: "max-w-md",
|
|
2662
|
+
children: [
|
|
2663
|
+
/* @__PURE__ */ jsxDEV12(DialogHeader2, {
|
|
2664
|
+
children: [
|
|
2665
|
+
/* @__PURE__ */ jsxDEV12(DialogTitle2, {
|
|
2666
|
+
children: "Use this template"
|
|
2667
|
+
}, undefined, false, undefined, this),
|
|
2668
|
+
/* @__PURE__ */ jsxDEV12(DialogDescription2, {
|
|
2669
|
+
children: "Initialize a new project with this template using the CLI."
|
|
2670
|
+
}, undefined, false, undefined, this)
|
|
2671
|
+
]
|
|
2672
|
+
}, undefined, true, undefined, this),
|
|
2673
|
+
/* @__PURE__ */ jsxDEV12("div", {
|
|
2674
|
+
className: "space-y-4 pt-4",
|
|
2675
|
+
children: [
|
|
2676
|
+
/* @__PURE__ */ jsxDEV12("div", {
|
|
2677
|
+
className: "rounded-md border border-zinc-800 bg-zinc-950 p-4 font-mono text-sm text-zinc-50",
|
|
2678
|
+
children: command
|
|
2679
|
+
}, undefined, false, undefined, this),
|
|
2680
|
+
/* @__PURE__ */ jsxDEV12("div", {
|
|
2681
|
+
className: "flex gap-2",
|
|
2682
|
+
children: /* @__PURE__ */ jsxDEV12("button", {
|
|
2683
|
+
className: "btn-secondary w-full",
|
|
2684
|
+
onClick: () => {
|
|
2685
|
+
if (!templateId) {
|
|
2686
|
+
return;
|
|
2687
|
+
}
|
|
2688
|
+
navigator.clipboard.writeText(command);
|
|
2689
|
+
captureAnalyticsEvent2(analyticsEventNames2.COPY_COMMAND_CLICK, {
|
|
2690
|
+
surface: "templates",
|
|
2691
|
+
templateId,
|
|
2692
|
+
filename: "templates-cli"
|
|
2693
|
+
});
|
|
2694
|
+
},
|
|
2695
|
+
children: "Copy Command"
|
|
2696
|
+
}, undefined, false, undefined, this)
|
|
2697
|
+
}, undefined, false, undefined, this),
|
|
2698
|
+
/* @__PURE__ */ jsxDEV12("div", {
|
|
2699
|
+
className: "relative",
|
|
2700
|
+
children: [
|
|
2701
|
+
/* @__PURE__ */ jsxDEV12("div", {
|
|
2702
|
+
className: "absolute inset-0 flex items-center",
|
|
2703
|
+
children: /* @__PURE__ */ jsxDEV12("span", {
|
|
2704
|
+
className: "w-full border-border border-t"
|
|
2705
|
+
}, undefined, false, undefined, this)
|
|
2706
|
+
}, undefined, false, undefined, this),
|
|
2707
|
+
/* @__PURE__ */ jsxDEV12("div", {
|
|
2708
|
+
className: "relative flex justify-center text-xs uppercase",
|
|
2709
|
+
children: /* @__PURE__ */ jsxDEV12("span", {
|
|
2710
|
+
className: "bg-background px-2 text-muted-foreground",
|
|
2711
|
+
children: "Or"
|
|
2712
|
+
}, undefined, false, undefined, this)
|
|
2713
|
+
}, undefined, false, undefined, this)
|
|
2714
|
+
]
|
|
2715
|
+
}, undefined, true, undefined, this),
|
|
2716
|
+
/* @__PURE__ */ jsxDEV12("button", {
|
|
2717
|
+
className: "btn-ghost w-full text-sm",
|
|
2718
|
+
onClick: () => {
|
|
2719
|
+
if (!templateId) {
|
|
2720
|
+
return;
|
|
2721
|
+
}
|
|
2722
|
+
captureAnalyticsEvent2(analyticsEventNames2.CTA_STUDIO_CLICK, {
|
|
2723
|
+
surface: "templates",
|
|
2724
|
+
templateId
|
|
2725
|
+
});
|
|
2726
|
+
onDeployStudio();
|
|
2727
|
+
},
|
|
2728
|
+
children: "Deploy to Studio"
|
|
2729
|
+
}, undefined, false, undefined, this)
|
|
2730
|
+
]
|
|
2731
|
+
}, undefined, true, undefined, this)
|
|
2732
|
+
]
|
|
2733
|
+
}, undefined, true, undefined, this)
|
|
2734
|
+
}, undefined, false, undefined, this);
|
|
2735
|
+
}
|
|
2736
|
+
|
|
2737
|
+
// src/components/templates/TemplatePreviewContent.tsx
|
|
2738
|
+
import {
|
|
2739
|
+
TemplateShell
|
|
2740
|
+
} from "@contractspec/lib.example-shared-ui";
|
|
2741
|
+
import { LoadingSpinner } from "@contractspec/lib.ui-kit-web/ui/atoms/LoadingSpinner";
|
|
2742
|
+
import dynamic from "next/dynamic";
|
|
2743
|
+
import { jsxDEV as jsxDEV13 } from "react/jsx-dev-runtime";
|
|
2744
|
+
"use client";
|
|
2745
|
+
var SaasDashboard = dynamic(() => import("@contractspec/example.saas-boilerplate").then((module) => module.SaasDashboard), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV13(LoadingSpinner, {}, undefined, false, undefined, this) });
|
|
2746
|
+
var CrmDashboard = dynamic(() => import("@contractspec/example.crm-pipeline").then((module) => module.CrmDashboard), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV13(LoadingSpinner, {}, undefined, false, undefined, this) });
|
|
2747
|
+
var DataGridShowcase = dynamic(() => import("@contractspec/example.data-grid-showcase/ui").then((module) => module.DataGridShowcase), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV13(LoadingSpinner, {}, undefined, false, undefined, this) });
|
|
2748
|
+
var VisualizationShowcase = dynamic(() => import("@contractspec/example.visualization-showcase/ui").then((module) => module.VisualizationShowcase), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV13(LoadingSpinner, {}, undefined, false, undefined, this) });
|
|
2749
|
+
var AgentDashboard = dynamic(() => import("@contractspec/example.agent-console/ui").then((module) => module.AgentDashboard), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV13(LoadingSpinner, {}, undefined, false, undefined, this) });
|
|
2750
|
+
var AiChatAssistantDashboard = dynamic(() => import("@contractspec/example.ai-chat-assistant").then((module) => module.AiChatAssistantDashboard), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV13(LoadingSpinner, {}, undefined, false, undefined, this) });
|
|
2751
|
+
var WorkflowDashboard = dynamic(() => import("@contractspec/example.workflow-system/ui").then((module) => module.WorkflowDashboard), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV13(LoadingSpinner, {}, undefined, false, undefined, this) });
|
|
2752
|
+
var MarketplaceDashboard = dynamic(() => import("@contractspec/example.marketplace/ui").then((module) => module.MarketplaceDashboard), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV13(LoadingSpinner, {}, undefined, false, undefined, this) });
|
|
2753
|
+
var IntegrationDashboard = dynamic(() => import("@contractspec/example.integration-hub/ui").then((module) => module.IntegrationDashboard), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV13(LoadingSpinner, {}, undefined, false, undefined, this) });
|
|
2754
|
+
var AnalyticsDashboard = dynamic(() => import("@contractspec/example.analytics-dashboard").then((module) => module.AnalyticsDashboard), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV13(LoadingSpinner, {}, undefined, false, undefined, this) });
|
|
2755
|
+
var PREVIEW_DEFINITIONS = {
|
|
2756
|
+
"saas-boilerplate": {
|
|
2743
2757
|
title: "SaaS Boilerplate",
|
|
2744
|
-
description: "
|
|
2745
|
-
|
|
2746
|
-
capabilities: "Multi-tenancy, RBAC, Projects, Billing",
|
|
2747
|
-
isNew: true,
|
|
2748
|
-
previewUrl: "/sandbox?template=saas-boilerplate",
|
|
2749
|
-
docsUrl: "/docs/templates/saas-boilerplate"
|
|
2758
|
+
description: "Multi-tenant organizations, projects, settings, and billing usage tracking.",
|
|
2759
|
+
component: SaasDashboard
|
|
2750
2760
|
},
|
|
2751
|
-
{
|
|
2752
|
-
id: "crm-pipeline",
|
|
2753
|
-
templateId: "crm-pipeline",
|
|
2761
|
+
"crm-pipeline": {
|
|
2754
2762
|
title: "CRM Pipeline",
|
|
2755
|
-
description: "Sales CRM with contacts, companies, deals, pipeline stages
|
|
2756
|
-
|
|
2757
|
-
capabilities: "Contacts, Deals, Pipelines, Tasks",
|
|
2758
|
-
isNew: true,
|
|
2759
|
-
previewUrl: "/sandbox?template=crm-pipeline",
|
|
2760
|
-
docsUrl: "/docs/templates/crm-pipeline"
|
|
2763
|
+
description: "Sales CRM with contacts, companies, deals, and pipeline stages.",
|
|
2764
|
+
component: CrmDashboard
|
|
2761
2765
|
},
|
|
2762
|
-
{
|
|
2763
|
-
id: "data-grid-showcase",
|
|
2764
|
-
templateId: "data-grid-showcase",
|
|
2766
|
+
"data-grid-showcase": {
|
|
2765
2767
|
title: "Data Grid Showcase",
|
|
2766
|
-
description: "
|
|
2767
|
-
|
|
2768
|
-
capabilities: "Tables, Sorting, Pagination, Column Controls",
|
|
2769
|
-
isNew: true,
|
|
2770
|
-
previewUrl: "/sandbox?template=data-grid-showcase",
|
|
2771
|
-
docsUrl: "/docs/examples/data-grid-showcase"
|
|
2768
|
+
description: "Shared ContractSpec table primitives with client, server, and DataView-driven lanes.",
|
|
2769
|
+
component: DataGridShowcase
|
|
2772
2770
|
},
|
|
2773
|
-
{
|
|
2774
|
-
id: "visualization-showcase",
|
|
2775
|
-
templateId: "visualization-showcase",
|
|
2771
|
+
"visualization-showcase": {
|
|
2776
2772
|
title: "Visualization Showcase",
|
|
2777
|
-
description: "
|
|
2778
|
-
|
|
2779
|
-
capabilities: "Metrics, Charts, Timelines, Comparisons",
|
|
2780
|
-
isNew: true,
|
|
2781
|
-
previewUrl: "/sandbox?template=visualization-showcase",
|
|
2782
|
-
docsUrl: "/docs/examples/visualization-showcase"
|
|
2773
|
+
description: "ContractSpec-owned chart primitives rendered through shared visualization contracts and design-system wrappers.",
|
|
2774
|
+
component: VisualizationShowcase
|
|
2783
2775
|
},
|
|
2784
|
-
{
|
|
2785
|
-
id: "agent-console",
|
|
2786
|
-
templateId: "agent-console",
|
|
2776
|
+
"agent-console": {
|
|
2787
2777
|
title: "AI Agent Console",
|
|
2788
|
-
description: "AI agent orchestration
|
|
2789
|
-
|
|
2790
|
-
capabilities: "Tools, Agents, Runs, Metrics",
|
|
2791
|
-
isNew: true,
|
|
2792
|
-
previewUrl: "/sandbox?template=agent-console",
|
|
2793
|
-
docsUrl: "/docs/examples/agent-console"
|
|
2778
|
+
description: "AI agent orchestration with tools, agents, runs, and execution logs.",
|
|
2779
|
+
component: AgentDashboard
|
|
2794
2780
|
},
|
|
2795
|
-
{
|
|
2796
|
-
id: "ai-chat-assistant",
|
|
2797
|
-
templateId: "ai-chat-assistant",
|
|
2781
|
+
"ai-chat-assistant": {
|
|
2798
2782
|
title: "AI Chat Assistant",
|
|
2799
|
-
description: "Focused assistant
|
|
2800
|
-
|
|
2801
|
-
capabilities: "Chat UX, Sources, Suggestions, MCP",
|
|
2802
|
-
isNew: true,
|
|
2803
|
-
previewUrl: "/sandbox?template=ai-chat-assistant",
|
|
2804
|
-
docsUrl: "/docs/examples/ai-chat-assistant"
|
|
2783
|
+
description: "Focused assistant surface with reasoning, sources, suggestions, and MCP-aware tools.",
|
|
2784
|
+
component: AiChatAssistantDashboard
|
|
2805
2785
|
},
|
|
2806
|
-
{
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
description: "Multi-step workflows with role-based approvals and state transitions.",
|
|
2811
|
-
tags: ["Business", "Ops"],
|
|
2812
|
-
capabilities: "Workflows, Approvals, State Machine",
|
|
2813
|
-
isNew: true,
|
|
2814
|
-
previewUrl: "/sandbox?template=workflow-system",
|
|
2815
|
-
docsUrl: "/docs/examples/workflow-system"
|
|
2786
|
+
"workflow-system": {
|
|
2787
|
+
title: "Workflow System",
|
|
2788
|
+
description: "Multi-step workflows with role-based approvals.",
|
|
2789
|
+
component: WorkflowDashboard
|
|
2816
2790
|
},
|
|
2817
|
-
{
|
|
2818
|
-
id: "marketplace",
|
|
2819
|
-
templateId: "marketplace",
|
|
2791
|
+
marketplace: {
|
|
2820
2792
|
title: "Marketplace",
|
|
2821
2793
|
description: "Two-sided marketplace with stores, products, orders, and payouts.",
|
|
2822
|
-
|
|
2823
|
-
capabilities: "Stores, Products, Orders, Payouts",
|
|
2824
|
-
isNew: true,
|
|
2825
|
-
previewUrl: "/sandbox?template=marketplace",
|
|
2826
|
-
docsUrl: "/docs/templates/marketplace"
|
|
2794
|
+
component: MarketplaceDashboard
|
|
2827
2795
|
},
|
|
2828
|
-
{
|
|
2829
|
-
id: "integration-hub",
|
|
2830
|
-
templateId: "integration-hub",
|
|
2796
|
+
"integration-hub": {
|
|
2831
2797
|
title: "Integration Hub",
|
|
2832
2798
|
description: "Third-party integrations with connections, sync configs, and field mapping.",
|
|
2833
|
-
|
|
2834
|
-
capabilities: "Integrations, Connections, Sync",
|
|
2835
|
-
isNew: true,
|
|
2836
|
-
previewUrl: "/sandbox?template=integration-hub",
|
|
2837
|
-
docsUrl: "/docs/templates/integration-hub"
|
|
2799
|
+
component: IntegrationDashboard
|
|
2838
2800
|
},
|
|
2839
|
-
{
|
|
2840
|
-
id: "learning-journey-studio-onboarding",
|
|
2841
|
-
templateId: "learning-journey-studio-onboarding",
|
|
2842
|
-
title: "Learning Journey \u2014 Studio Getting Started",
|
|
2843
|
-
description: "First 30 minutes in Studio: choose template, edit spec, regenerate, playground, evolution.",
|
|
2844
|
-
tags: ["Learning", "Onboarding"],
|
|
2845
|
-
capabilities: "Spec-first onboarding, XP/streak, progress widget",
|
|
2846
|
-
isNew: true,
|
|
2847
|
-
previewUrl: "/sandbox?template=learning-journey-studio-onboarding",
|
|
2848
|
-
docsUrl: "/docs/templates/learning-journey-studio-onboarding"
|
|
2849
|
-
},
|
|
2850
|
-
{
|
|
2851
|
-
id: "learning-journey-platform-tour",
|
|
2852
|
-
templateId: "learning-journey-platform-tour",
|
|
2853
|
-
title: "Learning Journey \u2014 Platform Primitives Tour",
|
|
2854
|
-
description: "Touch identity, audit, notifications, jobs, flags, files, metering once with guided steps.",
|
|
2855
|
-
tags: ["Learning", "Platform"],
|
|
2856
|
-
capabilities: "Cross-module tour with event-driven completion",
|
|
2857
|
-
isNew: true,
|
|
2858
|
-
previewUrl: "/sandbox?template=learning-journey-platform-tour",
|
|
2859
|
-
docsUrl: "/docs/templates/learning-journey-platform-tour"
|
|
2860
|
-
},
|
|
2861
|
-
{
|
|
2862
|
-
id: "learning-journey-crm-onboarding",
|
|
2863
|
-
templateId: "learning-journey-crm-onboarding",
|
|
2864
|
-
title: "Learning Journey \u2014 CRM First Win",
|
|
2865
|
-
description: "Get to first closed-won deal: pipeline, contact/company, deal, stages, follow-up.",
|
|
2866
|
-
tags: ["Learning", "CRM"],
|
|
2867
|
-
capabilities: "CRM onboarding with XP/streak/badge",
|
|
2868
|
-
isNew: true,
|
|
2869
|
-
previewUrl: "/sandbox?template=learning-journey-crm-onboarding",
|
|
2870
|
-
docsUrl: "/docs/templates/learning-journey-crm-onboarding"
|
|
2871
|
-
},
|
|
2872
|
-
{
|
|
2873
|
-
id: "analytics-dashboard",
|
|
2874
|
-
templateId: "analytics-dashboard",
|
|
2801
|
+
"analytics-dashboard": {
|
|
2875
2802
|
title: "Analytics Dashboard",
|
|
2876
|
-
description: "Custom dashboards with widgets
|
|
2877
|
-
|
|
2878
|
-
capabilities: "Dashboards, Widgets, Queries",
|
|
2879
|
-
isNew: true,
|
|
2880
|
-
previewUrl: "/sandbox?template=analytics-dashboard",
|
|
2881
|
-
docsUrl: "/docs/templates/analytics-dashboard"
|
|
2882
|
-
},
|
|
2883
|
-
{
|
|
2884
|
-
id: "plumber-ops",
|
|
2885
|
-
templateId: "messaging-app",
|
|
2886
|
-
title: "Plumber Ops",
|
|
2887
|
-
description: "Complete workflow: Quotes \u2192 Deposit \u2192 Job \u2192 Invoice \u2192 Payment. Policy-enforced approvals.",
|
|
2888
|
-
tags: ["Trades", "Payments"],
|
|
2889
|
-
capabilities: "Quotes, Jobs, Invoicing, Payments",
|
|
2890
|
-
previewUrl: "/sandbox?template=plumber-ops",
|
|
2891
|
-
docsUrl: "/docs/specs/workflows"
|
|
2892
|
-
},
|
|
2893
|
-
{
|
|
2894
|
-
id: "coliving-management",
|
|
2895
|
-
templateId: "recipe-app-i18n",
|
|
2896
|
-
title: "Coliving Management",
|
|
2897
|
-
description: "Coliving management: Onboarding, chores, shared wallet. Multi-party approvals built-in.",
|
|
2898
|
-
tags: ["Coliving", "Finance"],
|
|
2899
|
-
capabilities: "Tasks, Approvals, Payments",
|
|
2900
|
-
previewUrl: "/sandbox?template=coliving-management",
|
|
2901
|
-
docsUrl: "/docs/specs/workflows"
|
|
2902
|
-
},
|
|
2903
|
-
{
|
|
2904
|
-
id: "chores-allowance",
|
|
2905
|
-
templateId: "todos-app",
|
|
2906
|
-
title: "Chores & Allowance",
|
|
2907
|
-
description: "Family task management with approval workflows. Teach financial accountability safely.",
|
|
2908
|
-
tags: ["Family", "Ops"],
|
|
2909
|
-
capabilities: "Tasks, Approvals, Notifications",
|
|
2910
|
-
previewUrl: "/sandbox?template=chores-allowance",
|
|
2911
|
-
docsUrl: "/docs/specs/workflows"
|
|
2912
|
-
},
|
|
2913
|
-
{
|
|
2914
|
-
id: "service-dispatch",
|
|
2915
|
-
templateId: "messaging-app",
|
|
2916
|
-
title: "Service Dispatch",
|
|
2917
|
-
description: "Field service scheduling, routing, and invoicing. Real-time coordination with policy gates.",
|
|
2918
|
-
tags: ["Ops", "Trades"],
|
|
2919
|
-
capabilities: "Scheduling, Maps, Invoicing",
|
|
2920
|
-
previewUrl: "/sandbox?template=service-dispatch",
|
|
2921
|
-
docsUrl: "/docs/specs/workflows"
|
|
2922
|
-
},
|
|
2923
|
-
{
|
|
2924
|
-
id: "content-review",
|
|
2925
|
-
templateId: "todos-app",
|
|
2926
|
-
title: "Content Review",
|
|
2927
|
-
description: "Multi-stage approval workflow for content. Audit trail for every decision.",
|
|
2928
|
-
tags: ["Ops"],
|
|
2929
|
-
capabilities: "Workflows, Approvals, Comments",
|
|
2930
|
-
previewUrl: "/sandbox?template=content-review",
|
|
2931
|
-
docsUrl: "/docs/specs/workflows"
|
|
2803
|
+
description: "Custom dashboards with widgets and queries.",
|
|
2804
|
+
component: AnalyticsDashboard
|
|
2932
2805
|
}
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2806
|
+
};
|
|
2807
|
+
function TemplatePreviewContent({
|
|
2808
|
+
templateId
|
|
2809
|
+
}) {
|
|
2810
|
+
const preview = PREVIEW_DEFINITIONS[templateId];
|
|
2811
|
+
if (!preview) {
|
|
2812
|
+
return null;
|
|
2813
|
+
}
|
|
2814
|
+
const PreviewComponent = preview.component;
|
|
2815
|
+
return /* @__PURE__ */ jsxDEV13(TemplateShell, {
|
|
2816
|
+
title: preview.title,
|
|
2817
|
+
description: preview.description,
|
|
2818
|
+
showSaveAction: false,
|
|
2819
|
+
children: /* @__PURE__ */ jsxDEV13(PreviewComponent, {}, undefined, false, undefined, this)
|
|
2820
|
+
}, undefined, false, undefined, this);
|
|
2821
|
+
}
|
|
2822
|
+
|
|
2823
|
+
// src/components/templates/TemplatesBrowseControls.tsx
|
|
2824
|
+
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
2825
|
+
import { Search } from "lucide-react";
|
|
2826
|
+
import { jsxDEV as jsxDEV14 } from "react/jsx-dev-runtime";
|
|
2827
|
+
"use client";
|
|
2828
|
+
function TemplatesBrowseControls({
|
|
2829
|
+
registryConfigured,
|
|
2830
|
+
availableSources,
|
|
2831
|
+
source,
|
|
2832
|
+
onSourceChange,
|
|
2833
|
+
search,
|
|
2834
|
+
onSearchChange,
|
|
2835
|
+
selectedTag,
|
|
2836
|
+
onTagChange,
|
|
2837
|
+
availableTags
|
|
2838
|
+
}) {
|
|
2839
|
+
return /* @__PURE__ */ jsxDEV14("section", {
|
|
2840
|
+
className: "editorial-section",
|
|
2841
|
+
children: /* @__PURE__ */ jsxDEV14("div", {
|
|
2842
|
+
className: "editorial-shell space-y-6",
|
|
2843
|
+
children: [
|
|
2844
|
+
/* @__PURE__ */ jsxDEV14("div", {
|
|
2845
|
+
className: "flex flex-col gap-6 lg:flex-row lg:items-end lg:justify-between",
|
|
2846
|
+
children: [
|
|
2847
|
+
/* @__PURE__ */ jsxDEV14("div", {
|
|
2848
|
+
className: "max-w-3xl space-y-3",
|
|
2970
2849
|
children: [
|
|
2971
|
-
/* @__PURE__ */
|
|
2972
|
-
className: "
|
|
2973
|
-
children:
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
className: "editorial-subtitle",
|
|
2984
|
-
children: "These scenarios are the fastest way to understand ContractSpec: explicit contracts, aligned surfaces, and an adoption path from OSS exploration into Studio deployment."
|
|
2985
|
-
}, undefined, false, undefined, this)
|
|
2986
|
-
]
|
|
2987
|
-
}, undefined, true, undefined, this),
|
|
2988
|
-
/* @__PURE__ */ jsxDEV12("div", {
|
|
2989
|
-
className: "editorial-proof-strip",
|
|
2990
|
-
children: [
|
|
2991
|
-
/* @__PURE__ */ jsxDEV12("div", {
|
|
2992
|
-
className: "editorial-stat",
|
|
2993
|
-
children: [
|
|
2994
|
-
/* @__PURE__ */ jsxDEV12("span", {
|
|
2995
|
-
className: "editorial-stat-value",
|
|
2996
|
-
children: templates.length
|
|
2997
|
-
}, undefined, false, undefined, this),
|
|
2998
|
-
/* @__PURE__ */ jsxDEV12("span", {
|
|
2999
|
-
className: "editorial-label",
|
|
3000
|
-
children: "curated scenarios"
|
|
3001
|
-
}, undefined, false, undefined, this)
|
|
3002
|
-
]
|
|
3003
|
-
}, undefined, true, undefined, this),
|
|
3004
|
-
/* @__PURE__ */ jsxDEV12("div", {
|
|
3005
|
-
className: "editorial-stat",
|
|
3006
|
-
children: [
|
|
3007
|
-
/* @__PURE__ */ jsxDEV12("span", {
|
|
3008
|
-
className: "editorial-stat-value",
|
|
3009
|
-
children: "2"
|
|
3010
|
-
}, undefined, false, undefined, this),
|
|
3011
|
-
/* @__PURE__ */ jsxDEV12("span", {
|
|
3012
|
-
className: "editorial-label",
|
|
3013
|
-
children: "entry paths"
|
|
3014
|
-
}, undefined, false, undefined, this)
|
|
3015
|
-
]
|
|
3016
|
-
}, undefined, true, undefined, this),
|
|
3017
|
-
/* @__PURE__ */ jsxDEV12("div", {
|
|
3018
|
-
className: "editorial-stat",
|
|
3019
|
-
children: [
|
|
3020
|
-
/* @__PURE__ */ jsxDEV12("span", {
|
|
3021
|
-
className: "editorial-stat-value",
|
|
3022
|
-
children: "OSS"
|
|
3023
|
-
}, undefined, false, undefined, this),
|
|
3024
|
-
/* @__PURE__ */ jsxDEV12("span", {
|
|
3025
|
-
className: "editorial-label",
|
|
3026
|
-
children: "first, Studio second"
|
|
3027
|
-
}, undefined, false, undefined, this)
|
|
3028
|
-
]
|
|
3029
|
-
}, undefined, true, undefined, this)
|
|
3030
|
-
]
|
|
3031
|
-
}, undefined, true, undefined, this)
|
|
2850
|
+
/* @__PURE__ */ jsxDEV14("p", {
|
|
2851
|
+
className: "editorial-kicker",
|
|
2852
|
+
children: "Browse by source"
|
|
2853
|
+
}, undefined, false, undefined, this),
|
|
2854
|
+
/* @__PURE__ */ jsxDEV14("h2", {
|
|
2855
|
+
className: "font-serif text-4xl tracking-[-0.04em]",
|
|
2856
|
+
children: "Use local scenarios for core proof, then scan the community."
|
|
2857
|
+
}, undefined, false, undefined, this),
|
|
2858
|
+
/* @__PURE__ */ jsxDEV14("p", {
|
|
2859
|
+
className: "text-muted-foreground text-sm leading-7",
|
|
2860
|
+
children: registryConfigured ? "Local templates show the official adoption path. Community templates show where the ecosystem is pushing the system next." : "Local templates show the official adoption path. Community browsing appears automatically when a registry URL is configured."
|
|
2861
|
+
}, undefined, false, undefined, this)
|
|
3032
2862
|
]
|
|
3033
|
-
}, undefined, true, undefined, this)
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
2863
|
+
}, undefined, true, undefined, this),
|
|
2864
|
+
registryConfigured ? /* @__PURE__ */ jsxDEV14("div", {
|
|
2865
|
+
className: "flex gap-2",
|
|
2866
|
+
children: availableSources.map((option) => /* @__PURE__ */ jsxDEV14("button", {
|
|
2867
|
+
onClick: () => onSourceChange(option),
|
|
2868
|
+
className: cn("rounded-full px-4 py-2 font-medium text-sm transition-colors", {
|
|
2869
|
+
"bg-primary text-primary-foreground": source === option,
|
|
2870
|
+
"border border-border bg-card hover:bg-card/80": source !== option
|
|
2871
|
+
}),
|
|
2872
|
+
"aria-pressed": source === option,
|
|
2873
|
+
children: option === "local" ? "Local" : "Community"
|
|
2874
|
+
}, option, false, undefined, this))
|
|
2875
|
+
}, undefined, false, undefined, this) : null
|
|
2876
|
+
]
|
|
2877
|
+
}, undefined, true, undefined, this),
|
|
2878
|
+
/* @__PURE__ */ jsxDEV14("div", {
|
|
2879
|
+
className: "editorial-panel space-y-5",
|
|
2880
|
+
children: [
|
|
2881
|
+
/* @__PURE__ */ jsxDEV14("div", {
|
|
2882
|
+
className: "relative",
|
|
3039
2883
|
children: [
|
|
3040
|
-
/* @__PURE__ */
|
|
3041
|
-
className: "
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
"bg-primary text-primary-foreground": source === "registry",
|
|
3076
|
-
"border border-border bg-card hover:bg-card/80": source !== "registry"
|
|
3077
|
-
}),
|
|
3078
|
-
"aria-pressed": source === "registry",
|
|
3079
|
-
children: "Community"
|
|
3080
|
-
}, undefined, false, undefined, this)
|
|
3081
|
-
]
|
|
3082
|
-
}, undefined, true, undefined, this)
|
|
3083
|
-
]
|
|
3084
|
-
}, undefined, true, undefined, this),
|
|
3085
|
-
/* @__PURE__ */ jsxDEV12("div", {
|
|
3086
|
-
className: "editorial-panel space-y-5",
|
|
3087
|
-
children: [
|
|
3088
|
-
/* @__PURE__ */ jsxDEV12("div", {
|
|
3089
|
-
className: "relative",
|
|
3090
|
-
children: [
|
|
3091
|
-
/* @__PURE__ */ jsxDEV12(Search, {
|
|
3092
|
-
className: "absolute top-3.5 left-4 text-muted-foreground",
|
|
3093
|
-
size: 18
|
|
3094
|
-
}, undefined, false, undefined, this),
|
|
3095
|
-
/* @__PURE__ */ jsxDEV12("input", {
|
|
3096
|
-
type: "text",
|
|
3097
|
-
placeholder: "Search scenarios, industries, or capabilities",
|
|
3098
|
-
value: search,
|
|
3099
|
-
onChange: (e) => setSearch(e.target.value),
|
|
3100
|
-
className: "w-full rounded-full border border-border bg-background px-12 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-ring",
|
|
3101
|
-
"aria-label": "Search templates"
|
|
3102
|
-
}, undefined, false, undefined, this)
|
|
3103
|
-
]
|
|
3104
|
-
}, undefined, true, undefined, this),
|
|
3105
|
-
/* @__PURE__ */ jsxDEV12("div", {
|
|
3106
|
-
className: "flex flex-wrap gap-2",
|
|
3107
|
-
children: [
|
|
3108
|
-
/* @__PURE__ */ jsxDEV12("button", {
|
|
3109
|
-
onClick: () => setSelectedTag(null),
|
|
3110
|
-
className: cn("rounded-full px-4 py-2 font-medium text-sm transition-colors", {
|
|
3111
|
-
"bg-primary text-primary-foreground": selectedTag === null,
|
|
3112
|
-
"border border-border bg-card hover:bg-card/80": selectedTag !== null
|
|
3113
|
-
}),
|
|
3114
|
-
"aria-pressed": selectedTag === null,
|
|
3115
|
-
children: "All"
|
|
3116
|
-
}, undefined, false, undefined, this),
|
|
3117
|
-
allTags.map((tag) => /* @__PURE__ */ jsxDEV12("button", {
|
|
3118
|
-
onClick: () => setSelectedTag(tag),
|
|
3119
|
-
className: cn("rounded-full px-4 py-2 font-medium text-sm transition-colors", {
|
|
3120
|
-
"bg-primary text-primary-foreground": selectedTag === tag,
|
|
3121
|
-
"border border-border bg-card hover:bg-card/80": selectedTag !== tag
|
|
3122
|
-
}),
|
|
3123
|
-
"aria-pressed": selectedTag === tag,
|
|
3124
|
-
children: tag
|
|
3125
|
-
}, tag, false, undefined, this))
|
|
3126
|
-
]
|
|
3127
|
-
}, undefined, true, undefined, this)
|
|
3128
|
-
]
|
|
3129
|
-
}, undefined, true, undefined, this)
|
|
2884
|
+
/* @__PURE__ */ jsxDEV14(Search, {
|
|
2885
|
+
className: "absolute top-3.5 left-4 text-muted-foreground",
|
|
2886
|
+
size: 18
|
|
2887
|
+
}, undefined, false, undefined, this),
|
|
2888
|
+
/* @__PURE__ */ jsxDEV14("input", {
|
|
2889
|
+
type: "text",
|
|
2890
|
+
placeholder: "Search scenarios, industries, or tags",
|
|
2891
|
+
value: search,
|
|
2892
|
+
onChange: (event) => onSearchChange(event.target.value),
|
|
2893
|
+
className: "w-full rounded-full border border-border bg-background px-12 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-ring",
|
|
2894
|
+
"aria-label": "Search templates"
|
|
2895
|
+
}, undefined, false, undefined, this)
|
|
2896
|
+
]
|
|
2897
|
+
}, undefined, true, undefined, this),
|
|
2898
|
+
/* @__PURE__ */ jsxDEV14("div", {
|
|
2899
|
+
className: "flex flex-wrap gap-2",
|
|
2900
|
+
children: [
|
|
2901
|
+
/* @__PURE__ */ jsxDEV14("button", {
|
|
2902
|
+
onClick: () => onTagChange(null),
|
|
2903
|
+
className: cn("rounded-full px-4 py-2 font-medium text-sm transition-colors", {
|
|
2904
|
+
"bg-primary text-primary-foreground": selectedTag === null,
|
|
2905
|
+
"border border-border bg-card hover:bg-card/80": selectedTag !== null
|
|
2906
|
+
}),
|
|
2907
|
+
"aria-pressed": selectedTag === null,
|
|
2908
|
+
children: "All"
|
|
2909
|
+
}, undefined, false, undefined, this),
|
|
2910
|
+
availableTags.map((tag) => /* @__PURE__ */ jsxDEV14("button", {
|
|
2911
|
+
onClick: () => onTagChange(tag),
|
|
2912
|
+
className: cn("rounded-full px-4 py-2 font-medium text-sm transition-colors", {
|
|
2913
|
+
"bg-primary text-primary-foreground": selectedTag === tag,
|
|
2914
|
+
"border border-border bg-card hover:bg-card/80": selectedTag !== tag
|
|
2915
|
+
}),
|
|
2916
|
+
"aria-pressed": selectedTag === tag,
|
|
2917
|
+
children: tag
|
|
2918
|
+
}, tag, false, undefined, this))
|
|
3130
2919
|
]
|
|
3131
2920
|
}, undefined, true, undefined, this)
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
2921
|
+
]
|
|
2922
|
+
}, undefined, true, undefined, this)
|
|
2923
|
+
]
|
|
2924
|
+
}, undefined, true, undefined, this)
|
|
2925
|
+
}, undefined, false, undefined, this);
|
|
2926
|
+
}
|
|
2927
|
+
|
|
2928
|
+
// src/components/templates/template-new.ts
|
|
2929
|
+
var NEW_TEMPLATE_IDS = [
|
|
2930
|
+
"minimal",
|
|
2931
|
+
"messaging-agent-actions",
|
|
2932
|
+
"policy-safe-knowledge-assistant",
|
|
2933
|
+
"visualization-showcase"
|
|
2934
|
+
];
|
|
2935
|
+
var NEW_TEMPLATE_ID_SET = new Set(NEW_TEMPLATE_IDS);
|
|
2936
|
+
function isNewTemplateId(templateId) {
|
|
2937
|
+
return NEW_TEMPLATE_ID_SET.has(templateId);
|
|
2938
|
+
}
|
|
2939
|
+
|
|
2940
|
+
// src/components/templates/template-catalog.ts
|
|
2941
|
+
import { listExamples, listTemplates } from "@contractspec/module.examples";
|
|
2942
|
+
var NEW_TEMPLATE_INDEX = new Map(NEW_TEMPLATE_IDS.map((templateId, index) => [templateId, index]));
|
|
2943
|
+
function buildLocalTemplateCatalog(examples = listExamples(), templates = listTemplates()) {
|
|
2944
|
+
const templatesById = new Map(templates.map((template) => [template.id, template]));
|
|
2945
|
+
return examples.filter((example) => example.meta.visibility === "public" && example.surfaces.templates).map((example) => {
|
|
2946
|
+
const template = templatesById.get(example.meta.key);
|
|
2947
|
+
const tags = Array.from(new Set(example.meta.tags.map((tag) => tag.trim()).filter(Boolean))).sort((left, right) => left.localeCompare(right));
|
|
2948
|
+
return {
|
|
2949
|
+
id: example.meta.key,
|
|
2950
|
+
title: example.meta.title ?? template?.name ?? example.meta.key,
|
|
2951
|
+
description: example.meta.summary ?? example.meta.description,
|
|
2952
|
+
tags,
|
|
2953
|
+
kind: example.meta.kind,
|
|
2954
|
+
stability: example.meta.stability,
|
|
2955
|
+
previewUrl: template?.preview?.demoUrl ?? `/sandbox?template=${encodeURIComponent(example.meta.key)}`,
|
|
2956
|
+
featureList: [...template?.features ?? []],
|
|
2957
|
+
sandboxModes: example.surfaces.sandbox.modes,
|
|
2958
|
+
renderTargets: [...template?.renderTargets ?? []],
|
|
2959
|
+
isNew: isNewTemplateId(example.meta.key),
|
|
2960
|
+
packageName: example.entrypoints.packageName
|
|
2961
|
+
};
|
|
2962
|
+
}).sort(compareLocalTemplateCatalogItems);
|
|
2963
|
+
}
|
|
2964
|
+
function matchesTemplateFilters(template, search, selectedTag) {
|
|
2965
|
+
const haystack = [
|
|
2966
|
+
template.title,
|
|
2967
|
+
template.description,
|
|
2968
|
+
template.tags.join(" ")
|
|
2969
|
+
].join(" ").toLowerCase();
|
|
2970
|
+
const searchTokens = search.trim().toLowerCase().split(/\s+/).filter(Boolean);
|
|
2971
|
+
const matchesSearch = searchTokens.length === 0 || searchTokens.every((token) => haystack.includes(token));
|
|
2972
|
+
const matchesTag = selectedTag === null || template.tags.includes(selectedTag);
|
|
2973
|
+
return matchesSearch && matchesTag;
|
|
2974
|
+
}
|
|
2975
|
+
function formatExampleKindLabel(kind) {
|
|
2976
|
+
return kind.split("-").map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(" ");
|
|
2977
|
+
}
|
|
2978
|
+
function formatStabilityLabel(stability) {
|
|
2979
|
+
return stability.split("_").map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(" ");
|
|
2980
|
+
}
|
|
2981
|
+
function compareLocalTemplateCatalogItems(left, right) {
|
|
2982
|
+
const leftNewIndex = NEW_TEMPLATE_INDEX.get(left.id);
|
|
2983
|
+
const rightNewIndex = NEW_TEMPLATE_INDEX.get(right.id);
|
|
2984
|
+
if (leftNewIndex !== undefined || rightNewIndex !== undefined) {
|
|
2985
|
+
if (leftNewIndex === undefined) {
|
|
2986
|
+
return 1;
|
|
2987
|
+
}
|
|
2988
|
+
if (rightNewIndex === undefined) {
|
|
2989
|
+
return -1;
|
|
2990
|
+
}
|
|
2991
|
+
return leftNewIndex - rightNewIndex;
|
|
2992
|
+
}
|
|
2993
|
+
return left.title.localeCompare(right.title);
|
|
2994
|
+
}
|
|
2995
|
+
|
|
2996
|
+
// src/components/templates/template-preview.ts
|
|
2997
|
+
var INLINE_TEMPLATE_PREVIEW_IDS = [
|
|
2998
|
+
"agent-console",
|
|
2999
|
+
"ai-chat-assistant",
|
|
3000
|
+
"analytics-dashboard",
|
|
3001
|
+
"crm-pipeline",
|
|
3002
|
+
"data-grid-showcase",
|
|
3003
|
+
"integration-hub",
|
|
3004
|
+
"marketplace",
|
|
3005
|
+
"saas-boilerplate",
|
|
3006
|
+
"visualization-showcase",
|
|
3007
|
+
"workflow-system"
|
|
3008
|
+
];
|
|
3009
|
+
var INLINE_TEMPLATE_PREVIEW_SET = new Set(INLINE_TEMPLATE_PREVIEW_IDS);
|
|
3010
|
+
function supportsInlineTemplatePreview(templateId) {
|
|
3011
|
+
return INLINE_TEMPLATE_PREVIEW_SET.has(templateId);
|
|
3012
|
+
}
|
|
3013
|
+
function getLocalTemplatePreviewAction(template) {
|
|
3014
|
+
if (supportsInlineTemplatePreview(template.id)) {
|
|
3015
|
+
return { kind: "modal", templateId: template.id };
|
|
3016
|
+
}
|
|
3017
|
+
return { kind: "sandbox", href: template.previewUrl };
|
|
3018
|
+
}
|
|
3019
|
+
function getRegistryTemplatePreviewAction(template, localTemplate) {
|
|
3020
|
+
if (!localTemplate) {
|
|
3021
|
+
return { kind: "disabled" };
|
|
3022
|
+
}
|
|
3023
|
+
return getLocalTemplatePreviewAction(localTemplate);
|
|
3024
|
+
}
|
|
3025
|
+
|
|
3026
|
+
// src/components/templates/TemplatesCatalogSection.tsx
|
|
3027
|
+
import Link8 from "next/link";
|
|
3028
|
+
import { jsxDEV as jsxDEV15 } from "react/jsx-dev-runtime";
|
|
3029
|
+
"use client";
|
|
3030
|
+
function TemplatesCatalogSection({
|
|
3031
|
+
source,
|
|
3032
|
+
registryConfigured,
|
|
3033
|
+
registryLoading,
|
|
3034
|
+
localTemplates,
|
|
3035
|
+
registryTemplates,
|
|
3036
|
+
localTemplateById,
|
|
3037
|
+
onPreview,
|
|
3038
|
+
onUseTemplate
|
|
3039
|
+
}) {
|
|
3040
|
+
const showRegistry = source === "registry" && registryConfigured;
|
|
3041
|
+
return /* @__PURE__ */ jsxDEV15("section", {
|
|
3042
|
+
className: "section-padding",
|
|
3043
|
+
children: /* @__PURE__ */ jsxDEV15("div", {
|
|
3044
|
+
className: "editorial-shell",
|
|
3045
|
+
children: showRegistry ? registryLoading ? /* @__PURE__ */ jsxDEV15("div", {
|
|
3046
|
+
className: "py-12 text-center",
|
|
3047
|
+
children: /* @__PURE__ */ jsxDEV15("p", {
|
|
3048
|
+
className: "text-muted-foreground",
|
|
3049
|
+
children: "Loading community templates\u2026"
|
|
3050
|
+
}, undefined, false, undefined, this)
|
|
3051
|
+
}, undefined, false, undefined, this) : registryTemplates.length === 0 ? /* @__PURE__ */ jsxDEV15("div", {
|
|
3052
|
+
className: "py-12 text-center",
|
|
3053
|
+
children: /* @__PURE__ */ jsxDEV15("p", {
|
|
3054
|
+
className: "text-muted-foreground",
|
|
3055
|
+
children: "No community templates found."
|
|
3056
|
+
}, undefined, false, undefined, this)
|
|
3057
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV15("div", {
|
|
3058
|
+
className: "grid gap-6 md:grid-cols-2 lg:grid-cols-3",
|
|
3059
|
+
children: registryTemplates.map((template) => {
|
|
3060
|
+
const localTemplate = localTemplateById.get(template.id);
|
|
3061
|
+
const previewAction = getRegistryTemplatePreviewAction(template, localTemplate);
|
|
3062
|
+
return /* @__PURE__ */ jsxDEV15(TemplateCard, {
|
|
3063
|
+
title: template.name,
|
|
3064
|
+
description: template.description,
|
|
3065
|
+
metaBadges: ["Community"],
|
|
3066
|
+
tags: template.tags,
|
|
3067
|
+
previewAction: previewAction.kind === "modal" ? /* @__PURE__ */ jsxDEV15("button", {
|
|
3068
|
+
className: "btn-ghost flex-1 text-center text-xs",
|
|
3069
|
+
onClick: () => onPreview(template.id),
|
|
3070
|
+
children: "Preview"
|
|
3071
|
+
}, undefined, false, undefined, this) : previewAction.kind === "sandbox" ? /* @__PURE__ */ jsxDEV15(Link8, {
|
|
3072
|
+
href: previewAction.href,
|
|
3073
|
+
className: "btn-ghost flex-1 text-center text-xs",
|
|
3074
|
+
children: "Open Sandbox"
|
|
3075
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV15("button", {
|
|
3076
|
+
className: "btn-ghost flex-1 cursor-not-allowed text-center text-xs opacity-60",
|
|
3077
|
+
type: "button",
|
|
3078
|
+
disabled: true,
|
|
3079
|
+
children: "Preview Unavailable"
|
|
3080
|
+
}, undefined, false, undefined, this),
|
|
3081
|
+
useAction: /* @__PURE__ */ jsxDEV15("button", {
|
|
3082
|
+
className: "btn-primary flex-1 text-center text-xs",
|
|
3083
|
+
onClick: () => onUseTemplate(template.id, "registry"),
|
|
3084
|
+
children: "Use Template"
|
|
3085
|
+
}, undefined, false, undefined, this)
|
|
3086
|
+
}, template.id, false, undefined, this);
|
|
3087
|
+
})
|
|
3088
|
+
}, undefined, false, undefined, this) : localTemplates.length === 0 ? /* @__PURE__ */ jsxDEV15("div", {
|
|
3089
|
+
className: "py-12 text-center",
|
|
3090
|
+
children: /* @__PURE__ */ jsxDEV15("p", {
|
|
3091
|
+
className: "text-muted-foreground",
|
|
3092
|
+
children: "No templates match your filters. Try a different search."
|
|
3093
|
+
}, undefined, false, undefined, this)
|
|
3094
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV15("div", {
|
|
3095
|
+
className: "grid gap-6 md:grid-cols-2 lg:grid-cols-3",
|
|
3096
|
+
children: localTemplates.map((template) => {
|
|
3097
|
+
const previewAction = getLocalTemplatePreviewAction(template);
|
|
3098
|
+
return /* @__PURE__ */ jsxDEV15(TemplateCard, {
|
|
3099
|
+
title: template.title,
|
|
3100
|
+
description: template.description,
|
|
3101
|
+
isNew: template.isNew,
|
|
3102
|
+
metaBadges: [
|
|
3103
|
+
formatExampleKindLabel(template.kind),
|
|
3104
|
+
formatStabilityLabel(template.stability)
|
|
3105
|
+
],
|
|
3106
|
+
tags: template.tags,
|
|
3107
|
+
featureList: template.featureList,
|
|
3108
|
+
previewAction: previewAction.kind === "modal" ? /* @__PURE__ */ jsxDEV15("button", {
|
|
3109
|
+
className: "btn-ghost flex-1 text-center text-xs",
|
|
3110
|
+
onClick: () => onPreview(template.id),
|
|
3111
|
+
children: "Preview"
|
|
3112
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV15(Link8, {
|
|
3113
|
+
href: previewAction.href,
|
|
3114
|
+
className: "btn-ghost flex-1 text-center text-xs",
|
|
3115
|
+
children: "Open Sandbox"
|
|
3116
|
+
}, undefined, false, undefined, this),
|
|
3117
|
+
useAction: /* @__PURE__ */ jsxDEV15("button", {
|
|
3118
|
+
className: "btn-primary flex-1 text-center text-xs",
|
|
3119
|
+
onClick: () => onUseTemplate(template.id, "local"),
|
|
3120
|
+
children: "Use Template"
|
|
3121
|
+
}, undefined, false, undefined, this)
|
|
3122
|
+
}, template.id, false, undefined, this);
|
|
3123
|
+
})
|
|
3124
|
+
}, undefined, false, undefined, this)
|
|
3125
|
+
}, undefined, false, undefined, this)
|
|
3126
|
+
}, undefined, false, undefined, this);
|
|
3127
|
+
}
|
|
3128
|
+
|
|
3129
|
+
// src/components/templates/TemplatesHeroSection.tsx
|
|
3130
|
+
import { jsxDEV as jsxDEV16 } from "react/jsx-dev-runtime";
|
|
3131
|
+
function TemplatesHeroSection({
|
|
3132
|
+
localTemplateCount,
|
|
3133
|
+
sourceCount
|
|
3134
|
+
}) {
|
|
3135
|
+
return /* @__PURE__ */ jsxDEV16("section", {
|
|
3136
|
+
className: "section-padding hero-gradient border-border/70 border-b",
|
|
3137
|
+
children: /* @__PURE__ */ jsxDEV16("div", {
|
|
3138
|
+
className: "editorial-shell space-y-8",
|
|
3139
|
+
children: [
|
|
3140
|
+
/* @__PURE__ */ jsxDEV16("div", {
|
|
3141
|
+
className: "max-w-4xl space-y-5",
|
|
3142
|
+
children: [
|
|
3143
|
+
/* @__PURE__ */ jsxDEV16("p", {
|
|
3144
|
+
className: "editorial-kicker",
|
|
3145
|
+
children: "Proof through real scenarios"
|
|
3146
|
+
}, undefined, false, undefined, this),
|
|
3147
|
+
/* @__PURE__ */ jsxDEV16("h1", {
|
|
3148
|
+
className: "editorial-title",
|
|
3149
|
+
children: "Templates that show the open system in practice."
|
|
3150
|
+
}, undefined, false, undefined, this),
|
|
3151
|
+
/* @__PURE__ */ jsxDEV16("p", {
|
|
3152
|
+
className: "editorial-subtitle",
|
|
3153
|
+
children: "These scenarios are the fastest way to understand ContractSpec: explicit contracts, aligned surfaces, and an adoption path from OSS exploration into Studio deployment."
|
|
3154
|
+
}, undefined, false, undefined, this)
|
|
3155
|
+
]
|
|
3156
|
+
}, undefined, true, undefined, this),
|
|
3157
|
+
/* @__PURE__ */ jsxDEV16("div", {
|
|
3158
|
+
className: "editorial-proof-strip",
|
|
3159
|
+
children: [
|
|
3160
|
+
/* @__PURE__ */ jsxDEV16("div", {
|
|
3161
|
+
className: "editorial-stat",
|
|
3162
|
+
children: [
|
|
3163
|
+
/* @__PURE__ */ jsxDEV16("span", {
|
|
3164
|
+
className: "editorial-stat-value",
|
|
3165
|
+
children: localTemplateCount
|
|
3166
|
+
}, undefined, false, undefined, this),
|
|
3167
|
+
/* @__PURE__ */ jsxDEV16("span", {
|
|
3168
|
+
className: "editorial-label",
|
|
3169
|
+
children: "curated scenarios"
|
|
3142
3170
|
}, undefined, false, undefined, this)
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3171
|
+
]
|
|
3172
|
+
}, undefined, true, undefined, this),
|
|
3173
|
+
/* @__PURE__ */ jsxDEV16("div", {
|
|
3174
|
+
className: "editorial-stat",
|
|
3175
|
+
children: [
|
|
3176
|
+
/* @__PURE__ */ jsxDEV16("span", {
|
|
3177
|
+
className: "editorial-stat-value",
|
|
3178
|
+
children: sourceCount
|
|
3179
|
+
}, undefined, false, undefined, this),
|
|
3180
|
+
/* @__PURE__ */ jsxDEV16("span", {
|
|
3181
|
+
className: "editorial-label",
|
|
3182
|
+
children: "entry paths"
|
|
3148
3183
|
}, undefined, false, undefined, this)
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
className: "mt-1 text-muted-foreground text-sm",
|
|
3162
|
-
children: t.description
|
|
3163
|
-
}, undefined, false, undefined, this)
|
|
3164
|
-
]
|
|
3165
|
-
}, undefined, true, undefined, this),
|
|
3166
|
-
/* @__PURE__ */ jsxDEV12("div", {
|
|
3167
|
-
className: "flex-1 space-y-2",
|
|
3168
|
-
children: /* @__PURE__ */ jsxDEV12("div", {
|
|
3169
|
-
className: "flex flex-wrap gap-1",
|
|
3170
|
-
children: t.tags.map((tag) => /* @__PURE__ */ jsxDEV12("span", {
|
|
3171
|
-
className: "rounded-full border border-border bg-muted px-3 py-1 text-[11px] text-muted-foreground",
|
|
3172
|
-
children: tag
|
|
3173
|
-
}, tag, false, undefined, this))
|
|
3174
|
-
}, undefined, false, undefined, this)
|
|
3175
|
-
}, undefined, false, undefined, this),
|
|
3176
|
-
/* @__PURE__ */ jsxDEV12("div", {
|
|
3177
|
-
className: "flex gap-2 pt-4",
|
|
3178
|
-
children: [
|
|
3179
|
-
/* @__PURE__ */ jsxDEV12(Tooltip, {
|
|
3180
|
-
children: [
|
|
3181
|
-
/* @__PURE__ */ jsxDEV12(TooltipTrigger, {
|
|
3182
|
-
asChild: true,
|
|
3183
|
-
children: /* @__PURE__ */ jsxDEV12("button", {
|
|
3184
|
-
className: "btn-ghost flex-1 text-center text-xs",
|
|
3185
|
-
onClick: () => {
|
|
3186
|
-
const local = getTemplate(t.id);
|
|
3187
|
-
if (!local) {
|
|
3188
|
-
setSelectedTemplateForCommand(t);
|
|
3189
|
-
return;
|
|
3190
|
-
}
|
|
3191
|
-
setPreview(t.id);
|
|
3192
|
-
},
|
|
3193
|
-
children: "Preview"
|
|
3194
|
-
}, undefined, false, undefined, this)
|
|
3195
|
-
}, undefined, false, undefined, this),
|
|
3196
|
-
/* @__PURE__ */ jsxDEV12(TooltipContent, {
|
|
3197
|
-
children: /* @__PURE__ */ jsxDEV12("p", {
|
|
3198
|
-
children: "Preview this template (if available locally)"
|
|
3199
|
-
}, undefined, false, undefined, this)
|
|
3200
|
-
}, undefined, false, undefined, this)
|
|
3201
|
-
]
|
|
3202
|
-
}, undefined, true, undefined, this),
|
|
3203
|
-
/* @__PURE__ */ jsxDEV12(Tooltip, {
|
|
3204
|
-
children: [
|
|
3205
|
-
/* @__PURE__ */ jsxDEV12(TooltipTrigger, {
|
|
3206
|
-
asChild: true,
|
|
3207
|
-
children: /* @__PURE__ */ jsxDEV12("button", {
|
|
3208
|
-
className: "btn-primary flex-1 text-center text-xs",
|
|
3209
|
-
onClick: () => {
|
|
3210
|
-
captureAnalyticsEvent2(analyticsEventNames2.EXAMPLE_REPO_OPEN, {
|
|
3211
|
-
surface: "templates",
|
|
3212
|
-
templateId: t.id,
|
|
3213
|
-
source: "registry"
|
|
3214
|
-
});
|
|
3215
|
-
setSelectedTemplateForCommand(t);
|
|
3216
|
-
},
|
|
3217
|
-
children: "Use Template"
|
|
3218
|
-
}, undefined, false, undefined, this)
|
|
3219
|
-
}, undefined, false, undefined, this),
|
|
3220
|
-
/* @__PURE__ */ jsxDEV12(TooltipContent, {
|
|
3221
|
-
children: /* @__PURE__ */ jsxDEV12("p", {
|
|
3222
|
-
children: "Get CLI command"
|
|
3223
|
-
}, undefined, false, undefined, this)
|
|
3224
|
-
}, undefined, false, undefined, this)
|
|
3225
|
-
]
|
|
3226
|
-
}, undefined, true, undefined, this)
|
|
3227
|
-
]
|
|
3228
|
-
}, undefined, true, undefined, this)
|
|
3229
|
-
]
|
|
3230
|
-
}, t.id, true, undefined, this))
|
|
3231
|
-
}, undefined, false, undefined, this) : filtered.length === 0 ? /* @__PURE__ */ jsxDEV12("div", {
|
|
3232
|
-
className: "py-12 text-center",
|
|
3233
|
-
children: /* @__PURE__ */ jsxDEV12("p", {
|
|
3234
|
-
className: "text-muted-foreground",
|
|
3235
|
-
children: "No templates match your filters. Try a different search."
|
|
3184
|
+
]
|
|
3185
|
+
}, undefined, true, undefined, this),
|
|
3186
|
+
/* @__PURE__ */ jsxDEV16("div", {
|
|
3187
|
+
className: "editorial-stat",
|
|
3188
|
+
children: [
|
|
3189
|
+
/* @__PURE__ */ jsxDEV16("span", {
|
|
3190
|
+
className: "editorial-stat-value",
|
|
3191
|
+
children: "OSS"
|
|
3192
|
+
}, undefined, false, undefined, this),
|
|
3193
|
+
/* @__PURE__ */ jsxDEV16("span", {
|
|
3194
|
+
className: "editorial-label",
|
|
3195
|
+
children: "first, Studio second"
|
|
3236
3196
|
}, undefined, false, undefined, this)
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
template.capabilities
|
|
3270
|
-
]
|
|
3271
|
-
}, undefined, true, undefined, this),
|
|
3272
|
-
/* @__PURE__ */ jsxDEV12("div", {
|
|
3273
|
-
className: "flex flex-wrap gap-1",
|
|
3274
|
-
children: template.tags.map((tag) => /* @__PURE__ */ jsxDEV12("span", {
|
|
3275
|
-
className: "rounded-full border border-border bg-muted px-3 py-1 text-[11px] text-muted-foreground",
|
|
3276
|
-
children: tag
|
|
3277
|
-
}, tag, false, undefined, this))
|
|
3278
|
-
}, undefined, false, undefined, this)
|
|
3279
|
-
]
|
|
3280
|
-
}, undefined, true, undefined, this),
|
|
3281
|
-
/* @__PURE__ */ jsxDEV12("div", {
|
|
3282
|
-
className: "flex gap-2 pt-4",
|
|
3283
|
-
children: [
|
|
3284
|
-
/* @__PURE__ */ jsxDEV12(Tooltip, {
|
|
3285
|
-
children: [
|
|
3286
|
-
/* @__PURE__ */ jsxDEV12(TooltipTrigger, {
|
|
3287
|
-
asChild: true,
|
|
3288
|
-
children: /* @__PURE__ */ jsxDEV12("button", {
|
|
3289
|
-
className: "btn-ghost flex-1 text-center text-xs",
|
|
3290
|
-
onClick: () => setPreview(template.templateId),
|
|
3291
|
-
children: "Preview"
|
|
3292
|
-
}, undefined, false, undefined, this)
|
|
3293
|
-
}, undefined, false, undefined, this),
|
|
3294
|
-
/* @__PURE__ */ jsxDEV12(TooltipContent, {
|
|
3295
|
-
children: /* @__PURE__ */ jsxDEV12("p", {
|
|
3296
|
-
children: "Preview this template in a modal"
|
|
3297
|
-
}, undefined, false, undefined, this)
|
|
3298
|
-
}, undefined, false, undefined, this)
|
|
3299
|
-
]
|
|
3300
|
-
}, undefined, true, undefined, this),
|
|
3301
|
-
/* @__PURE__ */ jsxDEV12(Tooltip, {
|
|
3302
|
-
children: [
|
|
3303
|
-
/* @__PURE__ */ jsxDEV12(TooltipTrigger, {
|
|
3304
|
-
asChild: true,
|
|
3305
|
-
children: /* @__PURE__ */ jsxDEV12("button", {
|
|
3306
|
-
className: "btn-primary flex-1 text-center text-xs",
|
|
3307
|
-
onClick: () => {
|
|
3308
|
-
captureAnalyticsEvent2(analyticsEventNames2.EXAMPLE_REPO_OPEN, {
|
|
3309
|
-
surface: "templates",
|
|
3310
|
-
templateId: template.templateId,
|
|
3311
|
-
source: "local"
|
|
3312
|
-
});
|
|
3313
|
-
setSelectedTemplateForCommand(template);
|
|
3314
|
-
},
|
|
3315
|
-
children: "Use Template"
|
|
3316
|
-
}, undefined, false, undefined, this)
|
|
3317
|
-
}, undefined, false, undefined, this),
|
|
3318
|
-
/* @__PURE__ */ jsxDEV12(TooltipContent, {
|
|
3319
|
-
children: /* @__PURE__ */ jsxDEV12("p", {
|
|
3320
|
-
children: "Get CLI command"
|
|
3321
|
-
}, undefined, false, undefined, this)
|
|
3322
|
-
}, undefined, false, undefined, this)
|
|
3323
|
-
]
|
|
3324
|
-
}, undefined, true, undefined, this)
|
|
3325
|
-
]
|
|
3326
|
-
}, undefined, true, undefined, this)
|
|
3327
|
-
]
|
|
3328
|
-
}, i, true, undefined, this))
|
|
3329
|
-
}, undefined, false, undefined, this)
|
|
3197
|
+
]
|
|
3198
|
+
}, undefined, true, undefined, this)
|
|
3199
|
+
]
|
|
3200
|
+
}, undefined, true, undefined, this)
|
|
3201
|
+
]
|
|
3202
|
+
}, undefined, true, undefined, this)
|
|
3203
|
+
}, undefined, false, undefined, this);
|
|
3204
|
+
}
|
|
3205
|
+
|
|
3206
|
+
// src/components/templates/TemplatesNextStepsSection.tsx
|
|
3207
|
+
import Link9 from "next/link";
|
|
3208
|
+
import { jsxDEV as jsxDEV17 } from "react/jsx-dev-runtime";
|
|
3209
|
+
function TemplatesNextStepsSection() {
|
|
3210
|
+
return /* @__PURE__ */ jsxDEV17("section", {
|
|
3211
|
+
className: "editorial-section bg-striped",
|
|
3212
|
+
children: /* @__PURE__ */ jsxDEV17("div", {
|
|
3213
|
+
className: "editorial-shell space-y-8",
|
|
3214
|
+
children: [
|
|
3215
|
+
/* @__PURE__ */ jsxDEV17("div", {
|
|
3216
|
+
className: "max-w-3xl space-y-4",
|
|
3217
|
+
children: [
|
|
3218
|
+
/* @__PURE__ */ jsxDEV17("p", {
|
|
3219
|
+
className: "editorial-kicker",
|
|
3220
|
+
children: "From template to real system"
|
|
3221
|
+
}, undefined, false, undefined, this),
|
|
3222
|
+
/* @__PURE__ */ jsxDEV17("h2", {
|
|
3223
|
+
className: "font-serif text-4xl tracking-[-0.04em] md:text-5xl",
|
|
3224
|
+
children: "Templates become useful when the system can absorb more context."
|
|
3225
|
+
}, undefined, false, undefined, this),
|
|
3226
|
+
/* @__PURE__ */ jsxDEV17("p", {
|
|
3227
|
+
className: "editorial-copy",
|
|
3228
|
+
children: "Use templates to prove the base flow, then layer integrations, knowledge, and runtime behavior on top without losing the same contract source."
|
|
3330
3229
|
}, undefined, false, undefined, this)
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3230
|
+
]
|
|
3231
|
+
}, undefined, true, undefined, this),
|
|
3232
|
+
/* @__PURE__ */ jsxDEV17("div", {
|
|
3233
|
+
className: "grid gap-6 md:grid-cols-3",
|
|
3234
|
+
children: [
|
|
3235
|
+
/* @__PURE__ */ jsxDEV17("div", {
|
|
3236
|
+
className: "editorial-panel space-y-4",
|
|
3336
3237
|
children: [
|
|
3337
|
-
/* @__PURE__ */
|
|
3338
|
-
className: "
|
|
3339
|
-
children:
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
}, undefined,
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
}, undefined, false, undefined, this)
|
|
3399
|
-
]
|
|
3400
|
-
}, undefined, true, undefined, this),
|
|
3401
|
-
/* @__PURE__ */ jsxDEV12("div", {
|
|
3402
|
-
className: "editorial-panel space-y-4",
|
|
3403
|
-
children: [
|
|
3404
|
-
/* @__PURE__ */ jsxDEV12("div", {
|
|
3405
|
-
className: "text-3xl",
|
|
3406
|
-
children: "\uD83E\uDDE0"
|
|
3407
|
-
}, undefined, false, undefined, this),
|
|
3408
|
-
/* @__PURE__ */ jsxDEV12("h3", {
|
|
3409
|
-
className: "font-serif text-2xl tracking-[-0.03em]",
|
|
3410
|
-
children: "Add AI and knowledge"
|
|
3411
|
-
}, undefined, false, undefined, this),
|
|
3412
|
-
/* @__PURE__ */ jsxDEV12("p", {
|
|
3413
|
-
className: "text-muted-foreground text-sm",
|
|
3414
|
-
children: "Power templates with OpenAI, vector search via Qdrant, and structured knowledge spaces for context-aware workflows."
|
|
3415
|
-
}, undefined, false, undefined, this),
|
|
3416
|
-
/* @__PURE__ */ jsxDEV12(Link8, {
|
|
3417
|
-
href: "/docs/knowledge",
|
|
3418
|
-
className: "font-medium text-[color:var(--blue)] text-sm hover:opacity-80",
|
|
3419
|
-
children: "Learn about knowledge \u2192"
|
|
3420
|
-
}, undefined, false, undefined, this)
|
|
3421
|
-
]
|
|
3422
|
-
}, undefined, true, undefined, this)
|
|
3423
|
-
]
|
|
3424
|
-
}, undefined, true, undefined, this),
|
|
3425
|
-
/* @__PURE__ */ jsxDEV12("div", {
|
|
3426
|
-
className: "pt-4 text-center",
|
|
3427
|
-
children: [
|
|
3428
|
-
/* @__PURE__ */ jsxDEV12("p", {
|
|
3429
|
-
className: "mb-4 text-muted-foreground text-sm",
|
|
3430
|
-
children: "All integrations are configured per-tenant with automatic health checks and credential rotation."
|
|
3431
|
-
}, undefined, false, undefined, this),
|
|
3432
|
-
/* @__PURE__ */ jsxDEV12(Link8, {
|
|
3433
|
-
href: "/docs/architecture",
|
|
3434
|
-
className: "btn-primary",
|
|
3435
|
-
children: "View Architecture"
|
|
3436
|
-
}, undefined, false, undefined, this)
|
|
3437
|
-
]
|
|
3438
|
-
}, undefined, true, undefined, this)
|
|
3238
|
+
/* @__PURE__ */ jsxDEV17("div", {
|
|
3239
|
+
className: "text-3xl",
|
|
3240
|
+
children: "\uD83D\uDCB3"
|
|
3241
|
+
}, undefined, false, undefined, this),
|
|
3242
|
+
/* @__PURE__ */ jsxDEV17("h3", {
|
|
3243
|
+
className: "font-serif text-2xl tracking-[-0.03em]",
|
|
3244
|
+
children: "Add payments"
|
|
3245
|
+
}, undefined, false, undefined, this),
|
|
3246
|
+
/* @__PURE__ */ jsxDEV17("p", {
|
|
3247
|
+
className: "text-muted-foreground text-sm",
|
|
3248
|
+
children: "Connect Stripe to any template for payment processing, subscriptions, and invoicing. Type-safe and policy-enforced."
|
|
3249
|
+
}, undefined, false, undefined, this),
|
|
3250
|
+
/* @__PURE__ */ jsxDEV17(Link9, {
|
|
3251
|
+
href: "/docs/integrations/stripe",
|
|
3252
|
+
className: "font-medium text-[color:var(--blue)] text-sm hover:opacity-80",
|
|
3253
|
+
children: "Learn more \u2192"
|
|
3254
|
+
}, undefined, false, undefined, this)
|
|
3255
|
+
]
|
|
3256
|
+
}, undefined, true, undefined, this),
|
|
3257
|
+
/* @__PURE__ */ jsxDEV17("div", {
|
|
3258
|
+
className: "editorial-panel space-y-4",
|
|
3259
|
+
children: [
|
|
3260
|
+
/* @__PURE__ */ jsxDEV17("div", {
|
|
3261
|
+
className: "text-3xl",
|
|
3262
|
+
children: "\uD83D\uDCE7"
|
|
3263
|
+
}, undefined, false, undefined, this),
|
|
3264
|
+
/* @__PURE__ */ jsxDEV17("h3", {
|
|
3265
|
+
className: "font-serif text-2xl tracking-[-0.03em]",
|
|
3266
|
+
children: "Add notifications"
|
|
3267
|
+
}, undefined, false, undefined, this),
|
|
3268
|
+
/* @__PURE__ */ jsxDEV17("p", {
|
|
3269
|
+
className: "text-muted-foreground text-sm",
|
|
3270
|
+
children: "Send transactional emails via Postmark or Resend. Process inbound emails with Gmail API. SMS via Twilio."
|
|
3271
|
+
}, undefined, false, undefined, this),
|
|
3272
|
+
/* @__PURE__ */ jsxDEV17(Link9, {
|
|
3273
|
+
href: "/docs/integrations",
|
|
3274
|
+
className: "font-medium text-[color:var(--blue)] text-sm hover:opacity-80",
|
|
3275
|
+
children: "View integrations \u2192"
|
|
3276
|
+
}, undefined, false, undefined, this)
|
|
3277
|
+
]
|
|
3278
|
+
}, undefined, true, undefined, this),
|
|
3279
|
+
/* @__PURE__ */ jsxDEV17("div", {
|
|
3280
|
+
className: "editorial-panel space-y-4",
|
|
3281
|
+
children: [
|
|
3282
|
+
/* @__PURE__ */ jsxDEV17("div", {
|
|
3283
|
+
className: "text-3xl",
|
|
3284
|
+
children: "\uD83E\uDDE0"
|
|
3285
|
+
}, undefined, false, undefined, this),
|
|
3286
|
+
/* @__PURE__ */ jsxDEV17("h3", {
|
|
3287
|
+
className: "font-serif text-2xl tracking-[-0.03em]",
|
|
3288
|
+
children: "Add AI and knowledge"
|
|
3289
|
+
}, undefined, false, undefined, this),
|
|
3290
|
+
/* @__PURE__ */ jsxDEV17("p", {
|
|
3291
|
+
className: "text-muted-foreground text-sm",
|
|
3292
|
+
children: "Power templates with OpenAI, vector search via Qdrant, and structured knowledge spaces for context-aware workflows."
|
|
3293
|
+
}, undefined, false, undefined, this),
|
|
3294
|
+
/* @__PURE__ */ jsxDEV17(Link9, {
|
|
3295
|
+
href: "/docs/knowledge",
|
|
3296
|
+
className: "font-medium text-[color:var(--blue)] text-sm hover:opacity-80",
|
|
3297
|
+
children: "Learn about knowledge \u2192"
|
|
3298
|
+
}, undefined, false, undefined, this)
|
|
3439
3299
|
]
|
|
3440
3300
|
}, undefined, true, undefined, this)
|
|
3301
|
+
]
|
|
3302
|
+
}, undefined, true, undefined, this),
|
|
3303
|
+
/* @__PURE__ */ jsxDEV17("div", {
|
|
3304
|
+
className: "pt-4 text-center",
|
|
3305
|
+
children: [
|
|
3306
|
+
/* @__PURE__ */ jsxDEV17("p", {
|
|
3307
|
+
className: "mb-4 text-muted-foreground text-sm",
|
|
3308
|
+
children: "All integrations are configured per-tenant with automatic health checks and credential rotation."
|
|
3309
|
+
}, undefined, false, undefined, this),
|
|
3310
|
+
/* @__PURE__ */ jsxDEV17(Link9, {
|
|
3311
|
+
href: "/docs/architecture",
|
|
3312
|
+
className: "btn-primary",
|
|
3313
|
+
children: "View Architecture"
|
|
3314
|
+
}, undefined, false, undefined, this)
|
|
3315
|
+
]
|
|
3316
|
+
}, undefined, true, undefined, this)
|
|
3317
|
+
]
|
|
3318
|
+
}, undefined, true, undefined, this)
|
|
3319
|
+
}, undefined, false, undefined, this);
|
|
3320
|
+
}
|
|
3321
|
+
|
|
3322
|
+
// src/components/templates/TemplatesPreviewModal.tsx
|
|
3323
|
+
import { Dialog as Dialog3, DialogContent as DialogContent3 } from "@contractspec/lib.ui-kit-web/ui/dialog";
|
|
3324
|
+
import { ScrollArea } from "@contractspec/lib.ui-kit-web/ui/scroll-area";
|
|
3325
|
+
import { TemplateRuntimeProvider } from "@contractspec/module.examples";
|
|
3326
|
+
import { jsxDEV as jsxDEV18 } from "react/jsx-dev-runtime";
|
|
3327
|
+
"use client";
|
|
3328
|
+
function TemplatePreviewModal({
|
|
3329
|
+
templateId,
|
|
3330
|
+
onClose
|
|
3331
|
+
}) {
|
|
3332
|
+
if (!supportsInlineTemplatePreview(templateId)) {
|
|
3333
|
+
return null;
|
|
3334
|
+
}
|
|
3335
|
+
return /* @__PURE__ */ jsxDEV18(Dialog3, {
|
|
3336
|
+
open: true,
|
|
3337
|
+
onOpenChange: (open) => !open && onClose(),
|
|
3338
|
+
children: /* @__PURE__ */ jsxDEV18(DialogContent3, {
|
|
3339
|
+
className: "mb-8 flex h-[calc(100vh-2rem)] min-w-[calc(100vw-2rem)] flex-col justify-between gap-0 p-0",
|
|
3340
|
+
children: /* @__PURE__ */ jsxDEV18(ScrollArea, {
|
|
3341
|
+
className: "flex flex-col justify-between overflow-hidden",
|
|
3342
|
+
children: /* @__PURE__ */ jsxDEV18(TemplateRuntimeProvider, {
|
|
3343
|
+
templateId,
|
|
3344
|
+
projectId: `marketing-preview-${templateId}`,
|
|
3345
|
+
children: /* @__PURE__ */ jsxDEV18(TemplatePreviewContent, {
|
|
3346
|
+
templateId
|
|
3441
3347
|
}, undefined, false, undefined, this)
|
|
3348
|
+
}, templateId, false, undefined, this)
|
|
3349
|
+
}, undefined, false, undefined, this)
|
|
3350
|
+
}, undefined, false, undefined, this)
|
|
3351
|
+
}, undefined, false, undefined, this);
|
|
3352
|
+
}
|
|
3353
|
+
|
|
3354
|
+
// src/components/templates/template-source.ts
|
|
3355
|
+
function isRegistryConfigured(registryUrl) {
|
|
3356
|
+
return Boolean(registryUrl?.trim());
|
|
3357
|
+
}
|
|
3358
|
+
function getAvailableTemplateSources(registryUrl) {
|
|
3359
|
+
return isRegistryConfigured(registryUrl) ? ["local", "registry"] : ["local"];
|
|
3360
|
+
}
|
|
3361
|
+
|
|
3362
|
+
// src/components/templates/TemplatesClientPage.tsx
|
|
3363
|
+
import {
|
|
3364
|
+
analyticsEventNames as analyticsEventNames3,
|
|
3365
|
+
captureAnalyticsEvent as captureAnalyticsEvent3
|
|
3366
|
+
} from "@contractspec/bundle.library/libs/posthog/client";
|
|
3367
|
+
import { useRegistryTemplates } from "@contractspec/lib.example-shared-ui";
|
|
3368
|
+
import {
|
|
3369
|
+
Dialog as Dialog4,
|
|
3370
|
+
DialogContent as DialogContent4,
|
|
3371
|
+
DialogDescription as DialogDescription3,
|
|
3372
|
+
DialogHeader as DialogHeader3,
|
|
3373
|
+
DialogTitle as DialogTitle3
|
|
3374
|
+
} from "@contractspec/lib.ui-kit-web/ui/dialog";
|
|
3375
|
+
import { useMemo, useState as useState2 } from "react";
|
|
3376
|
+
import { jsxDEV as jsxDEV19, Fragment } from "react/jsx-dev-runtime";
|
|
3377
|
+
"use client";
|
|
3378
|
+
var REGISTRY_URL = process.env.NEXT_PUBLIC_CONTRACTSPEC_REGISTRY_URL;
|
|
3379
|
+
var TemplatesPage = () => {
|
|
3380
|
+
const [selectedTag, setSelectedTag] = useState2(null);
|
|
3381
|
+
const [search, setSearch] = useState2("");
|
|
3382
|
+
const [previewTemplateId, setPreviewTemplateId] = useState2(null);
|
|
3383
|
+
const [studioSignupModalOpen, setStudioSignupModalOpen] = useState2(false);
|
|
3384
|
+
const [selectedTemplateId, setSelectedTemplateId] = useState2(null);
|
|
3385
|
+
const [source, setSource] = useState2("local");
|
|
3386
|
+
const registryConfigured = isRegistryConfigured(REGISTRY_URL);
|
|
3387
|
+
const availableSources = getAvailableTemplateSources(REGISTRY_URL);
|
|
3388
|
+
const localTemplates = useMemo(() => buildLocalTemplateCatalog(), []);
|
|
3389
|
+
const localTemplateById = useMemo(() => new Map(localTemplates.map((template) => [template.id, template])), [localTemplates]);
|
|
3390
|
+
const availableTags = useMemo(() => Array.from(new Set(localTemplates.flatMap((template) => template.tags))).sort((left, right) => left.localeCompare(right)), [localTemplates]);
|
|
3391
|
+
const { data: registryTemplates = [], isLoading: registryLoading } = useRegistryTemplates();
|
|
3392
|
+
const filteredLocalTemplates = useMemo(() => localTemplates.filter((template) => matchesTemplateFilters(template, search, selectedTag)), [localTemplates, search, selectedTag]);
|
|
3393
|
+
const filteredRegistryTemplates = useMemo(() => registryTemplates.filter((template) => matchesTemplateFilters({
|
|
3394
|
+
title: template.name,
|
|
3395
|
+
description: template.description,
|
|
3396
|
+
tags: template.tags
|
|
3397
|
+
}, search, selectedTag)), [registryTemplates, search, selectedTag]);
|
|
3398
|
+
return /* @__PURE__ */ jsxDEV19(Fragment, {
|
|
3399
|
+
children: [
|
|
3400
|
+
/* @__PURE__ */ jsxDEV19("main", {
|
|
3401
|
+
children: [
|
|
3402
|
+
/* @__PURE__ */ jsxDEV19(TemplatesHeroSection, {
|
|
3403
|
+
localTemplateCount: localTemplates.length,
|
|
3404
|
+
sourceCount: availableSources.length
|
|
3405
|
+
}, undefined, false, undefined, this),
|
|
3406
|
+
/* @__PURE__ */ jsxDEV19(TemplatesBrowseControls, {
|
|
3407
|
+
registryConfigured,
|
|
3408
|
+
availableSources,
|
|
3409
|
+
source,
|
|
3410
|
+
onSourceChange: setSource,
|
|
3411
|
+
search,
|
|
3412
|
+
onSearchChange: setSearch,
|
|
3413
|
+
selectedTag,
|
|
3414
|
+
onTagChange: setSelectedTag,
|
|
3415
|
+
availableTags
|
|
3416
|
+
}, undefined, false, undefined, this),
|
|
3417
|
+
/* @__PURE__ */ jsxDEV19(TemplatesCatalogSection, {
|
|
3418
|
+
source,
|
|
3419
|
+
registryConfigured,
|
|
3420
|
+
registryLoading,
|
|
3421
|
+
localTemplates: filteredLocalTemplates,
|
|
3422
|
+
registryTemplates: filteredRegistryTemplates,
|
|
3423
|
+
localTemplateById,
|
|
3424
|
+
onPreview: setPreviewTemplateId,
|
|
3425
|
+
onUseTemplate: (templateId, templateSource) => {
|
|
3426
|
+
captureAnalyticsEvent3(analyticsEventNames3.EXAMPLE_REPO_OPEN, {
|
|
3427
|
+
surface: "templates",
|
|
3428
|
+
templateId,
|
|
3429
|
+
source: templateSource
|
|
3430
|
+
});
|
|
3431
|
+
setSelectedTemplateId(templateId);
|
|
3432
|
+
}
|
|
3433
|
+
}, undefined, false, undefined, this),
|
|
3434
|
+
/* @__PURE__ */ jsxDEV19(TemplatesNextStepsSection, {}, undefined, false, undefined, this)
|
|
3442
3435
|
]
|
|
3443
3436
|
}, undefined, true, undefined, this),
|
|
3444
|
-
/* @__PURE__ */
|
|
3445
|
-
templateId:
|
|
3446
|
-
onClose: () =>
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
}, undefined, false, undefined, this),
|
|
3450
|
-
/* @__PURE__ */ jsxDEV12(Dialog3, {
|
|
3437
|
+
previewTemplateId ? /* @__PURE__ */ jsxDEV19(TemplatePreviewModal, {
|
|
3438
|
+
templateId: previewTemplateId,
|
|
3439
|
+
onClose: () => setPreviewTemplateId(null)
|
|
3440
|
+
}, undefined, false, undefined, this) : null,
|
|
3441
|
+
/* @__PURE__ */ jsxDEV19(Dialog4, {
|
|
3451
3442
|
open: studioSignupModalOpen,
|
|
3452
3443
|
onOpenChange: setStudioSignupModalOpen,
|
|
3453
|
-
children: /* @__PURE__ */
|
|
3444
|
+
children: /* @__PURE__ */ jsxDEV19(DialogContent4, {
|
|
3454
3445
|
className: "max-h-[90vh] max-w-2xl overflow-y-auto",
|
|
3455
3446
|
children: [
|
|
3456
|
-
/* @__PURE__ */
|
|
3447
|
+
/* @__PURE__ */ jsxDEV19(DialogHeader3, {
|
|
3457
3448
|
children: [
|
|
3458
|
-
/* @__PURE__ */
|
|
3449
|
+
/* @__PURE__ */ jsxDEV19(DialogTitle3, {
|
|
3459
3450
|
children: "Deploy in Studio"
|
|
3460
3451
|
}, undefined, false, undefined, this),
|
|
3461
|
-
/* @__PURE__ */
|
|
3452
|
+
/* @__PURE__ */ jsxDEV19(DialogDescription3, {
|
|
3462
3453
|
children: "Deploy templates in ContractSpec Studio and run the full evidence-to-spec loop with your team."
|
|
3463
3454
|
}, undefined, false, undefined, this)
|
|
3464
3455
|
]
|
|
3465
3456
|
}, undefined, true, undefined, this),
|
|
3466
|
-
/* @__PURE__ */
|
|
3457
|
+
/* @__PURE__ */ jsxDEV19(StudioSignupSection, {
|
|
3467
3458
|
variant: "compact"
|
|
3468
3459
|
}, undefined, false, undefined, this)
|
|
3469
3460
|
]
|
|
3470
3461
|
}, undefined, true, undefined, this)
|
|
3471
3462
|
}, undefined, false, undefined, this),
|
|
3472
|
-
/* @__PURE__ */
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
children: [
|
|
3480
|
-
/* @__PURE__ */ jsxDEV12(DialogTitle2, {
|
|
3481
|
-
children: "Use this template"
|
|
3482
|
-
}, undefined, false, undefined, this),
|
|
3483
|
-
/* @__PURE__ */ jsxDEV12(DialogDescription2, {
|
|
3484
|
-
children: "Initialize a new project with this template using the CLI."
|
|
3485
|
-
}, undefined, false, undefined, this)
|
|
3486
|
-
]
|
|
3487
|
-
}, undefined, true, undefined, this),
|
|
3488
|
-
/* @__PURE__ */ jsxDEV12("div", {
|
|
3489
|
-
className: "space-y-4 pt-4",
|
|
3490
|
-
children: [
|
|
3491
|
-
/* @__PURE__ */ jsxDEV12("div", {
|
|
3492
|
-
className: "rounded-md border border-zinc-800 bg-zinc-950 p-4 font-mono text-sm text-zinc-50",
|
|
3493
|
-
children: [
|
|
3494
|
-
"npx contractspec init --template ",
|
|
3495
|
-
commandId
|
|
3496
|
-
]
|
|
3497
|
-
}, undefined, true, undefined, this),
|
|
3498
|
-
/* @__PURE__ */ jsxDEV12("div", {
|
|
3499
|
-
className: "flex gap-2",
|
|
3500
|
-
children: /* @__PURE__ */ jsxDEV12("button", {
|
|
3501
|
-
className: "btn-secondary w-full",
|
|
3502
|
-
onClick: () => {
|
|
3503
|
-
navigator.clipboard.writeText(`npx contractspec init --template ${commandId}`);
|
|
3504
|
-
captureAnalyticsEvent2(analyticsEventNames2.COPY_COMMAND_CLICK, {
|
|
3505
|
-
surface: "templates",
|
|
3506
|
-
templateId: commandId,
|
|
3507
|
-
filename: "templates-cli"
|
|
3508
|
-
});
|
|
3509
|
-
},
|
|
3510
|
-
children: "Copy Command"
|
|
3511
|
-
}, undefined, false, undefined, this)
|
|
3512
|
-
}, undefined, false, undefined, this),
|
|
3513
|
-
/* @__PURE__ */ jsxDEV12("div", {
|
|
3514
|
-
className: "relative",
|
|
3515
|
-
children: [
|
|
3516
|
-
/* @__PURE__ */ jsxDEV12("div", {
|
|
3517
|
-
className: "absolute inset-0 flex items-center",
|
|
3518
|
-
children: /* @__PURE__ */ jsxDEV12("span", {
|
|
3519
|
-
className: "w-full border-border border-t"
|
|
3520
|
-
}, undefined, false, undefined, this)
|
|
3521
|
-
}, undefined, false, undefined, this),
|
|
3522
|
-
/* @__PURE__ */ jsxDEV12("div", {
|
|
3523
|
-
className: "relative flex justify-center text-xs uppercase",
|
|
3524
|
-
children: /* @__PURE__ */ jsxDEV12("span", {
|
|
3525
|
-
className: "bg-background px-2 text-muted-foreground",
|
|
3526
|
-
children: "Or"
|
|
3527
|
-
}, undefined, false, undefined, this)
|
|
3528
|
-
}, undefined, false, undefined, this)
|
|
3529
|
-
]
|
|
3530
|
-
}, undefined, true, undefined, this),
|
|
3531
|
-
/* @__PURE__ */ jsxDEV12("button", {
|
|
3532
|
-
className: "btn-ghost w-full text-sm",
|
|
3533
|
-
onClick: () => {
|
|
3534
|
-
captureAnalyticsEvent2(analyticsEventNames2.CTA_STUDIO_CLICK, {
|
|
3535
|
-
surface: "templates",
|
|
3536
|
-
templateId: commandId
|
|
3537
|
-
});
|
|
3538
|
-
setSelectedTemplateForCommand(null);
|
|
3539
|
-
setStudioSignupModalOpen(true);
|
|
3540
|
-
},
|
|
3541
|
-
children: "Deploy to Studio"
|
|
3542
|
-
}, undefined, false, undefined, this)
|
|
3543
|
-
]
|
|
3544
|
-
}, undefined, true, undefined, this)
|
|
3545
|
-
]
|
|
3546
|
-
}, undefined, true, undefined, this)
|
|
3463
|
+
/* @__PURE__ */ jsxDEV19(TemplateCommandDialog, {
|
|
3464
|
+
templateId: selectedTemplateId,
|
|
3465
|
+
onClose: () => setSelectedTemplateId(null),
|
|
3466
|
+
onDeployStudio: () => {
|
|
3467
|
+
setSelectedTemplateId(null);
|
|
3468
|
+
setStudioSignupModalOpen(true);
|
|
3469
|
+
}
|
|
3547
3470
|
}, undefined, false, undefined, this)
|
|
3548
3471
|
]
|
|
3549
3472
|
}, undefined, true, undefined, this);
|
|
@@ -3562,9 +3485,9 @@ import {
|
|
|
3562
3485
|
MarketingSection
|
|
3563
3486
|
} from "@contractspec/lib.design-system";
|
|
3564
3487
|
import { HStack, VStack } from "@contractspec/lib.ui-kit-web/ui/stack";
|
|
3565
|
-
import { listTemplates } from "@contractspec/module.examples";
|
|
3488
|
+
import { listTemplates as listTemplates2 } from "@contractspec/module.examples";
|
|
3566
3489
|
import { useMemo as useMemo2, useState as useState3 } from "react";
|
|
3567
|
-
import { jsxDEV as
|
|
3490
|
+
import { jsxDEV as jsxDEV20, Fragment as Fragment2 } from "react/jsx-dev-runtime";
|
|
3568
3491
|
"use client";
|
|
3569
3492
|
function matchesQuery(t, query) {
|
|
3570
3493
|
const q = query.trim().toLowerCase();
|
|
@@ -3575,37 +3498,37 @@ function matchesQuery(t, query) {
|
|
|
3575
3498
|
}
|
|
3576
3499
|
function TemplatesMarketingPage() {
|
|
3577
3500
|
const [query, setQuery] = useState3("");
|
|
3578
|
-
const
|
|
3579
|
-
const filtered = useMemo2(() =>
|
|
3580
|
-
return /* @__PURE__ */
|
|
3501
|
+
const templates = useMemo2(() => listTemplates2(), []);
|
|
3502
|
+
const filtered = useMemo2(() => templates.filter((t) => matchesQuery(t, query)), [templates, query]);
|
|
3503
|
+
return /* @__PURE__ */ jsxDEV20(Fragment2, {
|
|
3581
3504
|
children: [
|
|
3582
|
-
/* @__PURE__ */
|
|
3505
|
+
/* @__PURE__ */ jsxDEV20(MarketingSection, {
|
|
3583
3506
|
tone: "default",
|
|
3584
|
-
children: /* @__PURE__ */
|
|
3507
|
+
children: /* @__PURE__ */ jsxDEV20(VStack, {
|
|
3585
3508
|
as: "header",
|
|
3586
3509
|
gap: "lg",
|
|
3587
3510
|
align: "center",
|
|
3588
3511
|
children: [
|
|
3589
|
-
/* @__PURE__ */
|
|
3512
|
+
/* @__PURE__ */ jsxDEV20(VStack, {
|
|
3590
3513
|
gap: "sm",
|
|
3591
3514
|
align: "center",
|
|
3592
3515
|
children: [
|
|
3593
|
-
/* @__PURE__ */
|
|
3516
|
+
/* @__PURE__ */ jsxDEV20(ButtonLink, {
|
|
3594
3517
|
href: "/docs",
|
|
3595
3518
|
variant: "ghost",
|
|
3596
3519
|
children: "Docs"
|
|
3597
3520
|
}, undefined, false, undefined, this),
|
|
3598
|
-
/* @__PURE__ */
|
|
3521
|
+
/* @__PURE__ */ jsxDEV20(ButtonLink, {
|
|
3599
3522
|
href: "/sandbox",
|
|
3600
3523
|
variant: "ghost",
|
|
3601
3524
|
children: "Open Sandbox"
|
|
3602
3525
|
}, undefined, false, undefined, this)
|
|
3603
3526
|
]
|
|
3604
3527
|
}, undefined, true, undefined, this),
|
|
3605
|
-
/* @__PURE__ */
|
|
3528
|
+
/* @__PURE__ */ jsxDEV20(VStack, {
|
|
3606
3529
|
gap: "sm",
|
|
3607
3530
|
align: "center",
|
|
3608
|
-
children: /* @__PURE__ */
|
|
3531
|
+
children: /* @__PURE__ */ jsxDEV20(ButtonLink, {
|
|
3609
3532
|
href: "/templates",
|
|
3610
3533
|
variant: "default",
|
|
3611
3534
|
children: "Templates"
|
|
@@ -3614,25 +3537,25 @@ function TemplatesMarketingPage() {
|
|
|
3614
3537
|
]
|
|
3615
3538
|
}, undefined, true, undefined, this)
|
|
3616
3539
|
}, undefined, false, undefined, this),
|
|
3617
|
-
/* @__PURE__ */
|
|
3540
|
+
/* @__PURE__ */ jsxDEV20(MarketingSection, {
|
|
3618
3541
|
tone: "muted",
|
|
3619
|
-
children: /* @__PURE__ */
|
|
3542
|
+
children: /* @__PURE__ */ jsxDEV20(VStack, {
|
|
3620
3543
|
gap: "lg",
|
|
3621
3544
|
children: [
|
|
3622
|
-
/* @__PURE__ */
|
|
3545
|
+
/* @__PURE__ */ jsxDEV20(VStack, {
|
|
3623
3546
|
gap: "sm",
|
|
3624
|
-
children: /* @__PURE__ */
|
|
3547
|
+
children: /* @__PURE__ */ jsxDEV20(ButtonLink, {
|
|
3625
3548
|
href: "/templates",
|
|
3626
3549
|
variant: "ghost",
|
|
3627
3550
|
children: "Browse all examples"
|
|
3628
3551
|
}, undefined, false, undefined, this)
|
|
3629
3552
|
}, undefined, false, undefined, this),
|
|
3630
|
-
/* @__PURE__ */
|
|
3553
|
+
/* @__PURE__ */ jsxDEV20(HStack, {
|
|
3631
3554
|
gap: "md",
|
|
3632
3555
|
align: "center",
|
|
3633
3556
|
justify: "between",
|
|
3634
3557
|
wrap: "wrap",
|
|
3635
|
-
children: /* @__PURE__ */
|
|
3558
|
+
children: /* @__PURE__ */ jsxDEV20(Input2, {
|
|
3636
3559
|
"aria-label": "Search templates and examples",
|
|
3637
3560
|
placeholder: "Search templates and examples\u2026",
|
|
3638
3561
|
value: query,
|
|
@@ -3642,52 +3565,52 @@ function TemplatesMarketingPage() {
|
|
|
3642
3565
|
]
|
|
3643
3566
|
}, undefined, true, undefined, this)
|
|
3644
3567
|
}, undefined, false, undefined, this),
|
|
3645
|
-
/* @__PURE__ */
|
|
3568
|
+
/* @__PURE__ */ jsxDEV20(MarketingSection, {
|
|
3646
3569
|
tone: "default",
|
|
3647
|
-
children: /* @__PURE__ */
|
|
3570
|
+
children: /* @__PURE__ */ jsxDEV20(VStack, {
|
|
3648
3571
|
gap: "lg",
|
|
3649
|
-
children: /* @__PURE__ */
|
|
3572
|
+
children: /* @__PURE__ */ jsxDEV20(HStack, {
|
|
3650
3573
|
gap: "md",
|
|
3651
3574
|
wrap: "wrap",
|
|
3652
|
-
children: filtered.map((t) => /* @__PURE__ */
|
|
3575
|
+
children: filtered.map((t) => /* @__PURE__ */ jsxDEV20(MarketingCard, {
|
|
3653
3576
|
className: "w-full md:w-[calc(50%-0.75rem)] lg:w-[calc(33.333%-1rem)]",
|
|
3654
3577
|
children: [
|
|
3655
|
-
/* @__PURE__ */
|
|
3578
|
+
/* @__PURE__ */ jsxDEV20(MarketingCardHeader, {
|
|
3656
3579
|
children: [
|
|
3657
|
-
/* @__PURE__ */
|
|
3580
|
+
/* @__PURE__ */ jsxDEV20(MarketingCardTitle, {
|
|
3658
3581
|
children: [
|
|
3659
3582
|
t.icon,
|
|
3660
3583
|
" ",
|
|
3661
3584
|
t.name
|
|
3662
3585
|
]
|
|
3663
3586
|
}, undefined, true, undefined, this),
|
|
3664
|
-
/* @__PURE__ */
|
|
3587
|
+
/* @__PURE__ */ jsxDEV20(MarketingCardDescription, {
|
|
3665
3588
|
children: t.description
|
|
3666
3589
|
}, undefined, false, undefined, this)
|
|
3667
3590
|
]
|
|
3668
3591
|
}, undefined, true, undefined, this),
|
|
3669
|
-
/* @__PURE__ */
|
|
3670
|
-
children: /* @__PURE__ */
|
|
3592
|
+
/* @__PURE__ */ jsxDEV20(MarketingCardContent, {
|
|
3593
|
+
children: /* @__PURE__ */ jsxDEV20(VStack, {
|
|
3671
3594
|
gap: "md",
|
|
3672
3595
|
children: [
|
|
3673
|
-
/* @__PURE__ */
|
|
3596
|
+
/* @__PURE__ */ jsxDEV20(HStack, {
|
|
3674
3597
|
gap: "sm",
|
|
3675
3598
|
wrap: "wrap",
|
|
3676
|
-
children: t.tags.slice(0, 6).map((tag) => /* @__PURE__ */
|
|
3599
|
+
children: t.tags.slice(0, 6).map((tag) => /* @__PURE__ */ jsxDEV20(ButtonLink, {
|
|
3677
3600
|
href: `/templates?tag=${encodeURIComponent(tag)}`,
|
|
3678
3601
|
variant: "ghost",
|
|
3679
3602
|
children: tag
|
|
3680
3603
|
}, `${t.id}-${tag}`, false, undefined, this))
|
|
3681
3604
|
}, undefined, false, undefined, this),
|
|
3682
|
-
/* @__PURE__ */
|
|
3605
|
+
/* @__PURE__ */ jsxDEV20(HStack, {
|
|
3683
3606
|
gap: "sm",
|
|
3684
3607
|
justify: "between",
|
|
3685
3608
|
wrap: "wrap",
|
|
3686
3609
|
children: [
|
|
3687
|
-
/* @__PURE__ */
|
|
3610
|
+
/* @__PURE__ */ jsxDEV20(ButtonLinkToSandbox, {
|
|
3688
3611
|
templateId: t.id
|
|
3689
3612
|
}, undefined, false, undefined, this),
|
|
3690
|
-
/* @__PURE__ */
|
|
3613
|
+
/* @__PURE__ */ jsxDEV20(Button3, {
|
|
3691
3614
|
variant: "outline",
|
|
3692
3615
|
onClick: () => {
|
|
3693
3616
|
return;
|
|
@@ -3709,7 +3632,7 @@ function TemplatesMarketingPage() {
|
|
|
3709
3632
|
}, undefined, true, undefined, this);
|
|
3710
3633
|
}
|
|
3711
3634
|
function ButtonLinkToSandbox({ templateId }) {
|
|
3712
|
-
return /* @__PURE__ */
|
|
3635
|
+
return /* @__PURE__ */ jsxDEV20(ButtonLink, {
|
|
3713
3636
|
href: `/sandbox?template=${encodeURIComponent(templateId)}`,
|
|
3714
3637
|
variant: "default",
|
|
3715
3638
|
children: "Preview"
|