{"version":3,"file":"CollectionExcerpt.DWoR7ZAD.mjs","names":["useMemo"],"sources":["https:/framerusercontent.com/modules/dudW6QNBccF7htI48n1T/4dYB7h3DFr0NXmafsTVn/CollectionExcerpt.js"],"sourcesContent":["// Text excerpt component for Framer Collection Template. Fetches and displays excerpt from collection content.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useMemo}from\"react\";/**\n * CollectionExcerpt\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function CollectionExcerpt(props){const{content=\"\",maxLength,font,color,style}=props;const excerpt=useMemo(()=>{if(!content)return\"\";if(content.length<=maxLength)return content;let cut=content.slice(0,maxLength);// Try to cut at last space for word boundary\nconst lastSpace=cut.lastIndexOf(\" \");if(lastSpace>0)cut=cut.slice(0,lastSpace);return cut+\"…\";},[content,maxLength]);return /*#__PURE__*/_jsx(\"span\",{style:{...font,color,width:\"max-content\",...style},children:excerpt});}addPropertyControls(CollectionExcerpt,{content:{type:ControlType.String,title:\"Content\",defaultValue:\"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque euismod, urna eu tincidunt consectetur, nisi nisl aliquam enim, eget aliquam massa nisl quis neque.\",displayTextArea:true},maxLength:{type:ControlType.Number,title:\"Max Length\",defaultValue:120,min:10,max:500,step:1},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"}},color:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CollectionExcerpt\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"auto\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CollectionExcerpt.map"],"mappings":"0KAMG,SAAwB,EAAkB,EAAM,CAAC,GAAK,CAAC,UAAQ,GAAG,YAAU,OAAK,QAAM,SAAO,EAAY,EAAQA,MAAY,CAAC,GAAG,CAAC,EAAQ,MAAM,GAAG,GAAG,EAAQ,QAAQ,EAAU,OAAO,EAAQ,IAAI,EAAI,EAAQ,MAAM,EAAE,EAAU,CAC/N,EAAU,EAAI,YAAY,IAAI,CAA2C,OAAvC,EAAU,IAAE,EAAI,EAAI,MAAM,EAAE,EAAU,EAAQ,EAAI,KAAM,CAAC,EAAQ,EAAU,CAAC,CAAC,OAAoB,EAAK,OAAO,CAAC,MAAM,CAAC,GAAG,EAAK,QAAM,MAAM,cAAc,GAAG,EAAM,CAAC,SAAS,EAAQ,CAAC,kBANhL,IAAoD,IAA2B,CAMmG,EAAoB,EAAkB,CAAC,QAAQ,CAAC,KAAK,EAAY,OAAO,MAAM,UAAU,aAAa,4KAA4K,gBAAgB,GAAK,CAAC,UAAU,CAAC,KAAK,EAAY,OAAO,MAAM,aAAa,aAAa,IAAI,IAAI,GAAG,IAAI,IAAI,KAAK,EAAE,CAAC,KAAK,CAAC,KAAK,EAAY,KAAK,MAAM,OAAO,SAAS,WAAW,gBAAgB,aAAa,aAAa,CAAC,SAAS,OAAO,QAAQ,SAAS,cAAc,UAAU,WAAW,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,EAAY,MAAM,MAAM,aAAa,aAAa,UAAU,CAAC,CAAC"}