{"version":3,"file":"RichText.DGysoTip.mjs","names":["useMemo"],"sources":["https:/framerusercontent.com/modules/pB7jM8sL9KUtvhPvCufC/T4ZFSv1jclb0wKrlkdaj/RichText.js"],"sourcesContent":["// Texto com links em markdown, responsivo e pronto para CMS\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useMemo}from\"react\";/**\n * Texto com links markdown\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function RichText(props){const{content,color,font,style}=props;// Regex para [texto](url)\nconst parts=useMemo(()=>{const regex=/\\[([^\\]]+)\\]\\(([^)]+)\\)/g;const result=[];let lastIndex=0;let match;while(match=regex.exec(content)){if(match.index>lastIndex){result.push(content.slice(lastIndex,match.index));}result.push({text:match[1],url:match[2]});lastIndex=regex.lastIndex;}if(lastIndex<content.length){result.push(content.slice(lastIndex));}return result;},[content]);return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",color,...font,...style,background:\"transparent\",display:\"block\",minWidth:0,minHeight:0,wordBreak:\"break-word\"},children:parts.map((part,i)=>typeof part===\"string\"?/*#__PURE__*/_jsx(\"span\",{children:part},i):/*#__PURE__*/_jsx(\"a\",{href:part.url,style:{color:color,textDecoration:\"underline\"},target:\"_blank\",rel:\"noopener noreferrer\",children:part.text},i))});}addPropertyControls(RichText,{content:{type:ControlType.String,title:\"Conte\\xfado\",defaultValue:\"Texto com [link](https://framer.com) de exemplo.\",displayTextArea:true},color:{type:ControlType.Color,title:\"Cor\",defaultValue:\"#000000\"},font:{type:ControlType.Font,title:\"Fonte\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"18px\",variant:\"Regular\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"RichText\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"auto\",\"framerSupportedLayoutH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