{"version":3,"file":"ReadTime.CFGUAppX.mjs","names":[],"sources":["https:/framerusercontent.com/modules/Jo5N8XlMWPF9De9GbSdL/jFr66S4xjowj8VqrUKgR/ReadTime.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";export default function ReadTime(props){const{text,wordsPerMinute,suffix,style}=props;// If no text is connected, show a placeholder\nif(!text){return /*#__PURE__*/_jsx(\"div\",{style:style,children:\"0 min read\"});}// 1. Strip HTML tags (if CMS sends rich text)\n// 2. Split by spaces to count words\n// 3. Divide by speed\nconst cleanText=text.replace(/<[^>]*>?/gm,\"\");const wordCount=cleanText.split(/\\s+/).length;const readTime=Math.ceil(wordCount/wordsPerMinute);return /*#__PURE__*/_jsxs(\"div\",{style:style,children:[readTime,\" \",suffix]});}addPropertyControls(ReadTime,{text:{type:ControlType.String,title:\"Content Source\",defaultValue:\"\",placeholder:\"Connect to CMS Content\",displayTextArea:true},wordsPerMinute:{type:ControlType.Number,title:\"Speed (WPM)\",defaultValue:200,min:100,max:500},suffix:{type:ControlType.String,title:\"Suffix\",defaultValue:\"min read\"},style:{type:ControlType.Object,title:\"Style\",controls:{fontFamily:{type:ControlType.String,defaultValue:\"Inter, sans-serif\"},fontSize:{type:ControlType.Number,defaultValue:14},// CHANGED: Update the color defaultValue here\ncolor:{type:ControlType.Color,defaultValue:\"#596671\"}},// CHANGED: Also update the color in the top-level defaultValue\ndefaultValue:{fontFamily:\"Inter, sans-serif\",fontSize:14,color:\"#596671\"}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ReadTime\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ReadTime.map"],"mappings":"8JAA6G,SAAwB,EAAS,EAAM,CAAC,GAAK,CAAC,OAAK,iBAAe,SAAO,SAAO,EAC7L,GAAG,CAAC,EAAM,OAAoB,EAAK,MAAM,CAAO,QAAM,SAAS,aAAa,CAAC,CAG/B,IAAM,EAApC,EAAK,QAAQ,aAAa,GAAG,CAA2B,MAAM,MAAM,CAAC,OAA0D,OAAoB,EAAM,MAAM,CAAO,QAAM,SAAS,CAA1F,KAAK,KAAK,EAAU,EAAe,CAAiE,IAAI,EAAO,CAAC,CAAC,kBAJnK,IAAoD,CAIiH,EAAoB,EAAS,CAAC,KAAK,CAAC,KAAK,EAAY,OAAO,MAAM,iBAAiB,aAAa,GAAG,YAAY,yBAAyB,gBAAgB,GAAK,CAAC,eAAe,CAAC,KAAK,EAAY,OAAO,MAAM,cAAc,aAAa,IAAI,IAAI,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,EAAY,OAAO,MAAM,SAAS,aAAa,WAAW,CAAC,MAAM,CAAC,KAAK,EAAY,OAAO,MAAM,QAAQ,SAAS,CAAC,WAAW,CAAC,KAAK,EAAY,OAAO,aAAa,oBAAoB,CAAC,SAAS,CAAC,KAAK,EAAY,OAAO,aAAa,GAAG,CACjtB,MAAM,CAAC,KAAK,EAAY,MAAM,aAAa,UAAU,CAAC,CACtD,aAAa,CAAC,WAAW,oBAAoB,SAAS,GAAG,MAAM,UAAU,CAAC,CAAC,CAAC"}