{"version":3,"file":"Character_Limit.ChdSh_JS.mjs","names":[],"sources":["https:/framerusercontent.com/modules/D4az1yY802mcELN3aWtH/jMZrw6DZVDrKUPV9WB54/Character_Limit.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef}from\"react\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";import{randomColor}from\"https://framer.com/m/framer/utils.js@^0.9.0\";// Character limit function\nconst truncateText=(text,limit=50)=>{if(typeof text===\"string\"&&text.length>limit){return text.substring(0,limit)+\"...\";}return text;};const useStore=createStore({background:\"#0099FF\"});export function withRotate(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{rotate:90},transition:{duration:2}});});}export function withHover(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,whileHover:{scale:1.05}});});}export function withRandomColor(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{background:store.background},onClick:()=>{setStore({background:randomColor()});}});});}// NEW: With Character Limit Override\nexport function withCharLimit(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,text:truncateText(props.text,100)});});}export function withCharLimitCategory(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,text:truncateText(props.text,35)});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withRandomColor\":{\"type\":\"reactHoc\",\"name\":\"withRandomColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCharLimit\":{\"type\":\"reactHoc\",\"name\":\"withCharLimit\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRotate\":{\"type\":\"reactHoc\",\"name\":\"withRotate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHover\":{\"type\":\"reactHoc\",\"name\":\"withHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCharLimitCategory\":{\"type\":\"reactHoc\",\"name\":\"withCharLimitCategory\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Character_Limit.map"],"mappings":"2NAEA,SAAgB,EAAc,EAAU,CAAC,OAAoB,GAAY,EAAM,IAA2B,EAAK,EAAU,CAAK,MAAI,GAAG,EAAM,KAAK,EAAa,EAAM,KAAK,IAAI,CAAC,CAAC,CAAG,CAAE,SAAgB,EAAsB,EAAU,CAAC,OAAoB,GAAY,EAAM,IAA2B,EAAK,EAAU,CAAK,MAAI,GAAG,EAAM,KAAK,EAAa,EAAM,KAAK,GAAG,CAAC,CAAC,CAAG,oBAFhU,IAA8B,IAAqE,IAAqE,CAC7M,GAAc,EAAK,EAAM,KAAS,OAAO,GAAO,UAAU,EAAK,OAAO,EAAc,EAAK,UAAU,EAAE,EAAM,CAAC,MAAc,EAAsB,EAAY,CAAC,WAAW,UAAU,CAAC"}