@contractspec/bundle.marketing 3.8.8 → 3.8.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/.turbo/turbo-build.log +64 -32
  2. package/CHANGELOG.md +30 -0
  3. package/dist/browser/components/templates/TemplateCard.js +83 -0
  4. package/dist/browser/components/templates/TemplateCommandDialog.js +110 -0
  5. package/dist/browser/components/templates/TemplatePreviewContent.js +96 -0
  6. package/dist/browser/components/templates/TemplatesBrowseControls.js +115 -0
  7. package/dist/browser/components/templates/TemplatesCatalogSection.js +284 -0
  8. package/dist/browser/components/templates/TemplatesClientPage.js +840 -917
  9. package/dist/browser/components/templates/TemplatesHeroSection.js +87 -0
  10. package/dist/browser/components/templates/TemplatesNextStepsSection.js +126 -0
  11. package/dist/browser/components/templates/TemplatesPreviewModal.js +136 -126
  12. package/dist/browser/components/templates/index.js +873 -950
  13. package/dist/browser/components/templates/template-catalog.js +81 -0
  14. package/dist/browser/components/templates/template-new.js +23 -0
  15. package/dist/browser/components/templates/template-preview.js +43 -0
  16. package/dist/browser/components/templates/template-source.js +19 -0
  17. package/dist/browser/index.js +873 -950
  18. package/dist/components/templates/TemplateCard.d.ts +12 -0
  19. package/dist/components/templates/TemplateCard.js +78 -0
  20. package/dist/components/templates/TemplateCommandDialog.d.ts +6 -0
  21. package/dist/components/templates/TemplateCommandDialog.js +105 -0
  22. package/dist/components/templates/TemplatePreviewContent.d.ts +5 -0
  23. package/dist/components/templates/TemplatePreviewContent.js +91 -0
  24. package/dist/components/templates/TemplatesBrowseControls.d.ts +13 -0
  25. package/dist/components/templates/TemplatesBrowseControls.js +110 -0
  26. package/dist/components/templates/TemplatesCatalogSection.d.ts +14 -0
  27. package/dist/components/templates/TemplatesCatalogSection.js +279 -0
  28. package/dist/components/templates/TemplatesClientPage.js +840 -917
  29. package/dist/components/templates/TemplatesHeroSection.d.ts +5 -0
  30. package/dist/components/templates/TemplatesHeroSection.js +82 -0
  31. package/dist/components/templates/TemplatesNextStepsSection.d.ts +1 -0
  32. package/dist/components/templates/TemplatesNextStepsSection.js +121 -0
  33. package/dist/components/templates/TemplatesPreviewModal.d.ts +3 -4
  34. package/dist/components/templates/TemplatesPreviewModal.js +136 -126
  35. package/dist/components/templates/index.js +873 -950
  36. package/dist/components/templates/template-catalog.d.ts +27 -0
  37. package/dist/components/templates/template-catalog.js +76 -0
  38. package/dist/components/templates/template-catalog.test.d.ts +1 -0
  39. package/dist/components/templates/template-new.d.ts +2 -0
  40. package/dist/components/templates/template-new.js +18 -0
  41. package/dist/components/templates/template-preview.d.ts +18 -0
  42. package/dist/components/templates/template-preview.js +38 -0
  43. package/dist/components/templates/template-source.d.ts +3 -0
  44. package/dist/components/templates/template-source.js +14 -0
  45. package/dist/index.js +873 -950
  46. package/dist/node/components/templates/TemplateCard.js +78 -0
  47. package/dist/node/components/templates/TemplateCommandDialog.js +105 -0
  48. package/dist/node/components/templates/TemplatePreviewContent.js +91 -0
  49. package/dist/node/components/templates/TemplatesBrowseControls.js +110 -0
  50. package/dist/node/components/templates/TemplatesCatalogSection.js +279 -0
  51. package/dist/node/components/templates/TemplatesClientPage.js +840 -917
  52. package/dist/node/components/templates/TemplatesHeroSection.js +82 -0
  53. package/dist/node/components/templates/TemplatesNextStepsSection.js +121 -0
  54. package/dist/node/components/templates/TemplatesPreviewModal.js +136 -126
  55. package/dist/node/components/templates/index.js +873 -950
  56. package/dist/node/components/templates/template-catalog.js +76 -0
  57. package/dist/node/components/templates/template-new.js +18 -0
  58. package/dist/node/components/templates/template-preview.js +38 -0
  59. package/dist/node/components/templates/template-source.js +14 -0
  60. package/dist/node/index.js +873 -950
  61. package/package.json +181 -26
  62. package/src/components/templates/TemplateCard.tsx +74 -0
  63. package/src/components/templates/TemplateCommandDialog.tsx +92 -0
  64. package/src/components/templates/TemplatePreviewContent.tsx +182 -0
  65. package/src/components/templates/TemplatesBrowseControls.tsx +120 -0
  66. package/src/components/templates/TemplatesCatalogSection.tsx +166 -0
  67. package/src/components/templates/TemplatesClientPage.tsx +109 -741
  68. package/src/components/templates/TemplatesHeroSection.tsx +41 -0
  69. package/src/components/templates/TemplatesNextStepsSection.tsx +80 -0
  70. package/src/components/templates/TemplatesPreviewModal.tsx +19 -294
  71. package/src/components/templates/template-catalog.test.ts +66 -0
  72. package/src/components/templates/template-catalog.ts +132 -0
  73. package/src/components/templates/template-new.ts +12 -0
  74. package/src/components/templates/template-preview.ts +57 -0
  75. package/src/components/templates/template-source.ts +13 -0
  76. package/.turbo/turbo-prebuild.log +0 -1
@@ -0,0 +1,12 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface TemplateCardProps {
3
+ title: string;
4
+ description: string;
5
+ metaBadges: readonly string[];
6
+ tags: readonly string[];
7
+ featureList?: readonly string[];
8
+ isNew?: boolean;
9
+ previewAction: ReactNode;
10
+ useAction: ReactNode;
11
+ }
12
+ export declare function TemplateCard({ title, description, metaBadges, tags, featureList, isNew, previewAction, useAction, }: TemplateCardProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,78 @@
1
+ // @bun
2
+ var __require = import.meta.require;
3
+
4
+ // src/components/templates/TemplateCard.tsx
5
+ import { jsxDEV } from "react/jsx-dev-runtime";
6
+ "use client";
7
+ function TemplateCard({
8
+ title,
9
+ description,
10
+ metaBadges,
11
+ tags,
12
+ featureList = [],
13
+ isNew = false,
14
+ previewAction,
15
+ useAction
16
+ }) {
17
+ return /* @__PURE__ */ jsxDEV("div", {
18
+ className: "editorial-panel relative flex flex-col space-y-4 transition-colors hover:border-[color:rgb(162_79_42_/_0.55)]",
19
+ children: [
20
+ isNew ? /* @__PURE__ */ jsxDEV("span", {
21
+ className: "absolute top-4 right-4 rounded-full bg-[color:var(--success)] px-2.5 py-1 font-medium text-[11px] text-white uppercase",
22
+ children: "New"
23
+ }, undefined, false, undefined, this) : null,
24
+ /* @__PURE__ */ jsxDEV("div", {
25
+ children: [
26
+ /* @__PURE__ */ jsxDEV("h3", {
27
+ className: "font-serif text-2xl tracking-[-0.03em]",
28
+ children: title
29
+ }, undefined, false, undefined, this),
30
+ /* @__PURE__ */ jsxDEV("p", {
31
+ className: "mt-1 text-muted-foreground text-sm",
32
+ children: description
33
+ }, undefined, false, undefined, this)
34
+ ]
35
+ }, undefined, true, undefined, this),
36
+ /* @__PURE__ */ jsxDEV("div", {
37
+ className: "flex-1 space-y-3",
38
+ children: [
39
+ /* @__PURE__ */ jsxDEV("div", {
40
+ className: "flex flex-wrap gap-2",
41
+ children: metaBadges.map((badge) => /* @__PURE__ */ jsxDEV("span", {
42
+ className: "rounded-full border border-border bg-background px-3 py-1 text-[11px] text-foreground",
43
+ children: badge
44
+ }, badge, false, undefined, this))
45
+ }, undefined, false, undefined, this),
46
+ featureList.length > 0 ? /* @__PURE__ */ jsxDEV("p", {
47
+ className: "text-muted-foreground text-xs",
48
+ children: [
49
+ /* @__PURE__ */ jsxDEV("span", {
50
+ className: "font-medium text-foreground",
51
+ children: "Features:"
52
+ }, undefined, false, undefined, this),
53
+ " ",
54
+ featureList.join(", ")
55
+ ]
56
+ }, undefined, true, undefined, this) : null,
57
+ /* @__PURE__ */ jsxDEV("div", {
58
+ className: "flex flex-wrap gap-1",
59
+ children: tags.map((tag) => /* @__PURE__ */ jsxDEV("span", {
60
+ className: "rounded-full border border-border bg-muted px-3 py-1 text-[11px] text-muted-foreground",
61
+ children: tag
62
+ }, tag, false, undefined, this))
63
+ }, undefined, false, undefined, this)
64
+ ]
65
+ }, undefined, true, undefined, this),
66
+ /* @__PURE__ */ jsxDEV("div", {
67
+ className: "flex gap-2 pt-4",
68
+ children: [
69
+ previewAction,
70
+ useAction
71
+ ]
72
+ }, undefined, true, undefined, this)
73
+ ]
74
+ }, undefined, true, undefined, this);
75
+ }
76
+ export {
77
+ TemplateCard
78
+ };
@@ -0,0 +1,6 @@
1
+ export interface TemplateCommandDialogProps {
2
+ templateId: string | null;
3
+ onClose: () => void;
4
+ onDeployStudio: () => void;
5
+ }
6
+ export declare function TemplateCommandDialog({ templateId, onClose, onDeployStudio, }: TemplateCommandDialogProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,105 @@
1
+ // @bun
2
+ var __require = import.meta.require;
3
+
4
+ // src/components/templates/TemplateCommandDialog.tsx
5
+ import {
6
+ analyticsEventNames,
7
+ captureAnalyticsEvent
8
+ } from "@contractspec/bundle.library/libs/posthog/client";
9
+ import {
10
+ Dialog,
11
+ DialogContent,
12
+ DialogDescription,
13
+ DialogHeader,
14
+ DialogTitle
15
+ } from "@contractspec/lib.ui-kit-web/ui/dialog";
16
+ import { jsxDEV } from "react/jsx-dev-runtime";
17
+ "use client";
18
+ function TemplateCommandDialog({
19
+ templateId,
20
+ onClose,
21
+ onDeployStudio
22
+ }) {
23
+ const command = templateId ? `npx contractspec init --template ${templateId}` : "";
24
+ return /* @__PURE__ */ jsxDEV(Dialog, {
25
+ open: !!templateId,
26
+ onOpenChange: (open) => !open && onClose(),
27
+ children: /* @__PURE__ */ jsxDEV(DialogContent, {
28
+ className: "max-w-md",
29
+ children: [
30
+ /* @__PURE__ */ jsxDEV(DialogHeader, {
31
+ children: [
32
+ /* @__PURE__ */ jsxDEV(DialogTitle, {
33
+ children: "Use this template"
34
+ }, undefined, false, undefined, this),
35
+ /* @__PURE__ */ jsxDEV(DialogDescription, {
36
+ children: "Initialize a new project with this template using the CLI."
37
+ }, undefined, false, undefined, this)
38
+ ]
39
+ }, undefined, true, undefined, this),
40
+ /* @__PURE__ */ jsxDEV("div", {
41
+ className: "space-y-4 pt-4",
42
+ children: [
43
+ /* @__PURE__ */ jsxDEV("div", {
44
+ className: "rounded-md border border-zinc-800 bg-zinc-950 p-4 font-mono text-sm text-zinc-50",
45
+ children: command
46
+ }, undefined, false, undefined, this),
47
+ /* @__PURE__ */ jsxDEV("div", {
48
+ className: "flex gap-2",
49
+ children: /* @__PURE__ */ jsxDEV("button", {
50
+ className: "btn-secondary w-full",
51
+ onClick: () => {
52
+ if (!templateId) {
53
+ return;
54
+ }
55
+ navigator.clipboard.writeText(command);
56
+ captureAnalyticsEvent(analyticsEventNames.COPY_COMMAND_CLICK, {
57
+ surface: "templates",
58
+ templateId,
59
+ filename: "templates-cli"
60
+ });
61
+ },
62
+ children: "Copy Command"
63
+ }, undefined, false, undefined, this)
64
+ }, undefined, false, undefined, this),
65
+ /* @__PURE__ */ jsxDEV("div", {
66
+ className: "relative",
67
+ children: [
68
+ /* @__PURE__ */ jsxDEV("div", {
69
+ className: "absolute inset-0 flex items-center",
70
+ children: /* @__PURE__ */ jsxDEV("span", {
71
+ className: "w-full border-border border-t"
72
+ }, undefined, false, undefined, this)
73
+ }, undefined, false, undefined, this),
74
+ /* @__PURE__ */ jsxDEV("div", {
75
+ className: "relative flex justify-center text-xs uppercase",
76
+ children: /* @__PURE__ */ jsxDEV("span", {
77
+ className: "bg-background px-2 text-muted-foreground",
78
+ children: "Or"
79
+ }, undefined, false, undefined, this)
80
+ }, undefined, false, undefined, this)
81
+ ]
82
+ }, undefined, true, undefined, this),
83
+ /* @__PURE__ */ jsxDEV("button", {
84
+ className: "btn-ghost w-full text-sm",
85
+ onClick: () => {
86
+ if (!templateId) {
87
+ return;
88
+ }
89
+ captureAnalyticsEvent(analyticsEventNames.CTA_STUDIO_CLICK, {
90
+ surface: "templates",
91
+ templateId
92
+ });
93
+ onDeployStudio();
94
+ },
95
+ children: "Deploy to Studio"
96
+ }, undefined, false, undefined, this)
97
+ ]
98
+ }, undefined, true, undefined, this)
99
+ ]
100
+ }, undefined, true, undefined, this)
101
+ }, undefined, false, undefined, this);
102
+ }
103
+ export {
104
+ TemplateCommandDialog
105
+ };
@@ -0,0 +1,5 @@
1
+ import { type TemplateId } from '@contractspec/lib.example-shared-ui';
2
+ export interface TemplatePreviewContentProps {
3
+ templateId: TemplateId;
4
+ }
5
+ export declare function TemplatePreviewContent({ templateId, }: TemplatePreviewContentProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,91 @@
1
+ // @bun
2
+ var __require = import.meta.require;
3
+
4
+ // src/components/templates/TemplatePreviewContent.tsx
5
+ import {
6
+ TemplateShell
7
+ } from "@contractspec/lib.example-shared-ui";
8
+ import { LoadingSpinner } from "@contractspec/lib.ui-kit-web/ui/atoms/LoadingSpinner";
9
+ import dynamic from "next/dynamic";
10
+ import { jsxDEV } from "react/jsx-dev-runtime";
11
+ "use client";
12
+ var SaasDashboard = dynamic(() => import("@contractspec/example.saas-boilerplate").then((module) => module.SaasDashboard), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
13
+ var CrmDashboard = dynamic(() => import("@contractspec/example.crm-pipeline").then((module) => module.CrmDashboard), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
14
+ var DataGridShowcase = dynamic(() => import("@contractspec/example.data-grid-showcase/ui").then((module) => module.DataGridShowcase), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
15
+ var VisualizationShowcase = dynamic(() => import("@contractspec/example.visualization-showcase/ui").then((module) => module.VisualizationShowcase), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
16
+ var AgentDashboard = dynamic(() => import("@contractspec/example.agent-console/ui").then((module) => module.AgentDashboard), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
17
+ var AiChatAssistantDashboard = dynamic(() => import("@contractspec/example.ai-chat-assistant").then((module) => module.AiChatAssistantDashboard), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
18
+ var WorkflowDashboard = dynamic(() => import("@contractspec/example.workflow-system/ui").then((module) => module.WorkflowDashboard), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
19
+ var MarketplaceDashboard = dynamic(() => import("@contractspec/example.marketplace/ui").then((module) => module.MarketplaceDashboard), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
20
+ var IntegrationDashboard = dynamic(() => import("@contractspec/example.integration-hub/ui").then((module) => module.IntegrationDashboard), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
21
+ var AnalyticsDashboard = dynamic(() => import("@contractspec/example.analytics-dashboard").then((module) => module.AnalyticsDashboard), { ssr: false, loading: () => /* @__PURE__ */ jsxDEV(LoadingSpinner, {}, undefined, false, undefined, this) });
22
+ var PREVIEW_DEFINITIONS = {
23
+ "saas-boilerplate": {
24
+ title: "SaaS Boilerplate",
25
+ description: "Multi-tenant organizations, projects, settings, and billing usage tracking.",
26
+ component: SaasDashboard
27
+ },
28
+ "crm-pipeline": {
29
+ title: "CRM Pipeline",
30
+ description: "Sales CRM with contacts, companies, deals, and pipeline stages.",
31
+ component: CrmDashboard
32
+ },
33
+ "data-grid-showcase": {
34
+ title: "Data Grid Showcase",
35
+ description: "Shared ContractSpec table primitives with client, server, and DataView-driven lanes.",
36
+ component: DataGridShowcase
37
+ },
38
+ "visualization-showcase": {
39
+ title: "Visualization Showcase",
40
+ description: "ContractSpec-owned chart primitives rendered through shared visualization contracts and design-system wrappers.",
41
+ component: VisualizationShowcase
42
+ },
43
+ "agent-console": {
44
+ title: "AI Agent Console",
45
+ description: "AI agent orchestration with tools, agents, runs, and execution logs.",
46
+ component: AgentDashboard
47
+ },
48
+ "ai-chat-assistant": {
49
+ title: "AI Chat Assistant",
50
+ description: "Focused assistant surface with reasoning, sources, suggestions, and MCP-aware tools.",
51
+ component: AiChatAssistantDashboard
52
+ },
53
+ "workflow-system": {
54
+ title: "Workflow System",
55
+ description: "Multi-step workflows with role-based approvals.",
56
+ component: WorkflowDashboard
57
+ },
58
+ marketplace: {
59
+ title: "Marketplace",
60
+ description: "Two-sided marketplace with stores, products, orders, and payouts.",
61
+ component: MarketplaceDashboard
62
+ },
63
+ "integration-hub": {
64
+ title: "Integration Hub",
65
+ description: "Third-party integrations with connections, sync configs, and field mapping.",
66
+ component: IntegrationDashboard
67
+ },
68
+ "analytics-dashboard": {
69
+ title: "Analytics Dashboard",
70
+ description: "Custom dashboards with widgets and queries.",
71
+ component: AnalyticsDashboard
72
+ }
73
+ };
74
+ function TemplatePreviewContent({
75
+ templateId
76
+ }) {
77
+ const preview = PREVIEW_DEFINITIONS[templateId];
78
+ if (!preview) {
79
+ return null;
80
+ }
81
+ const PreviewComponent = preview.component;
82
+ return /* @__PURE__ */ jsxDEV(TemplateShell, {
83
+ title: preview.title,
84
+ description: preview.description,
85
+ showSaveAction: false,
86
+ children: /* @__PURE__ */ jsxDEV(PreviewComponent, {}, undefined, false, undefined, this)
87
+ }, undefined, false, undefined, this);
88
+ }
89
+ export {
90
+ TemplatePreviewContent
91
+ };
@@ -0,0 +1,13 @@
1
+ import type { TemplateSource } from './template-source';
2
+ export interface TemplatesBrowseControlsProps {
3
+ registryConfigured: boolean;
4
+ availableSources: readonly TemplateSource[];
5
+ source: TemplateSource;
6
+ onSourceChange: (source: TemplateSource) => void;
7
+ search: string;
8
+ onSearchChange: (value: string) => void;
9
+ selectedTag: string | null;
10
+ onTagChange: (tag: string | null) => void;
11
+ availableTags: readonly string[];
12
+ }
13
+ export declare function TemplatesBrowseControls({ registryConfigured, availableSources, source, onSourceChange, search, onSearchChange, selectedTag, onTagChange, availableTags, }: TemplatesBrowseControlsProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,110 @@
1
+ // @bun
2
+ var __require = import.meta.require;
3
+
4
+ // src/components/templates/TemplatesBrowseControls.tsx
5
+ import { cn } from "@contractspec/lib.ui-kit-core/utils";
6
+ import { Search } from "lucide-react";
7
+ import { jsxDEV } from "react/jsx-dev-runtime";
8
+ "use client";
9
+ function TemplatesBrowseControls({
10
+ registryConfigured,
11
+ availableSources,
12
+ source,
13
+ onSourceChange,
14
+ search,
15
+ onSearchChange,
16
+ selectedTag,
17
+ onTagChange,
18
+ availableTags
19
+ }) {
20
+ return /* @__PURE__ */ jsxDEV("section", {
21
+ className: "editorial-section",
22
+ children: /* @__PURE__ */ jsxDEV("div", {
23
+ className: "editorial-shell space-y-6",
24
+ children: [
25
+ /* @__PURE__ */ jsxDEV("div", {
26
+ className: "flex flex-col gap-6 lg:flex-row lg:items-end lg:justify-between",
27
+ children: [
28
+ /* @__PURE__ */ jsxDEV("div", {
29
+ className: "max-w-3xl space-y-3",
30
+ children: [
31
+ /* @__PURE__ */ jsxDEV("p", {
32
+ className: "editorial-kicker",
33
+ children: "Browse by source"
34
+ }, undefined, false, undefined, this),
35
+ /* @__PURE__ */ jsxDEV("h2", {
36
+ className: "font-serif text-4xl tracking-[-0.04em]",
37
+ children: "Use local scenarios for core proof, then scan the community."
38
+ }, undefined, false, undefined, this),
39
+ /* @__PURE__ */ jsxDEV("p", {
40
+ className: "text-muted-foreground text-sm leading-7",
41
+ 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."
42
+ }, undefined, false, undefined, this)
43
+ ]
44
+ }, undefined, true, undefined, this),
45
+ registryConfigured ? /* @__PURE__ */ jsxDEV("div", {
46
+ className: "flex gap-2",
47
+ children: availableSources.map((option) => /* @__PURE__ */ jsxDEV("button", {
48
+ onClick: () => onSourceChange(option),
49
+ className: cn("rounded-full px-4 py-2 font-medium text-sm transition-colors", {
50
+ "bg-primary text-primary-foreground": source === option,
51
+ "border border-border bg-card hover:bg-card/80": source !== option
52
+ }),
53
+ "aria-pressed": source === option,
54
+ children: option === "local" ? "Local" : "Community"
55
+ }, option, false, undefined, this))
56
+ }, undefined, false, undefined, this) : null
57
+ ]
58
+ }, undefined, true, undefined, this),
59
+ /* @__PURE__ */ jsxDEV("div", {
60
+ className: "editorial-panel space-y-5",
61
+ children: [
62
+ /* @__PURE__ */ jsxDEV("div", {
63
+ className: "relative",
64
+ children: [
65
+ /* @__PURE__ */ jsxDEV(Search, {
66
+ className: "absolute top-3.5 left-4 text-muted-foreground",
67
+ size: 18
68
+ }, undefined, false, undefined, this),
69
+ /* @__PURE__ */ jsxDEV("input", {
70
+ type: "text",
71
+ placeholder: "Search scenarios, industries, or tags",
72
+ value: search,
73
+ onChange: (event) => onSearchChange(event.target.value),
74
+ 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",
75
+ "aria-label": "Search templates"
76
+ }, undefined, false, undefined, this)
77
+ ]
78
+ }, undefined, true, undefined, this),
79
+ /* @__PURE__ */ jsxDEV("div", {
80
+ className: "flex flex-wrap gap-2",
81
+ children: [
82
+ /* @__PURE__ */ jsxDEV("button", {
83
+ onClick: () => onTagChange(null),
84
+ className: cn("rounded-full px-4 py-2 font-medium text-sm transition-colors", {
85
+ "bg-primary text-primary-foreground": selectedTag === null,
86
+ "border border-border bg-card hover:bg-card/80": selectedTag !== null
87
+ }),
88
+ "aria-pressed": selectedTag === null,
89
+ children: "All"
90
+ }, undefined, false, undefined, this),
91
+ availableTags.map((tag) => /* @__PURE__ */ jsxDEV("button", {
92
+ onClick: () => onTagChange(tag),
93
+ className: cn("rounded-full px-4 py-2 font-medium text-sm transition-colors", {
94
+ "bg-primary text-primary-foreground": selectedTag === tag,
95
+ "border border-border bg-card hover:bg-card/80": selectedTag !== tag
96
+ }),
97
+ "aria-pressed": selectedTag === tag,
98
+ children: tag
99
+ }, tag, false, undefined, this))
100
+ ]
101
+ }, undefined, true, undefined, this)
102
+ ]
103
+ }, undefined, true, undefined, this)
104
+ ]
105
+ }, undefined, true, undefined, this)
106
+ }, undefined, false, undefined, this);
107
+ }
108
+ export {
109
+ TemplatesBrowseControls
110
+ };
@@ -0,0 +1,14 @@
1
+ import type { RegistryTemplate } from '@contractspec/lib.example-shared-ui';
2
+ import { type LocalTemplateCatalogItem } from './template-catalog';
3
+ import type { TemplateSource } from './template-source';
4
+ export interface TemplatesCatalogSectionProps {
5
+ source: TemplateSource;
6
+ registryConfigured: boolean;
7
+ registryLoading: boolean;
8
+ localTemplates: readonly LocalTemplateCatalogItem[];
9
+ registryTemplates: readonly RegistryTemplate[];
10
+ localTemplateById: ReadonlyMap<string, LocalTemplateCatalogItem>;
11
+ onPreview: (templateId: string) => void;
12
+ onUseTemplate: (templateId: string, source: TemplateSource) => void;
13
+ }
14
+ export declare function TemplatesCatalogSection({ source, registryConfigured, registryLoading, localTemplates, registryTemplates, localTemplateById, onPreview, onUseTemplate, }: TemplatesCatalogSectionProps): import("react/jsx-runtime").JSX.Element;