{"version":3,"file":"Truncate.CFzP_BCe.mjs","names":["hash"],"sources":["https:/framerusercontent.com/modules/UBaRMlPACT0Yo3L4cJm7/fDoBVAGUHcH7XvSOaPXw/Truncate.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{withCSS}from\"framer\";import hash from\"@emotion/hash\";// Define style arrays for each truncation level\nconst truncateStyles=[`h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }`,`h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }`,`h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }`,`p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }`];const makeMultiLineTruncateStyles=lines=>[`h1 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: ${lines}; -webkit-box-orient: vertical; }`,`h2 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: ${lines}; -webkit-box-orient: vertical; }`,`h3 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: ${lines}; -webkit-box-orient: vertical; }`,`p { overflow: hidden; display: -webkit-box; -webkit-line-clamp: ${lines}; -webkit-box-orient: vertical; }`];// Generic function for applying styles\nfunction useTruncationWithStyles(Component,styles){const postfix=hash(styles.toString());const className=`truncate-${postfix}`;const css=styles.map(s=>`.${className} ${s}`);const StyledComponent=withCSS(Component,css);return props=>/*#__PURE__*/_jsx(StyledComponent,{...props,className:`${props.className??\"\"} ${className}`});}// Exported hooks\nexport function useTruncation(Component){return useTruncationWithStyles(Component,truncateStyles);}export function useTruncationTwoLines(Component){return useTruncationWithStyles(Component,makeMultiLineTruncateStyles(2));}export function useTruncationThreeLines(Component){return useTruncationWithStyles(Component,makeMultiLineTruncateStyles(3));}export function useTruncationFourLines(Component){return useTruncationWithStyles(Component,makeMultiLineTruncateStyles(4));}export function useTruncationFiveLines(Component){return useTruncationWithStyles(Component,makeMultiLineTruncateStyles(5));}export function useTruncationSixLines(Component){return useTruncationWithStyles(Component,makeMultiLineTruncateStyles(6));}\nexport const __FramerMetadata__ = {\"exports\":{\"useTruncation\":{\"type\":\"reactHoc\",\"name\":\"useTruncation\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useTruncationTwoLines\":{\"type\":\"reactHoc\",\"name\":\"useTruncationTwoLines\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useTruncationFiveLines\":{\"type\":\"reactHoc\",\"name\":\"useTruncationFiveLines\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useTruncationThreeLines\":{\"type\":\"reactHoc\",\"name\":\"useTruncationThreeLines\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useTruncationSixLines\":{\"type\":\"reactHoc\",\"name\":\"useTruncationSixLines\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useTruncationFourLines\":{\"type\":\"reactHoc\",\"name\":\"useTruncationFourLines\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Truncate.map"],"mappings":"+QAEA,SAAS,EAAwB,EAAU,EAAO,CAAC,IAAM,EAAQA,EAAK,EAAO,YAAkB,EAAU,YAAY,IAAgB,EAAI,EAAO,IAAI,GAAG,IAAI,EAAU,GAAG,KAAW,EAAgB,EAAQ,EAAU,GAAK,MAAO,IAAoB,EAAK,EAAgB,CAAC,GAAG,EAAM,UAAU,GAAG,EAAM,WAAW,GAAG,GAAG,IAAY,CAAG,CACvU,SAAgB,EAAc,EAAU,CAAC,OAAO,EAAwB,EAAU,EAAiB,UAAgB,EAAsB,EAAU,CAAC,OAAO,EAAwB,EAAU,EAA4B,GAAK,UAAgB,EAAwB,EAAU,CAAC,OAAO,EAAwB,EAAU,EAA4B,GAAK,CAA4H,SAAgB,EAAuB,EAAU,CAAC,OAAO,EAAwB,EAAU,EAA4B,GAAK,+BAF7kB,EAAe,CAAC,yEAAyE,yEAAyE,yEAAyE,wEAAwE,CAAO,EAA4B,GAAO,CAAC,oEAAoE,EAAM,mCAAmC,oEAAoE,EAAM,mCAAmC,oEAAoE,EAAM,mCAAmC,mEAAmE,EAAM,mCAAmC"}