1import{r as m,j as e}from"./framer-motion-0Sy5Nd0g.js";import{c as b,A as g,u as w,S as j,b as y,N,d as C,a as k}from"./index-CQi3APS0.js";import{d as x}from"./vendor-C97i8dbC.js";import{c}from"./commands-D2fNPqtf.js";import{C as v,a as S}from"./CategoryNav-Dg_ftVmk.js";import{u as L}from"./use-command-downloads-BNGUaKGi.js";import"./file-text-CYA8dt6R.js";/** 2 * @license lucide-react v0.462.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const E=b("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),I=()=>{const[o,n]=x(),d=o.get("q")||"",i=m.useCallback(r=>{n(a=>(r?a.set("q",r):a.delete("q"),a))},[n]);return e.jsxs("section",{className:"echoo-page-hero echoo-page-hero--full border-b border-border pt-16 pb-12 md:pt-20 md:pb-16","aria-labelledby":"marketplace-title",children:[e.jsxs("div",{className:"container mx-auto max-w-7xl px-4 md:px-6",children:[e.jsxs("h1",{id:"marketplace-title",className:"headword max-w-[18ch] text-4xl font-semibold text-foreground md:text-5xl",children:[e.jsx("span",{className:"block",children:"Ready-made commands"})," ",e.jsx("span",{className:"echoo-hero-emphasis block",children:"for every task."})]}),e.jsx("p",{className:"mt-6 max-w-[52ch] text-lg leading-relaxed text-muted-foreground",children:"Community-built commands you import in one click."}),e.jsxs("div",{className:"mt-10 max-w-2xl",children:[e.jsx("label",{htmlFor:"marketplace-search",className:"label-gram text-muted-foreground",children:"Search commands"}),e.jsxs("div",{className:"echoo-search mt-3 flex items-center rounded-lg border border-border-strong bg-card focus-within:border-accent focus-within:ring-2 focus-within:ring-ring",children:[e.jsx(E,{className:"ml-4 h-5 w-5 shrink-0 text-muted-foreground","aria-hidden":"true"}),e.jsx("input",{id:"marketplace-search",type:"search",name:"search",autoComplete:"off",placeholder:"Rewrite, translate, summarise...",value:d,onChange:r=>i(r.target.value),className:"w-full border-none bg-transparent px-3 py-3.5 text-base outline-none placeholder:text-muted-foreground focus-visible:outline-none md:text-lg"})]})]})]}),e.jsxs("a",{href:"#commands",className:"echoo-scroll-cue",children:[e.jsx("span",{children:"Browse the commands."}),e.jsx(g,{className:"h-4 w-4","aria-hidden":"true"})]})]})},P=c.map(o=>o.id),M=c.map(o=>o.name).join(", "),q=new Map(c.map(o=>[o.id,o.downloads])),H=()=>{const[o,n]=x(),{incrementCount:d}=w(),i=o.get("q")||"",r=o.get("filter")||"all",{counts:a}=L(P,q),p=m.useCallback(()=>{n(t=>(t.delete("q"),t.delete("filter"),t))},[n]),f=m.useCallback(t=>{n(s=>(t==="all"?s.delete("filter"):s.set("filter",t),s))},[n]),l=m.useMemo(()=>c.filter(t=>{const s=t.name.toLowerCase().includes(i.toLowerCase())||t.description.toLowerCase().includes(i.toLowerCase())||t.tags.some(u=>u.toLowerCase().includes(i.toLowerCase())),h=r==="24h"?t.trending24h:!0;return s&&h}).sort((t,s)=>{const h=a.get(t.id)??t.downloads;return(a.get(s.id)??s.downloads)-h}),[i,r,a]);return e.jsxs("div",{className:"echoo-studio min-h-screen bg-background text-foreground flex flex-col",children:[e.jsx(j,{title:"Marketplace | Echoo",description:`Browse and download Echoo commands. ${M}. Community-driven AI prompt library for your Echoo workflows.`,url:"https://www.echoo.ai/marketplace",keywords:"echoo commands, AI prompts, macOS productivity, text transformation, prompt library, workflow automation"}),e.jsxs(y,{children:[e.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:"https://www.echoo.ai/"},{"@type":"ListItem",position:2,name:"Marketplace"}]})}),e.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"CollectionPage",name:"Echoo Commands Marketplace",description:"Community-driven library of AI commands for Echoo workflows.",url:"https://www.echoo.ai/marketplace",isPartOf:{"@type":"WebSite",name:"Echoo",url:"https://www.echoo.ai"},mainEntity:{"@type":"ItemList",numberOfItems:c.length,itemListElement:c.map((t,s)=>({"@type":"ListItem",position:s+1,name:t.name,description:t.description,url:`https://www.echoo.ai/marketplace/${t.slug}`}))}})})]}),e.jsx(N,{onDownload:d}
6),e.jsxs("main",{id:"main-content",tabIndex:-1,className:"flex-grow",children:[e.jsx(I,{}),e.jsxs("div",{id:"commands",className:"container -scroll-mt-20 mx-auto max-w-7xl px-4 pb-16 pt-6 md:px-6 md:pb-24 md:pt-8",children:[e.jsx(v,{}),e.jsxs("div",{className:"mb-10 mt-12 flex flex-col items-start justify-between gap-4 border-b border-border pb-4 sm:flex-row sm:items-baseline",children:[e.jsxs("h2",{className:"headword text-2xl font-semibold text-foreground md:text-3xl",children:[i?"Search results":r==="24h"?"Trending":"Commands",e.jsx("span",{className:"ml-3 text-base font-normal text-muted-foreground","data-numeric":!0,children:l.length})]}),e.jsx("p",{role:"status","aria-live":"polite","aria-atomic":"true",className:"sr-only",children:l.length===0?"No commands match that search.":`${l.length} ${l.length===1?"command":"commands"} shown.`}),e.jsx("div",{className:"flex items-center gap-5",role:"group","aria-label":"Filter commands",children:[{id:"all",label:"All time"},{id:"24h",label:"Trending"}].map(t=>{const s=r===t.id;return e.jsx("button",{type:"button","aria-pressed":s,onClick:()=>f(t.id),className:C("min-h-11 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",s?"text-foreground underline decoration-accent decoration-2 underline-offset-[6px]":"text-muted-foreground hover:text-foreground"),children:t.label},t.id)})})]}),e.jsx("div",{className:"border-t border-border",children:l.length>0?l.map(t=>e.jsx(S,{command:t,liveDownloads:a.get(t.id)},t.id)):e.jsxs("div",{className:"rounded-lg border border-dashed border-border px-6 py-16",children:[e.jsx("h3",{className:"text-lg font-semibold text-foreground",children:"No commands match that search."}),e.jsx("p",{className:"mt-2 max-w-[52ch] text-sm leading-relaxed text-muted-foreground",children:"Try a shorter term, or browse everything and filter from there."}),e.jsx("button",{type:"button",onClick:p,className:"mt-6 inline-flex min-h-11 items-center rounded-lg bg-accent-solid px-5 text-sm font-semibold text-accent-foreground transition-transform active:translate-y-px focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",children:"Clear search"})]})})]})]}),e.jsx(k,{})]})};export{H as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.