// src/components/docs/ecosystem/RegistryPage.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 EcosystemRegistryPage() {
  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: "Marketplace manifest"
          }),
          /* @__PURE__ */ jsx("p", {
            className: "text-muted-foreground text-lg",
            children: "ContractSpec publishes a multi-plugin Cursor marketplace catalog from a single root manifest."
          })
        ]
      }),
      /* @__PURE__ */ jsxs("div", {
        className: "card-subtle space-y-4 p-6",
        children: [
          /* @__PURE__ */ jsx("h2", {
            className: "text-2xl font-bold",
            children: "Root manifest shape"
          }),
          /* @__PURE__ */ jsxs("p", {
            className: "text-muted-foreground text-sm",
            children: [
              "Cursor 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"
    }
  ]
}`
          })
        ]
      }),
      /* @__PURE__ */ jsxs("div", {
        className: "card-subtle space-y-4 p-6",
        children: [
          /* @__PURE__ */ jsx("h2", {
            className: "text-2xl font-bold",
            children: "Per-plugin contract"
          }),
          /* @__PURE__ */ jsx("p", {
            className: "text-muted-foreground text-sm",
            children: "Each plugin source must include a Cursor plugin manifest and composable assets."
          }),
          /* @__PURE__ */ jsx(CodeBlock, {
            language: "text",
            filename: "plugin-layout",
            code: `plugins/<plugin-name>/
  .cursor-plugin/plugin.json
  rules/
  commands/
  agents/
  skills/
  .mcp.json`
          }),
          /* @__PURE__ */ jsx(CodeBlock, {
            language: "bash",
            filename: "validate-catalog",
            code: `bun run plugin:contractspec:validate

# Optional in offline environments
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/integrations",
            className: "btn-primary",
            children: [
              "Integrations ",
              /* @__PURE__ */ jsx(ChevronRight, {
                size: 16
              })
            ]
          }),
          /* @__PURE__ */ jsx(Link, {
            href: "/docs/ecosystem/templates",
            className: "btn-ghost",
            children: "Plugin authoring templates"
          })
        ]
      })
    ]
  });
}
export {
  EcosystemRegistryPage
};
