{"version":3,"file":"Blog_Date_Format.DM7tSCRU.mjs","names":["__legacyOverrideHOC_DataObserverContext","_jsx"],"sources":["https:/framerusercontent.com/modules/i39GGCZL3nwWTdJ2k0mt/Vuyyp31GypspJMICratZ/Blog_Date_Format.js"],"sourcesContent":["// BlogDateOverride.tsx\n// Override that formats a CMS date prop as \"DEC 12 '26\"\n// while letting you style the Text layer completely in Framer.\nimport{jsx as _jsx}from\"react/jsx-runtime\";function formatDateString(date){if(!date)return null;const d=new Date(date);if(isNaN(d.getTime())){// date string not parseable\nreturn null;}const month=d.toLocaleString(\"en-US\",{month:\"short\"}).toUpperCase()// DEC\n;const day=d.getDate()// 12\n;const yearShort=String(d.getFullYear()).slice(-2)// 26\n;return`${month} ${day} '${yearShort}`;}// Attach this override to your Text layer\nexport function BlogDateText(props){// props.date is coming from the custom Data prop wired to CMS\nconst rawDate=props.date;const formatted=formatDateString(rawDate);if(!formatted){// If parsing fails, keep whatever text the layer has\nreturn{};}return{text:formatted};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withBlogDateText(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...BlogDateText(props)});};}withBlogDateText.displayName=\"BlogDateText\";\nexport const __FramerMetadata__ = {\"exports\":{\"withBlogDateText\":{\"type\":\"reactHoc\",\"name\":\"withBlogDateText\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"BlogDateText\":{\"type\":\"override\",\"name\":\"BlogDateText\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Blog_Date_Format.map"],"mappings":"mKAG2C,SAAS,EAAiB,EAAK,CAAC,GAAG,CAAC,EAAK,OAAO,KAAK,IAAM,EAAE,IAAI,KAAK,EAAK,CAIrH,OAJyH,MAAM,EAAE,SAAS,CAAC,CACrI,KAGA,GAHkB,EAAE,eAAe,QAAQ,CAAC,MAAM,QAAQ,CAAC,CAAC,aAAa,CAGhE,GAFL,EAAE,SAAS,CAEC,IADN,OAAO,EAAE,aAAa,CAAC,CAAC,MAAM,GAAG,GAElD,SAAgB,EAAa,EAAM,CACnC,IAAM,EAAQ,EAAM,KAAW,EAAU,EAAiB,EAAQ,CACxD,OAD6D,EACvD,CAAC,KAAK,EAAU,CAA1B,EAAE,CAA6K,SAAgB,EAAiB,EAAE,CAAC,MAAO,KAAQ,EAA+BA,EAAwC,CAAQC,EAAK,EAAE,CAAC,GAAG,EAAM,GAAG,EAAa,EAAM,CAAC,CAAC,mBAPrT,IAOuD,IAAmF,CAA+K,EAAiB,YAAY"}