// src/components/docs/ecosystem/IntegrationsPage.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 EcosystemIntegrationsPage() {
  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: "Integrations"
          }),
          /* @__PURE__ */ jsx("p", {
            className: "text-muted-foreground text-lg",
            children: "Reference integrations show how to extend ContractSpec with real-world adapters and generators."
          })
        ]
      }),
      /* @__PURE__ */ jsxs("div", {
        className: "card-subtle space-y-4 p-6",
        children: [
          /* @__PURE__ */ jsx("h2", {
            className: "text-2xl font-bold",
            children: "Reference plugin"
          }),
          /* @__PURE__ */ jsx("p", {
            className: "text-muted-foreground text-sm",
            children: "The example markdown generator plugin ships as a working reference implementation."
          }),
          /* @__PURE__ */ jsx(CodeBlock, {
            language: "bash",
            filename: "install-example",
            code: `bun add @contractspec/lib.plugin.example-generator

# Or in a workspace
bun add -D @contractspec/lib.plugin.example-generator`
          })
        ]
      }),
      /* @__PURE__ */ jsxs("div", {
        className: "card-subtle space-y-4 p-6",
        children: [
          /* @__PURE__ */ jsx("h2", {
            className: "text-2xl font-bold",
            children: "Providers and adapters"
          }),
          /* @__PURE__ */ jsxs("ul", {
            className: "text-muted-foreground space-y-2 text-sm",
            children: [
              /* @__PURE__ */ jsx("li", {
                children: "Payments: Stripe"
              }),
              /* @__PURE__ */ jsx("li", {
                children: "Email: Postmark, Gmail"
              }),
              /* @__PURE__ */ jsx("li", {
                children: "AI: OpenAI, Mistral"
              }),
              /* @__PURE__ */ jsx("li", {
                children: "Voice: ElevenLabs, Mistral"
              }),
              /* @__PURE__ */ jsx("li", {
                children: "Vector DB: Qdrant"
              }),
              /* @__PURE__ */ jsx("li", {
                children: "Storage: GCS"
              })
            ]
          }),
          /* @__PURE__ */ jsx("p", {
            className: "text-muted-foreground text-sm",
            children: "Use provider modules as inspiration for adapter plugins."
          })
        ]
      }),
      /* @__PURE__ */ jsxs("div", {
        className: "flex items-center gap-4 pt-4",
        children: [
          /* @__PURE__ */ jsxs(Link, {
            href: "/docs/ecosystem/registry",
            className: "btn-primary",
            children: [
              "Marketplace manifest ",
              /* @__PURE__ */ jsx(ChevronRight, {
                size: 16
              })
            ]
          }),
          /* @__PURE__ */ jsx(Link, {
            href: "/docs/ecosystem/templates",
            className: "btn-ghost",
            children: "Authoring templates"
          })
        ]
      })
    ]
  });
}

// src/components/docs/ecosystem/PluginsPage.tsx
import { CodeBlock as CodeBlock2 } from "@contractspec/lib.design-system";
import Link2 from "@contractspec/lib.ui-link";
import { ChevronRight as ChevronRight2 } from "lucide-react";
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
function EcosystemPluginsPage() {
  return /* @__PURE__ */ jsxs2("div", {
    className: "space-y-8",
    children: [
      /* @__PURE__ */ jsxs2("div", {
        className: "space-y-3",
        children: [
          /* @__PURE__ */ jsx2("h1", {
            className: "text-4xl font-bold",
            children: "Cursor marketplace plugins"
          }),
          /* @__PURE__ */ jsx2("p", {
            className: "text-muted-foreground text-lg",
            children: "ContractSpec ships a focused Cursor marketplace catalog for the product and key libraries."
          })
        ]
      }),
      /* @__PURE__ */ jsxs2("div", {
        className: "card-subtle space-y-4 p-6",
        children: [
          /* @__PURE__ */ jsx2("h2", {
            className: "text-2xl font-bold",
            children: "Catalog at a glance"
          }),
          /* @__PURE__ */ jsxs2("ul", {
            className: "text-muted-foreground space-y-2 text-sm",
            children: [
              /* @__PURE__ */ jsxs2("li", {
                children: [
                  /* @__PURE__ */ jsx2("code", {
                    children: "contractspec"
                  }),
                  " - Product-level workflow and release guardrails."
                ]
              }),
              /* @__PURE__ */ jsxs2("li", {
                children: [
                  /* @__PURE__ */ jsx2("code", {
                    children: "contractspec-contracts-spec"
                  }),
                  " -",
                  /* @__PURE__ */ jsx2("code", {
                    children: "@contractspec/lib.contracts-spec"
                  }),
                  " governance."
                ]
              }),
              /* @__PURE__ */ jsxs2("li", {
                children: [
                  /* @__PURE__ */ jsx2("code", {
                    children: "contractspec-contracts-integrations"
                  }),
                  " -",
                  /* @__PURE__ */ jsx2("code", {
                    children: "@contractspec/lib.contracts-integrations"
                  }),
                  " governance."
                ]
              }),
              /* @__PURE__ */ jsxs2("li", {
                children: [
                  /* @__PURE__ */ jsx2("code", {
                    children: "contractspec-ai-agent"
                  }),
                  " -",
                  /* @__PURE__ */ jsx2("code", {
                    children: "@contractspec/lib.ai-agent"
                  }),
                  " orchestration guardrails."
                ]
              })
            ]
          })
        ]
      }),
      /* @__PURE__ */ jsxs2("div", {
        className: "space-y-6",
        children: [
          /* @__PURE__ */ jsxs2("div", {
            className: "space-y-3",
            children: [
              /* @__PURE__ */ jsx2("h2", {
                className: "text-2xl font-bold",
                children: "Where plugin sources live"
              }),
              /* @__PURE__ */ jsx2("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__ */ jsx2(CodeBlock2, {
                language: "text",
                filename: "catalog-layout",
                code: `packages/apps-registry/cursor-marketplace/
  plugins/
    contractspec/
    contractspec-contracts-spec/
    contractspec-contracts-integrations/
    contractspec-ai-agent/`
              })
            ]
          }),
          /* @__PURE__ */ jsxs2("div", {
            className: "space-y-3",
            children: [
              /* @__PURE__ */ jsx2("h2", {
                className: "text-2xl font-bold",
                children: "Root marketplace manifest"
              }),
              /* @__PURE__ */ jsxs2("p", {
                className: "text-muted-foreground text-sm",
                children: [
                  "Cursor submission reads ",
                  /* @__PURE__ */ jsx2("code", {
                    children: ".cursor-plugin/marketplace.json"
                  }),
                  " ",
                  "at repository root and resolves each plugin source path."
                ]
              }),
              /* @__PURE__ */ jsx2(CodeBlock2, {
                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__ */ jsxs2("div", {
            className: "space-y-3",
            children: [
              /* @__PURE__ */ jsx2("h2", {
                className: "text-2xl font-bold",
                children: "Validation gate"
              }),
              /* @__PURE__ */ jsx2("p", {
                className: "text-muted-foreground text-sm",
                children: "Validate all marketplace plugins before publishing."
              }),
              /* @__PURE__ */ jsx2(CodeBlock2, {
                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__ */ jsxs2("div", {
        className: "flex items-center gap-4 pt-4",
        children: [
          /* @__PURE__ */ jsxs2(Link2, {
            href: "/docs/ecosystem/templates",
            className: "btn-primary",
            children: [
              "Author a plugin ",
              /* @__PURE__ */ jsx2(ChevronRight2, {
                size: 16
              })
            ]
          }),
          /* @__PURE__ */ jsx2(Link2, {
            href: "/docs/ecosystem/registry",
            className: "btn-ghost",
            children: "Manifest details"
          })
        ]
      })
    ]
  });
}

// src/components/docs/ecosystem/RegistryPage.tsx
import { CodeBlock as CodeBlock3 } from "@contractspec/lib.design-system";
import Link3 from "@contractspec/lib.ui-link";
import { ChevronRight as ChevronRight3 } from "lucide-react";
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
function EcosystemRegistryPage() {
  return /* @__PURE__ */ jsxs3("div", {
    className: "space-y-8",
    children: [
      /* @__PURE__ */ jsxs3("div", {
        className: "space-y-3",
        children: [
          /* @__PURE__ */ jsx3("h1", {
            className: "text-4xl font-bold",
            children: "Marketplace manifest"
          }),
          /* @__PURE__ */ jsx3("p", {
            className: "text-muted-foreground text-lg",
            children: "ContractSpec publishes a multi-plugin Cursor marketplace catalog from a single root manifest."
          })
        ]
      }),
      /* @__PURE__ */ jsxs3("div", {
        className: "card-subtle space-y-4 p-6",
        children: [
          /* @__PURE__ */ jsx3("h2", {
            className: "text-2xl font-bold",
            children: "Root manifest shape"
          }),
          /* @__PURE__ */ jsxs3("p", {
            className: "text-muted-foreground text-sm",
            children: [
              "Cursor reads ",
              /* @__PURE__ */ jsx3("code", {
                children: ".cursor-plugin/marketplace.json"
              }),
              " at repository root and resolves each plugin source path."
            ]
          }),
          /* @__PURE__ */ jsx3(CodeBlock3, {
            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__ */ jsxs3("div", {
        className: "card-subtle space-y-4 p-6",
        children: [
          /* @__PURE__ */ jsx3("h2", {
            className: "text-2xl font-bold",
            children: "Per-plugin contract"
          }),
          /* @__PURE__ */ jsx3("p", {
            className: "text-muted-foreground text-sm",
            children: "Each plugin source must include a Cursor plugin manifest and composable assets."
          }),
          /* @__PURE__ */ jsx3(CodeBlock3, {
            language: "text",
            filename: "plugin-layout",
            code: `plugins/<plugin-name>/
  .cursor-plugin/plugin.json
  rules/
  commands/
  agents/
  skills/
  .mcp.json`
          }),
          /* @__PURE__ */ jsx3(CodeBlock3, {
            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__ */ jsxs3("div", {
        className: "flex items-center gap-4 pt-4",
        children: [
          /* @__PURE__ */ jsxs3(Link3, {
            href: "/docs/ecosystem/integrations",
            className: "btn-primary",
            children: [
              "Integrations ",
              /* @__PURE__ */ jsx3(ChevronRight3, {
                size: 16
              })
            ]
          }),
          /* @__PURE__ */ jsx3(Link3, {
            href: "/docs/ecosystem/templates",
            className: "btn-ghost",
            children: "Plugin authoring templates"
          })
        ]
      })
    ]
  });
}

// src/components/docs/shared/StudioPrompt.tsx
import Link4 from "@contractspec/lib.ui-link";
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
function StudioPrompt({
  title = "Want to turn product signals into spec-first deliverables?",
  body = "ContractSpec Studio ingests evidence from meetings, support, analytics, docs, and code, then compiles decisions into spec diffs and task packs.",
  ctaLabel = "Try Studio",
  href = "https://www.contractspec.studio"
}) {
  return /* @__PURE__ */ jsxs4("div", {
    className: "card-subtle space-y-3 p-6",
    children: [
      /* @__PURE__ */ jsx4("h3", {
        className: "text-lg font-semibold",
        children: title
      }),
      /* @__PURE__ */ jsx4("p", {
        className: "text-muted-foreground text-sm",
        children: body
      }),
      /* @__PURE__ */ jsx4(Link4, {
        href,
        className: "btn-primary",
        children: ctaLabel
      })
    ]
  });
}

// src/components/docs/ecosystem/TemplatesPage.tsx
import { CodeBlock as CodeBlock4 } from "@contractspec/lib.design-system";
import Link5 from "@contractspec/lib.ui-link";
import { ChevronRight as ChevronRight4 } from "lucide-react";
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
function EcosystemTemplatesPage() {
  return /* @__PURE__ */ jsxs5("div", {
    className: "space-y-8",
    children: [
      /* @__PURE__ */ jsxs5("div", {
        className: "space-y-3",
        children: [
          /* @__PURE__ */ jsx5("h1", {
            className: "text-4xl font-bold",
            children: "Plugin authoring templates"
          }),
          /* @__PURE__ */ jsx5("p", {
            className: "text-muted-foreground text-lg",
            children: "Scaffold focused Cursor plugins for ContractSpec product and core libraries."
          })
        ]
      }),
      /* @__PURE__ */ jsxs5("div", {
        className: "card-subtle space-y-4 p-6",
        children: [
          /* @__PURE__ */ jsx5("h2", {
            className: "text-2xl font-bold",
            children: "Create a focused plugin"
          }),
          /* @__PURE__ */ jsx5("p", {
            className: "text-muted-foreground text-sm",
            children: "Start from a scoped domain and keep each plugin aligned to one product or library surface."
          }),
          /* @__PURE__ */ jsx5(CodeBlock4, {
            language: "bash",
            filename: "catalog-authoring-layout",
            code: `packages/apps-registry/cursor-marketplace/
  plugins/
    <plugin-name>/
      .cursor-plugin/plugin.json
      rules/
      commands/
      agents/
      skills/
      .mcp.json`
          })
        ]
      }),
      /* @__PURE__ */ jsxs5("div", {
        className: "card-subtle space-y-4 p-6",
        children: [
          /* @__PURE__ */ jsx5("h2", {
            className: "text-2xl font-bold",
            children: "Template outputs"
          }),
          /* @__PURE__ */ jsxs5("ul", {
            className: "text-muted-foreground space-y-2 text-sm",
            children: [
              /* @__PURE__ */ jsx5("li", {
                children: ".cursor-plugin/plugin.json with plugin metadata and paths"
              }),
              /* @__PURE__ */ jsx5("li", {
                children: "rules/, commands/, agents/, and skills/ content directories"
              }),
              /* @__PURE__ */ jsx5("li", {
                children: ".mcp.json with all MCP server declarations used by the plugin"
              }),
              /* @__PURE__ */ jsx5("li", {
                children: "README.md describing scope and governance boundaries"
              })
            ]
          })
        ]
      }),
      /* @__PURE__ */ jsxs5("div", {
        className: "card-subtle space-y-4 p-6",
        children: [
          /* @__PURE__ */ jsx5("h2", {
            className: "text-2xl font-bold",
            children: "Validate before submission"
          }),
          /* @__PURE__ */ jsx5(CodeBlock4, {
            language: "bash",
            filename: "validate-marketplace-catalog",
            code: `# Validate all plugins referenced by root marketplace manifest
bun run plugin:contractspec:validate

# Optional in offline environments
SKIP_PLUGIN_NETWORK_CHECK=1 bun run plugin:contractspec:validate`
          })
        ]
      }),
      /* @__PURE__ */ jsx5(StudioPrompt, {
        title: "Need evidence-backed template iteration?",
        body: "Studio helps teams prioritize template changes from real product signals and export implementation-ready task packs."
      }),
      /* @__PURE__ */ jsxs5("div", {
        className: "flex items-center gap-4 pt-4",
        children: [
          /* @__PURE__ */ jsxs5(Link5, {
            href: "/docs/ecosystem/plugins",
            className: "btn-primary",
            children: [
              "Marketplace plugins ",
              /* @__PURE__ */ jsx5(ChevronRight4, {
                size: 16
              })
            ]
          }),
          /* @__PURE__ */ jsx5(Link5, {
            href: "/docs/ecosystem/registry",
            className: "btn-ghost",
            children: "Marketplace manifest"
          })
        ]
      })
    ]
  });
}

// src/components/docs/ecosystem/ecosystem.docblocks.ts
import { registerDocBlocks } from "@contractspec/lib.contracts-spec/docs";
var ecosystemDocBlocks = [
  {
    id: "docs.ecosystem.plugins",
    title: "Marketplace plugins",
    summary: "Focused Cursor marketplace plugins for product and core libraries.",
    kind: "usage",
    visibility: "public",
    route: "/docs/ecosystem/plugins",
    tags: ["ecosystem", "plugins", "extensions"],
    body: `# Marketplace plugins

ContractSpec ships a focused Cursor marketplace catalog with plugins for the product and key libraries. Plugin sources live in \`packages/apps-registry/cursor-marketplace/plugins/*\`, while the root manifest at \`.cursor-plugin/marketplace.json\` drives submission.`
  },
  {
    id: "docs.ecosystem.integrations",
    title: "Integrations",
    summary: "Reference plugins and integrations you can extend.",
    kind: "usage",
    visibility: "public",
    route: "/docs/ecosystem/integrations",
    tags: ["ecosystem", "integrations"],
    body: `# Integrations

Reference integrations demonstrate how to extend ContractSpec with real-world plugins. Use them as starting points for your own adapters and generators.`
  },
  {
    id: "docs.ecosystem.templates",
    title: "Plugin authoring templates",
    summary: "Author focused plugins with a consistent marketplace-ready layout.",
    kind: "usage",
    visibility: "public",
    route: "/docs/ecosystem/templates",
    tags: ["ecosystem", "templates"],
    body: "# Plugin authoring templates\n\nCreate each plugin under `packages/apps-registry/cursor-marketplace/plugins/<plugin-name>/` and include `.cursor-plugin/plugin.json`, `rules/`, `commands/`, `agents/`, `skills/`, and `.mcp.json`."
  },
  {
    id: "docs.ecosystem.registry",
    title: "Marketplace manifest",
    summary: "Manage and validate root marketplace entries for all plugins.",
    kind: "usage",
    visibility: "public",
    route: "/docs/ecosystem/registry",
    tags: ["ecosystem", "registry"],
    body: "# Marketplace manifest\n\nKeep all plugin entries in `.cursor-plugin/marketplace.json` and validate them with `bun run plugin:contractspec:validate` before submission."
  }
];
registerDocBlocks(ecosystemDocBlocks);
export {
  EcosystemTemplatesPage,
  EcosystemRegistryPage,
  EcosystemPluginsPage,
  EcosystemIntegrationsPage
};
