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