{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/BRitDH5Dwkwq41IX5tky/WNpQt2oyh9r8pFbPHrQe/Character_limit.js"],
  "sourcesContent": ["// Setting Maximum Text Character Limit in Framer CMS by Doruk Kavcioglu\n// Framer.guide | Framer Course - Coming Soon\nimport{jsx as _jsx}from\"react/jsx-runtime\";export function withCharacterLimit(Component){return props=>{// Extract text property\nconst{text,...otherProps}=props;const limit=80// Set character limit\n;// Check if text is longer than limit, if so, trim it\nlet trimmedText=text;if((text===null||text===void 0?void 0:text.length)>limit){trimmedText=text.slice(0,limit).trim()// Trim extra spaces\n;// Check if trimmed text ends with dot\nif(trimmedText.endsWith(\".\")){trimmedText=trimmedText.slice(0,-1).trim()// Remove extra dot if it ends with a dot\n;}trimmedText+=\"...\"// Add three dots\n;}return /*#__PURE__*/_jsx(Component,{...otherProps,text:trimmedText});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withCharacterLimit\":{\"type\":\"reactHoc\",\"name\":\"withCharacterLimit\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Character_limit.map"],
  "mappings": "yCAEkD,SAASA,EAAmBC,EAAU,CAAC,OAAOC,GAAO,CACvG,GAAK,CAAC,KAAAC,EAAK,GAAGC,CAAU,EAAEF,EAAYG,EAAM,GAExCC,EAAYH,EAAK,OAAsCA,GAAK,OAAQE,IAAOC,EAAYH,EAAK,MAAM,EAAEE,CAAK,EAAE,KAAK,EAEjHC,EAAY,SAAS,GAAG,IAAGA,EAAYA,EAAY,MAAM,EAAE,EAAE,EAAE,KAAK,GACrEA,GAAa,OACOC,EAAKN,EAAU,CAAC,GAAGG,EAAW,KAAKE,CAAW,CAAC,CAAE,CAAE",
  "names": ["withCharacterLimit", "Component", "props", "text", "otherProps", "limit", "trimmedText", "p"]
}
