{"version":3,"file":"Markdown_text.CPIn7ea0.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/Yk7IQayTvcnoFsCHwYF4/DzY0b0wsL0OoenAp4DTc/Markdown_text.js"],"sourcesContent":["// Get Started: https://www.framer.com/developers\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export function MarkdownViewer({url}){const[content,setContent]=useState(\"\");const[loading,setLoading]=useState(true);const[Markdown,setMarkdown]=useState(null);// Load markdown renderer only in the browser\nuseEffect(()=>{import(\"react-markdown\").then(mod=>{setMarkdown(()=>mod.default);});},[]);// Fetch Markdown file\nuseEffect(()=>{if(!url)return;setLoading(true);fetch(url,{method:\"GET\"}).then(res=>res.text()).then(text=>{console.log(\"Fetched markdown content:\",text)// 🔍 debug log\n;setContent(text);setLoading(false);}).catch(err=>{console.error(\"Failed to fetch markdown:\",err);setContent(\"Failed to load content.\");setLoading(false);});},[url]);// If react-markdown hasn't loaded yet — show nothing on server / first pass\nif(!Markdown)return null;return /*#__PURE__*/_jsx(\"div\",{style:{color:\"white\",padding:\"0px\",overflowY:\"auto\",height:\"100%\",lineHeight:\"1.6\",fontFamily:\"Inter Tight, system-ui, sans-serif\"},children:loading?/*#__PURE__*/_jsx(\"p\",{children:\"Loading...\"}):/*#__PURE__*/_jsx(Markdown,{components:{a:({node,...props})=>/*#__PURE__*/_jsx(\"a\",{...props,style:{color:\"#AAE5FF\",textDecoration:\"none\",fontWeight:\"500\"},target:\"_blank\",rel:\"noopener noreferrer\"}),p:({node,...props})=>/*#__PURE__*/_jsx(\"p\",{...props,style:{margin:\"0 0 1.2em 0\"}})},children:content})});}addPropertyControls(MarkdownViewer,{url:{type:ControlType.String,title:\"Markdown URL\",placeholder:\"https://your-s3-url.md\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"MarkdownViewer\":{\"type\":\"reactComponent\",\"name\":\"MarkdownViewer\",\"slots\":[],\"annotations\":{\"framerContractVersion\":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