{"version":3,"file":"Truncate.BeddE_MT.mjs","names":[],"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,EAAQ,EAAK,EAAO,UAAU,CAAC,CAAO,GAAW,WAAW,IAAgB,EAAI,EAAO,IAAI,IAAI,GAAG,EAAU,GAAG,IAAI,CAAO,EAAgB,EAAQ,EAAU,EAAI,CAAC,MAAO,CAAA,GAAoB,EAAK,EAAgB,CAAC,GAAG,EAAM,aAAa,EAAM,WAAW,GAAG,GAAG,GAAY,EAAC,AAAE,CACvU,SAAgB,EAAc,EAAU,CAAC,MAAO,GAAwB,EAAU,EAAe,AAAE,UAAgB,EAAsB,EAAU,CAAC,MAAO,GAAwB,EAAU,EAA4B,EAAE,CAAC,AAAE,UAAgB,EAAwB,EAAU,CAAC,MAAO,GAAwB,EAAU,EAA4B,EAAE,CAAC,AAAE,CAA4H,SAAgB,EAAuB,EAAU,CAAC,MAAO,GAAwB,EAAU,EAA4B,EAAE,CAAC,AAAE,kBAFnR,AADhU,GAA2C,IAA4B,IAAgC,CACjG,EAAe,mSAAoS,EAAO,EAA4B,GAAO,EAAE,mEAAmE,EAAM,oCAAoC,mEAAmE,EAAM,oCAAoC,mEAAmE,EAAM,oCAAoC,kEAAkE,EAAM,kCAAmC"}