PageSourceSearch

https://wystem.ai/assets/EchoesDirectoryPage-BPnB3l_s.js

js wystem.ai collected 2026-10-05 15:26:53 UTC 4,248 bytes, 1 lines download raw bytes

1import{r as n,j as t}from"./vendor-react-BTaBH3I0.js";import{H as k}from"./vendor-helmet-BVAFyVM5.js";import{b as j}from"./navigation-Dh0zVaO9.js";import{B as v}from"./Breadcrumbs-DZm62UFR.js";import{D as S,q as E}from"./LumaCards-BipzN3-u.js";import{u as D,j as C,c as N,f as P}from"./index-pVy5dhMT.js";import{a as F,u as T,e as A}from"./vendor-router-DaUSQCqh.js";import"./vendor-misc-DOep9v2o.js";import"./OwnerInlineControls-B2VlUHpd.js";const U=()=>{const{t:o}=D(),{locale:c}=C(),i=F(),l=T(),[y,x]=A(),w=y.get("category"),[r,b]=n.useState(null),[m,p]=n.useState(null),[a,f]=n.useState(w);n.useEffect(()=>{const e=new URLSearchParams(y);a?e.set("category",a):e.delete("category"),x(e,{replace:!0})},[a]),n.useEffect(()=>{let e=!1;return N("/api/echoes?limit=200").then(s=>s.ok?s.json():Promise.reject(new Error(`status ${s.status}`))).then(s=>{e||(b(s),p(null))}).catch(s=>{e||p(s instanceof Error?s.message:"failed")}),()=>{e=!0}},[c]);const d=n.useMemo(()=>{if(!r)return[];const e=new Map;for(const s of r)s.category&&e.set(s.category,(e.get(s.category)??0)+1);return Array.from(e.entries()).map(([s,u])=>({key:s,count:u})).sort((s,u)=>u.count-s.count)},[r]),h=n.useMemo(()=>r?a?r.filter(e=>e.category===a):r:null,[r,a]);return t.jsxs(t.Fragment,{children:[t.jsxs(k,{children:[t.jsx("title",{children:o("echoesDir.helmetTitle","Echoes · wystem.ai")}),t.jsx("meta",{name:"description",content:o("echoesDir.helmetDescription","Echoes from the commons — questions raised by two or more organisations across the social sector, surfaced when the same question keeps coming back.")})]}),t.jsx(v,{items:[{label:o("breadcrumbs.commons","Commons"),href:"/"},{label:o("breadcrumbs.echoes","Echoes")}]}),t.jsxs("div",{className:"max-w-5xl mx-auto px-6 py-10",children:[t.jsx("p",{className:"text-[10px] font-bold uppercase mb-3",style:{letterSpacing:"var(--wystem-badge-tracking)",color:"var(--wystem-accent-secondary-ink, #059669)",fontFamily:"var(--wystem-font-display)"},children:o("echoesDir.kicker","The Directory · Echoes")}),t.jsx("h1",{className:"mb-3",style:{fontFamily:"var(--wystem-font-display)",fontWeight:800,fontSize:"clamp(1.75rem, 3.5vw, 2.5rem)",color:"var(--wystem-ink-primary)",letterSpacing:"-0.02em",lineHeight:1.15},children:o("echoesDir.h1","Echoes from the commons")}),t.jsx("p",{className:"mb-8 max-w-2xl",style:{fontFamily:"var(--wystem-font-serif)",fontStyle:"italic",fontSize:16,color:"var(--wystem-ink-secondary)",lineHeight:1.55},children:o("echoesDir.lead","Questions raised by two or more organisations in the commons — patterns the documents return to, gaps worth naming. A single voice doesn't make an echo. Each links to the organisations whose work surfaced it.")}),d.length>0&&t.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-6",children:[t.jsx(g,{label:o("echoesDir.categoryAll","All"),count:(r==null?void 0:r.length)??0,active:a===null,onClick:()=>f(null)}),d.map(e=>t.jsx(g,{label:P(e.key),count:e.count,active:a===e.key,onClick:()=>f(e.key)},e.key))]}),!r&&!m&&t.jsx(S,{}),m&&!r&&t.jsxs("p",{style:{color:"var(--wystem-ink-muted)",fontStyle:"italic"},children:[o("placesDir.errorPrefix","The commons couldn't read just now")," (",m,")."]}),r&&r.length===0&&t.jsx("p",{style:{color:"var(--wystem-ink-muted)",fontStyle:"italic"},children:o("echoesDir.emptyState","No open questions surfaced yet. New ones appear after each ingest cycle.")}),h&&h.length>0&&t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-6 gap-y-2",children:h.map(e=>t.jsx(E,{echo:e,onClick:()=>i(`/echo/${encodeURIComponent(e.slug)}?from=${j(l)}`)},e.id))})]})]})},g=({label:o,count:c,active:i,onClick:l})=>t.jsxs("button",{type:"button",onClick:l,className:"inline-flex items-baseline gap-1.5 transition-colors",style:{background:i?"var(--wystem-ink-primary)":"transparent",color:i?"var(--wystem-surface-canvas)":"var(--wystem-ink-secondary)",border:`1px solid ${i?"var(--wystem-ink-primary)":"var(--wystem-hairline)"}`,borderRadius:2,padding:"4px 10px",fontFamily:"var(--wystem-font-display)",fontSize:11,fontWeight:600,letterSpacing:"0.06em",textTransform:"uppercase",cursor:"pointer"},children:[o,t.jsx("span",{style:{opacity:.7,fontWeight:500},children:c})]});
1export{U as EchoesDirectoryPage,U 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.