// @bun
// src/components/docs/ecosystem/PluginsPage.tsx
import { CodeBlock } from "@contractspec/lib.design-system";
import Link from "@contractspec/lib.ui-link";
import { ChevronRight } from "lucide-react";
import { jsx, jsxs } from "react/jsx-runtime";
function EcosystemPluginsPage() {
  return /* @__PURE__ */ jsxs("div", {
    className: "space-y-8",
    children: [
      /* @__PURE__ */ jsxs("div", {
        className: "space-y-3",
        children: [
          /* @__PURE__ */ jsx("h1", {
            className: "text-4xl font-bold",
            children: "Cursor marketplace plugins"
          }),
          /* @__PURE__ */ jsx("p", {
            className: "text-muted-foreground text-lg",
            children: "ContractSpec ships a focused Cursor marketplace catalog for the product and key libraries."
          })
        ]
      }),
      /* @__PURE__ */ jsxs("div", {
        className: "card-subtle space-y-4 p-6",
        children: [
          /* @__PURE__ */ jsx("h2", {
            className: "text-2xl font-bold",
            children: "Catalog at a glance"
          }),
          /* @__PURE__ */ jsxs("ul", {
            className: "text-muted-foreground space-y-2 text-sm",
            children: [
              /* @__PURE__ */ jsxs("li", {
                children: [
                  /* @__PURE__ */ jsx("code", {
                    children: "contractspec"
                  }),
                  " - Product-level workflow and release guardrails."
                ]
              }),
              /* @__PURE__ */ jsxs("li", {
                children: [
                  /* @__PURE__ */ jsx("code", {
                    children: "contractspec-contracts-spec"
                  }),
                  " -",
                  /* @__PURE__ */ jsx("code", {
                    children: "@contractspec/lib.contracts-spec"
                  }),
                  " governance."
                ]
              }),
              /* @__PURE__ */ jsxs("li", {
                children: [
                  /* @__PURE__ */ jsx("code", {
                    children: "contractspec-contracts-integrations"
                  }),
                  " -",
                  /* @__PURE__ */ jsx("code", {
                    children: "@contractspec/lib.contracts-integrations"
                  }),
                  " governance."
                ]
              }),
              /* @__PURE__ */ jsxs("li", {
                children: [
                  /* @__PURE__ */ jsx("code", {
                    children: "contractspec-ai-agent"
                  }),
                  " -",
                  /* @__PURE__ */ jsx("code", {
                    children: "@contractspec/lib.ai-agent"
                  }),
                  " orchestration guardrails."
                ]
              })
            ]
          })
        ]
      }),
      /* @__PURE__ */ jsxs("div", {
        className: "space-y-6",
        children: [
          /* @__PURE__ */ jsxs("div", {
            className: "space-y-3",
            children: [
              /* @__PURE__ */ jsx("h2", {
                className: "text-2xl font-bold",
                children: "Where plugin sources live"
              }),
              /* @__PURE__ */ jsx("p", {
                className: "text-muted-foreground text-sm",
                children: "Marketplace plugin sources are kept in a dedicated package so they can evolve with the monorepo safely."
              }),
              /* @__PURE__ */ jsx(CodeBlock, {
                language: "text",
                filename: "catalog-layout",
                code: `packages/apps-registry/cursor-marketplace/
  plugins/
    contractspec/
    contractspec-contracts-spec/
    contractspec-contracts-integrations/
    contractspec-ai-agent/`
              })
            ]
          }),
          /* @__PURE__ */ jsxs("div", {
            className: "space-y-3",
            children: [
              /* @__PURE__ */ jsx("h2", {
                className: "text-2xl font-bold",
                children: "Root marketplace manifest"
              }),
              /* @__PURE__ */ jsxs("p", {
                className: "text-muted-foreground text-sm",
                children: [
                  "Cursor submission reads ",
                  /* @__PURE__ */ jsx("code", {
                    children: ".cursor-plugin/marketplace.json"
                  }),
                  " ",
                  "at repository root and resolves each plugin source path."
                ]
              }),
              /* @__PURE__ */ jsx(CodeBlock, {
                language: "json",
                filename: ".cursor-plugin/marketplace.json",
                code: `{
  "name": "contractspec-marketplace",
  "plugins": [
    {
      "name": "contractspec",
      "source": "packages/apps-registry/cursor-marketplace/plugins/contractspec"
    },
    {
      "name": "contractspec-contracts-spec",
      "source": "packages/apps-registry/cursor-marketplace/plugins/contractspec-contracts-spec"
    },
    {
      "name": "contractspec-contracts-integrations",
      "source": "packages/apps-registry/cursor-marketplace/plugins/contractspec-contracts-integrations"
    },
    {
      "name": "contractspec-ai-agent",
      "source": "packages/apps-registry/cursor-marketplace/plugins/contractspec-ai-agent"
    }
  ]
}`
              })
            ]
          }),
          /* @__PURE__ */ jsxs("div", {
            className: "space-y-3",
            children: [
              /* @__PURE__ */ jsx("h2", {
                className: "text-2xl font-bold",
                children: "Validation gate"
              }),
              /* @__PURE__ */ jsx("p", {
                className: "text-muted-foreground text-sm",
                children: "Validate all marketplace plugins before publishing."
              }),
              /* @__PURE__ */ jsx(CodeBlock, {
                language: "bash",
                filename: "validate-marketplace",
                code: `bun run plugin:contractspec:validate

# Optional when offline
SKIP_PLUGIN_NETWORK_CHECK=1 bun run plugin:contractspec:validate`
              })
            ]
          })
        ]
      }),
      /* @__PURE__ */ jsxs("div", {
        className: "flex items-center gap-4 pt-4",
        children: [
          /* @__PURE__ */ jsxs(Link, {
            href: "/docs/ecosystem/templates",
            className: "btn-primary",
            children: [
              "Author a plugin ",
              /* @__PURE__ */ jsx(ChevronRight, {
                size: 16
              })
            ]
          }),
          /* @__PURE__ */ jsx(Link, {
            href: "/docs/ecosystem/registry",
            className: "btn-ghost",
            children: "Manifest details"
          })
        ]
      })
    ]
  });
}
export {
  EcosystemPluginsPage
};
