var N=Object.defineProperty;var O=(P)=>P;function v(P,G){this[P]=O.bind(null,G)}var r=(P,G)=>{for(var z in G)N(P,z,{get:G[z],enumerable:!0,configurable:!0,set:v.bind(G,z)})};var n=(P,G)=>()=>(P&&(G=P(P=0)),G);import{ExampleCatalogDataView as $}from"@contractspec/lib.contracts-spec/docs";import{ButtonLink as q,DataViewList as F,StatusChip as _}from"@contractspec/lib.design-system";import{HStack as K,VStack as A}from"@contractspec/lib.ui-kit-web/ui/stack";import{H1 as C,Muted as T}from"@contractspec/lib.ui-kit-web/ui/typography";import{buildExampleDocsHref as V,listDiscoverableExamples as g}from"@contractspec/module.examples/catalog";import{jsx as W,jsxs as Z}from"react/jsx-runtime";function R(){let P=g().map((z)=>{let U=z.meta.title??z.meta.key;return{id:z.meta.key,title:U,summary:z.meta.summary??z.meta.description,route:V(z.meta.key),tags:z.meta.tags,sandboxEnabled:z.surfaces.sandbox.enabled}}).sort((z,U)=>z.title.localeCompare(U.title)),G={...$,view:{...$.view,kind:"list"}};return Z(A,{gap:"xl",children:[Z(A,{gap:"sm",children:[W(C,{children:"Examples"}),W(T,{children:"Reference implementations for real ContractSpec surfaces. Use them to study adoption patterns, inspect generated artifacts, and validate the OSS workflow against runnable systems."})]}),W(F,{spec:G,items:P,emptyState:W(T,{children:"No examples available."}),renderActions:(z)=>{return Z(K,{gap:"xs",justify:"end",children:[z.sandboxEnabled?W(q,{href:`/sandbox?template=${z.id}`,size:"sm",variant:"outline",children:"Sandbox"}):null,W(q,{href:z.route,size:"sm",children:"Reference"}),z.tags?.[0]?W(_,{size:"sm",label:z.tags[0]}):null]})}})]})}import{buildExampleDocsHref as B,buildExampleReferenceHref as S,getDiscoverableExample as D,getExamplePreviewHref as f}from"@contractspec/module.examples/catalog";var L={"agent-console":"Primary meetup path for autonomous agents: typed tools, agent configs, run history, and execution logs in one regenerable surface.","ai-chat-assistant":"Secondary meetup path for MCP-aware assistants: reasoning, sources, suggestions, and a minimal contract-backed search tool.","data-grid-showcase":"Canonical table example for the full ContractSpec stack: declarative DataView contract, shared controller, raw web primitive, native-first primitive, and the composed design-system wrapper.","messaging-agent-actions":"Live messaging lane for the meetup: inbound Slack, WhatsApp, or Telegram messages route through fixed intents, allowlisted actions, and deterministic confirmations."},h={"agent-console":"/docs/reference/agent-console/agent-console","ai-chat-assistant":"/docs/reference/ai-chat-assistant/assistant.search","data-grid-showcase":"/docs/reference/data-grid-showcase/data-grid-showcase","messaging-agent-actions":"/docs/reference/messaging-agent-actions/messaging.agentActions.process"};function I(P){let G=D(P);if(!G)return;let z=G.entrypoints.packageName.replace("@contractspec/example.",""),U=B(P),Y=f(P);return{key:P,lead:L[P]??G.meta.summary??G.meta.description??"Public ContractSpec reference example.",sandboxHref:Y,referenceHref:h[P]??S(P),llmsHref:`/llms/${G.entrypoints.packageName.replace("@contractspec/","")}`,repoHref:`https://github.com/lssm-tech/contractspec/tree/main/packages/examples/${z}`,localCommands:b(z,U,Y)}}function b(P,G,z){let U=[`bun run --cwd packages/examples/${P} build`,"bun run --cwd packages/apps/web-landing dev","","# Open in the browser",`# http://localhost:3000${G}`];if(z)U.push(`# http://localhost:3000${z}`);return U.join(`
`)}import{ButtonLink as X,CodeBlock as w}from"@contractspec/lib.design-system";import H from"@contractspec/lib.ui-link";import{getExample as E}from"@contractspec/module.examples/catalog";import{FileCode2 as u,Play as d,TerminalSquare as y}from"lucide-react";import{jsx as J,jsxs as Q}from"react/jsx-runtime";function k({exampleKey:P}){let G=I(P),z=E(P);if(!G||!z)return null;let U=z.meta.title??z.meta.key,Y=z.meta.summary??z.meta.description??"",M=z.entrypoints.packageName;return Q("div",{className:"space-y-10",children:[Q("section",{className:"space-y-5",children:[J("p",{className:"editorial-kicker",children:"Meetup-ready example"}),J("h1",{className:"editorial-title max-w-5xl",children:U}),J("p",{className:"editorial-subtitle",children:G.lead}),J("p",{className:"editorial-copy max-w-4xl",children:Y}),Q("div",{className:"flex flex-wrap gap-3",children:[G.sandboxHref?J(X,{href:G.sandboxHref,children:"Open sandbox"}):null,J(X,{href:G.referenceHref,variant:"outline",children:"Generated reference"})]})]}),Q("section",{className:"grid gap-5 lg:grid-cols-3",children:[G.sandboxHref?Q("article",{className:"editorial-panel space-y-4",children:[Q("div",{className:"flex items-center gap-3",children:[J("div",{className:"rounded-full border border-border/80 bg-background/85 p-2",children:J(d,{size:18})}),J("h2",{className:"font-semibold text-xl",children:"Sandbox preview"})]}),J("p",{className:"editorial-copy text-sm",children:"Load the same public browser surface used for the prepared live demo."}),J(X,{href:G.sandboxHref,size:"sm",children:"Open preview"})]}):null,Q("article",{className:"editorial-panel space-y-4",children:[Q("div",{className:"flex items-center gap-3",children:[J("div",{className:"rounded-full border border-border/80 bg-background/85 p-2",children:J(u,{size:18})}),J("h2",{className:"font-semibold text-xl",children:"Reference docs"})]}),J("p",{className:"editorial-copy text-sm",children:"Inspect the generated contract-facing material instead of relying on marketing summaries."}),J(X,{href:G.referenceHref,size:"sm",variant:"outline",children:"Open reference"})]}),Q("article",{className:"editorial-panel space-y-4",children:[Q("div",{className:"flex items-center gap-3",children:[J("div",{className:"rounded-full border border-border/80 bg-background/85 p-2",children:J(y,{size:18})}),J("h2",{className:"font-semibold text-xl",children:"Package context"})]}),J("p",{className:"editorial-copy text-sm",children:"Use the agent-facing package page for fast repo orientation, then jump to the source directory."}),J("p",{className:"rounded-[18px] border border-border/70 bg-background/75 px-4 py-3 font-mono text-sm",children:M}),Q("div",{className:"flex flex-wrap gap-2",children:[J(X,{href:G.llmsHref,size:"sm",variant:"outline",children:"LLMS page"}),J(X,{href:G.repoHref,size:"sm",variant:"outline",children:"GitHub source"})]})]})]}),Q("section",{className:"editorial-panel space-y-5",children:[Q("div",{className:"space-y-2",children:[J("p",{className:"editorial-kicker",children:"Talk commands"}),J("h2",{className:"editorial-panel-title",children:"Exact local commands for the meetup lane"}),J("p",{className:"editorial-copy text-sm",children:"Build the example package, then launch the web shell and open the prepared docs or sandbox route."})]}),J(w,{language:"bash",filename:`${P}-meetup-runbook`,code:G.localCommands}),Q("p",{className:"text-muted-foreground text-sm",children:["For the full fallback order and safe live-edit workflow, use"," ",J(H,{href:"https://github.com/lssm-tech/contractspec/blob/main/docs/meetup-agent-examples-runbook.md",children:"the meetup runbook"}),"."]})]})]})}export{k as ExampleShowcasePage,R as DocsExamplesPage};
