PageSourceSearch

https://wystem.ai/assets/NewsletterLabIndex-Bv9Iwao-.js

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

1import{r as n,j as e}from"./vendor-react-BTaBH3I0.js";import{H as g}from"./vendor-helmet-BVAFyVM5.js";import{aF as x,aG as u,L as w}from"./index-pVy5dhMT.js";import"./vendor-misc-DOep9v2o.js";import"./vendor-router-DaUSQCqh.js";const T=()=>{const[m,p]=n.useState([]),[f,a]=n.useState(!0),[o,l]=n.useState(null),[i,d]=n.useState(new Set),c=n.useCallback(async()=>{a(!0),l(null);try{const t=i.size?`?sectors=${encodeURIComponent(Array.from(i).join(","))}`:"",r=await fetch(`/api/lab/newsletter-variants${t}`);if(!r.ok)throw new Error(`HTTP ${r.status}`);const s=await r.json();p(s.variants??[])}catch(t){l((t==null?void 0:t.message)??"Failed to load")}finally{a(!1)}},[i]);n.useEffect(()=>{c()},[c]);const y=t=>d(r=>{const s=new Set(r);return s.has(t)?s.delete(t):s.add(t),s}),h=t=>{var r;try{const s=(r=t.currentTarget.contentWindow)==null?void 0:r.document;s&&(t.currentTarget.style.height=`${s.body.scrollHeight+28}px`)}catch{}};return e.jsxs("div",{style:{maxWidth:1100,margin:"0 auto",padding:"40px 20px 80px"},children:[e.jsx(g,{children:e.jsx("title",{children:"Newsletter design lab · Wystem"})}),e.jsxs("header",{style:{marginBottom:8},children:[e.jsx("div",{style:{fontFamily:"var(--wystem-font-mono, monospace)",fontSize:11,fontWeight:700,letterSpacing:"0.18em",textTransform:"uppercase",color:"var(--wystem-accent-primary-ink, #7c4315)"},children:"Lab · Newsletter"}),e.jsx("h1",{style:{fontFamily:"var(--wystem-font-display, serif)",fontSize:34,fontWeight:800,color:"var(--wystem-ink-primary, #0f172a)",margin:"6px 0 0"},children:"The Commons Briefing — 10 ways"}),e.jsxs("p",{style:{fontFamily:"var(--wystem-font-serif, serif)",fontSize:16,lineHeight:1.55,color:"var(--wystem-ink-secondary, #475569)",maxWidth:680,marginTop:10},children:["Ten email designs inspired by the best in the business — The Economist, The New Yorker, The New York Times, The Guardian — and six impeccable originals. Every variant leads with the emerging ",e.jsx("strong",{children:"collective wisdom"}),": the top cross-organisation Finding and the strongest Signal from the field, kept short and curiosity-first so readers click through to wystem.ai."]})]}),e.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:6,alignItems:"center",margin:"18px 0 28px",paddingBottom:20,borderBottom:"1px solid var(--wystem-hairline, #e2e8f0)"},children:[e.jsx("span",{style:{fontSize:11,fontWeight:700,letterSpacing:"0.1em",textTransform:"uppercase",color:"var(--wystem-ink-muted, #64748b)",marginRight:4},children:"Preview interests:"}),x.map(t=>{const r=i.has(t);return e.jsx("button",{type:"button",onClick:()=>y(t),style:{padding:"4px 10px",borderRadius:4,fontSize:12,fontWeight:600,cursor:"pointer",border:`1px solid ${r?"var(--wystem-accent-primary, #b5621e)":"var(--wystem-hairline, #e2e8f0)"}`,background:r?"var(--wystem-accent-primary, #b5621e)":"var(--wystem-surface-canvas, #fff)",color:r?"#fff":"var(--wystem-ink-secondary, #475569)"},children:u[t]},t)}),i.size>0&&e.jsx("button",{type:"button",onClick:()=>d(new Set),style:{marginLeft:6,fontSize:12,color:"var(--wystem-ink-muted)",background:"none",border:"none",cursor:"pointer",textDecoration:"underline"},children:"clear"})]}),f&&e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,color:"var(--wystem-ink-muted)",padding:"40px 0"},children:[e.jsx(w,{size:18,className:"animate-spin"})," Rendering 10 variants…"]}),o&&e.jsxs("div",{style:{color:"#b8341a",padding:"20px 0"},children:["Couldn’t render variants: ",o]}),e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(560px, 1fr))",gap:28,alignItems:"start"},children:m.map((t,r)=>e.jsxs("section",{style:{minWidth:0},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:10,marginBottom:10},children:[e.jsx("span",{style:{fontFamily:"var(--wystem-font-mono, monospace)",fontSize:13,fontWeight:700,color:"var(--wystem-accent-primary-ink, #7c4315)"},children:String(r+1).padStart(2,"0")}),e.jsxs("div",{style:{minWidth:0},children:[e.jsx("div",{style:{fontFamily:"var(--wystem-font-display, serif)",fontSize:18,fontWeight:700,color:"var(--wystem-ink-primary, #0f172a)"},children:t.name}),e.jsxs("div",{style:{fontSize:11,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:"var(--wystem-ink-muted, #64748b)"},children:["after ",t.inspiration]})]})]}),e.jsx("div",{style:{borderRadius:10,overflow:"hidden",border:"1px solid var(--wystem-hairline, #e2e8f0)",boxShadow:"0 6px 22px rgba(15,23,42,.08)",background:"#fff"},children:e.jsx("iframe",{title:t.name,srcDoc:t.html,onLoad:h,sandbox:"allow-same-origin",style:{width:"100%",height:1200,border:"none",display:"block",background:"#fff"}})})]},t.id))})]})};export{T as NewsletterLabIndex};

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.