{"version":3,"file":"BlogFilter.B6LNiSI3.mjs","names":["ACCENT","BORDER","SUBTLE","useState"],"sources":["https:/framerusercontent.com/modules/hmVGmn7URLE2AOBJzJ7X/YJW3iR2uolq8CQz3H6kg/BlogCard.js","https:/framerusercontent.com/modules/uX6UvhQ7HwmUZyqHCFRz/d4Cfu20Iq1suC91ZfLNM/BlogFilter.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";const ACCENT=\"rgb(255,90,0)\";const TEXT=\"rgb(240,242,245)\";const SUBTLE=\"rgb(147,149,153)\";const BORDER=\"rgba(255,255,255,0.1)\";const SURFACE=\"rgba(255,255,255,0.02)\";function fmtDate(s){if(!s)return\"\";const d=new Date(s);if(isNaN(d.getTime()))return s;return d.toLocaleDateString(\"en-US\",{month:\"short\",day:\"numeric\",year:\"numeric\"});}/**\n * One blog card. Drop inside a Collection List and bind each property to a\n * Blog field (Cover Image, Topic, Title, Excerpt, Author, Date, Reading Time).\n * The card itself is NOT a link — the Collection List item provides the link\n * to the post, so this stays a plain container to avoid nested <a> tags.\n * Title reserves two lines and excerpt three, so every card is the same\n * height. Emits a hidden marker (data-blog-card / data-topic) for BlogFilter.\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 360\n * @framerIntrinsicHeight 360\n */export default function BlogCard(props){const{topic=\"Playbook\",title=\"Post title goes here\",excerpt=\"A short summary of the post that wraps to about two lines before it gets clamped with an ellipsis.\",author=\"Dallon Robinette\",dateText=\"2026-06-18\",readingTime=\"6 min read\",cover,imageAlt=\"\",accentColor=ACCENT,style}=props;const coverUrl=typeof cover===\"string\"?cover:cover&&cover.src?cover.src:\"\";const topicText=typeof topic===\"string\"?topic:topic!=null?String(topic):\"\";const meta=[author,fmtDate(dateText),readingTime].filter(Boolean).join(\" \\xb7 \");const clamp=(lines,reserve)=>({display:\"-webkit-box\",WebkitLineClamp:lines,WebkitBoxOrient:\"vertical\",overflow:\"hidden\",minHeight:reserve});useEffect(()=>{if(typeof document===\"undefined\")return;const id=\"avolis-blogcard-hover\";if(document.getElementById(id))return;const el=document.createElement(\"style\");el.id=id;el.textContent=`\n            .bl-card { transition: border-color .2s ease, transform .2s ease, background .2s ease; }\n            .bl-card:hover { border-color: rgba(255,90,0,0.4) !important; transform: translateY(-2px); background: rgba(255,90,0,0.04) !important; }\n            @media (prefers-reduced-motion: reduce) { .bl-card:hover { transform: none; } }\n        `;document.head.appendChild(el);},[]);return /*#__PURE__*/_jsxs(\"div\",{className:\"bl-card\",style:{display:\"flex\",flexDirection:\"column\",height:\"100%\",width:\"100%\",boxSizing:\"border-box\",overflow:\"hidden\",borderRadius:16,border:`1px solid ${BORDER}`,background:SURFACE,cursor:\"pointer\",fontFamily:\"Inter, sans-serif\",...style},children:[/*#__PURE__*/_jsx(\"span\",{\"data-blog-card\":\"true\",\"data-topic\":topicText,\"aria-hidden\":\"true\",style:{display:\"none\"}}),/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",aspectRatio:\"16 / 9\",flexShrink:0,overflow:\"hidden\",background:\"linear-gradient(135deg, rgba(255,90,0,0.18), rgba(8,10,14,0.92)), #0c0f14\"},children:coverUrl?/*#__PURE__*/_jsx(\"img\",{src:coverUrl,alt:imageAlt,loading:\"lazy\",style:{width:\"100%\",height:\"100%\",objectFit:\"cover\",display:\"block\"}}):null}),/*#__PURE__*/_jsxs(\"div\",{style:{flex:1,display:\"flex\",flexDirection:\"column\",gap:10,padding:22},children:[/*#__PURE__*/_jsx(\"span\",{style:{fontFamily:\"'JetBrains Mono', monospace\",fontSize:11,fontWeight:600,letterSpacing:\"0.08em\",textTransform:\"uppercase\",color:accentColor},children:topicText}),/*#__PURE__*/_jsx(\"h3\",{style:{margin:0,fontSize:18,fontWeight:600,lineHeight:1.3,color:TEXT,...clamp(2,\"2.6em\")},children:title}),/*#__PURE__*/_jsx(\"p\",{style:{margin:0,fontSize:14,lineHeight:1.5,color:SUBTLE,...clamp(3,\"4.5em\")},children:excerpt}),/*#__PURE__*/_jsx(\"div\",{style:{marginTop:\"auto\",paddingTop:10,fontSize:12,color:SUBTLE},children:meta})]})]});}addPropertyControls(BlogCard,{cover:{type:ControlType.Image,title:\"Cover\"},imageAlt:{type:ControlType.String,title:\"Image alt\"},topic:{type:ControlType.String,title:\"Topic\",defaultValue:\"Playbook\"},title:{type:ControlType.String,title:\"Title\",displayTextArea:true,defaultValue:\"Post title goes here\"},excerpt:{type:ControlType.String,title:\"Excerpt\",displayTextArea:true,defaultValue:\"A short summary of the post that wraps to about two lines before it gets clamped with an ellipsis.\"},author:{type:ControlType.String,title:\"Author\",defaultValue:\"Dallon Robinette\"},dateText:{type:ControlType.String,title:\"Date\",defaultValue:\"2026-06-18\"},readingTime:{type:ControlType.String,title:\"Reading time\",defaultValue:\"6 min read\"},accentColor:{type:ControlType.Color,title:\"Accent\",defaultValue:ACCENT}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BlogCard\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any\",\"framerSupportedLayoutWidth\":\"any\",\"framerIntrinsicWidth\":\"360\",\"framerIntrinsicHeight\":\"360\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BlogCard.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";const ACCENT=\"rgb(255,90,0)\";const SUBTLE=\"rgb(147,149,153)\";const BORDER=\"rgba(255,255,255,0.1)\";/**\n * Topic filter chips for a CMS-driven blog grid. Place this directly ABOVE a\n * Collection List whose items use BlogCard. It reads the topics present in the\n * rendered cards, and clicking a chip shows only the matching cards. The list\n * does not need to be nested inside this component — it filters by scanning the\n * page for BlogCard markers.\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 900\n * @framerIntrinsicHeight 60\n */export default function BlogFilter(props){const{accentColor=ACCENT,maxWidth=1128,style}=props;const[topics,setTopics]=useState([\"All\"]);const[active,setActive]=useState(\"All\");function getCards(){if(typeof document===\"undefined\")return[];return Array.from(document.querySelectorAll(\"[data-blog-card]\"));}// Climb from a card marker to the per-item cell (direct child of the\n// repeating grid) so hiding it collapses the layout cleanly.\nfunction itemWrapper(card){let el=card;while(el.parentElement&&el.parentElement!==document.body&&el.parentElement.querySelectorAll(\"[data-blog-card]\").length<=1){el=el.parentElement;}return el;}useEffect(()=>{if(typeof document===\"undefined\")return;let stopped=false;const collect=()=>{if(stopped)return;const found=[];getCards().forEach(c=>{const t=(c.getAttribute(\"data-topic\")||\"\").trim();if(t&&!found.includes(t))found.push(t);});if(!found.length)return;setTopics(prev=>{const next=[\"All\",...found];const same=prev.length===next.length&&prev.every((v,i)=>v===next[i]);return same?prev:next;});};collect();const timers=[120,350,800,1600,3e3].map(ms=>setTimeout(collect,ms));const mo=new MutationObserver(collect);mo.observe(document.body,{childList:true,subtree:true,attributes:true,attributeFilter:[\"data-topic\"]});return()=>{stopped=true;timers.forEach(clearTimeout);mo.disconnect();};},[]);useEffect(()=>{if(typeof document===\"undefined\")return;getCards().forEach(card=>{const t=(card.getAttribute(\"data-topic\")||\"\").trim();const show=active===\"All\"||t===active;const w=itemWrapper(card);if(w)w.style.display=show?\"\":\"none\";});},[active,topics]);return /*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",flexWrap:\"wrap\",gap:10,width:\"100%\",maxWidth,marginLeft:\"auto\",marginRight:\"auto\",boxSizing:\"border-box\",padding:\"16px 24px 28px 24px\",fontFamily:\"Inter, sans-serif\",...style},children:topics.map(t=>{const on=t===active;return /*#__PURE__*/_jsx(\"button\",{onClick:()=>setActive(t),style:{cursor:\"pointer\",fontFamily:\"inherit\",fontSize:13,fontWeight:600,letterSpacing:\"0.01em\",padding:\"8px 16px\",borderRadius:999,border:`1px solid ${on?\"rgba(255,90,0,0.5)\":BORDER}`,background:on?\"rgba(255,90,0,0.12)\":\"transparent\",color:on?accentColor:SUBTLE,transition:\"color .15s ease, border-color .15s ease, background .15s ease\"},children:t},t);})});}addPropertyControls(BlogFilter,{accentColor:{type:ControlType.Color,title:\"Accent\",defaultValue:ACCENT},maxWidth:{type:ControlType.Number,title:\"Max width\",defaultValue:1128,min:320,max:1600,step:1}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BlogFilter\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"60\",\"framerIntrinsicWidth\":\"900\",\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BlogFilter.map"],"mappings":"mLAAiT,SAAS,EAAQ,EAAE,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,IAAM,EAAE,IAAI,KAAK,CAAC,EAAiC,OAA5B,MAAM,EAAE,QAAQ,CAAC,EAAS,EAAS,EAAE,mBAAmB,QAAQ,CAAC,MAAM,QAAQ,IAAI,UAAU,KAAK,SAAS,CAAC,CAAE,CAYtd,SAAwB,EAAS,EAAM,CAAC,GAAK,CAAC,QAAM,WAAW,QAAM,uBAAuB,UAAQ,qGAAqG,SAAO,mBAAmB,WAAS,aAAa,cAAY,aAAa,QAAM,WAAS,GAAG,cAAYA,EAAO,SAAO,EAAY,EAAS,OAAO,GAAQ,SAAS,EAAM,GAAO,EAAM,IAAI,EAAM,IAAI,GAAS,EAAU,OAAO,GAAQ,SAAS,EAAM,GAAO,KAAmB,GAAd,OAAO,CAAK,EAAW,EAAK,CAAC,EAAO,EAAQ,CAAQ,EAAE,CAAW,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,KAAQ,EAAQ,GAAO,EAAM,KAAW,CAAC,QAAQ,cAAc,gBAAgB,EAAM,gBAAgB,WAAW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